Check return value of bfd_init
[binutils-gdb.git] / gdb / ChangeLog
1 2018-10-30 Tom Tromey <tom@tromey.com>
2
3 * main.c (captured_main_1): Check return value of bfd_init.
4
5 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
6
7 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
8 Adjust comments.
9
10 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11
12 * procfs.c: Include common/pathstuff.h.
13
14 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
15
16 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
17 Add missing braces. No functional change.
18
19 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
20
21 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
22 to report a bad option and fix indentation.
23 * demangle.c (demangle_command): Use report_unrecognized_option_error
24 to report a bad option and correctly report the bad option.
25
26 2018-10-27 Tom Tromey <tom@tromey.com>
27
28 PR cli/23364:
29 * darwin-nat.c (copied_shell): New global.
30 (may_have_sip): Rename from should_disable_startup_with_shell.
31 (copy_shell_to_cache, maybe_cache_shell): New functions.
32 (darwin_nat_target::create_inferior): Update. Use
33 copied_shell.
34
35 2018-10-27 Tom Tromey <tom@tromey.com>
36
37 * unittests/scoped_fd-selftests.c (test_to_file): New function.
38 (run_tests): Call test_to_file.
39 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
40 temporary files.
41 * common/scoped_fd.h (scoped_fd::to_file): New method.
42
43 2018-10-27 Tom Tromey <tom@tromey.com>
44
45 * unittests/scoped_mmap-selftests.c (test_normal): Use
46 gdb_mkostemp_cloexec.
47 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
48 Use gdb_mkostemp_cloexec.
49 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
50 gnulib/config.in, gnulib/configure,
51 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
52 gnulib/import/m4/gnulib-cache.m4,
53 gnulib/import/m4/gnulib-comp.m4: Update.
54 * gnulib/import/m4/mkostemp.m4: New file.
55 * gnulib/import/m4/mkstemp.m4: Remove.
56 * gnulib/import/mkostemp.c: New file.
57 * gnulib/import/mkstemp.m4: Remove.
58 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
59 mkstemp, add mkostemp. Apply new patch.
60 * gnulib/import/stdlib.in.h: Apply patch.
61 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
62 New file.
63 * dwarf-index-write.c (write_psymtabs_to_index): Use
64 gdb_mkostemp_cloexec.
65 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
66
67 2018-10-27 Tom Tromey <tom@tromey.com>
68
69 * unittests/mkdir-recursive-selftests.c: New file.
70 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
71 unittests/mkdir-recursive-selftests.c.
72 * dwarf-index-cache.c (mkdir_recursive): Move to
73 common/filestuff.c.
74 (index_cache::store): Check return value of mkdir_recursive.
75 (create_dir_and_check, test_mkdir_recursive): Move to new file.
76 (_initialize_index_cache): Don't register test.
77 * common/filestuff.h (mkdir_recursive): Declare.
78 * common/filestuff.c (mkdir_recursive): Move from
79 dwarf-index-cache.c. Return bool.
80
81 2018-10-27 Tom Tromey <tom@tromey.com>
82
83 * dwarf-index-write.c (write_psymtabs_to_index): Move
84 make_temp_filename to common/pathstuff.c.
85 * common/pathstuff.h (make_temp_filename): Declare.
86 * common/pathstuff.c (make_temp_filename): New function, moved
87 from dwarf-index-write.c.
88
89 2018-10-27 Tom Tromey <tom@tromey.com>
90
91 * procfs.c (procfs_target::create_inferior): Use get_shell.
92 * cli/cli-cmds.c (shell_escape): Use get_shell.
93 * windows-nat.c (windows_nat_target::create_inferior): Use
94 get_shell.
95 * common/pathstuff.c (get_shell): New function.
96 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
97 (fork_inferior): Use get_shell.
98 * common/pathstuff.h (get_shell): Declare.
99
100 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
101
102 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
103
104 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
105
106 * stack.c (print_variable_and_value_data): Add preg and treg.
107 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
108 and update callers.
109 (print_frame_arg_vars): Likewise.
110 (prepare_reg): New function.
111 (info_locals_command): Extract info print args and use them.
112 (info_args_command): Likewise.
113 (_initialize_stack): Modify on-line help.
114 * symtab.c (treg_matches_sym_type_name): New function.
115 (search_symbols): New arg t_regexp.
116 (symtab_symbol_info): New args quiet, regexp, t_regexp.
117 (info_variables_command): Extract info print args and use them.
118 (info_functions_command): Likewise.
119 (info_types_command): Update call to symtab_symbol_info.
120 (_initialize_symtab): Modify on-line help.
121 * symtab.h (treg_matches_sym_type_name): New function.
122 (search_symbols): New t_regexp arg.
123
124 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
125
126 * cli-utils.c (extract_arg_maybe_quoted): New function.
127 (extract_info_print_args): New function.
128 (info_print_args_help): New function.
129 (report_unrecognized_option_error): New function.
130 * cli-utils.h (extract_arg_maybe_quoted): New function.
131 (extract_info_print_args): New function.
132 (info_print_args_help): New function.
133 (report_unrecognized_option_error): New function.
134
135 2018-10-26 Tom Tromey <tom@tromey.com>
136
137 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
138 (compute_compunit_symtab_includes): Update.
139 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
140 (compunit_symtab_ptr): Likewise.
141
142 2018-10-26 John Baldwin <jhb@FreeBSD.org>
143
144 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
145 default_print_auxv_entry for specific tag values.
146
147 2018-10-26 John Baldwin <jhb@FreeBSD.org>
148
149 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
150
151 2018-10-26 Jim Wilson <jimw@sifive.com>
152
153 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
154 (riscv_linux_sigframe_init): Declare.
155 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
156 (riscv_linux_sigframe): New.
157 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
158 (riscv_linux_sigframe_init): Define.
159 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
160
161 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
162 (riscv_isa_flen): Likewise. Drop static.
163 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
164 (riscv_isa_flen): Likewise. Declare.
165
166 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
167 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
168
169 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
170 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
171 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
172 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
173 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
174 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
175 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
176 Define.
177 (struct ppc_linux_features) <htm>: New field.
178 (ppc_linux_no_features): Add initializer for htm field.
179 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
180 new tdescs.
181 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
182 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
183 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
184 Define if not already defined.
185 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
186 and rs6000/powerpc-isa207-htm-vsx64l.
187 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
188 rs6000/powerpc-isa207-htm-vsx64l.xml.
189 * features/rs6000/power-htm-spr.xml: New file.
190 * features/rs6000/power-htm-core.xml: New file.
191 * features/rs6000/power64-htm-core.xml: New file.
192 * features/rs6000/power-htm-fpu.xml: New file.
193 * features/rs6000/power-htm-altivec.xml: New file.
194 * features/rs6000/power-htm-vsx.xml: New file.
195 * features/rs6000/power-htm-ppr.xml: New file.
196 * features/rs6000/power-htm-dscr.xml: New file.
197 * features/rs6000/power-htm-tar.xml: New file.
198 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
199 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
200 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
201 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
202 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
203 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
204 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
205 fetch_regset with HTM regsets.
206 (store_register, store_ppc_registers): Call store_regset with HTM
207 regsets.
208 (ppc_linux_nat_target::read_description): Set htm field in the
209 features struct if needed.
210 * ppc-linux-tdep.c: Include
211 features/rs6000/powerpc-isa207-htm-vsx32l.c and
212 features/rs6000/powerpc-isa207-htm-vsx64l.c.
213 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
214 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
215 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
216 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
217 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
218 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
219 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
220 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
221 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
222 (ppc32_linux_ctarregset): New globals.
223 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
224 (ppc_linux_collect_core_cpgrregset): New function.
225 (ppc_linux_iterate_over_regset_sections): Call back with the htm
226 regsets.
227 (ppc_linux_core_read_description): Check if the tm spr section is
228 present and set htm in the features struct.
229 (_initialize_ppc_linux_tdep): Call
230 initialize_tdesc_powerpc_isa207_htm_vsx32l and
231 initialize_tdesc_powerpc_isa207_htm_vsx64l.
232 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
233 Declare.
234 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
235 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
236 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
237 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
238 New fields.
239 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
240 Likewise.
241 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
242 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
243 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
244 New enum fields.
245 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
246 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
247 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
248 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
249 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
250 <PPC_CTAR_REGNUM>: Likewise.
251 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
252 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
253 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
254 (IS_CEFP_PSEUDOREG): Define.
255 (rs6000_register_name): Hide the upper halves of checkpointed VSX
256 registers. Return names for the checkpointed DFP, VSX, and EFP
257 pseudo registers.
258 (rs6000_pseudo_register_type): Remove initial assert and raise an
259 internal error in the else clause instead. Return types for the
260 checkpointed DFP, VSX, and EFP pseudo registers.
261 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
262 checkpointed DFP pseudo registers.
263 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
264 checkpointed VSX pseudo registers.
265 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
266 from efpr_pseudo_register_read and
267 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
268 registers.
269 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
270 Handle checkpointed DFP, VSX, and EFP registers.
271 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
272 (efp_ax_pseudo_register_collect): New functions.
273 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
274 register logic to new functions. Handle checkpointed DFP, VSX,
275 and EFP pseudo registers.
276 (rs6000_gdbarch_init): Look for and validate the htm features.
277 Include checkpointed DFP, VSX and EFP pseudo-registers.
278 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
279 HTM registers.
280
281 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
282
283 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
284 without altivec or fpu.
285
286 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
287 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
288
289 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
290 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
291 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
292 Define if not already defined.
293 * features/rs6000/power-ebb.xml: New file.
294 * features/rs6000/power-linux-pmu.xml: New file.
295 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
296 features.
297 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
298 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
299 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
300 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
301 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
302 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
303 fetch_regset with ebb and pmu regsets.
304 (store_register, store_ppc_registers): Call store_regset with ebb
305 and pmu regsets.
306 (ppc_linux_nat_target::read_description): Set isa207 field in the
307 features struct if ebb and pmu are avaiable.
308 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
309 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
310 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
311 and pmu regsets.
312 (ppc_linux_core_read_description): Check if the pmu section is
313 present and set isa207 in the features struct.
314 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
315 (ppc32_linux_pmuregset): Declare.
316 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
317 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
318 <ppc_sier_regnum>: New field.
319 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
320 New enum values.
321 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
322 values.
323 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
324 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
325 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
326 ebb and pmu features.
327
328 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
329 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
330
331 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
332 (tdesc_powerpc_isa207_vsx64l): Declare.
333 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
334 (struct ppc_linux_features) <isa207>: New field.
335 (ppc_linux_no_features): Add initializer for isa207 field.
336 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
337 new tdescs.
338 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
339 (NT_PPC_TAR): Define if not already defined.
340 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
341 rs6000/powerpc-isa207-vsx64l.
342 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
343 rs6000/powerpc-isa207-vsx64l.xml.
344 * features/rs6000/power-tar.xml: New file.
345 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
346 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
347 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
348 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
349 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
350 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
351 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
352 fetch_regset with the TAR regset.
353 (store_register, store_ppc_registers): Call store_regset with the
354 TAR regset.
355 (ppc_linux_nat_target::read_description): Set isa207 field in the
356 features struct if needed.
357 * ppc-linux-tdep.c: Include
358 features/rs6000/powerpc-isa207-vsx32l.c and
359 features/rs6000/powerpc-isa207-vsx64l.c.
360 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
361 (ppc_linux_iterate_over_regset_sections): Call back with the tar
362 regset.
363 (ppc_linux_core_read_description): Check if the tar section is
364 present and set isa207 in the features struct.
365 (_initialize_ppc_linux_tdep): Call
366 initialize_tdesc_powerpc_isa207_vsx32l and
367 initialize_tdesc_powerpc_isa207_vsx64l.
368 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
369 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
370 (enum) <PPC_TAR_REGNUM>: New enum value.
371 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
372 feature.
373 (ppc_process_record_op31): Record changes to TAR.
374
375 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
376 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
377
378 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
379 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
380 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
381 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
382 (struct ppc_linux_features) <ppr_dscr>: New field.
383 (ppc_linux_no_features): Add initializer for ppr_dscr field.
384 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
385 new tdescs.
386 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
387 Define if not already defined.
388 * features/Makefile (WHICH): Add
389 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
390 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
391 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
392 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
393 * features/rs6000/power-dscr.xml: New file.
394 * features/rs6000/power-ppr.xml: New file.
395 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
396 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
397 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
398 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
399 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
400 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
401 * ppc-linux-nat.c: Include <sys/uio.h>.
402 (fetch_regset, store_regset, check_regset): New functions.
403 (fetch_register, fetch_ppc_registers): Call fetch_regset with
404 DSCR and PPR regsets.
405 (store_register, store_ppc_registers): Call store_regset with
406 DSCR and PPR regsets.
407 (ppc_linux_get_hwcap2): New function.
408 (ppc_linux_nat_target::read_description): Call
409 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
410 features struct if needed.
411 * ppc-linux-tdep.c: Include
412 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
413 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
414 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
415 (ppc32_linux_dscrregset): New globals.
416 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
417 and dscr regsets.
418 (ppc_linux_core_read_description): Check if the ppr and dscr
419 sections are present and set ppr_dscr in the features struct.
420 (_initialize_ppc_linux_tdep): Call
421 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
422 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
423 * ppc-linux-tdep.h (ppc32_linux_pprregset)
424 (ppc32_linux_dscrregset): Declare.
425 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
426 <ppc_dscr_regnum>: New field.
427 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
428 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
429 and dscr features.
430 (ppc_process_record_op31): Record changes to PPR and DSCR.
431
432 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
433
434 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
435 second initializer line for the have_* variables. Initialize
436 have_fpu to 0 instead of 1.
437
438 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
439
440 * arch/ppc-linux-common.c (ppc_linux_match_description):
441 Parenthesize tdesc assignements and indent them properly.
442
443 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
444
445 * ppc-linux-nat.c (fetch_register): Change if statement to else
446 if.
447 (store_register): Likewise.
448
449 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
450
451 * rs6000-tdep.c: Remove reggroups.h include.
452 (rs6000_pseudo_register_reggroup_p): Remove.
453 (rs6000_gdbarch_init): Remove call to
454 set_tdesc_pseudo_register_reggroup_p.
455
456 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
457
458 * reggroups.c (default_register_reggroup_p): Return true for
459 decfloat registers and float_reggroup.
460
461 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
462
463 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
464 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
465 ppc_linux_collect_vrregset by regcache_collect_regset.
466
467 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
468
469 * linux-tdep.c (linux_collect_regset_section_cb): Use
470 std::vector<gdb_byte> instead of char * and malloc for buf.
471 Remove xfree.
472
473 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
474
475 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
476 symtab_start instead of always using language_unknown.
477
478 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
479
480 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
481 READ_P parameter, catch and ignore register access errors from
482 either the old or new MISA location.
483 (riscv_has_feature): Update call to riscv_read_misa_reg.
484
485 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
486
487 * python/py-function.c (convert_values_to_python): Return
488 gdbpy_ref<>. Add header comment.
489 (fnpy_call): Adjust.
490
491 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
492
493 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
494 (cmdpy_completer_handle_brkchars): Adjust.
495 (cmdpy_completer): Adjust.
496
497 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
498
499 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
500 Pass correct regnum to raw_supply_zeroed.
501
502 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
503
504 * regcache.c (cooked_read_test): Add CSKY to the list of
505 architectures with a save_reggroup
506
507 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
508
509 PR gdb/23368
510 * infrun.c (follow_exec): In the follow_exec_mode_new case,
511 transfer terminal state from old new new inferior.
512 * terminal.h (swap_terminal_info): New function.
513 * inflow.c (swap_terminal_info): New function.
514
515 2018-10-23 Tom Tromey <tom@tromey.com>
516
517 * record-btrace.c (get_thread_current_frame_id): Rename from
518 get_thread_current_frame. Return a frame_id.
519 (record_btrace_start_replaying): Update.
520
521 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
522
523 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
524 for CSRs.
525
526 2018-10-23 Joel Brobecker <brobecker@adacore.com>
527
528 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
529 have_nonsteppable_watchpoint attribute to 1.
530
531 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
532
533 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
534 register names.
535 (struct register_alias): Rename to...
536 (struct riscv_register_alias): ...this, and update comment.
537 (riscv_register_aliases): Update type, and alias names. Remove
538 CSR names from this list.
539 (riscv_register_name): Use riscv_gdb_reg_names for int and float
540 register names. Add an extra assertion.
541 (riscv_is_regnum_a_named_csr): New function.
542 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
543
544 2018-10-22 Jim Wilson <jimw@sifive.com>
545
546 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
547 FP reg smaller than FP reg size, and fill with -1 instead of 0.
548
549 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
550 (riscv_register_type): Use them.
551 (riscv_print_one_register_info): Handle union of floats same as float.
552 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
553 riscv_fpreg_q_type fields.
554
555 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
556
557 * gdbarch.sh (gdbarch_num_cooked_regs): New.
558 * gdbarch.h: Re-generate.
559 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
560 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
561 * eval.c (evaluate_subexp_standard): Likewise.
562 * findvar.c (value_of_register): Likewise.
563 (value_of_register_lazy): Likewise.
564 (address_from_register): Likewise.
565 * frame.c (get_frame_register_bytes): Likewise.
566 * gdbarch-selftests.c (register_to_value_test): Likewise.
567 * h8300-tdep.c (h8300_register_type): Likewise.
568 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
569 (i386_svr4_reg_to_regnum): Likewise.
570 * infcmd.c (default_print_registers_info): Likewise.
571 (registers_info): Likewise.
572 (print_vector_info): Likewise.
573 (default_print_float_info): Likewise.
574 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
575 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
576 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
577 (mi_cmd_data_list_changed_registers): Likewise.
578 (mi_cmd_data_list_register_values): Likewise.
579 (mi_cmd_data_write_register_values): Likewise.
580 (mi_cmd_trace_frame_collected): Likewise.
581 * mips-tdep.c (print_gp_register_row): Likewise.
582 (mips_print_registers_info): Likewise.
583 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
584 * regcache.c (init_regcache_descr): Likewise.
585 (register_size): Likewise.
586 (register_dump::dump): Likewise.
587 (cooked_read_test): Likewise.
588 (cooked_write_test): Likewise.
589 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
590 (rs6000_gdbarch_init): Likewise.
591 * stabsread.c (stab_reg_to_regnum): Likewise.
592 * stack.c (info_frame_command): Likewise.
593 * target-descriptions.c (tdesc_register_name): Likewise.
594 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
595 * tui/tui-regs.c (tui_show_register_group): Likewise.
596 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
597 (user_reg_map_regnum_to_name): Likewise.
598 (value_of_user_reg): Likewise.
599 (maintenance_print_user_registers): Likewise.
600 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
601 (xtensa_register_name): Likewise.
602 (xtensa_register_type): Likewise.
603 (xtensa_reg_to_regnum): Likewise.
604 (xtensa_pseudo_register_read): Likewise.
605 (xtensa_pseudo_register_write): Likewise.
606
607 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
608
609 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
610 correctly-sized buffer with raw_read.
611 (amd64_pseudo_register_write): Use correctly-sized buffer for
612 raw_read/raw_write.
613
614 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
615
616 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
617 in add_prefix_cmd of set print type.
618
619 2018-10-19 Tom Tromey <tom@tromey.com>
620
621 PR tui/18388:
622 * NEWS: Mention tabset deprecation.
623 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
624 (update_tab_width): New function.
625 (tui_set_tab_width, tui_show_tab_width): New functions.
626 (tui_set_tab_width_command): Use update_tab_width.
627 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
628 Add new "set tui tab-width" command.
629 * tui/tui-source.c (tui_set_source_content): Update.
630 * tui/tui-disasm.c (tui_set_disassem_content): Update.
631 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
632 Don't declare.
633 (tui_tab_width): Declare.
634 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
635 (tui_set_default_tab_len): Remove.
636
637 2018-10-19 Tom Tromey <tom@tromey.com>
638
639 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
640 (key_is_backspace, tui_getc): Don't declare.
641 * tui/tui-io.c (key_is_start_sequence): Now static.
642 (key_is_end_sequence, key_is_backspace): Remove.
643 (tui_getc): Now static.
644
645 2018-10-19 Tom Tromey <tom@tromey.com>
646
647 * symfile.c (reread_symbols): Clear "static_links".
648
649 2018-10-19 Alan Hayward <alan.hayward@arm.com>
650
651 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
652 define.
653 (aarch64_linux_sigframe_init): Extra boundary checks.
654
655 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
656
657 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
658 the possibly non-existent tdesc type 'vec128', but the type of raw
659 register v16 instead.
660
661 2018-10-19 Gary Benson <gbenson@redhat.com>
662
663 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
664
665 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
666
667 PR cli/23785
668 * cli/cli-dump.c (restore_binary_file): Check if "file" is
669 NULL.
670
671 2018-10-17 Paul Koning <paul_koning@dell.com>
672
673 * charset.c (convert_between_encodings): Fix unsigned overflow.
674
675 2018-10-17 John Baldwin <jhb@FreeBSD.org>
676
677 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
678 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
679 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
680 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
681 New functions.
682 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
683 and fbsd_info_proc_mappings_header.
684 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
685 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
686 New.
687
688 2018-10-17 Joel Brobecker <brobecker@adacore.com>
689
690 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
691 Solaris Maintainer.
692
693 2018-10-15 Tom Tromey <tom@tromey.com>
694
695 * tui/tui.c (strcat_to_buf): Remove casts.
696 * tui/tui-winsource.c (tui_show_source_line)
697 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
698 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
699 * tui/tui-windata.c (tui_first_data_item_displayed)
700 (tui_delete_data_content_windows, tui_erase_data_content)
701 (tui_display_all_data, tui_display_data_from)
702 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
703 * tui/tui-win.c (tui_set_win_height)
704 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
705 casts.
706 * tui/tui-win.c (tui_resize_all): Remove casts.
707 (tui_scroll_backward_command, tui_set_focus)
708 (tui_set_tab_width_command): Likewise.
709 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
710 * tui/tui-regs.c (tui_show_register_group): Remove cast.
711 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
712 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
713 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
714 Remove casts.
715
716 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
717
718 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
719 AArch64/ARM maintainer.
720
721 2018-10-11 Gary Benson <gbenson@redhat.com>
722
723 * interps.h (interp::m_name): Make private and mutable.
724 * interps.c (interp::~interp): Free m_name.
725
726 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
727 Simon Marchi <simark@simark.ca>
728
729 * README (`configure' options): Add documentation for new
730 "--enable-unit-tests" option.
731 * acinclude.m4: Include "selftest.m4".
732 * configure: Regenerate.
733 * configure.ac: Use "GDB_AC_SELFTEST".
734 * maint.c (maintenance_selftest): Update message informing
735 that selftests have been disabled.
736 (maintenance_info_selftests): Likewise.
737 * selftest.m4: New file.
738
739 2018-10-10 Gary Benson <gbenson@redhat.com>
740
741 * remote.c (remote_target::remote_send_printf): Add
742 missing va_end found by Coverity.
743
744 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
745
746 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
747
748 2018-10-09 Tom Tromey <tom@tromey.com>
749
750 * configure: Rebuild.
751 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
752 * NEWS: Update --enable-ubsan documentation.
753
754 2018-10-09 Gary Benson <gbenson@redhat.com>
755
756 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
757 found by Coverity.
758
759 2018-10-08 Tom Tromey <tom@tromey.com>
760
761 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
762 variable.
763 (riscv_fbsd_init_abi): Likewise.
764
765 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
766 * valops.c (value_struct_elt_for_reference): Rename local variable
767 to work around the shadowing a previous local warning.
768
769 2018-10-08 John Baldwin <jhb@FreeBSD.org>
770
771 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
772 * NEWS: Mention new FreeBSD/riscv native configuration.
773 * configure.host: Add riscv*-*-freebsd*.
774 * configure.nat: Likewise.
775 * riscv-fbsd-nat.c: New file.
776
777 2018-10-08 John Baldwin <jhb@FreeBSD.org>
778
779 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
780 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
781 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
782 * NEWS: Mention new FreeBSD/riscv target.
783 * configure.tgt: Add riscv*-*-freebsd*.
784 * riscv-fbsd-tdep.c: New file.
785 * riscv-fbsd-tdep.h: New file.
786
787 2018-10-08 John Baldwin <jhb@FreeBSD.org>
788
789 * regcache.h (struct regcache_map_entry): Note that this type can
790 be used with traditional frame caches.
791 * trad-frame.c (trad_frame_set_reg_regmap): New.
792 * trad-frame.h (trad_frame_set_reg_regmap): New.
793
794 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
795
796 PR c++/16841
797 * valops.c (get_virtual_base_offset): New function.
798 (value_struct_elt_for_reference): Use it to get virtual base offset
799 and add it in calculating class member address.
800
801 2018-10-08 John Darrington <john@darrington.wattle.id.au>
802
803 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
804 (check_producer): Check if the producer is codewarrior.
805 (producer_is_codewarrior): New function.
806 (lnp_state_machine::record_line): Ignore is_stmt flag for records
807 produced by codewarrior.
808 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
809
810 2018-10-06 Tom Tromey <tom@tromey.com>
811
812 PR python/19399:
813 * python/py-inferior.c: Add "architecture" entry.
814 (infpy_architecture): New function.
815
816 2018-10-06 Tom Tromey <tom@tromey.com>
817
818 PR python/21765:
819 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
820 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
821 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
822 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
823
824 2018-10-06 Tom Tromey <tom@tromey.com>
825
826 PR build/17077:
827 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
828 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
829 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
830 #include.
831
832 2018-10-06 Tom Tromey <tom@tromey.com>
833
834 * python/py-breakpoint.c (bppy_get_location): Handle a
835 bp_breakpoint without a location.
836
837 2018-10-06 Tom Tromey <tom@tromey.com>
838
839 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
840 (_RegEx): Reformat help text.
841 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
842 (AnyCallerIs, AnyCallerMatches): Reformat help text.
843 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
844 text.
845 * python/lib/gdb/command/xmethods.py (InfoXMethod)
846 (EnableXMethod, DisableXMethod): Remove help indentation.
847 Capitalize meta-syntactic variables.
848 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
849 (EnableUnwinder, DisableUnwinder): Remove help indentation.
850 Capitalize meta-syntactic variables.
851 * python/lib/gdb/command/explore.py (ExploreCommand)
852 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
853 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
854 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
855 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
856 Remove help indentation.
857 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
858 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
859 (DisableFrameFilter, SetFrameFilterPriority)
860 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
861
862 2018-10-06 Tom Tromey <tom@tromey.com>
863
864 PR tui/28819:
865 * tui/tui-io.c (gdb_wgetch): New function.
866 (tui_mld_getc, tui_getc): Use it.
867
868 2018-10-05 Tom Tromey <tom@tromey.com>
869
870 * sol-thread.c (sol_thread_target::wait): Rename inner
871 "save_ptid".
872
873 2018-10-04 Tom Tromey <tom@tromey.com>
874
875 * configure: Rebuild.
876 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
877
878 2018-10-04 Tom Tromey <tom@tromey.com>
879
880 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
881 declaration of "block".
882
883 2018-10-04 Tom Tromey <tom@tromey.com>
884
885 * common/filestuff.c (fdwalk): Remove inner declaration of
886 "result".
887
888 2018-10-04 Tom Tromey <tom@tromey.com>
889
890 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
891 "structs_addr" and hoist declaration.
892
893 2018-10-04 Tom Tromey <tom@tromey.com>
894
895 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
896 variable "size".
897
898 2018-10-04 Tom Tromey <tom@tromey.com>
899
900 * mdebugread.c (parse_partial_symbols): Use std::string.
901
902 2018-10-04 Tom Tromey <tom@tromey.com>
903
904 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
905 * p-valprint.c (pascal_val_print): Split inner "i" variable.
906 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
907 header.
908 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
909 more inner scope.
910 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
911 * varobj.c (varobj_update): Rename inner "newobj",
912 "type_changed".
913 * valprint.c (generic_emit_char): Rename inner "buf".
914 * valops.c (find_overload_match): Rename inner "temp".
915 (value_struct_elt_for_reference): Declare "v" in more inner
916 scope.
917 * v850-tdep.c (v850_push_dummy_call): Rename "len".
918 * unittests/array-view-selftests.c (run_tests): Rename inner
919 "vec".
920 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
921 header.
922 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
923 "tsv" in more inner scope.
924 (print_one_static_tracepoint_marker): Rename inner
925 "tuple_emitter".
926 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
927 (tic6x_push_dummy_call): Don't redeclare "addr".
928 * target-float.c: Declare "dto" lower.
929 * symtab.c (lookup_local_symbol): Rename inner "sym".
930 (find_pc_sect_line): Rename inner "pc".
931 * stack.c (print_frame): Don't redeclare "gdbarch".
932 (return_command): Rename inner "gdbarch".
933 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
934 "sp".
935 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
936 header.
937 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
938 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
939 scope.
940 * remote.c (remote_target::update_thread_list): Don't redeclare
941 "tp".
942 (remote_target::process_initial_stop_replies): Rename inner
943 "thread".
944 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
945 (remote_target::wait_as): Don't redeclare "stop_reply".
946 (remote_target::get_thread_local_address): Rename inner
947 "result".
948 (remote_target::get_tib_address): Likewise.
949
950 * regcache.c (cooked_read_test): Rename "regnum".
951 * record-btrace.c (cmd_record_btrace_start): Rename inner
952 "exception".
953 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
954 loop header.
955 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
956 header.
957 (ppu2spu_sniffer): Rename inner "buf".
958 * parse.c (operator_check_standard): Rename inner "type",
959 "objfile".
960 * p-valprint.c (pascal_val_print): Introduce new scope for
961 "low_bound", "high_bound".
962 * p-exp.y (yylex): Declare "i" in loop header.
963 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
964 Lower declaration of "s".
965 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
966 header.
967 (nios2_push_dummy_call): Rename "len".
968 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
969 "buf".
970 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
971 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
972 (linux_xfer_osdata_modules): Likewise.
973 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
974 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
975 (mips_o64_push_dummy_call): Likewise.
976 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
977 "op".
978 * mi/mi-main.c (list_available_thread_groups): Rename inner
979 "tuple_emitter".
980 (mi_cmd_data_read_memory): Rename inner "opts".
981 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
982 "tuple_emitter".
983 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
984 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
985 more inner scope.
986 (parse_partial_symbols): Rename inner "pst", "p", "name"
987 * main.c (captured_main_1): Rename inner "i"s.
988 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
989 "oso2".
990 * linux-tdep.c (linux_info_proc): Rename inner "filename".
991 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
992 * infrun.c (handle_no_resumed): Don't redeclare "thread".
993 (handle_signal_stop): Rename inner "gdbarch".
994 (handle_command): Declare "signum" in loop header.
995 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
996 "status".
997 (examine_prologue): Rename inner "sol" and "sof".
998 (ia64_extract_return_value): Rename inner "val". Declare another
999 "val" in a more inner scope.
1000 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1001 inner scope.
1002 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1003 "except".
1004 * findvar.c (default_read_var_value): Don't redeclare "addr".
1005 * f-exp.y (yylex): Declare "i" in loop header.
1006 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1007 Rename inner "type", "expect_type".
1008 (evaluate_subexp_for_sizeof): Rename inner "pc".
1009 * elfread.c (elf_symfile_read): Rename inner "abfd".
1010 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1011 "bytes_read".
1012 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1013 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1014 (dwarf_decode_line_header): Rename inner "lh".
1015 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1016 "offset". Declare "i" in loop header.
1017 (disassemble_dwarf_expression): Rename inner "addr_size".
1018 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1019 inner "result".
1020 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1021 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1022 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1023 "inner_list_emitter".
1024 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1025 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1026 declaration in a block.
1027 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1028 * cp-valprint.c (cp_print_value_fields): Don't redeclare
1029 "obstack_final_size".
1030 * cp-support.c (inspect_type): Declare "i" in loop header.
1031 * compile/compile.c (compile_instance::insert_symbol_error):
1032 Rename inner "e".
1033 * common/agent.c (agent_run_command): Remove inner "ret"
1034 declaration.
1035 * coffread.c (coff_symfile_read): Rename inner "name".
1036 (coff_symfile_read): Rename inner "abfd".
1037 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1038 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1039 "high".
1040 * c-exp.y (lex_one_token): Move "len" declaration lower.
1041 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1042 "gdbarch".
1043 (create_exception_master_breakpoint): Likewise. Don't redeclare
1044 "b".
1045 (watch_command_1): Declare "mark" later.
1046 (clear_command): Don't shadow "a" or "b".
1047 (delete_command): Rename inner "b".
1048 (delete_trace_command): Likewise.
1049 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1050 "op".
1051 (arm_gdbarch_init): Remove inner "e_flags".
1052 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1053 "offset" in inner blocks.
1054
1055 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
1056
1057 * dwarf-index-write.c (file_write): Don't write if the vector is
1058 empty.
1059
1060 2018-10-05 Tom de Vries <tdevries@suse.de>
1061
1062 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1063 PyArg_ParseTuple call.
1064
1065 2018-10-05 Tom de Vries <tdevries@suse.de>
1066
1067 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1068 PyArg_ParseTuple call.
1069
1070 2018-10-04 Joel Brobecker <brobecker@adacore.com>
1071
1072 * psymtab.c (recursively_search_psymtabs): Reformat parameters
1073 to avoid exceeding 80 characters per line limit.
1074
1075 2018-10-04 Tom Tromey <tom@tromey.com>
1076
1077 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1078 (reread_symbols): Update.
1079 * complaints.h (clear_complaints): Remove argument.
1080 * complaints.c (enum complaint_series): Remove.
1081 (series): Remove global.
1082 (complaint_internal): Update.
1083 (clear_complaints): Remove argument.
1084
1085 2018-10-04 Tom Tromey <tom@tromey.com>
1086
1087 * symfile.c (symbol_file_add_with_addrs): Do not print "no
1088 debugging symbols" message if there is a separate debug objfile.
1089
1090 2018-10-04 Tom Tromey <tom@tromey.com>
1091
1092 PR cli/19551:
1093 * symfile.c (symbol_file_add_with_addrs): Update output.
1094 * psymtab.c (require_partial_symbols): Update output.
1095
1096 2018-10-04 Tom Tromey <tom@tromey.com>
1097
1098 PR cli/22234:
1099 * complaints.c: Emit \n.
1100
1101 2018-10-04 Tom Tromey <tom@tromey.com>
1102
1103 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1104 (separate_debug_file_exists, find_separate_debug_file)
1105 (add_symbol_file_command, reread_symbols, allocate_symtab)
1106 (allocate_compunit_symtab): Use filtered printing, not
1107 unfiltered.
1108 * psymtab.c (require_partial_symbols, dump_psymtab)
1109 (allocate_psymtab): Use filtered printing, not unfiltered.
1110
1111 2018-10-04 Tom Tromey <tom@tromey.com>
1112
1113 * complaints.c (complaint_internal): Correctly check complaint
1114 count.
1115
1116 2018-10-04 Tom Tromey <tom@tromey.com>
1117
1118 * complaints.h (struct complaints): Remove declaration.
1119 * complaints.c (clear_complaints): Remove an unused variable.
1120
1121 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1122
1123 * MAINTAINERS (Write After Approval): Add self.
1124
1125 2018-10-03 Tom Tromey <tom@tromey.com>
1126
1127 * guile/scm-value.c (gdbscm_value_to_string): Initialize
1128 "buffer_contents".
1129 * coffread.c (coff_symtab_read): Initialize "newobj".
1130
1131 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
1132
1133 * dwarf2read.c (read_func_scope): Remove struct keyword in
1134 range-based for.
1135
1136 2018-10-03 Tom Tromey <tom@tromey.com>
1137
1138 * README: Mention --enable-ubsan.
1139 * NEWS: Mention --enable-ubsan.
1140 * acinclude.m4: Include sanitize.m4.
1141 * configure: Rebuild.
1142 * configure.ac: Call AM_GDB_UBSAN.
1143 * sanitize.m4: New file.
1144
1145 2018-10-03 Tom Tromey <tom@tromey.com>
1146
1147 * expression.h (enum exp_opcode): Use uint8_t as base type.
1148 * expprint.c (op_name): Handle invalid opcodes.
1149
1150 2018-10-03 Tom Tromey <tom@tromey.com>
1151
1152 * parse.c (prefixify_expression): Add assert.
1153 (parse_exp_in_context_1): Throw exception if the expression is
1154 empty.
1155
1156 2018-10-03 Tom Tromey <tom@tromey.com>
1157
1158 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1159
1160 2018-10-03 Tom Tromey <tom@tromey.com>
1161
1162 * c-exp.y (parse_number): Work in unsigned. Remove casts.
1163
1164 2018-10-03 Tom Tromey <tom@tromey.com>
1165
1166 * dwarf2read.c (read_subrange_type): Make "negative_mask"
1167 unsigned.
1168
1169 2018-10-03 Tom Tromey <tom@tromey.com>
1170
1171 * findvar.c (extract_integer): Do work in an unsigned type.
1172
1173 2018-10-03 Tom Tromey <tom@tromey.com>
1174
1175 * common/enum-flags.h (enum_flags::operator~): Add static assert.
1176 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1177 base type.
1178 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1179 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1180 type.
1181 * c-lang.h (enum c_string_type_values): Use unsigned as base
1182 type.
1183 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1184
1185 2018-10-03 Tom Tromey <tom@tromey.com>
1186
1187 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1188 <~dwarf2_frame_state_reg_info>: Update.
1189 <dwarf2_frame_state_reg_info>: Update.
1190 <alloc_regs>: Add assertion. Update.
1191 <reg>: Now a std::vector.
1192 <num_regs>: Remove.
1193 <swap>: Update.
1194 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1195 (execute_cfa_program_test, dwarf2_frame_cache): Update.
1196
1197 2018-10-03 Tom Tromey <tom@tromey.com>
1198
1199 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1200
1201 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1202
1203 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1204
1205 2018-10-02 Tom Tromey <tom@tromey.com>
1206
1207 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1208
1209 2018-10-02 John Darrington <john@darrington.wattle.id.au>
1210
1211 * NEWS: Mention changed commands.
1212 * ser-uds.c: New file.
1213 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1214 * configure: Regenerate.
1215 * Makefile.in: Add new file.
1216 * serial.c (serial_open): Check if filename is a socket
1217 and lookup the appropriate interface accordingly.
1218
1219 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1220
1221 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1222 define.
1223 (AARCH64_EXTRA_MAGIC): Likewise.
1224 (AARCH64_FPSIMD_MAGIC): Likewise.
1225 (AARCH64_SVE_MAGIC): Likewise.
1226 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1227 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1228 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1229 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1230 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1231 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1232 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1233 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1234 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1235 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1236 (read_aarch64_ctx): Add function.
1237 (aarch64_linux_sigframe_init): Detect FP registers.
1238
1239 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1240
1241 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1242 (AARCH64_D0_REGNUM): Likewise.
1243 (AARCH64_S0_REGNUM): Likewise.
1244 (AARCH64_H0_REGNUM): Likewise.
1245 (AARCH64_B0_REGNUM): Likewise.
1246 (AARCH64_SVE_V0_REGNUM): Likewise.
1247 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1248 (AARCH64_D0_REGNUM): Likewise.
1249 (AARCH64_S0_REGNUM): Likewise.
1250 (AARCH64_H0_REGNUM): Likewise.
1251 (AARCH64_B0_REGNUM): Likewise.
1252 (AARCH64_SVE_V0_REGNUM): Likewise.
1253
1254 2018-10-01 Gary Benson <gbenson@redhat.com>
1255
1256 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1257 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1258 prfpregset_t instead of gdb_prfpregset_t.
1259 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1260 * configure, config.in: Rebuild.
1261
1262 2018-10-01 Gary Benson <gbenson@redhat.com>
1263
1264 * common/gdb_proc_service.h: New file, factored out from...
1265 * gdb_proc_service.h: Moved common code to the above file.
1266 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1267
1268 2018-10-01 Gary Benson <gbenson@redhat.com>
1269
1270 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1271 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
1272
1273 2018-10-01 Gary Benson <gbenson@redhat.com>
1274
1275 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1276 (AC_CHECK_HEADERS): Check for linux/elf.h.
1277 * configure, config.in: Rebuild.
1278 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1279 doesn't define elf_fpregset_t.
1280
1281 2018-10-01 Gary Benson <gbenson@redhat.com>
1282
1283 * gdb_proc_service.h: Whitespace change.
1284
1285 2018-10-01 Tom Tromey <tom@tromey.com>
1286
1287 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1288 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1289 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1290
1291 2018-10-01 Tom Tromey <tom@tromey.com>
1292
1293 * README: Minor change.
1294
1295 2018-09-30 Pedro Alves <palves@redhat.com>
1296
1297 * darwin-nat-info.c (darwin_debug_regions_recurse)
1298 (info_mach_exceptions_command): Remove unused local variables.
1299 * darwin-nat.c (darwin_decode_notify_message)
1300 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1301 (darwin_stop_inferior, darwin_setup_exceptions)
1302 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1303 (darwin_nat_target::attach, darwin_nat_target::detach)
1304 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1305 local variables.
1306 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1307 variables.
1308
1309 2018-09-29 Tom Tromey <tom@tromey.com>
1310
1311 * README: Remove some leftover text.
1312
1313 2018-09-29 Tom Tromey <tom@tromey.com>
1314
1315 * PROBLEMS: Rewrite.
1316 * README: Update.
1317
1318 2018-09-28 John Baldwin <jhb@FreeBSD.org>
1319
1320 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1321 case with explicit breakpoint kind.
1322 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1323 'additional_info' and related logic.
1324 (riscv_debug_breakpoints): New variable.
1325 (riscv_breakpoint_kind_from_pc): Use the length of the existing
1326 instruction to determine the breakpoint kind.
1327 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1328 flag. Update description of 'set/show riscv
1329 use-compressed-breakpoints' flag.
1330
1331 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
1332
1333 (NEWS): Mention changes to frame related commands.
1334 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1335 (add_prefix_cmd_suppress_notification): New function.
1336 (add_com_suppress_notification): Call
1337 add_cmd_suppress_notification.
1338 * command.h (add_cmd_suppress_notification): Declare.
1339 (add_prefix_cmd_suppress_notification): Declare.
1340 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1341 (parse_frame_specification): Moved from stack.c, with
1342 simplification to handle a single argument.
1343 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1344 switch to the selected frame. Add a header comment.
1345 * stack.c: Remove 'safe-ctype.h' include.
1346 (find_frame_for_function): Add declaration.
1347 (find_frame_for_address): New function.
1348 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1349 (frame_selection_by_function_completer): New function.
1350 (info_frame_command): Rename to...
1351 (info_frame_command_core): ...this, and update parameter types.
1352 (select_frame_command): Rename to...
1353 (select_frame_command_core): ...this, and update parameter types.
1354 (frame_command): Rename to...
1355 (frame_command_core): ...this, and update parameter types.
1356 (class frame_command_helper): New class to wrap implementations of
1357 frame related sub-commands.
1358 (frame_apply_cmd_list): New static global.
1359 (frame_cmd_list): Make static.
1360 (select_frame_cmd_list): New global for sub-commands.
1361 (info_frame_cmd_list): New global for sub-commands.
1362 (_initialize_stack): Register sub-commands for 'frame',
1363 'select-frame', and 'info frame'. Update 'frame apply' commands
1364 to use frame_apply_cmd_list. Move function local static
1365 frame_apply_list to file static frame_apply_cmd_list for
1366 consistency.
1367 * stack.h (select_frame_command): Delete declarationn.
1368 (select_frame_for_mi): Declare new function.
1369
1370 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
1371
1372 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1373 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1374 and NOP.
1375
1376 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
1377
1378 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1379
1380 2018-09-26 Tom Tromey <tom@tromey.com>
1381
1382 * valops.c (auto_abandon): Remove dead code.
1383
1384 2018-09-26 Tom Tromey <tom@tromey.com>
1385
1386 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1387
1388 2018-09-24 Tom Tromey <tom@tromey.com>
1389
1390 * common/pathstuff.c (get_standard_cache_dir): Make
1391 "xdg_cache_home" and "home" const.
1392 * top.c (init_history): Make "tmpenv" const.
1393 * main.c (get_init_files): Make "homedir" const.
1394
1395 2018-09-23 Tom Tromey <tom@tromey.com>
1396
1397 PR python/18852:
1398 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1399
1400 2018-09-23 Tom Tromey <tom@tromey.com>
1401
1402 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1403 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1404 * python/python-internal.h (gdbpy_handle_exception): Declare.
1405 * python/py-utils.c (gdbpy_handle_exception): New function.
1406
1407 2018-09-23 Tom Tromey <tom@tromey.com>
1408
1409 PR python/17284:
1410 * python/py-type.c (typy_template_argument): Check for negative
1411 argument number.
1412
1413 2018-09-23 Tom Tromey <tom@tromey.com>
1414
1415 PR python/14062:
1416 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1417
1418 2018-09-23 Tom Tromey <tom@tromey.com>
1419
1420 PR python/18170:
1421 * python/py-value.c (valpy_int): Allow conversion from pointer
1422 type.
1423
1424 2018-09-23 Tom Tromey <tom@tromey.com>
1425
1426 PR python/20126:
1427 * python/py-value.c (valpy_int): Respect type sign.
1428
1429 2018-09-23 Tom Tromey <tom@tromey.com>
1430
1431 PR python/18352;
1432 * python/py-value.c (valpy_float): Allow conversions from int or
1433 char.
1434 (valpy_int, valpy_long): Allow conversions from float.
1435
1436 2018-09-23 Tom Tromey <tom@tromey.com>
1437
1438 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1439 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1440
1441 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1442
1443 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1444 __sighndlr.
1445 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1446
1447 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
1448
1449 * windows-nat.c (windows_nat_target::wait): Remove a spurious
1450 target_terminal::ours().
1451
1452 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
1453
1454 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1455 of vl to ULONGEST.
1456
1457 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
1458
1459 * breakpoint.c (update_inserted_breakpoint_locations): Remove
1460 redundant condition.
1461
1462 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1463
1464 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1465
1466 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1467 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
1468 * sol-thread.c (ps_pdmodel): Don't guard definition.
1469
1470 * procfs.c: Fix formatting.
1471
1472 * procfs.c (sysset_t_alloc): Remove.
1473 (create_procinfo): Use XNEW instead of sysset_t_alloc.
1474 (procfs_debug_inferior): Likewise.
1475 (procfs_set_exec_trap): Likewise.
1476 (proc_set_traced_sysentry): Don't allocate argp dynamically.
1477 (proc_set_traced_sysexit): Likewise.
1478
1479 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1480 (dead_procinfo): Likewise.
1481 (proc_warn): Likewise.
1482 (proc_error): Likewise.
1483 (proc_get_LDT_entry): Likewise.
1484 (do_attach): Likewise.
1485 (procfs_target::pid_to_str): Likewise.
1486 (iterate_over_mappings): Likewise.
1487
1488 * procfs.c (create_procinfo): Fix ARI warning.
1489 (proc_get_status): Likewise.
1490 (proc_stop_process): Likewise.
1491 (proc_run_process): Likewise.
1492 (proc_kill): Likewise.
1493 (proc_get_LDT_entry): Likewise.
1494 (procfs_find_LDT_entry): Likewise.
1495 (proc_update_threads): Likewise.
1496 (proc_iterate_over_threads): Likewise.
1497 (do_attach): Likewise.
1498 (procfs_xfer_memory): Likewise.
1499 (invalidate_cache): Likewise.
1500 (procfs_target::resume): Likewise.
1501 (procfs_init_inferior): Likewise.
1502 (procfs_set_exec_trap): Likewise.
1503 (procfs_target::thread_alive): Likewise.
1504 (procfs_target::pid_to_exec_file): Likewise.
1505 (iterate_over_mappings): Likewise.
1506 (procfs_target::make_corefile_notes): Likewise.
1507 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1508
1509 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1510 (procfs_find_LDT_entry): Likewise.
1511 * sol-thread.c (ps_lgetLDT): Likewise.
1512
1513 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1514
1515 PR tdep/17903
1516 * procfs.c (procfs_target): Declare pid_to_exec_file.
1517 (procfs_target::pid_to_exec_file): New.
1518
1519 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1520
1521 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1522 renaming.
1523 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1524 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1525
1526 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1527
1528 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1529 (supply_fpregset, fill_fpregset): Move ...
1530 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1531 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1532 Remove references to ioctl-based procfs.
1533 Include <sys/reg.h>.
1534 Remove PR_MODEL_NATIVE guards.
1535 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1536 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1537
1538 2018-09-19 Xavier Roirand <roirand@adacore.com>
1539
1540 PR gdb/20981:
1541 * solib-darwin.c (darwin_get_dyld_bfd): New function.
1542 (darwin_solib_get_all_image_info_addr_at_init): Update call.
1543 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1544
1545 2018-09-19 John Baldwin <jhb@FreeBSD.org>
1546
1547 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1548 (fbsd_print_sockaddr_in6): Likewise.
1549
1550 2018-09-19 Richard Bunt <richard.bunt@arm.com>
1551 Chris January <chris.january@arm.com>
1552
1553 * eval.c (skip_undetermined_arglist): Skip argument list helper.
1554 (evaluate_subexp_standard): Return a dummy type when
1555 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1556 OP_F77_UNDETERMINED_ARGLIST case.
1557 * expression.h (enum noside): Update comment.
1558
1559 2018-09-19 George Vasick <george.vasick@oracle.com>
1560
1561 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1562
1563 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
1564 April Chin <april.chin@oracle.com>
1565 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1566
1567 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1568 uint_t lwpid_t.
1569 (create_procinfo): Print pids in /proc without leading zeros.
1570
1571 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
1572
1573 * nios2-tdep.c (nios2_gcc_target_options): New.
1574 (nios2_gdb_arch_init): Install new hook.
1575
1576 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
1577
1578 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1579 New file.
1580 * update-gnulib.sh: Apply patch.
1581 * configure: Re-generate.
1582
1583 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1584
1585 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1586 description. Make "info proc" command descriptions more
1587 consistent.
1588
1589 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1590
1591 * NEWS: Mention 'info proc files' command.
1592
1593 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1594
1595 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1596 descriptors for IP_FILES and IP_ALL.
1597
1598 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1599
1600 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1601 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1602 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1603 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1604 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1605 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1606 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1607 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1608 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1609 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1610 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1611 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1612 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1613 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1614 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1615 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1616 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1617 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1618 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1619 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1620 (struct fbsd_sockaddr_un): New types.
1621 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1622 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1623 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1624 (fbsd_core_info_proc_files): New functions.
1625 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1626 IP_ALL.
1627 * fbsd-tdep.h (fbsd_info_proc_files_header)
1628 (fbsd_info_proc_files_entry): New.
1629
1630 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1631
1632 * defs.h (enum info_proc_what) [IP_FILES]: New value.
1633 * infcmd.c (info_proc_cmd_files): New function.
1634 (_initialize_infcmd): Register 'info proc files' command.
1635
1636 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1637
1638 * gnulib/aclocal-m4-deps.mk: Re-generate.
1639 * gnulib/aclocal.m4: Re-generate.
1640 * gnulib/config.in: Re-generate.
1641 * gnulib/configure: Re-generate.
1642 * gnulib/import/Makefile.am: Re-generate.
1643 * gnulib/import/Makefile.in: Re-generate.
1644 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1645 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1646 * gnulib/import/arpa_inet.in.h: New file.
1647 * gnulib/import/inet_ntop.c: New file.
1648 * gnulib/import/m4/arpa_inet_h.m4: New file.
1649 * gnulib/import/m4/inet_ntop.m4: New file.
1650 * gnulib/import/m4/netinet_in_h.m4: New file.
1651 * gnulib/import/m4/socklen.m4: New file.
1652 * gnulib/import/m4/sockpfaf.m4: New file.
1653 * gnulib/import/m4/stdalign.m4: New file.
1654 * gnulib/import/m4/sys_uio_h.m4: New file.
1655 * gnulib/import/netinet_in.in.h: New file.
1656 * gnulib/import/stdalign.in.h: New file.
1657 * gnulib/import/sys_socket.c: New file.
1658 * gnulib/import/sys_socket.in.h: New file.
1659 * gnulib/import/sys_uio.in.h: New file.
1660 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1661 module.
1662
1663 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1664
1665 * gnulib/aclocal-m4-deps.mk: New file.
1666 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1667 deterministically.
1668
1669 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1670
1671 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1672 KVE_PATH.
1673
1674 2018-09-18 Tom Tromey <tom@tromey.com>
1675
1676 * compile/compile-object-load.c (struct
1677 link_hash_table_cleanup_data): Add constructor and destructor.
1678 Use DISABLE_COPY_AND_ASSIGN.
1679 (~link_hash_table_cleanup_data): Rename from
1680 link_hash_table_free. Now a destructor.
1681 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
1682
1683 2018-09-18 Tom Tromey <tom@tromey.com>
1684
1685 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1686 * compile/compile-object-load.c (struct munmap_list): Move to
1687 header file.
1688 (munmap_list::add): Rename from munmap_list_add; rewrite.
1689 (munmap_list::~munmap_list): Rename from munmap_list_free.
1690 (munmap_listp_free_cleanup): Remove.
1691 (compile_object_load): Update.
1692 * compile/compile-object-load.h (struct munmap_list): Move from
1693 compile-object-load.c. Rewrite.
1694
1695 2018-09-18 Alan Hayward <alan.hayward@arm.com>
1696
1697 * aarch64-tdep.c (pass_in_v): Use register size.
1698 (aarch64_extract_return_value): Likewise.
1699 (aarch64_store_return_value): Likewise.
1700
1701 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1702
1703 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1704 rlim_t.
1705
1706 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1707
1708 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1709 Fix short help line.
1710
1711 2018-09-17 Tom Tromey <tom@tromey.com>
1712
1713 PR python/20445:
1714 * configure: Rebuild.
1715 * configure.ac: Conditionally use -DNDEBUG for Python.
1716
1717 2018-09-17 Tom Tromey <tom@tromey.com>
1718
1719 * configure: Rebuild.
1720 * configure.ac: Use gmp as a library dependency when checking for
1721 mpfr.
1722
1723 2018-09-17 Pedro Alves <palves@redhat.com>
1724
1725 * python/py-inferior.c (find_inferior_object): Delete.
1726
1727 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
1728
1729 * compile/compile-cplus-types.c
1730 (compile_cplus_instance::enter_scope): Don't use new_scope after
1731 std::move.
1732
1733 2018-09-17 Tom Tromey <tom@tromey.com>
1734
1735 * common/pathstuff.c (get_standard_cache_dir): Use
1736 ~/Library/Caches on macOS.
1737 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1738
1739 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1740
1741 PR python/23669
1742 * breakpoint.c (commands_cmd_element): New.
1743 (_initialize_breakpoint): Assign commands_cmd_element.
1744 * breakpoint.h (commands_cmd_element): New.
1745 * cli/cli-script.c (while_cmd_element, if_command,
1746 define_cmd_element): New.
1747 (command_name_equals): Remove.
1748 (process_next_line): Compare commands by pointer, not by name.
1749 (_initialize_cli_script): Assign the various cmd_list_element
1750 variables.
1751 * compile/compile.c (compile_cmd_element): New.
1752 (_initialize_compile): Assign compile_cmd_element.
1753 * compile/compile.h (compile_cmd_element): New.
1754 * guile/guile.c (guile_cmd_element): New.
1755 (install_gdb_commands): Assign guile_cmd_element.
1756 * guile/guile.h (guile_cmd_element): New.
1757 * python/python.c (python_cmd_element): New.
1758 (_initialize_python): Assign python_cmd_element.
1759 * python/python.h (python_cmd_element): New.
1760 * tracepoint.c (while_stepping_cmd_element): New.
1761 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1762 * tracepoint.h (while_stepping_cmd_element): New.
1763
1764 2018-09-17 Tom Tromey <tom@tromey.com>
1765
1766 * infrun.c (save_infcall_suspend_state): Return
1767 infcall_suspend_state_up.
1768 (save_infcall_control_state): Return infcall_control_state_up.
1769 * inferior.h (save_infcall_suspend_state)
1770 (save_infcall_control_state): Declare later. Return unique
1771 pointers.
1772
1773 2018-09-17 Tom Tromey <tom@tromey.com>
1774
1775 * infrun.c (struct stop_context): Declare constructor,
1776 destructor, "changed" method.
1777 (stop_context::stop_context): Rename from save_stop_context.
1778 (stop_context::~stop_context): Rename from
1779 release_stop_context_cleanup.
1780 (normal_stop): Update.
1781 (stop_context::changed): Rename from stop_context_changed. Return
1782 bool.
1783
1784 2018-09-17 Tom Tromey <tom@tromey.com>
1785
1786 * inferior.h (struct infcall_suspend_state_deleter): New.
1787 (infcall_suspend_state_up): New typedef.
1788 (struct infcall_control_state_deleter): New.
1789 (infcall_control_state_up): New typedef.
1790 (make_cleanup_restore_infcall_suspend_state)
1791 (make_cleanup_restore_infcall_control_state): Don't declare.
1792 * infcall.c (call_function_by_hand_dummy): Update.
1793 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1794 (make_cleanup_restore_infcall_suspend_state): Remove.
1795 (do_restore_infcall_control_state_cleanup)
1796 (make_cleanup_restore_infcall_control_state): Remove.
1797
1798 2018-09-17 Tom Tromey <tom@tromey.com>
1799
1800 * gdbthread.h (struct thread_control_state): Add initializer.
1801 (class thread_info) <control>: Remove initializer.
1802 * inferior.h (struct inferior_control_state): Add initializer.
1803 (class inferior) <control>: Remove initializer.
1804 (exit_inferior_1): Update.
1805 * infrun.c (struct infcall_control_state): Add constructors.
1806 (save_infcall_control_state): Use new.
1807 (restore_infcall_control_state, discard_infcall_control_state):
1808 Use delete.
1809
1810 2018-09-17 Tom Tromey <tom@tromey.com>
1811
1812 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1813 unique_ptr.
1814 <siginfo_data>: Now a unique_xmalloc_ptr.
1815 (save_infcall_suspend_state, restore_infcall_suspend_state)
1816 (discard_infcall_suspend_state)
1817 (get_infcall_suspend_state_regcache): Update.
1818
1819 2018-09-17 Tom Tromey <tom@tromey.com>
1820
1821 * gdbthread.h (struct thread_suspend_state): Add initializers.
1822 (class thread_info) <suspend>: Remove initializer.
1823 * infrun.c (struct infcall_suspend_state): Add initializers.
1824 (save_infcall_suspend_state): Use new.
1825 (discard_infcall_suspend_state): Use delete.
1826
1827 2018-09-16 Tom Tromey <tom@tromey.com>
1828
1829 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1830 Remove.
1831 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1832 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1833 (py_varobj_iter_new): Likewise.
1834 (py_varobj_get_iterator): Use gdbpy_ref.
1835
1836 2018-09-16 Tom Tromey <tom@tromey.com>
1837
1838 * python/py-threadevent.c (py_get_event_thread): Simplify.
1839 * python/py-inferior.c (infpy_thread_from_thread_handle):
1840 Return immediately after calling thread_to_thread_object. Use
1841 Py_RETURN_NONE.
1842 (thread_to_thread_object): Set the exception on a NULL return.
1843
1844 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1845
1846 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1847
1848 2018-09-16 Tom Tromey <tom@tromey.com>
1849
1850 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1851 Remove.
1852
1853 2018-09-16 Tom Tromey <tom@tromey.com>
1854
1855 * python/python-internal.h (thread_to_thread_object): Change
1856 return type.
1857 * python/py-inferior.c (thread_to_thread_object): Return a new
1858 reference.
1859 (infpy_thread_from_thread_handle): Update.
1860 * python/py-infthread.c (gdbpy_selected_thread): Update.
1861 * python/py-stopevent.c (create_stop_event_object): Update.
1862 * python/py-threadevent.c (py_get_event_thread): Return a new
1863 reference.
1864 (py_get_event_thread): Update.
1865 * python/py-event.h (py_get_event_thread): Change return type.
1866 * python/py-continueevent.c (create_continue_event_object):
1867 Update.
1868
1869 2018-09-16 Tom Tromey <tom@tromey.com>
1870
1871 * python/py-progspace.c (pspy_get_objfiles): Update.
1872 * python/python-internal.h (objfile_to_objfile_object): Change
1873 return type.
1874 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1875 Update.
1876 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1877 Update.
1878 * python/python.c (gdbpy_get_current_objfile): Update.
1879 (gdbpy_objfiles): Update.
1880 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1881 Update.
1882 (objfile_to_objfile_object): Return a new reference.
1883 * python/py-symtab.c (stpy_get_objfile): Update.
1884 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1885 Update.
1886
1887 2018-09-16 Tom Tromey <tom@tromey.com>
1888
1889 * python/py-inferior.c (infpy_get_progspace): Update.
1890 * python/python-internal.h (pspace_to_pspace_object): Change
1891 return type.
1892 * python/py-newobjfileevent.c
1893 (create_clear_objfiles_event_object): Update.
1894 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1895 Update.
1896 * python/python.c (gdbpy_get_current_progspace): Update.
1897 (gdbpy_progspaces): Update.
1898 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1899 reference.
1900 * python/py-objfile.c (objfpy_get_progspace): Update.
1901 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1902 Update.
1903
1904 2018-09-16 Tom Tromey <tom@tromey.com>
1905
1906 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1907 (solib_name, block_for_pc, find_pc_line): New functions.
1908 (execute_unwinders): Update.
1909 * python/py-block.c (gdbpy_block_for_pc): Remove.
1910 * python/py-inferior.c (infpy_get_progspace): New function.
1911 (inferior_object_getset) <progspace>: Add.
1912 * python/py-progspace.c (pspy_objfiles): Rewrite.
1913 (pspy_solib_name, pspy_block_for_pc)
1914 (pspy_find_pc_line, pspy_is_valid): New functions.
1915 (progspace_object_methods): Add entries for solib_name,
1916 block_for_pc, find_pc_line, is_valid.
1917 * python/python-internal.h (gdbpy_block_for_pc)
1918 (build_objfiles_list): Don't declare.
1919 * python/python.c: Don't include solib.h.
1920 (gdbpy_solib_name, gdbpy_find_pc_line)
1921 (gdbpy_get_current_progspace, build_objfiles_list)
1922 (gdbpy_objfiles): Remove.
1923 (GdbMethods) <current_progspace, objfiles, block_for_pc,
1924 solib_name, find_pc_line>: Remove entries.
1925
1926 2018-09-16 Tom Tromey <tom@tromey.com>
1927
1928 * top.c (new_ui_command): Use GNU style for metasyntactic
1929 variables.
1930 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1931 variables.
1932 * maint.c (maintenance_translate_address): Remove "<>" around
1933 text.
1934 * interps.c (interpreter_exec_cmd): Use GNU style for
1935 metasyntactic variables.
1936 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1937 metasyntactic variables.
1938 * tracepoint.c (tfind_range_command): Use GNU style for
1939 metasyntactic variables.
1940 (tfind_outside_command): Likewise.
1941 (_initialize_tracepoint): Likewise.
1942 * remote.c (extended_remote_target::create_inferior): Use GNU
1943 style for metasyntactic variables.
1944 * sparc64-tdep.c (adi_examine_command): Use GNU style for
1945 metasyntactic variables.
1946 (adi_assign_command): Likewise.
1947
1948 2018-09-16 Tom Tromey <tom@tromey.com>
1949
1950 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1951 metasyntactic variables. Print message if no disassembler options
1952 are available.
1953
1954 2018-09-15 Tom Tromey <tom@tromey.com>
1955
1956 * infcmd.c (get_inferior_args): Return const char *.
1957 * inferior.h (get_inferior_args): Return type now const.
1958 * linux-tdep.c (linux_fill_prpsinfo): Update.
1959 * procfs.c (procfs_target::make_corefile_notes): Update.
1960
1961 2018-09-07 Tom Tromey <tom@tromey.com>
1962
1963 * python/python.c (execute_gdb_command): Call bpstat_do_actions
1964 inside the TRY.
1965
1966 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
1967
1968 * nios2-tdep.c (nios2_type_align): New.
1969 (nios2_gdb_arch_init): Install type_align hook.
1970
1971 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
1972
1973 * eval.c (fake_method::fake_method): Call xzalloc directly for a
1974 type that is neither object file owned, nor gdbarch owned.
1975 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1976 gdbarch is non-NULL.
1977 (alloc_type_instance): Allocate non-objfile owned types on the
1978 gdbarch obstack.
1979 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1980 using TYPE_ALLOC to ensure memory is allocated on the correct
1981 obstack.
1982 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1983 obstack, or the gdbarch obstack.
1984 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1985
1986 2018-09-14 Tom Tromey <tom@tromey.com>
1987
1988 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1989 block.
1990
1991 2018-09-14 Tom Tromey <tom@tromey.com>
1992
1993 * nat/fork-inferior.c (get_startup_shell): Remove "static".
1994
1995 2018-09-13 Tom Tromey <tom@tromey.com>
1996
1997 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1998 static.
1999
2000 2018-09-13 Tom Tromey <tom@tromey.com>
2001
2002 * exec.c (try_open_exec_file): Use std::string.
2003
2004 2018-09-13 Tom Tromey <tom@tromey.com>
2005
2006 * utils.h (gdb_bfd_errmsg): Return std::string.
2007 * exec.c (exec_file_attach): Update.
2008 * compile/compile-object-load.c (compile_object_load): Update.
2009 * utils.c (gdb_bfd_errmsg): Return std::string.
2010
2011 2018-09-13 Tom Tromey <tom@tromey.com>
2012
2013 * procfs.c (struct procinfo_deleter): New.
2014 (procinfo_up): New typedef.
2015 (do_destroy_procinfo_cleanup): Remove.
2016 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
2017
2018 2018-09-13 Tom Tromey <tom@tromey.com>
2019
2020 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2021
2022 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2023 2018-09-13 Tom Tromey <tom@tromey.com>
2024
2025 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2026 (pspy_get_objfiles): New function.
2027 (progspace_object_methods): New.
2028 (pspace_object_type): Add tp_methods callback.
2029 * python/python-internal.h (build_objfiles_list): New
2030 declaration.
2031 * python/python.c (build_objfiles_list): New function.
2032 (gdbpy_objfiles): Implement using build_objfiles_list.
2033 * NEWS: Mention the Progspace.objfiles method.
2034
2035 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2036
2037 * python/py-inferior.c (infpy_get_progspace): New function.
2038 (inferior_object_getset): Add progspace property.
2039 * NEWS: Mention the new property.
2040
2041 2018-09-13 Tom Tromey <tom@tromey.com>
2042
2043 PR rust/23650:
2044 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2045
2046 2018-09-13 Tom Tromey <tom@tromey.com>
2047
2048 PR rust/23626:
2049 * rust-lang.c (rust_enum_variant): Now static.
2050 (rust_empty_enum_p): New function.
2051 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2052 Handle empty enum.
2053
2054 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2055
2056 * python/py-inferior.c (infpy_repr): New.
2057 (inferior_object_type): Register infpy_repr.
2058 * python/py-objfile.c (objfpy_repr): New.
2059 (objfile_object_type): Register objfpy_repr.
2060
2061 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2062
2063 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2064
2065 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2066
2067 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2068 typo.
2069
2070 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
2071
2072 * common/common-utils.c: Don't include '<sys/stat.h>'.
2073 (is_regular_file): Move to...
2074 * common/filestuff.c (is_regular_file): ... here.
2075 * common/common-utils.h (is_regular_file): Move to...
2076 * common/filestuff.h (is_regular_file): ... here.
2077
2078 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
2079
2080 * skip.c (debug_skip): New variable.
2081 (skiplist_entry::do_skip_file_p): Add debug output.
2082 (skiplist_entry::do_skip_gfile_p): Likewise.
2083 (skiplist_entry::skip_function_p): Likewise.
2084 (_initialize_step_skip): Create debug command.
2085 * NEWS: Mention set/show debug skip.
2086
2087 2018-09-11 Xavier Roirand <roirand@adacore.com>
2088
2089 * darwin-nat.c (should_disable_startup_with_shell):
2090 New function.
2091 (darwin_nat_target::create_inferior): Add call.
2092
2093 2018-09-11 Xavier Roirand <roirand@adacore.com>
2094
2095 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2096 inf_port, msg_state>: Initialize.
2097 (struct darwin_thread_info) <signaled, single_step>: Change
2098 type and initialize.
2099 (struct darwin_thread_info) <event>: Initialize.
2100
2101 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2102
2103 PR gdb/23555
2104 PR gdb/23558
2105 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2106 guesses.
2107
2108 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2109
2110 Revert:
2111 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2112
2113 PR gdb/23555
2114 PR gdb/23558
2115 * gnulib/aclocal.m4: Regenerate.
2116 * gnulib/config.in: Regenerate.
2117 * gnulib/configure: Regenerate.
2118 * gnulib/import/Makefile.am: Update.
2119 * gnulib/import/Makefile.in: Update.
2120 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2121 * gnulib/import/_Noreturn.h: ... this.
2122 * gnulib/import/alloca.in.h: Update.
2123 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2124 * gnulib/import/arg-nonnull.h: ... this.
2125 * gnulib/import/assure.h: Update.
2126 * gnulib/import/at-func.c: Update.
2127 * gnulib/import/basename-lgpl.c: Update.
2128 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2129 * gnulib/import/c++defs.h: ... this.
2130 * gnulib/import/canonicalize-lgpl.c: Update.
2131 * gnulib/import/cdefs.h: Update.
2132 * gnulib/import/chdir-long.c: Update.
2133 * gnulib/import/chdir-long.h: Update.
2134 * gnulib/import/cloexec.c: Update.
2135 * gnulib/import/cloexec.h: Update.
2136 * gnulib/import/close.c: Update.
2137 * gnulib/import/closedir.c: Update.
2138 * gnulib/import/config.charset: Update.
2139 * gnulib/import/dirent-private.h: Update.
2140 * gnulib/import/dirent.in.h: Update.
2141 * gnulib/import/dirfd.c: Update.
2142 * gnulib/import/dirname-lgpl.c: Update.
2143 * gnulib/import/dirname.h: Update.
2144 * gnulib/import/dosname.h: Update.
2145 * gnulib/import/dup-safer-flag.c: Update.
2146 * gnulib/import/dup-safer.c: Update.
2147 * gnulib/import/dup.c: Update.
2148 * gnulib/import/dup2.c: Update.
2149 * gnulib/import/errno.in.h: Update.
2150 * gnulib/import/error.c: Update.
2151 * gnulib/import/error.h: Update.
2152 * gnulib/import/exitfail.c: Update.
2153 * gnulib/import/exitfail.h: Update.
2154 * gnulib/import/extra/update-copyright: Update.
2155 * gnulib/import/fchdir.c: Update.
2156 * gnulib/import/fcntl.c: Update.
2157 * gnulib/import/fcntl.in.h: Update.
2158 * gnulib/import/fd-hook.c: Update.
2159 * gnulib/import/fd-hook.h: Update.
2160 * gnulib/import/fd-safer-flag.c: Update.
2161 * gnulib/import/fd-safer.c: Update.
2162 * gnulib/import/fdopendir.c: Update.
2163 * gnulib/import/filename.h: Update.
2164 * gnulib/import/filenamecat-lgpl.c: Update.
2165 * gnulib/import/filenamecat.h: Update.
2166 * gnulib/import/flexmember.h: Update.
2167 * gnulib/import/float+.h: Update.
2168 * gnulib/import/float.c: Update.
2169 * gnulib/import/float.in.h: Update.
2170 * gnulib/import/fnmatch.c: Update.
2171 * gnulib/import/fnmatch.in.h: Update.
2172 * gnulib/import/fnmatch_loop.c: Update.
2173 * gnulib/import/fpucw.h: Update.
2174 * gnulib/import/frexp.c: Update.
2175 * gnulib/import/frexpl.c: Update.
2176 * gnulib/import/fstat.c: Update.
2177 * gnulib/import/fstatat.c: Update.
2178 * gnulib/import/getcwd-lgpl.c: Update.
2179 * gnulib/import/getcwd.c: Update.
2180 * gnulib/import/getdtablesize.c: Update.
2181 * gnulib/import/getlogin_r.c: Update.
2182 * gnulib/import/getprogname.c: Update.
2183 * gnulib/import/getprogname.h: Update.
2184 * gnulib/import/gettext.h: Update.
2185 * gnulib/import/gettimeofday.c: Update.
2186 * gnulib/import/glob-libc.h: Update.
2187 * gnulib/import/glob.c: Update.
2188 * gnulib/import/glob.in.h: Update.
2189 * gnulib/import/glob_internal.h: Update.
2190 * gnulib/import/glob_pattern_p.c: Update.
2191 * gnulib/import/globfree.c: Update.
2192 * gnulib/import/hard-locale.c: Update.
2193 * gnulib/import/hard-locale.h: Update.
2194 * gnulib/import/intprops.h: Update.
2195 * gnulib/import/inttypes.in.h: Update.
2196 * gnulib/import/isnan.c: Update.
2197 * gnulib/import/isnand-nolibm.h: Update.
2198 * gnulib/import/isnand.c: Update.
2199 * gnulib/import/isnanl-nolibm.h: Update.
2200 * gnulib/import/isnanl.c: Update.
2201 * gnulib/import/itold.c: Update.
2202 * gnulib/import/libc-config.h: Update.
2203 * gnulib/import/limits.in.h: Update.
2204 * gnulib/import/localcharset.c: Update.
2205 * gnulib/import/localcharset.h: Update.
2206 * gnulib/import/localtime-buffer.c: Update.
2207 * gnulib/import/localtime-buffer.h: Update.
2208 * gnulib/import/lstat.c: Update.
2209 * gnulib/import/m4/00gnulib.m4: Update.
2210 * gnulib/import/m4/__inline.m4: Update.
2211 * gnulib/import/m4/absolute-header.m4: Update.
2212 * gnulib/import/m4/alloca.m4: Update.
2213 * gnulib/import/m4/builtin-expect.m4: Update.
2214 * gnulib/import/m4/canonicalize.m4: Update.
2215 * gnulib/import/m4/chdir-long.m4: Update.
2216 * gnulib/import/m4/close.m4: Update.
2217 * gnulib/import/m4/closedir.m4: Update.
2218 * gnulib/import/m4/configmake.m4: Update.
2219 * gnulib/import/m4/d-ino.m4: Update.
2220 * gnulib/import/m4/d-type.m4: Update.
2221 * gnulib/import/m4/dirent_h.m4: Update.
2222 * gnulib/import/m4/dirfd.m4: Update.
2223 * gnulib/import/m4/dirname.m4: Update.
2224 * gnulib/import/m4/double-slash-root.m4: Update.
2225 * gnulib/import/m4/dup.m4: Update.
2226 * gnulib/import/m4/dup2.m4: Update.
2227 * gnulib/import/m4/eealloc.m4: Update.
2228 * gnulib/import/m4/environ.m4: Update.
2229 * gnulib/import/m4/errno_h.m4: Update.
2230 * gnulib/import/m4/error.m4: Update.
2231 * gnulib/import/m4/exponentd.m4: Update.
2232 * gnulib/import/m4/exponentl.m4: Update.
2233 * gnulib/import/m4/extensions.m4: Update.
2234 * gnulib/import/m4/extern-inline.m4: Update.
2235 * gnulib/import/m4/fchdir.m4: Update.
2236 * gnulib/import/m4/fcntl-o.m4: Update.
2237 * gnulib/import/m4/fcntl.m4: Update.
2238 * gnulib/import/m4/fcntl_h.m4: Update.
2239 * gnulib/import/m4/fdopendir.m4: Update.
2240 * gnulib/import/m4/filenamecat.m4: Update.
2241 * gnulib/import/m4/flexmember.m4: Update.
2242 * gnulib/import/m4/float_h.m4: Update.
2243 * gnulib/import/m4/fnmatch.m4: Update.
2244 * gnulib/import/m4/fnmatch_h.m4: Update.
2245 * gnulib/import/m4/fpieee.m4: Update.
2246 * gnulib/import/m4/frexp.m4: Update.
2247 * gnulib/import/m4/frexpl.m4: Update.
2248 * gnulib/import/m4/fstat.m4: Update.
2249 * gnulib/import/m4/fstatat.m4: Update.
2250 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2251 * gnulib/import/m4/getcwd-path-max.m4: Update.
2252 * gnulib/import/m4/getcwd.m4: Update.
2253 * gnulib/import/m4/getdtablesize.m4: Update.
2254 * gnulib/import/m4/getlogin.m4: Update.
2255 * gnulib/import/m4/getlogin_r.m4: Update.
2256 * gnulib/import/m4/getpagesize.m4: Update.
2257 * gnulib/import/m4/getprogname.m4: Update.
2258 * gnulib/import/m4/gettimeofday.m4: Update.
2259 * gnulib/import/m4/glibc21.m4: Update.
2260 * gnulib/import/m4/glob.m4: Update.
2261 * gnulib/import/m4/glob_h.m4: Update.
2262 * gnulib/import/m4/gnulib-cache.m4: Update.
2263 * gnulib/import/m4/gnulib-common.m4: Update.
2264 * gnulib/import/m4/gnulib-comp.m4: Update.
2265 * gnulib/import/m4/gnulib-tool.m4: Update.
2266 * gnulib/import/m4/hard-locale.m4: Update.
2267 * gnulib/import/m4/include_next.m4: Update.
2268 * gnulib/import/m4/inttypes-pri.m4: Update.
2269 * gnulib/import/m4/inttypes.m4: Update.
2270 * gnulib/import/m4/isnand.m4: Update.
2271 * gnulib/import/m4/isnanl.m4: Update.
2272 * gnulib/import/m4/largefile.m4: Update.
2273 * gnulib/import/m4/limits-h.m4: Update.
2274 * gnulib/import/m4/localcharset.m4: Update.
2275 * gnulib/import/m4/locale-fr.m4: Update.
2276 * gnulib/import/m4/locale-ja.m4: Update.
2277 * gnulib/import/m4/locale-zh.m4: Update.
2278 * gnulib/import/m4/localtime-buffer.m4: Update.
2279 * gnulib/import/m4/longlong.m4: Update.
2280 * gnulib/import/m4/lstat.m4: Update.
2281 * gnulib/import/m4/malloc.m4: Update.
2282 * gnulib/import/m4/malloca.m4: Update.
2283 * gnulib/import/m4/math_h.m4: Update.
2284 * gnulib/import/m4/mbrtowc.m4: Update.
2285 * gnulib/import/m4/mbsinit.m4: Update.
2286 * gnulib/import/m4/mbsrtowcs.m4: Update.
2287 * gnulib/import/m4/mbstate_t.m4: Update.
2288 * gnulib/import/m4/memchr.m4: Update.
2289 * gnulib/import/m4/memmem.m4: Update.
2290 * gnulib/import/m4/mempcpy.m4: Update.
2291 * gnulib/import/m4/memrchr.m4: Update.
2292 * gnulib/import/m4/mkdir.m4: Update.
2293 * gnulib/import/m4/mkstemp.m4: Update.
2294 * gnulib/import/m4/mmap-anon.m4: Update.
2295 * gnulib/import/m4/mode_t.m4: Update.
2296 * gnulib/import/m4/msvc-inval.m4: Update.
2297 * gnulib/import/m4/msvc-nothrow.m4: Update.
2298 * gnulib/import/m4/multiarch.m4: Update.
2299 * gnulib/import/m4/nocrash.m4: Update.
2300 * gnulib/import/m4/off_t.m4: Update.
2301 * gnulib/import/m4/onceonly.m4: Update.
2302 * gnulib/import/m4/open-cloexec.m4: Update.
2303 * gnulib/import/m4/open.m4: Update.
2304 * gnulib/import/m4/openat.m4: Update.
2305 * gnulib/import/m4/opendir.m4: Update.
2306 * gnulib/import/m4/pathmax.m4: Update.
2307 * gnulib/import/m4/rawmemchr.m4: Update.
2308 * gnulib/import/m4/readdir.m4: Update.
2309 * gnulib/import/m4/readlink.m4: Update.
2310 * gnulib/import/m4/realloc.m4: Update.
2311 * gnulib/import/m4/rename.m4: Update.
2312 * gnulib/import/m4/rewinddir.m4: Update.
2313 * gnulib/import/m4/rmdir.m4: Update.
2314 * gnulib/import/m4/save-cwd.m4: Update.
2315 * gnulib/import/m4/secure_getenv.m4: Update.
2316 * gnulib/import/m4/setenv.m4: Update.
2317 * gnulib/import/m4/signal_h.m4: Update.
2318 * gnulib/import/m4/ssize_t.m4: Update.
2319 * gnulib/import/m4/stat-time.m4: Update.
2320 * gnulib/import/m4/stat.m4: Update.
2321 * gnulib/import/m4/std-gnu11.m4: Update.
2322 * gnulib/import/m4/stdbool.m4: Update.
2323 * gnulib/import/m4/stddef_h.m4: Update.
2324 * gnulib/import/m4/stdint.m4: Update.
2325 * gnulib/import/m4/stdio_h.m4: Update.
2326 * gnulib/import/m4/stdlib_h.m4: Update.
2327 * gnulib/import/m4/strchrnul.m4: Update.
2328 * gnulib/import/m4/strdup.m4: Update.
2329 * gnulib/import/m4/strerror.m4: Update.
2330 * gnulib/import/m4/string_h.m4: Update.
2331 * gnulib/import/m4/strstr.m4: Update.
2332 * gnulib/import/m4/strtok_r.m4: Update.
2333 * gnulib/import/m4/sys_socket_h.m4: Update.
2334 * gnulib/import/m4/sys_stat_h.m4: Update.
2335 * gnulib/import/m4/sys_time_h.m4: Update.
2336 * gnulib/import/m4/sys_types_h.m4: Update.
2337 * gnulib/import/m4/tempname.m4: Update.
2338 * gnulib/import/m4/time_h.m4: Update.
2339 * gnulib/import/m4/unistd-safer.m4: Update.
2340 * gnulib/import/m4/unistd_h.m4: Update.
2341 * gnulib/import/m4/warn-on-use.m4: Update.
2342 * gnulib/import/m4/wchar_h.m4: Update.
2343 * gnulib/import/m4/wchar_t.m4: Update.
2344 * gnulib/import/m4/wctype_h.m4: Update.
2345 * gnulib/import/m4/wint_t.m4: Update.
2346 * gnulib/import/malloc.c: Update.
2347 * gnulib/import/malloc/scratch_buffer.h: Update.
2348 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2349 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2350 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2351 * gnulib/import/malloca.c: Update.
2352 * gnulib/import/malloca.h: Update.
2353 * gnulib/import/malloca.valgrind: Update.
2354 * gnulib/import/math.in.h: Update.
2355 * gnulib/import/mbrtowc.c: Update.
2356 * gnulib/import/mbsinit.c: Update.
2357 * gnulib/import/mbsrtowcs-impl.h: Update.
2358 * gnulib/import/mbsrtowcs-state.c: Update.
2359 * gnulib/import/mbsrtowcs.c: Update.
2360 * gnulib/import/memchr.c: Update.
2361 * gnulib/import/memmem.c: Update.
2362 * gnulib/import/mempcpy.c: Update.
2363 * gnulib/import/memrchr.c: Update.
2364 * gnulib/import/mkdir.c: Update.
2365 * gnulib/import/mkstemp.c: Update.
2366 * gnulib/import/msvc-inval.c: Update.
2367 * gnulib/import/msvc-inval.h: Update.
2368 * gnulib/import/msvc-nothrow.c: Update.
2369 * gnulib/import/msvc-nothrow.h: Update.
2370 * gnulib/import/open.c: Update.
2371 * gnulib/import/openat-die.c: Update.
2372 * gnulib/import/openat-priv.h: Update.
2373 * gnulib/import/openat-proc.c: Update.
2374 * gnulib/import/openat.c: Update.
2375 * gnulib/import/openat.h: Update.
2376 * gnulib/import/opendir.c: Update.
2377 * gnulib/import/pathmax.h: Update.
2378 * gnulib/import/pipe-safer.c: Update.
2379 * gnulib/import/rawmemchr.c: Update.
2380 * gnulib/import/readdir.c: Update.
2381 * gnulib/import/readlink.c: Update.
2382 * gnulib/import/realloc.c: Update.
2383 * gnulib/import/ref-add.sin: Update.
2384 * gnulib/import/ref-del.sin: Update.
2385 * gnulib/import/rename.c: Update.
2386 * gnulib/import/rewinddir.c: Update.
2387 * gnulib/import/rmdir.c: Update.
2388 * gnulib/import/same-inode.h: Update.
2389 * gnulib/import/save-cwd.c: Update.
2390 * gnulib/import/save-cwd.h: Update.
2391 * gnulib/import/scratch_buffer.h: Update.
2392 * gnulib/import/secure_getenv.c: Update.
2393 * gnulib/import/setenv.c: Update.
2394 * gnulib/import/signal.in.h: Update.
2395 * gnulib/import/stat-time.c: Update.
2396 * gnulib/import/stat-time.h: Update.
2397 * gnulib/import/stat-w32.c: Update.
2398 * gnulib/import/stat-w32.h: Update.
2399 * gnulib/import/stat.c: Update.
2400 * gnulib/import/stdbool.in.h: Update.
2401 * gnulib/import/stddef.in.h: Update.
2402 * gnulib/import/stdint.in.h: Update.
2403 * gnulib/import/stdio.in.h: Update.
2404 * gnulib/import/stdlib.in.h: Update.
2405 * gnulib/import/str-two-way.h: Update.
2406 * gnulib/import/strchrnul.c: Update.
2407 * gnulib/import/strdup.c: Update.
2408 * gnulib/import/streq.h: Update.
2409 * gnulib/import/strerror-override.c: Update.
2410 * gnulib/import/strerror-override.h: Update.
2411 * gnulib/import/strerror.c: Update.
2412 * gnulib/import/string.in.h: Update.
2413 * gnulib/import/stripslash.c: Update.
2414 * gnulib/import/strnlen1.c: Update.
2415 * gnulib/import/strnlen1.h: Update.
2416 * gnulib/import/strstr.c: Update.
2417 * gnulib/import/strtok_r.c: Update.
2418 * gnulib/import/sys_stat.in.h: Update.
2419 * gnulib/import/sys_time.in.h: Update.
2420 * gnulib/import/sys_types.in.h: Update.
2421 * gnulib/import/tempname.c: Update.
2422 * gnulib/import/tempname.h: Update.
2423 * gnulib/import/time.in.h: Update.
2424 * gnulib/import/unistd--.h: Update.
2425 * gnulib/import/unistd-safer.h: Update.
2426 * gnulib/import/unistd.in.h: Update.
2427 * gnulib/import/unsetenv.c: Update.
2428 * gnulib/import/verify.h: Update.
2429 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2430 * gnulib/import/wchar.in.h: Update.
2431 * gnulib/import/wctype.in.h: Update.
2432 * gnulib/import/xalloc-oversized.h: Update.
2433 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2434 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2435
2436 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
2437
2438 * record-btrace.c (get_thread_current_frame): Remove
2439 old_inferior_ptid.
2440
2441 2018-09-10 Jerome Guitton <guitton@adacore.com>
2442
2443 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2444 with check_tag to 1 if and only if the type is tagged and the
2445 component being searched cannot been found in the current
2446 view. Otherwise, always call ada_to_fixed_type with
2447 check_tag to 0.
2448
2449 2018-09-10 Xavier Roirand <roirand@adacore.com>
2450
2451 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2452 declaration.
2453 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2454 * ada-varobj.c (ada_varobj_get_number_of_children,
2455 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2456
2457 2018-09-10 Xavier Roirand <roirand@adacore.com>
2458
2459 * ada-valprint.c (ada_value_print): Use type instead of
2460 enclosing type.
2461
2462 2018-09-10 Xavier Roirand <roirand@adacore.com>
2463
2464 * ada-lang.c (ada_value_subscript): Handle case when parameter is
2465 an array of access to unconstrained array.
2466
2467 2018-09-10 Xavier Roirand <roirand@adacore.com>
2468
2469 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2470 (ada_check_typedef): Use it.
2471
2472 2018-09-10 Xavier Roirand <roirand@adacore.com>
2473
2474 * ada-varobj.c (ada_varobj_describe_struct_child)
2475 (ada_varobj_describe_child): Handle union case like struct one.
2476
2477 2018-09-10 Tom Tromey <tom@tromey.com>
2478
2479 PR python/18380:
2480 * python/python.c (_initialize_python): Make example in "python"
2481 help work in Python 3.
2482
2483 2018-09-10 Eli Zaretskii <eliz@gnu.org>
2484
2485 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2486 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
2487 $(EXEEXT) to the script, as it is not a program.
2488
2489 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
2490
2491 * python/py-prettyprint.c (pretty_print_one_value): Return
2492 gdbpy_ref<>.
2493 (print_string_repr): Adjust.
2494 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2495 * python/python-internal.h (apply_varobj_pretty_printer): Return
2496 gdbpy_ref<>.
2497 * varobj.c (varobj_value_get_print_value): Adjust.
2498
2499 2018-09-08 Tom Tromey <tom@tromey.com>
2500
2501 PR python/16047:
2502 * python/py-prettyprint.c (pretty_print_one_value): Check for
2503 to_string method.
2504
2505 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2506
2507 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2508 replace_operator_with_call.
2509
2510 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2511
2512 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2513
2514 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2515
2516 * ada-typeprint.c (print_range): Print the bounds using TYPE
2517 rather than its TYPE_TARGET_TYPE.
2518
2519 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2520
2521 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2522 call to ada_to_fixed_value_create.
2523
2524 2018-09-08 Jerome Guitton <guitton@adacore.com>
2525
2526 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2527
2528 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2529
2530 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2531 by calls to error.
2532
2533 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2534
2535 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2536 Move update of loop variable "fi".
2537
2538 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2539
2540 * ada-lang.c (value_assign_to_component): In the case of
2541 big-endian targets, extract the bits of the given VAL
2542 using an src_offset of zero if container is not a scalar.
2543
2544 2018-09-06 Simon Ser <contact@emersion.fr>
2545
2546 PR gdb/23105
2547 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2548 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2549 * fbsd-tdep.c (fbsd_make_note_desc): New.
2550 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2551 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2552 * target.h (enum target_object) Add FreeBSD-specific
2553 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2554
2555 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2556
2557 * compile/compile-c.h (generate_c_for_variable_locations):
2558 Change reference to pointer.
2559 * compile/compile-c-support.c (compile_program) <compute>:
2560 Likewise.
2561 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2562 (generate_c_for_for_one_variable): Likewise
2563 (generate_c_for_variable_locations): Likewise
2564 * compile/compile-c-types.c (compile_c_instance::convert_type):
2565 Likewise
2566 * compile/compile-cplus-symbols.c (convert_one_symbol):
2567 std::move the scope passed to enter_scope.
2568 * compile/compile-cplus-types.c
2569 (compile_cplus_instance::enter_scope): Make parameter
2570 rvalue-reference.
2571 (compile_cplus_instance::new_scope): Change reference to
2572 pointer.
2573 (compile_cplus_instance::convert_type): Likewise
2574 (compile_cplus_convert_typedef): std::move the scope passed to
2575 enter_scope.
2576 (compile_cplus_convert_struct_or_union): Likewise.
2577 (compile_cplus_convert_enum): Likewise.
2578 (compile_cplus_convert_namespace): Likewise.
2579 * compile/compile-cplus.h (compile_cplus_instance)
2580 <enter_scope>: Make parameter rvalue-reference.
2581 * compile/compile-internal.h (compile_instance)
2582 <get_cached_type>: Likewise
2583 * compile/compile-loc2c.c (push): Likewise
2584 (pushf): Likewise
2585 (unary): Likewise
2586 (binary): Likewise
2587 (print_label): Likewise
2588 (pushf_register_address): Likewise
2589 (pushf_register): Likewise
2590 (do_compile_dwarf_expr_to_c): Likewise
2591 (compile_dwarf_expr_to_c): Likewise
2592 (compile_dwarf_bounds_to_c): Likewise
2593 * compile/compile.c (compile_instance::get_cached_type):
2594 Likewise
2595 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2596 (compile_dwarf_bounds_to_c): Likewise
2597 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2598 (dwarf2_compile_property_to_c): Likewise
2599 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2600 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2601 Likewise
2602
2603 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2604
2605 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2606 * tui/tui-data.c (init_content_element): Don't initialize it.
2607
2608 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2609
2610 * tui/tui-data.h (struct tui_win_info)
2611 <detail::opaque>: Remove.
2612 * tui/tui-data.c (init_win_info): Remove assignment.
2613
2614 2018-09-05 Tom Tromey <tom@tromey.com>
2615
2616 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2617 -Wformat-nonliteral.
2618 * target-float.c (host_float_ops<T>::to_string)
2619 (host_float_ops<T>::from_string): Use
2620 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2621 * configure: Rebuild.
2622
2623 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
2624
2625 * printcmd.c (printf_c_string): Use
2626 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2627 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2628
2629 2018-09-05 Tom Tromey <tom@tromey.com>
2630
2631 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2632
2633 2018-09-05 Tom de Vries <tdevries@suse.de>
2634
2635 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2636 with resolve_abstract_p == true.
2637 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2638 defaulting to false. Propagate resolve_abstract_p to
2639 dwarf2_fetch_die_loc_sect_off.
2640 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2641 parameter, defaulting to false.
2642 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2643 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2644 parameter.
2645 * dwarf2read.h (struct die_info): Forward-declare.
2646 (die_info_ptr): New typedef.
2647 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2648
2649 2018-09-05 Joel Brobecker <brobecker@adacore.com>
2650
2651 GDB 8.2 released.
2652
2653 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
2654 Pedro Alves <palves@redhat.com>
2655
2656 * gnulib/Makefile.in (aclocal_m4_deps): Move to
2657 "aclocal-m4-deps.mk". Include file here.
2658 $(srcdir)/aclocal.m4: Add "configure.ac".
2659 * gnulib/aclocal-m4-deps.mk: New file.
2660 * gnulib/update-gnulib.sh: Automatically update
2661 "aclocal-m4-deps.mk".
2662
2663 2018-09-04 Tom Tromey <tom@tromey.com>
2664
2665 * configure: Rebuild.
2666 * configure.ac: Remove multi-ice code.
2667
2668 2018-09-04 Tom Tromey <tom@tromey.com>
2669
2670 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2671 (ada-exp.o): Update.
2672
2673 2018-09-04 Tom Tromey <tom@tromey.com>
2674
2675 * Makefile.in (printcmd.o, target-float.o): Remove.
2676 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2677
2678 2018-09-04 Tom Tromey <tom@tromey.com>
2679
2680 * gnulib/Makefile.in: Remove obsolete comment.
2681 * Makefile.in: Remove obsolete comment.
2682
2683 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
2684
2685 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2686 line with '+'.
2687
2688 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2689
2690 * riscv-tdep.c: Add 'prologue-value.h' include.
2691 (struct riscv_unwind_cache): New struct.
2692 (riscv_debug_unwinder): New global.
2693 (riscv_scan_prologue): Update arguments, capture register details
2694 from prologue scan.
2695 (riscv_skip_prologue): Reformat arguments line, move end of
2696 prologue calculation into riscv_scan_prologue.
2697 (riscv_frame_cache): Update return type, create
2698 riscv_unwind_cache, scan the prologue, and fill in remaining cache
2699 details.
2700 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2701 (riscv_frame_prev_register): Use the trad_frame within the
2702 riscv_unwind_cache.
2703 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2704 flag.
2705
2706 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2707
2708 * trad-frame.h (trad_frame_set_realreg): Declare.
2709 (trad_frame_set_addr): Declare.
2710 * trad-frame.c (trad_frame_set_realreg): Define new function.
2711 (trad_frame_set_addr): Define new function.
2712 (trad_frame_set_reg_realreg): Use new function.
2713 (trad_frame_set_reg_addr): Use new function.
2714
2715 2018-09-01 Keith Seitz <keiths@redhat.com>
2716
2717 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2718 pulongest instead of "%lld".
2719 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2720 ATTRIBUTE_UNUSED.
2721
2722 2018-08-31 Tom Tromey <tom@tromey.com>
2723
2724 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2725 variant part type.
2726
2727 2018-08-31 Pedro Alves <palves@redhat.com>
2728
2729 * gdbarch.h: Regenerate.
2730
2731 2018-08-31 Pedro Alves <palves@redhat.com>
2732
2733 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2734 * target.h (Hardware watchpoint interfaces): Describe
2735 continuable/steppable/non-steppable watchpoints.
2736 * gdbarch.h, gdbarch.c: Regenerate.
2737
2738 2018-08-31 Pedro Alves <palves@redhat.com>
2739
2740 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2741 Delete.
2742 * s390-linux-nat.c
2743 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2744 * target.h (target_ops::have_continuable_watchpoint): Delete.
2745 (target_have_continuable_watchpoint): Delete.
2746 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2747 * target-delegates.c: Regenerate.
2748
2749 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2750
2751 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2752 the files present in "gnulib/import/m4/".
2753
2754 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2755
2756 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2757 c.sw, c.swsp, and c.sdsp.
2758
2759 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2760
2761 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2762 (riscv_read_misa_reg): Don't cache value read into inferior data.
2763 (riscv_new_inferior_data): Delete.
2764 (riscv_inferior_data_cleanup): Delete.
2765 (riscv_inferior_data): Delete.
2766 (riscv_invalidate_inferior_data): Delete.
2767 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2768
2769 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2770
2771 * compile/compile-cplus-types.c
2772 (compile_cplus_instance::leave_scope): Take the address of scope
2773 object.
2774 (compile_cplus_instance::convert_qualified_base): Compare quals
2775 to 0.
2776
2777 2018-08-30 Keith Seitz <keiths@redhat.com>
2778
2779 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2780 Use "%s" and host_address_to_string instead of "%p" in printf.
2781
2782 2018-08-29 Keith Seitz <keiths@redhat.com>
2783
2784 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2785 and compile-cplus-types.c.
2786 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2787 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2788 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2789 Declare.
2790 * compile/compile-c-support.c: Include compile-cplus.h.
2791 (load_libcompile): Templatize.
2792 (get_compile_context): "New" function.
2793 (c_get_compile_context): Use get_compile_context.
2794 (cplus_get_compile_context): New function.
2795 (cplus_push_user_expression, cplus_pop_user_expression)
2796 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2797 (cplus_compute_program): Define new structs/functions.
2798 * compile/compile-cplus-symmbols.c: New file.
2799 * compile/compile-cplus-types.c: New file.
2800 * compile/compile-cplus.h: New file.
2801 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2802 Declare.
2803 * compile/compile-object-load.c (get_out_value_type): Use
2804 strncmp_iw when comparing symbol names.
2805 (compile_object_load): Add mst_bss and mst_data.
2806 * compile/compile.c (_initialize_compile): Remove
2807 -Wno-implicit-function-declaration from `compile_args'.
2808 * compile/gcc-cp-plugin.h: New file.
2809 * NEWS: Mention C++ compile support and new debug options.
2810
2811 2018-08-29 Keith Seitz <keiths@redhat.com>
2812
2813 * linespec.c (collect_info::add_symbol): Make virtual.
2814 (struct symbol_searcher_collect_info): New struct.
2815 (symbol_searcher::find_all_symbols): New method.
2816 * symtab.h (class symbol_searcher): New class.
2817
2818 2018-08-29 Keith Seitz <keiths@redhat.com>
2819
2820 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2821 Change to vector of block_symbol. Update all users.
2822 (struct collect_info) <symbols>: Likewise.
2823 (collect_info::add_symbol): Take block_symbol as argument.
2824 Update all callers.
2825 (decode_compound_collector) <m_symbols>: Change type to vector
2826 of block_symbol. Update all users.
2827 (decode_compound_collector::operator ()): Change parameter type
2828 to block_symbol.
2829 (find_method, find_function_symbols, find_linespec_symbols)
2830 (find_label_symbols_in_block, find_label_symbols): Change symbol
2831 vectors to block_symbol vectors.
2832 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2833 block_symbol.
2834
2835 2018-08-29 Keith Seitz <keiths@redhat.com>
2836
2837 * linespec.c (symbolp): Remove typedef and VEC definitions.
2838 (bound_minimal_symbol_d): Likewise.
2839
2840 2018-08-29 Keith Seitz <keiths@redhat.com>
2841
2842 * linespec.c (decode_compound_collector::decode_compound_collector):
2843 Remove initialization for `m_symtabs'.
2844 (decode_compound_collector::release_symbols): Change return type
2845 to std::vector. Update all callers.
2846 (class decode_compound_collector) <m_symbols>: Change type to
2847 std::vector.
2848 (lookup_prefix_sym): Change return type to std::vector. Update all
2849 callers.
2850 (compare_symbols): Remove.
2851 (std_compare_symbols): Rename to `compare_symbols'.
2852 (find_method): Change `sym_classes' parameter to std::vector.
2853 Update all callers. Use std::sort to sort sym_classes.
2854 (find_linespec_symbols): Remove cleanup.
2855
2856 2018-08-29 Keith Seitz <keiths@redhat.com>
2857
2858 * linespec.c (struct linespec) <minimal_symbols>: Change type to
2859 std::vector. Update all users.
2860 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2861 (struct collect_info) <minimal_symbols>: Likewise.
2862 (compare_msymbols): Return bool. Change parameters to const
2863 bound_minimal_symbol references.
2864 (find_method, find_function_symbols, find_linespec_symbols): Change
2865 `minsyms' parameter to std::vector. Update all callers.
2866
2867 2018-08-29 Keith Seitz <keiths@redhat.com>
2868
2869 * linespec.c (struct linespec) <label_symbols>: Change type to
2870 std::vector. Update all users.
2871 (find_label_symbols_in_block): Change `result' parameter to
2872 std::vector. Update all callers.
2873 (find_label_symbols): Return std::vector. Update all callers.
2874
2875 2018-08-29 Keith Seitz <keiths@redhat.com>
2876
2877 * linespec.c (struct linespec) <function_symbols>: Change type to
2878 std::vector. Update all users.
2879 (struct collect_info) <function_symbols>: Likewise.
2880 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2881 (std_compare_symbols): New function.
2882 (find_method, find_function_symbols, find_linespec_symbols)
2883 (find_label_symbols_in_block): Change `symbols' parameter to
2884 std::vector. Update all callers.
2885 (find_label_symbols): Likewise for `function_symbols' and
2886 `label_funcs_ret'.
2887
2888 2018-08-29 Keith Seitz <keiths@redhat.com>
2889
2890 * linespec.c (symtab_vector_up): Define.
2891 (struct linespec) <file_symtabs>: Change type to std::vector *.
2892 Update all uses.
2893 (struct collect_info) <file_symtabs>: Likewise.
2894 (collect_symtabs_from_filename): Return symtab_vector_up.
2895 Update all callers.
2896 (decode_objc): Remove cleanup.
2897 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2898 (symtab_collector::release_symtabs): Return symtab_vector_up.
2899 Update all callers.
2900 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2901 Update all users.
2902 (collect_symtabs_from_filename, symtabs_from_filename): Return
2903 symtab_vector_up. Update all callers.
2904
2905 2018-08-29 Tom Tromey <tom@tromey.com>
2906
2907 * csky-tdep.c (csky_analyze_prologue): Use
2908 core_addr_to_string_nz.
2909
2910 2018-08-29 Tom Tromey <tom@tromey.com>
2911
2912 * windows-nat.c (struct xlate_exception) <them>: Change type to
2913 DWORD.
2914 (xlate): Fix formatting. Remove last entry.
2915 (struct xlate_exception, xlate): Comment out.
2916 (windows_nat_target::resume): Use ranged for.
2917
2918 2018-08-29 Jim Wilson <jimw@sifive.com>
2919
2920 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2921 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2922 of NT_PRFPREG.
2923 (riscv_linux_nat_target::store_registers): Likewise.
2924
2925 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2926
2927 PR gdb/23555
2928 PR gdb/23558
2929 * gnulib/aclocal.m4: Regenerate.
2930 * gnulib/config.in: Regenerate.
2931 * gnulib/configure: Regenerate.
2932 * gnulib/import/Makefile.am: Update.
2933 * gnulib/import/Makefile.in: Update.
2934 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2935 * gnulib/import/_Noreturn.h: ... this.
2936 * gnulib/import/alloca.in.h: Update.
2937 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2938 * gnulib/import/arg-nonnull.h: ... this.
2939 * gnulib/import/assure.h: Update.
2940 * gnulib/import/at-func.c: Update.
2941 * gnulib/import/basename-lgpl.c: Update.
2942 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2943 * gnulib/import/c++defs.h: ... this.
2944 * gnulib/import/canonicalize-lgpl.c: Update.
2945 * gnulib/import/cdefs.h: Update.
2946 * gnulib/import/chdir-long.c: Update.
2947 * gnulib/import/chdir-long.h: Update.
2948 * gnulib/import/cloexec.c: Update.
2949 * gnulib/import/cloexec.h: Update.
2950 * gnulib/import/close.c: Update.
2951 * gnulib/import/closedir.c: Update.
2952 * gnulib/import/config.charset: Update.
2953 * gnulib/import/dirent-private.h: Update.
2954 * gnulib/import/dirent.in.h: Update.
2955 * gnulib/import/dirfd.c: Update.
2956 * gnulib/import/dirname-lgpl.c: Update.
2957 * gnulib/import/dirname.h: Update.
2958 * gnulib/import/dosname.h: Update.
2959 * gnulib/import/dup-safer-flag.c: Update.
2960 * gnulib/import/dup-safer.c: Update.
2961 * gnulib/import/dup.c: Update.
2962 * gnulib/import/dup2.c: Update.
2963 * gnulib/import/errno.in.h: Update.
2964 * gnulib/import/error.c: Update.
2965 * gnulib/import/error.h: Update.
2966 * gnulib/import/exitfail.c: Update.
2967 * gnulib/import/exitfail.h: Update.
2968 * gnulib/import/extra/update-copyright: Update.
2969 * gnulib/import/fchdir.c: Update.
2970 * gnulib/import/fcntl.c: Update.
2971 * gnulib/import/fcntl.in.h: Update.
2972 * gnulib/import/fd-hook.c: Update.
2973 * gnulib/import/fd-hook.h: Update.
2974 * gnulib/import/fd-safer-flag.c: Update.
2975 * gnulib/import/fd-safer.c: Update.
2976 * gnulib/import/fdopendir.c: Update.
2977 * gnulib/import/filename.h: Update.
2978 * gnulib/import/filenamecat-lgpl.c: Update.
2979 * gnulib/import/filenamecat.h: Update.
2980 * gnulib/import/flexmember.h: Update.
2981 * gnulib/import/float+.h: Update.
2982 * gnulib/import/float.c: Update.
2983 * gnulib/import/float.in.h: Update.
2984 * gnulib/import/fnmatch.c: Update.
2985 * gnulib/import/fnmatch.in.h: Update.
2986 * gnulib/import/fnmatch_loop.c: Update.
2987 * gnulib/import/fpucw.h: Update.
2988 * gnulib/import/frexp.c: Update.
2989 * gnulib/import/frexpl.c: Update.
2990 * gnulib/import/fstat.c: Update.
2991 * gnulib/import/fstatat.c: Update.
2992 * gnulib/import/getcwd-lgpl.c: Update.
2993 * gnulib/import/getcwd.c: Update.
2994 * gnulib/import/getdtablesize.c: Update.
2995 * gnulib/import/getlogin_r.c: Update.
2996 * gnulib/import/getprogname.c: Update.
2997 * gnulib/import/getprogname.h: Update.
2998 * gnulib/import/gettext.h: Update.
2999 * gnulib/import/gettimeofday.c: Update.
3000 * gnulib/import/glob-libc.h: Update.
3001 * gnulib/import/glob.c: Update.
3002 * gnulib/import/glob.in.h: Update.
3003 * gnulib/import/glob_internal.h: Update.
3004 * gnulib/import/glob_pattern_p.c: Update.
3005 * gnulib/import/globfree.c: Update.
3006 * gnulib/import/hard-locale.c: Update.
3007 * gnulib/import/hard-locale.h: Update.
3008 * gnulib/import/intprops.h: Update.
3009 * gnulib/import/inttypes.in.h: Update.
3010 * gnulib/import/isnan.c: Update.
3011 * gnulib/import/isnand-nolibm.h: Update.
3012 * gnulib/import/isnand.c: Update.
3013 * gnulib/import/isnanl-nolibm.h: Update.
3014 * gnulib/import/isnanl.c: Update.
3015 * gnulib/import/itold.c: Update.
3016 * gnulib/import/libc-config.h: Update.
3017 * gnulib/import/limits.in.h: Update.
3018 * gnulib/import/localcharset.c: Update.
3019 * gnulib/import/localcharset.h: Update.
3020 * gnulib/import/localtime-buffer.c: Update.
3021 * gnulib/import/localtime-buffer.h: Update.
3022 * gnulib/import/lstat.c: Update.
3023 * gnulib/import/m4/00gnulib.m4: Update.
3024 * gnulib/import/m4/__inline.m4: Update.
3025 * gnulib/import/m4/absolute-header.m4: Update.
3026 * gnulib/import/m4/alloca.m4: Update.
3027 * gnulib/import/m4/builtin-expect.m4: Update.
3028 * gnulib/import/m4/canonicalize.m4: Update.
3029 * gnulib/import/m4/chdir-long.m4: Update.
3030 * gnulib/import/m4/close.m4: Update.
3031 * gnulib/import/m4/closedir.m4: Update.
3032 * gnulib/import/m4/configmake.m4: Update.
3033 * gnulib/import/m4/d-ino.m4: Update.
3034 * gnulib/import/m4/d-type.m4: Update.
3035 * gnulib/import/m4/dirent_h.m4: Update.
3036 * gnulib/import/m4/dirfd.m4: Update.
3037 * gnulib/import/m4/dirname.m4: Update.
3038 * gnulib/import/m4/double-slash-root.m4: Update.
3039 * gnulib/import/m4/dup.m4: Update.
3040 * gnulib/import/m4/dup2.m4: Update.
3041 * gnulib/import/m4/eealloc.m4: Update.
3042 * gnulib/import/m4/environ.m4: Update.
3043 * gnulib/import/m4/errno_h.m4: Update.
3044 * gnulib/import/m4/error.m4: Update.
3045 * gnulib/import/m4/exponentd.m4: Update.
3046 * gnulib/import/m4/exponentl.m4: Update.
3047 * gnulib/import/m4/extensions.m4: Update.
3048 * gnulib/import/m4/extern-inline.m4: Update.
3049 * gnulib/import/m4/fchdir.m4: Update.
3050 * gnulib/import/m4/fcntl-o.m4: Update.
3051 * gnulib/import/m4/fcntl.m4: Update.
3052 * gnulib/import/m4/fcntl_h.m4: Update.
3053 * gnulib/import/m4/fdopendir.m4: Update.
3054 * gnulib/import/m4/filenamecat.m4: Update.
3055 * gnulib/import/m4/flexmember.m4: Update.
3056 * gnulib/import/m4/float_h.m4: Update.
3057 * gnulib/import/m4/fnmatch.m4: Update.
3058 * gnulib/import/m4/fnmatch_h.m4: Update.
3059 * gnulib/import/m4/fpieee.m4: Update.
3060 * gnulib/import/m4/frexp.m4: Update.
3061 * gnulib/import/m4/frexpl.m4: Update.
3062 * gnulib/import/m4/fstat.m4: Update.
3063 * gnulib/import/m4/fstatat.m4: Update.
3064 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3065 * gnulib/import/m4/getcwd-path-max.m4: Update.
3066 * gnulib/import/m4/getcwd.m4: Update.
3067 * gnulib/import/m4/getdtablesize.m4: Update.
3068 * gnulib/import/m4/getlogin.m4: Update.
3069 * gnulib/import/m4/getlogin_r.m4: Update.
3070 * gnulib/import/m4/getpagesize.m4: Update.
3071 * gnulib/import/m4/getprogname.m4: Update.
3072 * gnulib/import/m4/gettimeofday.m4: Update.
3073 * gnulib/import/m4/glibc21.m4: Update.
3074 * gnulib/import/m4/glob.m4: Update.
3075 * gnulib/import/m4/glob_h.m4: Update.
3076 * gnulib/import/m4/gnulib-cache.m4: Update.
3077 * gnulib/import/m4/gnulib-common.m4: Update.
3078 * gnulib/import/m4/gnulib-comp.m4: Update.
3079 * gnulib/import/m4/gnulib-tool.m4: Update.
3080 * gnulib/import/m4/hard-locale.m4: Update.
3081 * gnulib/import/m4/include_next.m4: Update.
3082 * gnulib/import/m4/inttypes-pri.m4: Update.
3083 * gnulib/import/m4/inttypes.m4: Update.
3084 * gnulib/import/m4/isnand.m4: Update.
3085 * gnulib/import/m4/isnanl.m4: Update.
3086 * gnulib/import/m4/largefile.m4: Update.
3087 * gnulib/import/m4/limits-h.m4: Update.
3088 * gnulib/import/m4/localcharset.m4: Update.
3089 * gnulib/import/m4/locale-fr.m4: Update.
3090 * gnulib/import/m4/locale-ja.m4: Update.
3091 * gnulib/import/m4/locale-zh.m4: Update.
3092 * gnulib/import/m4/localtime-buffer.m4: Update.
3093 * gnulib/import/m4/longlong.m4: Update.
3094 * gnulib/import/m4/lstat.m4: Update.
3095 * gnulib/import/m4/malloc.m4: Update.
3096 * gnulib/import/m4/malloca.m4: Update.
3097 * gnulib/import/m4/math_h.m4: Update.
3098 * gnulib/import/m4/mbrtowc.m4: Update.
3099 * gnulib/import/m4/mbsinit.m4: Update.
3100 * gnulib/import/m4/mbsrtowcs.m4: Update.
3101 * gnulib/import/m4/mbstate_t.m4: Update.
3102 * gnulib/import/m4/memchr.m4: Update.
3103 * gnulib/import/m4/memmem.m4: Update.
3104 * gnulib/import/m4/mempcpy.m4: Update.
3105 * gnulib/import/m4/memrchr.m4: Update.
3106 * gnulib/import/m4/mkdir.m4: Update.
3107 * gnulib/import/m4/mkstemp.m4: Update.
3108 * gnulib/import/m4/mmap-anon.m4: Update.
3109 * gnulib/import/m4/mode_t.m4: Update.
3110 * gnulib/import/m4/msvc-inval.m4: Update.
3111 * gnulib/import/m4/msvc-nothrow.m4: Update.
3112 * gnulib/import/m4/multiarch.m4: Update.
3113 * gnulib/import/m4/nocrash.m4: Update.
3114 * gnulib/import/m4/off_t.m4: Update.
3115 * gnulib/import/m4/onceonly.m4: Update.
3116 * gnulib/import/m4/open-cloexec.m4: Update.
3117 * gnulib/import/m4/open.m4: Update.
3118 * gnulib/import/m4/openat.m4: Update.
3119 * gnulib/import/m4/opendir.m4: Update.
3120 * gnulib/import/m4/pathmax.m4: Update.
3121 * gnulib/import/m4/rawmemchr.m4: Update.
3122 * gnulib/import/m4/readdir.m4: Update.
3123 * gnulib/import/m4/readlink.m4: Update.
3124 * gnulib/import/m4/realloc.m4: Update.
3125 * gnulib/import/m4/rename.m4: Update.
3126 * gnulib/import/m4/rewinddir.m4: Update.
3127 * gnulib/import/m4/rmdir.m4: Update.
3128 * gnulib/import/m4/save-cwd.m4: Update.
3129 * gnulib/import/m4/secure_getenv.m4: Update.
3130 * gnulib/import/m4/setenv.m4: Update.
3131 * gnulib/import/m4/signal_h.m4: Update.
3132 * gnulib/import/m4/ssize_t.m4: Update.
3133 * gnulib/import/m4/stat-time.m4: Update.
3134 * gnulib/import/m4/stat.m4: Update.
3135 * gnulib/import/m4/std-gnu11.m4: Update.
3136 * gnulib/import/m4/stdbool.m4: Update.
3137 * gnulib/import/m4/stddef_h.m4: Update.
3138 * gnulib/import/m4/stdint.m4: Update.
3139 * gnulib/import/m4/stdio_h.m4: Update.
3140 * gnulib/import/m4/stdlib_h.m4: Update.
3141 * gnulib/import/m4/strchrnul.m4: Update.
3142 * gnulib/import/m4/strdup.m4: Update.
3143 * gnulib/import/m4/strerror.m4: Update.
3144 * gnulib/import/m4/string_h.m4: Update.
3145 * gnulib/import/m4/strstr.m4: Update.
3146 * gnulib/import/m4/strtok_r.m4: Update.
3147 * gnulib/import/m4/sys_socket_h.m4: Update.
3148 * gnulib/import/m4/sys_stat_h.m4: Update.
3149 * gnulib/import/m4/sys_time_h.m4: Update.
3150 * gnulib/import/m4/sys_types_h.m4: Update.
3151 * gnulib/import/m4/tempname.m4: Update.
3152 * gnulib/import/m4/time_h.m4: Update.
3153 * gnulib/import/m4/unistd-safer.m4: Update.
3154 * gnulib/import/m4/unistd_h.m4: Update.
3155 * gnulib/import/m4/warn-on-use.m4: Update.
3156 * gnulib/import/m4/wchar_h.m4: Update.
3157 * gnulib/import/m4/wchar_t.m4: Update.
3158 * gnulib/import/m4/wctype_h.m4: Update.
3159 * gnulib/import/m4/wint_t.m4: Update.
3160 * gnulib/import/malloc.c: Update.
3161 * gnulib/import/malloc/scratch_buffer.h: Update.
3162 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3163 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3164 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3165 * gnulib/import/malloca.c: Update.
3166 * gnulib/import/malloca.h: Update.
3167 * gnulib/import/malloca.valgrind: Update.
3168 * gnulib/import/math.in.h: Update.
3169 * gnulib/import/mbrtowc.c: Update.
3170 * gnulib/import/mbsinit.c: Update.
3171 * gnulib/import/mbsrtowcs-impl.h: Update.
3172 * gnulib/import/mbsrtowcs-state.c: Update.
3173 * gnulib/import/mbsrtowcs.c: Update.
3174 * gnulib/import/memchr.c: Update.
3175 * gnulib/import/memmem.c: Update.
3176 * gnulib/import/mempcpy.c: Update.
3177 * gnulib/import/memrchr.c: Update.
3178 * gnulib/import/mkdir.c: Update.
3179 * gnulib/import/mkstemp.c: Update.
3180 * gnulib/import/msvc-inval.c: Update.
3181 * gnulib/import/msvc-inval.h: Update.
3182 * gnulib/import/msvc-nothrow.c: Update.
3183 * gnulib/import/msvc-nothrow.h: Update.
3184 * gnulib/import/open.c: Update.
3185 * gnulib/import/openat-die.c: Update.
3186 * gnulib/import/openat-priv.h: Update.
3187 * gnulib/import/openat-proc.c: Update.
3188 * gnulib/import/openat.c: Update.
3189 * gnulib/import/openat.h: Update.
3190 * gnulib/import/opendir.c: Update.
3191 * gnulib/import/pathmax.h: Update.
3192 * gnulib/import/pipe-safer.c: Update.
3193 * gnulib/import/rawmemchr.c: Update.
3194 * gnulib/import/readdir.c: Update.
3195 * gnulib/import/readlink.c: Update.
3196 * gnulib/import/realloc.c: Update.
3197 * gnulib/import/ref-add.sin: Update.
3198 * gnulib/import/ref-del.sin: Update.
3199 * gnulib/import/rename.c: Update.
3200 * gnulib/import/rewinddir.c: Update.
3201 * gnulib/import/rmdir.c: Update.
3202 * gnulib/import/same-inode.h: Update.
3203 * gnulib/import/save-cwd.c: Update.
3204 * gnulib/import/save-cwd.h: Update.
3205 * gnulib/import/scratch_buffer.h: Update.
3206 * gnulib/import/secure_getenv.c: Update.
3207 * gnulib/import/setenv.c: Update.
3208 * gnulib/import/signal.in.h: Update.
3209 * gnulib/import/stat-time.c: Update.
3210 * gnulib/import/stat-time.h: Update.
3211 * gnulib/import/stat-w32.c: Update.
3212 * gnulib/import/stat-w32.h: Update.
3213 * gnulib/import/stat.c: Update.
3214 * gnulib/import/stdbool.in.h: Update.
3215 * gnulib/import/stddef.in.h: Update.
3216 * gnulib/import/stdint.in.h: Update.
3217 * gnulib/import/stdio.in.h: Update.
3218 * gnulib/import/stdlib.in.h: Update.
3219 * gnulib/import/str-two-way.h: Update.
3220 * gnulib/import/strchrnul.c: Update.
3221 * gnulib/import/strdup.c: Update.
3222 * gnulib/import/streq.h: Update.
3223 * gnulib/import/strerror-override.c: Update.
3224 * gnulib/import/strerror-override.h: Update.
3225 * gnulib/import/strerror.c: Update.
3226 * gnulib/import/string.in.h: Update.
3227 * gnulib/import/stripslash.c: Update.
3228 * gnulib/import/strnlen1.c: Update.
3229 * gnulib/import/strnlen1.h: Update.
3230 * gnulib/import/strstr.c: Update.
3231 * gnulib/import/strtok_r.c: Update.
3232 * gnulib/import/sys_stat.in.h: Update.
3233 * gnulib/import/sys_time.in.h: Update.
3234 * gnulib/import/sys_types.in.h: Update.
3235 * gnulib/import/tempname.c: Update.
3236 * gnulib/import/tempname.h: Update.
3237 * gnulib/import/time.in.h: Update.
3238 * gnulib/import/unistd--.h: Update.
3239 * gnulib/import/unistd-safer.h: Update.
3240 * gnulib/import/unistd.in.h: Update.
3241 * gnulib/import/unsetenv.c: Update.
3242 * gnulib/import/verify.h: Update.
3243 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3244 * gnulib/import/wchar.in.h: Update.
3245 * gnulib/import/wctype.in.h: Update.
3246 * gnulib/import/xalloc-oversized.h: Update.
3247 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3248 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3249
3250 2018-08-16 Gary Benson <gbenson@redhat.com>
3251
3252 PR gdb/13000:
3253 * gdb/main.c (captured_main_1): Exit with nonzero status
3254 in batch mode if the last command to be executed failed.
3255 * NEWS: Mention the above.
3256
3257 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
3258
3259 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3260 end of warning message.
3261
3262 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3263
3264 PR gdb/22943:
3265 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3266 (aarch64_extract_return_value): Use
3267 aapcs_is_vfp_call_or_return_candidate.
3268 (aarch64_return_in_memory): Likewise.
3269 (aarch64_store_return_value): Likewise.
3270
3271 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3272
3273 * aarch64-tdep.c
3274 (aapcs_is_vfp_call_or_return_candidate): Make static
3275 (pass_in_v_or_stack): Remove function.
3276 (pass_in_v_vfp_candidate): New function.
3277 (aarch64_push_dummy_call): Check for float register candidates.
3278
3279 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3280
3281 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3282 (aapcs_is_vfp_call_or_return_candidate_1): New function.
3283 (aapcs_is_vfp_call_or_return_candidate): Likewise.
3284
3285 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
3286
3287 PR build/23399
3288 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3289 (struct ipa_sym_addresses): Rename to...
3290 (struct ipa_sym_addresses_common): ... this.
3291 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3292
3293 2018-08-28 Tom Tromey <tom@tromey.com>
3294
3295 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3296 (token_fifo): Now a std::vector.
3297 (yylex, c_parse): Update.
3298 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3299 (token_fifo): Now a std::vector.
3300 (yylex, d_parse): Update.
3301 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3302 (token_fifo): Now a std::vector.
3303 (yylex, go_parse): Update.
3304
3305 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
3306
3307 * parser-defs.h (struct type_stack) <elements>: Change type to
3308 std::vector<union type_stack_elt>.
3309 <depth, size>: Remove.
3310 * parse.c (parse_exp_in_context_1): Adjust.
3311 (type_stack_reserve): Remove.
3312 (check_type_stack_depth): Remove.
3313 (insert_into_type_stack): Adjust to std::vector.
3314 (insert_type): Likewise.
3315 (push_type): Likewise.
3316 (push_type_int): Likewise.
3317 (insert_type_address_space): Likewise.
3318 (pop_type): Likewise.
3319 (pop_type_int): Likewise.
3320 (pop_typelist): Likewise.
3321 (pop_type_stack): Likewise.
3322 (append_type_stack): Likewise.
3323 (push_type_stack): Likewise.
3324 (get_type_stack): Likewise.
3325 (type_stack_cleanup): Likewise.
3326 (push_typelist): Likewise.
3327 (follow_types): Likewise.
3328 (_initialize_parse): Likewise.
3329
3330 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
3331
3332 * NEWS: Mention csky target.
3333
3334 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
3335 Hafiz Abid Qadeer <abidh@codesourcery.com>
3336 Don Breazeal <donb@codesourcery.com>
3337
3338 * csky-linux-tdep.c: New file.
3339 * csky-tdep.c: Likewise.
3340 * csky-tdep.h: Likewise.
3341 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3342 csky-tdep.o.
3343 (HFILES_NO_SRCDIR): Add csky-tdep.h.
3344 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3345 * configure.tgt: Add csky support.
3346
3347 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
3348
3349 * python/py-framefilter.c (py_print_frame): Print frame architecture
3350 when printing on an MI output.
3351
3352 2018-08-27 Tom Tromey <tom@tromey.com>
3353
3354 PR build/23087:
3355 * configure: Rebuild.
3356 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3357
3358 2018-08-27 Tom Tromey <tom@tromey.com>
3359
3360 * aarch64-linux-tdep.c
3361 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3362 casts to int.
3363
3364 2018-08-27 Tom Tromey <tom@tromey.com>
3365
3366 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3367 unsigned.
3368 (ppc64_standard_linkage1, ppc64_standard_linkage2)
3369 (ppc64_standard_linkage3, ppc64_standard_linkage4)
3370 (ppc64_standard_linkage5, ppc64_standard_linkage6)
3371 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3372 unsigned.
3373
3374 2018-08-27 Tom Tromey <tom@tromey.com>
3375
3376 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3377 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3378
3379 2018-08-27 Tom Tromey <tom@tromey.com>
3380
3381 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3382 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3383 ULONGEST_MAX.
3384 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3385 ULONGEST_MAX.
3386 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3387 ULONGEST_MAX.
3388 * sparc-linux-tdep.c (sparc32_linux_sigframe)
3389 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3390 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3391 ULONGEST_MAX.
3392 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3393 (ppc64_linux_sigaction_tramp_frame)
3394 (ppc32_linux_sighandler_tramp_frame)
3395 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3396 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3397 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3398 * mn10300-linux-tdep.c (am33_linux_sigframe)
3399 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3400 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3401 * mips-linux-tdep.c (mips_linux_o32_sigframe)
3402 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3403 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3404 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3405 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3406 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3407 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3408 * microblaze-linux-tdep.c
3409 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3410 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3411 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3412 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3413 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3414 * common/common-types.h (ULONGEST_MAX): New define.
3415 (CORE_ADDR_MAX): Fix formatting.
3416 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3417 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3418 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3419 (arm_linux_rt_sigreturn_tramp_frame)
3420 (arm_eabi_linux_sigreturn_tramp_frame)
3421 (arm_eabi_linux_rt_sigreturn_tramp_frame)
3422 (thumb2_eabi_linux_sigreturn_tramp_frame)
3423 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3424 (arm_linux_restart_syscall_tramp_frame)
3425 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3426 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3427 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3428 ULONGEST_MAX.
3429 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3430
3431 2018-08-27 Tom Tromey <tom@tromey.com>
3432
3433 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3434 CORE_ADDR_MAX.
3435 * mips-tdep.c (mips_deal_with_atomic_sequence)
3436 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3437 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3438 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3439 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3440 CORE_ADDR_MAX.
3441 * aarch64-tdep.c (aarch64_software_single_step): Use
3442 CORE_ADDR_MAX.
3443
3444 2018-08-27 Tom Tromey <tom@tromey.com>
3445
3446 * linespec.c (complete_linespec_component): Add cast to "char".
3447 * completer.c (completion_tracker::build_completion_result): Add
3448 cast to "char".
3449
3450 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3451
3452 * solist.h (struct solist, struct target_so_ops): Fix
3453 indentation.
3454
3455 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3456
3457 * ada-tasks.c (ada_task_info_s): Remove typedef.
3458 (DEF_VEC_O(ada_task_info_s)): Remove.
3459 (struct ada_tasks_inferior_data): Initialize fields.
3460 <task_list>: Make an std::vector.
3461 (get_ada_tasks_inferior_data): Allocate with new.
3462 (ada_get_task_number): Adjust.
3463 (get_task_number_from_id): Likewise.
3464 (valid_task_id): Likewise.
3465 (ada_get_task_info_from_ptid): Likewise.
3466 (iterate_over_live_ada_tasks): Likewise.
3467 (add_ada_task): Likewise.
3468 (read_known_tasks): Likewise.
3469 (ada_build_task_list): Likewise.
3470 (print_ada_task_info): Likewise.
3471 (info_task): Likewise.
3472 (task_command_1): Likewise.
3473
3474 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3475
3476 * ada-lang.c (add_angle_brackets): Return std::string.
3477
3478 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
3479
3480 * python/py-threadevent.c (py_get_event_thread): Initialize
3481 pythread.
3482
3483 2018-08-24 Pedro Alves <palves@redhat.com>
3484
3485 * python/py-bpevent.c (create_breakpoint_event_object): Use
3486 copy-initialization.
3487 * python/py-continueevent.c (emit_continue_event): Use
3488 copy-initialization.
3489 * python/py-exitedevent.c (create_exited_event_object): Return a
3490 gdbpy_ref<>.
3491 (emit_exited_event): Use copy-initialization.
3492 * python/py-inferior.c (python_new_inferior)
3493 (python_inferior_deleted, add_thread_object): Use
3494 copy-initialization.
3495 * python/py-infevents.c (create_inferior_call_event_object)
3496 (create_register_changed_event_object)
3497 (create_memory_changed_event_object): Return a gdbpy_ref<>.
3498 (emit_inferior_call_event, emit_memory_changed_event)
3499 (emit_register_changed_event): Use copy-initialization.
3500 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3501 Return a gdbpy_ref<>.
3502 (emit_new_objfile_event): Use copy-initialization.
3503 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3504 (emit_clear_objfiles_event): Use copy-initialization.
3505 * python/py-signalevent.c (create_signal_event_object): Use
3506 copy-initialization.
3507 * python/py-threadevent.c (create_thread_event_object): Use
3508 copy-initialization.
3509
3510 2018-08-24 Pedro Alves <palves@redhat.com>
3511 Simon Marchi <simon.marchi@ericsson.com>
3512
3513 PR gdb/23379
3514 * python/py-continueevent.c: Include "gdbthread.h".
3515 (create_continue_event_object): Add intro comment. Add 'ptid'
3516 parameter. Use it to find thread to pass to
3517 create_thread_event_object.
3518 (emit_continue_event): Pass PTID down to
3519 create_continue_event_object.
3520 * python/py-event.h (py_get_event_thread): Declare.
3521 (create_thread_event_object): Remove default from 'thread'
3522 parameter.
3523 * python/py-stopevent.c (create_stop_event_object): Use
3524 py_get_event_thread.
3525 * python/py-threadevent.c (get_event_thread): Rename to ...
3526 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3527 and use it to find the thread.
3528 (create_thread_event_object): Assert that THREAD isn't null.
3529 Don't find the event thread here.
3530
3531 2018-08-23 Kevin Buettner <kevinb@redhat.com>
3532
3533 * block.h (blockrange, blockranges): New struct declarations.
3534 (struct block): Add new field named `ranges'.
3535 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3536 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3537 macros for accessing ranges in struct block.
3538 (make_blockranges): New declaration.
3539 block.c (make_blockranges): New function.
3540 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3541 for block.
3542 * symtab.h (find_pc_partial_function): Add new parameter `block'.
3543 * blockframe.c (cache_pc_function_block): New static global.
3544 (clear_pc_function_cache): Clear cache_pc_function_block.
3545 (find_pc_partial_function): Move comment to symtab.h. Add
3546 support for non-contiguous blocks.
3547 * cli/cli-cmds.c (block.h): Include.
3548 (print_disassembly): Handle printing of non-contiguous blocks.
3549 (disassemble_current_function): Likewise.
3550 (disassemble_command): Likewise.
3551
3552 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3553 BLOCK_START.
3554 * blockframe.c (get_pc_function_start): Likewise.
3555 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3556 (gcc_symbol_address): Likewise.
3557 * compile/compile-object-run.c (compile_object_run): Likewise.
3558 * compile/compile.c (get_expr_block_and_pc): Likewise.
3559 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3560 (func_addr_to_tail_call_list): Likewise.
3561 * findvar.c (default_read_var_value): Likewise.
3562 * inline-frame.c (inline_frame_this_id): Likewise.
3563 (skip-inline_frames): Likewise.
3564 * infcmd.c (until_next_command): Likewise.
3565 * linespec.c (convert_linespec_to_sals): Likewise.
3566 * parse.c (parse_exp_in_context_1): Likewise.
3567 * printcmd.c (build_address_symbolic): likewise.
3568 (info_address_command): Likewise.
3569 symtab.c (find_function_start_sal): Likewise.
3570 (skip_prologue_sal): Likewise.
3571 (find_function_alias_target): Likewise.
3572 (find_gnu_ifunc): Likewise.
3573 * stack.c (find_frame_funname): Likewise.
3574 * symtab.c (fixup_symbol_section): Likewise.
3575 (find_function_start_sal): Likewise.
3576 (skip_prologue_sal): Likewsie.
3577 (find_function_alias_target): Likewise.
3578 (find_gnu_ifunc): Likewise.
3579 * tracepoint.c (info_scope_command): Likewise.
3580 * value.c (value_fn_field): Likewise.
3581
3582 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3583 in place of find_pc_partial_function.
3584 * blockframe.c (find_function_entry_range_from_pc): New function.
3585 * symtab.h (find_function_entry_range_from_pc): Declare and document.
3586 * objfiles.c (objfile_relocate1): Relocate start and end addresses
3587 for each range in a block.
3588
3589
3590 2018-08-23 Xavier Roirand <roirand@adacore.com>
3591
3592 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3593 incrementation.
3594
3595 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3596
3597 * solib-svr4.c (read_program_headers_from_bfd): Return
3598 gdb::optional<gdb::byte_vector>.
3599 (svr4_exec_displacement): Adjust.
3600
3601 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3602
3603 * solib-svr4.c (read_program_header): Return
3604 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3605 (find_program_interpreter): Return
3606 gdb::optional<gdb::byte_vector>.
3607 (scan_dyntag_auxv): Adjust.
3608 (enable_break): Adjust.
3609 (svr4_exec_displacement): Adjust.
3610
3611 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3612
3613 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3614 * inf-child.c (inf_child_target::terminal_save_inferior): New.
3615
3616 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3617
3618 * guile/scm-string.c (gdbscm_scm_from_printf): Use
3619 string_vprintf.
3620 * guile/scm-utils.c (gdbscm_printf): Likewise.
3621 * serial.c (serial_printf): Likewise.
3622 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3623
3624 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
3625
3626 * stack.c (print_frame): Print frame architecture when printing on
3627 an MI output.
3628 * NEWS: Mention new "arch" attribute in frame output.
3629
3630 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3631
3632 * arch/aarch64.h (aarch64_regnum): Update comment.
3633
3634 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3635
3636 * NEWS: Add SVE to 8.2 section.
3637
3638 2018-08-21 Pedro Alves <palves@redhat.com>
3639
3640 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3641 out from gdbscm_parse_function_args.
3642 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3643 gdbscm_parse_function_args_1.
3644
3645 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
3646
3647 PR gdb/17816
3648 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3649 operator.
3650
3651 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
3652
3653 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3654
3655 2018-08-19 Michael Spang <spang@google.com>
3656
3657 PR gdb/11786
3658 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3659 for PT_TLS segments.
3660
3661 2018-08-18 Kevin Buettner <kevinb@redhat.com>
3662
3663 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3664 dwarf_variable_value.
3665 * dwarf2-frame.c (class dwarf_expr_executor):
3666 Add override for dwarf_variable_value.
3667 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3668 (class symbol_needs_eval_context): Likewise.
3669 (indirect_synthetic_pointer): Add forward declaration.
3670 (sect_variable_value): New function.
3671 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3672 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3673 for DW_OP_GNU_variable_value.
3674
3675 2018-08-16 Tom Tromey <tom@tromey.com>
3676
3677 * top.c (read_command_file): Update.
3678 (command_line_input): Remove "repeat" argument.
3679 * ada-lang.c (get_selections): Update.
3680 * linespec.c (decode_line_2): Update.
3681 * defs.h (command_line_input): Remove argument.
3682 * cli/cli-script.c (read_next_line): Update.
3683 * python/py-gdb-readline.c: Update.
3684
3685 2018-08-17 Tom Tromey <tom@tromey.com>
3686
3687 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3688 command_line_input.
3689
3690 2018-08-15 Tom Tromey <tom@tromey.com>
3691
3692 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3693
3694 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
3695
3696 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3697 If used, use find_pc_partial_function to find address range
3698 to disassemble.
3699 * mi/mi-main.c (mi_cmd_list_features): Report
3700 "data-disassemble-a-option" feature.
3701 * NEWS: Mention new -data-disassemble option -a.
3702
3703 2018-08-13 Tom Tromey <tom@tromey.com>
3704
3705 * common/common-defs.h (_FORTIFY_SOURCE): Define.
3706
3707 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3708
3709 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3710 (aarch64_linux_collect_sve_regset): Likewise.
3711 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3712 * regcache.h (regcache_map_entry_size): New function.
3713
3714 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3715
3716 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3717 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3718 (SVE_HEADER_VL_LENGTH): Likewise.
3719 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3720 (SVE_HEADER_FLAGS_LENGTH): Likewise.
3721 (SVE_HEADER_RESERVED_LENGTH): Likewise.
3722 (SVE_HEADER_SIZE_OFFSET): Likewise.
3723 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3724 (SVE_HEADER_VL_OFFSET): Likewise.
3725 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3726 (SVE_HEADER_FLAGS_OFFSET): Likewise.
3727 (SVE_HEADER_RESERVED_OFFSET): Likewise.
3728 (SVE_HEADER_SIZE): Likewise.
3729 (aarch64_linux_core_read_vq): Add function.
3730 (aarch64_linux_core_read_description): Check for SVE section.
3731
3732 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3733
3734 * aarch64-fbsd-tdep.c
3735 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3736 collect_size.
3737 * aarch64-linux-tdep.c
3738 (aarch64_linux_iterate_over_regset_sections): Likewise.
3739 * alpha-linux-tdep.c
3740 (alpha_linux_iterate_over_regset_sections):
3741 * alpha-nbsd-tdep.c
3742 (alphanbsd_iterate_over_regset_sections): Likewise.
3743 * amd64-fbsd-tdep.c
3744 (amd64fbsd_iterate_over_regset_sections): Likewise.
3745 * amd64-linux-tdep.c
3746 (amd64_linux_iterate_over_regset_sections): Likewise.
3747 * arm-bsd-tdep.c
3748 (armbsd_iterate_over_regset_sections): Likewise.
3749 * arm-fbsd-tdep.c
3750 (arm_fbsd_iterate_over_regset_sections): Likewise.
3751 * arm-linux-tdep.c
3752 (arm_linux_iterate_over_regset_sections): Likewise.
3753 * corelow.c (get_core_registers_cb): Likewise.
3754 (core_target::fetch_registers): Likewise.
3755 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3756 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3757 * gdbarch.h (void): Regenerate.
3758 * gdbarch.sh: Add supply_size and collect_size.
3759 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3760 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3761 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3762 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3763 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3764 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3765 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3766 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3767 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3768 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3769 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3770 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3771 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3772 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3773 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3774 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3775 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3776 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3777 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3778 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3779 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3780 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3781 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3782 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3783 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3784 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3785 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3786 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3787 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3788 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3789
3790 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3791
3792 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3793 with string_printf.
3794
3795 2018-08-10 Keith Seitz <keiths@redhat.com>
3796
3797 * compile/compile-c-support.c (add_code_header, add_code_footer):
3798 Move into policy class.
3799 (c_push_user_expression, pop_user_expression_nop)
3800 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3801 (compile_program): New host class.
3802 (c_compile_program): New typedef.
3803 (c_compute_porgram): Use c_compile_program.
3804
3805 2018-08-10 Keith Seitz <keiths@redhat.com>
3806
3807 * compile/compile-internal.h (compile_instance::~compile_instance):
3808 Remove calls to htab_delete.
3809 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3810 * compile.c (compile_instance::compile_instance): Initialize
3811 htab unique pointers.
3812 (compile_instance::get_cached_type, compile_instance::insert_type)
3813 (compile_instance::error_symbol_once): Update for unique_ptr.
3814
3815 2018-08-10 Keith Seitz <keiths@redhat.com>
3816
3817 * compile/compile-c-symbols.c (struct symbol_error)
3818 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3819 (compile_instance::insert_symbol_error)
3820 (compile_instance::error_symbol_once): Move to ...
3821 * compile/compile.c: ... here.
3822
3823 2018-08-10 Keith Seitz <keiths@redhat.com>
3824
3825 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3826 instead of `new_compile_instance'.
3827 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3828 Update description.
3829 If the symbol error map is not initialized, create it.
3830 (generate_c_for_for_one_symbol): Do not check/initialize
3831 the symbol error map.
3832 * compile/compile-c-types.c (compile_c_instance): Make a class.
3833 Update all callers.
3834 (compile_instance::compile_instance): Initialize the type cache.
3835 (get_cached_type): New function.
3836 (insert_type): Update description.
3837 (compile_c_instance::m_default_cflags): Define.
3838 (convert_type): Update description. Use get_cached_type.
3839 (delete_instance): Moved to destructor.
3840 (new_compile_instance): Moved to constructor.
3841 * compile/compile-c.h (compile_c_instance): Make class inheriting
3842 from compile_instance.
3843 <base>: Remove field.
3844 <type_map, symbol_err_map>: Move to base class.
3845 <c_plugin>: Rename to `m_plugin' and remove pointer type.
3846 * compile/compile-internal.h (compile_instance): Make class.
3847 <type_map_t, symbol_err_map_t>: Define.
3848 <fe>: Rename to `m_gcc_fe'.
3849 <scope, block, gcc_target_options>: Add `m_' prefix.
3850 <m_type_map, m_symbol_err_map>: New fields, moved from
3851 compile_c_instance.
3852 <destroy>: Remove.
3853 (convert_type, new_compile_instance): Remove.
3854 * compile/compile.c (cleanup_compile_instance): Remove.
3855 (compile_to_object): Use unique_ptr to eliminate cleanups.
3856 (compile_instance::set_print_callback, compile_instance::version)
3857 (compile_instance::set_verbose)
3858 (compile_instance::set_driver_filename)
3859 (compile_instance::set_triplet_regexp)
3860 (compile_instance::set_arguments)
3861 (compile_instance::set_source_file)
3862 (compile_instance::compile): Define.
3863
3864 2018-08-10 Keith Seitz <keiths@redhat.com>
3865
3866 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3867 * compile/compile-c-types.c: Define GCC_METHODN macros and include
3868 gcc-c-fe.def to define C plugin.
3869 (delete_instance): Delete `c_plugin'.
3870 (new_compile_instance): Initialize `c_plugin'.
3871 * compile/compile-c.h: Include gcc_c_plugin.h.
3872 (struct compile_c_instance) <c_plugin>: New member.
3873 * gcc-c-plugin.h: New file.
3874 Update all callers with API change.
3875
3876 2018-08-10 Keith Seitz <keiths@redhat.com>
3877
3878 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3879 (HFILES_NO_SRCDIR): ... to here.
3880 Add compile-internal.h and compile-c.h.
3881 * compile/compile-c-support.c: Include compile-c.h.
3882 * compile/compile-c-symbols.c: Include compile-c.h.
3883 (generate_c_for_variable_locations): Update comment.
3884 * compile/compile-c-types.c: Include compile-c.h.
3885 * compile/compile-c.h: New file -- moved C language declarations
3886 from other files here.
3887 * compile/compile-internal.h: Do not include hashtab.h or
3888 common/enum-flags.h.
3889 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3890 (gcc_convert_symbol, gcc_symbol_address)
3891 (generate_c_for_variable_locations, c_get_mode_for_size)
3892 (c_get_range_decl_name): Definitions moved to compile-c.h.
3893 * compile/compile-loc2c.c: Include compile-c.h.
3894
3895 2018-08-10 Keith Seitz <keiths@redhat.com>
3896
3897 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3898 (c_symbol_substitution_name): ... this.
3899 Update all callers.
3900
3901 2018-08-10 Keith Seitz <keiths@redhat.com>
3902
3903 * compile/compile-c-support.c (c_compute_program): Use
3904 unique_xmalloc_ptr to eliminate cleanup.
3905 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3906 Return a unique_xmalloc_ptr and eliminate cleanup.
3907 * compile/compile-internal.h (generate_c_for_variable_locations):
3908 Return unique_xmalloc_ptr and update description.
3909
3910 2018-08-10 Alan Hayward <alan.hayward@arm.com>
3911
3912 * corelow.c (core_target::get_core_register_section): Rename
3913 min_size to section_min_size.
3914
3915 2018-08-09 Jim Wilson <jimw@sifive.com>
3916
3917 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3918 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3919 * NEWS: Mention new GNU/Linux RISC-V target.
3920 * configure.host: Add riscv*-*-linux*.
3921 * configure.nat: Add riscv*.
3922 * configure.tgt: Add riscv*-*-linux*.
3923 * riscv-linux-nat.c: New file.
3924 * riscv-linux-tdep.c: New file.
3925
3926 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3927
3928 * infrun.c (resume): Make static, add forward declaration.
3929 (proceed): Update header comment.
3930 * infrun.h (resume): Delete declaration.
3931
3932 2018-08-09 Tom Tromey <tom@tromey.com>
3933
3934 * riscv-tdep.h: Minor formatting fixes.
3935
3936 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
3937
3938 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3939 * dwarf-index-cache.c (create_dir_and_check): Likewise.
3940 (test_mkdir_recursive): Likewise.
3941 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3942
3943 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
3944
3945 * valarith.c (value_subscripted_rvalue): If an array is not in
3946 memory, and we don't know the upper bound, then we can't know that
3947 the requested element exists or not.
3948
3949 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
3950
3951 * target.c (str_comma_list_concat_elem): Fix typo in comment.
3952 (target_options_to_string): Add comment.
3953
3954 2018-08-08 Tom Tromey <tom@tromey.com>
3955
3956 * unittests/scoped_mmap-selftests.c: Check result of "write".
3957
3958 2018-08-08 Jim Wilson <jimw@sifive.com>
3959
3960 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3961 (decode_register_index_short): New.
3962 (decode_j_type_insn, decode_cj_type_insn): New.
3963 (decode_b_type_insn, decode_cb_type_insn): New.
3964 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
3965 local xlen. Check xlen when decoding ambiguous compressed insns. In
3966 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3967 is_c_sw_insn instead of is_sw_insn.
3968 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3969 (riscv_software_single_step): New.
3970 * riscv-tdep.h (riscv_software_single_step): Declare.
3971
3972 * riscv-tdep.c (riscv_isa_xlen): Drop static.
3973 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3974
3975 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
3976
3977 PR gdb/18050:
3978 * target.c (dispose_inferior): Don't dispose of inferiors that are
3979 already killed.
3980
3981 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
3982
3983 * remote.c (remote_target::download_tracepoint): Change char* to
3984 const char*.
3985
3986 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
3987
3988 * target.h (target_options_to_string): Return an std::string.
3989 * target.c (str_comma_list_concat_elem): Return void, use
3990 std::string.
3991 (do_option): Likewise.
3992 (target_options_to_string): Return an std::string.
3993 * linux-nat.c (linux_nat_target::wait): Adjust.
3994 * target-debug.h (target_debug_print_options): Adjust.
3995
3996 2018-08-07 Tom Tromey <tom@tromey.com>
3997
3998 * Makefile.in (CPPFLAGS): New variable.
3999 (INTERNAL_CPPFLAGS): Use it.
4000
4001 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4002
4003 * NEWS: Mention the index cache.
4004
4005 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4006
4007 * common/pathstuff.h (get_standard_cache_dir): New.
4008 * common/pathstuff.c (get_standard_cache_dir): New.
4009 * build-id.h (build_id_to_string): New.
4010 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4011 DEBUG_STR_SUFFIX): Move to here.
4012 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4013 DEBUG_STR_SUFFIX): Move from there.
4014 (write_psymtabs_to_index): Make non-static, add basename
4015 parameter. Write to temporary files, rename when done.
4016 (save_gdb_index_command): Adjust call to
4017 write_psymtabs_to_index.
4018 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4019 field.
4020 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4021 (get_gdb_index_contents_from_cache): New.
4022 (get_gdb_index_contents_from_cache_dwz): New.
4023 (dwarf2_initialize_objfile): Read index from cache.
4024 (dwarf2_build_psymtabs): Save to index.
4025 * dwarf-index-cache.h: New file.
4026 * dwarf-index-cache.c: New file.
4027 * dwarf-index-write.h: New file.
4028
4029 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4030
4031 * gnulib/aclocal.m4: Re-generate.
4032 * gnulib/config.in: Re-generate.
4033 * gnulib/configure: Re-generate.
4034 * gnulib/import/Makefile.am: Re-generate.
4035 * gnulib/import/Makefile.in: Re-generate.
4036 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4037 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4038 * gnulib/import/m4/mkdir.m4: New file.
4039 * gnulib/import/mkdir.c: New file.
4040 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4041 module.
4042
4043 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4044
4045 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4046 * common/scoped_mmap.c: New file.
4047 * common/scoped_mmap.h (destroy): New method.
4048 (~scoped_mmap, reset): Use destroy.
4049 (scoped_mmap): New move constructor.
4050 (mmap_file): New declaration.
4051 * unittests/scoped_mmap-selftests.c (test_normal,
4052 test_invalid_filename, run_tests): New functions.
4053 (_initialize_scoped_mmap_selftests): Register selftest.
4054
4055 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4056
4057 * dwarf2read.c (read_gdb_index_from_section): Rename to...
4058 (read_gdb_index_from_buffer): ... this. Remove section
4059 parameter, add buffer parameter.
4060 (get_gdb_index_contents_ftype,
4061 get_gdb_index_contents_dwz_ftype): New typedefs.
4062 (dwarf2_read_gdb_index): Add callback parameters to get the
4063 index contents.
4064 (get_gdb_index_contents_from_section): New.
4065 (dwarf2_initialize_objfile): Update call to
4066 dwarf2_read_gdb_index.
4067
4068 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4069
4070 * common/filestuff.h (gdb_fopen_cloexec): New overload.
4071 (gdb_open_cloexec): Likewise.
4072 * nat/linux-osdata.c (command_from_pid): Use string_printf.
4073 (commandline_from_pid): Likewise.
4074 (linux_xfer_osdata_threads): Likewise.
4075 (linux_xfer_osdata_fds): Likewise.
4076 * ada-lang.c (is_package_name): Likewise.
4077 * auxv.c (procfs_xfer_auxv): Likewise.
4078 * breakpoint.c (print_one_breakpoint_location): Use
4079 uiout::field_fmt.
4080 (print_one_catch_solib): Use string_printf.
4081 * coff-pe-read.c (add_pe_exported_sym): Likewise.
4082 (add_pe_forwarded_sym): Likewise.
4083 * dwarf2read.c (create_type_unit_group): Likewise.
4084 (build_error_marker_type): Likewise.
4085 * infcall.c (get_function_name): Likewise.
4086 * valprint.c (print_converted_chars_to_obstack): Likewise.
4087 * xtensa-tdep.c (xtensa_register_type): Likewise.
4088
4089 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
4090
4091 * remote.c (remote_target::download_tracepoint): Fix format
4092 string errors.
4093
4094 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4095
4096 * tracefile.c: Include common/byte-vector.h.
4097 (trace_save): Change type of buf to gdb::byte_vector. Initialize
4098 with trace_regblock_size if needed. Update uses of buf.
4099
4100 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4101
4102 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4103 std::vector<unsigned char>.
4104 * tracepoint.c (collection_list::collection_list): Remove
4105 m_regs_mask initializer from initializer list. Resize
4106 m_regs_mask using the largest remote register number.
4107 (collection_list::add_remote_register): Remove size check on
4108 m_regs_mask. Use at to access element.
4109 (collection_list::stringify): Change type of temp_buf to
4110 gdb::char_vector. Update uses of temp_buf. Resize if needed to
4111 stringify the register mask. Use pack_hex_byte for the register
4112 mask.
4113
4114 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4115
4116 * tracepoint.h (class collection_list) <add_register>: Remove.
4117 <add_remote_register, add_ax_registers, add_local_register>:
4118 Declare.
4119 <add_memrange>: Add scope parameter.
4120 * tracepoint.c (encode_actions_1): Likewise.
4121 (collection_list::add_register): Rename to ...
4122 (collection_list::add_remote_register): ... this. Update
4123 comment.
4124 (collection_list::add_ax_registers, add_local_register): New
4125 methods.
4126 (collection_list::add_memrange): Add scope parameter. Call
4127 add_local_register instead of add_register.
4128 (finalize_tracepoint_aexpr): New function.
4129 (collection_list::collect_symbol): Update calls to add_memrange.
4130 Call add_local_register instead of add_register. Call
4131 add_ax_registers. Call finalize_tracepoint_aexpr.
4132 (encode_actions_1): Get remote regnos for $reg action. Call
4133 add_remote_register, add_ax_registers, and add_local_register.
4134 Update call to add_memrange. Call finalize_tracepoint_aexpr.
4135 (validate_actionline): Call finalize_tracepoint_aexpr.
4136
4137 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4138
4139 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4140 Replace array buf with gdb::char_vector buf, of size
4141 get_remote_packet_size (). Replace references to buf and
4142 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
4143 and xsnprintf with snprintf. Raise errors if the buffer is too
4144 small.
4145
4146 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4147
4148 * remote.c (remote_target::download_tracepoint): Fix the has_more
4149 predicate in the QTDP action list iteration.
4150
4151 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4152
4153 * remote.c (remote_target::download_tracepoint): Fix indentation
4154 in for block.
4155
4156 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4157
4158 * proc-api.c (_initialize_proc_api): Remove c, unused.
4159 * procfs.c (procfs_init_inferior): Remove signals, unused.
4160 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4161 unused.
4162
4163 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
4164 Andrew Burgess <andrew.burgess@embecosm.com>
4165
4166 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4167 'W_STOPCODE (0)' as this could be ambiguous.
4168
4169 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
4170
4171 * ser-tcp.c (net_open): Fix thinko when deciding whether to
4172 disable TCP's Nagle algorithm (use "ai_protocol" instead of
4173 "ai_socktype").
4174
4175 2018-08-02 Tom Tromey <tom@tromey.com>
4176
4177 PR symtab/16842.
4178 * dwarf2read.c (read_func_scope): Set symtab on template parameter
4179 symbols.
4180 (process_structure_scope): Likewise.
4181
4182 2018-08-02 Xavier Roirand <roirand@adacore.com>
4183
4184 PR gdb/22629:
4185 * darwin-nat.c (darwin_kill_inferior): Fix handling of
4186 kill inferior.
4187
4188 2018-08-02 Tom Tromey <tom@tromey.com>
4189
4190 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4191 (darwin_suspend_inferior, darwin_resume_inferior)
4192 (darwin_decode_notify_message, darwin_resume_inferior_threads)
4193 (darwin_check_new_threads): Check result of get_darwin_inferior.
4194
4195 2018-07-31 Joel Brobecker <brobecker@adacore.com>
4196
4197 GDB 8.1.1 released.
4198
4199 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
4200
4201 * varobj.c (varobj_get_path_expr_parent): Report an error if
4202 parent is a dynamic varobj.
4203
4204 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4205
4206 * gnulib/aclocal.m4: Re-generate.
4207 * gnulib/config.in: Re-generate.
4208 * gnulib/configure: Re-generate.
4209 * gnulib/import/Makefile.in: Re-generate.
4210 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4211 * gnulib/import/m4/onceonly.m4: Re-generate.
4212
4213 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4214
4215 * target-descriptions.c (struct xml_test_tdesc): New.
4216 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4217 (record_xml_tdesc): Update.
4218 (maintenance_check_xml_descriptions): Update.
4219 * target-descriptions.h (record_xml_tdesc): Update comment.
4220
4221 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
4222
4223 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4224 checking array bounds are defined.
4225
4226 2018-07-30 Tom Tromey <tom@tromey.com>
4227
4228 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4229 irreflexivity violation.
4230
4231 2018-07-30 Tom Tromey <tom@tromey.com>
4232
4233 * cli/cli-decode.c (lookup_cmd): Remove lint code.
4234 * value.c (unpack_long): Remove lint code.
4235 * valops.c (value_ind): Remove lint code.
4236 * valarith.c (value_x_binop, value_x_unop, value_equal)
4237 (value_pos): Remove lint code.
4238
4239 2018-07-28 Tom de Vries <tdevries@suse.de>
4240
4241 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4242 with undefined upper bound as <optimized out>.
4243
4244 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
4245
4246 * gcore.in: Rename variable "name" to "prefix". Expand
4247 "usage" text.
4248
4249 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
4250
4251 * windows-nat.c (windows_nat_target::create_inferior): Update to
4252 call close() in global namespace.
4253
4254 2018-07-26 Tom Tromey <tom@tromey.com>
4255
4256 * dwarf-index-write.c (add_address_entry): Don't add objfile
4257 offsets.
4258 * dbxread.c (find_stab_function): Rename from
4259 find_stab_function_addr. Return a bound_minimal_symbol.
4260 (read_dbx_symtab): Use raw_text_low, raw_text_high.
4261 Don't add objfile offsets.
4262 (end_psymtab): Use raw_text_low, raw_text_high,
4263 MSYMBOL_VALUE_RAW_ADDRESS.
4264 (read_ofile_symtab): Update.
4265 (process_one_symbol): Update.
4266 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4267 offsets.
4268 (dw2_relocate): Remove.
4269 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4270 searching addrmap.
4271 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4272 Update.
4273 (process_psymtab_comp_unit_reader, add_partial_symbol)
4274 (add_partial_subprogram, dwarf2_ranges_read): Update.
4275 (load_partial_dies): Update.
4276 (add_address_entry): Don't add objfile offsets.
4277 (dwarf2_build_include_psymtabs): Update.
4278 (create_addrmap_from_aranges): Don't add objfile offsets.
4279 (dw2_find_pc_sect_compunit_symtab): Update.
4280 * mdebugread.c (parse_symbol): Don't add objfile offsets.
4281 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4282 Update.
4283 (parse_partial_symbols): Don't add objfile offsets. Use
4284 raw_text_low, raw_text_high. Update.
4285 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4286 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4287 or call 'relocate' quick function. Clear psymbol_map.
4288 * psympriv.h (struct partial_symbol) <address>: Add section
4289 offset.
4290 <set_unrelocated_address>: Rename from set_address.
4291 <raw_text_low, raw_text_high>: New methods.
4292 <text_low, text_high>: Add objfile parameter.
4293 (add_psymbol_to_bcache): Add 'section' parameter. Call
4294 set_unrelocated_address.
4295 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4296 (find_pc_psymbol): Update.
4297 (fixup_psymbol_section, relocate_psymtabs): Remove.
4298 (dump_psymtab, psym_functions): Update.
4299 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4300 parameter.
4301 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4302 (start_psymtab_common): Update.
4303 * symfile-debug.c (debug_qf_relocate): Remove.
4304 (debug_sym_quick_functions): Update.
4305 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4306 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4307 Update.
4308
4309 2018-07-26 Tom Tromey <tromey@redhat.com>
4310
4311 * dbxread.c (end_psymtab): Use text_high_valid and
4312 text_low_valid.
4313 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4314 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4315 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4316 Update comment.
4317 <text_low_valid, text_high_valid>: New fields.
4318 <set_text_low, set_text_high>: Update.
4319 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4320
4321 2018-07-26 Tom Tromey <tom@tromey.com>
4322
4323 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4324 Update.
4325 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4326 textlow and texthigh fields.
4327 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4328 Update.
4329 * mdebugread.c (parse_lines, parse_partial_symbols)
4330 (psymtab_to_symtab_1): Update.
4331 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4332 Rename fields. Update comment. Now private.
4333 <text_low, text_high, set_text_low, set_text_high>: New methods.
4334 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4335 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4336 (start_psymtab_common, maintenance_info_psymtabs)
4337 (maintenance_check_psymtabs): Update.
4338 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4339 texthigh fields.
4340 (scan_xcoff_symtab): Update.
4341
4342 2018-07-26 Tom Tromey <tromey@redhat.com>
4343
4344 * psympriv.h (struct partial_symbol) <unrelocated_address,
4345 address, set_address>: New methods.
4346 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4347 (fixup_psymbol_section, relocate_psymtabs): Update.
4348 (print_partial_symbols): Add 'objfile' parameter. Update.
4349 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4350 Update.
4351
4352 2018-07-26 Tom Tromey <tom@tromey.com>
4353
4354 * dwarf-index-write.c (write_psymbols, debug_names::insert)
4355 (debug_names::write_psymbols): Update.
4356 * psympriv.h (struct partial_symbol): Derive from
4357 general_symbol_info.
4358 <obj_section>: New method.
4359 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4360 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4361 (find_pc_sect_psymbol, fixup_psymbol_section)
4362 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4363 (print_partial_symbols, recursively_search_psymtabs)
4364 (compare_psymbols, psymbol_hash, psymbol_compare)
4365 (add_psymbol_to_bcache, maintenance_check_psymtabs)
4366 (psymbol_name_matches, psym_fill_psymbol_map): Update.
4367
4368 2018-07-26 Tom Tromey <tromey@redhat.com>
4369
4370 * dbxread.c (end_psymtab): Remove dead code.
4371
4372 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
4373
4374 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4375 DWARF unwinders are disabled.
4376 * dwarf2-frame.c: Add dwarf2read.h include.
4377 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4378 disabled.
4379 (dwarf2_frame_unwinders_enabled_p): Define.
4380 (show_dwarf_unwinders_enabled_p): New function.
4381 (_initialize_dwarf2_frame): Register switch to control DWARF
4382 unwinder use.
4383 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4384 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4385 (show_dwarf_cmdlist): Remove static keyword.
4386 * dwarf2read.h (set_dwarf_cmdlist): Declare.
4387 (show_dwarf_cmdlist): Declare.
4388 * NEWS: Document new feature.
4389
4390 2018-07-26 Tom de Vries <tdevries@suse.de>
4391
4392 PR breakpoints/23366
4393 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4394
4395 2018-07-26 Tom de Vries <tdevries@suse.de>
4396
4397 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4398 DW_AT_count can't be translated to a dynamic prop.
4399
4400 2018-07-25 Tom de Vries <tdevries@suse.de>
4401
4402 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4403 try/catch.
4404
4405 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
4406
4407 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4408
4409 2018-07-25 Joel Brobecker <brobecker@adacore.com>
4410
4411 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4412
4413 2018-07-24 Keith Seitz <keiths@redhat.comt
4414
4415 PR symtab/23010
4416 * dwarf2read.c (dw2_add_symbol_to_list): New function.
4417 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4418 instead of add_symbol_to_list.
4419 (read_file_scope): Call prepare_one_comp_unit before reading
4420 any other DIEs.
4421
4422 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
4423
4424 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4425
4426 2018-07-24 Tom Tromey <tom@tromey.com>
4427
4428 * utils.c (malloc, realloc, free): Don't declare.
4429 * configure, config.in: Rebuild.
4430 * configure.ac: Don't check for declarations of free, malloc, or
4431 realloc.
4432
4433 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4434
4435 * aarch64-linux-nat.c
4436 (aarch64_linux_nat_target::stopped_data_address): Remove unused
4437 variable.
4438 * arm-linux-nat.c (fetch_regs): Likewise.
4439 (store_regs): Likewise.
4440 (fetch_vfp_regs): Likewise.
4441 (store_vfp_regs): Likewise.
4442 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4443 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4444 (arm_linux_nat_target::insert_watchpoint): Likewise.
4445 (arm_linux_nat_target::remove_watchpoint): Likewise.
4446 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4447 Likewise.
4448 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4449 Likewise.
4450 * ppc-linux-nat.c (fetch_register): Likewise.
4451 (fetch_all_gp_regs): Likewise.
4452 (fetch_ppc_registers): Likewise.
4453 (store_all_gp_regs): Likewise.
4454 (store_ppc_registers): Likewise.
4455 (hwdebug_insert_point): Likewise.
4456 (can_use_watchpoint_cond_accel): Likewise.
4457 * remote-sim.c (gdb_os_write_stdout): Likewise.
4458
4459 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4460 Tom Tromey <tom@tromey.com>
4461
4462 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4463 test for it.
4464 * configure: Rebuild.
4465
4466 2018-07-22 Tom Tromey <tom@tromey.com>
4467
4468 * regformats/regdat.sh: Define xmltarget_${name} inside
4469 #ifndef IN_PROCESS_AGENT.
4470
4471 2018-07-22 Tom Tromey <tom@tromey.com>
4472
4473 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4474
4475 2018-07-22 Tom Tromey <tom@tromey.com>
4476
4477 * symfile.c (reread_symbols): Notify iter, not objfile.
4478
4479 2018-07-22 Tom Tromey <tom@tromey.com>
4480
4481 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4482 Use arch_ops.
4483 (ravenscar_thread_target::prepare_to_store): Likewise.
4484
4485 2018-07-22 Tom Tromey <tom@tromey.com>
4486
4487 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4488 unused variable. Call value_fetch_lazy when needed.
4489 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4490 Remove unused variable. Call value_fetch_lazy when needed.
4491
4492 2018-07-22 Tom Tromey <tom@tromey.com>
4493
4494 * m32c-tdep.c (mark_dma): Return void.
4495 (make_regs): Remove unused declarations.
4496
4497 2018-07-22 Tom Tromey <tom@tromey.com>
4498
4499 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4500 cmdscm_get_valid_command_smob_arg_unsafe for effect.
4501 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4502 bkscm_get_valid_block_smob_arg_unsafe for effect.
4503
4504 2018-07-22 Tom Tromey <tom@tromey.com>
4505
4506 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4507 value_type.
4508
4509 2018-07-22 Tom Tromey <tom@tromey.com>
4510
4511 * windows-nat.c (saved_context): Conditionally define.
4512 * remote.c (remote_target::remote_btrace_maybe_reopen):
4513 Conditionally declare "warned".
4514 * inflow.c (sigquit_ours): Conditionally define.
4515 (new_tty): Move "tty" declaration inside #if.
4516 * guile/guile.c (guile_datadir): Conditionally define.
4517 * charset.c (set_be_le_names): Move some declarations inside #if.
4518 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4519 #if.
4520 (parse_xml_btrace_conf): Likewise.
4521
4522 2018-07-22 Tom Tromey <tom@tromey.com>
4523
4524 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4525
4526 2018-07-22 Tom Tromey <tom@tromey.com>
4527
4528 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4529 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4530 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4531 * buildsym-legacy.c (get_macro_table): Remove unused variable.
4532 * stack.c (frame_apply_level_command): Remove unused variable.
4533 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4534 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4535 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4536 unused variable.
4537 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4538 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4539 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4540 variable.
4541 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4542 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4543 variable.
4544 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4545 Remove unused variable.
4546 * cli/cli-script.c (recurse_read_control_structure): Remove unused
4547 variable.
4548 * common/tdesc.c (print_xml_feature::visit): Remove unused
4549 variable.
4550 * compile/compile-object-load.c (store_regs): Remove unused
4551 variables.
4552 * complaints.c (clear_complaints): Remove unused variable.
4553 * corelow.c (core_target_open): Remove unused variable.
4554 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4555 variable.
4556 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4557 variable.
4558 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4559 variable.
4560 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4561 variable.
4562 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4563 variable.
4564 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4565 variable.
4566 * ia64-tdep.c (examine_prologue): Remove unused variable.
4567 * infcall.c (run_inferior_call): Remove unused variable.
4568 * inferior.c (exit_inferior): Remove unused variable.
4569 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4570 * linespec.c (decode_line_2): Remove unused variable.
4571 * linux-nat.c (super_close): Remove.
4572 * linux-tdep.c (linux_info_proc): Remove unused variable.
4573 * mi/mi-main.c (mi_execute_command): Remove unused variable.
4574 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4575 Remove unused variable.
4576 * parse.c (find_minsym_type_and_address): Remove unused variable.
4577 * printcmd.c (info_symbol_command, printf_floating): Remove unused
4578 variable.
4579 * python/py-breakpoint.c (bppy_set_commands): Remove unused
4580 variable.
4581 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4582 variables.
4583 * record-btrace.c (record_btrace_target::store_registers): Remove
4584 unused variable.
4585 (cmd_show_record_btrace_cpu): Remove unused variable.
4586 * riscv-tdep.c (riscv_register_reggroup_p)
4587 (riscv_push_dummy_call, riscv_return_value): Remove unused
4588 variable.
4589 * rust-exp.y (literal): Remove unused variable.
4590 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4591 unused variable.
4592 <STRUCTOP_ANONYMOUS>: Likewise.
4593 * s390-linux-tdep.c (s390_linux_init_abi_31)
4594 (s390_linux_init_abi_64): Remove unused variable.
4595 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4596 (file_select_thread, net_windows_open, _initialize_ser_windows):
4597 Remove unused variables.
4598 * symtab.c (find_pc_sect_line): Remove unused variable.
4599 * target-memory.c (compute_garbled_blocks): Remove unused
4600 variable.
4601 (target_write_memory_blocks): Remove unused variable.
4602 * target.c (target_stack::unpush): Remove unused variables.
4603 * tracepoint.c (start_tracing, all_tracepoint_actions)
4604 (merge_uploaded_trace_state_variables)
4605 (print_one_static_tracepoint_marker): Remove unused variable.
4606 * unittests/basic_string_view/element_access/char/1.cc (test01):
4607 Remove unused variable.
4608 * windows-nat.c (windows_continue, windows_add_all_dlls)
4609 (do_initial_windows_stuff, windows_nat_target::create_inferior):
4610 Remove unused variables.
4611
4612 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
4613
4614 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4615 attr_profile in HAVE_ELF.
4616 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4617 HAVE_ELF.
4618
4619 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
4620
4621 * frame.c (frame_register_unwind): Change parameter name.
4622 (frame_unwind_register): Likewise.
4623 (frame_unwind_register_value): Likewise.
4624 (frame_unwind_register_signed): Likewise.
4625 (frame_unwind_register_unsigned): Likewise.
4626 * frame.h (frame_register_unwind): Likewise.
4627 (frame_unwind_register): Likewise.
4628 (frame_unwind_register_value): Likewise.
4629 (frame_unwind_register_signed): Likewise.
4630 (frame_unwind_register_unsigned): Likewise.
4631 (frame_unwind_arch): Likewise.
4632
4633 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4634
4635 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4636 ISA maintenance.
4637
4638 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4639
4640 * mips-linux-nat.c (mips_linux_nat_target::read_description):
4641 Call `get_ptrace_pid' rather than extracting the ptrace PID by
4642 hand.
4643
4644 2018-07-20 Keith Seitz <keiths@redhat.com>
4645
4646 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4647 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4648 m_compunit_symtab, m_language>: Add "m_" prefix.
4649 Update all uses.
4650 * buildsym.c: Update all uses.
4651
4652 2018-07-20 Tom Tromey <tom@tromey.com>
4653
4654 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4655 * buildsym.h (record_line_ftype): Remove typedef.
4656
4657 2018-07-20 Tom Tromey <tom@tromey.com>
4658
4659 * buildsym-legacy.h (augment_type_symtab): Don't declare.
4660 (end_expandable_symtab): Likewise.
4661 (end_symtab_get_static_block): Likewise.
4662 (end_symtab_from_static_block): Likewise.
4663 * buildsym-legacy.c (augment_type_symtab): Remove.
4664 (end_expandable_symtab): Remove.
4665 (end_symtab_get_static_block): Remove.
4666 (end_symtab_from_static_block): Remove.
4667
4668 2018-07-20 Tom Tromey <tom@tromey.com>
4669
4670 * dwarf2read.c: Include buildsym.h.
4671 (struct dwarf2_cu) <builder>: New method.
4672 (fixup_go_packaging): Update.
4673 (process_full_comp_unit, process_full_type_unit): Update. Don't
4674 use scoped_free_pendings.
4675 (using_directives): Add "cu" parameter, remove "language".
4676 (read_import_statement, setup_type_unit_groups, )
4677 (read_func_scope, read_lexical_block_scope)
4678 (dwarf2_record_block_ranges, read_namespace): Update.
4679 (lnp_state_machine::lnp_state_machine): Add cu parameter.
4680 (lnp_state_machine::handle_end_sequence): Update.
4681 (class lnp_state_machine) <m_cu>: New member.
4682 <m_record_line_callback>: Remove.
4683 <m_currently_recording_lines>: New member.
4684 (lnp_state_machine::handle_set_file): Update.
4685 (noop_record_line): Remove.
4686 (dwarf_record_line_p): Add cu parameter.
4687 (dwarf_record_line_1, dwarf_finish_line): Likewise.
4688 (lnp_state_machine::record_line)
4689 (lnp_state_machine::lnp_state_machine)
4690 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4691 (dwarf_decode_lines): Update.
4692 (dwarf2_start_subfile): Add cu parameter.
4693 (dwarf2_start_symtab, new_symbol): Update.
4694 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4695 Remove dwarf2_per_objfile parameter.
4696 (dwarf_decode_macros): Update.
4697
4698 2018-07-20 Tom Tromey <tom@tromey.com>
4699
4700 * stabsread.c (define_symbol): Update.
4701 * buildsym-legacy.h (get_buildsym_compunit): Declare.
4702 * dwarf2read.c (new_symbol): Update.
4703 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4704 * cp-namespace.c: Include buildsym.h.
4705 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4706 * buildsym-legacy.c (get_buildsym_compunit): New function.
4707
4708 2018-07-20 Tom Tromey <tom@tromey.com>
4709
4710 * xcoffread.c: Include buildsym-legacy.h.
4711 * windows-nat.c: Include buildsym-legacy.h.
4712 * stabsread.c: Include buildsym-legacy.h.
4713 * mdebugread.c: Include buildsym-legacy.h.
4714 * buildsym-legacy.h: New file.
4715 * buildsym-legacy.c: New file, from buildsym.c.
4716 * go32-nat.c: Include buildsym-legacy.h.
4717 * dwarf2read.c: Include buildsym-legacy.h.
4718 * dbxread.c: Include buildsym-legacy.h.
4719 * cp-namespace.c: Include buildsym-legacy.h.
4720 * coffread.c: Include buildsym-legacy.h.
4721 * buildsym.h: Move some contents to buildsym-legacy.h.
4722 * buildsym.c: Include buildsym-legacy.h. Move many functions to
4723 buildsym-legacy.c.
4724 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4725
4726 2018-07-20 Tom Tromey <tom@tromey.com>
4727
4728 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4729 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4730 (buildsym_compunit::buildsym_compunit)
4731 (buildsym_compunit::~buildsym_compunit)
4732 (buildsym_compunit::get_macro_table): Define.
4733
4734 2018-07-20 Tom Tromey <tom@tromey.com>
4735
4736 * buildsym.c (reset_symtab_globals): Remove.
4737 (buildsym_compunit::end_symtab_from_static_block): Update.
4738 (buildsym_compunit::augment_type_symtab): Update.
4739 (end_symtab_from_static_block): Call free_buildsym_compunit.
4740 (augment_type_symtab, end_symtab, end_expandable_symtab):
4741 Likewise.
4742
4743 2018-07-20 Tom Tromey <tom@tromey.com>
4744
4745 * arch-utils.c: Do not include buildsym.h.
4746 * mipsread.c: Do not include buildsym.h.
4747 * machoread.c: Do not include buildsym.h.
4748 * elfread.c: Do not include buildsym.h.
4749
4750 2018-07-20 Tom Tromey <tom@tromey.com>
4751
4752 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4753 initialization.
4754 (buildsym_compunit): Add new constructor.
4755 (struct buildsym_compunit) <get_last_source_file, finish_block,
4756 record_block_range, start_subfile, patch_subfile_names,
4757 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4758 set_last_source_start_addr, get_last_source_start_addr,
4759 get_local_using_directives, set_local_using_directives,
4760 get_global_using_directives, outermost_context_p,
4761 get_current_context_stack, get_context_stack_depth,
4762 get_current_subfile, get_local_symbols, get_file_symbols,
4763 get_global_symbols, record_debugformat, record_producer,
4764 push_context, pop_context, end_symtab_get_static_block,
4765 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4766 New public methods.
4767 <record_pending_block, finish_block_internal, make_blockvector,
4768 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4769 private methods.
4770 Update all users.
4771
4772 2018-05-22 Tom Tromey <tom@tromey.com>
4773
4774 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4775 parameter.
4776 (finish_block_internal): Update.
4777
4778 2018-07-20 Tom Tromey <tom@tromey.com>
4779
4780 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4781 parameter.
4782 (finish_block_internal): Update.
4783
4784 2018-07-20 Tom Tromey <tom@tromey.com>
4785
4786 * buildsym.h (EXTERN): Don't define or undef.
4787 * buildsym.c (EXTERN): Don't define.
4788
4789 2018-07-20 Tom Tromey <tom@tromey.com>
4790
4791 * buildsym.c: Remove TODO comment.
4792
4793 2018-07-20 Tom Tromey <tom@tromey.com>
4794
4795 * coffread.c (coff_symtab_read): Update.
4796 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4797 (xcoff_new_init): Update.
4798 * mipsread.c (mipscoff_new_init): Update.
4799 * mdebugread.c (mdebug_build_psymtabs): Update.
4800 * elfread.c (elf_new_init): Update.
4801 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4802 Update.
4803 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4804 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4805 (stabsect_build_psymtabs): Update.
4806 * buildsym.h (buildsym_init): Don't declare.
4807 * buildsym.c: Update comment.
4808 (prepare_for_building): Remove.
4809 (start_symtab, restart_symtab): Update.
4810 (reset_symtab_globals): Update comment.
4811 (buildsym_init): Remove.
4812
4813 2018-07-20 Tom Tromey <tom@tromey.com>
4814
4815 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4816 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4817 (read_enum_type, common_block_start, common_block_end)
4818 (cleanup_undefined_types_1, finish_global_stabs): Update.
4819 * mdebugread.c (psymtab_to_symtab_1): Update.
4820 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4821 (read_lexical_block_scope, new_symbol): Update.
4822 * dbxread.c (process_one_symbol): Update.
4823 * coffread.c (coff_symtab_read, process_coff_symbol)
4824 (coff_read_enum_type): Update.
4825 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4826 declare.
4827 (get_local_symbols, get_file_symbols, get_global_symbols): New
4828 functions.
4829 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4830 m_global_symbols.
4831 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4832 (~scoped_free_pendings): Update.
4833 (finish_block, prepare_for_building, reset_symtab_globals)
4834 (end_symtab_get_static_block, end_symtab_with_blockvector)
4835 (augment_type_symtab, push_context): Update.
4836 (get_local_symbols, get_file_symbols, get_global_symbols): New
4837 functions.
4838 (buildsym_init): Update.
4839
4840 2018-07-20 Tom Tromey <tom@tromey.com>
4841
4842 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4843 (process_full_type_unit): Likewise.
4844 (dwarf2_start_symtab): Set list_in_scope.
4845
4846 2018-07-20 Tom Tromey <tom@tromey.com>
4847
4848 * dwarf2read.c (process_psymtab_comp_unit_reader)
4849 (build_type_psymtabs_reader): Do not set list_in_scope.
4850
4851 2018-07-20 Tom Tromey <tom@tromey.com>
4852
4853 * buildsym.c (free_pendings): Remove.
4854 (add_symbol_to_list, scoped_free_pendings)
4855 (finish_block_internal, buildsym_init): Update.
4856
4857 2018-07-20 Tom Tromey <tom@tromey.com>
4858
4859 * xcoffread.c (read_xcoff_symtab): Update.
4860 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4861 Update.
4862 * dbxread.c (process_one_symbol): Update.
4863 * coffread.c (coff_symtab_read): Update.
4864 * buildsym.h (finish_block): Update.
4865 * buildsym.c (finish_block): Remove "listhead" argument.
4866 (end_symtab_get_static_block): Update.
4867
4868 2018-07-20 Tom Tromey <tom@tromey.com>
4869
4870 * buildsym.h (class scoped_free_pendings): Remove constructor.
4871 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4872 method.
4873 <m_pending_block_obstack, m_pending_blocks>: New members.
4874 (pending_block_obstack, pending_blocks): Remove.
4875 (scoped_free_pendings::scoped_free_pendings): Default.
4876 (~scoped_free_pendings): Update.
4877 (free_pending_blocks): Remove.
4878 (finish_block_internal, record_pending_block, make_blockvector)
4879 (end_symtab_get_static_block, augment_type_symtab, push_context)
4880 (buildsym_init): Update.
4881
4882 2018-07-20 Tom Tromey <tom@tromey.com>
4883
4884 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4885 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4886 members.
4887 (pending_addrmap, pending_addrmap_obstack)
4888 (pending_addrmap_interesting): Remove.
4889 (scoped_free_pendings, record_block_range, make_blockvector)
4890 (prepare_for_building, reset_symtab_globals, buildsym_init):
4891 Update.
4892
4893 2018-07-20 Tom Tromey <tom@tromey.com>
4894
4895 * xcoffread.c (process_linenos): Update.
4896 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4897 * mdebugread.c (psymtab_to_symtab_1): Update.
4898 * dwarf2read.c (setup_type_unit_groups)
4899 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4900 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4901 * dbxread.c (process_one_symbol): Update.
4902 * coffread.c (coff_symtab_read, enter_linenos)
4903 (process_coff_symbol): Update.
4904 * buildsym.h (current_subfile): Don't declare.
4905 (get_current_subfile): Declare.
4906 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4907 member.
4908 (start_subfile, free_buildsym_compunit, push_subfile)
4909 (prepare_for_building, start_symtab): Update.
4910 (get_current_subfile): New function.
4911
4912 2018-07-20 Tom Tromey <tom@tromey.com>
4913
4914 * coffread.c (coff_symtab_read): Update.
4915 * xcoffread.c (read_xcoff_symtab): Update.
4916 * dwarf2read.c (new_symbol): Update.
4917 (read_func_scope, read_lexical_block_scope): Update.
4918 * dbxread.c (process_one_symbol): Update.
4919 * buildsym.h (context_stack, context_stack_depth): Don't declare.
4920 (outermost_context_p): Remove macro.
4921 (outermost_context_p, get_current_context_stack)
4922 (get_context_stack_depth): Declare.
4923 (pop_context): Return struct context_stack.
4924 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4925 member.
4926 (context_stack_size): Remove.
4927 (INITIAL_CONTEXT_STACK_SIZE): Remove.
4928 (prepare_for_building, end_symtab_get_static_block)
4929 (augment_type_symtab, push_context): Update.
4930 (pop_context): Return struct context_stack.
4931 (outermost_context_p, get_current_context_stack)
4932 (get_context_stack_depth): New functions.
4933 (buildsym_init): Update.
4934
4935 2018-07-20 Tom Tromey <tom@tromey.com>
4936
4937 * rust-exp.y: Now a pure parser. Update all rules.
4938 (%union): Move earlier.
4939 (current_parser, work_obstack): Remove globals.
4940 (rust_parser, ~rust_parser): Update.
4941 (class rust_parser) <copy_name, concat3, crate_name, super_name,
4942 lex_character, lex_number, lex_string, lex_identifier,
4943 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4944 convert_name, convert_params_to_expression,
4945 convert_ast_to_expression, ast_basic_type, ast_operation,
4946 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4947 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4948 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4949 ast_array_type, ast_slice_type, ast_reference_type,
4950 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4951 (rust_parse): Update.
4952 (rustyyerror, rustyylex): Add parser parameter.
4953 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4954 (rust_lex_stringish_test, rust_lex_test_sequence)
4955 (rust_lex_test_trailing_dot, rust_lex_test_completion)
4956 (rust_lex_test_push_back, rust_lex_tests): Update.
4957
4958 2018-07-19 Pedro Alves <palves@redhat.com>
4959
4960 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4961 gdb::unique_xmalloc_ptr.
4962 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4963 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4964 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4965 copy-initialization.
4966 * guile/scm-pretty-print.c (ppscm_print_children): Use
4967 gdb::unique_xmalloc_ptr instead of cleanups.
4968 (gdbscm_apply_val_pretty_printer): Remove cleanups.
4969 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4970 gdb::unique_xmalloc_ptr.
4971 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4972 Adjust to use gdb::unique_xmalloc_ptr.
4973 * guile/scm-utils.c (extract_arg): Adjust.
4974 * guile/scm-value.c (gdbscm_value_field): Adjust to use
4975 gdb::unique_xmalloc_ptr instead of a cleanup.
4976
4977 2018-07-19 Tom Tromey <tom@tromey.com>
4978
4979 * utils.c (do_value_free_to_mark)
4980 (make_cleanup_value_free_to_mark): Remove.
4981 * utils.h (make_cleanup_value_free_to_mark): Remove.
4982
4983 2018-07-19 Pedro Alves <palves@redhat.com>
4984
4985 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4986 forwarding reference.
4987
4988 2018-07-18 Pedro Alves <palves@redhat.com>
4989
4990 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4991 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
4992 cleanup.
4993
4994 2018-07-18 Pedro Alves <palves@redhat.com>
4995
4996 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4997 exceptions.
4998 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4999 (gdbscm_wrap): New.
5000 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5001 directly instead of a cleanup.
5002 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5003 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
5004 (vlscm_binop_gdbthrow): New, factored out from ...
5005 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
5006 (vlscm_rich_compare): Use gdbscm_wrap.
5007 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5008 instead of a cleanup.
5009 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5010 cleanup.
5011 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5012 Use xfree directly instead of a cleanup.
5013 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5014 Adjust to use gdbscm_wrap and scoped_value_mark.
5015 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5016 (gdbscm_value_address, gdbscm_value_dereference)
5017 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5018 scoped_value_mark.
5019 (gdbscm_value_dynamic_type): Use scoped_value_mark.
5020 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5021 scoped_value_mark.
5022 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5023 gdbscm_wrap and scoped_value_mark.
5024 (gdbscm_value_to_string): Use xfree directly instead of a
5025 cleanup. Move 'buffer' unique_ptr to TRY scope.
5026 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5027 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
5028 scoped_value_mark.
5029 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5030 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5031 scoped_value_mark.
5032 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5033 gdbscm_wrap.
5034
5035 2018-07-18 Tom de Vries <tdevries@suse.de>
5036
5037 * findvar.c (default_read_var_value): Also resolve dynamic type for
5038 LOC_OPTIMIZED_OUT vars.
5039
5040 2018-07-18 Maciej W. Rozycki <macro@mips.com>
5041
5042 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5043 decoding.
5044
5045 2018-07-17 Tom Tromey <tom@tromey.com>
5046
5047 * guile/scm-param.c (pascm_set_func, pascm_show_func)
5048 (compute_enum_list, pascm_set_param_value_x)
5049 (gdbscm_parameter_value): Update.
5050 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5051 (gdbscm_scm_to_host_string): Update.
5052 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5053 Update.
5054 * guile/scm-cmd.c (cmdscm_add_completion): Update.
5055 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5056 * guile/scm-string.c (gdbscm_scm_to_string): Return
5057 unique_xmalloc_ptr.
5058 (gdbscm_scm_to_host_string): Likewise.
5059
5060 2018-07-17 Tom Tromey <tom@tromey.com>
5061
5062 * guile/guile.c (gdbscm_eval_from_control_command): Update.
5063 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5064 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5065 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5066 unique_xmalloc_ptr.
5067
5068 2018-07-17 Tom Tromey <tom@tromey.com>
5069
5070 * guile/scm-param.c (pascm_signal_setshow_error): Update.
5071 * guile/guile-internal.h (gdbscm_exception_message_to_string):
5072 Update.
5073 * guile/scm-cmd.c (cmdscm_function): Update.
5074 * guile/scm-pretty-print.c
5075 (ppscm_print_exception_unless_memory_error): Update.
5076 * guile/scm-exception.c (gdbscm_exception_message_to_string):
5077 Return unique_xmalloc_ptr.
5078
5079 2018-07-17 Tom Tromey <tom@tromey.com>
5080
5081 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5082 Use string_printf.
5083
5084 2018-07-17 Jim Wilson <jimw@sifive.com>
5085
5086 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5087 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
5088 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
5089 unecessary braces after EF_RISCV_RVC test. Delete call to
5090 set_gdbarch_decr_pc_after_break.
5091
5092 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5093 RISCV_LAST_FP_REGNUM + 1.
5094 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5095
5096 2018-07-17 Tom Tromey <tom@tromey.com>
5097
5098 * configure.ac: Remove --disable-gdbcli.
5099 * configure: Rebuild.
5100 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5101 (SUBDIR_CLI_CFLAGS): Remove.
5102 (SFILES): Use SUBDIR_CLI_SRCS.
5103 (COMMON_OBS): Use SUBDIR_CLI_OBS.
5104
5105 2018-07-17 Tom Tromey <tom@tromey.com>
5106
5107 PR gdb/18624:
5108 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5109
5110 2018-07-16 Jim Wilson <jimw@sifive.com>
5111
5112 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5113
5114 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5115
5116 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5117 variable.
5118 (libunwind_frame_sniffer): Likewise.
5119 (libunwind_frame_prev_register): Likewise.
5120 (libunwind_sigtramp_frame_sniffer): Likewise.
5121 * ia64-tdep.c (ia64_access_reg): Likewise.
5122 (ia64_access_rse_reg): Likewise.
5123 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5124 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5125
5126 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5127
5128 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5129
5130 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5131
5132 * remote-sim.c (gdbsim_target::close,
5133 gdbsim_target::mourn_inferior): Remove unused variables.
5134
5135 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
5136
5137 * ia64-tdep.c (ktab_buf): New global.
5138 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5139 (get_kernel_table): Adjust.
5140
5141 2018-07-16 Tom Tromey <tom@tromey.com>
5142
5143 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5144 * dwarf2read.c (using_directives, new_symbol): Use
5145 outermost_context_p.
5146 * dbxread.c (process_one_symbol): Use outermost_context_p.
5147 * coffread.c (coff_symtab_read): Use outermost_context_p.
5148
5149 2018-07-16 Tom Tromey <tom@tromey.com>
5150
5151 * dwarf2read.c (using_directives, read_func_scope)
5152 (read_lexical_block_scope): Update.
5153 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5154 * buildsym.h (local_using_directives, global_using_directives):
5155 Don't declare.
5156 (get_local_using_directives, set_local_using_directives)
5157 (get_global_using_directives): Declare.
5158 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5159 m_global_using_directives>: New members.
5160 (finish_block_internal, prepare_for_building)
5161 (reset_symtab_globals, end_symtab_get_static_block)
5162 (push_context): Update.
5163 (get_local_using_directives, set_local_using_directives)
5164 (get_global_using_directives): New functions.
5165 (buildsym_init): Update.
5166
5167 2018-07-16 Tom Tromey <tom@tromey.com>
5168
5169 * xcoffread.c (xcoff_initial_scan): Don't call
5170 free_pending_blocks.
5171 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5172 * buildsym.h (class scoped_free_pendings): Add constructor.
5173 (free_pending_blocks): Don't declare.
5174 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5175 (free_pending_blocks): Now static.
5176
5177 2018-07-16 Tom Tromey <tom@tromey.com>
5178
5179 * buildsym.h (push_subfile, pop_subfile): Update declarations.
5180 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5181 member.
5182 (struct subfile_stack): Remove.
5183 (subfile_stack): Remove.
5184 (push_subfile, pop_subfile, buildsym_init): Update.
5185
5186 2018-07-16 Tom Tromey <tom@tromey.com>
5187
5188 * buildsym.c (push_subfile): Use gdb_assert.
5189 (pop_subfile): Use gdb_assert.
5190
5191 2018-07-16 Tom Tromey <tom@tromey.com>
5192
5193 * buildsym.h (merge_symbol_lists): Remove.
5194 * buildsym.c (merge_symbol_lists): Remove.
5195
5196 2018-07-16 Tom Tromey <tom@tromey.com>
5197
5198 * stabsread.c (scan_file_globals): Update comment.
5199 * stabsread.h (scan_file_globals): Move from buildsym.h.
5200 * buildsym.h (scan_file_globals): Move to stabsread.h.
5201
5202 2018-07-16 Tom Tromey <tom@tromey.com>
5203
5204 * xcoffread.c (xcoff_new_init): Update.
5205 * mipsread.c (mipscoff_new_init): Update.
5206 * mdebugread.c (mdebug_build_psymtabs): Update.
5207 * elfread.c (elf_new_init): Update.
5208 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5209 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5210 * buildsym.h (buildsym_new_init): Don't declare.
5211 * buildsym.c (buildsym_new_init): Remove.
5212
5213 2018-07-16 Tom Tromey <tom@tromey.com>
5214
5215 * stabsread.h (within_function): Move from buildsym.h.
5216 * stabsread.c (start_stabs): Clear within_function.
5217 * coffread.c (coff_start_symtab): Clear within_function.
5218 * buildsym.h (within_function): Move to stabsread.h.
5219 * buildsym.c (prepare_for_building): Update.
5220
5221 2018-07-16 Tom Tromey <tom@tromey.com>
5222
5223 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5224 * dwarf2read.c (dwarf2_start_symtab): Don't set
5225 processing_gcc_compilation.
5226 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5227
5228 2018-07-16 Tom Tromey <tom@tromey.com>
5229
5230 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5231 (next_symbol_text_func): Move from buildsym.h.
5232 * stabsread.c (hashname): Move from buildsym.c.
5233 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5234 (next_symbol_text_func, hashname): Move to stabsread.h.
5235 * buildsym.c: Don't include bcache.h
5236 (hashname): Move to stasbread.c.
5237
5238 2018-07-16 Tom Tromey <tom@tromey.com>
5239
5240 * buildsym.h (context_stack_size): Don't declare.
5241 * buildsym.c (context_stack_size): New global.
5242
5243 2018-07-16 Tom Tromey <tom@tromey.com>
5244
5245 * dbxread.c (processing_acc_compilation): New global.
5246 * buildsym.h (processing_acc_compilation): Don't declare.
5247
5248 2018-07-16 Tom Tromey <tom@tromey.com>
5249
5250 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5251 * dbxread.c (read_ofile_symtab): Update.
5252 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5253 * buildsym.h (last_source_start_addr): Remove.
5254 (set_last_source_start_addr, get_last_source_start_addr):
5255 Declare.
5256 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5257 parameter.
5258 (struct buildsym_compunit) <m_last_source_start_addr>: New
5259 member.
5260 (prepare_for_building): Remove start_addr parameter.
5261 (start_symtab, restart_symtab, end_symtab_get_static_block)
5262 (end_symtab_with_blockvector): Update.
5263 (set_last_source_start_addr, get_last_source_start_addr): New
5264 functions.
5265
5266 2018-07-16 Tom Tromey <tom@tromey.com>
5267
5268 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5269 member.
5270 (have_line_numbers): Remove.
5271 (record_line, prepare_for_building, end_symtab_get_static_block)
5272 (augment_type_symtab): Update.
5273
5274 2018-07-16 Tom Tromey <tom@tromey.com>
5275
5276 * buildsym.c (~buildsym_compunit): Free the macro table.
5277 (struct buildsym_compunit) <get_macro_table, release_macros>: New
5278 methods.
5279 <m_pending_macros>: New member.
5280 (pending_macros): Remove.
5281 (~scoped_free_pendings, get_macro_table, prepare_for_building)
5282 (reset_symtab_globals, end_symtab_get_static_block)
5283 (end_symtab_with_blockvector, augment_type_symtab)
5284 (buildsym_init): Update.
5285
5286 2018-07-16 Tom Tromey <tom@tromey.com>
5287
5288 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5289 parameter.
5290 (buildsym_compunit::set_last_source_file): New method.
5291 <m_last_source_file>: New member.
5292 (prepare_for_building): Remove "name" parameter.
5293 (start_symtab, restart_symtab, reset_symtab_globals): Update.
5294 (last_source_file): Remove.
5295 (set_last_source_file, get_last_source_file): Update.
5296
5297 2018-07-16 Tom Tromey <tom@tromey.com>
5298
5299 * buildsym.c (prepare_for_building): Add assert.
5300
5301 2018-07-16 Tom Tromey <tom@tromey.com>
5302
5303 * buildsym.c (~buildsym_compunit): Update.
5304 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5305 (start_subfile, patch_subfile_names)
5306 (end_symtab_with_blockvector): Update.
5307
5308 2018-07-16 Tom Tromey <tom@tromey.com>
5309
5310 * buildsym.c (struct buildsym_compunit): Add constructor,
5311 destructor, initializers.
5312 (start_buildsym_compunit): Remove.
5313 (free_buildsym_compunit): Use "delete".
5314 (start_symtab, restart_symtab): Use "new".
5315
5316 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
5317
5318 * symfile.c (set_objfile_default_section_offset): Remove struct
5319 keyword.
5320
5321 2018-07-14 Stafford Horne <shorne@gmail.com>
5322
5323 * (Responsible Maintainers): Add myself as or1k maintainer.
5324
5325 2018-07-13 Tom Tromey <tom@tromey.com>
5326
5327 * symfile.c (set_objfile_default_section_offset): Use extra braces
5328 around initializer.
5329
5330 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5331
5332 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5333 non-branching basr.
5334
5335 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5336
5337 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5338 unittests/cli-utils-selftests.c
5339 * unittests/cli-utils-selftests.c: New file.
5340
5341 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5342
5343 * NEWS: Mention new commands. Mention change to 'thread apply'.
5344
5345 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5346
5347 * thread.c (thr_try_catch_cmd): New function.
5348 (thread_apply_all_command): Handle qcs flags.
5349 (thread_apply_command): Handle qcs flags.
5350 (taas_command): New function.
5351 (tfaas_command): New function.
5352 (_initialize_thread): Update to setup the new commands 'taas
5353 and 'tfaas'. Change doc string for 'thread apply'.
5354
5355 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5356
5357 * stack.c: (trailing_outermost_frame): New function, mostly
5358 extracted from backtrace_command_1.
5359 (leading_innermost_frame): New function.
5360 (backtrace_command_1): Update to call trailing_outermost_frame.
5361 (frame_apply_command_count): New function.
5362 (frame_apply_level_command): New function.
5363 (frame_apply_all_command): New function.
5364 (frame_apply_command): New function.
5365 (faas_command): New function.
5366 (frame_cmd_list): New variable.
5367 (_initialize_stack): Update to setup the new commands 'frame apply'
5368 and 'faas'.
5369
5370 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5371
5372 * cli-utils.c (number_or_range_parser::get_number): Only handle
5373 numbers or convenience var as numbers.
5374 (parse_flags): New function.
5375 (parse_flags_qcs): New function.
5376 (number_or_range_parser::finished): Ensure parsing end is detected
5377 before end of string.
5378 * cli-utils.h (parse_flags): New function.
5379 (parse_flags_qcs): New function.
5380 (number_or_range_parser): Remove m_finished bool.
5381 (number_or_range_parser::skip_range): Set m_in_range to false.
5382
5383 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
5384
5385 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5386 on Windows.
5387
5388 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5389 Jan Kratochvil <jan.kratochvil@redhat.com>
5390 Paul Fertser <fercerpav@gmail.com>
5391 Tsutomu Seki <sekiriki@gmail.com>
5392 Pedro Alves <palves@redhat.com>
5393
5394 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5395 'unittests/parse-connection-spec-selftests.c'.
5396 (COMMON_SFILES): Add 'common/netstuff.c'.
5397 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5398 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5399 * common/netstuff.c: New file.
5400 * common/netstuff.h: New file.
5401 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5402 (wait_for_connect): Update comment. New parameter
5403 'gdb::optional<int> sock' instead of 'struct serial *scb'.
5404 Use 'sock' directly instead of 'scb->fd'.
5405 (try_connect): New function, with code from 'net_open'.
5406 (net_open): Rewrite main loop to deal with multiple
5407 sockets/addresses. Handle IPv6-style hostnames; implement
5408 support for IPv6 connections.
5409 * unittests/parse-connection-spec-selftests.c: New file.
5410
5411 2018-07-11 Pedro Alves <palves@redhat.com>
5412
5413 PR gdb/23377
5414 * remote.c (remote_target::remote_detach_pid): Call
5415 set_current_process.
5416
5417 2018-07-11 Pedro Alves <palves@redhat.com>
5418
5419 * h8300-tdep.c (h8300_gdbarch_init): Remove
5420 set_gdbarch_ecoff_reg_to_regnum calls.
5421
5422 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5423
5424 PR c++/23373
5425 * c-typeprint.c (c_type_print_base_struct_union): Don't print
5426 offsets/sizes for static members of a class/struct.
5427
5428 2018-07-11 Alan Hayward <alan.hayward@arm.com>
5429
5430 * target-descriptions.c (tdesc_register_bitsize): Rename.
5431 * target-descriptions.h (tdesc_register_bitsize): Likewise.
5432 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5433 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5434
5435 2018-07-10 Tom Tromey <tom@tromey.com>
5436
5437 * breakpoint.c (moribund_locations): Now static and a
5438 std::vector.
5439 (breakpoint_init_inferior, moribund_breakpoint_here_p)
5440 (build_bpstat_chain, update_global_location_list)
5441 (breakpoint_retire_moribund): Update.
5442 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
5443 VEC.
5444
5445 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5446
5447 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5448 (riscv_register_reggroup_p): Use new function, remove unneeded
5449 parenthesis.
5450 (riscv_push_dummy_call): Extend assert to compare against xlen or
5451 flen based on register type.
5452
5453 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5454
5455 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5456
5457 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
5458
5459 * remote.c (show_hardware_watchpoint_limit): New function.
5460 (show_hardware_watchpoint_length_limit): New function.
5461 (show_hardware_breakpoint_limit): New function.
5462 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5463 where appropriate, update help text.
5464
5465 2018-07-09 Tom Tromey <tom@tromey.com>
5466
5467 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5468 (CLIBS): Don't mention NAT_CLIBS.
5469
5470 2018-07-09 Tom Tromey <tom@tromey.com>
5471
5472 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5473 (LIBGDB_OBS, clean mostlyclean): Update.
5474 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5475
5476 2018-07-09 Tom Tromey <tom@tromey.com>
5477
5478 * Makefile.in (%.c: %.y): Use ECHO_YACC.
5479 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
5480 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5481
5482 2018-07-09 Tom Tromey <tom@tromey.com>
5483
5484 * Makefile.in (ALLDEPFILES): Remove exec.c.
5485 (COMMON_OBS): Remove exec.o.
5486 (COMMON_SFILES): Add exec.c.
5487
5488 2018-07-09 Tom Tromey <tom@tromey.com>
5489
5490 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5491
5492 2018-07-09 Tom Tromey <tom@tromey.com>
5493
5494 * Makefile.in (clean mostlyclean): Remove stamp-version.
5495 (version.c): Depend on stamp-version.
5496 (stamp-version): New rule, from version.c rule.
5497
5498 2018-07-09 Tom Tromey <tom@tromey.com>
5499
5500 * Makefile.in (init.c): Depend on stamp-init.
5501 (stamp-init): New rule, from init.c rule.
5502 (clean mostlyclean): Remove stamp-init.
5503
5504 2018-07-09 Tom Tromey <tom@tromey.com>
5505
5506 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5507 SUBDIR_GCC_COMPILE_SRCS.
5508
5509 2018-07-09 Tom Tromey <tom@tromey.com>
5510
5511 * Makefile.in (init.c): Remove some unused sed rules.
5512
5513 2018-07-09 Tom Tromey <tom@tromey.com>
5514
5515 * Makefile.in (TSOBS): Remove.
5516 (INIT_FILES): Update.
5517 (LIBGDB_OBS): Update.
5518 (COMMON_SFILES): Add inflow.c.
5519 (SFILES): Remove inflow.c.
5520
5521 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5522
5523 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5524
5525 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
5526
5527 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5528 get_saveloc_name, is_signal_frame_name, step_name,
5529 init_remote_name, create_addr_space_name,
5530 destroy_addr_space_name, search_unwind_table_name,
5531 find_dyn_list_name): Constify.
5532
5533 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
5534
5535 * darwin-nat.c (darwin_pthread_kill): New function.
5536 (darwin_resume_thread): Use darwin_pthread_kill.
5537
5538 2018-07-05 Tom de Vries <tdevries@suse.de>
5539
5540 * macroexp.c (macro_buffer) <operator=>: New member function.
5541
5542 2018-07-04 Tom Tromey <tom@tromey.com>
5543
5544 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5545
5546 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
5547
5548 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5549 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5550 * maint.c: Likewise.
5551 * top.c: Likewise.
5552
5553 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5554
5555 * NEWS: Create a new section for the next release branch.
5556 Rename the section of the current branch, now that it has
5557 been cut.
5558
5559 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5560
5561 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5562 * version.in: Bump version to 8.2.50.DATE-git.
5563
5564 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5565 Pedro Alves <palves@redhat.com>
5566
5567 * linux-nat.c (linux_init_ptrace): Rename to ...
5568 (linux_init_ptrace_procfs): ... this. Call
5569 linux_proc_init_warnings.
5570 (linux_nat_target::post_attach)
5571 (linux_nat_target::post_startup_inferior): Adjust.
5572 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5573 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5574
5575 2018-07-04 Tom de Vries <tdevries@suse.de>
5576
5577 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5578 check ...
5579 (read_comp_unit_head): ... here.
5580
5581 2018-07-03 Tom Tromey <tom@tromey.com>
5582
5583 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5584 (stop_tracing, tstatus_command)
5585 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5586 (print_one_static_tracepoint_marker): Update.
5587 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5588 std::vector.
5589 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
5590 VEC.
5591 (all_tracepoints, static_tracepoints_here): Return std::vector.
5592
5593 2018-07-03 Tom Tromey <tom@tromey.com>
5594
5595 * common/ptid.c (ptid_equal): Remove.
5596 * common/ptid.h (ptid_equal): Don't declare.
5597 * ada-tasks.c: Update.
5598 * breakpoint.c: Update.
5599 * common/agent.c: Update.
5600 * corelow.c: Update.
5601 * darwin-nat-info.c: Update.
5602 * darwin-nat.c: Update.
5603 * dcache.c: Update.
5604 * dtrace-probe.c: Update.
5605 * dummy-frame.c: Update.
5606 * fbsd-nat.c: Update.
5607 * frame.c: Update.
5608 * gdbthread.h: Update.
5609 * gnu-nat.c: Update.
5610 * go32-nat.c: Update.
5611 * inf-loop.c: Update.
5612 * inf-ptrace.c: Update.
5613 * infcall.c: Update.
5614 * infcmd.c: Update.
5615 * inflow.c: Update.
5616 * infrun.c: Update.
5617 * linux-fork.c: Update.
5618 * linux-nat.c: Update.
5619 * linux-thread-db.c: Update.
5620 * mi/mi-cmd-var.c: Update.
5621 * mi/mi-interp.c: Update.
5622 * mi/mi-main.c: Update.
5623 * nto-procfs.c: Update.
5624 * ppc-linux-tdep.c: Update.
5625 * procfs.c: Update.
5626 * python/py-inferior.c: Update.
5627 * python/py-record-btrace.c: Update.
5628 * python/py-record.c: Update.
5629 * ravenscar-thread.c: Update.
5630 * regcache.c: Update.
5631 * remote-sim.c: Update.
5632 * remote.c: Update.
5633 * sol-thread.c: Update.
5634 * solib.c: Update.
5635 * target.c: Update.
5636 * tui/tui-stack.c: Update.
5637 * varobj.c: Update.
5638 * windows-nat.c: Update.
5639 * windows-tdep.c: Update.
5640
5641 2018-07-03 Tom Tromey <tom@tromey.com>
5642
5643 * common/ptid.c (ptid_match): Remove.
5644 * common/ptid.h (ptid_match): Don't declare.
5645 * fbsd-nat.c: Update.
5646 * infcmd.c: Update.
5647 * infrun.c: Update.
5648 * linux-nat.c: Update.
5649 * record-btrace.c: Update.
5650 * regcache.c: Update.
5651 * remote.c: Update.
5652
5653 2018-07-03 Tom Tromey <tom@tromey.com>
5654
5655 * common/ptid.c (ptid_tid_p): Remove.
5656 * common/ptid.h (ptid_tid_p): Don't declare.
5657 * sol-thread.c: Update.
5658
5659 2018-07-03 Tom Tromey <tom@tromey.com>
5660
5661 * common/ptid.c (ptid_lwp_p): Remove.
5662 * common/ptid.h (ptid_lwp_p): Don't declare.
5663 * fbsd-nat.c: Update.
5664 * linux-nat.c: Update.
5665 * nat/linux-procfs.c: Update.
5666 * nat/x86-linux-dregs.c: Update.
5667 * sol-thread.c: Update.
5668
5669 2018-07-03 Tom Tromey <tom@tromey.com>
5670
5671 * common/ptid.c (ptid_is_pid): Remove.
5672 * common/ptid.h (ptid_is_pid): Don't declare.
5673 * infrun.c: Update.
5674 * linux-nat.c: Update.
5675 * mi/mi-interp.c: Update.
5676 * remote.c: Update.
5677 * thread.c: Update.
5678
5679 2018-07-03 Tom Tromey <tom@tromey.com>
5680
5681 * common/ptid.c (ptid_get_tid): Remove.
5682 * common/ptid.h (ptid_get_tid): Don't declare.
5683 * ada-tasks.c: Update.
5684 * aix-thread.c: Update.
5685 * bsd-uthread.c: Update.
5686 * darwin-nat.c: Update.
5687 * fbsd-nat.c: Update.
5688 * i386-darwin-nat.c: Update.
5689 * infrun.c: Update.
5690 * linux-tdep.c: Update.
5691 * nto-procfs.c: Update.
5692 * ppc-ravenscar-thread.c: Update.
5693 * python/py-infthread.c: Update.
5694 * ravenscar-thread.c: Update.
5695 * sol-thread.c: Update.
5696 * sparc-ravenscar-thread.c: Update.
5697 * windows-nat.c: Update.
5698
5699 2018-07-03 Tom Tromey <tom@tromey.com>
5700
5701 * common/ptid.c (ptid_get_lwp): Remove.
5702 * common/ptid.h (ptid_get_lwp): Don't declare.
5703 * aarch64-linux-nat.c: Update.
5704 * ada-tasks.c: Update.
5705 * aix-thread.c: Update.
5706 * amd64-linux-nat.c: Update.
5707 * arm-linux-nat.c: Update.
5708 * corelow.c: Update.
5709 * fbsd-nat.c: Update.
5710 * fbsd-tdep.c: Update.
5711 * gnu-nat.c: Update.
5712 * i386-cygwin-tdep.c: Update.
5713 * i386-gnu-nat.c: Update.
5714 * i386-linux-nat.c: Update.
5715 * ia64-linux-nat.c: Update.
5716 * inf-ptrace.c: Update.
5717 * infrun.c: Update.
5718 * linux-fork.c: Update.
5719 * linux-nat.c: Update.
5720 * linux-tdep.c: Update.
5721 * linux-thread-db.c: Update.
5722 * mips-linux-nat.c: Update.
5723 * nat/aarch64-linux-hw-point.c: Update.
5724 * nat/aarch64-linux.c: Update.
5725 * nat/linux-btrace.c: Update.
5726 * nat/linux-osdata.c: Update.
5727 * nat/linux-procfs.c: Update.
5728 * nat/x86-linux-dregs.c: Update.
5729 * obsd-nat.c: Update.
5730 * ppc-fbsd-nat.c: Update.
5731 * ppc-linux-nat.c: Update.
5732 * procfs.c: Update.
5733 * python/py-infthread.c: Update.
5734 * ravenscar-thread.c: Update.
5735 * remote.c: Update.
5736 * s390-linux-nat.c: Update.
5737 * sol-thread.c: Update.
5738 * sol2-tdep.c: Update.
5739 * spu-linux-nat.c: Update.
5740 * x86-linux-nat.c: Update.
5741 * xtensa-linux-nat.c: Update.
5742
5743 2018-07-03 Tom Tromey <tom@tromey.com>
5744
5745 * common/ptid.c (ptid_get_pid): Remove.
5746 * common/ptid.h (ptid_get_pid): Don't declare.
5747 * aarch64-linux-nat.c: Update.
5748 * ada-lang.c: Update.
5749 * aix-thread.c: Update.
5750 * alpha-bsd-nat.c: Update.
5751 * amd64-fbsd-nat.c: Update.
5752 * amd64-linux-nat.c: Update.
5753 * arm-linux-nat.c: Update.
5754 * arm-nbsd-nat.c: Update.
5755 * auxv.c: Update.
5756 * break-catch-syscall.c: Update.
5757 * breakpoint.c: Update.
5758 * bsd-uthread.c: Update.
5759 * corelow.c: Update.
5760 * ctf.c: Update.
5761 * darwin-nat.c: Update.
5762 * fbsd-nat.c: Update.
5763 * fbsd-tdep.c: Update.
5764 * gcore.c: Update.
5765 * gnu-nat.c: Update.
5766 * hppa-nbsd-nat.c: Update.
5767 * hppa-obsd-nat.c: Update.
5768 * i386-fbsd-nat.c: Update.
5769 * ia64-linux-nat.c: Update.
5770 * inf-ptrace.c: Update.
5771 * infcmd.c: Update.
5772 * inferior.c: Update.
5773 * inferior.h: Update.
5774 * inflow.c: Update.
5775 * infrun.c: Update.
5776 * linux-fork.c: Update.
5777 * linux-nat.c: Update.
5778 * linux-tdep.c: Update.
5779 * linux-thread-db.c: Update.
5780 * m68k-bsd-nat.c: Update.
5781 * mi/mi-interp.c: Update.
5782 * mi/mi-main.c: Update.
5783 * mips-linux-nat.c: Update.
5784 * mips-nbsd-nat.c: Update.
5785 * mips64-obsd-nat.c: Update.
5786 * nat/aarch64-linux-hw-point.c: Update.
5787 * nat/aarch64-linux.c: Update.
5788 * nat/linux-btrace.c: Update.
5789 * nat/linux-osdata.c: Update.
5790 * nat/linux-procfs.c: Update.
5791 * nat/x86-linux-dregs.c: Update.
5792 * nto-procfs.c: Update.
5793 * obsd-nat.c: Update.
5794 * ppc-linux-nat.c: Update.
5795 * ppc-nbsd-nat.c: Update.
5796 * ppc-obsd-nat.c: Update.
5797 * proc-service.c: Update.
5798 * procfs.c: Update.
5799 * python/py-inferior.c: Update.
5800 * python/py-infthread.c: Update.
5801 * ravenscar-thread.c: Update.
5802 * record.c: Update.
5803 * remote-sim.c: Update.
5804 * remote.c: Update.
5805 * rs6000-nat.c: Update.
5806 * s390-linux-nat.c: Update.
5807 * sh-nbsd-nat.c: Update.
5808 * sol-thread.c: Update.
5809 * sparc-nat.c: Update.
5810 * sparc64-tdep.c: Update.
5811 * spu-linux-nat.c: Update.
5812 * spu-tdep.c: Update.
5813 * target-debug.h: Update.
5814 * target.c: Update.
5815 * thread.c: Update.
5816 * tid-parse.c: Update.
5817 * tracefile-tfile.c: Update.
5818 * vax-bsd-nat.c: Update.
5819 * windows-nat.c: Update.
5820 * x86-linux-nat.c: Update.
5821 * x86-nat.c: Update.
5822
5823 2018-07-03 Tom Tromey <tom@tromey.com>
5824
5825 * common/ptid.c (pid_to_ptid): Remove.
5826 * common/ptid.h (pid_to_ptid): Don't declare.
5827 * aix-thread.c: Update.
5828 * arm-linux-nat.c: Update.
5829 * common/ptid.c: Update.
5830 * common/ptid.h: Update.
5831 * corelow.c: Update.
5832 * ctf.c: Update.
5833 * darwin-nat.c: Update.
5834 * fbsd-nat.c: Update.
5835 * fork-child.c: Update.
5836 * gnu-nat.c: Update.
5837 * go32-nat.c: Update.
5838 * inf-ptrace.c: Update.
5839 * infcmd.c: Update.
5840 * inferior.c: Update.
5841 * infrun.c: Update.
5842 * linux-fork.c: Update.
5843 * linux-nat.c: Update.
5844 * nat/aarch64-linux-hw-point.c: Update.
5845 * nat/fork-inferior.c: Update.
5846 * nat/x86-linux-dregs.c: Update.
5847 * nto-procfs.c: Update.
5848 * obsd-nat.c: Update.
5849 * procfs.c: Update.
5850 * progspace.c: Update.
5851 * remote.c: Update.
5852 * rs6000-nat.c: Update.
5853 * s390-linux-nat.c: Update.
5854 * sol-thread.c: Update.
5855 * spu-linux-nat.c: Update.
5856 * target.c: Update.
5857 * top.c: Update.
5858 * tracefile-tfile.c: Update.
5859 * windows-nat.c: Update.
5860
5861 2018-07-03 Tom Tromey <tom@tromey.com>
5862
5863 * common/ptid.h (ptid_build): Don't declare.
5864 * common/ptid.c (ptid_build): Remove.
5865 * aix-thread.c: Update.
5866 * bsd-kvm.c: Update.
5867 * bsd-uthread.c: Update.
5868 * common/agent.c: Update.
5869 * common/ptid.c: Update.
5870 * common/ptid.h: Update.
5871 * corelow.c: Update.
5872 * darwin-nat.c: Update.
5873 * fbsd-nat.c: Update.
5874 * gnu-nat.c: Update.
5875 * linux-fork.c: Update.
5876 * linux-nat.c: Update.
5877 * linux-thread-db.c: Update.
5878 * nat/linux-osdata.c: Update.
5879 * nat/linux-procfs.c: Update.
5880 * nto-procfs.c: Update.
5881 * obsd-nat.c: Update.
5882 * proc-service.c: Update.
5883 * procfs.c: Update.
5884 * ravenscar-thread.c: Update.
5885 * remote-sim.c: Update.
5886 * remote.c: Update.
5887 * sol-thread.c: Update.
5888 * target.c: Update.
5889 * windows-nat.c: Update.
5890
5891 2018-07-03 Tom Tromey <tom@tromey.com>
5892
5893 * infrun.c (follow_exec): Use exit_inferior_silent.
5894 * inferior.c (exit_inferior_num_silent): Remove.
5895 * inferior.h (exit_inferior_num_silent): Don't declare.
5896
5897 2018-07-03 Tom Tromey <tom@tromey.com>
5898
5899 PR cli/23340:
5900 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5901 inferior_ptid on error.
5902
5903 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5904 Simon Marchi <simon.marchi@polymtl.ca>
5905
5906 PR tdep/8282
5907 * disasm.h (gdb_disassembler): Add
5908 `m_disassembler_options_holder'. member
5909 * disasm.c (get_all_disassembler_options): New function.
5910 (gdb_disassembler::gdb_disassembler): Use it.
5911 (gdb_buffered_insn_length_init_dis): Likewise.
5912 (gdb_buffered_insn_length): Adjust accordingly.
5913 (set_disassembler_options): Handle options with arguments.
5914 (show_disassembler_options_sfunc): Likewise. Add a leading new
5915 line if showing options with descriptions.
5916 (disassembler_options_completer): Adapt to using the
5917 `disasm_options_and_args_t' structure.
5918 * mips-tdep.c (mips_disassembler_options): New variable.
5919 (mips_disassembler_options_o32): Likewise.
5920 (mips_disassembler_options_n32): Likewise.
5921 (mips_disassembler_options_n64): Likewise.
5922 (gdb_print_insn_mips): Don't set `disassembler_options'.
5923 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5924 functions.
5925 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5926 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
5927 `gdbarch_disassembler_options_implicit' and
5928 `gdbarch_valid_disassembler_options'.
5929 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5930 `disasm_options_and_args_t' structure.
5931 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5932 method.
5933 (valid_disassembler_options): Switch from `disasm_options_t' to
5934 the `disasm_options_and_args_t' structure.
5935 * NEWS: Document `set disassembler-options' support for the MIPS
5936 target.
5937 * gdbarch.h: Regenerate.
5938 * gdbarch.c: Regenerate.
5939
5940 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
5941
5942 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5943
5944 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5945
5946 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5947 parameter in call to amd64_target_description.
5948 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5949 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5950 (amd64fbsd_init_abi): Likewise.
5951 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5952 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5953 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5954 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5955
5956 2018-06-29 Pedro Alves <palves@redhat.com>
5957
5958 * gdb/amd64-tdep.h (amd64_create_target_description): Add
5959 "segments" parameter.
5960 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5961 (_initialize_amd64_tdep): Update call to
5962 amd64_create_target_description.
5963 (amd64_target_description): Add "segments" parameter. Adjust
5964 the implementation to use it.
5965 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5966 call to amd64_create_target_description.
5967 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5968 * gdb/arch/amd64.h (amd64_create_target_description): Add
5969 "segments" register.
5970 * gdb/arch/amd64.c (amd64_create_target_description): Add
5971 "segments" parameter. Call create_feature_i386_64bit_segments
5972 only if SEGMENTS is true.
5973 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5974 call to amd64_create_target_description.
5975
5976 2018-06-29 Pedro Alves <palves@redhat.com>
5977
5978 * thread.c (thread_target_id_str): New, factored out from ...
5979 (print_thread_info_1): ... here. Use it to compute the max
5980 "Target Id" column width.
5981
5982 2018-06-29 Pedro Alves <palves@redhat.com>
5983
5984 * remote.c (remote_target::extra_thread_info): Delete
5985 'display_buf' and 'n' locals. from the cache, regardless of
5986 packet mechanims is in use. Use cache for qThreadExtra and qP
5987 methods too.
5988
5989 2018-06-29 Pedro Alves <palves@redhat.com>
5990
5991 * blockframe.c (find_pc_sect_containing_function): New function.
5992 * breakpoint.c (print_breakpoint_location): Don't call
5993 find_pc_sect_function.
5994 * linespec.c (create_sals_line_offset): Record the location's
5995 symbol in the sal.
5996 * linespec.c (convert_address_location_to_sals): Fill in sal's
5997 symbol with find_pc_sect_containing_function.
5998 * symtab.c (find_function_start_sal): Rename to ...
5999 (find_function_start_sal_1): ... this.
6000 (find_function_start_sal): Reimplement as wrapper around
6001 find_function_start_sal_1, and use
6002 find_pc_sect_containing_function to fill in the sal's symbol.
6003 (find_function_start_sal(symbol*, bool)): Adjust.
6004 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6005 comments.
6006 (find_pc_sect_containing_function): Declare.
6007
6008 2018-06-29 Pedro Alves <palves@redhat.com>
6009
6010 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6011 true if the the location has no symbol.
6012
6013 2018-06-28 Tom Tromey <tom@tromey.com>
6014
6015 * NEWS: Mention --enable-codesign.
6016 * silent-rules.mk (ECHO_SIGN): New variable.
6017 * configure.ac: Add --enable-codesign.
6018 * configure: Rebuild.
6019 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6020 (gdb$(EXEEXT)): Optionally invoke codesign.
6021
6022 2018-06-28 Pedro Alves <palves@redhat.com>
6023
6024 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6025 comments.
6026 (switch_to_thread_no_regs): Adjust comment.
6027 * infcmd.c (stop_pc): Delete.
6028 (post_create_inferior, info_program_command): Replace references
6029 to stop_pc with references to thread_info->suspend.stop_pc.
6030 * inferior.h (stop_pc): Delete declaration.
6031 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6032 (handle_inferior_event_1, handle_signal_stop)
6033 (process_event_stop_test, keep_going_stepped_thread)
6034 (handle_step_into_function, handle_step_into_function_backward)
6035 (print_stop_location): Replace references to stop_pc with
6036 references to thread_info->suspend.stop_pc.
6037 (struct infcall_suspend_state) <stop_pc>: Delete field.
6038 (save_infcall_suspend_state, restore_infcall_suspend_state):
6039 Remove references to inf_stat->stop_pc.
6040 * linux-fork.c (fork_load_infrun_state): Likewise.
6041 * record-btrace.c (record_btrace_set_replay): Likewise.
6042 * record-full.c (record_full_goto_entry): Likewise.
6043 * remote.c (print_one_stopped_thread): Likewise.
6044 * target.c (target_resume): Extend comment.
6045 * thread.c (set_executing_thread): New.
6046 (set_executing): Use it.
6047 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6048 Remove references to stop_pc.
6049
6050 2018-06-28 Pedro Alves <palves@redhat.com>
6051
6052 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6053 Moving fetching stop_pc until after ecs->event_thread is refreshed.
6054
6055 2018-06-28 Tom Tromey <tom@tromey.com>
6056
6057 * coffread.c (coff_symfile_finish): Update.
6058 * xcoffread.c (xcoff_symfile_finish): Update.
6059 * elfread.c (elf_symfile_finish): Update.
6060 * symfile.h (dwarf2_free_objfile): Don't declare.
6061 * dwarf2read.c (_initialize_dwarf2_read): Use
6062 register_objfile_data_with_cleanup.
6063 (dwarf2_free_objfile): Now static. Change signature.
6064
6065 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6066
6067 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6068 option "-o" to add-symbol-file-load to add an offset to each
6069 section's load address.
6070 * symfile.c (set_objfile_default_section_offset): New function.
6071
6072 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6073
6074 * symfile.c (add_symbol_file_command): Make sure that sections
6075 with the same name are sorted in the same order.
6076
6077 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6078
6079 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6080 require the second argument. If omitted, load sections at the
6081 addresses specified in the file.
6082
6083 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6084
6085 * symfile.c (symbol_file_command, symbol_file_add_main_1)
6086 (_initialize_symfile): Add option "-o" to symbol-file to add an
6087 offset to each section of the symbol file.
6088
6089 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6090
6091 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6092
6093 2018-06-27 Tom Tromey <tom@tromey.com>
6094
6095 * stack.c (_initialize_stack): Update "func" help text.
6096
6097 2018-06-27 Tom Tromey <tom@tromey.com>
6098
6099 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6100 std::vector.
6101 (unwind_infopy_str, pyuw_create_unwind_info)
6102 (unwind_infopy_add_saved_register, pyuw_sniffer)
6103 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6104 Update.
6105 (struct saved_reg): Add constructor.
6106 <value>: Now a gdbpy_ref<>.
6107
6108 2018-06-27 Tom Tromey <tom@tromey.com>
6109
6110 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6111
6112 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6113
6114 * gdb-gdb.py.in: Format using autopep8.
6115
6116 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6117
6118 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6119 (type_lookup_function): Recognize CORE_ADDR values.
6120
6121 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6122
6123 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6124 print tag_name.
6125
6126 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6127
6128 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6129 <__lt__>: Add.
6130
6131 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6132
6133 * gdb-gdb.py: Move to...
6134 * gdb-gdb.py.in: ... here.
6135 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6136 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6137 dependencies.
6138 (distclean): Remove gdb-gdb.py when cleaning.
6139 (gdb-gdb.py, gdb-gdb.gdb): New rules.
6140 * configure: Re-generate.
6141
6142 2018-06-27 Pedro Alves <palves@redhat.com>
6143
6144 * proc-service.c (get_ps_regcache): New.
6145 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6146 (ps_lsetfpregs): Use it.
6147
6148 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
6149
6150 PR gdb/21695
6151 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6152 (dwarf_decode_lines_1): Adjust.
6153
6154 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6155
6156 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6157 override.
6158 <info_proc>: Likewise.
6159
6160 2018-06-26 Joel Brobecker <brobecker@adacore.com>
6161
6162 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6163 to windows_fetch_one_register, and only handle the case of
6164 fetching one register. Move the code that reloads the context
6165 and iterates over all registers if R is negative to...
6166 (windows_nat_target::fetch_registers): ... here.
6167 (do_windows_store_inferior_registers): Rename to
6168 windows_store_one_register, and only handle the case of storing
6169 one register. Move the code that handles the case where r is
6170 negative to...
6171 (windows_nat_target::store_registers) ... here.
6172
6173 2018-06-26 Tom Tromey <tom@tromey.com>
6174
6175 PR rust/22574:
6176 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6177 * rust-lang.c (rust_print_struct_def): Add podata parameter.
6178 Update.
6179 (rust_internal_print_type): Add podata parameter.
6180 (rust_print_type): Update.
6181
6182 2018-06-26 Tom Tromey <tom@tromey.com>
6183
6184 * typeprint.h (struct print_offset_data) <update, finish,
6185 maybe_print_hole>: New methods.
6186 <indentation>: New constant.
6187 * typeprint.c (print_offset_data::indentation): Define.
6188 (print_offset_data::maybe_print_hole, print_offset_data::update)
6189 (print_offset_data::finish): Move from c-typeprint.c and rename.
6190 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6191 (print_spaces_filtered_with_print_options): Update.
6192 (c_print_type_union_field_offset, maybe_print_hole)
6193 (c_print_type_struct_field_offset): Move to typeprint.c and
6194 rename.
6195 (c_type_print_base_struct_union): Update.
6196
6197 2018-06-25 Pedro Alves <palves@redhat.com>
6198
6199 * gdbthread.h (thread_info_ref, delete_thread)
6200 (delete_thread_silent, first_thread_of_inferior)
6201 (any_thread_of_inferior, switch_to_thread)
6202 (enable_thread_stack_temporaries)
6203 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6204 (get_last_thread_stack_temporary)
6205 (value_in_thread_stack_temporaries, can_access_registers_thread):
6206 Spell out "struct thread_info" instead of just "thread_info".
6207 * inferior.h (notice_new_inferior): Likewise.
6208
6209 2018-06-25 Pedro Alves <palves@redhat.com>
6210
6211 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6212 pass thread_info pointer to delete_thread.
6213 (windows_nat_target::detach): Pass inferior pointer to
6214 detach_inferior.
6215 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6216 delete_thread.
6217 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6218 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6219 and pass a thread_info pointer to delete_thread.
6220 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6221 pass thread_info pointer to delete_thread.
6222 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6223 delete_thread_silent call.
6224 * procfs.c (procfs_target::detach): Pass inferior pointer to
6225 detach_inferior.
6226 (procfs_target::wait): Pass thread_info pointer to delete_thread.
6227 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6228 delete_thread_silent call.
6229 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6230 pass thread_info pointer to delete_thread.
6231 (windows_nat_target::detach): Pass inferior pointer to
6232 delete_inferior.
6233
6234 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6235
6236 * regcache.c (readable_regcache::read_part): Fix asserts.
6237 (reg_buffer::raw_collect_part): New function.
6238 (regcache::write_part): Fix asserts.
6239 (reg_buffer::raw_supply_part): New function.
6240 (regcache::transfer_regset_register): New helper function.
6241 (regcache::transfer_regset): Call new functions.
6242 (regcache_supply_regset): Use gdb_byte*.
6243 (regcache::supply_regset): Likewise.
6244 (regcache_collect_regset): Likewise.
6245 (regcache::collect_regset): Likewise.
6246 * regcache.h (reg_buffer::raw_collect_part): New declaration.
6247 (reg_buffer::raw_supply_part): Likewise.
6248 (regcache::transfer_regset_register): Likewise.
6249 (regcache::transfer_regset): Use gdb_byte*.
6250
6251 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6252
6253 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6254
6255 2018-06-21 Pedro Alves <palves@redhat.com>
6256
6257 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6258 instead of a ptid_t. All callers adjusted.
6259 * ada-tasks.c (ada_get_task_number): Likewise. All callers
6260 adjusted.
6261 (print_ada_task_info, display_current_task_id, task_command_1):
6262 Adjust.
6263 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6264 inferior_thread.
6265 (breakpoint_kind): Adjust.
6266 (remove_breakpoints_pid): Rename to ...
6267 (remove_breakpoints_inf): ... this. Adjust to take an inferior
6268 pointer. All callers adjusted.
6269 (bpstat_clear_actions): Use inferior_thread.
6270 (get_bpstat_thread): New.
6271 (bpstat_do_actions): Use it.
6272 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6273 to take a thread_info pointer. All callers adjusted.
6274 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6275 (breakpoint_re_set_thread): Use inferior_thread.
6276 * breakpoint.h (struct inferior): Forward declare.
6277 (bpstat_stop_status): Update.
6278 (remove_breakpoints_pid): Delete.
6279 (remove_breakpoints_inf): New.
6280 * bsd-uthread.c (bsd_uthread_target::wait)
6281 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6282 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6283 (maint_btrace_packet_history_cmd)
6284 (maint_btrace_clear_packet_history_cmd): Adjust.
6285 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6286 inferior_thread.
6287 * cli/cli-interp.c: Include "inferior.h".
6288 * common/refcounted-object.h (struct
6289 refcounted_object_ref_policy): New.
6290 * compile/compile-object-load.c: Include gdbthread.h.
6291 (store_regs): Use inferior_thread.
6292 * corelow.c (core_target::close): Use current_inferior.
6293 (core_target_open): Adjust to use first_thread_of_inferior and use
6294 the current inferior.
6295 * ctf.c (ctf_target::close): Adjust to use current_inferior.
6296 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6297 <thread>: ... this new field. All references adjusted.
6298 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6299 Take a thread_info pointer instead of a ptid_t.
6300 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6301 (dummy_frame_discard, register_dummy_frame_dtor): Take a
6302 thread_info pointer instead of a ptid_t.
6303 * elfread.c: Include "inferior.h".
6304 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6305 Use inferior_thread.
6306 * eval.c (evaluate_subexp): Likewise.
6307 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6308 inferior_thread.
6309 * gdb_proc_service.h (struct thread_info): Forward declare.
6310 (struct ps_prochandle) <ptid>: Delete, replaced by ...
6311 <thread>: ... this new field. All references adjusted.
6312 * gdbarch.h, gdbarch.c: Regenerate.
6313 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6314 'thread' parameter. All implementations and callers adjusted.
6315 * gdbthread.h (thread_info) <set_running>: New method.
6316 (delete_thread, delete_thread_silent): Take a thread_info pointer
6317 instead of a ptid.
6318 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6319 (first_thread_of_process): Delete, replaced by ...
6320 (first_thread_of_inferior): ... this new function. All callers
6321 adjusted.
6322 (any_live_thread_of_process): Delete, replaced by ...
6323 (any_live_thread_of_inferior): ... this new function. All callers
6324 adjusted.
6325 (switch_to_thread, switch_to_no_thread): Declare.
6326 (is_executing): Delete.
6327 (enable_thread_stack_temporaries): Update comment.
6328 <enable_thread_stack_temporaries>: Take a thread_info pointer
6329 instead of a ptid_t. Incref the thread.
6330 <~enable_thread_stack_temporaries>: Decref the thread.
6331 <m_ptid>: Delete
6332 <m_thr>: New.
6333 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6334 (get_last_thread_stack_temporary)
6335 (value_in_thread_stack_temporaries, can_access_registers_thread):
6336 Take a thread_info pointer instead of a ptid_t. All callers
6337 adjusted.
6338 * infcall.c (get_call_return_value): Use inferior_thread.
6339 (run_inferior_call): Work with thread pointers instead of ptid_t.
6340 (call_function_by_hand_dummy): Work with thread pointers instead
6341 of ptid_t. Use thread_info_ref.
6342 * infcmd.c (proceed_thread_callback): Access thread's state
6343 directly.
6344 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6345 access thread's state directly.
6346 (continue_command): Use inferior_thread.
6347 (info_program_command): Use find_thread_ptid and access thread
6348 state directly.
6349 (proceed_after_attach_callback): Use thread state directly.
6350 (notice_new_inferior): Take a thread_info pointer instead of a
6351 ptid_t. All callers adjusted.
6352 (exit_inferior): Take an inferior pointer instead of a pid. All
6353 callers adjusted.
6354 (exit_inferior_silent): New.
6355 (detach_inferior): Delete.
6356 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6357 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6358 (detach_inferior_command, kill_inferior_command): Use
6359 find_inferior_id instead of valid_gdb_inferior_id and
6360 gdb_inferior_id_to_pid.
6361 (inferior_command): Use inferior and thread pointers.
6362 * inferior.h (struct thread_info): Forward declare.
6363 (notice_new_inferior): Take a thread_info pointer instead of a
6364 ptid_t. All callers adjusted.
6365 (detach_inferior): Delete declaration.
6366 (exit_inferior, exit_inferior_silent): Take an inferior pointer
6367 instead of a pid. All callers adjusted.
6368 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6369 (valid_gdb_inferior_id): Delete.
6370 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6371 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6372 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6373 ...
6374 <inf>: ... this new field.
6375 <step_ptid>: Delete, replaced by ...
6376 <step_thread>: ... this new field.
6377 (get_displaced_stepping_state): Take an inferior pointer instead
6378 of a pid. All callers adjusted.
6379 (displaced_step_in_progress_any_inferior): Adjust.
6380 (displaced_step_in_progress_thread): Take a thread pointer instead
6381 of a ptid_t. All callers adjusted.
6382 (displaced_step_in_progress, add_displaced_stepping_state): Take
6383 an inferior pointer instead of a pid. All callers adjusted.
6384 (get_displaced_step_closure_by_addr): Adjust.
6385 (remove_displaced_stepping_state): Take an inferior pointer
6386 instead of a pid. All callers adjusted.
6387 (displaced_step_prepare_throw, displaced_step_prepare)
6388 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6389 All callers adjusted.
6390 (start_step_over): Adjust.
6391 (infrun_thread_ptid_changed): Remove bit updating ptids in the
6392 displaced step queue.
6393 (do_target_resume): Adjust.
6394 (fetch_inferior_event): Use inferior_thread.
6395 (context_switch, get_inferior_stop_soon): Take an
6396 execution_control_state pointer instead of a ptid_t. All callers
6397 adjusted.
6398 (switch_to_thread_cleanup): Delete.
6399 (stop_all_threads): Use scoped_restore_current_thread.
6400 * inline-frame.c: Include "gdbthread.h".
6401 (inline_state) <inline_state>: Take a thread pointer instead of a
6402 ptid_t. All callers adjusted.
6403 <ptid>: Delete, replaced by ...
6404 <thread>: ... this new field.
6405 (find_inline_frame_state): Take a thread pointer instead of a
6406 ptid_t. All callers adjusted.
6407 (skip_inline_frames, step_into_inline_frame)
6408 (inline_skipped_frames, inline_skipped_symbol): Take a thread
6409 pointer instead of a ptid_t. All callers adjusted.
6410 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6411 (inline_skipped_frames, inline_skipped_symbol): Likewise.
6412 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6413 pointers directly.
6414 * linux-nat.c (get_detach_signal): Likewise.
6415 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6416 (thread_db_notice_clone): Adjust.
6417 (thread_db_find_new_threads_silently)
6418 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6419 a thread pointer instead of a ptid_t. All callers adjusted.
6420 * mi/mi-cmd-var.c: Include "inferior.h".
6421 (mi_cmd_var_update_iter): Update to use thread pointers.
6422 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6423 inferior directly.
6424 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6425 out to ...
6426 (mi_output_running): ... this new function.
6427 (mi_on_resume_1): Adjust to use it.
6428 (mi_user_selected_context_changed): Adjust to use inferior_thread.
6429 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6430 directly.
6431 (interrupt_thread_callback): : Adjust to use thread and inferior
6432 pointers.
6433 * proc-service.c: Include "gdbthread.h".
6434 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6435 * progspace-and-thread.c: Include "inferior.h".
6436 * progspace.c: Include "inferior.h".
6437 * python/py-exitedevent.c (create_exited_event_object): Adjust to
6438 hold a reference to an inferior_object.
6439 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6440 inferior_thread.
6441 * python/py-inferior.c (struct inferior_object): Give the type a
6442 tag name instead of a typedef.
6443 (python_on_normal_stop): No need to check if the current thread is
6444 listed.
6445 (inferior_to_inferior_object): Change return type to
6446 inferior_object. All callers adjusted.
6447 (find_thread_object): Delete, bits factored out to ...
6448 (thread_to_thread_object): ... this new function.
6449 * python/py-infthread.c (create_thread_object): Use
6450 inferior_to_inferior_object.
6451 (thpy_is_stopped): Use thread pointer directly.
6452 (gdbpy_selected_thread): Use inferior_thread.
6453 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6454 field, replaced with ...
6455 <thread>: ... this new field. All users adjusted.
6456 (btpy_insn_or_gap_new): Drop const.
6457 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
6458 callers adjusted.
6459 * python/py-record.c: Include "gdbthread.h".
6460 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6461 a ptid_t. All callers adjusted.
6462 (gdbpy_current_recording): Use inferior_thread.
6463 * python/py-record.h (recpy_record_object) <ptid>: Delete
6464 field, replaced with ...
6465 <thread>: ... this new field. All users adjusted.
6466 (recpy_element_object) <ptid>: Delete
6467 field, replaced with ...
6468 <thread>: ... this new field. All users adjusted.
6469 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6470 a ptid_t. All callers adjusted.
6471 * python/py-threadevent.c: Include "gdbthread.h".
6472 (get_event_thread): Use thread_to_thread_object.
6473 * python/python-internal.h (struct inferior_object): Forward
6474 declare.
6475 (find_thread_object, find_inferior_object): Delete declarations.
6476 (thread_to_thread_object, inferior_to_inferior_object): New
6477 declarations.
6478 * record-btrace.c: Include "inferior.h".
6479 (require_btrace_thread): Use inferior_thread.
6480 (record_btrace_frame_sniffer)
6481 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6482 (get_thread_current_frame): Use scoped_restore_current_thread and
6483 switch_to_thread.
6484 (get_thread_current_frame): Use thread pointer directly.
6485 (record_btrace_replay_at_breakpoint): Use thread's inferior
6486 pointer directly.
6487 * record-full.c: Include "inferior.h".
6488 * regcache.c: Include "gdbthread.h".
6489 (get_thread_arch_regcache): Use the inferior's address space
6490 directly.
6491 (get_thread_regcache, registers_changed_thread): New.
6492 * regcache.h (get_thread_regcache(thread_info *thread)): New
6493 overload.
6494 (registers_changed_thread): New.
6495 (remote_target) <remote_detach_1>: Swap order of parameters.
6496 (remote_add_thread): <remote_add_thread>: Return the new thread.
6497 (get_remote_thread_info(ptid_t)): New overload.
6498 (remote_target::remote_notice_new_inferior): Use thread pointers
6499 directly.
6500 (remote_target::process_initial_stop_replies): Use
6501 thread_info::set_running.
6502 (remote_target::remote_detach_1, remote_target::detach)
6503 (extended_remote_target::detach): Adjust.
6504 * stack.c (frame_show_address): Use inferior_thread.
6505 * target-debug.h (target_debug_print_thread_info_pp): New.
6506 * target-delegates.c: Regenerate.
6507 * target.c (default_thread_address_space): Delete.
6508 (memory_xfer_partial_1): Use current_inferior.
6509 (target_detach): Use current_inferior.
6510 (target_thread_address_space): Delete.
6511 (generic_mourn_inferior): Use current_inferior.
6512 * target.h (struct target_ops) <thread_address_space>: Delete.
6513 (target_thread_address_space): Delete.
6514 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
6515 pointers directly.
6516 (delete_thread_1, delete_thread, delete_thread_silent): Take a
6517 thread pointer instead of a ptid_t. Adjust all callers.
6518 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6519 (first_thread_of_process): Delete, replaced by ...
6520 (first_thread_of_inferior): ... this new function. All callers
6521 adjusted.
6522 (any_thread_of_process): Rename to ...
6523 (any_thread_of_inferior): ... this, and take an inferior pointer.
6524 (any_live_thread_of_process): Rename to ...
6525 (any_live_thread_of_inferior): ... this, and take an inferior
6526 pointer.
6527 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6528 (value_in_thread_stack_temporaries)
6529 (get_last_thread_stack_temporary): Take a thread pointer instead
6530 of a ptid_t. Adjust all callers.
6531 (thread_info::set_running): New.
6532 (validate_registers_access): Use inferior_thread.
6533 (can_access_registers_ptid): Rename to ...
6534 (can_access_registers_thread): ... this, and take a thread
6535 pointer.
6536 (print_thread_info_1): Adjust to compare thread pointers instead
6537 of ptids.
6538 (switch_to_no_thread, switch_to_thread): Make extern.
6539 (scoped_restore_current_thread::~scoped_restore_current_thread):
6540 Use m_thread pointer directly.
6541 (scoped_restore_current_thread::scoped_restore_current_thread):
6542 Use inferior_thread.
6543 (thread_command): Use thread pointer directly.
6544 (thread_num_make_value_helper): Use inferior_thread.
6545 * top.c (execute_command): Use inferior_thread.
6546 * tui/tui-interp.c: Include "inferior.h".
6547 * varobj.c (varobj_create): Use inferior_thread.
6548 (value_of_root_1): Use find_thread_global_id instead of
6549 global_thread_id_to_ptid.
6550
6551 2018-06-21 Alan Hayward <alan.hayward@arm.com>
6552
6553 * regcache.c (readable_regcache::read_part): Avoid memcpy when
6554 possible.
6555 (regcache::write_part): Likewise.
6556 (readable_regcache::cooked_read_part): Update comment.
6557 (readable_regcache::cooked_write_part): Likewise.
6558 * regcache.h: (readable_regcache::read_part): Likewise.
6559 (regcache::write_part): Likewise.
6560
6561 2018-06-21 Richard Bunt <richard.bunt@arm.com>
6562 Dirk Schubert <dirk.schubert@arm.com>
6563
6564 * aarch64-linux-nat.c (post_attach): New.
6565 (aarch64_linux_nat_target::post_attach): Override post_attach to
6566 record the number of hardware debug registers.
6567
6568 2018-06-20 Tom Tromey <tom@tromey.com>
6569
6570 * python/py-param.c (add_setshow_generic): Make parameters const.
6571 (parmpy_init): Update.
6572
6573 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6574
6575 * regcache.h (regcache_cooked_read_ftype): Rename to...
6576 (register_read_ftype): ...this, change type to function_view.
6577 (class reg_buffer) <save>: Remove src parameter.
6578 (readonly_detached_regcache) <readonly_detached_regcache>: Make
6579 parameter non-const in first overload. Remove src parameter in
6580 second overload.
6581 * regcache.c (do_cooked_read): Remove.
6582 (readonly_detached_regcache::readonly_detached_regcache): Make
6583 parameter non-const, adjust call to other constructor.
6584 (reg_buffer::save): Remove src parameter.
6585 * frame.c (do_frame_register_read): Remove.
6586 (frame_save_as_regcache): Use lambda function.
6587 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6588 parameter to ppu2spu_data *.
6589 (ppu2spu_sniffer): Use lambda function.
6590
6591 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6592
6593 * record-full.c (record_full_target::insert_breakpoint): Remove
6594 "struct" keyword, add const.
6595
6596 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6597
6598 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6599 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6600 * configure.ac: Remove AC_PREREQ, add missing quoting.
6601 * gnulib/configure.ac: Modernize usage of
6602 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
6603 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6604 (AUTOMAKE_VERSION): Bump to 1.15.1.
6605 * configure: Re-generate.
6606 * config.in: Re-generate.
6607 * aclocal.m4: Re-generate.
6608 * gnulib/aclocal.m4: Re-generate.
6609 * gnulib/config.in: Re-generate.
6610 * gnulib/configure: Re-generate.
6611 * gnulib/import/Makefile.in: Re-generate.
6612
6613 2018-06-19 Pedro Alves <palves@redhat.com>
6614
6615 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6616 (lookup_minimal_symbol_by_pc_section): ... here with
6617 gdb_assert_not_reached added.
6618
6619 2018-06-19 Pedro Alves <palves@redhat.com>
6620
6621 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6622 parameter with a block parameter. Compare location's block symbol
6623 with the frame's block instead of addresses.
6624 (skip_inline_frames): Pass the current block instead of the
6625 frame's address. Break out as soon as we determine the frame
6626 should not be skipped.
6627
6628 2018-06-18 Tom Tromey <tom@tromey.com>
6629
6630 * solib-aix.c (solib_aix_get_section_offsets): Return
6631 unique_xmalloc_ptr.
6632 (solib_aix_solib_create_inferior_hook): Update.
6633
6634 2018-06-18 Tom Tromey <tom@tromey.com>
6635
6636 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6637
6638 2018-06-18 Tom Tromey <tom@tromey.com>
6639
6640 * solib-frv.c (frv_relocate_main_executable): Use
6641 unique_xmalloc_ptr.
6642 * solib-dsbt.c (dsbt_relocate_main_executable): Use
6643 unique_xmalloc_ptr.
6644
6645 2018-06-18 Tom Tromey <tom@tromey.com>
6646
6647 * objfiles.h (inhibit_section_map_updates): Update.
6648 (resume_section_map_updates, resume_section_map_updates_cleanup):
6649 Remove.
6650 * solib-svr4.c (svr4_handle_solib_event): Update.
6651 * objfiles.c (inhibit_section_map_updates): Return
6652 scoped_restore_tmpl<int>.
6653 (resume_section_map_updates, resume_section_map_updates_cleanup):
6654 Remove.
6655
6656 2018-06-18 Tom Tromey <tom@tromey.com>
6657
6658 * valprint.h (read_string): Update.
6659 * valprint.c (read_string): Change type of "buffer".
6660 (val_print_string): Update.
6661 * python/py-value.c (valpy_string): Update.
6662 * language.h (struct language_defn) <la_get_string>: Change
6663 type of "buffer".
6664 (default_get_string, c_get_string): Update.
6665 * language.c (default_get_string): Change type of "buffer".
6666 * guile/scm-value.c (gdbscm_value_to_string): Update.
6667 * c-lang.c (c_get_string): Change type of "buffer".
6668
6669 2018-06-18 Tom Tromey <tom@tromey.com>
6670
6671 * ser-mingw.c (struct pipe_state_destroyer): New.
6672 (pipe_state_up): New typedef.
6673 (cleanup_pipe_state): Remove.
6674 (pipe_windows_open): Use pipe_state_up. Don't release argv.
6675
6676 2018-06-18 Tom Tromey <tom@tromey.com>
6677
6678 * rust-lang.h (rust_yyerror): Don't declare.
6679 * rust-lang.c (rust_language_defn): Update.
6680 * rust-exp.y (yyerror): Now static.
6681 * parse.c (parse_exp_in_context_1): Update.
6682 * p-lang.h (p_yyerror): Don't declare.
6683 * p-lang.c (p_language_defn): Update.
6684 * p-exp.y (yyerror): Now static.
6685 * opencl-lang.c (opencl_language_defn): Update.
6686 * objc-lang.c (objc_language_defn): Update.
6687 * m2-lang.h (m2_yyerror): Don't declare.
6688 * m2-lang.c (m2_language_defn): Update.
6689 * m2-exp.y (yyerror): Now static.
6690 * language.h (struct language_defn) <la_error>: Remove.
6691 * language.c (unk_lang_error): Remove.
6692 (unknown_language_defn, auto_language_defn): Remove.
6693 * go-lang.h (go_yyerror): Don't declare.
6694 * go-lang.c (go_language_defn): Update.
6695 * go-exp.y (yyerror): Now static.
6696 * f-lang.h (f_yyerror): Don't declare.
6697 * f-lang.c (f_language_defn): Update.
6698 * f-exp.y (yyerror): Now static.
6699 * d-lang.h (d_yyerror): Don't declare.
6700 * d-lang.c (d_language_defn): Update.
6701 * d-exp.y (yyerror): Now static.
6702 * c-lang.h (c_yyerror): Don't declare.
6703 * c-lang.c (c_language_defn, cplus_language_defn)
6704 (asm_language_defn, minimal_language_defn): Update.
6705 * c-exp.y (yyerror): Now static.
6706 * ada-lang.h (ada_yyerror): Don't declare.
6707 * ada-lang.c (ada_language_defn): Update.
6708 * ada-exp.y (yyerror): Now static.
6709
6710 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6711
6712 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6713 (store_sveregs_to_thread): Likewise.
6714 (aarch64_linux_fetch_inferior_registers): Check for SVE.
6715 (aarch64_linux_store_inferior_registers): Likewise.
6716 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6717 function.
6718 (aarch64_sve_regs_copy_to_regcache): Likewise.
6719 (aarch64_sve_regs_copy_from_regcache): Likewise.
6720 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6721 declaration.
6722 (aarch64_sve_regs_copy_to_regcache): Likewise.
6723 (aarch64_sve_regs_copy_from_regcache): Likewise.
6724 (sve_context): Structure from Linux headers.
6725 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6726 (SVE_SIG_ZREG_SIZE): Likewise.
6727 (SVE_SIG_PREG_SIZE): Likewise.
6728 (SVE_SIG_FFR_SIZE): Likewise.
6729 (SVE_SIG_REGS_OFFSET): Likewise.
6730 (SVE_SIG_ZREGS_OFFSET): Likewise.
6731 (SVE_SIG_ZREG_OFFSET): Likewise.
6732 (SVE_SIG_ZREGS_SIZE): Likewise.
6733 (SVE_SIG_PREGS_OFFSET): Likewise.
6734 (SVE_SIG_PREG_OFFSET): Likewise.
6735 (SVE_SIG_PREGS_SIZE): Likewise.
6736 (SVE_SIG_FFR_OFFSET): Likewise.
6737 (SVE_SIG_REGS_SIZE): Likewise.
6738 (SVE_SIG_CONTEXT_SIZE): Likewise.
6739 (SVE_PT_REGS_MASK): Likewise.
6740 (SVE_PT_REGS_FPSIMD): Likewise.
6741 (SVE_PT_REGS_SVE): Likewise.
6742 (SVE_PT_VL_INHERIT): Likewise.
6743 (SVE_PT_VL_ONEXEC): Likewise.
6744 (SVE_PT_REGS_OFFSET): Likewise.
6745 (SVE_PT_FPSIMD_OFFSET): Likewise.
6746 (SVE_PT_FPSIMD_SIZE): Likewise.
6747 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6748 (SVE_PT_SVE_PREG_SIZE): Likewise.
6749 (SVE_PT_SVE_FFR_SIZE): Likewise.
6750 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6751 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6752 (__SVE_SIG_TO_PT): Likewise.
6753 (SVE_PT_SVE_OFFSET): Likewise.
6754 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6755 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6756 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6757 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6758 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6759 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6760 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6761 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6762 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6763 (SVE_PT_SVE_SIZE): Likewise.
6764 (SVE_PT_SIZE): Likewise.
6765 (HAS_SVE_STATE): New define.
6766
6767 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6768
6769 * nat/aarch64-sve-linux-sigcontext.h: New file.
6770 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6771 new files.
6772 (SVE_VQ_MIN): Likewise.
6773 (SVE_VQ_MAX): Likewise.
6774 (SVE_VL_MIN): Likewise.
6775 (SVE_VL_MAX): Likewise.
6776 (SVE_NUM_ZREGS): Likewise.
6777 (SVE_NUM_PREGS): Likewise.
6778 (sve_vl_valid): Likewise.
6779 (struct user_sve_header): Likewise.
6780
6781 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6782 Richard Bunt <Richard.Bunt@arm.com>
6783
6784 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6785 was requested by GDB.
6786
6787 2018-06-15 Tom de Vries <tdevries@suse.de>
6788
6789 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6790
6791 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6792
6793 * gnulib/update-gnulib.sh: Print expected versions of
6794 autoconf/aclocal.
6795
6796 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6797
6798 * arch-utils.c (default_type_align): Use type_length_units.
6799 * gdbtypes.c (type_align): Use type_length_units.
6800
6801 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6802
6803 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6804 of 'define' command.
6805
6806 2018-06-14 Tom de Vries <tdevries@suse.de>
6807
6808 PR cli/22573
6809 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6810 get_no_prettyformat_print_options.
6811
6812 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6813
6814 * sparc-nat.h: Include target.h.
6815 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6816 <fetch_registers>: Remove this argument in function call.
6817 <store_registers>: Remove this argument in function call, remove
6818 extra semicolon.
6819 <low_forget_process>: Call sparc64_forget_process instead of
6820 sparc_forget_process.
6821
6822 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6823
6824 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6825 (procfs_target::make_corefile_notes): Adjust to new
6826 target_read_alloc return type.
6827
6828 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6829 Stephen Roberts <stephen.roberts@arm.com>
6830
6831 PR gdb/22882
6832 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6833 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6834 Move should_notify_stop local into more inner scope.
6835
6836 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6837 Stephen Roberts <stephen.roberts@arm.com>
6838
6839 PR gdb/22882
6840 * infrun.c (resume_1): Add call to mark_async_event_handler.
6841
6842 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6843
6844 * infrun.c (do_target_wait): Change old version of $pc printed.
6845
6846 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
6847
6848 * dwarf2read.c (read_index_from_section): Rename to...
6849 (read_gdb_index_from_section): ... this, update all callers.
6850 (dwarf2_read_index): Rename to...
6851 (dwarf2_read_gdb_index): ... this, update all callers.
6852
6853 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
6854
6855 * gdb/hppa-linux-nat.c
6856 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6857 hppa_linux_nat_target::fetch_registers.
6858
6859 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6860
6861 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6862 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6863 (AARCH64_DWARF_SVE_FFR): Likewise.
6864 (AARCH64_DWARF_SVE_P0): Likewise.
6865 (AARCH64_DWARF_SVE_Z0): Likewise.
6866
6867 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6868
6869 * common/common-regcache.h (raw_compare): New function.
6870 * regcache.c (regcache::raw_compare): Likewise.
6871 * regcache.h (regcache::raw_compare): New declaration.
6872
6873 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6874
6875 * common/common-regcache.h (reg_buffer_common): New structure.
6876 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6877 (reg_buffer::raw_supply): Likewise.
6878 (reg_buffer::raw_supply_integer): Likewise.
6879 (reg_buffer::raw_supply_zeroed): Likewise.
6880 (reg_buffer::raw_collect): Likewise.
6881 (reg_buffer::raw_collect_integer): Likewise.
6882 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6883 (reg_buffer::raw_supply): Likewise.
6884 (reg_buffer::raw_supply_integer): Likewise.
6885 (reg_buffer::raw_supply_zeroed): Likewise.
6886 (reg_buffer::raw_collect): Likewise.
6887 (reg_buffer::raw_collect_integer): Likewise.
6888
6889 2018-06-10 Tom Tromey <tom@tromey.com>
6890
6891 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6892 (class remote_state) <stop_reply_queue>: Now std::vector.
6893 (remote_state::~remote_state)
6894 (remote_target::stop_reply_queue_length): Update.
6895 (struct queue_iter_param, remove_child_of_pending_fork)
6896 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6897 (check_pending_event_prevents_wildcard_vcont_callback)
6898 (remove_stop_reply_for_inferior)
6899 (remove_stop_reply_of_remote_state)
6900 (remote_notif_remove_once_on_match)
6901 (stop_reply_match_ptid_and_ws)
6902 (remote_kill_child_of_pending_fork): Remove.
6903 (remote_target::remove_new_fork_children)
6904 (remote_target::check_pending_events_prevent_wildcard_vcont)
6905 (remote_target::discard_pending_stop_replies)
6906 (remote_target::discard_pending_stop_replies_in_queue)
6907 (remote_target::remote_notif_remove_queued_reply)
6908 (remote_target::queued_stop_reply)
6909 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6910 (remote_target::wait, remote_target::kill_new_fork_children)
6911 (remote_target::async): Update.
6912
6913 2018-06-10 Tom Tromey <tom@tromey.com>
6914
6915 * record-full.c (record_full_arch_list_cleanups): Remove.
6916 (record_full_message): Use try/catch.
6917 (record_full_wait_cleanups): Remove.
6918 (record_full_wait_1): Use try/catch.
6919 (record_full_restore): Likewise.
6920
6921 2018-06-10 Tom Tromey <tom@tromey.com>
6922
6923 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
6924 declare VEC. Add constructor.
6925 <in_target_beneath>: Now bool.
6926 (record_full_breakpoints): Now a std::vector, static.
6927 (record_full_sync_record_breakpoints)
6928 (record_full_init_record_breakpoints)
6929 (record_full_target::insert_breakpoint)
6930 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
6931
6932 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
6933
6934 * dwarf2read.c (process_cu_includes): Remove struct keyword.
6935 * serial.c (serial_interface_lookup): Remove struct keyword.
6936
6937 2018-06-10 Tom Tromey <tom@tromey.com>
6938
6939 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6940 method.
6941 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6942 a method.
6943 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6944 method.
6945 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6946 "beneath" as a method.
6947 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6948 Use "beneath" as a method.
6949
6950 2018-06-10 Tom Tromey <tom@tromey.com>
6951
6952 * tracefile.c (struct trace_file_writer_deleter): New.
6953 <operator()>: Rename from trace_file_writer_xfree.
6954 (trace_file_writer_up): New typedef.
6955 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6956
6957 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6958
6959 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6960 <m_registers, m_register_status>: Change type to
6961 std::unique_ptr.
6962 * regcache.c (reg_buffer::reg_buffer): Use new instead of
6963 XCNEWVEC.
6964
6965 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
6966
6967 * common/common-regcache.h (enum register_status): Add
6968 underlying type "signed char".
6969 * regcache.h (reg_buffer) <m_register_status>: Change type to
6970 register_status *.
6971 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6972 register_status instead of signed char.
6973 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6974 (reg_buffer::get_register_status): Remove cast.
6975 (readable_regcache::raw_read): Remove cast.
6976 (readable_regcache::cooked_read): Remove cast.
6977
6978 2018-06-09 Tom Tromey <tom@tromey.com>
6979
6980 * source.c (reverse_search_command, forward_search_command): Use
6981 scoped_fd.
6982
6983 2018-06-09 Tom Tromey <tom@tromey.com>
6984
6985 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
6986 (serial_ops_list): Now static, std::vector.
6987 (serial_interface_lookup, serial_add_interface): Update.
6988
6989 2018-06-09 Tom Tromey <tom@tromey.com>
6990
6991 * dwarf2read.c (process_cu_includes): Update.
6992 (process_full_comp_unit): Update.
6993 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6994 std::vector.
6995
6996 2018-06-08 Paul Koning <paul_koning@dell.com>
6997
6998 PR gdb/23252
6999
7000 * python/python.c (do_start_initialization):
7001 Avoid call to internal Python API.
7002 (init__gdb_module): New function.
7003
7004 2018-06-08 Gary Benson <gbenson@redhat.com>
7005
7006 * linux-thread-db.c (valprint.h): New include.
7007 (struct check_thread_db_info): New structure.
7008 (check_thread_db_on_load, tdb_testinfo): New static globals.
7009 (check_thread_db, check_thread_db_callback): New functions.
7010 (try_thread_db_load_1): Run integrity checks if requested.
7011 (maintenance_check_libthread_db): New function.
7012 (_initialize_thread_db): Register "maint check libthread-db"
7013 and "maint set/show check-libthread-db".
7014 * NEWS: Mention the above new commands.
7015
7016 2018-06-08 Tom Tromey <tom@tromey.com>
7017
7018 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7019 now a method.
7020
7021 2018-06-08 Tom Tromey <tom@tromey.com>
7022
7023 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7024
7025 2018-06-08 Tom Tromey <tom@tromey.com>
7026
7027 * common/btrace-common.h (struct btrace_data): Add constructor,
7028 destructor, move assignment operator.
7029 <empty, clear, fini>: New methods.
7030 <format>: Initialize.
7031 (btrace_data_init, btrace_data_fini, btrace_data_clear)
7032 (btrace_data_empty): Don't declare.
7033 * common/btrace-common.c (btrace_data_init): Remove.
7034 (btrace_data::fini): Rename from btrace_data_fini.
7035 (btrace_data::empty): Rename from btrace_data_empty.
7036 (btrace_data::clear): Rename from btrace_data_clear. Return
7037 bool.
7038 * btrace.h (make_cleanup_btrace_data): Don't declare.
7039 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7040 (parse_xml_btrace): Update.
7041 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7042 (maint_btrace_clear_packet_history_cmd): Update.
7043
7044 2018-06-07 Pedro Alves <palves@redhat.com>
7045
7046 * target.h (target_ops) <beneath>: Now a method. All references
7047 updated.
7048 (class target_stack): New.
7049 * target.c (g_target_stack): New.
7050 (g_current_top_target): Delete.
7051 (current_top_target): Get the top target out of g_target_stack.
7052 (target_stack::push, target_stack::unpush): New.
7053 (push_target, unpush_target): Reimplement.
7054 (target_is_pushed): Reimplement in terms of g_target_stack.
7055 (target_ops::beneath, target_stack::find_beneath): New.
7056
7057 2018-06-07 Pedro Alves <palves@redhat.com>
7058
7059 * target.h (find_target_beneath): Delete declaration.
7060 * target.c (find_target_beneath): Delete definition.
7061 * aix-thread.c: All callers of find_target_beneath adjusted to
7062 call target_ops::beneath instead.
7063 * bsd-uthread.c: Likewise.
7064 * linux-thread-db.c: Likewise.
7065 * ravenscar-thread.c: Likewise.
7066 * sol-thread.c: Likewise.
7067 * spu-multiarch.c: Likewise.
7068
7069 2018-06-07 Pedro Alves <palves@redhat.com>
7070
7071 * target.h (target_ops) <beneath>: Now a method. All references
7072 updated.
7073 (target_ops) <m_beneath>: New.
7074 * target.c (target_ops::beneath): New.
7075 * corelow.c: Adjust all references to target_ops::beneath.
7076 * linux-thread-db.c: Likewise.
7077 * make-target-delegates: Likewise.
7078 * record-btrace.c: Likewise.
7079 * record-full.c: Likewise.
7080 * remote.c: Likewise.
7081 * target.c: Likewise.
7082 * target-delegates.c: Regenerate.
7083
7084 2018-06-07 Pedro Alves <palves@redhat.com>
7085
7086 * target.h (target_stack): Delete.
7087 (current_top_target): Declare function.
7088 * target.c (target_stack): Delete.
7089 (g_current_top_target): New.
7090 (current_top_target): New function.
7091 * auxv.c: Use current_top_target instead of target_stack
7092 throughout.
7093 * avr-tdep.c: Likewise.
7094 * breakpoint.c: Likewise.
7095 * corefile.c: Likewise.
7096 * elfread.c: Likewise.
7097 * eval.c: Likewise.
7098 * exceptions.c: Likewise.
7099 * frame.c: Likewise.
7100 * gdbarch-selftests.c: Likewise.
7101 * gnu-v3-abi.c: Likewise.
7102 * ia64-tdep.c: Likewise.
7103 * ia64-vms-tdep.c: Likewise.
7104 * infcall.c: Likewise.
7105 * infcmd.c: Likewise.
7106 * infrun.c: Likewise.
7107 * linespec.c: Likewise.
7108 * linux-tdep.c: Likewise.
7109 * minsyms.c: Likewise.
7110 * ppc-linux-nat.c: Likewise.
7111 * ppc-linux-tdep.c: Likewise.
7112 * procfs.c: Likewise.
7113 * regcache.c: Likewise.
7114 * remote.c: Likewise.
7115 * rs6000-tdep.c: Likewise.
7116 * s390-linux-nat.c: Likewise.
7117 * s390-tdep.c: Likewise.
7118 * solib-aix.c: Likewise.
7119 * solib-darwin.c: Likewise.
7120 * solib-dsbt.c: Likewise.
7121 * solib-spu.c: Likewise.
7122 * solib-svr4.c: Likewise.
7123 * solib-target.c: Likewise.
7124 * sparc-tdep.c: Likewise.
7125 * sparc64-tdep.c: Likewise.
7126 * spu-tdep.c: Likewise.
7127 * symfile.c: Likewise.
7128 * symtab.c: Likewise.
7129 * target-descriptions.c: Likewise.
7130 * target-memory.c: Likewise.
7131 * target.c: Likewise.
7132 * target.h: Likewise.
7133 * tracefile-tfile.c: Likewise.
7134 * tracepoint.c: Likewise.
7135 * valops.c: Likewise.
7136 * valprint.c: Likewise.
7137 * value.c: Likewise.
7138 * windows-tdep.c: Likewise.
7139 * mi/mi-main.c: Likewise.
7140
7141 2018-06-07 Tom Tromey <tom@tromey.com>
7142
7143 * valprint.h (build_address_symbolic): Declare.
7144 * printcmd.c (print_address_symbolic): Update.
7145 (build_address_symbolic): Change "name" and "filename" to
7146 std::string.
7147 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7148 Update.
7149 * defs.h (build_address_symbolic): Remove declaration.
7150
7151 2018-06-07 Alan Hayward <alan.hayward@arm.com>
7152
7153 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7154 (aarch64_vnv_type): Add function.
7155 (aarch64_pseudo_register_name): Add V regs for SVE.
7156 (aarch64_pseudo_register_type): Likewise.
7157 (aarch64_pseudo_register_reggroup_p): Likewise.
7158 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7159 (aarch64_pseudo_read_value): Add V regs for SVE.
7160 (aarch64_pseudo_write_2): Use V0 offset for SVE
7161 (aarch64_pseudo_write): Add V regs for SVE.
7162 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7163
7164 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
7165
7166 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7167 (sve_vl_from_vq): Likewise.
7168
7169 2018-06-05 Tom Tromey <tom@tromey.com>
7170
7171 * cli/cli-cmds.c (show_version): Update.
7172 * top.c (print_gdb_version): Add "interactive" parameter.
7173 Update.
7174 * main.c (captured_main_1): Update.
7175 * top.h (print_gdb_version): Add "interactive" parameter and a
7176 comment.
7177
7178 2018-06-05 David Malcolm <dmalcolm@redhat.com>
7179
7180 * common/enum-flags.h: Add trailing semicolon to example in
7181 comment.
7182
7183 2018-06-05 Tom Tromey <tom@tromey.com>
7184
7185 PR cli/12326:
7186 * NEWS: Add entry about pager.
7187 * utils.c (pagination_disabled_for_command): New global.
7188 (prompt_for_continue): Allow "c" response to prompt.
7189 (reinitialize_more_filter): Clear
7190 pagination_disabled_for_command.
7191 (fputs_maybe_filtered): Check pagination_disabled_for_command.
7192
7193 2018-06-04 Tom Tromey <tom@tromey.com>
7194
7195 * ada-lang.h (ada_lookup_symbol_list): Update.
7196 * ada-lang.c (resolve_subexp): Update.
7197 (symbols_are_identical_enums): Change type of syms. Remove nsyms
7198 parameter.
7199 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7200 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7201 results parameter to std::vector.
7202 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7203 Update.
7204 * ada-exp.y (block_lookup): Update.
7205 (select_possible_type_sym): Change type of syms. Remove nsyms
7206 parameter.
7207 (write_var_or_type, write_name_assoc): Update.
7208
7209 2018-06-04 Joel Brobecker <brobecker@adacore.com>
7210
7211 * windows-nat.c (windows_nat_target::xfer_partial): Return
7212 TARGET_XFER_E_IO if we need to delegate to the target beneath
7213 but BENEATH is NULL.
7214
7215 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
7216
7217 * Makefile.in (config.status): Add configure.nat as a
7218 dependency.
7219
7220 2018-06-04 Tom Tromey <tom@tromey.com>
7221
7222 * cp-name-parser.y (cpname_state): Add method declarations.
7223 (HANDLE_QUAL): Update.
7224 (cpname_state::d_grab, cpname_state::fill_comp)
7225 (cpname_state::make_operator, cpname_state::make_dtor)
7226 (cpname_state::make_builtin_type, cpname_state::make_name)
7227 (cpname_state::d_qualify, cpname_state::d_int_type)
7228 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7229 (%union): Move earlier.
7230
7231 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7232
7233 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7234
7235 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7236
7237 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7238 (aarch64_pseudo_write_1): Likewise.
7239 (aarch64_pseudo_read_value): Use helper.
7240 (aarch64_pseudo_write): Likewise.
7241
7242 2018-06-04 Pedro Alves <palves@redhat.com>
7243
7244 * darwin-nat.c (darwin_ops): Delete.
7245 (darwin_attach_pid): Use get_native_target.
7246
7247 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7248
7249 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7250 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7251
7252 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7253
7254 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7255 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7256 (aarch64_gdbarch_init): Check for SVE.
7257 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7258
7259 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7260
7261 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7262 * aarch64-tdep.h (aarch64_read_description): Likewise.
7263 * arch/aarch64.c (aarch64_create_target_description): Likewise.
7264 * arch/aarch64.h (aarch64_create_target_description): Likewise.
7265 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7266 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7267 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7268
7269 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
7270
7271 * value.c (value_fetch_lazy_bitfield): New.
7272 (value_fetch_lazy_memory): New.
7273 (value_fetch_lazy_register): New.
7274 (value_fetch_lazy): Factor out to smaller functions.
7275
7276 2018-06-01 Tom Tromey <tom@tromey.com>
7277
7278 * cp-name-parser.y (backslashable, represented): Now const.
7279
7280 2018-06-01 Tom Tromey <tom@tromey.com>
7281
7282 * cp-name-parser.y: Include parser-defs.h.
7283 (parser_fprintf): Remove declaration.
7284
7285 2018-06-01 Tom Tromey <tom@tromey.com>
7286
7287 * cp-name-parser.y: Use %pure-parser, %lex-param, and
7288 %parse-param.
7289 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7290 (global_result): Remove globals.
7291 (struct cpname_state): New.
7292 (yyparse): Don't declare.
7293 (yylex, yyerror): Move declarations after %union.
7294 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7295 (make_name): Add state parameter.
7296 Update all callers.
7297 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7298 parameter.
7299 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7300 Update.
7301 (yylex): Add lvalp, state parameters.
7302 (yyerror): Add state parameter.
7303 (cp_demangled_name_to_comp): Update.
7304
7305 2018-06-01 Tom Tromey <tom@tromey.com>
7306
7307 * cp-name-parser.y (parser_fprintf): Declare.
7308 (GDB_YY_REMAP_PREFIX): Define.
7309 Include yy-remap.h. Don't redefine yy* identifiers.
7310
7311 2018-06-01 Tom Tromey <tom@tromey.com>
7312
7313 * python/py-type.c (typy_legacy_template_argument): Update.
7314 * cp-support.h (cp_demangled_name_to_comp): Update.
7315 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7316 parameter to be a "std::string *".
7317 (main): Update.
7318
7319 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
7320
7321 * ada-lex.l: Include "diagnostics.h" instead of
7322 "common/diagnostics.h".
7323 * unittests/environ-selftests.c: Likewise.
7324 * common/diagnostics.h: Moved to ../include.
7325
7326 2018-06-01 Joel Brobecker <brobecker@adacore.com>
7327
7328 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7329 to language_mode_manual while calling breakpoint_re_set_one.
7330
7331 2018-06-01 Tom Tromey <tom@tromey.com>
7332
7333 * valops.c (value_cast_structs, destructor_name_p): Update.
7334 * symtab.c (gdb_mangle_name): Update.
7335 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7336 Update.
7337 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7338 (pascal_object_print_value_fields, pascal_object_print_value):
7339 Update.
7340 * p-typeprint.c (pascal_type_print_derivation_info): Update.
7341 * linespec.c (find_methods): Update.
7342 * gdbtypes.h (type_name_no_tag): Remove.
7343 (type_name_or_error): Rename from type_name_no_tag_or_error.
7344 * gdbtypes.c (type_name_no_tag): Remove.
7345 (type_name_or_error): Rename from type_name_no_tag_or_error.
7346 (lookup_struct_elt_type, check_typedef): Update.
7347 * expprint.c (print_subexp_standard): Update.
7348 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7349 * d-namespace.c (d_lookup_nested_symbol): Update.
7350 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7351 (cp_print_class_member): Update.
7352 * cp-namespace.c (cp_lookup_nested_symbol): Update.
7353 * completer.c (add_struct_fields): Update.
7354 * c-typeprint.c (cp_type_print_derivation_info)
7355 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7356 Update.
7357 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7358 (ada_prefer_type, ada_is_exception_sym): Update.
7359
7360 2018-06-01 Tom Tromey <tom@tromey.com>
7361
7362 * valops.c (enum_constant_from_type, value_namespace_elt)
7363 (value_maybe_namespace_elt): Update.
7364 * valarith.c (find_size_for_pointer_math): Update.
7365 * target-descriptions.c (make_gdb_type): Update.
7366 * symmisc.c (print_symbol): Update.
7367 * stabsread.c (define_symbol, read_type)
7368 (complain_about_struct_wipeout, add_undefined_type)
7369 (cleanup_undefined_types_1): Update.
7370 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7371 (rust_range_type_p, val_print_struct, rust_print_struct_def)
7372 (rust_internal_print_type, rust_composite_type)
7373 (rust_evaluate_funcall, rust_evaluate_subexp)
7374 (rust_inclusive_range_type_p): Update.
7375 * python/py-type.c (typy_get_tag): Update.
7376 * p-typeprint.c (pascal_type_print_base): Update.
7377 * mdebugread.c (parse_symbol, parse_type): Update.
7378 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7379 Update.
7380 * guile/scm-type.c (gdbscm_type_tag): Update.
7381 * go-lang.c (sixg_string_p): Update.
7382 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7383 Update.
7384 * gdbtypes.h (struct main_type) <tag_name>: Remove.
7385 (TYPE_TAG_NAME): Remove.
7386 * gdbtypes.c (type_name_no_tag): Simplify.
7387 (check_typedef, check_types_equal, recursive_dump_type)
7388 (copy_type_recursive, arch_composite_type): Update.
7389 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
7390 in summary mode when needed.
7391 * eval.c (evaluate_funcall): Update.
7392 * dwarf2read.c (fixup_go_packaging, read_structure_type)
7393 (process_structure_scope, read_enumeration_type)
7394 (read_namespace_type, read_module_type, determine_prefix): Update.
7395 * cp-support.c (inspect_type): Update.
7396 * coffread.c (process_coff_symbol, decode_base_type): Update.
7397 * c-varobj.c (c_is_path_expr_parent): Update.
7398 * c-typeprint.c (c_type_print_base_struct_union): Update.
7399 (c_type_print_base_1): Update. Print struct/class/union/enum in
7400 summary when using C language.
7401 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7402 (gen_maybe_namespace_elt): Update.
7403 * ada-lang.c (ada_type_name): Simplify.
7404 (empty_record, ada_template_to_fixed_record_type_1)
7405 (template_to_static_fixed_type)
7406 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7407
7408 2018-06-01 Tom Tromey <tom@tromey.com>
7409
7410 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7411 c_print_type.
7412 * c-typeprint.c (c_print_type_1): Add "language" parameter.
7413 (c_print_type): Update.
7414 (c_print_type): New overload.
7415 (c_type_print_varspec_prefix, c_type_print_args)
7416 (c_type_print_varspec_suffix, c_print_type_no_offsets)
7417 (c_type_print_base_struct_union, c_type_print_base_1)
7418 (cp_type_print_method_args): Add "language" parameter.
7419 (c_type_print_base): Update.
7420 * c-lang.h (c_print_type): Add new overload.
7421
7422 2018-06-01 Tom Tromey <tom@tromey.com>
7423
7424 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7425 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7426
7427 2018-06-01 Alan Hayward <alan.hayward@arm.com>
7428
7429 * aarch64-tdep.c (aarch64_sve_register_names): New const
7430 var.
7431 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7432 (AARCH64_SVE_Z_REGS_NUM): New define.
7433 (AARCH64_SVE_P_REGS_NUM): Likewise.
7434 (AARCH64_SVE_NUM_REGS): Likewise.
7435
7436 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7437
7438 * nat/linux-ptrace.h [__alpha__]
7439 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7440 definitions.
7441
7442 2018-05-31 Maciej W. Rozycki <macro@mips.com>
7443
7444 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7445 the endianness selected.
7446 * NEWS: Document `set endian auto' mode operation update.
7447
7448 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7449
7450 * Makefile.in: Add new header.
7451 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7452 (sve_vl_from_vg): Likewise.
7453 (sve_vq_from_vl): Likewise.
7454 (sve_vl_from_vq): Likewise.
7455 (sve_vq_from_vg): Likewise.
7456 (sve_vg_from_vq): Likewise.
7457 * configure.nat: Add new c file.
7458 * nat/aarch64-sve-linux-ptrace.c: New file.
7459 * nat/aarch64-sve-linux-ptrace.h: New file.
7460
7461 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7462
7463 * aarch64-linux-nat.c (aarch64_linux_read_description):
7464 Add parmeter zero.
7465 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7466 Likewise.
7467 * aarch64-tdep.c (tdesc_aarch64_list): Add.
7468 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7469 (aarch64_gdbarch_init): Add parmeter zero.
7470 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7471 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7472 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7473 parmeter.
7474 * doc/gdb.texinfo: Describe SVE feature
7475 * features/aarch64-sve.c: New file.
7476
7477 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
7478
7479 PR gdb/23210
7480 * gdbarch.sh (significant_addr_bit): Default to zero when
7481 not set by target architecture.
7482 * gdbarch.c: Re-generated.
7483 * utils.c (address_significant): Update.
7484
7485 2018-05-30 Joel Brobecker <brobecker@adacore.com>
7486
7487 * stack.c (func_command): Remove trailing newline in call to error.
7488
7489 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7490
7491 * regcache.h (regcache_raw_collect): Remove, update callers to
7492 use regcache::raw_collect.
7493 * regcache.c (regcache_raw_collect): Remove.
7494
7495 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7496
7497 * regcache.h (regcache_raw_supply): Remove, update callers to
7498 use detached_regcache::raw_supply.
7499 * regcache.c (regcache_raw_supply): Remove.
7500
7501 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7502
7503 * regcache.h (regcache_cooked_write_part): Remove, update
7504 callers to use regcache::cooked_write_part.
7505 * regcache.c (regcache_cooked_write_part): Remove.
7506
7507 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7508
7509 * regcache.h (regcache_cooked_read_part): Remove, update callers
7510 to use readable_regcache::cooked_read_part.
7511 * regcache.c (regcache_cooked_read_part): Remove.
7512
7513 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7514
7515 * regcache.h (regcache_cooked_read_value): Remove, update
7516 callers to use readable_regcache::cooked_read_value.
7517 * regcache.c (regcache_cooked_read_value): Remove.
7518
7519 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7520
7521 * regcache.h (regcache_cooked_write): Remove, update callers to
7522 use regcache::cooked_write.
7523 * regcache.c (regcache_cooked_write): Remove.
7524
7525 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7526
7527 * regcache.h (regcache_invalidate): Remove, update callers to
7528 use detached_regcache::invalidate instead.
7529 * regcache.c (regcache_invalidate): Remove.
7530
7531 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7532
7533 * regcache.h (regcache_raw_write_part): Remove, update callers
7534 to use regcache::raw_write_part instead.
7535 * regcache.c (regcache_raw_write_part): Remove.
7536
7537 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7538
7539 * regcache.h (regcache_raw_read_part): Remove, update callers to
7540 use readable_regcache::raw_read_part instead.
7541 * regcache.c (regcache_raw_read_part): Remove.
7542
7543 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7544
7545 * regcache.h (regcache_cooked_read): Remove, update callers to
7546 use readable_regcache::cooked_read instead.
7547 * regcache.c (regcache_cooked_read): Remove.
7548
7549 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7550
7551 * regcache.h (regcache_raw_write): Remove, update callers to use
7552 regcache::raw_write instead.
7553 * regcache.c (regcache_raw_write): Remove.
7554
7555 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7556
7557 * regcache.h (regcache_raw_read): Remove, update callers to use
7558 readable_regcache::raw_read instead.
7559 * regcache.c (regcache_raw_read): Remove.
7560
7561 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7562
7563 * regcache.h (regcache_raw_update): Remove, update callers to
7564 use readable_regcache::raw_update instead.
7565 * regcache.c (regcache_raw_update): Remove.
7566
7567 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7568
7569 * regcache.h (regcache_register_status): Remove, update callers
7570 to use reg_buffer::get_register_status directly instead.
7571 * regcache.c (regcache_register_status): Remove.
7572
7573 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7574
7575 * regcache.h (regcache_get_ptid): Remove, update all callers to
7576 call regcache::ptid instead.
7577 * regcache.c (regcache_get_ptid): Remove.
7578
7579 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7580
7581 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7582
7583 2018-05-30 Pedro Alves <palves@redhat.com>
7584
7585 * common/common-exceptions.h (exception_rethrow): Use
7586 ATTRIBUTE_NORETURN.
7587
7588 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
7589
7590 * breakpoint.c (print_solib_event, check_status_catch_solib):
7591 Remove struct keyword in range-based for loops.
7592 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7593 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7594 Likewise.
7595 * linespec.c (find_superclass_methods, search_minsyms_for_name):
7596 Likewise.
7597 * symfile.c (addr_info_make_relative): Likewise.
7598 * thread.c (value_in_thread_stack_temporaries): Likewise.
7599
7600 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
7601
7602 PR gdb/16841
7603 * valops.c (value_struct_elt_for_reference): Call check_typedef on
7604 aggregate type to get its real type before accessing it.
7605
7606 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
7607
7608 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7609 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7610 * coff-pe-read.c (add_pe_forwarded_sym): Replace
7611 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7612 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7613 * jit.c (jit_breakpoint_re_set_internal): Likewise.
7614 * printcmd.c (info_address_command): Likewise.
7615
7616 2018-05-29 Tom Tromey <tom@tromey.com>
7617
7618 * windows-nat.c (handle_exception): Update fall-through comment.
7619
7620 2018-05-29 Tom Tromey <tom@tromey.com>
7621
7622 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
7623 (struct program_space) <added_solibs>: Now a std::vector.
7624 * breakpoint.c (print_solib_event): Update.
7625 (check_status_catch_solib): Update.
7626 * progspace.c (clear_program_space_solib_cache): Update.
7627 * solib.c (update_solib_list): Update.
7628
7629 2018-05-29 Tom Tromey <tom@tromey.com>
7630
7631 * python/py-type.c (typy_richcompare): Update.
7632 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7633 * gdbtypes.h (types_deeply_equal): Return bool.
7634 (types_equal): Likewise.
7635 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
7636 declare VEC.
7637 (check_types_equal): Change worklist to std::vector. Return
7638 bool.
7639 (struct type_equality_entry): Add constructor.
7640 (compare_maybe_null_strings): Return bool.
7641 (check_types_worklist): Return bool. Change worklist to
7642 std::vector.
7643 (types_deeply_equal): Use std::vector.
7644 (types_equal): Return bool.
7645 (compare_maybe_null_strings): Simplify.
7646
7647 2018-05-29 Tom Tromey <tom@tromey.com>
7648
7649 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
7650
7651 2018-05-29 Tom Tromey <tom@tromey.com>
7652
7653 * objc-lang.h: Don't include cp-support.h.
7654 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
7655 declare VEC.
7656
7657 2018-05-27 Tom Tromey <tom@tromey.com>
7658
7659 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7660
7661 2018-05-25 Tom Tromey <tom@tromey.com>
7662
7663 * value.c (value::location): Initialize.
7664
7665 2018-05-25 Tom Tromey <tom@tromey.com>
7666
7667 * dbxread.c (init_bincl_list): Remove.
7668 (bincl_list): Now a std::vector.
7669 (bincls_allocated, next_bincl): Remove.
7670 (free_bincl_list, do_free_bincl_list_cleanup)
7671 (make_cleanup_free_bincl_list): Remove.
7672 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7673 unique_xmalloc_ptr.
7674 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7675 (struct header_file_location): Add constructor.
7676 (add_bincl_to_list): Remove.
7677
7678 2018-05-25 Tom Tromey <tom@tromey.com>
7679
7680 * tui/tui.c (tui_enable): Update.
7681 * mi/mi-interp.c (mi_interp::init): Update.
7682 * interps.h (class interp) <name>: New method.
7683 <m_name>: Rename from name.
7684 (~scoped_restore_interp): Update.
7685 * interps.c (interp::interp): Update.
7686 (interp_add, interp_set, interp_lookup_existing)
7687 (current_interp_named_p): Update.
7688
7689 2018-05-25 Tom Tromey <tom@tromey.com>
7690
7691 * interps.c (interp_name): Remove.
7692 * mi/mi-interp.c (mi_interp::init): Update.
7693 * interps.h (interp_name): Remove.
7694 (~scoped_restore_interp): Update.
7695 * tui/tui.c (tui_enable): Update.
7696
7697 2018-05-25 Tom Tromey <tom@tromey.com>
7698
7699 * utils.c (fputs_maybe_filtered): Update.
7700 * linespec.c (decode_line_full): Update.
7701 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7702 (mi_print_breakpoint_for_event, mi_solib_loaded)
7703 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7704 (mi_user_selected_context_changed): Update.
7705 * mi/mi-main.c (mi_execute_command): Update.
7706 * cli/cli-script.c (execute_control_command): Update.
7707 * python/python.c (execute_gdb_command): Update.
7708 * solib.c (info_sharedlibrary_command): Update.
7709 * interps.c (interp_ui_out): Remove.
7710 * interps.h (interp_ui_out): Remove.
7711
7712 2018-05-25 Tom Tromey <tom@tromey.com>
7713
7714 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7715 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7716 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7717
7718 2018-05-25 Tom Tromey <tom@tromey.com>
7719
7720 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7721 * interps.c (interp_exec): Use scoped_restore.
7722
7723 2018-05-25 Tom Tromey <tom@tromey.com>
7724
7725 * remote.c (remote_target::remote_file_get): Use
7726 gdb::byte_vector.
7727 (remote_target::remote_file_put): Likewise.
7728
7729 2018-05-25 Tom Tromey <tom@tromey.com>
7730
7731 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7732 a std::string.
7733 (get_pe_section_index, add_pe_exported_sym): Update.
7734 (read_pe_exported_syms): Use gdb::def_vector.
7735
7736 2018-05-25 Tom Tromey <tom@tromey.com>
7737
7738 * frame.c (remove_prev_frame): Remove.
7739 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7740
7741 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7742
7743 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7744 Remove prototypes.
7745 * mips-linux-nat.c (supply_fpregset): Always call
7746 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7747 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7748 `mips_fill_fpregset'.
7749 * mips-linux-tdep.c (mips_supply_fpregset)
7750 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7751 (mips_fill_fpregset_wrapper): Remove functions.
7752 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7753 (mips_linux_fpregset): Remove variable.
7754 (mips_linux_iterate_over_regset_sections): Use
7755 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7756 (mips_linux_o32_sigframe_init): Remove comment.
7757
7758 2018-05-25 Pedro Alves <palves@redhat.com>
7759
7760 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7761 (struct readahead_cache, struct packet_reg, struct
7762 remote_arch_state, class remote_state): Move higher up in the
7763 file.
7764 (remote_target::m_remote_state): Now an object instead of a pointer.
7765 (remote_target::get_remote_state): Adjust.
7766
7767 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7768
7769 * stack.c (select_and_print_frame): Delete.
7770 (struct function_bounds): Move struct within function.
7771 (func_command): Most content moved into new function
7772 find_frame_for_function, use new function, print result, add
7773 function comment.
7774 (find_frame_for_function): New function, now returns a result.
7775
7776 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7777
7778 * stack.c (iterate_over_block_arg_vars): Fix comment.
7779 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7780
7781 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7782
7783 PR gdb/23203
7784 * frame.c
7785 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7786 Define.
7787 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7788 Define.
7789 * frame.h (class scoped_restore_selected_frame): New class.
7790 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7791 of any exception, use scoped_restore_selected_frame to restore the
7792 frame instead.
7793
7794 2018-05-24 Pedro Alves <palves@redhat.com>
7795
7796 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7797 override.
7798
7799 2018-05-23 Tom Tromey <tom@tromey.com>
7800
7801 * complaints.c (struct complaints): Remove.
7802 (symfile_complaint_book): Remove.
7803 (series): New global.
7804 (complaint_internal): Update.
7805 (clear_complaints): Update.
7806
7807 2018-05-23 Tom Tromey <tom@tromey.com>
7808
7809 * complaints.c (counters): New global.
7810 (struct complain): Remove.
7811 (struct complaints) <root>: Remove.
7812 (complaint_sentinel): Remove.
7813 (symfile_complaint_book): Update.
7814 (find_complaint) Remove.
7815 (complaint_internal, clear_complaints): Update.
7816
7817 2018-05-23 Tom Tromey <tom@tromey.com>
7818
7819 * complaints.c (struct complain) <file, line>: Remove.
7820 (find_complaint): Remove file, line parameters.
7821 (complaint_internal): Update.
7822
7823 2018-05-23 Tom Tromey <tom@tromey.com>
7824
7825 * complaints.c (vcomplaint): Remove.
7826 (complaint_internal) Merge in contents of vcomplaint.
7827
7828 2018-05-23 Tom Tromey <tom@tromey.com>
7829
7830 * complaints.c (struct complaints) <explanation>: Remove.
7831 (symfile_explanations): Remove.
7832 (symfile_complaint_book): Update.
7833 (vcomplaint): Update.
7834 (struct explanation): Remove.
7835
7836 2018-05-23 Tom Tromey <tom@tromey.com>
7837
7838 * complaints.c (symfile_complaints): Remove.
7839 (complaint_internal): Remove "complaints" parameter.
7840 (clear_complaints, vcomplaint): Remove "c" parameter.
7841 (get_complaints): Remove.
7842 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7843 (dwarf2_debug_line_missing_file_complaint)
7844 (dwarf2_debug_line_missing_end_sequence_complaint)
7845 (dwarf2_complex_location_expr_complaint)
7846 (dwarf2_const_value_length_mismatch_complaint)
7847 (dwarf2_section_buffer_overflow_complaint)
7848 (dwarf2_macro_malformed_definition_complaint)
7849 (dwarf2_invalid_attrib_class_complaint)
7850 (create_addrmap_from_index, dw2_symtab_iter_next)
7851 (dw2_expand_marked_cus)
7852 (dw2_debug_names_iterator::find_vec_in_debug_names)
7853 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7854 (create_debug_type_hash_table, init_cutu_and_read_dies)
7855 (partial_die_parent_scope, add_partial_enumeration)
7856 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7857 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7858 (read_import_statement, read_file_scope, create_dwo_cu_reader)
7859 (create_cus_hash_table, create_dwp_hash_table)
7860 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7861 (dwarf2_rnglists_process, dwarf2_ranges_process)
7862 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7863 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7864 (handle_struct_member_die, process_structure_scope)
7865 (read_array_type, read_common_block, read_module_type)
7866 (read_tag_pointer_type, read_typedef, read_base_type)
7867 (read_subrange_type, load_partial_dies, partial_die_info::read)
7868 (partial_die_info::read, partial_die_info::read)
7869 (partial_die_info::read, read_checked_initial_length_and_offset)
7870 (dwarf2_string_attr, read_formatted_entries)
7871 (dwarf_decode_line_header)
7872 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7873 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7874 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7875 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7876 (get_signatured_type, get_DW_AT_signature_type)
7877 (decode_locdesc, file_file_name, consume_improper_spaces)
7878 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7879 (dwarf_decode_macro_bytes, dwarf_decode_macros)
7880 (dwarf2_symbol_mark_computed, set_die_type)
7881 (read_attribute_value): Update.
7882 * stap-probe.c (handle_stap_probe, get_stap_base_address):
7883 Update.
7884 * dbxread.c (unknown_symtype_complaint)
7885 (lbrac_mismatch_complaint, repeated_header_complaint)
7886 (set_namestring, function_outside_compilation_unit_complaint)
7887 (read_dbx_symtab, process_one_symbol): Update.
7888 * gdbtypes.c (stub_noname_complaint): Update.
7889 * windows-nat.c (handle_unload_dll): Update.
7890 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7891 (decode_base_type): Update.
7892 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7893 (eb_complaint, record_include_begin, record_include_end)
7894 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7895 (process_xcoff_symbol, read_symbol)
7896 (function_outside_compilation_unit_complaint)
7897 (scan_xcoff_symtab): Update.
7898 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7899 * buildsym.c (finish_block_internal, make_blockvector)
7900 (end_symtab_get_static_block, augment_type_symtab): Update.
7901 * dtrace-probe.c (dtrace_process_dof)
7902 (dtrace_static_probe_ops::get_probes): Update.
7903 * complaints.h (struct complaint): Don't declare.
7904 (symfile_complaints): Remove.
7905 (complaint_internal): Remove "complaints" parameter.
7906 (complaint): Likewise.
7907 (clear_complaints): Likewise.
7908 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7909 (reread_symbols): Update.
7910 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7911 (dwarf2_frame_cache, decode_frame_entry): Update.
7912 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7913 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7914 (info_selectors_command): Update.
7915 * macrotab.c (macro_include, check_for_redefinition)
7916 (macro_undef): Update.
7917 * objfiles.c (filter_overlapping_sections): Update.
7918 * stabsread.c (invalid_cpp_abbrev_complaint)
7919 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7920 (define_symbol, error_type, read_type, rs6000_builtin_type)
7921 (stabs_method_name_from_physname, read_member_functions)
7922 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7923 (attach_fields_to_type, complain_about_struct_wipeout)
7924 (read_range_type, read_args, common_block_start)
7925 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7926 Update.
7927 * mdebugread.c (index_complaint, unknown_ext_complaint)
7928 (basic_type_complaint, bad_tag_guess_complaint)
7929 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7930 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7931 (parse_procedure, parse_lines)
7932 (function_outside_compilation_unit_complaint)
7933 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7934 (bad_tag_guess_complaint, reg_value_complaint): Update.
7935 * cp-support.c (demangled_name_complaint): Update.
7936 * macroscope.c (sal_macro_scope): Update.
7937 * dwarf-index-write.c (class debug_names): Update.
7938
7939 2018-05-23 Tom Tromey <tom@tromey.com>
7940
7941 * complaints.c (clear_complaints): Remove "noisy" parameter.
7942 * complaints.h (clear_complaints): Update.
7943 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7944 (reread_symbols): Update.
7945
7946 2018-05-23 Tom Tromey <tom@tromey.com>
7947
7948 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7949 SUBSEQUENT_MESSAGE.
7950 (vcomplaint, clear_complaints): Update.
7951 (symfile_explanations): Remove some messages.
7952
7953 2018-05-23 Tom Tromey <tom@tromey.com>
7954
7955 * complaints.c (internal_complaint): Remove.
7956 * complaints.h (internal_complaint): Remove.
7957
7958 2018-05-22 Maciej W. Rozycki <macro@mips.com>
7959
7960 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7961
7962 2018-05-22 Pedro Alves <palves@redhat.com>
7963
7964 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7965 (remote_fileio_badfd, remote_fileio_return_errno)
7966 (remote_fileio_return_success, remote_fileio_func_open)
7967 (remote_fileio_func_open, remote_fileio_func_close)
7968 (remote_fileio_func_read, remote_fileio_func_write)
7969 (remote_fileio_func_lseek, remote_fileio_func_rename)
7970 (remote_fileio_func_unlink, remote_fileio_func_stat)
7971 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7972 (remote_fileio_func_isatty, remote_fileio_func_system): Add
7973 remote_target parameter.
7974 (remote_fio_func_map) <func>: Add remote_target parameter.
7975 (do_remote_fileio_request, remote_fileio_request):
7976 * remote-fileio.h (remote_fileio_request):
7977 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7978 remote_target parameter.
7979 (remote_notif_process, handle_notification): Adjust to pass down
7980 the remote.
7981 (remote_notif_state_allocate): Add remote_target parameter. Save
7982 it.
7983 * remote-notif.h (struct remote_target): Forward declare.
7984 (struct notif_client) <parse, ack, can_get_pending_events>: Add
7985 remote_target parameter.
7986 (struct remote_notif_state) <remote>: New field.
7987 (remote_notif_ack, remote_notif_parse): Add remote_target
7988 parameter.
7989 (remote_notif_state_allocate, remote_notif_state_allocate): Add
7990 remote_target parameter.
7991 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7992 (threads_listing_context, rmt_thread_action, protocol_feature)
7993 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7994 (packet_result, struct threads_listing_context, remote_state):
7995 Move definitions and declarations higher up.
7996 (remote_target) <~remote_target>: Declare.
7997 (remote_download_command_source, remote_file_put, remote_file_get)
7998 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7999 (remote_hostio_pread_vFile, remote_hostio_send_command)
8000 (remote_hostio_set_filesystem, remote_hostio_open)
8001 (remote_hostio_close, remote_hostio_unlink, remote_state)
8002 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8003 (get_memory_write_packet_size, get_memory_read_packet_size)
8004 (append_pending_thread_resumptions, remote_detach_1)
8005 (append_resumption, remote_resume_with_vcont)
8006 (add_current_inferior_and_thread, wait_ns, wait_as)
8007 (process_stop_reply, remote_notice_new_inferior)
8008 (process_initial_stop_replies, remote_add_thread)
8009 (btrace_sync_conf, remote_btrace_maybe_reopen)
8010 (remove_new_fork_children, kill_new_fork_children)
8011 (discard_pending_stop_replies, stop_reply_queue_length)
8012 (check_pending_events_prevent_wildcard_vcont)
8013 (discard_pending_stop_replies_in_queue, stop_reply)
8014 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8015 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8016 (remote_interrupt_as, remote_interrupt_ns)
8017 (remote_get_noisy_reply, remote_query_attached)
8018 (remote_add_inferior, remote_current_thread, get_current_thread)
8019 (set_thread, set_general_thread, set_continue_thread)
8020 (set_general_process, write_ptid)
8021 (remote_unpack_thread_info_response, remote_get_threadinfo)
8022 (parse_threadlist_response, remote_get_threadlist)
8023 (remote_threadlist_iterator, remote_get_threads_with_ql)
8024 (remote_get_threads_with_qxfer)
8025 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8026 (get_offsets, remote_check_symbols, remote_supported_packet)
8027 (remote_query_supported, remote_packet_size)
8028 (remote_serial_quit_handler, remote_detach_pid)
8029 (remote_vcont_probe, remote_resume_with_hc)
8030 (send_interrupt_sequence, interrupt_query)
8031 (remote_notif_get_pending_events, fetch_register_using_p)
8032 (send_g_packet, process_g_packet, fetch_registers_using_g)
8033 (store_register_using_P, store_registers_using_G)
8034 (set_remote_traceframe, check_binary_download)
8035 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8036 (remote_xfer_live_readonly_partial, remote_read_bytes)
8037 (remote_send_printf, remote_flash_write, readchar)
8038 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8039 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8040 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8041 (extended_remote_disable_randomization, extended_remote_run)
8042 (send_environment_packet, extended_remote_environment_support)
8043 (extended_remote_set_inferior_cwd, remote_write_qxfer)
8044 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8045 (packet_command): Now methods of ...
8046 (remote_target): ... this class.
8047 (m_remote_state) <remote_target>: New field.
8048 (struct remote_state) <stop_reply_queue,
8049 remote_async_inferior_event_token, wait_forever_enabled_p>: New
8050 fields.
8051 (remote_state::remote_state): Allocate stop_reply_queue.
8052 (remote_state): Delete global.
8053 (get_remote_state_raw): Delete.
8054 (remote_target::get_remote_state): Allocate m_remote_state on
8055 demand.
8056 (get_current_remote_target): New.
8057 (remote_ops, extended_remote_ops): Delete.
8058 (wait_forever_enabled_p, remote_async_inferior_event_token):
8059 Delete, moved to struct remote_state.
8060 (remote_target::close): Delete self. Destruction bits split to
8061 ...
8062 (remote_target::~remote_target): ... this.
8063 (show_memory_packet_size): Adjust to use
8064 get_current_remote_target.
8065 (struct protocol_feature) <func>: Add remote_target parameter.
8066 All callers adjusted.
8067 (curr_quit_handler_target): New.
8068 (remote_serial_quit_handler): Reimplement.
8069 (remote_target::open_1): Adjust to use get_current_remote_target.
8070 Heap-allocate remote_target/extended_remote_target instances.
8071 (vcont_builder::vcont_builder): Add remote_target parameter, and
8072 save it in m_remote. All callers adjusted.
8073 (vcont_builder::m_remote): New field.
8074 (vcont_builder::restart, vcont_builder::flush)
8075 (vcont_builder::push_action): Use it.
8076 (remote_target::commit_resume): Use it.
8077 (struct queue_iter_param) <remote>: New field.
8078 (remote_target::remove_new_fork_children): Fill in 'remote' field.
8079 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8080 (check_pending_event_prevents_wildcard_vcont_callback)
8081 (remote_target::check_pending_events_prevent_wildcard_vcont)
8082 (remote_target::discard_pending_stop_replies)
8083 (remote_target::discard_pending_stop_replies_in_queue)
8084 (remote_target::remote_notif_remove_queued_reply): Fill in
8085 'remote' field.
8086 (remote_notif_get_pending_events): New.
8087 (remote_target::readchar, remote_target::remote_serial_write):
8088 Save/restore curr_quit_handler_target.
8089 (putpkt): New.
8090 (kill_new_fork_children): Fill in 'remote' field.
8091 (packet_command): Use get_current_remote_target, defer to
8092 remote_target method of same name.
8093 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8094 parameter, and save it in m_remote. All callers adjusted.
8095 (scoped_remote_fd::release): Use m_remote.
8096 (scoped_remote_fd::m_remote): New field.
8097 (remote_file_put, remote_file_get, remote_file_delete): Use
8098 get_current_remote_target, defer to remote_target method of same
8099 name.
8100 (remote_btrace_reset): Add remote_state paremeter. Update all
8101 callers.
8102 (remote_async_inferior_event_handler). Pass down 'data'.
8103 (remote_new_objfile): Use get_current_remote_target.
8104 (remote_target::vcont_r_supported): New.
8105 (set_range_stepping): Use get_current_remote_target and
8106 remote_target::vcont_r_supported.
8107 (_initialize_remote): Don't allocate 'remote_state' and
8108 'stop_reply_queue' globals.
8109 * remote.h (struct remote_target): Forward declare.
8110 (getpkt, putpkt, remote_notif_get_pending_events): Add
8111 'remote_target' parameter.
8112
8113 2018-05-22 Pedro Alves <palves@redhat.com>
8114
8115 * remote.c (vcont_builder): Now a class. Make all data members
8116 private.
8117 (vcont_builder) <vcont_builder, restart, flush, push_action>:
8118 Declare methods.
8119 (vcont_builder_restart): Rename to ...
8120 (vcont_builder::restart): ... this.
8121 (vcont_builder_flush): Rename to ...
8122 (vcont_builder::flush): ... this.
8123 (vcont_builder_push_action): Rename to ...
8124 (vcont_builder::push_action): ... this.
8125 (remote_target::commit_resume): Adjust.
8126
8127 2018-05-22 Pedro Alves <palves@redhat.com>
8128
8129 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8130 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8131 (get_fixed_memory_packet_size): New.
8132 (get_memory_packet_size): Use it.
8133 (set_memory_packet_size): Don't override the config size with
8134 DEFAULT_MAX_MEMORY_PACKET_SIZE.
8135 (show_memory_packet_size): Use get_fixed_memory_packet_size.
8136 Don't refer to get_memory_packet_size if not connected to a remote
8137 target. Show "(default)" if configured size is 0.
8138
8139 2018-05-22 Pedro Alves <palves@redhat.com>
8140
8141 * remote.c (remote_target::mourn_inferior): Move
8142 discard_pending_stop_replies call here from ...
8143 (_initialize_remote): ... here.
8144
8145 2018-05-22 Pedro Alves <palves@redhat.com>
8146
8147 * remote.c (compare_section_command): Remove set_general_process
8148 call.
8149
8150 2018-05-22 Pedro Alves <palves@redhat.com>
8151
8152 * remote.c (struct packet_reg, struct remote_arch_state):
8153 Move higher up in the file.
8154 (remote_state) <m_arch_states>: Store remote_arch_state values
8155 instead of remote_arch_state pointers.
8156 (remote_state::get_remote_arch_state): Adjust.
8157
8158 2018-05-22 Pedro Alves <palves@redhat.com>
8159
8160 * remote.c: Include <unordered_map>.
8161 (remote_state): Now a class.
8162 (remote_state) <get_remote_arch_state>: Declare method.
8163 <get_remote_arch_state>: New field.
8164 (remote_arch_state) <remote_arch_state>: Declare ctor.
8165 <regs>: Now a unique_ptr.
8166 (remote_gdbarch_data_handle): Delete.
8167 (get_remote_arch_state): Delete.
8168 (remote_state::get_remote_arch_state): New.
8169 (get_remote_state): Adjust to call remote_state's
8170 get_remote_arch_state method.
8171 (init_remote_state): Delete, bits factored out to ...
8172 (remote_arch_state::remote_arch_state): ... this new method.
8173 (get_remote_packet_size, get_memory_packet_size)
8174 (process_g_packet, remote_target::fetch_registers)
8175 (remote_target::prepare_to_store, store_registers_using_G)
8176 (remote_target::store_registers, remote_target::get_trace_status):
8177 Adjust to call remote_state's method.
8178 (_initialize_remote): Remove reference to
8179 remote_gdbarch_data_handle.
8180
8181 2018-05-22 Pedro Alves <palves@redhat.com>
8182
8183 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8184 pread>: New method declarations.
8185 (remote_target::open_1): Adjust.
8186 (readahead_cache_invalidate): Rename to ...
8187 (readahead_cache::invalidate): ... this, and adjust to be a class
8188 method.
8189 (readahead_cache_invalidate_fd): Rename to ...
8190 (readahead_cache::invalidate_fd): ... this, and adjust to be a
8191 class method.
8192 (remote_hostio_pwrite): Adjust.
8193 (remote_hostio_pread_from_cache): Rename to ...
8194 (readahead_cache::pread): ... this, and adjust to be a class
8195 method.
8196 (remote_hostio_close): Adjust.
8197
8198 2018-05-22 Pedro Alves <palves@redhat.com>
8199
8200 * remote.c (remote_hostio_close_cleanup): Delete.
8201 (class scoped_remote_fd): New.
8202 (remote_file_put, remote_file_get): Use it.
8203
8204 2018-05-22 Pedro Alves <palves@redhat.com>
8205
8206 (struct vCont_action_support): Use bool and initialize all fields.
8207 (struct readahead_cache): Initialize all fields.
8208 (remote_state): Use bool and initialize all fields.
8209 (remote_state::remote_state, remote_state::~remote_state): New.
8210 (new_remote_state): Delete.
8211 (_initialize_remote): Use new to allocate remote_state.
8212
8213 2018-05-22 Pedro Alves <palves@redhat.com>
8214 張俊芝 <zjz@zjz.name>
8215
8216 PR gdb/22973
8217 * c-exp.y: Include "c-support.h".
8218 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8219 of tolower. Use c_ident_is_alpha to scan names.
8220 * c-lang.c: Include "c-support.h".
8221 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8222 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8223 * c-support.h: New file, with bits factored out from ...
8224 * cp-name-parser.y: ... this file.
8225 Include "c-support.h".
8226 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8227 c-support.h and renamed.
8228 (symbol_end, yylex): Adjust.
8229
8230 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8231
8232 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8233 parameter type to CORE_ADDR.
8234 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8235 parameter type in declaration to CORE_ADDR.
8236 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8237 target_auxv_search to get AT_HWCAP and use the result to get the
8238 target description.
8239 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8240 to CORE_ADDR. Remove the cast of the return value to unsigned
8241 long. Fix error predicate of target_auxv_search.
8242 (ppc_linux_nat_target::read_description): Change the type of the
8243 hwcap variable to CORE_ADDR.
8244
8245 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8246
8247 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8248 if the size of fpscr is larger than 32 bits.
8249
8250 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8251
8252 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8253 (ppc32_linux_vsxregmap): New global.
8254 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8255 regcache_supply_regset, and regcache_collect_regset.
8256 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8257 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8258 (fetch_vsx_register, store_vsx_register): Remove.
8259 (fetch_vsx_registers): Add regno parameter. Get regset using
8260 ppc_linux_vsxregset. Use regset to supply registers.
8261 (store_vsx_registers): Add regno parameter. Get regset using
8262 ppc_linux_vsxregset. Use regset to collect registers.
8263 (fetch_register): Call fetch_vsx_registers instead of
8264 fetch_vsx_register.
8265 (store_register): Call store_vsx_registers instead of
8266 store_vsx_register.
8267 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8268 new regno parameter.
8269 (store_ppc_registers): Call store_vsx_registers with -1 for the
8270 new regno parameter.
8271 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8272 (ppc_collect_vsxregset): Remove.
8273
8274 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8275
8276 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8277 offset fields.
8278 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8279 for vector register offset fields.
8280 (ppc64_fbsd_reg_offsets): Likewise.
8281 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8282 to vector register offset fields.
8283 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8284 to vector register offset fields.
8285 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8286 vector register offset fields.
8287 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8288 initializers for vector register offset fields.
8289 (rs6000_aix64_reg_offsets): Likewise.
8290 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8291 (ppc_supply_vrregset): Remove.
8292 (ppc_collect_vrregset): Remove.
8293 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8294 (ppc_linux_vrregset) : New function.
8295 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8296 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8297 (ppc32_linux_vrregset): Remove.
8298 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8299 and use result instead of ppc32_linux_vrregset.
8300 (ppc32_linux_reg_offsets): Remove initializers for vector register
8301 offset fields.
8302 (ppc64_linux_reg_offsets): Likewise.
8303 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8304 * ppc-linux-nat.c: Include regset.h.
8305 (gdb_vrregset_t): Adjust comment to account for little-endian
8306 mode.
8307 (supply_vrregset, fill_vrregset): Remove.
8308 (fetch_altivec_register, store_altivec_register): Remove.
8309 (fetch_altivec_registers): Add regno parameter. Get regset using
8310 ppc_linux_vrregset. Use regset to supply registers.
8311 (store_altivec_registers): Add regno parameter. Get regset using
8312 ppc_linux_vrregset. Use regset to collect registers.
8313 (fetch_register): Call fetch_altivec_registers instead of
8314 fetch_altivec_register.
8315 (store_register): Call store_altivec_registers instead of
8316 store_altivec_register.
8317 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8318 the new regno parameter.
8319 (store_ppc_registers): Call store_altivec_registers with -1 for
8320 the new regno parameter.
8321
8322 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8323
8324 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8325 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8326 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8327 (gdb_vrregset_t): Change array type size to
8328 PPC_LINUX_SIZEOF_VRREGSET.
8329 (gdb_vsxregset_t): Change array type size to
8330 PPC_LINUX_SIZEOF_VSXREGSET.
8331 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8332 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8333 PPC_LINUX_SIZEOF_VSXREGSET.
8334
8335 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8336
8337 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8338 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8339 nat/ppc-linux.c.
8340 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8341 ppc_linux_target_wordsize with tid.
8342 (ppc_linux_nat_target::read_description): Call ppc_linux_target
8343 wordsize with tid.
8344 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8345 (ppc64_64bit_inferior_p): Add static and inline specifiers.
8346 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8347 tid parameter. Remove static specifier.
8348 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8349 (ppc_linux_target_wordsize): New declaration.
8350
8351 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8352
8353 * arch/ppc-linux-common.c: New file.
8354 * arch/ppc-linux-common.h: New file.
8355 * arch/ppc-linux-tdesc.h: New file.
8356 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8357 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8358 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8359 arch/ppc-linux-tdesc.h.
8360 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8361 arch/ppc-linux-tdesc.h.
8362 (ppc_linux_nat_target::read_description): Remove target
8363 description matching code. Fill a ppc_linux_features struct and
8364 call ppc_linux_match_description with it. Move comment about ISA
8365 2.05 to ppc-linux-common.c.
8366 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8367 arch/ppc-linux-tdesc.h.
8368 (ppc_linux_core_read_description): Remove target description
8369 matching code. Fill a ppc_linux_features struct and call
8370 ppc_linux_match_description with it.
8371 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8372 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8373 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8374 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8375 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8376 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8377 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8378 (tdesc_powerpc_e500l): Remove.
8379
8380 2018-05-22 Joel Brobecker <brobecker@adacore.com>
8381
8382 * ada-lang.c (catch_assert_command): Pass empty string instead
8383 of NULL for excep_string argument.
8384
8385 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8386
8387 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8388 the width of the requested register exceeds the width of the
8389 `ptrace' data type.
8390
8391 2018-05-21 Tom Tromey <tom@tromey.com>
8392
8393 * printcmd.c (output_command): Remove.
8394 (output_command_const): Rename to output_command.
8395 * valprint.h (output_command): Rename from output_command_const.
8396 * tracepoint.c (trace_dump_actions): Call output_command.
8397
8398 2018-05-21 Tom Tromey <tom@tromey.com>
8399
8400 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8401 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8402 * ada-lang.h (create_ada_exception_catchpoint): Update.
8403 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8404 std::string.
8405 (create_excep_cond_exprs, ~ada_catchpoint)
8406 (should_stop_exception, print_one_exception)
8407 (print_mention_exception, print_recreate_exception): Update.
8408 (ada_get_next_arg): Remove.
8409 (catch_ada_exception_command_split): Use std::string. Change type
8410 of "excep_string", "cond_string".
8411 (catch_ada_exception_command): Update.
8412 (create_ada_exception_catchpoint): Change type of excep_string.
8413 (ada_exception_sal): Remove excep_string parameter.
8414 (~ada_catchpoint): Remove.
8415
8416 2018-05-21 Tom Tromey <tom@tromey.com>
8417
8418 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8419 cleanup.
8420
8421 2018-05-21 Tom Tromey <tom@tromey.com>
8422
8423 * ada-lang.c (ada_exception_message_1, ada_exception_message):
8424 Return unique_xmalloc_ptr.
8425 (print_it_exception): Update.
8426
8427 2018-05-21 Tom Tromey <tom@tromey.com>
8428
8429 * tracepoint.c (trace_dump_actions): Use std::string.
8430
8431 2018-05-21 Tom Tromey <tom@tromey.com>
8432
8433 * symfile.c (reread_symbols): Use std::string for original_name.
8434
8435 2018-05-21 Tom Tromey <tom@tromey.com>
8436
8437 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8438 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
8439 constructor.
8440
8441 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
8442
8443 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8444 instance to...
8445 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8446 * objfiles.c (get_objfile_bfd_data): Allocate
8447 objfile_per_bfd_storage with obstack_new when allocating on
8448 obstack.
8449
8450 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8451
8452 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8453 OBSTACK_ZALLOC.
8454 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8455 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8456 * mdebugread.c (mdebug_build_psymtabs): Likewise.
8457 (add_pending): Likewise.
8458 (parse_symbol): Likewise.
8459 (parse_partial_symbols): Likewise.
8460 (psymtab_to_symtab_1): Likewise.
8461 (new_psymtab): Likewise.
8462 (elfmdebug_build_psymtabs): Likewise.
8463 * minsyms.c (terminate_minimal_symbol_table): Likewise.
8464 * objfiles.c (get_objfile_bfd_data): Likewise.
8465 (objfile_register_static_link): Likewise.
8466 * psymtab.c (allocate_psymtab): Likewise.
8467 * stabsread.c (read_member_functions): Likewise.
8468 * xcoffread.c (xcoff_end_psymtab): Likewise.
8469
8470 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8471
8472 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8473 compiler supports std::is_trivially_constructible.
8474 * common/poison.h: Include obstack.h.
8475 (IsMallocable): Define to is_trivially_constructible if the
8476 compiler supports it, define to true_type otherwise.
8477 (xobnew): New.
8478 (XOBNEW): Redefine.
8479 (xobnewvec): New.
8480 (XOBNEWVEC): Redefine.
8481 * gdb_obstack.h (obstack_zalloc): New.
8482 (OBSTACK_ZALLOC): Redefine.
8483 (obstack_calloc): New.
8484 (OBSTACK_CALLOC): Redefine.
8485 (obstack_new): New.
8486 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8487 (gdbarch_obstack): New declaration in gdbarch.h, definition in
8488 gdbarch.c.
8489 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8490 obstack_calloc/obstack_zalloc.
8491 (gdbarch_obstack_zalloc): Remove.
8492 * target-descriptions.c (tdesc_data_init): Use obstack_new.
8493
8494 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8495
8496 * stack.c (backtrace_command_1): Remove useless variable int i.
8497
8498 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8499
8500 * stack.c (print_frame_info): Fix comment.
8501
8502 2018-05-18 Tom Tromey <tom@tromey.com>
8503
8504 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8505 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8506 (~dwarf2_per_objfile): Update
8507 (dwarf2_get_dwz_file): Use new.
8508 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8509 unique_ptr.
8510
8511 2018-05-18 Tom Tromey <tom@tromey.com>
8512
8513 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8514 unique_ptr.
8515 * dwarf2read.c (struct dwp_file): Add constructor and
8516 initializers.
8517 (open_and_init_dwp_file): Return a unique_ptr.
8518 (dwarf2_per_objfile, create_dwp_hash_table)
8519 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8520 (lookup_dwo_unit_in_dwp): Update.
8521 (open_and_init_dwp_file, get_dwp_file): Update.
8522
8523 2018-05-18 Tom Tromey <tom@tromey.com>
8524
8525 * dwarf2read.c (dwarf2_per_objfile): Update.
8526 (struct mapped_index): Add initializers.
8527 (dwarf2_read_index): Use new.
8528 (dw2_symtab_iter_init): Update.
8529 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8530 unique_ptr.
8531
8532 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8533
8534 * dwarf2read.c (mapped_index) <total_size>: Remove.
8535
8536 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8537
8538 * unittests/format_pieces-selftests.c (test_format_specifier):
8539 Add ARI comments.
8540
8541 2018-05-18 Tom Tromey <tom@tromey.com>
8542
8543 * c-typeprint.c (maybe_print_hole): New function.
8544 (c_print_type_struct_field_offset): Update.
8545 (c_type_print_base_struct_union): Call maybe_print_hole.
8546
8547 2018-05-17 Keith Seitz <keiths@redhat.com>
8548
8549 * breakpoint.c (build_bpstat_chain): New function, moved from
8550 bpstat_stop_status.
8551 (bpstat_stop_status): Add optional parameter, `stop_chain'.
8552 If no stop chain is passed, call build_bpstat_chain to build it.
8553 * breakpoint.h (build_bpstat_chain): Declare.
8554 (bpstat_stop_status): Move documentation here from breakpoint.c.
8555 * infrun.c (handle_signal_stop): Before eliding inlined frames,
8556 build the stop chain and pass it to skip_inline_frames.
8557 Pass this stop chain to bpstat_stop_status.
8558 * inline-frame.c: Include breakpoint.h.
8559 (stopped_by_user_bp_inline_frame): New function.
8560 (skip_inline_frames): Add parameter `stop_chain'.
8561 Move documention to inline-frame.h.
8562 If non-NULL, use stopped_by_user_bp_inline_frame to determine
8563 whether the frame should be elided.
8564 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8565 Add moved documentation and update for new parameter.
8566
8567 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8568
8569 PR cli/14975
8570 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8571 unittests/format_pieces-selftests.c.
8572 * common/format.h (format_piece) <operator==>: New.
8573 (format_pieces) <operator[]>: Remove.
8574 * common/format.c (format_pieces::format_pieces): Handle \e.
8575 * unittests/format_pieces-selftests.c: New.
8576
8577 2018-05-17 Tom Tromey <tom@tromey.com>
8578
8579 PR symtab/23010:
8580 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8581 (dw2_instantiate_symtab): Add skip_partial parameter.
8582 (dw2_find_last_source_symtab, dw2_map_expand_apply)
8583 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8584 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8585 (dw2_expand_symtabs_matching_one)
8586 (dw2_find_pc_sect_compunit_symtab)
8587 (dw2_debug_names_lookup_symbol)
8588 (dw2_debug_names_expand_symtabs_for_function): Update.
8589 (init_cutu_and_read_dies): Add skip_partial parameter.
8590 (process_psymtab_comp_unit, build_type_psymtabs_1)
8591 (process_skeletonless_type_unit, load_partial_comp_unit)
8592 (psymtab_to_symtab_1): Update.
8593 (load_full_comp_unit): Add skip_partial parameter.
8594 (process_imported_unit_die, dwarf2_read_addr_index)
8595 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8596 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8597 (read_signatured_type): Update.
8598
8599 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8600
8601 * value.c (release_value): Remove unused variable.
8602 (record_latest_value): Likewise.
8603 (access_value_history): Likewise.
8604 (preserve_values): Likewise.
8605
8606 2018-05-17 Tom Tromey <tom@tromey.com>
8607
8608 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8609 Initialize.
8610
8611 2018-05-16 Maciej W. Rozycki <macro@mips.com>
8612
8613 PR gdb/22286
8614 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8615 Also handle registers whose width is not a multiple of
8616 PTRACE_TYPE_RET.
8617 (linux_nat_trad_target::store_register): Likewise.
8618
8619 2018-05-16 Tom Tromey <tom@tromey.com>
8620
8621 * gdbcore.h (core_bfd): Redefine.
8622 * corelow.c (core_target::close): Update.
8623 (core_target_open): Update.
8624 * progspace.h (struct program_space) <cbfd>: Now a
8625 gdb_bfd_ref_ptr.
8626
8627 2018-05-16 Tom Tromey <tom@tromey.com>
8628
8629 PR cli/19551:
8630 * symfile-add-flags.h (enum symfile_add_flags)
8631 <SYMFILE_NOT_FILENAME>: New constant.
8632 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
8633 objfile name from BFD.
8634 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8635 * minidebug.c (find_separate_debug_file_in_section): Put
8636 ".gnu_debugdata" into BFD's file name.
8637
8638 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
8639
8640 * regcache.c (regcache_read_ftype, regcache_write_ftype):
8641 Remove.
8642
8643 2018-05-15 Tamar Christina <tamar.christina@arm.com>
8644
8645 PR binutils/21446
8646 * aarch64-tdep.c (aarch64_analyze_prologue,
8647 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8648 Indicate not interested in errors.
8649
8650 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8651
8652 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8653 Supply the MIPS_ZERO_REGNUM register.
8654
8655 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8656
8657 * mips-tdep.c (mask_address_var): Make variable static.
8658
8659 2018-05-14 Tom Tromey <tom@tromey.com>
8660
8661 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8662
8663 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
8664
8665 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8666 FXSAVE_ADDR for the mxcsr register.
8667
8668 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
8669
8670 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8671
8672 2018-05-11 Pedro Alves <palves@redhat.com>
8673
8674 * corelow.c (core_target) <core_target>: No longer inline.
8675 Initialize m_core_gdbarch, m_core_vec and build the section table
8676 here.
8677 <~core_target>: New.
8678 <core_gdbarch, get_core_register_section>: New methods.
8679 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8680 factored out from ...
8681 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8682 (core_ops): Delete.
8683 (sniff_core_bfd): Add gdbarch parameter.
8684 (core_close): Delete, merged into ...
8685 (core_target::close): ... here. Delete self.
8686 (core_close_cleanup): Delete.
8687 (core_target_open): Allocate a core_target on the heap. Use a
8688 unique_ptr instead of a cleanup. Bits moved into the core_target
8689 ctor. Adjust to use core_target methods instead of globals.
8690 (get_core_register_section): Rename to ...
8691 (core_target::get_core_register_section): ... this and adjust.
8692 (struct get_core_registers_cb_data): New.
8693 (get_core_registers_cb): Use it. Use bool.
8694 (core_target::fetch_registers, core_target::files_info)
8695 (core_target::xfer_partial, core_target::read_description)
8696 (core_target::pid_to, core_target::thread_name): Adjust to
8697 reference class fields instead of globals.
8698 * target.h (struct target_ops_deleter, target_ops_up): New.
8699
8700 2018-05-11 Pedro Alves <palves@redhat.com>
8701
8702 * corefile.c (core_file_command): Move to corelow.c.
8703 * corelow.c (the_core_target): Delete.
8704 (core_file_command): Moved from corefile.c. Check exec_bfd
8705 instead of the_core_target. Use target_detach instead of calling
8706 into the_core_target directly.
8707 (maybe_say_no_core_file_now): New.
8708 (core_target::detach): Use it.
8709 (_initialize_corelow): Remove references to the_core_target.
8710 * gdbcore.h (the_core_target): Delete.
8711
8712 2018-05-11 Tom Tromey <tromey@redhat.com>
8713 Pedro Alves <palves@redhat.com>
8714
8715 * corefile.c (core_bfd): Remove.
8716 * gdbcore.h (core_bfd): Now a macro.
8717 * progspace.h (struct program_space) <cbfd>: New field.
8718
8719 2018-05-11 Tom Tromey <tom@tromey.com>
8720
8721 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8722 gdb::def_vector.
8723
8724 2018-05-10 Tom Tromey <tom@tromey.com>
8725
8726 * configure: Rebuild.
8727 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8728
8729 2018-05-10 Joel Brobecker <brobecker@adacore.com>
8730
8731 PR server/23158:
8732 * regformats/regdat.sh: Adjust script, following the addition
8733 of the new expedite_regs parameter to init_target_desc.
8734
8735 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
8736
8737 PR gdb/23127
8738 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8739 set_gdbarch_significant_addr_bit.
8740 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8741 set_gdbarch_significant_addr_bit.
8742 * utils.c (address_significant): Update to sign extend addr.
8743
8744 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8745
8746 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8747 (xtensa_linux_init_abi): Limit tdep->num_regs by
8748 tdep->num_nopriv_regs.
8749 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8750 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8751 not initialized.
8752
8753 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8754
8755 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8756
8757 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8758
8759 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8760 (I387_MXCSR_INIT_VAL): New constant.
8761 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8762 buffer if it was supplied by the inferior.
8763 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8764 (i387_xsave_get_clear_bv): New function.
8765 (i387_supply_xsave): Only read x87 control registers from the
8766 xsave buffer if the feature is enabled, and the state will have
8767 been written, otherwise, provide a suitable default.
8768 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8769 including x87 control registers. Update control registers if they
8770 have changed from the default value, and mark features as enabled
8771 as required.
8772 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8773
8774 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8775
8776 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8777
8778 2018-05-07 Tom Tromey <tom@tromey.com>
8779
8780 * configure: Rebuild.
8781 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8782
8783 2018-05-07 Tom Tromey <tom@tromey.com>
8784
8785 PR tdep/20362:
8786 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8787 bit. Use correct value for VDIV.
8788
8789 2018-05-04 Tom Tromey <tom@tromey.com>
8790
8791 * configure: Rebuild.
8792 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8793
8794 2018-05-04 Tom Tromey <tom@tromey.com>
8795
8796 * linux-record.c (record_linux_system_call) <case
8797 RECORD_SYS_RECVFROM>: Add "break".
8798
8799 2018-05-04 Tom Tromey <tom@tromey.com>
8800
8801 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8802 Add missing "break".
8803 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8804 Add missing "break".
8805
8806 2018-05-04 Tom Tromey <tom@tromey.com>
8807
8808 * rs6000-tdep.c (ppc_process_record_op4)
8809 (ppc_process_record_op63): Add fall-through comment.
8810
8811 2018-05-04 Tom Tromey <tom@tromey.com>
8812
8813 * i386-tdep.c (i386_process_record): Add fall-through comment.
8814
8815 2018-05-04 Tom Tromey <tom@tromey.com>
8816
8817 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8818 comment.
8819
8820 2018-05-04 Tom Tromey <tom@tromey.com>
8821
8822 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8823 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8824 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8825 comment.
8826 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8827 comment.
8828 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8829 comment.
8830
8831 2018-05-04 Tom Tromey <tom@tromey.com>
8832
8833 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8834
8835 2018-05-04 Tom Tromey <tom@tromey.com>
8836
8837 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8838 * xcoffread.c (scan_xcoff_symtab): Move comment later.
8839 * symfile.c (section_is_mapped): Fix fall-through comment.
8840 * stabsread.c (define_symbol, read_member_functions): Fix
8841 fall-through comment.
8842 * s390-linux-tdep.c (s390_process_record): Fix fall-through
8843 comment.
8844 * remote.c (remote_wait_as): Fix fall-through comment.
8845 * p-exp.y (yylex): Fix fall-through comment.
8846 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8847 comment.
8848 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8849 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8850 * jv-exp.y (yylex): Fix fall-through comment.
8851 * go-exp.y (lex_one_token): Fix fall-through comment.
8852 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8853 fall-through comment.
8854 * f-exp.y (yylex): Fix fall-through comment.
8855 * dwarf2read.c (process_die): Fix fall-through comments.
8856 * dbxread.c (process_one_symbol): Fix fall-through comment.
8857 * d-exp.y (lex_one_token): Fix fall-through comment.
8858 * cp-name-parser.y (yylex): Fix fall-through comment.
8859 * coffread.c (coff_symtab_read): Fix fall-through comment.
8860 * c-exp.y (lex_one_token): Fix fall-through comment.
8861 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8862 comment.
8863 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8864 comment.
8865
8866 2018-05-04 Tom Tromey <tom@tromey.com>
8867
8868 PR python/22730:
8869 * NEWS: Mention gdb.execute change.
8870 * gdbcmd.h (execute_control_command): Don't declare.
8871 * python/python.c (execute_gdb_command): Use read_command_lines_1,
8872 execute_control_commands, execute_control_commands_to_string.
8873 * cli/cli-script.h (execute_control_commands)
8874 (execute_control_commands_to_string): Declare.
8875 (execute_control_command): Add from_tty parameter.
8876 * cli/cli-script.c (execute_control_commands)
8877 (execute_control_commands_to_string): New functions.
8878 (execute_user_command): Use execute_control_commands.
8879 (execute_control_command_1): Add "from_tty" parameter. Update.
8880 (execute_control_command): Likewise.
8881
8882 2018-05-04 Tom Tromey <tom@tromey.com>
8883
8884 PR python/22731:
8885 * NEWS: Mention that breakpoint commands are writable.
8886 * python/py-breakpoint.c (bppy_set_commands): New function.
8887 (breakpoint_object_getset) <"commands">: Use it.
8888
8889 2018-05-04 Tom Tromey <tom@tromey.com>
8890
8891 * tracepoint.c (actions_command): Update.
8892 * mi/mi-cmd-break.c (mi_command_line_array)
8893 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8894 (mi_read_next_line): Remove.
8895 (mi_cmd_break_commands): Update.
8896 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8897 function_view.
8898 * cli/cli-script.c (get_command_line): Update.
8899 (process_next_line): Use function_view. Constify.
8900 (recurse_read_control_structure, read_command_lines)
8901 (read_command_lines_1): Change argument types to function_view.
8902 (do_define_command, document_command): Update.
8903 * breakpoint.h (check_tracepoint_command): Don't declare.
8904 * breakpoint.c (check_tracepoint_command): Remove.
8905 (commands_command_1, create_tracepoint_from_upload): Update.
8906
8907 2018-05-04 Tom Tromey <tom@tromey.com>
8908
8909 PR gdb/11750:
8910 * cli/cli-script.h (enum command_control_type) <define_control>:
8911 New constant.
8912 * cli/cli-script.c (multi_line_command_p): Handle define_control.
8913 (build_command_line, execute_control_command_1)
8914 (process_next_line): Likewise.
8915 (do_define_command): New function, extracted from define_command.
8916 (define_command): Use it.
8917
8918 2018-05-04 Tom Tromey <tom@tromey.com>
8919
8920 * tracepoint.c (actions_command): Update.
8921 * cli/cli-script.h (read_command_lines): Update.
8922 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8923 (MAX_TMPBUF): Remove define.
8924 (define_command): Use string_printf.
8925 (document_command): Likewise.
8926 * breakpoint.c (commands_command_1): Update.
8927
8928 2018-05-04 Tom Tromey <tom@tromey.com>
8929
8930 * top.c (execute_command): Update.
8931 * cli/cli-script.h (print_command_lines): Now varargs.
8932 * cli/cli-script.c (print_command_lines): Now varargs.
8933 (execute_control_command_1) <case while_control, case if_control>:
8934 Update.
8935
8936 2018-05-04 Tom Tromey <tom@tromey.com>
8937
8938 * tracepoint.c (all_tracepoint_actions): Rename from
8939 all_tracepoint_actions_and_cleanup. Change return type.
8940 (actions_command, encode_actions_1, encode_actions)
8941 (trace_dump_actions, tdump_command): Update.
8942 * remote.c (remote_download_command_source): Update.
8943 * python/python.c (gdbpy_eval_from_control_command)
8944 (python_command, python_interactive_command): Update.
8945 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8946 * guile/guile.c (guile_command)
8947 (gdbscm_eval_from_control_command, guile_command): Update.
8948 * compile/compile.c (compile_code_command)
8949 (compile_print_command, compile_to_object): Update.
8950 * cli/cli-script.h (struct command_lines_deleter): New.
8951 (counted_command_line): New typedef.
8952 (struct command_line): Add constructor, destructor.
8953 <body_list>: Remove.
8954 <body_list_0, body_list_1>: New members.
8955 (command_line_up): Remove typedef.
8956 (read_command_lines, read_command_lines_1, get_command_line):
8957 Update.
8958 (copy_command_lines): Don't declare.
8959 * cli/cli-script.c (build_command_line): Use "new".
8960 (get_command_line): Return counted_command_line.
8961 (print_command_lines, execute_user_command)
8962 (execute_control_command_1, while_command, if_command): Update.
8963 (realloc_body_list): Remove.
8964 (process_next_line, recurse_read_control_structure): Update.
8965 (read_command_lines, read_command_lines_1): Return counted_command_line.
8966 (free_command_lines): Use "delete".
8967 (copy_command_lines): Remove.
8968 (define_command, document_command, show_user_1): Update.
8969 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8970 a counted_command_line.
8971 * breakpoint.h (counted_command_line): Remove typedef.
8972 (breakpoint_set_commands): Update.
8973 * breakpoint.c (check_no_tracepoint_commands)
8974 (validate_commands_for_breakpoint): Update.
8975 (breakpoint_set_commands): Change commands to be a
8976 counted_command_line.
8977 (commands_command_1, update_dprintf_command_list)
8978 (create_tracepoint_from_upload): Update.
8979
8980 2018-05-04 Tom Tromey <tom@tromey.com>
8981
8982 * cli/cli-decode.h (cmd_list_element): New constructor.
8983 (~cmd_list_element): New destructor.
8984 (struct cmd_list_element): Add initializers.
8985 * cli/cli-decode.c (do_add_cmd): Use "new".
8986 (delete_cmd): Use "delete".
8987
8988 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8989 Pedro Alves <palves@redhat.com>
8990
8991 PR breakpoints/19806 and support for PR external/20207.
8992 * NEWS: Mention Aarch64 watchpoint improvements.
8993 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8994 watchpoints and PR external/20207 watchpoints.
8995 * nat/aarch64-linux-hw-point.c
8996 (kernel_supports_any_contiguous_range): New.
8997 (aarch64_watchpoint_offset): New.
8998 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8999 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9000 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9001 (aarch64_align_watchpoint): New parameters aligned_offset_p and
9002 next_addr_orig_p. Support PR external/20207 watchpoints.
9003 (aarch64_downgrade_regs): New.
9004 (aarch64_dr_state_insert_one_point): New parameters offset and
9005 addr_orig.
9006 (aarch64_dr_state_remove_one_point): Likewise.
9007 (aarch64_handle_breakpoint): Update caller.
9008 (aarch64_handle_aligned_watchpoint): Likewise.
9009 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9010 aligned_offset.
9011 (aarch64_linux_set_debug_regs): Remove const from state. Call
9012 aarch64_downgrade_regs.
9013 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9014 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9015 (DR_CONTROL_MASK): ... this.
9016 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9017 (unsigned int aarch64_watchpoint_offset): New prototype.
9018 (aarch64_linux_set_debug_regs): Remove const from state.
9019 * utils.c (align_up, align_down): Move to ...
9020 * common/common-utils.c (align_up, align_down): ... here.
9021 * utils.h (align_up, align_down): Move to ...
9022 * common/common-utils.h (align_up, align_down): ... here.
9023
9024 2018-05-04 Joel Brobecker <brobecker@adacore.com>
9025
9026 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9027 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9028 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9029 Re-implement to match the ABI as summarized in GCC's
9030 gcc/config/sparc/sparc.c. All callers updated.
9031 (sparc32_store_arguments): Remove assertion.
9032
9033 2018-05-04 Tom Tromey <tom@tromey.com>
9034
9035 * printcmd.c: Don't include tui.h.
9036 (decode_format): Use skip_spaces.
9037
9038 2018-05-04 Tom Tromey <tom@tromey.com>
9039
9040 PR gdb/22619:
9041 * printcmd.c (last_count): New global.
9042 (x_command): Use saved count when repeating.
9043
9044 2018-05-04 Tom Tromey <tom@tromey.com>
9045
9046 * nto-procfs.c (do_closedir_cleanup): Remove.
9047 (procfs_pidlist): Use gdb_dir_up.
9048 * procfs.c (do_closedir_cleanup): Remove.
9049 (proc_update_threads): Use gdb_dir_up.
9050 * common/filestuff.h (struct gdb_dir_deleter): New.
9051 (gdb_dir_up): New typedef.
9052
9053 2018-05-04 Tom Tromey <tom@tromey.com>
9054
9055 * ada-lang.c (print_mention_exception): Use std::string.
9056
9057 2018-05-04 Tom Tromey <tom@tromey.com>
9058
9059 * ada-lang.c (create_excep_cond_exprs): Update.
9060 (ada_exception_catchpoint_cond_string): Use std::string.
9061
9062 2018-05-04 Tom Tromey <tom@tromey.com>
9063
9064 * ada-lang.c (xget_renaming_scope): Return std::string.
9065 (old_renaming_is_invisible): Update.
9066
9067 2018-05-04 Tom Tromey <tom@tromey.com>
9068
9069 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9070 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9071
9072 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
9073
9074 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9075
9076 2018-05-04 Tom Tromey <tom@tromey.com>
9077
9078 * remote.c (remote_query_supported_append): Change type.
9079 (remote_check_symbols): Update.
9080
9081 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
9082
9083 PR gdb/11420
9084 * configure.ac: Prepend libpython.
9085 * python/python-config.py: Likewise.
9086 * configure: Regenerate.
9087
9088 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
9089
9090 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9091
9092 2018-05-03 Pedro Alves <palves@redhat.com>
9093
9094 * s390-linux-nat.c
9095 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9096 override. Write 'true' instead of '1'.
9097 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9098 declaration.
9099
9100 2018-05-02 Pedro Alves <palves@redhat.com>
9101
9102 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9103 add_inf_child_target.
9104 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9105 add_inf_child_target.
9106 * aix-thread.c (aix_thread_target_info): New.
9107 (aix_thread_target) <shortname, longname, doc>: Delete.
9108 <info>: New.
9109 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9110 add_inf_child_target.
9111 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9112 add_inf_child_target.
9113 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9114 add_inf_child_target.
9115 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9116 add_inf_child_target.
9117 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9118 add_inf_child_target.
9119 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9120 add_inf_child_target.
9121 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9122 add_inf_child_target.
9123 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9124 add_inf_child_target.
9125 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9126 add_inf_child_target.
9127 * bfd-target.c (target_bfd_target_info): New.
9128 (target_bfd) <shortname, longname, doc>: Delete.
9129 <info>: New.
9130 * bsd-kvm.c (bsd_kvm_target_info): New.
9131 (bsd_kvm_target) <shortname, longname, doc>: Delete.
9132 <info>: New.
9133 (bsd_kvm_target::open): Rename to ...
9134 (bsd_kvm_target_open): ... this. Adjust.
9135 * bsd-uthread.c (bsd_uthread_target_info): New.
9136 (bsd_uthread_target) <shortname, longname, doc>: Delete.
9137 <info>: New.
9138 * corefile.c (core_file_command): Adjust.
9139 * corelow.c (core_target_info): New.
9140 (core_target) <shortname, longname, doc>: Delete.
9141 <info>: New.
9142 (core_target::open): Rename to ...
9143 (core_target_open): ... this. Adjust.
9144 * ctf.c (ctf_target_info): New.
9145 (ctf_target) <shortname, longname, doc>: Delete.
9146 <info>: New.
9147 (ctf_target::open): Rename to ...
9148 (ctf_target_open): ... this.
9149 (_initialize_ctf): Adjust.
9150 * exec.c (exec_target_info): New.
9151 (exec_target) <shortname, longname, doc>: Delete.
9152 <info>: New.
9153 (exec_target::open): Rename to ...
9154 (exec_target_open): ... this.
9155 * gdbcore.h (core_target_open): Declare.
9156 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9157 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9158 add_inf_child_target.
9159 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9160 add_inf_child_target.
9161 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9162 add_inf_child_target.
9163 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9164 add_inf_child_target.
9165 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9166 add_inf_child_target.
9167 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9168 add_inf_child_target.
9169 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9170 add_inf_child_target.
9171 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9172 add_inf_child_target.
9173 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9174 add_inf_child_target.
9175 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9176 add_inf_child_target.
9177 * inf-child.c (inf_child_target_info): New.
9178 (inf_child_target::info): New.
9179 (inf_child_open_target): Remove 'target' parameter. Use
9180 get_native_target instead.
9181 (inf_child_target::open): Delete.
9182 (add_inf_child_target): New.
9183 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9184 Delete.
9185 <info>: New.
9186 (add_inf_child_target): Declare.
9187 (inf_child_open_target): Declare.
9188 * linux-thread-db.c (thread_db_target_info): New.
9189 (thread_db_target) <shortname, longname, doc>: Delete.
9190 <info>: New.
9191 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9192 add_inf_child_target.
9193 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9194 add_inf_child_target.
9195 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9196 add_inf_child_target.
9197 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9198 add_inf_child_target.
9199 * make-target-delegates (print_class): Adjust.
9200 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9201 add_inf_child_target.
9202 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9203 add_inf_child_target.
9204 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9205 add_inf_child_target.
9206 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9207 add_inf_child_target.
9208 * nto-procfs.c (nto_native_target_info): New.
9209 (nto_procfs_target_native) <shortname, longname, doc>:
9210 Delete.
9211 <info>: New.
9212 (nto_procfs_target_info): New.
9213 (nto_procfs_target_procfs) <shortname, longname, doc>:
9214 Delete.
9215 <info>: New.
9216 (init_procfs_targets): Adjust.
9217 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9218 add_inf_child_target.
9219 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9220 add_inf_child_target.
9221 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9222 add_inf_child_target.
9223 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9224 add_inf_child_target.
9225 * ravenscar-thread.c (ravenscar_target_info): New.
9226 (ravenscar_thread_target) <shortname, longname, doc>:
9227 Delete.
9228 <info>: New.
9229 * record-btrace.c (record_btrace_target_info):
9230 (record_btrace_target) <shortname, longname, doc>: Delete.
9231 <info>: New.
9232 (record_btrace_target::open): Rename to ...
9233 (record_btrace_target_open): ... this. Adjust.
9234 * record-full.c (record_longname, record_doc): New.
9235 (record_full_base_target) <shortname, longname, doc>: Delete.
9236 <info>: New.
9237 (record_full_target_info): New.
9238 (record_full_target): <shortname>: Delete.
9239 <info>: New.
9240 (record_full_core_open_1, record_full_open_1): Update comments.
9241 (record_full_base_target::open): Rename to ...
9242 (record_full_open): ... this.
9243 (cmd_record_full_restore): Update.
9244 (_initialize_record_full): Update.
9245 * remote-sim.c (remote_sim_target_info): New.
9246 (gdbsim_target) <shortname, longname, doc>: Delete.
9247 <info>: New.
9248 (gdbsim_target::open): Rename to ...
9249 (gdbsim_target_open): ... this.
9250 (_initialize_remote_sim): Adjust.
9251 * remote.c (remote_doc): New.
9252 (remote_target_info): New.
9253 (remote_target) <shortname, longname, doc>: Delete.
9254 <info>: New.
9255 (extended_remote_target_info): New.
9256 (extended_remote_target) <shortname, longname, doc>: Delete.
9257 <info>: New.
9258 (remote_target::open_1): Make static. Adjust.
9259 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9260 * s390-linux-nat.c (_initialize_s390_nat): Use
9261 add_inf_child_target.
9262 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9263 add_inf_child_target.
9264 * sol-thread.c (thread_db_target_info): New.
9265 (sol_thread_target) <shortname, longname, doc>: Delete.
9266 <info>: New.
9267 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9268 add_inf_child_target.
9269 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9270 add_inf_child_target.
9271 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9272 add_inf_child_target.
9273 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9274 add_inf_child_target.
9275 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9276 add_inf_child_target.
9277 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9278 add_inf_child_target.
9279 * spu-linux-nat.c (_initialize_spu_nat): Use
9280 add_inf_child_target.
9281 * spu-multiarch.c (spu_multiarch_target_info): New.
9282 (spu_multiarch_target) <shortname, longname, doc>: Delete.
9283 <info>: New.
9284 * target-delegates.c: Regenerate.
9285 * target.c: Include <unordered_map>.
9286 (target_ops_p): Delete.
9287 (DEF_VEC_P(target_ops_p)): Delete.
9288 (target_factories): New.
9289 (test_target_info): New.
9290 (test_target_ops::info): New.
9291 (open_target): Adjust to use target_factories.
9292 (add_target_with_completer): Rename to ...
9293 (add_target): ... this. Change prototype. Register target_info
9294 and open callback in target_factories. Register target_info in
9295 command context instead of target_ops.
9296 (add_target): Delete old implementation.
9297 (add_deprecated_target_alias): Change prototype. Adjust.
9298 (the_native_target): New.
9299 (set_native_target, get_native_target): New.
9300 (find_default_run_target): Use the_native_target.
9301 (find_attach_target, find_run_target): Simplify.
9302 (target_ops::open): Delete.
9303 (dummy_target_info): New.
9304 (dummy_target::shortname, dummy_target::longname)
9305 (dummy_target::doc): Delete.
9306 (dummy_target::info): New.
9307 (debug_target::shortname, debug_target::longname)
9308 (debug_target::doc): Delete.
9309 (debug_target::info): New.
9310 * target.h (struct target_info): New.
9311 (target_ops::~target_ops): Add comment.
9312 (target_ops::info): New.
9313 (target_ops::shortname, target_ops::longname, target_ops::doc): No
9314 longer virtual. Implement in terms of target_info.
9315 (set_native_target, get_native_target): Declare.
9316 (target_open_ftype): New.
9317 (add_target, add_target_with_completer)
9318 (add_deprecated_target_alias): Change prototype.
9319 (test_target) <shortname, longname, doc>: Delete.
9320 <info>: New.
9321 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9322 add_inf_child_target.
9323 * tracefile-tfile.c (tfile_target_info): New.
9324 (tfile_target) <shortname, longname, doc>: Delete.
9325 <info>: New.
9326 (tfile_target::open): Rename to ...
9327 (tfile_target_open): ... this.
9328 (_initialize_tracefile_tfile): Adjust.
9329 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9330 add_inf_child_target.
9331 * windows-nat.c (_initialize_windows_nat): Use
9332 add_inf_child_target.
9333 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9334 add_inf_child_target.
9335
9336 2018-05-02 Pedro Alves <palves@redhat.com>
9337
9338 * linux-nat.h (linux_nat_target) <low_new_thread,
9339 low_delete_thread, low_new_fork, low_forget_process,
9340 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9341 New virtual methods.
9342 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9343 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9344 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9345 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9346 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9347 Delete.
9348 * linux-fork.c (delete_fork): Adjust to call low method.
9349 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9350 (linux_nat_new_fork, linux_nat_forget_process_hook)
9351 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9352 (linux_nat_status_is_event):
9353 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9354 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9355 to call low method.
9356 (sigtrap_is_event): Rename to ...
9357 (linux_nat_target::low_status_is_event): ... this.
9358 (linux_nat_set_status_is_event): Delete.
9359 (save_stop_reason, linux_nat_wait_1)
9360 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9361 low methods.
9362 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9363 (linux_nat_set_new_fork, linux_nat_set_forget_process)
9364 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9365 (linux_nat_set_prepare_to_resume): Delete.
9366 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9367 low virtual methods.
9368 * amd64-linux-nat.c: Likewise.
9369 * arm-linux-nat.c: Likewise.
9370 * i386-linux-nat.c: Likewise.
9371 * ia64-linux-nat.c: Likewise.
9372 * mips-linux-nat.c: Likewise.
9373 * ppc-linux-nat.c: Likewise.
9374 * s390-linux-nat.c: Likewise.
9375 * sparc64-linux-nat.c: Likewise.
9376 * x86-linux-nat.c: Likewise.
9377 * x86-linux-nat.h: Include "nat/x86-linux.h".
9378 (x86_linux_nat_target) <low_new_fork, low_forget_process,
9379 low_prepare_to_resume, low_new_thread, low_delete_thread>:
9380 Override methods.
9381
9382 2018-05-02 Pedro Alves <palves@redhat.com>
9383
9384 * target.h (target_ops)
9385 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9386 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9387 stopped_by_watchpoint, have_continuable_watchpoint,
9388 stopped_data_address, watchpoint_addr_within_range,
9389 can_accel_watchpoint_condition, can_run, thread_alive,
9390 has_all_memory, has_memory, has_stack, has_registers,
9391 has_execution, can_async_p, is_async_p, supports_non_stop,
9392 always_non_stop_p, can_execute_reverse, supports_multi_process,
9393 supports_enable_disable_tracepoint,
9394 supports_disable_randomization, supports_string_tracing,
9395 supports_evaluation_of_breakpoint_conditions,
9396 can_run_breakpoint_commands, filesystem_is_local,
9397 can_download_tracepoint, get_trace_state_variable_value,
9398 set_trace_notes, get_tib_address, use_agent, can_use_agent,
9399 record_is_replaying, record_will_replay,
9400 augmented_libraries_svr4_read>: Adjust to return bool.
9401 * aarch64-linux-nat.c: All implementations adjusted.
9402 * aix-thread.c: All implementations adjusted.
9403 * arm-linux-nat.c: All implementations adjusted.
9404 * breakpoint.c: All implementations adjusted.
9405 * bsd-kvm.c: All implementations adjusted.
9406 * bsd-uthread.c: All implementations adjusted.
9407 * corelow.c: All implementations adjusted.
9408 * ctf.c: All implementations adjusted.
9409 * darwin-nat.c: All implementations adjusted.
9410 * darwin-nat.h: All implementations adjusted.
9411 * exec.c: All implementations adjusted.
9412 * fbsd-nat.c: All implementations adjusted.
9413 * fbsd-nat.h: All implementations adjusted.
9414 * gnu-nat.c: All implementations adjusted.
9415 * gnu-nat.h: All implementations adjusted.
9416 * go32-nat.c: All implementations adjusted.
9417 * ia64-linux-nat.c: All implementations adjusted.
9418 * inf-child.c: All implementations adjusted.
9419 * inf-child.h: All implementations adjusted.
9420 * inf-ptrace.c: All implementations adjusted.
9421 * inf-ptrace.h: All implementations adjusted.
9422 * linux-nat.c: All implementations adjusted.
9423 * linux-nat.h: All implementations adjusted.
9424 * mips-linux-nat.c: All implementations adjusted.
9425 * nto-procfs.c: All implementations adjusted.
9426 * ppc-linux-nat.c: All implementations adjusted.
9427 * procfs.c: All implementations adjusted.
9428 * ravenscar-thread.c: All implementations adjusted.
9429 * record-btrace.c: All implementations adjusted.
9430 * record-full.c: All implementations adjusted.
9431 * remote-sim.c: All implementations adjusted.
9432 * remote.c: All implementations adjusted.
9433 * s390-linux-nat.c: All implementations adjusted.
9434 * sol-thread.c: All implementations adjusted.
9435 * spu-multiarch.c: All implementations adjusted.
9436 * target-delegates.c: All implementations adjusted.
9437 * target.c: All implementations adjusted.
9438 * target.h: All implementations adjusted.
9439 * tracefile-tfile.c: All implementations adjusted.
9440 * tracefile.c: All implementations adjusted.
9441 * tracefile.h: All implementations adjusted.
9442 * windows-nat.c: All implementations adjusted.
9443 * x86-linux-nat.h: All implementations adjusted.
9444 * x86-nat.h: All implementations adjusted.
9445
9446 2018-05-02 Pedro Alves <palves@redhat.com>
9447
9448 * make-target-delegates (scan_target_h): Don't trim lines here.
9449 Replace sequences of tabs and/or whitespace with a single
9450 whitespace.
9451 (top level, parsing methods): Trim each line before processing it
9452 here.
9453
9454 2018-05-02 Pedro Alves <palves@redhat.com>
9455 John Baldwin <jhb@freebsd.org>
9456
9457 * target.h (enum strata) <debug_stratum>: New.
9458 (struct target_ops) <all delegation methods>: Replace by C++
9459 virtual methods, and drop "to_" prefix. All references updated
9460 throughout.
9461 <to_shortname, to_longname, to_doc, to_data,
9462 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9463 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9464 virtual methods. All references updated throughout.
9465 <can_attach, supports_terminal_ours, can_create_inferior,
9466 get_thread_control_capabilities, attach_no_wait>: New
9467 virtual methods.
9468 <insert_breakpoint, remove_breakpoint>: Now
9469 TARGET_DEFAULT_NORETURN methods.
9470 <info_proc>: Now returns bool.
9471 <to_magic>: Delete.
9472 (OPS_MAGIC): Delete.
9473 (current_target): Delete. All references replaced by references
9474 to ...
9475 (target_stack): ... this. New.
9476 (target_shortname, target_longname): Adjust.
9477 (target_can_run): Now a function declaration.
9478 (default_child_has_all_memory, default_child_has_memory)
9479 (default_child_has_stack, default_child_has_registers)
9480 (default_child_has_execution): Remove target_ops parameter.
9481 (complete_target_initialization): Delete.
9482 (memory_breakpoint_target): New template class.
9483 (test_target_ops): Refactor as a C++ class with virtual methods.
9484 * make-target-delegates (NAME_PART): Tighten.
9485 (POINTER_PART, CP_SYMBOL): New.
9486 (SIMPLE_RETURN_PART): Reimplement.
9487 (VEC_RETURN_PART): Expect less.
9488 (RETURN_PART, VIRTUAL_PART): New.
9489 (METHOD): Adjust to C++ virtual methods.
9490 (scan_target_h): Remove reference to C99.
9491 (dname): Output "target_ops::" prefix.
9492 (write_function_header): Adjust to output a C++ class method.
9493 (write_declaration): New.
9494 (write_delegator): Adjust to output a C++ class method.
9495 (tdname): Output "dummy_target::" prefix.
9496 (write_tdefault, write_debugmethod): Adjust to output a C++ class
9497 method.
9498 (tdefault_names, debug_names): Delete.
9499 (return_types, tdefaults, styles, argtypes_array): New.
9500 (top level): All methods are delegators.
9501 (print_class): New.
9502 (top level): Print dummy_target and debug_target classes.
9503 * target-delegates.c: Regenerate.
9504 * target-debug.h (target_debug_print_enum_info_proc_what)
9505 (target_debug_print_thread_control_capabilities)
9506 (target_debug_print_thread_info_p): New.
9507 * target.c (dummy_target): Delete.
9508 (the_dummy_target, the_debug_target): New.
9509 (target_stack): Now extern.
9510 (set_targetdebug): Push/unpush debug target.
9511 (default_child_has_all_memory, default_child_has_memory)
9512 (default_child_has_stack, default_child_has_registers)
9513 (default_child_has_execution): Remove target_ops parameter.
9514 (complete_target_initialization): Delete.
9515 (add_target_with_completer): No longer call
9516 complete_target_initialization.
9517 (target_supports_terminal_ours): Use regular delegation.
9518 (update_current_target): Delete.
9519 (push_target): No longer check magic number. Don't call
9520 update_current_target.
9521 (unpush_target): Don't call update_current_target.
9522 (target_is_pushed): No longer check magic number.
9523 (target_require_runnable): Skip for all stratums over
9524 process_stratum.
9525 (target_ops::info_proc): New.
9526 (target_info_proc): Use find_target_at and
9527 find_default_run_target.
9528 (target_supports_disable_randomization): Use regular delegation.
9529 (target_get_osdata): Use find_target_at.
9530 (target_ops::open, target_ops::close, target_ops::can_attach)
9531 (target_ops::attach, target_ops::can_create_inferior)
9532 (target_ops::create_inferior, target_ops::can_run)
9533 (target_can_run): New.
9534 (default_fileio_target): Use regular delegation.
9535 (target_ops::fileio_open, target_ops::fileio_pwrite)
9536 (target_ops::fileio_pread, target_ops::fileio_fstat)
9537 (target_ops::fileio_close, target_ops::fileio_unlink)
9538 (target_ops::fileio_readlink): New.
9539 (target_fileio_open_1, target_fileio_unlink)
9540 (target_fileio_readlink): Always call the target method. Handle
9541 FILEIO_ENOSYS.
9542 (return_zero, return_zero_has_execution): Delete.
9543 (init_dummy_target): Delete.
9544 (dummy_target::dummy_target, dummy_target::shortname)
9545 (dummy_target::longname, dummy_target::doc)
9546 (debug_target::debug_target, debug_target::shortname)
9547 (debug_target::longname, debug_target::doc): New.
9548 (target_supports_delete_record): Use regular delegation.
9549 (setup_target_debug): Delete.
9550 (maintenance_print_target_stack): Skip debug_stratum.
9551 (initialize_targets): Instantiate the_dummy_target and
9552 the_debug_target.
9553 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
9554 use target_stack.
9555 (target_auxv_search, fprint_target_auxv): Adjust.
9556 (info_auxv_command): Adjust to use target_stack.
9557 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9558 * exceptions.c (print_flush): Handle a NULL target_stack.
9559 * regcache.c (target_ops_no_register): Refactor as class with
9560 virtual methods.
9561
9562 * exec.c (exec_target): New class.
9563 (exec_ops): Now an exec_target.
9564 (exec_open, exec_close_1, exec_get_section_table)
9565 (exec_xfer_partial, exec_files_info, exec_has_memory)
9566 (exec_make_note_section): Refactor as exec_target methods.
9567 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9568 Delete.
9569 (exec_target::find_memory_regions): New.
9570 (_initialize_exec): Don't call init_exec_ops.
9571 * gdbcore.h (exec_file_clear): Delete.
9572
9573 * corefile.c (core_target): Delete.
9574 (core_file_command): Adjust.
9575 * corelow.c (core_target): New class.
9576 (the_core_target): New.
9577 (core_close): Remove target_ops parameter.
9578 (core_close_cleanup): Adjust.
9579 (core_target::close): New.
9580 (core_open, core_detach, get_core_registers, core_files_info)
9581 (core_xfer_partial, core_thread_alive, core_read_description)
9582 (core_pid_to_str, core_thread_name, core_has_memory)
9583 (core_has_stack, core_has_registers, core_info_proc): Rework as
9584 core_target methods.
9585 (ignore, core_remove_breakpoint, init_core_ops): Delete.
9586 (_initialize_corelow): Initialize the_core_target.
9587 * gdbcore.h (core_target): Delete.
9588 (the_core_target): New.
9589
9590 * ctf.c: (ctf_target): New class.
9591 (ctf_ops): Now a ctf_target.
9592 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9593 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9594 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9595 methods.
9596 (init_ctf_ops): Delete.
9597 (_initialize_ctf): Don't call it.
9598 * tracefile-tfile.c (tfile_target): New class.
9599 (tfile_ops): Now a tfile_target.
9600 (tfile_open, tfile_close, tfile_files_info)
9601 (tfile_get_tracepoint_status, tfile_trace_find)
9602 (tfile_fetch_registers, tfile_xfer_partial)
9603 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9604 Refactor as tfile_target methods.
9605 (tfile_xfer_partial_features): Remove target_ops parameter.
9606 (init_tfile_ops): Delete.
9607 (_initialize_tracefile_tfile): Don't call it.
9608 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9609 (tracefile_has_stack, tracefile_has_registers)
9610 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9611 tracefile_target methods.
9612 (init_tracefile_ops): Delete.
9613 (tracefile_target::tracefile_target): New.
9614 * tracefile.h: Include "target.h".
9615 (tracefile_target): New class.
9616 (init_tracefile_ops): Delete.
9617
9618 * spu-multiarch.c (spu_multiarch_target): New class.
9619 (spu_ops): Now a spu_multiarch_target.
9620 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9621 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9622 (spu_search_memory, spu_mourn_inferior): Refactor as
9623 spu_multiarch_target methods.
9624 (init_spu_ops): Delete.
9625 (_initialize_spu_multiarch): Remove references to init_spu_ops,
9626 complete_target_initialization.
9627
9628 * ravenscar-thread.c (ravenscar_thread_target): New class.
9629 (ravenscar_ops): Now a ravenscar_thread_target.
9630 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9631 (ravenscar_thread_alive, ravenscar_pid_to_str)
9632 (ravenscar_fetch_registers, ravenscar_store_registers)
9633 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9634 (ravenscar_stopped_by_hw_breakpoint)
9635 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9636 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9637 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9638 methods.
9639 (init_ravenscar_thread_ops): Delete.
9640 (_initialize_ravenscar): Remove references to
9641 init_ravenscar_thread_ops and complete_target_initialization.
9642
9643 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9644 (bsd_uthread_target): New class.
9645 (bsd_uthread_ops): Now a bsd_uthread_target.
9646 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9647 (bsd_uthread_close, bsd_uthread_mourn_inferior)
9648 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9649 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9650 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9651 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9652 (bsd_uthread_target): Delete function.
9653 (_initialize_bsd_uthread): Remove reference to
9654 complete_target_initialization.
9655
9656 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
9657 (target_bfd): ... this new class.
9658 (target_bfd_xfer_partial, target_bfd_get_section_table)
9659 (target_bfd_close): Refactor as target_bfd methods.
9660 (target_bfd::~target_bfd): New.
9661 (target_bfd_reopen): Adjust.
9662 (target_bfd::close): New.
9663
9664 * record-btrace.c (record_btrace_target): New class.
9665 (record_btrace_ops): Now a record_btrace_target.
9666 (record_btrace_open, record_btrace_stop_recording)
9667 (record_btrace_disconnect, record_btrace_close)
9668 (record_btrace_async, record_btrace_info)
9669 (record_btrace_insn_history, record_btrace_insn_history_range)
9670 (record_btrace_insn_history_from, record_btrace_call_history)
9671 (record_btrace_call_history_range)
9672 (record_btrace_call_history_from, record_btrace_record_method)
9673 (record_btrace_is_replaying, record_btrace_will_replay)
9674 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9675 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9676 (record_btrace_store_registers, record_btrace_prepare_to_store)
9677 (record_btrace_to_get_unwinder)
9678 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9679 (record_btrace_commit_resume, record_btrace_wait)
9680 (record_btrace_stop, record_btrace_can_execute_reverse)
9681 (record_btrace_stopped_by_sw_breakpoint)
9682 (record_btrace_supports_stopped_by_sw_breakpoint)
9683 (record_btrace_stopped_by_hw_breakpoint)
9684 (record_btrace_supports_stopped_by_hw_breakpoint)
9685 (record_btrace_update_thread_list, record_btrace_thread_alive)
9686 (record_btrace_goto_begin, record_btrace_goto_end)
9687 (record_btrace_goto, record_btrace_stop_replaying_all)
9688 (record_btrace_execution_direction)
9689 (record_btrace_prepare_to_generate_core)
9690 (record_btrace_done_generating_core): Refactor as
9691 record_btrace_target methods.
9692 (init_record_btrace_ops): Delete.
9693 (_initialize_record_btrace): Remove reference to
9694 init_record_btrace_ops.
9695 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9696 the execution_direction global.
9697 (record_full_base_target, record_full_target)
9698 (record_full_core_target): New classes.
9699 (record_full_ops): Now a record_full_target.
9700 (record_full_core_ops): Now a record_full_core_target.
9701 (record_full_target::detach, record_full_target::disconnect)
9702 (record_full_core_target::disconnect)
9703 (record_full_target::mourn_inferior, record_full_target::kill):
9704 New.
9705 (record_full_open, record_full_close, record_full_async): Refactor
9706 as methods of the record_full_base_target class.
9707 (record_full_resume, record_full_commit_resume): Refactor
9708 as methods of the record_full_target class.
9709 (record_full_wait, record_full_stopped_by_watchpoint)
9710 (record_full_stopped_data_address)
9711 (record_full_stopped_by_sw_breakpoint)
9712 (record_full_supports_stopped_by_sw_breakpoint)
9713 (record_full_stopped_by_hw_breakpoint)
9714 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9715 methods of the record_full_base_target class.
9716 (record_full_store_registers, record_full_xfer_partial)
9717 (record_full_insert_breakpoint, record_full_remove_breakpoint):
9718 Refactor as methods of the record_full_target class.
9719 (record_full_can_execute_reverse, record_full_get_bookmark)
9720 (record_full_goto_bookmark, record_full_execution_direction)
9721 (record_full_record_method, record_full_info, record_full_delete)
9722 (record_full_is_replaying, record_full_will_replay)
9723 (record_full_goto_begin, record_full_goto_end, record_full_goto)
9724 (record_full_stop_replaying): Refactor as methods of the
9725 record_full_base_target class.
9726 (record_full_core_resume, record_full_core_kill)
9727 (record_full_core_fetch_registers)
9728 (record_full_core_prepare_to_store)
9729 (record_full_core_store_registers, record_full_core_xfer_partial)
9730 (record_full_core_insert_breakpoint)
9731 (record_full_core_remove_breakpoint)
9732 (record_full_core_has_execution): Refactor
9733 as methods of the record_full_core_target class.
9734 (record_full_base_target::supports_delete_record): New.
9735 (init_record_full_ops): Delete.
9736 (init_record_full_core_ops): Delete.
9737 (record_full_save): Refactor as method of the
9738 record_full_base_target class.
9739 (_initialize_record_full): Remove references to
9740 init_record_full_ops and init_record_full_core_ops.
9741
9742 * remote.c (remote_target, extended_remote_target): New classes.
9743 (remote_ops): Now a remote_target.
9744 (extended_remote_ops): Now an extended_remote_target.
9745 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9746 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9747 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9748 (remote_pass_signals, remote_set_syscall_catchpoint)
9749 (remote_program_signals, )
9750 (remote_thread_always_alive): Remove target_ops parameter.
9751 (remote_thread_alive, remote_thread_name)
9752 (remote_update_thread_list, remote_threads_extra_info)
9753 (remote_static_tracepoint_marker_at)
9754 (remote_static_tracepoint_markers_by_strid)
9755 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9756 (remote_open): Refactor as methods of remote_target.
9757 (extended_remote_open, extended_remote_detach)
9758 (extended_remote_attach, extended_remote_post_attach):
9759 (extended_remote_supports_disable_randomization)
9760 (extended_remote_create_inferior): : Refactor as method of
9761 extended_remote_target.
9762 (remote_set_permissions, remote_open_1, remote_detach)
9763 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9764 (remote_resume, remote_commit_resume, remote_stop)
9765 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9766 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9767 (remote_prepare_to_store, remote_store_registers)
9768 (remote_flash_erase, remote_flash_done, remote_files_info)
9769 (remote_kill, remote_mourn, remote_insert_breakpoint)
9770 (remote_remove_breakpoint, remote_insert_watchpoint)
9771 (remote_watchpoint_addr_within_range)
9772 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9773 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9774 (remote_supports_stopped_by_sw_breakpoint)
9775 (remote_stopped_by_hw_breakpoint)
9776 (remote_supports_stopped_by_hw_breakpoint)
9777 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9778 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9779 (remote_verify_memory): Refactor as methods of remote_target.
9780 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9781 parameter.
9782 (remote_xfer_partial, remote_get_memory_xfer_limit)
9783 (remote_search_memory, remote_rcmd, remote_memory_map)
9784 (remote_pid_to_str, remote_get_thread_local_address)
9785 (remote_get_tib_address, remote_read_description): Refactor as
9786 methods of remote_target.
9787 (remote_target::fileio_open, remote_target::fileio_pwrite)
9788 (remote_target::fileio_pread, remote_target::fileio_close): New.
9789 (remote_hostio_readlink, remote_hostio_fstat)
9790 (remote_filesystem_is_local, remote_can_execute_reverse)
9791 (remote_supports_non_stop, remote_supports_disable_randomization)
9792 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9793 (remote_supports_enable_disable_tracepoint)
9794 (remote_supports_string_tracing)
9795 (remote_can_run_breakpoint_commands, remote_trace_init)
9796 (remote_download_tracepoint, remote_can_download_tracepoint)
9797 (remote_download_trace_state_variable, remote_enable_tracepoint)
9798 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9799 (remote_trace_start, remote_get_trace_status)
9800 (remote_get_tracepoint_status, remote_trace_stop)
9801 (remote_trace_find, remote_get_trace_state_variable_value)
9802 (remote_save_trace_data, remote_get_raw_trace_data)
9803 (remote_set_disconnected_tracing, remote_core_of_thread)
9804 (remote_set_circular_trace_buffer, remote_traceframe_info)
9805 (remote_get_min_fast_tracepoint_insn_len)
9806 (remote_set_trace_buffer_size, remote_set_trace_notes)
9807 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9808 (remote_disable_btrace, remote_teardown_btrace)
9809 (remote_read_btrace, remote_btrace_conf)
9810 (remote_augmented_libraries_svr4_read, remote_load)
9811 (remote_pid_to_exec_file, remote_can_do_single_step)
9812 (remote_execution_direction, remote_thread_handle_to_thread_info):
9813 Refactor as methods of remote_target.
9814 (init_remote_ops, init_extended_remote_ops): Delete.
9815 (remote_can_async_p, remote_is_async_p, remote_async)
9816 (remote_thread_events, remote_upload_tracepoints)
9817 (remote_upload_trace_state_variables): Refactor as methods of
9818 remote_target.
9819 (_initialize_remote): Remove references to init_remote_ops and
9820 init_extended_remote_ops.
9821
9822 * remote-sim.c (gdbsim_target): New class.
9823 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9824 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9825 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9826 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9827 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9828 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9829 Refactor as methods of gdbsim_target.
9830 (gdbsim_ops): Now a gdbsim_target.
9831 (init_gdbsim_ops): Delete.
9832 (gdbsim_cntrl_c): Adjust.
9833 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9834
9835 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9836 (the_amd64_linux_nat_target): New.
9837 (amd64_linux_fetch_inferior_registers)
9838 (amd64_linux_store_inferior_registers): Refactor as methods of
9839 amd64_linux_nat_target.
9840 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
9841 * i386-linux-nat.c: Don't include "linux-nat.h".
9842 (i386_linux_nat_target): New class.
9843 (the_i386_linux_nat_target): New.
9844 (i386_linux_fetch_inferior_registers)
9845 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9846 as methods of i386_linux_nat_target.
9847 (_initialize_i386_linux_nat): Adjust. Set linux_target.
9848 * inf-child.c (inf_child_ops): Delete.
9849 (inf_child_fetch_inferior_registers)
9850 (inf_child_store_inferior_registers): Delete.
9851 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9852 methods of inf_child_target.
9853 (inf_child_target::supports_terminal_ours)
9854 (inf_child_target::terminal_init)
9855 (inf_child_target::terminal_inferior)
9856 (inf_child_target::terminal_ours_for_output)
9857 (inf_child_target::terminal_ours, inf_child_target::interrupt)
9858 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9859 New.
9860 (inf_child_open, inf_child_disconnect, inf_child_close)
9861 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9862 (inf_child_post_startup_inferior, inf_child_can_run)
9863 (inf_child_pid_to_exec_file): Refactor as methods of
9864 inf_child_target.
9865 (inf_child_follow_fork): Delete.
9866 (inf_child_target::can_create_inferior)
9867 (inf_child_target::can_attach): New.
9868 (inf_child_target::has_all_memory, inf_child_target::has_memory)
9869 (inf_child_target::has_stack, inf_child_target::has_registers)
9870 (inf_child_target::has_execution): New.
9871 (inf_child_fileio_open, inf_child_fileio_pwrite)
9872 (inf_child_fileio_pread, inf_child_fileio_fstat)
9873 (inf_child_fileio_close, inf_child_fileio_unlink)
9874 (inf_child_fileio_readlink, inf_child_use_agent)
9875 (inf_child_can_use_agent): Refactor as methods of
9876 inf_child_target.
9877 (return_zero, inf_child_target): Delete.
9878 (inf_child_target::inf_child_target): New.
9879 * inf-child.h: Include "target.h".
9880 (inf_child_target): Delete function prototype.
9881 (inf_child_target): New class.
9882 (inf_child_open_target, inf_child_mourn_inferior)
9883 (inf_child_maybe_unpush_target): Delete.
9884 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9885 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9886 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9887 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9888 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9889 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9890 (inf_ptrace_wait, inf_ptrace_xfer_partial)
9891 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9892 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9893 methods of inf_ptrace_target.
9894 (inf_ptrace_target): Delete function.
9895 * inf-ptrace.h: Include "inf-child.h".
9896 (inf_ptrace_target): Delete function declaration.
9897 (inf_ptrace_target): New class.
9898 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9899 * linux-nat.c (linux_target): New.
9900 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9901 (linux_nat_target::~linux_nat_target): New.
9902 (linux_child_post_attach, linux_child_post_startup_inferior)
9903 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9904 (linux_child_remove_fork_catchpoint)
9905 (linux_child_insert_vfork_catchpoint)
9906 (linux_child_remove_vfork_catchpoint)
9907 (linux_child_insert_exec_catchpoint)
9908 (linux_child_remove_exec_catchpoint)
9909 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9910 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9911 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9912 (linux_nat_stopped_data_address)
9913 (linux_nat_stopped_by_sw_breakpoint)
9914 (linux_nat_supports_stopped_by_sw_breakpoint)
9915 (linux_nat_stopped_by_hw_breakpoint)
9916 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9917 (linux_nat_kill, linux_nat_mourn_inferior)
9918 (linux_nat_xfer_partial, linux_nat_thread_alive)
9919 (linux_nat_update_thread_list, linux_nat_pid_to_str)
9920 (linux_nat_thread_name, linux_child_pid_to_exec_file)
9921 (linux_child_static_tracepoint_markers_by_strid)
9922 (linux_nat_is_async_p, linux_nat_can_async_p)
9923 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9924 (linux_nat_supports_multi_process)
9925 (linux_nat_supports_disable_randomization, linux_nat_async)
9926 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9927 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9928 (linux_nat_fileio_open, linux_nat_fileio_readlink)
9929 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9930 methods of linux_nat_target.
9931 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9932 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9933 parameter.
9934 (check_stopped_by_watchpoint): Adjust.
9935 (linux_xfer_partial): Delete.
9936 (linux_target_install_ops, linux_target, linux_nat_add_target):
9937 Delete.
9938 (linux_nat_target::linux_nat_target): New.
9939 * linux-nat.h: Include "inf-ptrace.h".
9940 (linux_nat_target): New.
9941 (linux_target, linux_target_install_ops, linux_nat_add_target):
9942 Delete function declarations.
9943 (linux_target): Declare global.
9944 * linux-thread-db.c (thread_db_target): New.
9945 (thread_db_target::thread_db_target): New.
9946 (thread_db_ops): Delete.
9947 (the_thread_db_target): New.
9948 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9949 (thread_db_update_thread_list, thread_db_pid_to_str)
9950 (thread_db_extra_thread_info)
9951 (thread_db_thread_handle_to_thread_info)
9952 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9953 (thread_db_resume): Refactor as methods of thread_db_target.
9954 (init_thread_db_ops): Delete.
9955 (_initialize_thread_db): Remove reference to init_thread_db_ops.
9956 * x86-linux-nat.c: Don't include "linux-nat.h".
9957 (super_post_startup_inferior): Delete.
9958 (x86_linux_nat_target::~x86_linux_nat_target): New.
9959 (x86_linux_child_post_startup_inferior)
9960 (x86_linux_read_description, x86_linux_enable_btrace)
9961 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9962 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9963 methods of x86_linux_nat_target.
9964 (x86_linux_create_target): Delete. Bits folded ...
9965 (x86_linux_add_target): ... here. Now takes a linux_nat_target
9966 pointer.
9967 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9968 (x86_linux_nat_target): New class.
9969 (x86_linux_create_target): Delete.
9970 (x86_linux_add_target): Now takes a linux_nat_target pointer.
9971 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9972 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9973 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9974 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9975 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9976 make extern.
9977 (x86_use_watchpoints): Delete.
9978 * x86-nat.h: Include "breakpoint.h" and "target.h".
9979 (x86_use_watchpoints): Delete.
9980 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9981 (x86_stopped_by_watchpoint, x86_stopped_data_address)
9982 (x86_insert_watchpoint, x86_remove_watchpoint)
9983 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9984 (x86_stopped_by_hw_breakpoint): New declarations.
9985 (x86_nat_target): New template class.
9986
9987 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9988 (the_ppc_linux_nat_target): New.
9989 (ppc_linux_fetch_inferior_registers)
9990 (ppc_linux_can_use_hw_breakpoint)
9991 (ppc_linux_region_ok_for_hw_watchpoint)
9992 (ppc_linux_ranged_break_num_registers)
9993 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9994 (ppc_linux_insert_mask_watchpoint)
9995 (ppc_linux_remove_mask_watchpoint)
9996 (ppc_linux_can_accel_watchpoint_condition)
9997 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9998 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9999 (ppc_linux_watchpoint_addr_within_range)
10000 (ppc_linux_masked_watch_num_registers)
10001 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10002 (ppc_linux_read_description): Refactor as methods of
10003 ppc_linux_nat_target.
10004 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
10005
10006 * procfs.c (procfs_xfer_partial): Delete forward declaration.
10007 (procfs_target): New class.
10008 (the_procfs_target): New.
10009 (procfs_target): Delete function.
10010 (procfs_auxv_parse, procfs_attach, procfs_detach)
10011 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10012 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10013 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10014 (procfs_create_inferior, procfs_update_thread_list)
10015 (procfs_thread_alive, procfs_pid_to_str)
10016 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10017 (procfs_stopped_data_address, procfs_insert_watchpoint)
10018 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10019 (proc_find_memory_regions, procfs_info_proc)
10020 (procfs_make_note_section): Refactor as methods of procfs_target.
10021 (_initialize_procfs): Adjust.
10022 * sol-thread.c (sol_thread_target): New class.
10023 (sol_thread_ops): Now a sol_thread_target.
10024 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10025 (sol_thread_fetch_registers, sol_thread_store_registers)
10026 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10027 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10028 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10029 (init_sol_thread_ops): Delete.
10030 (_initialize_sol_thread): Adjust. Remove references to
10031 init_sol_thread_ops and complete_target_initialization.
10032
10033 * windows-nat.c (windows_nat_target): New class.
10034 (windows_fetch_inferior_registers)
10035 (windows_store_inferior_registers, windows_resume, windows_wait)
10036 (windows_attach, windows_detach, windows_pid_to_exec_file)
10037 (windows_files_info, windows_create_inferior)
10038 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10039 (windows_close, windows_pid_to_str, windows_xfer_partial)
10040 (windows_get_tib_address, windows_get_ada_task_ptid)
10041 (windows_thread_name, windows_thread_alive): Refactor as
10042 windows_nat_target methods.
10043 (do_initial_windows_stuff): Adjust.
10044 (windows_target): Delete function.
10045 (_initialize_windows_nat): Adjust.
10046
10047 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10048 (darwin_mourn_inferior, darwin_kill_inferior)
10049 (darwin_create_inferior, darwin_attach, darwin_detach)
10050 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10051 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10052 (darwin_supports_multi_process): Refactor as darwin_nat_target
10053 methods.
10054 (darwin_resume_to, darwin_files_info): Delete.
10055 (_initialize_darwin_inferior): Rename to ...
10056 (_initialize_darwin_nat): ... this. Adjust to C++ification.
10057 * darwin-nat.h: Include "inf-child.h".
10058 (darwin_nat_target): New class.
10059 (darwin_complete_target): Delete.
10060 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10061 (darwin_target): New.
10062 (i386_darwin_fetch_inferior_registers)
10063 (i386_darwin_store_inferior_registers): Refactor as methods of
10064 darwin_nat_target.
10065 (darwin_complete_target): Delete, with ...
10066 (_initialize_i386_darwin_nat): ... bits factored out here.
10067
10068 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10069 (the_alpha_linux_nat_target): New.
10070 (alpha_linux_register_u_offset): Refactor as
10071 alpha_linux_nat_target method.
10072 (_initialize_alpha_linux_nat): Adjust.
10073 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10074 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10075 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10076 methods of linux_nat_trad_target.
10077 (linux_trad_target): Delete.
10078 * linux-nat-trad.h (linux_trad_target): Delete function.
10079 (linux_nat_trad_target): New class.
10080 * mips-linux-nat.c (mips_linux_nat_target): New class.
10081 (super_fetch_registers, super_store_registers, super_close):
10082 Delete.
10083 (the_mips_linux_nat_target): New.
10084 (mips64_linux_regsets_fetch_registers)
10085 (mips64_linux_regsets_store_registers)
10086 (mips64_linux_fetch_registers, mips64_linux_store_registers)
10087 (mips_linux_register_u_offset, mips_linux_read_description)
10088 (mips_linux_can_use_hw_breakpoint)
10089 (mips_linux_stopped_by_watchpoint)
10090 (mips_linux_stopped_data_address)
10091 (mips_linux_region_ok_for_hw_watchpoint)
10092 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10093 (mips_linux_close): Refactor as methods of mips_linux_nat.
10094 (_initialize_mips_linux_nat): Adjust to C++ification.
10095
10096 * aix-thread.c (aix_thread_target): New class.
10097 (aix_thread_ops): Now an aix_thread_target.
10098 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10099 (aix_thread_fetch_registers, aix_thread_store_registers)
10100 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10101 (aix_thread_thread_alive, aix_thread_pid_to_str)
10102 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10103 Refactor as methods of aix_thread_target.
10104 (init_aix_thread_ops): Delete.
10105 (_initialize_aix_thread): Remove references to init_aix_thread_ops
10106 and complete_target_initialization.
10107 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10108 (rs6000_nat_target): New class.
10109 (the_rs6000_nat_target): New.
10110 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10111 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10112 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10113 (super_create_inferior): Delete.
10114 (_initialize_rs6000_nat): Adjust to C++ification.
10115
10116 * arm-linux-nat.c (arm_linux_nat_target): New class.
10117 (the_arm_linux_nat_target): New.
10118 (arm_linux_fetch_inferior_registers)
10119 (arm_linux_store_inferior_registers, arm_linux_read_description)
10120 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10121 (arm_linux_remove_hw_breakpoint)
10122 (arm_linux_region_ok_for_hw_watchpoint)
10123 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10124 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10125 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10126 arm_linux_nat_target.
10127 (_initialize_arm_linux_nat): Adjust to C++ification.
10128
10129 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10130 (the_aarch64_linux_nat_target): New.
10131 (aarch64_linux_fetch_inferior_registers)
10132 (aarch64_linux_store_inferior_registers)
10133 (aarch64_linux_child_post_startup_inferior)
10134 (aarch64_linux_read_description)
10135 (aarch64_linux_can_use_hw_breakpoint)
10136 (aarch64_linux_insert_hw_breakpoint)
10137 (aarch64_linux_remove_hw_breakpoint)
10138 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10139 (aarch64_linux_region_ok_for_hw_watchpoint)
10140 (aarch64_linux_stopped_data_address)
10141 (aarch64_linux_stopped_by_watchpoint)
10142 (aarch64_linux_watchpoint_addr_within_range)
10143 (aarch64_linux_can_do_single_step): Refactor as methods of
10144 aarch64_linux_nat_target.
10145 (super_post_startup_inferior): Delete.
10146 (_initialize_aarch64_linux_nat): Adjust to C++ification.
10147
10148 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10149 (the_hppa_linux_nat_target): New.
10150 (hppa_linux_fetch_inferior_registers)
10151 (hppa_linux_store_inferior_registers): Refactor as methods of
10152 hppa_linux_nat_target.
10153 (_initialize_hppa_linux_nat): Adjust to C++ification.
10154
10155 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10156 (the_ia64_linux_nat_target): New.
10157 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10158 (ia64_linux_stopped_data_address)
10159 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10160 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10161 ia64_linux_nat_target methods.
10162 (super_xfer_partial): Delete.
10163 (_initialize_ia64_linux_nat): Adjust to C++ification.
10164
10165 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10166 (the_m32r_linux_nat_target): New.
10167 (m32r_linux_fetch_inferior_registers)
10168 (m32r_linux_store_inferior_registers): Refactor as
10169 m32r_linux_nat_target methods.
10170 (_initialize_m32r_linux_nat): Adjust to C++ification.
10171
10172 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10173 (the_m68k_linux_nat_target): New.
10174 (m68k_linux_fetch_inferior_registers)
10175 (m68k_linux_store_inferior_registers): Refactor as
10176 m68k_linux_nat_target methods.
10177 (_initialize_m68k_linux_nat): Adjust to C++ification.
10178
10179 * s390-linux-nat.c (s390_linux_nat_target): New class.
10180 (the_s390_linux_nat_target): New.
10181 (s390_linux_fetch_inferior_registers)
10182 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10183 (s390_insert_watchpoint, s390_remove_watchpoint)
10184 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10185 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10186 (s390_auxv_parse, s390_read_description): Refactor as methods of
10187 s390_linux_nat_target.
10188 (_initialize_s390_nat): Adjust to C++ification.
10189
10190 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10191 (the_sparc_linux_nat_target): New.
10192 (_initialize_sparc_linux_nat): Adjust to C++ification.
10193 * sparc-nat.c (sparc_fetch_inferior_registers)
10194 (sparc_store_inferior_registers): Remove target_ops parameter.
10195 * sparc-nat.h (sparc_fetch_inferior_registers)
10196 (sparc_store_inferior_registers): Remove target_ops parameter.
10197 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10198 (the_sparc64_linux_nat_target): New.
10199 (_initialize_sparc64_linux_nat): Adjust to C++ification.
10200
10201 * spu-linux-nat.c (spu_linux_nat_target): New class.
10202 (the_spu_linux_nat_target): New.
10203 (spu_child_post_startup_inferior, spu_child_post_attach)
10204 (spu_child_wait, spu_fetch_inferior_registers)
10205 (spu_store_inferior_registers, spu_xfer_partial)
10206 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10207 methods.
10208 (_initialize_spu_nat): Adjust to C++ification.
10209
10210 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10211 (the_tilegx_linux_nat_target): New.
10212 (fetch_inferior_registers, store_inferior_registers):
10213 Refactor as methods.
10214 (_initialize_tile_linux_nat): Adjust to C++ification.
10215
10216 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10217 (the_xtensa_linux_nat_target): New.
10218 (xtensa_linux_fetch_inferior_registers)
10219 (xtensa_linux_store_inferior_registers): Refactor as
10220 xtensa_linux_nat_target methods.
10221 (_initialize_xtensa_linux_nat): Adjust to C++ification.
10222
10223 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10224 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10225 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10226 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10227 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10228 (fbsd_stopped_by_sw_breakpoint)
10229 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10230 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10231 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10232 (fbsd_post_startup_inferior, fbsd_post_attach)
10233 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10234 (fbsd_set_syscall_catchpoint)
10235 (super_xfer_partial, super_resume, super_wait)
10236 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10237 (fbsd_handle_debug_trap): Remove target_ops parameter.
10238 (fbsd_nat_add_target): Delete.
10239 * fbsd-nat.h: Include "inf-ptrace.h".
10240 (fbsd_nat_add_target): Delete.
10241 (USE_SIGTRAP_SIGINFO): Define.
10242 (fbsd_nat_target): New class.
10243
10244 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10245 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10246 (amd64bsd_target): Delete.
10247 * amd64-bsd-nat.h: New file.
10248 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10249 "x86-bsd-nat.h".
10250 (amd64_fbsd_nat_target): New class.
10251 (the_amd64_fbsd_nat_target): New.
10252 (amd64fbsd_read_description): Refactor as method of
10253 amd64_fbsd_nat_target.
10254 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10255 (_initialize_amd64fbsd_nat): Adjust to C++ification.
10256 * amd64-nat.h (amd64bsd_target): Delete function declaration.
10257 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10258 (i386bsd_store_inferior_registers): Remove target_ops parameter.
10259 (i386bsd_target): Delete.
10260 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10261 (i386bsd_fetch_inferior_registers)
10262 (i386bsd_store_inferior_registers): Declare.
10263 (i386_bsd_nat_target): New class.
10264 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10265 (the_i386_fbsd_nat_target): New.
10266 (i386fbsd_resume, i386fbsd_read_description): Refactor as
10267 i386_fbsd_nat_target methods.
10268 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10269 (_initialize_i386fbsd_nat): Adjust to C++ification.
10270 * x86-bsd-nat.c (super_mourn_inferior): Delete.
10271 (x86bsd_mourn_inferior, x86bsd_target): Delete.
10272 (_initialize_x86_bsd_nat): Adjust to C++ification.
10273 * x86-bsd-nat.h: Include "x86-nat.h".
10274 (x86bsd_target): Delete declaration.
10275 (x86bsd_nat_target): New class.
10276
10277 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10278 (the_aarch64_fbsd_nat_target): New.
10279 (aarch64_fbsd_fetch_inferior_registers)
10280 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10281 aarch64_fbsd_nat_target.
10282 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10283 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10284 (the_alpha_bsd_nat_target): New.
10285 (alphabsd_fetch_inferior_registers)
10286 (alphabsd_store_inferior_registers): Refactor as
10287 alpha_bsd_nat_target methods.
10288 (_initialize_alphabsd_nat): Refactor as methods of
10289 alpha_bsd_nat_target.
10290 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10291 (the_amd64_nbsd_nat_target): New.
10292 (_initialize_amd64nbsd_nat): Adjust to C++ification.
10293 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10294 (the_amd64_obsd_nat_target): New.
10295 (_initialize_amd64obsd_nat): Adjust to C++ification.
10296 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10297 (the_arm_fbsd_nat_target): New.
10298 (arm_fbsd_fetch_inferior_registers)
10299 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10300 (_initialize_arm_fbsd_nat): Refactor as methods of
10301 arm_fbsd_nat_target.
10302 (_initialize_arm_fbsd_nat): Adjust to C++ification.
10303 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10304 (the_arm_netbsd_nat_target): New.
10305 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10306 arm_netbsd_nat_target.
10307 (_initialize_arm_netbsd_nat): Adjust to C++ification.
10308 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10309 (the_hppa_nbsd_nat_target): New.
10310 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10311 hppa_nbsd_nat_target methods.
10312 (_initialize_hppanbsd_nat): Adjust to C++ification.
10313 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10314 (the_hppa_obsd_nat_target): New.
10315 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10316 methods of hppa_obsd_nat_target.
10317 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
10318 add_target.
10319 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10320 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
10321 add_target.
10322 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10323 (_initialize_i386obsd_nat): Use add_target.
10324 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10325 (the_m68k_bsd_nat_target): New.
10326 (m68kbsd_fetch_inferior_registers)
10327 (m68kbsd_store_inferior_registers): Refactor as methods of
10328 m68k_bsd_nat_target.
10329 (_initialize_m68kbsd_nat): Adjust to C++ification.
10330 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10331 (the_mips_fbsd_nat_target): New.
10332 (mips_fbsd_fetch_inferior_registers)
10333 (mips_fbsd_store_inferior_registers): Refactor as methods of
10334 mips_fbsd_nat_target.
10335 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
10336 add_target.
10337 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10338 (the_mips_nbsd_nat_target): New.
10339 (mipsnbsd_fetch_inferior_registers)
10340 (mipsnbsd_store_inferior_registers): Refactor as methods of
10341 mips_nbsd_nat_target.
10342 (_initialize_mipsnbsd_nat): Adjust to C++ification.
10343 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10344 (the_mips64_obsd_nat_target): New.
10345 (mips64obsd_fetch_inferior_registers)
10346 (mips64obsd_store_inferior_registers): Refactor as methods of
10347 mips64_obsd_nat_target.
10348 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
10349 add_target.
10350 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10351 nbsd_nat_target.
10352 * nbsd-nat.h: Include "inf-ptrace.h".
10353 (nbsd_nat_target): New class.
10354 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10355 (obsd_wait): Refactor as methods of obsd_nat_target.
10356 (obsd_add_target): Delete.
10357 * obsd-nat.h: Include "inf-ptrace.h".
10358 (obsd_nat_target): New class.
10359 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10360 (the_ppc_fbsd_nat_target): New.
10361 (ppcfbsd_fetch_inferior_registers)
10362 (ppcfbsd_store_inferior_registers): Refactor as methods of
10363 ppc_fbsd_nat_target.
10364 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
10365 add_target.
10366 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10367 (the_ppc_nbsd_nat_target): New.
10368 (ppcnbsd_fetch_inferior_registers)
10369 (ppcnbsd_store_inferior_registers): Refactor as methods of
10370 ppc_nbsd_nat_target.
10371 (_initialize_ppcnbsd_nat): Adjust to C++ification.
10372 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10373 (the_ppc_obsd_nat_target): New.
10374 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10375 methods of ppc_obsd_nat_target.
10376 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
10377 add_target.
10378 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10379 (the_sh_nbsd_nat_target): New.
10380 (shnbsd_fetch_inferior_registers)
10381 (shnbsd_store_inferior_registers): Refactor as methods of
10382 sh_nbsd_nat_target.
10383 (_initialize_shnbsd_nat): Adjust to C++ification.
10384 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10385 (inf_ptrace_xfer_partial): Delete.
10386 (sparc_xfer_partial, sparc_target): Delete.
10387 * sparc-nat.h (sparc_fetch_inferior_registers)
10388 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10389 (sparc_target): Delete function declaration.
10390 (sparc_target): New template class.
10391 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10392 (_initialize_sparcnbsd_nat): Adjust to C++ification.
10393 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10394 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
10395 add_target.
10396 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10397 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10398 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10399 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
10400 add_target.
10401 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10402 (the_vax_bsd_nat_target): New.
10403 (vaxbsd_fetch_inferior_registers)
10404 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10405 methods.
10406 (_initialize_vaxbsd_nat): Adjust to C++ification.
10407
10408 * bsd-kvm.c (bsd_kvm_target): New class.
10409 (bsd_kvm_ops): Now a bsd_kvm_target.
10410 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10411 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10412 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10413 bsd_kvm_target.
10414 (bsd_kvm_return_one): Delete.
10415 (bsd_kvm_add_target): Adjust to C++ification.
10416
10417 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10418 (nto_procfs_target_procfs): New classes.
10419 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10420 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10421 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10422 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10423 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10424 (procfs_remove_hw_breakpoint, procfs_resume)
10425 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10426 (procfs_kill_inferior, procfs_store_registers)
10427 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10428 as methods of nto_procfs_target.
10429 (nto_procfs_ops): Now an nto_procfs_target_procfs.
10430 (nto_native_ops): Delete.
10431 (procfs_open, procfs_native_open): Delete.
10432 (nto_native_ops): Now an nto_procfs_target_native.
10433 (init_procfs_targets): Adjust to C++ification.
10434 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10435 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10436 Refactor as methods of nto_procfs_target.
10437
10438 * go32-nat.c (go32_nat_target): New class.
10439 (the_go32_nat_target): New.
10440 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10441 (go32_store_registers, go32_xfer_partial, go32_files_info)
10442 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10443 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10444 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10445 (go32_pid_to_str): Refactor as methods of go32_nat_target.
10446 (go32_target): Delete.
10447 (_initialize_go32_nat): Adjust to C++ification.
10448
10449 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10450 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10451 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10452 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10453 gnu_nat_target.
10454 (gnu_target): Delete.
10455 * gnu-nat.h (gnu_target): Delete.
10456 (gnu_nat_target): New class.
10457 * i386-gnu-nat.c (gnu_base_target): New.
10458 (i386_gnu_nat_target): New class.
10459 (the_i386_gnu_nat_target): New.
10460 (_initialize_i386gnu_nat): Adjust to C++ification.
10461
10462 2018-05-02 Pedro Alves <palves@redhat.com>
10463
10464 * bfd-target.c (target_bfd_xclose): Rename to ...
10465 (target_bfd_close): ... this.
10466 (target_bfd_reopen): Adjust.
10467 * target.c (target_close): Remove references to to_xclose.
10468 * target.h (target_ops::to_xclose): Delete.
10469 (target_ops::to_close): Update comments.
10470
10471 2018-05-02 Pedro Alves <palves@redhat.com>
10472
10473 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10474 "linux-nat.h".
10475 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10476 * inf-ptrace.c (inf_ptrace_register_u_offset)
10477 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10478 (inf_ptrace_store_register, inf_ptrace_store_registers)
10479 (inf_ptrace_trad_target): Move to ...
10480 * linux-nat-trad.c: ... this new file.
10481 * linux-nat-trad.h: New file.
10482 * linux-nat.c (linux_target_install_ops): Make extern.
10483 (linux_trad_target): Delete.
10484 * linux-nat.h (linux_trad_target): Delete declaration.
10485 (linux_target_install_ops): Declare.
10486 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10487 "linux-nat.h".
10488
10489 2018-05-02 Pedro Alves <palves@redhat.com>
10490
10491 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10492 procfs_target/add_target here.
10493 * procfs.c (procfs_target): Make static.
10494 (_initialize_procfs): Call add_target here.
10495 * procfs.h (struct target_ops): Remove forward declaration.
10496 (procfs_target): Remove declaration.
10497 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10498
10499 2018-05-02 Pedro Alves <palves@redhat.com>
10500
10501 * procfs.c (procfs_stopped_by_watchpoint)
10502 (procfs_insert_watchpoint, procfs_remove_watchpoint)
10503 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10504 Forward declare.
10505 (procfs_use_watchpoints): Delete, move contents...
10506 (procfs_target): ... here.
10507 * procfs.h (procfs_use_watchpoints): Delete declaration.
10508 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10509 procfs_use_watchpoints.
10510 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10511 procfs_use_watchpoints.
10512
10513 2018-05-02 Tom Tromey <tom@tromey.com>
10514
10515 PR python/20084:
10516 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10517 and var_zuinteger_unlimited.
10518 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10519 and PARAM_ZUINTEGER_UNLIMITED.
10520 (set_parameter_value): Handle var_zuinteger and
10521 var_zuinteger_unlimited.
10522 (add_setshow_generic): Likewise.
10523 (parmpy_init): Likewise.
10524
10525 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
10526
10527 PR rust/23124
10528 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10529 pointer is not null before dereferencing it.
10530
10531 2018-04-30 Tom Tromey <tom@tromey.com>
10532
10533 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10534 is_mi_like_p.
10535
10536 2018-04-30 Tom Tromey <tom@tromey.com>
10537
10538 * breakpoint.c (mention): Remove use of is_mi_like_p.
10539 (print_mention_ranged_breakpoint): Likewise.
10540 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10541 of is_mi_like_p.
10542
10543 2018-04-30 Tom Tromey <tom@tromey.com>
10544
10545 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10546
10547 2018-04-30 Tom Tromey <tom@tromey.com>
10548
10549 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10550 (info_spu_event_command): Remove some uses of is_mi_like_p.
10551
10552 2018-04-30 Tom Tromey <tom@tromey.com>
10553
10554 * python/py-framefilter.c (py_print_single_arg)
10555 (enumerate_locals, py_print_args, py_print_frame): Remove some
10556 uses of is_mi_like_p.
10557
10558 2018-04-30 Tom Tromey <tom@tromey.com>
10559
10560 * ui-out.c: Update.
10561 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10562 * ui-out.h (ui_out::is_mi_like_p): Now const.
10563 (ui_out::do_is_mi_like_p): Now const.
10564 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10565
10566 2018-04-30 Tom Tromey <tom@tromey.com>
10567
10568 * varobj.c (varobj_set_visualizer): Use new_reference.
10569 * python/python.c (gdbpy_decode_line): Use new_reference.
10570 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10571 new_reference.
10572
10573 2018-04-30 Tom Tromey <tom@tromey.com>
10574
10575 * varobj.c (install_new_value): Use new_reference.
10576 * value.h (value_incref): Return void. Swap intro comment with
10577 value_decref.
10578 * value.c (set_value_parent): Use new_reference.
10579 (value_incref): Return void. Update intro comment.
10580 (release_value): Use new_reference.
10581 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10582
10583 2018-04-30 Tom Tromey <tom@tromey.com>
10584
10585 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10586 * gdb_bfd.h (new_bfd_ref): Remove.
10587 (gdb_bfd_open): Update comment.
10588 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10589 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10590 (gdb_bfd_fdopenr): Use new_reference.
10591 * exec.c (exec_file_attach): Use new_reference.
10592
10593 2018-04-30 Tom Tromey <tom@tromey.com>
10594
10595 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10596 method.
10597
10598 2018-04-30 Tom Tromey <tom@tromey.com>
10599
10600 * jit.c (jit_read_code_entry): Use type_align.
10601 * i386-tdep.c (i386_gdbarch_init): Don't call
10602 set_gdbarch_long_long_align_bit.
10603 * gdbarch.sh: Remove long_long_align_bit.
10604 * gdbarch.c, gdbarch.h: Rebuild.
10605 * arc-tdep.c (arc_type_align): New function.
10606 (arc_gdbarch_init): Use arc_type_align. Don't call
10607 set_gdbarch_long_long_align_bit.
10608
10609 2018-04-30 Tom Tromey <tom@tromey.com>
10610
10611 * rust-lang.c (rust_type_alignment): Remove.
10612 (rust_composite_type): Use type_align.
10613
10614 2018-04-30 Tom Tromey <tom@tromey.com>
10615
10616 * NEWS: Mention Type.align.
10617 * python/py-type.c (typy_get_alignof): New function.
10618 (type_object_getset): Add "alignof".
10619
10620 2018-04-30 Tom Tromey <tom@tromey.com>
10621
10622 PR exp/17095:
10623 * NEWS: Update.
10624 * std-operator.def (UNOP_ALIGNOF): New operator.
10625 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10626 New.
10627 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10628 * c-lang.c (c_op_print_tab): Add alignof.
10629 * c-exp.y (ALIGNOF): New token.
10630 (exp): Add "ALIGNOF" production.
10631 (ident_tokens): Add _Alignof and alignof.
10632
10633 2018-04-30 Tom Tromey <tom@tromey.com>
10634
10635 * i386-tdep.c (i386_type_align): New function.
10636 (i386_gdbarch_init): Update.
10637 * gdbarch.sh (type_align): New method.
10638 * gdbarch.c, gdbarch.h: Rebuild.
10639 * arch-utils.h (default_type_align): Declare.
10640 * arch-utils.c (default_type_align): New function.
10641 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10642 (struct type) <align_log2>: New field.
10643 <instance_flags>: Now a bitfield.
10644 (TYPE_RAW_ALIGN): New macro.
10645 (type_align, type_raw_align, set_type_align): Declare.
10646 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10647 functions.
10648 * dwarf2read.c (quirk_rust_enum): Set type alignment.
10649 (get_alignment, maybe_set_alignment): New functions.
10650 (read_structure_type, read_enumeration_type, read_array_type)
10651 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10652 (read_subrange_type, read_base_type): Set type alignment.
10653
10654 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
10655
10656 * dwarf2read.c (read_index_from_section): Use bool.
10657
10658 2018-04-29 Fabian Groffen <grobian@gentoo.org>
10659
10660 PR gdb/22950
10661 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10662 with #ifdef.
10663
10664 2018-04-29 John Reiser <jreiser@BitWagon.com>
10665
10666 PR build/22873
10667 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10668 last step, and do it atomically.
10669
10670 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
10671
10672 * compile/compile-c-types.c (convert_int, convert_float):
10673 Update for C FE v1.
10674
10675 2018-04-27 Tom Tromey <tom@tromey.com>
10676
10677 PR rust/22545:
10678 * rust-lang.c (rust_inclusive_range_type_p): New function.
10679 (rust_range): Handle inclusive ranges.
10680 (rust_compute_range): Likewise.
10681 * rust-exp.y (struct rust_op) <inclusive>: New field.
10682 (DOTDOTEQ): New constant.
10683 (range_expr): Add "..=" productions.
10684 (operator_tokens): Add "..=" token.
10685 (ast_range): Add "inclusive" parameter.
10686 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10687 ranges.
10688 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10689 bounds values.
10690 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10691 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10692 Update comments.
10693 * expprint.c (print_subexp_standard): Handle new bounds values.
10694 (dump_subexp_body_standard): Likewise.
10695
10696 2018-04-27 Tom Tromey <tom@tromey.com>
10697
10698 * configure: Rebuild.
10699 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10700 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10701 "OVERRIDE".
10702 (class symbol_needs_eval_context): Likewise.
10703 * dwarf2read.c (mock_mapped_index::symbol_name_count)
10704 (mock_mapped_index::symbol_name_at): Use "override". Remove
10705 "virtual".
10706 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10707 "override".
10708 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10709 * aarch64-tdep.c (instruction_reader::read): Use "override".
10710 (instruction_reader_test::read): Likewise.
10711 * arm-tdep.c (instruction_reader::read): Use "override".
10712 (instruction_reader_thumb::read): Likewise.
10713
10714 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
10715
10716 PR remote/9665
10717 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10718 instead of remote_send.
10719 (remote_send): Remove.
10720
10721 2018-04-26 Pedro Alves <palves@redhat.com>
10722
10723 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10724 find_function_start_sal instead of find_pc_line.
10725
10726 2018-04-26 Pedro Alves <palves@redhat.com>
10727
10728 * breakpoint.c (set_breakpoint_location_function): Handle
10729 mst_data_gnu_ifunc.
10730 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10731 * elfread.c (elf_symtab_read): Give data symbols with
10732 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10733 (elf_rel_plt_read): Update comment.
10734 * linespec.c (convert_linespec_to_sals): Handle
10735 mst_data_gnu_ifunc.
10736 (minsym_found): Handle mst_data_gnu_ifunc.
10737 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10738 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10739 * parse.c (find_minsym_type_and_address): Handle
10740 mst_data_gnu_ifunc.
10741 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10742 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10743 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10744 comment.
10745 <mst_data_gnu_ifunc>: New enumerator.
10746
10747 2018-04-26 Pedro Alves <palves@redhat.com>
10748
10749 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10750 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10751 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10752 Handle it.
10753 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10754 (lookup_minimal_symbol_by_pc): Adjust.
10755 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10756 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10757 * minsyms.h (lookup_msym_prefer): New enum.
10758 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10759 parameter by a lookup_msym_prefer parameter.
10760
10761 2018-04-26 Pedro Alves <palves@redhat.com>
10762
10763 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10764 ends in "@plt" instead of looking at the symbol's section.
10765
10766 2018-04-26 Pedro Alves <palves@redhat.com>
10767
10768 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10769 all references.
10770 (find_pc_partial_function_gnu_ifunc): Rename to ...
10771 (find_pc_partial_function): ... this, and remove references to
10772 'is_gnu_ifunc_p'.
10773 (find_pc_partial_function): Delete old implementation.
10774 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10775
10776 2018-04-26 Pedro Alves <palves@redhat.com>
10777
10778 * linespec.c (struct bound_minimal_symbol_search_key): New.
10779 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10780 skip first line if we found a GNU ifunc minimal symbol by name.
10781 (compare_msymbols): Change parameters to work with a destructured
10782 lhs minsym.
10783 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10784 functions.
10785
10786 2018-04-26 Pedro Alves <palves@redhat.com>
10787
10788 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10789 ifunc targets here. Instead, if we have an ifunc minsym, use its
10790 address/name.
10791 (add_location_to_breakpoint): Store the minsym and the objfile in
10792 the breakpoint location.
10793 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10794 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10795 Record the minsym in the sal.
10796 * symtab.h (symtab_and_line) <msymbol>: New field.
10797
10798 2018-04-26 Pedro Alves <palves@redhat.com>
10799
10800 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10801 unless we actually resolved the ifunc.
10802
10803 2018-04-26 Pedro Alves <palves@redhat.com>
10804
10805 * c-exp.y (variable production): Prefer ifunc minsyms over
10806 regular function symbols.
10807 * symtab.c (find_gnu_ifunc): New function.
10808 * minsyms.h (lookup_msym_prefer): New enum.
10809 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10810 parameter by a lookup_msym_prefer parameter.
10811 * symtab.h (find_gnu_ifunc): New declaration.
10812
10813 2018-04-26 Pedro Alves <palves@redhat.com>
10814
10815 * blockframe.c (find_gnu_ifunc_target_type): New function.
10816 (find_function_type): New.
10817 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10818 return a value with a memory address.
10819 (eval_call): For calls to GNU ifunc functions, try to find the
10820 type of the target function from the type that the resolver
10821 returns.
10822 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10823 symbols.
10824 * infcall.c (find_function_return_type): Delete.
10825 (find_function_addr): Add 'function_type' parameter. For calls to
10826 GNU ifunc functions, try to find the type of the target function
10827 from the type that the resolver returns, and return it via
10828 FUNCTION_TYPE.
10829 (call_function_by_hand_dummy): Adjust to use the function type
10830 returned by find_function_addr.
10831 (find_function_addr): Add 'function_type' parameter and move
10832 description here.
10833 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10834 declarations.
10835
10836 2018-04-26 Pedro Alves <palves@redhat.com>
10837
10838 * c-exp.y (variable production): Skip finding an alias for ifunc
10839 symbols.
10840
10841 2018-04-26 Pedro Alves <palves@redhat.com>
10842
10843 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10844
10845 2018-04-25 Pedro Alves <palves@redhat.com>
10846
10847 * infcmd.c (kill_command): Print the pid as string, not the whole
10848 thread's ptid. Add comment. s/has been killed/killed/ in output
10849 message.
10850 * remote.c (remote_detach_1): Print the pid as string, not the
10851 whole thread's ptid.
10852
10853 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10854 Sergio Durigan Junior <sergiodj@redhat.com>
10855 Pedro Alves <palves@redhat.com>
10856
10857 * infcmd.c (kill_command): Print message when inferior has
10858 been killed.
10859 * inferior.c (print_inferior_events): Remove 'static'. Set as
10860 '1'.
10861 (add_inferior): Improve message printed when
10862 'print_inferior_events' is on.
10863 (exit_inferior): Remove message printed when
10864 'print_inferior_events' is on.
10865 (detach_inferior): Improve message printed when
10866 'print_inferior_events' is on.
10867 (initialize_inferiors): Use 'add_inferior_silent' to set
10868 'current_inferior_'.
10869 * inferior.h (print_inferior_events): Declare here as
10870 'extern'.
10871 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10872 '[Detaching...]' messages when 'print_inferior_events' is on.
10873 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
10874 as prefix/suffix for messages. Remove periods. Fix erroneous
10875 'Detaching after fork from child...', replace it by '... from
10876 parent...'.
10877 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10878 prefix/suffix when printing 'Detaching...' messages. Print
10879 them when 'print_inferior_events' is on.
10880 * remote.c (remote_detach_1): Print message when detaching
10881 from inferior and '!is_fork_parent'.
10882
10883 2018-04-24 Tom Tromey <tom@tromey.com>
10884
10885 * cli-out.h: Reindent.
10886
10887 2018-04-24 Tom Tromey <tom@tromey.com>
10888
10889 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10890 (cli_ui_out::do_field_string): Use fputs_filtered.
10891 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10892
10893 2018-04-23 Tom Tromey <tom@tromey.com>
10894
10895 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10896 gdb::unique_xmalloc_ptr.
10897
10898 2018-04-23 Tom Tromey <tom@tromey.com>
10899
10900 * configure: Rebuild.
10901
10902 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10903
10904 PR gdb/23095
10905 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10906 prepare_for_testing. Set normal_bp to r_debug_state if target
10907 is bsd.
10908
10909 2018-04-21 Pedro Alves <palves@redhat.com>
10910 Rajendra SY <rajendra.sy@gmail.com>
10911
10912 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10913 * remote.c (extended_remote_attach): In all-stop mode, mark the
10914 thread as executing.
10915
10916 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
10917
10918 * thread.c (thread_apply_all_command): Fix comment.
10919 (thread_command): Fix comment.
10920
10921 2018-04-10 Alan Hayward <alan.hayward@arm.com>
10922
10923 * common/tdesc.h (tdesc_create_feature): Remove xml filename
10924 parameter.
10925 * features/aarch64-core.c (create_feature_aarch64_core):
10926 Regenerate.
10927 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10928 Likewise.
10929 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10930 Likewise.
10931 * features/i386/32bit-avx512.c
10932 (create_feature_i386_32bit_avx512): Likewise.
10933 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10934 Likewise.
10935 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10936 Likewise.
10937 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10938 Likewise.
10939 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10940 Likewise.
10941 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10942 Likewise.
10943 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10944 Likewise.
10945 * features/i386/64bit-avx512.c
10946 (create_feature_i386_64bit_avx512): Likewise.
10947 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10948 Likewise.
10949 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10950 Likewise.
10951 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10952 Likewise.
10953 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10954 Likewise.
10955 * features/i386/64bit-segments.c
10956 (create_feature_i386_64bit_segments): Likewise.
10957 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10958 Likewise.
10959 * features/i386/x32-core.c
10960 (create_feature_i386_x32_core): Likewise.
10961 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10962 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10963 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10964 * target-descriptions.c: In generated code, don't pass xml
10965 filename.
10966
10967 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10968
10969 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10970 (print_xml_feature::visit_post): Likewise.
10971 (print_xml_feature::visit): Likewise.
10972 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10973 (print_xml_feature): Add new class.
10974 * regformats/regdat.sh: Null xmltarget on feature targets.
10975 * target-descriptions.c (struct target_desc): Add xmltarget.
10976 (maintenance_check_tdesc_xml_convert): Add unittest function.
10977 (tdesc_get_features_xml): Add function to get xml.
10978 (maintenance_check_xml_descriptions): Test xml generation.
10979 * xml-tdesc.c (string_read_description_xml): Add function.
10980 * xml-tdesc.h (string_read_description_xml): Add declaration.
10981
10982 2018-04-18 Alan Hayward <alan.hayward@arm.com>
10983
10984 * features/Makefile: Add feature marker to targets with new style
10985 target descriptions.
10986 * regformats/aarch64.dat: Regenerate.
10987 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10988 * regformats/i386/amd64-avx-linux.dat: Likewise.
10989 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10990 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10991 * regformats/i386/amd64-linux.dat: Likewise.
10992 * regformats/i386/amd64-mpx-linux.dat: Likewise.
10993 * regformats/i386/amd64.dat: Likewise.
10994 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10995 * regformats/i386/i386-avx-linux.dat: Likewise.
10996 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10997 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10998 * regformats/i386/i386-linux.dat: Likewise.
10999 * regformats/i386/i386-mmx-linux.dat: Likewise.
11000 * regformats/i386/i386-mpx-linux.dat: Likewise.
11001 * regformats/i386/i386.dat: Likewise.
11002 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11003 * regformats/i386/x32-avx-linux.dat: Likewise.
11004 * regformats/i386/x32-linux.dat: Likewise.
11005 * regformats/tic6x-c62x-linux.dat: Likewise.
11006 * regformats/tic6x-c64x-linux.dat: Likewise.
11007 * regformats/tic6x-c64xp-linux.dat: Likewise.
11008 * regformats/regdat.sh: Parse feature marker.
11009
11010 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11011
11012 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11013 (tdesc_osabi_name): Likewise.
11014 * target-descriptions.c (tdesc_architecture_name): Add new
11015 function.
11016 (tdesc_osabi_name): Likewise.
11017
11018 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11019
11020 * common/tdesc.c (tdesc_predefined_type): Move to here.
11021 (tdesc_named_type): Likewise.
11022 (tdesc_create_vector): Likewise.
11023 (tdesc_create_struct): Likewise.
11024 (tdesc_set_struct_size): Likewise.
11025 (tdesc_create_union): Likewise.
11026 (tdesc_create_flags): Likewise.
11027 (tdesc_create_enum): Likewise.
11028 (tdesc_add_field): Likewise.
11029 (tdesc_add_typed_bitfield): Likewise.
11030 (tdesc_add_bitfield): Likewise.
11031 (tdesc_add_flag): Likewise.
11032 (tdesc_add_enum_value): Likewise.
11033 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11034 (struct tdesc_type_vector): Likewise.
11035 (struct tdesc_type_field): Likewise.
11036 (struct tdesc_type_with_fields): Likewise.
11037 (tdesc_create_enum): Add declaration.
11038 (tdesc_add_typed_bitfield): Likewise.
11039 (tdesc_add_enum_value): Likewise.
11040 * target-descriptions.c (tdesc_type_field): Move from here.
11041 (tdesc_type_builtin): Likewise.
11042 (tdesc_type_vector): Likewise.
11043 (tdesc_type_with_fields): Likewise.
11044 (tdesc_predefined_types): Likewise.
11045 (tdesc_named_type): Likewise.
11046 (tdesc_create_vector): Likewise.
11047 (tdesc_create_struct): Likewise.
11048 (tdesc_set_struct_size): Likewise.
11049 (tdesc_create_union): Likewise.
11050 (tdesc_create_flags): Likewise.
11051 (tdesc_create_enum): Likewise.
11052 (tdesc_add_field): Likewise.
11053 (tdesc_add_typed_bitfield): Likewise.
11054 (tdesc_add_bitfield): Likewise.
11055 (tdesc_add_flag): Likewise.
11056 (tdesc_add_enum_value): Likewise.
11057 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11058 (tdesc_add_typed_bitfield): Likewise.
11059 (tdesc_add_enum_value): Likewise.
11060
11061 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11062
11063 * common/tdesc.c (tdesc_feature::accept): Move to here.
11064 (tdesc_feature::operator==): Likewise.
11065 (tdesc_create_reg): Likewise.
11066 * common/tdesc.h (tdesc_type_kind): Likewise.
11067 (struct tdesc_type): Likewise.
11068 (struct tdesc_feature): Likewise.
11069 * regformats/regdat.sh: Create a feature.
11070 * target-descriptions.c (tdesc_type_kind): Move from here.
11071 (tdesc_type): Likewise.
11072 (tdesc_type_up): Likewise.
11073 (tdesc_feature): Likewise.
11074 (tdesc_create_reg): Likewise.
11075
11076 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11077
11078 * Makefile.in: Add arch/tdesc.c
11079 * common/tdesc.c: New file.
11080 * common/tdesc.h (tdesc_element_visitor): Move to here.
11081 (tdesc_element): Likewise.
11082 (tdesc_reg): Likewise.
11083 (tdesc_reg_up): Likewise.
11084 * regformats/regdef.h (reg): Add offset to constructors.
11085 * target-descriptions.c (tdesc_element_visitor): Move from here.
11086 (tdesc_element): Likewise.
11087 (tdesc_reg): Likewise.
11088 (tdesc_reg_up): Likewise.
11089
11090 2018-04-17 Tom Tromey <tom@tromey.com>
11091
11092 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11093 discriminant field.
11094
11095 2018-04-17 Tom Tromey <tom@tromey.com>
11096
11097 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11098
11099 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
11100
11101 * symtab.c (print_symbol_info): Skip printing filename and line
11102 number when `last' is NULL.
11103 (symtab_symbol_info): Use empty string instead of NULL for first
11104 invocation of print_symbol_info.
11105 (rbreak_command): Pass NULL to `last' parameter of
11106 print_symbol_info.
11107
11108 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
11109
11110 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11111 instead of nullptr.
11112
11113 2018-04-16 Pedro Alves <palves@redhat.com>
11114
11115 * MAINTAINERS (sh): Remove.
11116 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11117 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11118 (ALLDEPFILES): Remove sh64-tdep.c.
11119 * NEWS: Mentions that support for SH-5/SH64 is removed.
11120 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11121 (sh*-*-openbsd*): Ditto.
11122 (sh64-*-elf*): Remove.
11123 (sh*): Remove.
11124 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11125 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11126 * sh-tdep.c: No longer include "sh64-tdep.h".
11127 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11128 * sh64-tdep.c, sh64-tdep.h: Remove files.
11129
11130 2018-04-16 Pedro Alves <palves@redhat.com>
11131
11132 * MAINTAINERS: Remove m88k.
11133 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11134 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11135 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11136 * NEWS: Mention that support for m88k was removed.
11137 * configure.host (m88*-*-*): Remove support.
11138 * configure.nat (m88k-*-*): Remove support.
11139 * configure.tgt (m88*-*-openbsd*): Remove.
11140 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11141
11142 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
11143
11144 * configure.tgt (x86_tobjs): New variable.
11145 (amd64_tobjs, i386_tobjs): Use it.
11146
11147 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11148
11149 * symtab.c (print_symbol_info): Precede the symbol definition by
11150 the line number when available.
11151 * NEWS: Advertise this enhancement.
11152
11153 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11154
11155 * NEWS (New options): announce set/show record btrace cpu.
11156 * btrace.c: Include record-btrace.h.
11157 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11158 the vendor is unknown.
11159 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
11160 Maybe overwrite the btrace configuration's cpu.
11161 (btrace_compute_ftrace): Add cpu parameter. Update callers.
11162 (btrace_fetch): Add cpu parameter. Update callers.
11163 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11164 Maybe overwrite the btrace configuration's cpu. Skip enabling
11165 errata workarounds if the vendor is unknown.
11166 * python/py-record-btrace.c: Include record-btrace.h.
11167 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11168 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11169 * record-btrace.c (record_btrace_cpu_state_kind): New.
11170 (record_btrace_cpu): New.
11171 (set_record_btrace_cpu_cmdlist): New.
11172 (record_btrace_get_cpu): New.
11173 (require_btrace_thread, record_btrace_info)
11174 (record_btrace_resume_thread): Call record_btrace_get_cpu.
11175 (cmd_set_record_btrace_cpu_none): New.
11176 (cmd_set_record_btrace_cpu_auto): New.
11177 (cmd_set_record_btrace_cpu): New.
11178 (cmd_show_record_btrace_cpu): New.
11179 (_initialize_record_btrace): Initialize set/show record btrace cpu
11180 commands.
11181 * record-btrace.h (record_btrace_get_cpu): New.
11182
11183 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11184
11185 * record.c (set_record_command): Fix typo in message.
11186
11187 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11188
11189 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11190
11191 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11192
11193 * infrun.c (process_event_stop_test): Call
11194 gdbarch_in_indirect_branch_thunk.
11195 * gdbarch.sh (in_indirect_branch_thunk): New.
11196 * gdbarch.c: Regenerated.
11197 * gdbarch.h: Regenerated.
11198 * x86-tdep.h: New.
11199 * x86-tdep.c: New.
11200 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11201 (HFILES_NO_SRCDIR): Add x86-tdep.h.
11202 (ALLDEPFILES): Add x86-tdep.c.
11203 * arch-utils.h (default_in_indirect_branch_thunk): New.
11204 * arch-utils.c (default_in_indirect_branch_thunk): New.
11205 * i386-tdep: Include x86-tdep.h.
11206 (i386_in_indirect_branch_thunk): New.
11207 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11208 function.
11209 * amd64-tdep: Include x86-tdep.h.
11210 (amd64_in_indirect_branch_thunk): New.
11211 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11212
11213 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11214
11215 PR gdb/23053
11216 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11217 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11218 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11219 regression.
11220
11221 2018-04-12 Tom Tromey <tom@tromey.com>
11222
11223 * rust-lang.c (rust_print_struct_def): Remove univariant code.
11224 (rust_evaluate_subexp): Likewise.
11225
11226 2018-04-12 Pedro Alves <palves@redhat.com>
11227
11228 * procfs.c (procfs_detach): Make forward declaration's prototype
11229 match definition's protototype.
11230 (proc_get_LDT_entry): Remove stale do_cleanups call.
11231
11232 2018-04-12 Pedro Alves <palves@redhat.com>
11233
11234 * target.h (target_ops::to_has_exited): Delete.
11235 (target_has_exited): Delete.
11236 * target-delegates.c: Regenerate.
11237
11238 2018-04-11 Pedro Alves <palves@redhat.com>
11239
11240 * target.c (fileio_fh_t::t): Add comment.
11241 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11242 (target_fileio_close): Handle a NULL target.
11243 (invalidate_fileio_fh): New.
11244 (target_close): Call it.
11245 * remote.c (remote_hostio_send_command): No longer check whether
11246 remote_desc is open.
11247
11248 2018-04-11 Pedro Alves <palves@redhat.com>
11249
11250 * target.c (fileio_fh_t): Make it a named struct instead of a
11251 typedef.
11252 (fileio_fh_t::is_closed): New method.
11253 (DEF_VEC_O (fileio_fh_t)): Remove.
11254 (fileio_fhandles): Now a std::vector.
11255 (is_closed_fileio_fh): Delete.
11256 (acquire_fileio_fd): Adjust. Rename parameters.
11257 (release_fileio_fd): Adjust.
11258 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11259 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11260 (target_fileio_close): Adjust.
11261
11262 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
11263
11264 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11265 index.
11266
11267 2018-04-10 Pedro Alves <palves@redhat.com>
11268
11269 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11270 (scoped_finish_thread_state): New class.
11271 * infcmd.c (run_command_1): Use it instead of finish_thread_state
11272 cleanup.
11273 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11274 (fetch_inferior_event, normal_stop): Likewise.
11275 * thread.c (finish_thread_state_cleanup): Delete.
11276
11277 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11278 Pedro Alves <palves@redhat.com>
11279
11280 * value.c: Include "selftest.h" and "common/array-view.h".
11281 (struct range) <operator ==>: New.
11282 (test_ranges_contain): New.
11283 (check_ranges_vector): New.
11284 (test_insert_into_bit_range_vector): New.
11285 (_initialize_values): Register selftests.
11286 * common/array-view.h (operator==, operator!=): New.
11287
11288 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11289
11290 * common/gdb_vecs.h (unordered_remove): Add overload that takes
11291 an iterator.
11292 * inline-frame.c: Include <algorithm>.
11293 (struct inline_state): Add constructor.
11294 (inline_state_s): Remove.
11295 (DEF_VEC_O(inline_state_s)): Remove.
11296 (inline_states): Change type to std::vector.
11297 (find_inline_frame_state): Adjust to std::vector.
11298 (allocate_inline_frame_state): Remove.
11299 (clear_inline_frame_state): Adjust to std::vector.
11300 (skip_inline_frames): Adjust to std::vector.
11301
11302 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11303
11304 * tracepoint.h (struct trace_state_variable): Add constructor.
11305 <name>: Change type to std::string.
11306 * tracepoint.c (tsv_s): Remove.
11307 (DEF_VEC_O(tsv_s)): Remove.
11308 (tvariables): Change to std::vector.
11309 (create_trace_state_variable): Adjust to std::vector.
11310 (find_trace_state_variable): Likewise.
11311 (find_trace_state_variable_by_number): Likewise.
11312 (delete_trace_state_variable): Likewise.
11313 (trace_variable_command): Adjust to std::string.
11314 (delete_trace_variable_command): Likewise.
11315 (tvariables_info_1): Adjust to std::vector.
11316 (save_trace_state_variables): Likewise.
11317 (start_tracing): Likewise.
11318 (merge_uploaded_trace_state_variables): Adjust to std::vector
11319 and std::string.
11320 * target.h (struct target_ops)
11321 <to_download_trace_state_variable>: Pass reference to
11322 trace_state_variable.
11323 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11324 * target-delegates.c: Re-generate.
11325 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11326 (mi_tsv_deleted): Likewise.
11327 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11328 * remote.c (remote_download_trace_state_variable): Change
11329 pointer to reference and adjust.
11330 * make-target-delegates (parse_argtypes): Handle references.
11331 (write_function_header): Likewise.
11332 (munge_type): Likewise.
11333
11334 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11335
11336 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11337 string_view-selftests.c.
11338 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11339 testsuite.
11340 * unittests/basic_string_view/cons/char/1.cc: Likewise.
11341 * unittests/basic_string_view/cons/char/2.cc: Likewise.
11342 * unittests/basic_string_view/cons/char/3.cc: Likewise.
11343 * unittests/basic_string_view/element_access/char/1.cc:
11344 Likewise.
11345 * unittests/basic_string_view/element_access/char/empty.cc:
11346 Likewise.
11347 * unittests/basic_string_view/element_access/char/front_back.cc:
11348 Likewise.
11349 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11350 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11351 Likewise.
11352 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11353 Likewise.
11354 * unittests/basic_string_view/modifiers/swap/char/1.cc:
11355 Likewise.
11356 * unittests/basic_string_view/operations/compare/char/1.cc:
11357 Likewise.
11358 * unittests/basic_string_view/operations/compare/char/13650.cc:
11359 Likewise.
11360 * unittests/basic_string_view/operations/copy/char/1.cc:
11361 Likewise.
11362 * unittests/basic_string_view/operations/data/char/1.cc:
11363 Likewise.
11364 * unittests/basic_string_view/operations/find/char/1.cc:
11365 Likewise.
11366 * unittests/basic_string_view/operations/find/char/2.cc:
11367 Likewise.
11368 * unittests/basic_string_view/operations/find/char/3.cc:
11369 Likewise.
11370 * unittests/basic_string_view/operations/find/char/4.cc:
11371 Likewise.
11372 * unittests/basic_string_view/operations/rfind/char/1.cc:
11373 Likewise.
11374 * unittests/basic_string_view/operations/rfind/char/2.cc:
11375 Likewise.
11376 * unittests/basic_string_view/operations/rfind/char/3.cc:
11377 Likewise.
11378 * unittests/basic_string_view/operations/substr/char/1.cc:
11379 Likewise.
11380 * unittests/basic_string_view/operators/char/2.cc: Likewise.
11381 * unittests/string_view-selftests.c: New file.
11382
11383 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11384
11385 * unittests/basic_string_view/capacity/1.cc: New file.
11386 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11387 * unittests/basic_string_view/cons/char/1.cc: New file.
11388 * unittests/basic_string_view/cons/char/2.cc: New file.
11389 * unittests/basic_string_view/cons/char/3.cc: New file.
11390 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11391 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11392 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11393 * unittests/basic_string_view/element_access/char/1.cc: New file.
11394 * unittests/basic_string_view/element_access/char/2.cc: New file.
11395 * unittests/basic_string_view/element_access/char/empty.cc: New file.
11396 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11397 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11398 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11399 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11400 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11401 * unittests/basic_string_view/include.cc: New file.
11402 * unittests/basic_string_view/inserters/char/1.cc: New file.
11403 * unittests/basic_string_view/inserters/char/2.cc: New file.
11404 * unittests/basic_string_view/inserters/char/3.cc: New file.
11405 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11406 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11407 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11408 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11409 * unittests/basic_string_view/literals/types.cc: New file.
11410 * unittests/basic_string_view/literals/values.cc: New file.
11411 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11412 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11413 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11414 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11415 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11416 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11417 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11418 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11419 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11420 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11421 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11422 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11423 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11424 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11425 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11426 * unittests/basic_string_view/operations/data/char/1.cc: New file.
11427 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11428 * unittests/basic_string_view/operations/find/char/1.cc: New file.
11429 * unittests/basic_string_view/operations/find/char/2.cc: New file.
11430 * unittests/basic_string_view/operations/find/char/3.cc: New file.
11431 * unittests/basic_string_view/operations/find/char/4.cc: New file.
11432 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11433 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11434 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11435 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11436 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11437 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11438 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11439 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11440 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11441 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11442 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11443 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11444 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11445 * unittests/basic_string_view/operators/char/2.cc: New file.
11446 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11447 * unittests/basic_string_view/range_access/char/1.cc: New file.
11448 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11449 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11450 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11451 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11452 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11453 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11454 * unittests/basic_string_view/requirements/typedefs.cc: New file.
11455 * unittests/basic_string_view/typedefs.cc: New file.
11456 * unittests/basic_string_view/types/1.cc: New file.
11457
11458 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11459
11460 * common/gdb_string_view.h: Remove libstdc++ implementation
11461 details, adjust to gdb reality.
11462 * common/gdb_string_view.tcc: Likewise.
11463 * cli/cli-script.c (struct string_view): Remove.
11464 (user_args) <m_args>: Change element type to gdb::string_view.
11465 (user_args::insert_args): Adjust.
11466
11467 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11468
11469 * common/gdb_string_view.h: New file.
11470 * common/gdb_string_view.tcc: New file.
11471
11472 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11473
11474 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11475 * configure: Re-generate.
11476
11477 2018-04-09 Pedro Alves <palves@redhat.com>
11478
11479 * gdbarch.sh: Include "observable.h" instead of "observer.h".
11480 (set_target_gdbarch): Call
11481 gdb::observers::architecture_changed.notify instead of
11482 observer_notify_architecture_changed.
11483
11484 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11485
11486 * tracepoint.c (struct current_traceframe_cleanup): Remove.
11487 (do_restore_current_traceframe_cleanup): Remove.
11488 (restore_current_traceframe_cleanup_dtor): Remove.
11489 (make_cleanup_restore_current_traceframe): Remove.
11490 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11491 New.
11492 * tracepoint.h (struct scoped_restore_current_traceframe): New.
11493 * infrun.c (fetch_inferior_event): Use
11494 scoped_restore_current_traceframe.
11495
11496 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11497
11498 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11499 Remove.
11500 <n_allocated_type_units>: Remove.
11501 <all_type_units>: Change to std::vector.
11502 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11503 to std::vector change.
11504 (dwarf2_per_objfile::get_cutu): Likewise.
11505 (dwarf2_per_objfile::get_tu): Likewise.
11506 (create_signatured_type_table_from_index): Likewise.
11507 (create_signatured_type_table_from_debug_names): Likewise.
11508 (dw2_symtab_iter_next): Likewise.
11509 (dw2_print_stats): Likewise.
11510 (dw2_expand_all_symtabs): Likewise.
11511 (dw2_expand_marked_cus): Likewise.
11512 (dw2_debug_names_iterator::next): Likewise.
11513 (dwarf2_initialize_objfile): Likewise.
11514 (add_signatured_type_cu_to_table): Likewise.
11515 (create_all_type_units): Likewise.
11516 (add_type_unit): Likewise.
11517 (struct tu_abbrev_offset): Add constructor.
11518 (build_type_psymtabs_1): Adjust to std::vector change.
11519 (print_tu_stats): Likewise.
11520 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11521 (write_debug_names): Likewise.
11522
11523 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11524
11525 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11526 Make an std::vector.
11527 <n_comp_units>: Remove.
11528 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11529 to std::vector change.
11530 (dwarf2_per_objfile::get_cutu): Likewise.
11531 (dwarf2_per_objfile::get_cu): Likewise.
11532 (create_cus_from_index): Likewise.
11533 (create_addrmap_from_index): Likewise.
11534 (create_addrmap_from_aranges): Likewise.
11535 (dwarf2_read_index): Likewise.
11536 (dw2_find_last_source_symtab): Likewise.
11537 (dw2_map_symtabs_matching_filename): Likewise.
11538 (dw2_symtab_iter_next): Likewise.
11539 (dw2_print_stats): Likewise.
11540 (dw2_expand_all_symtabs): Likewise.
11541 (dw2_expand_symtabs_with_fullname): Likewise.
11542 (dw2_expand_marked_cus): Likewise.
11543 (dw2_map_symbol_filenames): Likewise.
11544 (create_cus_from_debug_names): Likewise.
11545 (dwarf2_read_debug_names): Likewise.
11546 (dw2_debug_names_iterator::next): Likewise.
11547 (dwarf2_initialize_objfile): Likewise.
11548 (set_partial_user): Likewise.
11549 (dwarf2_build_psymtabs_hard): Likewise.
11550 (read_comp_units_from_section): Remove arguments, adjust to
11551 std::vector change.
11552 (create_all_comp_units): Adjust to std::vector and
11553 read_comp_units_from_section changes.
11554 (dwarf2_find_containing_comp_unit): Adjust to std::vector
11555 change.
11556 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11557 (psyms_seen_size): Likewise.
11558 (write_gdbindex): Likewise.
11559 (write_debug_names): Likewise.
11560
11561 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11562
11563 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11564 with dwarf2_per_objfile.
11565 (create_cus_from_index): Likewise.
11566 (create_signatured_type_table_from_index): Likewise.
11567 (dwarf2_read_index): Likewise.
11568 (dwarf2_initialize_objfile): Likewise.
11569 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
11570 per_cu rather than get_dwarf2_per_objfile.
11571
11572 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11573
11574 * dwarf2read.h (struct signatured_type): Forward declare.
11575 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11576 New methods.
11577 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11578 (dw2_get_cutu): ...this.
11579 (dwarf2_per_objfile::get_cu): Rename from...
11580 (dw2_get_cu): ...this.
11581 (dwarf2_per_objfile::get_tu): New.
11582 (create_addrmap_from_index): Adjust.
11583 (create_addrmap_from_aranges): Adjust.
11584 (dw2_find_last_source_symtab): Adjust.
11585 (dw2_map_symtabs_matching_filename): Adjust.
11586 (dw2_symtab_iter_next): Adjust.
11587 (dw2_print_stats): Adjust.
11588 (dw2_expand_all_symtabs): Adjust.
11589 (dw2_expand_symtabs_with_fullname): Adjust.
11590 (dw2_expand_marked_cus): Adjust.
11591 (dw_expand_symtabs_matching_file_matcher): Adjust.
11592 (dw2_map_symbol_filenames): Adjust.
11593 (dw2_debug_names_iterator::next): Adjust.
11594 (dwarf2_initialize_objfile): Adjust.
11595 (set_partial_user): Adjust.
11596 (dwarf2_build_psymtabs_hard): Adjust.
11597
11598 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11599
11600 * dwarf2read.c (create_signatured_type_table_from_debug_names):
11601 Remove unused variables.
11602 (dw2_map_symtabs_matching_filename): Likewise.
11603 (dwarf2_record_block_ranges): Likewise.
11604 (dwarf2_read_addr_index): Likewise.
11605 (follow_die_offset): Likewise.
11606
11607 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11608
11609 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11610 to symbol_file_add_main.
11611
11612 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11613
11614 PR mi/22299
11615 * mi/mi-console.c (do_fputc_async_safe): New.
11616 (mi_console_file::write_async_safe): New.
11617 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11618 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11619 New.
11620 * ui-file.c (ui_file::putstrn): Adjust call to
11621 fputstrn_unfiltered.
11622 * utils.c (printchar): Replace do_fputs and do_fprintf
11623 parameters by do_fputc.
11624 (fputstr_filtered): Adjust call to printchar.
11625 (fputstr_unfiltered): Likewise.
11626 (fputstrn_filtered): Likewise.
11627 (fputstrn_unfiltered): Add do_fputc parameter, pass to
11628 printchar.
11629 * utils.h (do_fputc_ftype): New typedef.
11630 (fputstrn_unfiltered): Add do_fputc parameter.
11631
11632 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11633
11634 * regformats/i386/i386-avx.dat: Remove.
11635
11636 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11637
11638 PR gdb/22979
11639 * amd64-tdep.c (amd64_none_init_abi): New function.
11640 (amd64_x32_none_init_abi): New function.
11641 (_initialize_amd64_tdep): Register handlers for x86-64 and
11642 x64_32 with GDB_OSABI_NONE.
11643 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11644 GDB_OSABI_NONE osabi.
11645
11646 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11647
11648 PR gdb/22980
11649 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11650 GDB_OSABI_NONE.
11651 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11652 * osabi.c (gdb_osabi_names): Add "unknown" entry.
11653
11654 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11655
11656 * common/byte-vector.h (char_vector): New type.
11657 * target.h (target_read_alloc): Return
11658 gdb::optional<byte_vector>.
11659 (target_read_stralloc): Return gdb::optional<char_vector>.
11660 (target_get_osdata): Return gdb::optional<char_vector>.
11661 * target.c (target_read_alloc_1): Templatize. Replacement
11662 manual memory management with vector.
11663 (target_read_alloc): Change return type, adjust.
11664 (target_read_stralloc): Change return type, adjust.
11665 (target_get_osdata): Change return type, adjust.
11666 * auxv.c (struct auxv_info) <length>: Remove.
11667 <data>: Change type to gdb::optional<byte_vector>.
11668 (auxv_inferior_data_cleanup): Free auxv_info with delete.
11669 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11670 (target_auxv_search): Adjust.
11671 (fprint_target_auxv): Adjust.
11672 * avr-tdep.c (avr_io_reg_read_command): Adjust.
11673 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11674 (linux_make_corefile_notes): Adjust.
11675 * osdata.c (get_osdata): Adjust.
11676 * remote.c (remote_get_threads_with_qxfer): Adjust.
11677 (remote_memory_map): Adjust.
11678 (remote_traceframe_info): Adjust.
11679 (btrace_read_config): Adjust.
11680 (remote_read_btrace): Adjust.
11681 (remote_pid_to_exec_file): Adjust.
11682 * solib-aix.c (solib_aix_get_library_list): Adjust.
11683 * solib-dsbt.c (decode_loadmap): Don't free buf.
11684 (dsbt_get_initial_loadmaps): Adjust.
11685 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11686 * solib-target.c (solib_target_current_sos): Adjust.
11687 * tracepoint.c (sdata_make_value): Adjust.
11688 * xml-support.c (xinclude_start_include): Adjust.
11689 (xml_fetch_content_from_file): Adjust.
11690 * xml-support.h (xml_fetch_another): Change return type.
11691 (xml_fetch_content_from_file): Change return type.
11692 * xml-syscall.c (xml_init_syscalls_info): Adjust.
11693 * xml-tdesc.c (file_read_description_xml): Adjust.
11694 (fetch_available_features_from_target): Change return type.
11695 (target_fetch_description_xml): Adjust.
11696 (target_read_description_xml): Adjust.
11697
11698 2018-04-06 Tom Tromey <tom@tromey.com>
11699
11700 * value.c (~value): Update.
11701 (struct value) <contents>: Now unique_xmalloc_ptr.
11702 (value_contents_bits_eq, allocate_value_contents)
11703 (value_contents_raw, value_contents_all_raw)
11704 (value_contents_for_printing, value_contents_for_printing_const)
11705 (set_value_enclosing_type): Update.
11706
11707 2018-04-06 Tom Tromey <tom@tromey.com>
11708
11709 * value.c (range_s): Remove typedef, VEC.
11710 (struct range): Add operator<.
11711 (range_lessthan): Remove.
11712 (ranges_contain): Change type.
11713 (~value): Update.
11714 (struct value) <unavailable, optimized_out>: Now std::vector.
11715 (value_entirely_available)
11716 (value_entirely_covered_by_range_vector)
11717 (value_entirely_unavailable, value_entirely_optimized_out):
11718 Update.
11719 (insert_into_bit_range_vector): Change argument type.
11720 (find_first_range_overlap): Likewise.
11721 (struct ranges_and_idx, value_contents_bits_eq)
11722 (require_not_optimized_out, require_available): Update.
11723 (ranges_copy_adjusted): Change argument types.
11724 (value_optimized_out, value_copy, value_fetch_lazy): Update.
11725
11726 2018-04-06 Tom Tromey <tom@tromey.com>
11727
11728 * value.c (~value): Update.
11729 (struct value) <parent>: Now a value_ref_ptr.
11730 (value_parent, set_value_parent, value_address, value_copy):
11731 Update.
11732
11733 2018-04-06 Tom Tromey <tom@tromey.com>
11734
11735 * value.c (struct value): Add constructor, destructor, and member
11736 initializers.
11737 (allocate_value_lazy, value_decref): Update.
11738
11739 2018-04-06 Tom Tromey <tom@tromey.com>
11740
11741 * value.c (struct value) <released, next>: Remove.
11742 (all_values): Now a std::vector.
11743 (allocate_value_lazy): Update.
11744 (value_next): Remove.
11745 (value_mark, value_free_to_mark, release_value)
11746 (value_release_to_mark): Update.
11747
11748 2018-04-06 Tom Tromey <tom@tromey.com>
11749
11750 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11751 (free_value_chain): Remove.
11752 * value.c (free_value_chain): Remove.
11753 (value_release_to_mark): Return a std::vector.
11754 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11755 std::vector.
11756 (check_condition): Update.
11757 * eval.c (fetch_subexp_value): Change "val_chain" to a
11758 std::vector.
11759 * breakpoint.c (update_watchpoint): Update.
11760 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11761
11762 2018-04-06 Tom Tromey <tom@tromey.com>
11763
11764 * value.h (free_all_values): Remove.
11765 * value.c (free_all_values): Remove.
11766
11767 2018-04-06 Tom Tromey <tom@tromey.com>
11768
11769 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11770 (value_history_chain, value_history_count): Remove.
11771 (value_history): New global.
11772 (record_latest_value, access_value_history, show_values)
11773 (preserve_values): Update.
11774
11775 2018-04-06 Tom Tromey <tom@tromey.com>
11776
11777 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11778 * varobj.c (varobj_set_display_format, varobj_set_value)
11779 (install_default_visualizer, construct_visualizer)
11780 (install_new_value, ~varobj, varobj_get_value_type)
11781 (my_value_of_variable, varobj_editable_p): Update.
11782 * c-varobj.c (c_describe_child, c_value_of_variable)
11783 (cplus_number_of_children, cplus_describe_child): Update.
11784 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11785 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11786 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11787
11788 2018-04-06 Tom Tromey <tom@tromey.com>
11789
11790 * printcmd.c (last_examine_address): Change type to
11791 value_ref_ptr.
11792 (do_examine, x_command): Update.
11793
11794 2018-04-06 Tom Tromey <tom@tromey.com>
11795
11796 * value.c (release_value): Update.
11797 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11798 (struct bpstats) <val>: Now a value_ref_ptr.
11799 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11800 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11801 (~watchpoint, print_it_watchpoint, watch_command_1)
11802 (invalidate_bp_value_on_memory_change): Update.
11803
11804 2018-04-06 Tom Tromey <tom@tromey.com>
11805
11806 * varobj.c (varobj_clear_saved_item)
11807 (update_dynamic_varobj_children, install_new_value, ~varobj):
11808 Update.
11809 * value.h (value_incref): Move declaration earlier.
11810 (value_decref): Rename from value_free.
11811 (struct value_ref_policy): New.
11812 (value_ref_ptr): New typedef.
11813 (struct value_deleter): Remove.
11814 (gdb_value_up): Remove typedef.
11815 (release_value): Change return type.
11816 (release_value_or_incref): Remove.
11817 * value.c (set_value_parent): Update.
11818 (value_incref): Change return type.
11819 (value_decref): Rename from value_free.
11820 (value_free_to_mark, free_all_values, free_value_chain): Update.
11821 (release_value): Return value_ref_ptr.
11822 (release_value_or_incref): Remove.
11823 (record_latest_value, set_internalvar, clear_internalvar):
11824 Update.
11825 * stack.c (info_frame_command): Don't call value_free.
11826 * python/py-value.c (valpy_dealloc, valpy_new)
11827 (value_to_value_object): Update.
11828 * printcmd.c (do_examine): Update.
11829 * opencl-lang.c (lval_func_free_closure): Update.
11830 * mi/mi-main.c (register_changed_p): Don't call value_free.
11831 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11832 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11833 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11834 value_free.
11835 * guile/scm-value.c (vlscm_free_value_smob)
11836 (vlscm_scm_from_value): Update.
11837 * frame.c (frame_register_unwind, frame_unwind_register_signed)
11838 (frame_unwind_register_unsigned, get_frame_register_bytes)
11839 (put_frame_register_bytes): Don't call value_free.
11840 * findvar.c (address_from_register): Don't call value_free.
11841 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11842 * dwarf2loc.c (entry_data_value_free_closure)
11843 (value_of_dwarf_reg_entry, free_pieced_value_closure)
11844 (dwarf2_evaluate_loc_desc_full): Update.
11845 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11846 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11847 (~watchpoint, watch_command_1)
11848 (invalidate_bp_value_on_memory_change): Update.
11849 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11850
11851 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
11852
11853 PR gdb/23022
11854 * warning.m4: Add -Wno-error=deprecated-register.
11855 * configure: Re-generate.
11856
11857 2018-04-05 Tom Tromey <tom@tromey.com>
11858
11859 * linespec.h: Remove include of "vec.h".
11860
11861 2018-04-05 Tom Tromey <tom@tromey.com>
11862
11863 * linespec.c (typep): Remove typedef.
11864 (find_methods, find_superclass_methods): Take a std::vector.
11865 (find_method): Use std::vector.
11866
11867 2018-04-05 Tom Tromey <tom@tromey.com>
11868
11869 * utils.c (compare_strings): Remove.
11870 * utils.h (compare_strings): Remove.
11871 * objc-lang.h (find_imps): Update.
11872 * objc-lang.c (find_methods): Take a std::vector.
11873 (uniquify_strings, find_imps): Likewise.
11874 * linespec.c (find_methods): Take a std::vector.
11875 (decode_objc): Use std::vector.
11876 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11877 a std::vector.
11878 (find_method, find_function_symbols): Use std::vector.
11879
11880 2018-04-05 Tom Tromey <tom@tromey.com>
11881
11882 * completer.c (completion_tracker::completion_tracker): Remove
11883 cast.
11884 (completion_tracker::discard_completions): Likewise.
11885 * breakpoint.c (ambiguous_names_p): Remove cast.
11886 * ada-lang.c (_initialize_ada_language): Remove cast.
11887 * utils.h (streq): Update.
11888 (streq_hash): Add new declaration.
11889 * utils.c (streq): Return bool.
11890 (streq_hash): New function.
11891
11892 2018-04-05 Tom Tromey <tom@tromey.com>
11893
11894 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11895 Remove a string copy.
11896
11897 2018-04-05 Tom Tromey <tom@tromey.com>
11898
11899 * linespec.c (filter_results): Use std::vector.
11900 (decode_line_2, decode_line_full): Update.
11901
11902 2018-04-05 Tom Tromey <tom@tromey.com>
11903
11904 * linespec.c (canonical_to_fullform): Return std::string.
11905 (filter_results): Update.
11906 (struct decode_line_2_item): Add constructor.
11907 <fullform, displayform>: Now std::string.
11908 (decode_line_2_compare_items): Now a std::sort comparator.
11909 (decode_line_2): Update.
11910
11911 2018-04-05 Tom Tromey <tom@tromey.com>
11912
11913 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11914 (unexpected_linespec_error): Update.
11915 (linespec_parse_basic, parse_linespec): Update.
11916
11917 2018-04-05 Tom Tromey <tom@tromey.com>
11918
11919 * linespec.c (linespec_parse_basic): Reindent.
11920
11921 2018-04-05 Tom Tromey <tom@tromey.com>
11922
11923 * minsyms.h (iterate_over_minimal_symbols): Update.
11924 * minsyms.c (iterate_over_minimal_symbols): Take a
11925 gdb::function_view.
11926 * linespec.c (struct collect_minsyms): Remove.
11927 (compare_msyms): Now a std::sort comparator.
11928 (add_minsym): Add parameters.
11929 (search_minsyms_for_name): Update. Use std::vector.
11930
11931 2018-04-03 Tom Tromey <tom@tromey.com>
11932
11933 * mipsread.c (read_alphacoff_dynamic_symtab): Use
11934 gdb::byte_vector.
11935
11936 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11937
11938 * MAINTAINERS (Write After Approval): Add Weimin Pan.
11939
11940 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
11941
11942 PR gdb/16959
11943 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
11944 printing static type.
11945
11946 2018-04-01 Tom Tromey <tom@tromey.com>
11947
11948 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11949 (rs6000_xfer_shared_libraries): Update.
11950
11951 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
11952
11953 * common/gdb_vecs.h (char_ptr): Remove.
11954 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11955
11956 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11957
11958 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11959 with std::vector.
11960 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11961
11962 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
11963
11964 * tracepoint.h (struct uploaded_tp): Initialize fields.
11965 <actions, step_actions, cmd_strings>: Change type to
11966 std::vector<char *>.
11967 * tracepoint.c (get_uploaded_tp): Allocate with new.
11968 (free_uploaded_tps): Free with delete.
11969 (parse_tracepoint_definition): Adjust to std::vector change.
11970 * breakpoint.c (read_uploaded_action): Likewise.
11971 (create_tracepoint_from_upload): Likewise.
11972 * ctf.c (ctf_write_uploaded_tp): Likewise.
11973 (SET_ARRAY_FIELD): Likewise.
11974 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11975
11976 2018-03-30 Tom Tromey <tom@tromey.com>
11977
11978 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
11979 std::unique_ptr.
11980 (svr4_keep_data_in_core): Update.
11981 (svr4_read_so_list): Update.
11982
11983 2018-03-30 Tom Tromey <tom@tromey.com>
11984
11985 * windows-nat.c (handle_output_debug_string, handle_exception):
11986 Update.
11987 * target.h (target_read_string): Update.
11988 * target.c (target_read_string): Change "string" to
11989 unique_xmalloc_ptr.
11990 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11991 Update.
11992 * solib-frv.c (frv_current_sos): Update.
11993 * solib-dsbt.c (dsbt_current_sos): Update.
11994 * solib-darwin.c (darwin_current_sos): Update.
11995 * linux-thread-db.c (inferior_has_bug): Update.
11996 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11997 Update. Remove alloca.
11998 * ada-lang.c (ada_main_name): Update.
11999
12000 2018-03-30 Tom Tromey <tom@tromey.com>
12001
12002 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12003 (struct dwo_file_deleter): New.
12004 (dwo_file_up): New typedef.
12005 (open_and_init_dwo_file): Use dwo_file_up.
12006 (free_dwo_file_cleanup): Remove.
12007
12008 2018-03-30 Tom Tromey <tom@tromey.com>
12009
12010 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12011 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12012
12013 2018-03-30 Tom Tromey <tom@tromey.com>
12014
12015 * dwarf2read.c (class free_cached_comp_units): New class.
12016 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12017 (free_cached_comp_units): Remove function.
12018
12019 2018-03-30 Tom Tromey <tom@tromey.com>
12020
12021 * utils.h (make_cleanup_unpush_target): Remove.
12022 * inf-ptrace.c (struct target_unpusher): New.
12023 (target_unpush_up) New typedef.
12024 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12025 target_unpush_up.
12026 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12027
12028 2018-03-27 Tom Tromey <tom@tromey.com>
12029
12030 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12031
12032 2018-03-27 Pedro Alves <palves@redhat.com>
12033 Tom Tromey <tom@tromey.com>
12034
12035 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12036 destructor. Now a class.
12037 (gdb_readline_wrapper_cleanup): Remove function.
12038 (gdb_readline_wrapper): Remove cleanups.
12039
12040 2018-03-27 Tom Tromey <tom@tromey.com>
12041
12042 * typeprint.h (struct type_print_options) <local_typedefs,
12043 global_typedefs>: Remove "struct" keyword.
12044 (class typedef_hash_table): New class.
12045 (recursively_update_typedef_hash, add_template_parameters)
12046 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12047 (find_typedef_in_hash): Don't declare.
12048 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12049 (typedef_hash_table::recursively_update): Rename from
12050 recursively_update_typedef_hash. Now a member.
12051 (typedef_hash_table::add_template_parameters): Rename from
12052 add_template_parameters. Now a member.
12053 (typedef_hash_table::typedef_hash_table): Now a constructor;
12054 rename from create_typedef_hash.
12055 (typedef_hash_table::~typedef_hash_table): Now a destructor;
12056 rename from free_typedef_hash.
12057 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12058 (do_free_global_table): Remove.
12059 (typedef_hash_table::typedef_hash_table): New constructor; renamed
12060 from copy_type_recursive.
12061 (create_global_typedef_table): Remove.
12062 (typedef_hash_table::find_global_typedef): Now a member of
12063 typedef_hash_table.
12064 (typedef_hash_table::find_typedef): Rename from
12065 find_typedef_in_hash; now a member.
12066 (whatis_exp): Update.
12067 * extension.h (struct ext_lang_type_printers): Add constructor and
12068 destructor.
12069 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12070 declare.
12071 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12072 Now a constructor; rename from start_ext_lang_type_printers.
12073 (ext_lang_type_printers): Now a destructor; rename from
12074 free_ext_lang_type_printers.
12075 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12076 Update.
12077 (c_type_print_base_struct_union): Update. Remove cleanups.
12078
12079 2018-03-27 Tom Tromey <tom@tromey.com>
12080
12081 * dwarf-index-write.c: Include <cmath>.
12082
12083 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12084
12085 * NEWS: Add entry describing new "set|show varsize-limit" command.
12086 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12087 command.
12088 * printcmd.c (_initialize_printcmd): Add "set var" alias of
12089 "set variable".
12090
12091 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
12092
12093 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12094 dwarf-index-write.c
12095 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12096 * dwarf-index-common.c: New file.
12097 * dwarf-index-common.h: New file.
12098 * dwarf-index-write.c: New file.
12099 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12100 (struct dwarf2_section_info): Move from here.
12101 (dwarf2_section_info_def): Likewise.
12102 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12103 (offset_type): Likewise.
12104 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12105 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12106 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12107 (byte_swap): Likewise.
12108 (MAYBE_SWAP): Likewise.
12109 (dwarf2_per_cu_ptr): Likewise.
12110 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12111 (struct tu_stats): Likewise.
12112 (struct dwarf2_per_objfile): Likewise.
12113 (struct dwarf2_per_cu_data): Likewise.
12114 (struct signatured_type): Likewise.
12115 (sig_type_ptr): Likewise.
12116 (DEF_VEC_P (sig_type_ptr)): Likewise.
12117 (INDEX4_SUFFIX): Likewise.
12118 (INDEX5_SUFFIX): Likewise.
12119 (DEBUG_STR_SUFFIX): Likewise.
12120 (dwarf2_read_section): Make non-static.
12121 (mapped_index_string_hash): Move from here.
12122 (dwarf5_djb_hash): Likewise.
12123 (file_write): Likewise.
12124 (class data_buf): Likewise.
12125 (struct symtab_index_entry): Likewise.
12126 (struct mapped_symtab): Likewise.
12127 (find_slot): Likewise.
12128 (hash_expand): Likewise.
12129 (add_index_entry): Likewise.
12130 (uniquify_cu_indices): Likewise.
12131 (class c_str_view): Likewise.
12132 (class c_str_view_hasher): Likewise.
12133 (class vector_hasher): Likewise.
12134 (write_hash_table): Likewise.
12135 (psym_index_map): Likewise.
12136 (struct addrmap_index_data): Likewise.
12137 (add_address_entry): Likewise.
12138 (add_address_entry_worker): Likewise.
12139 (write_address_map): Likewise.
12140 (symbol_kind): Likewise.
12141 (write_psymbols): Likewise.
12142 (struct signatured_type_index_data): Likewise.
12143 (write_one_signatured_type): Likewise.
12144 (recursively_count_psymbols): Likewise.
12145 (recursively_write_psymbols): Likewise.
12146 (class debug_names): Likewise.
12147 (check_dwarf64_offsets): Likewise.
12148 (psyms_seen_size): Likewise.
12149 (write_gdbindex): Likewise.
12150 (write_debug_names): Likewise.
12151 (assert_file_size): Likewise.
12152 (write_psymtabs_to_index): Likewise.
12153 (save_gdb_index_command): Likewise.
12154 (_initialize_dwarf2_read): Don't register the "save gdb-index"
12155 command.
12156 * dwarf2read.h: New file.
12157
12158 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12159
12160 PR gdb/22670
12161 * dwarf2read.c (dwarf2_physname): Do not return the demangled
12162 symbol name if the CU's language stores symbol names in linkage
12163 format.
12164 * language.h (struct language_defn)
12165 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
12166 all instances of this struct.
12167
12168 2018-03-26 Tom Tromey <tom@tromey.com>
12169
12170 * stack.c (backtrace_command_1): Remove verbose code.
12171
12172 2018-03-26 Tom Tromey <tom@tromey.com>
12173
12174 * python/py-framefilter.c (py_print_type): Don't catch
12175 exceptions. Return void.
12176 (py_print_value): Likewise.
12177 (py_print_single_arg): Likewise.
12178 (enumerate_args): Don't catch exceptions.
12179 (py_print_args): Likewise.
12180 (py_print_frame): Likewise.
12181 (gdbpy_apply_frame_filter): Catch exceptions here.
12182
12183 2018-03-26 Tom Tromey <tom@tromey.com>
12184
12185 * stack.c (_initialize_stack): Remove trailing newlines from help
12186 text. Add "Usage" line to "backtrace" help.
12187
12188 2018-03-26 Tom Tromey <tom@tromey.com>
12189
12190 PR python/16486:
12191 * python/py-framefilter.c (py_print_args): Call wrap_hint.
12192
12193 2018-03-26 Tom Tromey <tom@tromey.com>
12194
12195 * python/py-framefilter.c (py_print_single_arg): Return
12196 EXT_LANG_BT_ERROR from catch.
12197
12198 2018-03-26 Tom Tromey <tom@tromey.com>
12199
12200 PR backtrace/15584:
12201 * stack.c (backtrace_command_1): Move some code into no-filters
12202 "if".
12203
12204 2018-03-26 Tom Tromey <tom@tromey.com>
12205
12206 * python/py-framefilter.c (throw_quit_or_print_exception): New
12207 function.
12208 (gdbpy_apply_frame_filter): Use it.
12209
12210 2018-03-26 Tom Tromey <tom@tromey.com>
12211
12212 PR cli/17716:
12213 * python/py-framefilter.c (py_print_type, py_print_value)
12214 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12215 RETURN_MASK_ERROR.
12216
12217 2018-03-26 Tom Tromey <tom@tromey.com>
12218
12219 * python/py-framefilter.c (enumerate_args): Use
12220 gdb::unique_xmalloc_ptr.
12221
12222 2018-03-26 Tom Tromey <tom@tromey.com>
12223
12224 * python/py-framefilter.c (py_print_frame): Return
12225 EXT_LANG_BT_OK.
12226 (gdbpy_apply_frame_filter): Update comment.
12227 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12228 Remove.
12229 <EXT_LANG_BT_NO_FILTERS>: Change value.
12230
12231 2018-03-26 Tom Tromey <tom@tromey.com>
12232
12233 PR backtrace/15582:
12234 * stack.c (backtrace_command): Parse "hide" argument.
12235 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12236 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12237 constant.
12238
12239 2018-03-26 Tom Tromey <tom@tromey.com>
12240
12241 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12242 add "flags".
12243 (backtrace_command): Remove "fulltrace", add "flags".
12244
12245 2018-03-26 Tom Tromey <tom@tromey.com>
12246
12247 * stack.c (backtrace_command): Rewrite command line parsing.
12248
12249 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12250
12251 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12252
12253 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12254
12255 * filename-seen-cache.h: Add include guard.
12256
12257 2018-03-26 Keith Seitz <keiths@redhat.com>
12258
12259 * symfile.c (place_section): Remove "struct" from section_addr_info
12260 in comment.
12261 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12262 "struct" keyword from section_addr_info.
12263
12264 2018-03-26 Alan Hayward <alan.hayward@arm.com>
12265
12266 * regformats/regdef.h (reg): Add constructors.
12267
12268 2018-03-25 Pedro Alves <palves@redhat.com>
12269
12270 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12271 if then/else bodies in var_func_name extraction.
12272
12273 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
12274
12275 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12276 lookup_minimal_symbol() to find symbol entry.
12277 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12278
12279 2018-03-23 Keith Seitz <keiths@redhat.com>
12280
12281 PR c++/22968
12282 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12283 nested type definitions for C++, too.
12284
12285 2018-03-23 Tom Tromey <tom@tromey.com>
12286
12287 * machoread.c (struct oso_el): Add a constructor. Don't define as
12288 a typedef.
12289 (macho_register_oso): Remove.
12290 (macho_symtab_read): Take a std::vector.
12291 (oso_el_compare_name): Now a std::sort comparator.
12292 (macho_symfile_read_all_oso): Take a std::vector.
12293 (macho_symfile_read): Use std::vector. Remove cleanups.
12294
12295 2018-03-22 Tom Tromey <tom@tromey.com>
12296
12297 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12298 (record_full_goto_bookmark): Use std::string.
12299
12300 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12301
12302 PR tdep/18295
12303 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12304 a single mask.
12305
12306 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12307
12308 * rs6000-tdep.c (store_insn_p): New function.
12309 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12310 and cr_reg to their unshifted values. Use store_insn_p to
12311 match LR saves using either R1 or fdata->alloca_reg. Use
12312 store_insn_p to match CR saves. Set alloca_reg_offset
12313 when alloca_reg and framep are set. Remove lr_reg shift
12314 when assigning to fdata->lr_register.
12315
12316 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
12317
12318 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12319 command line args instead of emitting a warning.
12320
12321 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12322
12323 * tracepoint.h (struct static_tracepoint_marker): Initialize
12324 fields, define default constructor, move constructor and move
12325 assignment, disable the rest.
12326 <str_id, extra>: Make std::string.
12327 (release_static_tracepoint_marker): Remove.
12328 (free_current_marker): Remove.
12329 * tracepoint.c (free_current_marker): Remove.
12330 (parse_static_tracepoint_marker_definition): Adjust to
12331 std::string, use new hex2str overload.
12332 (release_static_tracepoint_marker): Remove.
12333 (print_one_static_tracepoint_marker): Get marker by reference
12334 and adjust to std::string.
12335 (info_static_tracepoint_markers_command): Adjust to std::vector
12336 changes
12337 * target.h (static_tracepoint_marker_p): Remove typedef.
12338 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12339 (struct target_ops) <to_static_tracepoint_marker_at>: Return
12340 bool.
12341 <to_static_tracepoint_markers_by_strid>: Return std::vector.
12342 * target-debug.h
12343 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12344 (target_debug_print_std_vector_static_tracepoint_marker): New.
12345 (target_debug_print_struct_static_tracepoint_marker_p): Rename
12346 to...
12347 (target_debug_print_static_tracepoint_marker_p): ... this.
12348 * target-delegates.c: Re-generate.
12349 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12350 Make std::string.
12351 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12352 (decode_static_tracepoint_spec): Adjust to std::vector.
12353 (tracepoint_print_one_detail): Adjust to std::string.
12354 (strace_marker_decode_location): Adjust to std::string.
12355 (update_static_tracepoint): Adjust to std::string, remove call
12356 to release_static_tracepoint_marker.
12357 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12358 Adjust to std::vector.
12359 * remote.c (remote_static_tracepoint_marker_at): Return bool.
12360 (remote_static_tracepoint_markers_by_strid): Adjust to
12361 std::vector.
12362 * common/rsp-low.h (hex2str): New overload with explicit count
12363 of bytes.
12364 * common/rsp-low.c (hex2str): New overload with explicit count
12365 of bytes.
12366 * unittests/rsp-low-selftests.c (test_hex2str): New function.
12367 (_initialize_rsp_low_selftests): Add test_hex2str test.
12368 * unittests/tracepoint-selftests.c
12369 (test_parse_static_tracepoint_marker_definition): Adjust to
12370 std::string.
12371
12372 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12373
12374 * tracepoint.c (parse_static_tracepoint_marker_definition):
12375 Consider case where the definition is followed by more
12376 definitions.
12377 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12378 tracepoint-selftests.c.
12379 * unittests/tracepoint-selftests.c: New.
12380
12381 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12382
12383 * MAINTAINERS (Write After Approval): Add Pedro Franco de
12384 Carvalho.
12385
12386 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12387
12388 * symtab.c (find_pc_sect_line): fixed indentation.
12389
12390 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12391
12392 * symtab.c (find_pc_sect_line): now uses binary search.
12393
12394 2018-03-19 Tom Tromey <tom@tromey.com>
12395
12396 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12397 "IDENT" production.
12398
12399 2018-03-19 Pedro Alves <palves@redhat.com>
12400 Tom Tromey <tom@tromey.com>
12401
12402 * unittests/observable-selftests.c: New file.
12403 * common/observable.h: New file.
12404 * observable.h: New file.
12405 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12406 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12407 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12408 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12409 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12410 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12411 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12412 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12413 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12414 python/py-breakpoint.c, python/py-finishbreakpoint.c,
12415 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12416 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12417 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12418 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12419 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12420 tui/tui-interp.c, valops.c: Update all users.
12421 * tui/tui-hooks.c (tui_bp_created_observer)
12422 (tui_bp_deleted_observer, tui_bp_modified_observer)
12423 (tui_inferior_exit_observer, tui_before_prompt_observer)
12424 (tui_normal_stop_observer, tui_register_changed_observer):
12425 Remove.
12426 (tui_observers_token): New global.
12427 (attach_or_detach, tui_attach_detach_observers): New functions.
12428 (tui_install_hooks, tui_remove_hooks): Use
12429 tui_attach_detach_observers.
12430 * record-btrace.c (record_btrace_thread_observer): Remove.
12431 (record_btrace_thread_observer_token): New global.
12432 * observer.sh: Remove.
12433 * observer.c: Rename to observable.c.
12434 * observable.c (namespace gdb_observers): Define new objects.
12435 (observer_debug): Move into gdb_observers namespace.
12436 (struct observer, struct observer_list, xalloc_observer_list_node)
12437 (xfree_observer_list_node, generic_observer_attach)
12438 (generic_observer_detach, generic_observer_notify): Remove.
12439 (_initialize_observer): Update.
12440 Don't include observer.inc.
12441 * Makefile.in (generated_files): Remove observer.h, observer.inc.
12442 (clean mostlyclean): Likewise.
12443 (observer.h, observer.inc): Remove targets.
12444 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12445 (COMMON_SFILES): Use observable.c, not observer.c.
12446 * .gitignore: Remove observer.h.
12447
12448 2018-03-18 Tom Tromey <tom@tromey.com>
12449
12450 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12451 gdb::def_vector.
12452 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12453
12454 2018-03-17 Tom Tromey <tom@tromey.com>
12455
12456 * auto-load.c (auto_load_objfile_script_1): Use std::string.
12457
12458 2018-03-17 Tom Tromey <tom@tromey.com>
12459
12460 * target.c (class scoped_target_fd): New.
12461 (target_fileio_close_cleanup): Remove.
12462 (target_fileio_read_alloc_1): Use scoped_target_fd.
12463
12464 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
12465
12466 * silent-rules.mk: New.
12467 * Makefile.in: Include silent-rules.mk
12468 (srcdir, VPATH, top_srcdir): Move up.
12469 (COMPILE): Add ECHO_CXX.
12470 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12471 (init.c): Add ECHO_INIT_C.
12472 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12473 (version.c): Add ECHO_GEN.
12474 (printcmd.o): Add ECHO_CXX.
12475 (target-float.o): Add ECHO_CXX.
12476 (ada-exp.o): Add ECHO_CXX.
12477 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12478 (insight$(EXEEXT)): Add ECHO_CXXLD.
12479 * gnulib/configure.ac: Add AM_SILENT_RULES.
12480 * gnulib/aclocal.m4: Re-generate.
12481 * gnulib/configure: Re-generate.
12482 * gnulib/import/Makefile.in: Re-generate.
12483
12484 2018-03-16 Tom Tromey <tom@tromey.com>
12485
12486 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12487 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12488 * utils.c (do_free_section_addr_info)
12489 (make_cleanup_free_section_addr_info): Remove.
12490 * symfile.h (struct other_sections): Add constructor.
12491 (struct section_addr_info): Remove.
12492 (section_addr_info): New typedef.
12493 (struct sym_fns) <sym_offsets>: Change type of parameter.
12494 (build_section_addr_info_from_objfile)
12495 (relative_addr_info_to_section_offsets, addr_info_make_relative)
12496 (default_symfile_offsets, symbol_file_add)
12497 (symbol_file_add_from_bfd)
12498 (build_section_addr_info_from_section_table): Update.
12499 (alloc_section_addr_info, free_section_addr_info): Don't declare.
12500 * symfile.c (alloc_section_addr_info): Remove.
12501 (build_section_addr_info_from_section_table): Change return type.
12502 Update.
12503 (build_section_addr_info_from_bfd)
12504 (build_section_addr_info_from_objfile): Likewise.
12505 (free_section_addr_info): Remove.
12506 (relative_addr_info_to_section_offsets): Change type of "addrs".
12507 (addrs_section_compar): Now a std::sort comparator.
12508 (addrs_section_sort): Change return type.
12509 (addr_info_make_relative): Change type of "addrs". Update.
12510 (default_symfile_offsets, syms_from_objfile_1)
12511 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12512 (symbol_file_add_separate): Update.
12513 (symbol_file_add): Change type of "addrs". Update.
12514 (add_symbol_file_command): Update. Remove cleanups.
12515 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
12516 cleanups.
12517 * symfile-debug.c (debug_sym_offsets): Change type of "info".
12518 * solib.c (solib_read_symbols): Update.
12519 * objfiles.c (objfile_relocate): Update. Remove cleanups.
12520 * machoread.c (macho_symfile_offsets): Update.
12521 * jit.c (jit_bfd_try_read_symtab): Update.
12522
12523 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
12524
12525 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12526 unittests/utils-selftests.c.
12527 * unittests/utils-selftests.c: New file.
12528
12529 2018-03-14 Tom Tromey <tom@tromey.com>
12530
12531 PR cli/14977:
12532 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12533 for NULL.
12534
12535 2018-03-14 Tom Tromey <tom@tromey.com>
12536
12537 PR cli/19918:
12538 * printcmd.c (printf_pointer): Allow "-" in format.
12539
12540 2018-03-14 Tom Tromey <tom@tromey.com>
12541
12542 * printcmd.c (_initialize_printcmd): Add usage to printf.
12543
12544 2018-03-14 Yao Qi <qiyao@sourceware.org>
12545
12546 * MAINTAINERS: Update my email address.
12547
12548 2018-03-13 Tom Tromey <tom@tromey.com>
12549
12550 * machoread.c (macho_check_dsym): Change filenamep to a
12551 std::string*.
12552 (macho_symfile_read): Update.
12553 * symfile.c (load_command): Use std::string.
12554
12555 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
12556
12557 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12558 to error message string.
12559 (riscv_register_name): Use xsnprintf instead of sprintf.
12560 (riscv_insn::fetch_instruction): Use gdb_assert instead of
12561 internal_error.
12562 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12563 error.
12564 (riscv_push_dummy_call): Likewise.
12565
12566 2018-03-12 Tom Tromey <tom@tromey.com>
12567
12568 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12569 Use gdb::byte_vector.
12570 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12571
12572 2018-03-12 Yao Qi <yao.qi@linaro.org>
12573
12574 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12575 parameter type to readable_regcache.
12576 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12577 the declaration.
12578
12579 2018-03-11 Tom Tromey <tom@tromey.com>
12580
12581 * dwarf2read.c (struct nextfield): Add initializers.
12582 (struct nextfnfield): Remove.
12583 (struct fnfieldlist): Add initializers. Remove "length" and
12584 "head", use std::vector.
12585 (struct decl_field_list): Remove.
12586 (struct field_info): Add initializers.
12587 <fields, baseclasses>: Now std::vector.
12588 <nbaseclasses, nfnfields, typedef_field_list_count,
12589 nested_types_list_count>: Remove.
12590 (dwarf2_add_field, dwarf2_add_type_defn)
12591 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12592 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12593 (process_structure_scope): Update.
12594
12595 2018-03-11 Tom Tromey <tom@tromey.com>
12596
12597 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12598 for use by std::sort.
12599 (build_type_psymtabs_1): Use std::vector.
12600
12601 2018-03-09 Eli Zaretskii <eliz@gnu.org>
12602
12603 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12604 and LIBMPFR in the printed configuration.
12605
12606 2018-03-08 Tom Tromey <tom@tromey.com>
12607
12608 * source.c (get_filename_and_charpos): Use scoped_fd.
12609 * nto-procfs.c (procfs_open_1): Use scoped_fd.
12610 (procfs_pidlist): Likewise.
12611 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12612 (iterate_over_mappings): Likewise.
12613
12614 2018-03-08 Tom Tromey <tom@tromey.com>
12615
12616 * infcall.c (struct call_return_meta_info)
12617 <stack_temporaries_enabled>: Remove.
12618 (get_call_return_value, call_function_by_hand_dummy): Update.
12619 * thread.c (disable_thread_stack_temporaries): Remove.
12620 (enable_thread_stack_temporaries): Remove.
12621 (thread_stack_temporaries_enabled_p): Return bool.
12622 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12623 (get_last_thread_stack_temporary): Update.
12624 * eval.c (evaluate_subexp): Update.
12625 * gdbthread.h (class enable_thread_stack_temporaries): Now a
12626 class, not a function.
12627 (value_ptr, value_vec): Remove typedefs.
12628 (class thread_info) <stack_temporaries_enabled>: Now bool.
12629 <stack_temporaries>: Now a std::vector.
12630 (thread_stack_temporaries_enabled_p)
12631 (value_in_thread_stack_temporaries): Return bool.
12632
12633 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
12634
12635 * remote.c (putpkt_binary): Fix omitted bytes reporting.
12636 (getpkt_or_notif_sane_1): Likewise.
12637
12638 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12639
12640 * build-id.c (build_id_to_debug_bfd): Use std::string.
12641
12642 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12643
12644 * build-id.c (find_separate_debug_file_by_buildid): Return
12645 std::string.
12646 * build-id.h (find_separate_debug_file_by_buildid): Return
12647 std::string.
12648 * coffread.c (coff_symfile_read): Adjust to std::string.
12649 * elfread.c (elf_symfile_read): Adjust to std::string.
12650 * symfile.c (separate_debug_file_exists): Change parameter to
12651 std::string.
12652 (find_separate_debug_file): Return std::string.
12653 (find_separate_debug_file_by_debuglink): Return std::string.
12654 * symfile.h (find_separate_debug_file_by_debuglink): Return
12655 std::string.
12656
12657 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12658
12659 * common/xml-utils.c (xml_escape_text): Move code to...
12660 (xml_escape_text_append): ... this new function.
12661 * common/xml-utils.h (xml_escape_text_append): New declaration.
12662 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12663 New function.
12664 (_initialize_xml_utils): register test_xml_escape_text_append as
12665 a selftest.
12666
12667 2018-03-07 Alan Hayward <alan.hayward@arm.com>
12668
12669 * defs.h: Remove MAX_REGISTER_SIZE.
12670 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12671 asserts.
12672 * python/py-unwind.c (pyuw_sniffer): Likewise.
12673
12674 2018-03-07 Tom Tromey <tom@tromey.com>
12675
12676 * linux-tdep.c (linux_info_proc): Update.
12677 * target.h (struct target_ops) <to_fileio_readlink>: Return
12678 optional<string>.
12679 (target_fileio_readlink): Return optional<string>.
12680 * remote.c (remote_hostio_readlink): Return optional<string>.
12681 * inf-child.c (inf_child_fileio_readlink): Return
12682 optional<string>.
12683 * target.c (target_fileio_readlink): Return optional<string>.
12684
12685 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
12686
12687 * regcache.c (cooked_read_test): Add riscv to the list of
12688 architectures that have a save_reggroup.
12689
12690 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
12691
12692 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12693 value is not a dynamic class object.
12694
12695 2018-03-06 Tom Tromey <tom@tromey.com>
12696
12697 * rust-exp.y: Formatting fixes.
12698
12699 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12700
12701 * riscv-tdep.c (riscv_register_name): Remove target description
12702 support.
12703 (riscv_gdbarch_init): Remove target description check.
12704
12705 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12706
12707 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12708 comment.
12709 * riscv-tdep.h: Likewise.
12710
12711 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12712
12713 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12714 (riscv_pseudo_register_write): Delete.
12715 (riscv_gdbarch_init): Remove all use of pseudo registers.
12716
12717 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12718
12719 * record-btrace.c (btrace_print_lines): Replace cleanup
12720 parameter with RAII equivalents.
12721 (btrace_insn_history): Replace cleanup with RAII equivalents.
12722 * ui-out.h (make_cleanup_ui_out_list_begin_end,
12723 make_cleanup_ui_out_tuple_begin_end): Remove.
12724 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12725 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12726 make_cleanup_ui_out_list_begin_end): Remove.
12727
12728 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12729
12730 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12731 parameter types to std::vector. Use bool.
12732 (record_btrace_wait): Replace VEC(tp_t) with
12733 std::vector<thread_info *>.
12734 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12735
12736 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12737
12738 * record-btrace.c (record_btrace_disable_callback): Remove.
12739 (struct scoped_btrace_disable): New.
12740 (record_btrace_open): Use scoped_btrace_disable.
12741
12742 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12743
12744 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12745 reading values from registers.
12746
12747 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12748
12749 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12750 where appropriate.
12751
12752 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12753
12754 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12755 change parameter type. Use GDB's print functions, and use
12756 core_addr_to_string where appropriate.
12757 (riscv_push_dummy_call): Use core_addr_to_string where
12758 appropriate, update call to riscv_print_arg_location, and reindent
12759 a few lines.
12760 (riscv_return_value): Update call to riscv_print_arg_location.
12761
12762 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12763 Tim Newsome <tim@sifive.com>
12764 Albert Ou <a0u@eecs.berkeley.edu>
12765 Darius Rad <darius@bluespec.com>
12766
12767 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12768 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12769 (ALLDEPFILES): Add riscv-tdep.c
12770 * configure.tgt: Add riscv support.
12771 * riscv-tdep.c: New file.
12772 * riscv-tdep.h: New file.
12773 * NEWS: Mention new target.
12774 * MAINTAINERS: Add entry for riscv.
12775
12776 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12777
12778 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12779 fields within aggregates.
12780
12781 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12782
12783 * record-btrace.c (btrace_print_lines): Change type of flags to
12784 gdb_disassembly_flags.
12785
12786 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12787
12788 * fbsd-nat.c: Include "inf-ptrace.h".
12789 (USE_SIGTRAP_SIGINFO): Conditionally define.
12790 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12791 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12792 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12793 function.
12794 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12795 Likewise.
12796 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12797 Likewise.
12798 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12799 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12800 "supports_stopped_by_hw_breakpoint" target methods.
12801
12802 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12803
12804 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12805 * fbsd-nat.c (debug_fbsd_nat): New variable.
12806 (show_fbsd_nat_debug): New function.
12807 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12808 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12809
12810 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12811
12812 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12813 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12814 prototype.
12815 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12816 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12817 method.
12818
12819 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12820
12821 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12822 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12823
12824 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12825
12826 * charset.c (struct charset_vector): New.
12827 (charsets): Change type to charset_vector.
12828 (find_charset_names): Adjust.
12829 (add_one): Adjust.
12830 (_initialize_charset): Adjust.
12831
12832 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12833
12834 * progspace.h (struct program_space) <deleted_solibs>: Change
12835 type to std::vector<std::string>.
12836 * progspace.c (clear_program_space_solib_cache): Adjust.
12837 * breakpoint.c (print_solib_event): Adjust.
12838 (check_status_catch_solib): Adjust.
12839 * solib.c (update_solib_list): Adjust.
12840 * ui-out.h (class ui_out) <field_string>: New overload.
12841 * ui-out.c (ui_out::field_string): New overload.
12842
12843 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12844
12845 * progspace.h (struct program_space): Add constructor and
12846 destructor, initialize fields.
12847 (add_program_space): Remove.
12848 * progspace.c (add_program_space): Rename to...
12849 (program_space::program_space): ... this.
12850 (release_program_space): Rename to...
12851 (program_space::~program_space): ... this.
12852 (delete_program_space): Use delete to delete program_space.
12853 (initialize_progspace): Use new to allocate program_space.
12854 * inferior.c (add_inferior_with_spaces): Likewise.
12855 (clone_inferior_command): Likewise.
12856 * infrun.c (follow_fork_inferior): Likewise.
12857 (handle_vfork_child_exec_or_exit): Likewise.
12858
12859 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12860
12861 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12862 (delim_string_to_char_ptr_vec): Return std::vector of
12863 gdb::unique_xmalloc_ptr.
12864 (dirnames_to_char_ptr_vec_append): Take std::vector of
12865 gdb::unique_xmalloc_ptr.
12866 (dirnames_to_char_ptr_vec): Return std::vector of
12867 gdb::unique_xmalloc_ptr.
12868 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12869 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12870 (delim_string_to_char_ptr_vec): Return an std::vector of
12871 gdb::unique_xmalloc_ptr, adjust the code.
12872 (dirnames_to_char_ptr_vec_append): Take an std::vector of
12873 gdb::unique_xmalloc_ptr, adjust the code.
12874 (dirnames_to_char_ptr_vec): Return an std::vector of
12875 gdb::unique_xmalloc_ptr, adjust the code.
12876 * auto-load.c (auto_load_safe_path_vec): Change type to
12877 std::vector of gdb::unique_xmalloc_ptr.
12878 (auto_load_expand_dir_vars): Return an std::vector of
12879 gdb::unique_xmalloc_ptr, adjust the code.
12880 (auto_load_safe_path_vec_update): Adjust.
12881 (filename_is_in_auto_load_safe_path_vec): Adjust.
12882 (auto_load_objfile_script_1): Adjust.
12883 * build-id.c (build_id_to_debug_bfd): Adjust.
12884 * linux-thread-db.c (thread_db_load_search): Adjust.
12885 * source.c (add_path): Adjust.
12886 (openp): Adjust.
12887 * symfile.c (find_separate_debug_file): Adjust.
12888 * utils.c (do_free_char_ptr_vec): Remove.
12889 (make_cleanup_free_char_ptr_vec): Remove.
12890
12891 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12892
12893 PR gdb/22907
12894 * common/pathstuff.c: Conditionally include "<windows.h>".
12895
12896 2018-03-01 Georg Sauthoff <mail@georg.so>
12897
12898 PR gdb/22888
12899 * gcore.in: Quote variables and switch interpreter to bash.
12900
12901 2018-03-01 Tom Tromey <tom@tromey.com>
12902
12903 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12904 assertion. Add assertion for discriminant_index.
12905 (quirk_rust_enum): Use correct base type name in univariant case.
12906
12907 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12908
12909 * record.c (get_call_history_modifiers): Return a
12910 record_print_flags.
12911 (cmd_record_call_history): Adjust.
12912 * record-btrace.c (record_btrace_call_history): Adjust.
12913 (record_btrace_call_history_range): Adjust.
12914 (record_btrace_call_history_from): Adjust.
12915 * target-debug.h (target_debug_print_record_print_flags): New.
12916 * target-delegates.c: Re-generate.
12917 * target.c (target_call_history): Change flags type.
12918 (target_call_history_from): Likewise.
12919 (target_call_history_range): Likewise.
12920 * target.h (struct target_ops) <target_call_history>: Likewise.
12921 (target_call_history_from): Likewise.
12922 (target_call_history_range): Likewise.
12923
12924 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12925 Simon Marchi <simon.marchi@polymtl.ca>
12926
12927 * common/common-utils.c: Include "sys/stat.h".
12928 (is_regular_file): Move here from "source.c"; change return
12929 type to "bool".
12930 * common/common-utils.h (is_regular_file): New prototype.
12931 * common/pathstuff.c (contains_dir_separator): New function.
12932 * common/pathstuff.h (contains_dir_separator): New prototype.
12933 * source.c: Don't include "sys/stat.h".
12934 (is_regular_file): Move to "common/common-utils.c".
12935
12936 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
12937
12938 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12939 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12940 * auto-load.c: Include "common/pathstuff.h".
12941 * common/common-def.h (current_directory): Move here.
12942 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12943 function.
12944 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12945 prototype.
12946 * common/pathstuff.c: New file.
12947 * common/pathstuff.h: New file.
12948 * compile/compile.c: Include "common/pathstuff.h".
12949 * defs.h (current_directory): Move to "common/common-defs.h".
12950 * dwarf2read.c: Include "common/pathstuff.h".
12951 * exec.c: Likewise.
12952 * guile/scm-safe-call.c: Likewise.
12953 * linux-thread-db.c: Likewise.
12954 * main.c: Likewise.
12955 * nto-tdep.c: Likewise.
12956 * objfiles.c: Likewise.
12957 * source.c: Likewise.
12958 * symtab.c: Likewise.
12959 * utils.c: Include "common/pathstuff.h".
12960 (gdb_realpath): Move to "common/pathstuff.c".
12961 (gdb_realpath_keepfile): Likewise.
12962 (gdb_abspath): Likewise.
12963 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12964 (gdb_realpath_keepfile): Likewise.
12965 (gdb_abspath): Likewise.
12966
12967 2018-02-28 John Baldwin <jhb@FreeBSD.org>
12968
12969 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12970 wildcard process pid for super_resume for kernels with a
12971 specific bug.
12972
12973 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
12974
12975 * compile/compile.c (get_args): Add additional comments
12976 explaining function.
12977
12978 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
12979 Tom Tromey <tom@tromey.com>
12980
12981 * target.h (memory_write_request_s): Remove typedef. Don't define
12982 VEC.
12983 (target_write_memory_blocks): Change argument to std::vector.
12984 (struct memory_write_request): Add constructor.
12985 * target-memory.c (compare_block_starting_address): Return bool.
12986 Change argument types.
12987 (claim_memory): Change arguments to use std::vector.
12988 (split_regular_and_flash_blocks, blocks_to_erase)
12989 (compute_garbled_blocks): Likewise.
12990 (cleanup_request_data, cleanup_write_requests_vector): Remove.
12991 (target_write_memory_blocks): Change argument to std::vector.
12992 * symfile.c (struct load_section_data): Add constructor and
12993 destructor. Use std::vector for "requests".
12994 (struct load_progress_data): Add initializers.
12995 (load_section_callback): Update. Use "new".
12996 (clear_memory_write_data): Remove.
12997 (generic_load): Update.
12998
12999 2018-02-27 Alan Hayward <alan.hayward@arm.com>
13000
13001 * arch/aarch64.h: Use common/tdesc.h.
13002
13003 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13004
13005 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13006 architecture with a 64-bit ABI.
13007
13008 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13009
13010 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13011 ahead of target description loading.
13012
13013 2018-02-26 Tom Tromey <tom@tromey.com>
13014
13015 * stack.c (backtrace_command_1): Update.
13016 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13017 of "flags".
13018 * python/py-framefilter.c (py_print_frame)
13019 (gdbpy_apply_frame_filter): Change type of "flags".
13020 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13021 of "flags".
13022 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13023 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13024 * extension.h (enum frame_filter_flag): Rename from
13025 frame_filter_flags.
13026 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13027 (apply_ext_lang_frame_filter): Change type of "flags".
13028 * extension.c (apply_ext_lang_frame_filter): Change type of
13029 "flags".
13030 * extension-priv.h (struct extension_language_ops)
13031 <apply_frame_filter>: Change type of "flags".
13032
13033 2018-02-26 Tom Tromey <tom@tromey.com>
13034
13035 PR python/16497:
13036 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
13037 off-by-one in py_end computation.
13038 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13039 PRINT_MORE_FRAMES.
13040 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13041 constant.
13042
13043 2018-02-26 Tom Tromey <tom@tromey.com>
13044
13045 * dwarf2read.c (struct variant_field): New.
13046 (struct nextfield) <variant>: New field.
13047 (dwarf2_add_field): Handle DW_TAG_variant_part.
13048 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13049 discriminated union.
13050 (read_structure_type): Handle DW_TAG_variant_part.
13051 (handle_struct_member_die): New function, extracted from
13052 process_structure_scope. Handle DW_TAG_variant.
13053 (process_structure_scope): Handle discriminated unions. Call
13054 handle_struct_member_die.
13055
13056 2018-02-26 Tom Tromey <tom@tromey.com>
13057
13058 * rust-lang.h (rust_last_path_segment): Declare.
13059 * rust-lang.c (rust_last_path_segment): Now public. Change
13060 contract.
13061 (struct disr_info): Remove.
13062 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13063 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13064 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13065 (rust_enum_p, rust_enum_variant): New function.
13066 (rust_underscore_fields): Remove "offset" parameter.
13067 (rust_print_enum): New function.
13068 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13069 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13070 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
13071 enums.
13072 (rust_internal_print_type): New function, from rust_print_type.
13073 Remove enum code.
13074 (rust_print_type): Call rust_internal_print_type.
13075 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13076 Update enum handling.
13077 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13078 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13079 (rust_union_quirks): New functions.
13080 (process_full_comp_unit, process_full_type_unit): Call
13081 rust_union_quirks.
13082 (process_structure_scope): Update rust_unions if necessary.
13083
13084 2018-02-26 Tom Tromey <tom@tromey.com>
13085
13086 * value.h (value_union_variant): Declare.
13087 * valops.c (value_union_variant): New function.
13088 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13089 (struct discriminant_info): New.
13090 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13091 enumerator.
13092 (struct main_type) <flag_discriminated_union>: New field.
13093
13094 2018-02-26 Tom Tromey <tom@tromey.com>
13095
13096 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13097 unittests/unpack-selftests.c.
13098 * unittests/unpack-selftests.c: New file.
13099 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13100
13101 2018-02-26 Yao Qi <yao.qi@linaro.org>
13102
13103 * dwarf2read.c (struct partial_die_info) <read>: New method.
13104 (read_partial_die): Remove the declaration.
13105 (load_partial_dies): Update.
13106 (partial_die_info::partial_die_info):
13107 (read_partial_die): Change it to partial_die_info::read.
13108
13109 2018-02-26 Yao Qi <yao.qi@linaro.org>
13110
13111 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13112 (fixup_partial_die): Remove declaration.
13113 (scan_partial_symbols): Update.
13114 (partial_die_parent_scope): Likewise.
13115 (partial_die_full_name): Likewise.
13116 (fixup_partial_die): Change it to partial_die_info::fixup.
13117
13118 2018-02-26 Yao Qi <yao.qi@linaro.org>
13119
13120 * dwarf2read.c (read_partial_die): Update the declaration.
13121 (load_partial_dies): Caller update.
13122 (read_partial_die): Remove one argument abbrev_len.
13123
13124 2018-02-26 Yao Qi <yao.qi@linaro.org>
13125
13126 * dwarf2read.c (struct partial_die_info): Add ctor, delete
13127 assignment operator.
13128 (load_partial_dies): Use ctor and copy ctor.
13129 (read_partial_die): Update.
13130 (dwarf2_cu::find_partial_die): Use ctor.
13131
13132 2018-02-26 Yao Qi <yao.qi@linaro.org>
13133
13134 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13135 (find_partial_die_in_comp_unit): Change it to
13136 dwarf2_cu::find_partial_die.
13137 (find_partial_die): Update.
13138
13139 2018-02-26 Yao Qi <yao.qi@linaro.org>
13140
13141 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13142 is NULL.
13143
13144 2018-02-26 Yao Qi <yao.qi@linaro.org>
13145
13146 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13147
13148 2018-02-26 Alan Hayward <alan.hayward@arm.com>
13149
13150 * arch/amd64.h: Use common/tdesc.h.
13151 * arch/i386.c: Likewise.
13152 * arch/i386.h: Likewise.
13153 * arch/tic6x.c: Likewise.
13154 * arch/tdesc.h: Move file from here...
13155 * common/tdesc.h: ...to here.
13156 * features/aarch64-core.c: Regenerate.
13157 * features/aarch64-fpu.c: Regenerate.
13158 * features/i386/32bit-avx.c: Regenerate.
13159 * features/i386/32bit-avx512.c: Regenerate.
13160 * features/i386/32bit-core.c: Regenerate.
13161 * features/i386/32bit-linux.c: Regenerate.
13162 * features/i386/32bit-mpx.c: Regenerate.
13163 * features/i386/32bit-pkeys.c: Regenerate.
13164 * features/i386/32bit-sse.c: Regenerate.
13165 * features/i386/64bit-avx.c: Regenerate.
13166 * features/i386/64bit-avx512.c: Regenerate.
13167 * features/i386/64bit-core.c: Regenerate.
13168 * features/i386/64bit-linux.c: Regenerate.
13169 * features/i386/64bit-mpx.c: Regenerate.
13170 * features/i386/64bit-pkeys.c: Regenerate.
13171 * features/i386/64bit-segments.c: Regenerate.
13172 * features/i386/64bit-sse.c: Regenerate.
13173 * features/i386/x32-core.c: Regenerate.
13174 * features/tic6x-c6xp.c: Regenerate.
13175 * features/tic6x-core.c: Regenerate.
13176 * features/tic6x-gp.c: Regenerate.
13177 * target-descriptions.c: Use common/tdesc.h.
13178 * target-descriptions.h: Likewise.
13179
13180 2018-02-24 Tom Tromey <tom@tromey.com>
13181
13182 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13183 (try_thread_db_load_from_dir, thread_db_load_search): Use
13184 std::string.
13185 (info_auto_load_libthread_db_compare): Return bool. Change
13186 argument types.
13187 (info_auto_load_libthread_db): Use std::vector, std::string.
13188 Remove cleanups.
13189
13190 2018-02-24 Tom Tromey <tom@tromey.com>
13191
13192 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13193 std::string.
13194 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13195 std::string*.
13196 * gdbarch.c: Rebuild.
13197 * gdbarch.h: Rebuild.
13198 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13199 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13200 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13201 std::string*.
13202
13203 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
13204
13205 * gdbtypes.h (sect_offset): Change type to uint64_t.
13206 (sect_offset_str): New function.
13207 * dwarf2read.c (create_addrmap_from_aranges): Use
13208 sect_offset_str.
13209 (error_check_comp_unit_head): Likewise.
13210 (create_debug_type_hash_table): Likewise.
13211 (read_cutu_die_from_dwo): Likewise.
13212 (init_cutu_and_read_dies): Likewise.
13213 (init_cutu_and_read_dies_no_follow): Likewise.
13214 (process_psymtab_comp_unit_reader): Likewise.
13215 (partial_die_parent_scope): Likewise.
13216 (peek_die_abbrev): Likewise.
13217 (process_queue): Likewise.
13218 (dwarf2_physname): Likewise.
13219 (read_namespace_alias): Likewise.
13220 (read_import_statement): Likewise.
13221 (create_dwo_cu_reader): Likewise.
13222 (create_cus_hash_table): Likewise.
13223 (lookup_dwo_cutu): Likewise.
13224 (inherit_abstract_dies): Likewise.
13225 (read_func_scope): Likewise.
13226 (read_call_site_scope): Likewise.
13227 (dwarf2_add_member_fn): Likewise.
13228 (read_common_block): Likewise.
13229 (read_module_type): Likewise.
13230 (read_typedef): Likewise.
13231 (read_subrange_type): Likewise.
13232 (load_partial_dies): Likewise.
13233 (read_partial_die): Likewise.
13234 (find_partial_die): Likewise.
13235 (read_str_index): Likewise.
13236 (dwarf2_string_attr): Likewise.
13237 (build_error_marker_type): Likewise.
13238 (lookup_die_type): Likewise.
13239 (dump_die_shallow): Likewise.
13240 (follow_die_ref): Likewise.
13241 (dwarf2_fetch_die_loc_sect_off): Likewise.
13242 (dwarf2_fetch_constant_bytes): Likewise.
13243 (follow_die_sig): Likewise.
13244 (get_signatured_type): Likewise.
13245 (get_DW_AT_signature_type): Likewise.
13246 (dwarf2_find_containing_comp_unit): Likewise.
13247 (set_die_type): Likewise.
13248
13249 2018-02-21 John Baldwin <jhb@FreeBSD.org>
13250
13251 * arch/aarch64.c: Include "common-defs.h".
13252 * arch/amd64.c: Likewise.
13253 * arch/i386.c: Likewise.
13254
13255 2018-02-21 Tom Tromey <tom@tromey.com>
13256
13257 * value.h: (extract_field_op): Update.
13258 * eval.c (extract_field_op): Return a const char *.
13259 * expression.h (parse_expression_for_completion): Update.
13260 * completer.c (complete_expression): Update.
13261 (add_struct_fields): Make fieldname const.
13262 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13263 (mark_completion_tag, parse_exp_in_context_1): Update.
13264 (parse_expression_for_completion): Change "name" to
13265 unique_xmalloc_ptr*.
13266
13267 2018-02-21 Tom Tromey <tom@tromey.com>
13268
13269 * infcall.c (call_function_by_hand_dummy): Use std::vector.
13270
13271 2018-02-21 Yao Qi <yao.qi@linaro.org>
13272
13273 * avr-tdep.c (avr_read_pc): Change parameter type to
13274 readable_regcache.
13275 * gdbarch.sh (read_pc): Likewise.
13276 * gdbarch.c: Re-generated.
13277 * gdbarch.h: Re-generated.
13278 * hppa-tdep.c (hppa_read_pc): Change parameter type to
13279 readable_regcache.
13280 * ia64-tdep.c (ia64_read_pc): Likewise.
13281 * mips-tdep.c (mips_read_pc): Likewise.
13282 * spu-tdep.c (spu_read_pc): Likewise.
13283
13284 2018-02-21 Yao Qi <yao.qi@linaro.org>
13285
13286 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13287 * regcache-dump.c: New file.
13288 * regcache.c: Move register_dump to regcache-dump.c.
13289 (maintenance_print_registers): Likewise.
13290 (maintenance_print_raw_registers): Likewise.
13291 (maintenance_print_cooked_registers): Likewise.
13292 (maintenance_print_register_groups): Likewise.
13293 (maintenance_print_remote_registers): Likewise.
13294 (_initialize_regcache): Likewise.
13295 * regcache.h (register_dump): Moved from regcache.c.
13296
13297 2018-02-21 Yao Qi <yao.qi@linaro.org>
13298
13299 * regcache.c (regcache::regcache): Update.
13300 (regcache::invalidate): Move it to detached_regcache::invalidate.
13301 (get_thread_arch_aspace_regcache): Update.
13302 (regcache::raw_update): Update.
13303 (regcache::cooked_read): Remove some code.
13304 (regcache::cooked_read_value): Likewise.
13305 (regcache::raw_write): Remove assert on m_readonly_p.
13306 (regcache::raw_supply_integer): Move it to
13307 detached_regcache::raw_supply_integer.
13308 (regcache::raw_supply_zeroed): Likewise.
13309 * regcache.h (detached_regcache) <raw_supply_integer>: New
13310 declaration.
13311 <raw_supply_zeroed, invalidate>: Likewise.
13312 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13313 <invalidate>: Likewise.
13314 <m_readonly_p>: Removed.
13315
13316 2018-02-21 Yao Qi <yao.qi@linaro.org>
13317
13318 * infcmd.c (get_return_value): Let stop_regs point to
13319 get_current_regcache.
13320 * regcache.c (regcache::regcache): Remove.
13321 (register_dump_reg_buffer): New class.
13322 (regcache_print): Adjust.
13323 * regcache.h (regcache): Remove constructors.
13324
13325 2018-02-21 Yao Qi <yao.qi@linaro.org>
13326
13327 * regcache.c (class register_dump): New class.
13328 (register_dump_regcache, register_dump_none): New class.
13329 (register_dump_remote, register_dump_groups): New class.
13330 (regcache_print): Update.
13331 * regcache.h (regcache_dump_what): Move it to regcache.c.
13332 (regcache) <dump>: Remove.
13333
13334 2018-02-21 Yao Qi <yao.qi@linaro.org>
13335
13336 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13337 reg_buffer_rw *.
13338 (jit_unwind_reg_set_impl): Call raw_supply.
13339 (jit_frame_sniffer): Use reg_buffer_rw.
13340 * record-full.c (record_full_core_regbuf): Change its type.
13341 (record_full_core_open_1): Use reg_buffer_rw.
13342 (record_full_close): Likewise.
13343 (record_full_core_fetch_registers): Use regcache->raw_supply.
13344 (record_full_core_store_registers): Likewise.
13345 * regcache.c (regcache::get_register_status): Move it to
13346 reg_buffer.
13347 (regcache_raw_set_cached_value): Remove.
13348 (regcache::raw_set_cached_value): Remove.
13349 (regcache::raw_write): Call raw_supply.
13350 (regcache::raw_supply): Move it to reg_buffer_rw.
13351 * regcache.h (regcache_raw_set_cached_value): Remove.
13352 (reg_buffer_rw): New class.
13353
13354 2018-02-21 Yao Qi <yao.qi@linaro.org>
13355
13356 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13357 readonly_detached_regcache.
13358 (dummy_frame_prev_register): Use regcache->cooked_read.
13359 * frame.c (frame_save_as_regcache): Change return type.
13360 (frame_pop): Update.
13361 * frame.h (frame_save_as_regcache): Update declaration.
13362 * inferior.h (get_infcall_suspend_state_regcache): Update
13363 declaration.
13364 * infrun.c (infcall_suspend_state) <registers>: use
13365 readonly_detached_regcache.
13366 (save_infcall_suspend_state): Don't use regcache_dup.
13367 (get_infcall_suspend_state_regcache): Change return type.
13368 * linux-fork.c (struct fork_info) <savedregs>: Change to
13369 readonly_detached_regcache.
13370 <pc>: New field.
13371 (fork_save_infrun_state): Don't use regcache_dup.
13372 (info_checkpoints_command): Adjust.
13373 * mi/mi-main.c (register_changed_p): Update declaration.
13374 (mi_cmd_data_list_changed_registers): Use
13375 readonly_detached_regcache.
13376 (register_changed_p): Change parameter type to
13377 readonly_detached_regcache.
13378 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13379 readonly_detached_regcache.
13380 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13381 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13382 New.
13383 (regcache::save): Move it to reg_buffer.
13384 (regcache::restore): Change parameter type.
13385 (regcache_dup): Remove.
13386 * regcache.h (reg_buffer) <save>: New method.
13387 (readonly_detached_regcache): New class.
13388 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13389 readonly_detached_regcache.
13390 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13391
13392 2018-02-21 Yao Qi <yao.qi@linaro.org>
13393
13394 * frame.c (frame_save_as_regcache): Use regcache method save.
13395 (frame_pop): Use regcache method restore.
13396 * infrun.c (restore_infcall_suspend_state): Likewise.
13397 * linux-fork.c (fork_load_infrun_state): Likewise.
13398 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13399 save.
13400 * regcache.c (regcache_save): Remove.
13401 (regcache::restore): More asserts.
13402 (regcache_cpy): Remove.
13403 * regcache.h (regcache_save): Remove the declaration.
13404 (regcache::restore): Move from private to public.
13405 Remove the friend declaration of regcache_cpy.
13406 (regcache_cpy): Remove declaration.
13407
13408 2018-02-21 Yao Qi <yao.qi@linaro.org>
13409
13410 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13411 parameter type to 'readable_regcache *'.
13412 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13413 * arm-tdep.c (arm_neon_quad_read): Likewise.
13414 (arm_pseudo_read): Likewise.
13415 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13416 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13417 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13418 * gdbarch.c: Re-generated.
13419 * gdbarch.h: Re-generated.
13420 * gdbarch.sh (pseudo_register_read): Change parameter type to
13421 'readable_regcache *'.
13422 (pseudo_register_read_value): Likewise.
13423 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13424 (h8300_pseudo_register_read): Likewise.
13425 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13426 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13427 (i386_pseudo_register_read_into_value): Likewise.
13428 (i386_pseudo_register_read_value): Likewise.
13429 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13430 declaration.
13431 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13432 * m32c-tdep.c (m32c_raw_read): Likewise.
13433 (m32c_read_flg): Likewise.
13434 (m32c_banked_register): Likewise.
13435 (m32c_banked_read): Likewise.
13436 (m32c_sb_read): Likewise.
13437 (m32c_part_read): Likewise.
13438 (m32c_cat_read): Likewise.
13439 (m32c_r3r2r1r0_read): Likewise.
13440 (m32c_pseudo_register_read): Likewise.
13441 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13442 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13443 (mep_pseudo_cr64_read): Likewise.
13444 (mep_pseudo_register_read): Likewise.
13445 * mips-tdep.c (mips_pseudo_register_read): Likewise.
13446 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13447 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13448 * regcache.c (regcache::raw_read): Move it to readable_regcache.
13449 (regcache::cooked_read): Likewise.
13450 (regcache::cooked_read_value): Likewise.
13451 (regcache_cooked_read_signed):
13452 (regcache::cooked_read): Likewise.
13453 * regcache.h (readable_regcache): New class.
13454 (regcache): Inherit readable_regcache. Move some methods to
13455 readable_regcache.
13456 * rl78-tdep.c (rl78_pseudo_register_read): Change
13457 parameter type to 'readable_regcache *'.
13458 * rs6000-tdep.c (do_regcache_raw_read): Remove.
13459 (e500_pseudo_register_read): Change parameter type to
13460 'readable_regcache *'.
13461 (dfp_pseudo_register_read): Likewise.
13462 (vsx_pseudo_register_read): Likewise.
13463 (efpr_pseudo_register_read): Likewise.
13464 * s390-tdep.c (s390_pseudo_register_read): Likewise.
13465 * sh-tdep.c (sh_pseudo_register_read): Likewise.
13466 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13467 (sh64_pseudo_register_read): Likewise.
13468 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13469 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13470 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13471 (spu_pseudo_register_read): Likewise.
13472 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13473 (xtensa_pseudo_register_read): Likewise.
13474
13475 2018-02-21 Yao Qi <yao.qi@linaro.org>
13476
13477 * regcache.c (regcache::regcache): Call reg_buffer ctor.
13478 (regcache::arch): Move it to reg_buffer::arch.
13479 (regcache::register_buffer): Likewise.
13480 (regcache::assert_regnum): Likewise.
13481 (regcache::num_raw_registers): Likewise.
13482 * regcache.h (reg_buffer): New class.
13483 (regcache): Inherit reg_buffer.
13484
13485 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
13486
13487 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13488 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13489
13490 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
13491
13492 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13493
13494 2018-02-19 Alan Hayward <alan.hayward@arm.com>
13495
13496 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13497 (SFILES): Remove common/*.c files.
13498 (COMMON_OBS): Remove some *.o files built from common/*.c files.
13499 * common/common.host: Add common reference.
13500 * configure.ac: Likewise.
13501 * configure: Regenerate.
13502
13503 2018-02-16 Yao Qi <yao.qi@linaro.org>
13504
13505 * block.c (block_namespace_info): Inherit allocate_on_obstack.
13506 (block_initialize_namespace): Use new.
13507 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13508 (dwarf2_free_objfile): Use delete.
13509 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13510 (copy_type_recursive): Use new.
13511 * gdb_obstack.h (allocate_on_obstack): New.
13512
13513 2018-02-15 Yao Qi <yao.qi@linaro.org>
13514
13515 PR gdb/22849
13516 * inferior.c (exit_inferior_1): Reset inf->control.
13517
13518 2018-02-15 Joel Brobecker <brobecker@adacore.com>
13519
13520 * ada-lang.c (ada_to_fixed_value_create): Delete advance
13521 declaration.
13522
13523 2018-02-14 Pedro Alves <palves@redhat.com>
13524
13525 * frame-unwind.c (frame_unwind_try_unwinder): Always call
13526 frame_cleanup_after_sniffer on exception.
13527
13528 2018-02-14 Tom Tromey <tom@tromey.com>
13529
13530 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13531 const.
13532 (solib_bfd_open): Make pathname const.
13533 * solib.c (solib_bfd_open): Make pathname const.
13534 * solib-spu.c (spu_bfd_fopen): Make name const.
13535 (spu_bfd_open): Make pathname const.
13536 * solib-darwin.c (darwin_bfd_open): Make pathname const.
13537 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13538
13539 2018-02-14 Tom Tromey <tom@tromey.com>
13540
13541 * symfile.c (symfile_bfd_open): Update.
13542 * source.h (openp, source_full_path_of, find_and_open_source):
13543 Change argument type to unique_xmalloc_ptr.
13544 * source.c (openp): Take a unique_xmalloc_ptr.
13545 (source_full_path_of, find_and_open_source): Likewise.
13546 (open_source_file, symtab_to_fullname): Update.
13547 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13548 unique_xmalloc_ptr.
13549 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13550 (exec_file_find): Update.
13551 * psymtab.c (psymtab_to_fullname): Update.
13552 * nto-tdep.h (nto_find_and_open_solib): Update.
13553 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13554 unique_xmalloc_ptr.
13555 * exec.c (exec_file_attach): Update.
13556 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13557 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13558
13559 2018-02-14 Tom Tromey <tom@tromey.com>
13560
13561 * solib.c: Include source.h.
13562 * nto-tdep.c: Include source.h.
13563 * mi/mi-cmd-env.c: Include source.h.
13564 * infcmd.c: Include source.h.
13565 * exec.c: Include source.h.
13566 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13567 (add_path, directory_switch, source_path, init_source_path): Move
13568 declarations...
13569 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13570 (add_path, directory_switch, source_path, init_source_path):
13571 ...here.
13572
13573 2018-02-14 Tom Tromey <tom@tromey.com>
13574
13575 * solist.h (exec_file_find, solib_find): Return
13576 unique_xmalloc_ptr.
13577 (solib_bfd_fopen): Take a const char *.
13578 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13579 (exec_file_find, solib_find): Likewise.
13580 (solib_bfd_fopen): Do not take ownership of "pathname".
13581 (solib_bfd_open): Use unique_xmalloc_ptr.
13582 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13583 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13584 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13585 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13586
13587 2018-02-14 Joel Brobecker <brobecker@adacore.com>
13588
13589 * ada-lang.c (name_match_type_from_name): Remove reference to
13590 ada_name_for_lookup in function's documentation.
13591 * ada-lang.h (ada_name_for_lookup): Delete declaration.
13592
13593 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13594
13595 * defs.h (enum openp_flags): New enum.
13596 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13597 Move to enum openp_flags.
13598 (openp_flags): New enum flags.
13599 (openp): Change parameter type to openp_flags.
13600 * source.c (openp): Change parameter type to openp_flags.
13601 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13602 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13603
13604 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13605
13606 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13607 per-command.
13608
13609 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
13610
13611 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13612 into...
13613 (class dwarf2_queue_guard): ...the destructor of this new class.
13614 (dw2_do_instantiate_symtab): Create instance of the new class
13615 dwarf2_queue_guard, remove cleanup.
13616
13617 2018-02-09 Tom Tromey <tom@tromey.com>
13618
13619 * source.c (find_source_lines): Don't reference past the end of
13620 the vector.
13621
13622 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13623
13624 * remote.c (remote_btrace_maybe_reopen): Change error message.
13625 * btrace.c (btrace_enable): Likewise.
13626 (parse_xml_btrace): Likewise.
13627 (parse_xml_btrace_conf): Likewise.
13628
13629 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13630
13631 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13632 (linux_enable_pt, linux_enable_bts): Call
13633 diagnose_perf_event_open_fail.
13634
13635 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13636
13637 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13638 Remove parameter and change return type. Update callers. Move it.
13639 (linux_enable_bts, linux_enable_pt): Improve error message.
13640 (linux_enable_pt): Remove zero buffer size check.
13641 (linux_enable_btrace): Improve error messages. Remove NULL return
13642 check.
13643
13644 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13645
13646 * btrace.c (btrace_enable): Remove target_supports_btrace call.
13647 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13648 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13649 (linux_supports_pt, linux_supports_btrace): Remove.
13650 (linux_enable_bts): Call cpu_supports_bts.
13651 * nat/linux-btrace.h (linux_supports_btrace): Remove.
13652 * remote.c (remote_supports_btrace): Remove.
13653 (init_remote_ops): Remove remote_supports_btrace.
13654 * target-delegates.c: Regenerated.
13655 * target.c (target_supports_btrace): Remove.
13656 * target.h (target_ops) <to_supports_btrace>: Remove
13657 (target_supports_btrace): Remove.
13658 * x86-linux-nat.c (x86_linux_create_target): Remove
13659 linux_supports_btrace.
13660
13661 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13662
13663 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13664 btrace failed.
13665 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13666 exception and use message in own exception.
13667
13668 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13669
13670 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13671 (perf_event_pt_event_type): Use gdb_file_up.
13672 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13673 scoped_fd, and scoped_mmap.
13674
13675 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13676
13677 * common/scoped_mmap.h: New.
13678 * unittests/scoped_mmap-selftest.c: New.
13679 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13680 unittests/scoped_mmap-selftest.c.
13681
13682 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13683
13684 * common/scoped_fd.h: New.
13685 * unittests/scoped_fd-selftest.c: New.
13686 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13687 unittests/scoped_fd-selftest.c.
13688
13689 2018-02-09 Tom Tromey <tom@tromey.com>
13690
13691 * auto-load.c (auto_load_section_scripts): Use
13692 gdb::unique_xmalloc_ptr.
13693
13694 2018-02-09 Tom Tromey <tom@tromey.com>
13695
13696 * auto-load.c (execute_script_contents): Use std::string.
13697
13698 2018-02-09 Joel Brobecker <brobecker@adacore.com>
13699
13700 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13701 Python function, rather than a new command.
13702
13703 2018-02-08 Tom Tromey <tom@tromey.com>
13704
13705 * solib.c (solib_find_1): Use std::string.
13706 (solib_bfd_fopen): Use unique_xmalloc_ptr.
13707
13708 2018-02-08 Tom Tromey <tom@tromey.com>
13709
13710 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13711
13712 2018-02-08 Tom Tromey <tom@tromey.com>
13713
13714 * source.c (find_source_lines): Use gdb::def_vector.
13715
13716 2018-02-08 Tom Tromey <tom@tromey.com>
13717
13718 * macrocmd.c (struct temporary_macro_definition): New.
13719 (macro_define_command): Use temporary_macro_definition. Remove
13720 cleanups.
13721 (free_macro_definition_ptr): Remove.
13722
13723 2018-02-08 Tom Tromey <tom@tromey.com>
13724
13725 * macroexp.c (maybe_expand): Use std::string.
13726
13727 2018-02-08 Tom Tromey <tom@tromey.com>
13728
13729 * macroexp.c (struct macro_buffer): Add initializers for some
13730 members.
13731 (init_buffer, init_shared_buffer, free_buffer)
13732 (free_buffer_return_text): Remove.
13733 (macro_buffer): New constructors.
13734 (~macro_buffer): New destructor.
13735 (macro_buffer::set_shared): New method.
13736 (macro_buffer::resize_buffer, macro_buffer::appendc)
13737 (macro_buffer::appendmem): Now methods, not free functions.
13738 (set_token, append_tokens_without_splicing, stringify)
13739 (macro_stringify): Update.
13740 (gather_arguments): Change return type. Remove argc_p argument,
13741 add args_ptr argument. Use std::vector.
13742 (substitute_args): Remove argc argument. Accept std::vector.
13743 (expand): Update. Use std::vector.
13744 (scan, macro_expand, macro_expand_next): Update.
13745
13746 2018-02-08 Tom Tromey <tom@tromey.com>
13747
13748 * symtab.c (default_collect_symbol_completion_matches_break_on):
13749 Use unique_xmalloc_ptr.
13750 * macroscope.h: (sal_macro_scope, user_macro_scope)
13751 (default_macro_scope): Return unique_xmalloc_ptr.
13752 * macroscope.c (sal_macro_scope, user_macro_scope)
13753 (default_macro_scope): Return unique_xmalloc_ptr.
13754 * macroexp.h (macro_expand, macro_expand_once): Return
13755 unique_xmalloc_ptr.
13756 * macroexp.c (macro_expand, macro_expand_once): Return
13757 unique_xmalloc_ptr.
13758 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13759 (info_macro_command, info_macros_command): Use
13760 unique_xmalloc_ptr.
13761 * compile/compile-c-support.c (write_macro_definitions): Use
13762 unique_xmalloc_ptr.
13763 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13764
13765 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13766
13767 * value.c (value_static_field): Assign field type instead of
13768 containing type when returning an optimized out value.
13769
13770 2018-02-06 Yao Qi <yao.qi@linaro.org>
13771
13772 * ft32-tdep.c (ft32_read_pc): Remove.
13773 (ft32_write_pc): Remove.
13774 (ft32_gdbarch_init): Update.
13775 * m32r-tdep.c (m32r_read_pc): Remove.
13776 (m32r_gdbarch_init): Update.
13777 * mep-tdep.c (mep_read_pc): Remove.
13778 (mep_gdbarch_init): Update.
13779 * microblaze-tdep.c (microblaze_write_pc): Remove.
13780 (microblaze_gdbarch_init): Update.
13781 * mn10300-tdep.c (mn10300_read_pc): Remove.
13782 (mn10300_write_pc): Remove.
13783 (mn10300_gdbarch_init): Update.
13784 * moxie-tdep.c (moxie_read_pc): Remove.
13785 (moxie_write_pc): Remove.
13786 (moxie_gdbarch_init): Update.
13787
13788 2018-02-06 Yao Qi <yao.qi@linaro.org>
13789
13790 * expprint.c (print_subexp_standard): Handle
13791 OP_F77_UNDETERMINED_ARGLIST.
13792 (dump_subexp_body_standard): Likewise.
13793
13794 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13795
13796 * target-descriptions.c (tdesc_element_visitor) Add empty
13797 implementations.
13798 (tdesc_type): Move make_gdb_type from here.
13799 (tdesc_type_builtin): Likewise.
13800 (tdesc_type_vector): Likewise.
13801 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13802 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13803 (make_gdb_type_union): Likewise.
13804 (make_gdb_type_flags): Likewise.
13805 (make_gdb_type_enum): Likewise.
13806 (make_gdb_type): New function.
13807 (tdesc_register_type): Use static make_gdb_type.
13808
13809 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13810
13811 * infcmd.c (default_print_one_register_info): Align natural-format
13812 column values consistently one under another.
13813 (pad_to_column): New function.
13814
13815 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13816
13817 * dwarf2read.c (dwarf2_physname): Move commment.
13818
13819 2018-02-01 Leszek Swirski <leszeks@google.com>
13820
13821 * varobj.c (varobj_formatted_print_options): Allow recursive
13822 pretty printing if pretty printing is enabled.
13823
13824 2018-02-01 Leszek Swirski <leszeks@google.com>
13825
13826 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13827 names after a structop as a filename.
13828
13829 2018-02-01 Yao Qi <yao.qi@linaro.org>
13830
13831 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13832 (arm_record_coproc_data_proc): Likewise.
13833
13834 2018-02-01 Yao Qi <yao.qi@linaro.org>
13835
13836 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13837
13838 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
13839
13840 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13841 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13842
13843 2018-01-31 Pedro Alves <palves@redhat.com>
13844
13845 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13846 * inflow.c (child_terminal_save_inferior): Wrap reference to
13847 tcgetpgrp in HAVE_TERMIOS_H.
13848 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13849 _WIN32.
13850 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13851 always iterate over all inferiors.
13852 (gdbsim_cntrl_c): Adjust.
13853 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13854
13855 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13856
13857 * gdbtypes.c (lookup_array_range_type): Make sure the array's
13858 index type is objfile-owned if the element type is as well.
13859
13860 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13861
13862 GDB 8.1 released.
13863
13864 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
13865
13866 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13867 "features/s390x-linux64.c".
13868 (_initialize_s390_linux_tdep): Remove initialization of tdescs
13869 s390_linux32 and s390x_linux64.
13870 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13871 default tdesc.
13872 * s390-tdep.c: Include "features/s390-linux32.c" and
13873 "features/s390x-linux64.c".
13874 (s390_tdesc_valid): Add check for tdesc_has_registers.
13875 (s390_gdbarch_init): Make sure there is always a valid tdesc.
13876 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13877 tdesc_s390x_linux64.
13878 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13879 tdesc_s390x_linux64 to...
13880 * s390-tdep.h: ...here.
13881
13882 2018-01-30 Pedro Alves <palves@redhat.com>
13883
13884 PR gdb/13211
13885 * config.in, configure: Regenerate.
13886 * configure.ac: Check for getpgid.
13887 * go32-nat.c (go32_pass_ctrlc): New.
13888 (go32_target): Install it.
13889 * inf-child.c (inf_child_target): Install
13890 child_terminal_save_inferior, child_pass_ctrlc and
13891 child_interrupt.
13892 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13893 (inf_ptrace_target): No longer install it.
13894 * infcmd.c (interrupt_target_1): Adjust.
13895 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13896 (child_interrupt): Declare.
13897 (inferior::terminal_state): New.
13898 * inflow.c (struct terminal_info): Update comments.
13899 (inferior_process_group): Delete.
13900 (terminal_is_ours): Delete.
13901 (gdb_tty_state): New.
13902 (child_terminal_init): Adjust.
13903 (is_gdb_terminal, sharing_input_terminal_1)
13904 (sharing_input_terminal): New functions.
13905 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13906 Set the process's actual process group in the foreground if
13907 possible. Handle is_ours_for_output/is_ours distinction. Don't
13908 mark terminal as the inferior's if not sharing GDB's terminal.
13909 Don't check attach_flag.
13910 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13911 pass down a target_terminal_state.
13912 (child_terminal_save_inferior): New, factored out from ...
13913 (child_terminal_ours_1): ... this. Handle
13914 target_terminal_state::is_ours_for_output.
13915 (child_interrupt, child_pass_ctrlc): New.
13916 (inflow_inferior_exit): Clear the inferior's terminal_state.
13917 (copy_terminal_info): Copy the inferior's terminal state.
13918 (_initialize_inflow): Remove reference to terminal_is_ours.
13919 * inflow.h (inferior_process_group): Delete.
13920 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13921 * procfs.c (procfs_target): Don't install procfs_interrupt.
13922 (procfs_interrupt): Delete.
13923 * remote.c (remote_serial_quit_handler): Adjust.
13924 (remote_interrupt): Remove ptid parameter. Adjust.
13925 * target-delegates.c: Regenerate.
13926 * target.c: Include "terminal.h".
13927 (target_terminal::terminal_state): Rename to ...
13928 (target_terminal::m_terminal_state): ... this.
13929 (target_terminal::init): Adjust.
13930 (target_terminal::inferior): Adjust to per-inferior
13931 terminal_state.
13932 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13933 (target_terminal::ours, target_terminal::ours_for_output): Use
13934 target_terminal_is_ours_kind.
13935 (target_interrupt): Remove ptid parameter. Adjust.
13936 (default_target_pass_ctrlc): Adjust.
13937 * target.h (target_ops::to_terminal_save_inferior): New field.
13938 (target_ops::to_interrupt): Remove ptid_t parameter.
13939 (target_interrupt): Remove ptid_t parameter. Update comment.
13940 (target_pass_ctrlc): Update comment.
13941 * target/target.h (target_terminal_state): New scoped enum,
13942 factored out of ...
13943 (target_terminal::terminal_state): ... here.
13944 (target_terminal::inferior): Update comments.
13945 (target_terminal::restore_inferior): New.
13946 (target_terminal::is_inferior, target_terminal::is_ours)
13947 (target_terminal::is_ours_for_output): Adjust.
13948 (target_terminal::scoped_restore_terminal_state): Adjust to
13949 rename, and call restore_inferior() instead of inferior().
13950 (target_terminal::scoped_restore_terminal_state::m_state): Change
13951 type.
13952 (target_terminal::terminal_state): Rename to ...
13953 (target_terminal::m_terminal_state): ... this and change type.
13954
13955 2018-01-30 Pedro Alves <palves@redhat.com>
13956
13957 * linux-nat.c (wait_for_signal): New function.
13958 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13959 directly.
13960 (async_terminal_is_ours)
13961 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13962 (linux_nat_add_target): Don't override
13963 to_terminal_inferior/to_terminal_ours.
13964
13965 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
13966
13967 * remote.c (remote_follow_fork): Don't call "detach_inferior".
13968
13969 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
13970
13971 * dwarf2read.c (free_dwo_files): Add forward-declaration.
13972 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13973 dwarf2_per_objfile_free here.
13974 (dwarf2_per_objfile_free): Remove.
13975 (_initialize_dwarf2_read): Don't register
13976 dwarf2_per_objfile_free as a registry cleanup.
13977
13978 2018-01-27 Eli Zaretskii <eliz@gnu.org>
13979
13980 Avoid compilation errors in MinGW native builds
13981
13982 The error is triggered by including python-internal.h, and the
13983 error message is:
13984
13985 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13986 from build-gnulib/import/math.h:27,
13987 from d:/usr/Python26/include/pyport.h:235,
13988 from d:/usr/Python26/include/Python.h:58,
13989 from python/python-internal.h:94,
13990 from python/py-arch.c:24:
13991 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13992 using ::hypot;
13993 ^~~~~
13994
13995 This happens because Python headers define 'hypot' to expand t
13996 '_hypot' in the Windows builds.
13997 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13998 'hypoth'. This avoids a compilation error.
13999
14000 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14001
14002 * MAINTAINERS (Write After Approval): Fix ordering.
14003
14004 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14005
14006 * MAINTAINERS (Write After Approval): Add Alan Hayward.
14007
14008 2018-01-26 Alan Modra <amodra@gmail.com>
14009
14010 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14011 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14012 Remove nop. Make const. Comment.
14013 (powerpc32_plt_stub_so_2): New.
14014 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14015 Correct count. Update uses.
14016 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14017 Move common code reading PLT entry word. Correct
14018 powerpc32_plt_stub PLT address calculation.
14019 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14020 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14021 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14022 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14023 (ppc64_standard_linkage8): Likewise.
14024 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14025 Correct insns description.
14026 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14027
14028 2018-01-24 Pedro Alves <palves@redhat.com>
14029
14030 GCC PR libstdc++/83906
14031 * gdbtypes.c (operator==(const dynamic_prop &,
14032 const dynamic_prop &)): New.
14033 (operator==(const range_bounds &, const range_bounds &)): New.
14034 (check_types_equal): Use them instead of memcmp.
14035 * gdbtypes.h (operator==(const dynamic_prop &,
14036 const dynamic_prop &)): Declare.
14037 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14038 (operator==(const range_bounds &, const range_bounds &)): Declare.
14039 (operator!=(const range_bounds &, const range_bounds &)): Declare.
14040
14041 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14042
14043 * s390-linux-tdep.c (s390_record_address_mask)
14044 (s390_record_calc_disp_common, s390_record_calc_disp)
14045 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14046 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14047 (s390_process_record): Move to s390-tdep.c.
14048 (s390_linux_init_abi_any): Adjust.
14049 * s390-tdep.c (s390_record_address_mask)
14050 (s390_record_calc_disp_common, s390_record_calc_disp)
14051 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14052 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14053 (s390_process_record): Moved from s390-linux-tdep.c
14054 (s390_gdbarch_init): Adjust.
14055
14056 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14057
14058 * s390-linux-nat.c (s390-tdep.h): New include.
14059 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14060 (HFILES_NO_SRCDIR): Add s390-tdep.h.
14061 (ALLDEPFILES): Add s390-tdep.c.
14062 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14063 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14064 * s390-tdep.h: ...this. New file.
14065 * s390-linux-tdep.c (s390-tdep.h): New include.
14066 (_initialize_s390_tdep): Rename to...
14067 (_initialize_s390_linux_tdep): ...this and adjust.
14068 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14069 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14070 s390-tdep.h.
14071 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14072 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14073 (s390_is_partial_instruction, s390_software_single_step)
14074 (is_non_branch_ril, s390_displaced_step_copy_insn)
14075 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14076 (s390_prologue_data, s390_addr, s390_store, s390_load)
14077 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14078 (s390_register_call_saved, s390_guess_tracepoint_registers)
14079 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14080 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14081 (s390_pseudo_register_name, s390_pseudo_register_type)
14082 (s390_pseudo_register_read, s390_pseudo_register_write)
14083 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14084 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14085 (s390_addr_bits_remove, s390_address_class_type_flags)
14086 (s390_address_class_type_flags_to_name)
14087 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14088 (s390_function_arg_float, s390_function_arg_vector)
14089 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14090 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14091 (s390_frame_align, s390_register_return_value, s390_return_value)
14092 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14093 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14094 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14095 (s390_trad_frame_prev_register, s390_unwind_cache)
14096 (s390_prologue_frame_unwind_cache)
14097 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14098 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14099 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14100 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14101 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14102 (s390_frame_base_address, s390_local_base_address)
14103 (s390_frame_base, s390_gcc_target_options)
14104 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14105 (s390_validate_reg_range, s390_tdesc_valid)
14106 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14107 * s390-tdep.c: ...this. New file.
14108
14109 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14110
14111 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14112 (s390_process_record, s390_gdbarch_tdep_alloc)
14113 (s390_linux_init_abi_any): Use/set new hook.
14114
14115 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14116
14117 * s390-linux-tdep.c (osabi.h): New include.
14118 (s390_linux_init_abi_31, s390_linux_init_abi_64)
14119 (s390_linux_init_abi_any): New functions.
14120 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14121
14122 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14123
14124 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14125 tdesc_has_registers check
14126
14127 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14128
14129 * s390-linux-tdep.c (s390_tdesc_valid): New function.
14130 (s390_validate_reg_range): New macro.
14131 (s390_gdbarch_init): Adjust.
14132
14133 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14134
14135 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14136 (s390_gdbarch_tdep_alloc): Adjust.
14137 (s390_gdbarch_init): Adjust.
14138
14139 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14140
14141 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14142 <have_tdb>: Change type to bool.
14143 (s390_gdbarch_tdep_alloc): Adjust.
14144 (s390_gdbarch_init): Adjust.
14145
14146 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14147
14148 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14149 (gdbarch_tdep) <have_upper, have_vx>: New fields.
14150 (s390_gdbarch_tdep_alloc): New function.
14151 (s390_gdbarch_init): Allocate tdep at start and use its fields
14152 instead of separate variables.
14153
14154 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14155
14156 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14157 when looking for cached gdbarch and add comment for remaining.
14158
14159 2018-01-22 Pedro Alves <palves@redhat.com>
14160 Sergio Durigan Junior <sergiodj@redhat.com>
14161
14162 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14163 case.
14164
14165 2018-01-22 Maciej W. Rozycki <macro@mips.com>
14166
14167 * MAINTAINERS: Update my company e-mail address.
14168
14169 2018-01-22 Yao Qi <yao.qi@linaro.org>
14170
14171 * regcache.c (cooked_write_test): New function.
14172 (_initialize_regcache): Register the test.
14173
14174 2018-01-22 Yao Qi <yao.qi@linaro.org>
14175
14176 * ia64-tdep.c (ia64_pseudo_register_read): Call
14177 regcache->cooked_read instead of regcache_cooked_read_unsigned.
14178 * m32c-tdep.c (m32c_cat_read): Likewise.
14179 (m32c_r3r2r1r0_read): Likewise.
14180 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14181 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14182
14183 2018-01-22 Yao Qi <yao.qi@linaro.org>
14184
14185 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14186 method raw_read instead of regcache_raw_read.
14187 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14188 * arm-tdep.c (arm_neon_quad_read): Likewise.
14189 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14190 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14191 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14192 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14193 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14194 (i386_pseudo_register_read_into_value): Likewise.
14195 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14196 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14197 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14198 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14199 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14200 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14201 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14202 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14203 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14204
14205 2018-01-22 Yao Qi <yao.qi@linaro.org>
14206
14207 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14208 * configure.tgt: Remove target mt.
14209 * mt-tdep.c: Remove.
14210 * regcache.c (cooked_read_test): Remove the check for mt.
14211
14212 2018-01-22 Yao Qi <yao.qi@linaro.org>
14213
14214 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14215 instead of gdbarch_pseudo_register_read_value.
14216
14217 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14218
14219 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14220 language is Ada.
14221
14222 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14223
14224 * linespec.c (create_sals_line_offset): Remove code that preserved
14225 the symtab_and_line's line number.
14226
14227 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14228
14229 * varobj.c (varobj_create): Don't set valid_block when creating a
14230 floating varobj.
14231
14232 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14233
14234 * varobj.c (varobj_create): Remove out of date comment.
14235
14236 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14237
14238 PR mi/20395
14239 * ada-exp.y (write_var_from_sym): Pass extra parameter when
14240 updating innermost block.
14241 * parse.c (innermost_block_tracker::update): Take extra type
14242 parameter, and check types match before updating innermost block.
14243 (write_dollar_variable): Update innermost block for registers.
14244 * parser-defs.h (enum innermost_block_tracker_type): New enum.
14245 (innermost_block_tracker::innermost_block_tracker): Initialise
14246 m_types member.
14247 (innermost_block_tracker::reset): Take type parameter.
14248 (innermost_block_tracker::update): Take type parameter, and pass
14249 type through as needed.
14250 (innermost_block_tracker::m_types): New member.
14251 * varobj.c (varobj_create): Pass type when reseting innermost
14252 block.
14253
14254 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14255
14256 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14257 * ada-lang.c (resolve_subexp): Likewise.
14258 * breakpoint.c (set_breakpoint_condition) Likewise.
14259 (watch_command_1) Likewise.
14260 * c-exp.y (variable): Likewise.
14261 * d-exp.y (PrimaryExpression): Likewise.
14262 * f-exp.y (variable): Likewise.
14263 * go-exp.y (variable): Likewise.
14264 * m2-exp.y (variable): Likewise.
14265 * objfiles.c (objfile::~objfile): Likewise.
14266 * p-exp.y (variable): Likewise.
14267 * parse.c (innermost_block): Change type.
14268 * parser-defs.h (class innermost_block_tracker): New.
14269 (innermost_block): Change to innermost_block_tracker.
14270 * printcmd.c (display_command): Switch to innermost_block API.
14271 (do_one_display): Likewise.
14272 * rust-exp.y (do_one_display): Likewise.
14273 * symfile.c (clear_symtab_users): Likewise.
14274 * varobj.c (varobj_create): Switch to innermost_block API, replace
14275 use of innermost_block with block stored on varobj object.
14276
14277 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14278
14279 * expression.h (innermost_block): Remove declaration.
14280 * varobj.c: Add 'parser-defs.h' include.
14281
14282 2018-01-19 Tom Tromey <tom@tromey.com>
14283
14284 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14285 symbols in the static and global blocks.
14286
14287 2018-01-19 James Clarke <jrtc27@jrtc27.com>
14288
14289 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14290 gdb_ptrace.h, and move including gdb_wait.h ...
14291 * nat/linux-ptrace.h: ... to here.
14292
14293 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14294
14295 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14296 inf_ptrace_detach_success.
14297 (inf_ptrace_detach_success): Add inferior parameter, use it
14298 instead of inferior_ptid, pass it to detach_inferior.
14299 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14300 parameter.
14301 * inferior.c (detach_inferior): Add overload that takes an
14302 inferior object.
14303 * inferior.h (detach_inferior): Likewise.
14304 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14305 use inferior_ptid, adjust call to inf_ptrace_detach_success.
14306 * linux-thread-db.c (thread_db_detach): Use inf parameter.
14307
14308 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14309
14310 * target.h (struct target_ops) <to_detach>: Add inferior
14311 parameter.
14312 (target_detach): Likewise.
14313 * target.c (dispose_inferior): Pass inferior down.
14314 (target_detach): Pass inferior down. Assert that it is equal to
14315 the current inferior.
14316 * aix-thread.c (aix_thread_detach): Pass inferior down.
14317 * corefile.c (core_file_command): Pass current_inferior() down.
14318 * corelow.c (core_detach): Add inferior parameter.
14319 * darwin-nat.c (darwin_detach): Likewise.
14320 * gnu-nat.c (gnu_detach): Likewise.
14321 * inf-ptrace.c (inf_ptrace_detach): Likewise.
14322 * infcmd.c (detach_command): Pass current_inferior() down to
14323 target_detach.
14324 * infrun.c (follow_fork_inferior): Pass parent_inf to
14325 target_detach.
14326 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14327 target_detach.
14328 * linux-nat.c (linux_nat_detach): Add inferior parameter.
14329 * linux-thread-db.c (thread_db_detach): Likewise.
14330 * nto-procfs.c (procfs_detach): Likewise.
14331 * procfs.c (procfs_detach): Likewise.
14332 * record.c (record_detach): Likewise.
14333 * record.h (struct inferior): Forward-declare.
14334 (record_detach): Add inferior parameter.
14335 * remote-sim.c (gdbsim_detach): Likewise.
14336 * remote.c (remote_detach_1): Likewise.
14337 (remote_detach): Likewise.
14338 (extended_remote_detach): Likewise.
14339 * sol-thread.c (sol_thread_detach): Likewise.
14340 * target-debug.h (target_debug_print_inferior_p): New macro.
14341 * target-delegates.c: Re-generate.
14342 * top.c (kill_or_detach): Pass inferior down to target_detach.
14343 * windows-nat.c (windows_detach): Add inferior parameter.
14344
14345 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14346
14347 * target.h (struct target_ops) <to_detach>: Remove args
14348 parameter.
14349 (target_detach): Likewise.
14350 * target.c (dispose_inferior): Adjust.
14351 (target_detach): Remove args parameter, adjust.
14352 * aix-thread.c (aix_thread_detach): Adjust.
14353 * corefile.c (core_file_command): Adjust.
14354 * corelow.c (core_detach): Adjust.
14355 * darwin-nat.c (darwin_detach): Adjust.
14356 * gnu-nat.c (gnu_detach): Adjust.
14357 * inf-ptrace.c (inf_ptrace_detach): Adjust.
14358 * infcmd.c (detach_command): Adjust
14359 * infrun.c (follow_fork_inferior): Adjust.
14360 (handle_vfork_child_exec_or_exit): Adjust.
14361 * linux-fork.c (linux_fork_detach): Remove args parameter.
14362 * linux-fork.h (linux_fork_detach): Likewise.
14363 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14364 * linux-thread-db.c (thread_db_detach): Likewise.
14365 * nto-procfs.c (procfs_detach): Likewise.
14366 * procfs.c (procfs_detach): Likewise.
14367 (do_detach): Remove signo parameter.
14368 * record.c (record_detach): Remove args parameter.
14369 * record.h (record_detach): Likewise.
14370 * remote-sim.c (gdbsim_detach): Likewise.
14371 * remote.c (remote_detach_1): Likewise.
14372 (remote_detach): Likewise.
14373 (extended_remote_detach): Likewise.
14374 * sol-thread.c (sol_thread_detach): Likewise.
14375 * target-delegates.c: Re-generate.
14376 * top.c (struct qt_args) <args>: Remove field.
14377 (kill_or_detach): Don't pass args.
14378 (quit_force): Don't set args.
14379 * windows-nat.c (windows_detach): Remove args parameter.
14380
14381 2018-01-19 Yao Qi <yao.qi@linaro.org>
14382
14383 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14384 (arm_linux_init_abi): Install it.
14385
14386 2018-01-19 Yao Qi <yao.qi@linaro.org>
14387
14388 * osabi.c (gdb_osabi_names): Extend the regexp for
14389 arm-linux-gnueabihf.
14390
14391 2018-01-18 Yao Qi <yao.qi@linaro.org>
14392
14393 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14394 m_abbrevs.
14395 (abbrev_table::add_abbrev): Update.
14396 (abbrev_table::lookup_abbrev): Update.
14397
14398 2018-01-18 Yao Qi <yao.qi@linaro.org>
14399
14400 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14401
14402 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
14403
14404 * compile/compile.c (compile_to_object): Convert "triplet_rx"
14405 to "std::string".
14406
14407 2018-01-17 Tom Tromey <tom@tromey.com>
14408
14409 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
14410
14411 2018-01-17 Tom Tromey <tom@tromey.com>
14412
14413 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14414 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14415 (create_array_type_with_stride): Update.
14416 * dwarf2read.c (set_die_type): Update.
14417
14418 2018-01-17 Tom Tromey <tom@tromey.com>
14419
14420 * dwarf2read.c (delayed_method_info): Remove typedef.
14421 (dwarf2_cu::method_info): Now a std::vector.
14422 (add_to_method_list): Update.
14423 (free_delayed_list): Remove.
14424 (compute_delayed_physnames): Update.
14425 (process_full_comp_unit, process_full_type_unit): Clear the method
14426 list. Remove cleanups.
14427 (psymtab_include_file_name): Add name_holder parameter. Use
14428 unique_xmalloc_ptr.
14429 (dwarf_decode_lines): Update.
14430
14431 2018-01-17 Tom Tromey <tom@tromey.com>
14432 Simon Marchi <simon.marchi@ericsson.com>
14433
14434 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14435 (dwarf2_per_objfile::free_cached_comp_units)
14436 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14437 (init_cutu_and_read_dies_no_follow): Update.
14438 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14439 (dwarf2_cu::~dwarf2_cu): New.
14440 (free_heap_comp_unit, free_stack_comp_unit): Remove.
14441 (age_cached_comp_units, free_one_cached_comp_unit): Update.
14442
14443 2018-01-17 Tom Tromey <tom@tromey.com>
14444 Simon Marchi <simon.marchi@ericsson.com>
14445
14446 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14447 (struct die_reader_specs) <abbrev_table>: New member.
14448 (struct abbrev_table): Add constructor.
14449 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14450 <abbrev_obstack>: Now an auto_obstack.
14451 (abbrev_table_up): New typedef.
14452 (init_cu_die_reader): Add abbrev_table parameter.
14453 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14454 Add result_dwo_abbrev_table.
14455 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14456 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14457 Update.
14458 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14459 parameter.
14460 (skip_children): Update.
14461 (abbrev_table::alloc_abbrev): Rename from
14462 abbrev_table_alloc_abbrev.
14463 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14464 (abbrev_table::lookup_abbrev): Rename from
14465 abbrev_table_lookup_abbrev.
14466 (abbrev_table_read_table): Return abbrev_table_up.
14467 (abbrev_table_free, abbrev_table_free_cleanup)
14468 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14469 (load_partial_dies): Update.
14470
14471 2018-01-17 Tom Tromey <tom@tromey.com>
14472
14473 * dwarf2read.c (dwarf2_compute_name): Update comment.
14474 (read_func_scope, read_variable): Update.
14475 (new_symbol): Remove.
14476 (new_symbol_full): Rename to new_symbol.
14477
14478 2018-01-17 Mike Gulick <mgulick@mathworks.com>
14479
14480 PR gdb/16577
14481 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14482 a warning instead of throwing an error, set section size to 0 and return
14483 NULL.
14484 * gdb_bfd.h (gdb_bfd_map_section): Update description.
14485
14486 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14487
14488 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14489 std::string.
14490 (linux_ptrace_attach_fail_reason_string): Likewise.
14491 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14492 Likewise.
14493 (linux_ptrace_attach_fail_reason_string): Likewise.
14494 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14495
14496 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14497
14498 * linux-nat.c (linux_nat_attach): Remove xstrdup.
14499
14500 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
14501
14502 PR gdb/21559
14503 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14504 checking for fs_base/gs_base fields in struct user_regs_struct.
14505 * configure: Regenerate.
14506
14507 2018-01-17 Yao Qi <yao.qi@linaro.org>
14508
14509 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14510 function.
14511 (aarch64_linux_init_abi): Install it to gdbarch hook
14512 gcc_target_options.
14513
14514 2018-01-15 Pedro Alves <palves@redhat.com>
14515
14516 * common/signals-state-save-restore.c
14517 (save_original_signals_state): Fix typos.
14518
14519 2017-01-12 Tom Tromey <tom@tromey.com>
14520 Sergio Durigan Junior <sergiodj@redhat.com>
14521
14522 * Makefile.in (install-only): Install gdb-add-index.
14523
14524 2018-01-12 John Baldwin <jhb@FreeBSD.org>
14525
14526 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14527
14528 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
14529
14530 * infrun.c (keep_going_pass_signal): Clear step-over info when
14531 insert_breakpoints fails.
14532
14533 2018-01-11 Pedro Alves <palves@redhat.com>
14534
14535 PR gdb/22583
14536 * infrun.c (resume): Rename to ...
14537 (resume_1): ... this.
14538 (resume): Reimplement as wrapper around resume_1.
14539
14540 2018-01-11 Pedro Alves <palves@redhat.com>
14541
14542 PR remote/22597
14543 * remote.c (remote_parse_stop_reply): Default to the last-set
14544 general thread instead of to 'magic_null_ptid'.
14545
14546 2018-01-10 Pedro Alves <palves@redhat.com>
14547
14548 * language.h (language_get_symbol_name_matcher): Rename ...
14549 (get_symbol_name_matcher): ... this.
14550 * language.c (language_get_symbol_name_matcher): Ditto.
14551 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14552 callers adjusted.
14553
14554 2018-01-10 Pedro Alves <palves@redhat.com>
14555
14556 PR gdb/22670
14557 * dwarf2read.c
14558 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14559 Adjust to use language_get_symbol_name_matcher instead of
14560 language_defn::la_get_symbol_name_matcher.
14561 * language.c (language_get_symbol_name_matcher): If in Ada mode
14562 and the lookup name is a verbatim match, return Ada's matcher.
14563 * language.h (language_get_symbol_name_matcher): Adjust comment.
14564 (ada_lookup_name_info::verbatim_p):: New method.
14565
14566 2018-01-10 Pedro Alves <palves@redhat.com>
14567
14568 PR gdb/22670
14569 * ada-lang.c (ada_collect_symbol_completion_matches): If the
14570 minsym's language is language_auto or language_cplus, pass down
14571 language_ada instead.
14572 * symtab.c (compare_symbol_name): Don't frob symbol language here.
14573
14574 2018-01-10 Pedro Alves <palves@redhat.com>
14575
14576 PR gdb/22670
14577 * minsyms.c (linkage_name_str): New function.
14578 (iterate_over_minimal_symbols): Use it.
14579
14580 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14581
14582 * NEWS: Document that 'info proc' now works on FreeBSD.
14583
14584 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14585
14586 * configure.ac: Check for kinfo_getfile in libutil.
14587 * configure: Regenerate.
14588 * config.in: Regenerate.
14589 * fbsd-nat.c: Include "fbsd-tdep.h".
14590 (fbsd_fetch_cmdline): New.
14591 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14592 rather than calling error.
14593 (fbsd_info_proc): New.
14594 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14595 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14596 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14597
14598 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14599
14600 * fbsd-nat.c (struct free_deleter): Remove.
14601 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14602
14603 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14604
14605 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14606 NULL for an empty pathname.
14607
14608 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14609
14610 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14611 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14612 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14613 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14614 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14615 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14616 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14617 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14618 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14619 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14620 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14621 (fbsd_core_fetch_timeval, fbsd_print_sigset)
14622 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14623 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
14624 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14625
14626 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
14627
14628 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14629 (gnu_xfer_auxv): New function.
14630 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14631 TARGET_OBJECT_AUXV.
14632
14633 2018-01-08 Yao Qi <yao.qi@linaro.org>
14634 Simon Marchi <simon.marchi@ericsson.com>
14635
14636 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14637 common/selftest.c.
14638 (COMMON_OBS): Remove selftest.o.
14639 * configure.ac: Append selftest-arch.c and common/selftest.c to
14640 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
14641 * configure: Re-generated.
14642 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14643 GDB_SELF_TEST.
14644 (maintenance_info_selftests): Likewise.
14645
14646 2018-01-08 Xavier Roirand <roirand@adacore.com>
14647
14648 * ada-valprint.c (val_print_packed_array_elements): Use
14649 proper number of elements when printing an array indexed
14650 by an enumeration type.
14651
14652 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14653
14654 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14655 (dw2_get_file_names_reader): Adjust.
14656 (lookup_dwo_signatured_type): Adjust.
14657 (lookup_dwp_signatured_type): Adjust.
14658 (lookup_signatured_type): Adjust.
14659 (create_type_unit_group): Adjust.
14660 (get_type_unit_group): Adjust.
14661 (process_psymtab_comp_unit_reader): Adjust.
14662 (build_type_psymtabs_reader): Adjust.
14663 (scan_partial_symbols): Adjust.
14664 (add_partial_symbol): Adjust.
14665 (add_partial_subprogram): Adjust.
14666 (peek_die_abbrev): Adjust.
14667 (fixup_go_packaging): Adjust.
14668 (process_imported_unit_die): Adjust.
14669 (dwarf2_compute_name): Adjust.
14670 (dwarf2_physname): Adjust.
14671 (read_import_statement): Adjust.
14672 (handle_DW_AT_stmt_list): Adjust.
14673 (read_file_scope): Adjust.
14674 (read_func_scope): Adjust.
14675 (read_lexical_block_scope): Adjust.
14676 (read_call_site_scope): Adjust.
14677 (read_variable): Adjust.
14678 (dwarf2_rnglists_process): Adjust.
14679 (dwarf2_ranges_process): Adjust.
14680 (dwarf2_ranges_read): Adjust.
14681 (dwarf2_get_pc_bounds): Adjust.
14682 (dwarf2_record_block_ranges): Adjust.
14683 (dwarf2_add_field): Adjust.
14684 (dwarf2_add_member_fn): Adjust.
14685 (read_structure_type): Adjust.
14686 (process_structure_scope): Adjust.
14687 (read_enumeration_type): Adjust.
14688 (read_array_type): Adjust.
14689 (mark_common_block_symbol_computed): Adjust.
14690 (read_common_block): Adjust.
14691 (read_namespace_type): Adjust.
14692 (read_namespace): Adjust.
14693 (read_module_type): Adjust.
14694 (read_tag_pointer_type): Adjust.
14695 (read_tag_ptr_to_member_type): Adjust.
14696 (read_tag_string_type): Adjust.
14697 (read_subroutine_type): Adjust.
14698 (read_typedef): Adjust.
14699 (read_base_type): Adjust.
14700 (attr_to_dynamic_prop): Adjust.
14701 (read_subrange_type): Adjust.
14702 (read_unspecified_type): Adjust.
14703 (dwarf2_read_abbrevs): Adjust.
14704 (load_partial_dies): Adjust.
14705 (read_partial_die): Adjust.
14706 (find_partial_die): Adjust.
14707 (guess_partial_die_structure_name): Adjust.
14708 (fixup_partial_die): Adjust.
14709 (read_attribute_value): Adjust.
14710 (read_addr_index): Adjust.
14711 (read_addr_index_from_leb128): Adjust.
14712 (read_str_index): Adjust.
14713 (dwarf2_string_attr): Adjust.
14714 (get_debug_line_section): Adjust.
14715 (dwarf_decode_line_header): Adjust.
14716 (lnp_state_machine::check_line_address): Adjust.
14717 (dwarf_decode_lines_1): Adjust.
14718 (dwarf_decode_lines): Adjust.
14719 (dwarf2_start_symtab): Adjust.
14720 (var_decode_location): Adjust.
14721 (new_symbol_full): Adjust.
14722 (dwarf2_const_value_data): Adjust.
14723 (dwarf2_const_value_attr): Adjust.
14724 (dwarf2_const_value): Adjust.
14725 (die_type): Adjust.
14726 (die_containing_type): Adjust.
14727 (build_error_marker_type): Adjust.
14728 (lookup_die_type): Adjust.
14729 (guess_full_die_structure_name): Adjust.
14730 (anonymous_struct_prefix): Adjust.
14731 (determine_prefix): Adjust.
14732 (dwarf2_name): Adjust.
14733 (follow_die_ref_or_sig): Adjust.
14734 (follow_die_offset): Adjust.
14735 (follow_die_ref): Adjust.
14736 (follow_die_sig_1): Adjust.
14737 (follow_die_sig): Adjust.
14738 (get_signatured_type): Adjust.
14739 (get_DW_AT_signature_type): Adjust.
14740 (decode_locdesc): Adjust.
14741 (dwarf_decode_macros): Adjust.
14742 (cu_debug_loc_section): Adjust.
14743 (fill_in_loclist_baton): Adjust.
14744 (dwarf2_symbol_mark_computed): Adjust.
14745 (init_one_comp_unit): Don't assign
14746 dwarf2_cu::dwarf2_per_objfile.
14747 (set_die_type): Adjust.
14748
14749 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14750
14751 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14752 <dwarf2_per_objfile>: New field.
14753 (dwarf2_per_objfile): Remove global.
14754 (get_dwarf2_per_objfile): New function.
14755 (set_dwarf2_per_objfile): New function.
14756 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14757 dwarf2_per_objfile.
14758 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14759 (read_abbrev_offset): Likewise.
14760 (read_indirect_string): Likewise.
14761 (read_indirect_line_string): Likewise.
14762 (read_indirect_string_at_offset): Likewise.
14763 (read_indirect_string_from_dwz): Likewise.
14764 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14765 dwarf2_per_objfile.
14766 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14767 (create_all_comp_units): Change objfile parameter to
14768 dwarf2_per_objfile.
14769 (create_all_type_units): Likewise.
14770 (process_queue): Add dwarf2_per_objfile parameter.
14771 (read_and_check_comp_unit_head): Likewise.
14772 (lookup_dwo_unit_in_dwp): Likewise.
14773 (get_dwp_file): Likewise.
14774 (process_cu_includes): Likewise.
14775 (struct free_dwo_file_cleanup_data): New struct.
14776 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14777 set_dwarf2_per_objfile.
14778 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14779 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14780 context, adjust calls.
14781 (dw2_instantiate_symtab): Likewise.
14782 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14783 (dw2_get_cu): Likewise.
14784 (create_cu_from_index_list): Change objfile parameter to
14785 dwarf2_per_objfile.
14786 (create_cus_from_index_list): Get dwarf2_per_objfile from
14787 context, adjust calls.
14788 (create_cus_from_index): Likewise.
14789 (create_signatured_type_table_from_index): Change objfile
14790 parameter to dwarf2_per_objfile.
14791 (create_signatured_type_table_from_debug_names): Change objfile
14792 parameter to dwarf2_per_objfile.
14793 (create_addrmap_from_index): Likewise.
14794 (create_addrmap_from_aranges): Likewise.
14795 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14796 (dw2_setup): Remove.
14797 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14798 context.
14799 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14800 get_dwarf2_per_objfile.
14801 (dw2_forget_cached_source_info): Likewise.
14802 (dw2_map_symtabs_matching_filename): Likewise.
14803 (struct dw2_symtab_iterator) <index>: Remove.
14804 <dwarf2_per_objfile>: New field.
14805 (dw2_symtab_iter_init): Replace index parameter with
14806 dwarf2_per_objfile.
14807 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14808 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14809 (dw2_print_stats): Likewise.
14810 (dw2_dump): Likewise.
14811 (dw2_expand_symtabs_for_function): Likewise.
14812 (dw2_expand_all_symtabs): Likewise.
14813 (dw2_expand_symtabs_with_fullname): Likewise.
14814 (dw2_expand_marked_cus): Replace index and objfile parameters
14815 with dwarf2_per_objfile.
14816 (dw_expand_symtabs_matching_file_matcher): Add
14817 dwarf2_per_objfile parameter and adjust calls.
14818 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14819 adjust calls.
14820 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14821 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14822 adjust calls.
14823 (create_cus_from_debug_names_list): Replace objfile parameter
14824 with dwarf2_per_objfile and adjust calls.
14825 (create_cus_from_debug_names): Likewise.
14826 (dwarf2_read_debug_names): Likewise.
14827 (mapped_debug_names::namei_to_name): Adjust call.
14828 (dw2_debug_names_iterator::next): Likewise.
14829 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14830 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14831 (dw2_debug_names_dump): Likewise.
14832 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14833 (dw2_debug_names_expand_symtabs_matching): Likewise.
14834 (dwarf2_initialize_objfile): Likewise.
14835 (dwarf2_build_psymtabs): Likewise.
14836 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14837 this_cu.
14838 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14839 (read_and_check_comp_unit_head): Likewise.
14840 (read_abbrev_offset): Likewise.
14841 (create_debug_type_hash_table): Likewise.
14842 (create_debug_types_hash_table): Likewise.
14843 (create_all_type_units): Replace objfile parameter with
14844 dwarf2_per_objfile.
14845 (add_type_unit): Add dwarf2_per_objfile parameter.
14846 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14847 with dwarf2_per_objfile.
14848 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14849 (lookup_dwp_signatured_type): Likewise.
14850 (lookup_signatured_type): Likewise.
14851 (read_cutu_die_from_dwo): Likewise.
14852 (init_tu_and_read_dwo_dies): Likewise.
14853 (init_cutu_and_read_dies): Likewise.
14854 (init_cutu_and_read_dies_no_follow): Likewise.
14855 (allocate_type_unit_groups_table): Add objfile parameter.
14856 (create_type_unit_group): Use dwarf2_per_objfile from cu.
14857 (get_type_unit_group): Likewise.
14858 (process_psymtab_comp_unit): Update call.
14859 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14860 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14861 (print_tu_stats): Likewise.
14862 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14863 in void* parameter.
14864 (build_type_psymtabs): Change objfile parameter to
14865 dwarf2_per_objfile.
14866 (process_skeletonless_type_unit): Use dwarf2_per_objfile
14867 passed in void* parameter.
14868 (process_skeletonless_type_units): Change objfile parameter to
14869 dwarf2_per_objfile.
14870 (set_partial_user): Likewise.
14871 (dwarf2_build_psymtabs_hard): Likewise.
14872 (read_comp_units_from_section): Likewise.
14873 (create_all_comp_units): Likewise.
14874 (scan_partial_symbols): Update calls.
14875 (add_partial_symbol): Likewise.
14876 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14877 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14878 (process_queue): Add dwarf2_per_objfile parameter.
14879 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14880 (compute_compunit_symtab_includes): Likewise.
14881 (process_cu_includes): Add dwarf2_per_objfile parameter.
14882 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14883 (process_full_type_unit): Likewise.
14884 (process_imported_unit_die): Update call.
14885 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14886 (read_file_scope): Likewise.
14887 (allocate_dwo_file_hash_table): Add objfile parameter.
14888 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14889 (create_cus_hash_table): Likewise.
14890 (create_dwp_hash_table): Likewise.
14891 (create_dwo_unit_in_dwp_v1): Likewise.
14892 (create_dwp_v2_section): Likewise.
14893 (create_dwo_unit_in_dwp_v2): Likewise.
14894 (lookup_dwo_unit_in_dwp): Likewise.
14895 (try_open_dwop_file): Likewise.
14896 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14897 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14898 cleanup to include a reference to dwarf2_per_objfile.
14899 (open_dwp_file): Add dwarf2_per_objfile parameter.
14900 (open_and_init_dwp_file): Likewise.
14901 (get_dwp_file): Likewise.
14902 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14903 (queue_and_load_all_dwo_tus): Update call.
14904 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14905 data.
14906 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14907 (dwarf2_ranges_process): Likewise.
14908 (dwarf2_get_pc_bounds): Likewise.
14909 (mark_common_block_symbol_computed): Likewise.
14910 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14911 (dwarf2_read_abbrevs): Update call.
14912 (read_partial_die): Use dwarf2_per_objfile from cu.
14913 (find_partial_die): Likewise.
14914 (fixup_partial_die): Likewise.
14915 (read_attribute_value): Likewise.
14916 (read_indirect_string_at_offset_from): Add objfile parameter.
14917 (read_indirect_string_at_offset): Add dwarf2_per_objfile
14918 parameter.
14919 (read_indirect_string_from_dwz): Add objfile parameter.
14920 (read_indirect_string): Add objfile parameter.
14921 (read_addr_index_1): Add dwarf2_per_objfile parameter.
14922 (read_addr_index): Use dwarf2_per_objfile from cu.
14923 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14924 call dw2_setup.
14925 (read_str_index): Use dwarf2_per_objfile from cu.
14926 (get_debug_line_section): Likewise.
14927 (read_formatted_entries): Add dwarf2_per_objfile parameter.
14928 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14929 (new_symbol_full): Use dwarf2_per_objfile from cu.
14930 (build_error_marker_type): Likewise.
14931 (lookup_die_type): Likewise.
14932 (determine_prefix): Likewise.
14933 (follow_die_offset): Likewise.
14934 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14935 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14936 (dwarf2_fetch_die_type_sect_off): Likewise.
14937 (dwarf2_get_die_type): Likewise.
14938 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14939 (get_signatured_type): Likewise.
14940 (get_DW_AT_signature_type): Likewise.
14941 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14942 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14943 (cu_debug_loc_section): Likewise.
14944 (fill_in_loclist_baton): Likewise.
14945 (dwarf2_symbol_mark_computed): Likewise.
14946 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14947 dwarf2_per_objfile.
14948 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14949 parameter.
14950 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14951 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14952 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14953 (set_die_type): Use dwarf2_free_objfile from cu.
14954 (get_die_type_at_offset): Likewise.
14955 (dwarf2_per_objfile_free): Don't assign global variable.
14956 (debug_names) <constructor>: Add dwarf2_per_objfile
14957 parameter, update m_debugstrlookup construction.
14958 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14959 parameter.
14960 <m_dwarf2_per_objfile>: New field.
14961 <lookup>: Use m_dwarf2_per_objfile.
14962 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14963 (psyms_seen_size): Likewise.
14964 (write_gdbindex): Replace objfile parameter with
14965 dwarf2_per_objfile.
14966 (write_debug_names): Likewise.
14967 (write_psymtabs_to_index): Likewise.
14968 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14969 calls.
14970
14971 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14972
14973 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14974 <dwarf2_per_objfile>: New field.
14975 (struct dwarf2_per_cu_data) <objfile>: Remove.
14976 <dwarf2_per_objfile>: New field.
14977 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14978 of objfile.
14979 (create_signatured_type_table_from_index): Likewise.
14980 (create_debug_type_hash_table): Likewise.
14981 (fill_in_sig_entry_from_dwo_entry): Likewise.
14982 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14983 (create_type_unit_group): Assign dwarf2_per_objfile instead of
14984 objfile.
14985 (create_partial_symtab): Access objfile through
14986 dwarf2_per_objfile.
14987 (process_psymtab_comp_unit_reader): Likewise.
14988 (read_comp_units_from_section): Likewise.
14989 (scan_partial_symbols): Likewise.
14990 (add_partial_symbol): Likewise.
14991 (add_partial_subprogram): Likewise.
14992 (peek_die_abbrev): Likewise.
14993 (fixup_go_packaging): Likewise.
14994 (process_full_comp_unit): Likewise.
14995 (process_full_type_unit): Likewise.
14996 (process_imported_unit_die): Likewise.
14997 (dwarf2_compute_name): Likewise.
14998 (dwarf2_physname): Likewise.
14999 (read_import_statement): Likewise.
15000 (create_cus_hash_table): Assign dwarf2_physname instead of
15001 objfile.
15002 (read_func_scope): Access objfile through dwarf2_per_objfile.
15003 (read_lexical_block_scope): Likewise.
15004 (read_call_site_scope): Likewise.
15005 (read_variable): Likewise.
15006 (dwarf2_rnglists_process): Likewise.
15007 (dwarf2_ranges_process): Likewise.
15008 (dwarf2_ranges_read): Likewise.
15009 (dwarf2_record_block_ranges): Likewise.
15010 (dwarf2_add_field): Likewise.
15011 (dwarf2_add_member_fn): Likewise.
15012 (read_structure_type): Likewise.
15013 (process_structure_scope): Likewise.
15014 (read_enumeration_type): Likewise.
15015 (read_array_type): Likewise.
15016 (read_common_block): Likewise.
15017 (read_namespace_type): Likewise.
15018 (read_namespace): Likewise.
15019 (read_module_type): Likewise.
15020 (read_tag_pointer_type): Likewise.
15021 (read_tag_ptr_to_member_type): Likewise.
15022 (read_tag_string_type): Likewise.
15023 (read_subroutine_type): Likewise.
15024 (read_typedef): Likewise.
15025 (read_base_type): Likewise.
15026 (attr_to_dynamic_prop): Likewise.
15027 (read_subrange_type): Likewise.
15028 (read_unspecified_type): Likewise.
15029 (load_partial_dies): Likewise.
15030 (read_partial_die): Likewise.
15031 (find_partial_die): Likewise.
15032 (guess_partial_die_structure_name): Likewise.
15033 (fixup_partial_die): Likewise.
15034 (read_attribute_value): Likewise.
15035 (read_addr_index_from_leb128): Likewise.
15036 (dwarf2_read_addr_index): Likewise.
15037 (dwarf2_string_attr): Likewise.
15038 (lnp_state_machine::check_line_address): Likewise.
15039 (dwarf_decode_lines_1): Likewise.
15040 (dwarf_decode_lines): Likewise.
15041 (dwarf2_start_symtab): Likewise.
15042 (var_decode_location): Likewise.
15043 (new_symbol_full): Likewise.
15044 (dwarf2_const_value_data): Likewise.
15045 (dwarf2_const_value_attr): Likewise.
15046 (dwarf2_const_value): Likewise.
15047 (die_type): Likewise.
15048 (die_containing_type): Likewise.
15049 (lookup_die_type): Likewise.
15050 (guess_full_die_structure_name): Likewise.
15051 (anonymous_struct_prefix): Likewise.
15052 (dwarf2_name): Likewise.
15053 (follow_die_ref_or_sig): Likewise.
15054 (follow_die_offset): Likewise.
15055 (follow_die_ref): Likewise.
15056 (dwarf2_fetch_die_loc_sect_off): Likewise.
15057 (dwarf2_fetch_constant_bytes): Likewise.
15058 (dwarf2_fetch_die_type_sect_off): Likewise.
15059 (dwarf2_get_die_type): Likewise.
15060 (follow_die_sig): Likewise.
15061 (decode_locdesc): Likewise.
15062 (dwarf2_per_cu_objfile): Likewise.
15063 (dwarf2_per_cu_text_offset): Likewise.
15064 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15065 objfile.
15066 (set_die_type): Access objfile through
15067 dwarf2_per_objfile.
15068
15069 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15070
15071 * valprint.c (converted_character_d): Remove typedef.
15072 (DEF_VEC_O (converted_character_d)): Remove.
15073 (count_next_character): Use std::vector.
15074 (print_converted_chars_to_obstack): Likewise.
15075 (generic_printstr): Likewise.
15076
15077 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15078
15079 * xml-support.h (struct gdb_xml_value): Add constructor.
15080 <value>: Change type to unique_xmalloc_ptr.
15081 (gdb_xml_value_s): Remove typedef.
15082 (DEF_VEC_O (gdb_xml_value_s)): Remove.
15083 (gdb_xml_element_start_handler): Change parameter type to
15084 std::vector.
15085 (xml_find_attribute): Likewise.
15086 * xml-support.c (xml_find_attribute): Change parameter type to
15087 std::vector and adjust.
15088 (gdb_xml_values_cleanup): Remove.
15089 (gdb_xml_parser::start_element): Adjust to std::vector.
15090 (xinclude_start_include): Change paraeter type to std::vector
15091 and adjust.
15092 * btrace.c (check_xml_btrace_version): Likewise.
15093 (parse_xml_btrace_block): Likewise.
15094 (parse_xml_btrace_pt_config_cpu): Likewise.
15095 (parse_xml_btrace_pt): Likewise.
15096 (parse_xml_btrace_conf_bts): Likewise.
15097 (parse_xml_btrace_conf_pt): Likewise.
15098 * memory-map.c (memory_map_start_memory): Likewise.
15099 (memory_map_start_property): Likewise.
15100 * osdata.c (osdata_start_osdata): Likewise.
15101 (osdata_start_item): Likewise.
15102 (osdata_start_column): Likewise.
15103 * remote.c (start_thread): Likewise.
15104 * solib-aix.c (library_list_start_library): Likewise.
15105 (library_list_start_list): Likewise.
15106 * solib-svr4.c (library_list_start_library): Likewise.
15107 (svr4_library_list_start_list): Likewise.
15108 * solib-target.c (library_list_start_segment): Likewise.
15109 (library_list_start_section): Likewise.
15110 (library_list_start_library): Likewise.
15111 (library_list_start_list): Likewise.
15112 * tracepoint.c (traceframe_info_start_memory): Likewise.
15113 (traceframe_info_start_tvar): Likewise.
15114 * xml-syscall.c (syscall_start_syscall): Likewise.
15115 * xml-tdesc.c (tdesc_start_target): Likewise.
15116 (tdesc_start_feature): Likewise.
15117 (tdesc_start_reg): Likewise.
15118 (tdesc_start_union): Likewise.
15119 (tdesc_start_struct): Likewise.
15120 (tdesc_start_flags): Likewise.
15121 (tdesc_start_enum): Likewise.
15122 (tdesc_start_field): Likewise.
15123 (tdesc_start_enum_value): Likewise.
15124 (tdesc_start_vector): Likewise.
15125
15126 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15127
15128 * extension.h (struct xmethod_worker) <clone>: Remove.
15129 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15130 Remove.
15131 (python_xmethod_worker::clone): Remove.
15132 * valops.c (find_overload_match): Use std::move instead of
15133 clone.
15134
15135 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15136
15137 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15138 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15139 <free_xmethod_worker_data>: Remove.
15140 <get_matching_xmethod_workers>: Chance VEC to std::vector.
15141 <get_xmethod_arg_types>: Remove.
15142 <get_xmethod_result_type>: Remove.
15143 <invoke_xmethod>: Remove.
15144 * extension.c (new_xmethod_worker): Remove.
15145 (clone_xmethod_worker): Remove.
15146 (get_matching_xmethod_workers): Return void, pass std::vector by
15147 pointer.
15148 (get_xmethod_arg_types): Rename to...
15149 (xmethod_worker::get_arg_types): ... this, and adjust.
15150 (get_xmethod_result_type): Rename to...
15151 (xmethod_worker::get_result_type): ... this, and adjust.
15152 (invoke_xmethod): Remove.
15153 (free_xmethod_worker): Remove.
15154 (free_xmethod_worker_vec): Remove.
15155 * extension.h (enum ext_lang_rc): Move here from
15156 extension-priv.h.
15157 (struct xmethod_worker): Add constructor and destructor.
15158 <data>: Remove.
15159 <value>: Remove.
15160 <invoke, clone, do_get_result_type, do_get_arg_types>: New
15161 virtual pure methods.
15162 <get_arg_types, get_result_type>: New methods.
15163 (xmethod_worker_ptr): Remove typedef.
15164 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15165 (xmethod_worker_vec): Remove typedef.
15166 (xmethod_worker_up): New typedef.
15167 (invoke_xmethod): Remove.
15168 (clone_xmethod_worker): Remove.
15169 (free_xmethod_worker): Remove.
15170 (free_xmethod_worker_vec): Remove.
15171 (get_xmethod_arg_types): Remove.
15172 (get_xmethod_result_type): Remove.
15173 * valops.c (find_method_list): Use std::vector, don't use
15174 intermediate vector.
15175 (value_find_oload_method_list): Use std::vector.
15176 (find_overload_match): Use std::vector.
15177 (find_oload_champ): Use std::vector.
15178 * value.c (value_free): Use operator delete.
15179 (value_of_xmethod): Rename to...
15180 (value_from_xmethod): ... this. Don't assign
15181 xmethod_worker::value, take rvalue-reference.
15182 (result_type_of_xmethod): Adjust.
15183 (call_xmethod): Adjust.
15184 * value.h: Include extension.h.
15185 (struct xmethod_worker): Don't forward-declare.
15186 (value_of_xmethod): Rename to...
15187 (value_from_xmethod): ... this, take rvalue-reference.
15188 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15189 (struct python_xmethod_worker): ... this, add constructor and
15190 destructor.
15191 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15192 (gdbpy_free_xmethod_worker_data): Rename to...
15193 (python_xmethod_worker::~python_xmethod_worker): ... this and
15194 adjust.
15195 (gdbpy_clone_xmethod_worker_data): Rename to...
15196 (python_xmethod_worker::clone): ... this and adjust.
15197 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15198 temporary vector.
15199 (gdbpy_get_xmethod_arg_types): Rename to...
15200 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15201 (gdbpy_get_xmethod_result_type): Rename to...
15202 (python_xmethod_worker::do_get_result_type): ... this and
15203 adjust.
15204 (gdbpy_invoke_xmethod): Rename to...
15205 (python_xmethod_worker::invoke): ... this and adjust.
15206 (new_python_xmethod_worker): Rename to...
15207 (python_xmethod_worker::python_xmethod_worker): ... this and
15208 adjust.
15209 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15210 Remove.
15211 (gdbpy_free_xmethod_worker_data): Remove.
15212 (gdbpy_get_matching_xmethod_workers): Use std::vector.
15213 (gdbpy_get_xmethod_arg_types): Remove.
15214 (gdbpy_get_xmethod_result_type): Remove.
15215 (gdbpy_invoke_xmethod): Remove.
15216 * python/python.c (python_extension_ops): Remove obsolete
15217 callbacks.
15218
15219 2018-01-05 Pedro Alves <palves@redhat.com>
15220
15221 PR gdb/18653
15222 * common/signals-state-save-restore.c
15223 (save_original_signals_state): New parameter 'quiet'. Warn if we
15224 find a custom handler preinstalled, instead of internal erroring.
15225 But only warn if !quiet.
15226 * common/signals-state-save-restore.h
15227 (save_original_signals_state): New parameter 'quiet'.
15228 * main.c (captured_main_1): Move save_original_signals_state call
15229 after option handling, and pass QUIET.
15230
15231 2018-01-05 Pedro Alves <palves@redhat.com>
15232
15233 * spu-tdep.c (spu_catch_start): Pass
15234 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15235
15236 2018-01-05 Pedro Alves <palves@redhat.com>
15237
15238 PR gdb/22670
15239 * ada-lang.c (literal_symbol_name_matcher): New function.
15240 (ada_get_symbol_name_matcher): Use it for
15241 symbol_name_match_type::SEARCH_NAME.
15242 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
15243 it down instead of assuming symbol_name_match_type::FULL.
15244 * block.h (block_lookup_symbol): New parameter 'match_type'.
15245 * c-valprint.c (print_unpacked_pointer): Use
15246 lookup_symbol_search_name instead of lookup_symbol.
15247 * compile/compile-object-load.c (get_out_value_type): Pass down
15248 symbol_name_match_type::SEARCH_NAME.
15249 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15250 symbol_name_match_type::FULL.
15251 * cp-support.c (cp_get_symbol_name_matcher): Handle
15252 symbol_name_match_type::SEARCH_NAME.
15253 * infrun.c (insert_exception_resume_breakpoint): Use
15254 lookup_symbol_search_name.
15255 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15256 * psymtab.c (maintenance_check_psymtabs): Use
15257 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15258 * stack.c (print_frame_args): Use lookup_symbol_search_name and
15259 SYMBOL_SEARCH_NAME.
15260 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15261 if symbol_name_match_type::SEARCH_NAME.
15262 (lookup_symbol_in_language): Pass down
15263 symbol_name_match_type::FULL.
15264 (lookup_symbol_search_name): New.
15265 (lookup_language_this): Pass down
15266 symbol_name_match_type::SEARCH_NAME.
15267 (lookup_symbol_aux, lookup_local_symbol): New parameter
15268 'match_type'. Pass it down.
15269 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15270 (lookup_symbol_search_name): New declaration.
15271 (lookup_symbol_in_block): New 'match_type' parameter.
15272
15273 2018-01-05 Pedro Alves <palves@redhat.com>
15274
15275 PR gdb/22670
15276 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15277 ada_lookup_symbol.
15278 (ada_lookup_symbol): Reimplement in terms of
15279 ada_lookup_symbol_list, bits factored out from
15280 ada_lookup_encoded_symbol.
15281
15282 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15283
15284 * ada-exp.y (write_object_renaming): When subscripting an array
15285 using a symbol as the index, pass the block in call to
15286 ada_lookup_encoded_symbol when looking that symbol up.
15287
15288 2018-01-05 Jerome Guitton <guitton@adacore.com>
15289
15290 * ada-lang.c (ada_array_length): Use ada_index_type instead of
15291 TYPE_INDEX_TYPE.
15292
15293 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15294
15295 * ada-lang.c (ada_to_fixed_value_create): Add handling of
15296 the case where VALUE_LVAL (val0) is not lval_memory.
15297
15298 2018-01-05 Xavier Roirand <roirand@adacore.com>
15299
15300 * ada-valprint.c (print_optional_low_bound): Handle
15301 character-indexed array printing like boolean-indexed array
15302 printing.
15303
15304 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15305
15306 * NEWS: Create a new section for the next release branch.
15307 Rename the section of the current branch, now that it has
15308 been cut.
15309
15310 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15311
15312 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15313 * version.in: Bump version to 8.1.50.DATE-git.
15314
15315 2018-01-03 Xavier Roirand <roirand@adacore.com>
15316
15317 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15318 Add field.
15319 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15320 Add field.
15321 (default_exception_support_info) <catch_handlers_sym>: Add field.
15322 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15323 (ada_exception_name_addr_1): Add "catch handlers" handling.
15324 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15325 Update all callers.
15326 (create_excep_cond_exprs) <ex>: Add parameter.
15327 (re_set_exception): Update create_excep_cond_exprs call.
15328 (print_it_exception, print_one_exception, print_mention_exception)
15329 (print_recreate_exception): Add "catch handler" handling.
15330 (allocate_location_catch_handlers, re_set_catch_handlers)
15331 (check_status_catch_handlers, print_it_catch_handlers)
15332 (print_one_catch_handlers, print_mention_catch_handlers)
15333 (print_recreate_catch_handlers): New function.
15334 (catch_handlers_breakpoint_ops): New variable.
15335 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15336 Add parameter. Add "catch handler" handling.
15337 (ada_exception_sym_name, ada_exception_breakpoint_ops):
15338 Add "catch handler" handling.
15339 (ada_exception_catchpoint_cond_string): Add "catch handler"
15340 handling.
15341 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15342 call.
15343 (catch_ada_handlers_command): New function.
15344 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15345 operations structure.
15346 (_initialize_ada_language): Add "catch handlers" command entry.
15347 * NEWS: Document "catch handlers" feature.
15348
15349 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15350
15351 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15352 account when creating the array type of the slice.
15353 (ada_value_slice): Likewise.
15354
15355 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15356
15357 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15358 New enum value.
15359 (create_array_type_with_stride): Add byte_stride_prop parameter.
15360 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15361 New parameter. Update all callers in this file.
15362 (array_type_has_dynamic_stride): New function.
15363 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15364 of arrays with dynamic byte strides.
15365 * dwarf2read.c (read_array_type): Add support for dynamic
15366 DW_AT_byte_stride attributes.
15367
15368 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15369
15370 * dwarf2read.c (read_unspecified_type): Treat
15371 DW_TAG_enumeration_type DIEs from Ada units as stubs.
15372
15373 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15374
15375 Update copyright year range in all GDB files.
15376
15377 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
15378
15379 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15380 and gdb/testsuite/gdb.base/step-line.c.
15381
15382 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15383
15384 * copyright.py (main): Dump the contents of
15385 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15386 even if BY_HAND is empty.
15387
15388 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15389
15390 * top.c (print_gdb_version): Update Copyright year in version
15391 message.
15392
15393 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15394
15395 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15396
15397 For older changes see ChangeLog-2017.
15398 \f
15399 Local Variables:
15400 mode: change-log
15401 left-margin: 8
15402 fill-column: 74
15403 version-control: never
15404 coding: utf-8
15405 End: