RISC-V: Don't allow unaligned breakpoints.
[binutils-gdb.git] / gdb / ChangeLog
1 2018-11-01 Jim Wilson <jimw@sifive.com>
2
3 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
4 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
5 debugging messages.
6
7 2018-11-01 Joel Brobecker <brobecker@adacore.com>
8
9 * ada-lang.c (ada_watch_location_expression): New function.
10 (ada_language_defn): Set la_watch_location_expression to
11 ada_watch_location_expression.
12
13 2018-11-01 Joel Brobecker <brobecker@adacore.com>
14
15 * print-utils.c (int_string): Remove unnecessary trailing spaces.
16
17 2018-11-01 Joel Brobecker <brobecker@adacore.com>
18
19 * rs6000-tdep.c (skip_prologue): Fix potential negative left
20 shifting.
21
22 2018-11-01 Jerome Guitton <guitton@adacore.com>
23 Joel Brobecker <brobecker@adacore.com>
24
25 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
26 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
27 * arm-pikeos-tdep.c: New file.
28 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
29 embedded system.
30 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
31
32 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
33
34 * common/pathstuff.c (get_standard_temp_dir): New.
35 * common/pathstuff.h (get_standard_temp_dir): New.
36 * config.in: Re-generate.
37 * configure: Re-generate.
38 * configure.ac: Don't check for mkdtemp.
39 * gnulib/aclocal-m4-deps.mk: Re-generate.
40 * gnulib/aclocal.m4: Re-generate.
41 * gnulib/config.in: Re-generate.
42 * gnulib/configure: Re-generate.
43 * gnulib/import/Makefile.am: Re-generate.
44 * gnulib/import/Makefile.in: Re-generate.
45 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
46 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
47 * gnulib/import/m4/mkdtemp.m4: New file.
48 * gnulib/import/mkdtemp.c: New file.
49 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
50 Add mkdtemp module.
51 * unittests/mkdir-recursive-selftests.c (test): Use
52 get_standard_temp_dir.
53 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
54 ifdef.
55 * compile/compile.c (get_compile_file_tempdir): Likewise.
56
57 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
58
59 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
60 (SIG_FRAME_LR_OFFSET64): New define.
61 (SIG_FRAME_FP_OFFSET64): New define.
62 (aix_sighandle_frame_cache): New Function.
63 (aix_sighandle_frame_this_id): New Function.
64 (aix_sighandle_frame_prev_register): New Function.
65 (aix_sighandle_frame_sniffer): New Function.
66 (aix_sighandle_frame_unwind): New global variable.
67 (rs6000_aix_init_osabi): Install new frame unwinder.
68
69 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
70
71 PR gdb/23835
72 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
73 already defined.
74
75 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
76
77 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
78
79 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
80
81 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
82 (producer_is_icc): New function.
83 (check_producer): Set producer_is_icc field on dwarf2_cu.
84 (dwarf2_init_integer_type): New function.
85 (read_base_type): Call dwarf2_init_integer_type instead of
86 init_integer_type in all cases.
87 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
88 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
89 LEN is greater than 0.
90
91 2018-10-30 Tom Tromey <tom@tromey.com>
92
93 * main.c (captured_main_1): Check return value of bfd_init.
94
95 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
96
97 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
98 Adjust comments.
99
100 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
101
102 * procfs.c: Include common/pathstuff.h.
103
104 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
105
106 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
107 Add missing braces. No functional change.
108
109 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
110
111 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
112 to report a bad option and fix indentation.
113 * demangle.c (demangle_command): Use report_unrecognized_option_error
114 to report a bad option and correctly report the bad option.
115
116 2018-10-27 Tom Tromey <tom@tromey.com>
117
118 PR cli/23364:
119 * darwin-nat.c (copied_shell): New global.
120 (may_have_sip): Rename from should_disable_startup_with_shell.
121 (copy_shell_to_cache, maybe_cache_shell): New functions.
122 (darwin_nat_target::create_inferior): Update. Use
123 copied_shell.
124
125 2018-10-27 Tom Tromey <tom@tromey.com>
126
127 * unittests/scoped_fd-selftests.c (test_to_file): New function.
128 (run_tests): Call test_to_file.
129 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
130 temporary files.
131 * common/scoped_fd.h (scoped_fd::to_file): New method.
132
133 2018-10-27 Tom Tromey <tom@tromey.com>
134
135 * unittests/scoped_mmap-selftests.c (test_normal): Use
136 gdb_mkostemp_cloexec.
137 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
138 Use gdb_mkostemp_cloexec.
139 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
140 gnulib/config.in, gnulib/configure,
141 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
142 gnulib/import/m4/gnulib-cache.m4,
143 gnulib/import/m4/gnulib-comp.m4: Update.
144 * gnulib/import/m4/mkostemp.m4: New file.
145 * gnulib/import/m4/mkstemp.m4: Remove.
146 * gnulib/import/mkostemp.c: New file.
147 * gnulib/import/mkstemp.m4: Remove.
148 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
149 mkstemp, add mkostemp. Apply new patch.
150 * gnulib/import/stdlib.in.h: Apply patch.
151 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
152 New file.
153 * dwarf-index-write.c (write_psymtabs_to_index): Use
154 gdb_mkostemp_cloexec.
155 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
156
157 2018-10-27 Tom Tromey <tom@tromey.com>
158
159 * unittests/mkdir-recursive-selftests.c: New file.
160 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
161 unittests/mkdir-recursive-selftests.c.
162 * dwarf-index-cache.c (mkdir_recursive): Move to
163 common/filestuff.c.
164 (index_cache::store): Check return value of mkdir_recursive.
165 (create_dir_and_check, test_mkdir_recursive): Move to new file.
166 (_initialize_index_cache): Don't register test.
167 * common/filestuff.h (mkdir_recursive): Declare.
168 * common/filestuff.c (mkdir_recursive): Move from
169 dwarf-index-cache.c. Return bool.
170
171 2018-10-27 Tom Tromey <tom@tromey.com>
172
173 * dwarf-index-write.c (write_psymtabs_to_index): Move
174 make_temp_filename to common/pathstuff.c.
175 * common/pathstuff.h (make_temp_filename): Declare.
176 * common/pathstuff.c (make_temp_filename): New function, moved
177 from dwarf-index-write.c.
178
179 2018-10-27 Tom Tromey <tom@tromey.com>
180
181 * procfs.c (procfs_target::create_inferior): Use get_shell.
182 * cli/cli-cmds.c (shell_escape): Use get_shell.
183 * windows-nat.c (windows_nat_target::create_inferior): Use
184 get_shell.
185 * common/pathstuff.c (get_shell): New function.
186 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
187 (fork_inferior): Use get_shell.
188 * common/pathstuff.h (get_shell): Declare.
189
190 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
191
192 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
193
194 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
195
196 * stack.c (print_variable_and_value_data): Add preg and treg.
197 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
198 and update callers.
199 (print_frame_arg_vars): Likewise.
200 (prepare_reg): New function.
201 (info_locals_command): Extract info print args and use them.
202 (info_args_command): Likewise.
203 (_initialize_stack): Modify on-line help.
204 * symtab.c (treg_matches_sym_type_name): New function.
205 (search_symbols): New arg t_regexp.
206 (symtab_symbol_info): New args quiet, regexp, t_regexp.
207 (info_variables_command): Extract info print args and use them.
208 (info_functions_command): Likewise.
209 (info_types_command): Update call to symtab_symbol_info.
210 (_initialize_symtab): Modify on-line help.
211 * symtab.h (treg_matches_sym_type_name): New function.
212 (search_symbols): New t_regexp arg.
213
214 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
215
216 * cli-utils.c (extract_arg_maybe_quoted): New function.
217 (extract_info_print_args): New function.
218 (info_print_args_help): New function.
219 (report_unrecognized_option_error): New function.
220 * cli-utils.h (extract_arg_maybe_quoted): New function.
221 (extract_info_print_args): New function.
222 (info_print_args_help): New function.
223 (report_unrecognized_option_error): New function.
224
225 2018-10-26 Tom Tromey <tom@tromey.com>
226
227 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
228 (compute_compunit_symtab_includes): Update.
229 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
230 (compunit_symtab_ptr): Likewise.
231
232 2018-10-26 John Baldwin <jhb@FreeBSD.org>
233
234 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
235 default_print_auxv_entry for specific tag values.
236
237 2018-10-26 John Baldwin <jhb@FreeBSD.org>
238
239 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
240
241 2018-10-26 Jim Wilson <jimw@sifive.com>
242
243 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
244 (riscv_linux_sigframe_init): Declare.
245 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
246 (riscv_linux_sigframe): New.
247 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
248 (riscv_linux_sigframe_init): Define.
249 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
250
251 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
252 (riscv_isa_flen): Likewise. Drop static.
253 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
254 (riscv_isa_flen): Likewise. Declare.
255
256 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
257 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
258
259 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
260 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
261 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
262 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
263 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
264 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
265 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
266 Define.
267 (struct ppc_linux_features) <htm>: New field.
268 (ppc_linux_no_features): Add initializer for htm field.
269 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
270 new tdescs.
271 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
272 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
273 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
274 Define if not already defined.
275 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
276 and rs6000/powerpc-isa207-htm-vsx64l.
277 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
278 rs6000/powerpc-isa207-htm-vsx64l.xml.
279 * features/rs6000/power-htm-spr.xml: New file.
280 * features/rs6000/power-htm-core.xml: New file.
281 * features/rs6000/power64-htm-core.xml: New file.
282 * features/rs6000/power-htm-fpu.xml: New file.
283 * features/rs6000/power-htm-altivec.xml: New file.
284 * features/rs6000/power-htm-vsx.xml: New file.
285 * features/rs6000/power-htm-ppr.xml: New file.
286 * features/rs6000/power-htm-dscr.xml: New file.
287 * features/rs6000/power-htm-tar.xml: New file.
288 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
289 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
290 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
291 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
292 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
293 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
294 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
295 fetch_regset with HTM regsets.
296 (store_register, store_ppc_registers): Call store_regset with HTM
297 regsets.
298 (ppc_linux_nat_target::read_description): Set htm field in the
299 features struct if needed.
300 * ppc-linux-tdep.c: Include
301 features/rs6000/powerpc-isa207-htm-vsx32l.c and
302 features/rs6000/powerpc-isa207-htm-vsx64l.c.
303 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
304 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
305 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
306 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
307 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
308 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
309 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
310 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
311 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
312 (ppc32_linux_ctarregset): New globals.
313 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
314 (ppc_linux_collect_core_cpgrregset): New function.
315 (ppc_linux_iterate_over_regset_sections): Call back with the htm
316 regsets.
317 (ppc_linux_core_read_description): Check if the tm spr section is
318 present and set htm in the features struct.
319 (_initialize_ppc_linux_tdep): Call
320 initialize_tdesc_powerpc_isa207_htm_vsx32l and
321 initialize_tdesc_powerpc_isa207_htm_vsx64l.
322 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
323 Declare.
324 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
325 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
326 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
327 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
328 New fields.
329 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
330 Likewise.
331 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
332 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
333 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
334 New enum fields.
335 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
336 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
337 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
338 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
339 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
340 <PPC_CTAR_REGNUM>: Likewise.
341 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
342 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
343 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
344 (IS_CEFP_PSEUDOREG): Define.
345 (rs6000_register_name): Hide the upper halves of checkpointed VSX
346 registers. Return names for the checkpointed DFP, VSX, and EFP
347 pseudo registers.
348 (rs6000_pseudo_register_type): Remove initial assert and raise an
349 internal error in the else clause instead. Return types for the
350 checkpointed DFP, VSX, and EFP pseudo registers.
351 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
352 checkpointed DFP pseudo registers.
353 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
354 checkpointed VSX pseudo registers.
355 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
356 from efpr_pseudo_register_read and
357 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
358 registers.
359 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
360 Handle checkpointed DFP, VSX, and EFP registers.
361 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
362 (efp_ax_pseudo_register_collect): New functions.
363 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
364 register logic to new functions. Handle checkpointed DFP, VSX,
365 and EFP pseudo registers.
366 (rs6000_gdbarch_init): Look for and validate the htm features.
367 Include checkpointed DFP, VSX and EFP pseudo-registers.
368 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
369 HTM registers.
370
371 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
372
373 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
374 without altivec or fpu.
375
376 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
377 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
378
379 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
380 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
381 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
382 Define if not already defined.
383 * features/rs6000/power-ebb.xml: New file.
384 * features/rs6000/power-linux-pmu.xml: New file.
385 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
386 features.
387 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
388 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
389 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
390 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
391 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
392 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
393 fetch_regset with ebb and pmu regsets.
394 (store_register, store_ppc_registers): Call store_regset with ebb
395 and pmu regsets.
396 (ppc_linux_nat_target::read_description): Set isa207 field in the
397 features struct if ebb and pmu are avaiable.
398 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
399 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
400 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
401 and pmu regsets.
402 (ppc_linux_core_read_description): Check if the pmu section is
403 present and set isa207 in the features struct.
404 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
405 (ppc32_linux_pmuregset): Declare.
406 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
407 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
408 <ppc_sier_regnum>: New field.
409 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
410 New enum values.
411 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
412 values.
413 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
414 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
415 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
416 ebb and pmu features.
417
418 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
419 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
420
421 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
422 (tdesc_powerpc_isa207_vsx64l): Declare.
423 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
424 (struct ppc_linux_features) <isa207>: New field.
425 (ppc_linux_no_features): Add initializer for isa207 field.
426 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
427 new tdescs.
428 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
429 (NT_PPC_TAR): Define if not already defined.
430 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
431 rs6000/powerpc-isa207-vsx64l.
432 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
433 rs6000/powerpc-isa207-vsx64l.xml.
434 * features/rs6000/power-tar.xml: New file.
435 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
436 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
437 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
438 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
439 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
440 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
441 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
442 fetch_regset with the TAR regset.
443 (store_register, store_ppc_registers): Call store_regset with the
444 TAR regset.
445 (ppc_linux_nat_target::read_description): Set isa207 field in the
446 features struct if needed.
447 * ppc-linux-tdep.c: Include
448 features/rs6000/powerpc-isa207-vsx32l.c and
449 features/rs6000/powerpc-isa207-vsx64l.c.
450 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
451 (ppc_linux_iterate_over_regset_sections): Call back with the tar
452 regset.
453 (ppc_linux_core_read_description): Check if the tar section is
454 present and set isa207 in the features struct.
455 (_initialize_ppc_linux_tdep): Call
456 initialize_tdesc_powerpc_isa207_vsx32l and
457 initialize_tdesc_powerpc_isa207_vsx64l.
458 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
459 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
460 (enum) <PPC_TAR_REGNUM>: New enum value.
461 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
462 feature.
463 (ppc_process_record_op31): Record changes to TAR.
464
465 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
466 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
467
468 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
469 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
470 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
471 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
472 (struct ppc_linux_features) <ppr_dscr>: New field.
473 (ppc_linux_no_features): Add initializer for ppr_dscr field.
474 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
475 new tdescs.
476 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
477 Define if not already defined.
478 * features/Makefile (WHICH): Add
479 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
480 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
481 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
482 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
483 * features/rs6000/power-dscr.xml: New file.
484 * features/rs6000/power-ppr.xml: New file.
485 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
486 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
487 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
488 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
489 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
490 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
491 * ppc-linux-nat.c: Include <sys/uio.h>.
492 (fetch_regset, store_regset, check_regset): New functions.
493 (fetch_register, fetch_ppc_registers): Call fetch_regset with
494 DSCR and PPR regsets.
495 (store_register, store_ppc_registers): Call store_regset with
496 DSCR and PPR regsets.
497 (ppc_linux_get_hwcap2): New function.
498 (ppc_linux_nat_target::read_description): Call
499 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
500 features struct if needed.
501 * ppc-linux-tdep.c: Include
502 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
503 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
504 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
505 (ppc32_linux_dscrregset): New globals.
506 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
507 and dscr regsets.
508 (ppc_linux_core_read_description): Check if the ppr and dscr
509 sections are present and set ppr_dscr in the features struct.
510 (_initialize_ppc_linux_tdep): Call
511 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
512 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
513 * ppc-linux-tdep.h (ppc32_linux_pprregset)
514 (ppc32_linux_dscrregset): Declare.
515 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
516 <ppc_dscr_regnum>: New field.
517 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
518 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
519 and dscr features.
520 (ppc_process_record_op31): Record changes to PPR and DSCR.
521
522 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
523
524 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
525 second initializer line for the have_* variables. Initialize
526 have_fpu to 0 instead of 1.
527
528 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
529
530 * arch/ppc-linux-common.c (ppc_linux_match_description):
531 Parenthesize tdesc assignements and indent them properly.
532
533 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
534
535 * ppc-linux-nat.c (fetch_register): Change if statement to else
536 if.
537 (store_register): Likewise.
538
539 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
540
541 * rs6000-tdep.c: Remove reggroups.h include.
542 (rs6000_pseudo_register_reggroup_p): Remove.
543 (rs6000_gdbarch_init): Remove call to
544 set_tdesc_pseudo_register_reggroup_p.
545
546 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
547
548 * reggroups.c (default_register_reggroup_p): Return true for
549 decfloat registers and float_reggroup.
550
551 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
552
553 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
554 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
555 ppc_linux_collect_vrregset by regcache_collect_regset.
556
557 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
558
559 * linux-tdep.c (linux_collect_regset_section_cb): Use
560 std::vector<gdb_byte> instead of char * and malloc for buf.
561 Remove xfree.
562
563 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
564
565 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
566 symtab_start instead of always using language_unknown.
567
568 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
569
570 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
571 READ_P parameter, catch and ignore register access errors from
572 either the old or new MISA location.
573 (riscv_has_feature): Update call to riscv_read_misa_reg.
574
575 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
576
577 * python/py-function.c (convert_values_to_python): Return
578 gdbpy_ref<>. Add header comment.
579 (fnpy_call): Adjust.
580
581 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
582
583 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
584 (cmdpy_completer_handle_brkchars): Adjust.
585 (cmdpy_completer): Adjust.
586
587 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
588
589 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
590 Pass correct regnum to raw_supply_zeroed.
591
592 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
593
594 * regcache.c (cooked_read_test): Add CSKY to the list of
595 architectures with a save_reggroup
596
597 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
598
599 PR gdb/23368
600 * infrun.c (follow_exec): In the follow_exec_mode_new case,
601 transfer terminal state from old new new inferior.
602 * terminal.h (swap_terminal_info): New function.
603 * inflow.c (swap_terminal_info): New function.
604
605 2018-10-23 Tom Tromey <tom@tromey.com>
606
607 * record-btrace.c (get_thread_current_frame_id): Rename from
608 get_thread_current_frame. Return a frame_id.
609 (record_btrace_start_replaying): Update.
610
611 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
612
613 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
614 for CSRs.
615
616 2018-10-23 Joel Brobecker <brobecker@adacore.com>
617
618 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
619 have_nonsteppable_watchpoint attribute to 1.
620
621 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
622
623 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
624 register names.
625 (struct register_alias): Rename to...
626 (struct riscv_register_alias): ...this, and update comment.
627 (riscv_register_aliases): Update type, and alias names. Remove
628 CSR names from this list.
629 (riscv_register_name): Use riscv_gdb_reg_names for int and float
630 register names. Add an extra assertion.
631 (riscv_is_regnum_a_named_csr): New function.
632 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
633
634 2018-10-22 Jim Wilson <jimw@sifive.com>
635
636 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
637 FP reg smaller than FP reg size, and fill with -1 instead of 0.
638
639 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
640 (riscv_register_type): Use them.
641 (riscv_print_one_register_info): Handle union of floats same as float.
642 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
643 riscv_fpreg_q_type fields.
644
645 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
646
647 * gdbarch.sh (gdbarch_num_cooked_regs): New.
648 * gdbarch.h: Re-generate.
649 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
650 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
651 * eval.c (evaluate_subexp_standard): Likewise.
652 * findvar.c (value_of_register): Likewise.
653 (value_of_register_lazy): Likewise.
654 (address_from_register): Likewise.
655 * frame.c (get_frame_register_bytes): Likewise.
656 * gdbarch-selftests.c (register_to_value_test): Likewise.
657 * h8300-tdep.c (h8300_register_type): Likewise.
658 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
659 (i386_svr4_reg_to_regnum): Likewise.
660 * infcmd.c (default_print_registers_info): Likewise.
661 (registers_info): Likewise.
662 (print_vector_info): Likewise.
663 (default_print_float_info): Likewise.
664 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
665 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
666 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
667 (mi_cmd_data_list_changed_registers): Likewise.
668 (mi_cmd_data_list_register_values): Likewise.
669 (mi_cmd_data_write_register_values): Likewise.
670 (mi_cmd_trace_frame_collected): Likewise.
671 * mips-tdep.c (print_gp_register_row): Likewise.
672 (mips_print_registers_info): Likewise.
673 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
674 * regcache.c (init_regcache_descr): Likewise.
675 (register_size): Likewise.
676 (register_dump::dump): Likewise.
677 (cooked_read_test): Likewise.
678 (cooked_write_test): Likewise.
679 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
680 (rs6000_gdbarch_init): Likewise.
681 * stabsread.c (stab_reg_to_regnum): Likewise.
682 * stack.c (info_frame_command): Likewise.
683 * target-descriptions.c (tdesc_register_name): Likewise.
684 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
685 * tui/tui-regs.c (tui_show_register_group): Likewise.
686 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
687 (user_reg_map_regnum_to_name): Likewise.
688 (value_of_user_reg): Likewise.
689 (maintenance_print_user_registers): Likewise.
690 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
691 (xtensa_register_name): Likewise.
692 (xtensa_register_type): Likewise.
693 (xtensa_reg_to_regnum): Likewise.
694 (xtensa_pseudo_register_read): Likewise.
695 (xtensa_pseudo_register_write): Likewise.
696
697 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
698
699 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
700 correctly-sized buffer with raw_read.
701 (amd64_pseudo_register_write): Use correctly-sized buffer for
702 raw_read/raw_write.
703
704 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
705
706 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
707 in add_prefix_cmd of set print type.
708
709 2018-10-19 Tom Tromey <tom@tromey.com>
710
711 PR tui/18388:
712 * NEWS: Mention tabset deprecation.
713 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
714 (update_tab_width): New function.
715 (tui_set_tab_width, tui_show_tab_width): New functions.
716 (tui_set_tab_width_command): Use update_tab_width.
717 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
718 Add new "set tui tab-width" command.
719 * tui/tui-source.c (tui_set_source_content): Update.
720 * tui/tui-disasm.c (tui_set_disassem_content): Update.
721 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
722 Don't declare.
723 (tui_tab_width): Declare.
724 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
725 (tui_set_default_tab_len): Remove.
726
727 2018-10-19 Tom Tromey <tom@tromey.com>
728
729 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
730 (key_is_backspace, tui_getc): Don't declare.
731 * tui/tui-io.c (key_is_start_sequence): Now static.
732 (key_is_end_sequence, key_is_backspace): Remove.
733 (tui_getc): Now static.
734
735 2018-10-19 Tom Tromey <tom@tromey.com>
736
737 * symfile.c (reread_symbols): Clear "static_links".
738
739 2018-10-19 Alan Hayward <alan.hayward@arm.com>
740
741 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
742 define.
743 (aarch64_linux_sigframe_init): Extra boundary checks.
744
745 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
746
747 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
748 the possibly non-existent tdesc type 'vec128', but the type of raw
749 register v16 instead.
750
751 2018-10-19 Gary Benson <gbenson@redhat.com>
752
753 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
754
755 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
756
757 PR cli/23785
758 * cli/cli-dump.c (restore_binary_file): Check if "file" is
759 NULL.
760
761 2018-10-17 Paul Koning <paul_koning@dell.com>
762
763 * charset.c (convert_between_encodings): Fix unsigned overflow.
764
765 2018-10-17 John Baldwin <jhb@FreeBSD.org>
766
767 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
768 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
769 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
770 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
771 New functions.
772 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
773 and fbsd_info_proc_mappings_header.
774 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
775 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
776 New.
777
778 2018-10-17 Joel Brobecker <brobecker@adacore.com>
779
780 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
781 Solaris Maintainer.
782
783 2018-10-15 Tom Tromey <tom@tromey.com>
784
785 * tui/tui.c (strcat_to_buf): Remove casts.
786 * tui/tui-winsource.c (tui_show_source_line)
787 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
788 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
789 * tui/tui-windata.c (tui_first_data_item_displayed)
790 (tui_delete_data_content_windows, tui_erase_data_content)
791 (tui_display_all_data, tui_display_data_from)
792 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
793 * tui/tui-win.c (tui_set_win_height)
794 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
795 casts.
796 * tui/tui-win.c (tui_resize_all): Remove casts.
797 (tui_scroll_backward_command, tui_set_focus)
798 (tui_set_tab_width_command): Likewise.
799 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
800 * tui/tui-regs.c (tui_show_register_group): Remove cast.
801 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
802 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
803 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
804 Remove casts.
805
806 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
807
808 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
809 AArch64/ARM maintainer.
810
811 2018-10-11 Gary Benson <gbenson@redhat.com>
812
813 * interps.h (interp::m_name): Make private and mutable.
814 * interps.c (interp::~interp): Free m_name.
815
816 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
817 Simon Marchi <simark@simark.ca>
818
819 * README (`configure' options): Add documentation for new
820 "--enable-unit-tests" option.
821 * acinclude.m4: Include "selftest.m4".
822 * configure: Regenerate.
823 * configure.ac: Use "GDB_AC_SELFTEST".
824 * maint.c (maintenance_selftest): Update message informing
825 that selftests have been disabled.
826 (maintenance_info_selftests): Likewise.
827 * selftest.m4: New file.
828
829 2018-10-10 Gary Benson <gbenson@redhat.com>
830
831 * remote.c (remote_target::remote_send_printf): Add
832 missing va_end found by Coverity.
833
834 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
835
836 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
837
838 2018-10-09 Tom Tromey <tom@tromey.com>
839
840 * configure: Rebuild.
841 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
842 * NEWS: Update --enable-ubsan documentation.
843
844 2018-10-09 Gary Benson <gbenson@redhat.com>
845
846 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
847 found by Coverity.
848
849 2018-10-08 Tom Tromey <tom@tromey.com>
850
851 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
852 variable.
853 (riscv_fbsd_init_abi): Likewise.
854
855 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
856 * valops.c (value_struct_elt_for_reference): Rename local variable
857 to work around the shadowing a previous local warning.
858
859 2018-10-08 John Baldwin <jhb@FreeBSD.org>
860
861 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
862 * NEWS: Mention new FreeBSD/riscv native configuration.
863 * configure.host: Add riscv*-*-freebsd*.
864 * configure.nat: Likewise.
865 * riscv-fbsd-nat.c: New file.
866
867 2018-10-08 John Baldwin <jhb@FreeBSD.org>
868
869 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
870 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
871 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
872 * NEWS: Mention new FreeBSD/riscv target.
873 * configure.tgt: Add riscv*-*-freebsd*.
874 * riscv-fbsd-tdep.c: New file.
875 * riscv-fbsd-tdep.h: New file.
876
877 2018-10-08 John Baldwin <jhb@FreeBSD.org>
878
879 * regcache.h (struct regcache_map_entry): Note that this type can
880 be used with traditional frame caches.
881 * trad-frame.c (trad_frame_set_reg_regmap): New.
882 * trad-frame.h (trad_frame_set_reg_regmap): New.
883
884 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
885
886 PR c++/16841
887 * valops.c (get_virtual_base_offset): New function.
888 (value_struct_elt_for_reference): Use it to get virtual base offset
889 and add it in calculating class member address.
890
891 2018-10-08 John Darrington <john@darrington.wattle.id.au>
892
893 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
894 (check_producer): Check if the producer is codewarrior.
895 (producer_is_codewarrior): New function.
896 (lnp_state_machine::record_line): Ignore is_stmt flag for records
897 produced by codewarrior.
898 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
899
900 2018-10-06 Tom Tromey <tom@tromey.com>
901
902 PR python/19399:
903 * python/py-inferior.c: Add "architecture" entry.
904 (infpy_architecture): New function.
905
906 2018-10-06 Tom Tromey <tom@tromey.com>
907
908 PR python/21765:
909 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
910 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
911 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
912 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
913
914 2018-10-06 Tom Tromey <tom@tromey.com>
915
916 PR build/17077:
917 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
918 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
919 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
920 #include.
921
922 2018-10-06 Tom Tromey <tom@tromey.com>
923
924 * python/py-breakpoint.c (bppy_get_location): Handle a
925 bp_breakpoint without a location.
926
927 2018-10-06 Tom Tromey <tom@tromey.com>
928
929 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
930 (_RegEx): Reformat help text.
931 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
932 (AnyCallerIs, AnyCallerMatches): Reformat help text.
933 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
934 text.
935 * python/lib/gdb/command/xmethods.py (InfoXMethod)
936 (EnableXMethod, DisableXMethod): Remove help indentation.
937 Capitalize meta-syntactic variables.
938 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
939 (EnableUnwinder, DisableUnwinder): Remove help indentation.
940 Capitalize meta-syntactic variables.
941 * python/lib/gdb/command/explore.py (ExploreCommand)
942 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
943 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
944 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
945 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
946 Remove help indentation.
947 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
948 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
949 (DisableFrameFilter, SetFrameFilterPriority)
950 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
951
952 2018-10-06 Tom Tromey <tom@tromey.com>
953
954 PR tui/28819:
955 * tui/tui-io.c (gdb_wgetch): New function.
956 (tui_mld_getc, tui_getc): Use it.
957
958 2018-10-05 Tom Tromey <tom@tromey.com>
959
960 * sol-thread.c (sol_thread_target::wait): Rename inner
961 "save_ptid".
962
963 2018-10-04 Tom Tromey <tom@tromey.com>
964
965 * configure: Rebuild.
966 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
967
968 2018-10-04 Tom Tromey <tom@tromey.com>
969
970 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
971 declaration of "block".
972
973 2018-10-04 Tom Tromey <tom@tromey.com>
974
975 * common/filestuff.c (fdwalk): Remove inner declaration of
976 "result".
977
978 2018-10-04 Tom Tromey <tom@tromey.com>
979
980 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
981 "structs_addr" and hoist declaration.
982
983 2018-10-04 Tom Tromey <tom@tromey.com>
984
985 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
986 variable "size".
987
988 2018-10-04 Tom Tromey <tom@tromey.com>
989
990 * mdebugread.c (parse_partial_symbols): Use std::string.
991
992 2018-10-04 Tom Tromey <tom@tromey.com>
993
994 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
995 * p-valprint.c (pascal_val_print): Split inner "i" variable.
996 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
997 header.
998 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
999 more inner scope.
1000 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1001 * varobj.c (varobj_update): Rename inner "newobj",
1002 "type_changed".
1003 * valprint.c (generic_emit_char): Rename inner "buf".
1004 * valops.c (find_overload_match): Rename inner "temp".
1005 (value_struct_elt_for_reference): Declare "v" in more inner
1006 scope.
1007 * v850-tdep.c (v850_push_dummy_call): Rename "len".
1008 * unittests/array-view-selftests.c (run_tests): Rename inner
1009 "vec".
1010 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1011 header.
1012 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1013 "tsv" in more inner scope.
1014 (print_one_static_tracepoint_marker): Rename inner
1015 "tuple_emitter".
1016 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1017 (tic6x_push_dummy_call): Don't redeclare "addr".
1018 * target-float.c: Declare "dto" lower.
1019 * symtab.c (lookup_local_symbol): Rename inner "sym".
1020 (find_pc_sect_line): Rename inner "pc".
1021 * stack.c (print_frame): Don't redeclare "gdbarch".
1022 (return_command): Rename inner "gdbarch".
1023 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1024 "sp".
1025 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1026 header.
1027 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1028 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1029 scope.
1030 * remote.c (remote_target::update_thread_list): Don't redeclare
1031 "tp".
1032 (remote_target::process_initial_stop_replies): Rename inner
1033 "thread".
1034 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1035 (remote_target::wait_as): Don't redeclare "stop_reply".
1036 (remote_target::get_thread_local_address): Rename inner
1037 "result".
1038 (remote_target::get_tib_address): Likewise.
1039
1040 * regcache.c (cooked_read_test): Rename "regnum".
1041 * record-btrace.c (cmd_record_btrace_start): Rename inner
1042 "exception".
1043 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1044 loop header.
1045 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1046 header.
1047 (ppu2spu_sniffer): Rename inner "buf".
1048 * parse.c (operator_check_standard): Rename inner "type",
1049 "objfile".
1050 * p-valprint.c (pascal_val_print): Introduce new scope for
1051 "low_bound", "high_bound".
1052 * p-exp.y (yylex): Declare "i" in loop header.
1053 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1054 Lower declaration of "s".
1055 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1056 header.
1057 (nios2_push_dummy_call): Rename "len".
1058 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1059 "buf".
1060 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1061 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1062 (linux_xfer_osdata_modules): Likewise.
1063 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1064 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1065 (mips_o64_push_dummy_call): Likewise.
1066 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1067 "op".
1068 * mi/mi-main.c (list_available_thread_groups): Rename inner
1069 "tuple_emitter".
1070 (mi_cmd_data_read_memory): Rename inner "opts".
1071 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1072 "tuple_emitter".
1073 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1074 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
1075 more inner scope.
1076 (parse_partial_symbols): Rename inner "pst", "p", "name"
1077 * main.c (captured_main_1): Rename inner "i"s.
1078 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1079 "oso2".
1080 * linux-tdep.c (linux_info_proc): Rename inner "filename".
1081 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1082 * infrun.c (handle_no_resumed): Don't redeclare "thread".
1083 (handle_signal_stop): Rename inner "gdbarch".
1084 (handle_command): Declare "signum" in loop header.
1085 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1086 "status".
1087 (examine_prologue): Rename inner "sol" and "sof".
1088 (ia64_extract_return_value): Rename inner "val". Declare another
1089 "val" in a more inner scope.
1090 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1091 inner scope.
1092 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1093 "except".
1094 * findvar.c (default_read_var_value): Don't redeclare "addr".
1095 * f-exp.y (yylex): Declare "i" in loop header.
1096 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1097 Rename inner "type", "expect_type".
1098 (evaluate_subexp_for_sizeof): Rename inner "pc".
1099 * elfread.c (elf_symfile_read): Rename inner "abfd".
1100 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1101 "bytes_read".
1102 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1103 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1104 (dwarf_decode_line_header): Rename inner "lh".
1105 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1106 "offset". Declare "i" in loop header.
1107 (disassemble_dwarf_expression): Rename inner "addr_size".
1108 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1109 inner "result".
1110 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1111 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1112 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1113 "inner_list_emitter".
1114 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1115 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1116 declaration in a block.
1117 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1118 * cp-valprint.c (cp_print_value_fields): Don't redeclare
1119 "obstack_final_size".
1120 * cp-support.c (inspect_type): Declare "i" in loop header.
1121 * compile/compile.c (compile_instance::insert_symbol_error):
1122 Rename inner "e".
1123 * common/agent.c (agent_run_command): Remove inner "ret"
1124 declaration.
1125 * coffread.c (coff_symfile_read): Rename inner "name".
1126 (coff_symfile_read): Rename inner "abfd".
1127 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1128 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1129 "high".
1130 * c-exp.y (lex_one_token): Move "len" declaration lower.
1131 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1132 "gdbarch".
1133 (create_exception_master_breakpoint): Likewise. Don't redeclare
1134 "b".
1135 (watch_command_1): Declare "mark" later.
1136 (clear_command): Don't shadow "a" or "b".
1137 (delete_command): Rename inner "b".
1138 (delete_trace_command): Likewise.
1139 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1140 "op".
1141 (arm_gdbarch_init): Remove inner "e_flags".
1142 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1143 "offset" in inner blocks.
1144
1145 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
1146
1147 * dwarf-index-write.c (file_write): Don't write if the vector is
1148 empty.
1149
1150 2018-10-05 Tom de Vries <tdevries@suse.de>
1151
1152 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1153 PyArg_ParseTuple call.
1154
1155 2018-10-05 Tom de Vries <tdevries@suse.de>
1156
1157 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1158 PyArg_ParseTuple call.
1159
1160 2018-10-04 Joel Brobecker <brobecker@adacore.com>
1161
1162 * psymtab.c (recursively_search_psymtabs): Reformat parameters
1163 to avoid exceeding 80 characters per line limit.
1164
1165 2018-10-04 Tom Tromey <tom@tromey.com>
1166
1167 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1168 (reread_symbols): Update.
1169 * complaints.h (clear_complaints): Remove argument.
1170 * complaints.c (enum complaint_series): Remove.
1171 (series): Remove global.
1172 (complaint_internal): Update.
1173 (clear_complaints): Remove argument.
1174
1175 2018-10-04 Tom Tromey <tom@tromey.com>
1176
1177 * symfile.c (symbol_file_add_with_addrs): Do not print "no
1178 debugging symbols" message if there is a separate debug objfile.
1179
1180 2018-10-04 Tom Tromey <tom@tromey.com>
1181
1182 PR cli/19551:
1183 * symfile.c (symbol_file_add_with_addrs): Update output.
1184 * psymtab.c (require_partial_symbols): Update output.
1185
1186 2018-10-04 Tom Tromey <tom@tromey.com>
1187
1188 PR cli/22234:
1189 * complaints.c: Emit \n.
1190
1191 2018-10-04 Tom Tromey <tom@tromey.com>
1192
1193 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1194 (separate_debug_file_exists, find_separate_debug_file)
1195 (add_symbol_file_command, reread_symbols, allocate_symtab)
1196 (allocate_compunit_symtab): Use filtered printing, not
1197 unfiltered.
1198 * psymtab.c (require_partial_symbols, dump_psymtab)
1199 (allocate_psymtab): Use filtered printing, not unfiltered.
1200
1201 2018-10-04 Tom Tromey <tom@tromey.com>
1202
1203 * complaints.c (complaint_internal): Correctly check complaint
1204 count.
1205
1206 2018-10-04 Tom Tromey <tom@tromey.com>
1207
1208 * complaints.h (struct complaints): Remove declaration.
1209 * complaints.c (clear_complaints): Remove an unused variable.
1210
1211 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1212
1213 * MAINTAINERS (Write After Approval): Add self.
1214
1215 2018-10-03 Tom Tromey <tom@tromey.com>
1216
1217 * guile/scm-value.c (gdbscm_value_to_string): Initialize
1218 "buffer_contents".
1219 * coffread.c (coff_symtab_read): Initialize "newobj".
1220
1221 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
1222
1223 * dwarf2read.c (read_func_scope): Remove struct keyword in
1224 range-based for.
1225
1226 2018-10-03 Tom Tromey <tom@tromey.com>
1227
1228 * README: Mention --enable-ubsan.
1229 * NEWS: Mention --enable-ubsan.
1230 * acinclude.m4: Include sanitize.m4.
1231 * configure: Rebuild.
1232 * configure.ac: Call AM_GDB_UBSAN.
1233 * sanitize.m4: New file.
1234
1235 2018-10-03 Tom Tromey <tom@tromey.com>
1236
1237 * expression.h (enum exp_opcode): Use uint8_t as base type.
1238 * expprint.c (op_name): Handle invalid opcodes.
1239
1240 2018-10-03 Tom Tromey <tom@tromey.com>
1241
1242 * parse.c (prefixify_expression): Add assert.
1243 (parse_exp_in_context_1): Throw exception if the expression is
1244 empty.
1245
1246 2018-10-03 Tom Tromey <tom@tromey.com>
1247
1248 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1249
1250 2018-10-03 Tom Tromey <tom@tromey.com>
1251
1252 * c-exp.y (parse_number): Work in unsigned. Remove casts.
1253
1254 2018-10-03 Tom Tromey <tom@tromey.com>
1255
1256 * dwarf2read.c (read_subrange_type): Make "negative_mask"
1257 unsigned.
1258
1259 2018-10-03 Tom Tromey <tom@tromey.com>
1260
1261 * findvar.c (extract_integer): Do work in an unsigned type.
1262
1263 2018-10-03 Tom Tromey <tom@tromey.com>
1264
1265 * common/enum-flags.h (enum_flags::operator~): Add static assert.
1266 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1267 base type.
1268 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1269 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1270 type.
1271 * c-lang.h (enum c_string_type_values): Use unsigned as base
1272 type.
1273 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1274
1275 2018-10-03 Tom Tromey <tom@tromey.com>
1276
1277 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1278 <~dwarf2_frame_state_reg_info>: Update.
1279 <dwarf2_frame_state_reg_info>: Update.
1280 <alloc_regs>: Add assertion. Update.
1281 <reg>: Now a std::vector.
1282 <num_regs>: Remove.
1283 <swap>: Update.
1284 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1285 (execute_cfa_program_test, dwarf2_frame_cache): Update.
1286
1287 2018-10-03 Tom Tromey <tom@tromey.com>
1288
1289 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1290
1291 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1292
1293 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1294
1295 2018-10-02 Tom Tromey <tom@tromey.com>
1296
1297 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1298
1299 2018-10-02 John Darrington <john@darrington.wattle.id.au>
1300
1301 * NEWS: Mention changed commands.
1302 * ser-uds.c: New file.
1303 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1304 * configure: Regenerate.
1305 * Makefile.in: Add new file.
1306 * serial.c (serial_open): Check if filename is a socket
1307 and lookup the appropriate interface accordingly.
1308
1309 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1310
1311 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1312 define.
1313 (AARCH64_EXTRA_MAGIC): Likewise.
1314 (AARCH64_FPSIMD_MAGIC): Likewise.
1315 (AARCH64_SVE_MAGIC): Likewise.
1316 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1317 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1318 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1319 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1320 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1321 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1322 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1323 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1324 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1325 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1326 (read_aarch64_ctx): Add function.
1327 (aarch64_linux_sigframe_init): Detect FP registers.
1328
1329 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1330
1331 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1332 (AARCH64_D0_REGNUM): Likewise.
1333 (AARCH64_S0_REGNUM): Likewise.
1334 (AARCH64_H0_REGNUM): Likewise.
1335 (AARCH64_B0_REGNUM): Likewise.
1336 (AARCH64_SVE_V0_REGNUM): Likewise.
1337 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1338 (AARCH64_D0_REGNUM): Likewise.
1339 (AARCH64_S0_REGNUM): Likewise.
1340 (AARCH64_H0_REGNUM): Likewise.
1341 (AARCH64_B0_REGNUM): Likewise.
1342 (AARCH64_SVE_V0_REGNUM): Likewise.
1343
1344 2018-10-01 Gary Benson <gbenson@redhat.com>
1345
1346 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1347 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1348 prfpregset_t instead of gdb_prfpregset_t.
1349 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1350 * configure, config.in: Rebuild.
1351
1352 2018-10-01 Gary Benson <gbenson@redhat.com>
1353
1354 * common/gdb_proc_service.h: New file, factored out from...
1355 * gdb_proc_service.h: Moved common code to the above file.
1356 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1357
1358 2018-10-01 Gary Benson <gbenson@redhat.com>
1359
1360 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1361 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
1362
1363 2018-10-01 Gary Benson <gbenson@redhat.com>
1364
1365 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1366 (AC_CHECK_HEADERS): Check for linux/elf.h.
1367 * configure, config.in: Rebuild.
1368 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1369 doesn't define elf_fpregset_t.
1370
1371 2018-10-01 Gary Benson <gbenson@redhat.com>
1372
1373 * gdb_proc_service.h: Whitespace change.
1374
1375 2018-10-01 Tom Tromey <tom@tromey.com>
1376
1377 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1378 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1379 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1380
1381 2018-10-01 Tom Tromey <tom@tromey.com>
1382
1383 * README: Minor change.
1384
1385 2018-09-30 Pedro Alves <palves@redhat.com>
1386
1387 * darwin-nat-info.c (darwin_debug_regions_recurse)
1388 (info_mach_exceptions_command): Remove unused local variables.
1389 * darwin-nat.c (darwin_decode_notify_message)
1390 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1391 (darwin_stop_inferior, darwin_setup_exceptions)
1392 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1393 (darwin_nat_target::attach, darwin_nat_target::detach)
1394 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1395 local variables.
1396 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1397 variables.
1398
1399 2018-09-29 Tom Tromey <tom@tromey.com>
1400
1401 * README: Remove some leftover text.
1402
1403 2018-09-29 Tom Tromey <tom@tromey.com>
1404
1405 * PROBLEMS: Rewrite.
1406 * README: Update.
1407
1408 2018-09-28 John Baldwin <jhb@FreeBSD.org>
1409
1410 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1411 case with explicit breakpoint kind.
1412 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1413 'additional_info' and related logic.
1414 (riscv_debug_breakpoints): New variable.
1415 (riscv_breakpoint_kind_from_pc): Use the length of the existing
1416 instruction to determine the breakpoint kind.
1417 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1418 flag. Update description of 'set/show riscv
1419 use-compressed-breakpoints' flag.
1420
1421 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
1422
1423 (NEWS): Mention changes to frame related commands.
1424 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1425 (add_prefix_cmd_suppress_notification): New function.
1426 (add_com_suppress_notification): Call
1427 add_cmd_suppress_notification.
1428 * command.h (add_cmd_suppress_notification): Declare.
1429 (add_prefix_cmd_suppress_notification): Declare.
1430 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1431 (parse_frame_specification): Moved from stack.c, with
1432 simplification to handle a single argument.
1433 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1434 switch to the selected frame. Add a header comment.
1435 * stack.c: Remove 'safe-ctype.h' include.
1436 (find_frame_for_function): Add declaration.
1437 (find_frame_for_address): New function.
1438 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1439 (frame_selection_by_function_completer): New function.
1440 (info_frame_command): Rename to...
1441 (info_frame_command_core): ...this, and update parameter types.
1442 (select_frame_command): Rename to...
1443 (select_frame_command_core): ...this, and update parameter types.
1444 (frame_command): Rename to...
1445 (frame_command_core): ...this, and update parameter types.
1446 (class frame_command_helper): New class to wrap implementations of
1447 frame related sub-commands.
1448 (frame_apply_cmd_list): New static global.
1449 (frame_cmd_list): Make static.
1450 (select_frame_cmd_list): New global for sub-commands.
1451 (info_frame_cmd_list): New global for sub-commands.
1452 (_initialize_stack): Register sub-commands for 'frame',
1453 'select-frame', and 'info frame'. Update 'frame apply' commands
1454 to use frame_apply_cmd_list. Move function local static
1455 frame_apply_list to file static frame_apply_cmd_list for
1456 consistency.
1457 * stack.h (select_frame_command): Delete declarationn.
1458 (select_frame_for_mi): Declare new function.
1459
1460 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
1461
1462 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1463 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1464 and NOP.
1465
1466 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
1467
1468 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1469
1470 2018-09-26 Tom Tromey <tom@tromey.com>
1471
1472 * valops.c (auto_abandon): Remove dead code.
1473
1474 2018-09-26 Tom Tromey <tom@tromey.com>
1475
1476 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1477
1478 2018-09-24 Tom Tromey <tom@tromey.com>
1479
1480 * common/pathstuff.c (get_standard_cache_dir): Make
1481 "xdg_cache_home" and "home" const.
1482 * top.c (init_history): Make "tmpenv" const.
1483 * main.c (get_init_files): Make "homedir" const.
1484
1485 2018-09-23 Tom Tromey <tom@tromey.com>
1486
1487 PR python/18852:
1488 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1489
1490 2018-09-23 Tom Tromey <tom@tromey.com>
1491
1492 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1493 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1494 * python/python-internal.h (gdbpy_handle_exception): Declare.
1495 * python/py-utils.c (gdbpy_handle_exception): New function.
1496
1497 2018-09-23 Tom Tromey <tom@tromey.com>
1498
1499 PR python/17284:
1500 * python/py-type.c (typy_template_argument): Check for negative
1501 argument number.
1502
1503 2018-09-23 Tom Tromey <tom@tromey.com>
1504
1505 PR python/14062:
1506 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1507
1508 2018-09-23 Tom Tromey <tom@tromey.com>
1509
1510 PR python/18170:
1511 * python/py-value.c (valpy_int): Allow conversion from pointer
1512 type.
1513
1514 2018-09-23 Tom Tromey <tom@tromey.com>
1515
1516 PR python/20126:
1517 * python/py-value.c (valpy_int): Respect type sign.
1518
1519 2018-09-23 Tom Tromey <tom@tromey.com>
1520
1521 PR python/18352;
1522 * python/py-value.c (valpy_float): Allow conversions from int or
1523 char.
1524 (valpy_int, valpy_long): Allow conversions from float.
1525
1526 2018-09-23 Tom Tromey <tom@tromey.com>
1527
1528 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1529 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1530
1531 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1532
1533 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1534 __sighndlr.
1535 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1536
1537 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
1538
1539 * windows-nat.c (windows_nat_target::wait): Remove a spurious
1540 target_terminal::ours().
1541
1542 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
1543
1544 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1545 of vl to ULONGEST.
1546
1547 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
1548
1549 * breakpoint.c (update_inserted_breakpoint_locations): Remove
1550 redundant condition.
1551
1552 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1553
1554 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1555
1556 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1557 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
1558 * sol-thread.c (ps_pdmodel): Don't guard definition.
1559
1560 * procfs.c: Fix formatting.
1561
1562 * procfs.c (sysset_t_alloc): Remove.
1563 (create_procinfo): Use XNEW instead of sysset_t_alloc.
1564 (procfs_debug_inferior): Likewise.
1565 (procfs_set_exec_trap): Likewise.
1566 (proc_set_traced_sysentry): Don't allocate argp dynamically.
1567 (proc_set_traced_sysexit): Likewise.
1568
1569 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1570 (dead_procinfo): Likewise.
1571 (proc_warn): Likewise.
1572 (proc_error): Likewise.
1573 (proc_get_LDT_entry): Likewise.
1574 (do_attach): Likewise.
1575 (procfs_target::pid_to_str): Likewise.
1576 (iterate_over_mappings): Likewise.
1577
1578 * procfs.c (create_procinfo): Fix ARI warning.
1579 (proc_get_status): Likewise.
1580 (proc_stop_process): Likewise.
1581 (proc_run_process): Likewise.
1582 (proc_kill): Likewise.
1583 (proc_get_LDT_entry): Likewise.
1584 (procfs_find_LDT_entry): Likewise.
1585 (proc_update_threads): Likewise.
1586 (proc_iterate_over_threads): Likewise.
1587 (do_attach): Likewise.
1588 (procfs_xfer_memory): Likewise.
1589 (invalidate_cache): Likewise.
1590 (procfs_target::resume): Likewise.
1591 (procfs_init_inferior): Likewise.
1592 (procfs_set_exec_trap): Likewise.
1593 (procfs_target::thread_alive): Likewise.
1594 (procfs_target::pid_to_exec_file): Likewise.
1595 (iterate_over_mappings): Likewise.
1596 (procfs_target::make_corefile_notes): Likewise.
1597 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1598
1599 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1600 (procfs_find_LDT_entry): Likewise.
1601 * sol-thread.c (ps_lgetLDT): Likewise.
1602
1603 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1604
1605 PR tdep/17903
1606 * procfs.c (procfs_target): Declare pid_to_exec_file.
1607 (procfs_target::pid_to_exec_file): New.
1608
1609 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1610
1611 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1612 renaming.
1613 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1614 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1615
1616 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1617
1618 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1619 (supply_fpregset, fill_fpregset): Move ...
1620 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1621 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1622 Remove references to ioctl-based procfs.
1623 Include <sys/reg.h>.
1624 Remove PR_MODEL_NATIVE guards.
1625 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1626 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1627
1628 2018-09-19 Xavier Roirand <roirand@adacore.com>
1629
1630 PR gdb/20981:
1631 * solib-darwin.c (darwin_get_dyld_bfd): New function.
1632 (darwin_solib_get_all_image_info_addr_at_init): Update call.
1633 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1634
1635 2018-09-19 John Baldwin <jhb@FreeBSD.org>
1636
1637 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1638 (fbsd_print_sockaddr_in6): Likewise.
1639
1640 2018-09-19 Richard Bunt <richard.bunt@arm.com>
1641 Chris January <chris.january@arm.com>
1642
1643 * eval.c (skip_undetermined_arglist): Skip argument list helper.
1644 (evaluate_subexp_standard): Return a dummy type when
1645 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1646 OP_F77_UNDETERMINED_ARGLIST case.
1647 * expression.h (enum noside): Update comment.
1648
1649 2018-09-19 George Vasick <george.vasick@oracle.com>
1650
1651 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1652
1653 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
1654 April Chin <april.chin@oracle.com>
1655 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1656
1657 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1658 uint_t lwpid_t.
1659 (create_procinfo): Print pids in /proc without leading zeros.
1660
1661 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
1662
1663 * nios2-tdep.c (nios2_gcc_target_options): New.
1664 (nios2_gdb_arch_init): Install new hook.
1665
1666 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
1667
1668 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1669 New file.
1670 * update-gnulib.sh: Apply patch.
1671 * configure: Re-generate.
1672
1673 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1674
1675 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1676 description. Make "info proc" command descriptions more
1677 consistent.
1678
1679 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1680
1681 * NEWS: Mention 'info proc files' command.
1682
1683 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1684
1685 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1686 descriptors for IP_FILES and IP_ALL.
1687
1688 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1689
1690 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1691 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1692 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1693 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1694 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1695 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1696 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1697 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1698 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1699 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1700 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1701 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1702 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1703 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1704 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1705 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1706 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1707 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1708 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1709 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1710 (struct fbsd_sockaddr_un): New types.
1711 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1712 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1713 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1714 (fbsd_core_info_proc_files): New functions.
1715 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1716 IP_ALL.
1717 * fbsd-tdep.h (fbsd_info_proc_files_header)
1718 (fbsd_info_proc_files_entry): New.
1719
1720 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1721
1722 * defs.h (enum info_proc_what) [IP_FILES]: New value.
1723 * infcmd.c (info_proc_cmd_files): New function.
1724 (_initialize_infcmd): Register 'info proc files' command.
1725
1726 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1727
1728 * gnulib/aclocal-m4-deps.mk: Re-generate.
1729 * gnulib/aclocal.m4: Re-generate.
1730 * gnulib/config.in: Re-generate.
1731 * gnulib/configure: Re-generate.
1732 * gnulib/import/Makefile.am: Re-generate.
1733 * gnulib/import/Makefile.in: Re-generate.
1734 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1735 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1736 * gnulib/import/arpa_inet.in.h: New file.
1737 * gnulib/import/inet_ntop.c: New file.
1738 * gnulib/import/m4/arpa_inet_h.m4: New file.
1739 * gnulib/import/m4/inet_ntop.m4: New file.
1740 * gnulib/import/m4/netinet_in_h.m4: New file.
1741 * gnulib/import/m4/socklen.m4: New file.
1742 * gnulib/import/m4/sockpfaf.m4: New file.
1743 * gnulib/import/m4/stdalign.m4: New file.
1744 * gnulib/import/m4/sys_uio_h.m4: New file.
1745 * gnulib/import/netinet_in.in.h: New file.
1746 * gnulib/import/stdalign.in.h: New file.
1747 * gnulib/import/sys_socket.c: New file.
1748 * gnulib/import/sys_socket.in.h: New file.
1749 * gnulib/import/sys_uio.in.h: New file.
1750 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1751 module.
1752
1753 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1754
1755 * gnulib/aclocal-m4-deps.mk: New file.
1756 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1757 deterministically.
1758
1759 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1760
1761 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1762 KVE_PATH.
1763
1764 2018-09-18 Tom Tromey <tom@tromey.com>
1765
1766 * compile/compile-object-load.c (struct
1767 link_hash_table_cleanup_data): Add constructor and destructor.
1768 Use DISABLE_COPY_AND_ASSIGN.
1769 (~link_hash_table_cleanup_data): Rename from
1770 link_hash_table_free. Now a destructor.
1771 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
1772
1773 2018-09-18 Tom Tromey <tom@tromey.com>
1774
1775 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1776 * compile/compile-object-load.c (struct munmap_list): Move to
1777 header file.
1778 (munmap_list::add): Rename from munmap_list_add; rewrite.
1779 (munmap_list::~munmap_list): Rename from munmap_list_free.
1780 (munmap_listp_free_cleanup): Remove.
1781 (compile_object_load): Update.
1782 * compile/compile-object-load.h (struct munmap_list): Move from
1783 compile-object-load.c. Rewrite.
1784
1785 2018-09-18 Alan Hayward <alan.hayward@arm.com>
1786
1787 * aarch64-tdep.c (pass_in_v): Use register size.
1788 (aarch64_extract_return_value): Likewise.
1789 (aarch64_store_return_value): Likewise.
1790
1791 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1792
1793 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1794 rlim_t.
1795
1796 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1797
1798 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1799 Fix short help line.
1800
1801 2018-09-17 Tom Tromey <tom@tromey.com>
1802
1803 PR python/20445:
1804 * configure: Rebuild.
1805 * configure.ac: Conditionally use -DNDEBUG for Python.
1806
1807 2018-09-17 Tom Tromey <tom@tromey.com>
1808
1809 * configure: Rebuild.
1810 * configure.ac: Use gmp as a library dependency when checking for
1811 mpfr.
1812
1813 2018-09-17 Pedro Alves <palves@redhat.com>
1814
1815 * python/py-inferior.c (find_inferior_object): Delete.
1816
1817 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
1818
1819 * compile/compile-cplus-types.c
1820 (compile_cplus_instance::enter_scope): Don't use new_scope after
1821 std::move.
1822
1823 2018-09-17 Tom Tromey <tom@tromey.com>
1824
1825 * common/pathstuff.c (get_standard_cache_dir): Use
1826 ~/Library/Caches on macOS.
1827 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1828
1829 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1830
1831 PR python/23669
1832 * breakpoint.c (commands_cmd_element): New.
1833 (_initialize_breakpoint): Assign commands_cmd_element.
1834 * breakpoint.h (commands_cmd_element): New.
1835 * cli/cli-script.c (while_cmd_element, if_command,
1836 define_cmd_element): New.
1837 (command_name_equals): Remove.
1838 (process_next_line): Compare commands by pointer, not by name.
1839 (_initialize_cli_script): Assign the various cmd_list_element
1840 variables.
1841 * compile/compile.c (compile_cmd_element): New.
1842 (_initialize_compile): Assign compile_cmd_element.
1843 * compile/compile.h (compile_cmd_element): New.
1844 * guile/guile.c (guile_cmd_element): New.
1845 (install_gdb_commands): Assign guile_cmd_element.
1846 * guile/guile.h (guile_cmd_element): New.
1847 * python/python.c (python_cmd_element): New.
1848 (_initialize_python): Assign python_cmd_element.
1849 * python/python.h (python_cmd_element): New.
1850 * tracepoint.c (while_stepping_cmd_element): New.
1851 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1852 * tracepoint.h (while_stepping_cmd_element): New.
1853
1854 2018-09-17 Tom Tromey <tom@tromey.com>
1855
1856 * infrun.c (save_infcall_suspend_state): Return
1857 infcall_suspend_state_up.
1858 (save_infcall_control_state): Return infcall_control_state_up.
1859 * inferior.h (save_infcall_suspend_state)
1860 (save_infcall_control_state): Declare later. Return unique
1861 pointers.
1862
1863 2018-09-17 Tom Tromey <tom@tromey.com>
1864
1865 * infrun.c (struct stop_context): Declare constructor,
1866 destructor, "changed" method.
1867 (stop_context::stop_context): Rename from save_stop_context.
1868 (stop_context::~stop_context): Rename from
1869 release_stop_context_cleanup.
1870 (normal_stop): Update.
1871 (stop_context::changed): Rename from stop_context_changed. Return
1872 bool.
1873
1874 2018-09-17 Tom Tromey <tom@tromey.com>
1875
1876 * inferior.h (struct infcall_suspend_state_deleter): New.
1877 (infcall_suspend_state_up): New typedef.
1878 (struct infcall_control_state_deleter): New.
1879 (infcall_control_state_up): New typedef.
1880 (make_cleanup_restore_infcall_suspend_state)
1881 (make_cleanup_restore_infcall_control_state): Don't declare.
1882 * infcall.c (call_function_by_hand_dummy): Update.
1883 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1884 (make_cleanup_restore_infcall_suspend_state): Remove.
1885 (do_restore_infcall_control_state_cleanup)
1886 (make_cleanup_restore_infcall_control_state): Remove.
1887
1888 2018-09-17 Tom Tromey <tom@tromey.com>
1889
1890 * gdbthread.h (struct thread_control_state): Add initializer.
1891 (class thread_info) <control>: Remove initializer.
1892 * inferior.h (struct inferior_control_state): Add initializer.
1893 (class inferior) <control>: Remove initializer.
1894 (exit_inferior_1): Update.
1895 * infrun.c (struct infcall_control_state): Add constructors.
1896 (save_infcall_control_state): Use new.
1897 (restore_infcall_control_state, discard_infcall_control_state):
1898 Use delete.
1899
1900 2018-09-17 Tom Tromey <tom@tromey.com>
1901
1902 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1903 unique_ptr.
1904 <siginfo_data>: Now a unique_xmalloc_ptr.
1905 (save_infcall_suspend_state, restore_infcall_suspend_state)
1906 (discard_infcall_suspend_state)
1907 (get_infcall_suspend_state_regcache): Update.
1908
1909 2018-09-17 Tom Tromey <tom@tromey.com>
1910
1911 * gdbthread.h (struct thread_suspend_state): Add initializers.
1912 (class thread_info) <suspend>: Remove initializer.
1913 * infrun.c (struct infcall_suspend_state): Add initializers.
1914 (save_infcall_suspend_state): Use new.
1915 (discard_infcall_suspend_state): Use delete.
1916
1917 2018-09-16 Tom Tromey <tom@tromey.com>
1918
1919 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1920 Remove.
1921 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1922 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1923 (py_varobj_iter_new): Likewise.
1924 (py_varobj_get_iterator): Use gdbpy_ref.
1925
1926 2018-09-16 Tom Tromey <tom@tromey.com>
1927
1928 * python/py-threadevent.c (py_get_event_thread): Simplify.
1929 * python/py-inferior.c (infpy_thread_from_thread_handle):
1930 Return immediately after calling thread_to_thread_object. Use
1931 Py_RETURN_NONE.
1932 (thread_to_thread_object): Set the exception on a NULL return.
1933
1934 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1935
1936 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1937
1938 2018-09-16 Tom Tromey <tom@tromey.com>
1939
1940 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1941 Remove.
1942
1943 2018-09-16 Tom Tromey <tom@tromey.com>
1944
1945 * python/python-internal.h (thread_to_thread_object): Change
1946 return type.
1947 * python/py-inferior.c (thread_to_thread_object): Return a new
1948 reference.
1949 (infpy_thread_from_thread_handle): Update.
1950 * python/py-infthread.c (gdbpy_selected_thread): Update.
1951 * python/py-stopevent.c (create_stop_event_object): Update.
1952 * python/py-threadevent.c (py_get_event_thread): Return a new
1953 reference.
1954 (py_get_event_thread): Update.
1955 * python/py-event.h (py_get_event_thread): Change return type.
1956 * python/py-continueevent.c (create_continue_event_object):
1957 Update.
1958
1959 2018-09-16 Tom Tromey <tom@tromey.com>
1960
1961 * python/py-progspace.c (pspy_get_objfiles): Update.
1962 * python/python-internal.h (objfile_to_objfile_object): Change
1963 return type.
1964 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1965 Update.
1966 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1967 Update.
1968 * python/python.c (gdbpy_get_current_objfile): Update.
1969 (gdbpy_objfiles): Update.
1970 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1971 Update.
1972 (objfile_to_objfile_object): Return a new reference.
1973 * python/py-symtab.c (stpy_get_objfile): Update.
1974 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1975 Update.
1976
1977 2018-09-16 Tom Tromey <tom@tromey.com>
1978
1979 * python/py-inferior.c (infpy_get_progspace): Update.
1980 * python/python-internal.h (pspace_to_pspace_object): Change
1981 return type.
1982 * python/py-newobjfileevent.c
1983 (create_clear_objfiles_event_object): Update.
1984 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1985 Update.
1986 * python/python.c (gdbpy_get_current_progspace): Update.
1987 (gdbpy_progspaces): Update.
1988 * python/py-progspace.c (pspace_to_pspace_object): Return a new
1989 reference.
1990 * python/py-objfile.c (objfpy_get_progspace): Update.
1991 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1992 Update.
1993
1994 2018-09-16 Tom Tromey <tom@tromey.com>
1995
1996 * python/lib/gdb/__init__.py (current_progspace, objfiles)
1997 (solib_name, block_for_pc, find_pc_line): New functions.
1998 (execute_unwinders): Update.
1999 * python/py-block.c (gdbpy_block_for_pc): Remove.
2000 * python/py-inferior.c (infpy_get_progspace): New function.
2001 (inferior_object_getset) <progspace>: Add.
2002 * python/py-progspace.c (pspy_objfiles): Rewrite.
2003 (pspy_solib_name, pspy_block_for_pc)
2004 (pspy_find_pc_line, pspy_is_valid): New functions.
2005 (progspace_object_methods): Add entries for solib_name,
2006 block_for_pc, find_pc_line, is_valid.
2007 * python/python-internal.h (gdbpy_block_for_pc)
2008 (build_objfiles_list): Don't declare.
2009 * python/python.c: Don't include solib.h.
2010 (gdbpy_solib_name, gdbpy_find_pc_line)
2011 (gdbpy_get_current_progspace, build_objfiles_list)
2012 (gdbpy_objfiles): Remove.
2013 (GdbMethods) <current_progspace, objfiles, block_for_pc,
2014 solib_name, find_pc_line>: Remove entries.
2015
2016 2018-09-16 Tom Tromey <tom@tromey.com>
2017
2018 * top.c (new_ui_command): Use GNU style for metasyntactic
2019 variables.
2020 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2021 variables.
2022 * maint.c (maintenance_translate_address): Remove "<>" around
2023 text.
2024 * interps.c (interpreter_exec_cmd): Use GNU style for
2025 metasyntactic variables.
2026 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2027 metasyntactic variables.
2028 * tracepoint.c (tfind_range_command): Use GNU style for
2029 metasyntactic variables.
2030 (tfind_outside_command): Likewise.
2031 (_initialize_tracepoint): Likewise.
2032 * remote.c (extended_remote_target::create_inferior): Use GNU
2033 style for metasyntactic variables.
2034 * sparc64-tdep.c (adi_examine_command): Use GNU style for
2035 metasyntactic variables.
2036 (adi_assign_command): Likewise.
2037
2038 2018-09-16 Tom Tromey <tom@tromey.com>
2039
2040 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2041 metasyntactic variables. Print message if no disassembler options
2042 are available.
2043
2044 2018-09-15 Tom Tromey <tom@tromey.com>
2045
2046 * infcmd.c (get_inferior_args): Return const char *.
2047 * inferior.h (get_inferior_args): Return type now const.
2048 * linux-tdep.c (linux_fill_prpsinfo): Update.
2049 * procfs.c (procfs_target::make_corefile_notes): Update.
2050
2051 2018-09-07 Tom Tromey <tom@tromey.com>
2052
2053 * python/python.c (execute_gdb_command): Call bpstat_do_actions
2054 inside the TRY.
2055
2056 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
2057
2058 * nios2-tdep.c (nios2_type_align): New.
2059 (nios2_gdb_arch_init): Install type_align hook.
2060
2061 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2062
2063 * eval.c (fake_method::fake_method): Call xzalloc directly for a
2064 type that is neither object file owned, nor gdbarch owned.
2065 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2066 gdbarch is non-NULL.
2067 (alloc_type_instance): Allocate non-objfile owned types on the
2068 gdbarch obstack.
2069 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2070 using TYPE_ALLOC to ensure memory is allocated on the correct
2071 obstack.
2072 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2073 obstack, or the gdbarch obstack.
2074 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2075
2076 2018-09-14 Tom Tromey <tom@tromey.com>
2077
2078 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2079 block.
2080
2081 2018-09-14 Tom Tromey <tom@tromey.com>
2082
2083 * nat/fork-inferior.c (get_startup_shell): Remove "static".
2084
2085 2018-09-13 Tom Tromey <tom@tromey.com>
2086
2087 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2088 static.
2089
2090 2018-09-13 Tom Tromey <tom@tromey.com>
2091
2092 * exec.c (try_open_exec_file): Use std::string.
2093
2094 2018-09-13 Tom Tromey <tom@tromey.com>
2095
2096 * utils.h (gdb_bfd_errmsg): Return std::string.
2097 * exec.c (exec_file_attach): Update.
2098 * compile/compile-object-load.c (compile_object_load): Update.
2099 * utils.c (gdb_bfd_errmsg): Return std::string.
2100
2101 2018-09-13 Tom Tromey <tom@tromey.com>
2102
2103 * procfs.c (struct procinfo_deleter): New.
2104 (procinfo_up): New typedef.
2105 (do_destroy_procinfo_cleanup): Remove.
2106 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
2107
2108 2018-09-13 Tom Tromey <tom@tromey.com>
2109
2110 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2111
2112 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2113 2018-09-13 Tom Tromey <tom@tromey.com>
2114
2115 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2116 (pspy_get_objfiles): New function.
2117 (progspace_object_methods): New.
2118 (pspace_object_type): Add tp_methods callback.
2119 * python/python-internal.h (build_objfiles_list): New
2120 declaration.
2121 * python/python.c (build_objfiles_list): New function.
2122 (gdbpy_objfiles): Implement using build_objfiles_list.
2123 * NEWS: Mention the Progspace.objfiles method.
2124
2125 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2126
2127 * python/py-inferior.c (infpy_get_progspace): New function.
2128 (inferior_object_getset): Add progspace property.
2129 * NEWS: Mention the new property.
2130
2131 2018-09-13 Tom Tromey <tom@tromey.com>
2132
2133 PR rust/23650:
2134 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2135
2136 2018-09-13 Tom Tromey <tom@tromey.com>
2137
2138 PR rust/23626:
2139 * rust-lang.c (rust_enum_variant): Now static.
2140 (rust_empty_enum_p): New function.
2141 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2142 Handle empty enum.
2143
2144 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2145
2146 * python/py-inferior.c (infpy_repr): New.
2147 (inferior_object_type): Register infpy_repr.
2148 * python/py-objfile.c (objfpy_repr): New.
2149 (objfile_object_type): Register objfpy_repr.
2150
2151 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2152
2153 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2154
2155 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2156
2157 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2158 typo.
2159
2160 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
2161
2162 * common/common-utils.c: Don't include '<sys/stat.h>'.
2163 (is_regular_file): Move to...
2164 * common/filestuff.c (is_regular_file): ... here.
2165 * common/common-utils.h (is_regular_file): Move to...
2166 * common/filestuff.h (is_regular_file): ... here.
2167
2168 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
2169
2170 * skip.c (debug_skip): New variable.
2171 (skiplist_entry::do_skip_file_p): Add debug output.
2172 (skiplist_entry::do_skip_gfile_p): Likewise.
2173 (skiplist_entry::skip_function_p): Likewise.
2174 (_initialize_step_skip): Create debug command.
2175 * NEWS: Mention set/show debug skip.
2176
2177 2018-09-11 Xavier Roirand <roirand@adacore.com>
2178
2179 * darwin-nat.c (should_disable_startup_with_shell):
2180 New function.
2181 (darwin_nat_target::create_inferior): Add call.
2182
2183 2018-09-11 Xavier Roirand <roirand@adacore.com>
2184
2185 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2186 inf_port, msg_state>: Initialize.
2187 (struct darwin_thread_info) <signaled, single_step>: Change
2188 type and initialize.
2189 (struct darwin_thread_info) <event>: Initialize.
2190
2191 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2192
2193 PR gdb/23555
2194 PR gdb/23558
2195 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2196 guesses.
2197
2198 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2199
2200 Revert:
2201 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2202
2203 PR gdb/23555
2204 PR gdb/23558
2205 * gnulib/aclocal.m4: Regenerate.
2206 * gnulib/config.in: Regenerate.
2207 * gnulib/configure: Regenerate.
2208 * gnulib/import/Makefile.am: Update.
2209 * gnulib/import/Makefile.in: Update.
2210 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2211 * gnulib/import/_Noreturn.h: ... this.
2212 * gnulib/import/alloca.in.h: Update.
2213 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2214 * gnulib/import/arg-nonnull.h: ... this.
2215 * gnulib/import/assure.h: Update.
2216 * gnulib/import/at-func.c: Update.
2217 * gnulib/import/basename-lgpl.c: Update.
2218 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2219 * gnulib/import/c++defs.h: ... this.
2220 * gnulib/import/canonicalize-lgpl.c: Update.
2221 * gnulib/import/cdefs.h: Update.
2222 * gnulib/import/chdir-long.c: Update.
2223 * gnulib/import/chdir-long.h: Update.
2224 * gnulib/import/cloexec.c: Update.
2225 * gnulib/import/cloexec.h: Update.
2226 * gnulib/import/close.c: Update.
2227 * gnulib/import/closedir.c: Update.
2228 * gnulib/import/config.charset: Update.
2229 * gnulib/import/dirent-private.h: Update.
2230 * gnulib/import/dirent.in.h: Update.
2231 * gnulib/import/dirfd.c: Update.
2232 * gnulib/import/dirname-lgpl.c: Update.
2233 * gnulib/import/dirname.h: Update.
2234 * gnulib/import/dosname.h: Update.
2235 * gnulib/import/dup-safer-flag.c: Update.
2236 * gnulib/import/dup-safer.c: Update.
2237 * gnulib/import/dup.c: Update.
2238 * gnulib/import/dup2.c: Update.
2239 * gnulib/import/errno.in.h: Update.
2240 * gnulib/import/error.c: Update.
2241 * gnulib/import/error.h: Update.
2242 * gnulib/import/exitfail.c: Update.
2243 * gnulib/import/exitfail.h: Update.
2244 * gnulib/import/extra/update-copyright: Update.
2245 * gnulib/import/fchdir.c: Update.
2246 * gnulib/import/fcntl.c: Update.
2247 * gnulib/import/fcntl.in.h: Update.
2248 * gnulib/import/fd-hook.c: Update.
2249 * gnulib/import/fd-hook.h: Update.
2250 * gnulib/import/fd-safer-flag.c: Update.
2251 * gnulib/import/fd-safer.c: Update.
2252 * gnulib/import/fdopendir.c: Update.
2253 * gnulib/import/filename.h: Update.
2254 * gnulib/import/filenamecat-lgpl.c: Update.
2255 * gnulib/import/filenamecat.h: Update.
2256 * gnulib/import/flexmember.h: Update.
2257 * gnulib/import/float+.h: Update.
2258 * gnulib/import/float.c: Update.
2259 * gnulib/import/float.in.h: Update.
2260 * gnulib/import/fnmatch.c: Update.
2261 * gnulib/import/fnmatch.in.h: Update.
2262 * gnulib/import/fnmatch_loop.c: Update.
2263 * gnulib/import/fpucw.h: Update.
2264 * gnulib/import/frexp.c: Update.
2265 * gnulib/import/frexpl.c: Update.
2266 * gnulib/import/fstat.c: Update.
2267 * gnulib/import/fstatat.c: Update.
2268 * gnulib/import/getcwd-lgpl.c: Update.
2269 * gnulib/import/getcwd.c: Update.
2270 * gnulib/import/getdtablesize.c: Update.
2271 * gnulib/import/getlogin_r.c: Update.
2272 * gnulib/import/getprogname.c: Update.
2273 * gnulib/import/getprogname.h: Update.
2274 * gnulib/import/gettext.h: Update.
2275 * gnulib/import/gettimeofday.c: Update.
2276 * gnulib/import/glob-libc.h: Update.
2277 * gnulib/import/glob.c: Update.
2278 * gnulib/import/glob.in.h: Update.
2279 * gnulib/import/glob_internal.h: Update.
2280 * gnulib/import/glob_pattern_p.c: Update.
2281 * gnulib/import/globfree.c: Update.
2282 * gnulib/import/hard-locale.c: Update.
2283 * gnulib/import/hard-locale.h: Update.
2284 * gnulib/import/intprops.h: Update.
2285 * gnulib/import/inttypes.in.h: Update.
2286 * gnulib/import/isnan.c: Update.
2287 * gnulib/import/isnand-nolibm.h: Update.
2288 * gnulib/import/isnand.c: Update.
2289 * gnulib/import/isnanl-nolibm.h: Update.
2290 * gnulib/import/isnanl.c: Update.
2291 * gnulib/import/itold.c: Update.
2292 * gnulib/import/libc-config.h: Update.
2293 * gnulib/import/limits.in.h: Update.
2294 * gnulib/import/localcharset.c: Update.
2295 * gnulib/import/localcharset.h: Update.
2296 * gnulib/import/localtime-buffer.c: Update.
2297 * gnulib/import/localtime-buffer.h: Update.
2298 * gnulib/import/lstat.c: Update.
2299 * gnulib/import/m4/00gnulib.m4: Update.
2300 * gnulib/import/m4/__inline.m4: Update.
2301 * gnulib/import/m4/absolute-header.m4: Update.
2302 * gnulib/import/m4/alloca.m4: Update.
2303 * gnulib/import/m4/builtin-expect.m4: Update.
2304 * gnulib/import/m4/canonicalize.m4: Update.
2305 * gnulib/import/m4/chdir-long.m4: Update.
2306 * gnulib/import/m4/close.m4: Update.
2307 * gnulib/import/m4/closedir.m4: Update.
2308 * gnulib/import/m4/configmake.m4: Update.
2309 * gnulib/import/m4/d-ino.m4: Update.
2310 * gnulib/import/m4/d-type.m4: Update.
2311 * gnulib/import/m4/dirent_h.m4: Update.
2312 * gnulib/import/m4/dirfd.m4: Update.
2313 * gnulib/import/m4/dirname.m4: Update.
2314 * gnulib/import/m4/double-slash-root.m4: Update.
2315 * gnulib/import/m4/dup.m4: Update.
2316 * gnulib/import/m4/dup2.m4: Update.
2317 * gnulib/import/m4/eealloc.m4: Update.
2318 * gnulib/import/m4/environ.m4: Update.
2319 * gnulib/import/m4/errno_h.m4: Update.
2320 * gnulib/import/m4/error.m4: Update.
2321 * gnulib/import/m4/exponentd.m4: Update.
2322 * gnulib/import/m4/exponentl.m4: Update.
2323 * gnulib/import/m4/extensions.m4: Update.
2324 * gnulib/import/m4/extern-inline.m4: Update.
2325 * gnulib/import/m4/fchdir.m4: Update.
2326 * gnulib/import/m4/fcntl-o.m4: Update.
2327 * gnulib/import/m4/fcntl.m4: Update.
2328 * gnulib/import/m4/fcntl_h.m4: Update.
2329 * gnulib/import/m4/fdopendir.m4: Update.
2330 * gnulib/import/m4/filenamecat.m4: Update.
2331 * gnulib/import/m4/flexmember.m4: Update.
2332 * gnulib/import/m4/float_h.m4: Update.
2333 * gnulib/import/m4/fnmatch.m4: Update.
2334 * gnulib/import/m4/fnmatch_h.m4: Update.
2335 * gnulib/import/m4/fpieee.m4: Update.
2336 * gnulib/import/m4/frexp.m4: Update.
2337 * gnulib/import/m4/frexpl.m4: Update.
2338 * gnulib/import/m4/fstat.m4: Update.
2339 * gnulib/import/m4/fstatat.m4: Update.
2340 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2341 * gnulib/import/m4/getcwd-path-max.m4: Update.
2342 * gnulib/import/m4/getcwd.m4: Update.
2343 * gnulib/import/m4/getdtablesize.m4: Update.
2344 * gnulib/import/m4/getlogin.m4: Update.
2345 * gnulib/import/m4/getlogin_r.m4: Update.
2346 * gnulib/import/m4/getpagesize.m4: Update.
2347 * gnulib/import/m4/getprogname.m4: Update.
2348 * gnulib/import/m4/gettimeofday.m4: Update.
2349 * gnulib/import/m4/glibc21.m4: Update.
2350 * gnulib/import/m4/glob.m4: Update.
2351 * gnulib/import/m4/glob_h.m4: Update.
2352 * gnulib/import/m4/gnulib-cache.m4: Update.
2353 * gnulib/import/m4/gnulib-common.m4: Update.
2354 * gnulib/import/m4/gnulib-comp.m4: Update.
2355 * gnulib/import/m4/gnulib-tool.m4: Update.
2356 * gnulib/import/m4/hard-locale.m4: Update.
2357 * gnulib/import/m4/include_next.m4: Update.
2358 * gnulib/import/m4/inttypes-pri.m4: Update.
2359 * gnulib/import/m4/inttypes.m4: Update.
2360 * gnulib/import/m4/isnand.m4: Update.
2361 * gnulib/import/m4/isnanl.m4: Update.
2362 * gnulib/import/m4/largefile.m4: Update.
2363 * gnulib/import/m4/limits-h.m4: Update.
2364 * gnulib/import/m4/localcharset.m4: Update.
2365 * gnulib/import/m4/locale-fr.m4: Update.
2366 * gnulib/import/m4/locale-ja.m4: Update.
2367 * gnulib/import/m4/locale-zh.m4: Update.
2368 * gnulib/import/m4/localtime-buffer.m4: Update.
2369 * gnulib/import/m4/longlong.m4: Update.
2370 * gnulib/import/m4/lstat.m4: Update.
2371 * gnulib/import/m4/malloc.m4: Update.
2372 * gnulib/import/m4/malloca.m4: Update.
2373 * gnulib/import/m4/math_h.m4: Update.
2374 * gnulib/import/m4/mbrtowc.m4: Update.
2375 * gnulib/import/m4/mbsinit.m4: Update.
2376 * gnulib/import/m4/mbsrtowcs.m4: Update.
2377 * gnulib/import/m4/mbstate_t.m4: Update.
2378 * gnulib/import/m4/memchr.m4: Update.
2379 * gnulib/import/m4/memmem.m4: Update.
2380 * gnulib/import/m4/mempcpy.m4: Update.
2381 * gnulib/import/m4/memrchr.m4: Update.
2382 * gnulib/import/m4/mkdir.m4: Update.
2383 * gnulib/import/m4/mkstemp.m4: Update.
2384 * gnulib/import/m4/mmap-anon.m4: Update.
2385 * gnulib/import/m4/mode_t.m4: Update.
2386 * gnulib/import/m4/msvc-inval.m4: Update.
2387 * gnulib/import/m4/msvc-nothrow.m4: Update.
2388 * gnulib/import/m4/multiarch.m4: Update.
2389 * gnulib/import/m4/nocrash.m4: Update.
2390 * gnulib/import/m4/off_t.m4: Update.
2391 * gnulib/import/m4/onceonly.m4: Update.
2392 * gnulib/import/m4/open-cloexec.m4: Update.
2393 * gnulib/import/m4/open.m4: Update.
2394 * gnulib/import/m4/openat.m4: Update.
2395 * gnulib/import/m4/opendir.m4: Update.
2396 * gnulib/import/m4/pathmax.m4: Update.
2397 * gnulib/import/m4/rawmemchr.m4: Update.
2398 * gnulib/import/m4/readdir.m4: Update.
2399 * gnulib/import/m4/readlink.m4: Update.
2400 * gnulib/import/m4/realloc.m4: Update.
2401 * gnulib/import/m4/rename.m4: Update.
2402 * gnulib/import/m4/rewinddir.m4: Update.
2403 * gnulib/import/m4/rmdir.m4: Update.
2404 * gnulib/import/m4/save-cwd.m4: Update.
2405 * gnulib/import/m4/secure_getenv.m4: Update.
2406 * gnulib/import/m4/setenv.m4: Update.
2407 * gnulib/import/m4/signal_h.m4: Update.
2408 * gnulib/import/m4/ssize_t.m4: Update.
2409 * gnulib/import/m4/stat-time.m4: Update.
2410 * gnulib/import/m4/stat.m4: Update.
2411 * gnulib/import/m4/std-gnu11.m4: Update.
2412 * gnulib/import/m4/stdbool.m4: Update.
2413 * gnulib/import/m4/stddef_h.m4: Update.
2414 * gnulib/import/m4/stdint.m4: Update.
2415 * gnulib/import/m4/stdio_h.m4: Update.
2416 * gnulib/import/m4/stdlib_h.m4: Update.
2417 * gnulib/import/m4/strchrnul.m4: Update.
2418 * gnulib/import/m4/strdup.m4: Update.
2419 * gnulib/import/m4/strerror.m4: Update.
2420 * gnulib/import/m4/string_h.m4: Update.
2421 * gnulib/import/m4/strstr.m4: Update.
2422 * gnulib/import/m4/strtok_r.m4: Update.
2423 * gnulib/import/m4/sys_socket_h.m4: Update.
2424 * gnulib/import/m4/sys_stat_h.m4: Update.
2425 * gnulib/import/m4/sys_time_h.m4: Update.
2426 * gnulib/import/m4/sys_types_h.m4: Update.
2427 * gnulib/import/m4/tempname.m4: Update.
2428 * gnulib/import/m4/time_h.m4: Update.
2429 * gnulib/import/m4/unistd-safer.m4: Update.
2430 * gnulib/import/m4/unistd_h.m4: Update.
2431 * gnulib/import/m4/warn-on-use.m4: Update.
2432 * gnulib/import/m4/wchar_h.m4: Update.
2433 * gnulib/import/m4/wchar_t.m4: Update.
2434 * gnulib/import/m4/wctype_h.m4: Update.
2435 * gnulib/import/m4/wint_t.m4: Update.
2436 * gnulib/import/malloc.c: Update.
2437 * gnulib/import/malloc/scratch_buffer.h: Update.
2438 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2439 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2440 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2441 * gnulib/import/malloca.c: Update.
2442 * gnulib/import/malloca.h: Update.
2443 * gnulib/import/malloca.valgrind: Update.
2444 * gnulib/import/math.in.h: Update.
2445 * gnulib/import/mbrtowc.c: Update.
2446 * gnulib/import/mbsinit.c: Update.
2447 * gnulib/import/mbsrtowcs-impl.h: Update.
2448 * gnulib/import/mbsrtowcs-state.c: Update.
2449 * gnulib/import/mbsrtowcs.c: Update.
2450 * gnulib/import/memchr.c: Update.
2451 * gnulib/import/memmem.c: Update.
2452 * gnulib/import/mempcpy.c: Update.
2453 * gnulib/import/memrchr.c: Update.
2454 * gnulib/import/mkdir.c: Update.
2455 * gnulib/import/mkstemp.c: Update.
2456 * gnulib/import/msvc-inval.c: Update.
2457 * gnulib/import/msvc-inval.h: Update.
2458 * gnulib/import/msvc-nothrow.c: Update.
2459 * gnulib/import/msvc-nothrow.h: Update.
2460 * gnulib/import/open.c: Update.
2461 * gnulib/import/openat-die.c: Update.
2462 * gnulib/import/openat-priv.h: Update.
2463 * gnulib/import/openat-proc.c: Update.
2464 * gnulib/import/openat.c: Update.
2465 * gnulib/import/openat.h: Update.
2466 * gnulib/import/opendir.c: Update.
2467 * gnulib/import/pathmax.h: Update.
2468 * gnulib/import/pipe-safer.c: Update.
2469 * gnulib/import/rawmemchr.c: Update.
2470 * gnulib/import/readdir.c: Update.
2471 * gnulib/import/readlink.c: Update.
2472 * gnulib/import/realloc.c: Update.
2473 * gnulib/import/ref-add.sin: Update.
2474 * gnulib/import/ref-del.sin: Update.
2475 * gnulib/import/rename.c: Update.
2476 * gnulib/import/rewinddir.c: Update.
2477 * gnulib/import/rmdir.c: Update.
2478 * gnulib/import/same-inode.h: Update.
2479 * gnulib/import/save-cwd.c: Update.
2480 * gnulib/import/save-cwd.h: Update.
2481 * gnulib/import/scratch_buffer.h: Update.
2482 * gnulib/import/secure_getenv.c: Update.
2483 * gnulib/import/setenv.c: Update.
2484 * gnulib/import/signal.in.h: Update.
2485 * gnulib/import/stat-time.c: Update.
2486 * gnulib/import/stat-time.h: Update.
2487 * gnulib/import/stat-w32.c: Update.
2488 * gnulib/import/stat-w32.h: Update.
2489 * gnulib/import/stat.c: Update.
2490 * gnulib/import/stdbool.in.h: Update.
2491 * gnulib/import/stddef.in.h: Update.
2492 * gnulib/import/stdint.in.h: Update.
2493 * gnulib/import/stdio.in.h: Update.
2494 * gnulib/import/stdlib.in.h: Update.
2495 * gnulib/import/str-two-way.h: Update.
2496 * gnulib/import/strchrnul.c: Update.
2497 * gnulib/import/strdup.c: Update.
2498 * gnulib/import/streq.h: Update.
2499 * gnulib/import/strerror-override.c: Update.
2500 * gnulib/import/strerror-override.h: Update.
2501 * gnulib/import/strerror.c: Update.
2502 * gnulib/import/string.in.h: Update.
2503 * gnulib/import/stripslash.c: Update.
2504 * gnulib/import/strnlen1.c: Update.
2505 * gnulib/import/strnlen1.h: Update.
2506 * gnulib/import/strstr.c: Update.
2507 * gnulib/import/strtok_r.c: Update.
2508 * gnulib/import/sys_stat.in.h: Update.
2509 * gnulib/import/sys_time.in.h: Update.
2510 * gnulib/import/sys_types.in.h: Update.
2511 * gnulib/import/tempname.c: Update.
2512 * gnulib/import/tempname.h: Update.
2513 * gnulib/import/time.in.h: Update.
2514 * gnulib/import/unistd--.h: Update.
2515 * gnulib/import/unistd-safer.h: Update.
2516 * gnulib/import/unistd.in.h: Update.
2517 * gnulib/import/unsetenv.c: Update.
2518 * gnulib/import/verify.h: Update.
2519 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2520 * gnulib/import/wchar.in.h: Update.
2521 * gnulib/import/wctype.in.h: Update.
2522 * gnulib/import/xalloc-oversized.h: Update.
2523 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2524 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2525
2526 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
2527
2528 * record-btrace.c (get_thread_current_frame): Remove
2529 old_inferior_ptid.
2530
2531 2018-09-10 Jerome Guitton <guitton@adacore.com>
2532
2533 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2534 with check_tag to 1 if and only if the type is tagged and the
2535 component being searched cannot been found in the current
2536 view. Otherwise, always call ada_to_fixed_type with
2537 check_tag to 0.
2538
2539 2018-09-10 Xavier Roirand <roirand@adacore.com>
2540
2541 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2542 declaration.
2543 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2544 * ada-varobj.c (ada_varobj_get_number_of_children,
2545 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2546
2547 2018-09-10 Xavier Roirand <roirand@adacore.com>
2548
2549 * ada-valprint.c (ada_value_print): Use type instead of
2550 enclosing type.
2551
2552 2018-09-10 Xavier Roirand <roirand@adacore.com>
2553
2554 * ada-lang.c (ada_value_subscript): Handle case when parameter is
2555 an array of access to unconstrained array.
2556
2557 2018-09-10 Xavier Roirand <roirand@adacore.com>
2558
2559 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2560 (ada_check_typedef): Use it.
2561
2562 2018-09-10 Xavier Roirand <roirand@adacore.com>
2563
2564 * ada-varobj.c (ada_varobj_describe_struct_child)
2565 (ada_varobj_describe_child): Handle union case like struct one.
2566
2567 2018-09-10 Tom Tromey <tom@tromey.com>
2568
2569 PR python/18380:
2570 * python/python.c (_initialize_python): Make example in "python"
2571 help work in Python 3.
2572
2573 2018-09-10 Eli Zaretskii <eliz@gnu.org>
2574
2575 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2576 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
2577 $(EXEEXT) to the script, as it is not a program.
2578
2579 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
2580
2581 * python/py-prettyprint.c (pretty_print_one_value): Return
2582 gdbpy_ref<>.
2583 (print_string_repr): Adjust.
2584 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2585 * python/python-internal.h (apply_varobj_pretty_printer): Return
2586 gdbpy_ref<>.
2587 * varobj.c (varobj_value_get_print_value): Adjust.
2588
2589 2018-09-08 Tom Tromey <tom@tromey.com>
2590
2591 PR python/16047:
2592 * python/py-prettyprint.c (pretty_print_one_value): Check for
2593 to_string method.
2594
2595 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2596
2597 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2598 replace_operator_with_call.
2599
2600 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2601
2602 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2603
2604 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2605
2606 * ada-typeprint.c (print_range): Print the bounds using TYPE
2607 rather than its TYPE_TARGET_TYPE.
2608
2609 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2610
2611 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2612 call to ada_to_fixed_value_create.
2613
2614 2018-09-08 Jerome Guitton <guitton@adacore.com>
2615
2616 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2617
2618 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2619
2620 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2621 by calls to error.
2622
2623 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2624
2625 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2626 Move update of loop variable "fi".
2627
2628 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2629
2630 * ada-lang.c (value_assign_to_component): In the case of
2631 big-endian targets, extract the bits of the given VAL
2632 using an src_offset of zero if container is not a scalar.
2633
2634 2018-09-06 Simon Ser <contact@emersion.fr>
2635
2636 PR gdb/23105
2637 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2638 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2639 * fbsd-tdep.c (fbsd_make_note_desc): New.
2640 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2641 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2642 * target.h (enum target_object) Add FreeBSD-specific
2643 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2644
2645 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2646
2647 * compile/compile-c.h (generate_c_for_variable_locations):
2648 Change reference to pointer.
2649 * compile/compile-c-support.c (compile_program) <compute>:
2650 Likewise.
2651 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2652 (generate_c_for_for_one_variable): Likewise
2653 (generate_c_for_variable_locations): Likewise
2654 * compile/compile-c-types.c (compile_c_instance::convert_type):
2655 Likewise
2656 * compile/compile-cplus-symbols.c (convert_one_symbol):
2657 std::move the scope passed to enter_scope.
2658 * compile/compile-cplus-types.c
2659 (compile_cplus_instance::enter_scope): Make parameter
2660 rvalue-reference.
2661 (compile_cplus_instance::new_scope): Change reference to
2662 pointer.
2663 (compile_cplus_instance::convert_type): Likewise
2664 (compile_cplus_convert_typedef): std::move the scope passed to
2665 enter_scope.
2666 (compile_cplus_convert_struct_or_union): Likewise.
2667 (compile_cplus_convert_enum): Likewise.
2668 (compile_cplus_convert_namespace): Likewise.
2669 * compile/compile-cplus.h (compile_cplus_instance)
2670 <enter_scope>: Make parameter rvalue-reference.
2671 * compile/compile-internal.h (compile_instance)
2672 <get_cached_type>: Likewise
2673 * compile/compile-loc2c.c (push): Likewise
2674 (pushf): Likewise
2675 (unary): Likewise
2676 (binary): Likewise
2677 (print_label): Likewise
2678 (pushf_register_address): Likewise
2679 (pushf_register): Likewise
2680 (do_compile_dwarf_expr_to_c): Likewise
2681 (compile_dwarf_expr_to_c): Likewise
2682 (compile_dwarf_bounds_to_c): Likewise
2683 * compile/compile.c (compile_instance::get_cached_type):
2684 Likewise
2685 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2686 (compile_dwarf_bounds_to_c): Likewise
2687 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2688 (dwarf2_compile_property_to_c): Likewise
2689 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2690 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2691 Likewise
2692
2693 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2694
2695 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2696 * tui/tui-data.c (init_content_element): Don't initialize it.
2697
2698 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2699
2700 * tui/tui-data.h (struct tui_win_info)
2701 <detail::opaque>: Remove.
2702 * tui/tui-data.c (init_win_info): Remove assignment.
2703
2704 2018-09-05 Tom Tromey <tom@tromey.com>
2705
2706 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2707 -Wformat-nonliteral.
2708 * target-float.c (host_float_ops<T>::to_string)
2709 (host_float_ops<T>::from_string): Use
2710 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2711 * configure: Rebuild.
2712
2713 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
2714
2715 * printcmd.c (printf_c_string): Use
2716 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2717 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2718
2719 2018-09-05 Tom Tromey <tom@tromey.com>
2720
2721 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2722
2723 2018-09-05 Tom de Vries <tdevries@suse.de>
2724
2725 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2726 with resolve_abstract_p == true.
2727 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2728 defaulting to false. Propagate resolve_abstract_p to
2729 dwarf2_fetch_die_loc_sect_off.
2730 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2731 parameter, defaulting to false.
2732 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2733 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2734 parameter.
2735 * dwarf2read.h (struct die_info): Forward-declare.
2736 (die_info_ptr): New typedef.
2737 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2738
2739 2018-09-05 Joel Brobecker <brobecker@adacore.com>
2740
2741 GDB 8.2 released.
2742
2743 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
2744 Pedro Alves <palves@redhat.com>
2745
2746 * gnulib/Makefile.in (aclocal_m4_deps): Move to
2747 "aclocal-m4-deps.mk". Include file here.
2748 $(srcdir)/aclocal.m4: Add "configure.ac".
2749 * gnulib/aclocal-m4-deps.mk: New file.
2750 * gnulib/update-gnulib.sh: Automatically update
2751 "aclocal-m4-deps.mk".
2752
2753 2018-09-04 Tom Tromey <tom@tromey.com>
2754
2755 * configure: Rebuild.
2756 * configure.ac: Remove multi-ice code.
2757
2758 2018-09-04 Tom Tromey <tom@tromey.com>
2759
2760 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2761 (ada-exp.o): Update.
2762
2763 2018-09-04 Tom Tromey <tom@tromey.com>
2764
2765 * Makefile.in (printcmd.o, target-float.o): Remove.
2766 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2767
2768 2018-09-04 Tom Tromey <tom@tromey.com>
2769
2770 * gnulib/Makefile.in: Remove obsolete comment.
2771 * Makefile.in: Remove obsolete comment.
2772
2773 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
2774
2775 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2776 line with '+'.
2777
2778 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2779
2780 * riscv-tdep.c: Add 'prologue-value.h' include.
2781 (struct riscv_unwind_cache): New struct.
2782 (riscv_debug_unwinder): New global.
2783 (riscv_scan_prologue): Update arguments, capture register details
2784 from prologue scan.
2785 (riscv_skip_prologue): Reformat arguments line, move end of
2786 prologue calculation into riscv_scan_prologue.
2787 (riscv_frame_cache): Update return type, create
2788 riscv_unwind_cache, scan the prologue, and fill in remaining cache
2789 details.
2790 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2791 (riscv_frame_prev_register): Use the trad_frame within the
2792 riscv_unwind_cache.
2793 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2794 flag.
2795
2796 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2797
2798 * trad-frame.h (trad_frame_set_realreg): Declare.
2799 (trad_frame_set_addr): Declare.
2800 * trad-frame.c (trad_frame_set_realreg): Define new function.
2801 (trad_frame_set_addr): Define new function.
2802 (trad_frame_set_reg_realreg): Use new function.
2803 (trad_frame_set_reg_addr): Use new function.
2804
2805 2018-09-01 Keith Seitz <keiths@redhat.com>
2806
2807 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2808 pulongest instead of "%lld".
2809 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2810 ATTRIBUTE_UNUSED.
2811
2812 2018-08-31 Tom Tromey <tom@tromey.com>
2813
2814 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2815 variant part type.
2816
2817 2018-08-31 Pedro Alves <palves@redhat.com>
2818
2819 * gdbarch.h: Regenerate.
2820
2821 2018-08-31 Pedro Alves <palves@redhat.com>
2822
2823 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2824 * target.h (Hardware watchpoint interfaces): Describe
2825 continuable/steppable/non-steppable watchpoints.
2826 * gdbarch.h, gdbarch.c: Regenerate.
2827
2828 2018-08-31 Pedro Alves <palves@redhat.com>
2829
2830 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2831 Delete.
2832 * s390-linux-nat.c
2833 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2834 * target.h (target_ops::have_continuable_watchpoint): Delete.
2835 (target_have_continuable_watchpoint): Delete.
2836 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2837 * target-delegates.c: Regenerate.
2838
2839 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2840
2841 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2842 the files present in "gnulib/import/m4/".
2843
2844 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2845
2846 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2847 c.sw, c.swsp, and c.sdsp.
2848
2849 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2850
2851 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2852 (riscv_read_misa_reg): Don't cache value read into inferior data.
2853 (riscv_new_inferior_data): Delete.
2854 (riscv_inferior_data_cleanup): Delete.
2855 (riscv_inferior_data): Delete.
2856 (riscv_invalidate_inferior_data): Delete.
2857 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2858
2859 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2860
2861 * compile/compile-cplus-types.c
2862 (compile_cplus_instance::leave_scope): Take the address of scope
2863 object.
2864 (compile_cplus_instance::convert_qualified_base): Compare quals
2865 to 0.
2866
2867 2018-08-30 Keith Seitz <keiths@redhat.com>
2868
2869 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2870 Use "%s" and host_address_to_string instead of "%p" in printf.
2871
2872 2018-08-29 Keith Seitz <keiths@redhat.com>
2873
2874 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2875 and compile-cplus-types.c.
2876 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2877 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2878 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2879 Declare.
2880 * compile/compile-c-support.c: Include compile-cplus.h.
2881 (load_libcompile): Templatize.
2882 (get_compile_context): "New" function.
2883 (c_get_compile_context): Use get_compile_context.
2884 (cplus_get_compile_context): New function.
2885 (cplus_push_user_expression, cplus_pop_user_expression)
2886 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2887 (cplus_compute_program): Define new structs/functions.
2888 * compile/compile-cplus-symmbols.c: New file.
2889 * compile/compile-cplus-types.c: New file.
2890 * compile/compile-cplus.h: New file.
2891 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2892 Declare.
2893 * compile/compile-object-load.c (get_out_value_type): Use
2894 strncmp_iw when comparing symbol names.
2895 (compile_object_load): Add mst_bss and mst_data.
2896 * compile/compile.c (_initialize_compile): Remove
2897 -Wno-implicit-function-declaration from `compile_args'.
2898 * compile/gcc-cp-plugin.h: New file.
2899 * NEWS: Mention C++ compile support and new debug options.
2900
2901 2018-08-29 Keith Seitz <keiths@redhat.com>
2902
2903 * linespec.c (collect_info::add_symbol): Make virtual.
2904 (struct symbol_searcher_collect_info): New struct.
2905 (symbol_searcher::find_all_symbols): New method.
2906 * symtab.h (class symbol_searcher): New class.
2907
2908 2018-08-29 Keith Seitz <keiths@redhat.com>
2909
2910 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2911 Change to vector of block_symbol. Update all users.
2912 (struct collect_info) <symbols>: Likewise.
2913 (collect_info::add_symbol): Take block_symbol as argument.
2914 Update all callers.
2915 (decode_compound_collector) <m_symbols>: Change type to vector
2916 of block_symbol. Update all users.
2917 (decode_compound_collector::operator ()): Change parameter type
2918 to block_symbol.
2919 (find_method, find_function_symbols, find_linespec_symbols)
2920 (find_label_symbols_in_block, find_label_symbols): Change symbol
2921 vectors to block_symbol vectors.
2922 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2923 block_symbol.
2924
2925 2018-08-29 Keith Seitz <keiths@redhat.com>
2926
2927 * linespec.c (symbolp): Remove typedef and VEC definitions.
2928 (bound_minimal_symbol_d): Likewise.
2929
2930 2018-08-29 Keith Seitz <keiths@redhat.com>
2931
2932 * linespec.c (decode_compound_collector::decode_compound_collector):
2933 Remove initialization for `m_symtabs'.
2934 (decode_compound_collector::release_symbols): Change return type
2935 to std::vector. Update all callers.
2936 (class decode_compound_collector) <m_symbols>: Change type to
2937 std::vector.
2938 (lookup_prefix_sym): Change return type to std::vector. Update all
2939 callers.
2940 (compare_symbols): Remove.
2941 (std_compare_symbols): Rename to `compare_symbols'.
2942 (find_method): Change `sym_classes' parameter to std::vector.
2943 Update all callers. Use std::sort to sort sym_classes.
2944 (find_linespec_symbols): Remove cleanup.
2945
2946 2018-08-29 Keith Seitz <keiths@redhat.com>
2947
2948 * linespec.c (struct linespec) <minimal_symbols>: Change type to
2949 std::vector. Update all users.
2950 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2951 (struct collect_info) <minimal_symbols>: Likewise.
2952 (compare_msymbols): Return bool. Change parameters to const
2953 bound_minimal_symbol references.
2954 (find_method, find_function_symbols, find_linespec_symbols): Change
2955 `minsyms' parameter to std::vector. Update all callers.
2956
2957 2018-08-29 Keith Seitz <keiths@redhat.com>
2958
2959 * linespec.c (struct linespec) <label_symbols>: Change type to
2960 std::vector. Update all users.
2961 (find_label_symbols_in_block): Change `result' parameter to
2962 std::vector. Update all callers.
2963 (find_label_symbols): Return std::vector. Update all callers.
2964
2965 2018-08-29 Keith Seitz <keiths@redhat.com>
2966
2967 * linespec.c (struct linespec) <function_symbols>: Change type to
2968 std::vector. Update all users.
2969 (struct collect_info) <function_symbols>: Likewise.
2970 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2971 (std_compare_symbols): New function.
2972 (find_method, find_function_symbols, find_linespec_symbols)
2973 (find_label_symbols_in_block): Change `symbols' parameter to
2974 std::vector. Update all callers.
2975 (find_label_symbols): Likewise for `function_symbols' and
2976 `label_funcs_ret'.
2977
2978 2018-08-29 Keith Seitz <keiths@redhat.com>
2979
2980 * linespec.c (symtab_vector_up): Define.
2981 (struct linespec) <file_symtabs>: Change type to std::vector *.
2982 Update all uses.
2983 (struct collect_info) <file_symtabs>: Likewise.
2984 (collect_symtabs_from_filename): Return symtab_vector_up.
2985 Update all callers.
2986 (decode_objc): Remove cleanup.
2987 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2988 (symtab_collector::release_symtabs): Return symtab_vector_up.
2989 Update all callers.
2990 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2991 Update all users.
2992 (collect_symtabs_from_filename, symtabs_from_filename): Return
2993 symtab_vector_up. Update all callers.
2994
2995 2018-08-29 Tom Tromey <tom@tromey.com>
2996
2997 * csky-tdep.c (csky_analyze_prologue): Use
2998 core_addr_to_string_nz.
2999
3000 2018-08-29 Tom Tromey <tom@tromey.com>
3001
3002 * windows-nat.c (struct xlate_exception) <them>: Change type to
3003 DWORD.
3004 (xlate): Fix formatting. Remove last entry.
3005 (struct xlate_exception, xlate): Comment out.
3006 (windows_nat_target::resume): Use ranged for.
3007
3008 2018-08-29 Jim Wilson <jimw@sifive.com>
3009
3010 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3011 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3012 of NT_PRFPREG.
3013 (riscv_linux_nat_target::store_registers): Likewise.
3014
3015 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3016
3017 PR gdb/23555
3018 PR gdb/23558
3019 * gnulib/aclocal.m4: Regenerate.
3020 * gnulib/config.in: Regenerate.
3021 * gnulib/configure: Regenerate.
3022 * gnulib/import/Makefile.am: Update.
3023 * gnulib/import/Makefile.in: Update.
3024 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3025 * gnulib/import/_Noreturn.h: ... this.
3026 * gnulib/import/alloca.in.h: Update.
3027 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3028 * gnulib/import/arg-nonnull.h: ... this.
3029 * gnulib/import/assure.h: Update.
3030 * gnulib/import/at-func.c: Update.
3031 * gnulib/import/basename-lgpl.c: Update.
3032 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3033 * gnulib/import/c++defs.h: ... this.
3034 * gnulib/import/canonicalize-lgpl.c: Update.
3035 * gnulib/import/cdefs.h: Update.
3036 * gnulib/import/chdir-long.c: Update.
3037 * gnulib/import/chdir-long.h: Update.
3038 * gnulib/import/cloexec.c: Update.
3039 * gnulib/import/cloexec.h: Update.
3040 * gnulib/import/close.c: Update.
3041 * gnulib/import/closedir.c: Update.
3042 * gnulib/import/config.charset: Update.
3043 * gnulib/import/dirent-private.h: Update.
3044 * gnulib/import/dirent.in.h: Update.
3045 * gnulib/import/dirfd.c: Update.
3046 * gnulib/import/dirname-lgpl.c: Update.
3047 * gnulib/import/dirname.h: Update.
3048 * gnulib/import/dosname.h: Update.
3049 * gnulib/import/dup-safer-flag.c: Update.
3050 * gnulib/import/dup-safer.c: Update.
3051 * gnulib/import/dup.c: Update.
3052 * gnulib/import/dup2.c: Update.
3053 * gnulib/import/errno.in.h: Update.
3054 * gnulib/import/error.c: Update.
3055 * gnulib/import/error.h: Update.
3056 * gnulib/import/exitfail.c: Update.
3057 * gnulib/import/exitfail.h: Update.
3058 * gnulib/import/extra/update-copyright: Update.
3059 * gnulib/import/fchdir.c: Update.
3060 * gnulib/import/fcntl.c: Update.
3061 * gnulib/import/fcntl.in.h: Update.
3062 * gnulib/import/fd-hook.c: Update.
3063 * gnulib/import/fd-hook.h: Update.
3064 * gnulib/import/fd-safer-flag.c: Update.
3065 * gnulib/import/fd-safer.c: Update.
3066 * gnulib/import/fdopendir.c: Update.
3067 * gnulib/import/filename.h: Update.
3068 * gnulib/import/filenamecat-lgpl.c: Update.
3069 * gnulib/import/filenamecat.h: Update.
3070 * gnulib/import/flexmember.h: Update.
3071 * gnulib/import/float+.h: Update.
3072 * gnulib/import/float.c: Update.
3073 * gnulib/import/float.in.h: Update.
3074 * gnulib/import/fnmatch.c: Update.
3075 * gnulib/import/fnmatch.in.h: Update.
3076 * gnulib/import/fnmatch_loop.c: Update.
3077 * gnulib/import/fpucw.h: Update.
3078 * gnulib/import/frexp.c: Update.
3079 * gnulib/import/frexpl.c: Update.
3080 * gnulib/import/fstat.c: Update.
3081 * gnulib/import/fstatat.c: Update.
3082 * gnulib/import/getcwd-lgpl.c: Update.
3083 * gnulib/import/getcwd.c: Update.
3084 * gnulib/import/getdtablesize.c: Update.
3085 * gnulib/import/getlogin_r.c: Update.
3086 * gnulib/import/getprogname.c: Update.
3087 * gnulib/import/getprogname.h: Update.
3088 * gnulib/import/gettext.h: Update.
3089 * gnulib/import/gettimeofday.c: Update.
3090 * gnulib/import/glob-libc.h: Update.
3091 * gnulib/import/glob.c: Update.
3092 * gnulib/import/glob.in.h: Update.
3093 * gnulib/import/glob_internal.h: Update.
3094 * gnulib/import/glob_pattern_p.c: Update.
3095 * gnulib/import/globfree.c: Update.
3096 * gnulib/import/hard-locale.c: Update.
3097 * gnulib/import/hard-locale.h: Update.
3098 * gnulib/import/intprops.h: Update.
3099 * gnulib/import/inttypes.in.h: Update.
3100 * gnulib/import/isnan.c: Update.
3101 * gnulib/import/isnand-nolibm.h: Update.
3102 * gnulib/import/isnand.c: Update.
3103 * gnulib/import/isnanl-nolibm.h: Update.
3104 * gnulib/import/isnanl.c: Update.
3105 * gnulib/import/itold.c: Update.
3106 * gnulib/import/libc-config.h: Update.
3107 * gnulib/import/limits.in.h: Update.
3108 * gnulib/import/localcharset.c: Update.
3109 * gnulib/import/localcharset.h: Update.
3110 * gnulib/import/localtime-buffer.c: Update.
3111 * gnulib/import/localtime-buffer.h: Update.
3112 * gnulib/import/lstat.c: Update.
3113 * gnulib/import/m4/00gnulib.m4: Update.
3114 * gnulib/import/m4/__inline.m4: Update.
3115 * gnulib/import/m4/absolute-header.m4: Update.
3116 * gnulib/import/m4/alloca.m4: Update.
3117 * gnulib/import/m4/builtin-expect.m4: Update.
3118 * gnulib/import/m4/canonicalize.m4: Update.
3119 * gnulib/import/m4/chdir-long.m4: Update.
3120 * gnulib/import/m4/close.m4: Update.
3121 * gnulib/import/m4/closedir.m4: Update.
3122 * gnulib/import/m4/configmake.m4: Update.
3123 * gnulib/import/m4/d-ino.m4: Update.
3124 * gnulib/import/m4/d-type.m4: Update.
3125 * gnulib/import/m4/dirent_h.m4: Update.
3126 * gnulib/import/m4/dirfd.m4: Update.
3127 * gnulib/import/m4/dirname.m4: Update.
3128 * gnulib/import/m4/double-slash-root.m4: Update.
3129 * gnulib/import/m4/dup.m4: Update.
3130 * gnulib/import/m4/dup2.m4: Update.
3131 * gnulib/import/m4/eealloc.m4: Update.
3132 * gnulib/import/m4/environ.m4: Update.
3133 * gnulib/import/m4/errno_h.m4: Update.
3134 * gnulib/import/m4/error.m4: Update.
3135 * gnulib/import/m4/exponentd.m4: Update.
3136 * gnulib/import/m4/exponentl.m4: Update.
3137 * gnulib/import/m4/extensions.m4: Update.
3138 * gnulib/import/m4/extern-inline.m4: Update.
3139 * gnulib/import/m4/fchdir.m4: Update.
3140 * gnulib/import/m4/fcntl-o.m4: Update.
3141 * gnulib/import/m4/fcntl.m4: Update.
3142 * gnulib/import/m4/fcntl_h.m4: Update.
3143 * gnulib/import/m4/fdopendir.m4: Update.
3144 * gnulib/import/m4/filenamecat.m4: Update.
3145 * gnulib/import/m4/flexmember.m4: Update.
3146 * gnulib/import/m4/float_h.m4: Update.
3147 * gnulib/import/m4/fnmatch.m4: Update.
3148 * gnulib/import/m4/fnmatch_h.m4: Update.
3149 * gnulib/import/m4/fpieee.m4: Update.
3150 * gnulib/import/m4/frexp.m4: Update.
3151 * gnulib/import/m4/frexpl.m4: Update.
3152 * gnulib/import/m4/fstat.m4: Update.
3153 * gnulib/import/m4/fstatat.m4: Update.
3154 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3155 * gnulib/import/m4/getcwd-path-max.m4: Update.
3156 * gnulib/import/m4/getcwd.m4: Update.
3157 * gnulib/import/m4/getdtablesize.m4: Update.
3158 * gnulib/import/m4/getlogin.m4: Update.
3159 * gnulib/import/m4/getlogin_r.m4: Update.
3160 * gnulib/import/m4/getpagesize.m4: Update.
3161 * gnulib/import/m4/getprogname.m4: Update.
3162 * gnulib/import/m4/gettimeofday.m4: Update.
3163 * gnulib/import/m4/glibc21.m4: Update.
3164 * gnulib/import/m4/glob.m4: Update.
3165 * gnulib/import/m4/glob_h.m4: Update.
3166 * gnulib/import/m4/gnulib-cache.m4: Update.
3167 * gnulib/import/m4/gnulib-common.m4: Update.
3168 * gnulib/import/m4/gnulib-comp.m4: Update.
3169 * gnulib/import/m4/gnulib-tool.m4: Update.
3170 * gnulib/import/m4/hard-locale.m4: Update.
3171 * gnulib/import/m4/include_next.m4: Update.
3172 * gnulib/import/m4/inttypes-pri.m4: Update.
3173 * gnulib/import/m4/inttypes.m4: Update.
3174 * gnulib/import/m4/isnand.m4: Update.
3175 * gnulib/import/m4/isnanl.m4: Update.
3176 * gnulib/import/m4/largefile.m4: Update.
3177 * gnulib/import/m4/limits-h.m4: Update.
3178 * gnulib/import/m4/localcharset.m4: Update.
3179 * gnulib/import/m4/locale-fr.m4: Update.
3180 * gnulib/import/m4/locale-ja.m4: Update.
3181 * gnulib/import/m4/locale-zh.m4: Update.
3182 * gnulib/import/m4/localtime-buffer.m4: Update.
3183 * gnulib/import/m4/longlong.m4: Update.
3184 * gnulib/import/m4/lstat.m4: Update.
3185 * gnulib/import/m4/malloc.m4: Update.
3186 * gnulib/import/m4/malloca.m4: Update.
3187 * gnulib/import/m4/math_h.m4: Update.
3188 * gnulib/import/m4/mbrtowc.m4: Update.
3189 * gnulib/import/m4/mbsinit.m4: Update.
3190 * gnulib/import/m4/mbsrtowcs.m4: Update.
3191 * gnulib/import/m4/mbstate_t.m4: Update.
3192 * gnulib/import/m4/memchr.m4: Update.
3193 * gnulib/import/m4/memmem.m4: Update.
3194 * gnulib/import/m4/mempcpy.m4: Update.
3195 * gnulib/import/m4/memrchr.m4: Update.
3196 * gnulib/import/m4/mkdir.m4: Update.
3197 * gnulib/import/m4/mkstemp.m4: Update.
3198 * gnulib/import/m4/mmap-anon.m4: Update.
3199 * gnulib/import/m4/mode_t.m4: Update.
3200 * gnulib/import/m4/msvc-inval.m4: Update.
3201 * gnulib/import/m4/msvc-nothrow.m4: Update.
3202 * gnulib/import/m4/multiarch.m4: Update.
3203 * gnulib/import/m4/nocrash.m4: Update.
3204 * gnulib/import/m4/off_t.m4: Update.
3205 * gnulib/import/m4/onceonly.m4: Update.
3206 * gnulib/import/m4/open-cloexec.m4: Update.
3207 * gnulib/import/m4/open.m4: Update.
3208 * gnulib/import/m4/openat.m4: Update.
3209 * gnulib/import/m4/opendir.m4: Update.
3210 * gnulib/import/m4/pathmax.m4: Update.
3211 * gnulib/import/m4/rawmemchr.m4: Update.
3212 * gnulib/import/m4/readdir.m4: Update.
3213 * gnulib/import/m4/readlink.m4: Update.
3214 * gnulib/import/m4/realloc.m4: Update.
3215 * gnulib/import/m4/rename.m4: Update.
3216 * gnulib/import/m4/rewinddir.m4: Update.
3217 * gnulib/import/m4/rmdir.m4: Update.
3218 * gnulib/import/m4/save-cwd.m4: Update.
3219 * gnulib/import/m4/secure_getenv.m4: Update.
3220 * gnulib/import/m4/setenv.m4: Update.
3221 * gnulib/import/m4/signal_h.m4: Update.
3222 * gnulib/import/m4/ssize_t.m4: Update.
3223 * gnulib/import/m4/stat-time.m4: Update.
3224 * gnulib/import/m4/stat.m4: Update.
3225 * gnulib/import/m4/std-gnu11.m4: Update.
3226 * gnulib/import/m4/stdbool.m4: Update.
3227 * gnulib/import/m4/stddef_h.m4: Update.
3228 * gnulib/import/m4/stdint.m4: Update.
3229 * gnulib/import/m4/stdio_h.m4: Update.
3230 * gnulib/import/m4/stdlib_h.m4: Update.
3231 * gnulib/import/m4/strchrnul.m4: Update.
3232 * gnulib/import/m4/strdup.m4: Update.
3233 * gnulib/import/m4/strerror.m4: Update.
3234 * gnulib/import/m4/string_h.m4: Update.
3235 * gnulib/import/m4/strstr.m4: Update.
3236 * gnulib/import/m4/strtok_r.m4: Update.
3237 * gnulib/import/m4/sys_socket_h.m4: Update.
3238 * gnulib/import/m4/sys_stat_h.m4: Update.
3239 * gnulib/import/m4/sys_time_h.m4: Update.
3240 * gnulib/import/m4/sys_types_h.m4: Update.
3241 * gnulib/import/m4/tempname.m4: Update.
3242 * gnulib/import/m4/time_h.m4: Update.
3243 * gnulib/import/m4/unistd-safer.m4: Update.
3244 * gnulib/import/m4/unistd_h.m4: Update.
3245 * gnulib/import/m4/warn-on-use.m4: Update.
3246 * gnulib/import/m4/wchar_h.m4: Update.
3247 * gnulib/import/m4/wchar_t.m4: Update.
3248 * gnulib/import/m4/wctype_h.m4: Update.
3249 * gnulib/import/m4/wint_t.m4: Update.
3250 * gnulib/import/malloc.c: Update.
3251 * gnulib/import/malloc/scratch_buffer.h: Update.
3252 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3253 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3254 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3255 * gnulib/import/malloca.c: Update.
3256 * gnulib/import/malloca.h: Update.
3257 * gnulib/import/malloca.valgrind: Update.
3258 * gnulib/import/math.in.h: Update.
3259 * gnulib/import/mbrtowc.c: Update.
3260 * gnulib/import/mbsinit.c: Update.
3261 * gnulib/import/mbsrtowcs-impl.h: Update.
3262 * gnulib/import/mbsrtowcs-state.c: Update.
3263 * gnulib/import/mbsrtowcs.c: Update.
3264 * gnulib/import/memchr.c: Update.
3265 * gnulib/import/memmem.c: Update.
3266 * gnulib/import/mempcpy.c: Update.
3267 * gnulib/import/memrchr.c: Update.
3268 * gnulib/import/mkdir.c: Update.
3269 * gnulib/import/mkstemp.c: Update.
3270 * gnulib/import/msvc-inval.c: Update.
3271 * gnulib/import/msvc-inval.h: Update.
3272 * gnulib/import/msvc-nothrow.c: Update.
3273 * gnulib/import/msvc-nothrow.h: Update.
3274 * gnulib/import/open.c: Update.
3275 * gnulib/import/openat-die.c: Update.
3276 * gnulib/import/openat-priv.h: Update.
3277 * gnulib/import/openat-proc.c: Update.
3278 * gnulib/import/openat.c: Update.
3279 * gnulib/import/openat.h: Update.
3280 * gnulib/import/opendir.c: Update.
3281 * gnulib/import/pathmax.h: Update.
3282 * gnulib/import/pipe-safer.c: Update.
3283 * gnulib/import/rawmemchr.c: Update.
3284 * gnulib/import/readdir.c: Update.
3285 * gnulib/import/readlink.c: Update.
3286 * gnulib/import/realloc.c: Update.
3287 * gnulib/import/ref-add.sin: Update.
3288 * gnulib/import/ref-del.sin: Update.
3289 * gnulib/import/rename.c: Update.
3290 * gnulib/import/rewinddir.c: Update.
3291 * gnulib/import/rmdir.c: Update.
3292 * gnulib/import/same-inode.h: Update.
3293 * gnulib/import/save-cwd.c: Update.
3294 * gnulib/import/save-cwd.h: Update.
3295 * gnulib/import/scratch_buffer.h: Update.
3296 * gnulib/import/secure_getenv.c: Update.
3297 * gnulib/import/setenv.c: Update.
3298 * gnulib/import/signal.in.h: Update.
3299 * gnulib/import/stat-time.c: Update.
3300 * gnulib/import/stat-time.h: Update.
3301 * gnulib/import/stat-w32.c: Update.
3302 * gnulib/import/stat-w32.h: Update.
3303 * gnulib/import/stat.c: Update.
3304 * gnulib/import/stdbool.in.h: Update.
3305 * gnulib/import/stddef.in.h: Update.
3306 * gnulib/import/stdint.in.h: Update.
3307 * gnulib/import/stdio.in.h: Update.
3308 * gnulib/import/stdlib.in.h: Update.
3309 * gnulib/import/str-two-way.h: Update.
3310 * gnulib/import/strchrnul.c: Update.
3311 * gnulib/import/strdup.c: Update.
3312 * gnulib/import/streq.h: Update.
3313 * gnulib/import/strerror-override.c: Update.
3314 * gnulib/import/strerror-override.h: Update.
3315 * gnulib/import/strerror.c: Update.
3316 * gnulib/import/string.in.h: Update.
3317 * gnulib/import/stripslash.c: Update.
3318 * gnulib/import/strnlen1.c: Update.
3319 * gnulib/import/strnlen1.h: Update.
3320 * gnulib/import/strstr.c: Update.
3321 * gnulib/import/strtok_r.c: Update.
3322 * gnulib/import/sys_stat.in.h: Update.
3323 * gnulib/import/sys_time.in.h: Update.
3324 * gnulib/import/sys_types.in.h: Update.
3325 * gnulib/import/tempname.c: Update.
3326 * gnulib/import/tempname.h: Update.
3327 * gnulib/import/time.in.h: Update.
3328 * gnulib/import/unistd--.h: Update.
3329 * gnulib/import/unistd-safer.h: Update.
3330 * gnulib/import/unistd.in.h: Update.
3331 * gnulib/import/unsetenv.c: Update.
3332 * gnulib/import/verify.h: Update.
3333 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3334 * gnulib/import/wchar.in.h: Update.
3335 * gnulib/import/wctype.in.h: Update.
3336 * gnulib/import/xalloc-oversized.h: Update.
3337 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3338 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3339
3340 2018-08-16 Gary Benson <gbenson@redhat.com>
3341
3342 PR gdb/13000:
3343 * gdb/main.c (captured_main_1): Exit with nonzero status
3344 in batch mode if the last command to be executed failed.
3345 * NEWS: Mention the above.
3346
3347 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
3348
3349 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3350 end of warning message.
3351
3352 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3353
3354 PR gdb/22943:
3355 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3356 (aarch64_extract_return_value): Use
3357 aapcs_is_vfp_call_or_return_candidate.
3358 (aarch64_return_in_memory): Likewise.
3359 (aarch64_store_return_value): Likewise.
3360
3361 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3362
3363 * aarch64-tdep.c
3364 (aapcs_is_vfp_call_or_return_candidate): Make static
3365 (pass_in_v_or_stack): Remove function.
3366 (pass_in_v_vfp_candidate): New function.
3367 (aarch64_push_dummy_call): Check for float register candidates.
3368
3369 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3370
3371 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3372 (aapcs_is_vfp_call_or_return_candidate_1): New function.
3373 (aapcs_is_vfp_call_or_return_candidate): Likewise.
3374
3375 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
3376
3377 PR build/23399
3378 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3379 (struct ipa_sym_addresses): Rename to...
3380 (struct ipa_sym_addresses_common): ... this.
3381 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3382
3383 2018-08-28 Tom Tromey <tom@tromey.com>
3384
3385 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3386 (token_fifo): Now a std::vector.
3387 (yylex, c_parse): Update.
3388 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3389 (token_fifo): Now a std::vector.
3390 (yylex, d_parse): Update.
3391 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3392 (token_fifo): Now a std::vector.
3393 (yylex, go_parse): Update.
3394
3395 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
3396
3397 * parser-defs.h (struct type_stack) <elements>: Change type to
3398 std::vector<union type_stack_elt>.
3399 <depth, size>: Remove.
3400 * parse.c (parse_exp_in_context_1): Adjust.
3401 (type_stack_reserve): Remove.
3402 (check_type_stack_depth): Remove.
3403 (insert_into_type_stack): Adjust to std::vector.
3404 (insert_type): Likewise.
3405 (push_type): Likewise.
3406 (push_type_int): Likewise.
3407 (insert_type_address_space): Likewise.
3408 (pop_type): Likewise.
3409 (pop_type_int): Likewise.
3410 (pop_typelist): Likewise.
3411 (pop_type_stack): Likewise.
3412 (append_type_stack): Likewise.
3413 (push_type_stack): Likewise.
3414 (get_type_stack): Likewise.
3415 (type_stack_cleanup): Likewise.
3416 (push_typelist): Likewise.
3417 (follow_types): Likewise.
3418 (_initialize_parse): Likewise.
3419
3420 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
3421
3422 * NEWS: Mention csky target.
3423
3424 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
3425 Hafiz Abid Qadeer <abidh@codesourcery.com>
3426 Don Breazeal <donb@codesourcery.com>
3427
3428 * csky-linux-tdep.c: New file.
3429 * csky-tdep.c: Likewise.
3430 * csky-tdep.h: Likewise.
3431 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3432 csky-tdep.o.
3433 (HFILES_NO_SRCDIR): Add csky-tdep.h.
3434 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3435 * configure.tgt: Add csky support.
3436
3437 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
3438
3439 * python/py-framefilter.c (py_print_frame): Print frame architecture
3440 when printing on an MI output.
3441
3442 2018-08-27 Tom Tromey <tom@tromey.com>
3443
3444 PR build/23087:
3445 * configure: Rebuild.
3446 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3447
3448 2018-08-27 Tom Tromey <tom@tromey.com>
3449
3450 * aarch64-linux-tdep.c
3451 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3452 casts to int.
3453
3454 2018-08-27 Tom Tromey <tom@tromey.com>
3455
3456 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3457 unsigned.
3458 (ppc64_standard_linkage1, ppc64_standard_linkage2)
3459 (ppc64_standard_linkage3, ppc64_standard_linkage4)
3460 (ppc64_standard_linkage5, ppc64_standard_linkage6)
3461 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3462 unsigned.
3463
3464 2018-08-27 Tom Tromey <tom@tromey.com>
3465
3466 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3467 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3468
3469 2018-08-27 Tom Tromey <tom@tromey.com>
3470
3471 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3472 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3473 ULONGEST_MAX.
3474 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3475 ULONGEST_MAX.
3476 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3477 ULONGEST_MAX.
3478 * sparc-linux-tdep.c (sparc32_linux_sigframe)
3479 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3480 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3481 ULONGEST_MAX.
3482 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3483 (ppc64_linux_sigaction_tramp_frame)
3484 (ppc32_linux_sighandler_tramp_frame)
3485 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3486 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3487 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3488 * mn10300-linux-tdep.c (am33_linux_sigframe)
3489 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3490 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3491 * mips-linux-tdep.c (mips_linux_o32_sigframe)
3492 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3493 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3494 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3495 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3496 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3497 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3498 * microblaze-linux-tdep.c
3499 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3500 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3501 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3502 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3503 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3504 * common/common-types.h (ULONGEST_MAX): New define.
3505 (CORE_ADDR_MAX): Fix formatting.
3506 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3507 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3508 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3509 (arm_linux_rt_sigreturn_tramp_frame)
3510 (arm_eabi_linux_sigreturn_tramp_frame)
3511 (arm_eabi_linux_rt_sigreturn_tramp_frame)
3512 (thumb2_eabi_linux_sigreturn_tramp_frame)
3513 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3514 (arm_linux_restart_syscall_tramp_frame)
3515 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3516 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3517 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3518 ULONGEST_MAX.
3519 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3520
3521 2018-08-27 Tom Tromey <tom@tromey.com>
3522
3523 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3524 CORE_ADDR_MAX.
3525 * mips-tdep.c (mips_deal_with_atomic_sequence)
3526 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3527 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3528 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3529 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3530 CORE_ADDR_MAX.
3531 * aarch64-tdep.c (aarch64_software_single_step): Use
3532 CORE_ADDR_MAX.
3533
3534 2018-08-27 Tom Tromey <tom@tromey.com>
3535
3536 * linespec.c (complete_linespec_component): Add cast to "char".
3537 * completer.c (completion_tracker::build_completion_result): Add
3538 cast to "char".
3539
3540 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3541
3542 * solist.h (struct solist, struct target_so_ops): Fix
3543 indentation.
3544
3545 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3546
3547 * ada-tasks.c (ada_task_info_s): Remove typedef.
3548 (DEF_VEC_O(ada_task_info_s)): Remove.
3549 (struct ada_tasks_inferior_data): Initialize fields.
3550 <task_list>: Make an std::vector.
3551 (get_ada_tasks_inferior_data): Allocate with new.
3552 (ada_get_task_number): Adjust.
3553 (get_task_number_from_id): Likewise.
3554 (valid_task_id): Likewise.
3555 (ada_get_task_info_from_ptid): Likewise.
3556 (iterate_over_live_ada_tasks): Likewise.
3557 (add_ada_task): Likewise.
3558 (read_known_tasks): Likewise.
3559 (ada_build_task_list): Likewise.
3560 (print_ada_task_info): Likewise.
3561 (info_task): Likewise.
3562 (task_command_1): Likewise.
3563
3564 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3565
3566 * ada-lang.c (add_angle_brackets): Return std::string.
3567
3568 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
3569
3570 * python/py-threadevent.c (py_get_event_thread): Initialize
3571 pythread.
3572
3573 2018-08-24 Pedro Alves <palves@redhat.com>
3574
3575 * python/py-bpevent.c (create_breakpoint_event_object): Use
3576 copy-initialization.
3577 * python/py-continueevent.c (emit_continue_event): Use
3578 copy-initialization.
3579 * python/py-exitedevent.c (create_exited_event_object): Return a
3580 gdbpy_ref<>.
3581 (emit_exited_event): Use copy-initialization.
3582 * python/py-inferior.c (python_new_inferior)
3583 (python_inferior_deleted, add_thread_object): Use
3584 copy-initialization.
3585 * python/py-infevents.c (create_inferior_call_event_object)
3586 (create_register_changed_event_object)
3587 (create_memory_changed_event_object): Return a gdbpy_ref<>.
3588 (emit_inferior_call_event, emit_memory_changed_event)
3589 (emit_register_changed_event): Use copy-initialization.
3590 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3591 Return a gdbpy_ref<>.
3592 (emit_new_objfile_event): Use copy-initialization.
3593 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3594 (emit_clear_objfiles_event): Use copy-initialization.
3595 * python/py-signalevent.c (create_signal_event_object): Use
3596 copy-initialization.
3597 * python/py-threadevent.c (create_thread_event_object): Use
3598 copy-initialization.
3599
3600 2018-08-24 Pedro Alves <palves@redhat.com>
3601 Simon Marchi <simon.marchi@ericsson.com>
3602
3603 PR gdb/23379
3604 * python/py-continueevent.c: Include "gdbthread.h".
3605 (create_continue_event_object): Add intro comment. Add 'ptid'
3606 parameter. Use it to find thread to pass to
3607 create_thread_event_object.
3608 (emit_continue_event): Pass PTID down to
3609 create_continue_event_object.
3610 * python/py-event.h (py_get_event_thread): Declare.
3611 (create_thread_event_object): Remove default from 'thread'
3612 parameter.
3613 * python/py-stopevent.c (create_stop_event_object): Use
3614 py_get_event_thread.
3615 * python/py-threadevent.c (get_event_thread): Rename to ...
3616 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3617 and use it to find the thread.
3618 (create_thread_event_object): Assert that THREAD isn't null.
3619 Don't find the event thread here.
3620
3621 2018-08-23 Kevin Buettner <kevinb@redhat.com>
3622
3623 * block.h (blockrange, blockranges): New struct declarations.
3624 (struct block): Add new field named `ranges'.
3625 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3626 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3627 macros for accessing ranges in struct block.
3628 (make_blockranges): New declaration.
3629 block.c (make_blockranges): New function.
3630 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3631 for block.
3632 * symtab.h (find_pc_partial_function): Add new parameter `block'.
3633 * blockframe.c (cache_pc_function_block): New static global.
3634 (clear_pc_function_cache): Clear cache_pc_function_block.
3635 (find_pc_partial_function): Move comment to symtab.h. Add
3636 support for non-contiguous blocks.
3637 * cli/cli-cmds.c (block.h): Include.
3638 (print_disassembly): Handle printing of non-contiguous blocks.
3639 (disassemble_current_function): Likewise.
3640 (disassemble_command): Likewise.
3641
3642 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3643 BLOCK_START.
3644 * blockframe.c (get_pc_function_start): Likewise.
3645 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3646 (gcc_symbol_address): Likewise.
3647 * compile/compile-object-run.c (compile_object_run): Likewise.
3648 * compile/compile.c (get_expr_block_and_pc): Likewise.
3649 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3650 (func_addr_to_tail_call_list): Likewise.
3651 * findvar.c (default_read_var_value): Likewise.
3652 * inline-frame.c (inline_frame_this_id): Likewise.
3653 (skip-inline_frames): Likewise.
3654 * infcmd.c (until_next_command): Likewise.
3655 * linespec.c (convert_linespec_to_sals): Likewise.
3656 * parse.c (parse_exp_in_context_1): Likewise.
3657 * printcmd.c (build_address_symbolic): likewise.
3658 (info_address_command): Likewise.
3659 symtab.c (find_function_start_sal): Likewise.
3660 (skip_prologue_sal): Likewise.
3661 (find_function_alias_target): Likewise.
3662 (find_gnu_ifunc): Likewise.
3663 * stack.c (find_frame_funname): Likewise.
3664 * symtab.c (fixup_symbol_section): Likewise.
3665 (find_function_start_sal): Likewise.
3666 (skip_prologue_sal): Likewsie.
3667 (find_function_alias_target): Likewise.
3668 (find_gnu_ifunc): Likewise.
3669 * tracepoint.c (info_scope_command): Likewise.
3670 * value.c (value_fn_field): Likewise.
3671
3672 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3673 in place of find_pc_partial_function.
3674 * blockframe.c (find_function_entry_range_from_pc): New function.
3675 * symtab.h (find_function_entry_range_from_pc): Declare and document.
3676 * objfiles.c (objfile_relocate1): Relocate start and end addresses
3677 for each range in a block.
3678
3679
3680 2018-08-23 Xavier Roirand <roirand@adacore.com>
3681
3682 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3683 incrementation.
3684
3685 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3686
3687 * solib-svr4.c (read_program_headers_from_bfd): Return
3688 gdb::optional<gdb::byte_vector>.
3689 (svr4_exec_displacement): Adjust.
3690
3691 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3692
3693 * solib-svr4.c (read_program_header): Return
3694 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3695 (find_program_interpreter): Return
3696 gdb::optional<gdb::byte_vector>.
3697 (scan_dyntag_auxv): Adjust.
3698 (enable_break): Adjust.
3699 (svr4_exec_displacement): Adjust.
3700
3701 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3702
3703 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3704 * inf-child.c (inf_child_target::terminal_save_inferior): New.
3705
3706 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3707
3708 * guile/scm-string.c (gdbscm_scm_from_printf): Use
3709 string_vprintf.
3710 * guile/scm-utils.c (gdbscm_printf): Likewise.
3711 * serial.c (serial_printf): Likewise.
3712 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3713
3714 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
3715
3716 * stack.c (print_frame): Print frame architecture when printing on
3717 an MI output.
3718 * NEWS: Mention new "arch" attribute in frame output.
3719
3720 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3721
3722 * arch/aarch64.h (aarch64_regnum): Update comment.
3723
3724 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3725
3726 * NEWS: Add SVE to 8.2 section.
3727
3728 2018-08-21 Pedro Alves <palves@redhat.com>
3729
3730 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3731 out from gdbscm_parse_function_args.
3732 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3733 gdbscm_parse_function_args_1.
3734
3735 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
3736
3737 PR gdb/17816
3738 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3739 operator.
3740
3741 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
3742
3743 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3744
3745 2018-08-19 Michael Spang <spang@google.com>
3746
3747 PR gdb/11786
3748 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3749 for PT_TLS segments.
3750
3751 2018-08-18 Kevin Buettner <kevinb@redhat.com>
3752
3753 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3754 dwarf_variable_value.
3755 * dwarf2-frame.c (class dwarf_expr_executor):
3756 Add override for dwarf_variable_value.
3757 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3758 (class symbol_needs_eval_context): Likewise.
3759 (indirect_synthetic_pointer): Add forward declaration.
3760 (sect_variable_value): New function.
3761 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3762 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3763 for DW_OP_GNU_variable_value.
3764
3765 2018-08-16 Tom Tromey <tom@tromey.com>
3766
3767 * top.c (read_command_file): Update.
3768 (command_line_input): Remove "repeat" argument.
3769 * ada-lang.c (get_selections): Update.
3770 * linespec.c (decode_line_2): Update.
3771 * defs.h (command_line_input): Remove argument.
3772 * cli/cli-script.c (read_next_line): Update.
3773 * python/py-gdb-readline.c: Update.
3774
3775 2018-08-17 Tom Tromey <tom@tromey.com>
3776
3777 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3778 command_line_input.
3779
3780 2018-08-15 Tom Tromey <tom@tromey.com>
3781
3782 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3783
3784 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
3785
3786 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3787 If used, use find_pc_partial_function to find address range
3788 to disassemble.
3789 * mi/mi-main.c (mi_cmd_list_features): Report
3790 "data-disassemble-a-option" feature.
3791 * NEWS: Mention new -data-disassemble option -a.
3792
3793 2018-08-13 Tom Tromey <tom@tromey.com>
3794
3795 * common/common-defs.h (_FORTIFY_SOURCE): Define.
3796
3797 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3798
3799 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3800 (aarch64_linux_collect_sve_regset): Likewise.
3801 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3802 * regcache.h (regcache_map_entry_size): New function.
3803
3804 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3805
3806 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3807 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3808 (SVE_HEADER_VL_LENGTH): Likewise.
3809 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3810 (SVE_HEADER_FLAGS_LENGTH): Likewise.
3811 (SVE_HEADER_RESERVED_LENGTH): Likewise.
3812 (SVE_HEADER_SIZE_OFFSET): Likewise.
3813 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3814 (SVE_HEADER_VL_OFFSET): Likewise.
3815 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3816 (SVE_HEADER_FLAGS_OFFSET): Likewise.
3817 (SVE_HEADER_RESERVED_OFFSET): Likewise.
3818 (SVE_HEADER_SIZE): Likewise.
3819 (aarch64_linux_core_read_vq): Add function.
3820 (aarch64_linux_core_read_description): Check for SVE section.
3821
3822 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3823
3824 * aarch64-fbsd-tdep.c
3825 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3826 collect_size.
3827 * aarch64-linux-tdep.c
3828 (aarch64_linux_iterate_over_regset_sections): Likewise.
3829 * alpha-linux-tdep.c
3830 (alpha_linux_iterate_over_regset_sections):
3831 * alpha-nbsd-tdep.c
3832 (alphanbsd_iterate_over_regset_sections): Likewise.
3833 * amd64-fbsd-tdep.c
3834 (amd64fbsd_iterate_over_regset_sections): Likewise.
3835 * amd64-linux-tdep.c
3836 (amd64_linux_iterate_over_regset_sections): Likewise.
3837 * arm-bsd-tdep.c
3838 (armbsd_iterate_over_regset_sections): Likewise.
3839 * arm-fbsd-tdep.c
3840 (arm_fbsd_iterate_over_regset_sections): Likewise.
3841 * arm-linux-tdep.c
3842 (arm_linux_iterate_over_regset_sections): Likewise.
3843 * corelow.c (get_core_registers_cb): Likewise.
3844 (core_target::fetch_registers): Likewise.
3845 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3846 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3847 * gdbarch.h (void): Regenerate.
3848 * gdbarch.sh: Add supply_size and collect_size.
3849 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3850 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3851 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3852 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3853 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3854 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3855 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3856 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3857 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3858 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3859 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3860 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3861 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3862 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3863 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3864 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3865 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3866 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3867 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3868 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3869 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3870 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3871 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3872 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3873 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3874 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3875 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3876 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3877 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3878 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3879
3880 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3881
3882 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3883 with string_printf.
3884
3885 2018-08-10 Keith Seitz <keiths@redhat.com>
3886
3887 * compile/compile-c-support.c (add_code_header, add_code_footer):
3888 Move into policy class.
3889 (c_push_user_expression, pop_user_expression_nop)
3890 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3891 (compile_program): New host class.
3892 (c_compile_program): New typedef.
3893 (c_compute_porgram): Use c_compile_program.
3894
3895 2018-08-10 Keith Seitz <keiths@redhat.com>
3896
3897 * compile/compile-internal.h (compile_instance::~compile_instance):
3898 Remove calls to htab_delete.
3899 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3900 * compile.c (compile_instance::compile_instance): Initialize
3901 htab unique pointers.
3902 (compile_instance::get_cached_type, compile_instance::insert_type)
3903 (compile_instance::error_symbol_once): Update for unique_ptr.
3904
3905 2018-08-10 Keith Seitz <keiths@redhat.com>
3906
3907 * compile/compile-c-symbols.c (struct symbol_error)
3908 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3909 (compile_instance::insert_symbol_error)
3910 (compile_instance::error_symbol_once): Move to ...
3911 * compile/compile.c: ... here.
3912
3913 2018-08-10 Keith Seitz <keiths@redhat.com>
3914
3915 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3916 instead of `new_compile_instance'.
3917 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3918 Update description.
3919 If the symbol error map is not initialized, create it.
3920 (generate_c_for_for_one_symbol): Do not check/initialize
3921 the symbol error map.
3922 * compile/compile-c-types.c (compile_c_instance): Make a class.
3923 Update all callers.
3924 (compile_instance::compile_instance): Initialize the type cache.
3925 (get_cached_type): New function.
3926 (insert_type): Update description.
3927 (compile_c_instance::m_default_cflags): Define.
3928 (convert_type): Update description. Use get_cached_type.
3929 (delete_instance): Moved to destructor.
3930 (new_compile_instance): Moved to constructor.
3931 * compile/compile-c.h (compile_c_instance): Make class inheriting
3932 from compile_instance.
3933 <base>: Remove field.
3934 <type_map, symbol_err_map>: Move to base class.
3935 <c_plugin>: Rename to `m_plugin' and remove pointer type.
3936 * compile/compile-internal.h (compile_instance): Make class.
3937 <type_map_t, symbol_err_map_t>: Define.
3938 <fe>: Rename to `m_gcc_fe'.
3939 <scope, block, gcc_target_options>: Add `m_' prefix.
3940 <m_type_map, m_symbol_err_map>: New fields, moved from
3941 compile_c_instance.
3942 <destroy>: Remove.
3943 (convert_type, new_compile_instance): Remove.
3944 * compile/compile.c (cleanup_compile_instance): Remove.
3945 (compile_to_object): Use unique_ptr to eliminate cleanups.
3946 (compile_instance::set_print_callback, compile_instance::version)
3947 (compile_instance::set_verbose)
3948 (compile_instance::set_driver_filename)
3949 (compile_instance::set_triplet_regexp)
3950 (compile_instance::set_arguments)
3951 (compile_instance::set_source_file)
3952 (compile_instance::compile): Define.
3953
3954 2018-08-10 Keith Seitz <keiths@redhat.com>
3955
3956 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3957 * compile/compile-c-types.c: Define GCC_METHODN macros and include
3958 gcc-c-fe.def to define C plugin.
3959 (delete_instance): Delete `c_plugin'.
3960 (new_compile_instance): Initialize `c_plugin'.
3961 * compile/compile-c.h: Include gcc_c_plugin.h.
3962 (struct compile_c_instance) <c_plugin>: New member.
3963 * gcc-c-plugin.h: New file.
3964 Update all callers with API change.
3965
3966 2018-08-10 Keith Seitz <keiths@redhat.com>
3967
3968 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3969 (HFILES_NO_SRCDIR): ... to here.
3970 Add compile-internal.h and compile-c.h.
3971 * compile/compile-c-support.c: Include compile-c.h.
3972 * compile/compile-c-symbols.c: Include compile-c.h.
3973 (generate_c_for_variable_locations): Update comment.
3974 * compile/compile-c-types.c: Include compile-c.h.
3975 * compile/compile-c.h: New file -- moved C language declarations
3976 from other files here.
3977 * compile/compile-internal.h: Do not include hashtab.h or
3978 common/enum-flags.h.
3979 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3980 (gcc_convert_symbol, gcc_symbol_address)
3981 (generate_c_for_variable_locations, c_get_mode_for_size)
3982 (c_get_range_decl_name): Definitions moved to compile-c.h.
3983 * compile/compile-loc2c.c: Include compile-c.h.
3984
3985 2018-08-10 Keith Seitz <keiths@redhat.com>
3986
3987 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3988 (c_symbol_substitution_name): ... this.
3989 Update all callers.
3990
3991 2018-08-10 Keith Seitz <keiths@redhat.com>
3992
3993 * compile/compile-c-support.c (c_compute_program): Use
3994 unique_xmalloc_ptr to eliminate cleanup.
3995 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3996 Return a unique_xmalloc_ptr and eliminate cleanup.
3997 * compile/compile-internal.h (generate_c_for_variable_locations):
3998 Return unique_xmalloc_ptr and update description.
3999
4000 2018-08-10 Alan Hayward <alan.hayward@arm.com>
4001
4002 * corelow.c (core_target::get_core_register_section): Rename
4003 min_size to section_min_size.
4004
4005 2018-08-09 Jim Wilson <jimw@sifive.com>
4006
4007 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4008 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4009 * NEWS: Mention new GNU/Linux RISC-V target.
4010 * configure.host: Add riscv*-*-linux*.
4011 * configure.nat: Add riscv*.
4012 * configure.tgt: Add riscv*-*-linux*.
4013 * riscv-linux-nat.c: New file.
4014 * riscv-linux-tdep.c: New file.
4015
4016 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
4017
4018 * infrun.c (resume): Make static, add forward declaration.
4019 (proceed): Update header comment.
4020 * infrun.h (resume): Delete declaration.
4021
4022 2018-08-09 Tom Tromey <tom@tromey.com>
4023
4024 * riscv-tdep.h: Minor formatting fixes.
4025
4026 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
4027
4028 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4029 * dwarf-index-cache.c (create_dir_and_check): Likewise.
4030 (test_mkdir_recursive): Likewise.
4031 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4032
4033 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
4034
4035 * valarith.c (value_subscripted_rvalue): If an array is not in
4036 memory, and we don't know the upper bound, then we can't know that
4037 the requested element exists or not.
4038
4039 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
4040
4041 * target.c (str_comma_list_concat_elem): Fix typo in comment.
4042 (target_options_to_string): Add comment.
4043
4044 2018-08-08 Tom Tromey <tom@tromey.com>
4045
4046 * unittests/scoped_mmap-selftests.c: Check result of "write".
4047
4048 2018-08-08 Jim Wilson <jimw@sifive.com>
4049
4050 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4051 (decode_register_index_short): New.
4052 (decode_j_type_insn, decode_cj_type_insn): New.
4053 (decode_b_type_insn, decode_cb_type_insn): New.
4054 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
4055 local xlen. Check xlen when decoding ambiguous compressed insns. In
4056 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4057 is_c_sw_insn instead of is_sw_insn.
4058 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4059 (riscv_software_single_step): New.
4060 * riscv-tdep.h (riscv_software_single_step): Declare.
4061
4062 * riscv-tdep.c (riscv_isa_xlen): Drop static.
4063 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4064
4065 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
4066
4067 PR gdb/18050:
4068 * target.c (dispose_inferior): Don't dispose of inferiors that are
4069 already killed.
4070
4071 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
4072
4073 * remote.c (remote_target::download_tracepoint): Change char* to
4074 const char*.
4075
4076 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
4077
4078 * target.h (target_options_to_string): Return an std::string.
4079 * target.c (str_comma_list_concat_elem): Return void, use
4080 std::string.
4081 (do_option): Likewise.
4082 (target_options_to_string): Return an std::string.
4083 * linux-nat.c (linux_nat_target::wait): Adjust.
4084 * target-debug.h (target_debug_print_options): Adjust.
4085
4086 2018-08-07 Tom Tromey <tom@tromey.com>
4087
4088 * Makefile.in (CPPFLAGS): New variable.
4089 (INTERNAL_CPPFLAGS): Use it.
4090
4091 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * NEWS: Mention the index cache.
4094
4095 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4096
4097 * common/pathstuff.h (get_standard_cache_dir): New.
4098 * common/pathstuff.c (get_standard_cache_dir): New.
4099 * build-id.h (build_id_to_string): New.
4100 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4101 DEBUG_STR_SUFFIX): Move to here.
4102 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4103 DEBUG_STR_SUFFIX): Move from there.
4104 (write_psymtabs_to_index): Make non-static, add basename
4105 parameter. Write to temporary files, rename when done.
4106 (save_gdb_index_command): Adjust call to
4107 write_psymtabs_to_index.
4108 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4109 field.
4110 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4111 (get_gdb_index_contents_from_cache): New.
4112 (get_gdb_index_contents_from_cache_dwz): New.
4113 (dwarf2_initialize_objfile): Read index from cache.
4114 (dwarf2_build_psymtabs): Save to index.
4115 * dwarf-index-cache.h: New file.
4116 * dwarf-index-cache.c: New file.
4117 * dwarf-index-write.h: New file.
4118
4119 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4120
4121 * gnulib/aclocal.m4: Re-generate.
4122 * gnulib/config.in: Re-generate.
4123 * gnulib/configure: Re-generate.
4124 * gnulib/import/Makefile.am: Re-generate.
4125 * gnulib/import/Makefile.in: Re-generate.
4126 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4127 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4128 * gnulib/import/m4/mkdir.m4: New file.
4129 * gnulib/import/mkdir.c: New file.
4130 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4131 module.
4132
4133 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4134
4135 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4136 * common/scoped_mmap.c: New file.
4137 * common/scoped_mmap.h (destroy): New method.
4138 (~scoped_mmap, reset): Use destroy.
4139 (scoped_mmap): New move constructor.
4140 (mmap_file): New declaration.
4141 * unittests/scoped_mmap-selftests.c (test_normal,
4142 test_invalid_filename, run_tests): New functions.
4143 (_initialize_scoped_mmap_selftests): Register selftest.
4144
4145 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4146
4147 * dwarf2read.c (read_gdb_index_from_section): Rename to...
4148 (read_gdb_index_from_buffer): ... this. Remove section
4149 parameter, add buffer parameter.
4150 (get_gdb_index_contents_ftype,
4151 get_gdb_index_contents_dwz_ftype): New typedefs.
4152 (dwarf2_read_gdb_index): Add callback parameters to get the
4153 index contents.
4154 (get_gdb_index_contents_from_section): New.
4155 (dwarf2_initialize_objfile): Update call to
4156 dwarf2_read_gdb_index.
4157
4158 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4159
4160 * common/filestuff.h (gdb_fopen_cloexec): New overload.
4161 (gdb_open_cloexec): Likewise.
4162 * nat/linux-osdata.c (command_from_pid): Use string_printf.
4163 (commandline_from_pid): Likewise.
4164 (linux_xfer_osdata_threads): Likewise.
4165 (linux_xfer_osdata_fds): Likewise.
4166 * ada-lang.c (is_package_name): Likewise.
4167 * auxv.c (procfs_xfer_auxv): Likewise.
4168 * breakpoint.c (print_one_breakpoint_location): Use
4169 uiout::field_fmt.
4170 (print_one_catch_solib): Use string_printf.
4171 * coff-pe-read.c (add_pe_exported_sym): Likewise.
4172 (add_pe_forwarded_sym): Likewise.
4173 * dwarf2read.c (create_type_unit_group): Likewise.
4174 (build_error_marker_type): Likewise.
4175 * infcall.c (get_function_name): Likewise.
4176 * valprint.c (print_converted_chars_to_obstack): Likewise.
4177 * xtensa-tdep.c (xtensa_register_type): Likewise.
4178
4179 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
4180
4181 * remote.c (remote_target::download_tracepoint): Fix format
4182 string errors.
4183
4184 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4185
4186 * tracefile.c: Include common/byte-vector.h.
4187 (trace_save): Change type of buf to gdb::byte_vector. Initialize
4188 with trace_regblock_size if needed. Update uses of buf.
4189
4190 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4191
4192 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4193 std::vector<unsigned char>.
4194 * tracepoint.c (collection_list::collection_list): Remove
4195 m_regs_mask initializer from initializer list. Resize
4196 m_regs_mask using the largest remote register number.
4197 (collection_list::add_remote_register): Remove size check on
4198 m_regs_mask. Use at to access element.
4199 (collection_list::stringify): Change type of temp_buf to
4200 gdb::char_vector. Update uses of temp_buf. Resize if needed to
4201 stringify the register mask. Use pack_hex_byte for the register
4202 mask.
4203
4204 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4205
4206 * tracepoint.h (class collection_list) <add_register>: Remove.
4207 <add_remote_register, add_ax_registers, add_local_register>:
4208 Declare.
4209 <add_memrange>: Add scope parameter.
4210 * tracepoint.c (encode_actions_1): Likewise.
4211 (collection_list::add_register): Rename to ...
4212 (collection_list::add_remote_register): ... this. Update
4213 comment.
4214 (collection_list::add_ax_registers, add_local_register): New
4215 methods.
4216 (collection_list::add_memrange): Add scope parameter. Call
4217 add_local_register instead of add_register.
4218 (finalize_tracepoint_aexpr): New function.
4219 (collection_list::collect_symbol): Update calls to add_memrange.
4220 Call add_local_register instead of add_register. Call
4221 add_ax_registers. Call finalize_tracepoint_aexpr.
4222 (encode_actions_1): Get remote regnos for $reg action. Call
4223 add_remote_register, add_ax_registers, and add_local_register.
4224 Update call to add_memrange. Call finalize_tracepoint_aexpr.
4225 (validate_actionline): Call finalize_tracepoint_aexpr.
4226
4227 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4228
4229 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4230 Replace array buf with gdb::char_vector buf, of size
4231 get_remote_packet_size (). Replace references to buf and
4232 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
4233 and xsnprintf with snprintf. Raise errors if the buffer is too
4234 small.
4235
4236 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4237
4238 * remote.c (remote_target::download_tracepoint): Fix the has_more
4239 predicate in the QTDP action list iteration.
4240
4241 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4242
4243 * remote.c (remote_target::download_tracepoint): Fix indentation
4244 in for block.
4245
4246 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4247
4248 * proc-api.c (_initialize_proc_api): Remove c, unused.
4249 * procfs.c (procfs_init_inferior): Remove signals, unused.
4250 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4251 unused.
4252
4253 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
4254 Andrew Burgess <andrew.burgess@embecosm.com>
4255
4256 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4257 'W_STOPCODE (0)' as this could be ambiguous.
4258
4259 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
4260
4261 * ser-tcp.c (net_open): Fix thinko when deciding whether to
4262 disable TCP's Nagle algorithm (use "ai_protocol" instead of
4263 "ai_socktype").
4264
4265 2018-08-02 Tom Tromey <tom@tromey.com>
4266
4267 PR symtab/16842.
4268 * dwarf2read.c (read_func_scope): Set symtab on template parameter
4269 symbols.
4270 (process_structure_scope): Likewise.
4271
4272 2018-08-02 Xavier Roirand <roirand@adacore.com>
4273
4274 PR gdb/22629:
4275 * darwin-nat.c (darwin_kill_inferior): Fix handling of
4276 kill inferior.
4277
4278 2018-08-02 Tom Tromey <tom@tromey.com>
4279
4280 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4281 (darwin_suspend_inferior, darwin_resume_inferior)
4282 (darwin_decode_notify_message, darwin_resume_inferior_threads)
4283 (darwin_check_new_threads): Check result of get_darwin_inferior.
4284
4285 2018-07-31 Joel Brobecker <brobecker@adacore.com>
4286
4287 GDB 8.1.1 released.
4288
4289 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
4290
4291 * varobj.c (varobj_get_path_expr_parent): Report an error if
4292 parent is a dynamic varobj.
4293
4294 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4295
4296 * gnulib/aclocal.m4: Re-generate.
4297 * gnulib/config.in: Re-generate.
4298 * gnulib/configure: Re-generate.
4299 * gnulib/import/Makefile.in: Re-generate.
4300 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4301 * gnulib/import/m4/onceonly.m4: Re-generate.
4302
4303 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4304
4305 * target-descriptions.c (struct xml_test_tdesc): New.
4306 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4307 (record_xml_tdesc): Update.
4308 (maintenance_check_xml_descriptions): Update.
4309 * target-descriptions.h (record_xml_tdesc): Update comment.
4310
4311 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
4312
4313 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4314 checking array bounds are defined.
4315
4316 2018-07-30 Tom Tromey <tom@tromey.com>
4317
4318 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4319 irreflexivity violation.
4320
4321 2018-07-30 Tom Tromey <tom@tromey.com>
4322
4323 * cli/cli-decode.c (lookup_cmd): Remove lint code.
4324 * value.c (unpack_long): Remove lint code.
4325 * valops.c (value_ind): Remove lint code.
4326 * valarith.c (value_x_binop, value_x_unop, value_equal)
4327 (value_pos): Remove lint code.
4328
4329 2018-07-28 Tom de Vries <tdevries@suse.de>
4330
4331 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4332 with undefined upper bound as <optimized out>.
4333
4334 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
4335
4336 * gcore.in: Rename variable "name" to "prefix". Expand
4337 "usage" text.
4338
4339 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
4340
4341 * windows-nat.c (windows_nat_target::create_inferior): Update to
4342 call close() in global namespace.
4343
4344 2018-07-26 Tom Tromey <tom@tromey.com>
4345
4346 * dwarf-index-write.c (add_address_entry): Don't add objfile
4347 offsets.
4348 * dbxread.c (find_stab_function): Rename from
4349 find_stab_function_addr. Return a bound_minimal_symbol.
4350 (read_dbx_symtab): Use raw_text_low, raw_text_high.
4351 Don't add objfile offsets.
4352 (end_psymtab): Use raw_text_low, raw_text_high,
4353 MSYMBOL_VALUE_RAW_ADDRESS.
4354 (read_ofile_symtab): Update.
4355 (process_one_symbol): Update.
4356 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4357 offsets.
4358 (dw2_relocate): Remove.
4359 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4360 searching addrmap.
4361 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4362 Update.
4363 (process_psymtab_comp_unit_reader, add_partial_symbol)
4364 (add_partial_subprogram, dwarf2_ranges_read): Update.
4365 (load_partial_dies): Update.
4366 (add_address_entry): Don't add objfile offsets.
4367 (dwarf2_build_include_psymtabs): Update.
4368 (create_addrmap_from_aranges): Don't add objfile offsets.
4369 (dw2_find_pc_sect_compunit_symtab): Update.
4370 * mdebugread.c (parse_symbol): Don't add objfile offsets.
4371 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4372 Update.
4373 (parse_partial_symbols): Don't add objfile offsets. Use
4374 raw_text_low, raw_text_high. Update.
4375 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4376 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4377 or call 'relocate' quick function. Clear psymbol_map.
4378 * psympriv.h (struct partial_symbol) <address>: Add section
4379 offset.
4380 <set_unrelocated_address>: Rename from set_address.
4381 <raw_text_low, raw_text_high>: New methods.
4382 <text_low, text_high>: Add objfile parameter.
4383 (add_psymbol_to_bcache): Add 'section' parameter. Call
4384 set_unrelocated_address.
4385 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4386 (find_pc_psymbol): Update.
4387 (fixup_psymbol_section, relocate_psymtabs): Remove.
4388 (dump_psymtab, psym_functions): Update.
4389 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4390 parameter.
4391 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4392 (start_psymtab_common): Update.
4393 * symfile-debug.c (debug_qf_relocate): Remove.
4394 (debug_sym_quick_functions): Update.
4395 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4396 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4397 Update.
4398
4399 2018-07-26 Tom Tromey <tromey@redhat.com>
4400
4401 * dbxread.c (end_psymtab): Use text_high_valid and
4402 text_low_valid.
4403 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4404 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4405 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4406 Update comment.
4407 <text_low_valid, text_high_valid>: New fields.
4408 <set_text_low, set_text_high>: Update.
4409 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4410
4411 2018-07-26 Tom Tromey <tom@tromey.com>
4412
4413 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4414 Update.
4415 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4416 textlow and texthigh fields.
4417 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4418 Update.
4419 * mdebugread.c (parse_lines, parse_partial_symbols)
4420 (psymtab_to_symtab_1): Update.
4421 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4422 Rename fields. Update comment. Now private.
4423 <text_low, text_high, set_text_low, set_text_high>: New methods.
4424 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4425 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4426 (start_psymtab_common, maintenance_info_psymtabs)
4427 (maintenance_check_psymtabs): Update.
4428 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4429 texthigh fields.
4430 (scan_xcoff_symtab): Update.
4431
4432 2018-07-26 Tom Tromey <tromey@redhat.com>
4433
4434 * psympriv.h (struct partial_symbol) <unrelocated_address,
4435 address, set_address>: New methods.
4436 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4437 (fixup_psymbol_section, relocate_psymtabs): Update.
4438 (print_partial_symbols): Add 'objfile' parameter. Update.
4439 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4440 Update.
4441
4442 2018-07-26 Tom Tromey <tom@tromey.com>
4443
4444 * dwarf-index-write.c (write_psymbols, debug_names::insert)
4445 (debug_names::write_psymbols): Update.
4446 * psympriv.h (struct partial_symbol): Derive from
4447 general_symbol_info.
4448 <obj_section>: New method.
4449 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4450 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4451 (find_pc_sect_psymbol, fixup_psymbol_section)
4452 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4453 (print_partial_symbols, recursively_search_psymtabs)
4454 (compare_psymbols, psymbol_hash, psymbol_compare)
4455 (add_psymbol_to_bcache, maintenance_check_psymtabs)
4456 (psymbol_name_matches, psym_fill_psymbol_map): Update.
4457
4458 2018-07-26 Tom Tromey <tromey@redhat.com>
4459
4460 * dbxread.c (end_psymtab): Remove dead code.
4461
4462 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
4463
4464 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4465 DWARF unwinders are disabled.
4466 * dwarf2-frame.c: Add dwarf2read.h include.
4467 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4468 disabled.
4469 (dwarf2_frame_unwinders_enabled_p): Define.
4470 (show_dwarf_unwinders_enabled_p): New function.
4471 (_initialize_dwarf2_frame): Register switch to control DWARF
4472 unwinder use.
4473 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4474 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4475 (show_dwarf_cmdlist): Remove static keyword.
4476 * dwarf2read.h (set_dwarf_cmdlist): Declare.
4477 (show_dwarf_cmdlist): Declare.
4478 * NEWS: Document new feature.
4479
4480 2018-07-26 Tom de Vries <tdevries@suse.de>
4481
4482 PR breakpoints/23366
4483 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4484
4485 2018-07-26 Tom de Vries <tdevries@suse.de>
4486
4487 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4488 DW_AT_count can't be translated to a dynamic prop.
4489
4490 2018-07-25 Tom de Vries <tdevries@suse.de>
4491
4492 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4493 try/catch.
4494
4495 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
4496
4497 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4498
4499 2018-07-25 Joel Brobecker <brobecker@adacore.com>
4500
4501 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4502
4503 2018-07-24 Keith Seitz <keiths@redhat.comt
4504
4505 PR symtab/23010
4506 * dwarf2read.c (dw2_add_symbol_to_list): New function.
4507 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4508 instead of add_symbol_to_list.
4509 (read_file_scope): Call prepare_one_comp_unit before reading
4510 any other DIEs.
4511
4512 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
4513
4514 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4515
4516 2018-07-24 Tom Tromey <tom@tromey.com>
4517
4518 * utils.c (malloc, realloc, free): Don't declare.
4519 * configure, config.in: Rebuild.
4520 * configure.ac: Don't check for declarations of free, malloc, or
4521 realloc.
4522
4523 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4524
4525 * aarch64-linux-nat.c
4526 (aarch64_linux_nat_target::stopped_data_address): Remove unused
4527 variable.
4528 * arm-linux-nat.c (fetch_regs): Likewise.
4529 (store_regs): Likewise.
4530 (fetch_vfp_regs): Likewise.
4531 (store_vfp_regs): Likewise.
4532 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4533 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4534 (arm_linux_nat_target::insert_watchpoint): Likewise.
4535 (arm_linux_nat_target::remove_watchpoint): Likewise.
4536 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4537 Likewise.
4538 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4539 Likewise.
4540 * ppc-linux-nat.c (fetch_register): Likewise.
4541 (fetch_all_gp_regs): Likewise.
4542 (fetch_ppc_registers): Likewise.
4543 (store_all_gp_regs): Likewise.
4544 (store_ppc_registers): Likewise.
4545 (hwdebug_insert_point): Likewise.
4546 (can_use_watchpoint_cond_accel): Likewise.
4547 * remote-sim.c (gdb_os_write_stdout): Likewise.
4548
4549 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4550 Tom Tromey <tom@tromey.com>
4551
4552 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4553 test for it.
4554 * configure: Rebuild.
4555
4556 2018-07-22 Tom Tromey <tom@tromey.com>
4557
4558 * regformats/regdat.sh: Define xmltarget_${name} inside
4559 #ifndef IN_PROCESS_AGENT.
4560
4561 2018-07-22 Tom Tromey <tom@tromey.com>
4562
4563 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4564
4565 2018-07-22 Tom Tromey <tom@tromey.com>
4566
4567 * symfile.c (reread_symbols): Notify iter, not objfile.
4568
4569 2018-07-22 Tom Tromey <tom@tromey.com>
4570
4571 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4572 Use arch_ops.
4573 (ravenscar_thread_target::prepare_to_store): Likewise.
4574
4575 2018-07-22 Tom Tromey <tom@tromey.com>
4576
4577 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4578 unused variable. Call value_fetch_lazy when needed.
4579 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4580 Remove unused variable. Call value_fetch_lazy when needed.
4581
4582 2018-07-22 Tom Tromey <tom@tromey.com>
4583
4584 * m32c-tdep.c (mark_dma): Return void.
4585 (make_regs): Remove unused declarations.
4586
4587 2018-07-22 Tom Tromey <tom@tromey.com>
4588
4589 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4590 cmdscm_get_valid_command_smob_arg_unsafe for effect.
4591 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4592 bkscm_get_valid_block_smob_arg_unsafe for effect.
4593
4594 2018-07-22 Tom Tromey <tom@tromey.com>
4595
4596 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4597 value_type.
4598
4599 2018-07-22 Tom Tromey <tom@tromey.com>
4600
4601 * windows-nat.c (saved_context): Conditionally define.
4602 * remote.c (remote_target::remote_btrace_maybe_reopen):
4603 Conditionally declare "warned".
4604 * inflow.c (sigquit_ours): Conditionally define.
4605 (new_tty): Move "tty" declaration inside #if.
4606 * guile/guile.c (guile_datadir): Conditionally define.
4607 * charset.c (set_be_le_names): Move some declarations inside #if.
4608 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4609 #if.
4610 (parse_xml_btrace_conf): Likewise.
4611
4612 2018-07-22 Tom Tromey <tom@tromey.com>
4613
4614 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4615
4616 2018-07-22 Tom Tromey <tom@tromey.com>
4617
4618 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4619 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4620 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4621 * buildsym-legacy.c (get_macro_table): Remove unused variable.
4622 * stack.c (frame_apply_level_command): Remove unused variable.
4623 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4624 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4625 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4626 unused variable.
4627 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4628 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4629 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4630 variable.
4631 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4632 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4633 variable.
4634 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4635 Remove unused variable.
4636 * cli/cli-script.c (recurse_read_control_structure): Remove unused
4637 variable.
4638 * common/tdesc.c (print_xml_feature::visit): Remove unused
4639 variable.
4640 * compile/compile-object-load.c (store_regs): Remove unused
4641 variables.
4642 * complaints.c (clear_complaints): Remove unused variable.
4643 * corelow.c (core_target_open): Remove unused variable.
4644 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4645 variable.
4646 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4647 variable.
4648 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4649 variable.
4650 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4651 variable.
4652 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4653 variable.
4654 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4655 variable.
4656 * ia64-tdep.c (examine_prologue): Remove unused variable.
4657 * infcall.c (run_inferior_call): Remove unused variable.
4658 * inferior.c (exit_inferior): Remove unused variable.
4659 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4660 * linespec.c (decode_line_2): Remove unused variable.
4661 * linux-nat.c (super_close): Remove.
4662 * linux-tdep.c (linux_info_proc): Remove unused variable.
4663 * mi/mi-main.c (mi_execute_command): Remove unused variable.
4664 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4665 Remove unused variable.
4666 * parse.c (find_minsym_type_and_address): Remove unused variable.
4667 * printcmd.c (info_symbol_command, printf_floating): Remove unused
4668 variable.
4669 * python/py-breakpoint.c (bppy_set_commands): Remove unused
4670 variable.
4671 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4672 variables.
4673 * record-btrace.c (record_btrace_target::store_registers): Remove
4674 unused variable.
4675 (cmd_show_record_btrace_cpu): Remove unused variable.
4676 * riscv-tdep.c (riscv_register_reggroup_p)
4677 (riscv_push_dummy_call, riscv_return_value): Remove unused
4678 variable.
4679 * rust-exp.y (literal): Remove unused variable.
4680 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4681 unused variable.
4682 <STRUCTOP_ANONYMOUS>: Likewise.
4683 * s390-linux-tdep.c (s390_linux_init_abi_31)
4684 (s390_linux_init_abi_64): Remove unused variable.
4685 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4686 (file_select_thread, net_windows_open, _initialize_ser_windows):
4687 Remove unused variables.
4688 * symtab.c (find_pc_sect_line): Remove unused variable.
4689 * target-memory.c (compute_garbled_blocks): Remove unused
4690 variable.
4691 (target_write_memory_blocks): Remove unused variable.
4692 * target.c (target_stack::unpush): Remove unused variables.
4693 * tracepoint.c (start_tracing, all_tracepoint_actions)
4694 (merge_uploaded_trace_state_variables)
4695 (print_one_static_tracepoint_marker): Remove unused variable.
4696 * unittests/basic_string_view/element_access/char/1.cc (test01):
4697 Remove unused variable.
4698 * windows-nat.c (windows_continue, windows_add_all_dlls)
4699 (do_initial_windows_stuff, windows_nat_target::create_inferior):
4700 Remove unused variables.
4701
4702 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
4703
4704 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4705 attr_profile in HAVE_ELF.
4706 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4707 HAVE_ELF.
4708
4709 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
4710
4711 * frame.c (frame_register_unwind): Change parameter name.
4712 (frame_unwind_register): Likewise.
4713 (frame_unwind_register_value): Likewise.
4714 (frame_unwind_register_signed): Likewise.
4715 (frame_unwind_register_unsigned): Likewise.
4716 * frame.h (frame_register_unwind): Likewise.
4717 (frame_unwind_register): Likewise.
4718 (frame_unwind_register_value): Likewise.
4719 (frame_unwind_register_signed): Likewise.
4720 (frame_unwind_register_unsigned): Likewise.
4721 (frame_unwind_arch): Likewise.
4722
4723 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4724
4725 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4726 ISA maintenance.
4727
4728 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4729
4730 * mips-linux-nat.c (mips_linux_nat_target::read_description):
4731 Call `get_ptrace_pid' rather than extracting the ptrace PID by
4732 hand.
4733
4734 2018-07-20 Keith Seitz <keiths@redhat.com>
4735
4736 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4737 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4738 m_compunit_symtab, m_language>: Add "m_" prefix.
4739 Update all uses.
4740 * buildsym.c: Update all uses.
4741
4742 2018-07-20 Tom Tromey <tom@tromey.com>
4743
4744 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4745 * buildsym.h (record_line_ftype): Remove typedef.
4746
4747 2018-07-20 Tom Tromey <tom@tromey.com>
4748
4749 * buildsym-legacy.h (augment_type_symtab): Don't declare.
4750 (end_expandable_symtab): Likewise.
4751 (end_symtab_get_static_block): Likewise.
4752 (end_symtab_from_static_block): Likewise.
4753 * buildsym-legacy.c (augment_type_symtab): Remove.
4754 (end_expandable_symtab): Remove.
4755 (end_symtab_get_static_block): Remove.
4756 (end_symtab_from_static_block): Remove.
4757
4758 2018-07-20 Tom Tromey <tom@tromey.com>
4759
4760 * dwarf2read.c: Include buildsym.h.
4761 (struct dwarf2_cu) <builder>: New method.
4762 (fixup_go_packaging): Update.
4763 (process_full_comp_unit, process_full_type_unit): Update. Don't
4764 use scoped_free_pendings.
4765 (using_directives): Add "cu" parameter, remove "language".
4766 (read_import_statement, setup_type_unit_groups, )
4767 (read_func_scope, read_lexical_block_scope)
4768 (dwarf2_record_block_ranges, read_namespace): Update.
4769 (lnp_state_machine::lnp_state_machine): Add cu parameter.
4770 (lnp_state_machine::handle_end_sequence): Update.
4771 (class lnp_state_machine) <m_cu>: New member.
4772 <m_record_line_callback>: Remove.
4773 <m_currently_recording_lines>: New member.
4774 (lnp_state_machine::handle_set_file): Update.
4775 (noop_record_line): Remove.
4776 (dwarf_record_line_p): Add cu parameter.
4777 (dwarf_record_line_1, dwarf_finish_line): Likewise.
4778 (lnp_state_machine::record_line)
4779 (lnp_state_machine::lnp_state_machine)
4780 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4781 (dwarf_decode_lines): Update.
4782 (dwarf2_start_subfile): Add cu parameter.
4783 (dwarf2_start_symtab, new_symbol): Update.
4784 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4785 Remove dwarf2_per_objfile parameter.
4786 (dwarf_decode_macros): Update.
4787
4788 2018-07-20 Tom Tromey <tom@tromey.com>
4789
4790 * stabsread.c (define_symbol): Update.
4791 * buildsym-legacy.h (get_buildsym_compunit): Declare.
4792 * dwarf2read.c (new_symbol): Update.
4793 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4794 * cp-namespace.c: Include buildsym.h.
4795 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4796 * buildsym-legacy.c (get_buildsym_compunit): New function.
4797
4798 2018-07-20 Tom Tromey <tom@tromey.com>
4799
4800 * xcoffread.c: Include buildsym-legacy.h.
4801 * windows-nat.c: Include buildsym-legacy.h.
4802 * stabsread.c: Include buildsym-legacy.h.
4803 * mdebugread.c: Include buildsym-legacy.h.
4804 * buildsym-legacy.h: New file.
4805 * buildsym-legacy.c: New file, from buildsym.c.
4806 * go32-nat.c: Include buildsym-legacy.h.
4807 * dwarf2read.c: Include buildsym-legacy.h.
4808 * dbxread.c: Include buildsym-legacy.h.
4809 * cp-namespace.c: Include buildsym-legacy.h.
4810 * coffread.c: Include buildsym-legacy.h.
4811 * buildsym.h: Move some contents to buildsym-legacy.h.
4812 * buildsym.c: Include buildsym-legacy.h. Move many functions to
4813 buildsym-legacy.c.
4814 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4815
4816 2018-07-20 Tom Tromey <tom@tromey.com>
4817
4818 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4819 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4820 (buildsym_compunit::buildsym_compunit)
4821 (buildsym_compunit::~buildsym_compunit)
4822 (buildsym_compunit::get_macro_table): Define.
4823
4824 2018-07-20 Tom Tromey <tom@tromey.com>
4825
4826 * buildsym.c (reset_symtab_globals): Remove.
4827 (buildsym_compunit::end_symtab_from_static_block): Update.
4828 (buildsym_compunit::augment_type_symtab): Update.
4829 (end_symtab_from_static_block): Call free_buildsym_compunit.
4830 (augment_type_symtab, end_symtab, end_expandable_symtab):
4831 Likewise.
4832
4833 2018-07-20 Tom Tromey <tom@tromey.com>
4834
4835 * arch-utils.c: Do not include buildsym.h.
4836 * mipsread.c: Do not include buildsym.h.
4837 * machoread.c: Do not include buildsym.h.
4838 * elfread.c: Do not include buildsym.h.
4839
4840 2018-07-20 Tom Tromey <tom@tromey.com>
4841
4842 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4843 initialization.
4844 (buildsym_compunit): Add new constructor.
4845 (struct buildsym_compunit) <get_last_source_file, finish_block,
4846 record_block_range, start_subfile, patch_subfile_names,
4847 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4848 set_last_source_start_addr, get_last_source_start_addr,
4849 get_local_using_directives, set_local_using_directives,
4850 get_global_using_directives, outermost_context_p,
4851 get_current_context_stack, get_context_stack_depth,
4852 get_current_subfile, get_local_symbols, get_file_symbols,
4853 get_global_symbols, record_debugformat, record_producer,
4854 push_context, pop_context, end_symtab_get_static_block,
4855 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4856 New public methods.
4857 <record_pending_block, finish_block_internal, make_blockvector,
4858 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4859 private methods.
4860 Update all users.
4861
4862 2018-05-22 Tom Tromey <tom@tromey.com>
4863
4864 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4865 parameter.
4866 (finish_block_internal): Update.
4867
4868 2018-07-20 Tom Tromey <tom@tromey.com>
4869
4870 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4871 parameter.
4872 (finish_block_internal): Update.
4873
4874 2018-07-20 Tom Tromey <tom@tromey.com>
4875
4876 * buildsym.h (EXTERN): Don't define or undef.
4877 * buildsym.c (EXTERN): Don't define.
4878
4879 2018-07-20 Tom Tromey <tom@tromey.com>
4880
4881 * buildsym.c: Remove TODO comment.
4882
4883 2018-07-20 Tom Tromey <tom@tromey.com>
4884
4885 * coffread.c (coff_symtab_read): Update.
4886 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4887 (xcoff_new_init): Update.
4888 * mipsread.c (mipscoff_new_init): Update.
4889 * mdebugread.c (mdebug_build_psymtabs): Update.
4890 * elfread.c (elf_new_init): Update.
4891 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4892 Update.
4893 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4894 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4895 (stabsect_build_psymtabs): Update.
4896 * buildsym.h (buildsym_init): Don't declare.
4897 * buildsym.c: Update comment.
4898 (prepare_for_building): Remove.
4899 (start_symtab, restart_symtab): Update.
4900 (reset_symtab_globals): Update comment.
4901 (buildsym_init): Remove.
4902
4903 2018-07-20 Tom Tromey <tom@tromey.com>
4904
4905 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4906 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4907 (read_enum_type, common_block_start, common_block_end)
4908 (cleanup_undefined_types_1, finish_global_stabs): Update.
4909 * mdebugread.c (psymtab_to_symtab_1): Update.
4910 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4911 (read_lexical_block_scope, new_symbol): Update.
4912 * dbxread.c (process_one_symbol): Update.
4913 * coffread.c (coff_symtab_read, process_coff_symbol)
4914 (coff_read_enum_type): Update.
4915 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4916 declare.
4917 (get_local_symbols, get_file_symbols, get_global_symbols): New
4918 functions.
4919 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4920 m_global_symbols.
4921 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4922 (~scoped_free_pendings): Update.
4923 (finish_block, prepare_for_building, reset_symtab_globals)
4924 (end_symtab_get_static_block, end_symtab_with_blockvector)
4925 (augment_type_symtab, push_context): Update.
4926 (get_local_symbols, get_file_symbols, get_global_symbols): New
4927 functions.
4928 (buildsym_init): Update.
4929
4930 2018-07-20 Tom Tromey <tom@tromey.com>
4931
4932 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4933 (process_full_type_unit): Likewise.
4934 (dwarf2_start_symtab): Set list_in_scope.
4935
4936 2018-07-20 Tom Tromey <tom@tromey.com>
4937
4938 * dwarf2read.c (process_psymtab_comp_unit_reader)
4939 (build_type_psymtabs_reader): Do not set list_in_scope.
4940
4941 2018-07-20 Tom Tromey <tom@tromey.com>
4942
4943 * buildsym.c (free_pendings): Remove.
4944 (add_symbol_to_list, scoped_free_pendings)
4945 (finish_block_internal, buildsym_init): Update.
4946
4947 2018-07-20 Tom Tromey <tom@tromey.com>
4948
4949 * xcoffread.c (read_xcoff_symtab): Update.
4950 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4951 Update.
4952 * dbxread.c (process_one_symbol): Update.
4953 * coffread.c (coff_symtab_read): Update.
4954 * buildsym.h (finish_block): Update.
4955 * buildsym.c (finish_block): Remove "listhead" argument.
4956 (end_symtab_get_static_block): Update.
4957
4958 2018-07-20 Tom Tromey <tom@tromey.com>
4959
4960 * buildsym.h (class scoped_free_pendings): Remove constructor.
4961 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4962 method.
4963 <m_pending_block_obstack, m_pending_blocks>: New members.
4964 (pending_block_obstack, pending_blocks): Remove.
4965 (scoped_free_pendings::scoped_free_pendings): Default.
4966 (~scoped_free_pendings): Update.
4967 (free_pending_blocks): Remove.
4968 (finish_block_internal, record_pending_block, make_blockvector)
4969 (end_symtab_get_static_block, augment_type_symtab, push_context)
4970 (buildsym_init): Update.
4971
4972 2018-07-20 Tom Tromey <tom@tromey.com>
4973
4974 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4975 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4976 members.
4977 (pending_addrmap, pending_addrmap_obstack)
4978 (pending_addrmap_interesting): Remove.
4979 (scoped_free_pendings, record_block_range, make_blockvector)
4980 (prepare_for_building, reset_symtab_globals, buildsym_init):
4981 Update.
4982
4983 2018-07-20 Tom Tromey <tom@tromey.com>
4984
4985 * xcoffread.c (process_linenos): Update.
4986 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4987 * mdebugread.c (psymtab_to_symtab_1): Update.
4988 * dwarf2read.c (setup_type_unit_groups)
4989 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4990 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4991 * dbxread.c (process_one_symbol): Update.
4992 * coffread.c (coff_symtab_read, enter_linenos)
4993 (process_coff_symbol): Update.
4994 * buildsym.h (current_subfile): Don't declare.
4995 (get_current_subfile): Declare.
4996 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4997 member.
4998 (start_subfile, free_buildsym_compunit, push_subfile)
4999 (prepare_for_building, start_symtab): Update.
5000 (get_current_subfile): New function.
5001
5002 2018-07-20 Tom Tromey <tom@tromey.com>
5003
5004 * coffread.c (coff_symtab_read): Update.
5005 * xcoffread.c (read_xcoff_symtab): Update.
5006 * dwarf2read.c (new_symbol): Update.
5007 (read_func_scope, read_lexical_block_scope): Update.
5008 * dbxread.c (process_one_symbol): Update.
5009 * buildsym.h (context_stack, context_stack_depth): Don't declare.
5010 (outermost_context_p): Remove macro.
5011 (outermost_context_p, get_current_context_stack)
5012 (get_context_stack_depth): Declare.
5013 (pop_context): Return struct context_stack.
5014 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5015 member.
5016 (context_stack_size): Remove.
5017 (INITIAL_CONTEXT_STACK_SIZE): Remove.
5018 (prepare_for_building, end_symtab_get_static_block)
5019 (augment_type_symtab, push_context): Update.
5020 (pop_context): Return struct context_stack.
5021 (outermost_context_p, get_current_context_stack)
5022 (get_context_stack_depth): New functions.
5023 (buildsym_init): Update.
5024
5025 2018-07-20 Tom Tromey <tom@tromey.com>
5026
5027 * rust-exp.y: Now a pure parser. Update all rules.
5028 (%union): Move earlier.
5029 (current_parser, work_obstack): Remove globals.
5030 (rust_parser, ~rust_parser): Update.
5031 (class rust_parser) <copy_name, concat3, crate_name, super_name,
5032 lex_character, lex_number, lex_string, lex_identifier,
5033 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5034 convert_name, convert_params_to_expression,
5035 convert_ast_to_expression, ast_basic_type, ast_operation,
5036 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5037 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5038 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5039 ast_array_type, ast_slice_type, ast_reference_type,
5040 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5041 (rust_parse): Update.
5042 (rustyyerror, rustyylex): Add parser parameter.
5043 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5044 (rust_lex_stringish_test, rust_lex_test_sequence)
5045 (rust_lex_test_trailing_dot, rust_lex_test_completion)
5046 (rust_lex_test_push_back, rust_lex_tests): Update.
5047
5048 2018-07-19 Pedro Alves <palves@redhat.com>
5049
5050 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5051 gdb::unique_xmalloc_ptr.
5052 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5053 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5054 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5055 copy-initialization.
5056 * guile/scm-pretty-print.c (ppscm_print_children): Use
5057 gdb::unique_xmalloc_ptr instead of cleanups.
5058 (gdbscm_apply_val_pretty_printer): Remove cleanups.
5059 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5060 gdb::unique_xmalloc_ptr.
5061 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5062 Adjust to use gdb::unique_xmalloc_ptr.
5063 * guile/scm-utils.c (extract_arg): Adjust.
5064 * guile/scm-value.c (gdbscm_value_field): Adjust to use
5065 gdb::unique_xmalloc_ptr instead of a cleanup.
5066
5067 2018-07-19 Tom Tromey <tom@tromey.com>
5068
5069 * utils.c (do_value_free_to_mark)
5070 (make_cleanup_value_free_to_mark): Remove.
5071 * utils.h (make_cleanup_value_free_to_mark): Remove.
5072
5073 2018-07-19 Pedro Alves <palves@redhat.com>
5074
5075 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5076 forwarding reference.
5077
5078 2018-07-18 Pedro Alves <palves@redhat.com>
5079
5080 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5081 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
5082 cleanup.
5083
5084 2018-07-18 Pedro Alves <palves@redhat.com>
5085
5086 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5087 exceptions.
5088 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5089 (gdbscm_wrap): New.
5090 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5091 directly instead of a cleanup.
5092 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5093 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
5094 (vlscm_binop_gdbthrow): New, factored out from ...
5095 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
5096 (vlscm_rich_compare): Use gdbscm_wrap.
5097 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5098 instead of a cleanup.
5099 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5100 cleanup.
5101 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5102 Use xfree directly instead of a cleanup.
5103 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5104 Adjust to use gdbscm_wrap and scoped_value_mark.
5105 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5106 (gdbscm_value_address, gdbscm_value_dereference)
5107 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5108 scoped_value_mark.
5109 (gdbscm_value_dynamic_type): Use scoped_value_mark.
5110 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5111 scoped_value_mark.
5112 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5113 gdbscm_wrap and scoped_value_mark.
5114 (gdbscm_value_to_string): Use xfree directly instead of a
5115 cleanup. Move 'buffer' unique_ptr to TRY scope.
5116 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5117 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
5118 scoped_value_mark.
5119 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5120 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5121 scoped_value_mark.
5122 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5123 gdbscm_wrap.
5124
5125 2018-07-18 Tom de Vries <tdevries@suse.de>
5126
5127 * findvar.c (default_read_var_value): Also resolve dynamic type for
5128 LOC_OPTIMIZED_OUT vars.
5129
5130 2018-07-18 Maciej W. Rozycki <macro@mips.com>
5131
5132 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5133 decoding.
5134
5135 2018-07-17 Tom Tromey <tom@tromey.com>
5136
5137 * guile/scm-param.c (pascm_set_func, pascm_show_func)
5138 (compute_enum_list, pascm_set_param_value_x)
5139 (gdbscm_parameter_value): Update.
5140 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5141 (gdbscm_scm_to_host_string): Update.
5142 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5143 Update.
5144 * guile/scm-cmd.c (cmdscm_add_completion): Update.
5145 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5146 * guile/scm-string.c (gdbscm_scm_to_string): Return
5147 unique_xmalloc_ptr.
5148 (gdbscm_scm_to_host_string): Likewise.
5149
5150 2018-07-17 Tom Tromey <tom@tromey.com>
5151
5152 * guile/guile.c (gdbscm_eval_from_control_command): Update.
5153 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5154 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5155 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5156 unique_xmalloc_ptr.
5157
5158 2018-07-17 Tom Tromey <tom@tromey.com>
5159
5160 * guile/scm-param.c (pascm_signal_setshow_error): Update.
5161 * guile/guile-internal.h (gdbscm_exception_message_to_string):
5162 Update.
5163 * guile/scm-cmd.c (cmdscm_function): Update.
5164 * guile/scm-pretty-print.c
5165 (ppscm_print_exception_unless_memory_error): Update.
5166 * guile/scm-exception.c (gdbscm_exception_message_to_string):
5167 Return unique_xmalloc_ptr.
5168
5169 2018-07-17 Tom Tromey <tom@tromey.com>
5170
5171 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5172 Use string_printf.
5173
5174 2018-07-17 Jim Wilson <jimw@sifive.com>
5175
5176 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5177 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
5178 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
5179 unecessary braces after EF_RISCV_RVC test. Delete call to
5180 set_gdbarch_decr_pc_after_break.
5181
5182 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5183 RISCV_LAST_FP_REGNUM + 1.
5184 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5185
5186 2018-07-17 Tom Tromey <tom@tromey.com>
5187
5188 * configure.ac: Remove --disable-gdbcli.
5189 * configure: Rebuild.
5190 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5191 (SUBDIR_CLI_CFLAGS): Remove.
5192 (SFILES): Use SUBDIR_CLI_SRCS.
5193 (COMMON_OBS): Use SUBDIR_CLI_OBS.
5194
5195 2018-07-17 Tom Tromey <tom@tromey.com>
5196
5197 PR gdb/18624:
5198 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5199
5200 2018-07-16 Jim Wilson <jimw@sifive.com>
5201
5202 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5203
5204 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5205
5206 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5207 variable.
5208 (libunwind_frame_sniffer): Likewise.
5209 (libunwind_frame_prev_register): Likewise.
5210 (libunwind_sigtramp_frame_sniffer): Likewise.
5211 * ia64-tdep.c (ia64_access_reg): Likewise.
5212 (ia64_access_rse_reg): Likewise.
5213 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5214 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5215
5216 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5217
5218 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5219
5220 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5221
5222 * remote-sim.c (gdbsim_target::close,
5223 gdbsim_target::mourn_inferior): Remove unused variables.
5224
5225 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
5226
5227 * ia64-tdep.c (ktab_buf): New global.
5228 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5229 (get_kernel_table): Adjust.
5230
5231 2018-07-16 Tom Tromey <tom@tromey.com>
5232
5233 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5234 * dwarf2read.c (using_directives, new_symbol): Use
5235 outermost_context_p.
5236 * dbxread.c (process_one_symbol): Use outermost_context_p.
5237 * coffread.c (coff_symtab_read): Use outermost_context_p.
5238
5239 2018-07-16 Tom Tromey <tom@tromey.com>
5240
5241 * dwarf2read.c (using_directives, read_func_scope)
5242 (read_lexical_block_scope): Update.
5243 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5244 * buildsym.h (local_using_directives, global_using_directives):
5245 Don't declare.
5246 (get_local_using_directives, set_local_using_directives)
5247 (get_global_using_directives): Declare.
5248 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5249 m_global_using_directives>: New members.
5250 (finish_block_internal, prepare_for_building)
5251 (reset_symtab_globals, end_symtab_get_static_block)
5252 (push_context): Update.
5253 (get_local_using_directives, set_local_using_directives)
5254 (get_global_using_directives): New functions.
5255 (buildsym_init): Update.
5256
5257 2018-07-16 Tom Tromey <tom@tromey.com>
5258
5259 * xcoffread.c (xcoff_initial_scan): Don't call
5260 free_pending_blocks.
5261 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5262 * buildsym.h (class scoped_free_pendings): Add constructor.
5263 (free_pending_blocks): Don't declare.
5264 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5265 (free_pending_blocks): Now static.
5266
5267 2018-07-16 Tom Tromey <tom@tromey.com>
5268
5269 * buildsym.h (push_subfile, pop_subfile): Update declarations.
5270 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5271 member.
5272 (struct subfile_stack): Remove.
5273 (subfile_stack): Remove.
5274 (push_subfile, pop_subfile, buildsym_init): Update.
5275
5276 2018-07-16 Tom Tromey <tom@tromey.com>
5277
5278 * buildsym.c (push_subfile): Use gdb_assert.
5279 (pop_subfile): Use gdb_assert.
5280
5281 2018-07-16 Tom Tromey <tom@tromey.com>
5282
5283 * buildsym.h (merge_symbol_lists): Remove.
5284 * buildsym.c (merge_symbol_lists): Remove.
5285
5286 2018-07-16 Tom Tromey <tom@tromey.com>
5287
5288 * stabsread.c (scan_file_globals): Update comment.
5289 * stabsread.h (scan_file_globals): Move from buildsym.h.
5290 * buildsym.h (scan_file_globals): Move to stabsread.h.
5291
5292 2018-07-16 Tom Tromey <tom@tromey.com>
5293
5294 * xcoffread.c (xcoff_new_init): Update.
5295 * mipsread.c (mipscoff_new_init): Update.
5296 * mdebugread.c (mdebug_build_psymtabs): Update.
5297 * elfread.c (elf_new_init): Update.
5298 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5299 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5300 * buildsym.h (buildsym_new_init): Don't declare.
5301 * buildsym.c (buildsym_new_init): Remove.
5302
5303 2018-07-16 Tom Tromey <tom@tromey.com>
5304
5305 * stabsread.h (within_function): Move from buildsym.h.
5306 * stabsread.c (start_stabs): Clear within_function.
5307 * coffread.c (coff_start_symtab): Clear within_function.
5308 * buildsym.h (within_function): Move to stabsread.h.
5309 * buildsym.c (prepare_for_building): Update.
5310
5311 2018-07-16 Tom Tromey <tom@tromey.com>
5312
5313 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5314 * dwarf2read.c (dwarf2_start_symtab): Don't set
5315 processing_gcc_compilation.
5316 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5317
5318 2018-07-16 Tom Tromey <tom@tromey.com>
5319
5320 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5321 (next_symbol_text_func): Move from buildsym.h.
5322 * stabsread.c (hashname): Move from buildsym.c.
5323 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5324 (next_symbol_text_func, hashname): Move to stabsread.h.
5325 * buildsym.c: Don't include bcache.h
5326 (hashname): Move to stasbread.c.
5327
5328 2018-07-16 Tom Tromey <tom@tromey.com>
5329
5330 * buildsym.h (context_stack_size): Don't declare.
5331 * buildsym.c (context_stack_size): New global.
5332
5333 2018-07-16 Tom Tromey <tom@tromey.com>
5334
5335 * dbxread.c (processing_acc_compilation): New global.
5336 * buildsym.h (processing_acc_compilation): Don't declare.
5337
5338 2018-07-16 Tom Tromey <tom@tromey.com>
5339
5340 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5341 * dbxread.c (read_ofile_symtab): Update.
5342 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5343 * buildsym.h (last_source_start_addr): Remove.
5344 (set_last_source_start_addr, get_last_source_start_addr):
5345 Declare.
5346 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5347 parameter.
5348 (struct buildsym_compunit) <m_last_source_start_addr>: New
5349 member.
5350 (prepare_for_building): Remove start_addr parameter.
5351 (start_symtab, restart_symtab, end_symtab_get_static_block)
5352 (end_symtab_with_blockvector): Update.
5353 (set_last_source_start_addr, get_last_source_start_addr): New
5354 functions.
5355
5356 2018-07-16 Tom Tromey <tom@tromey.com>
5357
5358 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5359 member.
5360 (have_line_numbers): Remove.
5361 (record_line, prepare_for_building, end_symtab_get_static_block)
5362 (augment_type_symtab): Update.
5363
5364 2018-07-16 Tom Tromey <tom@tromey.com>
5365
5366 * buildsym.c (~buildsym_compunit): Free the macro table.
5367 (struct buildsym_compunit) <get_macro_table, release_macros>: New
5368 methods.
5369 <m_pending_macros>: New member.
5370 (pending_macros): Remove.
5371 (~scoped_free_pendings, get_macro_table, prepare_for_building)
5372 (reset_symtab_globals, end_symtab_get_static_block)
5373 (end_symtab_with_blockvector, augment_type_symtab)
5374 (buildsym_init): Update.
5375
5376 2018-07-16 Tom Tromey <tom@tromey.com>
5377
5378 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5379 parameter.
5380 (buildsym_compunit::set_last_source_file): New method.
5381 <m_last_source_file>: New member.
5382 (prepare_for_building): Remove "name" parameter.
5383 (start_symtab, restart_symtab, reset_symtab_globals): Update.
5384 (last_source_file): Remove.
5385 (set_last_source_file, get_last_source_file): Update.
5386
5387 2018-07-16 Tom Tromey <tom@tromey.com>
5388
5389 * buildsym.c (prepare_for_building): Add assert.
5390
5391 2018-07-16 Tom Tromey <tom@tromey.com>
5392
5393 * buildsym.c (~buildsym_compunit): Update.
5394 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5395 (start_subfile, patch_subfile_names)
5396 (end_symtab_with_blockvector): Update.
5397
5398 2018-07-16 Tom Tromey <tom@tromey.com>
5399
5400 * buildsym.c (struct buildsym_compunit): Add constructor,
5401 destructor, initializers.
5402 (start_buildsym_compunit): Remove.
5403 (free_buildsym_compunit): Use "delete".
5404 (start_symtab, restart_symtab): Use "new".
5405
5406 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
5407
5408 * symfile.c (set_objfile_default_section_offset): Remove struct
5409 keyword.
5410
5411 2018-07-14 Stafford Horne <shorne@gmail.com>
5412
5413 * (Responsible Maintainers): Add myself as or1k maintainer.
5414
5415 2018-07-13 Tom Tromey <tom@tromey.com>
5416
5417 * symfile.c (set_objfile_default_section_offset): Use extra braces
5418 around initializer.
5419
5420 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5421
5422 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5423 non-branching basr.
5424
5425 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5426
5427 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5428 unittests/cli-utils-selftests.c
5429 * unittests/cli-utils-selftests.c: New file.
5430
5431 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5432
5433 * NEWS: Mention new commands. Mention change to 'thread apply'.
5434
5435 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5436
5437 * thread.c (thr_try_catch_cmd): New function.
5438 (thread_apply_all_command): Handle qcs flags.
5439 (thread_apply_command): Handle qcs flags.
5440 (taas_command): New function.
5441 (tfaas_command): New function.
5442 (_initialize_thread): Update to setup the new commands 'taas
5443 and 'tfaas'. Change doc string for 'thread apply'.
5444
5445 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5446
5447 * stack.c: (trailing_outermost_frame): New function, mostly
5448 extracted from backtrace_command_1.
5449 (leading_innermost_frame): New function.
5450 (backtrace_command_1): Update to call trailing_outermost_frame.
5451 (frame_apply_command_count): New function.
5452 (frame_apply_level_command): New function.
5453 (frame_apply_all_command): New function.
5454 (frame_apply_command): New function.
5455 (faas_command): New function.
5456 (frame_cmd_list): New variable.
5457 (_initialize_stack): Update to setup the new commands 'frame apply'
5458 and 'faas'.
5459
5460 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5461
5462 * cli-utils.c (number_or_range_parser::get_number): Only handle
5463 numbers or convenience var as numbers.
5464 (parse_flags): New function.
5465 (parse_flags_qcs): New function.
5466 (number_or_range_parser::finished): Ensure parsing end is detected
5467 before end of string.
5468 * cli-utils.h (parse_flags): New function.
5469 (parse_flags_qcs): New function.
5470 (number_or_range_parser): Remove m_finished bool.
5471 (number_or_range_parser::skip_range): Set m_in_range to false.
5472
5473 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
5474
5475 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5476 on Windows.
5477
5478 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5479 Jan Kratochvil <jan.kratochvil@redhat.com>
5480 Paul Fertser <fercerpav@gmail.com>
5481 Tsutomu Seki <sekiriki@gmail.com>
5482 Pedro Alves <palves@redhat.com>
5483
5484 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5485 'unittests/parse-connection-spec-selftests.c'.
5486 (COMMON_SFILES): Add 'common/netstuff.c'.
5487 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5488 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5489 * common/netstuff.c: New file.
5490 * common/netstuff.h: New file.
5491 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5492 (wait_for_connect): Update comment. New parameter
5493 'gdb::optional<int> sock' instead of 'struct serial *scb'.
5494 Use 'sock' directly instead of 'scb->fd'.
5495 (try_connect): New function, with code from 'net_open'.
5496 (net_open): Rewrite main loop to deal with multiple
5497 sockets/addresses. Handle IPv6-style hostnames; implement
5498 support for IPv6 connections.
5499 * unittests/parse-connection-spec-selftests.c: New file.
5500
5501 2018-07-11 Pedro Alves <palves@redhat.com>
5502
5503 PR gdb/23377
5504 * remote.c (remote_target::remote_detach_pid): Call
5505 set_current_process.
5506
5507 2018-07-11 Pedro Alves <palves@redhat.com>
5508
5509 * h8300-tdep.c (h8300_gdbarch_init): Remove
5510 set_gdbarch_ecoff_reg_to_regnum calls.
5511
5512 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5513
5514 PR c++/23373
5515 * c-typeprint.c (c_type_print_base_struct_union): Don't print
5516 offsets/sizes for static members of a class/struct.
5517
5518 2018-07-11 Alan Hayward <alan.hayward@arm.com>
5519
5520 * target-descriptions.c (tdesc_register_bitsize): Rename.
5521 * target-descriptions.h (tdesc_register_bitsize): Likewise.
5522 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5523 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5524
5525 2018-07-10 Tom Tromey <tom@tromey.com>
5526
5527 * breakpoint.c (moribund_locations): Now static and a
5528 std::vector.
5529 (breakpoint_init_inferior, moribund_breakpoint_here_p)
5530 (build_bpstat_chain, update_global_location_list)
5531 (breakpoint_retire_moribund): Update.
5532 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
5533 VEC.
5534
5535 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5536
5537 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5538 (riscv_register_reggroup_p): Use new function, remove unneeded
5539 parenthesis.
5540 (riscv_push_dummy_call): Extend assert to compare against xlen or
5541 flen based on register type.
5542
5543 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5544
5545 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5546
5547 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
5548
5549 * remote.c (show_hardware_watchpoint_limit): New function.
5550 (show_hardware_watchpoint_length_limit): New function.
5551 (show_hardware_breakpoint_limit): New function.
5552 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5553 where appropriate, update help text.
5554
5555 2018-07-09 Tom Tromey <tom@tromey.com>
5556
5557 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5558 (CLIBS): Don't mention NAT_CLIBS.
5559
5560 2018-07-09 Tom Tromey <tom@tromey.com>
5561
5562 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5563 (LIBGDB_OBS, clean mostlyclean): Update.
5564 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5565
5566 2018-07-09 Tom Tromey <tom@tromey.com>
5567
5568 * Makefile.in (%.c: %.y): Use ECHO_YACC.
5569 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
5570 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5571
5572 2018-07-09 Tom Tromey <tom@tromey.com>
5573
5574 * Makefile.in (ALLDEPFILES): Remove exec.c.
5575 (COMMON_OBS): Remove exec.o.
5576 (COMMON_SFILES): Add exec.c.
5577
5578 2018-07-09 Tom Tromey <tom@tromey.com>
5579
5580 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5581
5582 2018-07-09 Tom Tromey <tom@tromey.com>
5583
5584 * Makefile.in (clean mostlyclean): Remove stamp-version.
5585 (version.c): Depend on stamp-version.
5586 (stamp-version): New rule, from version.c rule.
5587
5588 2018-07-09 Tom Tromey <tom@tromey.com>
5589
5590 * Makefile.in (init.c): Depend on stamp-init.
5591 (stamp-init): New rule, from init.c rule.
5592 (clean mostlyclean): Remove stamp-init.
5593
5594 2018-07-09 Tom Tromey <tom@tromey.com>
5595
5596 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5597 SUBDIR_GCC_COMPILE_SRCS.
5598
5599 2018-07-09 Tom Tromey <tom@tromey.com>
5600
5601 * Makefile.in (init.c): Remove some unused sed rules.
5602
5603 2018-07-09 Tom Tromey <tom@tromey.com>
5604
5605 * Makefile.in (TSOBS): Remove.
5606 (INIT_FILES): Update.
5607 (LIBGDB_OBS): Update.
5608 (COMMON_SFILES): Add inflow.c.
5609 (SFILES): Remove inflow.c.
5610
5611 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5612
5613 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5614
5615 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
5616
5617 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5618 get_saveloc_name, is_signal_frame_name, step_name,
5619 init_remote_name, create_addr_space_name,
5620 destroy_addr_space_name, search_unwind_table_name,
5621 find_dyn_list_name): Constify.
5622
5623 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
5624
5625 * darwin-nat.c (darwin_pthread_kill): New function.
5626 (darwin_resume_thread): Use darwin_pthread_kill.
5627
5628 2018-07-05 Tom de Vries <tdevries@suse.de>
5629
5630 * macroexp.c (macro_buffer) <operator=>: New member function.
5631
5632 2018-07-04 Tom Tromey <tom@tromey.com>
5633
5634 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5635
5636 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
5637
5638 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5639 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5640 * maint.c: Likewise.
5641 * top.c: Likewise.
5642
5643 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5644
5645 * NEWS: Create a new section for the next release branch.
5646 Rename the section of the current branch, now that it has
5647 been cut.
5648
5649 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5650
5651 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5652 * version.in: Bump version to 8.2.50.DATE-git.
5653
5654 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5655 Pedro Alves <palves@redhat.com>
5656
5657 * linux-nat.c (linux_init_ptrace): Rename to ...
5658 (linux_init_ptrace_procfs): ... this. Call
5659 linux_proc_init_warnings.
5660 (linux_nat_target::post_attach)
5661 (linux_nat_target::post_startup_inferior): Adjust.
5662 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5663 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5664
5665 2018-07-04 Tom de Vries <tdevries@suse.de>
5666
5667 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5668 check ...
5669 (read_comp_unit_head): ... here.
5670
5671 2018-07-03 Tom Tromey <tom@tromey.com>
5672
5673 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5674 (stop_tracing, tstatus_command)
5675 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5676 (print_one_static_tracepoint_marker): Update.
5677 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5678 std::vector.
5679 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
5680 VEC.
5681 (all_tracepoints, static_tracepoints_here): Return std::vector.
5682
5683 2018-07-03 Tom Tromey <tom@tromey.com>
5684
5685 * common/ptid.c (ptid_equal): Remove.
5686 * common/ptid.h (ptid_equal): Don't declare.
5687 * ada-tasks.c: Update.
5688 * breakpoint.c: Update.
5689 * common/agent.c: Update.
5690 * corelow.c: Update.
5691 * darwin-nat-info.c: Update.
5692 * darwin-nat.c: Update.
5693 * dcache.c: Update.
5694 * dtrace-probe.c: Update.
5695 * dummy-frame.c: Update.
5696 * fbsd-nat.c: Update.
5697 * frame.c: Update.
5698 * gdbthread.h: Update.
5699 * gnu-nat.c: Update.
5700 * go32-nat.c: Update.
5701 * inf-loop.c: Update.
5702 * inf-ptrace.c: Update.
5703 * infcall.c: Update.
5704 * infcmd.c: Update.
5705 * inflow.c: Update.
5706 * infrun.c: Update.
5707 * linux-fork.c: Update.
5708 * linux-nat.c: Update.
5709 * linux-thread-db.c: Update.
5710 * mi/mi-cmd-var.c: Update.
5711 * mi/mi-interp.c: Update.
5712 * mi/mi-main.c: Update.
5713 * nto-procfs.c: Update.
5714 * ppc-linux-tdep.c: Update.
5715 * procfs.c: Update.
5716 * python/py-inferior.c: Update.
5717 * python/py-record-btrace.c: Update.
5718 * python/py-record.c: Update.
5719 * ravenscar-thread.c: Update.
5720 * regcache.c: Update.
5721 * remote-sim.c: Update.
5722 * remote.c: Update.
5723 * sol-thread.c: Update.
5724 * solib.c: Update.
5725 * target.c: Update.
5726 * tui/tui-stack.c: Update.
5727 * varobj.c: Update.
5728 * windows-nat.c: Update.
5729 * windows-tdep.c: Update.
5730
5731 2018-07-03 Tom Tromey <tom@tromey.com>
5732
5733 * common/ptid.c (ptid_match): Remove.
5734 * common/ptid.h (ptid_match): Don't declare.
5735 * fbsd-nat.c: Update.
5736 * infcmd.c: Update.
5737 * infrun.c: Update.
5738 * linux-nat.c: Update.
5739 * record-btrace.c: Update.
5740 * regcache.c: Update.
5741 * remote.c: Update.
5742
5743 2018-07-03 Tom Tromey <tom@tromey.com>
5744
5745 * common/ptid.c (ptid_tid_p): Remove.
5746 * common/ptid.h (ptid_tid_p): Don't declare.
5747 * sol-thread.c: Update.
5748
5749 2018-07-03 Tom Tromey <tom@tromey.com>
5750
5751 * common/ptid.c (ptid_lwp_p): Remove.
5752 * common/ptid.h (ptid_lwp_p): Don't declare.
5753 * fbsd-nat.c: Update.
5754 * linux-nat.c: Update.
5755 * nat/linux-procfs.c: Update.
5756 * nat/x86-linux-dregs.c: Update.
5757 * sol-thread.c: Update.
5758
5759 2018-07-03 Tom Tromey <tom@tromey.com>
5760
5761 * common/ptid.c (ptid_is_pid): Remove.
5762 * common/ptid.h (ptid_is_pid): Don't declare.
5763 * infrun.c: Update.
5764 * linux-nat.c: Update.
5765 * mi/mi-interp.c: Update.
5766 * remote.c: Update.
5767 * thread.c: Update.
5768
5769 2018-07-03 Tom Tromey <tom@tromey.com>
5770
5771 * common/ptid.c (ptid_get_tid): Remove.
5772 * common/ptid.h (ptid_get_tid): Don't declare.
5773 * ada-tasks.c: Update.
5774 * aix-thread.c: Update.
5775 * bsd-uthread.c: Update.
5776 * darwin-nat.c: Update.
5777 * fbsd-nat.c: Update.
5778 * i386-darwin-nat.c: Update.
5779 * infrun.c: Update.
5780 * linux-tdep.c: Update.
5781 * nto-procfs.c: Update.
5782 * ppc-ravenscar-thread.c: Update.
5783 * python/py-infthread.c: Update.
5784 * ravenscar-thread.c: Update.
5785 * sol-thread.c: Update.
5786 * sparc-ravenscar-thread.c: Update.
5787 * windows-nat.c: Update.
5788
5789 2018-07-03 Tom Tromey <tom@tromey.com>
5790
5791 * common/ptid.c (ptid_get_lwp): Remove.
5792 * common/ptid.h (ptid_get_lwp): Don't declare.
5793 * aarch64-linux-nat.c: Update.
5794 * ada-tasks.c: Update.
5795 * aix-thread.c: Update.
5796 * amd64-linux-nat.c: Update.
5797 * arm-linux-nat.c: Update.
5798 * corelow.c: Update.
5799 * fbsd-nat.c: Update.
5800 * fbsd-tdep.c: Update.
5801 * gnu-nat.c: Update.
5802 * i386-cygwin-tdep.c: Update.
5803 * i386-gnu-nat.c: Update.
5804 * i386-linux-nat.c: Update.
5805 * ia64-linux-nat.c: Update.
5806 * inf-ptrace.c: Update.
5807 * infrun.c: Update.
5808 * linux-fork.c: Update.
5809 * linux-nat.c: Update.
5810 * linux-tdep.c: Update.
5811 * linux-thread-db.c: Update.
5812 * mips-linux-nat.c: Update.
5813 * nat/aarch64-linux-hw-point.c: Update.
5814 * nat/aarch64-linux.c: Update.
5815 * nat/linux-btrace.c: Update.
5816 * nat/linux-osdata.c: Update.
5817 * nat/linux-procfs.c: Update.
5818 * nat/x86-linux-dregs.c: Update.
5819 * obsd-nat.c: Update.
5820 * ppc-fbsd-nat.c: Update.
5821 * ppc-linux-nat.c: Update.
5822 * procfs.c: Update.
5823 * python/py-infthread.c: Update.
5824 * ravenscar-thread.c: Update.
5825 * remote.c: Update.
5826 * s390-linux-nat.c: Update.
5827 * sol-thread.c: Update.
5828 * sol2-tdep.c: Update.
5829 * spu-linux-nat.c: Update.
5830 * x86-linux-nat.c: Update.
5831 * xtensa-linux-nat.c: Update.
5832
5833 2018-07-03 Tom Tromey <tom@tromey.com>
5834
5835 * common/ptid.c (ptid_get_pid): Remove.
5836 * common/ptid.h (ptid_get_pid): Don't declare.
5837 * aarch64-linux-nat.c: Update.
5838 * ada-lang.c: Update.
5839 * aix-thread.c: Update.
5840 * alpha-bsd-nat.c: Update.
5841 * amd64-fbsd-nat.c: Update.
5842 * amd64-linux-nat.c: Update.
5843 * arm-linux-nat.c: Update.
5844 * arm-nbsd-nat.c: Update.
5845 * auxv.c: Update.
5846 * break-catch-syscall.c: Update.
5847 * breakpoint.c: Update.
5848 * bsd-uthread.c: Update.
5849 * corelow.c: Update.
5850 * ctf.c: Update.
5851 * darwin-nat.c: Update.
5852 * fbsd-nat.c: Update.
5853 * fbsd-tdep.c: Update.
5854 * gcore.c: Update.
5855 * gnu-nat.c: Update.
5856 * hppa-nbsd-nat.c: Update.
5857 * hppa-obsd-nat.c: Update.
5858 * i386-fbsd-nat.c: Update.
5859 * ia64-linux-nat.c: Update.
5860 * inf-ptrace.c: Update.
5861 * infcmd.c: Update.
5862 * inferior.c: Update.
5863 * inferior.h: Update.
5864 * inflow.c: Update.
5865 * infrun.c: Update.
5866 * linux-fork.c: Update.
5867 * linux-nat.c: Update.
5868 * linux-tdep.c: Update.
5869 * linux-thread-db.c: Update.
5870 * m68k-bsd-nat.c: Update.
5871 * mi/mi-interp.c: Update.
5872 * mi/mi-main.c: Update.
5873 * mips-linux-nat.c: Update.
5874 * mips-nbsd-nat.c: Update.
5875 * mips64-obsd-nat.c: Update.
5876 * nat/aarch64-linux-hw-point.c: Update.
5877 * nat/aarch64-linux.c: Update.
5878 * nat/linux-btrace.c: Update.
5879 * nat/linux-osdata.c: Update.
5880 * nat/linux-procfs.c: Update.
5881 * nat/x86-linux-dregs.c: Update.
5882 * nto-procfs.c: Update.
5883 * obsd-nat.c: Update.
5884 * ppc-linux-nat.c: Update.
5885 * ppc-nbsd-nat.c: Update.
5886 * ppc-obsd-nat.c: Update.
5887 * proc-service.c: Update.
5888 * procfs.c: Update.
5889 * python/py-inferior.c: Update.
5890 * python/py-infthread.c: Update.
5891 * ravenscar-thread.c: Update.
5892 * record.c: Update.
5893 * remote-sim.c: Update.
5894 * remote.c: Update.
5895 * rs6000-nat.c: Update.
5896 * s390-linux-nat.c: Update.
5897 * sh-nbsd-nat.c: Update.
5898 * sol-thread.c: Update.
5899 * sparc-nat.c: Update.
5900 * sparc64-tdep.c: Update.
5901 * spu-linux-nat.c: Update.
5902 * spu-tdep.c: Update.
5903 * target-debug.h: Update.
5904 * target.c: Update.
5905 * thread.c: Update.
5906 * tid-parse.c: Update.
5907 * tracefile-tfile.c: Update.
5908 * vax-bsd-nat.c: Update.
5909 * windows-nat.c: Update.
5910 * x86-linux-nat.c: Update.
5911 * x86-nat.c: Update.
5912
5913 2018-07-03 Tom Tromey <tom@tromey.com>
5914
5915 * common/ptid.c (pid_to_ptid): Remove.
5916 * common/ptid.h (pid_to_ptid): Don't declare.
5917 * aix-thread.c: Update.
5918 * arm-linux-nat.c: Update.
5919 * common/ptid.c: Update.
5920 * common/ptid.h: Update.
5921 * corelow.c: Update.
5922 * ctf.c: Update.
5923 * darwin-nat.c: Update.
5924 * fbsd-nat.c: Update.
5925 * fork-child.c: Update.
5926 * gnu-nat.c: Update.
5927 * go32-nat.c: Update.
5928 * inf-ptrace.c: Update.
5929 * infcmd.c: Update.
5930 * inferior.c: Update.
5931 * infrun.c: Update.
5932 * linux-fork.c: Update.
5933 * linux-nat.c: Update.
5934 * nat/aarch64-linux-hw-point.c: Update.
5935 * nat/fork-inferior.c: Update.
5936 * nat/x86-linux-dregs.c: Update.
5937 * nto-procfs.c: Update.
5938 * obsd-nat.c: Update.
5939 * procfs.c: Update.
5940 * progspace.c: Update.
5941 * remote.c: Update.
5942 * rs6000-nat.c: Update.
5943 * s390-linux-nat.c: Update.
5944 * sol-thread.c: Update.
5945 * spu-linux-nat.c: Update.
5946 * target.c: Update.
5947 * top.c: Update.
5948 * tracefile-tfile.c: Update.
5949 * windows-nat.c: Update.
5950
5951 2018-07-03 Tom Tromey <tom@tromey.com>
5952
5953 * common/ptid.h (ptid_build): Don't declare.
5954 * common/ptid.c (ptid_build): Remove.
5955 * aix-thread.c: Update.
5956 * bsd-kvm.c: Update.
5957 * bsd-uthread.c: Update.
5958 * common/agent.c: Update.
5959 * common/ptid.c: Update.
5960 * common/ptid.h: Update.
5961 * corelow.c: Update.
5962 * darwin-nat.c: Update.
5963 * fbsd-nat.c: Update.
5964 * gnu-nat.c: Update.
5965 * linux-fork.c: Update.
5966 * linux-nat.c: Update.
5967 * linux-thread-db.c: Update.
5968 * nat/linux-osdata.c: Update.
5969 * nat/linux-procfs.c: Update.
5970 * nto-procfs.c: Update.
5971 * obsd-nat.c: Update.
5972 * proc-service.c: Update.
5973 * procfs.c: Update.
5974 * ravenscar-thread.c: Update.
5975 * remote-sim.c: Update.
5976 * remote.c: Update.
5977 * sol-thread.c: Update.
5978 * target.c: Update.
5979 * windows-nat.c: Update.
5980
5981 2018-07-03 Tom Tromey <tom@tromey.com>
5982
5983 * infrun.c (follow_exec): Use exit_inferior_silent.
5984 * inferior.c (exit_inferior_num_silent): Remove.
5985 * inferior.h (exit_inferior_num_silent): Don't declare.
5986
5987 2018-07-03 Tom Tromey <tom@tromey.com>
5988
5989 PR cli/23340:
5990 * darwin-nat.c (darwin_attach_pid): Reset inferior and
5991 inferior_ptid on error.
5992
5993 2018-07-02 Maciej W. Rozycki <macro@mips.com>
5994 Simon Marchi <simon.marchi@polymtl.ca>
5995
5996 PR tdep/8282
5997 * disasm.h (gdb_disassembler): Add
5998 `m_disassembler_options_holder'. member
5999 * disasm.c (get_all_disassembler_options): New function.
6000 (gdb_disassembler::gdb_disassembler): Use it.
6001 (gdb_buffered_insn_length_init_dis): Likewise.
6002 (gdb_buffered_insn_length): Adjust accordingly.
6003 (set_disassembler_options): Handle options with arguments.
6004 (show_disassembler_options_sfunc): Likewise. Add a leading new
6005 line if showing options with descriptions.
6006 (disassembler_options_completer): Adapt to using the
6007 `disasm_options_and_args_t' structure.
6008 * mips-tdep.c (mips_disassembler_options): New variable.
6009 (mips_disassembler_options_o32): Likewise.
6010 (mips_disassembler_options_n32): Likewise.
6011 (mips_disassembler_options_n64): Likewise.
6012 (gdb_print_insn_mips): Don't set `disassembler_options'.
6013 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6014 functions.
6015 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6016 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
6017 `gdbarch_disassembler_options_implicit' and
6018 `gdbarch_valid_disassembler_options'.
6019 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6020 `disasm_options_and_args_t' structure.
6021 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6022 method.
6023 (valid_disassembler_options): Switch from `disasm_options_t' to
6024 the `disasm_options_and_args_t' structure.
6025 * NEWS: Document `set disassembler-options' support for the MIPS
6026 target.
6027 * gdbarch.h: Regenerate.
6028 * gdbarch.c: Regenerate.
6029
6030 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
6031
6032 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6033
6034 2018-06-29 Joel Brobecker <brobecker@adacore.com>
6035
6036 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6037 parameter in call to amd64_target_description.
6038 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6039 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6040 (amd64fbsd_init_abi): Likewise.
6041 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6042 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6043 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6044 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6045
6046 2018-06-29 Pedro Alves <palves@redhat.com>
6047
6048 * gdb/amd64-tdep.h (amd64_create_target_description): Add
6049 "segments" parameter.
6050 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6051 (_initialize_amd64_tdep): Update call to
6052 amd64_create_target_description.
6053 (amd64_target_description): Add "segments" parameter. Adjust
6054 the implementation to use it.
6055 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6056 call to amd64_create_target_description.
6057 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6058 * gdb/arch/amd64.h (amd64_create_target_description): Add
6059 "segments" register.
6060 * gdb/arch/amd64.c (amd64_create_target_description): Add
6061 "segments" parameter. Call create_feature_i386_64bit_segments
6062 only if SEGMENTS is true.
6063 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6064 call to amd64_create_target_description.
6065
6066 2018-06-29 Pedro Alves <palves@redhat.com>
6067
6068 * thread.c (thread_target_id_str): New, factored out from ...
6069 (print_thread_info_1): ... here. Use it to compute the max
6070 "Target Id" column width.
6071
6072 2018-06-29 Pedro Alves <palves@redhat.com>
6073
6074 * remote.c (remote_target::extra_thread_info): Delete
6075 'display_buf' and 'n' locals. from the cache, regardless of
6076 packet mechanims is in use. Use cache for qThreadExtra and qP
6077 methods too.
6078
6079 2018-06-29 Pedro Alves <palves@redhat.com>
6080
6081 * blockframe.c (find_pc_sect_containing_function): New function.
6082 * breakpoint.c (print_breakpoint_location): Don't call
6083 find_pc_sect_function.
6084 * linespec.c (create_sals_line_offset): Record the location's
6085 symbol in the sal.
6086 * linespec.c (convert_address_location_to_sals): Fill in sal's
6087 symbol with find_pc_sect_containing_function.
6088 * symtab.c (find_function_start_sal): Rename to ...
6089 (find_function_start_sal_1): ... this.
6090 (find_function_start_sal): Reimplement as wrapper around
6091 find_function_start_sal_1, and use
6092 find_pc_sect_containing_function to fill in the sal's symbol.
6093 (find_function_start_sal(symbol*, bool)): Adjust.
6094 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6095 comments.
6096 (find_pc_sect_containing_function): Declare.
6097
6098 2018-06-29 Pedro Alves <palves@redhat.com>
6099
6100 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6101 true if the the location has no symbol.
6102
6103 2018-06-28 Tom Tromey <tom@tromey.com>
6104
6105 * NEWS: Mention --enable-codesign.
6106 * silent-rules.mk (ECHO_SIGN): New variable.
6107 * configure.ac: Add --enable-codesign.
6108 * configure: Rebuild.
6109 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6110 (gdb$(EXEEXT)): Optionally invoke codesign.
6111
6112 2018-06-28 Pedro Alves <palves@redhat.com>
6113
6114 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6115 comments.
6116 (switch_to_thread_no_regs): Adjust comment.
6117 * infcmd.c (stop_pc): Delete.
6118 (post_create_inferior, info_program_command): Replace references
6119 to stop_pc with references to thread_info->suspend.stop_pc.
6120 * inferior.h (stop_pc): Delete declaration.
6121 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6122 (handle_inferior_event_1, handle_signal_stop)
6123 (process_event_stop_test, keep_going_stepped_thread)
6124 (handle_step_into_function, handle_step_into_function_backward)
6125 (print_stop_location): Replace references to stop_pc with
6126 references to thread_info->suspend.stop_pc.
6127 (struct infcall_suspend_state) <stop_pc>: Delete field.
6128 (save_infcall_suspend_state, restore_infcall_suspend_state):
6129 Remove references to inf_stat->stop_pc.
6130 * linux-fork.c (fork_load_infrun_state): Likewise.
6131 * record-btrace.c (record_btrace_set_replay): Likewise.
6132 * record-full.c (record_full_goto_entry): Likewise.
6133 * remote.c (print_one_stopped_thread): Likewise.
6134 * target.c (target_resume): Extend comment.
6135 * thread.c (set_executing_thread): New.
6136 (set_executing): Use it.
6137 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6138 Remove references to stop_pc.
6139
6140 2018-06-28 Pedro Alves <palves@redhat.com>
6141
6142 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6143 Moving fetching stop_pc until after ecs->event_thread is refreshed.
6144
6145 2018-06-28 Tom Tromey <tom@tromey.com>
6146
6147 * coffread.c (coff_symfile_finish): Update.
6148 * xcoffread.c (xcoff_symfile_finish): Update.
6149 * elfread.c (elf_symfile_finish): Update.
6150 * symfile.h (dwarf2_free_objfile): Don't declare.
6151 * dwarf2read.c (_initialize_dwarf2_read): Use
6152 register_objfile_data_with_cleanup.
6153 (dwarf2_free_objfile): Now static. Change signature.
6154
6155 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6156
6157 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6158 option "-o" to add-symbol-file-load to add an offset to each
6159 section's load address.
6160 * symfile.c (set_objfile_default_section_offset): New function.
6161
6162 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6163
6164 * symfile.c (add_symbol_file_command): Make sure that sections
6165 with the same name are sorted in the same order.
6166
6167 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6168
6169 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6170 require the second argument. If omitted, load sections at the
6171 addresses specified in the file.
6172
6173 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6174
6175 * symfile.c (symbol_file_command, symbol_file_add_main_1)
6176 (_initialize_symfile): Add option "-o" to symbol-file to add an
6177 offset to each section of the symbol file.
6178
6179 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6180
6181 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6182
6183 2018-06-27 Tom Tromey <tom@tromey.com>
6184
6185 * stack.c (_initialize_stack): Update "func" help text.
6186
6187 2018-06-27 Tom Tromey <tom@tromey.com>
6188
6189 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6190 std::vector.
6191 (unwind_infopy_str, pyuw_create_unwind_info)
6192 (unwind_infopy_add_saved_register, pyuw_sniffer)
6193 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6194 Update.
6195 (struct saved_reg): Add constructor.
6196 <value>: Now a gdbpy_ref<>.
6197
6198 2018-06-27 Tom Tromey <tom@tromey.com>
6199
6200 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6201
6202 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6203
6204 * gdb-gdb.py.in: Format using autopep8.
6205
6206 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6207
6208 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6209 (type_lookup_function): Recognize CORE_ADDR values.
6210
6211 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6212
6213 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6214 print tag_name.
6215
6216 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6217
6218 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6219 <__lt__>: Add.
6220
6221 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6222
6223 * gdb-gdb.py: Move to...
6224 * gdb-gdb.py.in: ... here.
6225 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6226 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6227 dependencies.
6228 (distclean): Remove gdb-gdb.py when cleaning.
6229 (gdb-gdb.py, gdb-gdb.gdb): New rules.
6230 * configure: Re-generate.
6231
6232 2018-06-27 Pedro Alves <palves@redhat.com>
6233
6234 * proc-service.c (get_ps_regcache): New.
6235 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6236 (ps_lsetfpregs): Use it.
6237
6238 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
6239
6240 PR gdb/21695
6241 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6242 (dwarf_decode_lines_1): Adjust.
6243
6244 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6245
6246 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6247 override.
6248 <info_proc>: Likewise.
6249
6250 2018-06-26 Joel Brobecker <brobecker@adacore.com>
6251
6252 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6253 to windows_fetch_one_register, and only handle the case of
6254 fetching one register. Move the code that reloads the context
6255 and iterates over all registers if R is negative to...
6256 (windows_nat_target::fetch_registers): ... here.
6257 (do_windows_store_inferior_registers): Rename to
6258 windows_store_one_register, and only handle the case of storing
6259 one register. Move the code that handles the case where r is
6260 negative to...
6261 (windows_nat_target::store_registers) ... here.
6262
6263 2018-06-26 Tom Tromey <tom@tromey.com>
6264
6265 PR rust/22574:
6266 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6267 * rust-lang.c (rust_print_struct_def): Add podata parameter.
6268 Update.
6269 (rust_internal_print_type): Add podata parameter.
6270 (rust_print_type): Update.
6271
6272 2018-06-26 Tom Tromey <tom@tromey.com>
6273
6274 * typeprint.h (struct print_offset_data) <update, finish,
6275 maybe_print_hole>: New methods.
6276 <indentation>: New constant.
6277 * typeprint.c (print_offset_data::indentation): Define.
6278 (print_offset_data::maybe_print_hole, print_offset_data::update)
6279 (print_offset_data::finish): Move from c-typeprint.c and rename.
6280 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6281 (print_spaces_filtered_with_print_options): Update.
6282 (c_print_type_union_field_offset, maybe_print_hole)
6283 (c_print_type_struct_field_offset): Move to typeprint.c and
6284 rename.
6285 (c_type_print_base_struct_union): Update.
6286
6287 2018-06-25 Pedro Alves <palves@redhat.com>
6288
6289 * gdbthread.h (thread_info_ref, delete_thread)
6290 (delete_thread_silent, first_thread_of_inferior)
6291 (any_thread_of_inferior, switch_to_thread)
6292 (enable_thread_stack_temporaries)
6293 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6294 (get_last_thread_stack_temporary)
6295 (value_in_thread_stack_temporaries, can_access_registers_thread):
6296 Spell out "struct thread_info" instead of just "thread_info".
6297 * inferior.h (notice_new_inferior): Likewise.
6298
6299 2018-06-25 Pedro Alves <palves@redhat.com>
6300
6301 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6302 pass thread_info pointer to delete_thread.
6303 (windows_nat_target::detach): Pass inferior pointer to
6304 detach_inferior.
6305 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6306 delete_thread.
6307 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6308 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6309 and pass a thread_info pointer to delete_thread.
6310 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6311 pass thread_info pointer to delete_thread.
6312 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6313 delete_thread_silent call.
6314 * procfs.c (procfs_target::detach): Pass inferior pointer to
6315 detach_inferior.
6316 (procfs_target::wait): Pass thread_info pointer to delete_thread.
6317 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6318 delete_thread_silent call.
6319 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6320 pass thread_info pointer to delete_thread.
6321 (windows_nat_target::detach): Pass inferior pointer to
6322 delete_inferior.
6323
6324 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6325
6326 * regcache.c (readable_regcache::read_part): Fix asserts.
6327 (reg_buffer::raw_collect_part): New function.
6328 (regcache::write_part): Fix asserts.
6329 (reg_buffer::raw_supply_part): New function.
6330 (regcache::transfer_regset_register): New helper function.
6331 (regcache::transfer_regset): Call new functions.
6332 (regcache_supply_regset): Use gdb_byte*.
6333 (regcache::supply_regset): Likewise.
6334 (regcache_collect_regset): Likewise.
6335 (regcache::collect_regset): Likewise.
6336 * regcache.h (reg_buffer::raw_collect_part): New declaration.
6337 (reg_buffer::raw_supply_part): Likewise.
6338 (regcache::transfer_regset_register): Likewise.
6339 (regcache::transfer_regset): Use gdb_byte*.
6340
6341 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6342
6343 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6344
6345 2018-06-21 Pedro Alves <palves@redhat.com>
6346
6347 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6348 instead of a ptid_t. All callers adjusted.
6349 * ada-tasks.c (ada_get_task_number): Likewise. All callers
6350 adjusted.
6351 (print_ada_task_info, display_current_task_id, task_command_1):
6352 Adjust.
6353 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6354 inferior_thread.
6355 (breakpoint_kind): Adjust.
6356 (remove_breakpoints_pid): Rename to ...
6357 (remove_breakpoints_inf): ... this. Adjust to take an inferior
6358 pointer. All callers adjusted.
6359 (bpstat_clear_actions): Use inferior_thread.
6360 (get_bpstat_thread): New.
6361 (bpstat_do_actions): Use it.
6362 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6363 to take a thread_info pointer. All callers adjusted.
6364 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6365 (breakpoint_re_set_thread): Use inferior_thread.
6366 * breakpoint.h (struct inferior): Forward declare.
6367 (bpstat_stop_status): Update.
6368 (remove_breakpoints_pid): Delete.
6369 (remove_breakpoints_inf): New.
6370 * bsd-uthread.c (bsd_uthread_target::wait)
6371 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6372 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6373 (maint_btrace_packet_history_cmd)
6374 (maint_btrace_clear_packet_history_cmd): Adjust.
6375 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6376 inferior_thread.
6377 * cli/cli-interp.c: Include "inferior.h".
6378 * common/refcounted-object.h (struct
6379 refcounted_object_ref_policy): New.
6380 * compile/compile-object-load.c: Include gdbthread.h.
6381 (store_regs): Use inferior_thread.
6382 * corelow.c (core_target::close): Use current_inferior.
6383 (core_target_open): Adjust to use first_thread_of_inferior and use
6384 the current inferior.
6385 * ctf.c (ctf_target::close): Adjust to use current_inferior.
6386 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6387 <thread>: ... this new field. All references adjusted.
6388 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6389 Take a thread_info pointer instead of a ptid_t.
6390 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6391 (dummy_frame_discard, register_dummy_frame_dtor): Take a
6392 thread_info pointer instead of a ptid_t.
6393 * elfread.c: Include "inferior.h".
6394 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6395 Use inferior_thread.
6396 * eval.c (evaluate_subexp): Likewise.
6397 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6398 inferior_thread.
6399 * gdb_proc_service.h (struct thread_info): Forward declare.
6400 (struct ps_prochandle) <ptid>: Delete, replaced by ...
6401 <thread>: ... this new field. All references adjusted.
6402 * gdbarch.h, gdbarch.c: Regenerate.
6403 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6404 'thread' parameter. All implementations and callers adjusted.
6405 * gdbthread.h (thread_info) <set_running>: New method.
6406 (delete_thread, delete_thread_silent): Take a thread_info pointer
6407 instead of a ptid.
6408 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6409 (first_thread_of_process): Delete, replaced by ...
6410 (first_thread_of_inferior): ... this new function. All callers
6411 adjusted.
6412 (any_live_thread_of_process): Delete, replaced by ...
6413 (any_live_thread_of_inferior): ... this new function. All callers
6414 adjusted.
6415 (switch_to_thread, switch_to_no_thread): Declare.
6416 (is_executing): Delete.
6417 (enable_thread_stack_temporaries): Update comment.
6418 <enable_thread_stack_temporaries>: Take a thread_info pointer
6419 instead of a ptid_t. Incref the thread.
6420 <~enable_thread_stack_temporaries>: Decref the thread.
6421 <m_ptid>: Delete
6422 <m_thr>: New.
6423 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6424 (get_last_thread_stack_temporary)
6425 (value_in_thread_stack_temporaries, can_access_registers_thread):
6426 Take a thread_info pointer instead of a ptid_t. All callers
6427 adjusted.
6428 * infcall.c (get_call_return_value): Use inferior_thread.
6429 (run_inferior_call): Work with thread pointers instead of ptid_t.
6430 (call_function_by_hand_dummy): Work with thread pointers instead
6431 of ptid_t. Use thread_info_ref.
6432 * infcmd.c (proceed_thread_callback): Access thread's state
6433 directly.
6434 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6435 access thread's state directly.
6436 (continue_command): Use inferior_thread.
6437 (info_program_command): Use find_thread_ptid and access thread
6438 state directly.
6439 (proceed_after_attach_callback): Use thread state directly.
6440 (notice_new_inferior): Take a thread_info pointer instead of a
6441 ptid_t. All callers adjusted.
6442 (exit_inferior): Take an inferior pointer instead of a pid. All
6443 callers adjusted.
6444 (exit_inferior_silent): New.
6445 (detach_inferior): Delete.
6446 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6447 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6448 (detach_inferior_command, kill_inferior_command): Use
6449 find_inferior_id instead of valid_gdb_inferior_id and
6450 gdb_inferior_id_to_pid.
6451 (inferior_command): Use inferior and thread pointers.
6452 * inferior.h (struct thread_info): Forward declare.
6453 (notice_new_inferior): Take a thread_info pointer instead of a
6454 ptid_t. All callers adjusted.
6455 (detach_inferior): Delete declaration.
6456 (exit_inferior, exit_inferior_silent): Take an inferior pointer
6457 instead of a pid. All callers adjusted.
6458 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6459 (valid_gdb_inferior_id): Delete.
6460 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6461 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6462 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6463 ...
6464 <inf>: ... this new field.
6465 <step_ptid>: Delete, replaced by ...
6466 <step_thread>: ... this new field.
6467 (get_displaced_stepping_state): Take an inferior pointer instead
6468 of a pid. All callers adjusted.
6469 (displaced_step_in_progress_any_inferior): Adjust.
6470 (displaced_step_in_progress_thread): Take a thread pointer instead
6471 of a ptid_t. All callers adjusted.
6472 (displaced_step_in_progress, add_displaced_stepping_state): Take
6473 an inferior pointer instead of a pid. All callers adjusted.
6474 (get_displaced_step_closure_by_addr): Adjust.
6475 (remove_displaced_stepping_state): Take an inferior pointer
6476 instead of a pid. All callers adjusted.
6477 (displaced_step_prepare_throw, displaced_step_prepare)
6478 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6479 All callers adjusted.
6480 (start_step_over): Adjust.
6481 (infrun_thread_ptid_changed): Remove bit updating ptids in the
6482 displaced step queue.
6483 (do_target_resume): Adjust.
6484 (fetch_inferior_event): Use inferior_thread.
6485 (context_switch, get_inferior_stop_soon): Take an
6486 execution_control_state pointer instead of a ptid_t. All callers
6487 adjusted.
6488 (switch_to_thread_cleanup): Delete.
6489 (stop_all_threads): Use scoped_restore_current_thread.
6490 * inline-frame.c: Include "gdbthread.h".
6491 (inline_state) <inline_state>: Take a thread pointer instead of a
6492 ptid_t. All callers adjusted.
6493 <ptid>: Delete, replaced by ...
6494 <thread>: ... this new field.
6495 (find_inline_frame_state): Take a thread pointer instead of a
6496 ptid_t. All callers adjusted.
6497 (skip_inline_frames, step_into_inline_frame)
6498 (inline_skipped_frames, inline_skipped_symbol): Take a thread
6499 pointer instead of a ptid_t. All callers adjusted.
6500 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6501 (inline_skipped_frames, inline_skipped_symbol): Likewise.
6502 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6503 pointers directly.
6504 * linux-nat.c (get_detach_signal): Likewise.
6505 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6506 (thread_db_notice_clone): Adjust.
6507 (thread_db_find_new_threads_silently)
6508 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6509 a thread pointer instead of a ptid_t. All callers adjusted.
6510 * mi/mi-cmd-var.c: Include "inferior.h".
6511 (mi_cmd_var_update_iter): Update to use thread pointers.
6512 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6513 inferior directly.
6514 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6515 out to ...
6516 (mi_output_running): ... this new function.
6517 (mi_on_resume_1): Adjust to use it.
6518 (mi_user_selected_context_changed): Adjust to use inferior_thread.
6519 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6520 directly.
6521 (interrupt_thread_callback): : Adjust to use thread and inferior
6522 pointers.
6523 * proc-service.c: Include "gdbthread.h".
6524 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6525 * progspace-and-thread.c: Include "inferior.h".
6526 * progspace.c: Include "inferior.h".
6527 * python/py-exitedevent.c (create_exited_event_object): Adjust to
6528 hold a reference to an inferior_object.
6529 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6530 inferior_thread.
6531 * python/py-inferior.c (struct inferior_object): Give the type a
6532 tag name instead of a typedef.
6533 (python_on_normal_stop): No need to check if the current thread is
6534 listed.
6535 (inferior_to_inferior_object): Change return type to
6536 inferior_object. All callers adjusted.
6537 (find_thread_object): Delete, bits factored out to ...
6538 (thread_to_thread_object): ... this new function.
6539 * python/py-infthread.c (create_thread_object): Use
6540 inferior_to_inferior_object.
6541 (thpy_is_stopped): Use thread pointer directly.
6542 (gdbpy_selected_thread): Use inferior_thread.
6543 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6544 field, replaced with ...
6545 <thread>: ... this new field. All users adjusted.
6546 (btpy_insn_or_gap_new): Drop const.
6547 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
6548 callers adjusted.
6549 * python/py-record.c: Include "gdbthread.h".
6550 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6551 a ptid_t. All callers adjusted.
6552 (gdbpy_current_recording): Use inferior_thread.
6553 * python/py-record.h (recpy_record_object) <ptid>: Delete
6554 field, replaced with ...
6555 <thread>: ... this new field. All users adjusted.
6556 (recpy_element_object) <ptid>: Delete
6557 field, replaced with ...
6558 <thread>: ... this new field. All users adjusted.
6559 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6560 a ptid_t. All callers adjusted.
6561 * python/py-threadevent.c: Include "gdbthread.h".
6562 (get_event_thread): Use thread_to_thread_object.
6563 * python/python-internal.h (struct inferior_object): Forward
6564 declare.
6565 (find_thread_object, find_inferior_object): Delete declarations.
6566 (thread_to_thread_object, inferior_to_inferior_object): New
6567 declarations.
6568 * record-btrace.c: Include "inferior.h".
6569 (require_btrace_thread): Use inferior_thread.
6570 (record_btrace_frame_sniffer)
6571 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6572 (get_thread_current_frame): Use scoped_restore_current_thread and
6573 switch_to_thread.
6574 (get_thread_current_frame): Use thread pointer directly.
6575 (record_btrace_replay_at_breakpoint): Use thread's inferior
6576 pointer directly.
6577 * record-full.c: Include "inferior.h".
6578 * regcache.c: Include "gdbthread.h".
6579 (get_thread_arch_regcache): Use the inferior's address space
6580 directly.
6581 (get_thread_regcache, registers_changed_thread): New.
6582 * regcache.h (get_thread_regcache(thread_info *thread)): New
6583 overload.
6584 (registers_changed_thread): New.
6585 (remote_target) <remote_detach_1>: Swap order of parameters.
6586 (remote_add_thread): <remote_add_thread>: Return the new thread.
6587 (get_remote_thread_info(ptid_t)): New overload.
6588 (remote_target::remote_notice_new_inferior): Use thread pointers
6589 directly.
6590 (remote_target::process_initial_stop_replies): Use
6591 thread_info::set_running.
6592 (remote_target::remote_detach_1, remote_target::detach)
6593 (extended_remote_target::detach): Adjust.
6594 * stack.c (frame_show_address): Use inferior_thread.
6595 * target-debug.h (target_debug_print_thread_info_pp): New.
6596 * target-delegates.c: Regenerate.
6597 * target.c (default_thread_address_space): Delete.
6598 (memory_xfer_partial_1): Use current_inferior.
6599 (target_detach): Use current_inferior.
6600 (target_thread_address_space): Delete.
6601 (generic_mourn_inferior): Use current_inferior.
6602 * target.h (struct target_ops) <thread_address_space>: Delete.
6603 (target_thread_address_space): Delete.
6604 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
6605 pointers directly.
6606 (delete_thread_1, delete_thread, delete_thread_silent): Take a
6607 thread pointer instead of a ptid_t. Adjust all callers.
6608 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6609 (first_thread_of_process): Delete, replaced by ...
6610 (first_thread_of_inferior): ... this new function. All callers
6611 adjusted.
6612 (any_thread_of_process): Rename to ...
6613 (any_thread_of_inferior): ... this, and take an inferior pointer.
6614 (any_live_thread_of_process): Rename to ...
6615 (any_live_thread_of_inferior): ... this, and take an inferior
6616 pointer.
6617 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6618 (value_in_thread_stack_temporaries)
6619 (get_last_thread_stack_temporary): Take a thread pointer instead
6620 of a ptid_t. Adjust all callers.
6621 (thread_info::set_running): New.
6622 (validate_registers_access): Use inferior_thread.
6623 (can_access_registers_ptid): Rename to ...
6624 (can_access_registers_thread): ... this, and take a thread
6625 pointer.
6626 (print_thread_info_1): Adjust to compare thread pointers instead
6627 of ptids.
6628 (switch_to_no_thread, switch_to_thread): Make extern.
6629 (scoped_restore_current_thread::~scoped_restore_current_thread):
6630 Use m_thread pointer directly.
6631 (scoped_restore_current_thread::scoped_restore_current_thread):
6632 Use inferior_thread.
6633 (thread_command): Use thread pointer directly.
6634 (thread_num_make_value_helper): Use inferior_thread.
6635 * top.c (execute_command): Use inferior_thread.
6636 * tui/tui-interp.c: Include "inferior.h".
6637 * varobj.c (varobj_create): Use inferior_thread.
6638 (value_of_root_1): Use find_thread_global_id instead of
6639 global_thread_id_to_ptid.
6640
6641 2018-06-21 Alan Hayward <alan.hayward@arm.com>
6642
6643 * regcache.c (readable_regcache::read_part): Avoid memcpy when
6644 possible.
6645 (regcache::write_part): Likewise.
6646 (readable_regcache::cooked_read_part): Update comment.
6647 (readable_regcache::cooked_write_part): Likewise.
6648 * regcache.h: (readable_regcache::read_part): Likewise.
6649 (regcache::write_part): Likewise.
6650
6651 2018-06-21 Richard Bunt <richard.bunt@arm.com>
6652 Dirk Schubert <dirk.schubert@arm.com>
6653
6654 * aarch64-linux-nat.c (post_attach): New.
6655 (aarch64_linux_nat_target::post_attach): Override post_attach to
6656 record the number of hardware debug registers.
6657
6658 2018-06-20 Tom Tromey <tom@tromey.com>
6659
6660 * python/py-param.c (add_setshow_generic): Make parameters const.
6661 (parmpy_init): Update.
6662
6663 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6664
6665 * regcache.h (regcache_cooked_read_ftype): Rename to...
6666 (register_read_ftype): ...this, change type to function_view.
6667 (class reg_buffer) <save>: Remove src parameter.
6668 (readonly_detached_regcache) <readonly_detached_regcache>: Make
6669 parameter non-const in first overload. Remove src parameter in
6670 second overload.
6671 * regcache.c (do_cooked_read): Remove.
6672 (readonly_detached_regcache::readonly_detached_regcache): Make
6673 parameter non-const, adjust call to other constructor.
6674 (reg_buffer::save): Remove src parameter.
6675 * frame.c (do_frame_register_read): Remove.
6676 (frame_save_as_regcache): Use lambda function.
6677 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6678 parameter to ppu2spu_data *.
6679 (ppu2spu_sniffer): Use lambda function.
6680
6681 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6682
6683 * record-full.c (record_full_target::insert_breakpoint): Remove
6684 "struct" keyword, add const.
6685
6686 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6687
6688 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6689 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6690 * configure.ac: Remove AC_PREREQ, add missing quoting.
6691 * gnulib/configure.ac: Modernize usage of
6692 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
6693 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6694 (AUTOMAKE_VERSION): Bump to 1.15.1.
6695 * configure: Re-generate.
6696 * config.in: Re-generate.
6697 * aclocal.m4: Re-generate.
6698 * gnulib/aclocal.m4: Re-generate.
6699 * gnulib/config.in: Re-generate.
6700 * gnulib/configure: Re-generate.
6701 * gnulib/import/Makefile.in: Re-generate.
6702
6703 2018-06-19 Pedro Alves <palves@redhat.com>
6704
6705 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6706 (lookup_minimal_symbol_by_pc_section): ... here with
6707 gdb_assert_not_reached added.
6708
6709 2018-06-19 Pedro Alves <palves@redhat.com>
6710
6711 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6712 parameter with a block parameter. Compare location's block symbol
6713 with the frame's block instead of addresses.
6714 (skip_inline_frames): Pass the current block instead of the
6715 frame's address. Break out as soon as we determine the frame
6716 should not be skipped.
6717
6718 2018-06-18 Tom Tromey <tom@tromey.com>
6719
6720 * solib-aix.c (solib_aix_get_section_offsets): Return
6721 unique_xmalloc_ptr.
6722 (solib_aix_solib_create_inferior_hook): Update.
6723
6724 2018-06-18 Tom Tromey <tom@tromey.com>
6725
6726 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6727
6728 2018-06-18 Tom Tromey <tom@tromey.com>
6729
6730 * solib-frv.c (frv_relocate_main_executable): Use
6731 unique_xmalloc_ptr.
6732 * solib-dsbt.c (dsbt_relocate_main_executable): Use
6733 unique_xmalloc_ptr.
6734
6735 2018-06-18 Tom Tromey <tom@tromey.com>
6736
6737 * objfiles.h (inhibit_section_map_updates): Update.
6738 (resume_section_map_updates, resume_section_map_updates_cleanup):
6739 Remove.
6740 * solib-svr4.c (svr4_handle_solib_event): Update.
6741 * objfiles.c (inhibit_section_map_updates): Return
6742 scoped_restore_tmpl<int>.
6743 (resume_section_map_updates, resume_section_map_updates_cleanup):
6744 Remove.
6745
6746 2018-06-18 Tom Tromey <tom@tromey.com>
6747
6748 * valprint.h (read_string): Update.
6749 * valprint.c (read_string): Change type of "buffer".
6750 (val_print_string): Update.
6751 * python/py-value.c (valpy_string): Update.
6752 * language.h (struct language_defn) <la_get_string>: Change
6753 type of "buffer".
6754 (default_get_string, c_get_string): Update.
6755 * language.c (default_get_string): Change type of "buffer".
6756 * guile/scm-value.c (gdbscm_value_to_string): Update.
6757 * c-lang.c (c_get_string): Change type of "buffer".
6758
6759 2018-06-18 Tom Tromey <tom@tromey.com>
6760
6761 * ser-mingw.c (struct pipe_state_destroyer): New.
6762 (pipe_state_up): New typedef.
6763 (cleanup_pipe_state): Remove.
6764 (pipe_windows_open): Use pipe_state_up. Don't release argv.
6765
6766 2018-06-18 Tom Tromey <tom@tromey.com>
6767
6768 * rust-lang.h (rust_yyerror): Don't declare.
6769 * rust-lang.c (rust_language_defn): Update.
6770 * rust-exp.y (yyerror): Now static.
6771 * parse.c (parse_exp_in_context_1): Update.
6772 * p-lang.h (p_yyerror): Don't declare.
6773 * p-lang.c (p_language_defn): Update.
6774 * p-exp.y (yyerror): Now static.
6775 * opencl-lang.c (opencl_language_defn): Update.
6776 * objc-lang.c (objc_language_defn): Update.
6777 * m2-lang.h (m2_yyerror): Don't declare.
6778 * m2-lang.c (m2_language_defn): Update.
6779 * m2-exp.y (yyerror): Now static.
6780 * language.h (struct language_defn) <la_error>: Remove.
6781 * language.c (unk_lang_error): Remove.
6782 (unknown_language_defn, auto_language_defn): Remove.
6783 * go-lang.h (go_yyerror): Don't declare.
6784 * go-lang.c (go_language_defn): Update.
6785 * go-exp.y (yyerror): Now static.
6786 * f-lang.h (f_yyerror): Don't declare.
6787 * f-lang.c (f_language_defn): Update.
6788 * f-exp.y (yyerror): Now static.
6789 * d-lang.h (d_yyerror): Don't declare.
6790 * d-lang.c (d_language_defn): Update.
6791 * d-exp.y (yyerror): Now static.
6792 * c-lang.h (c_yyerror): Don't declare.
6793 * c-lang.c (c_language_defn, cplus_language_defn)
6794 (asm_language_defn, minimal_language_defn): Update.
6795 * c-exp.y (yyerror): Now static.
6796 * ada-lang.h (ada_yyerror): Don't declare.
6797 * ada-lang.c (ada_language_defn): Update.
6798 * ada-exp.y (yyerror): Now static.
6799
6800 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6801
6802 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6803 (store_sveregs_to_thread): Likewise.
6804 (aarch64_linux_fetch_inferior_registers): Check for SVE.
6805 (aarch64_linux_store_inferior_registers): Likewise.
6806 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6807 function.
6808 (aarch64_sve_regs_copy_to_regcache): Likewise.
6809 (aarch64_sve_regs_copy_from_regcache): Likewise.
6810 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6811 declaration.
6812 (aarch64_sve_regs_copy_to_regcache): Likewise.
6813 (aarch64_sve_regs_copy_from_regcache): Likewise.
6814 (sve_context): Structure from Linux headers.
6815 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6816 (SVE_SIG_ZREG_SIZE): Likewise.
6817 (SVE_SIG_PREG_SIZE): Likewise.
6818 (SVE_SIG_FFR_SIZE): Likewise.
6819 (SVE_SIG_REGS_OFFSET): Likewise.
6820 (SVE_SIG_ZREGS_OFFSET): Likewise.
6821 (SVE_SIG_ZREG_OFFSET): Likewise.
6822 (SVE_SIG_ZREGS_SIZE): Likewise.
6823 (SVE_SIG_PREGS_OFFSET): Likewise.
6824 (SVE_SIG_PREG_OFFSET): Likewise.
6825 (SVE_SIG_PREGS_SIZE): Likewise.
6826 (SVE_SIG_FFR_OFFSET): Likewise.
6827 (SVE_SIG_REGS_SIZE): Likewise.
6828 (SVE_SIG_CONTEXT_SIZE): Likewise.
6829 (SVE_PT_REGS_MASK): Likewise.
6830 (SVE_PT_REGS_FPSIMD): Likewise.
6831 (SVE_PT_REGS_SVE): Likewise.
6832 (SVE_PT_VL_INHERIT): Likewise.
6833 (SVE_PT_VL_ONEXEC): Likewise.
6834 (SVE_PT_REGS_OFFSET): Likewise.
6835 (SVE_PT_FPSIMD_OFFSET): Likewise.
6836 (SVE_PT_FPSIMD_SIZE): Likewise.
6837 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6838 (SVE_PT_SVE_PREG_SIZE): Likewise.
6839 (SVE_PT_SVE_FFR_SIZE): Likewise.
6840 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6841 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6842 (__SVE_SIG_TO_PT): Likewise.
6843 (SVE_PT_SVE_OFFSET): Likewise.
6844 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6845 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6846 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6847 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6848 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6849 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6850 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6851 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6852 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6853 (SVE_PT_SVE_SIZE): Likewise.
6854 (SVE_PT_SIZE): Likewise.
6855 (HAS_SVE_STATE): New define.
6856
6857 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6858
6859 * nat/aarch64-sve-linux-sigcontext.h: New file.
6860 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6861 new files.
6862 (SVE_VQ_MIN): Likewise.
6863 (SVE_VQ_MAX): Likewise.
6864 (SVE_VL_MIN): Likewise.
6865 (SVE_VL_MAX): Likewise.
6866 (SVE_NUM_ZREGS): Likewise.
6867 (SVE_NUM_PREGS): Likewise.
6868 (sve_vl_valid): Likewise.
6869 (struct user_sve_header): Likewise.
6870
6871 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6872 Richard Bunt <Richard.Bunt@arm.com>
6873
6874 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6875 was requested by GDB.
6876
6877 2018-06-15 Tom de Vries <tdevries@suse.de>
6878
6879 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6880
6881 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6882
6883 * gnulib/update-gnulib.sh: Print expected versions of
6884 autoconf/aclocal.
6885
6886 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6887
6888 * arch-utils.c (default_type_align): Use type_length_units.
6889 * gdbtypes.c (type_align): Use type_length_units.
6890
6891 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6892
6893 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6894 of 'define' command.
6895
6896 2018-06-14 Tom de Vries <tdevries@suse.de>
6897
6898 PR cli/22573
6899 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6900 get_no_prettyformat_print_options.
6901
6902 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6903
6904 * sparc-nat.h: Include target.h.
6905 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6906 <fetch_registers>: Remove this argument in function call.
6907 <store_registers>: Remove this argument in function call, remove
6908 extra semicolon.
6909 <low_forget_process>: Call sparc64_forget_process instead of
6910 sparc_forget_process.
6911
6912 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6913
6914 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6915 (procfs_target::make_corefile_notes): Adjust to new
6916 target_read_alloc return type.
6917
6918 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6919 Stephen Roberts <stephen.roberts@arm.com>
6920
6921 PR gdb/22882
6922 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6923 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6924 Move should_notify_stop local into more inner scope.
6925
6926 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6927 Stephen Roberts <stephen.roberts@arm.com>
6928
6929 PR gdb/22882
6930 * infrun.c (resume_1): Add call to mark_async_event_handler.
6931
6932 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6933
6934 * infrun.c (do_target_wait): Change old version of $pc printed.
6935
6936 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
6937
6938 * dwarf2read.c (read_index_from_section): Rename to...
6939 (read_gdb_index_from_section): ... this, update all callers.
6940 (dwarf2_read_index): Rename to...
6941 (dwarf2_read_gdb_index): ... this, update all callers.
6942
6943 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
6944
6945 * gdb/hppa-linux-nat.c
6946 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6947 hppa_linux_nat_target::fetch_registers.
6948
6949 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6950
6951 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6952 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6953 (AARCH64_DWARF_SVE_FFR): Likewise.
6954 (AARCH64_DWARF_SVE_P0): Likewise.
6955 (AARCH64_DWARF_SVE_Z0): Likewise.
6956
6957 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6958
6959 * common/common-regcache.h (raw_compare): New function.
6960 * regcache.c (regcache::raw_compare): Likewise.
6961 * regcache.h (regcache::raw_compare): New declaration.
6962
6963 2018-06-11 Alan Hayward <alan.hayward@arm.com>
6964
6965 * common/common-regcache.h (reg_buffer_common): New structure.
6966 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6967 (reg_buffer::raw_supply): Likewise.
6968 (reg_buffer::raw_supply_integer): Likewise.
6969 (reg_buffer::raw_supply_zeroed): Likewise.
6970 (reg_buffer::raw_collect): Likewise.
6971 (reg_buffer::raw_collect_integer): Likewise.
6972 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6973 (reg_buffer::raw_supply): Likewise.
6974 (reg_buffer::raw_supply_integer): Likewise.
6975 (reg_buffer::raw_supply_zeroed): Likewise.
6976 (reg_buffer::raw_collect): Likewise.
6977 (reg_buffer::raw_collect_integer): Likewise.
6978
6979 2018-06-10 Tom Tromey <tom@tromey.com>
6980
6981 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
6982 (class remote_state) <stop_reply_queue>: Now std::vector.
6983 (remote_state::~remote_state)
6984 (remote_target::stop_reply_queue_length): Update.
6985 (struct queue_iter_param, remove_child_of_pending_fork)
6986 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6987 (check_pending_event_prevents_wildcard_vcont_callback)
6988 (remove_stop_reply_for_inferior)
6989 (remove_stop_reply_of_remote_state)
6990 (remote_notif_remove_once_on_match)
6991 (stop_reply_match_ptid_and_ws)
6992 (remote_kill_child_of_pending_fork): Remove.
6993 (remote_target::remove_new_fork_children)
6994 (remote_target::check_pending_events_prevent_wildcard_vcont)
6995 (remote_target::discard_pending_stop_replies)
6996 (remote_target::discard_pending_stop_replies_in_queue)
6997 (remote_target::remote_notif_remove_queued_reply)
6998 (remote_target::queued_stop_reply)
6999 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7000 (remote_target::wait, remote_target::kill_new_fork_children)
7001 (remote_target::async): Update.
7002
7003 2018-06-10 Tom Tromey <tom@tromey.com>
7004
7005 * record-full.c (record_full_arch_list_cleanups): Remove.
7006 (record_full_message): Use try/catch.
7007 (record_full_wait_cleanups): Remove.
7008 (record_full_wait_1): Use try/catch.
7009 (record_full_restore): Likewise.
7010
7011 2018-06-10 Tom Tromey <tom@tromey.com>
7012
7013 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
7014 declare VEC. Add constructor.
7015 <in_target_beneath>: Now bool.
7016 (record_full_breakpoints): Now a std::vector, static.
7017 (record_full_sync_record_breakpoints)
7018 (record_full_init_record_breakpoints)
7019 (record_full_target::insert_breakpoint)
7020 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
7021
7022 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7023
7024 * dwarf2read.c (process_cu_includes): Remove struct keyword.
7025 * serial.c (serial_interface_lookup): Remove struct keyword.
7026
7027 2018-06-10 Tom Tromey <tom@tromey.com>
7028
7029 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7030 method.
7031 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7032 a method.
7033 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7034 method.
7035 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7036 "beneath" as a method.
7037 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7038 Use "beneath" as a method.
7039
7040 2018-06-10 Tom Tromey <tom@tromey.com>
7041
7042 * tracefile.c (struct trace_file_writer_deleter): New.
7043 <operator()>: Rename from trace_file_writer_xfree.
7044 (trace_file_writer_up): New typedef.
7045 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7046
7047 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
7048
7049 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7050 <m_registers, m_register_status>: Change type to
7051 std::unique_ptr.
7052 * regcache.c (reg_buffer::reg_buffer): Use new instead of
7053 XCNEWVEC.
7054
7055 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
7056
7057 * common/common-regcache.h (enum register_status): Add
7058 underlying type "signed char".
7059 * regcache.h (reg_buffer) <m_register_status>: Change type to
7060 register_status *.
7061 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7062 register_status instead of signed char.
7063 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7064 (reg_buffer::get_register_status): Remove cast.
7065 (readable_regcache::raw_read): Remove cast.
7066 (readable_regcache::cooked_read): Remove cast.
7067
7068 2018-06-09 Tom Tromey <tom@tromey.com>
7069
7070 * source.c (reverse_search_command, forward_search_command): Use
7071 scoped_fd.
7072
7073 2018-06-09 Tom Tromey <tom@tromey.com>
7074
7075 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
7076 (serial_ops_list): Now static, std::vector.
7077 (serial_interface_lookup, serial_add_interface): Update.
7078
7079 2018-06-09 Tom Tromey <tom@tromey.com>
7080
7081 * dwarf2read.c (process_cu_includes): Update.
7082 (process_full_comp_unit): Update.
7083 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7084 std::vector.
7085
7086 2018-06-08 Paul Koning <paul_koning@dell.com>
7087
7088 PR gdb/23252
7089
7090 * python/python.c (do_start_initialization):
7091 Avoid call to internal Python API.
7092 (init__gdb_module): New function.
7093
7094 2018-06-08 Gary Benson <gbenson@redhat.com>
7095
7096 * linux-thread-db.c (valprint.h): New include.
7097 (struct check_thread_db_info): New structure.
7098 (check_thread_db_on_load, tdb_testinfo): New static globals.
7099 (check_thread_db, check_thread_db_callback): New functions.
7100 (try_thread_db_load_1): Run integrity checks if requested.
7101 (maintenance_check_libthread_db): New function.
7102 (_initialize_thread_db): Register "maint check libthread-db"
7103 and "maint set/show check-libthread-db".
7104 * NEWS: Mention the above new commands.
7105
7106 2018-06-08 Tom Tromey <tom@tromey.com>
7107
7108 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7109 now a method.
7110
7111 2018-06-08 Tom Tromey <tom@tromey.com>
7112
7113 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7114
7115 2018-06-08 Tom Tromey <tom@tromey.com>
7116
7117 * common/btrace-common.h (struct btrace_data): Add constructor,
7118 destructor, move assignment operator.
7119 <empty, clear, fini>: New methods.
7120 <format>: Initialize.
7121 (btrace_data_init, btrace_data_fini, btrace_data_clear)
7122 (btrace_data_empty): Don't declare.
7123 * common/btrace-common.c (btrace_data_init): Remove.
7124 (btrace_data::fini): Rename from btrace_data_fini.
7125 (btrace_data::empty): Rename from btrace_data_empty.
7126 (btrace_data::clear): Rename from btrace_data_clear. Return
7127 bool.
7128 * btrace.h (make_cleanup_btrace_data): Don't declare.
7129 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7130 (parse_xml_btrace): Update.
7131 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7132 (maint_btrace_clear_packet_history_cmd): Update.
7133
7134 2018-06-07 Pedro Alves <palves@redhat.com>
7135
7136 * target.h (target_ops) <beneath>: Now a method. All references
7137 updated.
7138 (class target_stack): New.
7139 * target.c (g_target_stack): New.
7140 (g_current_top_target): Delete.
7141 (current_top_target): Get the top target out of g_target_stack.
7142 (target_stack::push, target_stack::unpush): New.
7143 (push_target, unpush_target): Reimplement.
7144 (target_is_pushed): Reimplement in terms of g_target_stack.
7145 (target_ops::beneath, target_stack::find_beneath): New.
7146
7147 2018-06-07 Pedro Alves <palves@redhat.com>
7148
7149 * target.h (find_target_beneath): Delete declaration.
7150 * target.c (find_target_beneath): Delete definition.
7151 * aix-thread.c: All callers of find_target_beneath adjusted to
7152 call target_ops::beneath instead.
7153 * bsd-uthread.c: Likewise.
7154 * linux-thread-db.c: Likewise.
7155 * ravenscar-thread.c: Likewise.
7156 * sol-thread.c: Likewise.
7157 * spu-multiarch.c: Likewise.
7158
7159 2018-06-07 Pedro Alves <palves@redhat.com>
7160
7161 * target.h (target_ops) <beneath>: Now a method. All references
7162 updated.
7163 (target_ops) <m_beneath>: New.
7164 * target.c (target_ops::beneath): New.
7165 * corelow.c: Adjust all references to target_ops::beneath.
7166 * linux-thread-db.c: Likewise.
7167 * make-target-delegates: Likewise.
7168 * record-btrace.c: Likewise.
7169 * record-full.c: Likewise.
7170 * remote.c: Likewise.
7171 * target.c: Likewise.
7172 * target-delegates.c: Regenerate.
7173
7174 2018-06-07 Pedro Alves <palves@redhat.com>
7175
7176 * target.h (target_stack): Delete.
7177 (current_top_target): Declare function.
7178 * target.c (target_stack): Delete.
7179 (g_current_top_target): New.
7180 (current_top_target): New function.
7181 * auxv.c: Use current_top_target instead of target_stack
7182 throughout.
7183 * avr-tdep.c: Likewise.
7184 * breakpoint.c: Likewise.
7185 * corefile.c: Likewise.
7186 * elfread.c: Likewise.
7187 * eval.c: Likewise.
7188 * exceptions.c: Likewise.
7189 * frame.c: Likewise.
7190 * gdbarch-selftests.c: Likewise.
7191 * gnu-v3-abi.c: Likewise.
7192 * ia64-tdep.c: Likewise.
7193 * ia64-vms-tdep.c: Likewise.
7194 * infcall.c: Likewise.
7195 * infcmd.c: Likewise.
7196 * infrun.c: Likewise.
7197 * linespec.c: Likewise.
7198 * linux-tdep.c: Likewise.
7199 * minsyms.c: Likewise.
7200 * ppc-linux-nat.c: Likewise.
7201 * ppc-linux-tdep.c: Likewise.
7202 * procfs.c: Likewise.
7203 * regcache.c: Likewise.
7204 * remote.c: Likewise.
7205 * rs6000-tdep.c: Likewise.
7206 * s390-linux-nat.c: Likewise.
7207 * s390-tdep.c: Likewise.
7208 * solib-aix.c: Likewise.
7209 * solib-darwin.c: Likewise.
7210 * solib-dsbt.c: Likewise.
7211 * solib-spu.c: Likewise.
7212 * solib-svr4.c: Likewise.
7213 * solib-target.c: Likewise.
7214 * sparc-tdep.c: Likewise.
7215 * sparc64-tdep.c: Likewise.
7216 * spu-tdep.c: Likewise.
7217 * symfile.c: Likewise.
7218 * symtab.c: Likewise.
7219 * target-descriptions.c: Likewise.
7220 * target-memory.c: Likewise.
7221 * target.c: Likewise.
7222 * target.h: Likewise.
7223 * tracefile-tfile.c: Likewise.
7224 * tracepoint.c: Likewise.
7225 * valops.c: Likewise.
7226 * valprint.c: Likewise.
7227 * value.c: Likewise.
7228 * windows-tdep.c: Likewise.
7229 * mi/mi-main.c: Likewise.
7230
7231 2018-06-07 Tom Tromey <tom@tromey.com>
7232
7233 * valprint.h (build_address_symbolic): Declare.
7234 * printcmd.c (print_address_symbolic): Update.
7235 (build_address_symbolic): Change "name" and "filename" to
7236 std::string.
7237 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7238 Update.
7239 * defs.h (build_address_symbolic): Remove declaration.
7240
7241 2018-06-07 Alan Hayward <alan.hayward@arm.com>
7242
7243 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7244 (aarch64_vnv_type): Add function.
7245 (aarch64_pseudo_register_name): Add V regs for SVE.
7246 (aarch64_pseudo_register_type): Likewise.
7247 (aarch64_pseudo_register_reggroup_p): Likewise.
7248 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7249 (aarch64_pseudo_read_value): Add V regs for SVE.
7250 (aarch64_pseudo_write_2): Use V0 offset for SVE
7251 (aarch64_pseudo_write): Add V regs for SVE.
7252 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7253
7254 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
7255
7256 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7257 (sve_vl_from_vq): Likewise.
7258
7259 2018-06-05 Tom Tromey <tom@tromey.com>
7260
7261 * cli/cli-cmds.c (show_version): Update.
7262 * top.c (print_gdb_version): Add "interactive" parameter.
7263 Update.
7264 * main.c (captured_main_1): Update.
7265 * top.h (print_gdb_version): Add "interactive" parameter and a
7266 comment.
7267
7268 2018-06-05 David Malcolm <dmalcolm@redhat.com>
7269
7270 * common/enum-flags.h: Add trailing semicolon to example in
7271 comment.
7272
7273 2018-06-05 Tom Tromey <tom@tromey.com>
7274
7275 PR cli/12326:
7276 * NEWS: Add entry about pager.
7277 * utils.c (pagination_disabled_for_command): New global.
7278 (prompt_for_continue): Allow "c" response to prompt.
7279 (reinitialize_more_filter): Clear
7280 pagination_disabled_for_command.
7281 (fputs_maybe_filtered): Check pagination_disabled_for_command.
7282
7283 2018-06-04 Tom Tromey <tom@tromey.com>
7284
7285 * ada-lang.h (ada_lookup_symbol_list): Update.
7286 * ada-lang.c (resolve_subexp): Update.
7287 (symbols_are_identical_enums): Change type of syms. Remove nsyms
7288 parameter.
7289 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7290 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7291 results parameter to std::vector.
7292 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7293 Update.
7294 * ada-exp.y (block_lookup): Update.
7295 (select_possible_type_sym): Change type of syms. Remove nsyms
7296 parameter.
7297 (write_var_or_type, write_name_assoc): Update.
7298
7299 2018-06-04 Joel Brobecker <brobecker@adacore.com>
7300
7301 * windows-nat.c (windows_nat_target::xfer_partial): Return
7302 TARGET_XFER_E_IO if we need to delegate to the target beneath
7303 but BENEATH is NULL.
7304
7305 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
7306
7307 * Makefile.in (config.status): Add configure.nat as a
7308 dependency.
7309
7310 2018-06-04 Tom Tromey <tom@tromey.com>
7311
7312 * cp-name-parser.y (cpname_state): Add method declarations.
7313 (HANDLE_QUAL): Update.
7314 (cpname_state::d_grab, cpname_state::fill_comp)
7315 (cpname_state::make_operator, cpname_state::make_dtor)
7316 (cpname_state::make_builtin_type, cpname_state::make_name)
7317 (cpname_state::d_qualify, cpname_state::d_int_type)
7318 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7319 (%union): Move earlier.
7320
7321 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7322
7323 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7324
7325 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7326
7327 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7328 (aarch64_pseudo_write_1): Likewise.
7329 (aarch64_pseudo_read_value): Use helper.
7330 (aarch64_pseudo_write): Likewise.
7331
7332 2018-06-04 Pedro Alves <palves@redhat.com>
7333
7334 * darwin-nat.c (darwin_ops): Delete.
7335 (darwin_attach_pid): Use get_native_target.
7336
7337 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7338
7339 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7340 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7341
7342 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7343
7344 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7345 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7346 (aarch64_gdbarch_init): Check for SVE.
7347 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7348
7349 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7350
7351 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7352 * aarch64-tdep.h (aarch64_read_description): Likewise.
7353 * arch/aarch64.c (aarch64_create_target_description): Likewise.
7354 * arch/aarch64.h (aarch64_create_target_description): Likewise.
7355 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7356 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7357 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7358
7359 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
7360
7361 * value.c (value_fetch_lazy_bitfield): New.
7362 (value_fetch_lazy_memory): New.
7363 (value_fetch_lazy_register): New.
7364 (value_fetch_lazy): Factor out to smaller functions.
7365
7366 2018-06-01 Tom Tromey <tom@tromey.com>
7367
7368 * cp-name-parser.y (backslashable, represented): Now const.
7369
7370 2018-06-01 Tom Tromey <tom@tromey.com>
7371
7372 * cp-name-parser.y: Include parser-defs.h.
7373 (parser_fprintf): Remove declaration.
7374
7375 2018-06-01 Tom Tromey <tom@tromey.com>
7376
7377 * cp-name-parser.y: Use %pure-parser, %lex-param, and
7378 %parse-param.
7379 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7380 (global_result): Remove globals.
7381 (struct cpname_state): New.
7382 (yyparse): Don't declare.
7383 (yylex, yyerror): Move declarations after %union.
7384 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7385 (make_name): Add state parameter.
7386 Update all callers.
7387 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7388 parameter.
7389 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7390 Update.
7391 (yylex): Add lvalp, state parameters.
7392 (yyerror): Add state parameter.
7393 (cp_demangled_name_to_comp): Update.
7394
7395 2018-06-01 Tom Tromey <tom@tromey.com>
7396
7397 * cp-name-parser.y (parser_fprintf): Declare.
7398 (GDB_YY_REMAP_PREFIX): Define.
7399 Include yy-remap.h. Don't redefine yy* identifiers.
7400
7401 2018-06-01 Tom Tromey <tom@tromey.com>
7402
7403 * python/py-type.c (typy_legacy_template_argument): Update.
7404 * cp-support.h (cp_demangled_name_to_comp): Update.
7405 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7406 parameter to be a "std::string *".
7407 (main): Update.
7408
7409 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
7410
7411 * ada-lex.l: Include "diagnostics.h" instead of
7412 "common/diagnostics.h".
7413 * unittests/environ-selftests.c: Likewise.
7414 * common/diagnostics.h: Moved to ../include.
7415
7416 2018-06-01 Joel Brobecker <brobecker@adacore.com>
7417
7418 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7419 to language_mode_manual while calling breakpoint_re_set_one.
7420
7421 2018-06-01 Tom Tromey <tom@tromey.com>
7422
7423 * valops.c (value_cast_structs, destructor_name_p): Update.
7424 * symtab.c (gdb_mangle_name): Update.
7425 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7426 Update.
7427 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7428 (pascal_object_print_value_fields, pascal_object_print_value):
7429 Update.
7430 * p-typeprint.c (pascal_type_print_derivation_info): Update.
7431 * linespec.c (find_methods): Update.
7432 * gdbtypes.h (type_name_no_tag): Remove.
7433 (type_name_or_error): Rename from type_name_no_tag_or_error.
7434 * gdbtypes.c (type_name_no_tag): Remove.
7435 (type_name_or_error): Rename from type_name_no_tag_or_error.
7436 (lookup_struct_elt_type, check_typedef): Update.
7437 * expprint.c (print_subexp_standard): Update.
7438 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7439 * d-namespace.c (d_lookup_nested_symbol): Update.
7440 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7441 (cp_print_class_member): Update.
7442 * cp-namespace.c (cp_lookup_nested_symbol): Update.
7443 * completer.c (add_struct_fields): Update.
7444 * c-typeprint.c (cp_type_print_derivation_info)
7445 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7446 Update.
7447 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7448 (ada_prefer_type, ada_is_exception_sym): Update.
7449
7450 2018-06-01 Tom Tromey <tom@tromey.com>
7451
7452 * valops.c (enum_constant_from_type, value_namespace_elt)
7453 (value_maybe_namespace_elt): Update.
7454 * valarith.c (find_size_for_pointer_math): Update.
7455 * target-descriptions.c (make_gdb_type): Update.
7456 * symmisc.c (print_symbol): Update.
7457 * stabsread.c (define_symbol, read_type)
7458 (complain_about_struct_wipeout, add_undefined_type)
7459 (cleanup_undefined_types_1): Update.
7460 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7461 (rust_range_type_p, val_print_struct, rust_print_struct_def)
7462 (rust_internal_print_type, rust_composite_type)
7463 (rust_evaluate_funcall, rust_evaluate_subexp)
7464 (rust_inclusive_range_type_p): Update.
7465 * python/py-type.c (typy_get_tag): Update.
7466 * p-typeprint.c (pascal_type_print_base): Update.
7467 * mdebugread.c (parse_symbol, parse_type): Update.
7468 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7469 Update.
7470 * guile/scm-type.c (gdbscm_type_tag): Update.
7471 * go-lang.c (sixg_string_p): Update.
7472 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7473 Update.
7474 * gdbtypes.h (struct main_type) <tag_name>: Remove.
7475 (TYPE_TAG_NAME): Remove.
7476 * gdbtypes.c (type_name_no_tag): Simplify.
7477 (check_typedef, check_types_equal, recursive_dump_type)
7478 (copy_type_recursive, arch_composite_type): Update.
7479 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
7480 in summary mode when needed.
7481 * eval.c (evaluate_funcall): Update.
7482 * dwarf2read.c (fixup_go_packaging, read_structure_type)
7483 (process_structure_scope, read_enumeration_type)
7484 (read_namespace_type, read_module_type, determine_prefix): Update.
7485 * cp-support.c (inspect_type): Update.
7486 * coffread.c (process_coff_symbol, decode_base_type): Update.
7487 * c-varobj.c (c_is_path_expr_parent): Update.
7488 * c-typeprint.c (c_type_print_base_struct_union): Update.
7489 (c_type_print_base_1): Update. Print struct/class/union/enum in
7490 summary when using C language.
7491 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7492 (gen_maybe_namespace_elt): Update.
7493 * ada-lang.c (ada_type_name): Simplify.
7494 (empty_record, ada_template_to_fixed_record_type_1)
7495 (template_to_static_fixed_type)
7496 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7497
7498 2018-06-01 Tom Tromey <tom@tromey.com>
7499
7500 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7501 c_print_type.
7502 * c-typeprint.c (c_print_type_1): Add "language" parameter.
7503 (c_print_type): Update.
7504 (c_print_type): New overload.
7505 (c_type_print_varspec_prefix, c_type_print_args)
7506 (c_type_print_varspec_suffix, c_print_type_no_offsets)
7507 (c_type_print_base_struct_union, c_type_print_base_1)
7508 (cp_type_print_method_args): Add "language" parameter.
7509 (c_type_print_base): Update.
7510 * c-lang.h (c_print_type): Add new overload.
7511
7512 2018-06-01 Tom Tromey <tom@tromey.com>
7513
7514 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7515 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7516
7517 2018-06-01 Alan Hayward <alan.hayward@arm.com>
7518
7519 * aarch64-tdep.c (aarch64_sve_register_names): New const
7520 var.
7521 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7522 (AARCH64_SVE_Z_REGS_NUM): New define.
7523 (AARCH64_SVE_P_REGS_NUM): Likewise.
7524 (AARCH64_SVE_NUM_REGS): Likewise.
7525
7526 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7527
7528 * nat/linux-ptrace.h [__alpha__]
7529 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7530 definitions.
7531
7532 2018-05-31 Maciej W. Rozycki <macro@mips.com>
7533
7534 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7535 the endianness selected.
7536 * NEWS: Document `set endian auto' mode operation update.
7537
7538 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7539
7540 * Makefile.in: Add new header.
7541 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7542 (sve_vl_from_vg): Likewise.
7543 (sve_vq_from_vl): Likewise.
7544 (sve_vl_from_vq): Likewise.
7545 (sve_vq_from_vg): Likewise.
7546 (sve_vg_from_vq): Likewise.
7547 * configure.nat: Add new c file.
7548 * nat/aarch64-sve-linux-ptrace.c: New file.
7549 * nat/aarch64-sve-linux-ptrace.h: New file.
7550
7551 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7552
7553 * aarch64-linux-nat.c (aarch64_linux_read_description):
7554 Add parmeter zero.
7555 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7556 Likewise.
7557 * aarch64-tdep.c (tdesc_aarch64_list): Add.
7558 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7559 (aarch64_gdbarch_init): Add parmeter zero.
7560 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7561 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7562 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7563 parmeter.
7564 * doc/gdb.texinfo: Describe SVE feature
7565 * features/aarch64-sve.c: New file.
7566
7567 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
7568
7569 PR gdb/23210
7570 * gdbarch.sh (significant_addr_bit): Default to zero when
7571 not set by target architecture.
7572 * gdbarch.c: Re-generated.
7573 * utils.c (address_significant): Update.
7574
7575 2018-05-30 Joel Brobecker <brobecker@adacore.com>
7576
7577 * stack.c (func_command): Remove trailing newline in call to error.
7578
7579 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7580
7581 * regcache.h (regcache_raw_collect): Remove, update callers to
7582 use regcache::raw_collect.
7583 * regcache.c (regcache_raw_collect): Remove.
7584
7585 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7586
7587 * regcache.h (regcache_raw_supply): Remove, update callers to
7588 use detached_regcache::raw_supply.
7589 * regcache.c (regcache_raw_supply): Remove.
7590
7591 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7592
7593 * regcache.h (regcache_cooked_write_part): Remove, update
7594 callers to use regcache::cooked_write_part.
7595 * regcache.c (regcache_cooked_write_part): Remove.
7596
7597 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7598
7599 * regcache.h (regcache_cooked_read_part): Remove, update callers
7600 to use readable_regcache::cooked_read_part.
7601 * regcache.c (regcache_cooked_read_part): Remove.
7602
7603 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7604
7605 * regcache.h (regcache_cooked_read_value): Remove, update
7606 callers to use readable_regcache::cooked_read_value.
7607 * regcache.c (regcache_cooked_read_value): Remove.
7608
7609 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7610
7611 * regcache.h (regcache_cooked_write): Remove, update callers to
7612 use regcache::cooked_write.
7613 * regcache.c (regcache_cooked_write): Remove.
7614
7615 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7616
7617 * regcache.h (regcache_invalidate): Remove, update callers to
7618 use detached_regcache::invalidate instead.
7619 * regcache.c (regcache_invalidate): Remove.
7620
7621 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7622
7623 * regcache.h (regcache_raw_write_part): Remove, update callers
7624 to use regcache::raw_write_part instead.
7625 * regcache.c (regcache_raw_write_part): Remove.
7626
7627 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7628
7629 * regcache.h (regcache_raw_read_part): Remove, update callers to
7630 use readable_regcache::raw_read_part instead.
7631 * regcache.c (regcache_raw_read_part): Remove.
7632
7633 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7634
7635 * regcache.h (regcache_cooked_read): Remove, update callers to
7636 use readable_regcache::cooked_read instead.
7637 * regcache.c (regcache_cooked_read): Remove.
7638
7639 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7640
7641 * regcache.h (regcache_raw_write): Remove, update callers to use
7642 regcache::raw_write instead.
7643 * regcache.c (regcache_raw_write): Remove.
7644
7645 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7646
7647 * regcache.h (regcache_raw_read): Remove, update callers to use
7648 readable_regcache::raw_read instead.
7649 * regcache.c (regcache_raw_read): Remove.
7650
7651 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7652
7653 * regcache.h (regcache_raw_update): Remove, update callers to
7654 use readable_regcache::raw_update instead.
7655 * regcache.c (regcache_raw_update): Remove.
7656
7657 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7658
7659 * regcache.h (regcache_register_status): Remove, update callers
7660 to use reg_buffer::get_register_status directly instead.
7661 * regcache.c (regcache_register_status): Remove.
7662
7663 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7664
7665 * regcache.h (regcache_get_ptid): Remove, update all callers to
7666 call regcache::ptid instead.
7667 * regcache.c (regcache_get_ptid): Remove.
7668
7669 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7670
7671 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7672
7673 2018-05-30 Pedro Alves <palves@redhat.com>
7674
7675 * common/common-exceptions.h (exception_rethrow): Use
7676 ATTRIBUTE_NORETURN.
7677
7678 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
7679
7680 * breakpoint.c (print_solib_event, check_status_catch_solib):
7681 Remove struct keyword in range-based for loops.
7682 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7683 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7684 Likewise.
7685 * linespec.c (find_superclass_methods, search_minsyms_for_name):
7686 Likewise.
7687 * symfile.c (addr_info_make_relative): Likewise.
7688 * thread.c (value_in_thread_stack_temporaries): Likewise.
7689
7690 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
7691
7692 PR gdb/16841
7693 * valops.c (value_struct_elt_for_reference): Call check_typedef on
7694 aggregate type to get its real type before accessing it.
7695
7696 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
7697
7698 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7699 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7700 * coff-pe-read.c (add_pe_forwarded_sym): Replace
7701 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7702 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7703 * jit.c (jit_breakpoint_re_set_internal): Likewise.
7704 * printcmd.c (info_address_command): Likewise.
7705
7706 2018-05-29 Tom Tromey <tom@tromey.com>
7707
7708 * windows-nat.c (handle_exception): Update fall-through comment.
7709
7710 2018-05-29 Tom Tromey <tom@tromey.com>
7711
7712 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
7713 (struct program_space) <added_solibs>: Now a std::vector.
7714 * breakpoint.c (print_solib_event): Update.
7715 (check_status_catch_solib): Update.
7716 * progspace.c (clear_program_space_solib_cache): Update.
7717 * solib.c (update_solib_list): Update.
7718
7719 2018-05-29 Tom Tromey <tom@tromey.com>
7720
7721 * python/py-type.c (typy_richcompare): Update.
7722 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7723 * gdbtypes.h (types_deeply_equal): Return bool.
7724 (types_equal): Likewise.
7725 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
7726 declare VEC.
7727 (check_types_equal): Change worklist to std::vector. Return
7728 bool.
7729 (struct type_equality_entry): Add constructor.
7730 (compare_maybe_null_strings): Return bool.
7731 (check_types_worklist): Return bool. Change worklist to
7732 std::vector.
7733 (types_deeply_equal): Use std::vector.
7734 (types_equal): Return bool.
7735 (compare_maybe_null_strings): Simplify.
7736
7737 2018-05-29 Tom Tromey <tom@tromey.com>
7738
7739 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
7740
7741 2018-05-29 Tom Tromey <tom@tromey.com>
7742
7743 * objc-lang.h: Don't include cp-support.h.
7744 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
7745 declare VEC.
7746
7747 2018-05-27 Tom Tromey <tom@tromey.com>
7748
7749 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7750
7751 2018-05-25 Tom Tromey <tom@tromey.com>
7752
7753 * value.c (value::location): Initialize.
7754
7755 2018-05-25 Tom Tromey <tom@tromey.com>
7756
7757 * dbxread.c (init_bincl_list): Remove.
7758 (bincl_list): Now a std::vector.
7759 (bincls_allocated, next_bincl): Remove.
7760 (free_bincl_list, do_free_bincl_list_cleanup)
7761 (make_cleanup_free_bincl_list): Remove.
7762 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7763 unique_xmalloc_ptr.
7764 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7765 (struct header_file_location): Add constructor.
7766 (add_bincl_to_list): Remove.
7767
7768 2018-05-25 Tom Tromey <tom@tromey.com>
7769
7770 * tui/tui.c (tui_enable): Update.
7771 * mi/mi-interp.c (mi_interp::init): Update.
7772 * interps.h (class interp) <name>: New method.
7773 <m_name>: Rename from name.
7774 (~scoped_restore_interp): Update.
7775 * interps.c (interp::interp): Update.
7776 (interp_add, interp_set, interp_lookup_existing)
7777 (current_interp_named_p): Update.
7778
7779 2018-05-25 Tom Tromey <tom@tromey.com>
7780
7781 * interps.c (interp_name): Remove.
7782 * mi/mi-interp.c (mi_interp::init): Update.
7783 * interps.h (interp_name): Remove.
7784 (~scoped_restore_interp): Update.
7785 * tui/tui.c (tui_enable): Update.
7786
7787 2018-05-25 Tom Tromey <tom@tromey.com>
7788
7789 * utils.c (fputs_maybe_filtered): Update.
7790 * linespec.c (decode_line_full): Update.
7791 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7792 (mi_print_breakpoint_for_event, mi_solib_loaded)
7793 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7794 (mi_user_selected_context_changed): Update.
7795 * mi/mi-main.c (mi_execute_command): Update.
7796 * cli/cli-script.c (execute_control_command): Update.
7797 * python/python.c (execute_gdb_command): Update.
7798 * solib.c (info_sharedlibrary_command): Update.
7799 * interps.c (interp_ui_out): Remove.
7800 * interps.h (interp_ui_out): Remove.
7801
7802 2018-05-25 Tom Tromey <tom@tromey.com>
7803
7804 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7805 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7806 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7807
7808 2018-05-25 Tom Tromey <tom@tromey.com>
7809
7810 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7811 * interps.c (interp_exec): Use scoped_restore.
7812
7813 2018-05-25 Tom Tromey <tom@tromey.com>
7814
7815 * remote.c (remote_target::remote_file_get): Use
7816 gdb::byte_vector.
7817 (remote_target::remote_file_put): Likewise.
7818
7819 2018-05-25 Tom Tromey <tom@tromey.com>
7820
7821 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7822 a std::string.
7823 (get_pe_section_index, add_pe_exported_sym): Update.
7824 (read_pe_exported_syms): Use gdb::def_vector.
7825
7826 2018-05-25 Tom Tromey <tom@tromey.com>
7827
7828 * frame.c (remove_prev_frame): Remove.
7829 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7830
7831 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7832
7833 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7834 Remove prototypes.
7835 * mips-linux-nat.c (supply_fpregset): Always call
7836 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7837 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7838 `mips_fill_fpregset'.
7839 * mips-linux-tdep.c (mips_supply_fpregset)
7840 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7841 (mips_fill_fpregset_wrapper): Remove functions.
7842 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7843 (mips_linux_fpregset): Remove variable.
7844 (mips_linux_iterate_over_regset_sections): Use
7845 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7846 (mips_linux_o32_sigframe_init): Remove comment.
7847
7848 2018-05-25 Pedro Alves <palves@redhat.com>
7849
7850 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7851 (struct readahead_cache, struct packet_reg, struct
7852 remote_arch_state, class remote_state): Move higher up in the
7853 file.
7854 (remote_target::m_remote_state): Now an object instead of a pointer.
7855 (remote_target::get_remote_state): Adjust.
7856
7857 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7858
7859 * stack.c (select_and_print_frame): Delete.
7860 (struct function_bounds): Move struct within function.
7861 (func_command): Most content moved into new function
7862 find_frame_for_function, use new function, print result, add
7863 function comment.
7864 (find_frame_for_function): New function, now returns a result.
7865
7866 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7867
7868 * stack.c (iterate_over_block_arg_vars): Fix comment.
7869 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7870
7871 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7872
7873 PR gdb/23203
7874 * frame.c
7875 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7876 Define.
7877 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7878 Define.
7879 * frame.h (class scoped_restore_selected_frame): New class.
7880 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7881 of any exception, use scoped_restore_selected_frame to restore the
7882 frame instead.
7883
7884 2018-05-24 Pedro Alves <palves@redhat.com>
7885
7886 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7887 override.
7888
7889 2018-05-23 Tom Tromey <tom@tromey.com>
7890
7891 * complaints.c (struct complaints): Remove.
7892 (symfile_complaint_book): Remove.
7893 (series): New global.
7894 (complaint_internal): Update.
7895 (clear_complaints): Update.
7896
7897 2018-05-23 Tom Tromey <tom@tromey.com>
7898
7899 * complaints.c (counters): New global.
7900 (struct complain): Remove.
7901 (struct complaints) <root>: Remove.
7902 (complaint_sentinel): Remove.
7903 (symfile_complaint_book): Update.
7904 (find_complaint) Remove.
7905 (complaint_internal, clear_complaints): Update.
7906
7907 2018-05-23 Tom Tromey <tom@tromey.com>
7908
7909 * complaints.c (struct complain) <file, line>: Remove.
7910 (find_complaint): Remove file, line parameters.
7911 (complaint_internal): Update.
7912
7913 2018-05-23 Tom Tromey <tom@tromey.com>
7914
7915 * complaints.c (vcomplaint): Remove.
7916 (complaint_internal) Merge in contents of vcomplaint.
7917
7918 2018-05-23 Tom Tromey <tom@tromey.com>
7919
7920 * complaints.c (struct complaints) <explanation>: Remove.
7921 (symfile_explanations): Remove.
7922 (symfile_complaint_book): Update.
7923 (vcomplaint): Update.
7924 (struct explanation): Remove.
7925
7926 2018-05-23 Tom Tromey <tom@tromey.com>
7927
7928 * complaints.c (symfile_complaints): Remove.
7929 (complaint_internal): Remove "complaints" parameter.
7930 (clear_complaints, vcomplaint): Remove "c" parameter.
7931 (get_complaints): Remove.
7932 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7933 (dwarf2_debug_line_missing_file_complaint)
7934 (dwarf2_debug_line_missing_end_sequence_complaint)
7935 (dwarf2_complex_location_expr_complaint)
7936 (dwarf2_const_value_length_mismatch_complaint)
7937 (dwarf2_section_buffer_overflow_complaint)
7938 (dwarf2_macro_malformed_definition_complaint)
7939 (dwarf2_invalid_attrib_class_complaint)
7940 (create_addrmap_from_index, dw2_symtab_iter_next)
7941 (dw2_expand_marked_cus)
7942 (dw2_debug_names_iterator::find_vec_in_debug_names)
7943 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7944 (create_debug_type_hash_table, init_cutu_and_read_dies)
7945 (partial_die_parent_scope, add_partial_enumeration)
7946 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7947 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7948 (read_import_statement, read_file_scope, create_dwo_cu_reader)
7949 (create_cus_hash_table, create_dwp_hash_table)
7950 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7951 (dwarf2_rnglists_process, dwarf2_ranges_process)
7952 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7953 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7954 (handle_struct_member_die, process_structure_scope)
7955 (read_array_type, read_common_block, read_module_type)
7956 (read_tag_pointer_type, read_typedef, read_base_type)
7957 (read_subrange_type, load_partial_dies, partial_die_info::read)
7958 (partial_die_info::read, partial_die_info::read)
7959 (partial_die_info::read, read_checked_initial_length_and_offset)
7960 (dwarf2_string_attr, read_formatted_entries)
7961 (dwarf_decode_line_header)
7962 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7963 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7964 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7965 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7966 (get_signatured_type, get_DW_AT_signature_type)
7967 (decode_locdesc, file_file_name, consume_improper_spaces)
7968 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7969 (dwarf_decode_macro_bytes, dwarf_decode_macros)
7970 (dwarf2_symbol_mark_computed, set_die_type)
7971 (read_attribute_value): Update.
7972 * stap-probe.c (handle_stap_probe, get_stap_base_address):
7973 Update.
7974 * dbxread.c (unknown_symtype_complaint)
7975 (lbrac_mismatch_complaint, repeated_header_complaint)
7976 (set_namestring, function_outside_compilation_unit_complaint)
7977 (read_dbx_symtab, process_one_symbol): Update.
7978 * gdbtypes.c (stub_noname_complaint): Update.
7979 * windows-nat.c (handle_unload_dll): Update.
7980 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7981 (decode_base_type): Update.
7982 * xcoffread.c (bf_notfound_complaint, ef_complaint)
7983 (eb_complaint, record_include_begin, record_include_end)
7984 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7985 (process_xcoff_symbol, read_symbol)
7986 (function_outside_compilation_unit_complaint)
7987 (scan_xcoff_symtab): Update.
7988 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7989 * buildsym.c (finish_block_internal, make_blockvector)
7990 (end_symtab_get_static_block, augment_type_symtab): Update.
7991 * dtrace-probe.c (dtrace_process_dof)
7992 (dtrace_static_probe_ops::get_probes): Update.
7993 * complaints.h (struct complaint): Don't declare.
7994 (symfile_complaints): Remove.
7995 (complaint_internal): Remove "complaints" parameter.
7996 (complaint): Likewise.
7997 (clear_complaints): Likewise.
7998 * symfile.c (syms_from_objfile_1, finish_new_objfile)
7999 (reread_symbols): Update.
8000 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8001 (dwarf2_frame_cache, decode_frame_entry): Update.
8002 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8003 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8004 (info_selectors_command): Update.
8005 * macrotab.c (macro_include, check_for_redefinition)
8006 (macro_undef): Update.
8007 * objfiles.c (filter_overlapping_sections): Update.
8008 * stabsread.c (invalid_cpp_abbrev_complaint)
8009 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8010 (define_symbol, error_type, read_type, rs6000_builtin_type)
8011 (stabs_method_name_from_physname, read_member_functions)
8012 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8013 (attach_fields_to_type, complain_about_struct_wipeout)
8014 (read_range_type, read_args, common_block_start)
8015 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8016 Update.
8017 * mdebugread.c (index_complaint, unknown_ext_complaint)
8018 (basic_type_complaint, bad_tag_guess_complaint)
8019 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8020 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8021 (parse_procedure, parse_lines)
8022 (function_outside_compilation_unit_complaint)
8023 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8024 (bad_tag_guess_complaint, reg_value_complaint): Update.
8025 * cp-support.c (demangled_name_complaint): Update.
8026 * macroscope.c (sal_macro_scope): Update.
8027 * dwarf-index-write.c (class debug_names): Update.
8028
8029 2018-05-23 Tom Tromey <tom@tromey.com>
8030
8031 * complaints.c (clear_complaints): Remove "noisy" parameter.
8032 * complaints.h (clear_complaints): Update.
8033 * symfile.c (syms_from_objfile_1, finish_new_objfile)
8034 (reread_symbols): Update.
8035
8036 2018-05-23 Tom Tromey <tom@tromey.com>
8037
8038 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8039 SUBSEQUENT_MESSAGE.
8040 (vcomplaint, clear_complaints): Update.
8041 (symfile_explanations): Remove some messages.
8042
8043 2018-05-23 Tom Tromey <tom@tromey.com>
8044
8045 * complaints.c (internal_complaint): Remove.
8046 * complaints.h (internal_complaint): Remove.
8047
8048 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8049
8050 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8051
8052 2018-05-22 Pedro Alves <palves@redhat.com>
8053
8054 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8055 (remote_fileio_badfd, remote_fileio_return_errno)
8056 (remote_fileio_return_success, remote_fileio_func_open)
8057 (remote_fileio_func_open, remote_fileio_func_close)
8058 (remote_fileio_func_read, remote_fileio_func_write)
8059 (remote_fileio_func_lseek, remote_fileio_func_rename)
8060 (remote_fileio_func_unlink, remote_fileio_func_stat)
8061 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8062 (remote_fileio_func_isatty, remote_fileio_func_system): Add
8063 remote_target parameter.
8064 (remote_fio_func_map) <func>: Add remote_target parameter.
8065 (do_remote_fileio_request, remote_fileio_request):
8066 * remote-fileio.h (remote_fileio_request):
8067 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8068 remote_target parameter.
8069 (remote_notif_process, handle_notification): Adjust to pass down
8070 the remote.
8071 (remote_notif_state_allocate): Add remote_target parameter. Save
8072 it.
8073 * remote-notif.h (struct remote_target): Forward declare.
8074 (struct notif_client) <parse, ack, can_get_pending_events>: Add
8075 remote_target parameter.
8076 (struct remote_notif_state) <remote>: New field.
8077 (remote_notif_ack, remote_notif_parse): Add remote_target
8078 parameter.
8079 (remote_notif_state_allocate, remote_notif_state_allocate): Add
8080 remote_target parameter.
8081 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8082 (threads_listing_context, rmt_thread_action, protocol_feature)
8083 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8084 (packet_result, struct threads_listing_context, remote_state):
8085 Move definitions and declarations higher up.
8086 (remote_target) <~remote_target>: Declare.
8087 (remote_download_command_source, remote_file_put, remote_file_get)
8088 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8089 (remote_hostio_pread_vFile, remote_hostio_send_command)
8090 (remote_hostio_set_filesystem, remote_hostio_open)
8091 (remote_hostio_close, remote_hostio_unlink, remote_state)
8092 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8093 (get_memory_write_packet_size, get_memory_read_packet_size)
8094 (append_pending_thread_resumptions, remote_detach_1)
8095 (append_resumption, remote_resume_with_vcont)
8096 (add_current_inferior_and_thread, wait_ns, wait_as)
8097 (process_stop_reply, remote_notice_new_inferior)
8098 (process_initial_stop_replies, remote_add_thread)
8099 (btrace_sync_conf, remote_btrace_maybe_reopen)
8100 (remove_new_fork_children, kill_new_fork_children)
8101 (discard_pending_stop_replies, stop_reply_queue_length)
8102 (check_pending_events_prevent_wildcard_vcont)
8103 (discard_pending_stop_replies_in_queue, stop_reply)
8104 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8105 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8106 (remote_interrupt_as, remote_interrupt_ns)
8107 (remote_get_noisy_reply, remote_query_attached)
8108 (remote_add_inferior, remote_current_thread, get_current_thread)
8109 (set_thread, set_general_thread, set_continue_thread)
8110 (set_general_process, write_ptid)
8111 (remote_unpack_thread_info_response, remote_get_threadinfo)
8112 (parse_threadlist_response, remote_get_threadlist)
8113 (remote_threadlist_iterator, remote_get_threads_with_ql)
8114 (remote_get_threads_with_qxfer)
8115 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8116 (get_offsets, remote_check_symbols, remote_supported_packet)
8117 (remote_query_supported, remote_packet_size)
8118 (remote_serial_quit_handler, remote_detach_pid)
8119 (remote_vcont_probe, remote_resume_with_hc)
8120 (send_interrupt_sequence, interrupt_query)
8121 (remote_notif_get_pending_events, fetch_register_using_p)
8122 (send_g_packet, process_g_packet, fetch_registers_using_g)
8123 (store_register_using_P, store_registers_using_G)
8124 (set_remote_traceframe, check_binary_download)
8125 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8126 (remote_xfer_live_readonly_partial, remote_read_bytes)
8127 (remote_send_printf, remote_flash_write, readchar)
8128 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8129 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8130 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8131 (extended_remote_disable_randomization, extended_remote_run)
8132 (send_environment_packet, extended_remote_environment_support)
8133 (extended_remote_set_inferior_cwd, remote_write_qxfer)
8134 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8135 (packet_command): Now methods of ...
8136 (remote_target): ... this class.
8137 (m_remote_state) <remote_target>: New field.
8138 (struct remote_state) <stop_reply_queue,
8139 remote_async_inferior_event_token, wait_forever_enabled_p>: New
8140 fields.
8141 (remote_state::remote_state): Allocate stop_reply_queue.
8142 (remote_state): Delete global.
8143 (get_remote_state_raw): Delete.
8144 (remote_target::get_remote_state): Allocate m_remote_state on
8145 demand.
8146 (get_current_remote_target): New.
8147 (remote_ops, extended_remote_ops): Delete.
8148 (wait_forever_enabled_p, remote_async_inferior_event_token):
8149 Delete, moved to struct remote_state.
8150 (remote_target::close): Delete self. Destruction bits split to
8151 ...
8152 (remote_target::~remote_target): ... this.
8153 (show_memory_packet_size): Adjust to use
8154 get_current_remote_target.
8155 (struct protocol_feature) <func>: Add remote_target parameter.
8156 All callers adjusted.
8157 (curr_quit_handler_target): New.
8158 (remote_serial_quit_handler): Reimplement.
8159 (remote_target::open_1): Adjust to use get_current_remote_target.
8160 Heap-allocate remote_target/extended_remote_target instances.
8161 (vcont_builder::vcont_builder): Add remote_target parameter, and
8162 save it in m_remote. All callers adjusted.
8163 (vcont_builder::m_remote): New field.
8164 (vcont_builder::restart, vcont_builder::flush)
8165 (vcont_builder::push_action): Use it.
8166 (remote_target::commit_resume): Use it.
8167 (struct queue_iter_param) <remote>: New field.
8168 (remote_target::remove_new_fork_children): Fill in 'remote' field.
8169 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8170 (check_pending_event_prevents_wildcard_vcont_callback)
8171 (remote_target::check_pending_events_prevent_wildcard_vcont)
8172 (remote_target::discard_pending_stop_replies)
8173 (remote_target::discard_pending_stop_replies_in_queue)
8174 (remote_target::remote_notif_remove_queued_reply): Fill in
8175 'remote' field.
8176 (remote_notif_get_pending_events): New.
8177 (remote_target::readchar, remote_target::remote_serial_write):
8178 Save/restore curr_quit_handler_target.
8179 (putpkt): New.
8180 (kill_new_fork_children): Fill in 'remote' field.
8181 (packet_command): Use get_current_remote_target, defer to
8182 remote_target method of same name.
8183 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8184 parameter, and save it in m_remote. All callers adjusted.
8185 (scoped_remote_fd::release): Use m_remote.
8186 (scoped_remote_fd::m_remote): New field.
8187 (remote_file_put, remote_file_get, remote_file_delete): Use
8188 get_current_remote_target, defer to remote_target method of same
8189 name.
8190 (remote_btrace_reset): Add remote_state paremeter. Update all
8191 callers.
8192 (remote_async_inferior_event_handler). Pass down 'data'.
8193 (remote_new_objfile): Use get_current_remote_target.
8194 (remote_target::vcont_r_supported): New.
8195 (set_range_stepping): Use get_current_remote_target and
8196 remote_target::vcont_r_supported.
8197 (_initialize_remote): Don't allocate 'remote_state' and
8198 'stop_reply_queue' globals.
8199 * remote.h (struct remote_target): Forward declare.
8200 (getpkt, putpkt, remote_notif_get_pending_events): Add
8201 'remote_target' parameter.
8202
8203 2018-05-22 Pedro Alves <palves@redhat.com>
8204
8205 * remote.c (vcont_builder): Now a class. Make all data members
8206 private.
8207 (vcont_builder) <vcont_builder, restart, flush, push_action>:
8208 Declare methods.
8209 (vcont_builder_restart): Rename to ...
8210 (vcont_builder::restart): ... this.
8211 (vcont_builder_flush): Rename to ...
8212 (vcont_builder::flush): ... this.
8213 (vcont_builder_push_action): Rename to ...
8214 (vcont_builder::push_action): ... this.
8215 (remote_target::commit_resume): Adjust.
8216
8217 2018-05-22 Pedro Alves <palves@redhat.com>
8218
8219 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8220 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8221 (get_fixed_memory_packet_size): New.
8222 (get_memory_packet_size): Use it.
8223 (set_memory_packet_size): Don't override the config size with
8224 DEFAULT_MAX_MEMORY_PACKET_SIZE.
8225 (show_memory_packet_size): Use get_fixed_memory_packet_size.
8226 Don't refer to get_memory_packet_size if not connected to a remote
8227 target. Show "(default)" if configured size is 0.
8228
8229 2018-05-22 Pedro Alves <palves@redhat.com>
8230
8231 * remote.c (remote_target::mourn_inferior): Move
8232 discard_pending_stop_replies call here from ...
8233 (_initialize_remote): ... here.
8234
8235 2018-05-22 Pedro Alves <palves@redhat.com>
8236
8237 * remote.c (compare_section_command): Remove set_general_process
8238 call.
8239
8240 2018-05-22 Pedro Alves <palves@redhat.com>
8241
8242 * remote.c (struct packet_reg, struct remote_arch_state):
8243 Move higher up in the file.
8244 (remote_state) <m_arch_states>: Store remote_arch_state values
8245 instead of remote_arch_state pointers.
8246 (remote_state::get_remote_arch_state): Adjust.
8247
8248 2018-05-22 Pedro Alves <palves@redhat.com>
8249
8250 * remote.c: Include <unordered_map>.
8251 (remote_state): Now a class.
8252 (remote_state) <get_remote_arch_state>: Declare method.
8253 <get_remote_arch_state>: New field.
8254 (remote_arch_state) <remote_arch_state>: Declare ctor.
8255 <regs>: Now a unique_ptr.
8256 (remote_gdbarch_data_handle): Delete.
8257 (get_remote_arch_state): Delete.
8258 (remote_state::get_remote_arch_state): New.
8259 (get_remote_state): Adjust to call remote_state's
8260 get_remote_arch_state method.
8261 (init_remote_state): Delete, bits factored out to ...
8262 (remote_arch_state::remote_arch_state): ... this new method.
8263 (get_remote_packet_size, get_memory_packet_size)
8264 (process_g_packet, remote_target::fetch_registers)
8265 (remote_target::prepare_to_store, store_registers_using_G)
8266 (remote_target::store_registers, remote_target::get_trace_status):
8267 Adjust to call remote_state's method.
8268 (_initialize_remote): Remove reference to
8269 remote_gdbarch_data_handle.
8270
8271 2018-05-22 Pedro Alves <palves@redhat.com>
8272
8273 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8274 pread>: New method declarations.
8275 (remote_target::open_1): Adjust.
8276 (readahead_cache_invalidate): Rename to ...
8277 (readahead_cache::invalidate): ... this, and adjust to be a class
8278 method.
8279 (readahead_cache_invalidate_fd): Rename to ...
8280 (readahead_cache::invalidate_fd): ... this, and adjust to be a
8281 class method.
8282 (remote_hostio_pwrite): Adjust.
8283 (remote_hostio_pread_from_cache): Rename to ...
8284 (readahead_cache::pread): ... this, and adjust to be a class
8285 method.
8286 (remote_hostio_close): Adjust.
8287
8288 2018-05-22 Pedro Alves <palves@redhat.com>
8289
8290 * remote.c (remote_hostio_close_cleanup): Delete.
8291 (class scoped_remote_fd): New.
8292 (remote_file_put, remote_file_get): Use it.
8293
8294 2018-05-22 Pedro Alves <palves@redhat.com>
8295
8296 (struct vCont_action_support): Use bool and initialize all fields.
8297 (struct readahead_cache): Initialize all fields.
8298 (remote_state): Use bool and initialize all fields.
8299 (remote_state::remote_state, remote_state::~remote_state): New.
8300 (new_remote_state): Delete.
8301 (_initialize_remote): Use new to allocate remote_state.
8302
8303 2018-05-22 Pedro Alves <palves@redhat.com>
8304 張俊芝 <zjz@zjz.name>
8305
8306 PR gdb/22973
8307 * c-exp.y: Include "c-support.h".
8308 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8309 of tolower. Use c_ident_is_alpha to scan names.
8310 * c-lang.c: Include "c-support.h".
8311 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8312 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8313 * c-support.h: New file, with bits factored out from ...
8314 * cp-name-parser.y: ... this file.
8315 Include "c-support.h".
8316 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8317 c-support.h and renamed.
8318 (symbol_end, yylex): Adjust.
8319
8320 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8321
8322 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8323 parameter type to CORE_ADDR.
8324 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8325 parameter type in declaration to CORE_ADDR.
8326 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8327 target_auxv_search to get AT_HWCAP and use the result to get the
8328 target description.
8329 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8330 to CORE_ADDR. Remove the cast of the return value to unsigned
8331 long. Fix error predicate of target_auxv_search.
8332 (ppc_linux_nat_target::read_description): Change the type of the
8333 hwcap variable to CORE_ADDR.
8334
8335 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8336
8337 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8338 if the size of fpscr is larger than 32 bits.
8339
8340 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8341
8342 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8343 (ppc32_linux_vsxregmap): New global.
8344 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8345 regcache_supply_regset, and regcache_collect_regset.
8346 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8347 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8348 (fetch_vsx_register, store_vsx_register): Remove.
8349 (fetch_vsx_registers): Add regno parameter. Get regset using
8350 ppc_linux_vsxregset. Use regset to supply registers.
8351 (store_vsx_registers): Add regno parameter. Get regset using
8352 ppc_linux_vsxregset. Use regset to collect registers.
8353 (fetch_register): Call fetch_vsx_registers instead of
8354 fetch_vsx_register.
8355 (store_register): Call store_vsx_registers instead of
8356 store_vsx_register.
8357 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8358 new regno parameter.
8359 (store_ppc_registers): Call store_vsx_registers with -1 for the
8360 new regno parameter.
8361 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8362 (ppc_collect_vsxregset): Remove.
8363
8364 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8365
8366 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8367 offset fields.
8368 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8369 for vector register offset fields.
8370 (ppc64_fbsd_reg_offsets): Likewise.
8371 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8372 to vector register offset fields.
8373 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8374 to vector register offset fields.
8375 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8376 vector register offset fields.
8377 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8378 initializers for vector register offset fields.
8379 (rs6000_aix64_reg_offsets): Likewise.
8380 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8381 (ppc_supply_vrregset): Remove.
8382 (ppc_collect_vrregset): Remove.
8383 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8384 (ppc_linux_vrregset) : New function.
8385 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8386 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8387 (ppc32_linux_vrregset): Remove.
8388 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8389 and use result instead of ppc32_linux_vrregset.
8390 (ppc32_linux_reg_offsets): Remove initializers for vector register
8391 offset fields.
8392 (ppc64_linux_reg_offsets): Likewise.
8393 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8394 * ppc-linux-nat.c: Include regset.h.
8395 (gdb_vrregset_t): Adjust comment to account for little-endian
8396 mode.
8397 (supply_vrregset, fill_vrregset): Remove.
8398 (fetch_altivec_register, store_altivec_register): Remove.
8399 (fetch_altivec_registers): Add regno parameter. Get regset using
8400 ppc_linux_vrregset. Use regset to supply registers.
8401 (store_altivec_registers): Add regno parameter. Get regset using
8402 ppc_linux_vrregset. Use regset to collect registers.
8403 (fetch_register): Call fetch_altivec_registers instead of
8404 fetch_altivec_register.
8405 (store_register): Call store_altivec_registers instead of
8406 store_altivec_register.
8407 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8408 the new regno parameter.
8409 (store_ppc_registers): Call store_altivec_registers with -1 for
8410 the new regno parameter.
8411
8412 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8413
8414 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8415 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8416 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8417 (gdb_vrregset_t): Change array type size to
8418 PPC_LINUX_SIZEOF_VRREGSET.
8419 (gdb_vsxregset_t): Change array type size to
8420 PPC_LINUX_SIZEOF_VSXREGSET.
8421 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8422 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8423 PPC_LINUX_SIZEOF_VSXREGSET.
8424
8425 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8426
8427 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8428 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8429 nat/ppc-linux.c.
8430 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8431 ppc_linux_target_wordsize with tid.
8432 (ppc_linux_nat_target::read_description): Call ppc_linux_target
8433 wordsize with tid.
8434 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8435 (ppc64_64bit_inferior_p): Add static and inline specifiers.
8436 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8437 tid parameter. Remove static specifier.
8438 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8439 (ppc_linux_target_wordsize): New declaration.
8440
8441 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8442
8443 * arch/ppc-linux-common.c: New file.
8444 * arch/ppc-linux-common.h: New file.
8445 * arch/ppc-linux-tdesc.h: New file.
8446 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8447 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8448 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8449 arch/ppc-linux-tdesc.h.
8450 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8451 arch/ppc-linux-tdesc.h.
8452 (ppc_linux_nat_target::read_description): Remove target
8453 description matching code. Fill a ppc_linux_features struct and
8454 call ppc_linux_match_description with it. Move comment about ISA
8455 2.05 to ppc-linux-common.c.
8456 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8457 arch/ppc-linux-tdesc.h.
8458 (ppc_linux_core_read_description): Remove target description
8459 matching code. Fill a ppc_linux_features struct and call
8460 ppc_linux_match_description with it.
8461 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8462 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8463 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8464 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8465 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8466 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8467 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8468 (tdesc_powerpc_e500l): Remove.
8469
8470 2018-05-22 Joel Brobecker <brobecker@adacore.com>
8471
8472 * ada-lang.c (catch_assert_command): Pass empty string instead
8473 of NULL for excep_string argument.
8474
8475 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8476
8477 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8478 the width of the requested register exceeds the width of the
8479 `ptrace' data type.
8480
8481 2018-05-21 Tom Tromey <tom@tromey.com>
8482
8483 * printcmd.c (output_command): Remove.
8484 (output_command_const): Rename to output_command.
8485 * valprint.h (output_command): Rename from output_command_const.
8486 * tracepoint.c (trace_dump_actions): Call output_command.
8487
8488 2018-05-21 Tom Tromey <tom@tromey.com>
8489
8490 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8491 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8492 * ada-lang.h (create_ada_exception_catchpoint): Update.
8493 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8494 std::string.
8495 (create_excep_cond_exprs, ~ada_catchpoint)
8496 (should_stop_exception, print_one_exception)
8497 (print_mention_exception, print_recreate_exception): Update.
8498 (ada_get_next_arg): Remove.
8499 (catch_ada_exception_command_split): Use std::string. Change type
8500 of "excep_string", "cond_string".
8501 (catch_ada_exception_command): Update.
8502 (create_ada_exception_catchpoint): Change type of excep_string.
8503 (ada_exception_sal): Remove excep_string parameter.
8504 (~ada_catchpoint): Remove.
8505
8506 2018-05-21 Tom Tromey <tom@tromey.com>
8507
8508 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8509 cleanup.
8510
8511 2018-05-21 Tom Tromey <tom@tromey.com>
8512
8513 * ada-lang.c (ada_exception_message_1, ada_exception_message):
8514 Return unique_xmalloc_ptr.
8515 (print_it_exception): Update.
8516
8517 2018-05-21 Tom Tromey <tom@tromey.com>
8518
8519 * tracepoint.c (trace_dump_actions): Use std::string.
8520
8521 2018-05-21 Tom Tromey <tom@tromey.com>
8522
8523 * symfile.c (reread_symbols): Use std::string for original_name.
8524
8525 2018-05-21 Tom Tromey <tom@tromey.com>
8526
8527 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8528 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
8529 constructor.
8530
8531 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
8532
8533 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8534 instance to...
8535 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8536 * objfiles.c (get_objfile_bfd_data): Allocate
8537 objfile_per_bfd_storage with obstack_new when allocating on
8538 obstack.
8539
8540 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8541
8542 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8543 OBSTACK_ZALLOC.
8544 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8545 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8546 * mdebugread.c (mdebug_build_psymtabs): Likewise.
8547 (add_pending): Likewise.
8548 (parse_symbol): Likewise.
8549 (parse_partial_symbols): Likewise.
8550 (psymtab_to_symtab_1): Likewise.
8551 (new_psymtab): Likewise.
8552 (elfmdebug_build_psymtabs): Likewise.
8553 * minsyms.c (terminate_minimal_symbol_table): Likewise.
8554 * objfiles.c (get_objfile_bfd_data): Likewise.
8555 (objfile_register_static_link): Likewise.
8556 * psymtab.c (allocate_psymtab): Likewise.
8557 * stabsread.c (read_member_functions): Likewise.
8558 * xcoffread.c (xcoff_end_psymtab): Likewise.
8559
8560 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8561
8562 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8563 compiler supports std::is_trivially_constructible.
8564 * common/poison.h: Include obstack.h.
8565 (IsMallocable): Define to is_trivially_constructible if the
8566 compiler supports it, define to true_type otherwise.
8567 (xobnew): New.
8568 (XOBNEW): Redefine.
8569 (xobnewvec): New.
8570 (XOBNEWVEC): Redefine.
8571 * gdb_obstack.h (obstack_zalloc): New.
8572 (OBSTACK_ZALLOC): Redefine.
8573 (obstack_calloc): New.
8574 (OBSTACK_CALLOC): Redefine.
8575 (obstack_new): New.
8576 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8577 (gdbarch_obstack): New declaration in gdbarch.h, definition in
8578 gdbarch.c.
8579 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8580 obstack_calloc/obstack_zalloc.
8581 (gdbarch_obstack_zalloc): Remove.
8582 * target-descriptions.c (tdesc_data_init): Use obstack_new.
8583
8584 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8585
8586 * stack.c (backtrace_command_1): Remove useless variable int i.
8587
8588 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8589
8590 * stack.c (print_frame_info): Fix comment.
8591
8592 2018-05-18 Tom Tromey <tom@tromey.com>
8593
8594 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8595 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8596 (~dwarf2_per_objfile): Update
8597 (dwarf2_get_dwz_file): Use new.
8598 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8599 unique_ptr.
8600
8601 2018-05-18 Tom Tromey <tom@tromey.com>
8602
8603 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8604 unique_ptr.
8605 * dwarf2read.c (struct dwp_file): Add constructor and
8606 initializers.
8607 (open_and_init_dwp_file): Return a unique_ptr.
8608 (dwarf2_per_objfile, create_dwp_hash_table)
8609 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8610 (lookup_dwo_unit_in_dwp): Update.
8611 (open_and_init_dwp_file, get_dwp_file): Update.
8612
8613 2018-05-18 Tom Tromey <tom@tromey.com>
8614
8615 * dwarf2read.c (dwarf2_per_objfile): Update.
8616 (struct mapped_index): Add initializers.
8617 (dwarf2_read_index): Use new.
8618 (dw2_symtab_iter_init): Update.
8619 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8620 unique_ptr.
8621
8622 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8623
8624 * dwarf2read.c (mapped_index) <total_size>: Remove.
8625
8626 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8627
8628 * unittests/format_pieces-selftests.c (test_format_specifier):
8629 Add ARI comments.
8630
8631 2018-05-18 Tom Tromey <tom@tromey.com>
8632
8633 * c-typeprint.c (maybe_print_hole): New function.
8634 (c_print_type_struct_field_offset): Update.
8635 (c_type_print_base_struct_union): Call maybe_print_hole.
8636
8637 2018-05-17 Keith Seitz <keiths@redhat.com>
8638
8639 * breakpoint.c (build_bpstat_chain): New function, moved from
8640 bpstat_stop_status.
8641 (bpstat_stop_status): Add optional parameter, `stop_chain'.
8642 If no stop chain is passed, call build_bpstat_chain to build it.
8643 * breakpoint.h (build_bpstat_chain): Declare.
8644 (bpstat_stop_status): Move documentation here from breakpoint.c.
8645 * infrun.c (handle_signal_stop): Before eliding inlined frames,
8646 build the stop chain and pass it to skip_inline_frames.
8647 Pass this stop chain to bpstat_stop_status.
8648 * inline-frame.c: Include breakpoint.h.
8649 (stopped_by_user_bp_inline_frame): New function.
8650 (skip_inline_frames): Add parameter `stop_chain'.
8651 Move documention to inline-frame.h.
8652 If non-NULL, use stopped_by_user_bp_inline_frame to determine
8653 whether the frame should be elided.
8654 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8655 Add moved documentation and update for new parameter.
8656
8657 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8658
8659 PR cli/14975
8660 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8661 unittests/format_pieces-selftests.c.
8662 * common/format.h (format_piece) <operator==>: New.
8663 (format_pieces) <operator[]>: Remove.
8664 * common/format.c (format_pieces::format_pieces): Handle \e.
8665 * unittests/format_pieces-selftests.c: New.
8666
8667 2018-05-17 Tom Tromey <tom@tromey.com>
8668
8669 PR symtab/23010:
8670 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8671 (dw2_instantiate_symtab): Add skip_partial parameter.
8672 (dw2_find_last_source_symtab, dw2_map_expand_apply)
8673 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8674 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8675 (dw2_expand_symtabs_matching_one)
8676 (dw2_find_pc_sect_compunit_symtab)
8677 (dw2_debug_names_lookup_symbol)
8678 (dw2_debug_names_expand_symtabs_for_function): Update.
8679 (init_cutu_and_read_dies): Add skip_partial parameter.
8680 (process_psymtab_comp_unit, build_type_psymtabs_1)
8681 (process_skeletonless_type_unit, load_partial_comp_unit)
8682 (psymtab_to_symtab_1): Update.
8683 (load_full_comp_unit): Add skip_partial parameter.
8684 (process_imported_unit_die, dwarf2_read_addr_index)
8685 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8686 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8687 (read_signatured_type): Update.
8688
8689 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8690
8691 * value.c (release_value): Remove unused variable.
8692 (record_latest_value): Likewise.
8693 (access_value_history): Likewise.
8694 (preserve_values): Likewise.
8695
8696 2018-05-17 Tom Tromey <tom@tromey.com>
8697
8698 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8699 Initialize.
8700
8701 2018-05-16 Maciej W. Rozycki <macro@mips.com>
8702
8703 PR gdb/22286
8704 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8705 Also handle registers whose width is not a multiple of
8706 PTRACE_TYPE_RET.
8707 (linux_nat_trad_target::store_register): Likewise.
8708
8709 2018-05-16 Tom Tromey <tom@tromey.com>
8710
8711 * gdbcore.h (core_bfd): Redefine.
8712 * corelow.c (core_target::close): Update.
8713 (core_target_open): Update.
8714 * progspace.h (struct program_space) <cbfd>: Now a
8715 gdb_bfd_ref_ptr.
8716
8717 2018-05-16 Tom Tromey <tom@tromey.com>
8718
8719 PR cli/19551:
8720 * symfile-add-flags.h (enum symfile_add_flags)
8721 <SYMFILE_NOT_FILENAME>: New constant.
8722 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
8723 objfile name from BFD.
8724 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8725 * minidebug.c (find_separate_debug_file_in_section): Put
8726 ".gnu_debugdata" into BFD's file name.
8727
8728 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
8729
8730 * regcache.c (regcache_read_ftype, regcache_write_ftype):
8731 Remove.
8732
8733 2018-05-15 Tamar Christina <tamar.christina@arm.com>
8734
8735 PR binutils/21446
8736 * aarch64-tdep.c (aarch64_analyze_prologue,
8737 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8738 Indicate not interested in errors.
8739
8740 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8741
8742 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8743 Supply the MIPS_ZERO_REGNUM register.
8744
8745 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8746
8747 * mips-tdep.c (mask_address_var): Make variable static.
8748
8749 2018-05-14 Tom Tromey <tom@tromey.com>
8750
8751 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8752
8753 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
8754
8755 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8756 FXSAVE_ADDR for the mxcsr register.
8757
8758 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
8759
8760 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8761
8762 2018-05-11 Pedro Alves <palves@redhat.com>
8763
8764 * corelow.c (core_target) <core_target>: No longer inline.
8765 Initialize m_core_gdbarch, m_core_vec and build the section table
8766 here.
8767 <~core_target>: New.
8768 <core_gdbarch, get_core_register_section>: New methods.
8769 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8770 factored out from ...
8771 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8772 (core_ops): Delete.
8773 (sniff_core_bfd): Add gdbarch parameter.
8774 (core_close): Delete, merged into ...
8775 (core_target::close): ... here. Delete self.
8776 (core_close_cleanup): Delete.
8777 (core_target_open): Allocate a core_target on the heap. Use a
8778 unique_ptr instead of a cleanup. Bits moved into the core_target
8779 ctor. Adjust to use core_target methods instead of globals.
8780 (get_core_register_section): Rename to ...
8781 (core_target::get_core_register_section): ... this and adjust.
8782 (struct get_core_registers_cb_data): New.
8783 (get_core_registers_cb): Use it. Use bool.
8784 (core_target::fetch_registers, core_target::files_info)
8785 (core_target::xfer_partial, core_target::read_description)
8786 (core_target::pid_to, core_target::thread_name): Adjust to
8787 reference class fields instead of globals.
8788 * target.h (struct target_ops_deleter, target_ops_up): New.
8789
8790 2018-05-11 Pedro Alves <palves@redhat.com>
8791
8792 * corefile.c (core_file_command): Move to corelow.c.
8793 * corelow.c (the_core_target): Delete.
8794 (core_file_command): Moved from corefile.c. Check exec_bfd
8795 instead of the_core_target. Use target_detach instead of calling
8796 into the_core_target directly.
8797 (maybe_say_no_core_file_now): New.
8798 (core_target::detach): Use it.
8799 (_initialize_corelow): Remove references to the_core_target.
8800 * gdbcore.h (the_core_target): Delete.
8801
8802 2018-05-11 Tom Tromey <tromey@redhat.com>
8803 Pedro Alves <palves@redhat.com>
8804
8805 * corefile.c (core_bfd): Remove.
8806 * gdbcore.h (core_bfd): Now a macro.
8807 * progspace.h (struct program_space) <cbfd>: New field.
8808
8809 2018-05-11 Tom Tromey <tom@tromey.com>
8810
8811 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8812 gdb::def_vector.
8813
8814 2018-05-10 Tom Tromey <tom@tromey.com>
8815
8816 * configure: Rebuild.
8817 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8818
8819 2018-05-10 Joel Brobecker <brobecker@adacore.com>
8820
8821 PR server/23158:
8822 * regformats/regdat.sh: Adjust script, following the addition
8823 of the new expedite_regs parameter to init_target_desc.
8824
8825 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
8826
8827 PR gdb/23127
8828 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8829 set_gdbarch_significant_addr_bit.
8830 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8831 set_gdbarch_significant_addr_bit.
8832 * utils.c (address_significant): Update to sign extend addr.
8833
8834 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8835
8836 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8837 (xtensa_linux_init_abi): Limit tdep->num_regs by
8838 tdep->num_nopriv_regs.
8839 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8840 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8841 not initialized.
8842
8843 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8844
8845 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8846
8847 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8848
8849 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8850 (I387_MXCSR_INIT_VAL): New constant.
8851 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8852 buffer if it was supplied by the inferior.
8853 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8854 (i387_xsave_get_clear_bv): New function.
8855 (i387_supply_xsave): Only read x87 control registers from the
8856 xsave buffer if the feature is enabled, and the state will have
8857 been written, otherwise, provide a suitable default.
8858 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8859 including x87 control registers. Update control registers if they
8860 have changed from the default value, and mark features as enabled
8861 as required.
8862 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8863
8864 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8865
8866 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8867
8868 2018-05-07 Tom Tromey <tom@tromey.com>
8869
8870 * configure: Rebuild.
8871 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8872
8873 2018-05-07 Tom Tromey <tom@tromey.com>
8874
8875 PR tdep/20362:
8876 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8877 bit. Use correct value for VDIV.
8878
8879 2018-05-04 Tom Tromey <tom@tromey.com>
8880
8881 * configure: Rebuild.
8882 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8883
8884 2018-05-04 Tom Tromey <tom@tromey.com>
8885
8886 * linux-record.c (record_linux_system_call) <case
8887 RECORD_SYS_RECVFROM>: Add "break".
8888
8889 2018-05-04 Tom Tromey <tom@tromey.com>
8890
8891 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8892 Add missing "break".
8893 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8894 Add missing "break".
8895
8896 2018-05-04 Tom Tromey <tom@tromey.com>
8897
8898 * rs6000-tdep.c (ppc_process_record_op4)
8899 (ppc_process_record_op63): Add fall-through comment.
8900
8901 2018-05-04 Tom Tromey <tom@tromey.com>
8902
8903 * i386-tdep.c (i386_process_record): Add fall-through comment.
8904
8905 2018-05-04 Tom Tromey <tom@tromey.com>
8906
8907 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8908 comment.
8909
8910 2018-05-04 Tom Tromey <tom@tromey.com>
8911
8912 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8913 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8914 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8915 comment.
8916 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8917 comment.
8918 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8919 comment.
8920
8921 2018-05-04 Tom Tromey <tom@tromey.com>
8922
8923 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8924
8925 2018-05-04 Tom Tromey <tom@tromey.com>
8926
8927 * s390-tdep.c (s390_process_record): Fix fall-through comments.
8928 * xcoffread.c (scan_xcoff_symtab): Move comment later.
8929 * symfile.c (section_is_mapped): Fix fall-through comment.
8930 * stabsread.c (define_symbol, read_member_functions): Fix
8931 fall-through comment.
8932 * s390-linux-tdep.c (s390_process_record): Fix fall-through
8933 comment.
8934 * remote.c (remote_wait_as): Fix fall-through comment.
8935 * p-exp.y (yylex): Fix fall-through comment.
8936 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8937 comment.
8938 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8939 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8940 * jv-exp.y (yylex): Fix fall-through comment.
8941 * go-exp.y (lex_one_token): Fix fall-through comment.
8942 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8943 fall-through comment.
8944 * f-exp.y (yylex): Fix fall-through comment.
8945 * dwarf2read.c (process_die): Fix fall-through comments.
8946 * dbxread.c (process_one_symbol): Fix fall-through comment.
8947 * d-exp.y (lex_one_token): Fix fall-through comment.
8948 * cp-name-parser.y (yylex): Fix fall-through comment.
8949 * coffread.c (coff_symtab_read): Fix fall-through comment.
8950 * c-exp.y (lex_one_token): Fix fall-through comment.
8951 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8952 comment.
8953 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8954 comment.
8955
8956 2018-05-04 Tom Tromey <tom@tromey.com>
8957
8958 PR python/22730:
8959 * NEWS: Mention gdb.execute change.
8960 * gdbcmd.h (execute_control_command): Don't declare.
8961 * python/python.c (execute_gdb_command): Use read_command_lines_1,
8962 execute_control_commands, execute_control_commands_to_string.
8963 * cli/cli-script.h (execute_control_commands)
8964 (execute_control_commands_to_string): Declare.
8965 (execute_control_command): Add from_tty parameter.
8966 * cli/cli-script.c (execute_control_commands)
8967 (execute_control_commands_to_string): New functions.
8968 (execute_user_command): Use execute_control_commands.
8969 (execute_control_command_1): Add "from_tty" parameter. Update.
8970 (execute_control_command): Likewise.
8971
8972 2018-05-04 Tom Tromey <tom@tromey.com>
8973
8974 PR python/22731:
8975 * NEWS: Mention that breakpoint commands are writable.
8976 * python/py-breakpoint.c (bppy_set_commands): New function.
8977 (breakpoint_object_getset) <"commands">: Use it.
8978
8979 2018-05-04 Tom Tromey <tom@tromey.com>
8980
8981 * tracepoint.c (actions_command): Update.
8982 * mi/mi-cmd-break.c (mi_command_line_array)
8983 (mi_command_line_array_cnt, mi_command_line_array_ptr)
8984 (mi_read_next_line): Remove.
8985 (mi_cmd_break_commands): Update.
8986 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8987 function_view.
8988 * cli/cli-script.c (get_command_line): Update.
8989 (process_next_line): Use function_view. Constify.
8990 (recurse_read_control_structure, read_command_lines)
8991 (read_command_lines_1): Change argument types to function_view.
8992 (do_define_command, document_command): Update.
8993 * breakpoint.h (check_tracepoint_command): Don't declare.
8994 * breakpoint.c (check_tracepoint_command): Remove.
8995 (commands_command_1, create_tracepoint_from_upload): Update.
8996
8997 2018-05-04 Tom Tromey <tom@tromey.com>
8998
8999 PR gdb/11750:
9000 * cli/cli-script.h (enum command_control_type) <define_control>:
9001 New constant.
9002 * cli/cli-script.c (multi_line_command_p): Handle define_control.
9003 (build_command_line, execute_control_command_1)
9004 (process_next_line): Likewise.
9005 (do_define_command): New function, extracted from define_command.
9006 (define_command): Use it.
9007
9008 2018-05-04 Tom Tromey <tom@tromey.com>
9009
9010 * tracepoint.c (actions_command): Update.
9011 * cli/cli-script.h (read_command_lines): Update.
9012 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9013 (MAX_TMPBUF): Remove define.
9014 (define_command): Use string_printf.
9015 (document_command): Likewise.
9016 * breakpoint.c (commands_command_1): Update.
9017
9018 2018-05-04 Tom Tromey <tom@tromey.com>
9019
9020 * top.c (execute_command): Update.
9021 * cli/cli-script.h (print_command_lines): Now varargs.
9022 * cli/cli-script.c (print_command_lines): Now varargs.
9023 (execute_control_command_1) <case while_control, case if_control>:
9024 Update.
9025
9026 2018-05-04 Tom Tromey <tom@tromey.com>
9027
9028 * tracepoint.c (all_tracepoint_actions): Rename from
9029 all_tracepoint_actions_and_cleanup. Change return type.
9030 (actions_command, encode_actions_1, encode_actions)
9031 (trace_dump_actions, tdump_command): Update.
9032 * remote.c (remote_download_command_source): Update.
9033 * python/python.c (gdbpy_eval_from_control_command)
9034 (python_command, python_interactive_command): Update.
9035 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9036 * guile/guile.c (guile_command)
9037 (gdbscm_eval_from_control_command, guile_command): Update.
9038 * compile/compile.c (compile_code_command)
9039 (compile_print_command, compile_to_object): Update.
9040 * cli/cli-script.h (struct command_lines_deleter): New.
9041 (counted_command_line): New typedef.
9042 (struct command_line): Add constructor, destructor.
9043 <body_list>: Remove.
9044 <body_list_0, body_list_1>: New members.
9045 (command_line_up): Remove typedef.
9046 (read_command_lines, read_command_lines_1, get_command_line):
9047 Update.
9048 (copy_command_lines): Don't declare.
9049 * cli/cli-script.c (build_command_line): Use "new".
9050 (get_command_line): Return counted_command_line.
9051 (print_command_lines, execute_user_command)
9052 (execute_control_command_1, while_command, if_command): Update.
9053 (realloc_body_list): Remove.
9054 (process_next_line, recurse_read_control_structure): Update.
9055 (read_command_lines, read_command_lines_1): Return counted_command_line.
9056 (free_command_lines): Use "delete".
9057 (copy_command_lines): Remove.
9058 (define_command, document_command, show_user_1): Update.
9059 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9060 a counted_command_line.
9061 * breakpoint.h (counted_command_line): Remove typedef.
9062 (breakpoint_set_commands): Update.
9063 * breakpoint.c (check_no_tracepoint_commands)
9064 (validate_commands_for_breakpoint): Update.
9065 (breakpoint_set_commands): Change commands to be a
9066 counted_command_line.
9067 (commands_command_1, update_dprintf_command_list)
9068 (create_tracepoint_from_upload): Update.
9069
9070 2018-05-04 Tom Tromey <tom@tromey.com>
9071
9072 * cli/cli-decode.h (cmd_list_element): New constructor.
9073 (~cmd_list_element): New destructor.
9074 (struct cmd_list_element): Add initializers.
9075 * cli/cli-decode.c (do_add_cmd): Use "new".
9076 (delete_cmd): Use "delete".
9077
9078 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
9079 Pedro Alves <palves@redhat.com>
9080
9081 PR breakpoints/19806 and support for PR external/20207.
9082 * NEWS: Mention Aarch64 watchpoint improvements.
9083 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9084 watchpoints and PR external/20207 watchpoints.
9085 * nat/aarch64-linux-hw-point.c
9086 (kernel_supports_any_contiguous_range): New.
9087 (aarch64_watchpoint_offset): New.
9088 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9089 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9090 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9091 (aarch64_align_watchpoint): New parameters aligned_offset_p and
9092 next_addr_orig_p. Support PR external/20207 watchpoints.
9093 (aarch64_downgrade_regs): New.
9094 (aarch64_dr_state_insert_one_point): New parameters offset and
9095 addr_orig.
9096 (aarch64_dr_state_remove_one_point): Likewise.
9097 (aarch64_handle_breakpoint): Update caller.
9098 (aarch64_handle_aligned_watchpoint): Likewise.
9099 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9100 aligned_offset.
9101 (aarch64_linux_set_debug_regs): Remove const from state. Call
9102 aarch64_downgrade_regs.
9103 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9104 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9105 (DR_CONTROL_MASK): ... this.
9106 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9107 (unsigned int aarch64_watchpoint_offset): New prototype.
9108 (aarch64_linux_set_debug_regs): Remove const from state.
9109 * utils.c (align_up, align_down): Move to ...
9110 * common/common-utils.c (align_up, align_down): ... here.
9111 * utils.h (align_up, align_down): Move to ...
9112 * common/common-utils.h (align_up, align_down): ... here.
9113
9114 2018-05-04 Joel Brobecker <brobecker@adacore.com>
9115
9116 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9117 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9118 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9119 Re-implement to match the ABI as summarized in GCC's
9120 gcc/config/sparc/sparc.c. All callers updated.
9121 (sparc32_store_arguments): Remove assertion.
9122
9123 2018-05-04 Tom Tromey <tom@tromey.com>
9124
9125 * printcmd.c: Don't include tui.h.
9126 (decode_format): Use skip_spaces.
9127
9128 2018-05-04 Tom Tromey <tom@tromey.com>
9129
9130 PR gdb/22619:
9131 * printcmd.c (last_count): New global.
9132 (x_command): Use saved count when repeating.
9133
9134 2018-05-04 Tom Tromey <tom@tromey.com>
9135
9136 * nto-procfs.c (do_closedir_cleanup): Remove.
9137 (procfs_pidlist): Use gdb_dir_up.
9138 * procfs.c (do_closedir_cleanup): Remove.
9139 (proc_update_threads): Use gdb_dir_up.
9140 * common/filestuff.h (struct gdb_dir_deleter): New.
9141 (gdb_dir_up): New typedef.
9142
9143 2018-05-04 Tom Tromey <tom@tromey.com>
9144
9145 * ada-lang.c (print_mention_exception): Use std::string.
9146
9147 2018-05-04 Tom Tromey <tom@tromey.com>
9148
9149 * ada-lang.c (create_excep_cond_exprs): Update.
9150 (ada_exception_catchpoint_cond_string): Use std::string.
9151
9152 2018-05-04 Tom Tromey <tom@tromey.com>
9153
9154 * ada-lang.c (xget_renaming_scope): Return std::string.
9155 (old_renaming_is_invisible): Update.
9156
9157 2018-05-04 Tom Tromey <tom@tromey.com>
9158
9159 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9160 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9161
9162 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
9163
9164 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9165
9166 2018-05-04 Tom Tromey <tom@tromey.com>
9167
9168 * remote.c (remote_query_supported_append): Change type.
9169 (remote_check_symbols): Update.
9170
9171 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
9172
9173 PR gdb/11420
9174 * configure.ac: Prepend libpython.
9175 * python/python-config.py: Likewise.
9176 * configure: Regenerate.
9177
9178 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
9179
9180 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9181
9182 2018-05-03 Pedro Alves <palves@redhat.com>
9183
9184 * s390-linux-nat.c
9185 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9186 override. Write 'true' instead of '1'.
9187 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9188 declaration.
9189
9190 2018-05-02 Pedro Alves <palves@redhat.com>
9191
9192 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9193 add_inf_child_target.
9194 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9195 add_inf_child_target.
9196 * aix-thread.c (aix_thread_target_info): New.
9197 (aix_thread_target) <shortname, longname, doc>: Delete.
9198 <info>: New.
9199 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9200 add_inf_child_target.
9201 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9202 add_inf_child_target.
9203 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9204 add_inf_child_target.
9205 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9206 add_inf_child_target.
9207 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9208 add_inf_child_target.
9209 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9210 add_inf_child_target.
9211 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9212 add_inf_child_target.
9213 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9214 add_inf_child_target.
9215 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9216 add_inf_child_target.
9217 * bfd-target.c (target_bfd_target_info): New.
9218 (target_bfd) <shortname, longname, doc>: Delete.
9219 <info>: New.
9220 * bsd-kvm.c (bsd_kvm_target_info): New.
9221 (bsd_kvm_target) <shortname, longname, doc>: Delete.
9222 <info>: New.
9223 (bsd_kvm_target::open): Rename to ...
9224 (bsd_kvm_target_open): ... this. Adjust.
9225 * bsd-uthread.c (bsd_uthread_target_info): New.
9226 (bsd_uthread_target) <shortname, longname, doc>: Delete.
9227 <info>: New.
9228 * corefile.c (core_file_command): Adjust.
9229 * corelow.c (core_target_info): New.
9230 (core_target) <shortname, longname, doc>: Delete.
9231 <info>: New.
9232 (core_target::open): Rename to ...
9233 (core_target_open): ... this. Adjust.
9234 * ctf.c (ctf_target_info): New.
9235 (ctf_target) <shortname, longname, doc>: Delete.
9236 <info>: New.
9237 (ctf_target::open): Rename to ...
9238 (ctf_target_open): ... this.
9239 (_initialize_ctf): Adjust.
9240 * exec.c (exec_target_info): New.
9241 (exec_target) <shortname, longname, doc>: Delete.
9242 <info>: New.
9243 (exec_target::open): Rename to ...
9244 (exec_target_open): ... this.
9245 * gdbcore.h (core_target_open): Declare.
9246 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9247 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9248 add_inf_child_target.
9249 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9250 add_inf_child_target.
9251 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9252 add_inf_child_target.
9253 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9254 add_inf_child_target.
9255 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9256 add_inf_child_target.
9257 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9258 add_inf_child_target.
9259 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9260 add_inf_child_target.
9261 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9262 add_inf_child_target.
9263 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9264 add_inf_child_target.
9265 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9266 add_inf_child_target.
9267 * inf-child.c (inf_child_target_info): New.
9268 (inf_child_target::info): New.
9269 (inf_child_open_target): Remove 'target' parameter. Use
9270 get_native_target instead.
9271 (inf_child_target::open): Delete.
9272 (add_inf_child_target): New.
9273 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9274 Delete.
9275 <info>: New.
9276 (add_inf_child_target): Declare.
9277 (inf_child_open_target): Declare.
9278 * linux-thread-db.c (thread_db_target_info): New.
9279 (thread_db_target) <shortname, longname, doc>: Delete.
9280 <info>: New.
9281 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9282 add_inf_child_target.
9283 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9284 add_inf_child_target.
9285 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9286 add_inf_child_target.
9287 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9288 add_inf_child_target.
9289 * make-target-delegates (print_class): Adjust.
9290 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9291 add_inf_child_target.
9292 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9293 add_inf_child_target.
9294 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9295 add_inf_child_target.
9296 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9297 add_inf_child_target.
9298 * nto-procfs.c (nto_native_target_info): New.
9299 (nto_procfs_target_native) <shortname, longname, doc>:
9300 Delete.
9301 <info>: New.
9302 (nto_procfs_target_info): New.
9303 (nto_procfs_target_procfs) <shortname, longname, doc>:
9304 Delete.
9305 <info>: New.
9306 (init_procfs_targets): Adjust.
9307 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9308 add_inf_child_target.
9309 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9310 add_inf_child_target.
9311 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9312 add_inf_child_target.
9313 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9314 add_inf_child_target.
9315 * ravenscar-thread.c (ravenscar_target_info): New.
9316 (ravenscar_thread_target) <shortname, longname, doc>:
9317 Delete.
9318 <info>: New.
9319 * record-btrace.c (record_btrace_target_info):
9320 (record_btrace_target) <shortname, longname, doc>: Delete.
9321 <info>: New.
9322 (record_btrace_target::open): Rename to ...
9323 (record_btrace_target_open): ... this. Adjust.
9324 * record-full.c (record_longname, record_doc): New.
9325 (record_full_base_target) <shortname, longname, doc>: Delete.
9326 <info>: New.
9327 (record_full_target_info): New.
9328 (record_full_target): <shortname>: Delete.
9329 <info>: New.
9330 (record_full_core_open_1, record_full_open_1): Update comments.
9331 (record_full_base_target::open): Rename to ...
9332 (record_full_open): ... this.
9333 (cmd_record_full_restore): Update.
9334 (_initialize_record_full): Update.
9335 * remote-sim.c (remote_sim_target_info): New.
9336 (gdbsim_target) <shortname, longname, doc>: Delete.
9337 <info>: New.
9338 (gdbsim_target::open): Rename to ...
9339 (gdbsim_target_open): ... this.
9340 (_initialize_remote_sim): Adjust.
9341 * remote.c (remote_doc): New.
9342 (remote_target_info): New.
9343 (remote_target) <shortname, longname, doc>: Delete.
9344 <info>: New.
9345 (extended_remote_target_info): New.
9346 (extended_remote_target) <shortname, longname, doc>: Delete.
9347 <info>: New.
9348 (remote_target::open_1): Make static. Adjust.
9349 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9350 * s390-linux-nat.c (_initialize_s390_nat): Use
9351 add_inf_child_target.
9352 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9353 add_inf_child_target.
9354 * sol-thread.c (thread_db_target_info): New.
9355 (sol_thread_target) <shortname, longname, doc>: Delete.
9356 <info>: New.
9357 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9358 add_inf_child_target.
9359 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9360 add_inf_child_target.
9361 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9362 add_inf_child_target.
9363 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9364 add_inf_child_target.
9365 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9366 add_inf_child_target.
9367 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9368 add_inf_child_target.
9369 * spu-linux-nat.c (_initialize_spu_nat): Use
9370 add_inf_child_target.
9371 * spu-multiarch.c (spu_multiarch_target_info): New.
9372 (spu_multiarch_target) <shortname, longname, doc>: Delete.
9373 <info>: New.
9374 * target-delegates.c: Regenerate.
9375 * target.c: Include <unordered_map>.
9376 (target_ops_p): Delete.
9377 (DEF_VEC_P(target_ops_p)): Delete.
9378 (target_factories): New.
9379 (test_target_info): New.
9380 (test_target_ops::info): New.
9381 (open_target): Adjust to use target_factories.
9382 (add_target_with_completer): Rename to ...
9383 (add_target): ... this. Change prototype. Register target_info
9384 and open callback in target_factories. Register target_info in
9385 command context instead of target_ops.
9386 (add_target): Delete old implementation.
9387 (add_deprecated_target_alias): Change prototype. Adjust.
9388 (the_native_target): New.
9389 (set_native_target, get_native_target): New.
9390 (find_default_run_target): Use the_native_target.
9391 (find_attach_target, find_run_target): Simplify.
9392 (target_ops::open): Delete.
9393 (dummy_target_info): New.
9394 (dummy_target::shortname, dummy_target::longname)
9395 (dummy_target::doc): Delete.
9396 (dummy_target::info): New.
9397 (debug_target::shortname, debug_target::longname)
9398 (debug_target::doc): Delete.
9399 (debug_target::info): New.
9400 * target.h (struct target_info): New.
9401 (target_ops::~target_ops): Add comment.
9402 (target_ops::info): New.
9403 (target_ops::shortname, target_ops::longname, target_ops::doc): No
9404 longer virtual. Implement in terms of target_info.
9405 (set_native_target, get_native_target): Declare.
9406 (target_open_ftype): New.
9407 (add_target, add_target_with_completer)
9408 (add_deprecated_target_alias): Change prototype.
9409 (test_target) <shortname, longname, doc>: Delete.
9410 <info>: New.
9411 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9412 add_inf_child_target.
9413 * tracefile-tfile.c (tfile_target_info): New.
9414 (tfile_target) <shortname, longname, doc>: Delete.
9415 <info>: New.
9416 (tfile_target::open): Rename to ...
9417 (tfile_target_open): ... this.
9418 (_initialize_tracefile_tfile): Adjust.
9419 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9420 add_inf_child_target.
9421 * windows-nat.c (_initialize_windows_nat): Use
9422 add_inf_child_target.
9423 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9424 add_inf_child_target.
9425
9426 2018-05-02 Pedro Alves <palves@redhat.com>
9427
9428 * linux-nat.h (linux_nat_target) <low_new_thread,
9429 low_delete_thread, low_new_fork, low_forget_process,
9430 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9431 New virtual methods.
9432 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9433 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9434 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9435 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9436 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9437 Delete.
9438 * linux-fork.c (delete_fork): Adjust to call low method.
9439 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9440 (linux_nat_new_fork, linux_nat_forget_process_hook)
9441 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9442 (linux_nat_status_is_event):
9443 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9444 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9445 to call low method.
9446 (sigtrap_is_event): Rename to ...
9447 (linux_nat_target::low_status_is_event): ... this.
9448 (linux_nat_set_status_is_event): Delete.
9449 (save_stop_reason, linux_nat_wait_1)
9450 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9451 low methods.
9452 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9453 (linux_nat_set_new_fork, linux_nat_set_forget_process)
9454 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9455 (linux_nat_set_prepare_to_resume): Delete.
9456 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9457 low virtual methods.
9458 * amd64-linux-nat.c: Likewise.
9459 * arm-linux-nat.c: Likewise.
9460 * i386-linux-nat.c: Likewise.
9461 * ia64-linux-nat.c: Likewise.
9462 * mips-linux-nat.c: Likewise.
9463 * ppc-linux-nat.c: Likewise.
9464 * s390-linux-nat.c: Likewise.
9465 * sparc64-linux-nat.c: Likewise.
9466 * x86-linux-nat.c: Likewise.
9467 * x86-linux-nat.h: Include "nat/x86-linux.h".
9468 (x86_linux_nat_target) <low_new_fork, low_forget_process,
9469 low_prepare_to_resume, low_new_thread, low_delete_thread>:
9470 Override methods.
9471
9472 2018-05-02 Pedro Alves <palves@redhat.com>
9473
9474 * target.h (target_ops)
9475 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9476 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9477 stopped_by_watchpoint, have_continuable_watchpoint,
9478 stopped_data_address, watchpoint_addr_within_range,
9479 can_accel_watchpoint_condition, can_run, thread_alive,
9480 has_all_memory, has_memory, has_stack, has_registers,
9481 has_execution, can_async_p, is_async_p, supports_non_stop,
9482 always_non_stop_p, can_execute_reverse, supports_multi_process,
9483 supports_enable_disable_tracepoint,
9484 supports_disable_randomization, supports_string_tracing,
9485 supports_evaluation_of_breakpoint_conditions,
9486 can_run_breakpoint_commands, filesystem_is_local,
9487 can_download_tracepoint, get_trace_state_variable_value,
9488 set_trace_notes, get_tib_address, use_agent, can_use_agent,
9489 record_is_replaying, record_will_replay,
9490 augmented_libraries_svr4_read>: Adjust to return bool.
9491 * aarch64-linux-nat.c: All implementations adjusted.
9492 * aix-thread.c: All implementations adjusted.
9493 * arm-linux-nat.c: All implementations adjusted.
9494 * breakpoint.c: All implementations adjusted.
9495 * bsd-kvm.c: All implementations adjusted.
9496 * bsd-uthread.c: All implementations adjusted.
9497 * corelow.c: All implementations adjusted.
9498 * ctf.c: All implementations adjusted.
9499 * darwin-nat.c: All implementations adjusted.
9500 * darwin-nat.h: All implementations adjusted.
9501 * exec.c: All implementations adjusted.
9502 * fbsd-nat.c: All implementations adjusted.
9503 * fbsd-nat.h: All implementations adjusted.
9504 * gnu-nat.c: All implementations adjusted.
9505 * gnu-nat.h: All implementations adjusted.
9506 * go32-nat.c: All implementations adjusted.
9507 * ia64-linux-nat.c: All implementations adjusted.
9508 * inf-child.c: All implementations adjusted.
9509 * inf-child.h: All implementations adjusted.
9510 * inf-ptrace.c: All implementations adjusted.
9511 * inf-ptrace.h: All implementations adjusted.
9512 * linux-nat.c: All implementations adjusted.
9513 * linux-nat.h: All implementations adjusted.
9514 * mips-linux-nat.c: All implementations adjusted.
9515 * nto-procfs.c: All implementations adjusted.
9516 * ppc-linux-nat.c: All implementations adjusted.
9517 * procfs.c: All implementations adjusted.
9518 * ravenscar-thread.c: All implementations adjusted.
9519 * record-btrace.c: All implementations adjusted.
9520 * record-full.c: All implementations adjusted.
9521 * remote-sim.c: All implementations adjusted.
9522 * remote.c: All implementations adjusted.
9523 * s390-linux-nat.c: All implementations adjusted.
9524 * sol-thread.c: All implementations adjusted.
9525 * spu-multiarch.c: All implementations adjusted.
9526 * target-delegates.c: All implementations adjusted.
9527 * target.c: All implementations adjusted.
9528 * target.h: All implementations adjusted.
9529 * tracefile-tfile.c: All implementations adjusted.
9530 * tracefile.c: All implementations adjusted.
9531 * tracefile.h: All implementations adjusted.
9532 * windows-nat.c: All implementations adjusted.
9533 * x86-linux-nat.h: All implementations adjusted.
9534 * x86-nat.h: All implementations adjusted.
9535
9536 2018-05-02 Pedro Alves <palves@redhat.com>
9537
9538 * make-target-delegates (scan_target_h): Don't trim lines here.
9539 Replace sequences of tabs and/or whitespace with a single
9540 whitespace.
9541 (top level, parsing methods): Trim each line before processing it
9542 here.
9543
9544 2018-05-02 Pedro Alves <palves@redhat.com>
9545 John Baldwin <jhb@freebsd.org>
9546
9547 * target.h (enum strata) <debug_stratum>: New.
9548 (struct target_ops) <all delegation methods>: Replace by C++
9549 virtual methods, and drop "to_" prefix. All references updated
9550 throughout.
9551 <to_shortname, to_longname, to_doc, to_data,
9552 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9553 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9554 virtual methods. All references updated throughout.
9555 <can_attach, supports_terminal_ours, can_create_inferior,
9556 get_thread_control_capabilities, attach_no_wait>: New
9557 virtual methods.
9558 <insert_breakpoint, remove_breakpoint>: Now
9559 TARGET_DEFAULT_NORETURN methods.
9560 <info_proc>: Now returns bool.
9561 <to_magic>: Delete.
9562 (OPS_MAGIC): Delete.
9563 (current_target): Delete. All references replaced by references
9564 to ...
9565 (target_stack): ... this. New.
9566 (target_shortname, target_longname): Adjust.
9567 (target_can_run): Now a function declaration.
9568 (default_child_has_all_memory, default_child_has_memory)
9569 (default_child_has_stack, default_child_has_registers)
9570 (default_child_has_execution): Remove target_ops parameter.
9571 (complete_target_initialization): Delete.
9572 (memory_breakpoint_target): New template class.
9573 (test_target_ops): Refactor as a C++ class with virtual methods.
9574 * make-target-delegates (NAME_PART): Tighten.
9575 (POINTER_PART, CP_SYMBOL): New.
9576 (SIMPLE_RETURN_PART): Reimplement.
9577 (VEC_RETURN_PART): Expect less.
9578 (RETURN_PART, VIRTUAL_PART): New.
9579 (METHOD): Adjust to C++ virtual methods.
9580 (scan_target_h): Remove reference to C99.
9581 (dname): Output "target_ops::" prefix.
9582 (write_function_header): Adjust to output a C++ class method.
9583 (write_declaration): New.
9584 (write_delegator): Adjust to output a C++ class method.
9585 (tdname): Output "dummy_target::" prefix.
9586 (write_tdefault, write_debugmethod): Adjust to output a C++ class
9587 method.
9588 (tdefault_names, debug_names): Delete.
9589 (return_types, tdefaults, styles, argtypes_array): New.
9590 (top level): All methods are delegators.
9591 (print_class): New.
9592 (top level): Print dummy_target and debug_target classes.
9593 * target-delegates.c: Regenerate.
9594 * target-debug.h (target_debug_print_enum_info_proc_what)
9595 (target_debug_print_thread_control_capabilities)
9596 (target_debug_print_thread_info_p): New.
9597 * target.c (dummy_target): Delete.
9598 (the_dummy_target, the_debug_target): New.
9599 (target_stack): Now extern.
9600 (set_targetdebug): Push/unpush debug target.
9601 (default_child_has_all_memory, default_child_has_memory)
9602 (default_child_has_stack, default_child_has_registers)
9603 (default_child_has_execution): Remove target_ops parameter.
9604 (complete_target_initialization): Delete.
9605 (add_target_with_completer): No longer call
9606 complete_target_initialization.
9607 (target_supports_terminal_ours): Use regular delegation.
9608 (update_current_target): Delete.
9609 (push_target): No longer check magic number. Don't call
9610 update_current_target.
9611 (unpush_target): Don't call update_current_target.
9612 (target_is_pushed): No longer check magic number.
9613 (target_require_runnable): Skip for all stratums over
9614 process_stratum.
9615 (target_ops::info_proc): New.
9616 (target_info_proc): Use find_target_at and
9617 find_default_run_target.
9618 (target_supports_disable_randomization): Use regular delegation.
9619 (target_get_osdata): Use find_target_at.
9620 (target_ops::open, target_ops::close, target_ops::can_attach)
9621 (target_ops::attach, target_ops::can_create_inferior)
9622 (target_ops::create_inferior, target_ops::can_run)
9623 (target_can_run): New.
9624 (default_fileio_target): Use regular delegation.
9625 (target_ops::fileio_open, target_ops::fileio_pwrite)
9626 (target_ops::fileio_pread, target_ops::fileio_fstat)
9627 (target_ops::fileio_close, target_ops::fileio_unlink)
9628 (target_ops::fileio_readlink): New.
9629 (target_fileio_open_1, target_fileio_unlink)
9630 (target_fileio_readlink): Always call the target method. Handle
9631 FILEIO_ENOSYS.
9632 (return_zero, return_zero_has_execution): Delete.
9633 (init_dummy_target): Delete.
9634 (dummy_target::dummy_target, dummy_target::shortname)
9635 (dummy_target::longname, dummy_target::doc)
9636 (debug_target::debug_target, debug_target::shortname)
9637 (debug_target::longname, debug_target::doc): New.
9638 (target_supports_delete_record): Use regular delegation.
9639 (setup_target_debug): Delete.
9640 (maintenance_print_target_stack): Skip debug_stratum.
9641 (initialize_targets): Instantiate the_dummy_target and
9642 the_debug_target.
9643 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
9644 use target_stack.
9645 (target_auxv_search, fprint_target_auxv): Adjust.
9646 (info_auxv_command): Adjust to use target_stack.
9647 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9648 * exceptions.c (print_flush): Handle a NULL target_stack.
9649 * regcache.c (target_ops_no_register): Refactor as class with
9650 virtual methods.
9651
9652 * exec.c (exec_target): New class.
9653 (exec_ops): Now an exec_target.
9654 (exec_open, exec_close_1, exec_get_section_table)
9655 (exec_xfer_partial, exec_files_info, exec_has_memory)
9656 (exec_make_note_section): Refactor as exec_target methods.
9657 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9658 Delete.
9659 (exec_target::find_memory_regions): New.
9660 (_initialize_exec): Don't call init_exec_ops.
9661 * gdbcore.h (exec_file_clear): Delete.
9662
9663 * corefile.c (core_target): Delete.
9664 (core_file_command): Adjust.
9665 * corelow.c (core_target): New class.
9666 (the_core_target): New.
9667 (core_close): Remove target_ops parameter.
9668 (core_close_cleanup): Adjust.
9669 (core_target::close): New.
9670 (core_open, core_detach, get_core_registers, core_files_info)
9671 (core_xfer_partial, core_thread_alive, core_read_description)
9672 (core_pid_to_str, core_thread_name, core_has_memory)
9673 (core_has_stack, core_has_registers, core_info_proc): Rework as
9674 core_target methods.
9675 (ignore, core_remove_breakpoint, init_core_ops): Delete.
9676 (_initialize_corelow): Initialize the_core_target.
9677 * gdbcore.h (core_target): Delete.
9678 (the_core_target): New.
9679
9680 * ctf.c: (ctf_target): New class.
9681 (ctf_ops): Now a ctf_target.
9682 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9683 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9684 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9685 methods.
9686 (init_ctf_ops): Delete.
9687 (_initialize_ctf): Don't call it.
9688 * tracefile-tfile.c (tfile_target): New class.
9689 (tfile_ops): Now a tfile_target.
9690 (tfile_open, tfile_close, tfile_files_info)
9691 (tfile_get_tracepoint_status, tfile_trace_find)
9692 (tfile_fetch_registers, tfile_xfer_partial)
9693 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9694 Refactor as tfile_target methods.
9695 (tfile_xfer_partial_features): Remove target_ops parameter.
9696 (init_tfile_ops): Delete.
9697 (_initialize_tracefile_tfile): Don't call it.
9698 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9699 (tracefile_has_stack, tracefile_has_registers)
9700 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9701 tracefile_target methods.
9702 (init_tracefile_ops): Delete.
9703 (tracefile_target::tracefile_target): New.
9704 * tracefile.h: Include "target.h".
9705 (tracefile_target): New class.
9706 (init_tracefile_ops): Delete.
9707
9708 * spu-multiarch.c (spu_multiarch_target): New class.
9709 (spu_ops): Now a spu_multiarch_target.
9710 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9711 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9712 (spu_search_memory, spu_mourn_inferior): Refactor as
9713 spu_multiarch_target methods.
9714 (init_spu_ops): Delete.
9715 (_initialize_spu_multiarch): Remove references to init_spu_ops,
9716 complete_target_initialization.
9717
9718 * ravenscar-thread.c (ravenscar_thread_target): New class.
9719 (ravenscar_ops): Now a ravenscar_thread_target.
9720 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9721 (ravenscar_thread_alive, ravenscar_pid_to_str)
9722 (ravenscar_fetch_registers, ravenscar_store_registers)
9723 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9724 (ravenscar_stopped_by_hw_breakpoint)
9725 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9726 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9727 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9728 methods.
9729 (init_ravenscar_thread_ops): Delete.
9730 (_initialize_ravenscar): Remove references to
9731 init_ravenscar_thread_ops and complete_target_initialization.
9732
9733 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9734 (bsd_uthread_target): New class.
9735 (bsd_uthread_ops): Now a bsd_uthread_target.
9736 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9737 (bsd_uthread_close, bsd_uthread_mourn_inferior)
9738 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9739 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9740 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9741 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9742 (bsd_uthread_target): Delete function.
9743 (_initialize_bsd_uthread): Remove reference to
9744 complete_target_initialization.
9745
9746 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
9747 (target_bfd): ... this new class.
9748 (target_bfd_xfer_partial, target_bfd_get_section_table)
9749 (target_bfd_close): Refactor as target_bfd methods.
9750 (target_bfd::~target_bfd): New.
9751 (target_bfd_reopen): Adjust.
9752 (target_bfd::close): New.
9753
9754 * record-btrace.c (record_btrace_target): New class.
9755 (record_btrace_ops): Now a record_btrace_target.
9756 (record_btrace_open, record_btrace_stop_recording)
9757 (record_btrace_disconnect, record_btrace_close)
9758 (record_btrace_async, record_btrace_info)
9759 (record_btrace_insn_history, record_btrace_insn_history_range)
9760 (record_btrace_insn_history_from, record_btrace_call_history)
9761 (record_btrace_call_history_range)
9762 (record_btrace_call_history_from, record_btrace_record_method)
9763 (record_btrace_is_replaying, record_btrace_will_replay)
9764 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9765 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9766 (record_btrace_store_registers, record_btrace_prepare_to_store)
9767 (record_btrace_to_get_unwinder)
9768 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9769 (record_btrace_commit_resume, record_btrace_wait)
9770 (record_btrace_stop, record_btrace_can_execute_reverse)
9771 (record_btrace_stopped_by_sw_breakpoint)
9772 (record_btrace_supports_stopped_by_sw_breakpoint)
9773 (record_btrace_stopped_by_hw_breakpoint)
9774 (record_btrace_supports_stopped_by_hw_breakpoint)
9775 (record_btrace_update_thread_list, record_btrace_thread_alive)
9776 (record_btrace_goto_begin, record_btrace_goto_end)
9777 (record_btrace_goto, record_btrace_stop_replaying_all)
9778 (record_btrace_execution_direction)
9779 (record_btrace_prepare_to_generate_core)
9780 (record_btrace_done_generating_core): Refactor as
9781 record_btrace_target methods.
9782 (init_record_btrace_ops): Delete.
9783 (_initialize_record_btrace): Remove reference to
9784 init_record_btrace_ops.
9785 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9786 the execution_direction global.
9787 (record_full_base_target, record_full_target)
9788 (record_full_core_target): New classes.
9789 (record_full_ops): Now a record_full_target.
9790 (record_full_core_ops): Now a record_full_core_target.
9791 (record_full_target::detach, record_full_target::disconnect)
9792 (record_full_core_target::disconnect)
9793 (record_full_target::mourn_inferior, record_full_target::kill):
9794 New.
9795 (record_full_open, record_full_close, record_full_async): Refactor
9796 as methods of the record_full_base_target class.
9797 (record_full_resume, record_full_commit_resume): Refactor
9798 as methods of the record_full_target class.
9799 (record_full_wait, record_full_stopped_by_watchpoint)
9800 (record_full_stopped_data_address)
9801 (record_full_stopped_by_sw_breakpoint)
9802 (record_full_supports_stopped_by_sw_breakpoint)
9803 (record_full_stopped_by_hw_breakpoint)
9804 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9805 methods of the record_full_base_target class.
9806 (record_full_store_registers, record_full_xfer_partial)
9807 (record_full_insert_breakpoint, record_full_remove_breakpoint):
9808 Refactor as methods of the record_full_target class.
9809 (record_full_can_execute_reverse, record_full_get_bookmark)
9810 (record_full_goto_bookmark, record_full_execution_direction)
9811 (record_full_record_method, record_full_info, record_full_delete)
9812 (record_full_is_replaying, record_full_will_replay)
9813 (record_full_goto_begin, record_full_goto_end, record_full_goto)
9814 (record_full_stop_replaying): Refactor as methods of the
9815 record_full_base_target class.
9816 (record_full_core_resume, record_full_core_kill)
9817 (record_full_core_fetch_registers)
9818 (record_full_core_prepare_to_store)
9819 (record_full_core_store_registers, record_full_core_xfer_partial)
9820 (record_full_core_insert_breakpoint)
9821 (record_full_core_remove_breakpoint)
9822 (record_full_core_has_execution): Refactor
9823 as methods of the record_full_core_target class.
9824 (record_full_base_target::supports_delete_record): New.
9825 (init_record_full_ops): Delete.
9826 (init_record_full_core_ops): Delete.
9827 (record_full_save): Refactor as method of the
9828 record_full_base_target class.
9829 (_initialize_record_full): Remove references to
9830 init_record_full_ops and init_record_full_core_ops.
9831
9832 * remote.c (remote_target, extended_remote_target): New classes.
9833 (remote_ops): Now a remote_target.
9834 (extended_remote_ops): Now an extended_remote_target.
9835 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9836 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9837 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9838 (remote_pass_signals, remote_set_syscall_catchpoint)
9839 (remote_program_signals, )
9840 (remote_thread_always_alive): Remove target_ops parameter.
9841 (remote_thread_alive, remote_thread_name)
9842 (remote_update_thread_list, remote_threads_extra_info)
9843 (remote_static_tracepoint_marker_at)
9844 (remote_static_tracepoint_markers_by_strid)
9845 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9846 (remote_open): Refactor as methods of remote_target.
9847 (extended_remote_open, extended_remote_detach)
9848 (extended_remote_attach, extended_remote_post_attach):
9849 (extended_remote_supports_disable_randomization)
9850 (extended_remote_create_inferior): : Refactor as method of
9851 extended_remote_target.
9852 (remote_set_permissions, remote_open_1, remote_detach)
9853 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9854 (remote_resume, remote_commit_resume, remote_stop)
9855 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9856 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9857 (remote_prepare_to_store, remote_store_registers)
9858 (remote_flash_erase, remote_flash_done, remote_files_info)
9859 (remote_kill, remote_mourn, remote_insert_breakpoint)
9860 (remote_remove_breakpoint, remote_insert_watchpoint)
9861 (remote_watchpoint_addr_within_range)
9862 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9863 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9864 (remote_supports_stopped_by_sw_breakpoint)
9865 (remote_stopped_by_hw_breakpoint)
9866 (remote_supports_stopped_by_hw_breakpoint)
9867 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9868 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9869 (remote_verify_memory): Refactor as methods of remote_target.
9870 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9871 parameter.
9872 (remote_xfer_partial, remote_get_memory_xfer_limit)
9873 (remote_search_memory, remote_rcmd, remote_memory_map)
9874 (remote_pid_to_str, remote_get_thread_local_address)
9875 (remote_get_tib_address, remote_read_description): Refactor as
9876 methods of remote_target.
9877 (remote_target::fileio_open, remote_target::fileio_pwrite)
9878 (remote_target::fileio_pread, remote_target::fileio_close): New.
9879 (remote_hostio_readlink, remote_hostio_fstat)
9880 (remote_filesystem_is_local, remote_can_execute_reverse)
9881 (remote_supports_non_stop, remote_supports_disable_randomization)
9882 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9883 (remote_supports_enable_disable_tracepoint)
9884 (remote_supports_string_tracing)
9885 (remote_can_run_breakpoint_commands, remote_trace_init)
9886 (remote_download_tracepoint, remote_can_download_tracepoint)
9887 (remote_download_trace_state_variable, remote_enable_tracepoint)
9888 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9889 (remote_trace_start, remote_get_trace_status)
9890 (remote_get_tracepoint_status, remote_trace_stop)
9891 (remote_trace_find, remote_get_trace_state_variable_value)
9892 (remote_save_trace_data, remote_get_raw_trace_data)
9893 (remote_set_disconnected_tracing, remote_core_of_thread)
9894 (remote_set_circular_trace_buffer, remote_traceframe_info)
9895 (remote_get_min_fast_tracepoint_insn_len)
9896 (remote_set_trace_buffer_size, remote_set_trace_notes)
9897 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9898 (remote_disable_btrace, remote_teardown_btrace)
9899 (remote_read_btrace, remote_btrace_conf)
9900 (remote_augmented_libraries_svr4_read, remote_load)
9901 (remote_pid_to_exec_file, remote_can_do_single_step)
9902 (remote_execution_direction, remote_thread_handle_to_thread_info):
9903 Refactor as methods of remote_target.
9904 (init_remote_ops, init_extended_remote_ops): Delete.
9905 (remote_can_async_p, remote_is_async_p, remote_async)
9906 (remote_thread_events, remote_upload_tracepoints)
9907 (remote_upload_trace_state_variables): Refactor as methods of
9908 remote_target.
9909 (_initialize_remote): Remove references to init_remote_ops and
9910 init_extended_remote_ops.
9911
9912 * remote-sim.c (gdbsim_target): New class.
9913 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9914 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9915 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9916 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9917 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9918 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9919 Refactor as methods of gdbsim_target.
9920 (gdbsim_ops): Now a gdbsim_target.
9921 (init_gdbsim_ops): Delete.
9922 (gdbsim_cntrl_c): Adjust.
9923 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9924
9925 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9926 (the_amd64_linux_nat_target): New.
9927 (amd64_linux_fetch_inferior_registers)
9928 (amd64_linux_store_inferior_registers): Refactor as methods of
9929 amd64_linux_nat_target.
9930 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
9931 * i386-linux-nat.c: Don't include "linux-nat.h".
9932 (i386_linux_nat_target): New class.
9933 (the_i386_linux_nat_target): New.
9934 (i386_linux_fetch_inferior_registers)
9935 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9936 as methods of i386_linux_nat_target.
9937 (_initialize_i386_linux_nat): Adjust. Set linux_target.
9938 * inf-child.c (inf_child_ops): Delete.
9939 (inf_child_fetch_inferior_registers)
9940 (inf_child_store_inferior_registers): Delete.
9941 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9942 methods of inf_child_target.
9943 (inf_child_target::supports_terminal_ours)
9944 (inf_child_target::terminal_init)
9945 (inf_child_target::terminal_inferior)
9946 (inf_child_target::terminal_ours_for_output)
9947 (inf_child_target::terminal_ours, inf_child_target::interrupt)
9948 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9949 New.
9950 (inf_child_open, inf_child_disconnect, inf_child_close)
9951 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9952 (inf_child_post_startup_inferior, inf_child_can_run)
9953 (inf_child_pid_to_exec_file): Refactor as methods of
9954 inf_child_target.
9955 (inf_child_follow_fork): Delete.
9956 (inf_child_target::can_create_inferior)
9957 (inf_child_target::can_attach): New.
9958 (inf_child_target::has_all_memory, inf_child_target::has_memory)
9959 (inf_child_target::has_stack, inf_child_target::has_registers)
9960 (inf_child_target::has_execution): New.
9961 (inf_child_fileio_open, inf_child_fileio_pwrite)
9962 (inf_child_fileio_pread, inf_child_fileio_fstat)
9963 (inf_child_fileio_close, inf_child_fileio_unlink)
9964 (inf_child_fileio_readlink, inf_child_use_agent)
9965 (inf_child_can_use_agent): Refactor as methods of
9966 inf_child_target.
9967 (return_zero, inf_child_target): Delete.
9968 (inf_child_target::inf_child_target): New.
9969 * inf-child.h: Include "target.h".
9970 (inf_child_target): Delete function prototype.
9971 (inf_child_target): New class.
9972 (inf_child_open_target, inf_child_mourn_inferior)
9973 (inf_child_maybe_unpush_target): Delete.
9974 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9975 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9976 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9977 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9978 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9979 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9980 (inf_ptrace_wait, inf_ptrace_xfer_partial)
9981 (inf_ptrace_thread_alive, inf_ptrace_files_info)
9982 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9983 methods of inf_ptrace_target.
9984 (inf_ptrace_target): Delete function.
9985 * inf-ptrace.h: Include "inf-child.h".
9986 (inf_ptrace_target): Delete function declaration.
9987 (inf_ptrace_target): New class.
9988 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9989 * linux-nat.c (linux_target): New.
9990 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9991 (linux_nat_target::~linux_nat_target): New.
9992 (linux_child_post_attach, linux_child_post_startup_inferior)
9993 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9994 (linux_child_remove_fork_catchpoint)
9995 (linux_child_insert_vfork_catchpoint)
9996 (linux_child_remove_vfork_catchpoint)
9997 (linux_child_insert_exec_catchpoint)
9998 (linux_child_remove_exec_catchpoint)
9999 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10000 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10001 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10002 (linux_nat_stopped_data_address)
10003 (linux_nat_stopped_by_sw_breakpoint)
10004 (linux_nat_supports_stopped_by_sw_breakpoint)
10005 (linux_nat_stopped_by_hw_breakpoint)
10006 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10007 (linux_nat_kill, linux_nat_mourn_inferior)
10008 (linux_nat_xfer_partial, linux_nat_thread_alive)
10009 (linux_nat_update_thread_list, linux_nat_pid_to_str)
10010 (linux_nat_thread_name, linux_child_pid_to_exec_file)
10011 (linux_child_static_tracepoint_markers_by_strid)
10012 (linux_nat_is_async_p, linux_nat_can_async_p)
10013 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10014 (linux_nat_supports_multi_process)
10015 (linux_nat_supports_disable_randomization, linux_nat_async)
10016 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10017 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10018 (linux_nat_fileio_open, linux_nat_fileio_readlink)
10019 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10020 methods of linux_nat_target.
10021 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10022 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10023 parameter.
10024 (check_stopped_by_watchpoint): Adjust.
10025 (linux_xfer_partial): Delete.
10026 (linux_target_install_ops, linux_target, linux_nat_add_target):
10027 Delete.
10028 (linux_nat_target::linux_nat_target): New.
10029 * linux-nat.h: Include "inf-ptrace.h".
10030 (linux_nat_target): New.
10031 (linux_target, linux_target_install_ops, linux_nat_add_target):
10032 Delete function declarations.
10033 (linux_target): Declare global.
10034 * linux-thread-db.c (thread_db_target): New.
10035 (thread_db_target::thread_db_target): New.
10036 (thread_db_ops): Delete.
10037 (the_thread_db_target): New.
10038 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10039 (thread_db_update_thread_list, thread_db_pid_to_str)
10040 (thread_db_extra_thread_info)
10041 (thread_db_thread_handle_to_thread_info)
10042 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10043 (thread_db_resume): Refactor as methods of thread_db_target.
10044 (init_thread_db_ops): Delete.
10045 (_initialize_thread_db): Remove reference to init_thread_db_ops.
10046 * x86-linux-nat.c: Don't include "linux-nat.h".
10047 (super_post_startup_inferior): Delete.
10048 (x86_linux_nat_target::~x86_linux_nat_target): New.
10049 (x86_linux_child_post_startup_inferior)
10050 (x86_linux_read_description, x86_linux_enable_btrace)
10051 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10052 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10053 methods of x86_linux_nat_target.
10054 (x86_linux_create_target): Delete. Bits folded ...
10055 (x86_linux_add_target): ... here. Now takes a linux_nat_target
10056 pointer.
10057 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10058 (x86_linux_nat_target): New class.
10059 (x86_linux_create_target): Delete.
10060 (x86_linux_add_target): Now takes a linux_nat_target pointer.
10061 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10062 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10063 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10064 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10065 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10066 make extern.
10067 (x86_use_watchpoints): Delete.
10068 * x86-nat.h: Include "breakpoint.h" and "target.h".
10069 (x86_use_watchpoints): Delete.
10070 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10071 (x86_stopped_by_watchpoint, x86_stopped_data_address)
10072 (x86_insert_watchpoint, x86_remove_watchpoint)
10073 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10074 (x86_stopped_by_hw_breakpoint): New declarations.
10075 (x86_nat_target): New template class.
10076
10077 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10078 (the_ppc_linux_nat_target): New.
10079 (ppc_linux_fetch_inferior_registers)
10080 (ppc_linux_can_use_hw_breakpoint)
10081 (ppc_linux_region_ok_for_hw_watchpoint)
10082 (ppc_linux_ranged_break_num_registers)
10083 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10084 (ppc_linux_insert_mask_watchpoint)
10085 (ppc_linux_remove_mask_watchpoint)
10086 (ppc_linux_can_accel_watchpoint_condition)
10087 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10088 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10089 (ppc_linux_watchpoint_addr_within_range)
10090 (ppc_linux_masked_watch_num_registers)
10091 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10092 (ppc_linux_read_description): Refactor as methods of
10093 ppc_linux_nat_target.
10094 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
10095
10096 * procfs.c (procfs_xfer_partial): Delete forward declaration.
10097 (procfs_target): New class.
10098 (the_procfs_target): New.
10099 (procfs_target): Delete function.
10100 (procfs_auxv_parse, procfs_attach, procfs_detach)
10101 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10102 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10103 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10104 (procfs_create_inferior, procfs_update_thread_list)
10105 (procfs_thread_alive, procfs_pid_to_str)
10106 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10107 (procfs_stopped_data_address, procfs_insert_watchpoint)
10108 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10109 (proc_find_memory_regions, procfs_info_proc)
10110 (procfs_make_note_section): Refactor as methods of procfs_target.
10111 (_initialize_procfs): Adjust.
10112 * sol-thread.c (sol_thread_target): New class.
10113 (sol_thread_ops): Now a sol_thread_target.
10114 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10115 (sol_thread_fetch_registers, sol_thread_store_registers)
10116 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10117 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10118 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10119 (init_sol_thread_ops): Delete.
10120 (_initialize_sol_thread): Adjust. Remove references to
10121 init_sol_thread_ops and complete_target_initialization.
10122
10123 * windows-nat.c (windows_nat_target): New class.
10124 (windows_fetch_inferior_registers)
10125 (windows_store_inferior_registers, windows_resume, windows_wait)
10126 (windows_attach, windows_detach, windows_pid_to_exec_file)
10127 (windows_files_info, windows_create_inferior)
10128 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10129 (windows_close, windows_pid_to_str, windows_xfer_partial)
10130 (windows_get_tib_address, windows_get_ada_task_ptid)
10131 (windows_thread_name, windows_thread_alive): Refactor as
10132 windows_nat_target methods.
10133 (do_initial_windows_stuff): Adjust.
10134 (windows_target): Delete function.
10135 (_initialize_windows_nat): Adjust.
10136
10137 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10138 (darwin_mourn_inferior, darwin_kill_inferior)
10139 (darwin_create_inferior, darwin_attach, darwin_detach)
10140 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10141 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10142 (darwin_supports_multi_process): Refactor as darwin_nat_target
10143 methods.
10144 (darwin_resume_to, darwin_files_info): Delete.
10145 (_initialize_darwin_inferior): Rename to ...
10146 (_initialize_darwin_nat): ... this. Adjust to C++ification.
10147 * darwin-nat.h: Include "inf-child.h".
10148 (darwin_nat_target): New class.
10149 (darwin_complete_target): Delete.
10150 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10151 (darwin_target): New.
10152 (i386_darwin_fetch_inferior_registers)
10153 (i386_darwin_store_inferior_registers): Refactor as methods of
10154 darwin_nat_target.
10155 (darwin_complete_target): Delete, with ...
10156 (_initialize_i386_darwin_nat): ... bits factored out here.
10157
10158 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10159 (the_alpha_linux_nat_target): New.
10160 (alpha_linux_register_u_offset): Refactor as
10161 alpha_linux_nat_target method.
10162 (_initialize_alpha_linux_nat): Adjust.
10163 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10164 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10165 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10166 methods of linux_nat_trad_target.
10167 (linux_trad_target): Delete.
10168 * linux-nat-trad.h (linux_trad_target): Delete function.
10169 (linux_nat_trad_target): New class.
10170 * mips-linux-nat.c (mips_linux_nat_target): New class.
10171 (super_fetch_registers, super_store_registers, super_close):
10172 Delete.
10173 (the_mips_linux_nat_target): New.
10174 (mips64_linux_regsets_fetch_registers)
10175 (mips64_linux_regsets_store_registers)
10176 (mips64_linux_fetch_registers, mips64_linux_store_registers)
10177 (mips_linux_register_u_offset, mips_linux_read_description)
10178 (mips_linux_can_use_hw_breakpoint)
10179 (mips_linux_stopped_by_watchpoint)
10180 (mips_linux_stopped_data_address)
10181 (mips_linux_region_ok_for_hw_watchpoint)
10182 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10183 (mips_linux_close): Refactor as methods of mips_linux_nat.
10184 (_initialize_mips_linux_nat): Adjust to C++ification.
10185
10186 * aix-thread.c (aix_thread_target): New class.
10187 (aix_thread_ops): Now an aix_thread_target.
10188 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10189 (aix_thread_fetch_registers, aix_thread_store_registers)
10190 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10191 (aix_thread_thread_alive, aix_thread_pid_to_str)
10192 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10193 Refactor as methods of aix_thread_target.
10194 (init_aix_thread_ops): Delete.
10195 (_initialize_aix_thread): Remove references to init_aix_thread_ops
10196 and complete_target_initialization.
10197 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10198 (rs6000_nat_target): New class.
10199 (the_rs6000_nat_target): New.
10200 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10201 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10202 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10203 (super_create_inferior): Delete.
10204 (_initialize_rs6000_nat): Adjust to C++ification.
10205
10206 * arm-linux-nat.c (arm_linux_nat_target): New class.
10207 (the_arm_linux_nat_target): New.
10208 (arm_linux_fetch_inferior_registers)
10209 (arm_linux_store_inferior_registers, arm_linux_read_description)
10210 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10211 (arm_linux_remove_hw_breakpoint)
10212 (arm_linux_region_ok_for_hw_watchpoint)
10213 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10214 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10215 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10216 arm_linux_nat_target.
10217 (_initialize_arm_linux_nat): Adjust to C++ification.
10218
10219 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10220 (the_aarch64_linux_nat_target): New.
10221 (aarch64_linux_fetch_inferior_registers)
10222 (aarch64_linux_store_inferior_registers)
10223 (aarch64_linux_child_post_startup_inferior)
10224 (aarch64_linux_read_description)
10225 (aarch64_linux_can_use_hw_breakpoint)
10226 (aarch64_linux_insert_hw_breakpoint)
10227 (aarch64_linux_remove_hw_breakpoint)
10228 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10229 (aarch64_linux_region_ok_for_hw_watchpoint)
10230 (aarch64_linux_stopped_data_address)
10231 (aarch64_linux_stopped_by_watchpoint)
10232 (aarch64_linux_watchpoint_addr_within_range)
10233 (aarch64_linux_can_do_single_step): Refactor as methods of
10234 aarch64_linux_nat_target.
10235 (super_post_startup_inferior): Delete.
10236 (_initialize_aarch64_linux_nat): Adjust to C++ification.
10237
10238 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10239 (the_hppa_linux_nat_target): New.
10240 (hppa_linux_fetch_inferior_registers)
10241 (hppa_linux_store_inferior_registers): Refactor as methods of
10242 hppa_linux_nat_target.
10243 (_initialize_hppa_linux_nat): Adjust to C++ification.
10244
10245 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10246 (the_ia64_linux_nat_target): New.
10247 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10248 (ia64_linux_stopped_data_address)
10249 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10250 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10251 ia64_linux_nat_target methods.
10252 (super_xfer_partial): Delete.
10253 (_initialize_ia64_linux_nat): Adjust to C++ification.
10254
10255 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10256 (the_m32r_linux_nat_target): New.
10257 (m32r_linux_fetch_inferior_registers)
10258 (m32r_linux_store_inferior_registers): Refactor as
10259 m32r_linux_nat_target methods.
10260 (_initialize_m32r_linux_nat): Adjust to C++ification.
10261
10262 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10263 (the_m68k_linux_nat_target): New.
10264 (m68k_linux_fetch_inferior_registers)
10265 (m68k_linux_store_inferior_registers): Refactor as
10266 m68k_linux_nat_target methods.
10267 (_initialize_m68k_linux_nat): Adjust to C++ification.
10268
10269 * s390-linux-nat.c (s390_linux_nat_target): New class.
10270 (the_s390_linux_nat_target): New.
10271 (s390_linux_fetch_inferior_registers)
10272 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10273 (s390_insert_watchpoint, s390_remove_watchpoint)
10274 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10275 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10276 (s390_auxv_parse, s390_read_description): Refactor as methods of
10277 s390_linux_nat_target.
10278 (_initialize_s390_nat): Adjust to C++ification.
10279
10280 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10281 (the_sparc_linux_nat_target): New.
10282 (_initialize_sparc_linux_nat): Adjust to C++ification.
10283 * sparc-nat.c (sparc_fetch_inferior_registers)
10284 (sparc_store_inferior_registers): Remove target_ops parameter.
10285 * sparc-nat.h (sparc_fetch_inferior_registers)
10286 (sparc_store_inferior_registers): Remove target_ops parameter.
10287 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10288 (the_sparc64_linux_nat_target): New.
10289 (_initialize_sparc64_linux_nat): Adjust to C++ification.
10290
10291 * spu-linux-nat.c (spu_linux_nat_target): New class.
10292 (the_spu_linux_nat_target): New.
10293 (spu_child_post_startup_inferior, spu_child_post_attach)
10294 (spu_child_wait, spu_fetch_inferior_registers)
10295 (spu_store_inferior_registers, spu_xfer_partial)
10296 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10297 methods.
10298 (_initialize_spu_nat): Adjust to C++ification.
10299
10300 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10301 (the_tilegx_linux_nat_target): New.
10302 (fetch_inferior_registers, store_inferior_registers):
10303 Refactor as methods.
10304 (_initialize_tile_linux_nat): Adjust to C++ification.
10305
10306 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10307 (the_xtensa_linux_nat_target): New.
10308 (xtensa_linux_fetch_inferior_registers)
10309 (xtensa_linux_store_inferior_registers): Refactor as
10310 xtensa_linux_nat_target methods.
10311 (_initialize_xtensa_linux_nat): Adjust to C++ification.
10312
10313 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10314 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10315 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10316 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10317 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10318 (fbsd_stopped_by_sw_breakpoint)
10319 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10320 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10321 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10322 (fbsd_post_startup_inferior, fbsd_post_attach)
10323 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10324 (fbsd_set_syscall_catchpoint)
10325 (super_xfer_partial, super_resume, super_wait)
10326 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10327 (fbsd_handle_debug_trap): Remove target_ops parameter.
10328 (fbsd_nat_add_target): Delete.
10329 * fbsd-nat.h: Include "inf-ptrace.h".
10330 (fbsd_nat_add_target): Delete.
10331 (USE_SIGTRAP_SIGINFO): Define.
10332 (fbsd_nat_target): New class.
10333
10334 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10335 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10336 (amd64bsd_target): Delete.
10337 * amd64-bsd-nat.h: New file.
10338 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10339 "x86-bsd-nat.h".
10340 (amd64_fbsd_nat_target): New class.
10341 (the_amd64_fbsd_nat_target): New.
10342 (amd64fbsd_read_description): Refactor as method of
10343 amd64_fbsd_nat_target.
10344 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10345 (_initialize_amd64fbsd_nat): Adjust to C++ification.
10346 * amd64-nat.h (amd64bsd_target): Delete function declaration.
10347 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10348 (i386bsd_store_inferior_registers): Remove target_ops parameter.
10349 (i386bsd_target): Delete.
10350 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10351 (i386bsd_fetch_inferior_registers)
10352 (i386bsd_store_inferior_registers): Declare.
10353 (i386_bsd_nat_target): New class.
10354 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10355 (the_i386_fbsd_nat_target): New.
10356 (i386fbsd_resume, i386fbsd_read_description): Refactor as
10357 i386_fbsd_nat_target methods.
10358 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10359 (_initialize_i386fbsd_nat): Adjust to C++ification.
10360 * x86-bsd-nat.c (super_mourn_inferior): Delete.
10361 (x86bsd_mourn_inferior, x86bsd_target): Delete.
10362 (_initialize_x86_bsd_nat): Adjust to C++ification.
10363 * x86-bsd-nat.h: Include "x86-nat.h".
10364 (x86bsd_target): Delete declaration.
10365 (x86bsd_nat_target): New class.
10366
10367 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10368 (the_aarch64_fbsd_nat_target): New.
10369 (aarch64_fbsd_fetch_inferior_registers)
10370 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10371 aarch64_fbsd_nat_target.
10372 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10373 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10374 (the_alpha_bsd_nat_target): New.
10375 (alphabsd_fetch_inferior_registers)
10376 (alphabsd_store_inferior_registers): Refactor as
10377 alpha_bsd_nat_target methods.
10378 (_initialize_alphabsd_nat): Refactor as methods of
10379 alpha_bsd_nat_target.
10380 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10381 (the_amd64_nbsd_nat_target): New.
10382 (_initialize_amd64nbsd_nat): Adjust to C++ification.
10383 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10384 (the_amd64_obsd_nat_target): New.
10385 (_initialize_amd64obsd_nat): Adjust to C++ification.
10386 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10387 (the_arm_fbsd_nat_target): New.
10388 (arm_fbsd_fetch_inferior_registers)
10389 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10390 (_initialize_arm_fbsd_nat): Refactor as methods of
10391 arm_fbsd_nat_target.
10392 (_initialize_arm_fbsd_nat): Adjust to C++ification.
10393 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10394 (the_arm_netbsd_nat_target): New.
10395 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10396 arm_netbsd_nat_target.
10397 (_initialize_arm_netbsd_nat): Adjust to C++ification.
10398 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10399 (the_hppa_nbsd_nat_target): New.
10400 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10401 hppa_nbsd_nat_target methods.
10402 (_initialize_hppanbsd_nat): Adjust to C++ification.
10403 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10404 (the_hppa_obsd_nat_target): New.
10405 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10406 methods of hppa_obsd_nat_target.
10407 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
10408 add_target.
10409 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10410 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
10411 add_target.
10412 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10413 (_initialize_i386obsd_nat): Use add_target.
10414 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10415 (the_m68k_bsd_nat_target): New.
10416 (m68kbsd_fetch_inferior_registers)
10417 (m68kbsd_store_inferior_registers): Refactor as methods of
10418 m68k_bsd_nat_target.
10419 (_initialize_m68kbsd_nat): Adjust to C++ification.
10420 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10421 (the_mips_fbsd_nat_target): New.
10422 (mips_fbsd_fetch_inferior_registers)
10423 (mips_fbsd_store_inferior_registers): Refactor as methods of
10424 mips_fbsd_nat_target.
10425 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
10426 add_target.
10427 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10428 (the_mips_nbsd_nat_target): New.
10429 (mipsnbsd_fetch_inferior_registers)
10430 (mipsnbsd_store_inferior_registers): Refactor as methods of
10431 mips_nbsd_nat_target.
10432 (_initialize_mipsnbsd_nat): Adjust to C++ification.
10433 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10434 (the_mips64_obsd_nat_target): New.
10435 (mips64obsd_fetch_inferior_registers)
10436 (mips64obsd_store_inferior_registers): Refactor as methods of
10437 mips64_obsd_nat_target.
10438 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
10439 add_target.
10440 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10441 nbsd_nat_target.
10442 * nbsd-nat.h: Include "inf-ptrace.h".
10443 (nbsd_nat_target): New class.
10444 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10445 (obsd_wait): Refactor as methods of obsd_nat_target.
10446 (obsd_add_target): Delete.
10447 * obsd-nat.h: Include "inf-ptrace.h".
10448 (obsd_nat_target): New class.
10449 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10450 (the_ppc_fbsd_nat_target): New.
10451 (ppcfbsd_fetch_inferior_registers)
10452 (ppcfbsd_store_inferior_registers): Refactor as methods of
10453 ppc_fbsd_nat_target.
10454 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
10455 add_target.
10456 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10457 (the_ppc_nbsd_nat_target): New.
10458 (ppcnbsd_fetch_inferior_registers)
10459 (ppcnbsd_store_inferior_registers): Refactor as methods of
10460 ppc_nbsd_nat_target.
10461 (_initialize_ppcnbsd_nat): Adjust to C++ification.
10462 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10463 (the_ppc_obsd_nat_target): New.
10464 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10465 methods of ppc_obsd_nat_target.
10466 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
10467 add_target.
10468 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10469 (the_sh_nbsd_nat_target): New.
10470 (shnbsd_fetch_inferior_registers)
10471 (shnbsd_store_inferior_registers): Refactor as methods of
10472 sh_nbsd_nat_target.
10473 (_initialize_shnbsd_nat): Adjust to C++ification.
10474 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10475 (inf_ptrace_xfer_partial): Delete.
10476 (sparc_xfer_partial, sparc_target): Delete.
10477 * sparc-nat.h (sparc_fetch_inferior_registers)
10478 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10479 (sparc_target): Delete function declaration.
10480 (sparc_target): New template class.
10481 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10482 (_initialize_sparcnbsd_nat): Adjust to C++ification.
10483 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10484 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
10485 add_target.
10486 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10487 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10488 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10489 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
10490 add_target.
10491 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10492 (the_vax_bsd_nat_target): New.
10493 (vaxbsd_fetch_inferior_registers)
10494 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10495 methods.
10496 (_initialize_vaxbsd_nat): Adjust to C++ification.
10497
10498 * bsd-kvm.c (bsd_kvm_target): New class.
10499 (bsd_kvm_ops): Now a bsd_kvm_target.
10500 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10501 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10502 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10503 bsd_kvm_target.
10504 (bsd_kvm_return_one): Delete.
10505 (bsd_kvm_add_target): Adjust to C++ification.
10506
10507 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10508 (nto_procfs_target_procfs): New classes.
10509 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10510 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10511 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10512 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10513 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10514 (procfs_remove_hw_breakpoint, procfs_resume)
10515 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10516 (procfs_kill_inferior, procfs_store_registers)
10517 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10518 as methods of nto_procfs_target.
10519 (nto_procfs_ops): Now an nto_procfs_target_procfs.
10520 (nto_native_ops): Delete.
10521 (procfs_open, procfs_native_open): Delete.
10522 (nto_native_ops): Now an nto_procfs_target_native.
10523 (init_procfs_targets): Adjust to C++ification.
10524 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10525 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10526 Refactor as methods of nto_procfs_target.
10527
10528 * go32-nat.c (go32_nat_target): New class.
10529 (the_go32_nat_target): New.
10530 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10531 (go32_store_registers, go32_xfer_partial, go32_files_info)
10532 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10533 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10534 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10535 (go32_pid_to_str): Refactor as methods of go32_nat_target.
10536 (go32_target): Delete.
10537 (_initialize_go32_nat): Adjust to C++ification.
10538
10539 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10540 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10541 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10542 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10543 gnu_nat_target.
10544 (gnu_target): Delete.
10545 * gnu-nat.h (gnu_target): Delete.
10546 (gnu_nat_target): New class.
10547 * i386-gnu-nat.c (gnu_base_target): New.
10548 (i386_gnu_nat_target): New class.
10549 (the_i386_gnu_nat_target): New.
10550 (_initialize_i386gnu_nat): Adjust to C++ification.
10551
10552 2018-05-02 Pedro Alves <palves@redhat.com>
10553
10554 * bfd-target.c (target_bfd_xclose): Rename to ...
10555 (target_bfd_close): ... this.
10556 (target_bfd_reopen): Adjust.
10557 * target.c (target_close): Remove references to to_xclose.
10558 * target.h (target_ops::to_xclose): Delete.
10559 (target_ops::to_close): Update comments.
10560
10561 2018-05-02 Pedro Alves <palves@redhat.com>
10562
10563 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10564 "linux-nat.h".
10565 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10566 * inf-ptrace.c (inf_ptrace_register_u_offset)
10567 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10568 (inf_ptrace_store_register, inf_ptrace_store_registers)
10569 (inf_ptrace_trad_target): Move to ...
10570 * linux-nat-trad.c: ... this new file.
10571 * linux-nat-trad.h: New file.
10572 * linux-nat.c (linux_target_install_ops): Make extern.
10573 (linux_trad_target): Delete.
10574 * linux-nat.h (linux_trad_target): Delete declaration.
10575 (linux_target_install_ops): Declare.
10576 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10577 "linux-nat.h".
10578
10579 2018-05-02 Pedro Alves <palves@redhat.com>
10580
10581 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10582 procfs_target/add_target here.
10583 * procfs.c (procfs_target): Make static.
10584 (_initialize_procfs): Call add_target here.
10585 * procfs.h (struct target_ops): Remove forward declaration.
10586 (procfs_target): Remove declaration.
10587 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10588
10589 2018-05-02 Pedro Alves <palves@redhat.com>
10590
10591 * procfs.c (procfs_stopped_by_watchpoint)
10592 (procfs_insert_watchpoint, procfs_remove_watchpoint)
10593 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10594 Forward declare.
10595 (procfs_use_watchpoints): Delete, move contents...
10596 (procfs_target): ... here.
10597 * procfs.h (procfs_use_watchpoints): Delete declaration.
10598 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10599 procfs_use_watchpoints.
10600 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10601 procfs_use_watchpoints.
10602
10603 2018-05-02 Tom Tromey <tom@tromey.com>
10604
10605 PR python/20084:
10606 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10607 and var_zuinteger_unlimited.
10608 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10609 and PARAM_ZUINTEGER_UNLIMITED.
10610 (set_parameter_value): Handle var_zuinteger and
10611 var_zuinteger_unlimited.
10612 (add_setshow_generic): Likewise.
10613 (parmpy_init): Likewise.
10614
10615 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
10616
10617 PR rust/23124
10618 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10619 pointer is not null before dereferencing it.
10620
10621 2018-04-30 Tom Tromey <tom@tromey.com>
10622
10623 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10624 is_mi_like_p.
10625
10626 2018-04-30 Tom Tromey <tom@tromey.com>
10627
10628 * breakpoint.c (mention): Remove use of is_mi_like_p.
10629 (print_mention_ranged_breakpoint): Likewise.
10630 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10631 of is_mi_like_p.
10632
10633 2018-04-30 Tom Tromey <tom@tromey.com>
10634
10635 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10636
10637 2018-04-30 Tom Tromey <tom@tromey.com>
10638
10639 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10640 (info_spu_event_command): Remove some uses of is_mi_like_p.
10641
10642 2018-04-30 Tom Tromey <tom@tromey.com>
10643
10644 * python/py-framefilter.c (py_print_single_arg)
10645 (enumerate_locals, py_print_args, py_print_frame): Remove some
10646 uses of is_mi_like_p.
10647
10648 2018-04-30 Tom Tromey <tom@tromey.com>
10649
10650 * ui-out.c: Update.
10651 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10652 * ui-out.h (ui_out::is_mi_like_p): Now const.
10653 (ui_out::do_is_mi_like_p): Now const.
10654 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10655
10656 2018-04-30 Tom Tromey <tom@tromey.com>
10657
10658 * varobj.c (varobj_set_visualizer): Use new_reference.
10659 * python/python.c (gdbpy_decode_line): Use new_reference.
10660 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10661 new_reference.
10662
10663 2018-04-30 Tom Tromey <tom@tromey.com>
10664
10665 * varobj.c (install_new_value): Use new_reference.
10666 * value.h (value_incref): Return void. Swap intro comment with
10667 value_decref.
10668 * value.c (set_value_parent): Use new_reference.
10669 (value_incref): Return void. Update intro comment.
10670 (release_value): Use new_reference.
10671 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10672
10673 2018-04-30 Tom Tromey <tom@tromey.com>
10674
10675 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10676 * gdb_bfd.h (new_bfd_ref): Remove.
10677 (gdb_bfd_open): Update comment.
10678 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10679 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10680 (gdb_bfd_fdopenr): Use new_reference.
10681 * exec.c (exec_file_attach): Use new_reference.
10682
10683 2018-04-30 Tom Tromey <tom@tromey.com>
10684
10685 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10686 method.
10687
10688 2018-04-30 Tom Tromey <tom@tromey.com>
10689
10690 * jit.c (jit_read_code_entry): Use type_align.
10691 * i386-tdep.c (i386_gdbarch_init): Don't call
10692 set_gdbarch_long_long_align_bit.
10693 * gdbarch.sh: Remove long_long_align_bit.
10694 * gdbarch.c, gdbarch.h: Rebuild.
10695 * arc-tdep.c (arc_type_align): New function.
10696 (arc_gdbarch_init): Use arc_type_align. Don't call
10697 set_gdbarch_long_long_align_bit.
10698
10699 2018-04-30 Tom Tromey <tom@tromey.com>
10700
10701 * rust-lang.c (rust_type_alignment): Remove.
10702 (rust_composite_type): Use type_align.
10703
10704 2018-04-30 Tom Tromey <tom@tromey.com>
10705
10706 * NEWS: Mention Type.align.
10707 * python/py-type.c (typy_get_alignof): New function.
10708 (type_object_getset): Add "alignof".
10709
10710 2018-04-30 Tom Tromey <tom@tromey.com>
10711
10712 PR exp/17095:
10713 * NEWS: Update.
10714 * std-operator.def (UNOP_ALIGNOF): New operator.
10715 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10716 New.
10717 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10718 * c-lang.c (c_op_print_tab): Add alignof.
10719 * c-exp.y (ALIGNOF): New token.
10720 (exp): Add "ALIGNOF" production.
10721 (ident_tokens): Add _Alignof and alignof.
10722
10723 2018-04-30 Tom Tromey <tom@tromey.com>
10724
10725 * i386-tdep.c (i386_type_align): New function.
10726 (i386_gdbarch_init): Update.
10727 * gdbarch.sh (type_align): New method.
10728 * gdbarch.c, gdbarch.h: Rebuild.
10729 * arch-utils.h (default_type_align): Declare.
10730 * arch-utils.c (default_type_align): New function.
10731 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10732 (struct type) <align_log2>: New field.
10733 <instance_flags>: Now a bitfield.
10734 (TYPE_RAW_ALIGN): New macro.
10735 (type_align, type_raw_align, set_type_align): Declare.
10736 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10737 functions.
10738 * dwarf2read.c (quirk_rust_enum): Set type alignment.
10739 (get_alignment, maybe_set_alignment): New functions.
10740 (read_structure_type, read_enumeration_type, read_array_type)
10741 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10742 (read_subrange_type, read_base_type): Set type alignment.
10743
10744 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
10745
10746 * dwarf2read.c (read_index_from_section): Use bool.
10747
10748 2018-04-29 Fabian Groffen <grobian@gentoo.org>
10749
10750 PR gdb/22950
10751 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10752 with #ifdef.
10753
10754 2018-04-29 John Reiser <jreiser@BitWagon.com>
10755
10756 PR build/22873
10757 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10758 last step, and do it atomically.
10759
10760 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
10761
10762 * compile/compile-c-types.c (convert_int, convert_float):
10763 Update for C FE v1.
10764
10765 2018-04-27 Tom Tromey <tom@tromey.com>
10766
10767 PR rust/22545:
10768 * rust-lang.c (rust_inclusive_range_type_p): New function.
10769 (rust_range): Handle inclusive ranges.
10770 (rust_compute_range): Likewise.
10771 * rust-exp.y (struct rust_op) <inclusive>: New field.
10772 (DOTDOTEQ): New constant.
10773 (range_expr): Add "..=" productions.
10774 (operator_tokens): Add "..=" token.
10775 (ast_range): Add "inclusive" parameter.
10776 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10777 ranges.
10778 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10779 bounds values.
10780 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10781 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10782 Update comments.
10783 * expprint.c (print_subexp_standard): Handle new bounds values.
10784 (dump_subexp_body_standard): Likewise.
10785
10786 2018-04-27 Tom Tromey <tom@tromey.com>
10787
10788 * configure: Rebuild.
10789 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10790 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10791 "OVERRIDE".
10792 (class symbol_needs_eval_context): Likewise.
10793 * dwarf2read.c (mock_mapped_index::symbol_name_count)
10794 (mock_mapped_index::symbol_name_at): Use "override". Remove
10795 "virtual".
10796 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10797 "override".
10798 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10799 * aarch64-tdep.c (instruction_reader::read): Use "override".
10800 (instruction_reader_test::read): Likewise.
10801 * arm-tdep.c (instruction_reader::read): Use "override".
10802 (instruction_reader_thumb::read): Likewise.
10803
10804 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
10805
10806 PR remote/9665
10807 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10808 instead of remote_send.
10809 (remote_send): Remove.
10810
10811 2018-04-26 Pedro Alves <palves@redhat.com>
10812
10813 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10814 find_function_start_sal instead of find_pc_line.
10815
10816 2018-04-26 Pedro Alves <palves@redhat.com>
10817
10818 * breakpoint.c (set_breakpoint_location_function): Handle
10819 mst_data_gnu_ifunc.
10820 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10821 * elfread.c (elf_symtab_read): Give data symbols with
10822 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10823 (elf_rel_plt_read): Update comment.
10824 * linespec.c (convert_linespec_to_sals): Handle
10825 mst_data_gnu_ifunc.
10826 (minsym_found): Handle mst_data_gnu_ifunc.
10827 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10828 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10829 * parse.c (find_minsym_type_and_address): Handle
10830 mst_data_gnu_ifunc.
10831 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10832 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10833 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10834 comment.
10835 <mst_data_gnu_ifunc>: New enumerator.
10836
10837 2018-04-26 Pedro Alves <palves@redhat.com>
10838
10839 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10840 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10841 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10842 Handle it.
10843 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10844 (lookup_minimal_symbol_by_pc): Adjust.
10845 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10846 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10847 * minsyms.h (lookup_msym_prefer): New enum.
10848 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10849 parameter by a lookup_msym_prefer parameter.
10850
10851 2018-04-26 Pedro Alves <palves@redhat.com>
10852
10853 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10854 ends in "@plt" instead of looking at the symbol's section.
10855
10856 2018-04-26 Pedro Alves <palves@redhat.com>
10857
10858 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10859 all references.
10860 (find_pc_partial_function_gnu_ifunc): Rename to ...
10861 (find_pc_partial_function): ... this, and remove references to
10862 'is_gnu_ifunc_p'.
10863 (find_pc_partial_function): Delete old implementation.
10864 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10865
10866 2018-04-26 Pedro Alves <palves@redhat.com>
10867
10868 * linespec.c (struct bound_minimal_symbol_search_key): New.
10869 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10870 skip first line if we found a GNU ifunc minimal symbol by name.
10871 (compare_msymbols): Change parameters to work with a destructured
10872 lhs minsym.
10873 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10874 functions.
10875
10876 2018-04-26 Pedro Alves <palves@redhat.com>
10877
10878 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10879 ifunc targets here. Instead, if we have an ifunc minsym, use its
10880 address/name.
10881 (add_location_to_breakpoint): Store the minsym and the objfile in
10882 the breakpoint location.
10883 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10884 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10885 Record the minsym in the sal.
10886 * symtab.h (symtab_and_line) <msymbol>: New field.
10887
10888 2018-04-26 Pedro Alves <palves@redhat.com>
10889
10890 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10891 unless we actually resolved the ifunc.
10892
10893 2018-04-26 Pedro Alves <palves@redhat.com>
10894
10895 * c-exp.y (variable production): Prefer ifunc minsyms over
10896 regular function symbols.
10897 * symtab.c (find_gnu_ifunc): New function.
10898 * minsyms.h (lookup_msym_prefer): New enum.
10899 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10900 parameter by a lookup_msym_prefer parameter.
10901 * symtab.h (find_gnu_ifunc): New declaration.
10902
10903 2018-04-26 Pedro Alves <palves@redhat.com>
10904
10905 * blockframe.c (find_gnu_ifunc_target_type): New function.
10906 (find_function_type): New.
10907 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10908 return a value with a memory address.
10909 (eval_call): For calls to GNU ifunc functions, try to find the
10910 type of the target function from the type that the resolver
10911 returns.
10912 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10913 symbols.
10914 * infcall.c (find_function_return_type): Delete.
10915 (find_function_addr): Add 'function_type' parameter. For calls to
10916 GNU ifunc functions, try to find the type of the target function
10917 from the type that the resolver returns, and return it via
10918 FUNCTION_TYPE.
10919 (call_function_by_hand_dummy): Adjust to use the function type
10920 returned by find_function_addr.
10921 (find_function_addr): Add 'function_type' parameter and move
10922 description here.
10923 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10924 declarations.
10925
10926 2018-04-26 Pedro Alves <palves@redhat.com>
10927
10928 * c-exp.y (variable production): Skip finding an alias for ifunc
10929 symbols.
10930
10931 2018-04-26 Pedro Alves <palves@redhat.com>
10932
10933 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10934
10935 2018-04-25 Pedro Alves <palves@redhat.com>
10936
10937 * infcmd.c (kill_command): Print the pid as string, not the whole
10938 thread's ptid. Add comment. s/has been killed/killed/ in output
10939 message.
10940 * remote.c (remote_detach_1): Print the pid as string, not the
10941 whole thread's ptid.
10942
10943 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10944 Sergio Durigan Junior <sergiodj@redhat.com>
10945 Pedro Alves <palves@redhat.com>
10946
10947 * infcmd.c (kill_command): Print message when inferior has
10948 been killed.
10949 * inferior.c (print_inferior_events): Remove 'static'. Set as
10950 '1'.
10951 (add_inferior): Improve message printed when
10952 'print_inferior_events' is on.
10953 (exit_inferior): Remove message printed when
10954 'print_inferior_events' is on.
10955 (detach_inferior): Improve message printed when
10956 'print_inferior_events' is on.
10957 (initialize_inferiors): Use 'add_inferior_silent' to set
10958 'current_inferior_'.
10959 * inferior.h (print_inferior_events): Declare here as
10960 'extern'.
10961 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10962 '[Detaching...]' messages when 'print_inferior_events' is on.
10963 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
10964 as prefix/suffix for messages. Remove periods. Fix erroneous
10965 'Detaching after fork from child...', replace it by '... from
10966 parent...'.
10967 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10968 prefix/suffix when printing 'Detaching...' messages. Print
10969 them when 'print_inferior_events' is on.
10970 * remote.c (remote_detach_1): Print message when detaching
10971 from inferior and '!is_fork_parent'.
10972
10973 2018-04-24 Tom Tromey <tom@tromey.com>
10974
10975 * cli-out.h: Reindent.
10976
10977 2018-04-24 Tom Tromey <tom@tromey.com>
10978
10979 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10980 (cli_ui_out::do_field_string): Use fputs_filtered.
10981 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10982
10983 2018-04-23 Tom Tromey <tom@tromey.com>
10984
10985 * guile/scm-frame.c (gdbscm_frame_read_var): Use
10986 gdb::unique_xmalloc_ptr.
10987
10988 2018-04-23 Tom Tromey <tom@tromey.com>
10989
10990 * configure: Rebuild.
10991
10992 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
10993
10994 PR gdb/23095
10995 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10996 prepare_for_testing. Set normal_bp to r_debug_state if target
10997 is bsd.
10998
10999 2018-04-21 Pedro Alves <palves@redhat.com>
11000 Rajendra SY <rajendra.sy@gmail.com>
11001
11002 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11003 * remote.c (extended_remote_attach): In all-stop mode, mark the
11004 thread as executing.
11005
11006 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
11007
11008 * thread.c (thread_apply_all_command): Fix comment.
11009 (thread_command): Fix comment.
11010
11011 2018-04-10 Alan Hayward <alan.hayward@arm.com>
11012
11013 * common/tdesc.h (tdesc_create_feature): Remove xml filename
11014 parameter.
11015 * features/aarch64-core.c (create_feature_aarch64_core):
11016 Regenerate.
11017 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11018 Likewise.
11019 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11020 Likewise.
11021 * features/i386/32bit-avx512.c
11022 (create_feature_i386_32bit_avx512): Likewise.
11023 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11024 Likewise.
11025 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11026 Likewise.
11027 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11028 Likewise.
11029 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11030 Likewise.
11031 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11032 Likewise.
11033 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11034 Likewise.
11035 * features/i386/64bit-avx512.c
11036 (create_feature_i386_64bit_avx512): Likewise.
11037 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11038 Likewise.
11039 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11040 Likewise.
11041 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11042 Likewise.
11043 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11044 Likewise.
11045 * features/i386/64bit-segments.c
11046 (create_feature_i386_64bit_segments): Likewise.
11047 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11048 Likewise.
11049 * features/i386/x32-core.c
11050 (create_feature_i386_x32_core): Likewise.
11051 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11052 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11053 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11054 * target-descriptions.c: In generated code, don't pass xml
11055 filename.
11056
11057 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11058
11059 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11060 (print_xml_feature::visit_post): Likewise.
11061 (print_xml_feature::visit): Likewise.
11062 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11063 (print_xml_feature): Add new class.
11064 * regformats/regdat.sh: Null xmltarget on feature targets.
11065 * target-descriptions.c (struct target_desc): Add xmltarget.
11066 (maintenance_check_tdesc_xml_convert): Add unittest function.
11067 (tdesc_get_features_xml): Add function to get xml.
11068 (maintenance_check_xml_descriptions): Test xml generation.
11069 * xml-tdesc.c (string_read_description_xml): Add function.
11070 * xml-tdesc.h (string_read_description_xml): Add declaration.
11071
11072 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11073
11074 * features/Makefile: Add feature marker to targets with new style
11075 target descriptions.
11076 * regformats/aarch64.dat: Regenerate.
11077 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11078 * regformats/i386/amd64-avx-linux.dat: Likewise.
11079 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11080 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11081 * regformats/i386/amd64-linux.dat: Likewise.
11082 * regformats/i386/amd64-mpx-linux.dat: Likewise.
11083 * regformats/i386/amd64.dat: Likewise.
11084 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11085 * regformats/i386/i386-avx-linux.dat: Likewise.
11086 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11087 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11088 * regformats/i386/i386-linux.dat: Likewise.
11089 * regformats/i386/i386-mmx-linux.dat: Likewise.
11090 * regformats/i386/i386-mpx-linux.dat: Likewise.
11091 * regformats/i386/i386.dat: Likewise.
11092 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11093 * regformats/i386/x32-avx-linux.dat: Likewise.
11094 * regformats/i386/x32-linux.dat: Likewise.
11095 * regformats/tic6x-c62x-linux.dat: Likewise.
11096 * regformats/tic6x-c64x-linux.dat: Likewise.
11097 * regformats/tic6x-c64xp-linux.dat: Likewise.
11098 * regformats/regdat.sh: Parse feature marker.
11099
11100 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11101
11102 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11103 (tdesc_osabi_name): Likewise.
11104 * target-descriptions.c (tdesc_architecture_name): Add new
11105 function.
11106 (tdesc_osabi_name): Likewise.
11107
11108 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11109
11110 * common/tdesc.c (tdesc_predefined_type): Move to here.
11111 (tdesc_named_type): Likewise.
11112 (tdesc_create_vector): Likewise.
11113 (tdesc_create_struct): Likewise.
11114 (tdesc_set_struct_size): Likewise.
11115 (tdesc_create_union): Likewise.
11116 (tdesc_create_flags): Likewise.
11117 (tdesc_create_enum): Likewise.
11118 (tdesc_add_field): Likewise.
11119 (tdesc_add_typed_bitfield): Likewise.
11120 (tdesc_add_bitfield): Likewise.
11121 (tdesc_add_flag): Likewise.
11122 (tdesc_add_enum_value): Likewise.
11123 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11124 (struct tdesc_type_vector): Likewise.
11125 (struct tdesc_type_field): Likewise.
11126 (struct tdesc_type_with_fields): Likewise.
11127 (tdesc_create_enum): Add declaration.
11128 (tdesc_add_typed_bitfield): Likewise.
11129 (tdesc_add_enum_value): Likewise.
11130 * target-descriptions.c (tdesc_type_field): Move from here.
11131 (tdesc_type_builtin): Likewise.
11132 (tdesc_type_vector): Likewise.
11133 (tdesc_type_with_fields): Likewise.
11134 (tdesc_predefined_types): Likewise.
11135 (tdesc_named_type): Likewise.
11136 (tdesc_create_vector): Likewise.
11137 (tdesc_create_struct): Likewise.
11138 (tdesc_set_struct_size): Likewise.
11139 (tdesc_create_union): Likewise.
11140 (tdesc_create_flags): Likewise.
11141 (tdesc_create_enum): Likewise.
11142 (tdesc_add_field): Likewise.
11143 (tdesc_add_typed_bitfield): Likewise.
11144 (tdesc_add_bitfield): Likewise.
11145 (tdesc_add_flag): Likewise.
11146 (tdesc_add_enum_value): Likewise.
11147 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11148 (tdesc_add_typed_bitfield): Likewise.
11149 (tdesc_add_enum_value): Likewise.
11150
11151 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11152
11153 * common/tdesc.c (tdesc_feature::accept): Move to here.
11154 (tdesc_feature::operator==): Likewise.
11155 (tdesc_create_reg): Likewise.
11156 * common/tdesc.h (tdesc_type_kind): Likewise.
11157 (struct tdesc_type): Likewise.
11158 (struct tdesc_feature): Likewise.
11159 * regformats/regdat.sh: Create a feature.
11160 * target-descriptions.c (tdesc_type_kind): Move from here.
11161 (tdesc_type): Likewise.
11162 (tdesc_type_up): Likewise.
11163 (tdesc_feature): Likewise.
11164 (tdesc_create_reg): Likewise.
11165
11166 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11167
11168 * Makefile.in: Add arch/tdesc.c
11169 * common/tdesc.c: New file.
11170 * common/tdesc.h (tdesc_element_visitor): Move to here.
11171 (tdesc_element): Likewise.
11172 (tdesc_reg): Likewise.
11173 (tdesc_reg_up): Likewise.
11174 * regformats/regdef.h (reg): Add offset to constructors.
11175 * target-descriptions.c (tdesc_element_visitor): Move from here.
11176 (tdesc_element): Likewise.
11177 (tdesc_reg): Likewise.
11178 (tdesc_reg_up): Likewise.
11179
11180 2018-04-17 Tom Tromey <tom@tromey.com>
11181
11182 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11183 discriminant field.
11184
11185 2018-04-17 Tom Tromey <tom@tromey.com>
11186
11187 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11188
11189 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
11190
11191 * symtab.c (print_symbol_info): Skip printing filename and line
11192 number when `last' is NULL.
11193 (symtab_symbol_info): Use empty string instead of NULL for first
11194 invocation of print_symbol_info.
11195 (rbreak_command): Pass NULL to `last' parameter of
11196 print_symbol_info.
11197
11198 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
11199
11200 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11201 instead of nullptr.
11202
11203 2018-04-16 Pedro Alves <palves@redhat.com>
11204
11205 * MAINTAINERS (sh): Remove.
11206 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11207 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11208 (ALLDEPFILES): Remove sh64-tdep.c.
11209 * NEWS: Mentions that support for SH-5/SH64 is removed.
11210 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11211 (sh*-*-openbsd*): Ditto.
11212 (sh64-*-elf*): Remove.
11213 (sh*): Remove.
11214 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11215 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11216 * sh-tdep.c: No longer include "sh64-tdep.h".
11217 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11218 * sh64-tdep.c, sh64-tdep.h: Remove files.
11219
11220 2018-04-16 Pedro Alves <palves@redhat.com>
11221
11222 * MAINTAINERS: Remove m88k.
11223 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11224 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11225 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11226 * NEWS: Mention that support for m88k was removed.
11227 * configure.host (m88*-*-*): Remove support.
11228 * configure.nat (m88k-*-*): Remove support.
11229 * configure.tgt (m88*-*-openbsd*): Remove.
11230 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11231
11232 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
11233
11234 * configure.tgt (x86_tobjs): New variable.
11235 (amd64_tobjs, i386_tobjs): Use it.
11236
11237 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11238
11239 * symtab.c (print_symbol_info): Precede the symbol definition by
11240 the line number when available.
11241 * NEWS: Advertise this enhancement.
11242
11243 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11244
11245 * NEWS (New options): announce set/show record btrace cpu.
11246 * btrace.c: Include record-btrace.h.
11247 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11248 the vendor is unknown.
11249 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
11250 Maybe overwrite the btrace configuration's cpu.
11251 (btrace_compute_ftrace): Add cpu parameter. Update callers.
11252 (btrace_fetch): Add cpu parameter. Update callers.
11253 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11254 Maybe overwrite the btrace configuration's cpu. Skip enabling
11255 errata workarounds if the vendor is unknown.
11256 * python/py-record-btrace.c: Include record-btrace.h.
11257 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11258 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11259 * record-btrace.c (record_btrace_cpu_state_kind): New.
11260 (record_btrace_cpu): New.
11261 (set_record_btrace_cpu_cmdlist): New.
11262 (record_btrace_get_cpu): New.
11263 (require_btrace_thread, record_btrace_info)
11264 (record_btrace_resume_thread): Call record_btrace_get_cpu.
11265 (cmd_set_record_btrace_cpu_none): New.
11266 (cmd_set_record_btrace_cpu_auto): New.
11267 (cmd_set_record_btrace_cpu): New.
11268 (cmd_show_record_btrace_cpu): New.
11269 (_initialize_record_btrace): Initialize set/show record btrace cpu
11270 commands.
11271 * record-btrace.h (record_btrace_get_cpu): New.
11272
11273 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11274
11275 * record.c (set_record_command): Fix typo in message.
11276
11277 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11278
11279 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11280
11281 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11282
11283 * infrun.c (process_event_stop_test): Call
11284 gdbarch_in_indirect_branch_thunk.
11285 * gdbarch.sh (in_indirect_branch_thunk): New.
11286 * gdbarch.c: Regenerated.
11287 * gdbarch.h: Regenerated.
11288 * x86-tdep.h: New.
11289 * x86-tdep.c: New.
11290 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11291 (HFILES_NO_SRCDIR): Add x86-tdep.h.
11292 (ALLDEPFILES): Add x86-tdep.c.
11293 * arch-utils.h (default_in_indirect_branch_thunk): New.
11294 * arch-utils.c (default_in_indirect_branch_thunk): New.
11295 * i386-tdep: Include x86-tdep.h.
11296 (i386_in_indirect_branch_thunk): New.
11297 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11298 function.
11299 * amd64-tdep: Include x86-tdep.h.
11300 (amd64_in_indirect_branch_thunk): New.
11301 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11302
11303 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11304
11305 PR gdb/23053
11306 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11307 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11308 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11309 regression.
11310
11311 2018-04-12 Tom Tromey <tom@tromey.com>
11312
11313 * rust-lang.c (rust_print_struct_def): Remove univariant code.
11314 (rust_evaluate_subexp): Likewise.
11315
11316 2018-04-12 Pedro Alves <palves@redhat.com>
11317
11318 * procfs.c (procfs_detach): Make forward declaration's prototype
11319 match definition's protototype.
11320 (proc_get_LDT_entry): Remove stale do_cleanups call.
11321
11322 2018-04-12 Pedro Alves <palves@redhat.com>
11323
11324 * target.h (target_ops::to_has_exited): Delete.
11325 (target_has_exited): Delete.
11326 * target-delegates.c: Regenerate.
11327
11328 2018-04-11 Pedro Alves <palves@redhat.com>
11329
11330 * target.c (fileio_fh_t::t): Add comment.
11331 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11332 (target_fileio_close): Handle a NULL target.
11333 (invalidate_fileio_fh): New.
11334 (target_close): Call it.
11335 * remote.c (remote_hostio_send_command): No longer check whether
11336 remote_desc is open.
11337
11338 2018-04-11 Pedro Alves <palves@redhat.com>
11339
11340 * target.c (fileio_fh_t): Make it a named struct instead of a
11341 typedef.
11342 (fileio_fh_t::is_closed): New method.
11343 (DEF_VEC_O (fileio_fh_t)): Remove.
11344 (fileio_fhandles): Now a std::vector.
11345 (is_closed_fileio_fh): Delete.
11346 (acquire_fileio_fd): Adjust. Rename parameters.
11347 (release_fileio_fd): Adjust.
11348 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11349 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11350 (target_fileio_close): Adjust.
11351
11352 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
11353
11354 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11355 index.
11356
11357 2018-04-10 Pedro Alves <palves@redhat.com>
11358
11359 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11360 (scoped_finish_thread_state): New class.
11361 * infcmd.c (run_command_1): Use it instead of finish_thread_state
11362 cleanup.
11363 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11364 (fetch_inferior_event, normal_stop): Likewise.
11365 * thread.c (finish_thread_state_cleanup): Delete.
11366
11367 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11368 Pedro Alves <palves@redhat.com>
11369
11370 * value.c: Include "selftest.h" and "common/array-view.h".
11371 (struct range) <operator ==>: New.
11372 (test_ranges_contain): New.
11373 (check_ranges_vector): New.
11374 (test_insert_into_bit_range_vector): New.
11375 (_initialize_values): Register selftests.
11376 * common/array-view.h (operator==, operator!=): New.
11377
11378 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11379
11380 * common/gdb_vecs.h (unordered_remove): Add overload that takes
11381 an iterator.
11382 * inline-frame.c: Include <algorithm>.
11383 (struct inline_state): Add constructor.
11384 (inline_state_s): Remove.
11385 (DEF_VEC_O(inline_state_s)): Remove.
11386 (inline_states): Change type to std::vector.
11387 (find_inline_frame_state): Adjust to std::vector.
11388 (allocate_inline_frame_state): Remove.
11389 (clear_inline_frame_state): Adjust to std::vector.
11390 (skip_inline_frames): Adjust to std::vector.
11391
11392 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11393
11394 * tracepoint.h (struct trace_state_variable): Add constructor.
11395 <name>: Change type to std::string.
11396 * tracepoint.c (tsv_s): Remove.
11397 (DEF_VEC_O(tsv_s)): Remove.
11398 (tvariables): Change to std::vector.
11399 (create_trace_state_variable): Adjust to std::vector.
11400 (find_trace_state_variable): Likewise.
11401 (find_trace_state_variable_by_number): Likewise.
11402 (delete_trace_state_variable): Likewise.
11403 (trace_variable_command): Adjust to std::string.
11404 (delete_trace_variable_command): Likewise.
11405 (tvariables_info_1): Adjust to std::vector.
11406 (save_trace_state_variables): Likewise.
11407 (start_tracing): Likewise.
11408 (merge_uploaded_trace_state_variables): Adjust to std::vector
11409 and std::string.
11410 * target.h (struct target_ops)
11411 <to_download_trace_state_variable>: Pass reference to
11412 trace_state_variable.
11413 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11414 * target-delegates.c: Re-generate.
11415 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11416 (mi_tsv_deleted): Likewise.
11417 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11418 * remote.c (remote_download_trace_state_variable): Change
11419 pointer to reference and adjust.
11420 * make-target-delegates (parse_argtypes): Handle references.
11421 (write_function_header): Likewise.
11422 (munge_type): Likewise.
11423
11424 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11425
11426 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11427 string_view-selftests.c.
11428 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11429 testsuite.
11430 * unittests/basic_string_view/cons/char/1.cc: Likewise.
11431 * unittests/basic_string_view/cons/char/2.cc: Likewise.
11432 * unittests/basic_string_view/cons/char/3.cc: Likewise.
11433 * unittests/basic_string_view/element_access/char/1.cc:
11434 Likewise.
11435 * unittests/basic_string_view/element_access/char/empty.cc:
11436 Likewise.
11437 * unittests/basic_string_view/element_access/char/front_back.cc:
11438 Likewise.
11439 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11440 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11441 Likewise.
11442 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11443 Likewise.
11444 * unittests/basic_string_view/modifiers/swap/char/1.cc:
11445 Likewise.
11446 * unittests/basic_string_view/operations/compare/char/1.cc:
11447 Likewise.
11448 * unittests/basic_string_view/operations/compare/char/13650.cc:
11449 Likewise.
11450 * unittests/basic_string_view/operations/copy/char/1.cc:
11451 Likewise.
11452 * unittests/basic_string_view/operations/data/char/1.cc:
11453 Likewise.
11454 * unittests/basic_string_view/operations/find/char/1.cc:
11455 Likewise.
11456 * unittests/basic_string_view/operations/find/char/2.cc:
11457 Likewise.
11458 * unittests/basic_string_view/operations/find/char/3.cc:
11459 Likewise.
11460 * unittests/basic_string_view/operations/find/char/4.cc:
11461 Likewise.
11462 * unittests/basic_string_view/operations/rfind/char/1.cc:
11463 Likewise.
11464 * unittests/basic_string_view/operations/rfind/char/2.cc:
11465 Likewise.
11466 * unittests/basic_string_view/operations/rfind/char/3.cc:
11467 Likewise.
11468 * unittests/basic_string_view/operations/substr/char/1.cc:
11469 Likewise.
11470 * unittests/basic_string_view/operators/char/2.cc: Likewise.
11471 * unittests/string_view-selftests.c: New file.
11472
11473 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11474
11475 * unittests/basic_string_view/capacity/1.cc: New file.
11476 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11477 * unittests/basic_string_view/cons/char/1.cc: New file.
11478 * unittests/basic_string_view/cons/char/2.cc: New file.
11479 * unittests/basic_string_view/cons/char/3.cc: New file.
11480 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11481 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11482 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11483 * unittests/basic_string_view/element_access/char/1.cc: New file.
11484 * unittests/basic_string_view/element_access/char/2.cc: New file.
11485 * unittests/basic_string_view/element_access/char/empty.cc: New file.
11486 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11487 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11488 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11489 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11490 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11491 * unittests/basic_string_view/include.cc: New file.
11492 * unittests/basic_string_view/inserters/char/1.cc: New file.
11493 * unittests/basic_string_view/inserters/char/2.cc: New file.
11494 * unittests/basic_string_view/inserters/char/3.cc: New file.
11495 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11496 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11497 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11498 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11499 * unittests/basic_string_view/literals/types.cc: New file.
11500 * unittests/basic_string_view/literals/values.cc: New file.
11501 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11502 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11503 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11504 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11505 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11506 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11507 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11508 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11509 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11510 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11511 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11512 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11513 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11514 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11515 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11516 * unittests/basic_string_view/operations/data/char/1.cc: New file.
11517 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11518 * unittests/basic_string_view/operations/find/char/1.cc: New file.
11519 * unittests/basic_string_view/operations/find/char/2.cc: New file.
11520 * unittests/basic_string_view/operations/find/char/3.cc: New file.
11521 * unittests/basic_string_view/operations/find/char/4.cc: New file.
11522 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11523 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11524 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11525 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11526 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11527 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11528 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11529 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11530 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11531 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11532 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11533 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11534 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11535 * unittests/basic_string_view/operators/char/2.cc: New file.
11536 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11537 * unittests/basic_string_view/range_access/char/1.cc: New file.
11538 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11539 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11540 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11541 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11542 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11543 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11544 * unittests/basic_string_view/requirements/typedefs.cc: New file.
11545 * unittests/basic_string_view/typedefs.cc: New file.
11546 * unittests/basic_string_view/types/1.cc: New file.
11547
11548 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11549
11550 * common/gdb_string_view.h: Remove libstdc++ implementation
11551 details, adjust to gdb reality.
11552 * common/gdb_string_view.tcc: Likewise.
11553 * cli/cli-script.c (struct string_view): Remove.
11554 (user_args) <m_args>: Change element type to gdb::string_view.
11555 (user_args::insert_args): Adjust.
11556
11557 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11558
11559 * common/gdb_string_view.h: New file.
11560 * common/gdb_string_view.tcc: New file.
11561
11562 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11563
11564 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11565 * configure: Re-generate.
11566
11567 2018-04-09 Pedro Alves <palves@redhat.com>
11568
11569 * gdbarch.sh: Include "observable.h" instead of "observer.h".
11570 (set_target_gdbarch): Call
11571 gdb::observers::architecture_changed.notify instead of
11572 observer_notify_architecture_changed.
11573
11574 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11575
11576 * tracepoint.c (struct current_traceframe_cleanup): Remove.
11577 (do_restore_current_traceframe_cleanup): Remove.
11578 (restore_current_traceframe_cleanup_dtor): Remove.
11579 (make_cleanup_restore_current_traceframe): Remove.
11580 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11581 New.
11582 * tracepoint.h (struct scoped_restore_current_traceframe): New.
11583 * infrun.c (fetch_inferior_event): Use
11584 scoped_restore_current_traceframe.
11585
11586 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11587
11588 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11589 Remove.
11590 <n_allocated_type_units>: Remove.
11591 <all_type_units>: Change to std::vector.
11592 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11593 to std::vector change.
11594 (dwarf2_per_objfile::get_cutu): Likewise.
11595 (dwarf2_per_objfile::get_tu): Likewise.
11596 (create_signatured_type_table_from_index): Likewise.
11597 (create_signatured_type_table_from_debug_names): Likewise.
11598 (dw2_symtab_iter_next): Likewise.
11599 (dw2_print_stats): Likewise.
11600 (dw2_expand_all_symtabs): Likewise.
11601 (dw2_expand_marked_cus): Likewise.
11602 (dw2_debug_names_iterator::next): Likewise.
11603 (dwarf2_initialize_objfile): Likewise.
11604 (add_signatured_type_cu_to_table): Likewise.
11605 (create_all_type_units): Likewise.
11606 (add_type_unit): Likewise.
11607 (struct tu_abbrev_offset): Add constructor.
11608 (build_type_psymtabs_1): Adjust to std::vector change.
11609 (print_tu_stats): Likewise.
11610 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11611 (write_debug_names): Likewise.
11612
11613 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11614
11615 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11616 Make an std::vector.
11617 <n_comp_units>: Remove.
11618 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11619 to std::vector change.
11620 (dwarf2_per_objfile::get_cutu): Likewise.
11621 (dwarf2_per_objfile::get_cu): Likewise.
11622 (create_cus_from_index): Likewise.
11623 (create_addrmap_from_index): Likewise.
11624 (create_addrmap_from_aranges): Likewise.
11625 (dwarf2_read_index): Likewise.
11626 (dw2_find_last_source_symtab): Likewise.
11627 (dw2_map_symtabs_matching_filename): Likewise.
11628 (dw2_symtab_iter_next): Likewise.
11629 (dw2_print_stats): Likewise.
11630 (dw2_expand_all_symtabs): Likewise.
11631 (dw2_expand_symtabs_with_fullname): Likewise.
11632 (dw2_expand_marked_cus): Likewise.
11633 (dw2_map_symbol_filenames): Likewise.
11634 (create_cus_from_debug_names): Likewise.
11635 (dwarf2_read_debug_names): Likewise.
11636 (dw2_debug_names_iterator::next): Likewise.
11637 (dwarf2_initialize_objfile): Likewise.
11638 (set_partial_user): Likewise.
11639 (dwarf2_build_psymtabs_hard): Likewise.
11640 (read_comp_units_from_section): Remove arguments, adjust to
11641 std::vector change.
11642 (create_all_comp_units): Adjust to std::vector and
11643 read_comp_units_from_section changes.
11644 (dwarf2_find_containing_comp_unit): Adjust to std::vector
11645 change.
11646 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11647 (psyms_seen_size): Likewise.
11648 (write_gdbindex): Likewise.
11649 (write_debug_names): Likewise.
11650
11651 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11652
11653 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11654 with dwarf2_per_objfile.
11655 (create_cus_from_index): Likewise.
11656 (create_signatured_type_table_from_index): Likewise.
11657 (dwarf2_read_index): Likewise.
11658 (dwarf2_initialize_objfile): Likewise.
11659 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
11660 per_cu rather than get_dwarf2_per_objfile.
11661
11662 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11663
11664 * dwarf2read.h (struct signatured_type): Forward declare.
11665 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11666 New methods.
11667 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11668 (dw2_get_cutu): ...this.
11669 (dwarf2_per_objfile::get_cu): Rename from...
11670 (dw2_get_cu): ...this.
11671 (dwarf2_per_objfile::get_tu): New.
11672 (create_addrmap_from_index): Adjust.
11673 (create_addrmap_from_aranges): Adjust.
11674 (dw2_find_last_source_symtab): Adjust.
11675 (dw2_map_symtabs_matching_filename): Adjust.
11676 (dw2_symtab_iter_next): Adjust.
11677 (dw2_print_stats): Adjust.
11678 (dw2_expand_all_symtabs): Adjust.
11679 (dw2_expand_symtabs_with_fullname): Adjust.
11680 (dw2_expand_marked_cus): Adjust.
11681 (dw_expand_symtabs_matching_file_matcher): Adjust.
11682 (dw2_map_symbol_filenames): Adjust.
11683 (dw2_debug_names_iterator::next): Adjust.
11684 (dwarf2_initialize_objfile): Adjust.
11685 (set_partial_user): Adjust.
11686 (dwarf2_build_psymtabs_hard): Adjust.
11687
11688 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11689
11690 * dwarf2read.c (create_signatured_type_table_from_debug_names):
11691 Remove unused variables.
11692 (dw2_map_symtabs_matching_filename): Likewise.
11693 (dwarf2_record_block_ranges): Likewise.
11694 (dwarf2_read_addr_index): Likewise.
11695 (follow_die_offset): Likewise.
11696
11697 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11698
11699 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11700 to symbol_file_add_main.
11701
11702 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11703
11704 PR mi/22299
11705 * mi/mi-console.c (do_fputc_async_safe): New.
11706 (mi_console_file::write_async_safe): New.
11707 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11708 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11709 New.
11710 * ui-file.c (ui_file::putstrn): Adjust call to
11711 fputstrn_unfiltered.
11712 * utils.c (printchar): Replace do_fputs and do_fprintf
11713 parameters by do_fputc.
11714 (fputstr_filtered): Adjust call to printchar.
11715 (fputstr_unfiltered): Likewise.
11716 (fputstrn_filtered): Likewise.
11717 (fputstrn_unfiltered): Add do_fputc parameter, pass to
11718 printchar.
11719 * utils.h (do_fputc_ftype): New typedef.
11720 (fputstrn_unfiltered): Add do_fputc parameter.
11721
11722 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11723
11724 * regformats/i386/i386-avx.dat: Remove.
11725
11726 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11727
11728 PR gdb/22979
11729 * amd64-tdep.c (amd64_none_init_abi): New function.
11730 (amd64_x32_none_init_abi): New function.
11731 (_initialize_amd64_tdep): Register handlers for x86-64 and
11732 x64_32 with GDB_OSABI_NONE.
11733 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11734 GDB_OSABI_NONE osabi.
11735
11736 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11737
11738 PR gdb/22980
11739 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11740 GDB_OSABI_NONE.
11741 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11742 * osabi.c (gdb_osabi_names): Add "unknown" entry.
11743
11744 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11745
11746 * common/byte-vector.h (char_vector): New type.
11747 * target.h (target_read_alloc): Return
11748 gdb::optional<byte_vector>.
11749 (target_read_stralloc): Return gdb::optional<char_vector>.
11750 (target_get_osdata): Return gdb::optional<char_vector>.
11751 * target.c (target_read_alloc_1): Templatize. Replacement
11752 manual memory management with vector.
11753 (target_read_alloc): Change return type, adjust.
11754 (target_read_stralloc): Change return type, adjust.
11755 (target_get_osdata): Change return type, adjust.
11756 * auxv.c (struct auxv_info) <length>: Remove.
11757 <data>: Change type to gdb::optional<byte_vector>.
11758 (auxv_inferior_data_cleanup): Free auxv_info with delete.
11759 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11760 (target_auxv_search): Adjust.
11761 (fprint_target_auxv): Adjust.
11762 * avr-tdep.c (avr_io_reg_read_command): Adjust.
11763 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11764 (linux_make_corefile_notes): Adjust.
11765 * osdata.c (get_osdata): Adjust.
11766 * remote.c (remote_get_threads_with_qxfer): Adjust.
11767 (remote_memory_map): Adjust.
11768 (remote_traceframe_info): Adjust.
11769 (btrace_read_config): Adjust.
11770 (remote_read_btrace): Adjust.
11771 (remote_pid_to_exec_file): Adjust.
11772 * solib-aix.c (solib_aix_get_library_list): Adjust.
11773 * solib-dsbt.c (decode_loadmap): Don't free buf.
11774 (dsbt_get_initial_loadmaps): Adjust.
11775 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11776 * solib-target.c (solib_target_current_sos): Adjust.
11777 * tracepoint.c (sdata_make_value): Adjust.
11778 * xml-support.c (xinclude_start_include): Adjust.
11779 (xml_fetch_content_from_file): Adjust.
11780 * xml-support.h (xml_fetch_another): Change return type.
11781 (xml_fetch_content_from_file): Change return type.
11782 * xml-syscall.c (xml_init_syscalls_info): Adjust.
11783 * xml-tdesc.c (file_read_description_xml): Adjust.
11784 (fetch_available_features_from_target): Change return type.
11785 (target_fetch_description_xml): Adjust.
11786 (target_read_description_xml): Adjust.
11787
11788 2018-04-06 Tom Tromey <tom@tromey.com>
11789
11790 * value.c (~value): Update.
11791 (struct value) <contents>: Now unique_xmalloc_ptr.
11792 (value_contents_bits_eq, allocate_value_contents)
11793 (value_contents_raw, value_contents_all_raw)
11794 (value_contents_for_printing, value_contents_for_printing_const)
11795 (set_value_enclosing_type): Update.
11796
11797 2018-04-06 Tom Tromey <tom@tromey.com>
11798
11799 * value.c (range_s): Remove typedef, VEC.
11800 (struct range): Add operator<.
11801 (range_lessthan): Remove.
11802 (ranges_contain): Change type.
11803 (~value): Update.
11804 (struct value) <unavailable, optimized_out>: Now std::vector.
11805 (value_entirely_available)
11806 (value_entirely_covered_by_range_vector)
11807 (value_entirely_unavailable, value_entirely_optimized_out):
11808 Update.
11809 (insert_into_bit_range_vector): Change argument type.
11810 (find_first_range_overlap): Likewise.
11811 (struct ranges_and_idx, value_contents_bits_eq)
11812 (require_not_optimized_out, require_available): Update.
11813 (ranges_copy_adjusted): Change argument types.
11814 (value_optimized_out, value_copy, value_fetch_lazy): Update.
11815
11816 2018-04-06 Tom Tromey <tom@tromey.com>
11817
11818 * value.c (~value): Update.
11819 (struct value) <parent>: Now a value_ref_ptr.
11820 (value_parent, set_value_parent, value_address, value_copy):
11821 Update.
11822
11823 2018-04-06 Tom Tromey <tom@tromey.com>
11824
11825 * value.c (struct value): Add constructor, destructor, and member
11826 initializers.
11827 (allocate_value_lazy, value_decref): Update.
11828
11829 2018-04-06 Tom Tromey <tom@tromey.com>
11830
11831 * value.c (struct value) <released, next>: Remove.
11832 (all_values): Now a std::vector.
11833 (allocate_value_lazy): Update.
11834 (value_next): Remove.
11835 (value_mark, value_free_to_mark, release_value)
11836 (value_release_to_mark): Update.
11837
11838 2018-04-06 Tom Tromey <tom@tromey.com>
11839
11840 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11841 (free_value_chain): Remove.
11842 * value.c (free_value_chain): Remove.
11843 (value_release_to_mark): Return a std::vector.
11844 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11845 std::vector.
11846 (check_condition): Update.
11847 * eval.c (fetch_subexp_value): Change "val_chain" to a
11848 std::vector.
11849 * breakpoint.c (update_watchpoint): Update.
11850 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11851
11852 2018-04-06 Tom Tromey <tom@tromey.com>
11853
11854 * value.h (free_all_values): Remove.
11855 * value.c (free_all_values): Remove.
11856
11857 2018-04-06 Tom Tromey <tom@tromey.com>
11858
11859 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11860 (value_history_chain, value_history_count): Remove.
11861 (value_history): New global.
11862 (record_latest_value, access_value_history, show_values)
11863 (preserve_values): Update.
11864
11865 2018-04-06 Tom Tromey <tom@tromey.com>
11866
11867 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11868 * varobj.c (varobj_set_display_format, varobj_set_value)
11869 (install_default_visualizer, construct_visualizer)
11870 (install_new_value, ~varobj, varobj_get_value_type)
11871 (my_value_of_variable, varobj_editable_p): Update.
11872 * c-varobj.c (c_describe_child, c_value_of_variable)
11873 (cplus_number_of_children, cplus_describe_child): Update.
11874 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11875 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11876 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11877
11878 2018-04-06 Tom Tromey <tom@tromey.com>
11879
11880 * printcmd.c (last_examine_address): Change type to
11881 value_ref_ptr.
11882 (do_examine, x_command): Update.
11883
11884 2018-04-06 Tom Tromey <tom@tromey.com>
11885
11886 * value.c (release_value): Update.
11887 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11888 (struct bpstats) <val>: Now a value_ref_ptr.
11889 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11890 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11891 (~watchpoint, print_it_watchpoint, watch_command_1)
11892 (invalidate_bp_value_on_memory_change): Update.
11893
11894 2018-04-06 Tom Tromey <tom@tromey.com>
11895
11896 * varobj.c (varobj_clear_saved_item)
11897 (update_dynamic_varobj_children, install_new_value, ~varobj):
11898 Update.
11899 * value.h (value_incref): Move declaration earlier.
11900 (value_decref): Rename from value_free.
11901 (struct value_ref_policy): New.
11902 (value_ref_ptr): New typedef.
11903 (struct value_deleter): Remove.
11904 (gdb_value_up): Remove typedef.
11905 (release_value): Change return type.
11906 (release_value_or_incref): Remove.
11907 * value.c (set_value_parent): Update.
11908 (value_incref): Change return type.
11909 (value_decref): Rename from value_free.
11910 (value_free_to_mark, free_all_values, free_value_chain): Update.
11911 (release_value): Return value_ref_ptr.
11912 (release_value_or_incref): Remove.
11913 (record_latest_value, set_internalvar, clear_internalvar):
11914 Update.
11915 * stack.c (info_frame_command): Don't call value_free.
11916 * python/py-value.c (valpy_dealloc, valpy_new)
11917 (value_to_value_object): Update.
11918 * printcmd.c (do_examine): Update.
11919 * opencl-lang.c (lval_func_free_closure): Update.
11920 * mi/mi-main.c (register_changed_p): Don't call value_free.
11921 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11922 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11923 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11924 value_free.
11925 * guile/scm-value.c (vlscm_free_value_smob)
11926 (vlscm_scm_from_value): Update.
11927 * frame.c (frame_register_unwind, frame_unwind_register_signed)
11928 (frame_unwind_register_unsigned, get_frame_register_bytes)
11929 (put_frame_register_bytes): Don't call value_free.
11930 * findvar.c (address_from_register): Don't call value_free.
11931 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11932 * dwarf2loc.c (entry_data_value_free_closure)
11933 (value_of_dwarf_reg_entry, free_pieced_value_closure)
11934 (dwarf2_evaluate_loc_desc_full): Update.
11935 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11936 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11937 (~watchpoint, watch_command_1)
11938 (invalidate_bp_value_on_memory_change): Update.
11939 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11940
11941 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
11942
11943 PR gdb/23022
11944 * warning.m4: Add -Wno-error=deprecated-register.
11945 * configure: Re-generate.
11946
11947 2018-04-05 Tom Tromey <tom@tromey.com>
11948
11949 * linespec.h: Remove include of "vec.h".
11950
11951 2018-04-05 Tom Tromey <tom@tromey.com>
11952
11953 * linespec.c (typep): Remove typedef.
11954 (find_methods, find_superclass_methods): Take a std::vector.
11955 (find_method): Use std::vector.
11956
11957 2018-04-05 Tom Tromey <tom@tromey.com>
11958
11959 * utils.c (compare_strings): Remove.
11960 * utils.h (compare_strings): Remove.
11961 * objc-lang.h (find_imps): Update.
11962 * objc-lang.c (find_methods): Take a std::vector.
11963 (uniquify_strings, find_imps): Likewise.
11964 * linespec.c (find_methods): Take a std::vector.
11965 (decode_objc): Use std::vector.
11966 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11967 a std::vector.
11968 (find_method, find_function_symbols): Use std::vector.
11969
11970 2018-04-05 Tom Tromey <tom@tromey.com>
11971
11972 * completer.c (completion_tracker::completion_tracker): Remove
11973 cast.
11974 (completion_tracker::discard_completions): Likewise.
11975 * breakpoint.c (ambiguous_names_p): Remove cast.
11976 * ada-lang.c (_initialize_ada_language): Remove cast.
11977 * utils.h (streq): Update.
11978 (streq_hash): Add new declaration.
11979 * utils.c (streq): Return bool.
11980 (streq_hash): New function.
11981
11982 2018-04-05 Tom Tromey <tom@tromey.com>
11983
11984 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11985 Remove a string copy.
11986
11987 2018-04-05 Tom Tromey <tom@tromey.com>
11988
11989 * linespec.c (filter_results): Use std::vector.
11990 (decode_line_2, decode_line_full): Update.
11991
11992 2018-04-05 Tom Tromey <tom@tromey.com>
11993
11994 * linespec.c (canonical_to_fullform): Return std::string.
11995 (filter_results): Update.
11996 (struct decode_line_2_item): Add constructor.
11997 <fullform, displayform>: Now std::string.
11998 (decode_line_2_compare_items): Now a std::sort comparator.
11999 (decode_line_2): Update.
12000
12001 2018-04-05 Tom Tromey <tom@tromey.com>
12002
12003 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12004 (unexpected_linespec_error): Update.
12005 (linespec_parse_basic, parse_linespec): Update.
12006
12007 2018-04-05 Tom Tromey <tom@tromey.com>
12008
12009 * linespec.c (linespec_parse_basic): Reindent.
12010
12011 2018-04-05 Tom Tromey <tom@tromey.com>
12012
12013 * minsyms.h (iterate_over_minimal_symbols): Update.
12014 * minsyms.c (iterate_over_minimal_symbols): Take a
12015 gdb::function_view.
12016 * linespec.c (struct collect_minsyms): Remove.
12017 (compare_msyms): Now a std::sort comparator.
12018 (add_minsym): Add parameters.
12019 (search_minsyms_for_name): Update. Use std::vector.
12020
12021 2018-04-03 Tom Tromey <tom@tromey.com>
12022
12023 * mipsread.c (read_alphacoff_dynamic_symtab): Use
12024 gdb::byte_vector.
12025
12026 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
12027
12028 * MAINTAINERS (Write After Approval): Add Weimin Pan.
12029
12030 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
12031
12032 PR gdb/16959
12033 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
12034 printing static type.
12035
12036 2018-04-01 Tom Tromey <tom@tromey.com>
12037
12038 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12039 (rs6000_xfer_shared_libraries): Update.
12040
12041 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
12042
12043 * common/gdb_vecs.h (char_ptr): Remove.
12044 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12045
12046 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
12047
12048 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12049 with std::vector.
12050 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12051
12052 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
12053
12054 * tracepoint.h (struct uploaded_tp): Initialize fields.
12055 <actions, step_actions, cmd_strings>: Change type to
12056 std::vector<char *>.
12057 * tracepoint.c (get_uploaded_tp): Allocate with new.
12058 (free_uploaded_tps): Free with delete.
12059 (parse_tracepoint_definition): Adjust to std::vector change.
12060 * breakpoint.c (read_uploaded_action): Likewise.
12061 (create_tracepoint_from_upload): Likewise.
12062 * ctf.c (ctf_write_uploaded_tp): Likewise.
12063 (SET_ARRAY_FIELD): Likewise.
12064 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12065
12066 2018-03-30 Tom Tromey <tom@tromey.com>
12067
12068 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
12069 std::unique_ptr.
12070 (svr4_keep_data_in_core): Update.
12071 (svr4_read_so_list): Update.
12072
12073 2018-03-30 Tom Tromey <tom@tromey.com>
12074
12075 * windows-nat.c (handle_output_debug_string, handle_exception):
12076 Update.
12077 * target.h (target_read_string): Update.
12078 * target.c (target_read_string): Change "string" to
12079 unique_xmalloc_ptr.
12080 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12081 Update.
12082 * solib-frv.c (frv_current_sos): Update.
12083 * solib-dsbt.c (dsbt_current_sos): Update.
12084 * solib-darwin.c (darwin_current_sos): Update.
12085 * linux-thread-db.c (inferior_has_bug): Update.
12086 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12087 Update. Remove alloca.
12088 * ada-lang.c (ada_main_name): Update.
12089
12090 2018-03-30 Tom Tromey <tom@tromey.com>
12091
12092 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12093 (struct dwo_file_deleter): New.
12094 (dwo_file_up): New typedef.
12095 (open_and_init_dwo_file): Use dwo_file_up.
12096 (free_dwo_file_cleanup): Remove.
12097
12098 2018-03-30 Tom Tromey <tom@tromey.com>
12099
12100 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12101 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12102
12103 2018-03-30 Tom Tromey <tom@tromey.com>
12104
12105 * dwarf2read.c (class free_cached_comp_units): New class.
12106 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12107 (free_cached_comp_units): Remove function.
12108
12109 2018-03-30 Tom Tromey <tom@tromey.com>
12110
12111 * utils.h (make_cleanup_unpush_target): Remove.
12112 * inf-ptrace.c (struct target_unpusher): New.
12113 (target_unpush_up) New typedef.
12114 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12115 target_unpush_up.
12116 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12117
12118 2018-03-27 Tom Tromey <tom@tromey.com>
12119
12120 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12121
12122 2018-03-27 Pedro Alves <palves@redhat.com>
12123 Tom Tromey <tom@tromey.com>
12124
12125 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12126 destructor. Now a class.
12127 (gdb_readline_wrapper_cleanup): Remove function.
12128 (gdb_readline_wrapper): Remove cleanups.
12129
12130 2018-03-27 Tom Tromey <tom@tromey.com>
12131
12132 * typeprint.h (struct type_print_options) <local_typedefs,
12133 global_typedefs>: Remove "struct" keyword.
12134 (class typedef_hash_table): New class.
12135 (recursively_update_typedef_hash, add_template_parameters)
12136 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12137 (find_typedef_in_hash): Don't declare.
12138 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12139 (typedef_hash_table::recursively_update): Rename from
12140 recursively_update_typedef_hash. Now a member.
12141 (typedef_hash_table::add_template_parameters): Rename from
12142 add_template_parameters. Now a member.
12143 (typedef_hash_table::typedef_hash_table): Now a constructor;
12144 rename from create_typedef_hash.
12145 (typedef_hash_table::~typedef_hash_table): Now a destructor;
12146 rename from free_typedef_hash.
12147 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12148 (do_free_global_table): Remove.
12149 (typedef_hash_table::typedef_hash_table): New constructor; renamed
12150 from copy_type_recursive.
12151 (create_global_typedef_table): Remove.
12152 (typedef_hash_table::find_global_typedef): Now a member of
12153 typedef_hash_table.
12154 (typedef_hash_table::find_typedef): Rename from
12155 find_typedef_in_hash; now a member.
12156 (whatis_exp): Update.
12157 * extension.h (struct ext_lang_type_printers): Add constructor and
12158 destructor.
12159 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12160 declare.
12161 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12162 Now a constructor; rename from start_ext_lang_type_printers.
12163 (ext_lang_type_printers): Now a destructor; rename from
12164 free_ext_lang_type_printers.
12165 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12166 Update.
12167 (c_type_print_base_struct_union): Update. Remove cleanups.
12168
12169 2018-03-27 Tom Tromey <tom@tromey.com>
12170
12171 * dwarf-index-write.c: Include <cmath>.
12172
12173 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12174
12175 * NEWS: Add entry describing new "set|show varsize-limit" command.
12176 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12177 command.
12178 * printcmd.c (_initialize_printcmd): Add "set var" alias of
12179 "set variable".
12180
12181 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
12182
12183 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12184 dwarf-index-write.c
12185 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12186 * dwarf-index-common.c: New file.
12187 * dwarf-index-common.h: New file.
12188 * dwarf-index-write.c: New file.
12189 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12190 (struct dwarf2_section_info): Move from here.
12191 (dwarf2_section_info_def): Likewise.
12192 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12193 (offset_type): Likewise.
12194 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12195 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12196 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12197 (byte_swap): Likewise.
12198 (MAYBE_SWAP): Likewise.
12199 (dwarf2_per_cu_ptr): Likewise.
12200 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12201 (struct tu_stats): Likewise.
12202 (struct dwarf2_per_objfile): Likewise.
12203 (struct dwarf2_per_cu_data): Likewise.
12204 (struct signatured_type): Likewise.
12205 (sig_type_ptr): Likewise.
12206 (DEF_VEC_P (sig_type_ptr)): Likewise.
12207 (INDEX4_SUFFIX): Likewise.
12208 (INDEX5_SUFFIX): Likewise.
12209 (DEBUG_STR_SUFFIX): Likewise.
12210 (dwarf2_read_section): Make non-static.
12211 (mapped_index_string_hash): Move from here.
12212 (dwarf5_djb_hash): Likewise.
12213 (file_write): Likewise.
12214 (class data_buf): Likewise.
12215 (struct symtab_index_entry): Likewise.
12216 (struct mapped_symtab): Likewise.
12217 (find_slot): Likewise.
12218 (hash_expand): Likewise.
12219 (add_index_entry): Likewise.
12220 (uniquify_cu_indices): Likewise.
12221 (class c_str_view): Likewise.
12222 (class c_str_view_hasher): Likewise.
12223 (class vector_hasher): Likewise.
12224 (write_hash_table): Likewise.
12225 (psym_index_map): Likewise.
12226 (struct addrmap_index_data): Likewise.
12227 (add_address_entry): Likewise.
12228 (add_address_entry_worker): Likewise.
12229 (write_address_map): Likewise.
12230 (symbol_kind): Likewise.
12231 (write_psymbols): Likewise.
12232 (struct signatured_type_index_data): Likewise.
12233 (write_one_signatured_type): Likewise.
12234 (recursively_count_psymbols): Likewise.
12235 (recursively_write_psymbols): Likewise.
12236 (class debug_names): Likewise.
12237 (check_dwarf64_offsets): Likewise.
12238 (psyms_seen_size): Likewise.
12239 (write_gdbindex): Likewise.
12240 (write_debug_names): Likewise.
12241 (assert_file_size): Likewise.
12242 (write_psymtabs_to_index): Likewise.
12243 (save_gdb_index_command): Likewise.
12244 (_initialize_dwarf2_read): Don't register the "save gdb-index"
12245 command.
12246 * dwarf2read.h: New file.
12247
12248 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12249
12250 PR gdb/22670
12251 * dwarf2read.c (dwarf2_physname): Do not return the demangled
12252 symbol name if the CU's language stores symbol names in linkage
12253 format.
12254 * language.h (struct language_defn)
12255 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
12256 all instances of this struct.
12257
12258 2018-03-26 Tom Tromey <tom@tromey.com>
12259
12260 * stack.c (backtrace_command_1): Remove verbose code.
12261
12262 2018-03-26 Tom Tromey <tom@tromey.com>
12263
12264 * python/py-framefilter.c (py_print_type): Don't catch
12265 exceptions. Return void.
12266 (py_print_value): Likewise.
12267 (py_print_single_arg): Likewise.
12268 (enumerate_args): Don't catch exceptions.
12269 (py_print_args): Likewise.
12270 (py_print_frame): Likewise.
12271 (gdbpy_apply_frame_filter): Catch exceptions here.
12272
12273 2018-03-26 Tom Tromey <tom@tromey.com>
12274
12275 * stack.c (_initialize_stack): Remove trailing newlines from help
12276 text. Add "Usage" line to "backtrace" help.
12277
12278 2018-03-26 Tom Tromey <tom@tromey.com>
12279
12280 PR python/16486:
12281 * python/py-framefilter.c (py_print_args): Call wrap_hint.
12282
12283 2018-03-26 Tom Tromey <tom@tromey.com>
12284
12285 * python/py-framefilter.c (py_print_single_arg): Return
12286 EXT_LANG_BT_ERROR from catch.
12287
12288 2018-03-26 Tom Tromey <tom@tromey.com>
12289
12290 PR backtrace/15584:
12291 * stack.c (backtrace_command_1): Move some code into no-filters
12292 "if".
12293
12294 2018-03-26 Tom Tromey <tom@tromey.com>
12295
12296 * python/py-framefilter.c (throw_quit_or_print_exception): New
12297 function.
12298 (gdbpy_apply_frame_filter): Use it.
12299
12300 2018-03-26 Tom Tromey <tom@tromey.com>
12301
12302 PR cli/17716:
12303 * python/py-framefilter.c (py_print_type, py_print_value)
12304 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12305 RETURN_MASK_ERROR.
12306
12307 2018-03-26 Tom Tromey <tom@tromey.com>
12308
12309 * python/py-framefilter.c (enumerate_args): Use
12310 gdb::unique_xmalloc_ptr.
12311
12312 2018-03-26 Tom Tromey <tom@tromey.com>
12313
12314 * python/py-framefilter.c (py_print_frame): Return
12315 EXT_LANG_BT_OK.
12316 (gdbpy_apply_frame_filter): Update comment.
12317 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12318 Remove.
12319 <EXT_LANG_BT_NO_FILTERS>: Change value.
12320
12321 2018-03-26 Tom Tromey <tom@tromey.com>
12322
12323 PR backtrace/15582:
12324 * stack.c (backtrace_command): Parse "hide" argument.
12325 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12326 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12327 constant.
12328
12329 2018-03-26 Tom Tromey <tom@tromey.com>
12330
12331 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12332 add "flags".
12333 (backtrace_command): Remove "fulltrace", add "flags".
12334
12335 2018-03-26 Tom Tromey <tom@tromey.com>
12336
12337 * stack.c (backtrace_command): Rewrite command line parsing.
12338
12339 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12340
12341 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12342
12343 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12344
12345 * filename-seen-cache.h: Add include guard.
12346
12347 2018-03-26 Keith Seitz <keiths@redhat.com>
12348
12349 * symfile.c (place_section): Remove "struct" from section_addr_info
12350 in comment.
12351 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12352 "struct" keyword from section_addr_info.
12353
12354 2018-03-26 Alan Hayward <alan.hayward@arm.com>
12355
12356 * regformats/regdef.h (reg): Add constructors.
12357
12358 2018-03-25 Pedro Alves <palves@redhat.com>
12359
12360 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12361 if then/else bodies in var_func_name extraction.
12362
12363 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
12364
12365 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12366 lookup_minimal_symbol() to find symbol entry.
12367 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12368
12369 2018-03-23 Keith Seitz <keiths@redhat.com>
12370
12371 PR c++/22968
12372 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12373 nested type definitions for C++, too.
12374
12375 2018-03-23 Tom Tromey <tom@tromey.com>
12376
12377 * machoread.c (struct oso_el): Add a constructor. Don't define as
12378 a typedef.
12379 (macho_register_oso): Remove.
12380 (macho_symtab_read): Take a std::vector.
12381 (oso_el_compare_name): Now a std::sort comparator.
12382 (macho_symfile_read_all_oso): Take a std::vector.
12383 (macho_symfile_read): Use std::vector. Remove cleanups.
12384
12385 2018-03-22 Tom Tromey <tom@tromey.com>
12386
12387 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12388 (record_full_goto_bookmark): Use std::string.
12389
12390 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12391
12392 PR tdep/18295
12393 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12394 a single mask.
12395
12396 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12397
12398 * rs6000-tdep.c (store_insn_p): New function.
12399 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12400 and cr_reg to their unshifted values. Use store_insn_p to
12401 match LR saves using either R1 or fdata->alloca_reg. Use
12402 store_insn_p to match CR saves. Set alloca_reg_offset
12403 when alloca_reg and framep are set. Remove lr_reg shift
12404 when assigning to fdata->lr_register.
12405
12406 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
12407
12408 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12409 command line args instead of emitting a warning.
12410
12411 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12412
12413 * tracepoint.h (struct static_tracepoint_marker): Initialize
12414 fields, define default constructor, move constructor and move
12415 assignment, disable the rest.
12416 <str_id, extra>: Make std::string.
12417 (release_static_tracepoint_marker): Remove.
12418 (free_current_marker): Remove.
12419 * tracepoint.c (free_current_marker): Remove.
12420 (parse_static_tracepoint_marker_definition): Adjust to
12421 std::string, use new hex2str overload.
12422 (release_static_tracepoint_marker): Remove.
12423 (print_one_static_tracepoint_marker): Get marker by reference
12424 and adjust to std::string.
12425 (info_static_tracepoint_markers_command): Adjust to std::vector
12426 changes
12427 * target.h (static_tracepoint_marker_p): Remove typedef.
12428 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12429 (struct target_ops) <to_static_tracepoint_marker_at>: Return
12430 bool.
12431 <to_static_tracepoint_markers_by_strid>: Return std::vector.
12432 * target-debug.h
12433 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12434 (target_debug_print_std_vector_static_tracepoint_marker): New.
12435 (target_debug_print_struct_static_tracepoint_marker_p): Rename
12436 to...
12437 (target_debug_print_static_tracepoint_marker_p): ... this.
12438 * target-delegates.c: Re-generate.
12439 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12440 Make std::string.
12441 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12442 (decode_static_tracepoint_spec): Adjust to std::vector.
12443 (tracepoint_print_one_detail): Adjust to std::string.
12444 (strace_marker_decode_location): Adjust to std::string.
12445 (update_static_tracepoint): Adjust to std::string, remove call
12446 to release_static_tracepoint_marker.
12447 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12448 Adjust to std::vector.
12449 * remote.c (remote_static_tracepoint_marker_at): Return bool.
12450 (remote_static_tracepoint_markers_by_strid): Adjust to
12451 std::vector.
12452 * common/rsp-low.h (hex2str): New overload with explicit count
12453 of bytes.
12454 * common/rsp-low.c (hex2str): New overload with explicit count
12455 of bytes.
12456 * unittests/rsp-low-selftests.c (test_hex2str): New function.
12457 (_initialize_rsp_low_selftests): Add test_hex2str test.
12458 * unittests/tracepoint-selftests.c
12459 (test_parse_static_tracepoint_marker_definition): Adjust to
12460 std::string.
12461
12462 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12463
12464 * tracepoint.c (parse_static_tracepoint_marker_definition):
12465 Consider case where the definition is followed by more
12466 definitions.
12467 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12468 tracepoint-selftests.c.
12469 * unittests/tracepoint-selftests.c: New.
12470
12471 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12472
12473 * MAINTAINERS (Write After Approval): Add Pedro Franco de
12474 Carvalho.
12475
12476 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12477
12478 * symtab.c (find_pc_sect_line): fixed indentation.
12479
12480 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12481
12482 * symtab.c (find_pc_sect_line): now uses binary search.
12483
12484 2018-03-19 Tom Tromey <tom@tromey.com>
12485
12486 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12487 "IDENT" production.
12488
12489 2018-03-19 Pedro Alves <palves@redhat.com>
12490 Tom Tromey <tom@tromey.com>
12491
12492 * unittests/observable-selftests.c: New file.
12493 * common/observable.h: New file.
12494 * observable.h: New file.
12495 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12496 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12497 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12498 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12499 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12500 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12501 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12502 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12503 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12504 python/py-breakpoint.c, python/py-finishbreakpoint.c,
12505 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12506 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12507 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12508 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12509 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12510 tui/tui-interp.c, valops.c: Update all users.
12511 * tui/tui-hooks.c (tui_bp_created_observer)
12512 (tui_bp_deleted_observer, tui_bp_modified_observer)
12513 (tui_inferior_exit_observer, tui_before_prompt_observer)
12514 (tui_normal_stop_observer, tui_register_changed_observer):
12515 Remove.
12516 (tui_observers_token): New global.
12517 (attach_or_detach, tui_attach_detach_observers): New functions.
12518 (tui_install_hooks, tui_remove_hooks): Use
12519 tui_attach_detach_observers.
12520 * record-btrace.c (record_btrace_thread_observer): Remove.
12521 (record_btrace_thread_observer_token): New global.
12522 * observer.sh: Remove.
12523 * observer.c: Rename to observable.c.
12524 * observable.c (namespace gdb_observers): Define new objects.
12525 (observer_debug): Move into gdb_observers namespace.
12526 (struct observer, struct observer_list, xalloc_observer_list_node)
12527 (xfree_observer_list_node, generic_observer_attach)
12528 (generic_observer_detach, generic_observer_notify): Remove.
12529 (_initialize_observer): Update.
12530 Don't include observer.inc.
12531 * Makefile.in (generated_files): Remove observer.h, observer.inc.
12532 (clean mostlyclean): Likewise.
12533 (observer.h, observer.inc): Remove targets.
12534 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12535 (COMMON_SFILES): Use observable.c, not observer.c.
12536 * .gitignore: Remove observer.h.
12537
12538 2018-03-18 Tom Tromey <tom@tromey.com>
12539
12540 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12541 gdb::def_vector.
12542 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12543
12544 2018-03-17 Tom Tromey <tom@tromey.com>
12545
12546 * auto-load.c (auto_load_objfile_script_1): Use std::string.
12547
12548 2018-03-17 Tom Tromey <tom@tromey.com>
12549
12550 * target.c (class scoped_target_fd): New.
12551 (target_fileio_close_cleanup): Remove.
12552 (target_fileio_read_alloc_1): Use scoped_target_fd.
12553
12554 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
12555
12556 * silent-rules.mk: New.
12557 * Makefile.in: Include silent-rules.mk
12558 (srcdir, VPATH, top_srcdir): Move up.
12559 (COMPILE): Add ECHO_CXX.
12560 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12561 (init.c): Add ECHO_INIT_C.
12562 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12563 (version.c): Add ECHO_GEN.
12564 (printcmd.o): Add ECHO_CXX.
12565 (target-float.o): Add ECHO_CXX.
12566 (ada-exp.o): Add ECHO_CXX.
12567 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12568 (insight$(EXEEXT)): Add ECHO_CXXLD.
12569 * gnulib/configure.ac: Add AM_SILENT_RULES.
12570 * gnulib/aclocal.m4: Re-generate.
12571 * gnulib/configure: Re-generate.
12572 * gnulib/import/Makefile.in: Re-generate.
12573
12574 2018-03-16 Tom Tromey <tom@tromey.com>
12575
12576 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12577 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12578 * utils.c (do_free_section_addr_info)
12579 (make_cleanup_free_section_addr_info): Remove.
12580 * symfile.h (struct other_sections): Add constructor.
12581 (struct section_addr_info): Remove.
12582 (section_addr_info): New typedef.
12583 (struct sym_fns) <sym_offsets>: Change type of parameter.
12584 (build_section_addr_info_from_objfile)
12585 (relative_addr_info_to_section_offsets, addr_info_make_relative)
12586 (default_symfile_offsets, symbol_file_add)
12587 (symbol_file_add_from_bfd)
12588 (build_section_addr_info_from_section_table): Update.
12589 (alloc_section_addr_info, free_section_addr_info): Don't declare.
12590 * symfile.c (alloc_section_addr_info): Remove.
12591 (build_section_addr_info_from_section_table): Change return type.
12592 Update.
12593 (build_section_addr_info_from_bfd)
12594 (build_section_addr_info_from_objfile): Likewise.
12595 (free_section_addr_info): Remove.
12596 (relative_addr_info_to_section_offsets): Change type of "addrs".
12597 (addrs_section_compar): Now a std::sort comparator.
12598 (addrs_section_sort): Change return type.
12599 (addr_info_make_relative): Change type of "addrs". Update.
12600 (default_symfile_offsets, syms_from_objfile_1)
12601 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12602 (symbol_file_add_separate): Update.
12603 (symbol_file_add): Change type of "addrs". Update.
12604 (add_symbol_file_command): Update. Remove cleanups.
12605 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
12606 cleanups.
12607 * symfile-debug.c (debug_sym_offsets): Change type of "info".
12608 * solib.c (solib_read_symbols): Update.
12609 * objfiles.c (objfile_relocate): Update. Remove cleanups.
12610 * machoread.c (macho_symfile_offsets): Update.
12611 * jit.c (jit_bfd_try_read_symtab): Update.
12612
12613 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
12614
12615 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12616 unittests/utils-selftests.c.
12617 * unittests/utils-selftests.c: New file.
12618
12619 2018-03-14 Tom Tromey <tom@tromey.com>
12620
12621 PR cli/14977:
12622 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12623 for NULL.
12624
12625 2018-03-14 Tom Tromey <tom@tromey.com>
12626
12627 PR cli/19918:
12628 * printcmd.c (printf_pointer): Allow "-" in format.
12629
12630 2018-03-14 Tom Tromey <tom@tromey.com>
12631
12632 * printcmd.c (_initialize_printcmd): Add usage to printf.
12633
12634 2018-03-14 Yao Qi <qiyao@sourceware.org>
12635
12636 * MAINTAINERS: Update my email address.
12637
12638 2018-03-13 Tom Tromey <tom@tromey.com>
12639
12640 * machoread.c (macho_check_dsym): Change filenamep to a
12641 std::string*.
12642 (macho_symfile_read): Update.
12643 * symfile.c (load_command): Use std::string.
12644
12645 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
12646
12647 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12648 to error message string.
12649 (riscv_register_name): Use xsnprintf instead of sprintf.
12650 (riscv_insn::fetch_instruction): Use gdb_assert instead of
12651 internal_error.
12652 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12653 error.
12654 (riscv_push_dummy_call): Likewise.
12655
12656 2018-03-12 Tom Tromey <tom@tromey.com>
12657
12658 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12659 Use gdb::byte_vector.
12660 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12661
12662 2018-03-12 Yao Qi <yao.qi@linaro.org>
12663
12664 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12665 parameter type to readable_regcache.
12666 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12667 the declaration.
12668
12669 2018-03-11 Tom Tromey <tom@tromey.com>
12670
12671 * dwarf2read.c (struct nextfield): Add initializers.
12672 (struct nextfnfield): Remove.
12673 (struct fnfieldlist): Add initializers. Remove "length" and
12674 "head", use std::vector.
12675 (struct decl_field_list): Remove.
12676 (struct field_info): Add initializers.
12677 <fields, baseclasses>: Now std::vector.
12678 <nbaseclasses, nfnfields, typedef_field_list_count,
12679 nested_types_list_count>: Remove.
12680 (dwarf2_add_field, dwarf2_add_type_defn)
12681 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12682 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12683 (process_structure_scope): Update.
12684
12685 2018-03-11 Tom Tromey <tom@tromey.com>
12686
12687 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12688 for use by std::sort.
12689 (build_type_psymtabs_1): Use std::vector.
12690
12691 2018-03-09 Eli Zaretskii <eliz@gnu.org>
12692
12693 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12694 and LIBMPFR in the printed configuration.
12695
12696 2018-03-08 Tom Tromey <tom@tromey.com>
12697
12698 * source.c (get_filename_and_charpos): Use scoped_fd.
12699 * nto-procfs.c (procfs_open_1): Use scoped_fd.
12700 (procfs_pidlist): Likewise.
12701 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12702 (iterate_over_mappings): Likewise.
12703
12704 2018-03-08 Tom Tromey <tom@tromey.com>
12705
12706 * infcall.c (struct call_return_meta_info)
12707 <stack_temporaries_enabled>: Remove.
12708 (get_call_return_value, call_function_by_hand_dummy): Update.
12709 * thread.c (disable_thread_stack_temporaries): Remove.
12710 (enable_thread_stack_temporaries): Remove.
12711 (thread_stack_temporaries_enabled_p): Return bool.
12712 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12713 (get_last_thread_stack_temporary): Update.
12714 * eval.c (evaluate_subexp): Update.
12715 * gdbthread.h (class enable_thread_stack_temporaries): Now a
12716 class, not a function.
12717 (value_ptr, value_vec): Remove typedefs.
12718 (class thread_info) <stack_temporaries_enabled>: Now bool.
12719 <stack_temporaries>: Now a std::vector.
12720 (thread_stack_temporaries_enabled_p)
12721 (value_in_thread_stack_temporaries): Return bool.
12722
12723 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
12724
12725 * remote.c (putpkt_binary): Fix omitted bytes reporting.
12726 (getpkt_or_notif_sane_1): Likewise.
12727
12728 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12729
12730 * build-id.c (build_id_to_debug_bfd): Use std::string.
12731
12732 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12733
12734 * build-id.c (find_separate_debug_file_by_buildid): Return
12735 std::string.
12736 * build-id.h (find_separate_debug_file_by_buildid): Return
12737 std::string.
12738 * coffread.c (coff_symfile_read): Adjust to std::string.
12739 * elfread.c (elf_symfile_read): Adjust to std::string.
12740 * symfile.c (separate_debug_file_exists): Change parameter to
12741 std::string.
12742 (find_separate_debug_file): Return std::string.
12743 (find_separate_debug_file_by_debuglink): Return std::string.
12744 * symfile.h (find_separate_debug_file_by_debuglink): Return
12745 std::string.
12746
12747 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12748
12749 * common/xml-utils.c (xml_escape_text): Move code to...
12750 (xml_escape_text_append): ... this new function.
12751 * common/xml-utils.h (xml_escape_text_append): New declaration.
12752 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12753 New function.
12754 (_initialize_xml_utils): register test_xml_escape_text_append as
12755 a selftest.
12756
12757 2018-03-07 Alan Hayward <alan.hayward@arm.com>
12758
12759 * defs.h: Remove MAX_REGISTER_SIZE.
12760 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12761 asserts.
12762 * python/py-unwind.c (pyuw_sniffer): Likewise.
12763
12764 2018-03-07 Tom Tromey <tom@tromey.com>
12765
12766 * linux-tdep.c (linux_info_proc): Update.
12767 * target.h (struct target_ops) <to_fileio_readlink>: Return
12768 optional<string>.
12769 (target_fileio_readlink): Return optional<string>.
12770 * remote.c (remote_hostio_readlink): Return optional<string>.
12771 * inf-child.c (inf_child_fileio_readlink): Return
12772 optional<string>.
12773 * target.c (target_fileio_readlink): Return optional<string>.
12774
12775 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
12776
12777 * regcache.c (cooked_read_test): Add riscv to the list of
12778 architectures that have a save_reggroup.
12779
12780 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
12781
12782 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12783 value is not a dynamic class object.
12784
12785 2018-03-06 Tom Tromey <tom@tromey.com>
12786
12787 * rust-exp.y: Formatting fixes.
12788
12789 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12790
12791 * riscv-tdep.c (riscv_register_name): Remove target description
12792 support.
12793 (riscv_gdbarch_init): Remove target description check.
12794
12795 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12796
12797 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12798 comment.
12799 * riscv-tdep.h: Likewise.
12800
12801 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12802
12803 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12804 (riscv_pseudo_register_write): Delete.
12805 (riscv_gdbarch_init): Remove all use of pseudo registers.
12806
12807 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12808
12809 * record-btrace.c (btrace_print_lines): Replace cleanup
12810 parameter with RAII equivalents.
12811 (btrace_insn_history): Replace cleanup with RAII equivalents.
12812 * ui-out.h (make_cleanup_ui_out_list_begin_end,
12813 make_cleanup_ui_out_tuple_begin_end): Remove.
12814 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12815 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12816 make_cleanup_ui_out_list_begin_end): Remove.
12817
12818 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12819
12820 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12821 parameter types to std::vector. Use bool.
12822 (record_btrace_wait): Replace VEC(tp_t) with
12823 std::vector<thread_info *>.
12824 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12825
12826 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12827
12828 * record-btrace.c (record_btrace_disable_callback): Remove.
12829 (struct scoped_btrace_disable): New.
12830 (record_btrace_open): Use scoped_btrace_disable.
12831
12832 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12833
12834 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12835 reading values from registers.
12836
12837 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12838
12839 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12840 where appropriate.
12841
12842 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12843
12844 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12845 change parameter type. Use GDB's print functions, and use
12846 core_addr_to_string where appropriate.
12847 (riscv_push_dummy_call): Use core_addr_to_string where
12848 appropriate, update call to riscv_print_arg_location, and reindent
12849 a few lines.
12850 (riscv_return_value): Update call to riscv_print_arg_location.
12851
12852 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12853 Tim Newsome <tim@sifive.com>
12854 Albert Ou <a0u@eecs.berkeley.edu>
12855 Darius Rad <darius@bluespec.com>
12856
12857 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12858 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12859 (ALLDEPFILES): Add riscv-tdep.c
12860 * configure.tgt: Add riscv support.
12861 * riscv-tdep.c: New file.
12862 * riscv-tdep.h: New file.
12863 * NEWS: Mention new target.
12864 * MAINTAINERS: Add entry for riscv.
12865
12866 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12867
12868 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12869 fields within aggregates.
12870
12871 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12872
12873 * record-btrace.c (btrace_print_lines): Change type of flags to
12874 gdb_disassembly_flags.
12875
12876 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12877
12878 * fbsd-nat.c: Include "inf-ptrace.h".
12879 (USE_SIGTRAP_SIGINFO): Conditionally define.
12880 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12881 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12882 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12883 function.
12884 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12885 Likewise.
12886 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12887 Likewise.
12888 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12889 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12890 "supports_stopped_by_hw_breakpoint" target methods.
12891
12892 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12893
12894 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12895 * fbsd-nat.c (debug_fbsd_nat): New variable.
12896 (show_fbsd_nat_debug): New function.
12897 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12898 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12899
12900 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12901
12902 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12903 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12904 prototype.
12905 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12906 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12907 method.
12908
12909 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12910
12911 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12912 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12913
12914 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12915
12916 * charset.c (struct charset_vector): New.
12917 (charsets): Change type to charset_vector.
12918 (find_charset_names): Adjust.
12919 (add_one): Adjust.
12920 (_initialize_charset): Adjust.
12921
12922 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12923
12924 * progspace.h (struct program_space) <deleted_solibs>: Change
12925 type to std::vector<std::string>.
12926 * progspace.c (clear_program_space_solib_cache): Adjust.
12927 * breakpoint.c (print_solib_event): Adjust.
12928 (check_status_catch_solib): Adjust.
12929 * solib.c (update_solib_list): Adjust.
12930 * ui-out.h (class ui_out) <field_string>: New overload.
12931 * ui-out.c (ui_out::field_string): New overload.
12932
12933 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12934
12935 * progspace.h (struct program_space): Add constructor and
12936 destructor, initialize fields.
12937 (add_program_space): Remove.
12938 * progspace.c (add_program_space): Rename to...
12939 (program_space::program_space): ... this.
12940 (release_program_space): Rename to...
12941 (program_space::~program_space): ... this.
12942 (delete_program_space): Use delete to delete program_space.
12943 (initialize_progspace): Use new to allocate program_space.
12944 * inferior.c (add_inferior_with_spaces): Likewise.
12945 (clone_inferior_command): Likewise.
12946 * infrun.c (follow_fork_inferior): Likewise.
12947 (handle_vfork_child_exec_or_exit): Likewise.
12948
12949 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12950
12951 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12952 (delim_string_to_char_ptr_vec): Return std::vector of
12953 gdb::unique_xmalloc_ptr.
12954 (dirnames_to_char_ptr_vec_append): Take std::vector of
12955 gdb::unique_xmalloc_ptr.
12956 (dirnames_to_char_ptr_vec): Return std::vector of
12957 gdb::unique_xmalloc_ptr.
12958 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12959 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12960 (delim_string_to_char_ptr_vec): Return an std::vector of
12961 gdb::unique_xmalloc_ptr, adjust the code.
12962 (dirnames_to_char_ptr_vec_append): Take an std::vector of
12963 gdb::unique_xmalloc_ptr, adjust the code.
12964 (dirnames_to_char_ptr_vec): Return an std::vector of
12965 gdb::unique_xmalloc_ptr, adjust the code.
12966 * auto-load.c (auto_load_safe_path_vec): Change type to
12967 std::vector of gdb::unique_xmalloc_ptr.
12968 (auto_load_expand_dir_vars): Return an std::vector of
12969 gdb::unique_xmalloc_ptr, adjust the code.
12970 (auto_load_safe_path_vec_update): Adjust.
12971 (filename_is_in_auto_load_safe_path_vec): Adjust.
12972 (auto_load_objfile_script_1): Adjust.
12973 * build-id.c (build_id_to_debug_bfd): Adjust.
12974 * linux-thread-db.c (thread_db_load_search): Adjust.
12975 * source.c (add_path): Adjust.
12976 (openp): Adjust.
12977 * symfile.c (find_separate_debug_file): Adjust.
12978 * utils.c (do_free_char_ptr_vec): Remove.
12979 (make_cleanup_free_char_ptr_vec): Remove.
12980
12981 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
12982
12983 PR gdb/22907
12984 * common/pathstuff.c: Conditionally include "<windows.h>".
12985
12986 2018-03-01 Georg Sauthoff <mail@georg.so>
12987
12988 PR gdb/22888
12989 * gcore.in: Quote variables and switch interpreter to bash.
12990
12991 2018-03-01 Tom Tromey <tom@tromey.com>
12992
12993 * dwarf2read.c (alloc_discriminant_info): Fix default_index
12994 assertion. Add assertion for discriminant_index.
12995 (quirk_rust_enum): Use correct base type name in univariant case.
12996
12997 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
12998
12999 * record.c (get_call_history_modifiers): Return a
13000 record_print_flags.
13001 (cmd_record_call_history): Adjust.
13002 * record-btrace.c (record_btrace_call_history): Adjust.
13003 (record_btrace_call_history_range): Adjust.
13004 (record_btrace_call_history_from): Adjust.
13005 * target-debug.h (target_debug_print_record_print_flags): New.
13006 * target-delegates.c: Re-generate.
13007 * target.c (target_call_history): Change flags type.
13008 (target_call_history_from): Likewise.
13009 (target_call_history_range): Likewise.
13010 * target.h (struct target_ops) <target_call_history>: Likewise.
13011 (target_call_history_from): Likewise.
13012 (target_call_history_range): Likewise.
13013
13014 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
13015 Simon Marchi <simon.marchi@polymtl.ca>
13016
13017 * common/common-utils.c: Include "sys/stat.h".
13018 (is_regular_file): Move here from "source.c"; change return
13019 type to "bool".
13020 * common/common-utils.h (is_regular_file): New prototype.
13021 * common/pathstuff.c (contains_dir_separator): New function.
13022 * common/pathstuff.h (contains_dir_separator): New prototype.
13023 * source.c: Don't include "sys/stat.h".
13024 (is_regular_file): Move to "common/common-utils.c".
13025
13026 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
13027
13028 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13029 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13030 * auto-load.c: Include "common/pathstuff.h".
13031 * common/common-def.h (current_directory): Move here.
13032 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13033 function.
13034 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13035 prototype.
13036 * common/pathstuff.c: New file.
13037 * common/pathstuff.h: New file.
13038 * compile/compile.c: Include "common/pathstuff.h".
13039 * defs.h (current_directory): Move to "common/common-defs.h".
13040 * dwarf2read.c: Include "common/pathstuff.h".
13041 * exec.c: Likewise.
13042 * guile/scm-safe-call.c: Likewise.
13043 * linux-thread-db.c: Likewise.
13044 * main.c: Likewise.
13045 * nto-tdep.c: Likewise.
13046 * objfiles.c: Likewise.
13047 * source.c: Likewise.
13048 * symtab.c: Likewise.
13049 * utils.c: Include "common/pathstuff.h".
13050 (gdb_realpath): Move to "common/pathstuff.c".
13051 (gdb_realpath_keepfile): Likewise.
13052 (gdb_abspath): Likewise.
13053 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13054 (gdb_realpath_keepfile): Likewise.
13055 (gdb_abspath): Likewise.
13056
13057 2018-02-28 John Baldwin <jhb@FreeBSD.org>
13058
13059 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13060 wildcard process pid for super_resume for kernels with a
13061 specific bug.
13062
13063 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
13064
13065 * compile/compile.c (get_args): Add additional comments
13066 explaining function.
13067
13068 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
13069 Tom Tromey <tom@tromey.com>
13070
13071 * target.h (memory_write_request_s): Remove typedef. Don't define
13072 VEC.
13073 (target_write_memory_blocks): Change argument to std::vector.
13074 (struct memory_write_request): Add constructor.
13075 * target-memory.c (compare_block_starting_address): Return bool.
13076 Change argument types.
13077 (claim_memory): Change arguments to use std::vector.
13078 (split_regular_and_flash_blocks, blocks_to_erase)
13079 (compute_garbled_blocks): Likewise.
13080 (cleanup_request_data, cleanup_write_requests_vector): Remove.
13081 (target_write_memory_blocks): Change argument to std::vector.
13082 * symfile.c (struct load_section_data): Add constructor and
13083 destructor. Use std::vector for "requests".
13084 (struct load_progress_data): Add initializers.
13085 (load_section_callback): Update. Use "new".
13086 (clear_memory_write_data): Remove.
13087 (generic_load): Update.
13088
13089 2018-02-27 Alan Hayward <alan.hayward@arm.com>
13090
13091 * arch/aarch64.h: Use common/tdesc.h.
13092
13093 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13094
13095 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13096 architecture with a 64-bit ABI.
13097
13098 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13099
13100 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13101 ahead of target description loading.
13102
13103 2018-02-26 Tom Tromey <tom@tromey.com>
13104
13105 * stack.c (backtrace_command_1): Update.
13106 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13107 of "flags".
13108 * python/py-framefilter.c (py_print_frame)
13109 (gdbpy_apply_frame_filter): Change type of "flags".
13110 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13111 of "flags".
13112 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13113 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13114 * extension.h (enum frame_filter_flag): Rename from
13115 frame_filter_flags.
13116 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13117 (apply_ext_lang_frame_filter): Change type of "flags".
13118 * extension.c (apply_ext_lang_frame_filter): Change type of
13119 "flags".
13120 * extension-priv.h (struct extension_language_ops)
13121 <apply_frame_filter>: Change type of "flags".
13122
13123 2018-02-26 Tom Tromey <tom@tromey.com>
13124
13125 PR python/16497:
13126 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
13127 off-by-one in py_end computation.
13128 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13129 PRINT_MORE_FRAMES.
13130 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13131 constant.
13132
13133 2018-02-26 Tom Tromey <tom@tromey.com>
13134
13135 * dwarf2read.c (struct variant_field): New.
13136 (struct nextfield) <variant>: New field.
13137 (dwarf2_add_field): Handle DW_TAG_variant_part.
13138 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13139 discriminated union.
13140 (read_structure_type): Handle DW_TAG_variant_part.
13141 (handle_struct_member_die): New function, extracted from
13142 process_structure_scope. Handle DW_TAG_variant.
13143 (process_structure_scope): Handle discriminated unions. Call
13144 handle_struct_member_die.
13145
13146 2018-02-26 Tom Tromey <tom@tromey.com>
13147
13148 * rust-lang.h (rust_last_path_segment): Declare.
13149 * rust-lang.c (rust_last_path_segment): Now public. Change
13150 contract.
13151 (struct disr_info): Remove.
13152 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13153 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13154 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13155 (rust_enum_p, rust_enum_variant): New function.
13156 (rust_underscore_fields): Remove "offset" parameter.
13157 (rust_print_enum): New function.
13158 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13159 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13160 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
13161 enums.
13162 (rust_internal_print_type): New function, from rust_print_type.
13163 Remove enum code.
13164 (rust_print_type): Call rust_internal_print_type.
13165 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13166 Update enum handling.
13167 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13168 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13169 (rust_union_quirks): New functions.
13170 (process_full_comp_unit, process_full_type_unit): Call
13171 rust_union_quirks.
13172 (process_structure_scope): Update rust_unions if necessary.
13173
13174 2018-02-26 Tom Tromey <tom@tromey.com>
13175
13176 * value.h (value_union_variant): Declare.
13177 * valops.c (value_union_variant): New function.
13178 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13179 (struct discriminant_info): New.
13180 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13181 enumerator.
13182 (struct main_type) <flag_discriminated_union>: New field.
13183
13184 2018-02-26 Tom Tromey <tom@tromey.com>
13185
13186 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13187 unittests/unpack-selftests.c.
13188 * unittests/unpack-selftests.c: New file.
13189 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13190
13191 2018-02-26 Yao Qi <yao.qi@linaro.org>
13192
13193 * dwarf2read.c (struct partial_die_info) <read>: New method.
13194 (read_partial_die): Remove the declaration.
13195 (load_partial_dies): Update.
13196 (partial_die_info::partial_die_info):
13197 (read_partial_die): Change it to partial_die_info::read.
13198
13199 2018-02-26 Yao Qi <yao.qi@linaro.org>
13200
13201 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13202 (fixup_partial_die): Remove declaration.
13203 (scan_partial_symbols): Update.
13204 (partial_die_parent_scope): Likewise.
13205 (partial_die_full_name): Likewise.
13206 (fixup_partial_die): Change it to partial_die_info::fixup.
13207
13208 2018-02-26 Yao Qi <yao.qi@linaro.org>
13209
13210 * dwarf2read.c (read_partial_die): Update the declaration.
13211 (load_partial_dies): Caller update.
13212 (read_partial_die): Remove one argument abbrev_len.
13213
13214 2018-02-26 Yao Qi <yao.qi@linaro.org>
13215
13216 * dwarf2read.c (struct partial_die_info): Add ctor, delete
13217 assignment operator.
13218 (load_partial_dies): Use ctor and copy ctor.
13219 (read_partial_die): Update.
13220 (dwarf2_cu::find_partial_die): Use ctor.
13221
13222 2018-02-26 Yao Qi <yao.qi@linaro.org>
13223
13224 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13225 (find_partial_die_in_comp_unit): Change it to
13226 dwarf2_cu::find_partial_die.
13227 (find_partial_die): Update.
13228
13229 2018-02-26 Yao Qi <yao.qi@linaro.org>
13230
13231 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13232 is NULL.
13233
13234 2018-02-26 Yao Qi <yao.qi@linaro.org>
13235
13236 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13237
13238 2018-02-26 Alan Hayward <alan.hayward@arm.com>
13239
13240 * arch/amd64.h: Use common/tdesc.h.
13241 * arch/i386.c: Likewise.
13242 * arch/i386.h: Likewise.
13243 * arch/tic6x.c: Likewise.
13244 * arch/tdesc.h: Move file from here...
13245 * common/tdesc.h: ...to here.
13246 * features/aarch64-core.c: Regenerate.
13247 * features/aarch64-fpu.c: Regenerate.
13248 * features/i386/32bit-avx.c: Regenerate.
13249 * features/i386/32bit-avx512.c: Regenerate.
13250 * features/i386/32bit-core.c: Regenerate.
13251 * features/i386/32bit-linux.c: Regenerate.
13252 * features/i386/32bit-mpx.c: Regenerate.
13253 * features/i386/32bit-pkeys.c: Regenerate.
13254 * features/i386/32bit-sse.c: Regenerate.
13255 * features/i386/64bit-avx.c: Regenerate.
13256 * features/i386/64bit-avx512.c: Regenerate.
13257 * features/i386/64bit-core.c: Regenerate.
13258 * features/i386/64bit-linux.c: Regenerate.
13259 * features/i386/64bit-mpx.c: Regenerate.
13260 * features/i386/64bit-pkeys.c: Regenerate.
13261 * features/i386/64bit-segments.c: Regenerate.
13262 * features/i386/64bit-sse.c: Regenerate.
13263 * features/i386/x32-core.c: Regenerate.
13264 * features/tic6x-c6xp.c: Regenerate.
13265 * features/tic6x-core.c: Regenerate.
13266 * features/tic6x-gp.c: Regenerate.
13267 * target-descriptions.c: Use common/tdesc.h.
13268 * target-descriptions.h: Likewise.
13269
13270 2018-02-24 Tom Tromey <tom@tromey.com>
13271
13272 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13273 (try_thread_db_load_from_dir, thread_db_load_search): Use
13274 std::string.
13275 (info_auto_load_libthread_db_compare): Return bool. Change
13276 argument types.
13277 (info_auto_load_libthread_db): Use std::vector, std::string.
13278 Remove cleanups.
13279
13280 2018-02-24 Tom Tromey <tom@tromey.com>
13281
13282 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13283 std::string.
13284 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13285 std::string*.
13286 * gdbarch.c: Rebuild.
13287 * gdbarch.h: Rebuild.
13288 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13289 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13290 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13291 std::string*.
13292
13293 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
13294
13295 * gdbtypes.h (sect_offset): Change type to uint64_t.
13296 (sect_offset_str): New function.
13297 * dwarf2read.c (create_addrmap_from_aranges): Use
13298 sect_offset_str.
13299 (error_check_comp_unit_head): Likewise.
13300 (create_debug_type_hash_table): Likewise.
13301 (read_cutu_die_from_dwo): Likewise.
13302 (init_cutu_and_read_dies): Likewise.
13303 (init_cutu_and_read_dies_no_follow): Likewise.
13304 (process_psymtab_comp_unit_reader): Likewise.
13305 (partial_die_parent_scope): Likewise.
13306 (peek_die_abbrev): Likewise.
13307 (process_queue): Likewise.
13308 (dwarf2_physname): Likewise.
13309 (read_namespace_alias): Likewise.
13310 (read_import_statement): Likewise.
13311 (create_dwo_cu_reader): Likewise.
13312 (create_cus_hash_table): Likewise.
13313 (lookup_dwo_cutu): Likewise.
13314 (inherit_abstract_dies): Likewise.
13315 (read_func_scope): Likewise.
13316 (read_call_site_scope): Likewise.
13317 (dwarf2_add_member_fn): Likewise.
13318 (read_common_block): Likewise.
13319 (read_module_type): Likewise.
13320 (read_typedef): Likewise.
13321 (read_subrange_type): Likewise.
13322 (load_partial_dies): Likewise.
13323 (read_partial_die): Likewise.
13324 (find_partial_die): Likewise.
13325 (read_str_index): Likewise.
13326 (dwarf2_string_attr): Likewise.
13327 (build_error_marker_type): Likewise.
13328 (lookup_die_type): Likewise.
13329 (dump_die_shallow): Likewise.
13330 (follow_die_ref): Likewise.
13331 (dwarf2_fetch_die_loc_sect_off): Likewise.
13332 (dwarf2_fetch_constant_bytes): Likewise.
13333 (follow_die_sig): Likewise.
13334 (get_signatured_type): Likewise.
13335 (get_DW_AT_signature_type): Likewise.
13336 (dwarf2_find_containing_comp_unit): Likewise.
13337 (set_die_type): Likewise.
13338
13339 2018-02-21 John Baldwin <jhb@FreeBSD.org>
13340
13341 * arch/aarch64.c: Include "common-defs.h".
13342 * arch/amd64.c: Likewise.
13343 * arch/i386.c: Likewise.
13344
13345 2018-02-21 Tom Tromey <tom@tromey.com>
13346
13347 * value.h: (extract_field_op): Update.
13348 * eval.c (extract_field_op): Return a const char *.
13349 * expression.h (parse_expression_for_completion): Update.
13350 * completer.c (complete_expression): Update.
13351 (add_struct_fields): Make fieldname const.
13352 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13353 (mark_completion_tag, parse_exp_in_context_1): Update.
13354 (parse_expression_for_completion): Change "name" to
13355 unique_xmalloc_ptr*.
13356
13357 2018-02-21 Tom Tromey <tom@tromey.com>
13358
13359 * infcall.c (call_function_by_hand_dummy): Use std::vector.
13360
13361 2018-02-21 Yao Qi <yao.qi@linaro.org>
13362
13363 * avr-tdep.c (avr_read_pc): Change parameter type to
13364 readable_regcache.
13365 * gdbarch.sh (read_pc): Likewise.
13366 * gdbarch.c: Re-generated.
13367 * gdbarch.h: Re-generated.
13368 * hppa-tdep.c (hppa_read_pc): Change parameter type to
13369 readable_regcache.
13370 * ia64-tdep.c (ia64_read_pc): Likewise.
13371 * mips-tdep.c (mips_read_pc): Likewise.
13372 * spu-tdep.c (spu_read_pc): Likewise.
13373
13374 2018-02-21 Yao Qi <yao.qi@linaro.org>
13375
13376 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13377 * regcache-dump.c: New file.
13378 * regcache.c: Move register_dump to regcache-dump.c.
13379 (maintenance_print_registers): Likewise.
13380 (maintenance_print_raw_registers): Likewise.
13381 (maintenance_print_cooked_registers): Likewise.
13382 (maintenance_print_register_groups): Likewise.
13383 (maintenance_print_remote_registers): Likewise.
13384 (_initialize_regcache): Likewise.
13385 * regcache.h (register_dump): Moved from regcache.c.
13386
13387 2018-02-21 Yao Qi <yao.qi@linaro.org>
13388
13389 * regcache.c (regcache::regcache): Update.
13390 (regcache::invalidate): Move it to detached_regcache::invalidate.
13391 (get_thread_arch_aspace_regcache): Update.
13392 (regcache::raw_update): Update.
13393 (regcache::cooked_read): Remove some code.
13394 (regcache::cooked_read_value): Likewise.
13395 (regcache::raw_write): Remove assert on m_readonly_p.
13396 (regcache::raw_supply_integer): Move it to
13397 detached_regcache::raw_supply_integer.
13398 (regcache::raw_supply_zeroed): Likewise.
13399 * regcache.h (detached_regcache) <raw_supply_integer>: New
13400 declaration.
13401 <raw_supply_zeroed, invalidate>: Likewise.
13402 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13403 <invalidate>: Likewise.
13404 <m_readonly_p>: Removed.
13405
13406 2018-02-21 Yao Qi <yao.qi@linaro.org>
13407
13408 * infcmd.c (get_return_value): Let stop_regs point to
13409 get_current_regcache.
13410 * regcache.c (regcache::regcache): Remove.
13411 (register_dump_reg_buffer): New class.
13412 (regcache_print): Adjust.
13413 * regcache.h (regcache): Remove constructors.
13414
13415 2018-02-21 Yao Qi <yao.qi@linaro.org>
13416
13417 * regcache.c (class register_dump): New class.
13418 (register_dump_regcache, register_dump_none): New class.
13419 (register_dump_remote, register_dump_groups): New class.
13420 (regcache_print): Update.
13421 * regcache.h (regcache_dump_what): Move it to regcache.c.
13422 (regcache) <dump>: Remove.
13423
13424 2018-02-21 Yao Qi <yao.qi@linaro.org>
13425
13426 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13427 reg_buffer_rw *.
13428 (jit_unwind_reg_set_impl): Call raw_supply.
13429 (jit_frame_sniffer): Use reg_buffer_rw.
13430 * record-full.c (record_full_core_regbuf): Change its type.
13431 (record_full_core_open_1): Use reg_buffer_rw.
13432 (record_full_close): Likewise.
13433 (record_full_core_fetch_registers): Use regcache->raw_supply.
13434 (record_full_core_store_registers): Likewise.
13435 * regcache.c (regcache::get_register_status): Move it to
13436 reg_buffer.
13437 (regcache_raw_set_cached_value): Remove.
13438 (regcache::raw_set_cached_value): Remove.
13439 (regcache::raw_write): Call raw_supply.
13440 (regcache::raw_supply): Move it to reg_buffer_rw.
13441 * regcache.h (regcache_raw_set_cached_value): Remove.
13442 (reg_buffer_rw): New class.
13443
13444 2018-02-21 Yao Qi <yao.qi@linaro.org>
13445
13446 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13447 readonly_detached_regcache.
13448 (dummy_frame_prev_register): Use regcache->cooked_read.
13449 * frame.c (frame_save_as_regcache): Change return type.
13450 (frame_pop): Update.
13451 * frame.h (frame_save_as_regcache): Update declaration.
13452 * inferior.h (get_infcall_suspend_state_regcache): Update
13453 declaration.
13454 * infrun.c (infcall_suspend_state) <registers>: use
13455 readonly_detached_regcache.
13456 (save_infcall_suspend_state): Don't use regcache_dup.
13457 (get_infcall_suspend_state_regcache): Change return type.
13458 * linux-fork.c (struct fork_info) <savedregs>: Change to
13459 readonly_detached_regcache.
13460 <pc>: New field.
13461 (fork_save_infrun_state): Don't use regcache_dup.
13462 (info_checkpoints_command): Adjust.
13463 * mi/mi-main.c (register_changed_p): Update declaration.
13464 (mi_cmd_data_list_changed_registers): Use
13465 readonly_detached_regcache.
13466 (register_changed_p): Change parameter type to
13467 readonly_detached_regcache.
13468 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13469 readonly_detached_regcache.
13470 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13471 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13472 New.
13473 (regcache::save): Move it to reg_buffer.
13474 (regcache::restore): Change parameter type.
13475 (regcache_dup): Remove.
13476 * regcache.h (reg_buffer) <save>: New method.
13477 (readonly_detached_regcache): New class.
13478 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13479 readonly_detached_regcache.
13480 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13481
13482 2018-02-21 Yao Qi <yao.qi@linaro.org>
13483
13484 * frame.c (frame_save_as_regcache): Use regcache method save.
13485 (frame_pop): Use regcache method restore.
13486 * infrun.c (restore_infcall_suspend_state): Likewise.
13487 * linux-fork.c (fork_load_infrun_state): Likewise.
13488 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13489 save.
13490 * regcache.c (regcache_save): Remove.
13491 (regcache::restore): More asserts.
13492 (regcache_cpy): Remove.
13493 * regcache.h (regcache_save): Remove the declaration.
13494 (regcache::restore): Move from private to public.
13495 Remove the friend declaration of regcache_cpy.
13496 (regcache_cpy): Remove declaration.
13497
13498 2018-02-21 Yao Qi <yao.qi@linaro.org>
13499
13500 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13501 parameter type to 'readable_regcache *'.
13502 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13503 * arm-tdep.c (arm_neon_quad_read): Likewise.
13504 (arm_pseudo_read): Likewise.
13505 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13506 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13507 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13508 * gdbarch.c: Re-generated.
13509 * gdbarch.h: Re-generated.
13510 * gdbarch.sh (pseudo_register_read): Change parameter type to
13511 'readable_regcache *'.
13512 (pseudo_register_read_value): Likewise.
13513 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13514 (h8300_pseudo_register_read): Likewise.
13515 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13516 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13517 (i386_pseudo_register_read_into_value): Likewise.
13518 (i386_pseudo_register_read_value): Likewise.
13519 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13520 declaration.
13521 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13522 * m32c-tdep.c (m32c_raw_read): Likewise.
13523 (m32c_read_flg): Likewise.
13524 (m32c_banked_register): Likewise.
13525 (m32c_banked_read): Likewise.
13526 (m32c_sb_read): Likewise.
13527 (m32c_part_read): Likewise.
13528 (m32c_cat_read): Likewise.
13529 (m32c_r3r2r1r0_read): Likewise.
13530 (m32c_pseudo_register_read): Likewise.
13531 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13532 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13533 (mep_pseudo_cr64_read): Likewise.
13534 (mep_pseudo_register_read): Likewise.
13535 * mips-tdep.c (mips_pseudo_register_read): Likewise.
13536 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13537 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13538 * regcache.c (regcache::raw_read): Move it to readable_regcache.
13539 (regcache::cooked_read): Likewise.
13540 (regcache::cooked_read_value): Likewise.
13541 (regcache_cooked_read_signed):
13542 (regcache::cooked_read): Likewise.
13543 * regcache.h (readable_regcache): New class.
13544 (regcache): Inherit readable_regcache. Move some methods to
13545 readable_regcache.
13546 * rl78-tdep.c (rl78_pseudo_register_read): Change
13547 parameter type to 'readable_regcache *'.
13548 * rs6000-tdep.c (do_regcache_raw_read): Remove.
13549 (e500_pseudo_register_read): Change parameter type to
13550 'readable_regcache *'.
13551 (dfp_pseudo_register_read): Likewise.
13552 (vsx_pseudo_register_read): Likewise.
13553 (efpr_pseudo_register_read): Likewise.
13554 * s390-tdep.c (s390_pseudo_register_read): Likewise.
13555 * sh-tdep.c (sh_pseudo_register_read): Likewise.
13556 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13557 (sh64_pseudo_register_read): Likewise.
13558 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13559 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13560 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13561 (spu_pseudo_register_read): Likewise.
13562 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13563 (xtensa_pseudo_register_read): Likewise.
13564
13565 2018-02-21 Yao Qi <yao.qi@linaro.org>
13566
13567 * regcache.c (regcache::regcache): Call reg_buffer ctor.
13568 (regcache::arch): Move it to reg_buffer::arch.
13569 (regcache::register_buffer): Likewise.
13570 (regcache::assert_regnum): Likewise.
13571 (regcache::num_raw_registers): Likewise.
13572 * regcache.h (reg_buffer): New class.
13573 (regcache): Inherit reg_buffer.
13574
13575 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
13576
13577 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13578 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13579
13580 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
13581
13582 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13583
13584 2018-02-19 Alan Hayward <alan.hayward@arm.com>
13585
13586 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13587 (SFILES): Remove common/*.c files.
13588 (COMMON_OBS): Remove some *.o files built from common/*.c files.
13589 * common/common.host: Add common reference.
13590 * configure.ac: Likewise.
13591 * configure: Regenerate.
13592
13593 2018-02-16 Yao Qi <yao.qi@linaro.org>
13594
13595 * block.c (block_namespace_info): Inherit allocate_on_obstack.
13596 (block_initialize_namespace): Use new.
13597 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13598 (dwarf2_free_objfile): Use delete.
13599 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13600 (copy_type_recursive): Use new.
13601 * gdb_obstack.h (allocate_on_obstack): New.
13602
13603 2018-02-15 Yao Qi <yao.qi@linaro.org>
13604
13605 PR gdb/22849
13606 * inferior.c (exit_inferior_1): Reset inf->control.
13607
13608 2018-02-15 Joel Brobecker <brobecker@adacore.com>
13609
13610 * ada-lang.c (ada_to_fixed_value_create): Delete advance
13611 declaration.
13612
13613 2018-02-14 Pedro Alves <palves@redhat.com>
13614
13615 * frame-unwind.c (frame_unwind_try_unwinder): Always call
13616 frame_cleanup_after_sniffer on exception.
13617
13618 2018-02-14 Tom Tromey <tom@tromey.com>
13619
13620 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13621 const.
13622 (solib_bfd_open): Make pathname const.
13623 * solib.c (solib_bfd_open): Make pathname const.
13624 * solib-spu.c (spu_bfd_fopen): Make name const.
13625 (spu_bfd_open): Make pathname const.
13626 * solib-darwin.c (darwin_bfd_open): Make pathname const.
13627 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13628
13629 2018-02-14 Tom Tromey <tom@tromey.com>
13630
13631 * symfile.c (symfile_bfd_open): Update.
13632 * source.h (openp, source_full_path_of, find_and_open_source):
13633 Change argument type to unique_xmalloc_ptr.
13634 * source.c (openp): Take a unique_xmalloc_ptr.
13635 (source_full_path_of, find_and_open_source): Likewise.
13636 (open_source_file, symtab_to_fullname): Update.
13637 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13638 unique_xmalloc_ptr.
13639 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13640 (exec_file_find): Update.
13641 * psymtab.c (psymtab_to_fullname): Update.
13642 * nto-tdep.h (nto_find_and_open_solib): Update.
13643 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13644 unique_xmalloc_ptr.
13645 * exec.c (exec_file_attach): Update.
13646 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13647 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13648
13649 2018-02-14 Tom Tromey <tom@tromey.com>
13650
13651 * solib.c: Include source.h.
13652 * nto-tdep.c: Include source.h.
13653 * mi/mi-cmd-env.c: Include source.h.
13654 * infcmd.c: Include source.h.
13655 * exec.c: Include source.h.
13656 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13657 (add_path, directory_switch, source_path, init_source_path): Move
13658 declarations...
13659 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13660 (add_path, directory_switch, source_path, init_source_path):
13661 ...here.
13662
13663 2018-02-14 Tom Tromey <tom@tromey.com>
13664
13665 * solist.h (exec_file_find, solib_find): Return
13666 unique_xmalloc_ptr.
13667 (solib_bfd_fopen): Take a const char *.
13668 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13669 (exec_file_find, solib_find): Likewise.
13670 (solib_bfd_fopen): Do not take ownership of "pathname".
13671 (solib_bfd_open): Use unique_xmalloc_ptr.
13672 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13673 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13674 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13675 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13676
13677 2018-02-14 Joel Brobecker <brobecker@adacore.com>
13678
13679 * ada-lang.c (name_match_type_from_name): Remove reference to
13680 ada_name_for_lookup in function's documentation.
13681 * ada-lang.h (ada_name_for_lookup): Delete declaration.
13682
13683 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13684
13685 * defs.h (enum openp_flags): New enum.
13686 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13687 Move to enum openp_flags.
13688 (openp_flags): New enum flags.
13689 (openp): Change parameter type to openp_flags.
13690 * source.c (openp): Change parameter type to openp_flags.
13691 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13692 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13693
13694 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13695
13696 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13697 per-command.
13698
13699 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
13700
13701 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13702 into...
13703 (class dwarf2_queue_guard): ...the destructor of this new class.
13704 (dw2_do_instantiate_symtab): Create instance of the new class
13705 dwarf2_queue_guard, remove cleanup.
13706
13707 2018-02-09 Tom Tromey <tom@tromey.com>
13708
13709 * source.c (find_source_lines): Don't reference past the end of
13710 the vector.
13711
13712 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13713
13714 * remote.c (remote_btrace_maybe_reopen): Change error message.
13715 * btrace.c (btrace_enable): Likewise.
13716 (parse_xml_btrace): Likewise.
13717 (parse_xml_btrace_conf): Likewise.
13718
13719 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13720
13721 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13722 (linux_enable_pt, linux_enable_bts): Call
13723 diagnose_perf_event_open_fail.
13724
13725 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13726
13727 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13728 Remove parameter and change return type. Update callers. Move it.
13729 (linux_enable_bts, linux_enable_pt): Improve error message.
13730 (linux_enable_pt): Remove zero buffer size check.
13731 (linux_enable_btrace): Improve error messages. Remove NULL return
13732 check.
13733
13734 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13735
13736 * btrace.c (btrace_enable): Remove target_supports_btrace call.
13737 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13738 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13739 (linux_supports_pt, linux_supports_btrace): Remove.
13740 (linux_enable_bts): Call cpu_supports_bts.
13741 * nat/linux-btrace.h (linux_supports_btrace): Remove.
13742 * remote.c (remote_supports_btrace): Remove.
13743 (init_remote_ops): Remove remote_supports_btrace.
13744 * target-delegates.c: Regenerated.
13745 * target.c (target_supports_btrace): Remove.
13746 * target.h (target_ops) <to_supports_btrace>: Remove
13747 (target_supports_btrace): Remove.
13748 * x86-linux-nat.c (x86_linux_create_target): Remove
13749 linux_supports_btrace.
13750
13751 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13752
13753 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13754 btrace failed.
13755 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13756 exception and use message in own exception.
13757
13758 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13759
13760 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13761 (perf_event_pt_event_type): Use gdb_file_up.
13762 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13763 scoped_fd, and scoped_mmap.
13764
13765 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13766
13767 * common/scoped_mmap.h: New.
13768 * unittests/scoped_mmap-selftest.c: New.
13769 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13770 unittests/scoped_mmap-selftest.c.
13771
13772 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13773
13774 * common/scoped_fd.h: New.
13775 * unittests/scoped_fd-selftest.c: New.
13776 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13777 unittests/scoped_fd-selftest.c.
13778
13779 2018-02-09 Tom Tromey <tom@tromey.com>
13780
13781 * auto-load.c (auto_load_section_scripts): Use
13782 gdb::unique_xmalloc_ptr.
13783
13784 2018-02-09 Tom Tromey <tom@tromey.com>
13785
13786 * auto-load.c (execute_script_contents): Use std::string.
13787
13788 2018-02-09 Joel Brobecker <brobecker@adacore.com>
13789
13790 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13791 Python function, rather than a new command.
13792
13793 2018-02-08 Tom Tromey <tom@tromey.com>
13794
13795 * solib.c (solib_find_1): Use std::string.
13796 (solib_bfd_fopen): Use unique_xmalloc_ptr.
13797
13798 2018-02-08 Tom Tromey <tom@tromey.com>
13799
13800 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13801
13802 2018-02-08 Tom Tromey <tom@tromey.com>
13803
13804 * source.c (find_source_lines): Use gdb::def_vector.
13805
13806 2018-02-08 Tom Tromey <tom@tromey.com>
13807
13808 * macrocmd.c (struct temporary_macro_definition): New.
13809 (macro_define_command): Use temporary_macro_definition. Remove
13810 cleanups.
13811 (free_macro_definition_ptr): Remove.
13812
13813 2018-02-08 Tom Tromey <tom@tromey.com>
13814
13815 * macroexp.c (maybe_expand): Use std::string.
13816
13817 2018-02-08 Tom Tromey <tom@tromey.com>
13818
13819 * macroexp.c (struct macro_buffer): Add initializers for some
13820 members.
13821 (init_buffer, init_shared_buffer, free_buffer)
13822 (free_buffer_return_text): Remove.
13823 (macro_buffer): New constructors.
13824 (~macro_buffer): New destructor.
13825 (macro_buffer::set_shared): New method.
13826 (macro_buffer::resize_buffer, macro_buffer::appendc)
13827 (macro_buffer::appendmem): Now methods, not free functions.
13828 (set_token, append_tokens_without_splicing, stringify)
13829 (macro_stringify): Update.
13830 (gather_arguments): Change return type. Remove argc_p argument,
13831 add args_ptr argument. Use std::vector.
13832 (substitute_args): Remove argc argument. Accept std::vector.
13833 (expand): Update. Use std::vector.
13834 (scan, macro_expand, macro_expand_next): Update.
13835
13836 2018-02-08 Tom Tromey <tom@tromey.com>
13837
13838 * symtab.c (default_collect_symbol_completion_matches_break_on):
13839 Use unique_xmalloc_ptr.
13840 * macroscope.h: (sal_macro_scope, user_macro_scope)
13841 (default_macro_scope): Return unique_xmalloc_ptr.
13842 * macroscope.c (sal_macro_scope, user_macro_scope)
13843 (default_macro_scope): Return unique_xmalloc_ptr.
13844 * macroexp.h (macro_expand, macro_expand_once): Return
13845 unique_xmalloc_ptr.
13846 * macroexp.c (macro_expand, macro_expand_once): Return
13847 unique_xmalloc_ptr.
13848 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13849 (info_macro_command, info_macros_command): Use
13850 unique_xmalloc_ptr.
13851 * compile/compile-c-support.c (write_macro_definitions): Use
13852 unique_xmalloc_ptr.
13853 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13854
13855 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13856
13857 * value.c (value_static_field): Assign field type instead of
13858 containing type when returning an optimized out value.
13859
13860 2018-02-06 Yao Qi <yao.qi@linaro.org>
13861
13862 * ft32-tdep.c (ft32_read_pc): Remove.
13863 (ft32_write_pc): Remove.
13864 (ft32_gdbarch_init): Update.
13865 * m32r-tdep.c (m32r_read_pc): Remove.
13866 (m32r_gdbarch_init): Update.
13867 * mep-tdep.c (mep_read_pc): Remove.
13868 (mep_gdbarch_init): Update.
13869 * microblaze-tdep.c (microblaze_write_pc): Remove.
13870 (microblaze_gdbarch_init): Update.
13871 * mn10300-tdep.c (mn10300_read_pc): Remove.
13872 (mn10300_write_pc): Remove.
13873 (mn10300_gdbarch_init): Update.
13874 * moxie-tdep.c (moxie_read_pc): Remove.
13875 (moxie_write_pc): Remove.
13876 (moxie_gdbarch_init): Update.
13877
13878 2018-02-06 Yao Qi <yao.qi@linaro.org>
13879
13880 * expprint.c (print_subexp_standard): Handle
13881 OP_F77_UNDETERMINED_ARGLIST.
13882 (dump_subexp_body_standard): Likewise.
13883
13884 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13885
13886 * target-descriptions.c (tdesc_element_visitor) Add empty
13887 implementations.
13888 (tdesc_type): Move make_gdb_type from here.
13889 (tdesc_type_builtin): Likewise.
13890 (tdesc_type_vector): Likewise.
13891 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13892 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13893 (make_gdb_type_union): Likewise.
13894 (make_gdb_type_flags): Likewise.
13895 (make_gdb_type_enum): Likewise.
13896 (make_gdb_type): New function.
13897 (tdesc_register_type): Use static make_gdb_type.
13898
13899 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13900
13901 * infcmd.c (default_print_one_register_info): Align natural-format
13902 column values consistently one under another.
13903 (pad_to_column): New function.
13904
13905 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13906
13907 * dwarf2read.c (dwarf2_physname): Move commment.
13908
13909 2018-02-01 Leszek Swirski <leszeks@google.com>
13910
13911 * varobj.c (varobj_formatted_print_options): Allow recursive
13912 pretty printing if pretty printing is enabled.
13913
13914 2018-02-01 Leszek Swirski <leszeks@google.com>
13915
13916 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13917 names after a structop as a filename.
13918
13919 2018-02-01 Yao Qi <yao.qi@linaro.org>
13920
13921 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13922 (arm_record_coproc_data_proc): Likewise.
13923
13924 2018-02-01 Yao Qi <yao.qi@linaro.org>
13925
13926 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13927
13928 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
13929
13930 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13931 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13932
13933 2018-01-31 Pedro Alves <palves@redhat.com>
13934
13935 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13936 * inflow.c (child_terminal_save_inferior): Wrap reference to
13937 tcgetpgrp in HAVE_TERMIOS_H.
13938 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13939 _WIN32.
13940 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13941 always iterate over all inferiors.
13942 (gdbsim_cntrl_c): Adjust.
13943 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13944
13945 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13946
13947 * gdbtypes.c (lookup_array_range_type): Make sure the array's
13948 index type is objfile-owned if the element type is as well.
13949
13950 2018-01-31 Joel Brobecker <brobecker@adacore.com>
13951
13952 GDB 8.1 released.
13953
13954 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
13955
13956 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13957 "features/s390x-linux64.c".
13958 (_initialize_s390_linux_tdep): Remove initialization of tdescs
13959 s390_linux32 and s390x_linux64.
13960 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13961 default tdesc.
13962 * s390-tdep.c: Include "features/s390-linux32.c" and
13963 "features/s390x-linux64.c".
13964 (s390_tdesc_valid): Add check for tdesc_has_registers.
13965 (s390_gdbarch_init): Make sure there is always a valid tdesc.
13966 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13967 tdesc_s390x_linux64.
13968 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13969 tdesc_s390x_linux64 to...
13970 * s390-tdep.h: ...here.
13971
13972 2018-01-30 Pedro Alves <palves@redhat.com>
13973
13974 PR gdb/13211
13975 * config.in, configure: Regenerate.
13976 * configure.ac: Check for getpgid.
13977 * go32-nat.c (go32_pass_ctrlc): New.
13978 (go32_target): Install it.
13979 * inf-child.c (inf_child_target): Install
13980 child_terminal_save_inferior, child_pass_ctrlc and
13981 child_interrupt.
13982 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13983 (inf_ptrace_target): No longer install it.
13984 * infcmd.c (interrupt_target_1): Adjust.
13985 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13986 (child_interrupt): Declare.
13987 (inferior::terminal_state): New.
13988 * inflow.c (struct terminal_info): Update comments.
13989 (inferior_process_group): Delete.
13990 (terminal_is_ours): Delete.
13991 (gdb_tty_state): New.
13992 (child_terminal_init): Adjust.
13993 (is_gdb_terminal, sharing_input_terminal_1)
13994 (sharing_input_terminal): New functions.
13995 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
13996 Set the process's actual process group in the foreground if
13997 possible. Handle is_ours_for_output/is_ours distinction. Don't
13998 mark terminal as the inferior's if not sharing GDB's terminal.
13999 Don't check attach_flag.
14000 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14001 pass down a target_terminal_state.
14002 (child_terminal_save_inferior): New, factored out from ...
14003 (child_terminal_ours_1): ... this. Handle
14004 target_terminal_state::is_ours_for_output.
14005 (child_interrupt, child_pass_ctrlc): New.
14006 (inflow_inferior_exit): Clear the inferior's terminal_state.
14007 (copy_terminal_info): Copy the inferior's terminal state.
14008 (_initialize_inflow): Remove reference to terminal_is_ours.
14009 * inflow.h (inferior_process_group): Delete.
14010 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14011 * procfs.c (procfs_target): Don't install procfs_interrupt.
14012 (procfs_interrupt): Delete.
14013 * remote.c (remote_serial_quit_handler): Adjust.
14014 (remote_interrupt): Remove ptid parameter. Adjust.
14015 * target-delegates.c: Regenerate.
14016 * target.c: Include "terminal.h".
14017 (target_terminal::terminal_state): Rename to ...
14018 (target_terminal::m_terminal_state): ... this.
14019 (target_terminal::init): Adjust.
14020 (target_terminal::inferior): Adjust to per-inferior
14021 terminal_state.
14022 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14023 (target_terminal::ours, target_terminal::ours_for_output): Use
14024 target_terminal_is_ours_kind.
14025 (target_interrupt): Remove ptid parameter. Adjust.
14026 (default_target_pass_ctrlc): Adjust.
14027 * target.h (target_ops::to_terminal_save_inferior): New field.
14028 (target_ops::to_interrupt): Remove ptid_t parameter.
14029 (target_interrupt): Remove ptid_t parameter. Update comment.
14030 (target_pass_ctrlc): Update comment.
14031 * target/target.h (target_terminal_state): New scoped enum,
14032 factored out of ...
14033 (target_terminal::terminal_state): ... here.
14034 (target_terminal::inferior): Update comments.
14035 (target_terminal::restore_inferior): New.
14036 (target_terminal::is_inferior, target_terminal::is_ours)
14037 (target_terminal::is_ours_for_output): Adjust.
14038 (target_terminal::scoped_restore_terminal_state): Adjust to
14039 rename, and call restore_inferior() instead of inferior().
14040 (target_terminal::scoped_restore_terminal_state::m_state): Change
14041 type.
14042 (target_terminal::terminal_state): Rename to ...
14043 (target_terminal::m_terminal_state): ... this and change type.
14044
14045 2018-01-30 Pedro Alves <palves@redhat.com>
14046
14047 * linux-nat.c (wait_for_signal): New function.
14048 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14049 directly.
14050 (async_terminal_is_ours)
14051 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14052 (linux_nat_add_target): Don't override
14053 to_terminal_inferior/to_terminal_ours.
14054
14055 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
14056
14057 * remote.c (remote_follow_fork): Don't call "detach_inferior".
14058
14059 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
14060
14061 * dwarf2read.c (free_dwo_files): Add forward-declaration.
14062 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14063 dwarf2_per_objfile_free here.
14064 (dwarf2_per_objfile_free): Remove.
14065 (_initialize_dwarf2_read): Don't register
14066 dwarf2_per_objfile_free as a registry cleanup.
14067
14068 2018-01-27 Eli Zaretskii <eliz@gnu.org>
14069
14070 Avoid compilation errors in MinGW native builds
14071
14072 The error is triggered by including python-internal.h, and the
14073 error message is:
14074
14075 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14076 from build-gnulib/import/math.h:27,
14077 from d:/usr/Python26/include/pyport.h:235,
14078 from d:/usr/Python26/include/Python.h:58,
14079 from python/python-internal.h:94,
14080 from python/py-arch.c:24:
14081 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14082 using ::hypot;
14083 ^~~~~
14084
14085 This happens because Python headers define 'hypot' to expand t
14086 '_hypot' in the Windows builds.
14087 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14088 'hypoth'. This avoids a compilation error.
14089
14090 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14091
14092 * MAINTAINERS (Write After Approval): Fix ordering.
14093
14094 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14095
14096 * MAINTAINERS (Write After Approval): Add Alan Hayward.
14097
14098 2018-01-26 Alan Modra <amodra@gmail.com>
14099
14100 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14101 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14102 Remove nop. Make const. Comment.
14103 (powerpc32_plt_stub_so_2): New.
14104 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14105 Correct count. Update uses.
14106 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14107 Move common code reading PLT entry word. Correct
14108 powerpc32_plt_stub PLT address calculation.
14109 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14110 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14111 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14112 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14113 (ppc64_standard_linkage8): Likewise.
14114 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14115 Correct insns description.
14116 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14117
14118 2018-01-24 Pedro Alves <palves@redhat.com>
14119
14120 GCC PR libstdc++/83906
14121 * gdbtypes.c (operator==(const dynamic_prop &,
14122 const dynamic_prop &)): New.
14123 (operator==(const range_bounds &, const range_bounds &)): New.
14124 (check_types_equal): Use them instead of memcmp.
14125 * gdbtypes.h (operator==(const dynamic_prop &,
14126 const dynamic_prop &)): Declare.
14127 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14128 (operator==(const range_bounds &, const range_bounds &)): Declare.
14129 (operator!=(const range_bounds &, const range_bounds &)): Declare.
14130
14131 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14132
14133 * s390-linux-tdep.c (s390_record_address_mask)
14134 (s390_record_calc_disp_common, s390_record_calc_disp)
14135 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14136 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14137 (s390_process_record): Move to s390-tdep.c.
14138 (s390_linux_init_abi_any): Adjust.
14139 * s390-tdep.c (s390_record_address_mask)
14140 (s390_record_calc_disp_common, s390_record_calc_disp)
14141 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14142 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14143 (s390_process_record): Moved from s390-linux-tdep.c
14144 (s390_gdbarch_init): Adjust.
14145
14146 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14147
14148 * s390-linux-nat.c (s390-tdep.h): New include.
14149 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14150 (HFILES_NO_SRCDIR): Add s390-tdep.h.
14151 (ALLDEPFILES): Add s390-tdep.c.
14152 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14153 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14154 * s390-tdep.h: ...this. New file.
14155 * s390-linux-tdep.c (s390-tdep.h): New include.
14156 (_initialize_s390_tdep): Rename to...
14157 (_initialize_s390_linux_tdep): ...this and adjust.
14158 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14159 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14160 s390-tdep.h.
14161 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14162 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14163 (s390_is_partial_instruction, s390_software_single_step)
14164 (is_non_branch_ril, s390_displaced_step_copy_insn)
14165 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14166 (s390_prologue_data, s390_addr, s390_store, s390_load)
14167 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14168 (s390_register_call_saved, s390_guess_tracepoint_registers)
14169 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14170 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14171 (s390_pseudo_register_name, s390_pseudo_register_type)
14172 (s390_pseudo_register_read, s390_pseudo_register_write)
14173 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14174 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14175 (s390_addr_bits_remove, s390_address_class_type_flags)
14176 (s390_address_class_type_flags_to_name)
14177 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14178 (s390_function_arg_float, s390_function_arg_vector)
14179 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14180 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14181 (s390_frame_align, s390_register_return_value, s390_return_value)
14182 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14183 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14184 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14185 (s390_trad_frame_prev_register, s390_unwind_cache)
14186 (s390_prologue_frame_unwind_cache)
14187 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14188 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14189 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14190 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14191 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14192 (s390_frame_base_address, s390_local_base_address)
14193 (s390_frame_base, s390_gcc_target_options)
14194 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14195 (s390_validate_reg_range, s390_tdesc_valid)
14196 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14197 * s390-tdep.c: ...this. New file.
14198
14199 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14200
14201 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14202 (s390_process_record, s390_gdbarch_tdep_alloc)
14203 (s390_linux_init_abi_any): Use/set new hook.
14204
14205 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14206
14207 * s390-linux-tdep.c (osabi.h): New include.
14208 (s390_linux_init_abi_31, s390_linux_init_abi_64)
14209 (s390_linux_init_abi_any): New functions.
14210 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14211
14212 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14213
14214 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14215 tdesc_has_registers check
14216
14217 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14218
14219 * s390-linux-tdep.c (s390_tdesc_valid): New function.
14220 (s390_validate_reg_range): New macro.
14221 (s390_gdbarch_init): Adjust.
14222
14223 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14224
14225 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14226 (s390_gdbarch_tdep_alloc): Adjust.
14227 (s390_gdbarch_init): Adjust.
14228
14229 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14230
14231 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14232 <have_tdb>: Change type to bool.
14233 (s390_gdbarch_tdep_alloc): Adjust.
14234 (s390_gdbarch_init): Adjust.
14235
14236 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14237
14238 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14239 (gdbarch_tdep) <have_upper, have_vx>: New fields.
14240 (s390_gdbarch_tdep_alloc): New function.
14241 (s390_gdbarch_init): Allocate tdep at start and use its fields
14242 instead of separate variables.
14243
14244 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14245
14246 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14247 when looking for cached gdbarch and add comment for remaining.
14248
14249 2018-01-22 Pedro Alves <palves@redhat.com>
14250 Sergio Durigan Junior <sergiodj@redhat.com>
14251
14252 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14253 case.
14254
14255 2018-01-22 Maciej W. Rozycki <macro@mips.com>
14256
14257 * MAINTAINERS: Update my company e-mail address.
14258
14259 2018-01-22 Yao Qi <yao.qi@linaro.org>
14260
14261 * regcache.c (cooked_write_test): New function.
14262 (_initialize_regcache): Register the test.
14263
14264 2018-01-22 Yao Qi <yao.qi@linaro.org>
14265
14266 * ia64-tdep.c (ia64_pseudo_register_read): Call
14267 regcache->cooked_read instead of regcache_cooked_read_unsigned.
14268 * m32c-tdep.c (m32c_cat_read): Likewise.
14269 (m32c_r3r2r1r0_read): Likewise.
14270 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14271 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14272
14273 2018-01-22 Yao Qi <yao.qi@linaro.org>
14274
14275 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14276 method raw_read instead of regcache_raw_read.
14277 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14278 * arm-tdep.c (arm_neon_quad_read): Likewise.
14279 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14280 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14281 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14282 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14283 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14284 (i386_pseudo_register_read_into_value): Likewise.
14285 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14286 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14287 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14288 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14289 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14290 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14291 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14292 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14293 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14294
14295 2018-01-22 Yao Qi <yao.qi@linaro.org>
14296
14297 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14298 * configure.tgt: Remove target mt.
14299 * mt-tdep.c: Remove.
14300 * regcache.c (cooked_read_test): Remove the check for mt.
14301
14302 2018-01-22 Yao Qi <yao.qi@linaro.org>
14303
14304 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14305 instead of gdbarch_pseudo_register_read_value.
14306
14307 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14308
14309 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14310 language is Ada.
14311
14312 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14313
14314 * linespec.c (create_sals_line_offset): Remove code that preserved
14315 the symtab_and_line's line number.
14316
14317 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14318
14319 * varobj.c (varobj_create): Don't set valid_block when creating a
14320 floating varobj.
14321
14322 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14323
14324 * varobj.c (varobj_create): Remove out of date comment.
14325
14326 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14327
14328 PR mi/20395
14329 * ada-exp.y (write_var_from_sym): Pass extra parameter when
14330 updating innermost block.
14331 * parse.c (innermost_block_tracker::update): Take extra type
14332 parameter, and check types match before updating innermost block.
14333 (write_dollar_variable): Update innermost block for registers.
14334 * parser-defs.h (enum innermost_block_tracker_type): New enum.
14335 (innermost_block_tracker::innermost_block_tracker): Initialise
14336 m_types member.
14337 (innermost_block_tracker::reset): Take type parameter.
14338 (innermost_block_tracker::update): Take type parameter, and pass
14339 type through as needed.
14340 (innermost_block_tracker::m_types): New member.
14341 * varobj.c (varobj_create): Pass type when reseting innermost
14342 block.
14343
14344 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14345
14346 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14347 * ada-lang.c (resolve_subexp): Likewise.
14348 * breakpoint.c (set_breakpoint_condition) Likewise.
14349 (watch_command_1) Likewise.
14350 * c-exp.y (variable): Likewise.
14351 * d-exp.y (PrimaryExpression): Likewise.
14352 * f-exp.y (variable): Likewise.
14353 * go-exp.y (variable): Likewise.
14354 * m2-exp.y (variable): Likewise.
14355 * objfiles.c (objfile::~objfile): Likewise.
14356 * p-exp.y (variable): Likewise.
14357 * parse.c (innermost_block): Change type.
14358 * parser-defs.h (class innermost_block_tracker): New.
14359 (innermost_block): Change to innermost_block_tracker.
14360 * printcmd.c (display_command): Switch to innermost_block API.
14361 (do_one_display): Likewise.
14362 * rust-exp.y (do_one_display): Likewise.
14363 * symfile.c (clear_symtab_users): Likewise.
14364 * varobj.c (varobj_create): Switch to innermost_block API, replace
14365 use of innermost_block with block stored on varobj object.
14366
14367 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14368
14369 * expression.h (innermost_block): Remove declaration.
14370 * varobj.c: Add 'parser-defs.h' include.
14371
14372 2018-01-19 Tom Tromey <tom@tromey.com>
14373
14374 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14375 symbols in the static and global blocks.
14376
14377 2018-01-19 James Clarke <jrtc27@jrtc27.com>
14378
14379 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14380 gdb_ptrace.h, and move including gdb_wait.h ...
14381 * nat/linux-ptrace.h: ... to here.
14382
14383 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14384
14385 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14386 inf_ptrace_detach_success.
14387 (inf_ptrace_detach_success): Add inferior parameter, use it
14388 instead of inferior_ptid, pass it to detach_inferior.
14389 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14390 parameter.
14391 * inferior.c (detach_inferior): Add overload that takes an
14392 inferior object.
14393 * inferior.h (detach_inferior): Likewise.
14394 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14395 use inferior_ptid, adjust call to inf_ptrace_detach_success.
14396 * linux-thread-db.c (thread_db_detach): Use inf parameter.
14397
14398 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14399
14400 * target.h (struct target_ops) <to_detach>: Add inferior
14401 parameter.
14402 (target_detach): Likewise.
14403 * target.c (dispose_inferior): Pass inferior down.
14404 (target_detach): Pass inferior down. Assert that it is equal to
14405 the current inferior.
14406 * aix-thread.c (aix_thread_detach): Pass inferior down.
14407 * corefile.c (core_file_command): Pass current_inferior() down.
14408 * corelow.c (core_detach): Add inferior parameter.
14409 * darwin-nat.c (darwin_detach): Likewise.
14410 * gnu-nat.c (gnu_detach): Likewise.
14411 * inf-ptrace.c (inf_ptrace_detach): Likewise.
14412 * infcmd.c (detach_command): Pass current_inferior() down to
14413 target_detach.
14414 * infrun.c (follow_fork_inferior): Pass parent_inf to
14415 target_detach.
14416 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14417 target_detach.
14418 * linux-nat.c (linux_nat_detach): Add inferior parameter.
14419 * linux-thread-db.c (thread_db_detach): Likewise.
14420 * nto-procfs.c (procfs_detach): Likewise.
14421 * procfs.c (procfs_detach): Likewise.
14422 * record.c (record_detach): Likewise.
14423 * record.h (struct inferior): Forward-declare.
14424 (record_detach): Add inferior parameter.
14425 * remote-sim.c (gdbsim_detach): Likewise.
14426 * remote.c (remote_detach_1): Likewise.
14427 (remote_detach): Likewise.
14428 (extended_remote_detach): Likewise.
14429 * sol-thread.c (sol_thread_detach): Likewise.
14430 * target-debug.h (target_debug_print_inferior_p): New macro.
14431 * target-delegates.c: Re-generate.
14432 * top.c (kill_or_detach): Pass inferior down to target_detach.
14433 * windows-nat.c (windows_detach): Add inferior parameter.
14434
14435 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14436
14437 * target.h (struct target_ops) <to_detach>: Remove args
14438 parameter.
14439 (target_detach): Likewise.
14440 * target.c (dispose_inferior): Adjust.
14441 (target_detach): Remove args parameter, adjust.
14442 * aix-thread.c (aix_thread_detach): Adjust.
14443 * corefile.c (core_file_command): Adjust.
14444 * corelow.c (core_detach): Adjust.
14445 * darwin-nat.c (darwin_detach): Adjust.
14446 * gnu-nat.c (gnu_detach): Adjust.
14447 * inf-ptrace.c (inf_ptrace_detach): Adjust.
14448 * infcmd.c (detach_command): Adjust
14449 * infrun.c (follow_fork_inferior): Adjust.
14450 (handle_vfork_child_exec_or_exit): Adjust.
14451 * linux-fork.c (linux_fork_detach): Remove args parameter.
14452 * linux-fork.h (linux_fork_detach): Likewise.
14453 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14454 * linux-thread-db.c (thread_db_detach): Likewise.
14455 * nto-procfs.c (procfs_detach): Likewise.
14456 * procfs.c (procfs_detach): Likewise.
14457 (do_detach): Remove signo parameter.
14458 * record.c (record_detach): Remove args parameter.
14459 * record.h (record_detach): Likewise.
14460 * remote-sim.c (gdbsim_detach): Likewise.
14461 * remote.c (remote_detach_1): Likewise.
14462 (remote_detach): Likewise.
14463 (extended_remote_detach): Likewise.
14464 * sol-thread.c (sol_thread_detach): Likewise.
14465 * target-delegates.c: Re-generate.
14466 * top.c (struct qt_args) <args>: Remove field.
14467 (kill_or_detach): Don't pass args.
14468 (quit_force): Don't set args.
14469 * windows-nat.c (windows_detach): Remove args parameter.
14470
14471 2018-01-19 Yao Qi <yao.qi@linaro.org>
14472
14473 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14474 (arm_linux_init_abi): Install it.
14475
14476 2018-01-19 Yao Qi <yao.qi@linaro.org>
14477
14478 * osabi.c (gdb_osabi_names): Extend the regexp for
14479 arm-linux-gnueabihf.
14480
14481 2018-01-18 Yao Qi <yao.qi@linaro.org>
14482
14483 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14484 m_abbrevs.
14485 (abbrev_table::add_abbrev): Update.
14486 (abbrev_table::lookup_abbrev): Update.
14487
14488 2018-01-18 Yao Qi <yao.qi@linaro.org>
14489
14490 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14491
14492 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
14493
14494 * compile/compile.c (compile_to_object): Convert "triplet_rx"
14495 to "std::string".
14496
14497 2018-01-17 Tom Tromey <tom@tromey.com>
14498
14499 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
14500
14501 2018-01-17 Tom Tromey <tom@tromey.com>
14502
14503 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14504 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14505 (create_array_type_with_stride): Update.
14506 * dwarf2read.c (set_die_type): Update.
14507
14508 2018-01-17 Tom Tromey <tom@tromey.com>
14509
14510 * dwarf2read.c (delayed_method_info): Remove typedef.
14511 (dwarf2_cu::method_info): Now a std::vector.
14512 (add_to_method_list): Update.
14513 (free_delayed_list): Remove.
14514 (compute_delayed_physnames): Update.
14515 (process_full_comp_unit, process_full_type_unit): Clear the method
14516 list. Remove cleanups.
14517 (psymtab_include_file_name): Add name_holder parameter. Use
14518 unique_xmalloc_ptr.
14519 (dwarf_decode_lines): Update.
14520
14521 2018-01-17 Tom Tromey <tom@tromey.com>
14522 Simon Marchi <simon.marchi@ericsson.com>
14523
14524 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14525 (dwarf2_per_objfile::free_cached_comp_units)
14526 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14527 (init_cutu_and_read_dies_no_follow): Update.
14528 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14529 (dwarf2_cu::~dwarf2_cu): New.
14530 (free_heap_comp_unit, free_stack_comp_unit): Remove.
14531 (age_cached_comp_units, free_one_cached_comp_unit): Update.
14532
14533 2018-01-17 Tom Tromey <tom@tromey.com>
14534 Simon Marchi <simon.marchi@ericsson.com>
14535
14536 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14537 (struct die_reader_specs) <abbrev_table>: New member.
14538 (struct abbrev_table): Add constructor.
14539 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14540 <abbrev_obstack>: Now an auto_obstack.
14541 (abbrev_table_up): New typedef.
14542 (init_cu_die_reader): Add abbrev_table parameter.
14543 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14544 Add result_dwo_abbrev_table.
14545 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14546 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14547 Update.
14548 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14549 parameter.
14550 (skip_children): Update.
14551 (abbrev_table::alloc_abbrev): Rename from
14552 abbrev_table_alloc_abbrev.
14553 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14554 (abbrev_table::lookup_abbrev): Rename from
14555 abbrev_table_lookup_abbrev.
14556 (abbrev_table_read_table): Return abbrev_table_up.
14557 (abbrev_table_free, abbrev_table_free_cleanup)
14558 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14559 (load_partial_dies): Update.
14560
14561 2018-01-17 Tom Tromey <tom@tromey.com>
14562
14563 * dwarf2read.c (dwarf2_compute_name): Update comment.
14564 (read_func_scope, read_variable): Update.
14565 (new_symbol): Remove.
14566 (new_symbol_full): Rename to new_symbol.
14567
14568 2018-01-17 Mike Gulick <mgulick@mathworks.com>
14569
14570 PR gdb/16577
14571 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14572 a warning instead of throwing an error, set section size to 0 and return
14573 NULL.
14574 * gdb_bfd.h (gdb_bfd_map_section): Update description.
14575
14576 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14577
14578 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14579 std::string.
14580 (linux_ptrace_attach_fail_reason_string): Likewise.
14581 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14582 Likewise.
14583 (linux_ptrace_attach_fail_reason_string): Likewise.
14584 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14585
14586 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14587
14588 * linux-nat.c (linux_nat_attach): Remove xstrdup.
14589
14590 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
14591
14592 PR gdb/21559
14593 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14594 checking for fs_base/gs_base fields in struct user_regs_struct.
14595 * configure: Regenerate.
14596
14597 2018-01-17 Yao Qi <yao.qi@linaro.org>
14598
14599 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14600 function.
14601 (aarch64_linux_init_abi): Install it to gdbarch hook
14602 gcc_target_options.
14603
14604 2018-01-15 Pedro Alves <palves@redhat.com>
14605
14606 * common/signals-state-save-restore.c
14607 (save_original_signals_state): Fix typos.
14608
14609 2017-01-12 Tom Tromey <tom@tromey.com>
14610 Sergio Durigan Junior <sergiodj@redhat.com>
14611
14612 * Makefile.in (install-only): Install gdb-add-index.
14613
14614 2018-01-12 John Baldwin <jhb@FreeBSD.org>
14615
14616 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14617
14618 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
14619
14620 * infrun.c (keep_going_pass_signal): Clear step-over info when
14621 insert_breakpoints fails.
14622
14623 2018-01-11 Pedro Alves <palves@redhat.com>
14624
14625 PR gdb/22583
14626 * infrun.c (resume): Rename to ...
14627 (resume_1): ... this.
14628 (resume): Reimplement as wrapper around resume_1.
14629
14630 2018-01-11 Pedro Alves <palves@redhat.com>
14631
14632 PR remote/22597
14633 * remote.c (remote_parse_stop_reply): Default to the last-set
14634 general thread instead of to 'magic_null_ptid'.
14635
14636 2018-01-10 Pedro Alves <palves@redhat.com>
14637
14638 * language.h (language_get_symbol_name_matcher): Rename ...
14639 (get_symbol_name_matcher): ... this.
14640 * language.c (language_get_symbol_name_matcher): Ditto.
14641 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14642 callers adjusted.
14643
14644 2018-01-10 Pedro Alves <palves@redhat.com>
14645
14646 PR gdb/22670
14647 * dwarf2read.c
14648 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14649 Adjust to use language_get_symbol_name_matcher instead of
14650 language_defn::la_get_symbol_name_matcher.
14651 * language.c (language_get_symbol_name_matcher): If in Ada mode
14652 and the lookup name is a verbatim match, return Ada's matcher.
14653 * language.h (language_get_symbol_name_matcher): Adjust comment.
14654 (ada_lookup_name_info::verbatim_p):: New method.
14655
14656 2018-01-10 Pedro Alves <palves@redhat.com>
14657
14658 PR gdb/22670
14659 * ada-lang.c (ada_collect_symbol_completion_matches): If the
14660 minsym's language is language_auto or language_cplus, pass down
14661 language_ada instead.
14662 * symtab.c (compare_symbol_name): Don't frob symbol language here.
14663
14664 2018-01-10 Pedro Alves <palves@redhat.com>
14665
14666 PR gdb/22670
14667 * minsyms.c (linkage_name_str): New function.
14668 (iterate_over_minimal_symbols): Use it.
14669
14670 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14671
14672 * NEWS: Document that 'info proc' now works on FreeBSD.
14673
14674 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14675
14676 * configure.ac: Check for kinfo_getfile in libutil.
14677 * configure: Regenerate.
14678 * config.in: Regenerate.
14679 * fbsd-nat.c: Include "fbsd-tdep.h".
14680 (fbsd_fetch_cmdline): New.
14681 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14682 rather than calling error.
14683 (fbsd_info_proc): New.
14684 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14685 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14686 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14687
14688 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14689
14690 * fbsd-nat.c (struct free_deleter): Remove.
14691 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14692
14693 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14694
14695 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14696 NULL for an empty pathname.
14697
14698 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14699
14700 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14701 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14702 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14703 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14704 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14705 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14706 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14707 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14708 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14709 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14710 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14711 (fbsd_core_fetch_timeval, fbsd_print_sigset)
14712 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14713 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
14714 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14715
14716 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
14717
14718 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14719 (gnu_xfer_auxv): New function.
14720 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14721 TARGET_OBJECT_AUXV.
14722
14723 2018-01-08 Yao Qi <yao.qi@linaro.org>
14724 Simon Marchi <simon.marchi@ericsson.com>
14725
14726 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14727 common/selftest.c.
14728 (COMMON_OBS): Remove selftest.o.
14729 * configure.ac: Append selftest-arch.c and common/selftest.c to
14730 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
14731 * configure: Re-generated.
14732 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14733 GDB_SELF_TEST.
14734 (maintenance_info_selftests): Likewise.
14735
14736 2018-01-08 Xavier Roirand <roirand@adacore.com>
14737
14738 * ada-valprint.c (val_print_packed_array_elements): Use
14739 proper number of elements when printing an array indexed
14740 by an enumeration type.
14741
14742 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14743
14744 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14745 (dw2_get_file_names_reader): Adjust.
14746 (lookup_dwo_signatured_type): Adjust.
14747 (lookup_dwp_signatured_type): Adjust.
14748 (lookup_signatured_type): Adjust.
14749 (create_type_unit_group): Adjust.
14750 (get_type_unit_group): Adjust.
14751 (process_psymtab_comp_unit_reader): Adjust.
14752 (build_type_psymtabs_reader): Adjust.
14753 (scan_partial_symbols): Adjust.
14754 (add_partial_symbol): Adjust.
14755 (add_partial_subprogram): Adjust.
14756 (peek_die_abbrev): Adjust.
14757 (fixup_go_packaging): Adjust.
14758 (process_imported_unit_die): Adjust.
14759 (dwarf2_compute_name): Adjust.
14760 (dwarf2_physname): Adjust.
14761 (read_import_statement): Adjust.
14762 (handle_DW_AT_stmt_list): Adjust.
14763 (read_file_scope): Adjust.
14764 (read_func_scope): Adjust.
14765 (read_lexical_block_scope): Adjust.
14766 (read_call_site_scope): Adjust.
14767 (read_variable): Adjust.
14768 (dwarf2_rnglists_process): Adjust.
14769 (dwarf2_ranges_process): Adjust.
14770 (dwarf2_ranges_read): Adjust.
14771 (dwarf2_get_pc_bounds): Adjust.
14772 (dwarf2_record_block_ranges): Adjust.
14773 (dwarf2_add_field): Adjust.
14774 (dwarf2_add_member_fn): Adjust.
14775 (read_structure_type): Adjust.
14776 (process_structure_scope): Adjust.
14777 (read_enumeration_type): Adjust.
14778 (read_array_type): Adjust.
14779 (mark_common_block_symbol_computed): Adjust.
14780 (read_common_block): Adjust.
14781 (read_namespace_type): Adjust.
14782 (read_namespace): Adjust.
14783 (read_module_type): Adjust.
14784 (read_tag_pointer_type): Adjust.
14785 (read_tag_ptr_to_member_type): Adjust.
14786 (read_tag_string_type): Adjust.
14787 (read_subroutine_type): Adjust.
14788 (read_typedef): Adjust.
14789 (read_base_type): Adjust.
14790 (attr_to_dynamic_prop): Adjust.
14791 (read_subrange_type): Adjust.
14792 (read_unspecified_type): Adjust.
14793 (dwarf2_read_abbrevs): Adjust.
14794 (load_partial_dies): Adjust.
14795 (read_partial_die): Adjust.
14796 (find_partial_die): Adjust.
14797 (guess_partial_die_structure_name): Adjust.
14798 (fixup_partial_die): Adjust.
14799 (read_attribute_value): Adjust.
14800 (read_addr_index): Adjust.
14801 (read_addr_index_from_leb128): Adjust.
14802 (read_str_index): Adjust.
14803 (dwarf2_string_attr): Adjust.
14804 (get_debug_line_section): Adjust.
14805 (dwarf_decode_line_header): Adjust.
14806 (lnp_state_machine::check_line_address): Adjust.
14807 (dwarf_decode_lines_1): Adjust.
14808 (dwarf_decode_lines): Adjust.
14809 (dwarf2_start_symtab): Adjust.
14810 (var_decode_location): Adjust.
14811 (new_symbol_full): Adjust.
14812 (dwarf2_const_value_data): Adjust.
14813 (dwarf2_const_value_attr): Adjust.
14814 (dwarf2_const_value): Adjust.
14815 (die_type): Adjust.
14816 (die_containing_type): Adjust.
14817 (build_error_marker_type): Adjust.
14818 (lookup_die_type): Adjust.
14819 (guess_full_die_structure_name): Adjust.
14820 (anonymous_struct_prefix): Adjust.
14821 (determine_prefix): Adjust.
14822 (dwarf2_name): Adjust.
14823 (follow_die_ref_or_sig): Adjust.
14824 (follow_die_offset): Adjust.
14825 (follow_die_ref): Adjust.
14826 (follow_die_sig_1): Adjust.
14827 (follow_die_sig): Adjust.
14828 (get_signatured_type): Adjust.
14829 (get_DW_AT_signature_type): Adjust.
14830 (decode_locdesc): Adjust.
14831 (dwarf_decode_macros): Adjust.
14832 (cu_debug_loc_section): Adjust.
14833 (fill_in_loclist_baton): Adjust.
14834 (dwarf2_symbol_mark_computed): Adjust.
14835 (init_one_comp_unit): Don't assign
14836 dwarf2_cu::dwarf2_per_objfile.
14837 (set_die_type): Adjust.
14838
14839 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14840
14841 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14842 <dwarf2_per_objfile>: New field.
14843 (dwarf2_per_objfile): Remove global.
14844 (get_dwarf2_per_objfile): New function.
14845 (set_dwarf2_per_objfile): New function.
14846 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14847 dwarf2_per_objfile.
14848 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14849 (read_abbrev_offset): Likewise.
14850 (read_indirect_string): Likewise.
14851 (read_indirect_line_string): Likewise.
14852 (read_indirect_string_at_offset): Likewise.
14853 (read_indirect_string_from_dwz): Likewise.
14854 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14855 dwarf2_per_objfile.
14856 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14857 (create_all_comp_units): Change objfile parameter to
14858 dwarf2_per_objfile.
14859 (create_all_type_units): Likewise.
14860 (process_queue): Add dwarf2_per_objfile parameter.
14861 (read_and_check_comp_unit_head): Likewise.
14862 (lookup_dwo_unit_in_dwp): Likewise.
14863 (get_dwp_file): Likewise.
14864 (process_cu_includes): Likewise.
14865 (struct free_dwo_file_cleanup_data): New struct.
14866 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14867 set_dwarf2_per_objfile.
14868 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14869 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14870 context, adjust calls.
14871 (dw2_instantiate_symtab): Likewise.
14872 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14873 (dw2_get_cu): Likewise.
14874 (create_cu_from_index_list): Change objfile parameter to
14875 dwarf2_per_objfile.
14876 (create_cus_from_index_list): Get dwarf2_per_objfile from
14877 context, adjust calls.
14878 (create_cus_from_index): Likewise.
14879 (create_signatured_type_table_from_index): Change objfile
14880 parameter to dwarf2_per_objfile.
14881 (create_signatured_type_table_from_debug_names): Change objfile
14882 parameter to dwarf2_per_objfile.
14883 (create_addrmap_from_index): Likewise.
14884 (create_addrmap_from_aranges): Likewise.
14885 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14886 (dw2_setup): Remove.
14887 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14888 context.
14889 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14890 get_dwarf2_per_objfile.
14891 (dw2_forget_cached_source_info): Likewise.
14892 (dw2_map_symtabs_matching_filename): Likewise.
14893 (struct dw2_symtab_iterator) <index>: Remove.
14894 <dwarf2_per_objfile>: New field.
14895 (dw2_symtab_iter_init): Replace index parameter with
14896 dwarf2_per_objfile.
14897 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14898 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14899 (dw2_print_stats): Likewise.
14900 (dw2_dump): Likewise.
14901 (dw2_expand_symtabs_for_function): Likewise.
14902 (dw2_expand_all_symtabs): Likewise.
14903 (dw2_expand_symtabs_with_fullname): Likewise.
14904 (dw2_expand_marked_cus): Replace index and objfile parameters
14905 with dwarf2_per_objfile.
14906 (dw_expand_symtabs_matching_file_matcher): Add
14907 dwarf2_per_objfile parameter and adjust calls.
14908 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14909 adjust calls.
14910 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14911 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14912 adjust calls.
14913 (create_cus_from_debug_names_list): Replace objfile parameter
14914 with dwarf2_per_objfile and adjust calls.
14915 (create_cus_from_debug_names): Likewise.
14916 (dwarf2_read_debug_names): Likewise.
14917 (mapped_debug_names::namei_to_name): Adjust call.
14918 (dw2_debug_names_iterator::next): Likewise.
14919 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14920 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14921 (dw2_debug_names_dump): Likewise.
14922 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14923 (dw2_debug_names_expand_symtabs_matching): Likewise.
14924 (dwarf2_initialize_objfile): Likewise.
14925 (dwarf2_build_psymtabs): Likewise.
14926 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14927 this_cu.
14928 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14929 (read_and_check_comp_unit_head): Likewise.
14930 (read_abbrev_offset): Likewise.
14931 (create_debug_type_hash_table): Likewise.
14932 (create_debug_types_hash_table): Likewise.
14933 (create_all_type_units): Replace objfile parameter with
14934 dwarf2_per_objfile.
14935 (add_type_unit): Add dwarf2_per_objfile parameter.
14936 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14937 with dwarf2_per_objfile.
14938 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14939 (lookup_dwp_signatured_type): Likewise.
14940 (lookup_signatured_type): Likewise.
14941 (read_cutu_die_from_dwo): Likewise.
14942 (init_tu_and_read_dwo_dies): Likewise.
14943 (init_cutu_and_read_dies): Likewise.
14944 (init_cutu_and_read_dies_no_follow): Likewise.
14945 (allocate_type_unit_groups_table): Add objfile parameter.
14946 (create_type_unit_group): Use dwarf2_per_objfile from cu.
14947 (get_type_unit_group): Likewise.
14948 (process_psymtab_comp_unit): Update call.
14949 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14950 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14951 (print_tu_stats): Likewise.
14952 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14953 in void* parameter.
14954 (build_type_psymtabs): Change objfile parameter to
14955 dwarf2_per_objfile.
14956 (process_skeletonless_type_unit): Use dwarf2_per_objfile
14957 passed in void* parameter.
14958 (process_skeletonless_type_units): Change objfile parameter to
14959 dwarf2_per_objfile.
14960 (set_partial_user): Likewise.
14961 (dwarf2_build_psymtabs_hard): Likewise.
14962 (read_comp_units_from_section): Likewise.
14963 (create_all_comp_units): Likewise.
14964 (scan_partial_symbols): Update calls.
14965 (add_partial_symbol): Likewise.
14966 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14967 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14968 (process_queue): Add dwarf2_per_objfile parameter.
14969 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14970 (compute_compunit_symtab_includes): Likewise.
14971 (process_cu_includes): Add dwarf2_per_objfile parameter.
14972 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14973 (process_full_type_unit): Likewise.
14974 (process_imported_unit_die): Update call.
14975 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14976 (read_file_scope): Likewise.
14977 (allocate_dwo_file_hash_table): Add objfile parameter.
14978 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14979 (create_cus_hash_table): Likewise.
14980 (create_dwp_hash_table): Likewise.
14981 (create_dwo_unit_in_dwp_v1): Likewise.
14982 (create_dwp_v2_section): Likewise.
14983 (create_dwo_unit_in_dwp_v2): Likewise.
14984 (lookup_dwo_unit_in_dwp): Likewise.
14985 (try_open_dwop_file): Likewise.
14986 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14987 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14988 cleanup to include a reference to dwarf2_per_objfile.
14989 (open_dwp_file): Add dwarf2_per_objfile parameter.
14990 (open_and_init_dwp_file): Likewise.
14991 (get_dwp_file): Likewise.
14992 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14993 (queue_and_load_all_dwo_tus): Update call.
14994 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14995 data.
14996 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14997 (dwarf2_ranges_process): Likewise.
14998 (dwarf2_get_pc_bounds): Likewise.
14999 (mark_common_block_symbol_computed): Likewise.
15000 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15001 (dwarf2_read_abbrevs): Update call.
15002 (read_partial_die): Use dwarf2_per_objfile from cu.
15003 (find_partial_die): Likewise.
15004 (fixup_partial_die): Likewise.
15005 (read_attribute_value): Likewise.
15006 (read_indirect_string_at_offset_from): Add objfile parameter.
15007 (read_indirect_string_at_offset): Add dwarf2_per_objfile
15008 parameter.
15009 (read_indirect_string_from_dwz): Add objfile parameter.
15010 (read_indirect_string): Add objfile parameter.
15011 (read_addr_index_1): Add dwarf2_per_objfile parameter.
15012 (read_addr_index): Use dwarf2_per_objfile from cu.
15013 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15014 call dw2_setup.
15015 (read_str_index): Use dwarf2_per_objfile from cu.
15016 (get_debug_line_section): Likewise.
15017 (read_formatted_entries): Add dwarf2_per_objfile parameter.
15018 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15019 (new_symbol_full): Use dwarf2_per_objfile from cu.
15020 (build_error_marker_type): Likewise.
15021 (lookup_die_type): Likewise.
15022 (determine_prefix): Likewise.
15023 (follow_die_offset): Likewise.
15024 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15025 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15026 (dwarf2_fetch_die_type_sect_off): Likewise.
15027 (dwarf2_get_die_type): Likewise.
15028 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15029 (get_signatured_type): Likewise.
15030 (get_DW_AT_signature_type): Likewise.
15031 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15032 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15033 (cu_debug_loc_section): Likewise.
15034 (fill_in_loclist_baton): Likewise.
15035 (dwarf2_symbol_mark_computed): Likewise.
15036 (dwarf2_find_containing_comp_unit): Change objfile parameter to
15037 dwarf2_per_objfile.
15038 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15039 parameter.
15040 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15041 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15042 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15043 (set_die_type): Use dwarf2_free_objfile from cu.
15044 (get_die_type_at_offset): Likewise.
15045 (dwarf2_per_objfile_free): Don't assign global variable.
15046 (debug_names) <constructor>: Add dwarf2_per_objfile
15047 parameter, update m_debugstrlookup construction.
15048 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15049 parameter.
15050 <m_dwarf2_per_objfile>: New field.
15051 <lookup>: Use m_dwarf2_per_objfile.
15052 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15053 (psyms_seen_size): Likewise.
15054 (write_gdbindex): Replace objfile parameter with
15055 dwarf2_per_objfile.
15056 (write_debug_names): Likewise.
15057 (write_psymtabs_to_index): Likewise.
15058 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15059 calls.
15060
15061 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15062
15063 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15064 <dwarf2_per_objfile>: New field.
15065 (struct dwarf2_per_cu_data) <objfile>: Remove.
15066 <dwarf2_per_objfile>: New field.
15067 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15068 of objfile.
15069 (create_signatured_type_table_from_index): Likewise.
15070 (create_debug_type_hash_table): Likewise.
15071 (fill_in_sig_entry_from_dwo_entry): Likewise.
15072 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15073 (create_type_unit_group): Assign dwarf2_per_objfile instead of
15074 objfile.
15075 (create_partial_symtab): Access objfile through
15076 dwarf2_per_objfile.
15077 (process_psymtab_comp_unit_reader): Likewise.
15078 (read_comp_units_from_section): Likewise.
15079 (scan_partial_symbols): Likewise.
15080 (add_partial_symbol): Likewise.
15081 (add_partial_subprogram): Likewise.
15082 (peek_die_abbrev): Likewise.
15083 (fixup_go_packaging): Likewise.
15084 (process_full_comp_unit): Likewise.
15085 (process_full_type_unit): Likewise.
15086 (process_imported_unit_die): Likewise.
15087 (dwarf2_compute_name): Likewise.
15088 (dwarf2_physname): Likewise.
15089 (read_import_statement): Likewise.
15090 (create_cus_hash_table): Assign dwarf2_physname instead of
15091 objfile.
15092 (read_func_scope): Access objfile through dwarf2_per_objfile.
15093 (read_lexical_block_scope): Likewise.
15094 (read_call_site_scope): Likewise.
15095 (read_variable): Likewise.
15096 (dwarf2_rnglists_process): Likewise.
15097 (dwarf2_ranges_process): Likewise.
15098 (dwarf2_ranges_read): Likewise.
15099 (dwarf2_record_block_ranges): Likewise.
15100 (dwarf2_add_field): Likewise.
15101 (dwarf2_add_member_fn): Likewise.
15102 (read_structure_type): Likewise.
15103 (process_structure_scope): Likewise.
15104 (read_enumeration_type): Likewise.
15105 (read_array_type): Likewise.
15106 (read_common_block): Likewise.
15107 (read_namespace_type): Likewise.
15108 (read_namespace): Likewise.
15109 (read_module_type): Likewise.
15110 (read_tag_pointer_type): Likewise.
15111 (read_tag_ptr_to_member_type): Likewise.
15112 (read_tag_string_type): Likewise.
15113 (read_subroutine_type): Likewise.
15114 (read_typedef): Likewise.
15115 (read_base_type): Likewise.
15116 (attr_to_dynamic_prop): Likewise.
15117 (read_subrange_type): Likewise.
15118 (read_unspecified_type): Likewise.
15119 (load_partial_dies): Likewise.
15120 (read_partial_die): Likewise.
15121 (find_partial_die): Likewise.
15122 (guess_partial_die_structure_name): Likewise.
15123 (fixup_partial_die): Likewise.
15124 (read_attribute_value): Likewise.
15125 (read_addr_index_from_leb128): Likewise.
15126 (dwarf2_read_addr_index): Likewise.
15127 (dwarf2_string_attr): Likewise.
15128 (lnp_state_machine::check_line_address): Likewise.
15129 (dwarf_decode_lines_1): Likewise.
15130 (dwarf_decode_lines): Likewise.
15131 (dwarf2_start_symtab): Likewise.
15132 (var_decode_location): Likewise.
15133 (new_symbol_full): Likewise.
15134 (dwarf2_const_value_data): Likewise.
15135 (dwarf2_const_value_attr): Likewise.
15136 (dwarf2_const_value): Likewise.
15137 (die_type): Likewise.
15138 (die_containing_type): Likewise.
15139 (lookup_die_type): Likewise.
15140 (guess_full_die_structure_name): Likewise.
15141 (anonymous_struct_prefix): Likewise.
15142 (dwarf2_name): Likewise.
15143 (follow_die_ref_or_sig): Likewise.
15144 (follow_die_offset): Likewise.
15145 (follow_die_ref): Likewise.
15146 (dwarf2_fetch_die_loc_sect_off): Likewise.
15147 (dwarf2_fetch_constant_bytes): Likewise.
15148 (dwarf2_fetch_die_type_sect_off): Likewise.
15149 (dwarf2_get_die_type): Likewise.
15150 (follow_die_sig): Likewise.
15151 (decode_locdesc): Likewise.
15152 (dwarf2_per_cu_objfile): Likewise.
15153 (dwarf2_per_cu_text_offset): Likewise.
15154 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15155 objfile.
15156 (set_die_type): Access objfile through
15157 dwarf2_per_objfile.
15158
15159 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15160
15161 * valprint.c (converted_character_d): Remove typedef.
15162 (DEF_VEC_O (converted_character_d)): Remove.
15163 (count_next_character): Use std::vector.
15164 (print_converted_chars_to_obstack): Likewise.
15165 (generic_printstr): Likewise.
15166
15167 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15168
15169 * xml-support.h (struct gdb_xml_value): Add constructor.
15170 <value>: Change type to unique_xmalloc_ptr.
15171 (gdb_xml_value_s): Remove typedef.
15172 (DEF_VEC_O (gdb_xml_value_s)): Remove.
15173 (gdb_xml_element_start_handler): Change parameter type to
15174 std::vector.
15175 (xml_find_attribute): Likewise.
15176 * xml-support.c (xml_find_attribute): Change parameter type to
15177 std::vector and adjust.
15178 (gdb_xml_values_cleanup): Remove.
15179 (gdb_xml_parser::start_element): Adjust to std::vector.
15180 (xinclude_start_include): Change paraeter type to std::vector
15181 and adjust.
15182 * btrace.c (check_xml_btrace_version): Likewise.
15183 (parse_xml_btrace_block): Likewise.
15184 (parse_xml_btrace_pt_config_cpu): Likewise.
15185 (parse_xml_btrace_pt): Likewise.
15186 (parse_xml_btrace_conf_bts): Likewise.
15187 (parse_xml_btrace_conf_pt): Likewise.
15188 * memory-map.c (memory_map_start_memory): Likewise.
15189 (memory_map_start_property): Likewise.
15190 * osdata.c (osdata_start_osdata): Likewise.
15191 (osdata_start_item): Likewise.
15192 (osdata_start_column): Likewise.
15193 * remote.c (start_thread): Likewise.
15194 * solib-aix.c (library_list_start_library): Likewise.
15195 (library_list_start_list): Likewise.
15196 * solib-svr4.c (library_list_start_library): Likewise.
15197 (svr4_library_list_start_list): Likewise.
15198 * solib-target.c (library_list_start_segment): Likewise.
15199 (library_list_start_section): Likewise.
15200 (library_list_start_library): Likewise.
15201 (library_list_start_list): Likewise.
15202 * tracepoint.c (traceframe_info_start_memory): Likewise.
15203 (traceframe_info_start_tvar): Likewise.
15204 * xml-syscall.c (syscall_start_syscall): Likewise.
15205 * xml-tdesc.c (tdesc_start_target): Likewise.
15206 (tdesc_start_feature): Likewise.
15207 (tdesc_start_reg): Likewise.
15208 (tdesc_start_union): Likewise.
15209 (tdesc_start_struct): Likewise.
15210 (tdesc_start_flags): Likewise.
15211 (tdesc_start_enum): Likewise.
15212 (tdesc_start_field): Likewise.
15213 (tdesc_start_enum_value): Likewise.
15214 (tdesc_start_vector): Likewise.
15215
15216 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15217
15218 * extension.h (struct xmethod_worker) <clone>: Remove.
15219 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15220 Remove.
15221 (python_xmethod_worker::clone): Remove.
15222 * valops.c (find_overload_match): Use std::move instead of
15223 clone.
15224
15225 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15226
15227 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15228 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15229 <free_xmethod_worker_data>: Remove.
15230 <get_matching_xmethod_workers>: Chance VEC to std::vector.
15231 <get_xmethod_arg_types>: Remove.
15232 <get_xmethod_result_type>: Remove.
15233 <invoke_xmethod>: Remove.
15234 * extension.c (new_xmethod_worker): Remove.
15235 (clone_xmethod_worker): Remove.
15236 (get_matching_xmethod_workers): Return void, pass std::vector by
15237 pointer.
15238 (get_xmethod_arg_types): Rename to...
15239 (xmethod_worker::get_arg_types): ... this, and adjust.
15240 (get_xmethod_result_type): Rename to...
15241 (xmethod_worker::get_result_type): ... this, and adjust.
15242 (invoke_xmethod): Remove.
15243 (free_xmethod_worker): Remove.
15244 (free_xmethod_worker_vec): Remove.
15245 * extension.h (enum ext_lang_rc): Move here from
15246 extension-priv.h.
15247 (struct xmethod_worker): Add constructor and destructor.
15248 <data>: Remove.
15249 <value>: Remove.
15250 <invoke, clone, do_get_result_type, do_get_arg_types>: New
15251 virtual pure methods.
15252 <get_arg_types, get_result_type>: New methods.
15253 (xmethod_worker_ptr): Remove typedef.
15254 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15255 (xmethod_worker_vec): Remove typedef.
15256 (xmethod_worker_up): New typedef.
15257 (invoke_xmethod): Remove.
15258 (clone_xmethod_worker): Remove.
15259 (free_xmethod_worker): Remove.
15260 (free_xmethod_worker_vec): Remove.
15261 (get_xmethod_arg_types): Remove.
15262 (get_xmethod_result_type): Remove.
15263 * valops.c (find_method_list): Use std::vector, don't use
15264 intermediate vector.
15265 (value_find_oload_method_list): Use std::vector.
15266 (find_overload_match): Use std::vector.
15267 (find_oload_champ): Use std::vector.
15268 * value.c (value_free): Use operator delete.
15269 (value_of_xmethod): Rename to...
15270 (value_from_xmethod): ... this. Don't assign
15271 xmethod_worker::value, take rvalue-reference.
15272 (result_type_of_xmethod): Adjust.
15273 (call_xmethod): Adjust.
15274 * value.h: Include extension.h.
15275 (struct xmethod_worker): Don't forward-declare.
15276 (value_of_xmethod): Rename to...
15277 (value_from_xmethod): ... this, take rvalue-reference.
15278 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15279 (struct python_xmethod_worker): ... this, add constructor and
15280 destructor.
15281 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15282 (gdbpy_free_xmethod_worker_data): Rename to...
15283 (python_xmethod_worker::~python_xmethod_worker): ... this and
15284 adjust.
15285 (gdbpy_clone_xmethod_worker_data): Rename to...
15286 (python_xmethod_worker::clone): ... this and adjust.
15287 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15288 temporary vector.
15289 (gdbpy_get_xmethod_arg_types): Rename to...
15290 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15291 (gdbpy_get_xmethod_result_type): Rename to...
15292 (python_xmethod_worker::do_get_result_type): ... this and
15293 adjust.
15294 (gdbpy_invoke_xmethod): Rename to...
15295 (python_xmethod_worker::invoke): ... this and adjust.
15296 (new_python_xmethod_worker): Rename to...
15297 (python_xmethod_worker::python_xmethod_worker): ... this and
15298 adjust.
15299 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15300 Remove.
15301 (gdbpy_free_xmethod_worker_data): Remove.
15302 (gdbpy_get_matching_xmethod_workers): Use std::vector.
15303 (gdbpy_get_xmethod_arg_types): Remove.
15304 (gdbpy_get_xmethod_result_type): Remove.
15305 (gdbpy_invoke_xmethod): Remove.
15306 * python/python.c (python_extension_ops): Remove obsolete
15307 callbacks.
15308
15309 2018-01-05 Pedro Alves <palves@redhat.com>
15310
15311 PR gdb/18653
15312 * common/signals-state-save-restore.c
15313 (save_original_signals_state): New parameter 'quiet'. Warn if we
15314 find a custom handler preinstalled, instead of internal erroring.
15315 But only warn if !quiet.
15316 * common/signals-state-save-restore.h
15317 (save_original_signals_state): New parameter 'quiet'.
15318 * main.c (captured_main_1): Move save_original_signals_state call
15319 after option handling, and pass QUIET.
15320
15321 2018-01-05 Pedro Alves <palves@redhat.com>
15322
15323 * spu-tdep.c (spu_catch_start): Pass
15324 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15325
15326 2018-01-05 Pedro Alves <palves@redhat.com>
15327
15328 PR gdb/22670
15329 * ada-lang.c (literal_symbol_name_matcher): New function.
15330 (ada_get_symbol_name_matcher): Use it for
15331 symbol_name_match_type::SEARCH_NAME.
15332 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
15333 it down instead of assuming symbol_name_match_type::FULL.
15334 * block.h (block_lookup_symbol): New parameter 'match_type'.
15335 * c-valprint.c (print_unpacked_pointer): Use
15336 lookup_symbol_search_name instead of lookup_symbol.
15337 * compile/compile-object-load.c (get_out_value_type): Pass down
15338 symbol_name_match_type::SEARCH_NAME.
15339 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15340 symbol_name_match_type::FULL.
15341 * cp-support.c (cp_get_symbol_name_matcher): Handle
15342 symbol_name_match_type::SEARCH_NAME.
15343 * infrun.c (insert_exception_resume_breakpoint): Use
15344 lookup_symbol_search_name.
15345 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15346 * psymtab.c (maintenance_check_psymtabs): Use
15347 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15348 * stack.c (print_frame_args): Use lookup_symbol_search_name and
15349 SYMBOL_SEARCH_NAME.
15350 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15351 if symbol_name_match_type::SEARCH_NAME.
15352 (lookup_symbol_in_language): Pass down
15353 symbol_name_match_type::FULL.
15354 (lookup_symbol_search_name): New.
15355 (lookup_language_this): Pass down
15356 symbol_name_match_type::SEARCH_NAME.
15357 (lookup_symbol_aux, lookup_local_symbol): New parameter
15358 'match_type'. Pass it down.
15359 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15360 (lookup_symbol_search_name): New declaration.
15361 (lookup_symbol_in_block): New 'match_type' parameter.
15362
15363 2018-01-05 Pedro Alves <palves@redhat.com>
15364
15365 PR gdb/22670
15366 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15367 ada_lookup_symbol.
15368 (ada_lookup_symbol): Reimplement in terms of
15369 ada_lookup_symbol_list, bits factored out from
15370 ada_lookup_encoded_symbol.
15371
15372 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15373
15374 * ada-exp.y (write_object_renaming): When subscripting an array
15375 using a symbol as the index, pass the block in call to
15376 ada_lookup_encoded_symbol when looking that symbol up.
15377
15378 2018-01-05 Jerome Guitton <guitton@adacore.com>
15379
15380 * ada-lang.c (ada_array_length): Use ada_index_type instead of
15381 TYPE_INDEX_TYPE.
15382
15383 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15384
15385 * ada-lang.c (ada_to_fixed_value_create): Add handling of
15386 the case where VALUE_LVAL (val0) is not lval_memory.
15387
15388 2018-01-05 Xavier Roirand <roirand@adacore.com>
15389
15390 * ada-valprint.c (print_optional_low_bound): Handle
15391 character-indexed array printing like boolean-indexed array
15392 printing.
15393
15394 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15395
15396 * NEWS: Create a new section for the next release branch.
15397 Rename the section of the current branch, now that it has
15398 been cut.
15399
15400 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15401
15402 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15403 * version.in: Bump version to 8.1.50.DATE-git.
15404
15405 2018-01-03 Xavier Roirand <roirand@adacore.com>
15406
15407 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15408 Add field.
15409 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15410 Add field.
15411 (default_exception_support_info) <catch_handlers_sym>: Add field.
15412 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15413 (ada_exception_name_addr_1): Add "catch handlers" handling.
15414 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15415 Update all callers.
15416 (create_excep_cond_exprs) <ex>: Add parameter.
15417 (re_set_exception): Update create_excep_cond_exprs call.
15418 (print_it_exception, print_one_exception, print_mention_exception)
15419 (print_recreate_exception): Add "catch handler" handling.
15420 (allocate_location_catch_handlers, re_set_catch_handlers)
15421 (check_status_catch_handlers, print_it_catch_handlers)
15422 (print_one_catch_handlers, print_mention_catch_handlers)
15423 (print_recreate_catch_handlers): New function.
15424 (catch_handlers_breakpoint_ops): New variable.
15425 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15426 Add parameter. Add "catch handler" handling.
15427 (ada_exception_sym_name, ada_exception_breakpoint_ops):
15428 Add "catch handler" handling.
15429 (ada_exception_catchpoint_cond_string): Add "catch handler"
15430 handling.
15431 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15432 call.
15433 (catch_ada_handlers_command): New function.
15434 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15435 operations structure.
15436 (_initialize_ada_language): Add "catch handlers" command entry.
15437 * NEWS: Document "catch handlers" feature.
15438
15439 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15440
15441 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15442 account when creating the array type of the slice.
15443 (ada_value_slice): Likewise.
15444
15445 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15446
15447 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15448 New enum value.
15449 (create_array_type_with_stride): Add byte_stride_prop parameter.
15450 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15451 New parameter. Update all callers in this file.
15452 (array_type_has_dynamic_stride): New function.
15453 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15454 of arrays with dynamic byte strides.
15455 * dwarf2read.c (read_array_type): Add support for dynamic
15456 DW_AT_byte_stride attributes.
15457
15458 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15459
15460 * dwarf2read.c (read_unspecified_type): Treat
15461 DW_TAG_enumeration_type DIEs from Ada units as stubs.
15462
15463 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15464
15465 Update copyright year range in all GDB files.
15466
15467 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
15468
15469 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15470 and gdb/testsuite/gdb.base/step-line.c.
15471
15472 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15473
15474 * copyright.py (main): Dump the contents of
15475 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15476 even if BY_HAND is empty.
15477
15478 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15479
15480 * top.c (print_gdb_version): Update Copyright year in version
15481 message.
15482
15483 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15484
15485 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15486
15487 For older changes see ChangeLog-2017.
15488 \f
15489 Local Variables:
15490 mode: change-log
15491 left-margin: 8
15492 fill-column: 74
15493 version-control: never
15494 coding: utf-8
15495 End: