Return gdbpy_ref from gdbpy_get_varobj_pretty_printer
[binutils-gdb.git] / gdb / ChangeLog
1 2018-11-04 Tom Tromey <tom@tromey.com>
2
3 * varobj.c (install_default_visualizer): Update.
4 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
5 Return gdbpy_ref.
6 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
7 (find_pretty_printer_from_progspace)
8 (find_pretty_printer_from_gdb, find_pretty_printer)
9 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
10 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
11 Update.
12
13 2018-11-04 Tom Tromey <tom@tromey.com>
14
15 * python/python.c (gdbpy_parameter_value): Update.
16 * python/python-internal.h (python_string_to_unicode)
17 (python_string_to_target_python_string)
18 (host_string_to_python_string): Return gdbpy_ref.
19 * python/py-utils.c (python_string_to_unicode)
20 (unicode_to_encoded_python_string)
21 (unicode_to_target_python_string)
22 (python_string_to_target_string)
23 (python_string_to_target_python_string): Return gdbpy_ref.
24 (python_string_to_host_string): Update.
25 (host_string_to_python_string): Return gdbpy_ref.
26 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
27 (stpy_fullname): Update.
28 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
29 Update.
30 * python/py-prettyprint.c (print_string_repr): Update.
31 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
32 (objfpy_get_build_id): Update.
33 * python/py-breakpoint.c (bppy_get_location)
34 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
35 Update.
36
37 2018-11-04 Tom Tromey <tom@tromey.com>
38
39 * python/python-internal.h (gdb_py_object_from_longest)
40 (gdb_py_object_from_ulongest): Return gdbpy_ref.
41 * python/py-value.c (valpy_int): Update.
42 * python/py-utils.c (gdb_py_object_from_longest): Return
43 gdbpy_ref.
44 (gdb_py_object_from_ulongest): Likewise.
45 * python/py-type.c (typy_get_alignof): Update.
46 * python/py-linetable.c (ltpy_get_all_source_lines)
47 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
48 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
49
50 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
51
52 * ada-lang.c (_initialize_ada_language): Fix typo.
53
54 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
55
56 * language.c (type): Remove.
57 (_initialize_language): Remove assignment to type.
58
59 2018-11-02 Joel Brobecker <brobecker@adacore.com>
60
61 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
62 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
63 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
64 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
65 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
66 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
67 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
68 and aarch64-ravenscar-thread.o.
69 * NEWS: Add entry documenting Ravenscar tasking support
70 on AArch64 ELF.
71
72 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
73
74 * symtab.c (info_functions_command): Initialize quiet flag.
75 * stack.c (info_args_command): Likewise.
76
77 2018-11-01 Jim Wilson <jimw@sifive.com>
78
79 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
80 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
81 debugging messages.
82
83 2018-11-01 Joel Brobecker <brobecker@adacore.com>
84
85 * ada-lang.c (ada_watch_location_expression): New function.
86 (ada_language_defn): Set la_watch_location_expression to
87 ada_watch_location_expression.
88
89 2018-11-01 Joel Brobecker <brobecker@adacore.com>
90
91 * print-utils.c (int_string): Remove unnecessary trailing spaces.
92
93 2018-11-01 Joel Brobecker <brobecker@adacore.com>
94
95 * rs6000-tdep.c (skip_prologue): Fix potential negative left
96 shifting.
97
98 2018-11-01 Jerome Guitton <guitton@adacore.com>
99 Joel Brobecker <brobecker@adacore.com>
100
101 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
102 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
103 * arm-pikeos-tdep.c: New file.
104 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
105 embedded system.
106 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
107
108 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
109
110 * common/pathstuff.c (get_standard_temp_dir): New.
111 * common/pathstuff.h (get_standard_temp_dir): New.
112 * config.in: Re-generate.
113 * configure: Re-generate.
114 * configure.ac: Don't check for mkdtemp.
115 * gnulib/aclocal-m4-deps.mk: Re-generate.
116 * gnulib/aclocal.m4: Re-generate.
117 * gnulib/config.in: Re-generate.
118 * gnulib/configure: Re-generate.
119 * gnulib/import/Makefile.am: Re-generate.
120 * gnulib/import/Makefile.in: Re-generate.
121 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
122 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
123 * gnulib/import/m4/mkdtemp.m4: New file.
124 * gnulib/import/mkdtemp.c: New file.
125 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
126 Add mkdtemp module.
127 * unittests/mkdir-recursive-selftests.c (test): Use
128 get_standard_temp_dir.
129 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
130 ifdef.
131 * compile/compile.c (get_compile_file_tempdir): Likewise.
132
133 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
134
135 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
136 (SIG_FRAME_LR_OFFSET64): New define.
137 (SIG_FRAME_FP_OFFSET64): New define.
138 (aix_sighandle_frame_cache): New Function.
139 (aix_sighandle_frame_this_id): New Function.
140 (aix_sighandle_frame_prev_register): New Function.
141 (aix_sighandle_frame_sniffer): New Function.
142 (aix_sighandle_frame_unwind): New global variable.
143 (rs6000_aix_init_osabi): Install new frame unwinder.
144
145 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
146
147 PR gdb/23835
148 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
149 already defined.
150
151 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
152
153 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
154
155 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
156
157 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
158 (producer_is_icc): New function.
159 (check_producer): Set producer_is_icc field on dwarf2_cu.
160 (dwarf2_init_integer_type): New function.
161 (read_base_type): Call dwarf2_init_integer_type instead of
162 init_integer_type in all cases.
163 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
164 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
165 LEN is greater than 0.
166
167 2018-10-30 Tom Tromey <tom@tromey.com>
168
169 * main.c (captured_main_1): Check return value of bfd_init.
170
171 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
172
173 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
174 Adjust comments.
175
176 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
177
178 * procfs.c: Include common/pathstuff.h.
179
180 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
181
182 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
183 Add missing braces. No functional change.
184
185 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
186
187 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
188 to report a bad option and fix indentation.
189 * demangle.c (demangle_command): Use report_unrecognized_option_error
190 to report a bad option and correctly report the bad option.
191
192 2018-10-27 Tom Tromey <tom@tromey.com>
193
194 PR cli/23364:
195 * darwin-nat.c (copied_shell): New global.
196 (may_have_sip): Rename from should_disable_startup_with_shell.
197 (copy_shell_to_cache, maybe_cache_shell): New functions.
198 (darwin_nat_target::create_inferior): Update. Use
199 copied_shell.
200
201 2018-10-27 Tom Tromey <tom@tromey.com>
202
203 * unittests/scoped_fd-selftests.c (test_to_file): New function.
204 (run_tests): Call test_to_file.
205 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
206 temporary files.
207 * common/scoped_fd.h (scoped_fd::to_file): New method.
208
209 2018-10-27 Tom Tromey <tom@tromey.com>
210
211 * unittests/scoped_mmap-selftests.c (test_normal): Use
212 gdb_mkostemp_cloexec.
213 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
214 Use gdb_mkostemp_cloexec.
215 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
216 gnulib/config.in, gnulib/configure,
217 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
218 gnulib/import/m4/gnulib-cache.m4,
219 gnulib/import/m4/gnulib-comp.m4: Update.
220 * gnulib/import/m4/mkostemp.m4: New file.
221 * gnulib/import/m4/mkstemp.m4: Remove.
222 * gnulib/import/mkostemp.c: New file.
223 * gnulib/import/mkstemp.m4: Remove.
224 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
225 mkstemp, add mkostemp. Apply new patch.
226 * gnulib/import/stdlib.in.h: Apply patch.
227 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
228 New file.
229 * dwarf-index-write.c (write_psymtabs_to_index): Use
230 gdb_mkostemp_cloexec.
231 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
232
233 2018-10-27 Tom Tromey <tom@tromey.com>
234
235 * unittests/mkdir-recursive-selftests.c: New file.
236 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
237 unittests/mkdir-recursive-selftests.c.
238 * dwarf-index-cache.c (mkdir_recursive): Move to
239 common/filestuff.c.
240 (index_cache::store): Check return value of mkdir_recursive.
241 (create_dir_and_check, test_mkdir_recursive): Move to new file.
242 (_initialize_index_cache): Don't register test.
243 * common/filestuff.h (mkdir_recursive): Declare.
244 * common/filestuff.c (mkdir_recursive): Move from
245 dwarf-index-cache.c. Return bool.
246
247 2018-10-27 Tom Tromey <tom@tromey.com>
248
249 * dwarf-index-write.c (write_psymtabs_to_index): Move
250 make_temp_filename to common/pathstuff.c.
251 * common/pathstuff.h (make_temp_filename): Declare.
252 * common/pathstuff.c (make_temp_filename): New function, moved
253 from dwarf-index-write.c.
254
255 2018-10-27 Tom Tromey <tom@tromey.com>
256
257 * procfs.c (procfs_target::create_inferior): Use get_shell.
258 * cli/cli-cmds.c (shell_escape): Use get_shell.
259 * windows-nat.c (windows_nat_target::create_inferior): Use
260 get_shell.
261 * common/pathstuff.c (get_shell): New function.
262 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
263 (fork_inferior): Use get_shell.
264 * common/pathstuff.h (get_shell): Declare.
265
266 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
267
268 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
269
270 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
271
272 * stack.c (print_variable_and_value_data): Add preg and treg.
273 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
274 and update callers.
275 (print_frame_arg_vars): Likewise.
276 (prepare_reg): New function.
277 (info_locals_command): Extract info print args and use them.
278 (info_args_command): Likewise.
279 (_initialize_stack): Modify on-line help.
280 * symtab.c (treg_matches_sym_type_name): New function.
281 (search_symbols): New arg t_regexp.
282 (symtab_symbol_info): New args quiet, regexp, t_regexp.
283 (info_variables_command): Extract info print args and use them.
284 (info_functions_command): Likewise.
285 (info_types_command): Update call to symtab_symbol_info.
286 (_initialize_symtab): Modify on-line help.
287 * symtab.h (treg_matches_sym_type_name): New function.
288 (search_symbols): New t_regexp arg.
289
290 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
291
292 * cli-utils.c (extract_arg_maybe_quoted): New function.
293 (extract_info_print_args): New function.
294 (info_print_args_help): New function.
295 (report_unrecognized_option_error): New function.
296 * cli-utils.h (extract_arg_maybe_quoted): New function.
297 (extract_info_print_args): New function.
298 (info_print_args_help): New function.
299 (report_unrecognized_option_error): New function.
300
301 2018-10-26 Tom Tromey <tom@tromey.com>
302
303 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
304 (compute_compunit_symtab_includes): Update.
305 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
306 (compunit_symtab_ptr): Likewise.
307
308 2018-10-26 John Baldwin <jhb@FreeBSD.org>
309
310 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
311 default_print_auxv_entry for specific tag values.
312
313 2018-10-26 John Baldwin <jhb@FreeBSD.org>
314
315 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
316
317 2018-10-26 Jim Wilson <jimw@sifive.com>
318
319 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
320 (riscv_linux_sigframe_init): Declare.
321 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
322 (riscv_linux_sigframe): New.
323 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
324 (riscv_linux_sigframe_init): Define.
325 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
326
327 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
328 (riscv_isa_flen): Likewise. Drop static.
329 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
330 (riscv_isa_flen): Likewise. Declare.
331
332 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
333 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
334
335 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
336 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
337 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
338 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
339 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
340 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
341 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
342 Define.
343 (struct ppc_linux_features) <htm>: New field.
344 (ppc_linux_no_features): Add initializer for htm field.
345 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
346 new tdescs.
347 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
348 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
349 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
350 Define if not already defined.
351 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
352 and rs6000/powerpc-isa207-htm-vsx64l.
353 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
354 rs6000/powerpc-isa207-htm-vsx64l.xml.
355 * features/rs6000/power-htm-spr.xml: New file.
356 * features/rs6000/power-htm-core.xml: New file.
357 * features/rs6000/power64-htm-core.xml: New file.
358 * features/rs6000/power-htm-fpu.xml: New file.
359 * features/rs6000/power-htm-altivec.xml: New file.
360 * features/rs6000/power-htm-vsx.xml: New file.
361 * features/rs6000/power-htm-ppr.xml: New file.
362 * features/rs6000/power-htm-dscr.xml: New file.
363 * features/rs6000/power-htm-tar.xml: New file.
364 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
365 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
366 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
367 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
368 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
369 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
370 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
371 fetch_regset with HTM regsets.
372 (store_register, store_ppc_registers): Call store_regset with HTM
373 regsets.
374 (ppc_linux_nat_target::read_description): Set htm field in the
375 features struct if needed.
376 * ppc-linux-tdep.c: Include
377 features/rs6000/powerpc-isa207-htm-vsx32l.c and
378 features/rs6000/powerpc-isa207-htm-vsx64l.c.
379 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
380 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
381 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
382 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
383 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
384 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
385 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
386 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
387 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
388 (ppc32_linux_ctarregset): New globals.
389 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
390 (ppc_linux_collect_core_cpgrregset): New function.
391 (ppc_linux_iterate_over_regset_sections): Call back with the htm
392 regsets.
393 (ppc_linux_core_read_description): Check if the tm spr section is
394 present and set htm in the features struct.
395 (_initialize_ppc_linux_tdep): Call
396 initialize_tdesc_powerpc_isa207_htm_vsx32l and
397 initialize_tdesc_powerpc_isa207_htm_vsx64l.
398 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
399 Declare.
400 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
401 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
402 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
403 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
404 New fields.
405 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
406 Likewise.
407 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
408 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
409 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
410 New enum fields.
411 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
412 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
413 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
414 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
415 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
416 <PPC_CTAR_REGNUM>: Likewise.
417 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
418 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
419 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
420 (IS_CEFP_PSEUDOREG): Define.
421 (rs6000_register_name): Hide the upper halves of checkpointed VSX
422 registers. Return names for the checkpointed DFP, VSX, and EFP
423 pseudo registers.
424 (rs6000_pseudo_register_type): Remove initial assert and raise an
425 internal error in the else clause instead. Return types for the
426 checkpointed DFP, VSX, and EFP pseudo registers.
427 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
428 checkpointed DFP pseudo registers.
429 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
430 checkpointed VSX pseudo registers.
431 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
432 from efpr_pseudo_register_read and
433 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
434 registers.
435 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
436 Handle checkpointed DFP, VSX, and EFP registers.
437 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
438 (efp_ax_pseudo_register_collect): New functions.
439 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
440 register logic to new functions. Handle checkpointed DFP, VSX,
441 and EFP pseudo registers.
442 (rs6000_gdbarch_init): Look for and validate the htm features.
443 Include checkpointed DFP, VSX and EFP pseudo-registers.
444 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
445 HTM registers.
446
447 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
448
449 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
450 without altivec or fpu.
451
452 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
453 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
454
455 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
456 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
457 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
458 Define if not already defined.
459 * features/rs6000/power-ebb.xml: New file.
460 * features/rs6000/power-linux-pmu.xml: New file.
461 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
462 features.
463 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
464 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
465 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
466 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
467 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
468 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
469 fetch_regset with ebb and pmu regsets.
470 (store_register, store_ppc_registers): Call store_regset with ebb
471 and pmu regsets.
472 (ppc_linux_nat_target::read_description): Set isa207 field in the
473 features struct if ebb and pmu are avaiable.
474 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
475 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
476 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
477 and pmu regsets.
478 (ppc_linux_core_read_description): Check if the pmu section is
479 present and set isa207 in the features struct.
480 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
481 (ppc32_linux_pmuregset): Declare.
482 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
483 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
484 <ppc_sier_regnum>: New field.
485 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
486 New enum values.
487 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
488 values.
489 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
490 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
491 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
492 ebb and pmu features.
493
494 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
495 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
496
497 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
498 (tdesc_powerpc_isa207_vsx64l): Declare.
499 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
500 (struct ppc_linux_features) <isa207>: New field.
501 (ppc_linux_no_features): Add initializer for isa207 field.
502 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
503 new tdescs.
504 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
505 (NT_PPC_TAR): Define if not already defined.
506 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
507 rs6000/powerpc-isa207-vsx64l.
508 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
509 rs6000/powerpc-isa207-vsx64l.xml.
510 * features/rs6000/power-tar.xml: New file.
511 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
512 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
513 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
514 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
515 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
516 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
517 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
518 fetch_regset with the TAR regset.
519 (store_register, store_ppc_registers): Call store_regset with the
520 TAR regset.
521 (ppc_linux_nat_target::read_description): Set isa207 field in the
522 features struct if needed.
523 * ppc-linux-tdep.c: Include
524 features/rs6000/powerpc-isa207-vsx32l.c and
525 features/rs6000/powerpc-isa207-vsx64l.c.
526 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
527 (ppc_linux_iterate_over_regset_sections): Call back with the tar
528 regset.
529 (ppc_linux_core_read_description): Check if the tar section is
530 present and set isa207 in the features struct.
531 (_initialize_ppc_linux_tdep): Call
532 initialize_tdesc_powerpc_isa207_vsx32l and
533 initialize_tdesc_powerpc_isa207_vsx64l.
534 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
535 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
536 (enum) <PPC_TAR_REGNUM>: New enum value.
537 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
538 feature.
539 (ppc_process_record_op31): Record changes to TAR.
540
541 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
542 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
543
544 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
545 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
546 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
547 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
548 (struct ppc_linux_features) <ppr_dscr>: New field.
549 (ppc_linux_no_features): Add initializer for ppr_dscr field.
550 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
551 new tdescs.
552 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
553 Define if not already defined.
554 * features/Makefile (WHICH): Add
555 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
556 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
557 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
558 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
559 * features/rs6000/power-dscr.xml: New file.
560 * features/rs6000/power-ppr.xml: New file.
561 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
562 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
563 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
564 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
565 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
566 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
567 * ppc-linux-nat.c: Include <sys/uio.h>.
568 (fetch_regset, store_regset, check_regset): New functions.
569 (fetch_register, fetch_ppc_registers): Call fetch_regset with
570 DSCR and PPR regsets.
571 (store_register, store_ppc_registers): Call store_regset with
572 DSCR and PPR regsets.
573 (ppc_linux_get_hwcap2): New function.
574 (ppc_linux_nat_target::read_description): Call
575 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
576 features struct if needed.
577 * ppc-linux-tdep.c: Include
578 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
579 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
580 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
581 (ppc32_linux_dscrregset): New globals.
582 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
583 and dscr regsets.
584 (ppc_linux_core_read_description): Check if the ppr and dscr
585 sections are present and set ppr_dscr in the features struct.
586 (_initialize_ppc_linux_tdep): Call
587 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
588 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
589 * ppc-linux-tdep.h (ppc32_linux_pprregset)
590 (ppc32_linux_dscrregset): Declare.
591 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
592 <ppc_dscr_regnum>: New field.
593 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
594 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
595 and dscr features.
596 (ppc_process_record_op31): Record changes to PPR and DSCR.
597
598 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
599
600 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
601 second initializer line for the have_* variables. Initialize
602 have_fpu to 0 instead of 1.
603
604 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
605
606 * arch/ppc-linux-common.c (ppc_linux_match_description):
607 Parenthesize tdesc assignements and indent them properly.
608
609 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
610
611 * ppc-linux-nat.c (fetch_register): Change if statement to else
612 if.
613 (store_register): Likewise.
614
615 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
616
617 * rs6000-tdep.c: Remove reggroups.h include.
618 (rs6000_pseudo_register_reggroup_p): Remove.
619 (rs6000_gdbarch_init): Remove call to
620 set_tdesc_pseudo_register_reggroup_p.
621
622 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
623
624 * reggroups.c (default_register_reggroup_p): Return true for
625 decfloat registers and float_reggroup.
626
627 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
628
629 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
630 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
631 ppc_linux_collect_vrregset by regcache_collect_regset.
632
633 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
634
635 * linux-tdep.c (linux_collect_regset_section_cb): Use
636 std::vector<gdb_byte> instead of char * and malloc for buf.
637 Remove xfree.
638
639 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
640
641 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
642 symtab_start instead of always using language_unknown.
643
644 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
645
646 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
647 READ_P parameter, catch and ignore register access errors from
648 either the old or new MISA location.
649 (riscv_has_feature): Update call to riscv_read_misa_reg.
650
651 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
652
653 * python/py-function.c (convert_values_to_python): Return
654 gdbpy_ref<>. Add header comment.
655 (fnpy_call): Adjust.
656
657 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
658
659 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
660 (cmdpy_completer_handle_brkchars): Adjust.
661 (cmdpy_completer): Adjust.
662
663 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
664
665 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
666 Pass correct regnum to raw_supply_zeroed.
667
668 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
669
670 * regcache.c (cooked_read_test): Add CSKY to the list of
671 architectures with a save_reggroup
672
673 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
674
675 PR gdb/23368
676 * infrun.c (follow_exec): In the follow_exec_mode_new case,
677 transfer terminal state from old new new inferior.
678 * terminal.h (swap_terminal_info): New function.
679 * inflow.c (swap_terminal_info): New function.
680
681 2018-10-23 Tom Tromey <tom@tromey.com>
682
683 * record-btrace.c (get_thread_current_frame_id): Rename from
684 get_thread_current_frame. Return a frame_id.
685 (record_btrace_start_replaying): Update.
686
687 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
688
689 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
690 for CSRs.
691
692 2018-10-23 Joel Brobecker <brobecker@adacore.com>
693
694 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
695 have_nonsteppable_watchpoint attribute to 1.
696
697 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
698
699 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
700 register names.
701 (struct register_alias): Rename to...
702 (struct riscv_register_alias): ...this, and update comment.
703 (riscv_register_aliases): Update type, and alias names. Remove
704 CSR names from this list.
705 (riscv_register_name): Use riscv_gdb_reg_names for int and float
706 register names. Add an extra assertion.
707 (riscv_is_regnum_a_named_csr): New function.
708 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
709
710 2018-10-22 Jim Wilson <jimw@sifive.com>
711
712 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
713 FP reg smaller than FP reg size, and fill with -1 instead of 0.
714
715 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
716 (riscv_register_type): Use them.
717 (riscv_print_one_register_info): Handle union of floats same as float.
718 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
719 riscv_fpreg_q_type fields.
720
721 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
722
723 * gdbarch.sh (gdbarch_num_cooked_regs): New.
724 * gdbarch.h: Re-generate.
725 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
726 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
727 * eval.c (evaluate_subexp_standard): Likewise.
728 * findvar.c (value_of_register): Likewise.
729 (value_of_register_lazy): Likewise.
730 (address_from_register): Likewise.
731 * frame.c (get_frame_register_bytes): Likewise.
732 * gdbarch-selftests.c (register_to_value_test): Likewise.
733 * h8300-tdep.c (h8300_register_type): Likewise.
734 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
735 (i386_svr4_reg_to_regnum): Likewise.
736 * infcmd.c (default_print_registers_info): Likewise.
737 (registers_info): Likewise.
738 (print_vector_info): Likewise.
739 (default_print_float_info): Likewise.
740 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
741 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
742 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
743 (mi_cmd_data_list_changed_registers): Likewise.
744 (mi_cmd_data_list_register_values): Likewise.
745 (mi_cmd_data_write_register_values): Likewise.
746 (mi_cmd_trace_frame_collected): Likewise.
747 * mips-tdep.c (print_gp_register_row): Likewise.
748 (mips_print_registers_info): Likewise.
749 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
750 * regcache.c (init_regcache_descr): Likewise.
751 (register_size): Likewise.
752 (register_dump::dump): Likewise.
753 (cooked_read_test): Likewise.
754 (cooked_write_test): Likewise.
755 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
756 (rs6000_gdbarch_init): Likewise.
757 * stabsread.c (stab_reg_to_regnum): Likewise.
758 * stack.c (info_frame_command): Likewise.
759 * target-descriptions.c (tdesc_register_name): Likewise.
760 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
761 * tui/tui-regs.c (tui_show_register_group): Likewise.
762 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
763 (user_reg_map_regnum_to_name): Likewise.
764 (value_of_user_reg): Likewise.
765 (maintenance_print_user_registers): Likewise.
766 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
767 (xtensa_register_name): Likewise.
768 (xtensa_register_type): Likewise.
769 (xtensa_reg_to_regnum): Likewise.
770 (xtensa_pseudo_register_read): Likewise.
771 (xtensa_pseudo_register_write): Likewise.
772
773 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
774
775 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
776 correctly-sized buffer with raw_read.
777 (amd64_pseudo_register_write): Use correctly-sized buffer for
778 raw_read/raw_write.
779
780 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
781
782 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
783 in add_prefix_cmd of set print type.
784
785 2018-10-19 Tom Tromey <tom@tromey.com>
786
787 PR tui/18388:
788 * NEWS: Mention tabset deprecation.
789 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
790 (update_tab_width): New function.
791 (tui_set_tab_width, tui_show_tab_width): New functions.
792 (tui_set_tab_width_command): Use update_tab_width.
793 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
794 Add new "set tui tab-width" command.
795 * tui/tui-source.c (tui_set_source_content): Update.
796 * tui/tui-disasm.c (tui_set_disassem_content): Update.
797 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
798 Don't declare.
799 (tui_tab_width): Declare.
800 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
801 (tui_set_default_tab_len): Remove.
802
803 2018-10-19 Tom Tromey <tom@tromey.com>
804
805 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
806 (key_is_backspace, tui_getc): Don't declare.
807 * tui/tui-io.c (key_is_start_sequence): Now static.
808 (key_is_end_sequence, key_is_backspace): Remove.
809 (tui_getc): Now static.
810
811 2018-10-19 Tom Tromey <tom@tromey.com>
812
813 * symfile.c (reread_symbols): Clear "static_links".
814
815 2018-10-19 Alan Hayward <alan.hayward@arm.com>
816
817 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
818 define.
819 (aarch64_linux_sigframe_init): Extra boundary checks.
820
821 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
822
823 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
824 the possibly non-existent tdesc type 'vec128', but the type of raw
825 register v16 instead.
826
827 2018-10-19 Gary Benson <gbenson@redhat.com>
828
829 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
830
831 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
832
833 PR cli/23785
834 * cli/cli-dump.c (restore_binary_file): Check if "file" is
835 NULL.
836
837 2018-10-17 Paul Koning <paul_koning@dell.com>
838
839 * charset.c (convert_between_encodings): Fix unsigned overflow.
840
841 2018-10-17 John Baldwin <jhb@FreeBSD.org>
842
843 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
844 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
845 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
846 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
847 New functions.
848 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
849 and fbsd_info_proc_mappings_header.
850 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
851 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
852 New.
853
854 2018-10-17 Joel Brobecker <brobecker@adacore.com>
855
856 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
857 Solaris Maintainer.
858
859 2018-10-15 Tom Tromey <tom@tromey.com>
860
861 * tui/tui.c (strcat_to_buf): Remove casts.
862 * tui/tui-winsource.c (tui_show_source_line)
863 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
864 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
865 * tui/tui-windata.c (tui_first_data_item_displayed)
866 (tui_delete_data_content_windows, tui_erase_data_content)
867 (tui_display_all_data, tui_display_data_from)
868 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
869 * tui/tui-win.c (tui_set_win_height)
870 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
871 casts.
872 * tui/tui-win.c (tui_resize_all): Remove casts.
873 (tui_scroll_backward_command, tui_set_focus)
874 (tui_set_tab_width_command): Likewise.
875 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
876 * tui/tui-regs.c (tui_show_register_group): Remove cast.
877 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
878 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
879 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
880 Remove casts.
881
882 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
883
884 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
885 AArch64/ARM maintainer.
886
887 2018-10-11 Gary Benson <gbenson@redhat.com>
888
889 * interps.h (interp::m_name): Make private and mutable.
890 * interps.c (interp::~interp): Free m_name.
891
892 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
893 Simon Marchi <simark@simark.ca>
894
895 * README (`configure' options): Add documentation for new
896 "--enable-unit-tests" option.
897 * acinclude.m4: Include "selftest.m4".
898 * configure: Regenerate.
899 * configure.ac: Use "GDB_AC_SELFTEST".
900 * maint.c (maintenance_selftest): Update message informing
901 that selftests have been disabled.
902 (maintenance_info_selftests): Likewise.
903 * selftest.m4: New file.
904
905 2018-10-10 Gary Benson <gbenson@redhat.com>
906
907 * remote.c (remote_target::remote_send_printf): Add
908 missing va_end found by Coverity.
909
910 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
911
912 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
913
914 2018-10-09 Tom Tromey <tom@tromey.com>
915
916 * configure: Rebuild.
917 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
918 * NEWS: Update --enable-ubsan documentation.
919
920 2018-10-09 Gary Benson <gbenson@redhat.com>
921
922 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
923 found by Coverity.
924
925 2018-10-08 Tom Tromey <tom@tromey.com>
926
927 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
928 variable.
929 (riscv_fbsd_init_abi): Likewise.
930
931 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
932 * valops.c (value_struct_elt_for_reference): Rename local variable
933 to work around the shadowing a previous local warning.
934
935 2018-10-08 John Baldwin <jhb@FreeBSD.org>
936
937 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
938 * NEWS: Mention new FreeBSD/riscv native configuration.
939 * configure.host: Add riscv*-*-freebsd*.
940 * configure.nat: Likewise.
941 * riscv-fbsd-nat.c: New file.
942
943 2018-10-08 John Baldwin <jhb@FreeBSD.org>
944
945 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
946 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
947 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
948 * NEWS: Mention new FreeBSD/riscv target.
949 * configure.tgt: Add riscv*-*-freebsd*.
950 * riscv-fbsd-tdep.c: New file.
951 * riscv-fbsd-tdep.h: New file.
952
953 2018-10-08 John Baldwin <jhb@FreeBSD.org>
954
955 * regcache.h (struct regcache_map_entry): Note that this type can
956 be used with traditional frame caches.
957 * trad-frame.c (trad_frame_set_reg_regmap): New.
958 * trad-frame.h (trad_frame_set_reg_regmap): New.
959
960 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
961
962 PR c++/16841
963 * valops.c (get_virtual_base_offset): New function.
964 (value_struct_elt_for_reference): Use it to get virtual base offset
965 and add it in calculating class member address.
966
967 2018-10-08 John Darrington <john@darrington.wattle.id.au>
968
969 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
970 (check_producer): Check if the producer is codewarrior.
971 (producer_is_codewarrior): New function.
972 (lnp_state_machine::record_line): Ignore is_stmt flag for records
973 produced by codewarrior.
974 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
975
976 2018-10-06 Tom Tromey <tom@tromey.com>
977
978 PR python/19399:
979 * python/py-inferior.c: Add "architecture" entry.
980 (infpy_architecture): New function.
981
982 2018-10-06 Tom Tromey <tom@tromey.com>
983
984 PR python/21765:
985 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
986 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
987 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
988 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
989
990 2018-10-06 Tom Tromey <tom@tromey.com>
991
992 PR build/17077:
993 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
994 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
995 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
996 #include.
997
998 2018-10-06 Tom Tromey <tom@tromey.com>
999
1000 * python/py-breakpoint.c (bppy_get_location): Handle a
1001 bp_breakpoint without a location.
1002
1003 2018-10-06 Tom Tromey <tom@tromey.com>
1004
1005 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1006 (_RegEx): Reformat help text.
1007 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1008 (AnyCallerIs, AnyCallerMatches): Reformat help text.
1009 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1010 text.
1011 * python/lib/gdb/command/xmethods.py (InfoXMethod)
1012 (EnableXMethod, DisableXMethod): Remove help indentation.
1013 Capitalize meta-syntactic variables.
1014 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1015 (EnableUnwinder, DisableUnwinder): Remove help indentation.
1016 Capitalize meta-syntactic variables.
1017 * python/lib/gdb/command/explore.py (ExploreCommand)
1018 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1019 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1020 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1021 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1022 Remove help indentation.
1023 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1024 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1025 (DisableFrameFilter, SetFrameFilterPriority)
1026 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1027
1028 2018-10-06 Tom Tromey <tom@tromey.com>
1029
1030 PR tui/28819:
1031 * tui/tui-io.c (gdb_wgetch): New function.
1032 (tui_mld_getc, tui_getc): Use it.
1033
1034 2018-10-05 Tom Tromey <tom@tromey.com>
1035
1036 * sol-thread.c (sol_thread_target::wait): Rename inner
1037 "save_ptid".
1038
1039 2018-10-04 Tom Tromey <tom@tromey.com>
1040
1041 * configure: Rebuild.
1042 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1043
1044 2018-10-04 Tom Tromey <tom@tromey.com>
1045
1046 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1047 declaration of "block".
1048
1049 2018-10-04 Tom Tromey <tom@tromey.com>
1050
1051 * common/filestuff.c (fdwalk): Remove inner declaration of
1052 "result".
1053
1054 2018-10-04 Tom Tromey <tom@tromey.com>
1055
1056 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1057 "structs_addr" and hoist declaration.
1058
1059 2018-10-04 Tom Tromey <tom@tromey.com>
1060
1061 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1062 variable "size".
1063
1064 2018-10-04 Tom Tromey <tom@tromey.com>
1065
1066 * mdebugread.c (parse_partial_symbols): Use std::string.
1067
1068 2018-10-04 Tom Tromey <tom@tromey.com>
1069
1070 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1071 * p-valprint.c (pascal_val_print): Split inner "i" variable.
1072 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1073 header.
1074 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1075 more inner scope.
1076 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1077 * varobj.c (varobj_update): Rename inner "newobj",
1078 "type_changed".
1079 * valprint.c (generic_emit_char): Rename inner "buf".
1080 * valops.c (find_overload_match): Rename inner "temp".
1081 (value_struct_elt_for_reference): Declare "v" in more inner
1082 scope.
1083 * v850-tdep.c (v850_push_dummy_call): Rename "len".
1084 * unittests/array-view-selftests.c (run_tests): Rename inner
1085 "vec".
1086 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1087 header.
1088 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1089 "tsv" in more inner scope.
1090 (print_one_static_tracepoint_marker): Rename inner
1091 "tuple_emitter".
1092 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1093 (tic6x_push_dummy_call): Don't redeclare "addr".
1094 * target-float.c: Declare "dto" lower.
1095 * symtab.c (lookup_local_symbol): Rename inner "sym".
1096 (find_pc_sect_line): Rename inner "pc".
1097 * stack.c (print_frame): Don't redeclare "gdbarch".
1098 (return_command): Rename inner "gdbarch".
1099 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1100 "sp".
1101 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1102 header.
1103 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1104 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1105 scope.
1106 * remote.c (remote_target::update_thread_list): Don't redeclare
1107 "tp".
1108 (remote_target::process_initial_stop_replies): Rename inner
1109 "thread".
1110 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1111 (remote_target::wait_as): Don't redeclare "stop_reply".
1112 (remote_target::get_thread_local_address): Rename inner
1113 "result".
1114 (remote_target::get_tib_address): Likewise.
1115
1116 * regcache.c (cooked_read_test): Rename "regnum".
1117 * record-btrace.c (cmd_record_btrace_start): Rename inner
1118 "exception".
1119 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1120 loop header.
1121 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1122 header.
1123 (ppu2spu_sniffer): Rename inner "buf".
1124 * parse.c (operator_check_standard): Rename inner "type",
1125 "objfile".
1126 * p-valprint.c (pascal_val_print): Introduce new scope for
1127 "low_bound", "high_bound".
1128 * p-exp.y (yylex): Declare "i" in loop header.
1129 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1130 Lower declaration of "s".
1131 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1132 header.
1133 (nios2_push_dummy_call): Rename "len".
1134 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1135 "buf".
1136 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1137 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1138 (linux_xfer_osdata_modules): Likewise.
1139 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1140 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1141 (mips_o64_push_dummy_call): Likewise.
1142 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1143 "op".
1144 * mi/mi-main.c (list_available_thread_groups): Rename inner
1145 "tuple_emitter".
1146 (mi_cmd_data_read_memory): Rename inner "opts".
1147 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1148 "tuple_emitter".
1149 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1150 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
1151 more inner scope.
1152 (parse_partial_symbols): Rename inner "pst", "p", "name"
1153 * main.c (captured_main_1): Rename inner "i"s.
1154 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1155 "oso2".
1156 * linux-tdep.c (linux_info_proc): Rename inner "filename".
1157 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1158 * infrun.c (handle_no_resumed): Don't redeclare "thread".
1159 (handle_signal_stop): Rename inner "gdbarch".
1160 (handle_command): Declare "signum" in loop header.
1161 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1162 "status".
1163 (examine_prologue): Rename inner "sol" and "sof".
1164 (ia64_extract_return_value): Rename inner "val". Declare another
1165 "val" in a more inner scope.
1166 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1167 inner scope.
1168 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1169 "except".
1170 * findvar.c (default_read_var_value): Don't redeclare "addr".
1171 * f-exp.y (yylex): Declare "i" in loop header.
1172 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1173 Rename inner "type", "expect_type".
1174 (evaluate_subexp_for_sizeof): Rename inner "pc".
1175 * elfread.c (elf_symfile_read): Rename inner "abfd".
1176 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1177 "bytes_read".
1178 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1179 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1180 (dwarf_decode_line_header): Rename inner "lh".
1181 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1182 "offset". Declare "i" in loop header.
1183 (disassemble_dwarf_expression): Rename inner "addr_size".
1184 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1185 inner "result".
1186 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1187 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1188 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1189 "inner_list_emitter".
1190 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1191 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1192 declaration in a block.
1193 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1194 * cp-valprint.c (cp_print_value_fields): Don't redeclare
1195 "obstack_final_size".
1196 * cp-support.c (inspect_type): Declare "i" in loop header.
1197 * compile/compile.c (compile_instance::insert_symbol_error):
1198 Rename inner "e".
1199 * common/agent.c (agent_run_command): Remove inner "ret"
1200 declaration.
1201 * coffread.c (coff_symfile_read): Rename inner "name".
1202 (coff_symfile_read): Rename inner "abfd".
1203 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1204 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1205 "high".
1206 * c-exp.y (lex_one_token): Move "len" declaration lower.
1207 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1208 "gdbarch".
1209 (create_exception_master_breakpoint): Likewise. Don't redeclare
1210 "b".
1211 (watch_command_1): Declare "mark" later.
1212 (clear_command): Don't shadow "a" or "b".
1213 (delete_command): Rename inner "b".
1214 (delete_trace_command): Likewise.
1215 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1216 "op".
1217 (arm_gdbarch_init): Remove inner "e_flags".
1218 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1219 "offset" in inner blocks.
1220
1221 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
1222
1223 * dwarf-index-write.c (file_write): Don't write if the vector is
1224 empty.
1225
1226 2018-10-05 Tom de Vries <tdevries@suse.de>
1227
1228 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1229 PyArg_ParseTuple call.
1230
1231 2018-10-05 Tom de Vries <tdevries@suse.de>
1232
1233 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1234 PyArg_ParseTuple call.
1235
1236 2018-10-04 Joel Brobecker <brobecker@adacore.com>
1237
1238 * psymtab.c (recursively_search_psymtabs): Reformat parameters
1239 to avoid exceeding 80 characters per line limit.
1240
1241 2018-10-04 Tom Tromey <tom@tromey.com>
1242
1243 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1244 (reread_symbols): Update.
1245 * complaints.h (clear_complaints): Remove argument.
1246 * complaints.c (enum complaint_series): Remove.
1247 (series): Remove global.
1248 (complaint_internal): Update.
1249 (clear_complaints): Remove argument.
1250
1251 2018-10-04 Tom Tromey <tom@tromey.com>
1252
1253 * symfile.c (symbol_file_add_with_addrs): Do not print "no
1254 debugging symbols" message if there is a separate debug objfile.
1255
1256 2018-10-04 Tom Tromey <tom@tromey.com>
1257
1258 PR cli/19551:
1259 * symfile.c (symbol_file_add_with_addrs): Update output.
1260 * psymtab.c (require_partial_symbols): Update output.
1261
1262 2018-10-04 Tom Tromey <tom@tromey.com>
1263
1264 PR cli/22234:
1265 * complaints.c: Emit \n.
1266
1267 2018-10-04 Tom Tromey <tom@tromey.com>
1268
1269 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1270 (separate_debug_file_exists, find_separate_debug_file)
1271 (add_symbol_file_command, reread_symbols, allocate_symtab)
1272 (allocate_compunit_symtab): Use filtered printing, not
1273 unfiltered.
1274 * psymtab.c (require_partial_symbols, dump_psymtab)
1275 (allocate_psymtab): Use filtered printing, not unfiltered.
1276
1277 2018-10-04 Tom Tromey <tom@tromey.com>
1278
1279 * complaints.c (complaint_internal): Correctly check complaint
1280 count.
1281
1282 2018-10-04 Tom Tromey <tom@tromey.com>
1283
1284 * complaints.h (struct complaints): Remove declaration.
1285 * complaints.c (clear_complaints): Remove an unused variable.
1286
1287 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1288
1289 * MAINTAINERS (Write After Approval): Add self.
1290
1291 2018-10-03 Tom Tromey <tom@tromey.com>
1292
1293 * guile/scm-value.c (gdbscm_value_to_string): Initialize
1294 "buffer_contents".
1295 * coffread.c (coff_symtab_read): Initialize "newobj".
1296
1297 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
1298
1299 * dwarf2read.c (read_func_scope): Remove struct keyword in
1300 range-based for.
1301
1302 2018-10-03 Tom Tromey <tom@tromey.com>
1303
1304 * README: Mention --enable-ubsan.
1305 * NEWS: Mention --enable-ubsan.
1306 * acinclude.m4: Include sanitize.m4.
1307 * configure: Rebuild.
1308 * configure.ac: Call AM_GDB_UBSAN.
1309 * sanitize.m4: New file.
1310
1311 2018-10-03 Tom Tromey <tom@tromey.com>
1312
1313 * expression.h (enum exp_opcode): Use uint8_t as base type.
1314 * expprint.c (op_name): Handle invalid opcodes.
1315
1316 2018-10-03 Tom Tromey <tom@tromey.com>
1317
1318 * parse.c (prefixify_expression): Add assert.
1319 (parse_exp_in_context_1): Throw exception if the expression is
1320 empty.
1321
1322 2018-10-03 Tom Tromey <tom@tromey.com>
1323
1324 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1325
1326 2018-10-03 Tom Tromey <tom@tromey.com>
1327
1328 * c-exp.y (parse_number): Work in unsigned. Remove casts.
1329
1330 2018-10-03 Tom Tromey <tom@tromey.com>
1331
1332 * dwarf2read.c (read_subrange_type): Make "negative_mask"
1333 unsigned.
1334
1335 2018-10-03 Tom Tromey <tom@tromey.com>
1336
1337 * findvar.c (extract_integer): Do work in an unsigned type.
1338
1339 2018-10-03 Tom Tromey <tom@tromey.com>
1340
1341 * common/enum-flags.h (enum_flags::operator~): Add static assert.
1342 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1343 base type.
1344 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1345 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1346 type.
1347 * c-lang.h (enum c_string_type_values): Use unsigned as base
1348 type.
1349 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1350
1351 2018-10-03 Tom Tromey <tom@tromey.com>
1352
1353 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1354 <~dwarf2_frame_state_reg_info>: Update.
1355 <dwarf2_frame_state_reg_info>: Update.
1356 <alloc_regs>: Add assertion. Update.
1357 <reg>: Now a std::vector.
1358 <num_regs>: Remove.
1359 <swap>: Update.
1360 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1361 (execute_cfa_program_test, dwarf2_frame_cache): Update.
1362
1363 2018-10-03 Tom Tromey <tom@tromey.com>
1364
1365 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1366
1367 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1368
1369 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1370
1371 2018-10-02 Tom Tromey <tom@tromey.com>
1372
1373 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1374
1375 2018-10-02 John Darrington <john@darrington.wattle.id.au>
1376
1377 * NEWS: Mention changed commands.
1378 * ser-uds.c: New file.
1379 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1380 * configure: Regenerate.
1381 * Makefile.in: Add new file.
1382 * serial.c (serial_open): Check if filename is a socket
1383 and lookup the appropriate interface accordingly.
1384
1385 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1386
1387 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1388 define.
1389 (AARCH64_EXTRA_MAGIC): Likewise.
1390 (AARCH64_FPSIMD_MAGIC): Likewise.
1391 (AARCH64_SVE_MAGIC): Likewise.
1392 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1393 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1394 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1395 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1396 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1397 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1398 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1399 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1400 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1401 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1402 (read_aarch64_ctx): Add function.
1403 (aarch64_linux_sigframe_init): Detect FP registers.
1404
1405 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1406
1407 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1408 (AARCH64_D0_REGNUM): Likewise.
1409 (AARCH64_S0_REGNUM): Likewise.
1410 (AARCH64_H0_REGNUM): Likewise.
1411 (AARCH64_B0_REGNUM): Likewise.
1412 (AARCH64_SVE_V0_REGNUM): Likewise.
1413 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1414 (AARCH64_D0_REGNUM): Likewise.
1415 (AARCH64_S0_REGNUM): Likewise.
1416 (AARCH64_H0_REGNUM): Likewise.
1417 (AARCH64_B0_REGNUM): Likewise.
1418 (AARCH64_SVE_V0_REGNUM): Likewise.
1419
1420 2018-10-01 Gary Benson <gbenson@redhat.com>
1421
1422 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1423 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1424 prfpregset_t instead of gdb_prfpregset_t.
1425 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1426 * configure, config.in: Rebuild.
1427
1428 2018-10-01 Gary Benson <gbenson@redhat.com>
1429
1430 * common/gdb_proc_service.h: New file, factored out from...
1431 * gdb_proc_service.h: Moved common code to the above file.
1432 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1433
1434 2018-10-01 Gary Benson <gbenson@redhat.com>
1435
1436 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1437 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
1438
1439 2018-10-01 Gary Benson <gbenson@redhat.com>
1440
1441 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1442 (AC_CHECK_HEADERS): Check for linux/elf.h.
1443 * configure, config.in: Rebuild.
1444 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1445 doesn't define elf_fpregset_t.
1446
1447 2018-10-01 Gary Benson <gbenson@redhat.com>
1448
1449 * gdb_proc_service.h: Whitespace change.
1450
1451 2018-10-01 Tom Tromey <tom@tromey.com>
1452
1453 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1454 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1455 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1456
1457 2018-10-01 Tom Tromey <tom@tromey.com>
1458
1459 * README: Minor change.
1460
1461 2018-09-30 Pedro Alves <palves@redhat.com>
1462
1463 * darwin-nat-info.c (darwin_debug_regions_recurse)
1464 (info_mach_exceptions_command): Remove unused local variables.
1465 * darwin-nat.c (darwin_decode_notify_message)
1466 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1467 (darwin_stop_inferior, darwin_setup_exceptions)
1468 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1469 (darwin_nat_target::attach, darwin_nat_target::detach)
1470 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1471 local variables.
1472 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1473 variables.
1474
1475 2018-09-29 Tom Tromey <tom@tromey.com>
1476
1477 * README: Remove some leftover text.
1478
1479 2018-09-29 Tom Tromey <tom@tromey.com>
1480
1481 * PROBLEMS: Rewrite.
1482 * README: Update.
1483
1484 2018-09-28 John Baldwin <jhb@FreeBSD.org>
1485
1486 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1487 case with explicit breakpoint kind.
1488 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1489 'additional_info' and related logic.
1490 (riscv_debug_breakpoints): New variable.
1491 (riscv_breakpoint_kind_from_pc): Use the length of the existing
1492 instruction to determine the breakpoint kind.
1493 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1494 flag. Update description of 'set/show riscv
1495 use-compressed-breakpoints' flag.
1496
1497 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
1498
1499 (NEWS): Mention changes to frame related commands.
1500 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1501 (add_prefix_cmd_suppress_notification): New function.
1502 (add_com_suppress_notification): Call
1503 add_cmd_suppress_notification.
1504 * command.h (add_cmd_suppress_notification): Declare.
1505 (add_prefix_cmd_suppress_notification): Declare.
1506 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1507 (parse_frame_specification): Moved from stack.c, with
1508 simplification to handle a single argument.
1509 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1510 switch to the selected frame. Add a header comment.
1511 * stack.c: Remove 'safe-ctype.h' include.
1512 (find_frame_for_function): Add declaration.
1513 (find_frame_for_address): New function.
1514 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1515 (frame_selection_by_function_completer): New function.
1516 (info_frame_command): Rename to...
1517 (info_frame_command_core): ...this, and update parameter types.
1518 (select_frame_command): Rename to...
1519 (select_frame_command_core): ...this, and update parameter types.
1520 (frame_command): Rename to...
1521 (frame_command_core): ...this, and update parameter types.
1522 (class frame_command_helper): New class to wrap implementations of
1523 frame related sub-commands.
1524 (frame_apply_cmd_list): New static global.
1525 (frame_cmd_list): Make static.
1526 (select_frame_cmd_list): New global for sub-commands.
1527 (info_frame_cmd_list): New global for sub-commands.
1528 (_initialize_stack): Register sub-commands for 'frame',
1529 'select-frame', and 'info frame'. Update 'frame apply' commands
1530 to use frame_apply_cmd_list. Move function local static
1531 frame_apply_list to file static frame_apply_cmd_list for
1532 consistency.
1533 * stack.h (select_frame_command): Delete declarationn.
1534 (select_frame_for_mi): Declare new function.
1535
1536 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
1537
1538 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1539 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1540 and NOP.
1541
1542 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
1543
1544 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1545
1546 2018-09-26 Tom Tromey <tom@tromey.com>
1547
1548 * valops.c (auto_abandon): Remove dead code.
1549
1550 2018-09-26 Tom Tromey <tom@tromey.com>
1551
1552 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1553
1554 2018-09-24 Tom Tromey <tom@tromey.com>
1555
1556 * common/pathstuff.c (get_standard_cache_dir): Make
1557 "xdg_cache_home" and "home" const.
1558 * top.c (init_history): Make "tmpenv" const.
1559 * main.c (get_init_files): Make "homedir" const.
1560
1561 2018-09-23 Tom Tromey <tom@tromey.com>
1562
1563 PR python/18852:
1564 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1565
1566 2018-09-23 Tom Tromey <tom@tromey.com>
1567
1568 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1569 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1570 * python/python-internal.h (gdbpy_handle_exception): Declare.
1571 * python/py-utils.c (gdbpy_handle_exception): New function.
1572
1573 2018-09-23 Tom Tromey <tom@tromey.com>
1574
1575 PR python/17284:
1576 * python/py-type.c (typy_template_argument): Check for negative
1577 argument number.
1578
1579 2018-09-23 Tom Tromey <tom@tromey.com>
1580
1581 PR python/14062:
1582 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1583
1584 2018-09-23 Tom Tromey <tom@tromey.com>
1585
1586 PR python/18170:
1587 * python/py-value.c (valpy_int): Allow conversion from pointer
1588 type.
1589
1590 2018-09-23 Tom Tromey <tom@tromey.com>
1591
1592 PR python/20126:
1593 * python/py-value.c (valpy_int): Respect type sign.
1594
1595 2018-09-23 Tom Tromey <tom@tromey.com>
1596
1597 PR python/18352;
1598 * python/py-value.c (valpy_float): Allow conversions from int or
1599 char.
1600 (valpy_int, valpy_long): Allow conversions from float.
1601
1602 2018-09-23 Tom Tromey <tom@tromey.com>
1603
1604 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1605 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1606
1607 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1608
1609 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1610 __sighndlr.
1611 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1612
1613 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
1614
1615 * windows-nat.c (windows_nat_target::wait): Remove a spurious
1616 target_terminal::ours().
1617
1618 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
1619
1620 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1621 of vl to ULONGEST.
1622
1623 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
1624
1625 * breakpoint.c (update_inserted_breakpoint_locations): Remove
1626 redundant condition.
1627
1628 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1629
1630 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1631
1632 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1633 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
1634 * sol-thread.c (ps_pdmodel): Don't guard definition.
1635
1636 * procfs.c: Fix formatting.
1637
1638 * procfs.c (sysset_t_alloc): Remove.
1639 (create_procinfo): Use XNEW instead of sysset_t_alloc.
1640 (procfs_debug_inferior): Likewise.
1641 (procfs_set_exec_trap): Likewise.
1642 (proc_set_traced_sysentry): Don't allocate argp dynamically.
1643 (proc_set_traced_sysexit): Likewise.
1644
1645 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1646 (dead_procinfo): Likewise.
1647 (proc_warn): Likewise.
1648 (proc_error): Likewise.
1649 (proc_get_LDT_entry): Likewise.
1650 (do_attach): Likewise.
1651 (procfs_target::pid_to_str): Likewise.
1652 (iterate_over_mappings): Likewise.
1653
1654 * procfs.c (create_procinfo): Fix ARI warning.
1655 (proc_get_status): Likewise.
1656 (proc_stop_process): Likewise.
1657 (proc_run_process): Likewise.
1658 (proc_kill): Likewise.
1659 (proc_get_LDT_entry): Likewise.
1660 (procfs_find_LDT_entry): Likewise.
1661 (proc_update_threads): Likewise.
1662 (proc_iterate_over_threads): Likewise.
1663 (do_attach): Likewise.
1664 (procfs_xfer_memory): Likewise.
1665 (invalidate_cache): Likewise.
1666 (procfs_target::resume): Likewise.
1667 (procfs_init_inferior): Likewise.
1668 (procfs_set_exec_trap): Likewise.
1669 (procfs_target::thread_alive): Likewise.
1670 (procfs_target::pid_to_exec_file): Likewise.
1671 (iterate_over_mappings): Likewise.
1672 (procfs_target::make_corefile_notes): Likewise.
1673 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1674
1675 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1676 (procfs_find_LDT_entry): Likewise.
1677 * sol-thread.c (ps_lgetLDT): Likewise.
1678
1679 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1680
1681 PR tdep/17903
1682 * procfs.c (procfs_target): Declare pid_to_exec_file.
1683 (procfs_target::pid_to_exec_file): New.
1684
1685 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1686
1687 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1688 renaming.
1689 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1690 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1691
1692 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1693
1694 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1695 (supply_fpregset, fill_fpregset): Move ...
1696 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1697 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1698 Remove references to ioctl-based procfs.
1699 Include <sys/reg.h>.
1700 Remove PR_MODEL_NATIVE guards.
1701 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1702 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1703
1704 2018-09-19 Xavier Roirand <roirand@adacore.com>
1705
1706 PR gdb/20981:
1707 * solib-darwin.c (darwin_get_dyld_bfd): New function.
1708 (darwin_solib_get_all_image_info_addr_at_init): Update call.
1709 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1710
1711 2018-09-19 John Baldwin <jhb@FreeBSD.org>
1712
1713 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1714 (fbsd_print_sockaddr_in6): Likewise.
1715
1716 2018-09-19 Richard Bunt <richard.bunt@arm.com>
1717 Chris January <chris.january@arm.com>
1718
1719 * eval.c (skip_undetermined_arglist): Skip argument list helper.
1720 (evaluate_subexp_standard): Return a dummy type when
1721 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1722 OP_F77_UNDETERMINED_ARGLIST case.
1723 * expression.h (enum noside): Update comment.
1724
1725 2018-09-19 George Vasick <george.vasick@oracle.com>
1726
1727 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1728
1729 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
1730 April Chin <april.chin@oracle.com>
1731 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1732
1733 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1734 uint_t lwpid_t.
1735 (create_procinfo): Print pids in /proc without leading zeros.
1736
1737 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
1738
1739 * nios2-tdep.c (nios2_gcc_target_options): New.
1740 (nios2_gdb_arch_init): Install new hook.
1741
1742 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
1743
1744 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1745 New file.
1746 * update-gnulib.sh: Apply patch.
1747 * configure: Re-generate.
1748
1749 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1750
1751 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1752 description. Make "info proc" command descriptions more
1753 consistent.
1754
1755 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1756
1757 * NEWS: Mention 'info proc files' command.
1758
1759 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1760
1761 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1762 descriptors for IP_FILES and IP_ALL.
1763
1764 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1765
1766 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1767 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1768 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1769 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1770 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1771 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1772 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1773 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1774 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1775 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1776 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1777 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1778 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1779 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1780 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1781 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1782 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1783 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1784 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1785 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1786 (struct fbsd_sockaddr_un): New types.
1787 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1788 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1789 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1790 (fbsd_core_info_proc_files): New functions.
1791 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1792 IP_ALL.
1793 * fbsd-tdep.h (fbsd_info_proc_files_header)
1794 (fbsd_info_proc_files_entry): New.
1795
1796 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1797
1798 * defs.h (enum info_proc_what) [IP_FILES]: New value.
1799 * infcmd.c (info_proc_cmd_files): New function.
1800 (_initialize_infcmd): Register 'info proc files' command.
1801
1802 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1803
1804 * gnulib/aclocal-m4-deps.mk: Re-generate.
1805 * gnulib/aclocal.m4: Re-generate.
1806 * gnulib/config.in: Re-generate.
1807 * gnulib/configure: Re-generate.
1808 * gnulib/import/Makefile.am: Re-generate.
1809 * gnulib/import/Makefile.in: Re-generate.
1810 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1811 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1812 * gnulib/import/arpa_inet.in.h: New file.
1813 * gnulib/import/inet_ntop.c: New file.
1814 * gnulib/import/m4/arpa_inet_h.m4: New file.
1815 * gnulib/import/m4/inet_ntop.m4: New file.
1816 * gnulib/import/m4/netinet_in_h.m4: New file.
1817 * gnulib/import/m4/socklen.m4: New file.
1818 * gnulib/import/m4/sockpfaf.m4: New file.
1819 * gnulib/import/m4/stdalign.m4: New file.
1820 * gnulib/import/m4/sys_uio_h.m4: New file.
1821 * gnulib/import/netinet_in.in.h: New file.
1822 * gnulib/import/stdalign.in.h: New file.
1823 * gnulib/import/sys_socket.c: New file.
1824 * gnulib/import/sys_socket.in.h: New file.
1825 * gnulib/import/sys_uio.in.h: New file.
1826 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1827 module.
1828
1829 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1830
1831 * gnulib/aclocal-m4-deps.mk: New file.
1832 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1833 deterministically.
1834
1835 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1836
1837 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1838 KVE_PATH.
1839
1840 2018-09-18 Tom Tromey <tom@tromey.com>
1841
1842 * compile/compile-object-load.c (struct
1843 link_hash_table_cleanup_data): Add constructor and destructor.
1844 Use DISABLE_COPY_AND_ASSIGN.
1845 (~link_hash_table_cleanup_data): Rename from
1846 link_hash_table_free. Now a destructor.
1847 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
1848
1849 2018-09-18 Tom Tromey <tom@tromey.com>
1850
1851 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1852 * compile/compile-object-load.c (struct munmap_list): Move to
1853 header file.
1854 (munmap_list::add): Rename from munmap_list_add; rewrite.
1855 (munmap_list::~munmap_list): Rename from munmap_list_free.
1856 (munmap_listp_free_cleanup): Remove.
1857 (compile_object_load): Update.
1858 * compile/compile-object-load.h (struct munmap_list): Move from
1859 compile-object-load.c. Rewrite.
1860
1861 2018-09-18 Alan Hayward <alan.hayward@arm.com>
1862
1863 * aarch64-tdep.c (pass_in_v): Use register size.
1864 (aarch64_extract_return_value): Likewise.
1865 (aarch64_store_return_value): Likewise.
1866
1867 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1868
1869 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1870 rlim_t.
1871
1872 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1873
1874 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1875 Fix short help line.
1876
1877 2018-09-17 Tom Tromey <tom@tromey.com>
1878
1879 PR python/20445:
1880 * configure: Rebuild.
1881 * configure.ac: Conditionally use -DNDEBUG for Python.
1882
1883 2018-09-17 Tom Tromey <tom@tromey.com>
1884
1885 * configure: Rebuild.
1886 * configure.ac: Use gmp as a library dependency when checking for
1887 mpfr.
1888
1889 2018-09-17 Pedro Alves <palves@redhat.com>
1890
1891 * python/py-inferior.c (find_inferior_object): Delete.
1892
1893 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
1894
1895 * compile/compile-cplus-types.c
1896 (compile_cplus_instance::enter_scope): Don't use new_scope after
1897 std::move.
1898
1899 2018-09-17 Tom Tromey <tom@tromey.com>
1900
1901 * common/pathstuff.c (get_standard_cache_dir): Use
1902 ~/Library/Caches on macOS.
1903 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1904
1905 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1906
1907 PR python/23669
1908 * breakpoint.c (commands_cmd_element): New.
1909 (_initialize_breakpoint): Assign commands_cmd_element.
1910 * breakpoint.h (commands_cmd_element): New.
1911 * cli/cli-script.c (while_cmd_element, if_command,
1912 define_cmd_element): New.
1913 (command_name_equals): Remove.
1914 (process_next_line): Compare commands by pointer, not by name.
1915 (_initialize_cli_script): Assign the various cmd_list_element
1916 variables.
1917 * compile/compile.c (compile_cmd_element): New.
1918 (_initialize_compile): Assign compile_cmd_element.
1919 * compile/compile.h (compile_cmd_element): New.
1920 * guile/guile.c (guile_cmd_element): New.
1921 (install_gdb_commands): Assign guile_cmd_element.
1922 * guile/guile.h (guile_cmd_element): New.
1923 * python/python.c (python_cmd_element): New.
1924 (_initialize_python): Assign python_cmd_element.
1925 * python/python.h (python_cmd_element): New.
1926 * tracepoint.c (while_stepping_cmd_element): New.
1927 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1928 * tracepoint.h (while_stepping_cmd_element): New.
1929
1930 2018-09-17 Tom Tromey <tom@tromey.com>
1931
1932 * infrun.c (save_infcall_suspend_state): Return
1933 infcall_suspend_state_up.
1934 (save_infcall_control_state): Return infcall_control_state_up.
1935 * inferior.h (save_infcall_suspend_state)
1936 (save_infcall_control_state): Declare later. Return unique
1937 pointers.
1938
1939 2018-09-17 Tom Tromey <tom@tromey.com>
1940
1941 * infrun.c (struct stop_context): Declare constructor,
1942 destructor, "changed" method.
1943 (stop_context::stop_context): Rename from save_stop_context.
1944 (stop_context::~stop_context): Rename from
1945 release_stop_context_cleanup.
1946 (normal_stop): Update.
1947 (stop_context::changed): Rename from stop_context_changed. Return
1948 bool.
1949
1950 2018-09-17 Tom Tromey <tom@tromey.com>
1951
1952 * inferior.h (struct infcall_suspend_state_deleter): New.
1953 (infcall_suspend_state_up): New typedef.
1954 (struct infcall_control_state_deleter): New.
1955 (infcall_control_state_up): New typedef.
1956 (make_cleanup_restore_infcall_suspend_state)
1957 (make_cleanup_restore_infcall_control_state): Don't declare.
1958 * infcall.c (call_function_by_hand_dummy): Update.
1959 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1960 (make_cleanup_restore_infcall_suspend_state): Remove.
1961 (do_restore_infcall_control_state_cleanup)
1962 (make_cleanup_restore_infcall_control_state): Remove.
1963
1964 2018-09-17 Tom Tromey <tom@tromey.com>
1965
1966 * gdbthread.h (struct thread_control_state): Add initializer.
1967 (class thread_info) <control>: Remove initializer.
1968 * inferior.h (struct inferior_control_state): Add initializer.
1969 (class inferior) <control>: Remove initializer.
1970 (exit_inferior_1): Update.
1971 * infrun.c (struct infcall_control_state): Add constructors.
1972 (save_infcall_control_state): Use new.
1973 (restore_infcall_control_state, discard_infcall_control_state):
1974 Use delete.
1975
1976 2018-09-17 Tom Tromey <tom@tromey.com>
1977
1978 * infrun.c (struct infcall_suspend_state) <registers>: Now a
1979 unique_ptr.
1980 <siginfo_data>: Now a unique_xmalloc_ptr.
1981 (save_infcall_suspend_state, restore_infcall_suspend_state)
1982 (discard_infcall_suspend_state)
1983 (get_infcall_suspend_state_regcache): Update.
1984
1985 2018-09-17 Tom Tromey <tom@tromey.com>
1986
1987 * gdbthread.h (struct thread_suspend_state): Add initializers.
1988 (class thread_info) <suspend>: Remove initializer.
1989 * infrun.c (struct infcall_suspend_state): Add initializers.
1990 (save_infcall_suspend_state): Use new.
1991 (discard_infcall_suspend_state): Use delete.
1992
1993 2018-09-16 Tom Tromey <tom@tromey.com>
1994
1995 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1996 Remove.
1997 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1998 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1999 (py_varobj_iter_new): Likewise.
2000 (py_varobj_get_iterator): Use gdbpy_ref.
2001
2002 2018-09-16 Tom Tromey <tom@tromey.com>
2003
2004 * python/py-threadevent.c (py_get_event_thread): Simplify.
2005 * python/py-inferior.c (infpy_thread_from_thread_handle):
2006 Return immediately after calling thread_to_thread_object. Use
2007 Py_RETURN_NONE.
2008 (thread_to_thread_object): Set the exception on a NULL return.
2009
2010 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2011
2012 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2013
2014 2018-09-16 Tom Tromey <tom@tromey.com>
2015
2016 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2017 Remove.
2018
2019 2018-09-16 Tom Tromey <tom@tromey.com>
2020
2021 * python/python-internal.h (thread_to_thread_object): Change
2022 return type.
2023 * python/py-inferior.c (thread_to_thread_object): Return a new
2024 reference.
2025 (infpy_thread_from_thread_handle): Update.
2026 * python/py-infthread.c (gdbpy_selected_thread): Update.
2027 * python/py-stopevent.c (create_stop_event_object): Update.
2028 * python/py-threadevent.c (py_get_event_thread): Return a new
2029 reference.
2030 (py_get_event_thread): Update.
2031 * python/py-event.h (py_get_event_thread): Change return type.
2032 * python/py-continueevent.c (create_continue_event_object):
2033 Update.
2034
2035 2018-09-16 Tom Tromey <tom@tromey.com>
2036
2037 * python/py-progspace.c (pspy_get_objfiles): Update.
2038 * python/python-internal.h (objfile_to_objfile_object): Change
2039 return type.
2040 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2041 Update.
2042 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2043 Update.
2044 * python/python.c (gdbpy_get_current_objfile): Update.
2045 (gdbpy_objfiles): Update.
2046 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2047 Update.
2048 (objfile_to_objfile_object): Return a new reference.
2049 * python/py-symtab.c (stpy_get_objfile): Update.
2050 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2051 Update.
2052
2053 2018-09-16 Tom Tromey <tom@tromey.com>
2054
2055 * python/py-inferior.c (infpy_get_progspace): Update.
2056 * python/python-internal.h (pspace_to_pspace_object): Change
2057 return type.
2058 * python/py-newobjfileevent.c
2059 (create_clear_objfiles_event_object): Update.
2060 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2061 Update.
2062 * python/python.c (gdbpy_get_current_progspace): Update.
2063 (gdbpy_progspaces): Update.
2064 * python/py-progspace.c (pspace_to_pspace_object): Return a new
2065 reference.
2066 * python/py-objfile.c (objfpy_get_progspace): Update.
2067 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2068 Update.
2069
2070 2018-09-16 Tom Tromey <tom@tromey.com>
2071
2072 * python/lib/gdb/__init__.py (current_progspace, objfiles)
2073 (solib_name, block_for_pc, find_pc_line): New functions.
2074 (execute_unwinders): Update.
2075 * python/py-block.c (gdbpy_block_for_pc): Remove.
2076 * python/py-inferior.c (infpy_get_progspace): New function.
2077 (inferior_object_getset) <progspace>: Add.
2078 * python/py-progspace.c (pspy_objfiles): Rewrite.
2079 (pspy_solib_name, pspy_block_for_pc)
2080 (pspy_find_pc_line, pspy_is_valid): New functions.
2081 (progspace_object_methods): Add entries for solib_name,
2082 block_for_pc, find_pc_line, is_valid.
2083 * python/python-internal.h (gdbpy_block_for_pc)
2084 (build_objfiles_list): Don't declare.
2085 * python/python.c: Don't include solib.h.
2086 (gdbpy_solib_name, gdbpy_find_pc_line)
2087 (gdbpy_get_current_progspace, build_objfiles_list)
2088 (gdbpy_objfiles): Remove.
2089 (GdbMethods) <current_progspace, objfiles, block_for_pc,
2090 solib_name, find_pc_line>: Remove entries.
2091
2092 2018-09-16 Tom Tromey <tom@tromey.com>
2093
2094 * top.c (new_ui_command): Use GNU style for metasyntactic
2095 variables.
2096 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2097 variables.
2098 * maint.c (maintenance_translate_address): Remove "<>" around
2099 text.
2100 * interps.c (interpreter_exec_cmd): Use GNU style for
2101 metasyntactic variables.
2102 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2103 metasyntactic variables.
2104 * tracepoint.c (tfind_range_command): Use GNU style for
2105 metasyntactic variables.
2106 (tfind_outside_command): Likewise.
2107 (_initialize_tracepoint): Likewise.
2108 * remote.c (extended_remote_target::create_inferior): Use GNU
2109 style for metasyntactic variables.
2110 * sparc64-tdep.c (adi_examine_command): Use GNU style for
2111 metasyntactic variables.
2112 (adi_assign_command): Likewise.
2113
2114 2018-09-16 Tom Tromey <tom@tromey.com>
2115
2116 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2117 metasyntactic variables. Print message if no disassembler options
2118 are available.
2119
2120 2018-09-15 Tom Tromey <tom@tromey.com>
2121
2122 * infcmd.c (get_inferior_args): Return const char *.
2123 * inferior.h (get_inferior_args): Return type now const.
2124 * linux-tdep.c (linux_fill_prpsinfo): Update.
2125 * procfs.c (procfs_target::make_corefile_notes): Update.
2126
2127 2018-09-07 Tom Tromey <tom@tromey.com>
2128
2129 * python/python.c (execute_gdb_command): Call bpstat_do_actions
2130 inside the TRY.
2131
2132 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
2133
2134 * nios2-tdep.c (nios2_type_align): New.
2135 (nios2_gdb_arch_init): Install type_align hook.
2136
2137 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2138
2139 * eval.c (fake_method::fake_method): Call xzalloc directly for a
2140 type that is neither object file owned, nor gdbarch owned.
2141 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2142 gdbarch is non-NULL.
2143 (alloc_type_instance): Allocate non-objfile owned types on the
2144 gdbarch obstack.
2145 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2146 using TYPE_ALLOC to ensure memory is allocated on the correct
2147 obstack.
2148 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2149 obstack, or the gdbarch obstack.
2150 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2151
2152 2018-09-14 Tom Tromey <tom@tromey.com>
2153
2154 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2155 block.
2156
2157 2018-09-14 Tom Tromey <tom@tromey.com>
2158
2159 * nat/fork-inferior.c (get_startup_shell): Remove "static".
2160
2161 2018-09-13 Tom Tromey <tom@tromey.com>
2162
2163 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2164 static.
2165
2166 2018-09-13 Tom Tromey <tom@tromey.com>
2167
2168 * exec.c (try_open_exec_file): Use std::string.
2169
2170 2018-09-13 Tom Tromey <tom@tromey.com>
2171
2172 * utils.h (gdb_bfd_errmsg): Return std::string.
2173 * exec.c (exec_file_attach): Update.
2174 * compile/compile-object-load.c (compile_object_load): Update.
2175 * utils.c (gdb_bfd_errmsg): Return std::string.
2176
2177 2018-09-13 Tom Tromey <tom@tromey.com>
2178
2179 * procfs.c (struct procinfo_deleter): New.
2180 (procinfo_up): New typedef.
2181 (do_destroy_procinfo_cleanup): Remove.
2182 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
2183
2184 2018-09-13 Tom Tromey <tom@tromey.com>
2185
2186 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2187
2188 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2189 2018-09-13 Tom Tromey <tom@tromey.com>
2190
2191 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2192 (pspy_get_objfiles): New function.
2193 (progspace_object_methods): New.
2194 (pspace_object_type): Add tp_methods callback.
2195 * python/python-internal.h (build_objfiles_list): New
2196 declaration.
2197 * python/python.c (build_objfiles_list): New function.
2198 (gdbpy_objfiles): Implement using build_objfiles_list.
2199 * NEWS: Mention the Progspace.objfiles method.
2200
2201 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2202
2203 * python/py-inferior.c (infpy_get_progspace): New function.
2204 (inferior_object_getset): Add progspace property.
2205 * NEWS: Mention the new property.
2206
2207 2018-09-13 Tom Tromey <tom@tromey.com>
2208
2209 PR rust/23650:
2210 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2211
2212 2018-09-13 Tom Tromey <tom@tromey.com>
2213
2214 PR rust/23626:
2215 * rust-lang.c (rust_enum_variant): Now static.
2216 (rust_empty_enum_p): New function.
2217 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2218 Handle empty enum.
2219
2220 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2221
2222 * python/py-inferior.c (infpy_repr): New.
2223 (inferior_object_type): Register infpy_repr.
2224 * python/py-objfile.c (objfpy_repr): New.
2225 (objfile_object_type): Register objfpy_repr.
2226
2227 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2228
2229 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2230
2231 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2232
2233 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2234 typo.
2235
2236 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
2237
2238 * common/common-utils.c: Don't include '<sys/stat.h>'.
2239 (is_regular_file): Move to...
2240 * common/filestuff.c (is_regular_file): ... here.
2241 * common/common-utils.h (is_regular_file): Move to...
2242 * common/filestuff.h (is_regular_file): ... here.
2243
2244 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
2245
2246 * skip.c (debug_skip): New variable.
2247 (skiplist_entry::do_skip_file_p): Add debug output.
2248 (skiplist_entry::do_skip_gfile_p): Likewise.
2249 (skiplist_entry::skip_function_p): Likewise.
2250 (_initialize_step_skip): Create debug command.
2251 * NEWS: Mention set/show debug skip.
2252
2253 2018-09-11 Xavier Roirand <roirand@adacore.com>
2254
2255 * darwin-nat.c (should_disable_startup_with_shell):
2256 New function.
2257 (darwin_nat_target::create_inferior): Add call.
2258
2259 2018-09-11 Xavier Roirand <roirand@adacore.com>
2260
2261 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2262 inf_port, msg_state>: Initialize.
2263 (struct darwin_thread_info) <signaled, single_step>: Change
2264 type and initialize.
2265 (struct darwin_thread_info) <event>: Initialize.
2266
2267 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2268
2269 PR gdb/23555
2270 PR gdb/23558
2271 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2272 guesses.
2273
2274 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2275
2276 Revert:
2277 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2278
2279 PR gdb/23555
2280 PR gdb/23558
2281 * gnulib/aclocal.m4: Regenerate.
2282 * gnulib/config.in: Regenerate.
2283 * gnulib/configure: Regenerate.
2284 * gnulib/import/Makefile.am: Update.
2285 * gnulib/import/Makefile.in: Update.
2286 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2287 * gnulib/import/_Noreturn.h: ... this.
2288 * gnulib/import/alloca.in.h: Update.
2289 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2290 * gnulib/import/arg-nonnull.h: ... this.
2291 * gnulib/import/assure.h: Update.
2292 * gnulib/import/at-func.c: Update.
2293 * gnulib/import/basename-lgpl.c: Update.
2294 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2295 * gnulib/import/c++defs.h: ... this.
2296 * gnulib/import/canonicalize-lgpl.c: Update.
2297 * gnulib/import/cdefs.h: Update.
2298 * gnulib/import/chdir-long.c: Update.
2299 * gnulib/import/chdir-long.h: Update.
2300 * gnulib/import/cloexec.c: Update.
2301 * gnulib/import/cloexec.h: Update.
2302 * gnulib/import/close.c: Update.
2303 * gnulib/import/closedir.c: Update.
2304 * gnulib/import/config.charset: Update.
2305 * gnulib/import/dirent-private.h: Update.
2306 * gnulib/import/dirent.in.h: Update.
2307 * gnulib/import/dirfd.c: Update.
2308 * gnulib/import/dirname-lgpl.c: Update.
2309 * gnulib/import/dirname.h: Update.
2310 * gnulib/import/dosname.h: Update.
2311 * gnulib/import/dup-safer-flag.c: Update.
2312 * gnulib/import/dup-safer.c: Update.
2313 * gnulib/import/dup.c: Update.
2314 * gnulib/import/dup2.c: Update.
2315 * gnulib/import/errno.in.h: Update.
2316 * gnulib/import/error.c: Update.
2317 * gnulib/import/error.h: Update.
2318 * gnulib/import/exitfail.c: Update.
2319 * gnulib/import/exitfail.h: Update.
2320 * gnulib/import/extra/update-copyright: Update.
2321 * gnulib/import/fchdir.c: Update.
2322 * gnulib/import/fcntl.c: Update.
2323 * gnulib/import/fcntl.in.h: Update.
2324 * gnulib/import/fd-hook.c: Update.
2325 * gnulib/import/fd-hook.h: Update.
2326 * gnulib/import/fd-safer-flag.c: Update.
2327 * gnulib/import/fd-safer.c: Update.
2328 * gnulib/import/fdopendir.c: Update.
2329 * gnulib/import/filename.h: Update.
2330 * gnulib/import/filenamecat-lgpl.c: Update.
2331 * gnulib/import/filenamecat.h: Update.
2332 * gnulib/import/flexmember.h: Update.
2333 * gnulib/import/float+.h: Update.
2334 * gnulib/import/float.c: Update.
2335 * gnulib/import/float.in.h: Update.
2336 * gnulib/import/fnmatch.c: Update.
2337 * gnulib/import/fnmatch.in.h: Update.
2338 * gnulib/import/fnmatch_loop.c: Update.
2339 * gnulib/import/fpucw.h: Update.
2340 * gnulib/import/frexp.c: Update.
2341 * gnulib/import/frexpl.c: Update.
2342 * gnulib/import/fstat.c: Update.
2343 * gnulib/import/fstatat.c: Update.
2344 * gnulib/import/getcwd-lgpl.c: Update.
2345 * gnulib/import/getcwd.c: Update.
2346 * gnulib/import/getdtablesize.c: Update.
2347 * gnulib/import/getlogin_r.c: Update.
2348 * gnulib/import/getprogname.c: Update.
2349 * gnulib/import/getprogname.h: Update.
2350 * gnulib/import/gettext.h: Update.
2351 * gnulib/import/gettimeofday.c: Update.
2352 * gnulib/import/glob-libc.h: Update.
2353 * gnulib/import/glob.c: Update.
2354 * gnulib/import/glob.in.h: Update.
2355 * gnulib/import/glob_internal.h: Update.
2356 * gnulib/import/glob_pattern_p.c: Update.
2357 * gnulib/import/globfree.c: Update.
2358 * gnulib/import/hard-locale.c: Update.
2359 * gnulib/import/hard-locale.h: Update.
2360 * gnulib/import/intprops.h: Update.
2361 * gnulib/import/inttypes.in.h: Update.
2362 * gnulib/import/isnan.c: Update.
2363 * gnulib/import/isnand-nolibm.h: Update.
2364 * gnulib/import/isnand.c: Update.
2365 * gnulib/import/isnanl-nolibm.h: Update.
2366 * gnulib/import/isnanl.c: Update.
2367 * gnulib/import/itold.c: Update.
2368 * gnulib/import/libc-config.h: Update.
2369 * gnulib/import/limits.in.h: Update.
2370 * gnulib/import/localcharset.c: Update.
2371 * gnulib/import/localcharset.h: Update.
2372 * gnulib/import/localtime-buffer.c: Update.
2373 * gnulib/import/localtime-buffer.h: Update.
2374 * gnulib/import/lstat.c: Update.
2375 * gnulib/import/m4/00gnulib.m4: Update.
2376 * gnulib/import/m4/__inline.m4: Update.
2377 * gnulib/import/m4/absolute-header.m4: Update.
2378 * gnulib/import/m4/alloca.m4: Update.
2379 * gnulib/import/m4/builtin-expect.m4: Update.
2380 * gnulib/import/m4/canonicalize.m4: Update.
2381 * gnulib/import/m4/chdir-long.m4: Update.
2382 * gnulib/import/m4/close.m4: Update.
2383 * gnulib/import/m4/closedir.m4: Update.
2384 * gnulib/import/m4/configmake.m4: Update.
2385 * gnulib/import/m4/d-ino.m4: Update.
2386 * gnulib/import/m4/d-type.m4: Update.
2387 * gnulib/import/m4/dirent_h.m4: Update.
2388 * gnulib/import/m4/dirfd.m4: Update.
2389 * gnulib/import/m4/dirname.m4: Update.
2390 * gnulib/import/m4/double-slash-root.m4: Update.
2391 * gnulib/import/m4/dup.m4: Update.
2392 * gnulib/import/m4/dup2.m4: Update.
2393 * gnulib/import/m4/eealloc.m4: Update.
2394 * gnulib/import/m4/environ.m4: Update.
2395 * gnulib/import/m4/errno_h.m4: Update.
2396 * gnulib/import/m4/error.m4: Update.
2397 * gnulib/import/m4/exponentd.m4: Update.
2398 * gnulib/import/m4/exponentl.m4: Update.
2399 * gnulib/import/m4/extensions.m4: Update.
2400 * gnulib/import/m4/extern-inline.m4: Update.
2401 * gnulib/import/m4/fchdir.m4: Update.
2402 * gnulib/import/m4/fcntl-o.m4: Update.
2403 * gnulib/import/m4/fcntl.m4: Update.
2404 * gnulib/import/m4/fcntl_h.m4: Update.
2405 * gnulib/import/m4/fdopendir.m4: Update.
2406 * gnulib/import/m4/filenamecat.m4: Update.
2407 * gnulib/import/m4/flexmember.m4: Update.
2408 * gnulib/import/m4/float_h.m4: Update.
2409 * gnulib/import/m4/fnmatch.m4: Update.
2410 * gnulib/import/m4/fnmatch_h.m4: Update.
2411 * gnulib/import/m4/fpieee.m4: Update.
2412 * gnulib/import/m4/frexp.m4: Update.
2413 * gnulib/import/m4/frexpl.m4: Update.
2414 * gnulib/import/m4/fstat.m4: Update.
2415 * gnulib/import/m4/fstatat.m4: Update.
2416 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2417 * gnulib/import/m4/getcwd-path-max.m4: Update.
2418 * gnulib/import/m4/getcwd.m4: Update.
2419 * gnulib/import/m4/getdtablesize.m4: Update.
2420 * gnulib/import/m4/getlogin.m4: Update.
2421 * gnulib/import/m4/getlogin_r.m4: Update.
2422 * gnulib/import/m4/getpagesize.m4: Update.
2423 * gnulib/import/m4/getprogname.m4: Update.
2424 * gnulib/import/m4/gettimeofday.m4: Update.
2425 * gnulib/import/m4/glibc21.m4: Update.
2426 * gnulib/import/m4/glob.m4: Update.
2427 * gnulib/import/m4/glob_h.m4: Update.
2428 * gnulib/import/m4/gnulib-cache.m4: Update.
2429 * gnulib/import/m4/gnulib-common.m4: Update.
2430 * gnulib/import/m4/gnulib-comp.m4: Update.
2431 * gnulib/import/m4/gnulib-tool.m4: Update.
2432 * gnulib/import/m4/hard-locale.m4: Update.
2433 * gnulib/import/m4/include_next.m4: Update.
2434 * gnulib/import/m4/inttypes-pri.m4: Update.
2435 * gnulib/import/m4/inttypes.m4: Update.
2436 * gnulib/import/m4/isnand.m4: Update.
2437 * gnulib/import/m4/isnanl.m4: Update.
2438 * gnulib/import/m4/largefile.m4: Update.
2439 * gnulib/import/m4/limits-h.m4: Update.
2440 * gnulib/import/m4/localcharset.m4: Update.
2441 * gnulib/import/m4/locale-fr.m4: Update.
2442 * gnulib/import/m4/locale-ja.m4: Update.
2443 * gnulib/import/m4/locale-zh.m4: Update.
2444 * gnulib/import/m4/localtime-buffer.m4: Update.
2445 * gnulib/import/m4/longlong.m4: Update.
2446 * gnulib/import/m4/lstat.m4: Update.
2447 * gnulib/import/m4/malloc.m4: Update.
2448 * gnulib/import/m4/malloca.m4: Update.
2449 * gnulib/import/m4/math_h.m4: Update.
2450 * gnulib/import/m4/mbrtowc.m4: Update.
2451 * gnulib/import/m4/mbsinit.m4: Update.
2452 * gnulib/import/m4/mbsrtowcs.m4: Update.
2453 * gnulib/import/m4/mbstate_t.m4: Update.
2454 * gnulib/import/m4/memchr.m4: Update.
2455 * gnulib/import/m4/memmem.m4: Update.
2456 * gnulib/import/m4/mempcpy.m4: Update.
2457 * gnulib/import/m4/memrchr.m4: Update.
2458 * gnulib/import/m4/mkdir.m4: Update.
2459 * gnulib/import/m4/mkstemp.m4: Update.
2460 * gnulib/import/m4/mmap-anon.m4: Update.
2461 * gnulib/import/m4/mode_t.m4: Update.
2462 * gnulib/import/m4/msvc-inval.m4: Update.
2463 * gnulib/import/m4/msvc-nothrow.m4: Update.
2464 * gnulib/import/m4/multiarch.m4: Update.
2465 * gnulib/import/m4/nocrash.m4: Update.
2466 * gnulib/import/m4/off_t.m4: Update.
2467 * gnulib/import/m4/onceonly.m4: Update.
2468 * gnulib/import/m4/open-cloexec.m4: Update.
2469 * gnulib/import/m4/open.m4: Update.
2470 * gnulib/import/m4/openat.m4: Update.
2471 * gnulib/import/m4/opendir.m4: Update.
2472 * gnulib/import/m4/pathmax.m4: Update.
2473 * gnulib/import/m4/rawmemchr.m4: Update.
2474 * gnulib/import/m4/readdir.m4: Update.
2475 * gnulib/import/m4/readlink.m4: Update.
2476 * gnulib/import/m4/realloc.m4: Update.
2477 * gnulib/import/m4/rename.m4: Update.
2478 * gnulib/import/m4/rewinddir.m4: Update.
2479 * gnulib/import/m4/rmdir.m4: Update.
2480 * gnulib/import/m4/save-cwd.m4: Update.
2481 * gnulib/import/m4/secure_getenv.m4: Update.
2482 * gnulib/import/m4/setenv.m4: Update.
2483 * gnulib/import/m4/signal_h.m4: Update.
2484 * gnulib/import/m4/ssize_t.m4: Update.
2485 * gnulib/import/m4/stat-time.m4: Update.
2486 * gnulib/import/m4/stat.m4: Update.
2487 * gnulib/import/m4/std-gnu11.m4: Update.
2488 * gnulib/import/m4/stdbool.m4: Update.
2489 * gnulib/import/m4/stddef_h.m4: Update.
2490 * gnulib/import/m4/stdint.m4: Update.
2491 * gnulib/import/m4/stdio_h.m4: Update.
2492 * gnulib/import/m4/stdlib_h.m4: Update.
2493 * gnulib/import/m4/strchrnul.m4: Update.
2494 * gnulib/import/m4/strdup.m4: Update.
2495 * gnulib/import/m4/strerror.m4: Update.
2496 * gnulib/import/m4/string_h.m4: Update.
2497 * gnulib/import/m4/strstr.m4: Update.
2498 * gnulib/import/m4/strtok_r.m4: Update.
2499 * gnulib/import/m4/sys_socket_h.m4: Update.
2500 * gnulib/import/m4/sys_stat_h.m4: Update.
2501 * gnulib/import/m4/sys_time_h.m4: Update.
2502 * gnulib/import/m4/sys_types_h.m4: Update.
2503 * gnulib/import/m4/tempname.m4: Update.
2504 * gnulib/import/m4/time_h.m4: Update.
2505 * gnulib/import/m4/unistd-safer.m4: Update.
2506 * gnulib/import/m4/unistd_h.m4: Update.
2507 * gnulib/import/m4/warn-on-use.m4: Update.
2508 * gnulib/import/m4/wchar_h.m4: Update.
2509 * gnulib/import/m4/wchar_t.m4: Update.
2510 * gnulib/import/m4/wctype_h.m4: Update.
2511 * gnulib/import/m4/wint_t.m4: Update.
2512 * gnulib/import/malloc.c: Update.
2513 * gnulib/import/malloc/scratch_buffer.h: Update.
2514 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2515 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2516 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2517 * gnulib/import/malloca.c: Update.
2518 * gnulib/import/malloca.h: Update.
2519 * gnulib/import/malloca.valgrind: Update.
2520 * gnulib/import/math.in.h: Update.
2521 * gnulib/import/mbrtowc.c: Update.
2522 * gnulib/import/mbsinit.c: Update.
2523 * gnulib/import/mbsrtowcs-impl.h: Update.
2524 * gnulib/import/mbsrtowcs-state.c: Update.
2525 * gnulib/import/mbsrtowcs.c: Update.
2526 * gnulib/import/memchr.c: Update.
2527 * gnulib/import/memmem.c: Update.
2528 * gnulib/import/mempcpy.c: Update.
2529 * gnulib/import/memrchr.c: Update.
2530 * gnulib/import/mkdir.c: Update.
2531 * gnulib/import/mkstemp.c: Update.
2532 * gnulib/import/msvc-inval.c: Update.
2533 * gnulib/import/msvc-inval.h: Update.
2534 * gnulib/import/msvc-nothrow.c: Update.
2535 * gnulib/import/msvc-nothrow.h: Update.
2536 * gnulib/import/open.c: Update.
2537 * gnulib/import/openat-die.c: Update.
2538 * gnulib/import/openat-priv.h: Update.
2539 * gnulib/import/openat-proc.c: Update.
2540 * gnulib/import/openat.c: Update.
2541 * gnulib/import/openat.h: Update.
2542 * gnulib/import/opendir.c: Update.
2543 * gnulib/import/pathmax.h: Update.
2544 * gnulib/import/pipe-safer.c: Update.
2545 * gnulib/import/rawmemchr.c: Update.
2546 * gnulib/import/readdir.c: Update.
2547 * gnulib/import/readlink.c: Update.
2548 * gnulib/import/realloc.c: Update.
2549 * gnulib/import/ref-add.sin: Update.
2550 * gnulib/import/ref-del.sin: Update.
2551 * gnulib/import/rename.c: Update.
2552 * gnulib/import/rewinddir.c: Update.
2553 * gnulib/import/rmdir.c: Update.
2554 * gnulib/import/same-inode.h: Update.
2555 * gnulib/import/save-cwd.c: Update.
2556 * gnulib/import/save-cwd.h: Update.
2557 * gnulib/import/scratch_buffer.h: Update.
2558 * gnulib/import/secure_getenv.c: Update.
2559 * gnulib/import/setenv.c: Update.
2560 * gnulib/import/signal.in.h: Update.
2561 * gnulib/import/stat-time.c: Update.
2562 * gnulib/import/stat-time.h: Update.
2563 * gnulib/import/stat-w32.c: Update.
2564 * gnulib/import/stat-w32.h: Update.
2565 * gnulib/import/stat.c: Update.
2566 * gnulib/import/stdbool.in.h: Update.
2567 * gnulib/import/stddef.in.h: Update.
2568 * gnulib/import/stdint.in.h: Update.
2569 * gnulib/import/stdio.in.h: Update.
2570 * gnulib/import/stdlib.in.h: Update.
2571 * gnulib/import/str-two-way.h: Update.
2572 * gnulib/import/strchrnul.c: Update.
2573 * gnulib/import/strdup.c: Update.
2574 * gnulib/import/streq.h: Update.
2575 * gnulib/import/strerror-override.c: Update.
2576 * gnulib/import/strerror-override.h: Update.
2577 * gnulib/import/strerror.c: Update.
2578 * gnulib/import/string.in.h: Update.
2579 * gnulib/import/stripslash.c: Update.
2580 * gnulib/import/strnlen1.c: Update.
2581 * gnulib/import/strnlen1.h: Update.
2582 * gnulib/import/strstr.c: Update.
2583 * gnulib/import/strtok_r.c: Update.
2584 * gnulib/import/sys_stat.in.h: Update.
2585 * gnulib/import/sys_time.in.h: Update.
2586 * gnulib/import/sys_types.in.h: Update.
2587 * gnulib/import/tempname.c: Update.
2588 * gnulib/import/tempname.h: Update.
2589 * gnulib/import/time.in.h: Update.
2590 * gnulib/import/unistd--.h: Update.
2591 * gnulib/import/unistd-safer.h: Update.
2592 * gnulib/import/unistd.in.h: Update.
2593 * gnulib/import/unsetenv.c: Update.
2594 * gnulib/import/verify.h: Update.
2595 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2596 * gnulib/import/wchar.in.h: Update.
2597 * gnulib/import/wctype.in.h: Update.
2598 * gnulib/import/xalloc-oversized.h: Update.
2599 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2600 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2601
2602 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
2603
2604 * record-btrace.c (get_thread_current_frame): Remove
2605 old_inferior_ptid.
2606
2607 2018-09-10 Jerome Guitton <guitton@adacore.com>
2608
2609 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2610 with check_tag to 1 if and only if the type is tagged and the
2611 component being searched cannot been found in the current
2612 view. Otherwise, always call ada_to_fixed_type with
2613 check_tag to 0.
2614
2615 2018-09-10 Xavier Roirand <roirand@adacore.com>
2616
2617 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2618 declaration.
2619 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2620 * ada-varobj.c (ada_varobj_get_number_of_children,
2621 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2622
2623 2018-09-10 Xavier Roirand <roirand@adacore.com>
2624
2625 * ada-valprint.c (ada_value_print): Use type instead of
2626 enclosing type.
2627
2628 2018-09-10 Xavier Roirand <roirand@adacore.com>
2629
2630 * ada-lang.c (ada_value_subscript): Handle case when parameter is
2631 an array of access to unconstrained array.
2632
2633 2018-09-10 Xavier Roirand <roirand@adacore.com>
2634
2635 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2636 (ada_check_typedef): Use it.
2637
2638 2018-09-10 Xavier Roirand <roirand@adacore.com>
2639
2640 * ada-varobj.c (ada_varobj_describe_struct_child)
2641 (ada_varobj_describe_child): Handle union case like struct one.
2642
2643 2018-09-10 Tom Tromey <tom@tromey.com>
2644
2645 PR python/18380:
2646 * python/python.c (_initialize_python): Make example in "python"
2647 help work in Python 3.
2648
2649 2018-09-10 Eli Zaretskii <eliz@gnu.org>
2650
2651 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2652 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
2653 $(EXEEXT) to the script, as it is not a program.
2654
2655 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
2656
2657 * python/py-prettyprint.c (pretty_print_one_value): Return
2658 gdbpy_ref<>.
2659 (print_string_repr): Adjust.
2660 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2661 * python/python-internal.h (apply_varobj_pretty_printer): Return
2662 gdbpy_ref<>.
2663 * varobj.c (varobj_value_get_print_value): Adjust.
2664
2665 2018-09-08 Tom Tromey <tom@tromey.com>
2666
2667 PR python/16047:
2668 * python/py-prettyprint.c (pretty_print_one_value): Check for
2669 to_string method.
2670
2671 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2672
2673 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2674 replace_operator_with_call.
2675
2676 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2677
2678 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2679
2680 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2681
2682 * ada-typeprint.c (print_range): Print the bounds using TYPE
2683 rather than its TYPE_TARGET_TYPE.
2684
2685 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2686
2687 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2688 call to ada_to_fixed_value_create.
2689
2690 2018-09-08 Jerome Guitton <guitton@adacore.com>
2691
2692 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2693
2694 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2695
2696 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2697 by calls to error.
2698
2699 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2700
2701 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2702 Move update of loop variable "fi".
2703
2704 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2705
2706 * ada-lang.c (value_assign_to_component): In the case of
2707 big-endian targets, extract the bits of the given VAL
2708 using an src_offset of zero if container is not a scalar.
2709
2710 2018-09-06 Simon Ser <contact@emersion.fr>
2711
2712 PR gdb/23105
2713 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2714 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2715 * fbsd-tdep.c (fbsd_make_note_desc): New.
2716 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2717 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2718 * target.h (enum target_object) Add FreeBSD-specific
2719 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2720
2721 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2722
2723 * compile/compile-c.h (generate_c_for_variable_locations):
2724 Change reference to pointer.
2725 * compile/compile-c-support.c (compile_program) <compute>:
2726 Likewise.
2727 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2728 (generate_c_for_for_one_variable): Likewise
2729 (generate_c_for_variable_locations): Likewise
2730 * compile/compile-c-types.c (compile_c_instance::convert_type):
2731 Likewise
2732 * compile/compile-cplus-symbols.c (convert_one_symbol):
2733 std::move the scope passed to enter_scope.
2734 * compile/compile-cplus-types.c
2735 (compile_cplus_instance::enter_scope): Make parameter
2736 rvalue-reference.
2737 (compile_cplus_instance::new_scope): Change reference to
2738 pointer.
2739 (compile_cplus_instance::convert_type): Likewise
2740 (compile_cplus_convert_typedef): std::move the scope passed to
2741 enter_scope.
2742 (compile_cplus_convert_struct_or_union): Likewise.
2743 (compile_cplus_convert_enum): Likewise.
2744 (compile_cplus_convert_namespace): Likewise.
2745 * compile/compile-cplus.h (compile_cplus_instance)
2746 <enter_scope>: Make parameter rvalue-reference.
2747 * compile/compile-internal.h (compile_instance)
2748 <get_cached_type>: Likewise
2749 * compile/compile-loc2c.c (push): Likewise
2750 (pushf): Likewise
2751 (unary): Likewise
2752 (binary): Likewise
2753 (print_label): Likewise
2754 (pushf_register_address): Likewise
2755 (pushf_register): Likewise
2756 (do_compile_dwarf_expr_to_c): Likewise
2757 (compile_dwarf_expr_to_c): Likewise
2758 (compile_dwarf_bounds_to_c): Likewise
2759 * compile/compile.c (compile_instance::get_cached_type):
2760 Likewise
2761 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2762 (compile_dwarf_bounds_to_c): Likewise
2763 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2764 (dwarf2_compile_property_to_c): Likewise
2765 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2766 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2767 Likewise
2768
2769 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2770
2771 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2772 * tui/tui-data.c (init_content_element): Don't initialize it.
2773
2774 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2775
2776 * tui/tui-data.h (struct tui_win_info)
2777 <detail::opaque>: Remove.
2778 * tui/tui-data.c (init_win_info): Remove assignment.
2779
2780 2018-09-05 Tom Tromey <tom@tromey.com>
2781
2782 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2783 -Wformat-nonliteral.
2784 * target-float.c (host_float_ops<T>::to_string)
2785 (host_float_ops<T>::from_string): Use
2786 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2787 * configure: Rebuild.
2788
2789 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
2790
2791 * printcmd.c (printf_c_string): Use
2792 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2793 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2794
2795 2018-09-05 Tom Tromey <tom@tromey.com>
2796
2797 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2798
2799 2018-09-05 Tom de Vries <tdevries@suse.de>
2800
2801 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2802 with resolve_abstract_p == true.
2803 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2804 defaulting to false. Propagate resolve_abstract_p to
2805 dwarf2_fetch_die_loc_sect_off.
2806 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2807 parameter, defaulting to false.
2808 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2809 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2810 parameter.
2811 * dwarf2read.h (struct die_info): Forward-declare.
2812 (die_info_ptr): New typedef.
2813 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2814
2815 2018-09-05 Joel Brobecker <brobecker@adacore.com>
2816
2817 GDB 8.2 released.
2818
2819 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
2820 Pedro Alves <palves@redhat.com>
2821
2822 * gnulib/Makefile.in (aclocal_m4_deps): Move to
2823 "aclocal-m4-deps.mk". Include file here.
2824 $(srcdir)/aclocal.m4: Add "configure.ac".
2825 * gnulib/aclocal-m4-deps.mk: New file.
2826 * gnulib/update-gnulib.sh: Automatically update
2827 "aclocal-m4-deps.mk".
2828
2829 2018-09-04 Tom Tromey <tom@tromey.com>
2830
2831 * configure: Rebuild.
2832 * configure.ac: Remove multi-ice code.
2833
2834 2018-09-04 Tom Tromey <tom@tromey.com>
2835
2836 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2837 (ada-exp.o): Update.
2838
2839 2018-09-04 Tom Tromey <tom@tromey.com>
2840
2841 * Makefile.in (printcmd.o, target-float.o): Remove.
2842 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2843
2844 2018-09-04 Tom Tromey <tom@tromey.com>
2845
2846 * gnulib/Makefile.in: Remove obsolete comment.
2847 * Makefile.in: Remove obsolete comment.
2848
2849 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
2850
2851 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2852 line with '+'.
2853
2854 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2855
2856 * riscv-tdep.c: Add 'prologue-value.h' include.
2857 (struct riscv_unwind_cache): New struct.
2858 (riscv_debug_unwinder): New global.
2859 (riscv_scan_prologue): Update arguments, capture register details
2860 from prologue scan.
2861 (riscv_skip_prologue): Reformat arguments line, move end of
2862 prologue calculation into riscv_scan_prologue.
2863 (riscv_frame_cache): Update return type, create
2864 riscv_unwind_cache, scan the prologue, and fill in remaining cache
2865 details.
2866 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2867 (riscv_frame_prev_register): Use the trad_frame within the
2868 riscv_unwind_cache.
2869 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2870 flag.
2871
2872 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2873
2874 * trad-frame.h (trad_frame_set_realreg): Declare.
2875 (trad_frame_set_addr): Declare.
2876 * trad-frame.c (trad_frame_set_realreg): Define new function.
2877 (trad_frame_set_addr): Define new function.
2878 (trad_frame_set_reg_realreg): Use new function.
2879 (trad_frame_set_reg_addr): Use new function.
2880
2881 2018-09-01 Keith Seitz <keiths@redhat.com>
2882
2883 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2884 pulongest instead of "%lld".
2885 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2886 ATTRIBUTE_UNUSED.
2887
2888 2018-08-31 Tom Tromey <tom@tromey.com>
2889
2890 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2891 variant part type.
2892
2893 2018-08-31 Pedro Alves <palves@redhat.com>
2894
2895 * gdbarch.h: Regenerate.
2896
2897 2018-08-31 Pedro Alves <palves@redhat.com>
2898
2899 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2900 * target.h (Hardware watchpoint interfaces): Describe
2901 continuable/steppable/non-steppable watchpoints.
2902 * gdbarch.h, gdbarch.c: Regenerate.
2903
2904 2018-08-31 Pedro Alves <palves@redhat.com>
2905
2906 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2907 Delete.
2908 * s390-linux-nat.c
2909 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2910 * target.h (target_ops::have_continuable_watchpoint): Delete.
2911 (target_have_continuable_watchpoint): Delete.
2912 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2913 * target-delegates.c: Regenerate.
2914
2915 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2916
2917 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2918 the files present in "gnulib/import/m4/".
2919
2920 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2921
2922 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2923 c.sw, c.swsp, and c.sdsp.
2924
2925 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2926
2927 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2928 (riscv_read_misa_reg): Don't cache value read into inferior data.
2929 (riscv_new_inferior_data): Delete.
2930 (riscv_inferior_data_cleanup): Delete.
2931 (riscv_inferior_data): Delete.
2932 (riscv_invalidate_inferior_data): Delete.
2933 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2934
2935 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2936
2937 * compile/compile-cplus-types.c
2938 (compile_cplus_instance::leave_scope): Take the address of scope
2939 object.
2940 (compile_cplus_instance::convert_qualified_base): Compare quals
2941 to 0.
2942
2943 2018-08-30 Keith Seitz <keiths@redhat.com>
2944
2945 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2946 Use "%s" and host_address_to_string instead of "%p" in printf.
2947
2948 2018-08-29 Keith Seitz <keiths@redhat.com>
2949
2950 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2951 and compile-cplus-types.c.
2952 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2953 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2954 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2955 Declare.
2956 * compile/compile-c-support.c: Include compile-cplus.h.
2957 (load_libcompile): Templatize.
2958 (get_compile_context): "New" function.
2959 (c_get_compile_context): Use get_compile_context.
2960 (cplus_get_compile_context): New function.
2961 (cplus_push_user_expression, cplus_pop_user_expression)
2962 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2963 (cplus_compute_program): Define new structs/functions.
2964 * compile/compile-cplus-symmbols.c: New file.
2965 * compile/compile-cplus-types.c: New file.
2966 * compile/compile-cplus.h: New file.
2967 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2968 Declare.
2969 * compile/compile-object-load.c (get_out_value_type): Use
2970 strncmp_iw when comparing symbol names.
2971 (compile_object_load): Add mst_bss and mst_data.
2972 * compile/compile.c (_initialize_compile): Remove
2973 -Wno-implicit-function-declaration from `compile_args'.
2974 * compile/gcc-cp-plugin.h: New file.
2975 * NEWS: Mention C++ compile support and new debug options.
2976
2977 2018-08-29 Keith Seitz <keiths@redhat.com>
2978
2979 * linespec.c (collect_info::add_symbol): Make virtual.
2980 (struct symbol_searcher_collect_info): New struct.
2981 (symbol_searcher::find_all_symbols): New method.
2982 * symtab.h (class symbol_searcher): New class.
2983
2984 2018-08-29 Keith Seitz <keiths@redhat.com>
2985
2986 * linespec.c (struct linespec) <function_symbols, label_symbols>:
2987 Change to vector of block_symbol. Update all users.
2988 (struct collect_info) <symbols>: Likewise.
2989 (collect_info::add_symbol): Take block_symbol as argument.
2990 Update all callers.
2991 (decode_compound_collector) <m_symbols>: Change type to vector
2992 of block_symbol. Update all users.
2993 (decode_compound_collector::operator ()): Change parameter type
2994 to block_symbol.
2995 (find_method, find_function_symbols, find_linespec_symbols)
2996 (find_label_symbols_in_block, find_label_symbols): Change symbol
2997 vectors to block_symbol vectors.
2998 * symtab.h (symbol_found_callback_ftype): Change parameter type to
2999 block_symbol.
3000
3001 2018-08-29 Keith Seitz <keiths@redhat.com>
3002
3003 * linespec.c (symbolp): Remove typedef and VEC definitions.
3004 (bound_minimal_symbol_d): Likewise.
3005
3006 2018-08-29 Keith Seitz <keiths@redhat.com>
3007
3008 * linespec.c (decode_compound_collector::decode_compound_collector):
3009 Remove initialization for `m_symtabs'.
3010 (decode_compound_collector::release_symbols): Change return type
3011 to std::vector. Update all callers.
3012 (class decode_compound_collector) <m_symbols>: Change type to
3013 std::vector.
3014 (lookup_prefix_sym): Change return type to std::vector. Update all
3015 callers.
3016 (compare_symbols): Remove.
3017 (std_compare_symbols): Rename to `compare_symbols'.
3018 (find_method): Change `sym_classes' parameter to std::vector.
3019 Update all callers. Use std::sort to sort sym_classes.
3020 (find_linespec_symbols): Remove cleanup.
3021
3022 2018-08-29 Keith Seitz <keiths@redhat.com>
3023
3024 * linespec.c (struct linespec) <minimal_symbols>: Change type to
3025 std::vector. Update all users.
3026 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3027 (struct collect_info) <minimal_symbols>: Likewise.
3028 (compare_msymbols): Return bool. Change parameters to const
3029 bound_minimal_symbol references.
3030 (find_method, find_function_symbols, find_linespec_symbols): Change
3031 `minsyms' parameter to std::vector. Update all callers.
3032
3033 2018-08-29 Keith Seitz <keiths@redhat.com>
3034
3035 * linespec.c (struct linespec) <label_symbols>: Change type to
3036 std::vector. Update all users.
3037 (find_label_symbols_in_block): Change `result' parameter to
3038 std::vector. Update all callers.
3039 (find_label_symbols): Return std::vector. Update all callers.
3040
3041 2018-08-29 Keith Seitz <keiths@redhat.com>
3042
3043 * linespec.c (struct linespec) <function_symbols>: Change type to
3044 std::vector. Update all users.
3045 (struct collect_info) <function_symbols>: Likewise.
3046 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3047 (std_compare_symbols): New function.
3048 (find_method, find_function_symbols, find_linespec_symbols)
3049 (find_label_symbols_in_block): Change `symbols' parameter to
3050 std::vector. Update all callers.
3051 (find_label_symbols): Likewise for `function_symbols' and
3052 `label_funcs_ret'.
3053
3054 2018-08-29 Keith Seitz <keiths@redhat.com>
3055
3056 * linespec.c (symtab_vector_up): Define.
3057 (struct linespec) <file_symtabs>: Change type to std::vector *.
3058 Update all uses.
3059 (struct collect_info) <file_symtabs>: Likewise.
3060 (collect_symtabs_from_filename): Return symtab_vector_up.
3061 Update all callers.
3062 (decode_objc): Remove cleanup.
3063 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3064 (symtab_collector::release_symtabs): Return symtab_vector_up.
3065 Update all callers.
3066 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3067 Update all users.
3068 (collect_symtabs_from_filename, symtabs_from_filename): Return
3069 symtab_vector_up. Update all callers.
3070
3071 2018-08-29 Tom Tromey <tom@tromey.com>
3072
3073 * csky-tdep.c (csky_analyze_prologue): Use
3074 core_addr_to_string_nz.
3075
3076 2018-08-29 Tom Tromey <tom@tromey.com>
3077
3078 * windows-nat.c (struct xlate_exception) <them>: Change type to
3079 DWORD.
3080 (xlate): Fix formatting. Remove last entry.
3081 (struct xlate_exception, xlate): Comment out.
3082 (windows_nat_target::resume): Use ranged for.
3083
3084 2018-08-29 Jim Wilson <jimw@sifive.com>
3085
3086 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3087 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3088 of NT_PRFPREG.
3089 (riscv_linux_nat_target::store_registers): Likewise.
3090
3091 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3092
3093 PR gdb/23555
3094 PR gdb/23558
3095 * gnulib/aclocal.m4: Regenerate.
3096 * gnulib/config.in: Regenerate.
3097 * gnulib/configure: Regenerate.
3098 * gnulib/import/Makefile.am: Update.
3099 * gnulib/import/Makefile.in: Update.
3100 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3101 * gnulib/import/_Noreturn.h: ... this.
3102 * gnulib/import/alloca.in.h: Update.
3103 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3104 * gnulib/import/arg-nonnull.h: ... this.
3105 * gnulib/import/assure.h: Update.
3106 * gnulib/import/at-func.c: Update.
3107 * gnulib/import/basename-lgpl.c: Update.
3108 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3109 * gnulib/import/c++defs.h: ... this.
3110 * gnulib/import/canonicalize-lgpl.c: Update.
3111 * gnulib/import/cdefs.h: Update.
3112 * gnulib/import/chdir-long.c: Update.
3113 * gnulib/import/chdir-long.h: Update.
3114 * gnulib/import/cloexec.c: Update.
3115 * gnulib/import/cloexec.h: Update.
3116 * gnulib/import/close.c: Update.
3117 * gnulib/import/closedir.c: Update.
3118 * gnulib/import/config.charset: Update.
3119 * gnulib/import/dirent-private.h: Update.
3120 * gnulib/import/dirent.in.h: Update.
3121 * gnulib/import/dirfd.c: Update.
3122 * gnulib/import/dirname-lgpl.c: Update.
3123 * gnulib/import/dirname.h: Update.
3124 * gnulib/import/dosname.h: Update.
3125 * gnulib/import/dup-safer-flag.c: Update.
3126 * gnulib/import/dup-safer.c: Update.
3127 * gnulib/import/dup.c: Update.
3128 * gnulib/import/dup2.c: Update.
3129 * gnulib/import/errno.in.h: Update.
3130 * gnulib/import/error.c: Update.
3131 * gnulib/import/error.h: Update.
3132 * gnulib/import/exitfail.c: Update.
3133 * gnulib/import/exitfail.h: Update.
3134 * gnulib/import/extra/update-copyright: Update.
3135 * gnulib/import/fchdir.c: Update.
3136 * gnulib/import/fcntl.c: Update.
3137 * gnulib/import/fcntl.in.h: Update.
3138 * gnulib/import/fd-hook.c: Update.
3139 * gnulib/import/fd-hook.h: Update.
3140 * gnulib/import/fd-safer-flag.c: Update.
3141 * gnulib/import/fd-safer.c: Update.
3142 * gnulib/import/fdopendir.c: Update.
3143 * gnulib/import/filename.h: Update.
3144 * gnulib/import/filenamecat-lgpl.c: Update.
3145 * gnulib/import/filenamecat.h: Update.
3146 * gnulib/import/flexmember.h: Update.
3147 * gnulib/import/float+.h: Update.
3148 * gnulib/import/float.c: Update.
3149 * gnulib/import/float.in.h: Update.
3150 * gnulib/import/fnmatch.c: Update.
3151 * gnulib/import/fnmatch.in.h: Update.
3152 * gnulib/import/fnmatch_loop.c: Update.
3153 * gnulib/import/fpucw.h: Update.
3154 * gnulib/import/frexp.c: Update.
3155 * gnulib/import/frexpl.c: Update.
3156 * gnulib/import/fstat.c: Update.
3157 * gnulib/import/fstatat.c: Update.
3158 * gnulib/import/getcwd-lgpl.c: Update.
3159 * gnulib/import/getcwd.c: Update.
3160 * gnulib/import/getdtablesize.c: Update.
3161 * gnulib/import/getlogin_r.c: Update.
3162 * gnulib/import/getprogname.c: Update.
3163 * gnulib/import/getprogname.h: Update.
3164 * gnulib/import/gettext.h: Update.
3165 * gnulib/import/gettimeofday.c: Update.
3166 * gnulib/import/glob-libc.h: Update.
3167 * gnulib/import/glob.c: Update.
3168 * gnulib/import/glob.in.h: Update.
3169 * gnulib/import/glob_internal.h: Update.
3170 * gnulib/import/glob_pattern_p.c: Update.
3171 * gnulib/import/globfree.c: Update.
3172 * gnulib/import/hard-locale.c: Update.
3173 * gnulib/import/hard-locale.h: Update.
3174 * gnulib/import/intprops.h: Update.
3175 * gnulib/import/inttypes.in.h: Update.
3176 * gnulib/import/isnan.c: Update.
3177 * gnulib/import/isnand-nolibm.h: Update.
3178 * gnulib/import/isnand.c: Update.
3179 * gnulib/import/isnanl-nolibm.h: Update.
3180 * gnulib/import/isnanl.c: Update.
3181 * gnulib/import/itold.c: Update.
3182 * gnulib/import/libc-config.h: Update.
3183 * gnulib/import/limits.in.h: Update.
3184 * gnulib/import/localcharset.c: Update.
3185 * gnulib/import/localcharset.h: Update.
3186 * gnulib/import/localtime-buffer.c: Update.
3187 * gnulib/import/localtime-buffer.h: Update.
3188 * gnulib/import/lstat.c: Update.
3189 * gnulib/import/m4/00gnulib.m4: Update.
3190 * gnulib/import/m4/__inline.m4: Update.
3191 * gnulib/import/m4/absolute-header.m4: Update.
3192 * gnulib/import/m4/alloca.m4: Update.
3193 * gnulib/import/m4/builtin-expect.m4: Update.
3194 * gnulib/import/m4/canonicalize.m4: Update.
3195 * gnulib/import/m4/chdir-long.m4: Update.
3196 * gnulib/import/m4/close.m4: Update.
3197 * gnulib/import/m4/closedir.m4: Update.
3198 * gnulib/import/m4/configmake.m4: Update.
3199 * gnulib/import/m4/d-ino.m4: Update.
3200 * gnulib/import/m4/d-type.m4: Update.
3201 * gnulib/import/m4/dirent_h.m4: Update.
3202 * gnulib/import/m4/dirfd.m4: Update.
3203 * gnulib/import/m4/dirname.m4: Update.
3204 * gnulib/import/m4/double-slash-root.m4: Update.
3205 * gnulib/import/m4/dup.m4: Update.
3206 * gnulib/import/m4/dup2.m4: Update.
3207 * gnulib/import/m4/eealloc.m4: Update.
3208 * gnulib/import/m4/environ.m4: Update.
3209 * gnulib/import/m4/errno_h.m4: Update.
3210 * gnulib/import/m4/error.m4: Update.
3211 * gnulib/import/m4/exponentd.m4: Update.
3212 * gnulib/import/m4/exponentl.m4: Update.
3213 * gnulib/import/m4/extensions.m4: Update.
3214 * gnulib/import/m4/extern-inline.m4: Update.
3215 * gnulib/import/m4/fchdir.m4: Update.
3216 * gnulib/import/m4/fcntl-o.m4: Update.
3217 * gnulib/import/m4/fcntl.m4: Update.
3218 * gnulib/import/m4/fcntl_h.m4: Update.
3219 * gnulib/import/m4/fdopendir.m4: Update.
3220 * gnulib/import/m4/filenamecat.m4: Update.
3221 * gnulib/import/m4/flexmember.m4: Update.
3222 * gnulib/import/m4/float_h.m4: Update.
3223 * gnulib/import/m4/fnmatch.m4: Update.
3224 * gnulib/import/m4/fnmatch_h.m4: Update.
3225 * gnulib/import/m4/fpieee.m4: Update.
3226 * gnulib/import/m4/frexp.m4: Update.
3227 * gnulib/import/m4/frexpl.m4: Update.
3228 * gnulib/import/m4/fstat.m4: Update.
3229 * gnulib/import/m4/fstatat.m4: Update.
3230 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3231 * gnulib/import/m4/getcwd-path-max.m4: Update.
3232 * gnulib/import/m4/getcwd.m4: Update.
3233 * gnulib/import/m4/getdtablesize.m4: Update.
3234 * gnulib/import/m4/getlogin.m4: Update.
3235 * gnulib/import/m4/getlogin_r.m4: Update.
3236 * gnulib/import/m4/getpagesize.m4: Update.
3237 * gnulib/import/m4/getprogname.m4: Update.
3238 * gnulib/import/m4/gettimeofday.m4: Update.
3239 * gnulib/import/m4/glibc21.m4: Update.
3240 * gnulib/import/m4/glob.m4: Update.
3241 * gnulib/import/m4/glob_h.m4: Update.
3242 * gnulib/import/m4/gnulib-cache.m4: Update.
3243 * gnulib/import/m4/gnulib-common.m4: Update.
3244 * gnulib/import/m4/gnulib-comp.m4: Update.
3245 * gnulib/import/m4/gnulib-tool.m4: Update.
3246 * gnulib/import/m4/hard-locale.m4: Update.
3247 * gnulib/import/m4/include_next.m4: Update.
3248 * gnulib/import/m4/inttypes-pri.m4: Update.
3249 * gnulib/import/m4/inttypes.m4: Update.
3250 * gnulib/import/m4/isnand.m4: Update.
3251 * gnulib/import/m4/isnanl.m4: Update.
3252 * gnulib/import/m4/largefile.m4: Update.
3253 * gnulib/import/m4/limits-h.m4: Update.
3254 * gnulib/import/m4/localcharset.m4: Update.
3255 * gnulib/import/m4/locale-fr.m4: Update.
3256 * gnulib/import/m4/locale-ja.m4: Update.
3257 * gnulib/import/m4/locale-zh.m4: Update.
3258 * gnulib/import/m4/localtime-buffer.m4: Update.
3259 * gnulib/import/m4/longlong.m4: Update.
3260 * gnulib/import/m4/lstat.m4: Update.
3261 * gnulib/import/m4/malloc.m4: Update.
3262 * gnulib/import/m4/malloca.m4: Update.
3263 * gnulib/import/m4/math_h.m4: Update.
3264 * gnulib/import/m4/mbrtowc.m4: Update.
3265 * gnulib/import/m4/mbsinit.m4: Update.
3266 * gnulib/import/m4/mbsrtowcs.m4: Update.
3267 * gnulib/import/m4/mbstate_t.m4: Update.
3268 * gnulib/import/m4/memchr.m4: Update.
3269 * gnulib/import/m4/memmem.m4: Update.
3270 * gnulib/import/m4/mempcpy.m4: Update.
3271 * gnulib/import/m4/memrchr.m4: Update.
3272 * gnulib/import/m4/mkdir.m4: Update.
3273 * gnulib/import/m4/mkstemp.m4: Update.
3274 * gnulib/import/m4/mmap-anon.m4: Update.
3275 * gnulib/import/m4/mode_t.m4: Update.
3276 * gnulib/import/m4/msvc-inval.m4: Update.
3277 * gnulib/import/m4/msvc-nothrow.m4: Update.
3278 * gnulib/import/m4/multiarch.m4: Update.
3279 * gnulib/import/m4/nocrash.m4: Update.
3280 * gnulib/import/m4/off_t.m4: Update.
3281 * gnulib/import/m4/onceonly.m4: Update.
3282 * gnulib/import/m4/open-cloexec.m4: Update.
3283 * gnulib/import/m4/open.m4: Update.
3284 * gnulib/import/m4/openat.m4: Update.
3285 * gnulib/import/m4/opendir.m4: Update.
3286 * gnulib/import/m4/pathmax.m4: Update.
3287 * gnulib/import/m4/rawmemchr.m4: Update.
3288 * gnulib/import/m4/readdir.m4: Update.
3289 * gnulib/import/m4/readlink.m4: Update.
3290 * gnulib/import/m4/realloc.m4: Update.
3291 * gnulib/import/m4/rename.m4: Update.
3292 * gnulib/import/m4/rewinddir.m4: Update.
3293 * gnulib/import/m4/rmdir.m4: Update.
3294 * gnulib/import/m4/save-cwd.m4: Update.
3295 * gnulib/import/m4/secure_getenv.m4: Update.
3296 * gnulib/import/m4/setenv.m4: Update.
3297 * gnulib/import/m4/signal_h.m4: Update.
3298 * gnulib/import/m4/ssize_t.m4: Update.
3299 * gnulib/import/m4/stat-time.m4: Update.
3300 * gnulib/import/m4/stat.m4: Update.
3301 * gnulib/import/m4/std-gnu11.m4: Update.
3302 * gnulib/import/m4/stdbool.m4: Update.
3303 * gnulib/import/m4/stddef_h.m4: Update.
3304 * gnulib/import/m4/stdint.m4: Update.
3305 * gnulib/import/m4/stdio_h.m4: Update.
3306 * gnulib/import/m4/stdlib_h.m4: Update.
3307 * gnulib/import/m4/strchrnul.m4: Update.
3308 * gnulib/import/m4/strdup.m4: Update.
3309 * gnulib/import/m4/strerror.m4: Update.
3310 * gnulib/import/m4/string_h.m4: Update.
3311 * gnulib/import/m4/strstr.m4: Update.
3312 * gnulib/import/m4/strtok_r.m4: Update.
3313 * gnulib/import/m4/sys_socket_h.m4: Update.
3314 * gnulib/import/m4/sys_stat_h.m4: Update.
3315 * gnulib/import/m4/sys_time_h.m4: Update.
3316 * gnulib/import/m4/sys_types_h.m4: Update.
3317 * gnulib/import/m4/tempname.m4: Update.
3318 * gnulib/import/m4/time_h.m4: Update.
3319 * gnulib/import/m4/unistd-safer.m4: Update.
3320 * gnulib/import/m4/unistd_h.m4: Update.
3321 * gnulib/import/m4/warn-on-use.m4: Update.
3322 * gnulib/import/m4/wchar_h.m4: Update.
3323 * gnulib/import/m4/wchar_t.m4: Update.
3324 * gnulib/import/m4/wctype_h.m4: Update.
3325 * gnulib/import/m4/wint_t.m4: Update.
3326 * gnulib/import/malloc.c: Update.
3327 * gnulib/import/malloc/scratch_buffer.h: Update.
3328 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3329 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3330 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3331 * gnulib/import/malloca.c: Update.
3332 * gnulib/import/malloca.h: Update.
3333 * gnulib/import/malloca.valgrind: Update.
3334 * gnulib/import/math.in.h: Update.
3335 * gnulib/import/mbrtowc.c: Update.
3336 * gnulib/import/mbsinit.c: Update.
3337 * gnulib/import/mbsrtowcs-impl.h: Update.
3338 * gnulib/import/mbsrtowcs-state.c: Update.
3339 * gnulib/import/mbsrtowcs.c: Update.
3340 * gnulib/import/memchr.c: Update.
3341 * gnulib/import/memmem.c: Update.
3342 * gnulib/import/mempcpy.c: Update.
3343 * gnulib/import/memrchr.c: Update.
3344 * gnulib/import/mkdir.c: Update.
3345 * gnulib/import/mkstemp.c: Update.
3346 * gnulib/import/msvc-inval.c: Update.
3347 * gnulib/import/msvc-inval.h: Update.
3348 * gnulib/import/msvc-nothrow.c: Update.
3349 * gnulib/import/msvc-nothrow.h: Update.
3350 * gnulib/import/open.c: Update.
3351 * gnulib/import/openat-die.c: Update.
3352 * gnulib/import/openat-priv.h: Update.
3353 * gnulib/import/openat-proc.c: Update.
3354 * gnulib/import/openat.c: Update.
3355 * gnulib/import/openat.h: Update.
3356 * gnulib/import/opendir.c: Update.
3357 * gnulib/import/pathmax.h: Update.
3358 * gnulib/import/pipe-safer.c: Update.
3359 * gnulib/import/rawmemchr.c: Update.
3360 * gnulib/import/readdir.c: Update.
3361 * gnulib/import/readlink.c: Update.
3362 * gnulib/import/realloc.c: Update.
3363 * gnulib/import/ref-add.sin: Update.
3364 * gnulib/import/ref-del.sin: Update.
3365 * gnulib/import/rename.c: Update.
3366 * gnulib/import/rewinddir.c: Update.
3367 * gnulib/import/rmdir.c: Update.
3368 * gnulib/import/same-inode.h: Update.
3369 * gnulib/import/save-cwd.c: Update.
3370 * gnulib/import/save-cwd.h: Update.
3371 * gnulib/import/scratch_buffer.h: Update.
3372 * gnulib/import/secure_getenv.c: Update.
3373 * gnulib/import/setenv.c: Update.
3374 * gnulib/import/signal.in.h: Update.
3375 * gnulib/import/stat-time.c: Update.
3376 * gnulib/import/stat-time.h: Update.
3377 * gnulib/import/stat-w32.c: Update.
3378 * gnulib/import/stat-w32.h: Update.
3379 * gnulib/import/stat.c: Update.
3380 * gnulib/import/stdbool.in.h: Update.
3381 * gnulib/import/stddef.in.h: Update.
3382 * gnulib/import/stdint.in.h: Update.
3383 * gnulib/import/stdio.in.h: Update.
3384 * gnulib/import/stdlib.in.h: Update.
3385 * gnulib/import/str-two-way.h: Update.
3386 * gnulib/import/strchrnul.c: Update.
3387 * gnulib/import/strdup.c: Update.
3388 * gnulib/import/streq.h: Update.
3389 * gnulib/import/strerror-override.c: Update.
3390 * gnulib/import/strerror-override.h: Update.
3391 * gnulib/import/strerror.c: Update.
3392 * gnulib/import/string.in.h: Update.
3393 * gnulib/import/stripslash.c: Update.
3394 * gnulib/import/strnlen1.c: Update.
3395 * gnulib/import/strnlen1.h: Update.
3396 * gnulib/import/strstr.c: Update.
3397 * gnulib/import/strtok_r.c: Update.
3398 * gnulib/import/sys_stat.in.h: Update.
3399 * gnulib/import/sys_time.in.h: Update.
3400 * gnulib/import/sys_types.in.h: Update.
3401 * gnulib/import/tempname.c: Update.
3402 * gnulib/import/tempname.h: Update.
3403 * gnulib/import/time.in.h: Update.
3404 * gnulib/import/unistd--.h: Update.
3405 * gnulib/import/unistd-safer.h: Update.
3406 * gnulib/import/unistd.in.h: Update.
3407 * gnulib/import/unsetenv.c: Update.
3408 * gnulib/import/verify.h: Update.
3409 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3410 * gnulib/import/wchar.in.h: Update.
3411 * gnulib/import/wctype.in.h: Update.
3412 * gnulib/import/xalloc-oversized.h: Update.
3413 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3414 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3415
3416 2018-08-16 Gary Benson <gbenson@redhat.com>
3417
3418 PR gdb/13000:
3419 * gdb/main.c (captured_main_1): Exit with nonzero status
3420 in batch mode if the last command to be executed failed.
3421 * NEWS: Mention the above.
3422
3423 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
3424
3425 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3426 end of warning message.
3427
3428 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3429
3430 PR gdb/22943:
3431 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3432 (aarch64_extract_return_value): Use
3433 aapcs_is_vfp_call_or_return_candidate.
3434 (aarch64_return_in_memory): Likewise.
3435 (aarch64_store_return_value): Likewise.
3436
3437 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3438
3439 * aarch64-tdep.c
3440 (aapcs_is_vfp_call_or_return_candidate): Make static
3441 (pass_in_v_or_stack): Remove function.
3442 (pass_in_v_vfp_candidate): New function.
3443 (aarch64_push_dummy_call): Check for float register candidates.
3444
3445 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3446
3447 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3448 (aapcs_is_vfp_call_or_return_candidate_1): New function.
3449 (aapcs_is_vfp_call_or_return_candidate): Likewise.
3450
3451 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
3452
3453 PR build/23399
3454 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3455 (struct ipa_sym_addresses): Rename to...
3456 (struct ipa_sym_addresses_common): ... this.
3457 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3458
3459 2018-08-28 Tom Tromey <tom@tromey.com>
3460
3461 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3462 (token_fifo): Now a std::vector.
3463 (yylex, c_parse): Update.
3464 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3465 (token_fifo): Now a std::vector.
3466 (yylex, d_parse): Update.
3467 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3468 (token_fifo): Now a std::vector.
3469 (yylex, go_parse): Update.
3470
3471 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
3472
3473 * parser-defs.h (struct type_stack) <elements>: Change type to
3474 std::vector<union type_stack_elt>.
3475 <depth, size>: Remove.
3476 * parse.c (parse_exp_in_context_1): Adjust.
3477 (type_stack_reserve): Remove.
3478 (check_type_stack_depth): Remove.
3479 (insert_into_type_stack): Adjust to std::vector.
3480 (insert_type): Likewise.
3481 (push_type): Likewise.
3482 (push_type_int): Likewise.
3483 (insert_type_address_space): Likewise.
3484 (pop_type): Likewise.
3485 (pop_type_int): Likewise.
3486 (pop_typelist): Likewise.
3487 (pop_type_stack): Likewise.
3488 (append_type_stack): Likewise.
3489 (push_type_stack): Likewise.
3490 (get_type_stack): Likewise.
3491 (type_stack_cleanup): Likewise.
3492 (push_typelist): Likewise.
3493 (follow_types): Likewise.
3494 (_initialize_parse): Likewise.
3495
3496 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
3497
3498 * NEWS: Mention csky target.
3499
3500 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
3501 Hafiz Abid Qadeer <abidh@codesourcery.com>
3502 Don Breazeal <donb@codesourcery.com>
3503
3504 * csky-linux-tdep.c: New file.
3505 * csky-tdep.c: Likewise.
3506 * csky-tdep.h: Likewise.
3507 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3508 csky-tdep.o.
3509 (HFILES_NO_SRCDIR): Add csky-tdep.h.
3510 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3511 * configure.tgt: Add csky support.
3512
3513 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
3514
3515 * python/py-framefilter.c (py_print_frame): Print frame architecture
3516 when printing on an MI output.
3517
3518 2018-08-27 Tom Tromey <tom@tromey.com>
3519
3520 PR build/23087:
3521 * configure: Rebuild.
3522 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3523
3524 2018-08-27 Tom Tromey <tom@tromey.com>
3525
3526 * aarch64-linux-tdep.c
3527 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3528 casts to int.
3529
3530 2018-08-27 Tom Tromey <tom@tromey.com>
3531
3532 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3533 unsigned.
3534 (ppc64_standard_linkage1, ppc64_standard_linkage2)
3535 (ppc64_standard_linkage3, ppc64_standard_linkage4)
3536 (ppc64_standard_linkage5, ppc64_standard_linkage6)
3537 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3538 unsigned.
3539
3540 2018-08-27 Tom Tromey <tom@tromey.com>
3541
3542 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3543 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3544
3545 2018-08-27 Tom Tromey <tom@tromey.com>
3546
3547 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3548 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3549 ULONGEST_MAX.
3550 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3551 ULONGEST_MAX.
3552 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3553 ULONGEST_MAX.
3554 * sparc-linux-tdep.c (sparc32_linux_sigframe)
3555 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3556 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3557 ULONGEST_MAX.
3558 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3559 (ppc64_linux_sigaction_tramp_frame)
3560 (ppc32_linux_sighandler_tramp_frame)
3561 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3562 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3563 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3564 * mn10300-linux-tdep.c (am33_linux_sigframe)
3565 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3566 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3567 * mips-linux-tdep.c (mips_linux_o32_sigframe)
3568 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3569 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3570 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3571 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3572 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3573 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3574 * microblaze-linux-tdep.c
3575 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3576 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3577 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3578 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3579 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3580 * common/common-types.h (ULONGEST_MAX): New define.
3581 (CORE_ADDR_MAX): Fix formatting.
3582 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3583 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3584 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3585 (arm_linux_rt_sigreturn_tramp_frame)
3586 (arm_eabi_linux_sigreturn_tramp_frame)
3587 (arm_eabi_linux_rt_sigreturn_tramp_frame)
3588 (thumb2_eabi_linux_sigreturn_tramp_frame)
3589 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3590 (arm_linux_restart_syscall_tramp_frame)
3591 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3592 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3593 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3594 ULONGEST_MAX.
3595 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3596
3597 2018-08-27 Tom Tromey <tom@tromey.com>
3598
3599 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3600 CORE_ADDR_MAX.
3601 * mips-tdep.c (mips_deal_with_atomic_sequence)
3602 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3603 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3604 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3605 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3606 CORE_ADDR_MAX.
3607 * aarch64-tdep.c (aarch64_software_single_step): Use
3608 CORE_ADDR_MAX.
3609
3610 2018-08-27 Tom Tromey <tom@tromey.com>
3611
3612 * linespec.c (complete_linespec_component): Add cast to "char".
3613 * completer.c (completion_tracker::build_completion_result): Add
3614 cast to "char".
3615
3616 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3617
3618 * solist.h (struct solist, struct target_so_ops): Fix
3619 indentation.
3620
3621 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3622
3623 * ada-tasks.c (ada_task_info_s): Remove typedef.
3624 (DEF_VEC_O(ada_task_info_s)): Remove.
3625 (struct ada_tasks_inferior_data): Initialize fields.
3626 <task_list>: Make an std::vector.
3627 (get_ada_tasks_inferior_data): Allocate with new.
3628 (ada_get_task_number): Adjust.
3629 (get_task_number_from_id): Likewise.
3630 (valid_task_id): Likewise.
3631 (ada_get_task_info_from_ptid): Likewise.
3632 (iterate_over_live_ada_tasks): Likewise.
3633 (add_ada_task): Likewise.
3634 (read_known_tasks): Likewise.
3635 (ada_build_task_list): Likewise.
3636 (print_ada_task_info): Likewise.
3637 (info_task): Likewise.
3638 (task_command_1): Likewise.
3639
3640 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3641
3642 * ada-lang.c (add_angle_brackets): Return std::string.
3643
3644 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
3645
3646 * python/py-threadevent.c (py_get_event_thread): Initialize
3647 pythread.
3648
3649 2018-08-24 Pedro Alves <palves@redhat.com>
3650
3651 * python/py-bpevent.c (create_breakpoint_event_object): Use
3652 copy-initialization.
3653 * python/py-continueevent.c (emit_continue_event): Use
3654 copy-initialization.
3655 * python/py-exitedevent.c (create_exited_event_object): Return a
3656 gdbpy_ref<>.
3657 (emit_exited_event): Use copy-initialization.
3658 * python/py-inferior.c (python_new_inferior)
3659 (python_inferior_deleted, add_thread_object): Use
3660 copy-initialization.
3661 * python/py-infevents.c (create_inferior_call_event_object)
3662 (create_register_changed_event_object)
3663 (create_memory_changed_event_object): Return a gdbpy_ref<>.
3664 (emit_inferior_call_event, emit_memory_changed_event)
3665 (emit_register_changed_event): Use copy-initialization.
3666 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3667 Return a gdbpy_ref<>.
3668 (emit_new_objfile_event): Use copy-initialization.
3669 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3670 (emit_clear_objfiles_event): Use copy-initialization.
3671 * python/py-signalevent.c (create_signal_event_object): Use
3672 copy-initialization.
3673 * python/py-threadevent.c (create_thread_event_object): Use
3674 copy-initialization.
3675
3676 2018-08-24 Pedro Alves <palves@redhat.com>
3677 Simon Marchi <simon.marchi@ericsson.com>
3678
3679 PR gdb/23379
3680 * python/py-continueevent.c: Include "gdbthread.h".
3681 (create_continue_event_object): Add intro comment. Add 'ptid'
3682 parameter. Use it to find thread to pass to
3683 create_thread_event_object.
3684 (emit_continue_event): Pass PTID down to
3685 create_continue_event_object.
3686 * python/py-event.h (py_get_event_thread): Declare.
3687 (create_thread_event_object): Remove default from 'thread'
3688 parameter.
3689 * python/py-stopevent.c (create_stop_event_object): Use
3690 py_get_event_thread.
3691 * python/py-threadevent.c (get_event_thread): Rename to ...
3692 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3693 and use it to find the thread.
3694 (create_thread_event_object): Assert that THREAD isn't null.
3695 Don't find the event thread here.
3696
3697 2018-08-23 Kevin Buettner <kevinb@redhat.com>
3698
3699 * block.h (blockrange, blockranges): New struct declarations.
3700 (struct block): Add new field named `ranges'.
3701 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3702 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3703 macros for accessing ranges in struct block.
3704 (make_blockranges): New declaration.
3705 block.c (make_blockranges): New function.
3706 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3707 for block.
3708 * symtab.h (find_pc_partial_function): Add new parameter `block'.
3709 * blockframe.c (cache_pc_function_block): New static global.
3710 (clear_pc_function_cache): Clear cache_pc_function_block.
3711 (find_pc_partial_function): Move comment to symtab.h. Add
3712 support for non-contiguous blocks.
3713 * cli/cli-cmds.c (block.h): Include.
3714 (print_disassembly): Handle printing of non-contiguous blocks.
3715 (disassemble_current_function): Likewise.
3716 (disassemble_command): Likewise.
3717
3718 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3719 BLOCK_START.
3720 * blockframe.c (get_pc_function_start): Likewise.
3721 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3722 (gcc_symbol_address): Likewise.
3723 * compile/compile-object-run.c (compile_object_run): Likewise.
3724 * compile/compile.c (get_expr_block_and_pc): Likewise.
3725 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3726 (func_addr_to_tail_call_list): Likewise.
3727 * findvar.c (default_read_var_value): Likewise.
3728 * inline-frame.c (inline_frame_this_id): Likewise.
3729 (skip-inline_frames): Likewise.
3730 * infcmd.c (until_next_command): Likewise.
3731 * linespec.c (convert_linespec_to_sals): Likewise.
3732 * parse.c (parse_exp_in_context_1): Likewise.
3733 * printcmd.c (build_address_symbolic): likewise.
3734 (info_address_command): Likewise.
3735 symtab.c (find_function_start_sal): Likewise.
3736 (skip_prologue_sal): Likewise.
3737 (find_function_alias_target): Likewise.
3738 (find_gnu_ifunc): Likewise.
3739 * stack.c (find_frame_funname): Likewise.
3740 * symtab.c (fixup_symbol_section): Likewise.
3741 (find_function_start_sal): Likewise.
3742 (skip_prologue_sal): Likewsie.
3743 (find_function_alias_target): Likewise.
3744 (find_gnu_ifunc): Likewise.
3745 * tracepoint.c (info_scope_command): Likewise.
3746 * value.c (value_fn_field): Likewise.
3747
3748 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3749 in place of find_pc_partial_function.
3750 * blockframe.c (find_function_entry_range_from_pc): New function.
3751 * symtab.h (find_function_entry_range_from_pc): Declare and document.
3752 * objfiles.c (objfile_relocate1): Relocate start and end addresses
3753 for each range in a block.
3754
3755
3756 2018-08-23 Xavier Roirand <roirand@adacore.com>
3757
3758 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3759 incrementation.
3760
3761 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3762
3763 * solib-svr4.c (read_program_headers_from_bfd): Return
3764 gdb::optional<gdb::byte_vector>.
3765 (svr4_exec_displacement): Adjust.
3766
3767 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3768
3769 * solib-svr4.c (read_program_header): Return
3770 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3771 (find_program_interpreter): Return
3772 gdb::optional<gdb::byte_vector>.
3773 (scan_dyntag_auxv): Adjust.
3774 (enable_break): Adjust.
3775 (svr4_exec_displacement): Adjust.
3776
3777 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3778
3779 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3780 * inf-child.c (inf_child_target::terminal_save_inferior): New.
3781
3782 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3783
3784 * guile/scm-string.c (gdbscm_scm_from_printf): Use
3785 string_vprintf.
3786 * guile/scm-utils.c (gdbscm_printf): Likewise.
3787 * serial.c (serial_printf): Likewise.
3788 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3789
3790 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
3791
3792 * stack.c (print_frame): Print frame architecture when printing on
3793 an MI output.
3794 * NEWS: Mention new "arch" attribute in frame output.
3795
3796 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3797
3798 * arch/aarch64.h (aarch64_regnum): Update comment.
3799
3800 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3801
3802 * NEWS: Add SVE to 8.2 section.
3803
3804 2018-08-21 Pedro Alves <palves@redhat.com>
3805
3806 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3807 out from gdbscm_parse_function_args.
3808 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3809 gdbscm_parse_function_args_1.
3810
3811 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
3812
3813 PR gdb/17816
3814 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3815 operator.
3816
3817 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
3818
3819 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3820
3821 2018-08-19 Michael Spang <spang@google.com>
3822
3823 PR gdb/11786
3824 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3825 for PT_TLS segments.
3826
3827 2018-08-18 Kevin Buettner <kevinb@redhat.com>
3828
3829 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3830 dwarf_variable_value.
3831 * dwarf2-frame.c (class dwarf_expr_executor):
3832 Add override for dwarf_variable_value.
3833 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3834 (class symbol_needs_eval_context): Likewise.
3835 (indirect_synthetic_pointer): Add forward declaration.
3836 (sect_variable_value): New function.
3837 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3838 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3839 for DW_OP_GNU_variable_value.
3840
3841 2018-08-16 Tom Tromey <tom@tromey.com>
3842
3843 * top.c (read_command_file): Update.
3844 (command_line_input): Remove "repeat" argument.
3845 * ada-lang.c (get_selections): Update.
3846 * linespec.c (decode_line_2): Update.
3847 * defs.h (command_line_input): Remove argument.
3848 * cli/cli-script.c (read_next_line): Update.
3849 * python/py-gdb-readline.c: Update.
3850
3851 2018-08-17 Tom Tromey <tom@tromey.com>
3852
3853 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3854 command_line_input.
3855
3856 2018-08-15 Tom Tromey <tom@tromey.com>
3857
3858 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3859
3860 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
3861
3862 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3863 If used, use find_pc_partial_function to find address range
3864 to disassemble.
3865 * mi/mi-main.c (mi_cmd_list_features): Report
3866 "data-disassemble-a-option" feature.
3867 * NEWS: Mention new -data-disassemble option -a.
3868
3869 2018-08-13 Tom Tromey <tom@tromey.com>
3870
3871 * common/common-defs.h (_FORTIFY_SOURCE): Define.
3872
3873 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3874
3875 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3876 (aarch64_linux_collect_sve_regset): Likewise.
3877 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3878 * regcache.h (regcache_map_entry_size): New function.
3879
3880 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3881
3882 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3883 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3884 (SVE_HEADER_VL_LENGTH): Likewise.
3885 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3886 (SVE_HEADER_FLAGS_LENGTH): Likewise.
3887 (SVE_HEADER_RESERVED_LENGTH): Likewise.
3888 (SVE_HEADER_SIZE_OFFSET): Likewise.
3889 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3890 (SVE_HEADER_VL_OFFSET): Likewise.
3891 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3892 (SVE_HEADER_FLAGS_OFFSET): Likewise.
3893 (SVE_HEADER_RESERVED_OFFSET): Likewise.
3894 (SVE_HEADER_SIZE): Likewise.
3895 (aarch64_linux_core_read_vq): Add function.
3896 (aarch64_linux_core_read_description): Check for SVE section.
3897
3898 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3899
3900 * aarch64-fbsd-tdep.c
3901 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3902 collect_size.
3903 * aarch64-linux-tdep.c
3904 (aarch64_linux_iterate_over_regset_sections): Likewise.
3905 * alpha-linux-tdep.c
3906 (alpha_linux_iterate_over_regset_sections):
3907 * alpha-nbsd-tdep.c
3908 (alphanbsd_iterate_over_regset_sections): Likewise.
3909 * amd64-fbsd-tdep.c
3910 (amd64fbsd_iterate_over_regset_sections): Likewise.
3911 * amd64-linux-tdep.c
3912 (amd64_linux_iterate_over_regset_sections): Likewise.
3913 * arm-bsd-tdep.c
3914 (armbsd_iterate_over_regset_sections): Likewise.
3915 * arm-fbsd-tdep.c
3916 (arm_fbsd_iterate_over_regset_sections): Likewise.
3917 * arm-linux-tdep.c
3918 (arm_linux_iterate_over_regset_sections): Likewise.
3919 * corelow.c (get_core_registers_cb): Likewise.
3920 (core_target::fetch_registers): Likewise.
3921 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3922 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3923 * gdbarch.h (void): Regenerate.
3924 * gdbarch.sh: Add supply_size and collect_size.
3925 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3926 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3927 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3928 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3929 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3930 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3931 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3932 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3933 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3934 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3935 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3936 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3937 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3938 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3939 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3940 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3941 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3942 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3943 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3944 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3945 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3946 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3947 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3948 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3949 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3950 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3951 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3952 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3953 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3954 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3955
3956 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3957
3958 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3959 with string_printf.
3960
3961 2018-08-10 Keith Seitz <keiths@redhat.com>
3962
3963 * compile/compile-c-support.c (add_code_header, add_code_footer):
3964 Move into policy class.
3965 (c_push_user_expression, pop_user_expression_nop)
3966 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3967 (compile_program): New host class.
3968 (c_compile_program): New typedef.
3969 (c_compute_porgram): Use c_compile_program.
3970
3971 2018-08-10 Keith Seitz <keiths@redhat.com>
3972
3973 * compile/compile-internal.h (compile_instance::~compile_instance):
3974 Remove calls to htab_delete.
3975 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3976 * compile.c (compile_instance::compile_instance): Initialize
3977 htab unique pointers.
3978 (compile_instance::get_cached_type, compile_instance::insert_type)
3979 (compile_instance::error_symbol_once): Update for unique_ptr.
3980
3981 2018-08-10 Keith Seitz <keiths@redhat.com>
3982
3983 * compile/compile-c-symbols.c (struct symbol_error)
3984 (hash_symbol_error, eq_symbol_error, del_symbol_error)
3985 (compile_instance::insert_symbol_error)
3986 (compile_instance::error_symbol_once): Move to ...
3987 * compile/compile.c: ... here.
3988
3989 2018-08-10 Keith Seitz <keiths@redhat.com>
3990
3991 * compile/compile-c-support.c (c_get_compile_context): Use `new'
3992 instead of `new_compile_instance'.
3993 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3994 Update description.
3995 If the symbol error map is not initialized, create it.
3996 (generate_c_for_for_one_symbol): Do not check/initialize
3997 the symbol error map.
3998 * compile/compile-c-types.c (compile_c_instance): Make a class.
3999 Update all callers.
4000 (compile_instance::compile_instance): Initialize the type cache.
4001 (get_cached_type): New function.
4002 (insert_type): Update description.
4003 (compile_c_instance::m_default_cflags): Define.
4004 (convert_type): Update description. Use get_cached_type.
4005 (delete_instance): Moved to destructor.
4006 (new_compile_instance): Moved to constructor.
4007 * compile/compile-c.h (compile_c_instance): Make class inheriting
4008 from compile_instance.
4009 <base>: Remove field.
4010 <type_map, symbol_err_map>: Move to base class.
4011 <c_plugin>: Rename to `m_plugin' and remove pointer type.
4012 * compile/compile-internal.h (compile_instance): Make class.
4013 <type_map_t, symbol_err_map_t>: Define.
4014 <fe>: Rename to `m_gcc_fe'.
4015 <scope, block, gcc_target_options>: Add `m_' prefix.
4016 <m_type_map, m_symbol_err_map>: New fields, moved from
4017 compile_c_instance.
4018 <destroy>: Remove.
4019 (convert_type, new_compile_instance): Remove.
4020 * compile/compile.c (cleanup_compile_instance): Remove.
4021 (compile_to_object): Use unique_ptr to eliminate cleanups.
4022 (compile_instance::set_print_callback, compile_instance::version)
4023 (compile_instance::set_verbose)
4024 (compile_instance::set_driver_filename)
4025 (compile_instance::set_triplet_regexp)
4026 (compile_instance::set_arguments)
4027 (compile_instance::set_source_file)
4028 (compile_instance::compile): Define.
4029
4030 2018-08-10 Keith Seitz <keiths@redhat.com>
4031
4032 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4033 * compile/compile-c-types.c: Define GCC_METHODN macros and include
4034 gcc-c-fe.def to define C plugin.
4035 (delete_instance): Delete `c_plugin'.
4036 (new_compile_instance): Initialize `c_plugin'.
4037 * compile/compile-c.h: Include gcc_c_plugin.h.
4038 (struct compile_c_instance) <c_plugin>: New member.
4039 * gcc-c-plugin.h: New file.
4040 Update all callers with API change.
4041
4042 2018-08-10 Keith Seitz <keiths@redhat.com>
4043
4044 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4045 (HFILES_NO_SRCDIR): ... to here.
4046 Add compile-internal.h and compile-c.h.
4047 * compile/compile-c-support.c: Include compile-c.h.
4048 * compile/compile-c-symbols.c: Include compile-c.h.
4049 (generate_c_for_variable_locations): Update comment.
4050 * compile/compile-c-types.c: Include compile-c.h.
4051 * compile/compile-c.h: New file -- moved C language declarations
4052 from other files here.
4053 * compile/compile-internal.h: Do not include hashtab.h or
4054 common/enum-flags.h.
4055 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4056 (gcc_convert_symbol, gcc_symbol_address)
4057 (generate_c_for_variable_locations, c_get_mode_for_size)
4058 (c_get_range_decl_name): Definitions moved to compile-c.h.
4059 * compile/compile-loc2c.c: Include compile-c.h.
4060
4061 2018-08-10 Keith Seitz <keiths@redhat.com>
4062
4063 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4064 (c_symbol_substitution_name): ... this.
4065 Update all callers.
4066
4067 2018-08-10 Keith Seitz <keiths@redhat.com>
4068
4069 * compile/compile-c-support.c (c_compute_program): Use
4070 unique_xmalloc_ptr to eliminate cleanup.
4071 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4072 Return a unique_xmalloc_ptr and eliminate cleanup.
4073 * compile/compile-internal.h (generate_c_for_variable_locations):
4074 Return unique_xmalloc_ptr and update description.
4075
4076 2018-08-10 Alan Hayward <alan.hayward@arm.com>
4077
4078 * corelow.c (core_target::get_core_register_section): Rename
4079 min_size to section_min_size.
4080
4081 2018-08-09 Jim Wilson <jimw@sifive.com>
4082
4083 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4084 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4085 * NEWS: Mention new GNU/Linux RISC-V target.
4086 * configure.host: Add riscv*-*-linux*.
4087 * configure.nat: Add riscv*.
4088 * configure.tgt: Add riscv*-*-linux*.
4089 * riscv-linux-nat.c: New file.
4090 * riscv-linux-tdep.c: New file.
4091
4092 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
4093
4094 * infrun.c (resume): Make static, add forward declaration.
4095 (proceed): Update header comment.
4096 * infrun.h (resume): Delete declaration.
4097
4098 2018-08-09 Tom Tromey <tom@tromey.com>
4099
4100 * riscv-tdep.h: Minor formatting fixes.
4101
4102 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
4103
4104 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4105 * dwarf-index-cache.c (create_dir_and_check): Likewise.
4106 (test_mkdir_recursive): Likewise.
4107 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4108
4109 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
4110
4111 * valarith.c (value_subscripted_rvalue): If an array is not in
4112 memory, and we don't know the upper bound, then we can't know that
4113 the requested element exists or not.
4114
4115 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
4116
4117 * target.c (str_comma_list_concat_elem): Fix typo in comment.
4118 (target_options_to_string): Add comment.
4119
4120 2018-08-08 Tom Tromey <tom@tromey.com>
4121
4122 * unittests/scoped_mmap-selftests.c: Check result of "write".
4123
4124 2018-08-08 Jim Wilson <jimw@sifive.com>
4125
4126 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4127 (decode_register_index_short): New.
4128 (decode_j_type_insn, decode_cj_type_insn): New.
4129 (decode_b_type_insn, decode_cb_type_insn): New.
4130 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
4131 local xlen. Check xlen when decoding ambiguous compressed insns. In
4132 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4133 is_c_sw_insn instead of is_sw_insn.
4134 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4135 (riscv_software_single_step): New.
4136 * riscv-tdep.h (riscv_software_single_step): Declare.
4137
4138 * riscv-tdep.c (riscv_isa_xlen): Drop static.
4139 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4140
4141 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
4142
4143 PR gdb/18050:
4144 * target.c (dispose_inferior): Don't dispose of inferiors that are
4145 already killed.
4146
4147 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
4148
4149 * remote.c (remote_target::download_tracepoint): Change char* to
4150 const char*.
4151
4152 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
4153
4154 * target.h (target_options_to_string): Return an std::string.
4155 * target.c (str_comma_list_concat_elem): Return void, use
4156 std::string.
4157 (do_option): Likewise.
4158 (target_options_to_string): Return an std::string.
4159 * linux-nat.c (linux_nat_target::wait): Adjust.
4160 * target-debug.h (target_debug_print_options): Adjust.
4161
4162 2018-08-07 Tom Tromey <tom@tromey.com>
4163
4164 * Makefile.in (CPPFLAGS): New variable.
4165 (INTERNAL_CPPFLAGS): Use it.
4166
4167 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4168
4169 * NEWS: Mention the index cache.
4170
4171 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4172
4173 * common/pathstuff.h (get_standard_cache_dir): New.
4174 * common/pathstuff.c (get_standard_cache_dir): New.
4175 * build-id.h (build_id_to_string): New.
4176 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4177 DEBUG_STR_SUFFIX): Move to here.
4178 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4179 DEBUG_STR_SUFFIX): Move from there.
4180 (write_psymtabs_to_index): Make non-static, add basename
4181 parameter. Write to temporary files, rename when done.
4182 (save_gdb_index_command): Adjust call to
4183 write_psymtabs_to_index.
4184 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4185 field.
4186 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4187 (get_gdb_index_contents_from_cache): New.
4188 (get_gdb_index_contents_from_cache_dwz): New.
4189 (dwarf2_initialize_objfile): Read index from cache.
4190 (dwarf2_build_psymtabs): Save to index.
4191 * dwarf-index-cache.h: New file.
4192 * dwarf-index-cache.c: New file.
4193 * dwarf-index-write.h: New file.
4194
4195 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4196
4197 * gnulib/aclocal.m4: Re-generate.
4198 * gnulib/config.in: Re-generate.
4199 * gnulib/configure: Re-generate.
4200 * gnulib/import/Makefile.am: Re-generate.
4201 * gnulib/import/Makefile.in: Re-generate.
4202 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4203 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4204 * gnulib/import/m4/mkdir.m4: New file.
4205 * gnulib/import/mkdir.c: New file.
4206 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4207 module.
4208
4209 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4210
4211 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4212 * common/scoped_mmap.c: New file.
4213 * common/scoped_mmap.h (destroy): New method.
4214 (~scoped_mmap, reset): Use destroy.
4215 (scoped_mmap): New move constructor.
4216 (mmap_file): New declaration.
4217 * unittests/scoped_mmap-selftests.c (test_normal,
4218 test_invalid_filename, run_tests): New functions.
4219 (_initialize_scoped_mmap_selftests): Register selftest.
4220
4221 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4222
4223 * dwarf2read.c (read_gdb_index_from_section): Rename to...
4224 (read_gdb_index_from_buffer): ... this. Remove section
4225 parameter, add buffer parameter.
4226 (get_gdb_index_contents_ftype,
4227 get_gdb_index_contents_dwz_ftype): New typedefs.
4228 (dwarf2_read_gdb_index): Add callback parameters to get the
4229 index contents.
4230 (get_gdb_index_contents_from_section): New.
4231 (dwarf2_initialize_objfile): Update call to
4232 dwarf2_read_gdb_index.
4233
4234 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4235
4236 * common/filestuff.h (gdb_fopen_cloexec): New overload.
4237 (gdb_open_cloexec): Likewise.
4238 * nat/linux-osdata.c (command_from_pid): Use string_printf.
4239 (commandline_from_pid): Likewise.
4240 (linux_xfer_osdata_threads): Likewise.
4241 (linux_xfer_osdata_fds): Likewise.
4242 * ada-lang.c (is_package_name): Likewise.
4243 * auxv.c (procfs_xfer_auxv): Likewise.
4244 * breakpoint.c (print_one_breakpoint_location): Use
4245 uiout::field_fmt.
4246 (print_one_catch_solib): Use string_printf.
4247 * coff-pe-read.c (add_pe_exported_sym): Likewise.
4248 (add_pe_forwarded_sym): Likewise.
4249 * dwarf2read.c (create_type_unit_group): Likewise.
4250 (build_error_marker_type): Likewise.
4251 * infcall.c (get_function_name): Likewise.
4252 * valprint.c (print_converted_chars_to_obstack): Likewise.
4253 * xtensa-tdep.c (xtensa_register_type): Likewise.
4254
4255 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
4256
4257 * remote.c (remote_target::download_tracepoint): Fix format
4258 string errors.
4259
4260 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4261
4262 * tracefile.c: Include common/byte-vector.h.
4263 (trace_save): Change type of buf to gdb::byte_vector. Initialize
4264 with trace_regblock_size if needed. Update uses of buf.
4265
4266 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4267
4268 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4269 std::vector<unsigned char>.
4270 * tracepoint.c (collection_list::collection_list): Remove
4271 m_regs_mask initializer from initializer list. Resize
4272 m_regs_mask using the largest remote register number.
4273 (collection_list::add_remote_register): Remove size check on
4274 m_regs_mask. Use at to access element.
4275 (collection_list::stringify): Change type of temp_buf to
4276 gdb::char_vector. Update uses of temp_buf. Resize if needed to
4277 stringify the register mask. Use pack_hex_byte for the register
4278 mask.
4279
4280 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4281
4282 * tracepoint.h (class collection_list) <add_register>: Remove.
4283 <add_remote_register, add_ax_registers, add_local_register>:
4284 Declare.
4285 <add_memrange>: Add scope parameter.
4286 * tracepoint.c (encode_actions_1): Likewise.
4287 (collection_list::add_register): Rename to ...
4288 (collection_list::add_remote_register): ... this. Update
4289 comment.
4290 (collection_list::add_ax_registers, add_local_register): New
4291 methods.
4292 (collection_list::add_memrange): Add scope parameter. Call
4293 add_local_register instead of add_register.
4294 (finalize_tracepoint_aexpr): New function.
4295 (collection_list::collect_symbol): Update calls to add_memrange.
4296 Call add_local_register instead of add_register. Call
4297 add_ax_registers. Call finalize_tracepoint_aexpr.
4298 (encode_actions_1): Get remote regnos for $reg action. Call
4299 add_remote_register, add_ax_registers, and add_local_register.
4300 Update call to add_memrange. Call finalize_tracepoint_aexpr.
4301 (validate_actionline): Call finalize_tracepoint_aexpr.
4302
4303 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4304
4305 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4306 Replace array buf with gdb::char_vector buf, of size
4307 get_remote_packet_size (). Replace references to buf and
4308 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
4309 and xsnprintf with snprintf. Raise errors if the buffer is too
4310 small.
4311
4312 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4313
4314 * remote.c (remote_target::download_tracepoint): Fix the has_more
4315 predicate in the QTDP action list iteration.
4316
4317 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4318
4319 * remote.c (remote_target::download_tracepoint): Fix indentation
4320 in for block.
4321
4322 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4323
4324 * proc-api.c (_initialize_proc_api): Remove c, unused.
4325 * procfs.c (procfs_init_inferior): Remove signals, unused.
4326 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4327 unused.
4328
4329 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
4330 Andrew Burgess <andrew.burgess@embecosm.com>
4331
4332 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4333 'W_STOPCODE (0)' as this could be ambiguous.
4334
4335 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
4336
4337 * ser-tcp.c (net_open): Fix thinko when deciding whether to
4338 disable TCP's Nagle algorithm (use "ai_protocol" instead of
4339 "ai_socktype").
4340
4341 2018-08-02 Tom Tromey <tom@tromey.com>
4342
4343 PR symtab/16842.
4344 * dwarf2read.c (read_func_scope): Set symtab on template parameter
4345 symbols.
4346 (process_structure_scope): Likewise.
4347
4348 2018-08-02 Xavier Roirand <roirand@adacore.com>
4349
4350 PR gdb/22629:
4351 * darwin-nat.c (darwin_kill_inferior): Fix handling of
4352 kill inferior.
4353
4354 2018-08-02 Tom Tromey <tom@tromey.com>
4355
4356 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4357 (darwin_suspend_inferior, darwin_resume_inferior)
4358 (darwin_decode_notify_message, darwin_resume_inferior_threads)
4359 (darwin_check_new_threads): Check result of get_darwin_inferior.
4360
4361 2018-07-31 Joel Brobecker <brobecker@adacore.com>
4362
4363 GDB 8.1.1 released.
4364
4365 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
4366
4367 * varobj.c (varobj_get_path_expr_parent): Report an error if
4368 parent is a dynamic varobj.
4369
4370 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4371
4372 * gnulib/aclocal.m4: Re-generate.
4373 * gnulib/config.in: Re-generate.
4374 * gnulib/configure: Re-generate.
4375 * gnulib/import/Makefile.in: Re-generate.
4376 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4377 * gnulib/import/m4/onceonly.m4: Re-generate.
4378
4379 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4380
4381 * target-descriptions.c (struct xml_test_tdesc): New.
4382 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4383 (record_xml_tdesc): Update.
4384 (maintenance_check_xml_descriptions): Update.
4385 * target-descriptions.h (record_xml_tdesc): Update comment.
4386
4387 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
4388
4389 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4390 checking array bounds are defined.
4391
4392 2018-07-30 Tom Tromey <tom@tromey.com>
4393
4394 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4395 irreflexivity violation.
4396
4397 2018-07-30 Tom Tromey <tom@tromey.com>
4398
4399 * cli/cli-decode.c (lookup_cmd): Remove lint code.
4400 * value.c (unpack_long): Remove lint code.
4401 * valops.c (value_ind): Remove lint code.
4402 * valarith.c (value_x_binop, value_x_unop, value_equal)
4403 (value_pos): Remove lint code.
4404
4405 2018-07-28 Tom de Vries <tdevries@suse.de>
4406
4407 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4408 with undefined upper bound as <optimized out>.
4409
4410 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
4411
4412 * gcore.in: Rename variable "name" to "prefix". Expand
4413 "usage" text.
4414
4415 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
4416
4417 * windows-nat.c (windows_nat_target::create_inferior): Update to
4418 call close() in global namespace.
4419
4420 2018-07-26 Tom Tromey <tom@tromey.com>
4421
4422 * dwarf-index-write.c (add_address_entry): Don't add objfile
4423 offsets.
4424 * dbxread.c (find_stab_function): Rename from
4425 find_stab_function_addr. Return a bound_minimal_symbol.
4426 (read_dbx_symtab): Use raw_text_low, raw_text_high.
4427 Don't add objfile offsets.
4428 (end_psymtab): Use raw_text_low, raw_text_high,
4429 MSYMBOL_VALUE_RAW_ADDRESS.
4430 (read_ofile_symtab): Update.
4431 (process_one_symbol): Update.
4432 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4433 offsets.
4434 (dw2_relocate): Remove.
4435 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4436 searching addrmap.
4437 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4438 Update.
4439 (process_psymtab_comp_unit_reader, add_partial_symbol)
4440 (add_partial_subprogram, dwarf2_ranges_read): Update.
4441 (load_partial_dies): Update.
4442 (add_address_entry): Don't add objfile offsets.
4443 (dwarf2_build_include_psymtabs): Update.
4444 (create_addrmap_from_aranges): Don't add objfile offsets.
4445 (dw2_find_pc_sect_compunit_symtab): Update.
4446 * mdebugread.c (parse_symbol): Don't add objfile offsets.
4447 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4448 Update.
4449 (parse_partial_symbols): Don't add objfile offsets. Use
4450 raw_text_low, raw_text_high. Update.
4451 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4452 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4453 or call 'relocate' quick function. Clear psymbol_map.
4454 * psympriv.h (struct partial_symbol) <address>: Add section
4455 offset.
4456 <set_unrelocated_address>: Rename from set_address.
4457 <raw_text_low, raw_text_high>: New methods.
4458 <text_low, text_high>: Add objfile parameter.
4459 (add_psymbol_to_bcache): Add 'section' parameter. Call
4460 set_unrelocated_address.
4461 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4462 (find_pc_psymbol): Update.
4463 (fixup_psymbol_section, relocate_psymtabs): Remove.
4464 (dump_psymtab, psym_functions): Update.
4465 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4466 parameter.
4467 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4468 (start_psymtab_common): Update.
4469 * symfile-debug.c (debug_qf_relocate): Remove.
4470 (debug_sym_quick_functions): Update.
4471 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4472 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4473 Update.
4474
4475 2018-07-26 Tom Tromey <tromey@redhat.com>
4476
4477 * dbxread.c (end_psymtab): Use text_high_valid and
4478 text_low_valid.
4479 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4480 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4481 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4482 Update comment.
4483 <text_low_valid, text_high_valid>: New fields.
4484 <set_text_low, set_text_high>: Update.
4485 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4486
4487 2018-07-26 Tom Tromey <tom@tromey.com>
4488
4489 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4490 Update.
4491 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4492 textlow and texthigh fields.
4493 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4494 Update.
4495 * mdebugread.c (parse_lines, parse_partial_symbols)
4496 (psymtab_to_symtab_1): Update.
4497 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4498 Rename fields. Update comment. Now private.
4499 <text_low, text_high, set_text_low, set_text_high>: New methods.
4500 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4501 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4502 (start_psymtab_common, maintenance_info_psymtabs)
4503 (maintenance_check_psymtabs): Update.
4504 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4505 texthigh fields.
4506 (scan_xcoff_symtab): Update.
4507
4508 2018-07-26 Tom Tromey <tromey@redhat.com>
4509
4510 * psympriv.h (struct partial_symbol) <unrelocated_address,
4511 address, set_address>: New methods.
4512 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4513 (fixup_psymbol_section, relocate_psymtabs): Update.
4514 (print_partial_symbols): Add 'objfile' parameter. Update.
4515 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4516 Update.
4517
4518 2018-07-26 Tom Tromey <tom@tromey.com>
4519
4520 * dwarf-index-write.c (write_psymbols, debug_names::insert)
4521 (debug_names::write_psymbols): Update.
4522 * psympriv.h (struct partial_symbol): Derive from
4523 general_symbol_info.
4524 <obj_section>: New method.
4525 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4526 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4527 (find_pc_sect_psymbol, fixup_psymbol_section)
4528 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4529 (print_partial_symbols, recursively_search_psymtabs)
4530 (compare_psymbols, psymbol_hash, psymbol_compare)
4531 (add_psymbol_to_bcache, maintenance_check_psymtabs)
4532 (psymbol_name_matches, psym_fill_psymbol_map): Update.
4533
4534 2018-07-26 Tom Tromey <tromey@redhat.com>
4535
4536 * dbxread.c (end_psymtab): Remove dead code.
4537
4538 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
4539
4540 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4541 DWARF unwinders are disabled.
4542 * dwarf2-frame.c: Add dwarf2read.h include.
4543 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4544 disabled.
4545 (dwarf2_frame_unwinders_enabled_p): Define.
4546 (show_dwarf_unwinders_enabled_p): New function.
4547 (_initialize_dwarf2_frame): Register switch to control DWARF
4548 unwinder use.
4549 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4550 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4551 (show_dwarf_cmdlist): Remove static keyword.
4552 * dwarf2read.h (set_dwarf_cmdlist): Declare.
4553 (show_dwarf_cmdlist): Declare.
4554 * NEWS: Document new feature.
4555
4556 2018-07-26 Tom de Vries <tdevries@suse.de>
4557
4558 PR breakpoints/23366
4559 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4560
4561 2018-07-26 Tom de Vries <tdevries@suse.de>
4562
4563 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4564 DW_AT_count can't be translated to a dynamic prop.
4565
4566 2018-07-25 Tom de Vries <tdevries@suse.de>
4567
4568 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4569 try/catch.
4570
4571 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
4572
4573 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4574
4575 2018-07-25 Joel Brobecker <brobecker@adacore.com>
4576
4577 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4578
4579 2018-07-24 Keith Seitz <keiths@redhat.comt
4580
4581 PR symtab/23010
4582 * dwarf2read.c (dw2_add_symbol_to_list): New function.
4583 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4584 instead of add_symbol_to_list.
4585 (read_file_scope): Call prepare_one_comp_unit before reading
4586 any other DIEs.
4587
4588 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
4589
4590 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4591
4592 2018-07-24 Tom Tromey <tom@tromey.com>
4593
4594 * utils.c (malloc, realloc, free): Don't declare.
4595 * configure, config.in: Rebuild.
4596 * configure.ac: Don't check for declarations of free, malloc, or
4597 realloc.
4598
4599 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4600
4601 * aarch64-linux-nat.c
4602 (aarch64_linux_nat_target::stopped_data_address): Remove unused
4603 variable.
4604 * arm-linux-nat.c (fetch_regs): Likewise.
4605 (store_regs): Likewise.
4606 (fetch_vfp_regs): Likewise.
4607 (store_vfp_regs): Likewise.
4608 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4609 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4610 (arm_linux_nat_target::insert_watchpoint): Likewise.
4611 (arm_linux_nat_target::remove_watchpoint): Likewise.
4612 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4613 Likewise.
4614 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4615 Likewise.
4616 * ppc-linux-nat.c (fetch_register): Likewise.
4617 (fetch_all_gp_regs): Likewise.
4618 (fetch_ppc_registers): Likewise.
4619 (store_all_gp_regs): Likewise.
4620 (store_ppc_registers): Likewise.
4621 (hwdebug_insert_point): Likewise.
4622 (can_use_watchpoint_cond_accel): Likewise.
4623 * remote-sim.c (gdb_os_write_stdout): Likewise.
4624
4625 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4626 Tom Tromey <tom@tromey.com>
4627
4628 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4629 test for it.
4630 * configure: Rebuild.
4631
4632 2018-07-22 Tom Tromey <tom@tromey.com>
4633
4634 * regformats/regdat.sh: Define xmltarget_${name} inside
4635 #ifndef IN_PROCESS_AGENT.
4636
4637 2018-07-22 Tom Tromey <tom@tromey.com>
4638
4639 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4640
4641 2018-07-22 Tom Tromey <tom@tromey.com>
4642
4643 * symfile.c (reread_symbols): Notify iter, not objfile.
4644
4645 2018-07-22 Tom Tromey <tom@tromey.com>
4646
4647 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4648 Use arch_ops.
4649 (ravenscar_thread_target::prepare_to_store): Likewise.
4650
4651 2018-07-22 Tom Tromey <tom@tromey.com>
4652
4653 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4654 unused variable. Call value_fetch_lazy when needed.
4655 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4656 Remove unused variable. Call value_fetch_lazy when needed.
4657
4658 2018-07-22 Tom Tromey <tom@tromey.com>
4659
4660 * m32c-tdep.c (mark_dma): Return void.
4661 (make_regs): Remove unused declarations.
4662
4663 2018-07-22 Tom Tromey <tom@tromey.com>
4664
4665 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4666 cmdscm_get_valid_command_smob_arg_unsafe for effect.
4667 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4668 bkscm_get_valid_block_smob_arg_unsafe for effect.
4669
4670 2018-07-22 Tom Tromey <tom@tromey.com>
4671
4672 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4673 value_type.
4674
4675 2018-07-22 Tom Tromey <tom@tromey.com>
4676
4677 * windows-nat.c (saved_context): Conditionally define.
4678 * remote.c (remote_target::remote_btrace_maybe_reopen):
4679 Conditionally declare "warned".
4680 * inflow.c (sigquit_ours): Conditionally define.
4681 (new_tty): Move "tty" declaration inside #if.
4682 * guile/guile.c (guile_datadir): Conditionally define.
4683 * charset.c (set_be_le_names): Move some declarations inside #if.
4684 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4685 #if.
4686 (parse_xml_btrace_conf): Likewise.
4687
4688 2018-07-22 Tom Tromey <tom@tromey.com>
4689
4690 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4691
4692 2018-07-22 Tom Tromey <tom@tromey.com>
4693
4694 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4695 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4696 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4697 * buildsym-legacy.c (get_macro_table): Remove unused variable.
4698 * stack.c (frame_apply_level_command): Remove unused variable.
4699 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4700 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4701 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4702 unused variable.
4703 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4704 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4705 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4706 variable.
4707 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4708 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4709 variable.
4710 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4711 Remove unused variable.
4712 * cli/cli-script.c (recurse_read_control_structure): Remove unused
4713 variable.
4714 * common/tdesc.c (print_xml_feature::visit): Remove unused
4715 variable.
4716 * compile/compile-object-load.c (store_regs): Remove unused
4717 variables.
4718 * complaints.c (clear_complaints): Remove unused variable.
4719 * corelow.c (core_target_open): Remove unused variable.
4720 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4721 variable.
4722 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4723 variable.
4724 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4725 variable.
4726 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4727 variable.
4728 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4729 variable.
4730 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4731 variable.
4732 * ia64-tdep.c (examine_prologue): Remove unused variable.
4733 * infcall.c (run_inferior_call): Remove unused variable.
4734 * inferior.c (exit_inferior): Remove unused variable.
4735 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4736 * linespec.c (decode_line_2): Remove unused variable.
4737 * linux-nat.c (super_close): Remove.
4738 * linux-tdep.c (linux_info_proc): Remove unused variable.
4739 * mi/mi-main.c (mi_execute_command): Remove unused variable.
4740 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4741 Remove unused variable.
4742 * parse.c (find_minsym_type_and_address): Remove unused variable.
4743 * printcmd.c (info_symbol_command, printf_floating): Remove unused
4744 variable.
4745 * python/py-breakpoint.c (bppy_set_commands): Remove unused
4746 variable.
4747 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4748 variables.
4749 * record-btrace.c (record_btrace_target::store_registers): Remove
4750 unused variable.
4751 (cmd_show_record_btrace_cpu): Remove unused variable.
4752 * riscv-tdep.c (riscv_register_reggroup_p)
4753 (riscv_push_dummy_call, riscv_return_value): Remove unused
4754 variable.
4755 * rust-exp.y (literal): Remove unused variable.
4756 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4757 unused variable.
4758 <STRUCTOP_ANONYMOUS>: Likewise.
4759 * s390-linux-tdep.c (s390_linux_init_abi_31)
4760 (s390_linux_init_abi_64): Remove unused variable.
4761 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4762 (file_select_thread, net_windows_open, _initialize_ser_windows):
4763 Remove unused variables.
4764 * symtab.c (find_pc_sect_line): Remove unused variable.
4765 * target-memory.c (compute_garbled_blocks): Remove unused
4766 variable.
4767 (target_write_memory_blocks): Remove unused variable.
4768 * target.c (target_stack::unpush): Remove unused variables.
4769 * tracepoint.c (start_tracing, all_tracepoint_actions)
4770 (merge_uploaded_trace_state_variables)
4771 (print_one_static_tracepoint_marker): Remove unused variable.
4772 * unittests/basic_string_view/element_access/char/1.cc (test01):
4773 Remove unused variable.
4774 * windows-nat.c (windows_continue, windows_add_all_dlls)
4775 (do_initial_windows_stuff, windows_nat_target::create_inferior):
4776 Remove unused variables.
4777
4778 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
4779
4780 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4781 attr_profile in HAVE_ELF.
4782 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4783 HAVE_ELF.
4784
4785 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
4786
4787 * frame.c (frame_register_unwind): Change parameter name.
4788 (frame_unwind_register): Likewise.
4789 (frame_unwind_register_value): Likewise.
4790 (frame_unwind_register_signed): Likewise.
4791 (frame_unwind_register_unsigned): Likewise.
4792 * frame.h (frame_register_unwind): Likewise.
4793 (frame_unwind_register): Likewise.
4794 (frame_unwind_register_value): Likewise.
4795 (frame_unwind_register_signed): Likewise.
4796 (frame_unwind_register_unsigned): Likewise.
4797 (frame_unwind_arch): Likewise.
4798
4799 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4800
4801 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4802 ISA maintenance.
4803
4804 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4805
4806 * mips-linux-nat.c (mips_linux_nat_target::read_description):
4807 Call `get_ptrace_pid' rather than extracting the ptrace PID by
4808 hand.
4809
4810 2018-07-20 Keith Seitz <keiths@redhat.com>
4811
4812 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4813 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4814 m_compunit_symtab, m_language>: Add "m_" prefix.
4815 Update all uses.
4816 * buildsym.c: Update all uses.
4817
4818 2018-07-20 Tom Tromey <tom@tromey.com>
4819
4820 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4821 * buildsym.h (record_line_ftype): Remove typedef.
4822
4823 2018-07-20 Tom Tromey <tom@tromey.com>
4824
4825 * buildsym-legacy.h (augment_type_symtab): Don't declare.
4826 (end_expandable_symtab): Likewise.
4827 (end_symtab_get_static_block): Likewise.
4828 (end_symtab_from_static_block): Likewise.
4829 * buildsym-legacy.c (augment_type_symtab): Remove.
4830 (end_expandable_symtab): Remove.
4831 (end_symtab_get_static_block): Remove.
4832 (end_symtab_from_static_block): Remove.
4833
4834 2018-07-20 Tom Tromey <tom@tromey.com>
4835
4836 * dwarf2read.c: Include buildsym.h.
4837 (struct dwarf2_cu) <builder>: New method.
4838 (fixup_go_packaging): Update.
4839 (process_full_comp_unit, process_full_type_unit): Update. Don't
4840 use scoped_free_pendings.
4841 (using_directives): Add "cu" parameter, remove "language".
4842 (read_import_statement, setup_type_unit_groups, )
4843 (read_func_scope, read_lexical_block_scope)
4844 (dwarf2_record_block_ranges, read_namespace): Update.
4845 (lnp_state_machine::lnp_state_machine): Add cu parameter.
4846 (lnp_state_machine::handle_end_sequence): Update.
4847 (class lnp_state_machine) <m_cu>: New member.
4848 <m_record_line_callback>: Remove.
4849 <m_currently_recording_lines>: New member.
4850 (lnp_state_machine::handle_set_file): Update.
4851 (noop_record_line): Remove.
4852 (dwarf_record_line_p): Add cu parameter.
4853 (dwarf_record_line_1, dwarf_finish_line): Likewise.
4854 (lnp_state_machine::record_line)
4855 (lnp_state_machine::lnp_state_machine)
4856 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4857 (dwarf_decode_lines): Update.
4858 (dwarf2_start_subfile): Add cu parameter.
4859 (dwarf2_start_symtab, new_symbol): Update.
4860 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4861 Remove dwarf2_per_objfile parameter.
4862 (dwarf_decode_macros): Update.
4863
4864 2018-07-20 Tom Tromey <tom@tromey.com>
4865
4866 * stabsread.c (define_symbol): Update.
4867 * buildsym-legacy.h (get_buildsym_compunit): Declare.
4868 * dwarf2read.c (new_symbol): Update.
4869 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4870 * cp-namespace.c: Include buildsym.h.
4871 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4872 * buildsym-legacy.c (get_buildsym_compunit): New function.
4873
4874 2018-07-20 Tom Tromey <tom@tromey.com>
4875
4876 * xcoffread.c: Include buildsym-legacy.h.
4877 * windows-nat.c: Include buildsym-legacy.h.
4878 * stabsread.c: Include buildsym-legacy.h.
4879 * mdebugread.c: Include buildsym-legacy.h.
4880 * buildsym-legacy.h: New file.
4881 * buildsym-legacy.c: New file, from buildsym.c.
4882 * go32-nat.c: Include buildsym-legacy.h.
4883 * dwarf2read.c: Include buildsym-legacy.h.
4884 * dbxread.c: Include buildsym-legacy.h.
4885 * cp-namespace.c: Include buildsym-legacy.h.
4886 * coffread.c: Include buildsym-legacy.h.
4887 * buildsym.h: Move some contents to buildsym-legacy.h.
4888 * buildsym.c: Include buildsym-legacy.h. Move many functions to
4889 buildsym-legacy.c.
4890 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4891
4892 2018-07-20 Tom Tromey <tom@tromey.com>
4893
4894 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4895 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4896 (buildsym_compunit::buildsym_compunit)
4897 (buildsym_compunit::~buildsym_compunit)
4898 (buildsym_compunit::get_macro_table): Define.
4899
4900 2018-07-20 Tom Tromey <tom@tromey.com>
4901
4902 * buildsym.c (reset_symtab_globals): Remove.
4903 (buildsym_compunit::end_symtab_from_static_block): Update.
4904 (buildsym_compunit::augment_type_symtab): Update.
4905 (end_symtab_from_static_block): Call free_buildsym_compunit.
4906 (augment_type_symtab, end_symtab, end_expandable_symtab):
4907 Likewise.
4908
4909 2018-07-20 Tom Tromey <tom@tromey.com>
4910
4911 * arch-utils.c: Do not include buildsym.h.
4912 * mipsread.c: Do not include buildsym.h.
4913 * machoread.c: Do not include buildsym.h.
4914 * elfread.c: Do not include buildsym.h.
4915
4916 2018-07-20 Tom Tromey <tom@tromey.com>
4917
4918 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4919 initialization.
4920 (buildsym_compunit): Add new constructor.
4921 (struct buildsym_compunit) <get_last_source_file, finish_block,
4922 record_block_range, start_subfile, patch_subfile_names,
4923 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4924 set_last_source_start_addr, get_last_source_start_addr,
4925 get_local_using_directives, set_local_using_directives,
4926 get_global_using_directives, outermost_context_p,
4927 get_current_context_stack, get_context_stack_depth,
4928 get_current_subfile, get_local_symbols, get_file_symbols,
4929 get_global_symbols, record_debugformat, record_producer,
4930 push_context, pop_context, end_symtab_get_static_block,
4931 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4932 New public methods.
4933 <record_pending_block, finish_block_internal, make_blockvector,
4934 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4935 private methods.
4936 Update all users.
4937
4938 2018-05-22 Tom Tromey <tom@tromey.com>
4939
4940 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4941 parameter.
4942 (finish_block_internal): Update.
4943
4944 2018-07-20 Tom Tromey <tom@tromey.com>
4945
4946 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4947 parameter.
4948 (finish_block_internal): Update.
4949
4950 2018-07-20 Tom Tromey <tom@tromey.com>
4951
4952 * buildsym.h (EXTERN): Don't define or undef.
4953 * buildsym.c (EXTERN): Don't define.
4954
4955 2018-07-20 Tom Tromey <tom@tromey.com>
4956
4957 * buildsym.c: Remove TODO comment.
4958
4959 2018-07-20 Tom Tromey <tom@tromey.com>
4960
4961 * coffread.c (coff_symtab_read): Update.
4962 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4963 (xcoff_new_init): Update.
4964 * mipsread.c (mipscoff_new_init): Update.
4965 * mdebugread.c (mdebug_build_psymtabs): Update.
4966 * elfread.c (elf_new_init): Update.
4967 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4968 Update.
4969 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4970 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4971 (stabsect_build_psymtabs): Update.
4972 * buildsym.h (buildsym_init): Don't declare.
4973 * buildsym.c: Update comment.
4974 (prepare_for_building): Remove.
4975 (start_symtab, restart_symtab): Update.
4976 (reset_symtab_globals): Update comment.
4977 (buildsym_init): Remove.
4978
4979 2018-07-20 Tom Tromey <tom@tromey.com>
4980
4981 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4982 * stabsread.c (patch_block_stabs, define_symbol, read_type)
4983 (read_enum_type, common_block_start, common_block_end)
4984 (cleanup_undefined_types_1, finish_global_stabs): Update.
4985 * mdebugread.c (psymtab_to_symtab_1): Update.
4986 * dwarf2read.c (fixup_go_packaging, read_func_scope)
4987 (read_lexical_block_scope, new_symbol): Update.
4988 * dbxread.c (process_one_symbol): Update.
4989 * coffread.c (coff_symtab_read, process_coff_symbol)
4990 (coff_read_enum_type): Update.
4991 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4992 declare.
4993 (get_local_symbols, get_file_symbols, get_global_symbols): New
4994 functions.
4995 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4996 m_global_symbols.
4997 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4998 (~scoped_free_pendings): Update.
4999 (finish_block, prepare_for_building, reset_symtab_globals)
5000 (end_symtab_get_static_block, end_symtab_with_blockvector)
5001 (augment_type_symtab, push_context): Update.
5002 (get_local_symbols, get_file_symbols, get_global_symbols): New
5003 functions.
5004 (buildsym_init): Update.
5005
5006 2018-07-20 Tom Tromey <tom@tromey.com>
5007
5008 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5009 (process_full_type_unit): Likewise.
5010 (dwarf2_start_symtab): Set list_in_scope.
5011
5012 2018-07-20 Tom Tromey <tom@tromey.com>
5013
5014 * dwarf2read.c (process_psymtab_comp_unit_reader)
5015 (build_type_psymtabs_reader): Do not set list_in_scope.
5016
5017 2018-07-20 Tom Tromey <tom@tromey.com>
5018
5019 * buildsym.c (free_pendings): Remove.
5020 (add_symbol_to_list, scoped_free_pendings)
5021 (finish_block_internal, buildsym_init): Update.
5022
5023 2018-07-20 Tom Tromey <tom@tromey.com>
5024
5025 * xcoffread.c (read_xcoff_symtab): Update.
5026 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5027 Update.
5028 * dbxread.c (process_one_symbol): Update.
5029 * coffread.c (coff_symtab_read): Update.
5030 * buildsym.h (finish_block): Update.
5031 * buildsym.c (finish_block): Remove "listhead" argument.
5032 (end_symtab_get_static_block): Update.
5033
5034 2018-07-20 Tom Tromey <tom@tromey.com>
5035
5036 * buildsym.h (class scoped_free_pendings): Remove constructor.
5037 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5038 method.
5039 <m_pending_block_obstack, m_pending_blocks>: New members.
5040 (pending_block_obstack, pending_blocks): Remove.
5041 (scoped_free_pendings::scoped_free_pendings): Default.
5042 (~scoped_free_pendings): Update.
5043 (free_pending_blocks): Remove.
5044 (finish_block_internal, record_pending_block, make_blockvector)
5045 (end_symtab_get_static_block, augment_type_symtab, push_context)
5046 (buildsym_init): Update.
5047
5048 2018-07-20 Tom Tromey <tom@tromey.com>
5049
5050 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5051 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5052 members.
5053 (pending_addrmap, pending_addrmap_obstack)
5054 (pending_addrmap_interesting): Remove.
5055 (scoped_free_pendings, record_block_range, make_blockvector)
5056 (prepare_for_building, reset_symtab_globals, buildsym_init):
5057 Update.
5058
5059 2018-07-20 Tom Tromey <tom@tromey.com>
5060
5061 * xcoffread.c (process_linenos): Update.
5062 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5063 * mdebugread.c (psymtab_to_symtab_1): Update.
5064 * dwarf2read.c (setup_type_unit_groups)
5065 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5066 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5067 * dbxread.c (process_one_symbol): Update.
5068 * coffread.c (coff_symtab_read, enter_linenos)
5069 (process_coff_symbol): Update.
5070 * buildsym.h (current_subfile): Don't declare.
5071 (get_current_subfile): Declare.
5072 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5073 member.
5074 (start_subfile, free_buildsym_compunit, push_subfile)
5075 (prepare_for_building, start_symtab): Update.
5076 (get_current_subfile): New function.
5077
5078 2018-07-20 Tom Tromey <tom@tromey.com>
5079
5080 * coffread.c (coff_symtab_read): Update.
5081 * xcoffread.c (read_xcoff_symtab): Update.
5082 * dwarf2read.c (new_symbol): Update.
5083 (read_func_scope, read_lexical_block_scope): Update.
5084 * dbxread.c (process_one_symbol): Update.
5085 * buildsym.h (context_stack, context_stack_depth): Don't declare.
5086 (outermost_context_p): Remove macro.
5087 (outermost_context_p, get_current_context_stack)
5088 (get_context_stack_depth): Declare.
5089 (pop_context): Return struct context_stack.
5090 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5091 member.
5092 (context_stack_size): Remove.
5093 (INITIAL_CONTEXT_STACK_SIZE): Remove.
5094 (prepare_for_building, end_symtab_get_static_block)
5095 (augment_type_symtab, push_context): Update.
5096 (pop_context): Return struct context_stack.
5097 (outermost_context_p, get_current_context_stack)
5098 (get_context_stack_depth): New functions.
5099 (buildsym_init): Update.
5100
5101 2018-07-20 Tom Tromey <tom@tromey.com>
5102
5103 * rust-exp.y: Now a pure parser. Update all rules.
5104 (%union): Move earlier.
5105 (current_parser, work_obstack): Remove globals.
5106 (rust_parser, ~rust_parser): Update.
5107 (class rust_parser) <copy_name, concat3, crate_name, super_name,
5108 lex_character, lex_number, lex_string, lex_identifier,
5109 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5110 convert_name, convert_params_to_expression,
5111 convert_ast_to_expression, ast_basic_type, ast_operation,
5112 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5113 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5114 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5115 ast_array_type, ast_slice_type, ast_reference_type,
5116 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5117 (rust_parse): Update.
5118 (rustyyerror, rustyylex): Add parser parameter.
5119 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5120 (rust_lex_stringish_test, rust_lex_test_sequence)
5121 (rust_lex_test_trailing_dot, rust_lex_test_completion)
5122 (rust_lex_test_push_back, rust_lex_tests): Update.
5123
5124 2018-07-19 Pedro Alves <palves@redhat.com>
5125
5126 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5127 gdb::unique_xmalloc_ptr.
5128 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5129 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5130 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5131 copy-initialization.
5132 * guile/scm-pretty-print.c (ppscm_print_children): Use
5133 gdb::unique_xmalloc_ptr instead of cleanups.
5134 (gdbscm_apply_val_pretty_printer): Remove cleanups.
5135 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5136 gdb::unique_xmalloc_ptr.
5137 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5138 Adjust to use gdb::unique_xmalloc_ptr.
5139 * guile/scm-utils.c (extract_arg): Adjust.
5140 * guile/scm-value.c (gdbscm_value_field): Adjust to use
5141 gdb::unique_xmalloc_ptr instead of a cleanup.
5142
5143 2018-07-19 Tom Tromey <tom@tromey.com>
5144
5145 * utils.c (do_value_free_to_mark)
5146 (make_cleanup_value_free_to_mark): Remove.
5147 * utils.h (make_cleanup_value_free_to_mark): Remove.
5148
5149 2018-07-19 Pedro Alves <palves@redhat.com>
5150
5151 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5152 forwarding reference.
5153
5154 2018-07-18 Pedro Alves <palves@redhat.com>
5155
5156 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5157 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
5158 cleanup.
5159
5160 2018-07-18 Pedro Alves <palves@redhat.com>
5161
5162 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5163 exceptions.
5164 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5165 (gdbscm_wrap): New.
5166 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5167 directly instead of a cleanup.
5168 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5169 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
5170 (vlscm_binop_gdbthrow): New, factored out from ...
5171 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
5172 (vlscm_rich_compare): Use gdbscm_wrap.
5173 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5174 instead of a cleanup.
5175 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5176 cleanup.
5177 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5178 Use xfree directly instead of a cleanup.
5179 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5180 Adjust to use gdbscm_wrap and scoped_value_mark.
5181 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5182 (gdbscm_value_address, gdbscm_value_dereference)
5183 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5184 scoped_value_mark.
5185 (gdbscm_value_dynamic_type): Use scoped_value_mark.
5186 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5187 scoped_value_mark.
5188 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5189 gdbscm_wrap and scoped_value_mark.
5190 (gdbscm_value_to_string): Use xfree directly instead of a
5191 cleanup. Move 'buffer' unique_ptr to TRY scope.
5192 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5193 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
5194 scoped_value_mark.
5195 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5196 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5197 scoped_value_mark.
5198 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5199 gdbscm_wrap.
5200
5201 2018-07-18 Tom de Vries <tdevries@suse.de>
5202
5203 * findvar.c (default_read_var_value): Also resolve dynamic type for
5204 LOC_OPTIMIZED_OUT vars.
5205
5206 2018-07-18 Maciej W. Rozycki <macro@mips.com>
5207
5208 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5209 decoding.
5210
5211 2018-07-17 Tom Tromey <tom@tromey.com>
5212
5213 * guile/scm-param.c (pascm_set_func, pascm_show_func)
5214 (compute_enum_list, pascm_set_param_value_x)
5215 (gdbscm_parameter_value): Update.
5216 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5217 (gdbscm_scm_to_host_string): Update.
5218 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5219 Update.
5220 * guile/scm-cmd.c (cmdscm_add_completion): Update.
5221 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5222 * guile/scm-string.c (gdbscm_scm_to_string): Return
5223 unique_xmalloc_ptr.
5224 (gdbscm_scm_to_host_string): Likewise.
5225
5226 2018-07-17 Tom Tromey <tom@tromey.com>
5227
5228 * guile/guile.c (gdbscm_eval_from_control_command): Update.
5229 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5230 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5231 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5232 unique_xmalloc_ptr.
5233
5234 2018-07-17 Tom Tromey <tom@tromey.com>
5235
5236 * guile/scm-param.c (pascm_signal_setshow_error): Update.
5237 * guile/guile-internal.h (gdbscm_exception_message_to_string):
5238 Update.
5239 * guile/scm-cmd.c (cmdscm_function): Update.
5240 * guile/scm-pretty-print.c
5241 (ppscm_print_exception_unless_memory_error): Update.
5242 * guile/scm-exception.c (gdbscm_exception_message_to_string):
5243 Return unique_xmalloc_ptr.
5244
5245 2018-07-17 Tom Tromey <tom@tromey.com>
5246
5247 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5248 Use string_printf.
5249
5250 2018-07-17 Jim Wilson <jimw@sifive.com>
5251
5252 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5253 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
5254 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
5255 unecessary braces after EF_RISCV_RVC test. Delete call to
5256 set_gdbarch_decr_pc_after_break.
5257
5258 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5259 RISCV_LAST_FP_REGNUM + 1.
5260 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5261
5262 2018-07-17 Tom Tromey <tom@tromey.com>
5263
5264 * configure.ac: Remove --disable-gdbcli.
5265 * configure: Rebuild.
5266 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5267 (SUBDIR_CLI_CFLAGS): Remove.
5268 (SFILES): Use SUBDIR_CLI_SRCS.
5269 (COMMON_OBS): Use SUBDIR_CLI_OBS.
5270
5271 2018-07-17 Tom Tromey <tom@tromey.com>
5272
5273 PR gdb/18624:
5274 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5275
5276 2018-07-16 Jim Wilson <jimw@sifive.com>
5277
5278 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5279
5280 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5281
5282 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5283 variable.
5284 (libunwind_frame_sniffer): Likewise.
5285 (libunwind_frame_prev_register): Likewise.
5286 (libunwind_sigtramp_frame_sniffer): Likewise.
5287 * ia64-tdep.c (ia64_access_reg): Likewise.
5288 (ia64_access_rse_reg): Likewise.
5289 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5290 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5291
5292 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5293
5294 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5295
5296 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5297
5298 * remote-sim.c (gdbsim_target::close,
5299 gdbsim_target::mourn_inferior): Remove unused variables.
5300
5301 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
5302
5303 * ia64-tdep.c (ktab_buf): New global.
5304 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5305 (get_kernel_table): Adjust.
5306
5307 2018-07-16 Tom Tromey <tom@tromey.com>
5308
5309 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5310 * dwarf2read.c (using_directives, new_symbol): Use
5311 outermost_context_p.
5312 * dbxread.c (process_one_symbol): Use outermost_context_p.
5313 * coffread.c (coff_symtab_read): Use outermost_context_p.
5314
5315 2018-07-16 Tom Tromey <tom@tromey.com>
5316
5317 * dwarf2read.c (using_directives, read_func_scope)
5318 (read_lexical_block_scope): Update.
5319 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5320 * buildsym.h (local_using_directives, global_using_directives):
5321 Don't declare.
5322 (get_local_using_directives, set_local_using_directives)
5323 (get_global_using_directives): Declare.
5324 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5325 m_global_using_directives>: New members.
5326 (finish_block_internal, prepare_for_building)
5327 (reset_symtab_globals, end_symtab_get_static_block)
5328 (push_context): Update.
5329 (get_local_using_directives, set_local_using_directives)
5330 (get_global_using_directives): New functions.
5331 (buildsym_init): Update.
5332
5333 2018-07-16 Tom Tromey <tom@tromey.com>
5334
5335 * xcoffread.c (xcoff_initial_scan): Don't call
5336 free_pending_blocks.
5337 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5338 * buildsym.h (class scoped_free_pendings): Add constructor.
5339 (free_pending_blocks): Don't declare.
5340 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5341 (free_pending_blocks): Now static.
5342
5343 2018-07-16 Tom Tromey <tom@tromey.com>
5344
5345 * buildsym.h (push_subfile, pop_subfile): Update declarations.
5346 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5347 member.
5348 (struct subfile_stack): Remove.
5349 (subfile_stack): Remove.
5350 (push_subfile, pop_subfile, buildsym_init): Update.
5351
5352 2018-07-16 Tom Tromey <tom@tromey.com>
5353
5354 * buildsym.c (push_subfile): Use gdb_assert.
5355 (pop_subfile): Use gdb_assert.
5356
5357 2018-07-16 Tom Tromey <tom@tromey.com>
5358
5359 * buildsym.h (merge_symbol_lists): Remove.
5360 * buildsym.c (merge_symbol_lists): Remove.
5361
5362 2018-07-16 Tom Tromey <tom@tromey.com>
5363
5364 * stabsread.c (scan_file_globals): Update comment.
5365 * stabsread.h (scan_file_globals): Move from buildsym.h.
5366 * buildsym.h (scan_file_globals): Move to stabsread.h.
5367
5368 2018-07-16 Tom Tromey <tom@tromey.com>
5369
5370 * xcoffread.c (xcoff_new_init): Update.
5371 * mipsread.c (mipscoff_new_init): Update.
5372 * mdebugread.c (mdebug_build_psymtabs): Update.
5373 * elfread.c (elf_new_init): Update.
5374 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5375 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5376 * buildsym.h (buildsym_new_init): Don't declare.
5377 * buildsym.c (buildsym_new_init): Remove.
5378
5379 2018-07-16 Tom Tromey <tom@tromey.com>
5380
5381 * stabsread.h (within_function): Move from buildsym.h.
5382 * stabsread.c (start_stabs): Clear within_function.
5383 * coffread.c (coff_start_symtab): Clear within_function.
5384 * buildsym.h (within_function): Move to stabsread.h.
5385 * buildsym.c (prepare_for_building): Update.
5386
5387 2018-07-16 Tom Tromey <tom@tromey.com>
5388
5389 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5390 * dwarf2read.c (dwarf2_start_symtab): Don't set
5391 processing_gcc_compilation.
5392 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5393
5394 2018-07-16 Tom Tromey <tom@tromey.com>
5395
5396 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5397 (next_symbol_text_func): Move from buildsym.h.
5398 * stabsread.c (hashname): Move from buildsym.c.
5399 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5400 (next_symbol_text_func, hashname): Move to stabsread.h.
5401 * buildsym.c: Don't include bcache.h
5402 (hashname): Move to stasbread.c.
5403
5404 2018-07-16 Tom Tromey <tom@tromey.com>
5405
5406 * buildsym.h (context_stack_size): Don't declare.
5407 * buildsym.c (context_stack_size): New global.
5408
5409 2018-07-16 Tom Tromey <tom@tromey.com>
5410
5411 * dbxread.c (processing_acc_compilation): New global.
5412 * buildsym.h (processing_acc_compilation): Don't declare.
5413
5414 2018-07-16 Tom Tromey <tom@tromey.com>
5415
5416 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5417 * dbxread.c (read_ofile_symtab): Update.
5418 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5419 * buildsym.h (last_source_start_addr): Remove.
5420 (set_last_source_start_addr, get_last_source_start_addr):
5421 Declare.
5422 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5423 parameter.
5424 (struct buildsym_compunit) <m_last_source_start_addr>: New
5425 member.
5426 (prepare_for_building): Remove start_addr parameter.
5427 (start_symtab, restart_symtab, end_symtab_get_static_block)
5428 (end_symtab_with_blockvector): Update.
5429 (set_last_source_start_addr, get_last_source_start_addr): New
5430 functions.
5431
5432 2018-07-16 Tom Tromey <tom@tromey.com>
5433
5434 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5435 member.
5436 (have_line_numbers): Remove.
5437 (record_line, prepare_for_building, end_symtab_get_static_block)
5438 (augment_type_symtab): Update.
5439
5440 2018-07-16 Tom Tromey <tom@tromey.com>
5441
5442 * buildsym.c (~buildsym_compunit): Free the macro table.
5443 (struct buildsym_compunit) <get_macro_table, release_macros>: New
5444 methods.
5445 <m_pending_macros>: New member.
5446 (pending_macros): Remove.
5447 (~scoped_free_pendings, get_macro_table, prepare_for_building)
5448 (reset_symtab_globals, end_symtab_get_static_block)
5449 (end_symtab_with_blockvector, augment_type_symtab)
5450 (buildsym_init): Update.
5451
5452 2018-07-16 Tom Tromey <tom@tromey.com>
5453
5454 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5455 parameter.
5456 (buildsym_compunit::set_last_source_file): New method.
5457 <m_last_source_file>: New member.
5458 (prepare_for_building): Remove "name" parameter.
5459 (start_symtab, restart_symtab, reset_symtab_globals): Update.
5460 (last_source_file): Remove.
5461 (set_last_source_file, get_last_source_file): Update.
5462
5463 2018-07-16 Tom Tromey <tom@tromey.com>
5464
5465 * buildsym.c (prepare_for_building): Add assert.
5466
5467 2018-07-16 Tom Tromey <tom@tromey.com>
5468
5469 * buildsym.c (~buildsym_compunit): Update.
5470 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5471 (start_subfile, patch_subfile_names)
5472 (end_symtab_with_blockvector): Update.
5473
5474 2018-07-16 Tom Tromey <tom@tromey.com>
5475
5476 * buildsym.c (struct buildsym_compunit): Add constructor,
5477 destructor, initializers.
5478 (start_buildsym_compunit): Remove.
5479 (free_buildsym_compunit): Use "delete".
5480 (start_symtab, restart_symtab): Use "new".
5481
5482 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
5483
5484 * symfile.c (set_objfile_default_section_offset): Remove struct
5485 keyword.
5486
5487 2018-07-14 Stafford Horne <shorne@gmail.com>
5488
5489 * (Responsible Maintainers): Add myself as or1k maintainer.
5490
5491 2018-07-13 Tom Tromey <tom@tromey.com>
5492
5493 * symfile.c (set_objfile_default_section_offset): Use extra braces
5494 around initializer.
5495
5496 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5497
5498 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5499 non-branching basr.
5500
5501 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5502
5503 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5504 unittests/cli-utils-selftests.c
5505 * unittests/cli-utils-selftests.c: New file.
5506
5507 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5508
5509 * NEWS: Mention new commands. Mention change to 'thread apply'.
5510
5511 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5512
5513 * thread.c (thr_try_catch_cmd): New function.
5514 (thread_apply_all_command): Handle qcs flags.
5515 (thread_apply_command): Handle qcs flags.
5516 (taas_command): New function.
5517 (tfaas_command): New function.
5518 (_initialize_thread): Update to setup the new commands 'taas
5519 and 'tfaas'. Change doc string for 'thread apply'.
5520
5521 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5522
5523 * stack.c: (trailing_outermost_frame): New function, mostly
5524 extracted from backtrace_command_1.
5525 (leading_innermost_frame): New function.
5526 (backtrace_command_1): Update to call trailing_outermost_frame.
5527 (frame_apply_command_count): New function.
5528 (frame_apply_level_command): New function.
5529 (frame_apply_all_command): New function.
5530 (frame_apply_command): New function.
5531 (faas_command): New function.
5532 (frame_cmd_list): New variable.
5533 (_initialize_stack): Update to setup the new commands 'frame apply'
5534 and 'faas'.
5535
5536 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5537
5538 * cli-utils.c (number_or_range_parser::get_number): Only handle
5539 numbers or convenience var as numbers.
5540 (parse_flags): New function.
5541 (parse_flags_qcs): New function.
5542 (number_or_range_parser::finished): Ensure parsing end is detected
5543 before end of string.
5544 * cli-utils.h (parse_flags): New function.
5545 (parse_flags_qcs): New function.
5546 (number_or_range_parser): Remove m_finished bool.
5547 (number_or_range_parser::skip_range): Set m_in_range to false.
5548
5549 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
5550
5551 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5552 on Windows.
5553
5554 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5555 Jan Kratochvil <jan.kratochvil@redhat.com>
5556 Paul Fertser <fercerpav@gmail.com>
5557 Tsutomu Seki <sekiriki@gmail.com>
5558 Pedro Alves <palves@redhat.com>
5559
5560 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5561 'unittests/parse-connection-spec-selftests.c'.
5562 (COMMON_SFILES): Add 'common/netstuff.c'.
5563 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5564 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5565 * common/netstuff.c: New file.
5566 * common/netstuff.h: New file.
5567 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5568 (wait_for_connect): Update comment. New parameter
5569 'gdb::optional<int> sock' instead of 'struct serial *scb'.
5570 Use 'sock' directly instead of 'scb->fd'.
5571 (try_connect): New function, with code from 'net_open'.
5572 (net_open): Rewrite main loop to deal with multiple
5573 sockets/addresses. Handle IPv6-style hostnames; implement
5574 support for IPv6 connections.
5575 * unittests/parse-connection-spec-selftests.c: New file.
5576
5577 2018-07-11 Pedro Alves <palves@redhat.com>
5578
5579 PR gdb/23377
5580 * remote.c (remote_target::remote_detach_pid): Call
5581 set_current_process.
5582
5583 2018-07-11 Pedro Alves <palves@redhat.com>
5584
5585 * h8300-tdep.c (h8300_gdbarch_init): Remove
5586 set_gdbarch_ecoff_reg_to_regnum calls.
5587
5588 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5589
5590 PR c++/23373
5591 * c-typeprint.c (c_type_print_base_struct_union): Don't print
5592 offsets/sizes for static members of a class/struct.
5593
5594 2018-07-11 Alan Hayward <alan.hayward@arm.com>
5595
5596 * target-descriptions.c (tdesc_register_bitsize): Rename.
5597 * target-descriptions.h (tdesc_register_bitsize): Likewise.
5598 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5599 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5600
5601 2018-07-10 Tom Tromey <tom@tromey.com>
5602
5603 * breakpoint.c (moribund_locations): Now static and a
5604 std::vector.
5605 (breakpoint_init_inferior, moribund_breakpoint_here_p)
5606 (build_bpstat_chain, update_global_location_list)
5607 (breakpoint_retire_moribund): Update.
5608 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
5609 VEC.
5610
5611 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5612
5613 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5614 (riscv_register_reggroup_p): Use new function, remove unneeded
5615 parenthesis.
5616 (riscv_push_dummy_call): Extend assert to compare against xlen or
5617 flen based on register type.
5618
5619 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5620
5621 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5622
5623 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
5624
5625 * remote.c (show_hardware_watchpoint_limit): New function.
5626 (show_hardware_watchpoint_length_limit): New function.
5627 (show_hardware_breakpoint_limit): New function.
5628 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5629 where appropriate, update help text.
5630
5631 2018-07-09 Tom Tromey <tom@tromey.com>
5632
5633 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5634 (CLIBS): Don't mention NAT_CLIBS.
5635
5636 2018-07-09 Tom Tromey <tom@tromey.com>
5637
5638 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5639 (LIBGDB_OBS, clean mostlyclean): Update.
5640 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5641
5642 2018-07-09 Tom Tromey <tom@tromey.com>
5643
5644 * Makefile.in (%.c: %.y): Use ECHO_YACC.
5645 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
5646 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5647
5648 2018-07-09 Tom Tromey <tom@tromey.com>
5649
5650 * Makefile.in (ALLDEPFILES): Remove exec.c.
5651 (COMMON_OBS): Remove exec.o.
5652 (COMMON_SFILES): Add exec.c.
5653
5654 2018-07-09 Tom Tromey <tom@tromey.com>
5655
5656 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5657
5658 2018-07-09 Tom Tromey <tom@tromey.com>
5659
5660 * Makefile.in (clean mostlyclean): Remove stamp-version.
5661 (version.c): Depend on stamp-version.
5662 (stamp-version): New rule, from version.c rule.
5663
5664 2018-07-09 Tom Tromey <tom@tromey.com>
5665
5666 * Makefile.in (init.c): Depend on stamp-init.
5667 (stamp-init): New rule, from init.c rule.
5668 (clean mostlyclean): Remove stamp-init.
5669
5670 2018-07-09 Tom Tromey <tom@tromey.com>
5671
5672 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5673 SUBDIR_GCC_COMPILE_SRCS.
5674
5675 2018-07-09 Tom Tromey <tom@tromey.com>
5676
5677 * Makefile.in (init.c): Remove some unused sed rules.
5678
5679 2018-07-09 Tom Tromey <tom@tromey.com>
5680
5681 * Makefile.in (TSOBS): Remove.
5682 (INIT_FILES): Update.
5683 (LIBGDB_OBS): Update.
5684 (COMMON_SFILES): Add inflow.c.
5685 (SFILES): Remove inflow.c.
5686
5687 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5688
5689 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5690
5691 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
5692
5693 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5694 get_saveloc_name, is_signal_frame_name, step_name,
5695 init_remote_name, create_addr_space_name,
5696 destroy_addr_space_name, search_unwind_table_name,
5697 find_dyn_list_name): Constify.
5698
5699 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
5700
5701 * darwin-nat.c (darwin_pthread_kill): New function.
5702 (darwin_resume_thread): Use darwin_pthread_kill.
5703
5704 2018-07-05 Tom de Vries <tdevries@suse.de>
5705
5706 * macroexp.c (macro_buffer) <operator=>: New member function.
5707
5708 2018-07-04 Tom Tromey <tom@tromey.com>
5709
5710 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5711
5712 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
5713
5714 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5715 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5716 * maint.c: Likewise.
5717 * top.c: Likewise.
5718
5719 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5720
5721 * NEWS: Create a new section for the next release branch.
5722 Rename the section of the current branch, now that it has
5723 been cut.
5724
5725 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5726
5727 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5728 * version.in: Bump version to 8.2.50.DATE-git.
5729
5730 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5731 Pedro Alves <palves@redhat.com>
5732
5733 * linux-nat.c (linux_init_ptrace): Rename to ...
5734 (linux_init_ptrace_procfs): ... this. Call
5735 linux_proc_init_warnings.
5736 (linux_nat_target::post_attach)
5737 (linux_nat_target::post_startup_inferior): Adjust.
5738 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5739 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5740
5741 2018-07-04 Tom de Vries <tdevries@suse.de>
5742
5743 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5744 check ...
5745 (read_comp_unit_head): ... here.
5746
5747 2018-07-03 Tom Tromey <tom@tromey.com>
5748
5749 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5750 (stop_tracing, tstatus_command)
5751 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5752 (print_one_static_tracepoint_marker): Update.
5753 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5754 std::vector.
5755 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
5756 VEC.
5757 (all_tracepoints, static_tracepoints_here): Return std::vector.
5758
5759 2018-07-03 Tom Tromey <tom@tromey.com>
5760
5761 * common/ptid.c (ptid_equal): Remove.
5762 * common/ptid.h (ptid_equal): Don't declare.
5763 * ada-tasks.c: Update.
5764 * breakpoint.c: Update.
5765 * common/agent.c: Update.
5766 * corelow.c: Update.
5767 * darwin-nat-info.c: Update.
5768 * darwin-nat.c: Update.
5769 * dcache.c: Update.
5770 * dtrace-probe.c: Update.
5771 * dummy-frame.c: Update.
5772 * fbsd-nat.c: Update.
5773 * frame.c: Update.
5774 * gdbthread.h: Update.
5775 * gnu-nat.c: Update.
5776 * go32-nat.c: Update.
5777 * inf-loop.c: Update.
5778 * inf-ptrace.c: Update.
5779 * infcall.c: Update.
5780 * infcmd.c: Update.
5781 * inflow.c: Update.
5782 * infrun.c: Update.
5783 * linux-fork.c: Update.
5784 * linux-nat.c: Update.
5785 * linux-thread-db.c: Update.
5786 * mi/mi-cmd-var.c: Update.
5787 * mi/mi-interp.c: Update.
5788 * mi/mi-main.c: Update.
5789 * nto-procfs.c: Update.
5790 * ppc-linux-tdep.c: Update.
5791 * procfs.c: Update.
5792 * python/py-inferior.c: Update.
5793 * python/py-record-btrace.c: Update.
5794 * python/py-record.c: Update.
5795 * ravenscar-thread.c: Update.
5796 * regcache.c: Update.
5797 * remote-sim.c: Update.
5798 * remote.c: Update.
5799 * sol-thread.c: Update.
5800 * solib.c: Update.
5801 * target.c: Update.
5802 * tui/tui-stack.c: Update.
5803 * varobj.c: Update.
5804 * windows-nat.c: Update.
5805 * windows-tdep.c: Update.
5806
5807 2018-07-03 Tom Tromey <tom@tromey.com>
5808
5809 * common/ptid.c (ptid_match): Remove.
5810 * common/ptid.h (ptid_match): Don't declare.
5811 * fbsd-nat.c: Update.
5812 * infcmd.c: Update.
5813 * infrun.c: Update.
5814 * linux-nat.c: Update.
5815 * record-btrace.c: Update.
5816 * regcache.c: Update.
5817 * remote.c: Update.
5818
5819 2018-07-03 Tom Tromey <tom@tromey.com>
5820
5821 * common/ptid.c (ptid_tid_p): Remove.
5822 * common/ptid.h (ptid_tid_p): Don't declare.
5823 * sol-thread.c: Update.
5824
5825 2018-07-03 Tom Tromey <tom@tromey.com>
5826
5827 * common/ptid.c (ptid_lwp_p): Remove.
5828 * common/ptid.h (ptid_lwp_p): Don't declare.
5829 * fbsd-nat.c: Update.
5830 * linux-nat.c: Update.
5831 * nat/linux-procfs.c: Update.
5832 * nat/x86-linux-dregs.c: Update.
5833 * sol-thread.c: Update.
5834
5835 2018-07-03 Tom Tromey <tom@tromey.com>
5836
5837 * common/ptid.c (ptid_is_pid): Remove.
5838 * common/ptid.h (ptid_is_pid): Don't declare.
5839 * infrun.c: Update.
5840 * linux-nat.c: Update.
5841 * mi/mi-interp.c: Update.
5842 * remote.c: Update.
5843 * thread.c: Update.
5844
5845 2018-07-03 Tom Tromey <tom@tromey.com>
5846
5847 * common/ptid.c (ptid_get_tid): Remove.
5848 * common/ptid.h (ptid_get_tid): Don't declare.
5849 * ada-tasks.c: Update.
5850 * aix-thread.c: Update.
5851 * bsd-uthread.c: Update.
5852 * darwin-nat.c: Update.
5853 * fbsd-nat.c: Update.
5854 * i386-darwin-nat.c: Update.
5855 * infrun.c: Update.
5856 * linux-tdep.c: Update.
5857 * nto-procfs.c: Update.
5858 * ppc-ravenscar-thread.c: Update.
5859 * python/py-infthread.c: Update.
5860 * ravenscar-thread.c: Update.
5861 * sol-thread.c: Update.
5862 * sparc-ravenscar-thread.c: Update.
5863 * windows-nat.c: Update.
5864
5865 2018-07-03 Tom Tromey <tom@tromey.com>
5866
5867 * common/ptid.c (ptid_get_lwp): Remove.
5868 * common/ptid.h (ptid_get_lwp): Don't declare.
5869 * aarch64-linux-nat.c: Update.
5870 * ada-tasks.c: Update.
5871 * aix-thread.c: Update.
5872 * amd64-linux-nat.c: Update.
5873 * arm-linux-nat.c: Update.
5874 * corelow.c: Update.
5875 * fbsd-nat.c: Update.
5876 * fbsd-tdep.c: Update.
5877 * gnu-nat.c: Update.
5878 * i386-cygwin-tdep.c: Update.
5879 * i386-gnu-nat.c: Update.
5880 * i386-linux-nat.c: Update.
5881 * ia64-linux-nat.c: Update.
5882 * inf-ptrace.c: Update.
5883 * infrun.c: Update.
5884 * linux-fork.c: Update.
5885 * linux-nat.c: Update.
5886 * linux-tdep.c: Update.
5887 * linux-thread-db.c: Update.
5888 * mips-linux-nat.c: Update.
5889 * nat/aarch64-linux-hw-point.c: Update.
5890 * nat/aarch64-linux.c: Update.
5891 * nat/linux-btrace.c: Update.
5892 * nat/linux-osdata.c: Update.
5893 * nat/linux-procfs.c: Update.
5894 * nat/x86-linux-dregs.c: Update.
5895 * obsd-nat.c: Update.
5896 * ppc-fbsd-nat.c: Update.
5897 * ppc-linux-nat.c: Update.
5898 * procfs.c: Update.
5899 * python/py-infthread.c: Update.
5900 * ravenscar-thread.c: Update.
5901 * remote.c: Update.
5902 * s390-linux-nat.c: Update.
5903 * sol-thread.c: Update.
5904 * sol2-tdep.c: Update.
5905 * spu-linux-nat.c: Update.
5906 * x86-linux-nat.c: Update.
5907 * xtensa-linux-nat.c: Update.
5908
5909 2018-07-03 Tom Tromey <tom@tromey.com>
5910
5911 * common/ptid.c (ptid_get_pid): Remove.
5912 * common/ptid.h (ptid_get_pid): Don't declare.
5913 * aarch64-linux-nat.c: Update.
5914 * ada-lang.c: Update.
5915 * aix-thread.c: Update.
5916 * alpha-bsd-nat.c: Update.
5917 * amd64-fbsd-nat.c: Update.
5918 * amd64-linux-nat.c: Update.
5919 * arm-linux-nat.c: Update.
5920 * arm-nbsd-nat.c: Update.
5921 * auxv.c: Update.
5922 * break-catch-syscall.c: Update.
5923 * breakpoint.c: Update.
5924 * bsd-uthread.c: Update.
5925 * corelow.c: Update.
5926 * ctf.c: Update.
5927 * darwin-nat.c: Update.
5928 * fbsd-nat.c: Update.
5929 * fbsd-tdep.c: Update.
5930 * gcore.c: Update.
5931 * gnu-nat.c: Update.
5932 * hppa-nbsd-nat.c: Update.
5933 * hppa-obsd-nat.c: Update.
5934 * i386-fbsd-nat.c: Update.
5935 * ia64-linux-nat.c: Update.
5936 * inf-ptrace.c: Update.
5937 * infcmd.c: Update.
5938 * inferior.c: Update.
5939 * inferior.h: Update.
5940 * inflow.c: Update.
5941 * infrun.c: Update.
5942 * linux-fork.c: Update.
5943 * linux-nat.c: Update.
5944 * linux-tdep.c: Update.
5945 * linux-thread-db.c: Update.
5946 * m68k-bsd-nat.c: Update.
5947 * mi/mi-interp.c: Update.
5948 * mi/mi-main.c: Update.
5949 * mips-linux-nat.c: Update.
5950 * mips-nbsd-nat.c: Update.
5951 * mips64-obsd-nat.c: Update.
5952 * nat/aarch64-linux-hw-point.c: Update.
5953 * nat/aarch64-linux.c: Update.
5954 * nat/linux-btrace.c: Update.
5955 * nat/linux-osdata.c: Update.
5956 * nat/linux-procfs.c: Update.
5957 * nat/x86-linux-dregs.c: Update.
5958 * nto-procfs.c: Update.
5959 * obsd-nat.c: Update.
5960 * ppc-linux-nat.c: Update.
5961 * ppc-nbsd-nat.c: Update.
5962 * ppc-obsd-nat.c: Update.
5963 * proc-service.c: Update.
5964 * procfs.c: Update.
5965 * python/py-inferior.c: Update.
5966 * python/py-infthread.c: Update.
5967 * ravenscar-thread.c: Update.
5968 * record.c: Update.
5969 * remote-sim.c: Update.
5970 * remote.c: Update.
5971 * rs6000-nat.c: Update.
5972 * s390-linux-nat.c: Update.
5973 * sh-nbsd-nat.c: Update.
5974 * sol-thread.c: Update.
5975 * sparc-nat.c: Update.
5976 * sparc64-tdep.c: Update.
5977 * spu-linux-nat.c: Update.
5978 * spu-tdep.c: Update.
5979 * target-debug.h: Update.
5980 * target.c: Update.
5981 * thread.c: Update.
5982 * tid-parse.c: Update.
5983 * tracefile-tfile.c: Update.
5984 * vax-bsd-nat.c: Update.
5985 * windows-nat.c: Update.
5986 * x86-linux-nat.c: Update.
5987 * x86-nat.c: Update.
5988
5989 2018-07-03 Tom Tromey <tom@tromey.com>
5990
5991 * common/ptid.c (pid_to_ptid): Remove.
5992 * common/ptid.h (pid_to_ptid): Don't declare.
5993 * aix-thread.c: Update.
5994 * arm-linux-nat.c: Update.
5995 * common/ptid.c: Update.
5996 * common/ptid.h: Update.
5997 * corelow.c: Update.
5998 * ctf.c: Update.
5999 * darwin-nat.c: Update.
6000 * fbsd-nat.c: Update.
6001 * fork-child.c: Update.
6002 * gnu-nat.c: Update.
6003 * go32-nat.c: Update.
6004 * inf-ptrace.c: Update.
6005 * infcmd.c: Update.
6006 * inferior.c: Update.
6007 * infrun.c: Update.
6008 * linux-fork.c: Update.
6009 * linux-nat.c: Update.
6010 * nat/aarch64-linux-hw-point.c: Update.
6011 * nat/fork-inferior.c: Update.
6012 * nat/x86-linux-dregs.c: Update.
6013 * nto-procfs.c: Update.
6014 * obsd-nat.c: Update.
6015 * procfs.c: Update.
6016 * progspace.c: Update.
6017 * remote.c: Update.
6018 * rs6000-nat.c: Update.
6019 * s390-linux-nat.c: Update.
6020 * sol-thread.c: Update.
6021 * spu-linux-nat.c: Update.
6022 * target.c: Update.
6023 * top.c: Update.
6024 * tracefile-tfile.c: Update.
6025 * windows-nat.c: Update.
6026
6027 2018-07-03 Tom Tromey <tom@tromey.com>
6028
6029 * common/ptid.h (ptid_build): Don't declare.
6030 * common/ptid.c (ptid_build): Remove.
6031 * aix-thread.c: Update.
6032 * bsd-kvm.c: Update.
6033 * bsd-uthread.c: Update.
6034 * common/agent.c: Update.
6035 * common/ptid.c: Update.
6036 * common/ptid.h: Update.
6037 * corelow.c: Update.
6038 * darwin-nat.c: Update.
6039 * fbsd-nat.c: Update.
6040 * gnu-nat.c: Update.
6041 * linux-fork.c: Update.
6042 * linux-nat.c: Update.
6043 * linux-thread-db.c: Update.
6044 * nat/linux-osdata.c: Update.
6045 * nat/linux-procfs.c: Update.
6046 * nto-procfs.c: Update.
6047 * obsd-nat.c: Update.
6048 * proc-service.c: Update.
6049 * procfs.c: Update.
6050 * ravenscar-thread.c: Update.
6051 * remote-sim.c: Update.
6052 * remote.c: Update.
6053 * sol-thread.c: Update.
6054 * target.c: Update.
6055 * windows-nat.c: Update.
6056
6057 2018-07-03 Tom Tromey <tom@tromey.com>
6058
6059 * infrun.c (follow_exec): Use exit_inferior_silent.
6060 * inferior.c (exit_inferior_num_silent): Remove.
6061 * inferior.h (exit_inferior_num_silent): Don't declare.
6062
6063 2018-07-03 Tom Tromey <tom@tromey.com>
6064
6065 PR cli/23340:
6066 * darwin-nat.c (darwin_attach_pid): Reset inferior and
6067 inferior_ptid on error.
6068
6069 2018-07-02 Maciej W. Rozycki <macro@mips.com>
6070 Simon Marchi <simon.marchi@polymtl.ca>
6071
6072 PR tdep/8282
6073 * disasm.h (gdb_disassembler): Add
6074 `m_disassembler_options_holder'. member
6075 * disasm.c (get_all_disassembler_options): New function.
6076 (gdb_disassembler::gdb_disassembler): Use it.
6077 (gdb_buffered_insn_length_init_dis): Likewise.
6078 (gdb_buffered_insn_length): Adjust accordingly.
6079 (set_disassembler_options): Handle options with arguments.
6080 (show_disassembler_options_sfunc): Likewise. Add a leading new
6081 line if showing options with descriptions.
6082 (disassembler_options_completer): Adapt to using the
6083 `disasm_options_and_args_t' structure.
6084 * mips-tdep.c (mips_disassembler_options): New variable.
6085 (mips_disassembler_options_o32): Likewise.
6086 (mips_disassembler_options_n32): Likewise.
6087 (mips_disassembler_options_n64): Likewise.
6088 (gdb_print_insn_mips): Don't set `disassembler_options'.
6089 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6090 functions.
6091 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6092 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
6093 `gdbarch_disassembler_options_implicit' and
6094 `gdbarch_valid_disassembler_options'.
6095 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6096 `disasm_options_and_args_t' structure.
6097 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6098 method.
6099 (valid_disassembler_options): Switch from `disasm_options_t' to
6100 the `disasm_options_and_args_t' structure.
6101 * NEWS: Document `set disassembler-options' support for the MIPS
6102 target.
6103 * gdbarch.h: Regenerate.
6104 * gdbarch.c: Regenerate.
6105
6106 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
6107
6108 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6109
6110 2018-06-29 Joel Brobecker <brobecker@adacore.com>
6111
6112 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6113 parameter in call to amd64_target_description.
6114 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6115 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6116 (amd64fbsd_init_abi): Likewise.
6117 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6118 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6119 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6120 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6121
6122 2018-06-29 Pedro Alves <palves@redhat.com>
6123
6124 * gdb/amd64-tdep.h (amd64_create_target_description): Add
6125 "segments" parameter.
6126 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6127 (_initialize_amd64_tdep): Update call to
6128 amd64_create_target_description.
6129 (amd64_target_description): Add "segments" parameter. Adjust
6130 the implementation to use it.
6131 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6132 call to amd64_create_target_description.
6133 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6134 * gdb/arch/amd64.h (amd64_create_target_description): Add
6135 "segments" register.
6136 * gdb/arch/amd64.c (amd64_create_target_description): Add
6137 "segments" parameter. Call create_feature_i386_64bit_segments
6138 only if SEGMENTS is true.
6139 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6140 call to amd64_create_target_description.
6141
6142 2018-06-29 Pedro Alves <palves@redhat.com>
6143
6144 * thread.c (thread_target_id_str): New, factored out from ...
6145 (print_thread_info_1): ... here. Use it to compute the max
6146 "Target Id" column width.
6147
6148 2018-06-29 Pedro Alves <palves@redhat.com>
6149
6150 * remote.c (remote_target::extra_thread_info): Delete
6151 'display_buf' and 'n' locals. from the cache, regardless of
6152 packet mechanims is in use. Use cache for qThreadExtra and qP
6153 methods too.
6154
6155 2018-06-29 Pedro Alves <palves@redhat.com>
6156
6157 * blockframe.c (find_pc_sect_containing_function): New function.
6158 * breakpoint.c (print_breakpoint_location): Don't call
6159 find_pc_sect_function.
6160 * linespec.c (create_sals_line_offset): Record the location's
6161 symbol in the sal.
6162 * linespec.c (convert_address_location_to_sals): Fill in sal's
6163 symbol with find_pc_sect_containing_function.
6164 * symtab.c (find_function_start_sal): Rename to ...
6165 (find_function_start_sal_1): ... this.
6166 (find_function_start_sal): Reimplement as wrapper around
6167 find_function_start_sal_1, and use
6168 find_pc_sect_containing_function to fill in the sal's symbol.
6169 (find_function_start_sal(symbol*, bool)): Adjust.
6170 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6171 comments.
6172 (find_pc_sect_containing_function): Declare.
6173
6174 2018-06-29 Pedro Alves <palves@redhat.com>
6175
6176 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6177 true if the the location has no symbol.
6178
6179 2018-06-28 Tom Tromey <tom@tromey.com>
6180
6181 * NEWS: Mention --enable-codesign.
6182 * silent-rules.mk (ECHO_SIGN): New variable.
6183 * configure.ac: Add --enable-codesign.
6184 * configure: Rebuild.
6185 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6186 (gdb$(EXEEXT)): Optionally invoke codesign.
6187
6188 2018-06-28 Pedro Alves <palves@redhat.com>
6189
6190 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6191 comments.
6192 (switch_to_thread_no_regs): Adjust comment.
6193 * infcmd.c (stop_pc): Delete.
6194 (post_create_inferior, info_program_command): Replace references
6195 to stop_pc with references to thread_info->suspend.stop_pc.
6196 * inferior.h (stop_pc): Delete declaration.
6197 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6198 (handle_inferior_event_1, handle_signal_stop)
6199 (process_event_stop_test, keep_going_stepped_thread)
6200 (handle_step_into_function, handle_step_into_function_backward)
6201 (print_stop_location): Replace references to stop_pc with
6202 references to thread_info->suspend.stop_pc.
6203 (struct infcall_suspend_state) <stop_pc>: Delete field.
6204 (save_infcall_suspend_state, restore_infcall_suspend_state):
6205 Remove references to inf_stat->stop_pc.
6206 * linux-fork.c (fork_load_infrun_state): Likewise.
6207 * record-btrace.c (record_btrace_set_replay): Likewise.
6208 * record-full.c (record_full_goto_entry): Likewise.
6209 * remote.c (print_one_stopped_thread): Likewise.
6210 * target.c (target_resume): Extend comment.
6211 * thread.c (set_executing_thread): New.
6212 (set_executing): Use it.
6213 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6214 Remove references to stop_pc.
6215
6216 2018-06-28 Pedro Alves <palves@redhat.com>
6217
6218 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6219 Moving fetching stop_pc until after ecs->event_thread is refreshed.
6220
6221 2018-06-28 Tom Tromey <tom@tromey.com>
6222
6223 * coffread.c (coff_symfile_finish): Update.
6224 * xcoffread.c (xcoff_symfile_finish): Update.
6225 * elfread.c (elf_symfile_finish): Update.
6226 * symfile.h (dwarf2_free_objfile): Don't declare.
6227 * dwarf2read.c (_initialize_dwarf2_read): Use
6228 register_objfile_data_with_cleanup.
6229 (dwarf2_free_objfile): Now static. Change signature.
6230
6231 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6232
6233 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6234 option "-o" to add-symbol-file-load to add an offset to each
6235 section's load address.
6236 * symfile.c (set_objfile_default_section_offset): New function.
6237
6238 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6239
6240 * symfile.c (add_symbol_file_command): Make sure that sections
6241 with the same name are sorted in the same order.
6242
6243 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6244
6245 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6246 require the second argument. If omitted, load sections at the
6247 addresses specified in the file.
6248
6249 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6250
6251 * symfile.c (symbol_file_command, symbol_file_add_main_1)
6252 (_initialize_symfile): Add option "-o" to symbol-file to add an
6253 offset to each section of the symbol file.
6254
6255 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6256
6257 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6258
6259 2018-06-27 Tom Tromey <tom@tromey.com>
6260
6261 * stack.c (_initialize_stack): Update "func" help text.
6262
6263 2018-06-27 Tom Tromey <tom@tromey.com>
6264
6265 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6266 std::vector.
6267 (unwind_infopy_str, pyuw_create_unwind_info)
6268 (unwind_infopy_add_saved_register, pyuw_sniffer)
6269 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6270 Update.
6271 (struct saved_reg): Add constructor.
6272 <value>: Now a gdbpy_ref<>.
6273
6274 2018-06-27 Tom Tromey <tom@tromey.com>
6275
6276 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6277
6278 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6279
6280 * gdb-gdb.py.in: Format using autopep8.
6281
6282 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6283
6284 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6285 (type_lookup_function): Recognize CORE_ADDR values.
6286
6287 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6288
6289 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6290 print tag_name.
6291
6292 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6293
6294 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6295 <__lt__>: Add.
6296
6297 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6298
6299 * gdb-gdb.py: Move to...
6300 * gdb-gdb.py.in: ... here.
6301 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6302 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6303 dependencies.
6304 (distclean): Remove gdb-gdb.py when cleaning.
6305 (gdb-gdb.py, gdb-gdb.gdb): New rules.
6306 * configure: Re-generate.
6307
6308 2018-06-27 Pedro Alves <palves@redhat.com>
6309
6310 * proc-service.c (get_ps_regcache): New.
6311 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6312 (ps_lsetfpregs): Use it.
6313
6314 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
6315
6316 PR gdb/21695
6317 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6318 (dwarf_decode_lines_1): Adjust.
6319
6320 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6321
6322 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6323 override.
6324 <info_proc>: Likewise.
6325
6326 2018-06-26 Joel Brobecker <brobecker@adacore.com>
6327
6328 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6329 to windows_fetch_one_register, and only handle the case of
6330 fetching one register. Move the code that reloads the context
6331 and iterates over all registers if R is negative to...
6332 (windows_nat_target::fetch_registers): ... here.
6333 (do_windows_store_inferior_registers): Rename to
6334 windows_store_one_register, and only handle the case of storing
6335 one register. Move the code that handles the case where r is
6336 negative to...
6337 (windows_nat_target::store_registers) ... here.
6338
6339 2018-06-26 Tom Tromey <tom@tromey.com>
6340
6341 PR rust/22574:
6342 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6343 * rust-lang.c (rust_print_struct_def): Add podata parameter.
6344 Update.
6345 (rust_internal_print_type): Add podata parameter.
6346 (rust_print_type): Update.
6347
6348 2018-06-26 Tom Tromey <tom@tromey.com>
6349
6350 * typeprint.h (struct print_offset_data) <update, finish,
6351 maybe_print_hole>: New methods.
6352 <indentation>: New constant.
6353 * typeprint.c (print_offset_data::indentation): Define.
6354 (print_offset_data::maybe_print_hole, print_offset_data::update)
6355 (print_offset_data::finish): Move from c-typeprint.c and rename.
6356 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6357 (print_spaces_filtered_with_print_options): Update.
6358 (c_print_type_union_field_offset, maybe_print_hole)
6359 (c_print_type_struct_field_offset): Move to typeprint.c and
6360 rename.
6361 (c_type_print_base_struct_union): Update.
6362
6363 2018-06-25 Pedro Alves <palves@redhat.com>
6364
6365 * gdbthread.h (thread_info_ref, delete_thread)
6366 (delete_thread_silent, first_thread_of_inferior)
6367 (any_thread_of_inferior, switch_to_thread)
6368 (enable_thread_stack_temporaries)
6369 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6370 (get_last_thread_stack_temporary)
6371 (value_in_thread_stack_temporaries, can_access_registers_thread):
6372 Spell out "struct thread_info" instead of just "thread_info".
6373 * inferior.h (notice_new_inferior): Likewise.
6374
6375 2018-06-25 Pedro Alves <palves@redhat.com>
6376
6377 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6378 pass thread_info pointer to delete_thread.
6379 (windows_nat_target::detach): Pass inferior pointer to
6380 detach_inferior.
6381 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6382 delete_thread.
6383 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6384 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6385 and pass a thread_info pointer to delete_thread.
6386 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6387 pass thread_info pointer to delete_thread.
6388 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6389 delete_thread_silent call.
6390 * procfs.c (procfs_target::detach): Pass inferior pointer to
6391 detach_inferior.
6392 (procfs_target::wait): Pass thread_info pointer to delete_thread.
6393 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6394 delete_thread_silent call.
6395 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6396 pass thread_info pointer to delete_thread.
6397 (windows_nat_target::detach): Pass inferior pointer to
6398 delete_inferior.
6399
6400 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6401
6402 * regcache.c (readable_regcache::read_part): Fix asserts.
6403 (reg_buffer::raw_collect_part): New function.
6404 (regcache::write_part): Fix asserts.
6405 (reg_buffer::raw_supply_part): New function.
6406 (regcache::transfer_regset_register): New helper function.
6407 (regcache::transfer_regset): Call new functions.
6408 (regcache_supply_regset): Use gdb_byte*.
6409 (regcache::supply_regset): Likewise.
6410 (regcache_collect_regset): Likewise.
6411 (regcache::collect_regset): Likewise.
6412 * regcache.h (reg_buffer::raw_collect_part): New declaration.
6413 (reg_buffer::raw_supply_part): Likewise.
6414 (regcache::transfer_regset_register): Likewise.
6415 (regcache::transfer_regset): Use gdb_byte*.
6416
6417 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6418
6419 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6420
6421 2018-06-21 Pedro Alves <palves@redhat.com>
6422
6423 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6424 instead of a ptid_t. All callers adjusted.
6425 * ada-tasks.c (ada_get_task_number): Likewise. All callers
6426 adjusted.
6427 (print_ada_task_info, display_current_task_id, task_command_1):
6428 Adjust.
6429 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6430 inferior_thread.
6431 (breakpoint_kind): Adjust.
6432 (remove_breakpoints_pid): Rename to ...
6433 (remove_breakpoints_inf): ... this. Adjust to take an inferior
6434 pointer. All callers adjusted.
6435 (bpstat_clear_actions): Use inferior_thread.
6436 (get_bpstat_thread): New.
6437 (bpstat_do_actions): Use it.
6438 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6439 to take a thread_info pointer. All callers adjusted.
6440 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6441 (breakpoint_re_set_thread): Use inferior_thread.
6442 * breakpoint.h (struct inferior): Forward declare.
6443 (bpstat_stop_status): Update.
6444 (remove_breakpoints_pid): Delete.
6445 (remove_breakpoints_inf): New.
6446 * bsd-uthread.c (bsd_uthread_target::wait)
6447 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6448 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6449 (maint_btrace_packet_history_cmd)
6450 (maint_btrace_clear_packet_history_cmd): Adjust.
6451 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6452 inferior_thread.
6453 * cli/cli-interp.c: Include "inferior.h".
6454 * common/refcounted-object.h (struct
6455 refcounted_object_ref_policy): New.
6456 * compile/compile-object-load.c: Include gdbthread.h.
6457 (store_regs): Use inferior_thread.
6458 * corelow.c (core_target::close): Use current_inferior.
6459 (core_target_open): Adjust to use first_thread_of_inferior and use
6460 the current inferior.
6461 * ctf.c (ctf_target::close): Adjust to use current_inferior.
6462 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6463 <thread>: ... this new field. All references adjusted.
6464 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6465 Take a thread_info pointer instead of a ptid_t.
6466 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6467 (dummy_frame_discard, register_dummy_frame_dtor): Take a
6468 thread_info pointer instead of a ptid_t.
6469 * elfread.c: Include "inferior.h".
6470 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6471 Use inferior_thread.
6472 * eval.c (evaluate_subexp): Likewise.
6473 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6474 inferior_thread.
6475 * gdb_proc_service.h (struct thread_info): Forward declare.
6476 (struct ps_prochandle) <ptid>: Delete, replaced by ...
6477 <thread>: ... this new field. All references adjusted.
6478 * gdbarch.h, gdbarch.c: Regenerate.
6479 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6480 'thread' parameter. All implementations and callers adjusted.
6481 * gdbthread.h (thread_info) <set_running>: New method.
6482 (delete_thread, delete_thread_silent): Take a thread_info pointer
6483 instead of a ptid.
6484 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6485 (first_thread_of_process): Delete, replaced by ...
6486 (first_thread_of_inferior): ... this new function. All callers
6487 adjusted.
6488 (any_live_thread_of_process): Delete, replaced by ...
6489 (any_live_thread_of_inferior): ... this new function. All callers
6490 adjusted.
6491 (switch_to_thread, switch_to_no_thread): Declare.
6492 (is_executing): Delete.
6493 (enable_thread_stack_temporaries): Update comment.
6494 <enable_thread_stack_temporaries>: Take a thread_info pointer
6495 instead of a ptid_t. Incref the thread.
6496 <~enable_thread_stack_temporaries>: Decref the thread.
6497 <m_ptid>: Delete
6498 <m_thr>: New.
6499 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6500 (get_last_thread_stack_temporary)
6501 (value_in_thread_stack_temporaries, can_access_registers_thread):
6502 Take a thread_info pointer instead of a ptid_t. All callers
6503 adjusted.
6504 * infcall.c (get_call_return_value): Use inferior_thread.
6505 (run_inferior_call): Work with thread pointers instead of ptid_t.
6506 (call_function_by_hand_dummy): Work with thread pointers instead
6507 of ptid_t. Use thread_info_ref.
6508 * infcmd.c (proceed_thread_callback): Access thread's state
6509 directly.
6510 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6511 access thread's state directly.
6512 (continue_command): Use inferior_thread.
6513 (info_program_command): Use find_thread_ptid and access thread
6514 state directly.
6515 (proceed_after_attach_callback): Use thread state directly.
6516 (notice_new_inferior): Take a thread_info pointer instead of a
6517 ptid_t. All callers adjusted.
6518 (exit_inferior): Take an inferior pointer instead of a pid. All
6519 callers adjusted.
6520 (exit_inferior_silent): New.
6521 (detach_inferior): Delete.
6522 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6523 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6524 (detach_inferior_command, kill_inferior_command): Use
6525 find_inferior_id instead of valid_gdb_inferior_id and
6526 gdb_inferior_id_to_pid.
6527 (inferior_command): Use inferior and thread pointers.
6528 * inferior.h (struct thread_info): Forward declare.
6529 (notice_new_inferior): Take a thread_info pointer instead of a
6530 ptid_t. All callers adjusted.
6531 (detach_inferior): Delete declaration.
6532 (exit_inferior, exit_inferior_silent): Take an inferior pointer
6533 instead of a pid. All callers adjusted.
6534 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6535 (valid_gdb_inferior_id): Delete.
6536 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6537 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6538 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6539 ...
6540 <inf>: ... this new field.
6541 <step_ptid>: Delete, replaced by ...
6542 <step_thread>: ... this new field.
6543 (get_displaced_stepping_state): Take an inferior pointer instead
6544 of a pid. All callers adjusted.
6545 (displaced_step_in_progress_any_inferior): Adjust.
6546 (displaced_step_in_progress_thread): Take a thread pointer instead
6547 of a ptid_t. All callers adjusted.
6548 (displaced_step_in_progress, add_displaced_stepping_state): Take
6549 an inferior pointer instead of a pid. All callers adjusted.
6550 (get_displaced_step_closure_by_addr): Adjust.
6551 (remove_displaced_stepping_state): Take an inferior pointer
6552 instead of a pid. All callers adjusted.
6553 (displaced_step_prepare_throw, displaced_step_prepare)
6554 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6555 All callers adjusted.
6556 (start_step_over): Adjust.
6557 (infrun_thread_ptid_changed): Remove bit updating ptids in the
6558 displaced step queue.
6559 (do_target_resume): Adjust.
6560 (fetch_inferior_event): Use inferior_thread.
6561 (context_switch, get_inferior_stop_soon): Take an
6562 execution_control_state pointer instead of a ptid_t. All callers
6563 adjusted.
6564 (switch_to_thread_cleanup): Delete.
6565 (stop_all_threads): Use scoped_restore_current_thread.
6566 * inline-frame.c: Include "gdbthread.h".
6567 (inline_state) <inline_state>: Take a thread pointer instead of a
6568 ptid_t. All callers adjusted.
6569 <ptid>: Delete, replaced by ...
6570 <thread>: ... this new field.
6571 (find_inline_frame_state): Take a thread pointer instead of a
6572 ptid_t. All callers adjusted.
6573 (skip_inline_frames, step_into_inline_frame)
6574 (inline_skipped_frames, inline_skipped_symbol): Take a thread
6575 pointer instead of a ptid_t. All callers adjusted.
6576 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6577 (inline_skipped_frames, inline_skipped_symbol): Likewise.
6578 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6579 pointers directly.
6580 * linux-nat.c (get_detach_signal): Likewise.
6581 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6582 (thread_db_notice_clone): Adjust.
6583 (thread_db_find_new_threads_silently)
6584 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6585 a thread pointer instead of a ptid_t. All callers adjusted.
6586 * mi/mi-cmd-var.c: Include "inferior.h".
6587 (mi_cmd_var_update_iter): Update to use thread pointers.
6588 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6589 inferior directly.
6590 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6591 out to ...
6592 (mi_output_running): ... this new function.
6593 (mi_on_resume_1): Adjust to use it.
6594 (mi_user_selected_context_changed): Adjust to use inferior_thread.
6595 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6596 directly.
6597 (interrupt_thread_callback): : Adjust to use thread and inferior
6598 pointers.
6599 * proc-service.c: Include "gdbthread.h".
6600 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6601 * progspace-and-thread.c: Include "inferior.h".
6602 * progspace.c: Include "inferior.h".
6603 * python/py-exitedevent.c (create_exited_event_object): Adjust to
6604 hold a reference to an inferior_object.
6605 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6606 inferior_thread.
6607 * python/py-inferior.c (struct inferior_object): Give the type a
6608 tag name instead of a typedef.
6609 (python_on_normal_stop): No need to check if the current thread is
6610 listed.
6611 (inferior_to_inferior_object): Change return type to
6612 inferior_object. All callers adjusted.
6613 (find_thread_object): Delete, bits factored out to ...
6614 (thread_to_thread_object): ... this new function.
6615 * python/py-infthread.c (create_thread_object): Use
6616 inferior_to_inferior_object.
6617 (thpy_is_stopped): Use thread pointer directly.
6618 (gdbpy_selected_thread): Use inferior_thread.
6619 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6620 field, replaced with ...
6621 <thread>: ... this new field. All users adjusted.
6622 (btpy_insn_or_gap_new): Drop const.
6623 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
6624 callers adjusted.
6625 * python/py-record.c: Include "gdbthread.h".
6626 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6627 a ptid_t. All callers adjusted.
6628 (gdbpy_current_recording): Use inferior_thread.
6629 * python/py-record.h (recpy_record_object) <ptid>: Delete
6630 field, replaced with ...
6631 <thread>: ... this new field. All users adjusted.
6632 (recpy_element_object) <ptid>: Delete
6633 field, replaced with ...
6634 <thread>: ... this new field. All users adjusted.
6635 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6636 a ptid_t. All callers adjusted.
6637 * python/py-threadevent.c: Include "gdbthread.h".
6638 (get_event_thread): Use thread_to_thread_object.
6639 * python/python-internal.h (struct inferior_object): Forward
6640 declare.
6641 (find_thread_object, find_inferior_object): Delete declarations.
6642 (thread_to_thread_object, inferior_to_inferior_object): New
6643 declarations.
6644 * record-btrace.c: Include "inferior.h".
6645 (require_btrace_thread): Use inferior_thread.
6646 (record_btrace_frame_sniffer)
6647 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6648 (get_thread_current_frame): Use scoped_restore_current_thread and
6649 switch_to_thread.
6650 (get_thread_current_frame): Use thread pointer directly.
6651 (record_btrace_replay_at_breakpoint): Use thread's inferior
6652 pointer directly.
6653 * record-full.c: Include "inferior.h".
6654 * regcache.c: Include "gdbthread.h".
6655 (get_thread_arch_regcache): Use the inferior's address space
6656 directly.
6657 (get_thread_regcache, registers_changed_thread): New.
6658 * regcache.h (get_thread_regcache(thread_info *thread)): New
6659 overload.
6660 (registers_changed_thread): New.
6661 (remote_target) <remote_detach_1>: Swap order of parameters.
6662 (remote_add_thread): <remote_add_thread>: Return the new thread.
6663 (get_remote_thread_info(ptid_t)): New overload.
6664 (remote_target::remote_notice_new_inferior): Use thread pointers
6665 directly.
6666 (remote_target::process_initial_stop_replies): Use
6667 thread_info::set_running.
6668 (remote_target::remote_detach_1, remote_target::detach)
6669 (extended_remote_target::detach): Adjust.
6670 * stack.c (frame_show_address): Use inferior_thread.
6671 * target-debug.h (target_debug_print_thread_info_pp): New.
6672 * target-delegates.c: Regenerate.
6673 * target.c (default_thread_address_space): Delete.
6674 (memory_xfer_partial_1): Use current_inferior.
6675 (target_detach): Use current_inferior.
6676 (target_thread_address_space): Delete.
6677 (generic_mourn_inferior): Use current_inferior.
6678 * target.h (struct target_ops) <thread_address_space>: Delete.
6679 (target_thread_address_space): Delete.
6680 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
6681 pointers directly.
6682 (delete_thread_1, delete_thread, delete_thread_silent): Take a
6683 thread pointer instead of a ptid_t. Adjust all callers.
6684 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6685 (first_thread_of_process): Delete, replaced by ...
6686 (first_thread_of_inferior): ... this new function. All callers
6687 adjusted.
6688 (any_thread_of_process): Rename to ...
6689 (any_thread_of_inferior): ... this, and take an inferior pointer.
6690 (any_live_thread_of_process): Rename to ...
6691 (any_live_thread_of_inferior): ... this, and take an inferior
6692 pointer.
6693 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6694 (value_in_thread_stack_temporaries)
6695 (get_last_thread_stack_temporary): Take a thread pointer instead
6696 of a ptid_t. Adjust all callers.
6697 (thread_info::set_running): New.
6698 (validate_registers_access): Use inferior_thread.
6699 (can_access_registers_ptid): Rename to ...
6700 (can_access_registers_thread): ... this, and take a thread
6701 pointer.
6702 (print_thread_info_1): Adjust to compare thread pointers instead
6703 of ptids.
6704 (switch_to_no_thread, switch_to_thread): Make extern.
6705 (scoped_restore_current_thread::~scoped_restore_current_thread):
6706 Use m_thread pointer directly.
6707 (scoped_restore_current_thread::scoped_restore_current_thread):
6708 Use inferior_thread.
6709 (thread_command): Use thread pointer directly.
6710 (thread_num_make_value_helper): Use inferior_thread.
6711 * top.c (execute_command): Use inferior_thread.
6712 * tui/tui-interp.c: Include "inferior.h".
6713 * varobj.c (varobj_create): Use inferior_thread.
6714 (value_of_root_1): Use find_thread_global_id instead of
6715 global_thread_id_to_ptid.
6716
6717 2018-06-21 Alan Hayward <alan.hayward@arm.com>
6718
6719 * regcache.c (readable_regcache::read_part): Avoid memcpy when
6720 possible.
6721 (regcache::write_part): Likewise.
6722 (readable_regcache::cooked_read_part): Update comment.
6723 (readable_regcache::cooked_write_part): Likewise.
6724 * regcache.h: (readable_regcache::read_part): Likewise.
6725 (regcache::write_part): Likewise.
6726
6727 2018-06-21 Richard Bunt <richard.bunt@arm.com>
6728 Dirk Schubert <dirk.schubert@arm.com>
6729
6730 * aarch64-linux-nat.c (post_attach): New.
6731 (aarch64_linux_nat_target::post_attach): Override post_attach to
6732 record the number of hardware debug registers.
6733
6734 2018-06-20 Tom Tromey <tom@tromey.com>
6735
6736 * python/py-param.c (add_setshow_generic): Make parameters const.
6737 (parmpy_init): Update.
6738
6739 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6740
6741 * regcache.h (regcache_cooked_read_ftype): Rename to...
6742 (register_read_ftype): ...this, change type to function_view.
6743 (class reg_buffer) <save>: Remove src parameter.
6744 (readonly_detached_regcache) <readonly_detached_regcache>: Make
6745 parameter non-const in first overload. Remove src parameter in
6746 second overload.
6747 * regcache.c (do_cooked_read): Remove.
6748 (readonly_detached_regcache::readonly_detached_regcache): Make
6749 parameter non-const, adjust call to other constructor.
6750 (reg_buffer::save): Remove src parameter.
6751 * frame.c (do_frame_register_read): Remove.
6752 (frame_save_as_regcache): Use lambda function.
6753 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6754 parameter to ppu2spu_data *.
6755 (ppu2spu_sniffer): Use lambda function.
6756
6757 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6758
6759 * record-full.c (record_full_target::insert_breakpoint): Remove
6760 "struct" keyword, add const.
6761
6762 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6763
6764 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6765 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6766 * configure.ac: Remove AC_PREREQ, add missing quoting.
6767 * gnulib/configure.ac: Modernize usage of
6768 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
6769 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6770 (AUTOMAKE_VERSION): Bump to 1.15.1.
6771 * configure: Re-generate.
6772 * config.in: Re-generate.
6773 * aclocal.m4: Re-generate.
6774 * gnulib/aclocal.m4: Re-generate.
6775 * gnulib/config.in: Re-generate.
6776 * gnulib/configure: Re-generate.
6777 * gnulib/import/Makefile.in: Re-generate.
6778
6779 2018-06-19 Pedro Alves <palves@redhat.com>
6780
6781 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6782 (lookup_minimal_symbol_by_pc_section): ... here with
6783 gdb_assert_not_reached added.
6784
6785 2018-06-19 Pedro Alves <palves@redhat.com>
6786
6787 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6788 parameter with a block parameter. Compare location's block symbol
6789 with the frame's block instead of addresses.
6790 (skip_inline_frames): Pass the current block instead of the
6791 frame's address. Break out as soon as we determine the frame
6792 should not be skipped.
6793
6794 2018-06-18 Tom Tromey <tom@tromey.com>
6795
6796 * solib-aix.c (solib_aix_get_section_offsets): Return
6797 unique_xmalloc_ptr.
6798 (solib_aix_solib_create_inferior_hook): Update.
6799
6800 2018-06-18 Tom Tromey <tom@tromey.com>
6801
6802 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6803
6804 2018-06-18 Tom Tromey <tom@tromey.com>
6805
6806 * solib-frv.c (frv_relocate_main_executable): Use
6807 unique_xmalloc_ptr.
6808 * solib-dsbt.c (dsbt_relocate_main_executable): Use
6809 unique_xmalloc_ptr.
6810
6811 2018-06-18 Tom Tromey <tom@tromey.com>
6812
6813 * objfiles.h (inhibit_section_map_updates): Update.
6814 (resume_section_map_updates, resume_section_map_updates_cleanup):
6815 Remove.
6816 * solib-svr4.c (svr4_handle_solib_event): Update.
6817 * objfiles.c (inhibit_section_map_updates): Return
6818 scoped_restore_tmpl<int>.
6819 (resume_section_map_updates, resume_section_map_updates_cleanup):
6820 Remove.
6821
6822 2018-06-18 Tom Tromey <tom@tromey.com>
6823
6824 * valprint.h (read_string): Update.
6825 * valprint.c (read_string): Change type of "buffer".
6826 (val_print_string): Update.
6827 * python/py-value.c (valpy_string): Update.
6828 * language.h (struct language_defn) <la_get_string>: Change
6829 type of "buffer".
6830 (default_get_string, c_get_string): Update.
6831 * language.c (default_get_string): Change type of "buffer".
6832 * guile/scm-value.c (gdbscm_value_to_string): Update.
6833 * c-lang.c (c_get_string): Change type of "buffer".
6834
6835 2018-06-18 Tom Tromey <tom@tromey.com>
6836
6837 * ser-mingw.c (struct pipe_state_destroyer): New.
6838 (pipe_state_up): New typedef.
6839 (cleanup_pipe_state): Remove.
6840 (pipe_windows_open): Use pipe_state_up. Don't release argv.
6841
6842 2018-06-18 Tom Tromey <tom@tromey.com>
6843
6844 * rust-lang.h (rust_yyerror): Don't declare.
6845 * rust-lang.c (rust_language_defn): Update.
6846 * rust-exp.y (yyerror): Now static.
6847 * parse.c (parse_exp_in_context_1): Update.
6848 * p-lang.h (p_yyerror): Don't declare.
6849 * p-lang.c (p_language_defn): Update.
6850 * p-exp.y (yyerror): Now static.
6851 * opencl-lang.c (opencl_language_defn): Update.
6852 * objc-lang.c (objc_language_defn): Update.
6853 * m2-lang.h (m2_yyerror): Don't declare.
6854 * m2-lang.c (m2_language_defn): Update.
6855 * m2-exp.y (yyerror): Now static.
6856 * language.h (struct language_defn) <la_error>: Remove.
6857 * language.c (unk_lang_error): Remove.
6858 (unknown_language_defn, auto_language_defn): Remove.
6859 * go-lang.h (go_yyerror): Don't declare.
6860 * go-lang.c (go_language_defn): Update.
6861 * go-exp.y (yyerror): Now static.
6862 * f-lang.h (f_yyerror): Don't declare.
6863 * f-lang.c (f_language_defn): Update.
6864 * f-exp.y (yyerror): Now static.
6865 * d-lang.h (d_yyerror): Don't declare.
6866 * d-lang.c (d_language_defn): Update.
6867 * d-exp.y (yyerror): Now static.
6868 * c-lang.h (c_yyerror): Don't declare.
6869 * c-lang.c (c_language_defn, cplus_language_defn)
6870 (asm_language_defn, minimal_language_defn): Update.
6871 * c-exp.y (yyerror): Now static.
6872 * ada-lang.h (ada_yyerror): Don't declare.
6873 * ada-lang.c (ada_language_defn): Update.
6874 * ada-exp.y (yyerror): Now static.
6875
6876 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6877
6878 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6879 (store_sveregs_to_thread): Likewise.
6880 (aarch64_linux_fetch_inferior_registers): Check for SVE.
6881 (aarch64_linux_store_inferior_registers): Likewise.
6882 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6883 function.
6884 (aarch64_sve_regs_copy_to_regcache): Likewise.
6885 (aarch64_sve_regs_copy_from_regcache): Likewise.
6886 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6887 declaration.
6888 (aarch64_sve_regs_copy_to_regcache): Likewise.
6889 (aarch64_sve_regs_copy_from_regcache): Likewise.
6890 (sve_context): Structure from Linux headers.
6891 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6892 (SVE_SIG_ZREG_SIZE): Likewise.
6893 (SVE_SIG_PREG_SIZE): Likewise.
6894 (SVE_SIG_FFR_SIZE): Likewise.
6895 (SVE_SIG_REGS_OFFSET): Likewise.
6896 (SVE_SIG_ZREGS_OFFSET): Likewise.
6897 (SVE_SIG_ZREG_OFFSET): Likewise.
6898 (SVE_SIG_ZREGS_SIZE): Likewise.
6899 (SVE_SIG_PREGS_OFFSET): Likewise.
6900 (SVE_SIG_PREG_OFFSET): Likewise.
6901 (SVE_SIG_PREGS_SIZE): Likewise.
6902 (SVE_SIG_FFR_OFFSET): Likewise.
6903 (SVE_SIG_REGS_SIZE): Likewise.
6904 (SVE_SIG_CONTEXT_SIZE): Likewise.
6905 (SVE_PT_REGS_MASK): Likewise.
6906 (SVE_PT_REGS_FPSIMD): Likewise.
6907 (SVE_PT_REGS_SVE): Likewise.
6908 (SVE_PT_VL_INHERIT): Likewise.
6909 (SVE_PT_VL_ONEXEC): Likewise.
6910 (SVE_PT_REGS_OFFSET): Likewise.
6911 (SVE_PT_FPSIMD_OFFSET): Likewise.
6912 (SVE_PT_FPSIMD_SIZE): Likewise.
6913 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6914 (SVE_PT_SVE_PREG_SIZE): Likewise.
6915 (SVE_PT_SVE_FFR_SIZE): Likewise.
6916 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6917 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6918 (__SVE_SIG_TO_PT): Likewise.
6919 (SVE_PT_SVE_OFFSET): Likewise.
6920 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6921 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6922 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6923 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6924 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6925 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6926 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6927 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6928 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6929 (SVE_PT_SVE_SIZE): Likewise.
6930 (SVE_PT_SIZE): Likewise.
6931 (HAS_SVE_STATE): New define.
6932
6933 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6934
6935 * nat/aarch64-sve-linux-sigcontext.h: New file.
6936 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6937 new files.
6938 (SVE_VQ_MIN): Likewise.
6939 (SVE_VQ_MAX): Likewise.
6940 (SVE_VL_MIN): Likewise.
6941 (SVE_VL_MAX): Likewise.
6942 (SVE_NUM_ZREGS): Likewise.
6943 (SVE_NUM_PREGS): Likewise.
6944 (sve_vl_valid): Likewise.
6945 (struct user_sve_header): Likewise.
6946
6947 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6948 Richard Bunt <Richard.Bunt@arm.com>
6949
6950 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6951 was requested by GDB.
6952
6953 2018-06-15 Tom de Vries <tdevries@suse.de>
6954
6955 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6956
6957 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6958
6959 * gnulib/update-gnulib.sh: Print expected versions of
6960 autoconf/aclocal.
6961
6962 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6963
6964 * arch-utils.c (default_type_align): Use type_length_units.
6965 * gdbtypes.c (type_align): Use type_length_units.
6966
6967 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6968
6969 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6970 of 'define' command.
6971
6972 2018-06-14 Tom de Vries <tdevries@suse.de>
6973
6974 PR cli/22573
6975 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6976 get_no_prettyformat_print_options.
6977
6978 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
6979
6980 * sparc-nat.h: Include target.h.
6981 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6982 <fetch_registers>: Remove this argument in function call.
6983 <store_registers>: Remove this argument in function call, remove
6984 extra semicolon.
6985 <low_forget_process>: Call sparc64_forget_process instead of
6986 sparc_forget_process.
6987
6988 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6989
6990 * procfs.c (_initialize_procfs): Use add_inf_child_target.
6991 (procfs_target::make_corefile_notes): Adjust to new
6992 target_read_alloc return type.
6993
6994 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
6995 Stephen Roberts <stephen.roberts@arm.com>
6996
6997 PR gdb/22882
6998 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6999 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7000 Move should_notify_stop local into more inner scope.
7001
7002 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7003 Stephen Roberts <stephen.roberts@arm.com>
7004
7005 PR gdb/22882
7006 * infrun.c (resume_1): Add call to mark_async_event_handler.
7007
7008 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7009
7010 * infrun.c (do_target_wait): Change old version of $pc printed.
7011
7012 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
7013
7014 * dwarf2read.c (read_index_from_section): Rename to...
7015 (read_gdb_index_from_section): ... this, update all callers.
7016 (dwarf2_read_index): Rename to...
7017 (dwarf2_read_gdb_index): ... this, update all callers.
7018
7019 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
7020
7021 * gdb/hppa-linux-nat.c
7022 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7023 hppa_linux_nat_target::fetch_registers.
7024
7025 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7026
7027 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7028 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7029 (AARCH64_DWARF_SVE_FFR): Likewise.
7030 (AARCH64_DWARF_SVE_P0): Likewise.
7031 (AARCH64_DWARF_SVE_Z0): Likewise.
7032
7033 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7034
7035 * common/common-regcache.h (raw_compare): New function.
7036 * regcache.c (regcache::raw_compare): Likewise.
7037 * regcache.h (regcache::raw_compare): New declaration.
7038
7039 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7040
7041 * common/common-regcache.h (reg_buffer_common): New structure.
7042 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7043 (reg_buffer::raw_supply): Likewise.
7044 (reg_buffer::raw_supply_integer): Likewise.
7045 (reg_buffer::raw_supply_zeroed): Likewise.
7046 (reg_buffer::raw_collect): Likewise.
7047 (reg_buffer::raw_collect_integer): Likewise.
7048 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7049 (reg_buffer::raw_supply): Likewise.
7050 (reg_buffer::raw_supply_integer): Likewise.
7051 (reg_buffer::raw_supply_zeroed): Likewise.
7052 (reg_buffer::raw_collect): Likewise.
7053 (reg_buffer::raw_collect_integer): Likewise.
7054
7055 2018-06-10 Tom Tromey <tom@tromey.com>
7056
7057 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
7058 (class remote_state) <stop_reply_queue>: Now std::vector.
7059 (remote_state::~remote_state)
7060 (remote_target::stop_reply_queue_length): Update.
7061 (struct queue_iter_param, remove_child_of_pending_fork)
7062 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7063 (check_pending_event_prevents_wildcard_vcont_callback)
7064 (remove_stop_reply_for_inferior)
7065 (remove_stop_reply_of_remote_state)
7066 (remote_notif_remove_once_on_match)
7067 (stop_reply_match_ptid_and_ws)
7068 (remote_kill_child_of_pending_fork): Remove.
7069 (remote_target::remove_new_fork_children)
7070 (remote_target::check_pending_events_prevent_wildcard_vcont)
7071 (remote_target::discard_pending_stop_replies)
7072 (remote_target::discard_pending_stop_replies_in_queue)
7073 (remote_target::remote_notif_remove_queued_reply)
7074 (remote_target::queued_stop_reply)
7075 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7076 (remote_target::wait, remote_target::kill_new_fork_children)
7077 (remote_target::async): Update.
7078
7079 2018-06-10 Tom Tromey <tom@tromey.com>
7080
7081 * record-full.c (record_full_arch_list_cleanups): Remove.
7082 (record_full_message): Use try/catch.
7083 (record_full_wait_cleanups): Remove.
7084 (record_full_wait_1): Use try/catch.
7085 (record_full_restore): Likewise.
7086
7087 2018-06-10 Tom Tromey <tom@tromey.com>
7088
7089 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
7090 declare VEC. Add constructor.
7091 <in_target_beneath>: Now bool.
7092 (record_full_breakpoints): Now a std::vector, static.
7093 (record_full_sync_record_breakpoints)
7094 (record_full_init_record_breakpoints)
7095 (record_full_target::insert_breakpoint)
7096 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
7097
7098 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7099
7100 * dwarf2read.c (process_cu_includes): Remove struct keyword.
7101 * serial.c (serial_interface_lookup): Remove struct keyword.
7102
7103 2018-06-10 Tom Tromey <tom@tromey.com>
7104
7105 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7106 method.
7107 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7108 a method.
7109 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7110 method.
7111 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7112 "beneath" as a method.
7113 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7114 Use "beneath" as a method.
7115
7116 2018-06-10 Tom Tromey <tom@tromey.com>
7117
7118 * tracefile.c (struct trace_file_writer_deleter): New.
7119 <operator()>: Rename from trace_file_writer_xfree.
7120 (trace_file_writer_up): New typedef.
7121 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7122
7123 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
7124
7125 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7126 <m_registers, m_register_status>: Change type to
7127 std::unique_ptr.
7128 * regcache.c (reg_buffer::reg_buffer): Use new instead of
7129 XCNEWVEC.
7130
7131 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
7132
7133 * common/common-regcache.h (enum register_status): Add
7134 underlying type "signed char".
7135 * regcache.h (reg_buffer) <m_register_status>: Change type to
7136 register_status *.
7137 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7138 register_status instead of signed char.
7139 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7140 (reg_buffer::get_register_status): Remove cast.
7141 (readable_regcache::raw_read): Remove cast.
7142 (readable_regcache::cooked_read): Remove cast.
7143
7144 2018-06-09 Tom Tromey <tom@tromey.com>
7145
7146 * source.c (reverse_search_command, forward_search_command): Use
7147 scoped_fd.
7148
7149 2018-06-09 Tom Tromey <tom@tromey.com>
7150
7151 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
7152 (serial_ops_list): Now static, std::vector.
7153 (serial_interface_lookup, serial_add_interface): Update.
7154
7155 2018-06-09 Tom Tromey <tom@tromey.com>
7156
7157 * dwarf2read.c (process_cu_includes): Update.
7158 (process_full_comp_unit): Update.
7159 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7160 std::vector.
7161
7162 2018-06-08 Paul Koning <paul_koning@dell.com>
7163
7164 PR gdb/23252
7165
7166 * python/python.c (do_start_initialization):
7167 Avoid call to internal Python API.
7168 (init__gdb_module): New function.
7169
7170 2018-06-08 Gary Benson <gbenson@redhat.com>
7171
7172 * linux-thread-db.c (valprint.h): New include.
7173 (struct check_thread_db_info): New structure.
7174 (check_thread_db_on_load, tdb_testinfo): New static globals.
7175 (check_thread_db, check_thread_db_callback): New functions.
7176 (try_thread_db_load_1): Run integrity checks if requested.
7177 (maintenance_check_libthread_db): New function.
7178 (_initialize_thread_db): Register "maint check libthread-db"
7179 and "maint set/show check-libthread-db".
7180 * NEWS: Mention the above new commands.
7181
7182 2018-06-08 Tom Tromey <tom@tromey.com>
7183
7184 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7185 now a method.
7186
7187 2018-06-08 Tom Tromey <tom@tromey.com>
7188
7189 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7190
7191 2018-06-08 Tom Tromey <tom@tromey.com>
7192
7193 * common/btrace-common.h (struct btrace_data): Add constructor,
7194 destructor, move assignment operator.
7195 <empty, clear, fini>: New methods.
7196 <format>: Initialize.
7197 (btrace_data_init, btrace_data_fini, btrace_data_clear)
7198 (btrace_data_empty): Don't declare.
7199 * common/btrace-common.c (btrace_data_init): Remove.
7200 (btrace_data::fini): Rename from btrace_data_fini.
7201 (btrace_data::empty): Rename from btrace_data_empty.
7202 (btrace_data::clear): Rename from btrace_data_clear. Return
7203 bool.
7204 * btrace.h (make_cleanup_btrace_data): Don't declare.
7205 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7206 (parse_xml_btrace): Update.
7207 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7208 (maint_btrace_clear_packet_history_cmd): Update.
7209
7210 2018-06-07 Pedro Alves <palves@redhat.com>
7211
7212 * target.h (target_ops) <beneath>: Now a method. All references
7213 updated.
7214 (class target_stack): New.
7215 * target.c (g_target_stack): New.
7216 (g_current_top_target): Delete.
7217 (current_top_target): Get the top target out of g_target_stack.
7218 (target_stack::push, target_stack::unpush): New.
7219 (push_target, unpush_target): Reimplement.
7220 (target_is_pushed): Reimplement in terms of g_target_stack.
7221 (target_ops::beneath, target_stack::find_beneath): New.
7222
7223 2018-06-07 Pedro Alves <palves@redhat.com>
7224
7225 * target.h (find_target_beneath): Delete declaration.
7226 * target.c (find_target_beneath): Delete definition.
7227 * aix-thread.c: All callers of find_target_beneath adjusted to
7228 call target_ops::beneath instead.
7229 * bsd-uthread.c: Likewise.
7230 * linux-thread-db.c: Likewise.
7231 * ravenscar-thread.c: Likewise.
7232 * sol-thread.c: Likewise.
7233 * spu-multiarch.c: Likewise.
7234
7235 2018-06-07 Pedro Alves <palves@redhat.com>
7236
7237 * target.h (target_ops) <beneath>: Now a method. All references
7238 updated.
7239 (target_ops) <m_beneath>: New.
7240 * target.c (target_ops::beneath): New.
7241 * corelow.c: Adjust all references to target_ops::beneath.
7242 * linux-thread-db.c: Likewise.
7243 * make-target-delegates: Likewise.
7244 * record-btrace.c: Likewise.
7245 * record-full.c: Likewise.
7246 * remote.c: Likewise.
7247 * target.c: Likewise.
7248 * target-delegates.c: Regenerate.
7249
7250 2018-06-07 Pedro Alves <palves@redhat.com>
7251
7252 * target.h (target_stack): Delete.
7253 (current_top_target): Declare function.
7254 * target.c (target_stack): Delete.
7255 (g_current_top_target): New.
7256 (current_top_target): New function.
7257 * auxv.c: Use current_top_target instead of target_stack
7258 throughout.
7259 * avr-tdep.c: Likewise.
7260 * breakpoint.c: Likewise.
7261 * corefile.c: Likewise.
7262 * elfread.c: Likewise.
7263 * eval.c: Likewise.
7264 * exceptions.c: Likewise.
7265 * frame.c: Likewise.
7266 * gdbarch-selftests.c: Likewise.
7267 * gnu-v3-abi.c: Likewise.
7268 * ia64-tdep.c: Likewise.
7269 * ia64-vms-tdep.c: Likewise.
7270 * infcall.c: Likewise.
7271 * infcmd.c: Likewise.
7272 * infrun.c: Likewise.
7273 * linespec.c: Likewise.
7274 * linux-tdep.c: Likewise.
7275 * minsyms.c: Likewise.
7276 * ppc-linux-nat.c: Likewise.
7277 * ppc-linux-tdep.c: Likewise.
7278 * procfs.c: Likewise.
7279 * regcache.c: Likewise.
7280 * remote.c: Likewise.
7281 * rs6000-tdep.c: Likewise.
7282 * s390-linux-nat.c: Likewise.
7283 * s390-tdep.c: Likewise.
7284 * solib-aix.c: Likewise.
7285 * solib-darwin.c: Likewise.
7286 * solib-dsbt.c: Likewise.
7287 * solib-spu.c: Likewise.
7288 * solib-svr4.c: Likewise.
7289 * solib-target.c: Likewise.
7290 * sparc-tdep.c: Likewise.
7291 * sparc64-tdep.c: Likewise.
7292 * spu-tdep.c: Likewise.
7293 * symfile.c: Likewise.
7294 * symtab.c: Likewise.
7295 * target-descriptions.c: Likewise.
7296 * target-memory.c: Likewise.
7297 * target.c: Likewise.
7298 * target.h: Likewise.
7299 * tracefile-tfile.c: Likewise.
7300 * tracepoint.c: Likewise.
7301 * valops.c: Likewise.
7302 * valprint.c: Likewise.
7303 * value.c: Likewise.
7304 * windows-tdep.c: Likewise.
7305 * mi/mi-main.c: Likewise.
7306
7307 2018-06-07 Tom Tromey <tom@tromey.com>
7308
7309 * valprint.h (build_address_symbolic): Declare.
7310 * printcmd.c (print_address_symbolic): Update.
7311 (build_address_symbolic): Change "name" and "filename" to
7312 std::string.
7313 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7314 Update.
7315 * defs.h (build_address_symbolic): Remove declaration.
7316
7317 2018-06-07 Alan Hayward <alan.hayward@arm.com>
7318
7319 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7320 (aarch64_vnv_type): Add function.
7321 (aarch64_pseudo_register_name): Add V regs for SVE.
7322 (aarch64_pseudo_register_type): Likewise.
7323 (aarch64_pseudo_register_reggroup_p): Likewise.
7324 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7325 (aarch64_pseudo_read_value): Add V regs for SVE.
7326 (aarch64_pseudo_write_2): Use V0 offset for SVE
7327 (aarch64_pseudo_write): Add V regs for SVE.
7328 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7329
7330 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
7331
7332 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7333 (sve_vl_from_vq): Likewise.
7334
7335 2018-06-05 Tom Tromey <tom@tromey.com>
7336
7337 * cli/cli-cmds.c (show_version): Update.
7338 * top.c (print_gdb_version): Add "interactive" parameter.
7339 Update.
7340 * main.c (captured_main_1): Update.
7341 * top.h (print_gdb_version): Add "interactive" parameter and a
7342 comment.
7343
7344 2018-06-05 David Malcolm <dmalcolm@redhat.com>
7345
7346 * common/enum-flags.h: Add trailing semicolon to example in
7347 comment.
7348
7349 2018-06-05 Tom Tromey <tom@tromey.com>
7350
7351 PR cli/12326:
7352 * NEWS: Add entry about pager.
7353 * utils.c (pagination_disabled_for_command): New global.
7354 (prompt_for_continue): Allow "c" response to prompt.
7355 (reinitialize_more_filter): Clear
7356 pagination_disabled_for_command.
7357 (fputs_maybe_filtered): Check pagination_disabled_for_command.
7358
7359 2018-06-04 Tom Tromey <tom@tromey.com>
7360
7361 * ada-lang.h (ada_lookup_symbol_list): Update.
7362 * ada-lang.c (resolve_subexp): Update.
7363 (symbols_are_identical_enums): Change type of syms. Remove nsyms
7364 parameter.
7365 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7366 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7367 results parameter to std::vector.
7368 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7369 Update.
7370 * ada-exp.y (block_lookup): Update.
7371 (select_possible_type_sym): Change type of syms. Remove nsyms
7372 parameter.
7373 (write_var_or_type, write_name_assoc): Update.
7374
7375 2018-06-04 Joel Brobecker <brobecker@adacore.com>
7376
7377 * windows-nat.c (windows_nat_target::xfer_partial): Return
7378 TARGET_XFER_E_IO if we need to delegate to the target beneath
7379 but BENEATH is NULL.
7380
7381 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
7382
7383 * Makefile.in (config.status): Add configure.nat as a
7384 dependency.
7385
7386 2018-06-04 Tom Tromey <tom@tromey.com>
7387
7388 * cp-name-parser.y (cpname_state): Add method declarations.
7389 (HANDLE_QUAL): Update.
7390 (cpname_state::d_grab, cpname_state::fill_comp)
7391 (cpname_state::make_operator, cpname_state::make_dtor)
7392 (cpname_state::make_builtin_type, cpname_state::make_name)
7393 (cpname_state::d_qualify, cpname_state::d_int_type)
7394 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7395 (%union): Move earlier.
7396
7397 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7398
7399 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7400
7401 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7402
7403 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7404 (aarch64_pseudo_write_1): Likewise.
7405 (aarch64_pseudo_read_value): Use helper.
7406 (aarch64_pseudo_write): Likewise.
7407
7408 2018-06-04 Pedro Alves <palves@redhat.com>
7409
7410 * darwin-nat.c (darwin_ops): Delete.
7411 (darwin_attach_pid): Use get_native_target.
7412
7413 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7414
7415 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7416 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7417
7418 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7419
7420 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7421 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7422 (aarch64_gdbarch_init): Check for SVE.
7423 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7424
7425 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7426
7427 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7428 * aarch64-tdep.h (aarch64_read_description): Likewise.
7429 * arch/aarch64.c (aarch64_create_target_description): Likewise.
7430 * arch/aarch64.h (aarch64_create_target_description): Likewise.
7431 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7432 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7433 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7434
7435 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
7436
7437 * value.c (value_fetch_lazy_bitfield): New.
7438 (value_fetch_lazy_memory): New.
7439 (value_fetch_lazy_register): New.
7440 (value_fetch_lazy): Factor out to smaller functions.
7441
7442 2018-06-01 Tom Tromey <tom@tromey.com>
7443
7444 * cp-name-parser.y (backslashable, represented): Now const.
7445
7446 2018-06-01 Tom Tromey <tom@tromey.com>
7447
7448 * cp-name-parser.y: Include parser-defs.h.
7449 (parser_fprintf): Remove declaration.
7450
7451 2018-06-01 Tom Tromey <tom@tromey.com>
7452
7453 * cp-name-parser.y: Use %pure-parser, %lex-param, and
7454 %parse-param.
7455 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7456 (global_result): Remove globals.
7457 (struct cpname_state): New.
7458 (yyparse): Don't declare.
7459 (yylex, yyerror): Move declarations after %union.
7460 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7461 (make_name): Add state parameter.
7462 Update all callers.
7463 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7464 parameter.
7465 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7466 Update.
7467 (yylex): Add lvalp, state parameters.
7468 (yyerror): Add state parameter.
7469 (cp_demangled_name_to_comp): Update.
7470
7471 2018-06-01 Tom Tromey <tom@tromey.com>
7472
7473 * cp-name-parser.y (parser_fprintf): Declare.
7474 (GDB_YY_REMAP_PREFIX): Define.
7475 Include yy-remap.h. Don't redefine yy* identifiers.
7476
7477 2018-06-01 Tom Tromey <tom@tromey.com>
7478
7479 * python/py-type.c (typy_legacy_template_argument): Update.
7480 * cp-support.h (cp_demangled_name_to_comp): Update.
7481 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7482 parameter to be a "std::string *".
7483 (main): Update.
7484
7485 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
7486
7487 * ada-lex.l: Include "diagnostics.h" instead of
7488 "common/diagnostics.h".
7489 * unittests/environ-selftests.c: Likewise.
7490 * common/diagnostics.h: Moved to ../include.
7491
7492 2018-06-01 Joel Brobecker <brobecker@adacore.com>
7493
7494 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7495 to language_mode_manual while calling breakpoint_re_set_one.
7496
7497 2018-06-01 Tom Tromey <tom@tromey.com>
7498
7499 * valops.c (value_cast_structs, destructor_name_p): Update.
7500 * symtab.c (gdb_mangle_name): Update.
7501 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7502 Update.
7503 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7504 (pascal_object_print_value_fields, pascal_object_print_value):
7505 Update.
7506 * p-typeprint.c (pascal_type_print_derivation_info): Update.
7507 * linespec.c (find_methods): Update.
7508 * gdbtypes.h (type_name_no_tag): Remove.
7509 (type_name_or_error): Rename from type_name_no_tag_or_error.
7510 * gdbtypes.c (type_name_no_tag): Remove.
7511 (type_name_or_error): Rename from type_name_no_tag_or_error.
7512 (lookup_struct_elt_type, check_typedef): Update.
7513 * expprint.c (print_subexp_standard): Update.
7514 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7515 * d-namespace.c (d_lookup_nested_symbol): Update.
7516 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7517 (cp_print_class_member): Update.
7518 * cp-namespace.c (cp_lookup_nested_symbol): Update.
7519 * completer.c (add_struct_fields): Update.
7520 * c-typeprint.c (cp_type_print_derivation_info)
7521 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7522 Update.
7523 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7524 (ada_prefer_type, ada_is_exception_sym): Update.
7525
7526 2018-06-01 Tom Tromey <tom@tromey.com>
7527
7528 * valops.c (enum_constant_from_type, value_namespace_elt)
7529 (value_maybe_namespace_elt): Update.
7530 * valarith.c (find_size_for_pointer_math): Update.
7531 * target-descriptions.c (make_gdb_type): Update.
7532 * symmisc.c (print_symbol): Update.
7533 * stabsread.c (define_symbol, read_type)
7534 (complain_about_struct_wipeout, add_undefined_type)
7535 (cleanup_undefined_types_1): Update.
7536 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7537 (rust_range_type_p, val_print_struct, rust_print_struct_def)
7538 (rust_internal_print_type, rust_composite_type)
7539 (rust_evaluate_funcall, rust_evaluate_subexp)
7540 (rust_inclusive_range_type_p): Update.
7541 * python/py-type.c (typy_get_tag): Update.
7542 * p-typeprint.c (pascal_type_print_base): Update.
7543 * mdebugread.c (parse_symbol, parse_type): Update.
7544 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7545 Update.
7546 * guile/scm-type.c (gdbscm_type_tag): Update.
7547 * go-lang.c (sixg_string_p): Update.
7548 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7549 Update.
7550 * gdbtypes.h (struct main_type) <tag_name>: Remove.
7551 (TYPE_TAG_NAME): Remove.
7552 * gdbtypes.c (type_name_no_tag): Simplify.
7553 (check_typedef, check_types_equal, recursive_dump_type)
7554 (copy_type_recursive, arch_composite_type): Update.
7555 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
7556 in summary mode when needed.
7557 * eval.c (evaluate_funcall): Update.
7558 * dwarf2read.c (fixup_go_packaging, read_structure_type)
7559 (process_structure_scope, read_enumeration_type)
7560 (read_namespace_type, read_module_type, determine_prefix): Update.
7561 * cp-support.c (inspect_type): Update.
7562 * coffread.c (process_coff_symbol, decode_base_type): Update.
7563 * c-varobj.c (c_is_path_expr_parent): Update.
7564 * c-typeprint.c (c_type_print_base_struct_union): Update.
7565 (c_type_print_base_1): Update. Print struct/class/union/enum in
7566 summary when using C language.
7567 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7568 (gen_maybe_namespace_elt): Update.
7569 * ada-lang.c (ada_type_name): Simplify.
7570 (empty_record, ada_template_to_fixed_record_type_1)
7571 (template_to_static_fixed_type)
7572 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7573
7574 2018-06-01 Tom Tromey <tom@tromey.com>
7575
7576 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7577 c_print_type.
7578 * c-typeprint.c (c_print_type_1): Add "language" parameter.
7579 (c_print_type): Update.
7580 (c_print_type): New overload.
7581 (c_type_print_varspec_prefix, c_type_print_args)
7582 (c_type_print_varspec_suffix, c_print_type_no_offsets)
7583 (c_type_print_base_struct_union, c_type_print_base_1)
7584 (cp_type_print_method_args): Add "language" parameter.
7585 (c_type_print_base): Update.
7586 * c-lang.h (c_print_type): Add new overload.
7587
7588 2018-06-01 Tom Tromey <tom@tromey.com>
7589
7590 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7591 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7592
7593 2018-06-01 Alan Hayward <alan.hayward@arm.com>
7594
7595 * aarch64-tdep.c (aarch64_sve_register_names): New const
7596 var.
7597 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7598 (AARCH64_SVE_Z_REGS_NUM): New define.
7599 (AARCH64_SVE_P_REGS_NUM): Likewise.
7600 (AARCH64_SVE_NUM_REGS): Likewise.
7601
7602 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7603
7604 * nat/linux-ptrace.h [__alpha__]
7605 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7606 definitions.
7607
7608 2018-05-31 Maciej W. Rozycki <macro@mips.com>
7609
7610 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7611 the endianness selected.
7612 * NEWS: Document `set endian auto' mode operation update.
7613
7614 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7615
7616 * Makefile.in: Add new header.
7617 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7618 (sve_vl_from_vg): Likewise.
7619 (sve_vq_from_vl): Likewise.
7620 (sve_vl_from_vq): Likewise.
7621 (sve_vq_from_vg): Likewise.
7622 (sve_vg_from_vq): Likewise.
7623 * configure.nat: Add new c file.
7624 * nat/aarch64-sve-linux-ptrace.c: New file.
7625 * nat/aarch64-sve-linux-ptrace.h: New file.
7626
7627 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7628
7629 * aarch64-linux-nat.c (aarch64_linux_read_description):
7630 Add parmeter zero.
7631 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7632 Likewise.
7633 * aarch64-tdep.c (tdesc_aarch64_list): Add.
7634 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7635 (aarch64_gdbarch_init): Add parmeter zero.
7636 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7637 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7638 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7639 parmeter.
7640 * doc/gdb.texinfo: Describe SVE feature
7641 * features/aarch64-sve.c: New file.
7642
7643 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
7644
7645 PR gdb/23210
7646 * gdbarch.sh (significant_addr_bit): Default to zero when
7647 not set by target architecture.
7648 * gdbarch.c: Re-generated.
7649 * utils.c (address_significant): Update.
7650
7651 2018-05-30 Joel Brobecker <brobecker@adacore.com>
7652
7653 * stack.c (func_command): Remove trailing newline in call to error.
7654
7655 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7656
7657 * regcache.h (regcache_raw_collect): Remove, update callers to
7658 use regcache::raw_collect.
7659 * regcache.c (regcache_raw_collect): Remove.
7660
7661 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7662
7663 * regcache.h (regcache_raw_supply): Remove, update callers to
7664 use detached_regcache::raw_supply.
7665 * regcache.c (regcache_raw_supply): Remove.
7666
7667 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7668
7669 * regcache.h (regcache_cooked_write_part): Remove, update
7670 callers to use regcache::cooked_write_part.
7671 * regcache.c (regcache_cooked_write_part): Remove.
7672
7673 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7674
7675 * regcache.h (regcache_cooked_read_part): Remove, update callers
7676 to use readable_regcache::cooked_read_part.
7677 * regcache.c (regcache_cooked_read_part): Remove.
7678
7679 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7680
7681 * regcache.h (regcache_cooked_read_value): Remove, update
7682 callers to use readable_regcache::cooked_read_value.
7683 * regcache.c (regcache_cooked_read_value): Remove.
7684
7685 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7686
7687 * regcache.h (regcache_cooked_write): Remove, update callers to
7688 use regcache::cooked_write.
7689 * regcache.c (regcache_cooked_write): Remove.
7690
7691 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7692
7693 * regcache.h (regcache_invalidate): Remove, update callers to
7694 use detached_regcache::invalidate instead.
7695 * regcache.c (regcache_invalidate): Remove.
7696
7697 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7698
7699 * regcache.h (regcache_raw_write_part): Remove, update callers
7700 to use regcache::raw_write_part instead.
7701 * regcache.c (regcache_raw_write_part): Remove.
7702
7703 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7704
7705 * regcache.h (regcache_raw_read_part): Remove, update callers to
7706 use readable_regcache::raw_read_part instead.
7707 * regcache.c (regcache_raw_read_part): Remove.
7708
7709 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7710
7711 * regcache.h (regcache_cooked_read): Remove, update callers to
7712 use readable_regcache::cooked_read instead.
7713 * regcache.c (regcache_cooked_read): Remove.
7714
7715 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7716
7717 * regcache.h (regcache_raw_write): Remove, update callers to use
7718 regcache::raw_write instead.
7719 * regcache.c (regcache_raw_write): Remove.
7720
7721 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7722
7723 * regcache.h (regcache_raw_read): Remove, update callers to use
7724 readable_regcache::raw_read instead.
7725 * regcache.c (regcache_raw_read): Remove.
7726
7727 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7728
7729 * regcache.h (regcache_raw_update): Remove, update callers to
7730 use readable_regcache::raw_update instead.
7731 * regcache.c (regcache_raw_update): Remove.
7732
7733 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7734
7735 * regcache.h (regcache_register_status): Remove, update callers
7736 to use reg_buffer::get_register_status directly instead.
7737 * regcache.c (regcache_register_status): Remove.
7738
7739 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7740
7741 * regcache.h (regcache_get_ptid): Remove, update all callers to
7742 call regcache::ptid instead.
7743 * regcache.c (regcache_get_ptid): Remove.
7744
7745 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7746
7747 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7748
7749 2018-05-30 Pedro Alves <palves@redhat.com>
7750
7751 * common/common-exceptions.h (exception_rethrow): Use
7752 ATTRIBUTE_NORETURN.
7753
7754 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
7755
7756 * breakpoint.c (print_solib_event, check_status_catch_solib):
7757 Remove struct keyword in range-based for loops.
7758 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7759 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7760 Likewise.
7761 * linespec.c (find_superclass_methods, search_minsyms_for_name):
7762 Likewise.
7763 * symfile.c (addr_info_make_relative): Likewise.
7764 * thread.c (value_in_thread_stack_temporaries): Likewise.
7765
7766 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
7767
7768 PR gdb/16841
7769 * valops.c (value_struct_elt_for_reference): Call check_typedef on
7770 aggregate type to get its real type before accessing it.
7771
7772 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
7773
7774 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7775 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7776 * coff-pe-read.c (add_pe_forwarded_sym): Replace
7777 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7778 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7779 * jit.c (jit_breakpoint_re_set_internal): Likewise.
7780 * printcmd.c (info_address_command): Likewise.
7781
7782 2018-05-29 Tom Tromey <tom@tromey.com>
7783
7784 * windows-nat.c (handle_exception): Update fall-through comment.
7785
7786 2018-05-29 Tom Tromey <tom@tromey.com>
7787
7788 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
7789 (struct program_space) <added_solibs>: Now a std::vector.
7790 * breakpoint.c (print_solib_event): Update.
7791 (check_status_catch_solib): Update.
7792 * progspace.c (clear_program_space_solib_cache): Update.
7793 * solib.c (update_solib_list): Update.
7794
7795 2018-05-29 Tom Tromey <tom@tromey.com>
7796
7797 * python/py-type.c (typy_richcompare): Update.
7798 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7799 * gdbtypes.h (types_deeply_equal): Return bool.
7800 (types_equal): Likewise.
7801 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
7802 declare VEC.
7803 (check_types_equal): Change worklist to std::vector. Return
7804 bool.
7805 (struct type_equality_entry): Add constructor.
7806 (compare_maybe_null_strings): Return bool.
7807 (check_types_worklist): Return bool. Change worklist to
7808 std::vector.
7809 (types_deeply_equal): Use std::vector.
7810 (types_equal): Return bool.
7811 (compare_maybe_null_strings): Simplify.
7812
7813 2018-05-29 Tom Tromey <tom@tromey.com>
7814
7815 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
7816
7817 2018-05-29 Tom Tromey <tom@tromey.com>
7818
7819 * objc-lang.h: Don't include cp-support.h.
7820 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
7821 declare VEC.
7822
7823 2018-05-27 Tom Tromey <tom@tromey.com>
7824
7825 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7826
7827 2018-05-25 Tom Tromey <tom@tromey.com>
7828
7829 * value.c (value::location): Initialize.
7830
7831 2018-05-25 Tom Tromey <tom@tromey.com>
7832
7833 * dbxread.c (init_bincl_list): Remove.
7834 (bincl_list): Now a std::vector.
7835 (bincls_allocated, next_bincl): Remove.
7836 (free_bincl_list, do_free_bincl_list_cleanup)
7837 (make_cleanup_free_bincl_list): Remove.
7838 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7839 unique_xmalloc_ptr.
7840 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7841 (struct header_file_location): Add constructor.
7842 (add_bincl_to_list): Remove.
7843
7844 2018-05-25 Tom Tromey <tom@tromey.com>
7845
7846 * tui/tui.c (tui_enable): Update.
7847 * mi/mi-interp.c (mi_interp::init): Update.
7848 * interps.h (class interp) <name>: New method.
7849 <m_name>: Rename from name.
7850 (~scoped_restore_interp): Update.
7851 * interps.c (interp::interp): Update.
7852 (interp_add, interp_set, interp_lookup_existing)
7853 (current_interp_named_p): Update.
7854
7855 2018-05-25 Tom Tromey <tom@tromey.com>
7856
7857 * interps.c (interp_name): Remove.
7858 * mi/mi-interp.c (mi_interp::init): Update.
7859 * interps.h (interp_name): Remove.
7860 (~scoped_restore_interp): Update.
7861 * tui/tui.c (tui_enable): Update.
7862
7863 2018-05-25 Tom Tromey <tom@tromey.com>
7864
7865 * utils.c (fputs_maybe_filtered): Update.
7866 * linespec.c (decode_line_full): Update.
7867 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7868 (mi_print_breakpoint_for_event, mi_solib_loaded)
7869 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7870 (mi_user_selected_context_changed): Update.
7871 * mi/mi-main.c (mi_execute_command): Update.
7872 * cli/cli-script.c (execute_control_command): Update.
7873 * python/python.c (execute_gdb_command): Update.
7874 * solib.c (info_sharedlibrary_command): Update.
7875 * interps.c (interp_ui_out): Remove.
7876 * interps.h (interp_ui_out): Remove.
7877
7878 2018-05-25 Tom Tromey <tom@tromey.com>
7879
7880 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7881 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7882 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7883
7884 2018-05-25 Tom Tromey <tom@tromey.com>
7885
7886 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7887 * interps.c (interp_exec): Use scoped_restore.
7888
7889 2018-05-25 Tom Tromey <tom@tromey.com>
7890
7891 * remote.c (remote_target::remote_file_get): Use
7892 gdb::byte_vector.
7893 (remote_target::remote_file_put): Likewise.
7894
7895 2018-05-25 Tom Tromey <tom@tromey.com>
7896
7897 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7898 a std::string.
7899 (get_pe_section_index, add_pe_exported_sym): Update.
7900 (read_pe_exported_syms): Use gdb::def_vector.
7901
7902 2018-05-25 Tom Tromey <tom@tromey.com>
7903
7904 * frame.c (remove_prev_frame): Remove.
7905 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7906
7907 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7908
7909 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7910 Remove prototypes.
7911 * mips-linux-nat.c (supply_fpregset): Always call
7912 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7913 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7914 `mips_fill_fpregset'.
7915 * mips-linux-tdep.c (mips_supply_fpregset)
7916 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7917 (mips_fill_fpregset_wrapper): Remove functions.
7918 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7919 (mips_linux_fpregset): Remove variable.
7920 (mips_linux_iterate_over_regset_sections): Use
7921 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7922 (mips_linux_o32_sigframe_init): Remove comment.
7923
7924 2018-05-25 Pedro Alves <palves@redhat.com>
7925
7926 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7927 (struct readahead_cache, struct packet_reg, struct
7928 remote_arch_state, class remote_state): Move higher up in the
7929 file.
7930 (remote_target::m_remote_state): Now an object instead of a pointer.
7931 (remote_target::get_remote_state): Adjust.
7932
7933 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7934
7935 * stack.c (select_and_print_frame): Delete.
7936 (struct function_bounds): Move struct within function.
7937 (func_command): Most content moved into new function
7938 find_frame_for_function, use new function, print result, add
7939 function comment.
7940 (find_frame_for_function): New function, now returns a result.
7941
7942 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7943
7944 * stack.c (iterate_over_block_arg_vars): Fix comment.
7945 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7946
7947 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7948
7949 PR gdb/23203
7950 * frame.c
7951 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7952 Define.
7953 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7954 Define.
7955 * frame.h (class scoped_restore_selected_frame): New class.
7956 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7957 of any exception, use scoped_restore_selected_frame to restore the
7958 frame instead.
7959
7960 2018-05-24 Pedro Alves <palves@redhat.com>
7961
7962 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7963 override.
7964
7965 2018-05-23 Tom Tromey <tom@tromey.com>
7966
7967 * complaints.c (struct complaints): Remove.
7968 (symfile_complaint_book): Remove.
7969 (series): New global.
7970 (complaint_internal): Update.
7971 (clear_complaints): Update.
7972
7973 2018-05-23 Tom Tromey <tom@tromey.com>
7974
7975 * complaints.c (counters): New global.
7976 (struct complain): Remove.
7977 (struct complaints) <root>: Remove.
7978 (complaint_sentinel): Remove.
7979 (symfile_complaint_book): Update.
7980 (find_complaint) Remove.
7981 (complaint_internal, clear_complaints): Update.
7982
7983 2018-05-23 Tom Tromey <tom@tromey.com>
7984
7985 * complaints.c (struct complain) <file, line>: Remove.
7986 (find_complaint): Remove file, line parameters.
7987 (complaint_internal): Update.
7988
7989 2018-05-23 Tom Tromey <tom@tromey.com>
7990
7991 * complaints.c (vcomplaint): Remove.
7992 (complaint_internal) Merge in contents of vcomplaint.
7993
7994 2018-05-23 Tom Tromey <tom@tromey.com>
7995
7996 * complaints.c (struct complaints) <explanation>: Remove.
7997 (symfile_explanations): Remove.
7998 (symfile_complaint_book): Update.
7999 (vcomplaint): Update.
8000 (struct explanation): Remove.
8001
8002 2018-05-23 Tom Tromey <tom@tromey.com>
8003
8004 * complaints.c (symfile_complaints): Remove.
8005 (complaint_internal): Remove "complaints" parameter.
8006 (clear_complaints, vcomplaint): Remove "c" parameter.
8007 (get_complaints): Remove.
8008 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8009 (dwarf2_debug_line_missing_file_complaint)
8010 (dwarf2_debug_line_missing_end_sequence_complaint)
8011 (dwarf2_complex_location_expr_complaint)
8012 (dwarf2_const_value_length_mismatch_complaint)
8013 (dwarf2_section_buffer_overflow_complaint)
8014 (dwarf2_macro_malformed_definition_complaint)
8015 (dwarf2_invalid_attrib_class_complaint)
8016 (create_addrmap_from_index, dw2_symtab_iter_next)
8017 (dw2_expand_marked_cus)
8018 (dw2_debug_names_iterator::find_vec_in_debug_names)
8019 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8020 (create_debug_type_hash_table, init_cutu_and_read_dies)
8021 (partial_die_parent_scope, add_partial_enumeration)
8022 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8023 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8024 (read_import_statement, read_file_scope, create_dwo_cu_reader)
8025 (create_cus_hash_table, create_dwp_hash_table)
8026 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8027 (dwarf2_rnglists_process, dwarf2_ranges_process)
8028 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8029 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8030 (handle_struct_member_die, process_structure_scope)
8031 (read_array_type, read_common_block, read_module_type)
8032 (read_tag_pointer_type, read_typedef, read_base_type)
8033 (read_subrange_type, load_partial_dies, partial_die_info::read)
8034 (partial_die_info::read, partial_die_info::read)
8035 (partial_die_info::read, read_checked_initial_length_and_offset)
8036 (dwarf2_string_attr, read_formatted_entries)
8037 (dwarf_decode_line_header)
8038 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8039 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8040 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8041 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8042 (get_signatured_type, get_DW_AT_signature_type)
8043 (decode_locdesc, file_file_name, consume_improper_spaces)
8044 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8045 (dwarf_decode_macro_bytes, dwarf_decode_macros)
8046 (dwarf2_symbol_mark_computed, set_die_type)
8047 (read_attribute_value): Update.
8048 * stap-probe.c (handle_stap_probe, get_stap_base_address):
8049 Update.
8050 * dbxread.c (unknown_symtype_complaint)
8051 (lbrac_mismatch_complaint, repeated_header_complaint)
8052 (set_namestring, function_outside_compilation_unit_complaint)
8053 (read_dbx_symtab, process_one_symbol): Update.
8054 * gdbtypes.c (stub_noname_complaint): Update.
8055 * windows-nat.c (handle_unload_dll): Update.
8056 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8057 (decode_base_type): Update.
8058 * xcoffread.c (bf_notfound_complaint, ef_complaint)
8059 (eb_complaint, record_include_begin, record_include_end)
8060 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8061 (process_xcoff_symbol, read_symbol)
8062 (function_outside_compilation_unit_complaint)
8063 (scan_xcoff_symtab): Update.
8064 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8065 * buildsym.c (finish_block_internal, make_blockvector)
8066 (end_symtab_get_static_block, augment_type_symtab): Update.
8067 * dtrace-probe.c (dtrace_process_dof)
8068 (dtrace_static_probe_ops::get_probes): Update.
8069 * complaints.h (struct complaint): Don't declare.
8070 (symfile_complaints): Remove.
8071 (complaint_internal): Remove "complaints" parameter.
8072 (complaint): Likewise.
8073 (clear_complaints): Likewise.
8074 * symfile.c (syms_from_objfile_1, finish_new_objfile)
8075 (reread_symbols): Update.
8076 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8077 (dwarf2_frame_cache, decode_frame_entry): Update.
8078 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8079 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8080 (info_selectors_command): Update.
8081 * macrotab.c (macro_include, check_for_redefinition)
8082 (macro_undef): Update.
8083 * objfiles.c (filter_overlapping_sections): Update.
8084 * stabsread.c (invalid_cpp_abbrev_complaint)
8085 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8086 (define_symbol, error_type, read_type, rs6000_builtin_type)
8087 (stabs_method_name_from_physname, read_member_functions)
8088 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8089 (attach_fields_to_type, complain_about_struct_wipeout)
8090 (read_range_type, read_args, common_block_start)
8091 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8092 Update.
8093 * mdebugread.c (index_complaint, unknown_ext_complaint)
8094 (basic_type_complaint, bad_tag_guess_complaint)
8095 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8096 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8097 (parse_procedure, parse_lines)
8098 (function_outside_compilation_unit_complaint)
8099 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8100 (bad_tag_guess_complaint, reg_value_complaint): Update.
8101 * cp-support.c (demangled_name_complaint): Update.
8102 * macroscope.c (sal_macro_scope): Update.
8103 * dwarf-index-write.c (class debug_names): Update.
8104
8105 2018-05-23 Tom Tromey <tom@tromey.com>
8106
8107 * complaints.c (clear_complaints): Remove "noisy" parameter.
8108 * complaints.h (clear_complaints): Update.
8109 * symfile.c (syms_from_objfile_1, finish_new_objfile)
8110 (reread_symbols): Update.
8111
8112 2018-05-23 Tom Tromey <tom@tromey.com>
8113
8114 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8115 SUBSEQUENT_MESSAGE.
8116 (vcomplaint, clear_complaints): Update.
8117 (symfile_explanations): Remove some messages.
8118
8119 2018-05-23 Tom Tromey <tom@tromey.com>
8120
8121 * complaints.c (internal_complaint): Remove.
8122 * complaints.h (internal_complaint): Remove.
8123
8124 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8125
8126 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8127
8128 2018-05-22 Pedro Alves <palves@redhat.com>
8129
8130 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8131 (remote_fileio_badfd, remote_fileio_return_errno)
8132 (remote_fileio_return_success, remote_fileio_func_open)
8133 (remote_fileio_func_open, remote_fileio_func_close)
8134 (remote_fileio_func_read, remote_fileio_func_write)
8135 (remote_fileio_func_lseek, remote_fileio_func_rename)
8136 (remote_fileio_func_unlink, remote_fileio_func_stat)
8137 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8138 (remote_fileio_func_isatty, remote_fileio_func_system): Add
8139 remote_target parameter.
8140 (remote_fio_func_map) <func>: Add remote_target parameter.
8141 (do_remote_fileio_request, remote_fileio_request):
8142 * remote-fileio.h (remote_fileio_request):
8143 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8144 remote_target parameter.
8145 (remote_notif_process, handle_notification): Adjust to pass down
8146 the remote.
8147 (remote_notif_state_allocate): Add remote_target parameter. Save
8148 it.
8149 * remote-notif.h (struct remote_target): Forward declare.
8150 (struct notif_client) <parse, ack, can_get_pending_events>: Add
8151 remote_target parameter.
8152 (struct remote_notif_state) <remote>: New field.
8153 (remote_notif_ack, remote_notif_parse): Add remote_target
8154 parameter.
8155 (remote_notif_state_allocate, remote_notif_state_allocate): Add
8156 remote_target parameter.
8157 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8158 (threads_listing_context, rmt_thread_action, protocol_feature)
8159 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8160 (packet_result, struct threads_listing_context, remote_state):
8161 Move definitions and declarations higher up.
8162 (remote_target) <~remote_target>: Declare.
8163 (remote_download_command_source, remote_file_put, remote_file_get)
8164 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8165 (remote_hostio_pread_vFile, remote_hostio_send_command)
8166 (remote_hostio_set_filesystem, remote_hostio_open)
8167 (remote_hostio_close, remote_hostio_unlink, remote_state)
8168 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8169 (get_memory_write_packet_size, get_memory_read_packet_size)
8170 (append_pending_thread_resumptions, remote_detach_1)
8171 (append_resumption, remote_resume_with_vcont)
8172 (add_current_inferior_and_thread, wait_ns, wait_as)
8173 (process_stop_reply, remote_notice_new_inferior)
8174 (process_initial_stop_replies, remote_add_thread)
8175 (btrace_sync_conf, remote_btrace_maybe_reopen)
8176 (remove_new_fork_children, kill_new_fork_children)
8177 (discard_pending_stop_replies, stop_reply_queue_length)
8178 (check_pending_events_prevent_wildcard_vcont)
8179 (discard_pending_stop_replies_in_queue, stop_reply)
8180 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8181 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8182 (remote_interrupt_as, remote_interrupt_ns)
8183 (remote_get_noisy_reply, remote_query_attached)
8184 (remote_add_inferior, remote_current_thread, get_current_thread)
8185 (set_thread, set_general_thread, set_continue_thread)
8186 (set_general_process, write_ptid)
8187 (remote_unpack_thread_info_response, remote_get_threadinfo)
8188 (parse_threadlist_response, remote_get_threadlist)
8189 (remote_threadlist_iterator, remote_get_threads_with_ql)
8190 (remote_get_threads_with_qxfer)
8191 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8192 (get_offsets, remote_check_symbols, remote_supported_packet)
8193 (remote_query_supported, remote_packet_size)
8194 (remote_serial_quit_handler, remote_detach_pid)
8195 (remote_vcont_probe, remote_resume_with_hc)
8196 (send_interrupt_sequence, interrupt_query)
8197 (remote_notif_get_pending_events, fetch_register_using_p)
8198 (send_g_packet, process_g_packet, fetch_registers_using_g)
8199 (store_register_using_P, store_registers_using_G)
8200 (set_remote_traceframe, check_binary_download)
8201 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8202 (remote_xfer_live_readonly_partial, remote_read_bytes)
8203 (remote_send_printf, remote_flash_write, readchar)
8204 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8205 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8206 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8207 (extended_remote_disable_randomization, extended_remote_run)
8208 (send_environment_packet, extended_remote_environment_support)
8209 (extended_remote_set_inferior_cwd, remote_write_qxfer)
8210 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8211 (packet_command): Now methods of ...
8212 (remote_target): ... this class.
8213 (m_remote_state) <remote_target>: New field.
8214 (struct remote_state) <stop_reply_queue,
8215 remote_async_inferior_event_token, wait_forever_enabled_p>: New
8216 fields.
8217 (remote_state::remote_state): Allocate stop_reply_queue.
8218 (remote_state): Delete global.
8219 (get_remote_state_raw): Delete.
8220 (remote_target::get_remote_state): Allocate m_remote_state on
8221 demand.
8222 (get_current_remote_target): New.
8223 (remote_ops, extended_remote_ops): Delete.
8224 (wait_forever_enabled_p, remote_async_inferior_event_token):
8225 Delete, moved to struct remote_state.
8226 (remote_target::close): Delete self. Destruction bits split to
8227 ...
8228 (remote_target::~remote_target): ... this.
8229 (show_memory_packet_size): Adjust to use
8230 get_current_remote_target.
8231 (struct protocol_feature) <func>: Add remote_target parameter.
8232 All callers adjusted.
8233 (curr_quit_handler_target): New.
8234 (remote_serial_quit_handler): Reimplement.
8235 (remote_target::open_1): Adjust to use get_current_remote_target.
8236 Heap-allocate remote_target/extended_remote_target instances.
8237 (vcont_builder::vcont_builder): Add remote_target parameter, and
8238 save it in m_remote. All callers adjusted.
8239 (vcont_builder::m_remote): New field.
8240 (vcont_builder::restart, vcont_builder::flush)
8241 (vcont_builder::push_action): Use it.
8242 (remote_target::commit_resume): Use it.
8243 (struct queue_iter_param) <remote>: New field.
8244 (remote_target::remove_new_fork_children): Fill in 'remote' field.
8245 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8246 (check_pending_event_prevents_wildcard_vcont_callback)
8247 (remote_target::check_pending_events_prevent_wildcard_vcont)
8248 (remote_target::discard_pending_stop_replies)
8249 (remote_target::discard_pending_stop_replies_in_queue)
8250 (remote_target::remote_notif_remove_queued_reply): Fill in
8251 'remote' field.
8252 (remote_notif_get_pending_events): New.
8253 (remote_target::readchar, remote_target::remote_serial_write):
8254 Save/restore curr_quit_handler_target.
8255 (putpkt): New.
8256 (kill_new_fork_children): Fill in 'remote' field.
8257 (packet_command): Use get_current_remote_target, defer to
8258 remote_target method of same name.
8259 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8260 parameter, and save it in m_remote. All callers adjusted.
8261 (scoped_remote_fd::release): Use m_remote.
8262 (scoped_remote_fd::m_remote): New field.
8263 (remote_file_put, remote_file_get, remote_file_delete): Use
8264 get_current_remote_target, defer to remote_target method of same
8265 name.
8266 (remote_btrace_reset): Add remote_state paremeter. Update all
8267 callers.
8268 (remote_async_inferior_event_handler). Pass down 'data'.
8269 (remote_new_objfile): Use get_current_remote_target.
8270 (remote_target::vcont_r_supported): New.
8271 (set_range_stepping): Use get_current_remote_target and
8272 remote_target::vcont_r_supported.
8273 (_initialize_remote): Don't allocate 'remote_state' and
8274 'stop_reply_queue' globals.
8275 * remote.h (struct remote_target): Forward declare.
8276 (getpkt, putpkt, remote_notif_get_pending_events): Add
8277 'remote_target' parameter.
8278
8279 2018-05-22 Pedro Alves <palves@redhat.com>
8280
8281 * remote.c (vcont_builder): Now a class. Make all data members
8282 private.
8283 (vcont_builder) <vcont_builder, restart, flush, push_action>:
8284 Declare methods.
8285 (vcont_builder_restart): Rename to ...
8286 (vcont_builder::restart): ... this.
8287 (vcont_builder_flush): Rename to ...
8288 (vcont_builder::flush): ... this.
8289 (vcont_builder_push_action): Rename to ...
8290 (vcont_builder::push_action): ... this.
8291 (remote_target::commit_resume): Adjust.
8292
8293 2018-05-22 Pedro Alves <palves@redhat.com>
8294
8295 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8296 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8297 (get_fixed_memory_packet_size): New.
8298 (get_memory_packet_size): Use it.
8299 (set_memory_packet_size): Don't override the config size with
8300 DEFAULT_MAX_MEMORY_PACKET_SIZE.
8301 (show_memory_packet_size): Use get_fixed_memory_packet_size.
8302 Don't refer to get_memory_packet_size if not connected to a remote
8303 target. Show "(default)" if configured size is 0.
8304
8305 2018-05-22 Pedro Alves <palves@redhat.com>
8306
8307 * remote.c (remote_target::mourn_inferior): Move
8308 discard_pending_stop_replies call here from ...
8309 (_initialize_remote): ... here.
8310
8311 2018-05-22 Pedro Alves <palves@redhat.com>
8312
8313 * remote.c (compare_section_command): Remove set_general_process
8314 call.
8315
8316 2018-05-22 Pedro Alves <palves@redhat.com>
8317
8318 * remote.c (struct packet_reg, struct remote_arch_state):
8319 Move higher up in the file.
8320 (remote_state) <m_arch_states>: Store remote_arch_state values
8321 instead of remote_arch_state pointers.
8322 (remote_state::get_remote_arch_state): Adjust.
8323
8324 2018-05-22 Pedro Alves <palves@redhat.com>
8325
8326 * remote.c: Include <unordered_map>.
8327 (remote_state): Now a class.
8328 (remote_state) <get_remote_arch_state>: Declare method.
8329 <get_remote_arch_state>: New field.
8330 (remote_arch_state) <remote_arch_state>: Declare ctor.
8331 <regs>: Now a unique_ptr.
8332 (remote_gdbarch_data_handle): Delete.
8333 (get_remote_arch_state): Delete.
8334 (remote_state::get_remote_arch_state): New.
8335 (get_remote_state): Adjust to call remote_state's
8336 get_remote_arch_state method.
8337 (init_remote_state): Delete, bits factored out to ...
8338 (remote_arch_state::remote_arch_state): ... this new method.
8339 (get_remote_packet_size, get_memory_packet_size)
8340 (process_g_packet, remote_target::fetch_registers)
8341 (remote_target::prepare_to_store, store_registers_using_G)
8342 (remote_target::store_registers, remote_target::get_trace_status):
8343 Adjust to call remote_state's method.
8344 (_initialize_remote): Remove reference to
8345 remote_gdbarch_data_handle.
8346
8347 2018-05-22 Pedro Alves <palves@redhat.com>
8348
8349 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8350 pread>: New method declarations.
8351 (remote_target::open_1): Adjust.
8352 (readahead_cache_invalidate): Rename to ...
8353 (readahead_cache::invalidate): ... this, and adjust to be a class
8354 method.
8355 (readahead_cache_invalidate_fd): Rename to ...
8356 (readahead_cache::invalidate_fd): ... this, and adjust to be a
8357 class method.
8358 (remote_hostio_pwrite): Adjust.
8359 (remote_hostio_pread_from_cache): Rename to ...
8360 (readahead_cache::pread): ... this, and adjust to be a class
8361 method.
8362 (remote_hostio_close): Adjust.
8363
8364 2018-05-22 Pedro Alves <palves@redhat.com>
8365
8366 * remote.c (remote_hostio_close_cleanup): Delete.
8367 (class scoped_remote_fd): New.
8368 (remote_file_put, remote_file_get): Use it.
8369
8370 2018-05-22 Pedro Alves <palves@redhat.com>
8371
8372 (struct vCont_action_support): Use bool and initialize all fields.
8373 (struct readahead_cache): Initialize all fields.
8374 (remote_state): Use bool and initialize all fields.
8375 (remote_state::remote_state, remote_state::~remote_state): New.
8376 (new_remote_state): Delete.
8377 (_initialize_remote): Use new to allocate remote_state.
8378
8379 2018-05-22 Pedro Alves <palves@redhat.com>
8380 張俊芝 <zjz@zjz.name>
8381
8382 PR gdb/22973
8383 * c-exp.y: Include "c-support.h".
8384 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8385 of tolower. Use c_ident_is_alpha to scan names.
8386 * c-lang.c: Include "c-support.h".
8387 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8388 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8389 * c-support.h: New file, with bits factored out from ...
8390 * cp-name-parser.y: ... this file.
8391 Include "c-support.h".
8392 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8393 c-support.h and renamed.
8394 (symbol_end, yylex): Adjust.
8395
8396 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8397
8398 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8399 parameter type to CORE_ADDR.
8400 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8401 parameter type in declaration to CORE_ADDR.
8402 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8403 target_auxv_search to get AT_HWCAP and use the result to get the
8404 target description.
8405 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8406 to CORE_ADDR. Remove the cast of the return value to unsigned
8407 long. Fix error predicate of target_auxv_search.
8408 (ppc_linux_nat_target::read_description): Change the type of the
8409 hwcap variable to CORE_ADDR.
8410
8411 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8412
8413 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8414 if the size of fpscr is larger than 32 bits.
8415
8416 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8417
8418 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8419 (ppc32_linux_vsxregmap): New global.
8420 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8421 regcache_supply_regset, and regcache_collect_regset.
8422 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8423 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8424 (fetch_vsx_register, store_vsx_register): Remove.
8425 (fetch_vsx_registers): Add regno parameter. Get regset using
8426 ppc_linux_vsxregset. Use regset to supply registers.
8427 (store_vsx_registers): Add regno parameter. Get regset using
8428 ppc_linux_vsxregset. Use regset to collect registers.
8429 (fetch_register): Call fetch_vsx_registers instead of
8430 fetch_vsx_register.
8431 (store_register): Call store_vsx_registers instead of
8432 store_vsx_register.
8433 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8434 new regno parameter.
8435 (store_ppc_registers): Call store_vsx_registers with -1 for the
8436 new regno parameter.
8437 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8438 (ppc_collect_vsxregset): Remove.
8439
8440 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8441
8442 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8443 offset fields.
8444 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8445 for vector register offset fields.
8446 (ppc64_fbsd_reg_offsets): Likewise.
8447 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8448 to vector register offset fields.
8449 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8450 to vector register offset fields.
8451 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8452 vector register offset fields.
8453 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8454 initializers for vector register offset fields.
8455 (rs6000_aix64_reg_offsets): Likewise.
8456 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8457 (ppc_supply_vrregset): Remove.
8458 (ppc_collect_vrregset): Remove.
8459 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8460 (ppc_linux_vrregset) : New function.
8461 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8462 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8463 (ppc32_linux_vrregset): Remove.
8464 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8465 and use result instead of ppc32_linux_vrregset.
8466 (ppc32_linux_reg_offsets): Remove initializers for vector register
8467 offset fields.
8468 (ppc64_linux_reg_offsets): Likewise.
8469 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8470 * ppc-linux-nat.c: Include regset.h.
8471 (gdb_vrregset_t): Adjust comment to account for little-endian
8472 mode.
8473 (supply_vrregset, fill_vrregset): Remove.
8474 (fetch_altivec_register, store_altivec_register): Remove.
8475 (fetch_altivec_registers): Add regno parameter. Get regset using
8476 ppc_linux_vrregset. Use regset to supply registers.
8477 (store_altivec_registers): Add regno parameter. Get regset using
8478 ppc_linux_vrregset. Use regset to collect registers.
8479 (fetch_register): Call fetch_altivec_registers instead of
8480 fetch_altivec_register.
8481 (store_register): Call store_altivec_registers instead of
8482 store_altivec_register.
8483 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8484 the new regno parameter.
8485 (store_ppc_registers): Call store_altivec_registers with -1 for
8486 the new regno parameter.
8487
8488 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8489
8490 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8491 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8492 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8493 (gdb_vrregset_t): Change array type size to
8494 PPC_LINUX_SIZEOF_VRREGSET.
8495 (gdb_vsxregset_t): Change array type size to
8496 PPC_LINUX_SIZEOF_VSXREGSET.
8497 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8498 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8499 PPC_LINUX_SIZEOF_VSXREGSET.
8500
8501 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8502
8503 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8504 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8505 nat/ppc-linux.c.
8506 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8507 ppc_linux_target_wordsize with tid.
8508 (ppc_linux_nat_target::read_description): Call ppc_linux_target
8509 wordsize with tid.
8510 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8511 (ppc64_64bit_inferior_p): Add static and inline specifiers.
8512 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8513 tid parameter. Remove static specifier.
8514 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8515 (ppc_linux_target_wordsize): New declaration.
8516
8517 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8518
8519 * arch/ppc-linux-common.c: New file.
8520 * arch/ppc-linux-common.h: New file.
8521 * arch/ppc-linux-tdesc.h: New file.
8522 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8523 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8524 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8525 arch/ppc-linux-tdesc.h.
8526 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8527 arch/ppc-linux-tdesc.h.
8528 (ppc_linux_nat_target::read_description): Remove target
8529 description matching code. Fill a ppc_linux_features struct and
8530 call ppc_linux_match_description with it. Move comment about ISA
8531 2.05 to ppc-linux-common.c.
8532 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8533 arch/ppc-linux-tdesc.h.
8534 (ppc_linux_core_read_description): Remove target description
8535 matching code. Fill a ppc_linux_features struct and call
8536 ppc_linux_match_description with it.
8537 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8538 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8539 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8540 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8541 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8542 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8543 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8544 (tdesc_powerpc_e500l): Remove.
8545
8546 2018-05-22 Joel Brobecker <brobecker@adacore.com>
8547
8548 * ada-lang.c (catch_assert_command): Pass empty string instead
8549 of NULL for excep_string argument.
8550
8551 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8552
8553 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8554 the width of the requested register exceeds the width of the
8555 `ptrace' data type.
8556
8557 2018-05-21 Tom Tromey <tom@tromey.com>
8558
8559 * printcmd.c (output_command): Remove.
8560 (output_command_const): Rename to output_command.
8561 * valprint.h (output_command): Rename from output_command_const.
8562 * tracepoint.c (trace_dump_actions): Call output_command.
8563
8564 2018-05-21 Tom Tromey <tom@tromey.com>
8565
8566 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8567 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8568 * ada-lang.h (create_ada_exception_catchpoint): Update.
8569 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8570 std::string.
8571 (create_excep_cond_exprs, ~ada_catchpoint)
8572 (should_stop_exception, print_one_exception)
8573 (print_mention_exception, print_recreate_exception): Update.
8574 (ada_get_next_arg): Remove.
8575 (catch_ada_exception_command_split): Use std::string. Change type
8576 of "excep_string", "cond_string".
8577 (catch_ada_exception_command): Update.
8578 (create_ada_exception_catchpoint): Change type of excep_string.
8579 (ada_exception_sal): Remove excep_string parameter.
8580 (~ada_catchpoint): Remove.
8581
8582 2018-05-21 Tom Tromey <tom@tromey.com>
8583
8584 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8585 cleanup.
8586
8587 2018-05-21 Tom Tromey <tom@tromey.com>
8588
8589 * ada-lang.c (ada_exception_message_1, ada_exception_message):
8590 Return unique_xmalloc_ptr.
8591 (print_it_exception): Update.
8592
8593 2018-05-21 Tom Tromey <tom@tromey.com>
8594
8595 * tracepoint.c (trace_dump_actions): Use std::string.
8596
8597 2018-05-21 Tom Tromey <tom@tromey.com>
8598
8599 * symfile.c (reread_symbols): Use std::string for original_name.
8600
8601 2018-05-21 Tom Tromey <tom@tromey.com>
8602
8603 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8604 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
8605 constructor.
8606
8607 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
8608
8609 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8610 instance to...
8611 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8612 * objfiles.c (get_objfile_bfd_data): Allocate
8613 objfile_per_bfd_storage with obstack_new when allocating on
8614 obstack.
8615
8616 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8617
8618 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8619 OBSTACK_ZALLOC.
8620 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8621 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8622 * mdebugread.c (mdebug_build_psymtabs): Likewise.
8623 (add_pending): Likewise.
8624 (parse_symbol): Likewise.
8625 (parse_partial_symbols): Likewise.
8626 (psymtab_to_symtab_1): Likewise.
8627 (new_psymtab): Likewise.
8628 (elfmdebug_build_psymtabs): Likewise.
8629 * minsyms.c (terminate_minimal_symbol_table): Likewise.
8630 * objfiles.c (get_objfile_bfd_data): Likewise.
8631 (objfile_register_static_link): Likewise.
8632 * psymtab.c (allocate_psymtab): Likewise.
8633 * stabsread.c (read_member_functions): Likewise.
8634 * xcoffread.c (xcoff_end_psymtab): Likewise.
8635
8636 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8637
8638 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8639 compiler supports std::is_trivially_constructible.
8640 * common/poison.h: Include obstack.h.
8641 (IsMallocable): Define to is_trivially_constructible if the
8642 compiler supports it, define to true_type otherwise.
8643 (xobnew): New.
8644 (XOBNEW): Redefine.
8645 (xobnewvec): New.
8646 (XOBNEWVEC): Redefine.
8647 * gdb_obstack.h (obstack_zalloc): New.
8648 (OBSTACK_ZALLOC): Redefine.
8649 (obstack_calloc): New.
8650 (OBSTACK_CALLOC): Redefine.
8651 (obstack_new): New.
8652 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8653 (gdbarch_obstack): New declaration in gdbarch.h, definition in
8654 gdbarch.c.
8655 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8656 obstack_calloc/obstack_zalloc.
8657 (gdbarch_obstack_zalloc): Remove.
8658 * target-descriptions.c (tdesc_data_init): Use obstack_new.
8659
8660 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8661
8662 * stack.c (backtrace_command_1): Remove useless variable int i.
8663
8664 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8665
8666 * stack.c (print_frame_info): Fix comment.
8667
8668 2018-05-18 Tom Tromey <tom@tromey.com>
8669
8670 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8671 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8672 (~dwarf2_per_objfile): Update
8673 (dwarf2_get_dwz_file): Use new.
8674 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8675 unique_ptr.
8676
8677 2018-05-18 Tom Tromey <tom@tromey.com>
8678
8679 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8680 unique_ptr.
8681 * dwarf2read.c (struct dwp_file): Add constructor and
8682 initializers.
8683 (open_and_init_dwp_file): Return a unique_ptr.
8684 (dwarf2_per_objfile, create_dwp_hash_table)
8685 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8686 (lookup_dwo_unit_in_dwp): Update.
8687 (open_and_init_dwp_file, get_dwp_file): Update.
8688
8689 2018-05-18 Tom Tromey <tom@tromey.com>
8690
8691 * dwarf2read.c (dwarf2_per_objfile): Update.
8692 (struct mapped_index): Add initializers.
8693 (dwarf2_read_index): Use new.
8694 (dw2_symtab_iter_init): Update.
8695 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8696 unique_ptr.
8697
8698 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8699
8700 * dwarf2read.c (mapped_index) <total_size>: Remove.
8701
8702 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8703
8704 * unittests/format_pieces-selftests.c (test_format_specifier):
8705 Add ARI comments.
8706
8707 2018-05-18 Tom Tromey <tom@tromey.com>
8708
8709 * c-typeprint.c (maybe_print_hole): New function.
8710 (c_print_type_struct_field_offset): Update.
8711 (c_type_print_base_struct_union): Call maybe_print_hole.
8712
8713 2018-05-17 Keith Seitz <keiths@redhat.com>
8714
8715 * breakpoint.c (build_bpstat_chain): New function, moved from
8716 bpstat_stop_status.
8717 (bpstat_stop_status): Add optional parameter, `stop_chain'.
8718 If no stop chain is passed, call build_bpstat_chain to build it.
8719 * breakpoint.h (build_bpstat_chain): Declare.
8720 (bpstat_stop_status): Move documentation here from breakpoint.c.
8721 * infrun.c (handle_signal_stop): Before eliding inlined frames,
8722 build the stop chain and pass it to skip_inline_frames.
8723 Pass this stop chain to bpstat_stop_status.
8724 * inline-frame.c: Include breakpoint.h.
8725 (stopped_by_user_bp_inline_frame): New function.
8726 (skip_inline_frames): Add parameter `stop_chain'.
8727 Move documention to inline-frame.h.
8728 If non-NULL, use stopped_by_user_bp_inline_frame to determine
8729 whether the frame should be elided.
8730 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8731 Add moved documentation and update for new parameter.
8732
8733 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8734
8735 PR cli/14975
8736 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8737 unittests/format_pieces-selftests.c.
8738 * common/format.h (format_piece) <operator==>: New.
8739 (format_pieces) <operator[]>: Remove.
8740 * common/format.c (format_pieces::format_pieces): Handle \e.
8741 * unittests/format_pieces-selftests.c: New.
8742
8743 2018-05-17 Tom Tromey <tom@tromey.com>
8744
8745 PR symtab/23010:
8746 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8747 (dw2_instantiate_symtab): Add skip_partial parameter.
8748 (dw2_find_last_source_symtab, dw2_map_expand_apply)
8749 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8750 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8751 (dw2_expand_symtabs_matching_one)
8752 (dw2_find_pc_sect_compunit_symtab)
8753 (dw2_debug_names_lookup_symbol)
8754 (dw2_debug_names_expand_symtabs_for_function): Update.
8755 (init_cutu_and_read_dies): Add skip_partial parameter.
8756 (process_psymtab_comp_unit, build_type_psymtabs_1)
8757 (process_skeletonless_type_unit, load_partial_comp_unit)
8758 (psymtab_to_symtab_1): Update.
8759 (load_full_comp_unit): Add skip_partial parameter.
8760 (process_imported_unit_die, dwarf2_read_addr_index)
8761 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8762 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8763 (read_signatured_type): Update.
8764
8765 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8766
8767 * value.c (release_value): Remove unused variable.
8768 (record_latest_value): Likewise.
8769 (access_value_history): Likewise.
8770 (preserve_values): Likewise.
8771
8772 2018-05-17 Tom Tromey <tom@tromey.com>
8773
8774 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8775 Initialize.
8776
8777 2018-05-16 Maciej W. Rozycki <macro@mips.com>
8778
8779 PR gdb/22286
8780 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8781 Also handle registers whose width is not a multiple of
8782 PTRACE_TYPE_RET.
8783 (linux_nat_trad_target::store_register): Likewise.
8784
8785 2018-05-16 Tom Tromey <tom@tromey.com>
8786
8787 * gdbcore.h (core_bfd): Redefine.
8788 * corelow.c (core_target::close): Update.
8789 (core_target_open): Update.
8790 * progspace.h (struct program_space) <cbfd>: Now a
8791 gdb_bfd_ref_ptr.
8792
8793 2018-05-16 Tom Tromey <tom@tromey.com>
8794
8795 PR cli/19551:
8796 * symfile-add-flags.h (enum symfile_add_flags)
8797 <SYMFILE_NOT_FILENAME>: New constant.
8798 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
8799 objfile name from BFD.
8800 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8801 * minidebug.c (find_separate_debug_file_in_section): Put
8802 ".gnu_debugdata" into BFD's file name.
8803
8804 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
8805
8806 * regcache.c (regcache_read_ftype, regcache_write_ftype):
8807 Remove.
8808
8809 2018-05-15 Tamar Christina <tamar.christina@arm.com>
8810
8811 PR binutils/21446
8812 * aarch64-tdep.c (aarch64_analyze_prologue,
8813 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8814 Indicate not interested in errors.
8815
8816 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8817
8818 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8819 Supply the MIPS_ZERO_REGNUM register.
8820
8821 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8822
8823 * mips-tdep.c (mask_address_var): Make variable static.
8824
8825 2018-05-14 Tom Tromey <tom@tromey.com>
8826
8827 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8828
8829 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
8830
8831 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8832 FXSAVE_ADDR for the mxcsr register.
8833
8834 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
8835
8836 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8837
8838 2018-05-11 Pedro Alves <palves@redhat.com>
8839
8840 * corelow.c (core_target) <core_target>: No longer inline.
8841 Initialize m_core_gdbarch, m_core_vec and build the section table
8842 here.
8843 <~core_target>: New.
8844 <core_gdbarch, get_core_register_section>: New methods.
8845 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8846 factored out from ...
8847 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8848 (core_ops): Delete.
8849 (sniff_core_bfd): Add gdbarch parameter.
8850 (core_close): Delete, merged into ...
8851 (core_target::close): ... here. Delete self.
8852 (core_close_cleanup): Delete.
8853 (core_target_open): Allocate a core_target on the heap. Use a
8854 unique_ptr instead of a cleanup. Bits moved into the core_target
8855 ctor. Adjust to use core_target methods instead of globals.
8856 (get_core_register_section): Rename to ...
8857 (core_target::get_core_register_section): ... this and adjust.
8858 (struct get_core_registers_cb_data): New.
8859 (get_core_registers_cb): Use it. Use bool.
8860 (core_target::fetch_registers, core_target::files_info)
8861 (core_target::xfer_partial, core_target::read_description)
8862 (core_target::pid_to, core_target::thread_name): Adjust to
8863 reference class fields instead of globals.
8864 * target.h (struct target_ops_deleter, target_ops_up): New.
8865
8866 2018-05-11 Pedro Alves <palves@redhat.com>
8867
8868 * corefile.c (core_file_command): Move to corelow.c.
8869 * corelow.c (the_core_target): Delete.
8870 (core_file_command): Moved from corefile.c. Check exec_bfd
8871 instead of the_core_target. Use target_detach instead of calling
8872 into the_core_target directly.
8873 (maybe_say_no_core_file_now): New.
8874 (core_target::detach): Use it.
8875 (_initialize_corelow): Remove references to the_core_target.
8876 * gdbcore.h (the_core_target): Delete.
8877
8878 2018-05-11 Tom Tromey <tromey@redhat.com>
8879 Pedro Alves <palves@redhat.com>
8880
8881 * corefile.c (core_bfd): Remove.
8882 * gdbcore.h (core_bfd): Now a macro.
8883 * progspace.h (struct program_space) <cbfd>: New field.
8884
8885 2018-05-11 Tom Tromey <tom@tromey.com>
8886
8887 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8888 gdb::def_vector.
8889
8890 2018-05-10 Tom Tromey <tom@tromey.com>
8891
8892 * configure: Rebuild.
8893 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8894
8895 2018-05-10 Joel Brobecker <brobecker@adacore.com>
8896
8897 PR server/23158:
8898 * regformats/regdat.sh: Adjust script, following the addition
8899 of the new expedite_regs parameter to init_target_desc.
8900
8901 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
8902
8903 PR gdb/23127
8904 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8905 set_gdbarch_significant_addr_bit.
8906 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8907 set_gdbarch_significant_addr_bit.
8908 * utils.c (address_significant): Update to sign extend addr.
8909
8910 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8911
8912 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8913 (xtensa_linux_init_abi): Limit tdep->num_regs by
8914 tdep->num_nopriv_regs.
8915 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8916 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8917 not initialized.
8918
8919 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8920
8921 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8922
8923 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8924
8925 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8926 (I387_MXCSR_INIT_VAL): New constant.
8927 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8928 buffer if it was supplied by the inferior.
8929 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8930 (i387_xsave_get_clear_bv): New function.
8931 (i387_supply_xsave): Only read x87 control registers from the
8932 xsave buffer if the feature is enabled, and the state will have
8933 been written, otherwise, provide a suitable default.
8934 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8935 including x87 control registers. Update control registers if they
8936 have changed from the default value, and mark features as enabled
8937 as required.
8938 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8939
8940 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8941
8942 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8943
8944 2018-05-07 Tom Tromey <tom@tromey.com>
8945
8946 * configure: Rebuild.
8947 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8948
8949 2018-05-07 Tom Tromey <tom@tromey.com>
8950
8951 PR tdep/20362:
8952 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8953 bit. Use correct value for VDIV.
8954
8955 2018-05-04 Tom Tromey <tom@tromey.com>
8956
8957 * configure: Rebuild.
8958 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8959
8960 2018-05-04 Tom Tromey <tom@tromey.com>
8961
8962 * linux-record.c (record_linux_system_call) <case
8963 RECORD_SYS_RECVFROM>: Add "break".
8964
8965 2018-05-04 Tom Tromey <tom@tromey.com>
8966
8967 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8968 Add missing "break".
8969 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8970 Add missing "break".
8971
8972 2018-05-04 Tom Tromey <tom@tromey.com>
8973
8974 * rs6000-tdep.c (ppc_process_record_op4)
8975 (ppc_process_record_op63): Add fall-through comment.
8976
8977 2018-05-04 Tom Tromey <tom@tromey.com>
8978
8979 * i386-tdep.c (i386_process_record): Add fall-through comment.
8980
8981 2018-05-04 Tom Tromey <tom@tromey.com>
8982
8983 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8984 comment.
8985
8986 2018-05-04 Tom Tromey <tom@tromey.com>
8987
8988 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8989 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8990 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8991 comment.
8992 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8993 comment.
8994 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8995 comment.
8996
8997 2018-05-04 Tom Tromey <tom@tromey.com>
8998
8999 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9000
9001 2018-05-04 Tom Tromey <tom@tromey.com>
9002
9003 * s390-tdep.c (s390_process_record): Fix fall-through comments.
9004 * xcoffread.c (scan_xcoff_symtab): Move comment later.
9005 * symfile.c (section_is_mapped): Fix fall-through comment.
9006 * stabsread.c (define_symbol, read_member_functions): Fix
9007 fall-through comment.
9008 * s390-linux-tdep.c (s390_process_record): Fix fall-through
9009 comment.
9010 * remote.c (remote_wait_as): Fix fall-through comment.
9011 * p-exp.y (yylex): Fix fall-through comment.
9012 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9013 comment.
9014 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9015 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9016 * jv-exp.y (yylex): Fix fall-through comment.
9017 * go-exp.y (lex_one_token): Fix fall-through comment.
9018 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9019 fall-through comment.
9020 * f-exp.y (yylex): Fix fall-through comment.
9021 * dwarf2read.c (process_die): Fix fall-through comments.
9022 * dbxread.c (process_one_symbol): Fix fall-through comment.
9023 * d-exp.y (lex_one_token): Fix fall-through comment.
9024 * cp-name-parser.y (yylex): Fix fall-through comment.
9025 * coffread.c (coff_symtab_read): Fix fall-through comment.
9026 * c-exp.y (lex_one_token): Fix fall-through comment.
9027 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9028 comment.
9029 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9030 comment.
9031
9032 2018-05-04 Tom Tromey <tom@tromey.com>
9033
9034 PR python/22730:
9035 * NEWS: Mention gdb.execute change.
9036 * gdbcmd.h (execute_control_command): Don't declare.
9037 * python/python.c (execute_gdb_command): Use read_command_lines_1,
9038 execute_control_commands, execute_control_commands_to_string.
9039 * cli/cli-script.h (execute_control_commands)
9040 (execute_control_commands_to_string): Declare.
9041 (execute_control_command): Add from_tty parameter.
9042 * cli/cli-script.c (execute_control_commands)
9043 (execute_control_commands_to_string): New functions.
9044 (execute_user_command): Use execute_control_commands.
9045 (execute_control_command_1): Add "from_tty" parameter. Update.
9046 (execute_control_command): Likewise.
9047
9048 2018-05-04 Tom Tromey <tom@tromey.com>
9049
9050 PR python/22731:
9051 * NEWS: Mention that breakpoint commands are writable.
9052 * python/py-breakpoint.c (bppy_set_commands): New function.
9053 (breakpoint_object_getset) <"commands">: Use it.
9054
9055 2018-05-04 Tom Tromey <tom@tromey.com>
9056
9057 * tracepoint.c (actions_command): Update.
9058 * mi/mi-cmd-break.c (mi_command_line_array)
9059 (mi_command_line_array_cnt, mi_command_line_array_ptr)
9060 (mi_read_next_line): Remove.
9061 (mi_cmd_break_commands): Update.
9062 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9063 function_view.
9064 * cli/cli-script.c (get_command_line): Update.
9065 (process_next_line): Use function_view. Constify.
9066 (recurse_read_control_structure, read_command_lines)
9067 (read_command_lines_1): Change argument types to function_view.
9068 (do_define_command, document_command): Update.
9069 * breakpoint.h (check_tracepoint_command): Don't declare.
9070 * breakpoint.c (check_tracepoint_command): Remove.
9071 (commands_command_1, create_tracepoint_from_upload): Update.
9072
9073 2018-05-04 Tom Tromey <tom@tromey.com>
9074
9075 PR gdb/11750:
9076 * cli/cli-script.h (enum command_control_type) <define_control>:
9077 New constant.
9078 * cli/cli-script.c (multi_line_command_p): Handle define_control.
9079 (build_command_line, execute_control_command_1)
9080 (process_next_line): Likewise.
9081 (do_define_command): New function, extracted from define_command.
9082 (define_command): Use it.
9083
9084 2018-05-04 Tom Tromey <tom@tromey.com>
9085
9086 * tracepoint.c (actions_command): Update.
9087 * cli/cli-script.h (read_command_lines): Update.
9088 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9089 (MAX_TMPBUF): Remove define.
9090 (define_command): Use string_printf.
9091 (document_command): Likewise.
9092 * breakpoint.c (commands_command_1): Update.
9093
9094 2018-05-04 Tom Tromey <tom@tromey.com>
9095
9096 * top.c (execute_command): Update.
9097 * cli/cli-script.h (print_command_lines): Now varargs.
9098 * cli/cli-script.c (print_command_lines): Now varargs.
9099 (execute_control_command_1) <case while_control, case if_control>:
9100 Update.
9101
9102 2018-05-04 Tom Tromey <tom@tromey.com>
9103
9104 * tracepoint.c (all_tracepoint_actions): Rename from
9105 all_tracepoint_actions_and_cleanup. Change return type.
9106 (actions_command, encode_actions_1, encode_actions)
9107 (trace_dump_actions, tdump_command): Update.
9108 * remote.c (remote_download_command_source): Update.
9109 * python/python.c (gdbpy_eval_from_control_command)
9110 (python_command, python_interactive_command): Update.
9111 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9112 * guile/guile.c (guile_command)
9113 (gdbscm_eval_from_control_command, guile_command): Update.
9114 * compile/compile.c (compile_code_command)
9115 (compile_print_command, compile_to_object): Update.
9116 * cli/cli-script.h (struct command_lines_deleter): New.
9117 (counted_command_line): New typedef.
9118 (struct command_line): Add constructor, destructor.
9119 <body_list>: Remove.
9120 <body_list_0, body_list_1>: New members.
9121 (command_line_up): Remove typedef.
9122 (read_command_lines, read_command_lines_1, get_command_line):
9123 Update.
9124 (copy_command_lines): Don't declare.
9125 * cli/cli-script.c (build_command_line): Use "new".
9126 (get_command_line): Return counted_command_line.
9127 (print_command_lines, execute_user_command)
9128 (execute_control_command_1, while_command, if_command): Update.
9129 (realloc_body_list): Remove.
9130 (process_next_line, recurse_read_control_structure): Update.
9131 (read_command_lines, read_command_lines_1): Return counted_command_line.
9132 (free_command_lines): Use "delete".
9133 (copy_command_lines): Remove.
9134 (define_command, document_command, show_user_1): Update.
9135 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9136 a counted_command_line.
9137 * breakpoint.h (counted_command_line): Remove typedef.
9138 (breakpoint_set_commands): Update.
9139 * breakpoint.c (check_no_tracepoint_commands)
9140 (validate_commands_for_breakpoint): Update.
9141 (breakpoint_set_commands): Change commands to be a
9142 counted_command_line.
9143 (commands_command_1, update_dprintf_command_list)
9144 (create_tracepoint_from_upload): Update.
9145
9146 2018-05-04 Tom Tromey <tom@tromey.com>
9147
9148 * cli/cli-decode.h (cmd_list_element): New constructor.
9149 (~cmd_list_element): New destructor.
9150 (struct cmd_list_element): Add initializers.
9151 * cli/cli-decode.c (do_add_cmd): Use "new".
9152 (delete_cmd): Use "delete".
9153
9154 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
9155 Pedro Alves <palves@redhat.com>
9156
9157 PR breakpoints/19806 and support for PR external/20207.
9158 * NEWS: Mention Aarch64 watchpoint improvements.
9159 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9160 watchpoints and PR external/20207 watchpoints.
9161 * nat/aarch64-linux-hw-point.c
9162 (kernel_supports_any_contiguous_range): New.
9163 (aarch64_watchpoint_offset): New.
9164 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9165 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9166 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9167 (aarch64_align_watchpoint): New parameters aligned_offset_p and
9168 next_addr_orig_p. Support PR external/20207 watchpoints.
9169 (aarch64_downgrade_regs): New.
9170 (aarch64_dr_state_insert_one_point): New parameters offset and
9171 addr_orig.
9172 (aarch64_dr_state_remove_one_point): Likewise.
9173 (aarch64_handle_breakpoint): Update caller.
9174 (aarch64_handle_aligned_watchpoint): Likewise.
9175 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9176 aligned_offset.
9177 (aarch64_linux_set_debug_regs): Remove const from state. Call
9178 aarch64_downgrade_regs.
9179 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9180 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9181 (DR_CONTROL_MASK): ... this.
9182 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9183 (unsigned int aarch64_watchpoint_offset): New prototype.
9184 (aarch64_linux_set_debug_regs): Remove const from state.
9185 * utils.c (align_up, align_down): Move to ...
9186 * common/common-utils.c (align_up, align_down): ... here.
9187 * utils.h (align_up, align_down): Move to ...
9188 * common/common-utils.h (align_up, align_down): ... here.
9189
9190 2018-05-04 Joel Brobecker <brobecker@adacore.com>
9191
9192 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9193 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9194 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9195 Re-implement to match the ABI as summarized in GCC's
9196 gcc/config/sparc/sparc.c. All callers updated.
9197 (sparc32_store_arguments): Remove assertion.
9198
9199 2018-05-04 Tom Tromey <tom@tromey.com>
9200
9201 * printcmd.c: Don't include tui.h.
9202 (decode_format): Use skip_spaces.
9203
9204 2018-05-04 Tom Tromey <tom@tromey.com>
9205
9206 PR gdb/22619:
9207 * printcmd.c (last_count): New global.
9208 (x_command): Use saved count when repeating.
9209
9210 2018-05-04 Tom Tromey <tom@tromey.com>
9211
9212 * nto-procfs.c (do_closedir_cleanup): Remove.
9213 (procfs_pidlist): Use gdb_dir_up.
9214 * procfs.c (do_closedir_cleanup): Remove.
9215 (proc_update_threads): Use gdb_dir_up.
9216 * common/filestuff.h (struct gdb_dir_deleter): New.
9217 (gdb_dir_up): New typedef.
9218
9219 2018-05-04 Tom Tromey <tom@tromey.com>
9220
9221 * ada-lang.c (print_mention_exception): Use std::string.
9222
9223 2018-05-04 Tom Tromey <tom@tromey.com>
9224
9225 * ada-lang.c (create_excep_cond_exprs): Update.
9226 (ada_exception_catchpoint_cond_string): Use std::string.
9227
9228 2018-05-04 Tom Tromey <tom@tromey.com>
9229
9230 * ada-lang.c (xget_renaming_scope): Return std::string.
9231 (old_renaming_is_invisible): Update.
9232
9233 2018-05-04 Tom Tromey <tom@tromey.com>
9234
9235 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9236 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9237
9238 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
9239
9240 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9241
9242 2018-05-04 Tom Tromey <tom@tromey.com>
9243
9244 * remote.c (remote_query_supported_append): Change type.
9245 (remote_check_symbols): Update.
9246
9247 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
9248
9249 PR gdb/11420
9250 * configure.ac: Prepend libpython.
9251 * python/python-config.py: Likewise.
9252 * configure: Regenerate.
9253
9254 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
9255
9256 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9257
9258 2018-05-03 Pedro Alves <palves@redhat.com>
9259
9260 * s390-linux-nat.c
9261 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9262 override. Write 'true' instead of '1'.
9263 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9264 declaration.
9265
9266 2018-05-02 Pedro Alves <palves@redhat.com>
9267
9268 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9269 add_inf_child_target.
9270 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9271 add_inf_child_target.
9272 * aix-thread.c (aix_thread_target_info): New.
9273 (aix_thread_target) <shortname, longname, doc>: Delete.
9274 <info>: New.
9275 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9276 add_inf_child_target.
9277 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9278 add_inf_child_target.
9279 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9280 add_inf_child_target.
9281 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9282 add_inf_child_target.
9283 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9284 add_inf_child_target.
9285 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9286 add_inf_child_target.
9287 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9288 add_inf_child_target.
9289 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9290 add_inf_child_target.
9291 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9292 add_inf_child_target.
9293 * bfd-target.c (target_bfd_target_info): New.
9294 (target_bfd) <shortname, longname, doc>: Delete.
9295 <info>: New.
9296 * bsd-kvm.c (bsd_kvm_target_info): New.
9297 (bsd_kvm_target) <shortname, longname, doc>: Delete.
9298 <info>: New.
9299 (bsd_kvm_target::open): Rename to ...
9300 (bsd_kvm_target_open): ... this. Adjust.
9301 * bsd-uthread.c (bsd_uthread_target_info): New.
9302 (bsd_uthread_target) <shortname, longname, doc>: Delete.
9303 <info>: New.
9304 * corefile.c (core_file_command): Adjust.
9305 * corelow.c (core_target_info): New.
9306 (core_target) <shortname, longname, doc>: Delete.
9307 <info>: New.
9308 (core_target::open): Rename to ...
9309 (core_target_open): ... this. Adjust.
9310 * ctf.c (ctf_target_info): New.
9311 (ctf_target) <shortname, longname, doc>: Delete.
9312 <info>: New.
9313 (ctf_target::open): Rename to ...
9314 (ctf_target_open): ... this.
9315 (_initialize_ctf): Adjust.
9316 * exec.c (exec_target_info): New.
9317 (exec_target) <shortname, longname, doc>: Delete.
9318 <info>: New.
9319 (exec_target::open): Rename to ...
9320 (exec_target_open): ... this.
9321 * gdbcore.h (core_target_open): Declare.
9322 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9323 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9324 add_inf_child_target.
9325 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9326 add_inf_child_target.
9327 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9328 add_inf_child_target.
9329 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9330 add_inf_child_target.
9331 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9332 add_inf_child_target.
9333 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9334 add_inf_child_target.
9335 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9336 add_inf_child_target.
9337 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9338 add_inf_child_target.
9339 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9340 add_inf_child_target.
9341 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9342 add_inf_child_target.
9343 * inf-child.c (inf_child_target_info): New.
9344 (inf_child_target::info): New.
9345 (inf_child_open_target): Remove 'target' parameter. Use
9346 get_native_target instead.
9347 (inf_child_target::open): Delete.
9348 (add_inf_child_target): New.
9349 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9350 Delete.
9351 <info>: New.
9352 (add_inf_child_target): Declare.
9353 (inf_child_open_target): Declare.
9354 * linux-thread-db.c (thread_db_target_info): New.
9355 (thread_db_target) <shortname, longname, doc>: Delete.
9356 <info>: New.
9357 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9358 add_inf_child_target.
9359 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9360 add_inf_child_target.
9361 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9362 add_inf_child_target.
9363 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9364 add_inf_child_target.
9365 * make-target-delegates (print_class): Adjust.
9366 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9367 add_inf_child_target.
9368 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9369 add_inf_child_target.
9370 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9371 add_inf_child_target.
9372 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9373 add_inf_child_target.
9374 * nto-procfs.c (nto_native_target_info): New.
9375 (nto_procfs_target_native) <shortname, longname, doc>:
9376 Delete.
9377 <info>: New.
9378 (nto_procfs_target_info): New.
9379 (nto_procfs_target_procfs) <shortname, longname, doc>:
9380 Delete.
9381 <info>: New.
9382 (init_procfs_targets): Adjust.
9383 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9384 add_inf_child_target.
9385 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9386 add_inf_child_target.
9387 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9388 add_inf_child_target.
9389 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9390 add_inf_child_target.
9391 * ravenscar-thread.c (ravenscar_target_info): New.
9392 (ravenscar_thread_target) <shortname, longname, doc>:
9393 Delete.
9394 <info>: New.
9395 * record-btrace.c (record_btrace_target_info):
9396 (record_btrace_target) <shortname, longname, doc>: Delete.
9397 <info>: New.
9398 (record_btrace_target::open): Rename to ...
9399 (record_btrace_target_open): ... this. Adjust.
9400 * record-full.c (record_longname, record_doc): New.
9401 (record_full_base_target) <shortname, longname, doc>: Delete.
9402 <info>: New.
9403 (record_full_target_info): New.
9404 (record_full_target): <shortname>: Delete.
9405 <info>: New.
9406 (record_full_core_open_1, record_full_open_1): Update comments.
9407 (record_full_base_target::open): Rename to ...
9408 (record_full_open): ... this.
9409 (cmd_record_full_restore): Update.
9410 (_initialize_record_full): Update.
9411 * remote-sim.c (remote_sim_target_info): New.
9412 (gdbsim_target) <shortname, longname, doc>: Delete.
9413 <info>: New.
9414 (gdbsim_target::open): Rename to ...
9415 (gdbsim_target_open): ... this.
9416 (_initialize_remote_sim): Adjust.
9417 * remote.c (remote_doc): New.
9418 (remote_target_info): New.
9419 (remote_target) <shortname, longname, doc>: Delete.
9420 <info>: New.
9421 (extended_remote_target_info): New.
9422 (extended_remote_target) <shortname, longname, doc>: Delete.
9423 <info>: New.
9424 (remote_target::open_1): Make static. Adjust.
9425 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9426 * s390-linux-nat.c (_initialize_s390_nat): Use
9427 add_inf_child_target.
9428 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9429 add_inf_child_target.
9430 * sol-thread.c (thread_db_target_info): New.
9431 (sol_thread_target) <shortname, longname, doc>: Delete.
9432 <info>: New.
9433 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9434 add_inf_child_target.
9435 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9436 add_inf_child_target.
9437 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9438 add_inf_child_target.
9439 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9440 add_inf_child_target.
9441 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9442 add_inf_child_target.
9443 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9444 add_inf_child_target.
9445 * spu-linux-nat.c (_initialize_spu_nat): Use
9446 add_inf_child_target.
9447 * spu-multiarch.c (spu_multiarch_target_info): New.
9448 (spu_multiarch_target) <shortname, longname, doc>: Delete.
9449 <info>: New.
9450 * target-delegates.c: Regenerate.
9451 * target.c: Include <unordered_map>.
9452 (target_ops_p): Delete.
9453 (DEF_VEC_P(target_ops_p)): Delete.
9454 (target_factories): New.
9455 (test_target_info): New.
9456 (test_target_ops::info): New.
9457 (open_target): Adjust to use target_factories.
9458 (add_target_with_completer): Rename to ...
9459 (add_target): ... this. Change prototype. Register target_info
9460 and open callback in target_factories. Register target_info in
9461 command context instead of target_ops.
9462 (add_target): Delete old implementation.
9463 (add_deprecated_target_alias): Change prototype. Adjust.
9464 (the_native_target): New.
9465 (set_native_target, get_native_target): New.
9466 (find_default_run_target): Use the_native_target.
9467 (find_attach_target, find_run_target): Simplify.
9468 (target_ops::open): Delete.
9469 (dummy_target_info): New.
9470 (dummy_target::shortname, dummy_target::longname)
9471 (dummy_target::doc): Delete.
9472 (dummy_target::info): New.
9473 (debug_target::shortname, debug_target::longname)
9474 (debug_target::doc): Delete.
9475 (debug_target::info): New.
9476 * target.h (struct target_info): New.
9477 (target_ops::~target_ops): Add comment.
9478 (target_ops::info): New.
9479 (target_ops::shortname, target_ops::longname, target_ops::doc): No
9480 longer virtual. Implement in terms of target_info.
9481 (set_native_target, get_native_target): Declare.
9482 (target_open_ftype): New.
9483 (add_target, add_target_with_completer)
9484 (add_deprecated_target_alias): Change prototype.
9485 (test_target) <shortname, longname, doc>: Delete.
9486 <info>: New.
9487 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9488 add_inf_child_target.
9489 * tracefile-tfile.c (tfile_target_info): New.
9490 (tfile_target) <shortname, longname, doc>: Delete.
9491 <info>: New.
9492 (tfile_target::open): Rename to ...
9493 (tfile_target_open): ... this.
9494 (_initialize_tracefile_tfile): Adjust.
9495 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9496 add_inf_child_target.
9497 * windows-nat.c (_initialize_windows_nat): Use
9498 add_inf_child_target.
9499 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9500 add_inf_child_target.
9501
9502 2018-05-02 Pedro Alves <palves@redhat.com>
9503
9504 * linux-nat.h (linux_nat_target) <low_new_thread,
9505 low_delete_thread, low_new_fork, low_forget_process,
9506 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9507 New virtual methods.
9508 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9509 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9510 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9511 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9512 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9513 Delete.
9514 * linux-fork.c (delete_fork): Adjust to call low method.
9515 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9516 (linux_nat_new_fork, linux_nat_forget_process_hook)
9517 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9518 (linux_nat_status_is_event):
9519 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9520 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9521 to call low method.
9522 (sigtrap_is_event): Rename to ...
9523 (linux_nat_target::low_status_is_event): ... this.
9524 (linux_nat_set_status_is_event): Delete.
9525 (save_stop_reason, linux_nat_wait_1)
9526 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9527 low methods.
9528 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9529 (linux_nat_set_new_fork, linux_nat_set_forget_process)
9530 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9531 (linux_nat_set_prepare_to_resume): Delete.
9532 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9533 low virtual methods.
9534 * amd64-linux-nat.c: Likewise.
9535 * arm-linux-nat.c: Likewise.
9536 * i386-linux-nat.c: Likewise.
9537 * ia64-linux-nat.c: Likewise.
9538 * mips-linux-nat.c: Likewise.
9539 * ppc-linux-nat.c: Likewise.
9540 * s390-linux-nat.c: Likewise.
9541 * sparc64-linux-nat.c: Likewise.
9542 * x86-linux-nat.c: Likewise.
9543 * x86-linux-nat.h: Include "nat/x86-linux.h".
9544 (x86_linux_nat_target) <low_new_fork, low_forget_process,
9545 low_prepare_to_resume, low_new_thread, low_delete_thread>:
9546 Override methods.
9547
9548 2018-05-02 Pedro Alves <palves@redhat.com>
9549
9550 * target.h (target_ops)
9551 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9552 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9553 stopped_by_watchpoint, have_continuable_watchpoint,
9554 stopped_data_address, watchpoint_addr_within_range,
9555 can_accel_watchpoint_condition, can_run, thread_alive,
9556 has_all_memory, has_memory, has_stack, has_registers,
9557 has_execution, can_async_p, is_async_p, supports_non_stop,
9558 always_non_stop_p, can_execute_reverse, supports_multi_process,
9559 supports_enable_disable_tracepoint,
9560 supports_disable_randomization, supports_string_tracing,
9561 supports_evaluation_of_breakpoint_conditions,
9562 can_run_breakpoint_commands, filesystem_is_local,
9563 can_download_tracepoint, get_trace_state_variable_value,
9564 set_trace_notes, get_tib_address, use_agent, can_use_agent,
9565 record_is_replaying, record_will_replay,
9566 augmented_libraries_svr4_read>: Adjust to return bool.
9567 * aarch64-linux-nat.c: All implementations adjusted.
9568 * aix-thread.c: All implementations adjusted.
9569 * arm-linux-nat.c: All implementations adjusted.
9570 * breakpoint.c: All implementations adjusted.
9571 * bsd-kvm.c: All implementations adjusted.
9572 * bsd-uthread.c: All implementations adjusted.
9573 * corelow.c: All implementations adjusted.
9574 * ctf.c: All implementations adjusted.
9575 * darwin-nat.c: All implementations adjusted.
9576 * darwin-nat.h: All implementations adjusted.
9577 * exec.c: All implementations adjusted.
9578 * fbsd-nat.c: All implementations adjusted.
9579 * fbsd-nat.h: All implementations adjusted.
9580 * gnu-nat.c: All implementations adjusted.
9581 * gnu-nat.h: All implementations adjusted.
9582 * go32-nat.c: All implementations adjusted.
9583 * ia64-linux-nat.c: All implementations adjusted.
9584 * inf-child.c: All implementations adjusted.
9585 * inf-child.h: All implementations adjusted.
9586 * inf-ptrace.c: All implementations adjusted.
9587 * inf-ptrace.h: All implementations adjusted.
9588 * linux-nat.c: All implementations adjusted.
9589 * linux-nat.h: All implementations adjusted.
9590 * mips-linux-nat.c: All implementations adjusted.
9591 * nto-procfs.c: All implementations adjusted.
9592 * ppc-linux-nat.c: All implementations adjusted.
9593 * procfs.c: All implementations adjusted.
9594 * ravenscar-thread.c: All implementations adjusted.
9595 * record-btrace.c: All implementations adjusted.
9596 * record-full.c: All implementations adjusted.
9597 * remote-sim.c: All implementations adjusted.
9598 * remote.c: All implementations adjusted.
9599 * s390-linux-nat.c: All implementations adjusted.
9600 * sol-thread.c: All implementations adjusted.
9601 * spu-multiarch.c: All implementations adjusted.
9602 * target-delegates.c: All implementations adjusted.
9603 * target.c: All implementations adjusted.
9604 * target.h: All implementations adjusted.
9605 * tracefile-tfile.c: All implementations adjusted.
9606 * tracefile.c: All implementations adjusted.
9607 * tracefile.h: All implementations adjusted.
9608 * windows-nat.c: All implementations adjusted.
9609 * x86-linux-nat.h: All implementations adjusted.
9610 * x86-nat.h: All implementations adjusted.
9611
9612 2018-05-02 Pedro Alves <palves@redhat.com>
9613
9614 * make-target-delegates (scan_target_h): Don't trim lines here.
9615 Replace sequences of tabs and/or whitespace with a single
9616 whitespace.
9617 (top level, parsing methods): Trim each line before processing it
9618 here.
9619
9620 2018-05-02 Pedro Alves <palves@redhat.com>
9621 John Baldwin <jhb@freebsd.org>
9622
9623 * target.h (enum strata) <debug_stratum>: New.
9624 (struct target_ops) <all delegation methods>: Replace by C++
9625 virtual methods, and drop "to_" prefix. All references updated
9626 throughout.
9627 <to_shortname, to_longname, to_doc, to_data,
9628 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9629 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9630 virtual methods. All references updated throughout.
9631 <can_attach, supports_terminal_ours, can_create_inferior,
9632 get_thread_control_capabilities, attach_no_wait>: New
9633 virtual methods.
9634 <insert_breakpoint, remove_breakpoint>: Now
9635 TARGET_DEFAULT_NORETURN methods.
9636 <info_proc>: Now returns bool.
9637 <to_magic>: Delete.
9638 (OPS_MAGIC): Delete.
9639 (current_target): Delete. All references replaced by references
9640 to ...
9641 (target_stack): ... this. New.
9642 (target_shortname, target_longname): Adjust.
9643 (target_can_run): Now a function declaration.
9644 (default_child_has_all_memory, default_child_has_memory)
9645 (default_child_has_stack, default_child_has_registers)
9646 (default_child_has_execution): Remove target_ops parameter.
9647 (complete_target_initialization): Delete.
9648 (memory_breakpoint_target): New template class.
9649 (test_target_ops): Refactor as a C++ class with virtual methods.
9650 * make-target-delegates (NAME_PART): Tighten.
9651 (POINTER_PART, CP_SYMBOL): New.
9652 (SIMPLE_RETURN_PART): Reimplement.
9653 (VEC_RETURN_PART): Expect less.
9654 (RETURN_PART, VIRTUAL_PART): New.
9655 (METHOD): Adjust to C++ virtual methods.
9656 (scan_target_h): Remove reference to C99.
9657 (dname): Output "target_ops::" prefix.
9658 (write_function_header): Adjust to output a C++ class method.
9659 (write_declaration): New.
9660 (write_delegator): Adjust to output a C++ class method.
9661 (tdname): Output "dummy_target::" prefix.
9662 (write_tdefault, write_debugmethod): Adjust to output a C++ class
9663 method.
9664 (tdefault_names, debug_names): Delete.
9665 (return_types, tdefaults, styles, argtypes_array): New.
9666 (top level): All methods are delegators.
9667 (print_class): New.
9668 (top level): Print dummy_target and debug_target classes.
9669 * target-delegates.c: Regenerate.
9670 * target-debug.h (target_debug_print_enum_info_proc_what)
9671 (target_debug_print_thread_control_capabilities)
9672 (target_debug_print_thread_info_p): New.
9673 * target.c (dummy_target): Delete.
9674 (the_dummy_target, the_debug_target): New.
9675 (target_stack): Now extern.
9676 (set_targetdebug): Push/unpush debug target.
9677 (default_child_has_all_memory, default_child_has_memory)
9678 (default_child_has_stack, default_child_has_registers)
9679 (default_child_has_execution): Remove target_ops parameter.
9680 (complete_target_initialization): Delete.
9681 (add_target_with_completer): No longer call
9682 complete_target_initialization.
9683 (target_supports_terminal_ours): Use regular delegation.
9684 (update_current_target): Delete.
9685 (push_target): No longer check magic number. Don't call
9686 update_current_target.
9687 (unpush_target): Don't call update_current_target.
9688 (target_is_pushed): No longer check magic number.
9689 (target_require_runnable): Skip for all stratums over
9690 process_stratum.
9691 (target_ops::info_proc): New.
9692 (target_info_proc): Use find_target_at and
9693 find_default_run_target.
9694 (target_supports_disable_randomization): Use regular delegation.
9695 (target_get_osdata): Use find_target_at.
9696 (target_ops::open, target_ops::close, target_ops::can_attach)
9697 (target_ops::attach, target_ops::can_create_inferior)
9698 (target_ops::create_inferior, target_ops::can_run)
9699 (target_can_run): New.
9700 (default_fileio_target): Use regular delegation.
9701 (target_ops::fileio_open, target_ops::fileio_pwrite)
9702 (target_ops::fileio_pread, target_ops::fileio_fstat)
9703 (target_ops::fileio_close, target_ops::fileio_unlink)
9704 (target_ops::fileio_readlink): New.
9705 (target_fileio_open_1, target_fileio_unlink)
9706 (target_fileio_readlink): Always call the target method. Handle
9707 FILEIO_ENOSYS.
9708 (return_zero, return_zero_has_execution): Delete.
9709 (init_dummy_target): Delete.
9710 (dummy_target::dummy_target, dummy_target::shortname)
9711 (dummy_target::longname, dummy_target::doc)
9712 (debug_target::debug_target, debug_target::shortname)
9713 (debug_target::longname, debug_target::doc): New.
9714 (target_supports_delete_record): Use regular delegation.
9715 (setup_target_debug): Delete.
9716 (maintenance_print_target_stack): Skip debug_stratum.
9717 (initialize_targets): Instantiate the_dummy_target and
9718 the_debug_target.
9719 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
9720 use target_stack.
9721 (target_auxv_search, fprint_target_auxv): Adjust.
9722 (info_auxv_command): Adjust to use target_stack.
9723 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9724 * exceptions.c (print_flush): Handle a NULL target_stack.
9725 * regcache.c (target_ops_no_register): Refactor as class with
9726 virtual methods.
9727
9728 * exec.c (exec_target): New class.
9729 (exec_ops): Now an exec_target.
9730 (exec_open, exec_close_1, exec_get_section_table)
9731 (exec_xfer_partial, exec_files_info, exec_has_memory)
9732 (exec_make_note_section): Refactor as exec_target methods.
9733 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9734 Delete.
9735 (exec_target::find_memory_regions): New.
9736 (_initialize_exec): Don't call init_exec_ops.
9737 * gdbcore.h (exec_file_clear): Delete.
9738
9739 * corefile.c (core_target): Delete.
9740 (core_file_command): Adjust.
9741 * corelow.c (core_target): New class.
9742 (the_core_target): New.
9743 (core_close): Remove target_ops parameter.
9744 (core_close_cleanup): Adjust.
9745 (core_target::close): New.
9746 (core_open, core_detach, get_core_registers, core_files_info)
9747 (core_xfer_partial, core_thread_alive, core_read_description)
9748 (core_pid_to_str, core_thread_name, core_has_memory)
9749 (core_has_stack, core_has_registers, core_info_proc): Rework as
9750 core_target methods.
9751 (ignore, core_remove_breakpoint, init_core_ops): Delete.
9752 (_initialize_corelow): Initialize the_core_target.
9753 * gdbcore.h (core_target): Delete.
9754 (the_core_target): New.
9755
9756 * ctf.c: (ctf_target): New class.
9757 (ctf_ops): Now a ctf_target.
9758 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9759 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9760 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9761 methods.
9762 (init_ctf_ops): Delete.
9763 (_initialize_ctf): Don't call it.
9764 * tracefile-tfile.c (tfile_target): New class.
9765 (tfile_ops): Now a tfile_target.
9766 (tfile_open, tfile_close, tfile_files_info)
9767 (tfile_get_tracepoint_status, tfile_trace_find)
9768 (tfile_fetch_registers, tfile_xfer_partial)
9769 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9770 Refactor as tfile_target methods.
9771 (tfile_xfer_partial_features): Remove target_ops parameter.
9772 (init_tfile_ops): Delete.
9773 (_initialize_tracefile_tfile): Don't call it.
9774 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9775 (tracefile_has_stack, tracefile_has_registers)
9776 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9777 tracefile_target methods.
9778 (init_tracefile_ops): Delete.
9779 (tracefile_target::tracefile_target): New.
9780 * tracefile.h: Include "target.h".
9781 (tracefile_target): New class.
9782 (init_tracefile_ops): Delete.
9783
9784 * spu-multiarch.c (spu_multiarch_target): New class.
9785 (spu_ops): Now a spu_multiarch_target.
9786 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9787 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9788 (spu_search_memory, spu_mourn_inferior): Refactor as
9789 spu_multiarch_target methods.
9790 (init_spu_ops): Delete.
9791 (_initialize_spu_multiarch): Remove references to init_spu_ops,
9792 complete_target_initialization.
9793
9794 * ravenscar-thread.c (ravenscar_thread_target): New class.
9795 (ravenscar_ops): Now a ravenscar_thread_target.
9796 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9797 (ravenscar_thread_alive, ravenscar_pid_to_str)
9798 (ravenscar_fetch_registers, ravenscar_store_registers)
9799 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9800 (ravenscar_stopped_by_hw_breakpoint)
9801 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9802 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9803 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9804 methods.
9805 (init_ravenscar_thread_ops): Delete.
9806 (_initialize_ravenscar): Remove references to
9807 init_ravenscar_thread_ops and complete_target_initialization.
9808
9809 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9810 (bsd_uthread_target): New class.
9811 (bsd_uthread_ops): Now a bsd_uthread_target.
9812 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9813 (bsd_uthread_close, bsd_uthread_mourn_inferior)
9814 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9815 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9816 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9817 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9818 (bsd_uthread_target): Delete function.
9819 (_initialize_bsd_uthread): Remove reference to
9820 complete_target_initialization.
9821
9822 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
9823 (target_bfd): ... this new class.
9824 (target_bfd_xfer_partial, target_bfd_get_section_table)
9825 (target_bfd_close): Refactor as target_bfd methods.
9826 (target_bfd::~target_bfd): New.
9827 (target_bfd_reopen): Adjust.
9828 (target_bfd::close): New.
9829
9830 * record-btrace.c (record_btrace_target): New class.
9831 (record_btrace_ops): Now a record_btrace_target.
9832 (record_btrace_open, record_btrace_stop_recording)
9833 (record_btrace_disconnect, record_btrace_close)
9834 (record_btrace_async, record_btrace_info)
9835 (record_btrace_insn_history, record_btrace_insn_history_range)
9836 (record_btrace_insn_history_from, record_btrace_call_history)
9837 (record_btrace_call_history_range)
9838 (record_btrace_call_history_from, record_btrace_record_method)
9839 (record_btrace_is_replaying, record_btrace_will_replay)
9840 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9841 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9842 (record_btrace_store_registers, record_btrace_prepare_to_store)
9843 (record_btrace_to_get_unwinder)
9844 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9845 (record_btrace_commit_resume, record_btrace_wait)
9846 (record_btrace_stop, record_btrace_can_execute_reverse)
9847 (record_btrace_stopped_by_sw_breakpoint)
9848 (record_btrace_supports_stopped_by_sw_breakpoint)
9849 (record_btrace_stopped_by_hw_breakpoint)
9850 (record_btrace_supports_stopped_by_hw_breakpoint)
9851 (record_btrace_update_thread_list, record_btrace_thread_alive)
9852 (record_btrace_goto_begin, record_btrace_goto_end)
9853 (record_btrace_goto, record_btrace_stop_replaying_all)
9854 (record_btrace_execution_direction)
9855 (record_btrace_prepare_to_generate_core)
9856 (record_btrace_done_generating_core): Refactor as
9857 record_btrace_target methods.
9858 (init_record_btrace_ops): Delete.
9859 (_initialize_record_btrace): Remove reference to
9860 init_record_btrace_ops.
9861 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9862 the execution_direction global.
9863 (record_full_base_target, record_full_target)
9864 (record_full_core_target): New classes.
9865 (record_full_ops): Now a record_full_target.
9866 (record_full_core_ops): Now a record_full_core_target.
9867 (record_full_target::detach, record_full_target::disconnect)
9868 (record_full_core_target::disconnect)
9869 (record_full_target::mourn_inferior, record_full_target::kill):
9870 New.
9871 (record_full_open, record_full_close, record_full_async): Refactor
9872 as methods of the record_full_base_target class.
9873 (record_full_resume, record_full_commit_resume): Refactor
9874 as methods of the record_full_target class.
9875 (record_full_wait, record_full_stopped_by_watchpoint)
9876 (record_full_stopped_data_address)
9877 (record_full_stopped_by_sw_breakpoint)
9878 (record_full_supports_stopped_by_sw_breakpoint)
9879 (record_full_stopped_by_hw_breakpoint)
9880 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9881 methods of the record_full_base_target class.
9882 (record_full_store_registers, record_full_xfer_partial)
9883 (record_full_insert_breakpoint, record_full_remove_breakpoint):
9884 Refactor as methods of the record_full_target class.
9885 (record_full_can_execute_reverse, record_full_get_bookmark)
9886 (record_full_goto_bookmark, record_full_execution_direction)
9887 (record_full_record_method, record_full_info, record_full_delete)
9888 (record_full_is_replaying, record_full_will_replay)
9889 (record_full_goto_begin, record_full_goto_end, record_full_goto)
9890 (record_full_stop_replaying): Refactor as methods of the
9891 record_full_base_target class.
9892 (record_full_core_resume, record_full_core_kill)
9893 (record_full_core_fetch_registers)
9894 (record_full_core_prepare_to_store)
9895 (record_full_core_store_registers, record_full_core_xfer_partial)
9896 (record_full_core_insert_breakpoint)
9897 (record_full_core_remove_breakpoint)
9898 (record_full_core_has_execution): Refactor
9899 as methods of the record_full_core_target class.
9900 (record_full_base_target::supports_delete_record): New.
9901 (init_record_full_ops): Delete.
9902 (init_record_full_core_ops): Delete.
9903 (record_full_save): Refactor as method of the
9904 record_full_base_target class.
9905 (_initialize_record_full): Remove references to
9906 init_record_full_ops and init_record_full_core_ops.
9907
9908 * remote.c (remote_target, extended_remote_target): New classes.
9909 (remote_ops): Now a remote_target.
9910 (extended_remote_ops): Now an extended_remote_target.
9911 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9912 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9913 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9914 (remote_pass_signals, remote_set_syscall_catchpoint)
9915 (remote_program_signals, )
9916 (remote_thread_always_alive): Remove target_ops parameter.
9917 (remote_thread_alive, remote_thread_name)
9918 (remote_update_thread_list, remote_threads_extra_info)
9919 (remote_static_tracepoint_marker_at)
9920 (remote_static_tracepoint_markers_by_strid)
9921 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9922 (remote_open): Refactor as methods of remote_target.
9923 (extended_remote_open, extended_remote_detach)
9924 (extended_remote_attach, extended_remote_post_attach):
9925 (extended_remote_supports_disable_randomization)
9926 (extended_remote_create_inferior): : Refactor as method of
9927 extended_remote_target.
9928 (remote_set_permissions, remote_open_1, remote_detach)
9929 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9930 (remote_resume, remote_commit_resume, remote_stop)
9931 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9932 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9933 (remote_prepare_to_store, remote_store_registers)
9934 (remote_flash_erase, remote_flash_done, remote_files_info)
9935 (remote_kill, remote_mourn, remote_insert_breakpoint)
9936 (remote_remove_breakpoint, remote_insert_watchpoint)
9937 (remote_watchpoint_addr_within_range)
9938 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9939 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9940 (remote_supports_stopped_by_sw_breakpoint)
9941 (remote_stopped_by_hw_breakpoint)
9942 (remote_supports_stopped_by_hw_breakpoint)
9943 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9944 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9945 (remote_verify_memory): Refactor as methods of remote_target.
9946 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9947 parameter.
9948 (remote_xfer_partial, remote_get_memory_xfer_limit)
9949 (remote_search_memory, remote_rcmd, remote_memory_map)
9950 (remote_pid_to_str, remote_get_thread_local_address)
9951 (remote_get_tib_address, remote_read_description): Refactor as
9952 methods of remote_target.
9953 (remote_target::fileio_open, remote_target::fileio_pwrite)
9954 (remote_target::fileio_pread, remote_target::fileio_close): New.
9955 (remote_hostio_readlink, remote_hostio_fstat)
9956 (remote_filesystem_is_local, remote_can_execute_reverse)
9957 (remote_supports_non_stop, remote_supports_disable_randomization)
9958 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9959 (remote_supports_enable_disable_tracepoint)
9960 (remote_supports_string_tracing)
9961 (remote_can_run_breakpoint_commands, remote_trace_init)
9962 (remote_download_tracepoint, remote_can_download_tracepoint)
9963 (remote_download_trace_state_variable, remote_enable_tracepoint)
9964 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9965 (remote_trace_start, remote_get_trace_status)
9966 (remote_get_tracepoint_status, remote_trace_stop)
9967 (remote_trace_find, remote_get_trace_state_variable_value)
9968 (remote_save_trace_data, remote_get_raw_trace_data)
9969 (remote_set_disconnected_tracing, remote_core_of_thread)
9970 (remote_set_circular_trace_buffer, remote_traceframe_info)
9971 (remote_get_min_fast_tracepoint_insn_len)
9972 (remote_set_trace_buffer_size, remote_set_trace_notes)
9973 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9974 (remote_disable_btrace, remote_teardown_btrace)
9975 (remote_read_btrace, remote_btrace_conf)
9976 (remote_augmented_libraries_svr4_read, remote_load)
9977 (remote_pid_to_exec_file, remote_can_do_single_step)
9978 (remote_execution_direction, remote_thread_handle_to_thread_info):
9979 Refactor as methods of remote_target.
9980 (init_remote_ops, init_extended_remote_ops): Delete.
9981 (remote_can_async_p, remote_is_async_p, remote_async)
9982 (remote_thread_events, remote_upload_tracepoints)
9983 (remote_upload_trace_state_variables): Refactor as methods of
9984 remote_target.
9985 (_initialize_remote): Remove references to init_remote_ops and
9986 init_extended_remote_ops.
9987
9988 * remote-sim.c (gdbsim_target): New class.
9989 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9990 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9991 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9992 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9993 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9994 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9995 Refactor as methods of gdbsim_target.
9996 (gdbsim_ops): Now a gdbsim_target.
9997 (init_gdbsim_ops): Delete.
9998 (gdbsim_cntrl_c): Adjust.
9999 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10000
10001 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10002 (the_amd64_linux_nat_target): New.
10003 (amd64_linux_fetch_inferior_registers)
10004 (amd64_linux_store_inferior_registers): Refactor as methods of
10005 amd64_linux_nat_target.
10006 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
10007 * i386-linux-nat.c: Don't include "linux-nat.h".
10008 (i386_linux_nat_target): New class.
10009 (the_i386_linux_nat_target): New.
10010 (i386_linux_fetch_inferior_registers)
10011 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10012 as methods of i386_linux_nat_target.
10013 (_initialize_i386_linux_nat): Adjust. Set linux_target.
10014 * inf-child.c (inf_child_ops): Delete.
10015 (inf_child_fetch_inferior_registers)
10016 (inf_child_store_inferior_registers): Delete.
10017 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10018 methods of inf_child_target.
10019 (inf_child_target::supports_terminal_ours)
10020 (inf_child_target::terminal_init)
10021 (inf_child_target::terminal_inferior)
10022 (inf_child_target::terminal_ours_for_output)
10023 (inf_child_target::terminal_ours, inf_child_target::interrupt)
10024 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10025 New.
10026 (inf_child_open, inf_child_disconnect, inf_child_close)
10027 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10028 (inf_child_post_startup_inferior, inf_child_can_run)
10029 (inf_child_pid_to_exec_file): Refactor as methods of
10030 inf_child_target.
10031 (inf_child_follow_fork): Delete.
10032 (inf_child_target::can_create_inferior)
10033 (inf_child_target::can_attach): New.
10034 (inf_child_target::has_all_memory, inf_child_target::has_memory)
10035 (inf_child_target::has_stack, inf_child_target::has_registers)
10036 (inf_child_target::has_execution): New.
10037 (inf_child_fileio_open, inf_child_fileio_pwrite)
10038 (inf_child_fileio_pread, inf_child_fileio_fstat)
10039 (inf_child_fileio_close, inf_child_fileio_unlink)
10040 (inf_child_fileio_readlink, inf_child_use_agent)
10041 (inf_child_can_use_agent): Refactor as methods of
10042 inf_child_target.
10043 (return_zero, inf_child_target): Delete.
10044 (inf_child_target::inf_child_target): New.
10045 * inf-child.h: Include "target.h".
10046 (inf_child_target): Delete function prototype.
10047 (inf_child_target): New class.
10048 (inf_child_open_target, inf_child_mourn_inferior)
10049 (inf_child_maybe_unpush_target): Delete.
10050 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10051 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10052 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10053 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10054 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10055 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10056 (inf_ptrace_wait, inf_ptrace_xfer_partial)
10057 (inf_ptrace_thread_alive, inf_ptrace_files_info)
10058 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10059 methods of inf_ptrace_target.
10060 (inf_ptrace_target): Delete function.
10061 * inf-ptrace.h: Include "inf-child.h".
10062 (inf_ptrace_target): Delete function declaration.
10063 (inf_ptrace_target): New class.
10064 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10065 * linux-nat.c (linux_target): New.
10066 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10067 (linux_nat_target::~linux_nat_target): New.
10068 (linux_child_post_attach, linux_child_post_startup_inferior)
10069 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10070 (linux_child_remove_fork_catchpoint)
10071 (linux_child_insert_vfork_catchpoint)
10072 (linux_child_remove_vfork_catchpoint)
10073 (linux_child_insert_exec_catchpoint)
10074 (linux_child_remove_exec_catchpoint)
10075 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10076 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10077 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10078 (linux_nat_stopped_data_address)
10079 (linux_nat_stopped_by_sw_breakpoint)
10080 (linux_nat_supports_stopped_by_sw_breakpoint)
10081 (linux_nat_stopped_by_hw_breakpoint)
10082 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10083 (linux_nat_kill, linux_nat_mourn_inferior)
10084 (linux_nat_xfer_partial, linux_nat_thread_alive)
10085 (linux_nat_update_thread_list, linux_nat_pid_to_str)
10086 (linux_nat_thread_name, linux_child_pid_to_exec_file)
10087 (linux_child_static_tracepoint_markers_by_strid)
10088 (linux_nat_is_async_p, linux_nat_can_async_p)
10089 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10090 (linux_nat_supports_multi_process)
10091 (linux_nat_supports_disable_randomization, linux_nat_async)
10092 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10093 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10094 (linux_nat_fileio_open, linux_nat_fileio_readlink)
10095 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10096 methods of linux_nat_target.
10097 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10098 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10099 parameter.
10100 (check_stopped_by_watchpoint): Adjust.
10101 (linux_xfer_partial): Delete.
10102 (linux_target_install_ops, linux_target, linux_nat_add_target):
10103 Delete.
10104 (linux_nat_target::linux_nat_target): New.
10105 * linux-nat.h: Include "inf-ptrace.h".
10106 (linux_nat_target): New.
10107 (linux_target, linux_target_install_ops, linux_nat_add_target):
10108 Delete function declarations.
10109 (linux_target): Declare global.
10110 * linux-thread-db.c (thread_db_target): New.
10111 (thread_db_target::thread_db_target): New.
10112 (thread_db_ops): Delete.
10113 (the_thread_db_target): New.
10114 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10115 (thread_db_update_thread_list, thread_db_pid_to_str)
10116 (thread_db_extra_thread_info)
10117 (thread_db_thread_handle_to_thread_info)
10118 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10119 (thread_db_resume): Refactor as methods of thread_db_target.
10120 (init_thread_db_ops): Delete.
10121 (_initialize_thread_db): Remove reference to init_thread_db_ops.
10122 * x86-linux-nat.c: Don't include "linux-nat.h".
10123 (super_post_startup_inferior): Delete.
10124 (x86_linux_nat_target::~x86_linux_nat_target): New.
10125 (x86_linux_child_post_startup_inferior)
10126 (x86_linux_read_description, x86_linux_enable_btrace)
10127 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10128 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10129 methods of x86_linux_nat_target.
10130 (x86_linux_create_target): Delete. Bits folded ...
10131 (x86_linux_add_target): ... here. Now takes a linux_nat_target
10132 pointer.
10133 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10134 (x86_linux_nat_target): New class.
10135 (x86_linux_create_target): Delete.
10136 (x86_linux_add_target): Now takes a linux_nat_target pointer.
10137 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10138 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10139 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10140 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10141 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10142 make extern.
10143 (x86_use_watchpoints): Delete.
10144 * x86-nat.h: Include "breakpoint.h" and "target.h".
10145 (x86_use_watchpoints): Delete.
10146 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10147 (x86_stopped_by_watchpoint, x86_stopped_data_address)
10148 (x86_insert_watchpoint, x86_remove_watchpoint)
10149 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10150 (x86_stopped_by_hw_breakpoint): New declarations.
10151 (x86_nat_target): New template class.
10152
10153 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10154 (the_ppc_linux_nat_target): New.
10155 (ppc_linux_fetch_inferior_registers)
10156 (ppc_linux_can_use_hw_breakpoint)
10157 (ppc_linux_region_ok_for_hw_watchpoint)
10158 (ppc_linux_ranged_break_num_registers)
10159 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10160 (ppc_linux_insert_mask_watchpoint)
10161 (ppc_linux_remove_mask_watchpoint)
10162 (ppc_linux_can_accel_watchpoint_condition)
10163 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10164 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10165 (ppc_linux_watchpoint_addr_within_range)
10166 (ppc_linux_masked_watch_num_registers)
10167 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10168 (ppc_linux_read_description): Refactor as methods of
10169 ppc_linux_nat_target.
10170 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
10171
10172 * procfs.c (procfs_xfer_partial): Delete forward declaration.
10173 (procfs_target): New class.
10174 (the_procfs_target): New.
10175 (procfs_target): Delete function.
10176 (procfs_auxv_parse, procfs_attach, procfs_detach)
10177 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10178 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10179 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10180 (procfs_create_inferior, procfs_update_thread_list)
10181 (procfs_thread_alive, procfs_pid_to_str)
10182 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10183 (procfs_stopped_data_address, procfs_insert_watchpoint)
10184 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10185 (proc_find_memory_regions, procfs_info_proc)
10186 (procfs_make_note_section): Refactor as methods of procfs_target.
10187 (_initialize_procfs): Adjust.
10188 * sol-thread.c (sol_thread_target): New class.
10189 (sol_thread_ops): Now a sol_thread_target.
10190 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10191 (sol_thread_fetch_registers, sol_thread_store_registers)
10192 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10193 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10194 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10195 (init_sol_thread_ops): Delete.
10196 (_initialize_sol_thread): Adjust. Remove references to
10197 init_sol_thread_ops and complete_target_initialization.
10198
10199 * windows-nat.c (windows_nat_target): New class.
10200 (windows_fetch_inferior_registers)
10201 (windows_store_inferior_registers, windows_resume, windows_wait)
10202 (windows_attach, windows_detach, windows_pid_to_exec_file)
10203 (windows_files_info, windows_create_inferior)
10204 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10205 (windows_close, windows_pid_to_str, windows_xfer_partial)
10206 (windows_get_tib_address, windows_get_ada_task_ptid)
10207 (windows_thread_name, windows_thread_alive): Refactor as
10208 windows_nat_target methods.
10209 (do_initial_windows_stuff): Adjust.
10210 (windows_target): Delete function.
10211 (_initialize_windows_nat): Adjust.
10212
10213 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10214 (darwin_mourn_inferior, darwin_kill_inferior)
10215 (darwin_create_inferior, darwin_attach, darwin_detach)
10216 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10217 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10218 (darwin_supports_multi_process): Refactor as darwin_nat_target
10219 methods.
10220 (darwin_resume_to, darwin_files_info): Delete.
10221 (_initialize_darwin_inferior): Rename to ...
10222 (_initialize_darwin_nat): ... this. Adjust to C++ification.
10223 * darwin-nat.h: Include "inf-child.h".
10224 (darwin_nat_target): New class.
10225 (darwin_complete_target): Delete.
10226 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10227 (darwin_target): New.
10228 (i386_darwin_fetch_inferior_registers)
10229 (i386_darwin_store_inferior_registers): Refactor as methods of
10230 darwin_nat_target.
10231 (darwin_complete_target): Delete, with ...
10232 (_initialize_i386_darwin_nat): ... bits factored out here.
10233
10234 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10235 (the_alpha_linux_nat_target): New.
10236 (alpha_linux_register_u_offset): Refactor as
10237 alpha_linux_nat_target method.
10238 (_initialize_alpha_linux_nat): Adjust.
10239 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10240 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10241 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10242 methods of linux_nat_trad_target.
10243 (linux_trad_target): Delete.
10244 * linux-nat-trad.h (linux_trad_target): Delete function.
10245 (linux_nat_trad_target): New class.
10246 * mips-linux-nat.c (mips_linux_nat_target): New class.
10247 (super_fetch_registers, super_store_registers, super_close):
10248 Delete.
10249 (the_mips_linux_nat_target): New.
10250 (mips64_linux_regsets_fetch_registers)
10251 (mips64_linux_regsets_store_registers)
10252 (mips64_linux_fetch_registers, mips64_linux_store_registers)
10253 (mips_linux_register_u_offset, mips_linux_read_description)
10254 (mips_linux_can_use_hw_breakpoint)
10255 (mips_linux_stopped_by_watchpoint)
10256 (mips_linux_stopped_data_address)
10257 (mips_linux_region_ok_for_hw_watchpoint)
10258 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10259 (mips_linux_close): Refactor as methods of mips_linux_nat.
10260 (_initialize_mips_linux_nat): Adjust to C++ification.
10261
10262 * aix-thread.c (aix_thread_target): New class.
10263 (aix_thread_ops): Now an aix_thread_target.
10264 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10265 (aix_thread_fetch_registers, aix_thread_store_registers)
10266 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10267 (aix_thread_thread_alive, aix_thread_pid_to_str)
10268 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10269 Refactor as methods of aix_thread_target.
10270 (init_aix_thread_ops): Delete.
10271 (_initialize_aix_thread): Remove references to init_aix_thread_ops
10272 and complete_target_initialization.
10273 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10274 (rs6000_nat_target): New class.
10275 (the_rs6000_nat_target): New.
10276 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10277 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10278 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10279 (super_create_inferior): Delete.
10280 (_initialize_rs6000_nat): Adjust to C++ification.
10281
10282 * arm-linux-nat.c (arm_linux_nat_target): New class.
10283 (the_arm_linux_nat_target): New.
10284 (arm_linux_fetch_inferior_registers)
10285 (arm_linux_store_inferior_registers, arm_linux_read_description)
10286 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10287 (arm_linux_remove_hw_breakpoint)
10288 (arm_linux_region_ok_for_hw_watchpoint)
10289 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10290 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10291 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10292 arm_linux_nat_target.
10293 (_initialize_arm_linux_nat): Adjust to C++ification.
10294
10295 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10296 (the_aarch64_linux_nat_target): New.
10297 (aarch64_linux_fetch_inferior_registers)
10298 (aarch64_linux_store_inferior_registers)
10299 (aarch64_linux_child_post_startup_inferior)
10300 (aarch64_linux_read_description)
10301 (aarch64_linux_can_use_hw_breakpoint)
10302 (aarch64_linux_insert_hw_breakpoint)
10303 (aarch64_linux_remove_hw_breakpoint)
10304 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10305 (aarch64_linux_region_ok_for_hw_watchpoint)
10306 (aarch64_linux_stopped_data_address)
10307 (aarch64_linux_stopped_by_watchpoint)
10308 (aarch64_linux_watchpoint_addr_within_range)
10309 (aarch64_linux_can_do_single_step): Refactor as methods of
10310 aarch64_linux_nat_target.
10311 (super_post_startup_inferior): Delete.
10312 (_initialize_aarch64_linux_nat): Adjust to C++ification.
10313
10314 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10315 (the_hppa_linux_nat_target): New.
10316 (hppa_linux_fetch_inferior_registers)
10317 (hppa_linux_store_inferior_registers): Refactor as methods of
10318 hppa_linux_nat_target.
10319 (_initialize_hppa_linux_nat): Adjust to C++ification.
10320
10321 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10322 (the_ia64_linux_nat_target): New.
10323 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10324 (ia64_linux_stopped_data_address)
10325 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10326 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10327 ia64_linux_nat_target methods.
10328 (super_xfer_partial): Delete.
10329 (_initialize_ia64_linux_nat): Adjust to C++ification.
10330
10331 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10332 (the_m32r_linux_nat_target): New.
10333 (m32r_linux_fetch_inferior_registers)
10334 (m32r_linux_store_inferior_registers): Refactor as
10335 m32r_linux_nat_target methods.
10336 (_initialize_m32r_linux_nat): Adjust to C++ification.
10337
10338 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10339 (the_m68k_linux_nat_target): New.
10340 (m68k_linux_fetch_inferior_registers)
10341 (m68k_linux_store_inferior_registers): Refactor as
10342 m68k_linux_nat_target methods.
10343 (_initialize_m68k_linux_nat): Adjust to C++ification.
10344
10345 * s390-linux-nat.c (s390_linux_nat_target): New class.
10346 (the_s390_linux_nat_target): New.
10347 (s390_linux_fetch_inferior_registers)
10348 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10349 (s390_insert_watchpoint, s390_remove_watchpoint)
10350 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10351 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10352 (s390_auxv_parse, s390_read_description): Refactor as methods of
10353 s390_linux_nat_target.
10354 (_initialize_s390_nat): Adjust to C++ification.
10355
10356 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10357 (the_sparc_linux_nat_target): New.
10358 (_initialize_sparc_linux_nat): Adjust to C++ification.
10359 * sparc-nat.c (sparc_fetch_inferior_registers)
10360 (sparc_store_inferior_registers): Remove target_ops parameter.
10361 * sparc-nat.h (sparc_fetch_inferior_registers)
10362 (sparc_store_inferior_registers): Remove target_ops parameter.
10363 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10364 (the_sparc64_linux_nat_target): New.
10365 (_initialize_sparc64_linux_nat): Adjust to C++ification.
10366
10367 * spu-linux-nat.c (spu_linux_nat_target): New class.
10368 (the_spu_linux_nat_target): New.
10369 (spu_child_post_startup_inferior, spu_child_post_attach)
10370 (spu_child_wait, spu_fetch_inferior_registers)
10371 (spu_store_inferior_registers, spu_xfer_partial)
10372 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10373 methods.
10374 (_initialize_spu_nat): Adjust to C++ification.
10375
10376 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10377 (the_tilegx_linux_nat_target): New.
10378 (fetch_inferior_registers, store_inferior_registers):
10379 Refactor as methods.
10380 (_initialize_tile_linux_nat): Adjust to C++ification.
10381
10382 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10383 (the_xtensa_linux_nat_target): New.
10384 (xtensa_linux_fetch_inferior_registers)
10385 (xtensa_linux_store_inferior_registers): Refactor as
10386 xtensa_linux_nat_target methods.
10387 (_initialize_xtensa_linux_nat): Adjust to C++ification.
10388
10389 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10390 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10391 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10392 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10393 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10394 (fbsd_stopped_by_sw_breakpoint)
10395 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10396 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10397 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10398 (fbsd_post_startup_inferior, fbsd_post_attach)
10399 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10400 (fbsd_set_syscall_catchpoint)
10401 (super_xfer_partial, super_resume, super_wait)
10402 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10403 (fbsd_handle_debug_trap): Remove target_ops parameter.
10404 (fbsd_nat_add_target): Delete.
10405 * fbsd-nat.h: Include "inf-ptrace.h".
10406 (fbsd_nat_add_target): Delete.
10407 (USE_SIGTRAP_SIGINFO): Define.
10408 (fbsd_nat_target): New class.
10409
10410 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10411 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10412 (amd64bsd_target): Delete.
10413 * amd64-bsd-nat.h: New file.
10414 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10415 "x86-bsd-nat.h".
10416 (amd64_fbsd_nat_target): New class.
10417 (the_amd64_fbsd_nat_target): New.
10418 (amd64fbsd_read_description): Refactor as method of
10419 amd64_fbsd_nat_target.
10420 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10421 (_initialize_amd64fbsd_nat): Adjust to C++ification.
10422 * amd64-nat.h (amd64bsd_target): Delete function declaration.
10423 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10424 (i386bsd_store_inferior_registers): Remove target_ops parameter.
10425 (i386bsd_target): Delete.
10426 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10427 (i386bsd_fetch_inferior_registers)
10428 (i386bsd_store_inferior_registers): Declare.
10429 (i386_bsd_nat_target): New class.
10430 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10431 (the_i386_fbsd_nat_target): New.
10432 (i386fbsd_resume, i386fbsd_read_description): Refactor as
10433 i386_fbsd_nat_target methods.
10434 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10435 (_initialize_i386fbsd_nat): Adjust to C++ification.
10436 * x86-bsd-nat.c (super_mourn_inferior): Delete.
10437 (x86bsd_mourn_inferior, x86bsd_target): Delete.
10438 (_initialize_x86_bsd_nat): Adjust to C++ification.
10439 * x86-bsd-nat.h: Include "x86-nat.h".
10440 (x86bsd_target): Delete declaration.
10441 (x86bsd_nat_target): New class.
10442
10443 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10444 (the_aarch64_fbsd_nat_target): New.
10445 (aarch64_fbsd_fetch_inferior_registers)
10446 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10447 aarch64_fbsd_nat_target.
10448 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10449 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10450 (the_alpha_bsd_nat_target): New.
10451 (alphabsd_fetch_inferior_registers)
10452 (alphabsd_store_inferior_registers): Refactor as
10453 alpha_bsd_nat_target methods.
10454 (_initialize_alphabsd_nat): Refactor as methods of
10455 alpha_bsd_nat_target.
10456 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10457 (the_amd64_nbsd_nat_target): New.
10458 (_initialize_amd64nbsd_nat): Adjust to C++ification.
10459 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10460 (the_amd64_obsd_nat_target): New.
10461 (_initialize_amd64obsd_nat): Adjust to C++ification.
10462 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10463 (the_arm_fbsd_nat_target): New.
10464 (arm_fbsd_fetch_inferior_registers)
10465 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10466 (_initialize_arm_fbsd_nat): Refactor as methods of
10467 arm_fbsd_nat_target.
10468 (_initialize_arm_fbsd_nat): Adjust to C++ification.
10469 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10470 (the_arm_netbsd_nat_target): New.
10471 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10472 arm_netbsd_nat_target.
10473 (_initialize_arm_netbsd_nat): Adjust to C++ification.
10474 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10475 (the_hppa_nbsd_nat_target): New.
10476 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10477 hppa_nbsd_nat_target methods.
10478 (_initialize_hppanbsd_nat): Adjust to C++ification.
10479 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10480 (the_hppa_obsd_nat_target): New.
10481 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10482 methods of hppa_obsd_nat_target.
10483 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
10484 add_target.
10485 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10486 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
10487 add_target.
10488 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10489 (_initialize_i386obsd_nat): Use add_target.
10490 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10491 (the_m68k_bsd_nat_target): New.
10492 (m68kbsd_fetch_inferior_registers)
10493 (m68kbsd_store_inferior_registers): Refactor as methods of
10494 m68k_bsd_nat_target.
10495 (_initialize_m68kbsd_nat): Adjust to C++ification.
10496 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10497 (the_mips_fbsd_nat_target): New.
10498 (mips_fbsd_fetch_inferior_registers)
10499 (mips_fbsd_store_inferior_registers): Refactor as methods of
10500 mips_fbsd_nat_target.
10501 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
10502 add_target.
10503 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10504 (the_mips_nbsd_nat_target): New.
10505 (mipsnbsd_fetch_inferior_registers)
10506 (mipsnbsd_store_inferior_registers): Refactor as methods of
10507 mips_nbsd_nat_target.
10508 (_initialize_mipsnbsd_nat): Adjust to C++ification.
10509 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10510 (the_mips64_obsd_nat_target): New.
10511 (mips64obsd_fetch_inferior_registers)
10512 (mips64obsd_store_inferior_registers): Refactor as methods of
10513 mips64_obsd_nat_target.
10514 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
10515 add_target.
10516 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10517 nbsd_nat_target.
10518 * nbsd-nat.h: Include "inf-ptrace.h".
10519 (nbsd_nat_target): New class.
10520 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10521 (obsd_wait): Refactor as methods of obsd_nat_target.
10522 (obsd_add_target): Delete.
10523 * obsd-nat.h: Include "inf-ptrace.h".
10524 (obsd_nat_target): New class.
10525 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10526 (the_ppc_fbsd_nat_target): New.
10527 (ppcfbsd_fetch_inferior_registers)
10528 (ppcfbsd_store_inferior_registers): Refactor as methods of
10529 ppc_fbsd_nat_target.
10530 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
10531 add_target.
10532 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10533 (the_ppc_nbsd_nat_target): New.
10534 (ppcnbsd_fetch_inferior_registers)
10535 (ppcnbsd_store_inferior_registers): Refactor as methods of
10536 ppc_nbsd_nat_target.
10537 (_initialize_ppcnbsd_nat): Adjust to C++ification.
10538 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10539 (the_ppc_obsd_nat_target): New.
10540 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10541 methods of ppc_obsd_nat_target.
10542 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
10543 add_target.
10544 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10545 (the_sh_nbsd_nat_target): New.
10546 (shnbsd_fetch_inferior_registers)
10547 (shnbsd_store_inferior_registers): Refactor as methods of
10548 sh_nbsd_nat_target.
10549 (_initialize_shnbsd_nat): Adjust to C++ification.
10550 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10551 (inf_ptrace_xfer_partial): Delete.
10552 (sparc_xfer_partial, sparc_target): Delete.
10553 * sparc-nat.h (sparc_fetch_inferior_registers)
10554 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10555 (sparc_target): Delete function declaration.
10556 (sparc_target): New template class.
10557 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10558 (_initialize_sparcnbsd_nat): Adjust to C++ification.
10559 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10560 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
10561 add_target.
10562 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10563 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10564 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10565 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
10566 add_target.
10567 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10568 (the_vax_bsd_nat_target): New.
10569 (vaxbsd_fetch_inferior_registers)
10570 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10571 methods.
10572 (_initialize_vaxbsd_nat): Adjust to C++ification.
10573
10574 * bsd-kvm.c (bsd_kvm_target): New class.
10575 (bsd_kvm_ops): Now a bsd_kvm_target.
10576 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10577 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10578 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10579 bsd_kvm_target.
10580 (bsd_kvm_return_one): Delete.
10581 (bsd_kvm_add_target): Adjust to C++ification.
10582
10583 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10584 (nto_procfs_target_procfs): New classes.
10585 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10586 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10587 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10588 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10589 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10590 (procfs_remove_hw_breakpoint, procfs_resume)
10591 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10592 (procfs_kill_inferior, procfs_store_registers)
10593 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10594 as methods of nto_procfs_target.
10595 (nto_procfs_ops): Now an nto_procfs_target_procfs.
10596 (nto_native_ops): Delete.
10597 (procfs_open, procfs_native_open): Delete.
10598 (nto_native_ops): Now an nto_procfs_target_native.
10599 (init_procfs_targets): Adjust to C++ification.
10600 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10601 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10602 Refactor as methods of nto_procfs_target.
10603
10604 * go32-nat.c (go32_nat_target): New class.
10605 (the_go32_nat_target): New.
10606 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10607 (go32_store_registers, go32_xfer_partial, go32_files_info)
10608 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10609 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10610 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10611 (go32_pid_to_str): Refactor as methods of go32_nat_target.
10612 (go32_target): Delete.
10613 (_initialize_go32_nat): Adjust to C++ification.
10614
10615 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10616 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10617 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10618 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10619 gnu_nat_target.
10620 (gnu_target): Delete.
10621 * gnu-nat.h (gnu_target): Delete.
10622 (gnu_nat_target): New class.
10623 * i386-gnu-nat.c (gnu_base_target): New.
10624 (i386_gnu_nat_target): New class.
10625 (the_i386_gnu_nat_target): New.
10626 (_initialize_i386gnu_nat): Adjust to C++ification.
10627
10628 2018-05-02 Pedro Alves <palves@redhat.com>
10629
10630 * bfd-target.c (target_bfd_xclose): Rename to ...
10631 (target_bfd_close): ... this.
10632 (target_bfd_reopen): Adjust.
10633 * target.c (target_close): Remove references to to_xclose.
10634 * target.h (target_ops::to_xclose): Delete.
10635 (target_ops::to_close): Update comments.
10636
10637 2018-05-02 Pedro Alves <palves@redhat.com>
10638
10639 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10640 "linux-nat.h".
10641 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10642 * inf-ptrace.c (inf_ptrace_register_u_offset)
10643 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10644 (inf_ptrace_store_register, inf_ptrace_store_registers)
10645 (inf_ptrace_trad_target): Move to ...
10646 * linux-nat-trad.c: ... this new file.
10647 * linux-nat-trad.h: New file.
10648 * linux-nat.c (linux_target_install_ops): Make extern.
10649 (linux_trad_target): Delete.
10650 * linux-nat.h (linux_trad_target): Delete declaration.
10651 (linux_target_install_ops): Declare.
10652 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10653 "linux-nat.h".
10654
10655 2018-05-02 Pedro Alves <palves@redhat.com>
10656
10657 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10658 procfs_target/add_target here.
10659 * procfs.c (procfs_target): Make static.
10660 (_initialize_procfs): Call add_target here.
10661 * procfs.h (struct target_ops): Remove forward declaration.
10662 (procfs_target): Remove declaration.
10663 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10664
10665 2018-05-02 Pedro Alves <palves@redhat.com>
10666
10667 * procfs.c (procfs_stopped_by_watchpoint)
10668 (procfs_insert_watchpoint, procfs_remove_watchpoint)
10669 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10670 Forward declare.
10671 (procfs_use_watchpoints): Delete, move contents...
10672 (procfs_target): ... here.
10673 * procfs.h (procfs_use_watchpoints): Delete declaration.
10674 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10675 procfs_use_watchpoints.
10676 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10677 procfs_use_watchpoints.
10678
10679 2018-05-02 Tom Tromey <tom@tromey.com>
10680
10681 PR python/20084:
10682 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10683 and var_zuinteger_unlimited.
10684 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10685 and PARAM_ZUINTEGER_UNLIMITED.
10686 (set_parameter_value): Handle var_zuinteger and
10687 var_zuinteger_unlimited.
10688 (add_setshow_generic): Likewise.
10689 (parmpy_init): Likewise.
10690
10691 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
10692
10693 PR rust/23124
10694 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10695 pointer is not null before dereferencing it.
10696
10697 2018-04-30 Tom Tromey <tom@tromey.com>
10698
10699 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10700 is_mi_like_p.
10701
10702 2018-04-30 Tom Tromey <tom@tromey.com>
10703
10704 * breakpoint.c (mention): Remove use of is_mi_like_p.
10705 (print_mention_ranged_breakpoint): Likewise.
10706 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10707 of is_mi_like_p.
10708
10709 2018-04-30 Tom Tromey <tom@tromey.com>
10710
10711 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10712
10713 2018-04-30 Tom Tromey <tom@tromey.com>
10714
10715 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10716 (info_spu_event_command): Remove some uses of is_mi_like_p.
10717
10718 2018-04-30 Tom Tromey <tom@tromey.com>
10719
10720 * python/py-framefilter.c (py_print_single_arg)
10721 (enumerate_locals, py_print_args, py_print_frame): Remove some
10722 uses of is_mi_like_p.
10723
10724 2018-04-30 Tom Tromey <tom@tromey.com>
10725
10726 * ui-out.c: Update.
10727 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10728 * ui-out.h (ui_out::is_mi_like_p): Now const.
10729 (ui_out::do_is_mi_like_p): Now const.
10730 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10731
10732 2018-04-30 Tom Tromey <tom@tromey.com>
10733
10734 * varobj.c (varobj_set_visualizer): Use new_reference.
10735 * python/python.c (gdbpy_decode_line): Use new_reference.
10736 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10737 new_reference.
10738
10739 2018-04-30 Tom Tromey <tom@tromey.com>
10740
10741 * varobj.c (install_new_value): Use new_reference.
10742 * value.h (value_incref): Return void. Swap intro comment with
10743 value_decref.
10744 * value.c (set_value_parent): Use new_reference.
10745 (value_incref): Return void. Update intro comment.
10746 (release_value): Use new_reference.
10747 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10748
10749 2018-04-30 Tom Tromey <tom@tromey.com>
10750
10751 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10752 * gdb_bfd.h (new_bfd_ref): Remove.
10753 (gdb_bfd_open): Update comment.
10754 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10755 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10756 (gdb_bfd_fdopenr): Use new_reference.
10757 * exec.c (exec_file_attach): Use new_reference.
10758
10759 2018-04-30 Tom Tromey <tom@tromey.com>
10760
10761 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10762 method.
10763
10764 2018-04-30 Tom Tromey <tom@tromey.com>
10765
10766 * jit.c (jit_read_code_entry): Use type_align.
10767 * i386-tdep.c (i386_gdbarch_init): Don't call
10768 set_gdbarch_long_long_align_bit.
10769 * gdbarch.sh: Remove long_long_align_bit.
10770 * gdbarch.c, gdbarch.h: Rebuild.
10771 * arc-tdep.c (arc_type_align): New function.
10772 (arc_gdbarch_init): Use arc_type_align. Don't call
10773 set_gdbarch_long_long_align_bit.
10774
10775 2018-04-30 Tom Tromey <tom@tromey.com>
10776
10777 * rust-lang.c (rust_type_alignment): Remove.
10778 (rust_composite_type): Use type_align.
10779
10780 2018-04-30 Tom Tromey <tom@tromey.com>
10781
10782 * NEWS: Mention Type.align.
10783 * python/py-type.c (typy_get_alignof): New function.
10784 (type_object_getset): Add "alignof".
10785
10786 2018-04-30 Tom Tromey <tom@tromey.com>
10787
10788 PR exp/17095:
10789 * NEWS: Update.
10790 * std-operator.def (UNOP_ALIGNOF): New operator.
10791 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10792 New.
10793 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10794 * c-lang.c (c_op_print_tab): Add alignof.
10795 * c-exp.y (ALIGNOF): New token.
10796 (exp): Add "ALIGNOF" production.
10797 (ident_tokens): Add _Alignof and alignof.
10798
10799 2018-04-30 Tom Tromey <tom@tromey.com>
10800
10801 * i386-tdep.c (i386_type_align): New function.
10802 (i386_gdbarch_init): Update.
10803 * gdbarch.sh (type_align): New method.
10804 * gdbarch.c, gdbarch.h: Rebuild.
10805 * arch-utils.h (default_type_align): Declare.
10806 * arch-utils.c (default_type_align): New function.
10807 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10808 (struct type) <align_log2>: New field.
10809 <instance_flags>: Now a bitfield.
10810 (TYPE_RAW_ALIGN): New macro.
10811 (type_align, type_raw_align, set_type_align): Declare.
10812 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10813 functions.
10814 * dwarf2read.c (quirk_rust_enum): Set type alignment.
10815 (get_alignment, maybe_set_alignment): New functions.
10816 (read_structure_type, read_enumeration_type, read_array_type)
10817 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10818 (read_subrange_type, read_base_type): Set type alignment.
10819
10820 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
10821
10822 * dwarf2read.c (read_index_from_section): Use bool.
10823
10824 2018-04-29 Fabian Groffen <grobian@gentoo.org>
10825
10826 PR gdb/22950
10827 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10828 with #ifdef.
10829
10830 2018-04-29 John Reiser <jreiser@BitWagon.com>
10831
10832 PR build/22873
10833 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10834 last step, and do it atomically.
10835
10836 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
10837
10838 * compile/compile-c-types.c (convert_int, convert_float):
10839 Update for C FE v1.
10840
10841 2018-04-27 Tom Tromey <tom@tromey.com>
10842
10843 PR rust/22545:
10844 * rust-lang.c (rust_inclusive_range_type_p): New function.
10845 (rust_range): Handle inclusive ranges.
10846 (rust_compute_range): Likewise.
10847 * rust-exp.y (struct rust_op) <inclusive>: New field.
10848 (DOTDOTEQ): New constant.
10849 (range_expr): Add "..=" productions.
10850 (operator_tokens): Add "..=" token.
10851 (ast_range): Add "inclusive" parameter.
10852 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10853 ranges.
10854 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10855 bounds values.
10856 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10857 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10858 Update comments.
10859 * expprint.c (print_subexp_standard): Handle new bounds values.
10860 (dump_subexp_body_standard): Likewise.
10861
10862 2018-04-27 Tom Tromey <tom@tromey.com>
10863
10864 * configure: Rebuild.
10865 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10866 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10867 "OVERRIDE".
10868 (class symbol_needs_eval_context): Likewise.
10869 * dwarf2read.c (mock_mapped_index::symbol_name_count)
10870 (mock_mapped_index::symbol_name_at): Use "override". Remove
10871 "virtual".
10872 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10873 "override".
10874 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10875 * aarch64-tdep.c (instruction_reader::read): Use "override".
10876 (instruction_reader_test::read): Likewise.
10877 * arm-tdep.c (instruction_reader::read): Use "override".
10878 (instruction_reader_thumb::read): Likewise.
10879
10880 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
10881
10882 PR remote/9665
10883 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10884 instead of remote_send.
10885 (remote_send): Remove.
10886
10887 2018-04-26 Pedro Alves <palves@redhat.com>
10888
10889 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10890 find_function_start_sal instead of find_pc_line.
10891
10892 2018-04-26 Pedro Alves <palves@redhat.com>
10893
10894 * breakpoint.c (set_breakpoint_location_function): Handle
10895 mst_data_gnu_ifunc.
10896 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10897 * elfread.c (elf_symtab_read): Give data symbols with
10898 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10899 (elf_rel_plt_read): Update comment.
10900 * linespec.c (convert_linespec_to_sals): Handle
10901 mst_data_gnu_ifunc.
10902 (minsym_found): Handle mst_data_gnu_ifunc.
10903 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10904 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10905 * parse.c (find_minsym_type_and_address): Handle
10906 mst_data_gnu_ifunc.
10907 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10908 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10909 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10910 comment.
10911 <mst_data_gnu_ifunc>: New enumerator.
10912
10913 2018-04-26 Pedro Alves <palves@redhat.com>
10914
10915 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10916 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10917 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10918 Handle it.
10919 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10920 (lookup_minimal_symbol_by_pc): Adjust.
10921 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10922 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10923 * minsyms.h (lookup_msym_prefer): New enum.
10924 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10925 parameter by a lookup_msym_prefer parameter.
10926
10927 2018-04-26 Pedro Alves <palves@redhat.com>
10928
10929 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10930 ends in "@plt" instead of looking at the symbol's section.
10931
10932 2018-04-26 Pedro Alves <palves@redhat.com>
10933
10934 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10935 all references.
10936 (find_pc_partial_function_gnu_ifunc): Rename to ...
10937 (find_pc_partial_function): ... this, and remove references to
10938 'is_gnu_ifunc_p'.
10939 (find_pc_partial_function): Delete old implementation.
10940 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10941
10942 2018-04-26 Pedro Alves <palves@redhat.com>
10943
10944 * linespec.c (struct bound_minimal_symbol_search_key): New.
10945 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10946 skip first line if we found a GNU ifunc minimal symbol by name.
10947 (compare_msymbols): Change parameters to work with a destructured
10948 lhs minsym.
10949 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10950 functions.
10951
10952 2018-04-26 Pedro Alves <palves@redhat.com>
10953
10954 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10955 ifunc targets here. Instead, if we have an ifunc minsym, use its
10956 address/name.
10957 (add_location_to_breakpoint): Store the minsym and the objfile in
10958 the breakpoint location.
10959 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10960 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10961 Record the minsym in the sal.
10962 * symtab.h (symtab_and_line) <msymbol>: New field.
10963
10964 2018-04-26 Pedro Alves <palves@redhat.com>
10965
10966 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10967 unless we actually resolved the ifunc.
10968
10969 2018-04-26 Pedro Alves <palves@redhat.com>
10970
10971 * c-exp.y (variable production): Prefer ifunc minsyms over
10972 regular function symbols.
10973 * symtab.c (find_gnu_ifunc): New function.
10974 * minsyms.h (lookup_msym_prefer): New enum.
10975 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10976 parameter by a lookup_msym_prefer parameter.
10977 * symtab.h (find_gnu_ifunc): New declaration.
10978
10979 2018-04-26 Pedro Alves <palves@redhat.com>
10980
10981 * blockframe.c (find_gnu_ifunc_target_type): New function.
10982 (find_function_type): New.
10983 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10984 return a value with a memory address.
10985 (eval_call): For calls to GNU ifunc functions, try to find the
10986 type of the target function from the type that the resolver
10987 returns.
10988 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10989 symbols.
10990 * infcall.c (find_function_return_type): Delete.
10991 (find_function_addr): Add 'function_type' parameter. For calls to
10992 GNU ifunc functions, try to find the type of the target function
10993 from the type that the resolver returns, and return it via
10994 FUNCTION_TYPE.
10995 (call_function_by_hand_dummy): Adjust to use the function type
10996 returned by find_function_addr.
10997 (find_function_addr): Add 'function_type' parameter and move
10998 description here.
10999 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11000 declarations.
11001
11002 2018-04-26 Pedro Alves <palves@redhat.com>
11003
11004 * c-exp.y (variable production): Skip finding an alias for ifunc
11005 symbols.
11006
11007 2018-04-26 Pedro Alves <palves@redhat.com>
11008
11009 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11010
11011 2018-04-25 Pedro Alves <palves@redhat.com>
11012
11013 * infcmd.c (kill_command): Print the pid as string, not the whole
11014 thread's ptid. Add comment. s/has been killed/killed/ in output
11015 message.
11016 * remote.c (remote_detach_1): Print the pid as string, not the
11017 whole thread's ptid.
11018
11019 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11020 Sergio Durigan Junior <sergiodj@redhat.com>
11021 Pedro Alves <palves@redhat.com>
11022
11023 * infcmd.c (kill_command): Print message when inferior has
11024 been killed.
11025 * inferior.c (print_inferior_events): Remove 'static'. Set as
11026 '1'.
11027 (add_inferior): Improve message printed when
11028 'print_inferior_events' is on.
11029 (exit_inferior): Remove message printed when
11030 'print_inferior_events' is on.
11031 (detach_inferior): Improve message printed when
11032 'print_inferior_events' is on.
11033 (initialize_inferiors): Use 'add_inferior_silent' to set
11034 'current_inferior_'.
11035 * inferior.h (print_inferior_events): Declare here as
11036 'extern'.
11037 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11038 '[Detaching...]' messages when 'print_inferior_events' is on.
11039 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
11040 as prefix/suffix for messages. Remove periods. Fix erroneous
11041 'Detaching after fork from child...', replace it by '... from
11042 parent...'.
11043 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11044 prefix/suffix when printing 'Detaching...' messages. Print
11045 them when 'print_inferior_events' is on.
11046 * remote.c (remote_detach_1): Print message when detaching
11047 from inferior and '!is_fork_parent'.
11048
11049 2018-04-24 Tom Tromey <tom@tromey.com>
11050
11051 * cli-out.h: Reindent.
11052
11053 2018-04-24 Tom Tromey <tom@tromey.com>
11054
11055 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11056 (cli_ui_out::do_field_string): Use fputs_filtered.
11057 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11058
11059 2018-04-23 Tom Tromey <tom@tromey.com>
11060
11061 * guile/scm-frame.c (gdbscm_frame_read_var): Use
11062 gdb::unique_xmalloc_ptr.
11063
11064 2018-04-23 Tom Tromey <tom@tromey.com>
11065
11066 * configure: Rebuild.
11067
11068 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
11069
11070 PR gdb/23095
11071 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11072 prepare_for_testing. Set normal_bp to r_debug_state if target
11073 is bsd.
11074
11075 2018-04-21 Pedro Alves <palves@redhat.com>
11076 Rajendra SY <rajendra.sy@gmail.com>
11077
11078 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11079 * remote.c (extended_remote_attach): In all-stop mode, mark the
11080 thread as executing.
11081
11082 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
11083
11084 * thread.c (thread_apply_all_command): Fix comment.
11085 (thread_command): Fix comment.
11086
11087 2018-04-10 Alan Hayward <alan.hayward@arm.com>
11088
11089 * common/tdesc.h (tdesc_create_feature): Remove xml filename
11090 parameter.
11091 * features/aarch64-core.c (create_feature_aarch64_core):
11092 Regenerate.
11093 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11094 Likewise.
11095 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11096 Likewise.
11097 * features/i386/32bit-avx512.c
11098 (create_feature_i386_32bit_avx512): Likewise.
11099 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11100 Likewise.
11101 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11102 Likewise.
11103 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11104 Likewise.
11105 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11106 Likewise.
11107 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11108 Likewise.
11109 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11110 Likewise.
11111 * features/i386/64bit-avx512.c
11112 (create_feature_i386_64bit_avx512): Likewise.
11113 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11114 Likewise.
11115 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11116 Likewise.
11117 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11118 Likewise.
11119 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11120 Likewise.
11121 * features/i386/64bit-segments.c
11122 (create_feature_i386_64bit_segments): Likewise.
11123 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11124 Likewise.
11125 * features/i386/x32-core.c
11126 (create_feature_i386_x32_core): Likewise.
11127 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11128 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11129 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11130 * target-descriptions.c: In generated code, don't pass xml
11131 filename.
11132
11133 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11134
11135 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11136 (print_xml_feature::visit_post): Likewise.
11137 (print_xml_feature::visit): Likewise.
11138 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11139 (print_xml_feature): Add new class.
11140 * regformats/regdat.sh: Null xmltarget on feature targets.
11141 * target-descriptions.c (struct target_desc): Add xmltarget.
11142 (maintenance_check_tdesc_xml_convert): Add unittest function.
11143 (tdesc_get_features_xml): Add function to get xml.
11144 (maintenance_check_xml_descriptions): Test xml generation.
11145 * xml-tdesc.c (string_read_description_xml): Add function.
11146 * xml-tdesc.h (string_read_description_xml): Add declaration.
11147
11148 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11149
11150 * features/Makefile: Add feature marker to targets with new style
11151 target descriptions.
11152 * regformats/aarch64.dat: Regenerate.
11153 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11154 * regformats/i386/amd64-avx-linux.dat: Likewise.
11155 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11156 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11157 * regformats/i386/amd64-linux.dat: Likewise.
11158 * regformats/i386/amd64-mpx-linux.dat: Likewise.
11159 * regformats/i386/amd64.dat: Likewise.
11160 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11161 * regformats/i386/i386-avx-linux.dat: Likewise.
11162 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11163 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11164 * regformats/i386/i386-linux.dat: Likewise.
11165 * regformats/i386/i386-mmx-linux.dat: Likewise.
11166 * regformats/i386/i386-mpx-linux.dat: Likewise.
11167 * regformats/i386/i386.dat: Likewise.
11168 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11169 * regformats/i386/x32-avx-linux.dat: Likewise.
11170 * regformats/i386/x32-linux.dat: Likewise.
11171 * regformats/tic6x-c62x-linux.dat: Likewise.
11172 * regformats/tic6x-c64x-linux.dat: Likewise.
11173 * regformats/tic6x-c64xp-linux.dat: Likewise.
11174 * regformats/regdat.sh: Parse feature marker.
11175
11176 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11177
11178 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11179 (tdesc_osabi_name): Likewise.
11180 * target-descriptions.c (tdesc_architecture_name): Add new
11181 function.
11182 (tdesc_osabi_name): Likewise.
11183
11184 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11185
11186 * common/tdesc.c (tdesc_predefined_type): Move to here.
11187 (tdesc_named_type): Likewise.
11188 (tdesc_create_vector): Likewise.
11189 (tdesc_create_struct): Likewise.
11190 (tdesc_set_struct_size): Likewise.
11191 (tdesc_create_union): Likewise.
11192 (tdesc_create_flags): Likewise.
11193 (tdesc_create_enum): Likewise.
11194 (tdesc_add_field): Likewise.
11195 (tdesc_add_typed_bitfield): Likewise.
11196 (tdesc_add_bitfield): Likewise.
11197 (tdesc_add_flag): Likewise.
11198 (tdesc_add_enum_value): Likewise.
11199 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11200 (struct tdesc_type_vector): Likewise.
11201 (struct tdesc_type_field): Likewise.
11202 (struct tdesc_type_with_fields): Likewise.
11203 (tdesc_create_enum): Add declaration.
11204 (tdesc_add_typed_bitfield): Likewise.
11205 (tdesc_add_enum_value): Likewise.
11206 * target-descriptions.c (tdesc_type_field): Move from here.
11207 (tdesc_type_builtin): Likewise.
11208 (tdesc_type_vector): Likewise.
11209 (tdesc_type_with_fields): Likewise.
11210 (tdesc_predefined_types): Likewise.
11211 (tdesc_named_type): Likewise.
11212 (tdesc_create_vector): Likewise.
11213 (tdesc_create_struct): Likewise.
11214 (tdesc_set_struct_size): Likewise.
11215 (tdesc_create_union): Likewise.
11216 (tdesc_create_flags): Likewise.
11217 (tdesc_create_enum): Likewise.
11218 (tdesc_add_field): Likewise.
11219 (tdesc_add_typed_bitfield): Likewise.
11220 (tdesc_add_bitfield): Likewise.
11221 (tdesc_add_flag): Likewise.
11222 (tdesc_add_enum_value): Likewise.
11223 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11224 (tdesc_add_typed_bitfield): Likewise.
11225 (tdesc_add_enum_value): Likewise.
11226
11227 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11228
11229 * common/tdesc.c (tdesc_feature::accept): Move to here.
11230 (tdesc_feature::operator==): Likewise.
11231 (tdesc_create_reg): Likewise.
11232 * common/tdesc.h (tdesc_type_kind): Likewise.
11233 (struct tdesc_type): Likewise.
11234 (struct tdesc_feature): Likewise.
11235 * regformats/regdat.sh: Create a feature.
11236 * target-descriptions.c (tdesc_type_kind): Move from here.
11237 (tdesc_type): Likewise.
11238 (tdesc_type_up): Likewise.
11239 (tdesc_feature): Likewise.
11240 (tdesc_create_reg): Likewise.
11241
11242 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11243
11244 * Makefile.in: Add arch/tdesc.c
11245 * common/tdesc.c: New file.
11246 * common/tdesc.h (tdesc_element_visitor): Move to here.
11247 (tdesc_element): Likewise.
11248 (tdesc_reg): Likewise.
11249 (tdesc_reg_up): Likewise.
11250 * regformats/regdef.h (reg): Add offset to constructors.
11251 * target-descriptions.c (tdesc_element_visitor): Move from here.
11252 (tdesc_element): Likewise.
11253 (tdesc_reg): Likewise.
11254 (tdesc_reg_up): Likewise.
11255
11256 2018-04-17 Tom Tromey <tom@tromey.com>
11257
11258 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11259 discriminant field.
11260
11261 2018-04-17 Tom Tromey <tom@tromey.com>
11262
11263 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11264
11265 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
11266
11267 * symtab.c (print_symbol_info): Skip printing filename and line
11268 number when `last' is NULL.
11269 (symtab_symbol_info): Use empty string instead of NULL for first
11270 invocation of print_symbol_info.
11271 (rbreak_command): Pass NULL to `last' parameter of
11272 print_symbol_info.
11273
11274 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
11275
11276 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11277 instead of nullptr.
11278
11279 2018-04-16 Pedro Alves <palves@redhat.com>
11280
11281 * MAINTAINERS (sh): Remove.
11282 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11283 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11284 (ALLDEPFILES): Remove sh64-tdep.c.
11285 * NEWS: Mentions that support for SH-5/SH64 is removed.
11286 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11287 (sh*-*-openbsd*): Ditto.
11288 (sh64-*-elf*): Remove.
11289 (sh*): Remove.
11290 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11291 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11292 * sh-tdep.c: No longer include "sh64-tdep.h".
11293 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11294 * sh64-tdep.c, sh64-tdep.h: Remove files.
11295
11296 2018-04-16 Pedro Alves <palves@redhat.com>
11297
11298 * MAINTAINERS: Remove m88k.
11299 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11300 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11301 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11302 * NEWS: Mention that support for m88k was removed.
11303 * configure.host (m88*-*-*): Remove support.
11304 * configure.nat (m88k-*-*): Remove support.
11305 * configure.tgt (m88*-*-openbsd*): Remove.
11306 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11307
11308 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
11309
11310 * configure.tgt (x86_tobjs): New variable.
11311 (amd64_tobjs, i386_tobjs): Use it.
11312
11313 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11314
11315 * symtab.c (print_symbol_info): Precede the symbol definition by
11316 the line number when available.
11317 * NEWS: Advertise this enhancement.
11318
11319 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11320
11321 * NEWS (New options): announce set/show record btrace cpu.
11322 * btrace.c: Include record-btrace.h.
11323 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11324 the vendor is unknown.
11325 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
11326 Maybe overwrite the btrace configuration's cpu.
11327 (btrace_compute_ftrace): Add cpu parameter. Update callers.
11328 (btrace_fetch): Add cpu parameter. Update callers.
11329 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11330 Maybe overwrite the btrace configuration's cpu. Skip enabling
11331 errata workarounds if the vendor is unknown.
11332 * python/py-record-btrace.c: Include record-btrace.h.
11333 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11334 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11335 * record-btrace.c (record_btrace_cpu_state_kind): New.
11336 (record_btrace_cpu): New.
11337 (set_record_btrace_cpu_cmdlist): New.
11338 (record_btrace_get_cpu): New.
11339 (require_btrace_thread, record_btrace_info)
11340 (record_btrace_resume_thread): Call record_btrace_get_cpu.
11341 (cmd_set_record_btrace_cpu_none): New.
11342 (cmd_set_record_btrace_cpu_auto): New.
11343 (cmd_set_record_btrace_cpu): New.
11344 (cmd_show_record_btrace_cpu): New.
11345 (_initialize_record_btrace): Initialize set/show record btrace cpu
11346 commands.
11347 * record-btrace.h (record_btrace_get_cpu): New.
11348
11349 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11350
11351 * record.c (set_record_command): Fix typo in message.
11352
11353 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11354
11355 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11356
11357 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11358
11359 * infrun.c (process_event_stop_test): Call
11360 gdbarch_in_indirect_branch_thunk.
11361 * gdbarch.sh (in_indirect_branch_thunk): New.
11362 * gdbarch.c: Regenerated.
11363 * gdbarch.h: Regenerated.
11364 * x86-tdep.h: New.
11365 * x86-tdep.c: New.
11366 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11367 (HFILES_NO_SRCDIR): Add x86-tdep.h.
11368 (ALLDEPFILES): Add x86-tdep.c.
11369 * arch-utils.h (default_in_indirect_branch_thunk): New.
11370 * arch-utils.c (default_in_indirect_branch_thunk): New.
11371 * i386-tdep: Include x86-tdep.h.
11372 (i386_in_indirect_branch_thunk): New.
11373 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11374 function.
11375 * amd64-tdep: Include x86-tdep.h.
11376 (amd64_in_indirect_branch_thunk): New.
11377 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11378
11379 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11380
11381 PR gdb/23053
11382 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11383 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11384 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11385 regression.
11386
11387 2018-04-12 Tom Tromey <tom@tromey.com>
11388
11389 * rust-lang.c (rust_print_struct_def): Remove univariant code.
11390 (rust_evaluate_subexp): Likewise.
11391
11392 2018-04-12 Pedro Alves <palves@redhat.com>
11393
11394 * procfs.c (procfs_detach): Make forward declaration's prototype
11395 match definition's protototype.
11396 (proc_get_LDT_entry): Remove stale do_cleanups call.
11397
11398 2018-04-12 Pedro Alves <palves@redhat.com>
11399
11400 * target.h (target_ops::to_has_exited): Delete.
11401 (target_has_exited): Delete.
11402 * target-delegates.c: Regenerate.
11403
11404 2018-04-11 Pedro Alves <palves@redhat.com>
11405
11406 * target.c (fileio_fh_t::t): Add comment.
11407 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11408 (target_fileio_close): Handle a NULL target.
11409 (invalidate_fileio_fh): New.
11410 (target_close): Call it.
11411 * remote.c (remote_hostio_send_command): No longer check whether
11412 remote_desc is open.
11413
11414 2018-04-11 Pedro Alves <palves@redhat.com>
11415
11416 * target.c (fileio_fh_t): Make it a named struct instead of a
11417 typedef.
11418 (fileio_fh_t::is_closed): New method.
11419 (DEF_VEC_O (fileio_fh_t)): Remove.
11420 (fileio_fhandles): Now a std::vector.
11421 (is_closed_fileio_fh): Delete.
11422 (acquire_fileio_fd): Adjust. Rename parameters.
11423 (release_fileio_fd): Adjust.
11424 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11425 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11426 (target_fileio_close): Adjust.
11427
11428 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
11429
11430 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11431 index.
11432
11433 2018-04-10 Pedro Alves <palves@redhat.com>
11434
11435 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11436 (scoped_finish_thread_state): New class.
11437 * infcmd.c (run_command_1): Use it instead of finish_thread_state
11438 cleanup.
11439 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11440 (fetch_inferior_event, normal_stop): Likewise.
11441 * thread.c (finish_thread_state_cleanup): Delete.
11442
11443 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11444 Pedro Alves <palves@redhat.com>
11445
11446 * value.c: Include "selftest.h" and "common/array-view.h".
11447 (struct range) <operator ==>: New.
11448 (test_ranges_contain): New.
11449 (check_ranges_vector): New.
11450 (test_insert_into_bit_range_vector): New.
11451 (_initialize_values): Register selftests.
11452 * common/array-view.h (operator==, operator!=): New.
11453
11454 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11455
11456 * common/gdb_vecs.h (unordered_remove): Add overload that takes
11457 an iterator.
11458 * inline-frame.c: Include <algorithm>.
11459 (struct inline_state): Add constructor.
11460 (inline_state_s): Remove.
11461 (DEF_VEC_O(inline_state_s)): Remove.
11462 (inline_states): Change type to std::vector.
11463 (find_inline_frame_state): Adjust to std::vector.
11464 (allocate_inline_frame_state): Remove.
11465 (clear_inline_frame_state): Adjust to std::vector.
11466 (skip_inline_frames): Adjust to std::vector.
11467
11468 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11469
11470 * tracepoint.h (struct trace_state_variable): Add constructor.
11471 <name>: Change type to std::string.
11472 * tracepoint.c (tsv_s): Remove.
11473 (DEF_VEC_O(tsv_s)): Remove.
11474 (tvariables): Change to std::vector.
11475 (create_trace_state_variable): Adjust to std::vector.
11476 (find_trace_state_variable): Likewise.
11477 (find_trace_state_variable_by_number): Likewise.
11478 (delete_trace_state_variable): Likewise.
11479 (trace_variable_command): Adjust to std::string.
11480 (delete_trace_variable_command): Likewise.
11481 (tvariables_info_1): Adjust to std::vector.
11482 (save_trace_state_variables): Likewise.
11483 (start_tracing): Likewise.
11484 (merge_uploaded_trace_state_variables): Adjust to std::vector
11485 and std::string.
11486 * target.h (struct target_ops)
11487 <to_download_trace_state_variable>: Pass reference to
11488 trace_state_variable.
11489 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11490 * target-delegates.c: Re-generate.
11491 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11492 (mi_tsv_deleted): Likewise.
11493 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11494 * remote.c (remote_download_trace_state_variable): Change
11495 pointer to reference and adjust.
11496 * make-target-delegates (parse_argtypes): Handle references.
11497 (write_function_header): Likewise.
11498 (munge_type): Likewise.
11499
11500 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11501
11502 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11503 string_view-selftests.c.
11504 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11505 testsuite.
11506 * unittests/basic_string_view/cons/char/1.cc: Likewise.
11507 * unittests/basic_string_view/cons/char/2.cc: Likewise.
11508 * unittests/basic_string_view/cons/char/3.cc: Likewise.
11509 * unittests/basic_string_view/element_access/char/1.cc:
11510 Likewise.
11511 * unittests/basic_string_view/element_access/char/empty.cc:
11512 Likewise.
11513 * unittests/basic_string_view/element_access/char/front_back.cc:
11514 Likewise.
11515 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11516 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11517 Likewise.
11518 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11519 Likewise.
11520 * unittests/basic_string_view/modifiers/swap/char/1.cc:
11521 Likewise.
11522 * unittests/basic_string_view/operations/compare/char/1.cc:
11523 Likewise.
11524 * unittests/basic_string_view/operations/compare/char/13650.cc:
11525 Likewise.
11526 * unittests/basic_string_view/operations/copy/char/1.cc:
11527 Likewise.
11528 * unittests/basic_string_view/operations/data/char/1.cc:
11529 Likewise.
11530 * unittests/basic_string_view/operations/find/char/1.cc:
11531 Likewise.
11532 * unittests/basic_string_view/operations/find/char/2.cc:
11533 Likewise.
11534 * unittests/basic_string_view/operations/find/char/3.cc:
11535 Likewise.
11536 * unittests/basic_string_view/operations/find/char/4.cc:
11537 Likewise.
11538 * unittests/basic_string_view/operations/rfind/char/1.cc:
11539 Likewise.
11540 * unittests/basic_string_view/operations/rfind/char/2.cc:
11541 Likewise.
11542 * unittests/basic_string_view/operations/rfind/char/3.cc:
11543 Likewise.
11544 * unittests/basic_string_view/operations/substr/char/1.cc:
11545 Likewise.
11546 * unittests/basic_string_view/operators/char/2.cc: Likewise.
11547 * unittests/string_view-selftests.c: New file.
11548
11549 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11550
11551 * unittests/basic_string_view/capacity/1.cc: New file.
11552 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11553 * unittests/basic_string_view/cons/char/1.cc: New file.
11554 * unittests/basic_string_view/cons/char/2.cc: New file.
11555 * unittests/basic_string_view/cons/char/3.cc: New file.
11556 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11557 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11558 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11559 * unittests/basic_string_view/element_access/char/1.cc: New file.
11560 * unittests/basic_string_view/element_access/char/2.cc: New file.
11561 * unittests/basic_string_view/element_access/char/empty.cc: New file.
11562 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11563 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11564 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11565 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11566 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11567 * unittests/basic_string_view/include.cc: New file.
11568 * unittests/basic_string_view/inserters/char/1.cc: New file.
11569 * unittests/basic_string_view/inserters/char/2.cc: New file.
11570 * unittests/basic_string_view/inserters/char/3.cc: New file.
11571 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11572 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11573 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11574 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11575 * unittests/basic_string_view/literals/types.cc: New file.
11576 * unittests/basic_string_view/literals/values.cc: New file.
11577 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11578 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11579 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11580 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11581 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11582 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11583 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11584 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11585 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11586 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11587 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11588 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11589 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11590 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11591 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11592 * unittests/basic_string_view/operations/data/char/1.cc: New file.
11593 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11594 * unittests/basic_string_view/operations/find/char/1.cc: New file.
11595 * unittests/basic_string_view/operations/find/char/2.cc: New file.
11596 * unittests/basic_string_view/operations/find/char/3.cc: New file.
11597 * unittests/basic_string_view/operations/find/char/4.cc: New file.
11598 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11599 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11600 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11601 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11602 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11603 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11604 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11605 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11606 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11607 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11608 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11609 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11610 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11611 * unittests/basic_string_view/operators/char/2.cc: New file.
11612 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11613 * unittests/basic_string_view/range_access/char/1.cc: New file.
11614 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11615 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11616 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11617 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11618 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11619 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11620 * unittests/basic_string_view/requirements/typedefs.cc: New file.
11621 * unittests/basic_string_view/typedefs.cc: New file.
11622 * unittests/basic_string_view/types/1.cc: New file.
11623
11624 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11625
11626 * common/gdb_string_view.h: Remove libstdc++ implementation
11627 details, adjust to gdb reality.
11628 * common/gdb_string_view.tcc: Likewise.
11629 * cli/cli-script.c (struct string_view): Remove.
11630 (user_args) <m_args>: Change element type to gdb::string_view.
11631 (user_args::insert_args): Adjust.
11632
11633 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11634
11635 * common/gdb_string_view.h: New file.
11636 * common/gdb_string_view.tcc: New file.
11637
11638 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11639
11640 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11641 * configure: Re-generate.
11642
11643 2018-04-09 Pedro Alves <palves@redhat.com>
11644
11645 * gdbarch.sh: Include "observable.h" instead of "observer.h".
11646 (set_target_gdbarch): Call
11647 gdb::observers::architecture_changed.notify instead of
11648 observer_notify_architecture_changed.
11649
11650 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11651
11652 * tracepoint.c (struct current_traceframe_cleanup): Remove.
11653 (do_restore_current_traceframe_cleanup): Remove.
11654 (restore_current_traceframe_cleanup_dtor): Remove.
11655 (make_cleanup_restore_current_traceframe): Remove.
11656 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11657 New.
11658 * tracepoint.h (struct scoped_restore_current_traceframe): New.
11659 * infrun.c (fetch_inferior_event): Use
11660 scoped_restore_current_traceframe.
11661
11662 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11663
11664 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11665 Remove.
11666 <n_allocated_type_units>: Remove.
11667 <all_type_units>: Change to std::vector.
11668 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11669 to std::vector change.
11670 (dwarf2_per_objfile::get_cutu): Likewise.
11671 (dwarf2_per_objfile::get_tu): Likewise.
11672 (create_signatured_type_table_from_index): Likewise.
11673 (create_signatured_type_table_from_debug_names): Likewise.
11674 (dw2_symtab_iter_next): Likewise.
11675 (dw2_print_stats): Likewise.
11676 (dw2_expand_all_symtabs): Likewise.
11677 (dw2_expand_marked_cus): Likewise.
11678 (dw2_debug_names_iterator::next): Likewise.
11679 (dwarf2_initialize_objfile): Likewise.
11680 (add_signatured_type_cu_to_table): Likewise.
11681 (create_all_type_units): Likewise.
11682 (add_type_unit): Likewise.
11683 (struct tu_abbrev_offset): Add constructor.
11684 (build_type_psymtabs_1): Adjust to std::vector change.
11685 (print_tu_stats): Likewise.
11686 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11687 (write_debug_names): Likewise.
11688
11689 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11690
11691 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11692 Make an std::vector.
11693 <n_comp_units>: Remove.
11694 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11695 to std::vector change.
11696 (dwarf2_per_objfile::get_cutu): Likewise.
11697 (dwarf2_per_objfile::get_cu): Likewise.
11698 (create_cus_from_index): Likewise.
11699 (create_addrmap_from_index): Likewise.
11700 (create_addrmap_from_aranges): Likewise.
11701 (dwarf2_read_index): Likewise.
11702 (dw2_find_last_source_symtab): Likewise.
11703 (dw2_map_symtabs_matching_filename): Likewise.
11704 (dw2_symtab_iter_next): Likewise.
11705 (dw2_print_stats): Likewise.
11706 (dw2_expand_all_symtabs): Likewise.
11707 (dw2_expand_symtabs_with_fullname): Likewise.
11708 (dw2_expand_marked_cus): Likewise.
11709 (dw2_map_symbol_filenames): Likewise.
11710 (create_cus_from_debug_names): Likewise.
11711 (dwarf2_read_debug_names): Likewise.
11712 (dw2_debug_names_iterator::next): Likewise.
11713 (dwarf2_initialize_objfile): Likewise.
11714 (set_partial_user): Likewise.
11715 (dwarf2_build_psymtabs_hard): Likewise.
11716 (read_comp_units_from_section): Remove arguments, adjust to
11717 std::vector change.
11718 (create_all_comp_units): Adjust to std::vector and
11719 read_comp_units_from_section changes.
11720 (dwarf2_find_containing_comp_unit): Adjust to std::vector
11721 change.
11722 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11723 (psyms_seen_size): Likewise.
11724 (write_gdbindex): Likewise.
11725 (write_debug_names): Likewise.
11726
11727 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11728
11729 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11730 with dwarf2_per_objfile.
11731 (create_cus_from_index): Likewise.
11732 (create_signatured_type_table_from_index): Likewise.
11733 (dwarf2_read_index): Likewise.
11734 (dwarf2_initialize_objfile): Likewise.
11735 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
11736 per_cu rather than get_dwarf2_per_objfile.
11737
11738 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11739
11740 * dwarf2read.h (struct signatured_type): Forward declare.
11741 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11742 New methods.
11743 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11744 (dw2_get_cutu): ...this.
11745 (dwarf2_per_objfile::get_cu): Rename from...
11746 (dw2_get_cu): ...this.
11747 (dwarf2_per_objfile::get_tu): New.
11748 (create_addrmap_from_index): Adjust.
11749 (create_addrmap_from_aranges): Adjust.
11750 (dw2_find_last_source_symtab): Adjust.
11751 (dw2_map_symtabs_matching_filename): Adjust.
11752 (dw2_symtab_iter_next): Adjust.
11753 (dw2_print_stats): Adjust.
11754 (dw2_expand_all_symtabs): Adjust.
11755 (dw2_expand_symtabs_with_fullname): Adjust.
11756 (dw2_expand_marked_cus): Adjust.
11757 (dw_expand_symtabs_matching_file_matcher): Adjust.
11758 (dw2_map_symbol_filenames): Adjust.
11759 (dw2_debug_names_iterator::next): Adjust.
11760 (dwarf2_initialize_objfile): Adjust.
11761 (set_partial_user): Adjust.
11762 (dwarf2_build_psymtabs_hard): Adjust.
11763
11764 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11765
11766 * dwarf2read.c (create_signatured_type_table_from_debug_names):
11767 Remove unused variables.
11768 (dw2_map_symtabs_matching_filename): Likewise.
11769 (dwarf2_record_block_ranges): Likewise.
11770 (dwarf2_read_addr_index): Likewise.
11771 (follow_die_offset): Likewise.
11772
11773 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11774
11775 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11776 to symbol_file_add_main.
11777
11778 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11779
11780 PR mi/22299
11781 * mi/mi-console.c (do_fputc_async_safe): New.
11782 (mi_console_file::write_async_safe): New.
11783 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11784 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11785 New.
11786 * ui-file.c (ui_file::putstrn): Adjust call to
11787 fputstrn_unfiltered.
11788 * utils.c (printchar): Replace do_fputs and do_fprintf
11789 parameters by do_fputc.
11790 (fputstr_filtered): Adjust call to printchar.
11791 (fputstr_unfiltered): Likewise.
11792 (fputstrn_filtered): Likewise.
11793 (fputstrn_unfiltered): Add do_fputc parameter, pass to
11794 printchar.
11795 * utils.h (do_fputc_ftype): New typedef.
11796 (fputstrn_unfiltered): Add do_fputc parameter.
11797
11798 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11799
11800 * regformats/i386/i386-avx.dat: Remove.
11801
11802 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11803
11804 PR gdb/22979
11805 * amd64-tdep.c (amd64_none_init_abi): New function.
11806 (amd64_x32_none_init_abi): New function.
11807 (_initialize_amd64_tdep): Register handlers for x86-64 and
11808 x64_32 with GDB_OSABI_NONE.
11809 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11810 GDB_OSABI_NONE osabi.
11811
11812 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11813
11814 PR gdb/22980
11815 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11816 GDB_OSABI_NONE.
11817 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11818 * osabi.c (gdb_osabi_names): Add "unknown" entry.
11819
11820 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11821
11822 * common/byte-vector.h (char_vector): New type.
11823 * target.h (target_read_alloc): Return
11824 gdb::optional<byte_vector>.
11825 (target_read_stralloc): Return gdb::optional<char_vector>.
11826 (target_get_osdata): Return gdb::optional<char_vector>.
11827 * target.c (target_read_alloc_1): Templatize. Replacement
11828 manual memory management with vector.
11829 (target_read_alloc): Change return type, adjust.
11830 (target_read_stralloc): Change return type, adjust.
11831 (target_get_osdata): Change return type, adjust.
11832 * auxv.c (struct auxv_info) <length>: Remove.
11833 <data>: Change type to gdb::optional<byte_vector>.
11834 (auxv_inferior_data_cleanup): Free auxv_info with delete.
11835 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11836 (target_auxv_search): Adjust.
11837 (fprint_target_auxv): Adjust.
11838 * avr-tdep.c (avr_io_reg_read_command): Adjust.
11839 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11840 (linux_make_corefile_notes): Adjust.
11841 * osdata.c (get_osdata): Adjust.
11842 * remote.c (remote_get_threads_with_qxfer): Adjust.
11843 (remote_memory_map): Adjust.
11844 (remote_traceframe_info): Adjust.
11845 (btrace_read_config): Adjust.
11846 (remote_read_btrace): Adjust.
11847 (remote_pid_to_exec_file): Adjust.
11848 * solib-aix.c (solib_aix_get_library_list): Adjust.
11849 * solib-dsbt.c (decode_loadmap): Don't free buf.
11850 (dsbt_get_initial_loadmaps): Adjust.
11851 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11852 * solib-target.c (solib_target_current_sos): Adjust.
11853 * tracepoint.c (sdata_make_value): Adjust.
11854 * xml-support.c (xinclude_start_include): Adjust.
11855 (xml_fetch_content_from_file): Adjust.
11856 * xml-support.h (xml_fetch_another): Change return type.
11857 (xml_fetch_content_from_file): Change return type.
11858 * xml-syscall.c (xml_init_syscalls_info): Adjust.
11859 * xml-tdesc.c (file_read_description_xml): Adjust.
11860 (fetch_available_features_from_target): Change return type.
11861 (target_fetch_description_xml): Adjust.
11862 (target_read_description_xml): Adjust.
11863
11864 2018-04-06 Tom Tromey <tom@tromey.com>
11865
11866 * value.c (~value): Update.
11867 (struct value) <contents>: Now unique_xmalloc_ptr.
11868 (value_contents_bits_eq, allocate_value_contents)
11869 (value_contents_raw, value_contents_all_raw)
11870 (value_contents_for_printing, value_contents_for_printing_const)
11871 (set_value_enclosing_type): Update.
11872
11873 2018-04-06 Tom Tromey <tom@tromey.com>
11874
11875 * value.c (range_s): Remove typedef, VEC.
11876 (struct range): Add operator<.
11877 (range_lessthan): Remove.
11878 (ranges_contain): Change type.
11879 (~value): Update.
11880 (struct value) <unavailable, optimized_out>: Now std::vector.
11881 (value_entirely_available)
11882 (value_entirely_covered_by_range_vector)
11883 (value_entirely_unavailable, value_entirely_optimized_out):
11884 Update.
11885 (insert_into_bit_range_vector): Change argument type.
11886 (find_first_range_overlap): Likewise.
11887 (struct ranges_and_idx, value_contents_bits_eq)
11888 (require_not_optimized_out, require_available): Update.
11889 (ranges_copy_adjusted): Change argument types.
11890 (value_optimized_out, value_copy, value_fetch_lazy): Update.
11891
11892 2018-04-06 Tom Tromey <tom@tromey.com>
11893
11894 * value.c (~value): Update.
11895 (struct value) <parent>: Now a value_ref_ptr.
11896 (value_parent, set_value_parent, value_address, value_copy):
11897 Update.
11898
11899 2018-04-06 Tom Tromey <tom@tromey.com>
11900
11901 * value.c (struct value): Add constructor, destructor, and member
11902 initializers.
11903 (allocate_value_lazy, value_decref): Update.
11904
11905 2018-04-06 Tom Tromey <tom@tromey.com>
11906
11907 * value.c (struct value) <released, next>: Remove.
11908 (all_values): Now a std::vector.
11909 (allocate_value_lazy): Update.
11910 (value_next): Remove.
11911 (value_mark, value_free_to_mark, release_value)
11912 (value_release_to_mark): Update.
11913
11914 2018-04-06 Tom Tromey <tom@tromey.com>
11915
11916 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11917 (free_value_chain): Remove.
11918 * value.c (free_value_chain): Remove.
11919 (value_release_to_mark): Return a std::vector.
11920 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11921 std::vector.
11922 (check_condition): Update.
11923 * eval.c (fetch_subexp_value): Change "val_chain" to a
11924 std::vector.
11925 * breakpoint.c (update_watchpoint): Update.
11926 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11927
11928 2018-04-06 Tom Tromey <tom@tromey.com>
11929
11930 * value.h (free_all_values): Remove.
11931 * value.c (free_all_values): Remove.
11932
11933 2018-04-06 Tom Tromey <tom@tromey.com>
11934
11935 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11936 (value_history_chain, value_history_count): Remove.
11937 (value_history): New global.
11938 (record_latest_value, access_value_history, show_values)
11939 (preserve_values): Update.
11940
11941 2018-04-06 Tom Tromey <tom@tromey.com>
11942
11943 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11944 * varobj.c (varobj_set_display_format, varobj_set_value)
11945 (install_default_visualizer, construct_visualizer)
11946 (install_new_value, ~varobj, varobj_get_value_type)
11947 (my_value_of_variable, varobj_editable_p): Update.
11948 * c-varobj.c (c_describe_child, c_value_of_variable)
11949 (cplus_number_of_children, cplus_describe_child): Update.
11950 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11951 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11952 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11953
11954 2018-04-06 Tom Tromey <tom@tromey.com>
11955
11956 * printcmd.c (last_examine_address): Change type to
11957 value_ref_ptr.
11958 (do_examine, x_command): Update.
11959
11960 2018-04-06 Tom Tromey <tom@tromey.com>
11961
11962 * value.c (release_value): Update.
11963 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11964 (struct bpstats) <val>: Now a value_ref_ptr.
11965 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11966 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11967 (~watchpoint, print_it_watchpoint, watch_command_1)
11968 (invalidate_bp_value_on_memory_change): Update.
11969
11970 2018-04-06 Tom Tromey <tom@tromey.com>
11971
11972 * varobj.c (varobj_clear_saved_item)
11973 (update_dynamic_varobj_children, install_new_value, ~varobj):
11974 Update.
11975 * value.h (value_incref): Move declaration earlier.
11976 (value_decref): Rename from value_free.
11977 (struct value_ref_policy): New.
11978 (value_ref_ptr): New typedef.
11979 (struct value_deleter): Remove.
11980 (gdb_value_up): Remove typedef.
11981 (release_value): Change return type.
11982 (release_value_or_incref): Remove.
11983 * value.c (set_value_parent): Update.
11984 (value_incref): Change return type.
11985 (value_decref): Rename from value_free.
11986 (value_free_to_mark, free_all_values, free_value_chain): Update.
11987 (release_value): Return value_ref_ptr.
11988 (release_value_or_incref): Remove.
11989 (record_latest_value, set_internalvar, clear_internalvar):
11990 Update.
11991 * stack.c (info_frame_command): Don't call value_free.
11992 * python/py-value.c (valpy_dealloc, valpy_new)
11993 (value_to_value_object): Update.
11994 * printcmd.c (do_examine): Update.
11995 * opencl-lang.c (lval_func_free_closure): Update.
11996 * mi/mi-main.c (register_changed_p): Don't call value_free.
11997 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11998 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11999 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12000 value_free.
12001 * guile/scm-value.c (vlscm_free_value_smob)
12002 (vlscm_scm_from_value): Update.
12003 * frame.c (frame_register_unwind, frame_unwind_register_signed)
12004 (frame_unwind_register_unsigned, get_frame_register_bytes)
12005 (put_frame_register_bytes): Don't call value_free.
12006 * findvar.c (address_from_register): Don't call value_free.
12007 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12008 * dwarf2loc.c (entry_data_value_free_closure)
12009 (value_of_dwarf_reg_entry, free_pieced_value_closure)
12010 (dwarf2_evaluate_loc_desc_full): Update.
12011 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12012 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12013 (~watchpoint, watch_command_1)
12014 (invalidate_bp_value_on_memory_change): Update.
12015 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12016
12017 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
12018
12019 PR gdb/23022
12020 * warning.m4: Add -Wno-error=deprecated-register.
12021 * configure: Re-generate.
12022
12023 2018-04-05 Tom Tromey <tom@tromey.com>
12024
12025 * linespec.h: Remove include of "vec.h".
12026
12027 2018-04-05 Tom Tromey <tom@tromey.com>
12028
12029 * linespec.c (typep): Remove typedef.
12030 (find_methods, find_superclass_methods): Take a std::vector.
12031 (find_method): Use std::vector.
12032
12033 2018-04-05 Tom Tromey <tom@tromey.com>
12034
12035 * utils.c (compare_strings): Remove.
12036 * utils.h (compare_strings): Remove.
12037 * objc-lang.h (find_imps): Update.
12038 * objc-lang.c (find_methods): Take a std::vector.
12039 (uniquify_strings, find_imps): Likewise.
12040 * linespec.c (find_methods): Take a std::vector.
12041 (decode_objc): Use std::vector.
12042 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12043 a std::vector.
12044 (find_method, find_function_symbols): Use std::vector.
12045
12046 2018-04-05 Tom Tromey <tom@tromey.com>
12047
12048 * completer.c (completion_tracker::completion_tracker): Remove
12049 cast.
12050 (completion_tracker::discard_completions): Likewise.
12051 * breakpoint.c (ambiguous_names_p): Remove cast.
12052 * ada-lang.c (_initialize_ada_language): Remove cast.
12053 * utils.h (streq): Update.
12054 (streq_hash): Add new declaration.
12055 * utils.c (streq): Return bool.
12056 (streq_hash): New function.
12057
12058 2018-04-05 Tom Tromey <tom@tromey.com>
12059
12060 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12061 Remove a string copy.
12062
12063 2018-04-05 Tom Tromey <tom@tromey.com>
12064
12065 * linespec.c (filter_results): Use std::vector.
12066 (decode_line_2, decode_line_full): Update.
12067
12068 2018-04-05 Tom Tromey <tom@tromey.com>
12069
12070 * linespec.c (canonical_to_fullform): Return std::string.
12071 (filter_results): Update.
12072 (struct decode_line_2_item): Add constructor.
12073 <fullform, displayform>: Now std::string.
12074 (decode_line_2_compare_items): Now a std::sort comparator.
12075 (decode_line_2): Update.
12076
12077 2018-04-05 Tom Tromey <tom@tromey.com>
12078
12079 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12080 (unexpected_linespec_error): Update.
12081 (linespec_parse_basic, parse_linespec): Update.
12082
12083 2018-04-05 Tom Tromey <tom@tromey.com>
12084
12085 * linespec.c (linespec_parse_basic): Reindent.
12086
12087 2018-04-05 Tom Tromey <tom@tromey.com>
12088
12089 * minsyms.h (iterate_over_minimal_symbols): Update.
12090 * minsyms.c (iterate_over_minimal_symbols): Take a
12091 gdb::function_view.
12092 * linespec.c (struct collect_minsyms): Remove.
12093 (compare_msyms): Now a std::sort comparator.
12094 (add_minsym): Add parameters.
12095 (search_minsyms_for_name): Update. Use std::vector.
12096
12097 2018-04-03 Tom Tromey <tom@tromey.com>
12098
12099 * mipsread.c (read_alphacoff_dynamic_symtab): Use
12100 gdb::byte_vector.
12101
12102 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
12103
12104 * MAINTAINERS (Write After Approval): Add Weimin Pan.
12105
12106 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
12107
12108 PR gdb/16959
12109 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
12110 printing static type.
12111
12112 2018-04-01 Tom Tromey <tom@tromey.com>
12113
12114 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12115 (rs6000_xfer_shared_libraries): Update.
12116
12117 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
12118
12119 * common/gdb_vecs.h (char_ptr): Remove.
12120 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12121
12122 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
12123
12124 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12125 with std::vector.
12126 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12127
12128 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
12129
12130 * tracepoint.h (struct uploaded_tp): Initialize fields.
12131 <actions, step_actions, cmd_strings>: Change type to
12132 std::vector<char *>.
12133 * tracepoint.c (get_uploaded_tp): Allocate with new.
12134 (free_uploaded_tps): Free with delete.
12135 (parse_tracepoint_definition): Adjust to std::vector change.
12136 * breakpoint.c (read_uploaded_action): Likewise.
12137 (create_tracepoint_from_upload): Likewise.
12138 * ctf.c (ctf_write_uploaded_tp): Likewise.
12139 (SET_ARRAY_FIELD): Likewise.
12140 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12141
12142 2018-03-30 Tom Tromey <tom@tromey.com>
12143
12144 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
12145 std::unique_ptr.
12146 (svr4_keep_data_in_core): Update.
12147 (svr4_read_so_list): Update.
12148
12149 2018-03-30 Tom Tromey <tom@tromey.com>
12150
12151 * windows-nat.c (handle_output_debug_string, handle_exception):
12152 Update.
12153 * target.h (target_read_string): Update.
12154 * target.c (target_read_string): Change "string" to
12155 unique_xmalloc_ptr.
12156 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12157 Update.
12158 * solib-frv.c (frv_current_sos): Update.
12159 * solib-dsbt.c (dsbt_current_sos): Update.
12160 * solib-darwin.c (darwin_current_sos): Update.
12161 * linux-thread-db.c (inferior_has_bug): Update.
12162 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12163 Update. Remove alloca.
12164 * ada-lang.c (ada_main_name): Update.
12165
12166 2018-03-30 Tom Tromey <tom@tromey.com>
12167
12168 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12169 (struct dwo_file_deleter): New.
12170 (dwo_file_up): New typedef.
12171 (open_and_init_dwo_file): Use dwo_file_up.
12172 (free_dwo_file_cleanup): Remove.
12173
12174 2018-03-30 Tom Tromey <tom@tromey.com>
12175
12176 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12177 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12178
12179 2018-03-30 Tom Tromey <tom@tromey.com>
12180
12181 * dwarf2read.c (class free_cached_comp_units): New class.
12182 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12183 (free_cached_comp_units): Remove function.
12184
12185 2018-03-30 Tom Tromey <tom@tromey.com>
12186
12187 * utils.h (make_cleanup_unpush_target): Remove.
12188 * inf-ptrace.c (struct target_unpusher): New.
12189 (target_unpush_up) New typedef.
12190 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12191 target_unpush_up.
12192 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12193
12194 2018-03-27 Tom Tromey <tom@tromey.com>
12195
12196 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12197
12198 2018-03-27 Pedro Alves <palves@redhat.com>
12199 Tom Tromey <tom@tromey.com>
12200
12201 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12202 destructor. Now a class.
12203 (gdb_readline_wrapper_cleanup): Remove function.
12204 (gdb_readline_wrapper): Remove cleanups.
12205
12206 2018-03-27 Tom Tromey <tom@tromey.com>
12207
12208 * typeprint.h (struct type_print_options) <local_typedefs,
12209 global_typedefs>: Remove "struct" keyword.
12210 (class typedef_hash_table): New class.
12211 (recursively_update_typedef_hash, add_template_parameters)
12212 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12213 (find_typedef_in_hash): Don't declare.
12214 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12215 (typedef_hash_table::recursively_update): Rename from
12216 recursively_update_typedef_hash. Now a member.
12217 (typedef_hash_table::add_template_parameters): Rename from
12218 add_template_parameters. Now a member.
12219 (typedef_hash_table::typedef_hash_table): Now a constructor;
12220 rename from create_typedef_hash.
12221 (typedef_hash_table::~typedef_hash_table): Now a destructor;
12222 rename from free_typedef_hash.
12223 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12224 (do_free_global_table): Remove.
12225 (typedef_hash_table::typedef_hash_table): New constructor; renamed
12226 from copy_type_recursive.
12227 (create_global_typedef_table): Remove.
12228 (typedef_hash_table::find_global_typedef): Now a member of
12229 typedef_hash_table.
12230 (typedef_hash_table::find_typedef): Rename from
12231 find_typedef_in_hash; now a member.
12232 (whatis_exp): Update.
12233 * extension.h (struct ext_lang_type_printers): Add constructor and
12234 destructor.
12235 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12236 declare.
12237 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12238 Now a constructor; rename from start_ext_lang_type_printers.
12239 (ext_lang_type_printers): Now a destructor; rename from
12240 free_ext_lang_type_printers.
12241 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12242 Update.
12243 (c_type_print_base_struct_union): Update. Remove cleanups.
12244
12245 2018-03-27 Tom Tromey <tom@tromey.com>
12246
12247 * dwarf-index-write.c: Include <cmath>.
12248
12249 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12250
12251 * NEWS: Add entry describing new "set|show varsize-limit" command.
12252 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12253 command.
12254 * printcmd.c (_initialize_printcmd): Add "set var" alias of
12255 "set variable".
12256
12257 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
12258
12259 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12260 dwarf-index-write.c
12261 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12262 * dwarf-index-common.c: New file.
12263 * dwarf-index-common.h: New file.
12264 * dwarf-index-write.c: New file.
12265 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12266 (struct dwarf2_section_info): Move from here.
12267 (dwarf2_section_info_def): Likewise.
12268 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12269 (offset_type): Likewise.
12270 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12271 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12272 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12273 (byte_swap): Likewise.
12274 (MAYBE_SWAP): Likewise.
12275 (dwarf2_per_cu_ptr): Likewise.
12276 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12277 (struct tu_stats): Likewise.
12278 (struct dwarf2_per_objfile): Likewise.
12279 (struct dwarf2_per_cu_data): Likewise.
12280 (struct signatured_type): Likewise.
12281 (sig_type_ptr): Likewise.
12282 (DEF_VEC_P (sig_type_ptr)): Likewise.
12283 (INDEX4_SUFFIX): Likewise.
12284 (INDEX5_SUFFIX): Likewise.
12285 (DEBUG_STR_SUFFIX): Likewise.
12286 (dwarf2_read_section): Make non-static.
12287 (mapped_index_string_hash): Move from here.
12288 (dwarf5_djb_hash): Likewise.
12289 (file_write): Likewise.
12290 (class data_buf): Likewise.
12291 (struct symtab_index_entry): Likewise.
12292 (struct mapped_symtab): Likewise.
12293 (find_slot): Likewise.
12294 (hash_expand): Likewise.
12295 (add_index_entry): Likewise.
12296 (uniquify_cu_indices): Likewise.
12297 (class c_str_view): Likewise.
12298 (class c_str_view_hasher): Likewise.
12299 (class vector_hasher): Likewise.
12300 (write_hash_table): Likewise.
12301 (psym_index_map): Likewise.
12302 (struct addrmap_index_data): Likewise.
12303 (add_address_entry): Likewise.
12304 (add_address_entry_worker): Likewise.
12305 (write_address_map): Likewise.
12306 (symbol_kind): Likewise.
12307 (write_psymbols): Likewise.
12308 (struct signatured_type_index_data): Likewise.
12309 (write_one_signatured_type): Likewise.
12310 (recursively_count_psymbols): Likewise.
12311 (recursively_write_psymbols): Likewise.
12312 (class debug_names): Likewise.
12313 (check_dwarf64_offsets): Likewise.
12314 (psyms_seen_size): Likewise.
12315 (write_gdbindex): Likewise.
12316 (write_debug_names): Likewise.
12317 (assert_file_size): Likewise.
12318 (write_psymtabs_to_index): Likewise.
12319 (save_gdb_index_command): Likewise.
12320 (_initialize_dwarf2_read): Don't register the "save gdb-index"
12321 command.
12322 * dwarf2read.h: New file.
12323
12324 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12325
12326 PR gdb/22670
12327 * dwarf2read.c (dwarf2_physname): Do not return the demangled
12328 symbol name if the CU's language stores symbol names in linkage
12329 format.
12330 * language.h (struct language_defn)
12331 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
12332 all instances of this struct.
12333
12334 2018-03-26 Tom Tromey <tom@tromey.com>
12335
12336 * stack.c (backtrace_command_1): Remove verbose code.
12337
12338 2018-03-26 Tom Tromey <tom@tromey.com>
12339
12340 * python/py-framefilter.c (py_print_type): Don't catch
12341 exceptions. Return void.
12342 (py_print_value): Likewise.
12343 (py_print_single_arg): Likewise.
12344 (enumerate_args): Don't catch exceptions.
12345 (py_print_args): Likewise.
12346 (py_print_frame): Likewise.
12347 (gdbpy_apply_frame_filter): Catch exceptions here.
12348
12349 2018-03-26 Tom Tromey <tom@tromey.com>
12350
12351 * stack.c (_initialize_stack): Remove trailing newlines from help
12352 text. Add "Usage" line to "backtrace" help.
12353
12354 2018-03-26 Tom Tromey <tom@tromey.com>
12355
12356 PR python/16486:
12357 * python/py-framefilter.c (py_print_args): Call wrap_hint.
12358
12359 2018-03-26 Tom Tromey <tom@tromey.com>
12360
12361 * python/py-framefilter.c (py_print_single_arg): Return
12362 EXT_LANG_BT_ERROR from catch.
12363
12364 2018-03-26 Tom Tromey <tom@tromey.com>
12365
12366 PR backtrace/15584:
12367 * stack.c (backtrace_command_1): Move some code into no-filters
12368 "if".
12369
12370 2018-03-26 Tom Tromey <tom@tromey.com>
12371
12372 * python/py-framefilter.c (throw_quit_or_print_exception): New
12373 function.
12374 (gdbpy_apply_frame_filter): Use it.
12375
12376 2018-03-26 Tom Tromey <tom@tromey.com>
12377
12378 PR cli/17716:
12379 * python/py-framefilter.c (py_print_type, py_print_value)
12380 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12381 RETURN_MASK_ERROR.
12382
12383 2018-03-26 Tom Tromey <tom@tromey.com>
12384
12385 * python/py-framefilter.c (enumerate_args): Use
12386 gdb::unique_xmalloc_ptr.
12387
12388 2018-03-26 Tom Tromey <tom@tromey.com>
12389
12390 * python/py-framefilter.c (py_print_frame): Return
12391 EXT_LANG_BT_OK.
12392 (gdbpy_apply_frame_filter): Update comment.
12393 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12394 Remove.
12395 <EXT_LANG_BT_NO_FILTERS>: Change value.
12396
12397 2018-03-26 Tom Tromey <tom@tromey.com>
12398
12399 PR backtrace/15582:
12400 * stack.c (backtrace_command): Parse "hide" argument.
12401 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12402 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12403 constant.
12404
12405 2018-03-26 Tom Tromey <tom@tromey.com>
12406
12407 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12408 add "flags".
12409 (backtrace_command): Remove "fulltrace", add "flags".
12410
12411 2018-03-26 Tom Tromey <tom@tromey.com>
12412
12413 * stack.c (backtrace_command): Rewrite command line parsing.
12414
12415 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12416
12417 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12418
12419 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12420
12421 * filename-seen-cache.h: Add include guard.
12422
12423 2018-03-26 Keith Seitz <keiths@redhat.com>
12424
12425 * symfile.c (place_section): Remove "struct" from section_addr_info
12426 in comment.
12427 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12428 "struct" keyword from section_addr_info.
12429
12430 2018-03-26 Alan Hayward <alan.hayward@arm.com>
12431
12432 * regformats/regdef.h (reg): Add constructors.
12433
12434 2018-03-25 Pedro Alves <palves@redhat.com>
12435
12436 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12437 if then/else bodies in var_func_name extraction.
12438
12439 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
12440
12441 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12442 lookup_minimal_symbol() to find symbol entry.
12443 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12444
12445 2018-03-23 Keith Seitz <keiths@redhat.com>
12446
12447 PR c++/22968
12448 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12449 nested type definitions for C++, too.
12450
12451 2018-03-23 Tom Tromey <tom@tromey.com>
12452
12453 * machoread.c (struct oso_el): Add a constructor. Don't define as
12454 a typedef.
12455 (macho_register_oso): Remove.
12456 (macho_symtab_read): Take a std::vector.
12457 (oso_el_compare_name): Now a std::sort comparator.
12458 (macho_symfile_read_all_oso): Take a std::vector.
12459 (macho_symfile_read): Use std::vector. Remove cleanups.
12460
12461 2018-03-22 Tom Tromey <tom@tromey.com>
12462
12463 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12464 (record_full_goto_bookmark): Use std::string.
12465
12466 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12467
12468 PR tdep/18295
12469 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12470 a single mask.
12471
12472 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12473
12474 * rs6000-tdep.c (store_insn_p): New function.
12475 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12476 and cr_reg to their unshifted values. Use store_insn_p to
12477 match LR saves using either R1 or fdata->alloca_reg. Use
12478 store_insn_p to match CR saves. Set alloca_reg_offset
12479 when alloca_reg and framep are set. Remove lr_reg shift
12480 when assigning to fdata->lr_register.
12481
12482 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
12483
12484 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12485 command line args instead of emitting a warning.
12486
12487 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12488
12489 * tracepoint.h (struct static_tracepoint_marker): Initialize
12490 fields, define default constructor, move constructor and move
12491 assignment, disable the rest.
12492 <str_id, extra>: Make std::string.
12493 (release_static_tracepoint_marker): Remove.
12494 (free_current_marker): Remove.
12495 * tracepoint.c (free_current_marker): Remove.
12496 (parse_static_tracepoint_marker_definition): Adjust to
12497 std::string, use new hex2str overload.
12498 (release_static_tracepoint_marker): Remove.
12499 (print_one_static_tracepoint_marker): Get marker by reference
12500 and adjust to std::string.
12501 (info_static_tracepoint_markers_command): Adjust to std::vector
12502 changes
12503 * target.h (static_tracepoint_marker_p): Remove typedef.
12504 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12505 (struct target_ops) <to_static_tracepoint_marker_at>: Return
12506 bool.
12507 <to_static_tracepoint_markers_by_strid>: Return std::vector.
12508 * target-debug.h
12509 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12510 (target_debug_print_std_vector_static_tracepoint_marker): New.
12511 (target_debug_print_struct_static_tracepoint_marker_p): Rename
12512 to...
12513 (target_debug_print_static_tracepoint_marker_p): ... this.
12514 * target-delegates.c: Re-generate.
12515 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12516 Make std::string.
12517 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12518 (decode_static_tracepoint_spec): Adjust to std::vector.
12519 (tracepoint_print_one_detail): Adjust to std::string.
12520 (strace_marker_decode_location): Adjust to std::string.
12521 (update_static_tracepoint): Adjust to std::string, remove call
12522 to release_static_tracepoint_marker.
12523 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12524 Adjust to std::vector.
12525 * remote.c (remote_static_tracepoint_marker_at): Return bool.
12526 (remote_static_tracepoint_markers_by_strid): Adjust to
12527 std::vector.
12528 * common/rsp-low.h (hex2str): New overload with explicit count
12529 of bytes.
12530 * common/rsp-low.c (hex2str): New overload with explicit count
12531 of bytes.
12532 * unittests/rsp-low-selftests.c (test_hex2str): New function.
12533 (_initialize_rsp_low_selftests): Add test_hex2str test.
12534 * unittests/tracepoint-selftests.c
12535 (test_parse_static_tracepoint_marker_definition): Adjust to
12536 std::string.
12537
12538 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12539
12540 * tracepoint.c (parse_static_tracepoint_marker_definition):
12541 Consider case where the definition is followed by more
12542 definitions.
12543 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12544 tracepoint-selftests.c.
12545 * unittests/tracepoint-selftests.c: New.
12546
12547 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12548
12549 * MAINTAINERS (Write After Approval): Add Pedro Franco de
12550 Carvalho.
12551
12552 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12553
12554 * symtab.c (find_pc_sect_line): fixed indentation.
12555
12556 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12557
12558 * symtab.c (find_pc_sect_line): now uses binary search.
12559
12560 2018-03-19 Tom Tromey <tom@tromey.com>
12561
12562 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12563 "IDENT" production.
12564
12565 2018-03-19 Pedro Alves <palves@redhat.com>
12566 Tom Tromey <tom@tromey.com>
12567
12568 * unittests/observable-selftests.c: New file.
12569 * common/observable.h: New file.
12570 * observable.h: New file.
12571 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12572 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12573 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12574 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12575 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12576 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12577 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12578 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12579 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12580 python/py-breakpoint.c, python/py-finishbreakpoint.c,
12581 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12582 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12583 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12584 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12585 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12586 tui/tui-interp.c, valops.c: Update all users.
12587 * tui/tui-hooks.c (tui_bp_created_observer)
12588 (tui_bp_deleted_observer, tui_bp_modified_observer)
12589 (tui_inferior_exit_observer, tui_before_prompt_observer)
12590 (tui_normal_stop_observer, tui_register_changed_observer):
12591 Remove.
12592 (tui_observers_token): New global.
12593 (attach_or_detach, tui_attach_detach_observers): New functions.
12594 (tui_install_hooks, tui_remove_hooks): Use
12595 tui_attach_detach_observers.
12596 * record-btrace.c (record_btrace_thread_observer): Remove.
12597 (record_btrace_thread_observer_token): New global.
12598 * observer.sh: Remove.
12599 * observer.c: Rename to observable.c.
12600 * observable.c (namespace gdb_observers): Define new objects.
12601 (observer_debug): Move into gdb_observers namespace.
12602 (struct observer, struct observer_list, xalloc_observer_list_node)
12603 (xfree_observer_list_node, generic_observer_attach)
12604 (generic_observer_detach, generic_observer_notify): Remove.
12605 (_initialize_observer): Update.
12606 Don't include observer.inc.
12607 * Makefile.in (generated_files): Remove observer.h, observer.inc.
12608 (clean mostlyclean): Likewise.
12609 (observer.h, observer.inc): Remove targets.
12610 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12611 (COMMON_SFILES): Use observable.c, not observer.c.
12612 * .gitignore: Remove observer.h.
12613
12614 2018-03-18 Tom Tromey <tom@tromey.com>
12615
12616 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12617 gdb::def_vector.
12618 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12619
12620 2018-03-17 Tom Tromey <tom@tromey.com>
12621
12622 * auto-load.c (auto_load_objfile_script_1): Use std::string.
12623
12624 2018-03-17 Tom Tromey <tom@tromey.com>
12625
12626 * target.c (class scoped_target_fd): New.
12627 (target_fileio_close_cleanup): Remove.
12628 (target_fileio_read_alloc_1): Use scoped_target_fd.
12629
12630 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
12631
12632 * silent-rules.mk: New.
12633 * Makefile.in: Include silent-rules.mk
12634 (srcdir, VPATH, top_srcdir): Move up.
12635 (COMPILE): Add ECHO_CXX.
12636 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12637 (init.c): Add ECHO_INIT_C.
12638 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12639 (version.c): Add ECHO_GEN.
12640 (printcmd.o): Add ECHO_CXX.
12641 (target-float.o): Add ECHO_CXX.
12642 (ada-exp.o): Add ECHO_CXX.
12643 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12644 (insight$(EXEEXT)): Add ECHO_CXXLD.
12645 * gnulib/configure.ac: Add AM_SILENT_RULES.
12646 * gnulib/aclocal.m4: Re-generate.
12647 * gnulib/configure: Re-generate.
12648 * gnulib/import/Makefile.in: Re-generate.
12649
12650 2018-03-16 Tom Tromey <tom@tromey.com>
12651
12652 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12653 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12654 * utils.c (do_free_section_addr_info)
12655 (make_cleanup_free_section_addr_info): Remove.
12656 * symfile.h (struct other_sections): Add constructor.
12657 (struct section_addr_info): Remove.
12658 (section_addr_info): New typedef.
12659 (struct sym_fns) <sym_offsets>: Change type of parameter.
12660 (build_section_addr_info_from_objfile)
12661 (relative_addr_info_to_section_offsets, addr_info_make_relative)
12662 (default_symfile_offsets, symbol_file_add)
12663 (symbol_file_add_from_bfd)
12664 (build_section_addr_info_from_section_table): Update.
12665 (alloc_section_addr_info, free_section_addr_info): Don't declare.
12666 * symfile.c (alloc_section_addr_info): Remove.
12667 (build_section_addr_info_from_section_table): Change return type.
12668 Update.
12669 (build_section_addr_info_from_bfd)
12670 (build_section_addr_info_from_objfile): Likewise.
12671 (free_section_addr_info): Remove.
12672 (relative_addr_info_to_section_offsets): Change type of "addrs".
12673 (addrs_section_compar): Now a std::sort comparator.
12674 (addrs_section_sort): Change return type.
12675 (addr_info_make_relative): Change type of "addrs". Update.
12676 (default_symfile_offsets, syms_from_objfile_1)
12677 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12678 (symbol_file_add_separate): Update.
12679 (symbol_file_add): Change type of "addrs". Update.
12680 (add_symbol_file_command): Update. Remove cleanups.
12681 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
12682 cleanups.
12683 * symfile-debug.c (debug_sym_offsets): Change type of "info".
12684 * solib.c (solib_read_symbols): Update.
12685 * objfiles.c (objfile_relocate): Update. Remove cleanups.
12686 * machoread.c (macho_symfile_offsets): Update.
12687 * jit.c (jit_bfd_try_read_symtab): Update.
12688
12689 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
12690
12691 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12692 unittests/utils-selftests.c.
12693 * unittests/utils-selftests.c: New file.
12694
12695 2018-03-14 Tom Tromey <tom@tromey.com>
12696
12697 PR cli/14977:
12698 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12699 for NULL.
12700
12701 2018-03-14 Tom Tromey <tom@tromey.com>
12702
12703 PR cli/19918:
12704 * printcmd.c (printf_pointer): Allow "-" in format.
12705
12706 2018-03-14 Tom Tromey <tom@tromey.com>
12707
12708 * printcmd.c (_initialize_printcmd): Add usage to printf.
12709
12710 2018-03-14 Yao Qi <qiyao@sourceware.org>
12711
12712 * MAINTAINERS: Update my email address.
12713
12714 2018-03-13 Tom Tromey <tom@tromey.com>
12715
12716 * machoread.c (macho_check_dsym): Change filenamep to a
12717 std::string*.
12718 (macho_symfile_read): Update.
12719 * symfile.c (load_command): Use std::string.
12720
12721 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
12722
12723 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12724 to error message string.
12725 (riscv_register_name): Use xsnprintf instead of sprintf.
12726 (riscv_insn::fetch_instruction): Use gdb_assert instead of
12727 internal_error.
12728 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12729 error.
12730 (riscv_push_dummy_call): Likewise.
12731
12732 2018-03-12 Tom Tromey <tom@tromey.com>
12733
12734 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12735 Use gdb::byte_vector.
12736 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12737
12738 2018-03-12 Yao Qi <yao.qi@linaro.org>
12739
12740 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12741 parameter type to readable_regcache.
12742 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12743 the declaration.
12744
12745 2018-03-11 Tom Tromey <tom@tromey.com>
12746
12747 * dwarf2read.c (struct nextfield): Add initializers.
12748 (struct nextfnfield): Remove.
12749 (struct fnfieldlist): Add initializers. Remove "length" and
12750 "head", use std::vector.
12751 (struct decl_field_list): Remove.
12752 (struct field_info): Add initializers.
12753 <fields, baseclasses>: Now std::vector.
12754 <nbaseclasses, nfnfields, typedef_field_list_count,
12755 nested_types_list_count>: Remove.
12756 (dwarf2_add_field, dwarf2_add_type_defn)
12757 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12758 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12759 (process_structure_scope): Update.
12760
12761 2018-03-11 Tom Tromey <tom@tromey.com>
12762
12763 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12764 for use by std::sort.
12765 (build_type_psymtabs_1): Use std::vector.
12766
12767 2018-03-09 Eli Zaretskii <eliz@gnu.org>
12768
12769 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12770 and LIBMPFR in the printed configuration.
12771
12772 2018-03-08 Tom Tromey <tom@tromey.com>
12773
12774 * source.c (get_filename_and_charpos): Use scoped_fd.
12775 * nto-procfs.c (procfs_open_1): Use scoped_fd.
12776 (procfs_pidlist): Likewise.
12777 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12778 (iterate_over_mappings): Likewise.
12779
12780 2018-03-08 Tom Tromey <tom@tromey.com>
12781
12782 * infcall.c (struct call_return_meta_info)
12783 <stack_temporaries_enabled>: Remove.
12784 (get_call_return_value, call_function_by_hand_dummy): Update.
12785 * thread.c (disable_thread_stack_temporaries): Remove.
12786 (enable_thread_stack_temporaries): Remove.
12787 (thread_stack_temporaries_enabled_p): Return bool.
12788 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12789 (get_last_thread_stack_temporary): Update.
12790 * eval.c (evaluate_subexp): Update.
12791 * gdbthread.h (class enable_thread_stack_temporaries): Now a
12792 class, not a function.
12793 (value_ptr, value_vec): Remove typedefs.
12794 (class thread_info) <stack_temporaries_enabled>: Now bool.
12795 <stack_temporaries>: Now a std::vector.
12796 (thread_stack_temporaries_enabled_p)
12797 (value_in_thread_stack_temporaries): Return bool.
12798
12799 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
12800
12801 * remote.c (putpkt_binary): Fix omitted bytes reporting.
12802 (getpkt_or_notif_sane_1): Likewise.
12803
12804 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12805
12806 * build-id.c (build_id_to_debug_bfd): Use std::string.
12807
12808 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12809
12810 * build-id.c (find_separate_debug_file_by_buildid): Return
12811 std::string.
12812 * build-id.h (find_separate_debug_file_by_buildid): Return
12813 std::string.
12814 * coffread.c (coff_symfile_read): Adjust to std::string.
12815 * elfread.c (elf_symfile_read): Adjust to std::string.
12816 * symfile.c (separate_debug_file_exists): Change parameter to
12817 std::string.
12818 (find_separate_debug_file): Return std::string.
12819 (find_separate_debug_file_by_debuglink): Return std::string.
12820 * symfile.h (find_separate_debug_file_by_debuglink): Return
12821 std::string.
12822
12823 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12824
12825 * common/xml-utils.c (xml_escape_text): Move code to...
12826 (xml_escape_text_append): ... this new function.
12827 * common/xml-utils.h (xml_escape_text_append): New declaration.
12828 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12829 New function.
12830 (_initialize_xml_utils): register test_xml_escape_text_append as
12831 a selftest.
12832
12833 2018-03-07 Alan Hayward <alan.hayward@arm.com>
12834
12835 * defs.h: Remove MAX_REGISTER_SIZE.
12836 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12837 asserts.
12838 * python/py-unwind.c (pyuw_sniffer): Likewise.
12839
12840 2018-03-07 Tom Tromey <tom@tromey.com>
12841
12842 * linux-tdep.c (linux_info_proc): Update.
12843 * target.h (struct target_ops) <to_fileio_readlink>: Return
12844 optional<string>.
12845 (target_fileio_readlink): Return optional<string>.
12846 * remote.c (remote_hostio_readlink): Return optional<string>.
12847 * inf-child.c (inf_child_fileio_readlink): Return
12848 optional<string>.
12849 * target.c (target_fileio_readlink): Return optional<string>.
12850
12851 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
12852
12853 * regcache.c (cooked_read_test): Add riscv to the list of
12854 architectures that have a save_reggroup.
12855
12856 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
12857
12858 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12859 value is not a dynamic class object.
12860
12861 2018-03-06 Tom Tromey <tom@tromey.com>
12862
12863 * rust-exp.y: Formatting fixes.
12864
12865 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12866
12867 * riscv-tdep.c (riscv_register_name): Remove target description
12868 support.
12869 (riscv_gdbarch_init): Remove target description check.
12870
12871 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12872
12873 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12874 comment.
12875 * riscv-tdep.h: Likewise.
12876
12877 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12878
12879 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12880 (riscv_pseudo_register_write): Delete.
12881 (riscv_gdbarch_init): Remove all use of pseudo registers.
12882
12883 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12884
12885 * record-btrace.c (btrace_print_lines): Replace cleanup
12886 parameter with RAII equivalents.
12887 (btrace_insn_history): Replace cleanup with RAII equivalents.
12888 * ui-out.h (make_cleanup_ui_out_list_begin_end,
12889 make_cleanup_ui_out_tuple_begin_end): Remove.
12890 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12891 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12892 make_cleanup_ui_out_list_begin_end): Remove.
12893
12894 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12895
12896 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12897 parameter types to std::vector. Use bool.
12898 (record_btrace_wait): Replace VEC(tp_t) with
12899 std::vector<thread_info *>.
12900 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12901
12902 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12903
12904 * record-btrace.c (record_btrace_disable_callback): Remove.
12905 (struct scoped_btrace_disable): New.
12906 (record_btrace_open): Use scoped_btrace_disable.
12907
12908 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12909
12910 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12911 reading values from registers.
12912
12913 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12914
12915 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12916 where appropriate.
12917
12918 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12919
12920 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12921 change parameter type. Use GDB's print functions, and use
12922 core_addr_to_string where appropriate.
12923 (riscv_push_dummy_call): Use core_addr_to_string where
12924 appropriate, update call to riscv_print_arg_location, and reindent
12925 a few lines.
12926 (riscv_return_value): Update call to riscv_print_arg_location.
12927
12928 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12929 Tim Newsome <tim@sifive.com>
12930 Albert Ou <a0u@eecs.berkeley.edu>
12931 Darius Rad <darius@bluespec.com>
12932
12933 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12934 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12935 (ALLDEPFILES): Add riscv-tdep.c
12936 * configure.tgt: Add riscv support.
12937 * riscv-tdep.c: New file.
12938 * riscv-tdep.h: New file.
12939 * NEWS: Mention new target.
12940 * MAINTAINERS: Add entry for riscv.
12941
12942 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12943
12944 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12945 fields within aggregates.
12946
12947 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12948
12949 * record-btrace.c (btrace_print_lines): Change type of flags to
12950 gdb_disassembly_flags.
12951
12952 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12953
12954 * fbsd-nat.c: Include "inf-ptrace.h".
12955 (USE_SIGTRAP_SIGINFO): Conditionally define.
12956 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12957 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12958 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12959 function.
12960 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12961 Likewise.
12962 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12963 Likewise.
12964 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12965 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12966 "supports_stopped_by_hw_breakpoint" target methods.
12967
12968 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12969
12970 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12971 * fbsd-nat.c (debug_fbsd_nat): New variable.
12972 (show_fbsd_nat_debug): New function.
12973 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12974 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12975
12976 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12977
12978 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12979 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12980 prototype.
12981 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12982 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12983 method.
12984
12985 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12986
12987 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12988 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12989
12990 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12991
12992 * charset.c (struct charset_vector): New.
12993 (charsets): Change type to charset_vector.
12994 (find_charset_names): Adjust.
12995 (add_one): Adjust.
12996 (_initialize_charset): Adjust.
12997
12998 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
12999
13000 * progspace.h (struct program_space) <deleted_solibs>: Change
13001 type to std::vector<std::string>.
13002 * progspace.c (clear_program_space_solib_cache): Adjust.
13003 * breakpoint.c (print_solib_event): Adjust.
13004 (check_status_catch_solib): Adjust.
13005 * solib.c (update_solib_list): Adjust.
13006 * ui-out.h (class ui_out) <field_string>: New overload.
13007 * ui-out.c (ui_out::field_string): New overload.
13008
13009 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13010
13011 * progspace.h (struct program_space): Add constructor and
13012 destructor, initialize fields.
13013 (add_program_space): Remove.
13014 * progspace.c (add_program_space): Rename to...
13015 (program_space::program_space): ... this.
13016 (release_program_space): Rename to...
13017 (program_space::~program_space): ... this.
13018 (delete_program_space): Use delete to delete program_space.
13019 (initialize_progspace): Use new to allocate program_space.
13020 * inferior.c (add_inferior_with_spaces): Likewise.
13021 (clone_inferior_command): Likewise.
13022 * infrun.c (follow_fork_inferior): Likewise.
13023 (handle_vfork_child_exec_or_exit): Likewise.
13024
13025 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13026
13027 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13028 (delim_string_to_char_ptr_vec): Return std::vector of
13029 gdb::unique_xmalloc_ptr.
13030 (dirnames_to_char_ptr_vec_append): Take std::vector of
13031 gdb::unique_xmalloc_ptr.
13032 (dirnames_to_char_ptr_vec): Return std::vector of
13033 gdb::unique_xmalloc_ptr.
13034 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13035 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13036 (delim_string_to_char_ptr_vec): Return an std::vector of
13037 gdb::unique_xmalloc_ptr, adjust the code.
13038 (dirnames_to_char_ptr_vec_append): Take an std::vector of
13039 gdb::unique_xmalloc_ptr, adjust the code.
13040 (dirnames_to_char_ptr_vec): Return an std::vector of
13041 gdb::unique_xmalloc_ptr, adjust the code.
13042 * auto-load.c (auto_load_safe_path_vec): Change type to
13043 std::vector of gdb::unique_xmalloc_ptr.
13044 (auto_load_expand_dir_vars): Return an std::vector of
13045 gdb::unique_xmalloc_ptr, adjust the code.
13046 (auto_load_safe_path_vec_update): Adjust.
13047 (filename_is_in_auto_load_safe_path_vec): Adjust.
13048 (auto_load_objfile_script_1): Adjust.
13049 * build-id.c (build_id_to_debug_bfd): Adjust.
13050 * linux-thread-db.c (thread_db_load_search): Adjust.
13051 * source.c (add_path): Adjust.
13052 (openp): Adjust.
13053 * symfile.c (find_separate_debug_file): Adjust.
13054 * utils.c (do_free_char_ptr_vec): Remove.
13055 (make_cleanup_free_char_ptr_vec): Remove.
13056
13057 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
13058
13059 PR gdb/22907
13060 * common/pathstuff.c: Conditionally include "<windows.h>".
13061
13062 2018-03-01 Georg Sauthoff <mail@georg.so>
13063
13064 PR gdb/22888
13065 * gcore.in: Quote variables and switch interpreter to bash.
13066
13067 2018-03-01 Tom Tromey <tom@tromey.com>
13068
13069 * dwarf2read.c (alloc_discriminant_info): Fix default_index
13070 assertion. Add assertion for discriminant_index.
13071 (quirk_rust_enum): Use correct base type name in univariant case.
13072
13073 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
13074
13075 * record.c (get_call_history_modifiers): Return a
13076 record_print_flags.
13077 (cmd_record_call_history): Adjust.
13078 * record-btrace.c (record_btrace_call_history): Adjust.
13079 (record_btrace_call_history_range): Adjust.
13080 (record_btrace_call_history_from): Adjust.
13081 * target-debug.h (target_debug_print_record_print_flags): New.
13082 * target-delegates.c: Re-generate.
13083 * target.c (target_call_history): Change flags type.
13084 (target_call_history_from): Likewise.
13085 (target_call_history_range): Likewise.
13086 * target.h (struct target_ops) <target_call_history>: Likewise.
13087 (target_call_history_from): Likewise.
13088 (target_call_history_range): Likewise.
13089
13090 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
13091 Simon Marchi <simon.marchi@polymtl.ca>
13092
13093 * common/common-utils.c: Include "sys/stat.h".
13094 (is_regular_file): Move here from "source.c"; change return
13095 type to "bool".
13096 * common/common-utils.h (is_regular_file): New prototype.
13097 * common/pathstuff.c (contains_dir_separator): New function.
13098 * common/pathstuff.h (contains_dir_separator): New prototype.
13099 * source.c: Don't include "sys/stat.h".
13100 (is_regular_file): Move to "common/common-utils.c".
13101
13102 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
13103
13104 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13105 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13106 * auto-load.c: Include "common/pathstuff.h".
13107 * common/common-def.h (current_directory): Move here.
13108 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13109 function.
13110 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13111 prototype.
13112 * common/pathstuff.c: New file.
13113 * common/pathstuff.h: New file.
13114 * compile/compile.c: Include "common/pathstuff.h".
13115 * defs.h (current_directory): Move to "common/common-defs.h".
13116 * dwarf2read.c: Include "common/pathstuff.h".
13117 * exec.c: Likewise.
13118 * guile/scm-safe-call.c: Likewise.
13119 * linux-thread-db.c: Likewise.
13120 * main.c: Likewise.
13121 * nto-tdep.c: Likewise.
13122 * objfiles.c: Likewise.
13123 * source.c: Likewise.
13124 * symtab.c: Likewise.
13125 * utils.c: Include "common/pathstuff.h".
13126 (gdb_realpath): Move to "common/pathstuff.c".
13127 (gdb_realpath_keepfile): Likewise.
13128 (gdb_abspath): Likewise.
13129 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13130 (gdb_realpath_keepfile): Likewise.
13131 (gdb_abspath): Likewise.
13132
13133 2018-02-28 John Baldwin <jhb@FreeBSD.org>
13134
13135 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13136 wildcard process pid for super_resume for kernels with a
13137 specific bug.
13138
13139 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
13140
13141 * compile/compile.c (get_args): Add additional comments
13142 explaining function.
13143
13144 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
13145 Tom Tromey <tom@tromey.com>
13146
13147 * target.h (memory_write_request_s): Remove typedef. Don't define
13148 VEC.
13149 (target_write_memory_blocks): Change argument to std::vector.
13150 (struct memory_write_request): Add constructor.
13151 * target-memory.c (compare_block_starting_address): Return bool.
13152 Change argument types.
13153 (claim_memory): Change arguments to use std::vector.
13154 (split_regular_and_flash_blocks, blocks_to_erase)
13155 (compute_garbled_blocks): Likewise.
13156 (cleanup_request_data, cleanup_write_requests_vector): Remove.
13157 (target_write_memory_blocks): Change argument to std::vector.
13158 * symfile.c (struct load_section_data): Add constructor and
13159 destructor. Use std::vector for "requests".
13160 (struct load_progress_data): Add initializers.
13161 (load_section_callback): Update. Use "new".
13162 (clear_memory_write_data): Remove.
13163 (generic_load): Update.
13164
13165 2018-02-27 Alan Hayward <alan.hayward@arm.com>
13166
13167 * arch/aarch64.h: Use common/tdesc.h.
13168
13169 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13170
13171 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13172 architecture with a 64-bit ABI.
13173
13174 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13175
13176 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13177 ahead of target description loading.
13178
13179 2018-02-26 Tom Tromey <tom@tromey.com>
13180
13181 * stack.c (backtrace_command_1): Update.
13182 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13183 of "flags".
13184 * python/py-framefilter.c (py_print_frame)
13185 (gdbpy_apply_frame_filter): Change type of "flags".
13186 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13187 of "flags".
13188 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13189 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13190 * extension.h (enum frame_filter_flag): Rename from
13191 frame_filter_flags.
13192 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13193 (apply_ext_lang_frame_filter): Change type of "flags".
13194 * extension.c (apply_ext_lang_frame_filter): Change type of
13195 "flags".
13196 * extension-priv.h (struct extension_language_ops)
13197 <apply_frame_filter>: Change type of "flags".
13198
13199 2018-02-26 Tom Tromey <tom@tromey.com>
13200
13201 PR python/16497:
13202 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
13203 off-by-one in py_end computation.
13204 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13205 PRINT_MORE_FRAMES.
13206 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13207 constant.
13208
13209 2018-02-26 Tom Tromey <tom@tromey.com>
13210
13211 * dwarf2read.c (struct variant_field): New.
13212 (struct nextfield) <variant>: New field.
13213 (dwarf2_add_field): Handle DW_TAG_variant_part.
13214 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13215 discriminated union.
13216 (read_structure_type): Handle DW_TAG_variant_part.
13217 (handle_struct_member_die): New function, extracted from
13218 process_structure_scope. Handle DW_TAG_variant.
13219 (process_structure_scope): Handle discriminated unions. Call
13220 handle_struct_member_die.
13221
13222 2018-02-26 Tom Tromey <tom@tromey.com>
13223
13224 * rust-lang.h (rust_last_path_segment): Declare.
13225 * rust-lang.c (rust_last_path_segment): Now public. Change
13226 contract.
13227 (struct disr_info): Remove.
13228 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13229 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13230 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13231 (rust_enum_p, rust_enum_variant): New function.
13232 (rust_underscore_fields): Remove "offset" parameter.
13233 (rust_print_enum): New function.
13234 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13235 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13236 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
13237 enums.
13238 (rust_internal_print_type): New function, from rust_print_type.
13239 Remove enum code.
13240 (rust_print_type): Call rust_internal_print_type.
13241 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13242 Update enum handling.
13243 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13244 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13245 (rust_union_quirks): New functions.
13246 (process_full_comp_unit, process_full_type_unit): Call
13247 rust_union_quirks.
13248 (process_structure_scope): Update rust_unions if necessary.
13249
13250 2018-02-26 Tom Tromey <tom@tromey.com>
13251
13252 * value.h (value_union_variant): Declare.
13253 * valops.c (value_union_variant): New function.
13254 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13255 (struct discriminant_info): New.
13256 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13257 enumerator.
13258 (struct main_type) <flag_discriminated_union>: New field.
13259
13260 2018-02-26 Tom Tromey <tom@tromey.com>
13261
13262 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13263 unittests/unpack-selftests.c.
13264 * unittests/unpack-selftests.c: New file.
13265 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13266
13267 2018-02-26 Yao Qi <yao.qi@linaro.org>
13268
13269 * dwarf2read.c (struct partial_die_info) <read>: New method.
13270 (read_partial_die): Remove the declaration.
13271 (load_partial_dies): Update.
13272 (partial_die_info::partial_die_info):
13273 (read_partial_die): Change it to partial_die_info::read.
13274
13275 2018-02-26 Yao Qi <yao.qi@linaro.org>
13276
13277 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13278 (fixup_partial_die): Remove declaration.
13279 (scan_partial_symbols): Update.
13280 (partial_die_parent_scope): Likewise.
13281 (partial_die_full_name): Likewise.
13282 (fixup_partial_die): Change it to partial_die_info::fixup.
13283
13284 2018-02-26 Yao Qi <yao.qi@linaro.org>
13285
13286 * dwarf2read.c (read_partial_die): Update the declaration.
13287 (load_partial_dies): Caller update.
13288 (read_partial_die): Remove one argument abbrev_len.
13289
13290 2018-02-26 Yao Qi <yao.qi@linaro.org>
13291
13292 * dwarf2read.c (struct partial_die_info): Add ctor, delete
13293 assignment operator.
13294 (load_partial_dies): Use ctor and copy ctor.
13295 (read_partial_die): Update.
13296 (dwarf2_cu::find_partial_die): Use ctor.
13297
13298 2018-02-26 Yao Qi <yao.qi@linaro.org>
13299
13300 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13301 (find_partial_die_in_comp_unit): Change it to
13302 dwarf2_cu::find_partial_die.
13303 (find_partial_die): Update.
13304
13305 2018-02-26 Yao Qi <yao.qi@linaro.org>
13306
13307 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13308 is NULL.
13309
13310 2018-02-26 Yao Qi <yao.qi@linaro.org>
13311
13312 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13313
13314 2018-02-26 Alan Hayward <alan.hayward@arm.com>
13315
13316 * arch/amd64.h: Use common/tdesc.h.
13317 * arch/i386.c: Likewise.
13318 * arch/i386.h: Likewise.
13319 * arch/tic6x.c: Likewise.
13320 * arch/tdesc.h: Move file from here...
13321 * common/tdesc.h: ...to here.
13322 * features/aarch64-core.c: Regenerate.
13323 * features/aarch64-fpu.c: Regenerate.
13324 * features/i386/32bit-avx.c: Regenerate.
13325 * features/i386/32bit-avx512.c: Regenerate.
13326 * features/i386/32bit-core.c: Regenerate.
13327 * features/i386/32bit-linux.c: Regenerate.
13328 * features/i386/32bit-mpx.c: Regenerate.
13329 * features/i386/32bit-pkeys.c: Regenerate.
13330 * features/i386/32bit-sse.c: Regenerate.
13331 * features/i386/64bit-avx.c: Regenerate.
13332 * features/i386/64bit-avx512.c: Regenerate.
13333 * features/i386/64bit-core.c: Regenerate.
13334 * features/i386/64bit-linux.c: Regenerate.
13335 * features/i386/64bit-mpx.c: Regenerate.
13336 * features/i386/64bit-pkeys.c: Regenerate.
13337 * features/i386/64bit-segments.c: Regenerate.
13338 * features/i386/64bit-sse.c: Regenerate.
13339 * features/i386/x32-core.c: Regenerate.
13340 * features/tic6x-c6xp.c: Regenerate.
13341 * features/tic6x-core.c: Regenerate.
13342 * features/tic6x-gp.c: Regenerate.
13343 * target-descriptions.c: Use common/tdesc.h.
13344 * target-descriptions.h: Likewise.
13345
13346 2018-02-24 Tom Tromey <tom@tromey.com>
13347
13348 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13349 (try_thread_db_load_from_dir, thread_db_load_search): Use
13350 std::string.
13351 (info_auto_load_libthread_db_compare): Return bool. Change
13352 argument types.
13353 (info_auto_load_libthread_db): Use std::vector, std::string.
13354 Remove cleanups.
13355
13356 2018-02-24 Tom Tromey <tom@tromey.com>
13357
13358 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13359 std::string.
13360 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13361 std::string*.
13362 * gdbarch.c: Rebuild.
13363 * gdbarch.h: Rebuild.
13364 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13365 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13366 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13367 std::string*.
13368
13369 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
13370
13371 * gdbtypes.h (sect_offset): Change type to uint64_t.
13372 (sect_offset_str): New function.
13373 * dwarf2read.c (create_addrmap_from_aranges): Use
13374 sect_offset_str.
13375 (error_check_comp_unit_head): Likewise.
13376 (create_debug_type_hash_table): Likewise.
13377 (read_cutu_die_from_dwo): Likewise.
13378 (init_cutu_and_read_dies): Likewise.
13379 (init_cutu_and_read_dies_no_follow): Likewise.
13380 (process_psymtab_comp_unit_reader): Likewise.
13381 (partial_die_parent_scope): Likewise.
13382 (peek_die_abbrev): Likewise.
13383 (process_queue): Likewise.
13384 (dwarf2_physname): Likewise.
13385 (read_namespace_alias): Likewise.
13386 (read_import_statement): Likewise.
13387 (create_dwo_cu_reader): Likewise.
13388 (create_cus_hash_table): Likewise.
13389 (lookup_dwo_cutu): Likewise.
13390 (inherit_abstract_dies): Likewise.
13391 (read_func_scope): Likewise.
13392 (read_call_site_scope): Likewise.
13393 (dwarf2_add_member_fn): Likewise.
13394 (read_common_block): Likewise.
13395 (read_module_type): Likewise.
13396 (read_typedef): Likewise.
13397 (read_subrange_type): Likewise.
13398 (load_partial_dies): Likewise.
13399 (read_partial_die): Likewise.
13400 (find_partial_die): Likewise.
13401 (read_str_index): Likewise.
13402 (dwarf2_string_attr): Likewise.
13403 (build_error_marker_type): Likewise.
13404 (lookup_die_type): Likewise.
13405 (dump_die_shallow): Likewise.
13406 (follow_die_ref): Likewise.
13407 (dwarf2_fetch_die_loc_sect_off): Likewise.
13408 (dwarf2_fetch_constant_bytes): Likewise.
13409 (follow_die_sig): Likewise.
13410 (get_signatured_type): Likewise.
13411 (get_DW_AT_signature_type): Likewise.
13412 (dwarf2_find_containing_comp_unit): Likewise.
13413 (set_die_type): Likewise.
13414
13415 2018-02-21 John Baldwin <jhb@FreeBSD.org>
13416
13417 * arch/aarch64.c: Include "common-defs.h".
13418 * arch/amd64.c: Likewise.
13419 * arch/i386.c: Likewise.
13420
13421 2018-02-21 Tom Tromey <tom@tromey.com>
13422
13423 * value.h: (extract_field_op): Update.
13424 * eval.c (extract_field_op): Return a const char *.
13425 * expression.h (parse_expression_for_completion): Update.
13426 * completer.c (complete_expression): Update.
13427 (add_struct_fields): Make fieldname const.
13428 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13429 (mark_completion_tag, parse_exp_in_context_1): Update.
13430 (parse_expression_for_completion): Change "name" to
13431 unique_xmalloc_ptr*.
13432
13433 2018-02-21 Tom Tromey <tom@tromey.com>
13434
13435 * infcall.c (call_function_by_hand_dummy): Use std::vector.
13436
13437 2018-02-21 Yao Qi <yao.qi@linaro.org>
13438
13439 * avr-tdep.c (avr_read_pc): Change parameter type to
13440 readable_regcache.
13441 * gdbarch.sh (read_pc): Likewise.
13442 * gdbarch.c: Re-generated.
13443 * gdbarch.h: Re-generated.
13444 * hppa-tdep.c (hppa_read_pc): Change parameter type to
13445 readable_regcache.
13446 * ia64-tdep.c (ia64_read_pc): Likewise.
13447 * mips-tdep.c (mips_read_pc): Likewise.
13448 * spu-tdep.c (spu_read_pc): Likewise.
13449
13450 2018-02-21 Yao Qi <yao.qi@linaro.org>
13451
13452 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13453 * regcache-dump.c: New file.
13454 * regcache.c: Move register_dump to regcache-dump.c.
13455 (maintenance_print_registers): Likewise.
13456 (maintenance_print_raw_registers): Likewise.
13457 (maintenance_print_cooked_registers): Likewise.
13458 (maintenance_print_register_groups): Likewise.
13459 (maintenance_print_remote_registers): Likewise.
13460 (_initialize_regcache): Likewise.
13461 * regcache.h (register_dump): Moved from regcache.c.
13462
13463 2018-02-21 Yao Qi <yao.qi@linaro.org>
13464
13465 * regcache.c (regcache::regcache): Update.
13466 (regcache::invalidate): Move it to detached_regcache::invalidate.
13467 (get_thread_arch_aspace_regcache): Update.
13468 (regcache::raw_update): Update.
13469 (regcache::cooked_read): Remove some code.
13470 (regcache::cooked_read_value): Likewise.
13471 (regcache::raw_write): Remove assert on m_readonly_p.
13472 (regcache::raw_supply_integer): Move it to
13473 detached_regcache::raw_supply_integer.
13474 (regcache::raw_supply_zeroed): Likewise.
13475 * regcache.h (detached_regcache) <raw_supply_integer>: New
13476 declaration.
13477 <raw_supply_zeroed, invalidate>: Likewise.
13478 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13479 <invalidate>: Likewise.
13480 <m_readonly_p>: Removed.
13481
13482 2018-02-21 Yao Qi <yao.qi@linaro.org>
13483
13484 * infcmd.c (get_return_value): Let stop_regs point to
13485 get_current_regcache.
13486 * regcache.c (regcache::regcache): Remove.
13487 (register_dump_reg_buffer): New class.
13488 (regcache_print): Adjust.
13489 * regcache.h (regcache): Remove constructors.
13490
13491 2018-02-21 Yao Qi <yao.qi@linaro.org>
13492
13493 * regcache.c (class register_dump): New class.
13494 (register_dump_regcache, register_dump_none): New class.
13495 (register_dump_remote, register_dump_groups): New class.
13496 (regcache_print): Update.
13497 * regcache.h (regcache_dump_what): Move it to regcache.c.
13498 (regcache) <dump>: Remove.
13499
13500 2018-02-21 Yao Qi <yao.qi@linaro.org>
13501
13502 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13503 reg_buffer_rw *.
13504 (jit_unwind_reg_set_impl): Call raw_supply.
13505 (jit_frame_sniffer): Use reg_buffer_rw.
13506 * record-full.c (record_full_core_regbuf): Change its type.
13507 (record_full_core_open_1): Use reg_buffer_rw.
13508 (record_full_close): Likewise.
13509 (record_full_core_fetch_registers): Use regcache->raw_supply.
13510 (record_full_core_store_registers): Likewise.
13511 * regcache.c (regcache::get_register_status): Move it to
13512 reg_buffer.
13513 (regcache_raw_set_cached_value): Remove.
13514 (regcache::raw_set_cached_value): Remove.
13515 (regcache::raw_write): Call raw_supply.
13516 (regcache::raw_supply): Move it to reg_buffer_rw.
13517 * regcache.h (regcache_raw_set_cached_value): Remove.
13518 (reg_buffer_rw): New class.
13519
13520 2018-02-21 Yao Qi <yao.qi@linaro.org>
13521
13522 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13523 readonly_detached_regcache.
13524 (dummy_frame_prev_register): Use regcache->cooked_read.
13525 * frame.c (frame_save_as_regcache): Change return type.
13526 (frame_pop): Update.
13527 * frame.h (frame_save_as_regcache): Update declaration.
13528 * inferior.h (get_infcall_suspend_state_regcache): Update
13529 declaration.
13530 * infrun.c (infcall_suspend_state) <registers>: use
13531 readonly_detached_regcache.
13532 (save_infcall_suspend_state): Don't use regcache_dup.
13533 (get_infcall_suspend_state_regcache): Change return type.
13534 * linux-fork.c (struct fork_info) <savedregs>: Change to
13535 readonly_detached_regcache.
13536 <pc>: New field.
13537 (fork_save_infrun_state): Don't use regcache_dup.
13538 (info_checkpoints_command): Adjust.
13539 * mi/mi-main.c (register_changed_p): Update declaration.
13540 (mi_cmd_data_list_changed_registers): Use
13541 readonly_detached_regcache.
13542 (register_changed_p): Change parameter type to
13543 readonly_detached_regcache.
13544 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13545 readonly_detached_regcache.
13546 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13547 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13548 New.
13549 (regcache::save): Move it to reg_buffer.
13550 (regcache::restore): Change parameter type.
13551 (regcache_dup): Remove.
13552 * regcache.h (reg_buffer) <save>: New method.
13553 (readonly_detached_regcache): New class.
13554 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13555 readonly_detached_regcache.
13556 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13557
13558 2018-02-21 Yao Qi <yao.qi@linaro.org>
13559
13560 * frame.c (frame_save_as_regcache): Use regcache method save.
13561 (frame_pop): Use regcache method restore.
13562 * infrun.c (restore_infcall_suspend_state): Likewise.
13563 * linux-fork.c (fork_load_infrun_state): Likewise.
13564 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13565 save.
13566 * regcache.c (regcache_save): Remove.
13567 (regcache::restore): More asserts.
13568 (regcache_cpy): Remove.
13569 * regcache.h (regcache_save): Remove the declaration.
13570 (regcache::restore): Move from private to public.
13571 Remove the friend declaration of regcache_cpy.
13572 (regcache_cpy): Remove declaration.
13573
13574 2018-02-21 Yao Qi <yao.qi@linaro.org>
13575
13576 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13577 parameter type to 'readable_regcache *'.
13578 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13579 * arm-tdep.c (arm_neon_quad_read): Likewise.
13580 (arm_pseudo_read): Likewise.
13581 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13582 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13583 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13584 * gdbarch.c: Re-generated.
13585 * gdbarch.h: Re-generated.
13586 * gdbarch.sh (pseudo_register_read): Change parameter type to
13587 'readable_regcache *'.
13588 (pseudo_register_read_value): Likewise.
13589 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13590 (h8300_pseudo_register_read): Likewise.
13591 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13592 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13593 (i386_pseudo_register_read_into_value): Likewise.
13594 (i386_pseudo_register_read_value): Likewise.
13595 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13596 declaration.
13597 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13598 * m32c-tdep.c (m32c_raw_read): Likewise.
13599 (m32c_read_flg): Likewise.
13600 (m32c_banked_register): Likewise.
13601 (m32c_banked_read): Likewise.
13602 (m32c_sb_read): Likewise.
13603 (m32c_part_read): Likewise.
13604 (m32c_cat_read): Likewise.
13605 (m32c_r3r2r1r0_read): Likewise.
13606 (m32c_pseudo_register_read): Likewise.
13607 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13608 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13609 (mep_pseudo_cr64_read): Likewise.
13610 (mep_pseudo_register_read): Likewise.
13611 * mips-tdep.c (mips_pseudo_register_read): Likewise.
13612 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13613 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13614 * regcache.c (regcache::raw_read): Move it to readable_regcache.
13615 (regcache::cooked_read): Likewise.
13616 (regcache::cooked_read_value): Likewise.
13617 (regcache_cooked_read_signed):
13618 (regcache::cooked_read): Likewise.
13619 * regcache.h (readable_regcache): New class.
13620 (regcache): Inherit readable_regcache. Move some methods to
13621 readable_regcache.
13622 * rl78-tdep.c (rl78_pseudo_register_read): Change
13623 parameter type to 'readable_regcache *'.
13624 * rs6000-tdep.c (do_regcache_raw_read): Remove.
13625 (e500_pseudo_register_read): Change parameter type to
13626 'readable_regcache *'.
13627 (dfp_pseudo_register_read): Likewise.
13628 (vsx_pseudo_register_read): Likewise.
13629 (efpr_pseudo_register_read): Likewise.
13630 * s390-tdep.c (s390_pseudo_register_read): Likewise.
13631 * sh-tdep.c (sh_pseudo_register_read): Likewise.
13632 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13633 (sh64_pseudo_register_read): Likewise.
13634 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13635 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13636 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13637 (spu_pseudo_register_read): Likewise.
13638 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13639 (xtensa_pseudo_register_read): Likewise.
13640
13641 2018-02-21 Yao Qi <yao.qi@linaro.org>
13642
13643 * regcache.c (regcache::regcache): Call reg_buffer ctor.
13644 (regcache::arch): Move it to reg_buffer::arch.
13645 (regcache::register_buffer): Likewise.
13646 (regcache::assert_regnum): Likewise.
13647 (regcache::num_raw_registers): Likewise.
13648 * regcache.h (reg_buffer): New class.
13649 (regcache): Inherit reg_buffer.
13650
13651 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
13652
13653 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13654 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13655
13656 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
13657
13658 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13659
13660 2018-02-19 Alan Hayward <alan.hayward@arm.com>
13661
13662 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13663 (SFILES): Remove common/*.c files.
13664 (COMMON_OBS): Remove some *.o files built from common/*.c files.
13665 * common/common.host: Add common reference.
13666 * configure.ac: Likewise.
13667 * configure: Regenerate.
13668
13669 2018-02-16 Yao Qi <yao.qi@linaro.org>
13670
13671 * block.c (block_namespace_info): Inherit allocate_on_obstack.
13672 (block_initialize_namespace): Use new.
13673 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13674 (dwarf2_free_objfile): Use delete.
13675 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13676 (copy_type_recursive): Use new.
13677 * gdb_obstack.h (allocate_on_obstack): New.
13678
13679 2018-02-15 Yao Qi <yao.qi@linaro.org>
13680
13681 PR gdb/22849
13682 * inferior.c (exit_inferior_1): Reset inf->control.
13683
13684 2018-02-15 Joel Brobecker <brobecker@adacore.com>
13685
13686 * ada-lang.c (ada_to_fixed_value_create): Delete advance
13687 declaration.
13688
13689 2018-02-14 Pedro Alves <palves@redhat.com>
13690
13691 * frame-unwind.c (frame_unwind_try_unwinder): Always call
13692 frame_cleanup_after_sniffer on exception.
13693
13694 2018-02-14 Tom Tromey <tom@tromey.com>
13695
13696 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13697 const.
13698 (solib_bfd_open): Make pathname const.
13699 * solib.c (solib_bfd_open): Make pathname const.
13700 * solib-spu.c (spu_bfd_fopen): Make name const.
13701 (spu_bfd_open): Make pathname const.
13702 * solib-darwin.c (darwin_bfd_open): Make pathname const.
13703 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13704
13705 2018-02-14 Tom Tromey <tom@tromey.com>
13706
13707 * symfile.c (symfile_bfd_open): Update.
13708 * source.h (openp, source_full_path_of, find_and_open_source):
13709 Change argument type to unique_xmalloc_ptr.
13710 * source.c (openp): Take a unique_xmalloc_ptr.
13711 (source_full_path_of, find_and_open_source): Likewise.
13712 (open_source_file, symtab_to_fullname): Update.
13713 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13714 unique_xmalloc_ptr.
13715 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13716 (exec_file_find): Update.
13717 * psymtab.c (psymtab_to_fullname): Update.
13718 * nto-tdep.h (nto_find_and_open_solib): Update.
13719 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13720 unique_xmalloc_ptr.
13721 * exec.c (exec_file_attach): Update.
13722 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13723 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13724
13725 2018-02-14 Tom Tromey <tom@tromey.com>
13726
13727 * solib.c: Include source.h.
13728 * nto-tdep.c: Include source.h.
13729 * mi/mi-cmd-env.c: Include source.h.
13730 * infcmd.c: Include source.h.
13731 * exec.c: Include source.h.
13732 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13733 (add_path, directory_switch, source_path, init_source_path): Move
13734 declarations...
13735 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13736 (add_path, directory_switch, source_path, init_source_path):
13737 ...here.
13738
13739 2018-02-14 Tom Tromey <tom@tromey.com>
13740
13741 * solist.h (exec_file_find, solib_find): Return
13742 unique_xmalloc_ptr.
13743 (solib_bfd_fopen): Take a const char *.
13744 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13745 (exec_file_find, solib_find): Likewise.
13746 (solib_bfd_fopen): Do not take ownership of "pathname".
13747 (solib_bfd_open): Use unique_xmalloc_ptr.
13748 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13749 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13750 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13751 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13752
13753 2018-02-14 Joel Brobecker <brobecker@adacore.com>
13754
13755 * ada-lang.c (name_match_type_from_name): Remove reference to
13756 ada_name_for_lookup in function's documentation.
13757 * ada-lang.h (ada_name_for_lookup): Delete declaration.
13758
13759 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13760
13761 * defs.h (enum openp_flags): New enum.
13762 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13763 Move to enum openp_flags.
13764 (openp_flags): New enum flags.
13765 (openp): Change parameter type to openp_flags.
13766 * source.c (openp): Change parameter type to openp_flags.
13767 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13768 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13769
13770 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13771
13772 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13773 per-command.
13774
13775 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
13776
13777 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13778 into...
13779 (class dwarf2_queue_guard): ...the destructor of this new class.
13780 (dw2_do_instantiate_symtab): Create instance of the new class
13781 dwarf2_queue_guard, remove cleanup.
13782
13783 2018-02-09 Tom Tromey <tom@tromey.com>
13784
13785 * source.c (find_source_lines): Don't reference past the end of
13786 the vector.
13787
13788 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13789
13790 * remote.c (remote_btrace_maybe_reopen): Change error message.
13791 * btrace.c (btrace_enable): Likewise.
13792 (parse_xml_btrace): Likewise.
13793 (parse_xml_btrace_conf): Likewise.
13794
13795 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13796
13797 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13798 (linux_enable_pt, linux_enable_bts): Call
13799 diagnose_perf_event_open_fail.
13800
13801 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13802
13803 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13804 Remove parameter and change return type. Update callers. Move it.
13805 (linux_enable_bts, linux_enable_pt): Improve error message.
13806 (linux_enable_pt): Remove zero buffer size check.
13807 (linux_enable_btrace): Improve error messages. Remove NULL return
13808 check.
13809
13810 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13811
13812 * btrace.c (btrace_enable): Remove target_supports_btrace call.
13813 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13814 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13815 (linux_supports_pt, linux_supports_btrace): Remove.
13816 (linux_enable_bts): Call cpu_supports_bts.
13817 * nat/linux-btrace.h (linux_supports_btrace): Remove.
13818 * remote.c (remote_supports_btrace): Remove.
13819 (init_remote_ops): Remove remote_supports_btrace.
13820 * target-delegates.c: Regenerated.
13821 * target.c (target_supports_btrace): Remove.
13822 * target.h (target_ops) <to_supports_btrace>: Remove
13823 (target_supports_btrace): Remove.
13824 * x86-linux-nat.c (x86_linux_create_target): Remove
13825 linux_supports_btrace.
13826
13827 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13828
13829 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13830 btrace failed.
13831 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13832 exception and use message in own exception.
13833
13834 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13835
13836 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13837 (perf_event_pt_event_type): Use gdb_file_up.
13838 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13839 scoped_fd, and scoped_mmap.
13840
13841 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13842
13843 * common/scoped_mmap.h: New.
13844 * unittests/scoped_mmap-selftest.c: New.
13845 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13846 unittests/scoped_mmap-selftest.c.
13847
13848 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13849
13850 * common/scoped_fd.h: New.
13851 * unittests/scoped_fd-selftest.c: New.
13852 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13853 unittests/scoped_fd-selftest.c.
13854
13855 2018-02-09 Tom Tromey <tom@tromey.com>
13856
13857 * auto-load.c (auto_load_section_scripts): Use
13858 gdb::unique_xmalloc_ptr.
13859
13860 2018-02-09 Tom Tromey <tom@tromey.com>
13861
13862 * auto-load.c (execute_script_contents): Use std::string.
13863
13864 2018-02-09 Joel Brobecker <brobecker@adacore.com>
13865
13866 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13867 Python function, rather than a new command.
13868
13869 2018-02-08 Tom Tromey <tom@tromey.com>
13870
13871 * solib.c (solib_find_1): Use std::string.
13872 (solib_bfd_fopen): Use unique_xmalloc_ptr.
13873
13874 2018-02-08 Tom Tromey <tom@tromey.com>
13875
13876 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13877
13878 2018-02-08 Tom Tromey <tom@tromey.com>
13879
13880 * source.c (find_source_lines): Use gdb::def_vector.
13881
13882 2018-02-08 Tom Tromey <tom@tromey.com>
13883
13884 * macrocmd.c (struct temporary_macro_definition): New.
13885 (macro_define_command): Use temporary_macro_definition. Remove
13886 cleanups.
13887 (free_macro_definition_ptr): Remove.
13888
13889 2018-02-08 Tom Tromey <tom@tromey.com>
13890
13891 * macroexp.c (maybe_expand): Use std::string.
13892
13893 2018-02-08 Tom Tromey <tom@tromey.com>
13894
13895 * macroexp.c (struct macro_buffer): Add initializers for some
13896 members.
13897 (init_buffer, init_shared_buffer, free_buffer)
13898 (free_buffer_return_text): Remove.
13899 (macro_buffer): New constructors.
13900 (~macro_buffer): New destructor.
13901 (macro_buffer::set_shared): New method.
13902 (macro_buffer::resize_buffer, macro_buffer::appendc)
13903 (macro_buffer::appendmem): Now methods, not free functions.
13904 (set_token, append_tokens_without_splicing, stringify)
13905 (macro_stringify): Update.
13906 (gather_arguments): Change return type. Remove argc_p argument,
13907 add args_ptr argument. Use std::vector.
13908 (substitute_args): Remove argc argument. Accept std::vector.
13909 (expand): Update. Use std::vector.
13910 (scan, macro_expand, macro_expand_next): Update.
13911
13912 2018-02-08 Tom Tromey <tom@tromey.com>
13913
13914 * symtab.c (default_collect_symbol_completion_matches_break_on):
13915 Use unique_xmalloc_ptr.
13916 * macroscope.h: (sal_macro_scope, user_macro_scope)
13917 (default_macro_scope): Return unique_xmalloc_ptr.
13918 * macroscope.c (sal_macro_scope, user_macro_scope)
13919 (default_macro_scope): Return unique_xmalloc_ptr.
13920 * macroexp.h (macro_expand, macro_expand_once): Return
13921 unique_xmalloc_ptr.
13922 * macroexp.c (macro_expand, macro_expand_once): Return
13923 unique_xmalloc_ptr.
13924 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13925 (info_macro_command, info_macros_command): Use
13926 unique_xmalloc_ptr.
13927 * compile/compile-c-support.c (write_macro_definitions): Use
13928 unique_xmalloc_ptr.
13929 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13930
13931 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13932
13933 * value.c (value_static_field): Assign field type instead of
13934 containing type when returning an optimized out value.
13935
13936 2018-02-06 Yao Qi <yao.qi@linaro.org>
13937
13938 * ft32-tdep.c (ft32_read_pc): Remove.
13939 (ft32_write_pc): Remove.
13940 (ft32_gdbarch_init): Update.
13941 * m32r-tdep.c (m32r_read_pc): Remove.
13942 (m32r_gdbarch_init): Update.
13943 * mep-tdep.c (mep_read_pc): Remove.
13944 (mep_gdbarch_init): Update.
13945 * microblaze-tdep.c (microblaze_write_pc): Remove.
13946 (microblaze_gdbarch_init): Update.
13947 * mn10300-tdep.c (mn10300_read_pc): Remove.
13948 (mn10300_write_pc): Remove.
13949 (mn10300_gdbarch_init): Update.
13950 * moxie-tdep.c (moxie_read_pc): Remove.
13951 (moxie_write_pc): Remove.
13952 (moxie_gdbarch_init): Update.
13953
13954 2018-02-06 Yao Qi <yao.qi@linaro.org>
13955
13956 * expprint.c (print_subexp_standard): Handle
13957 OP_F77_UNDETERMINED_ARGLIST.
13958 (dump_subexp_body_standard): Likewise.
13959
13960 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13961
13962 * target-descriptions.c (tdesc_element_visitor) Add empty
13963 implementations.
13964 (tdesc_type): Move make_gdb_type from here.
13965 (tdesc_type_builtin): Likewise.
13966 (tdesc_type_vector): Likewise.
13967 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13968 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13969 (make_gdb_type_union): Likewise.
13970 (make_gdb_type_flags): Likewise.
13971 (make_gdb_type_enum): Likewise.
13972 (make_gdb_type): New function.
13973 (tdesc_register_type): Use static make_gdb_type.
13974
13975 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13976
13977 * infcmd.c (default_print_one_register_info): Align natural-format
13978 column values consistently one under another.
13979 (pad_to_column): New function.
13980
13981 2018-02-05 Joel Brobecker <brobecker@adacore.com>
13982
13983 * dwarf2read.c (dwarf2_physname): Move commment.
13984
13985 2018-02-01 Leszek Swirski <leszeks@google.com>
13986
13987 * varobj.c (varobj_formatted_print_options): Allow recursive
13988 pretty printing if pretty printing is enabled.
13989
13990 2018-02-01 Leszek Swirski <leszeks@google.com>
13991
13992 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13993 names after a structop as a filename.
13994
13995 2018-02-01 Yao Qi <yao.qi@linaro.org>
13996
13997 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13998 (arm_record_coproc_data_proc): Likewise.
13999
14000 2018-02-01 Yao Qi <yao.qi@linaro.org>
14001
14002 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14003
14004 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
14005
14006 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14007 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14008
14009 2018-01-31 Pedro Alves <palves@redhat.com>
14010
14011 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14012 * inflow.c (child_terminal_save_inferior): Wrap reference to
14013 tcgetpgrp in HAVE_TERMIOS_H.
14014 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14015 _WIN32.
14016 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14017 always iterate over all inferiors.
14018 (gdbsim_cntrl_c): Adjust.
14019 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14020
14021 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14022
14023 * gdbtypes.c (lookup_array_range_type): Make sure the array's
14024 index type is objfile-owned if the element type is as well.
14025
14026 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14027
14028 GDB 8.1 released.
14029
14030 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
14031
14032 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14033 "features/s390x-linux64.c".
14034 (_initialize_s390_linux_tdep): Remove initialization of tdescs
14035 s390_linux32 and s390x_linux64.
14036 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14037 default tdesc.
14038 * s390-tdep.c: Include "features/s390-linux32.c" and
14039 "features/s390x-linux64.c".
14040 (s390_tdesc_valid): Add check for tdesc_has_registers.
14041 (s390_gdbarch_init): Make sure there is always a valid tdesc.
14042 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14043 tdesc_s390x_linux64.
14044 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14045 tdesc_s390x_linux64 to...
14046 * s390-tdep.h: ...here.
14047
14048 2018-01-30 Pedro Alves <palves@redhat.com>
14049
14050 PR gdb/13211
14051 * config.in, configure: Regenerate.
14052 * configure.ac: Check for getpgid.
14053 * go32-nat.c (go32_pass_ctrlc): New.
14054 (go32_target): Install it.
14055 * inf-child.c (inf_child_target): Install
14056 child_terminal_save_inferior, child_pass_ctrlc and
14057 child_interrupt.
14058 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14059 (inf_ptrace_target): No longer install it.
14060 * infcmd.c (interrupt_target_1): Adjust.
14061 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14062 (child_interrupt): Declare.
14063 (inferior::terminal_state): New.
14064 * inflow.c (struct terminal_info): Update comments.
14065 (inferior_process_group): Delete.
14066 (terminal_is_ours): Delete.
14067 (gdb_tty_state): New.
14068 (child_terminal_init): Adjust.
14069 (is_gdb_terminal, sharing_input_terminal_1)
14070 (sharing_input_terminal): New functions.
14071 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
14072 Set the process's actual process group in the foreground if
14073 possible. Handle is_ours_for_output/is_ours distinction. Don't
14074 mark terminal as the inferior's if not sharing GDB's terminal.
14075 Don't check attach_flag.
14076 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14077 pass down a target_terminal_state.
14078 (child_terminal_save_inferior): New, factored out from ...
14079 (child_terminal_ours_1): ... this. Handle
14080 target_terminal_state::is_ours_for_output.
14081 (child_interrupt, child_pass_ctrlc): New.
14082 (inflow_inferior_exit): Clear the inferior's terminal_state.
14083 (copy_terminal_info): Copy the inferior's terminal state.
14084 (_initialize_inflow): Remove reference to terminal_is_ours.
14085 * inflow.h (inferior_process_group): Delete.
14086 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14087 * procfs.c (procfs_target): Don't install procfs_interrupt.
14088 (procfs_interrupt): Delete.
14089 * remote.c (remote_serial_quit_handler): Adjust.
14090 (remote_interrupt): Remove ptid parameter. Adjust.
14091 * target-delegates.c: Regenerate.
14092 * target.c: Include "terminal.h".
14093 (target_terminal::terminal_state): Rename to ...
14094 (target_terminal::m_terminal_state): ... this.
14095 (target_terminal::init): Adjust.
14096 (target_terminal::inferior): Adjust to per-inferior
14097 terminal_state.
14098 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14099 (target_terminal::ours, target_terminal::ours_for_output): Use
14100 target_terminal_is_ours_kind.
14101 (target_interrupt): Remove ptid parameter. Adjust.
14102 (default_target_pass_ctrlc): Adjust.
14103 * target.h (target_ops::to_terminal_save_inferior): New field.
14104 (target_ops::to_interrupt): Remove ptid_t parameter.
14105 (target_interrupt): Remove ptid_t parameter. Update comment.
14106 (target_pass_ctrlc): Update comment.
14107 * target/target.h (target_terminal_state): New scoped enum,
14108 factored out of ...
14109 (target_terminal::terminal_state): ... here.
14110 (target_terminal::inferior): Update comments.
14111 (target_terminal::restore_inferior): New.
14112 (target_terminal::is_inferior, target_terminal::is_ours)
14113 (target_terminal::is_ours_for_output): Adjust.
14114 (target_terminal::scoped_restore_terminal_state): Adjust to
14115 rename, and call restore_inferior() instead of inferior().
14116 (target_terminal::scoped_restore_terminal_state::m_state): Change
14117 type.
14118 (target_terminal::terminal_state): Rename to ...
14119 (target_terminal::m_terminal_state): ... this and change type.
14120
14121 2018-01-30 Pedro Alves <palves@redhat.com>
14122
14123 * linux-nat.c (wait_for_signal): New function.
14124 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14125 directly.
14126 (async_terminal_is_ours)
14127 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14128 (linux_nat_add_target): Don't override
14129 to_terminal_inferior/to_terminal_ours.
14130
14131 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
14132
14133 * remote.c (remote_follow_fork): Don't call "detach_inferior".
14134
14135 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
14136
14137 * dwarf2read.c (free_dwo_files): Add forward-declaration.
14138 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14139 dwarf2_per_objfile_free here.
14140 (dwarf2_per_objfile_free): Remove.
14141 (_initialize_dwarf2_read): Don't register
14142 dwarf2_per_objfile_free as a registry cleanup.
14143
14144 2018-01-27 Eli Zaretskii <eliz@gnu.org>
14145
14146 Avoid compilation errors in MinGW native builds
14147
14148 The error is triggered by including python-internal.h, and the
14149 error message is:
14150
14151 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14152 from build-gnulib/import/math.h:27,
14153 from d:/usr/Python26/include/pyport.h:235,
14154 from d:/usr/Python26/include/Python.h:58,
14155 from python/python-internal.h:94,
14156 from python/py-arch.c:24:
14157 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14158 using ::hypot;
14159 ^~~~~
14160
14161 This happens because Python headers define 'hypot' to expand t
14162 '_hypot' in the Windows builds.
14163 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14164 'hypoth'. This avoids a compilation error.
14165
14166 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14167
14168 * MAINTAINERS (Write After Approval): Fix ordering.
14169
14170 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14171
14172 * MAINTAINERS (Write After Approval): Add Alan Hayward.
14173
14174 2018-01-26 Alan Modra <amodra@gmail.com>
14175
14176 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14177 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14178 Remove nop. Make const. Comment.
14179 (powerpc32_plt_stub_so_2): New.
14180 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14181 Correct count. Update uses.
14182 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14183 Move common code reading PLT entry word. Correct
14184 powerpc32_plt_stub PLT address calculation.
14185 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14186 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14187 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14188 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14189 (ppc64_standard_linkage8): Likewise.
14190 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14191 Correct insns description.
14192 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14193
14194 2018-01-24 Pedro Alves <palves@redhat.com>
14195
14196 GCC PR libstdc++/83906
14197 * gdbtypes.c (operator==(const dynamic_prop &,
14198 const dynamic_prop &)): New.
14199 (operator==(const range_bounds &, const range_bounds &)): New.
14200 (check_types_equal): Use them instead of memcmp.
14201 * gdbtypes.h (operator==(const dynamic_prop &,
14202 const dynamic_prop &)): Declare.
14203 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14204 (operator==(const range_bounds &, const range_bounds &)): Declare.
14205 (operator!=(const range_bounds &, const range_bounds &)): Declare.
14206
14207 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14208
14209 * s390-linux-tdep.c (s390_record_address_mask)
14210 (s390_record_calc_disp_common, s390_record_calc_disp)
14211 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14212 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14213 (s390_process_record): Move to s390-tdep.c.
14214 (s390_linux_init_abi_any): Adjust.
14215 * s390-tdep.c (s390_record_address_mask)
14216 (s390_record_calc_disp_common, s390_record_calc_disp)
14217 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14218 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14219 (s390_process_record): Moved from s390-linux-tdep.c
14220 (s390_gdbarch_init): Adjust.
14221
14222 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14223
14224 * s390-linux-nat.c (s390-tdep.h): New include.
14225 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14226 (HFILES_NO_SRCDIR): Add s390-tdep.h.
14227 (ALLDEPFILES): Add s390-tdep.c.
14228 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14229 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14230 * s390-tdep.h: ...this. New file.
14231 * s390-linux-tdep.c (s390-tdep.h): New include.
14232 (_initialize_s390_tdep): Rename to...
14233 (_initialize_s390_linux_tdep): ...this and adjust.
14234 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14235 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14236 s390-tdep.h.
14237 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14238 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14239 (s390_is_partial_instruction, s390_software_single_step)
14240 (is_non_branch_ril, s390_displaced_step_copy_insn)
14241 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14242 (s390_prologue_data, s390_addr, s390_store, s390_load)
14243 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14244 (s390_register_call_saved, s390_guess_tracepoint_registers)
14245 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14246 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14247 (s390_pseudo_register_name, s390_pseudo_register_type)
14248 (s390_pseudo_register_read, s390_pseudo_register_write)
14249 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14250 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14251 (s390_addr_bits_remove, s390_address_class_type_flags)
14252 (s390_address_class_type_flags_to_name)
14253 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14254 (s390_function_arg_float, s390_function_arg_vector)
14255 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14256 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14257 (s390_frame_align, s390_register_return_value, s390_return_value)
14258 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14259 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14260 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14261 (s390_trad_frame_prev_register, s390_unwind_cache)
14262 (s390_prologue_frame_unwind_cache)
14263 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14264 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14265 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14266 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14267 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14268 (s390_frame_base_address, s390_local_base_address)
14269 (s390_frame_base, s390_gcc_target_options)
14270 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14271 (s390_validate_reg_range, s390_tdesc_valid)
14272 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14273 * s390-tdep.c: ...this. New file.
14274
14275 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14276
14277 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14278 (s390_process_record, s390_gdbarch_tdep_alloc)
14279 (s390_linux_init_abi_any): Use/set new hook.
14280
14281 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14282
14283 * s390-linux-tdep.c (osabi.h): New include.
14284 (s390_linux_init_abi_31, s390_linux_init_abi_64)
14285 (s390_linux_init_abi_any): New functions.
14286 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14287
14288 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14289
14290 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14291 tdesc_has_registers check
14292
14293 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14294
14295 * s390-linux-tdep.c (s390_tdesc_valid): New function.
14296 (s390_validate_reg_range): New macro.
14297 (s390_gdbarch_init): Adjust.
14298
14299 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14300
14301 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14302 (s390_gdbarch_tdep_alloc): Adjust.
14303 (s390_gdbarch_init): Adjust.
14304
14305 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14306
14307 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14308 <have_tdb>: Change type to bool.
14309 (s390_gdbarch_tdep_alloc): Adjust.
14310 (s390_gdbarch_init): Adjust.
14311
14312 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14313
14314 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14315 (gdbarch_tdep) <have_upper, have_vx>: New fields.
14316 (s390_gdbarch_tdep_alloc): New function.
14317 (s390_gdbarch_init): Allocate tdep at start and use its fields
14318 instead of separate variables.
14319
14320 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14321
14322 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14323 when looking for cached gdbarch and add comment for remaining.
14324
14325 2018-01-22 Pedro Alves <palves@redhat.com>
14326 Sergio Durigan Junior <sergiodj@redhat.com>
14327
14328 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14329 case.
14330
14331 2018-01-22 Maciej W. Rozycki <macro@mips.com>
14332
14333 * MAINTAINERS: Update my company e-mail address.
14334
14335 2018-01-22 Yao Qi <yao.qi@linaro.org>
14336
14337 * regcache.c (cooked_write_test): New function.
14338 (_initialize_regcache): Register the test.
14339
14340 2018-01-22 Yao Qi <yao.qi@linaro.org>
14341
14342 * ia64-tdep.c (ia64_pseudo_register_read): Call
14343 regcache->cooked_read instead of regcache_cooked_read_unsigned.
14344 * m32c-tdep.c (m32c_cat_read): Likewise.
14345 (m32c_r3r2r1r0_read): Likewise.
14346 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14347 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14348
14349 2018-01-22 Yao Qi <yao.qi@linaro.org>
14350
14351 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14352 method raw_read instead of regcache_raw_read.
14353 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14354 * arm-tdep.c (arm_neon_quad_read): Likewise.
14355 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14356 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14357 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14358 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14359 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14360 (i386_pseudo_register_read_into_value): Likewise.
14361 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14362 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14363 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14364 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14365 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14366 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14367 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14368 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14369 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14370
14371 2018-01-22 Yao Qi <yao.qi@linaro.org>
14372
14373 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14374 * configure.tgt: Remove target mt.
14375 * mt-tdep.c: Remove.
14376 * regcache.c (cooked_read_test): Remove the check for mt.
14377
14378 2018-01-22 Yao Qi <yao.qi@linaro.org>
14379
14380 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14381 instead of gdbarch_pseudo_register_read_value.
14382
14383 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14384
14385 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14386 language is Ada.
14387
14388 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14389
14390 * linespec.c (create_sals_line_offset): Remove code that preserved
14391 the symtab_and_line's line number.
14392
14393 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14394
14395 * varobj.c (varobj_create): Don't set valid_block when creating a
14396 floating varobj.
14397
14398 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14399
14400 * varobj.c (varobj_create): Remove out of date comment.
14401
14402 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14403
14404 PR mi/20395
14405 * ada-exp.y (write_var_from_sym): Pass extra parameter when
14406 updating innermost block.
14407 * parse.c (innermost_block_tracker::update): Take extra type
14408 parameter, and check types match before updating innermost block.
14409 (write_dollar_variable): Update innermost block for registers.
14410 * parser-defs.h (enum innermost_block_tracker_type): New enum.
14411 (innermost_block_tracker::innermost_block_tracker): Initialise
14412 m_types member.
14413 (innermost_block_tracker::reset): Take type parameter.
14414 (innermost_block_tracker::update): Take type parameter, and pass
14415 type through as needed.
14416 (innermost_block_tracker::m_types): New member.
14417 * varobj.c (varobj_create): Pass type when reseting innermost
14418 block.
14419
14420 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14421
14422 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14423 * ada-lang.c (resolve_subexp): Likewise.
14424 * breakpoint.c (set_breakpoint_condition) Likewise.
14425 (watch_command_1) Likewise.
14426 * c-exp.y (variable): Likewise.
14427 * d-exp.y (PrimaryExpression): Likewise.
14428 * f-exp.y (variable): Likewise.
14429 * go-exp.y (variable): Likewise.
14430 * m2-exp.y (variable): Likewise.
14431 * objfiles.c (objfile::~objfile): Likewise.
14432 * p-exp.y (variable): Likewise.
14433 * parse.c (innermost_block): Change type.
14434 * parser-defs.h (class innermost_block_tracker): New.
14435 (innermost_block): Change to innermost_block_tracker.
14436 * printcmd.c (display_command): Switch to innermost_block API.
14437 (do_one_display): Likewise.
14438 * rust-exp.y (do_one_display): Likewise.
14439 * symfile.c (clear_symtab_users): Likewise.
14440 * varobj.c (varobj_create): Switch to innermost_block API, replace
14441 use of innermost_block with block stored on varobj object.
14442
14443 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14444
14445 * expression.h (innermost_block): Remove declaration.
14446 * varobj.c: Add 'parser-defs.h' include.
14447
14448 2018-01-19 Tom Tromey <tom@tromey.com>
14449
14450 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14451 symbols in the static and global blocks.
14452
14453 2018-01-19 James Clarke <jrtc27@jrtc27.com>
14454
14455 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14456 gdb_ptrace.h, and move including gdb_wait.h ...
14457 * nat/linux-ptrace.h: ... to here.
14458
14459 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14460
14461 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14462 inf_ptrace_detach_success.
14463 (inf_ptrace_detach_success): Add inferior parameter, use it
14464 instead of inferior_ptid, pass it to detach_inferior.
14465 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14466 parameter.
14467 * inferior.c (detach_inferior): Add overload that takes an
14468 inferior object.
14469 * inferior.h (detach_inferior): Likewise.
14470 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14471 use inferior_ptid, adjust call to inf_ptrace_detach_success.
14472 * linux-thread-db.c (thread_db_detach): Use inf parameter.
14473
14474 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14475
14476 * target.h (struct target_ops) <to_detach>: Add inferior
14477 parameter.
14478 (target_detach): Likewise.
14479 * target.c (dispose_inferior): Pass inferior down.
14480 (target_detach): Pass inferior down. Assert that it is equal to
14481 the current inferior.
14482 * aix-thread.c (aix_thread_detach): Pass inferior down.
14483 * corefile.c (core_file_command): Pass current_inferior() down.
14484 * corelow.c (core_detach): Add inferior parameter.
14485 * darwin-nat.c (darwin_detach): Likewise.
14486 * gnu-nat.c (gnu_detach): Likewise.
14487 * inf-ptrace.c (inf_ptrace_detach): Likewise.
14488 * infcmd.c (detach_command): Pass current_inferior() down to
14489 target_detach.
14490 * infrun.c (follow_fork_inferior): Pass parent_inf to
14491 target_detach.
14492 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14493 target_detach.
14494 * linux-nat.c (linux_nat_detach): Add inferior parameter.
14495 * linux-thread-db.c (thread_db_detach): Likewise.
14496 * nto-procfs.c (procfs_detach): Likewise.
14497 * procfs.c (procfs_detach): Likewise.
14498 * record.c (record_detach): Likewise.
14499 * record.h (struct inferior): Forward-declare.
14500 (record_detach): Add inferior parameter.
14501 * remote-sim.c (gdbsim_detach): Likewise.
14502 * remote.c (remote_detach_1): Likewise.
14503 (remote_detach): Likewise.
14504 (extended_remote_detach): Likewise.
14505 * sol-thread.c (sol_thread_detach): Likewise.
14506 * target-debug.h (target_debug_print_inferior_p): New macro.
14507 * target-delegates.c: Re-generate.
14508 * top.c (kill_or_detach): Pass inferior down to target_detach.
14509 * windows-nat.c (windows_detach): Add inferior parameter.
14510
14511 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14512
14513 * target.h (struct target_ops) <to_detach>: Remove args
14514 parameter.
14515 (target_detach): Likewise.
14516 * target.c (dispose_inferior): Adjust.
14517 (target_detach): Remove args parameter, adjust.
14518 * aix-thread.c (aix_thread_detach): Adjust.
14519 * corefile.c (core_file_command): Adjust.
14520 * corelow.c (core_detach): Adjust.
14521 * darwin-nat.c (darwin_detach): Adjust.
14522 * gnu-nat.c (gnu_detach): Adjust.
14523 * inf-ptrace.c (inf_ptrace_detach): Adjust.
14524 * infcmd.c (detach_command): Adjust
14525 * infrun.c (follow_fork_inferior): Adjust.
14526 (handle_vfork_child_exec_or_exit): Adjust.
14527 * linux-fork.c (linux_fork_detach): Remove args parameter.
14528 * linux-fork.h (linux_fork_detach): Likewise.
14529 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14530 * linux-thread-db.c (thread_db_detach): Likewise.
14531 * nto-procfs.c (procfs_detach): Likewise.
14532 * procfs.c (procfs_detach): Likewise.
14533 (do_detach): Remove signo parameter.
14534 * record.c (record_detach): Remove args parameter.
14535 * record.h (record_detach): Likewise.
14536 * remote-sim.c (gdbsim_detach): Likewise.
14537 * remote.c (remote_detach_1): Likewise.
14538 (remote_detach): Likewise.
14539 (extended_remote_detach): Likewise.
14540 * sol-thread.c (sol_thread_detach): Likewise.
14541 * target-delegates.c: Re-generate.
14542 * top.c (struct qt_args) <args>: Remove field.
14543 (kill_or_detach): Don't pass args.
14544 (quit_force): Don't set args.
14545 * windows-nat.c (windows_detach): Remove args parameter.
14546
14547 2018-01-19 Yao Qi <yao.qi@linaro.org>
14548
14549 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14550 (arm_linux_init_abi): Install it.
14551
14552 2018-01-19 Yao Qi <yao.qi@linaro.org>
14553
14554 * osabi.c (gdb_osabi_names): Extend the regexp for
14555 arm-linux-gnueabihf.
14556
14557 2018-01-18 Yao Qi <yao.qi@linaro.org>
14558
14559 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14560 m_abbrevs.
14561 (abbrev_table::add_abbrev): Update.
14562 (abbrev_table::lookup_abbrev): Update.
14563
14564 2018-01-18 Yao Qi <yao.qi@linaro.org>
14565
14566 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14567
14568 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
14569
14570 * compile/compile.c (compile_to_object): Convert "triplet_rx"
14571 to "std::string".
14572
14573 2018-01-17 Tom Tromey <tom@tromey.com>
14574
14575 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
14576
14577 2018-01-17 Tom Tromey <tom@tromey.com>
14578
14579 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14580 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14581 (create_array_type_with_stride): Update.
14582 * dwarf2read.c (set_die_type): Update.
14583
14584 2018-01-17 Tom Tromey <tom@tromey.com>
14585
14586 * dwarf2read.c (delayed_method_info): Remove typedef.
14587 (dwarf2_cu::method_info): Now a std::vector.
14588 (add_to_method_list): Update.
14589 (free_delayed_list): Remove.
14590 (compute_delayed_physnames): Update.
14591 (process_full_comp_unit, process_full_type_unit): Clear the method
14592 list. Remove cleanups.
14593 (psymtab_include_file_name): Add name_holder parameter. Use
14594 unique_xmalloc_ptr.
14595 (dwarf_decode_lines): Update.
14596
14597 2018-01-17 Tom Tromey <tom@tromey.com>
14598 Simon Marchi <simon.marchi@ericsson.com>
14599
14600 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14601 (dwarf2_per_objfile::free_cached_comp_units)
14602 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14603 (init_cutu_and_read_dies_no_follow): Update.
14604 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14605 (dwarf2_cu::~dwarf2_cu): New.
14606 (free_heap_comp_unit, free_stack_comp_unit): Remove.
14607 (age_cached_comp_units, free_one_cached_comp_unit): Update.
14608
14609 2018-01-17 Tom Tromey <tom@tromey.com>
14610 Simon Marchi <simon.marchi@ericsson.com>
14611
14612 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14613 (struct die_reader_specs) <abbrev_table>: New member.
14614 (struct abbrev_table): Add constructor.
14615 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14616 <abbrev_obstack>: Now an auto_obstack.
14617 (abbrev_table_up): New typedef.
14618 (init_cu_die_reader): Add abbrev_table parameter.
14619 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14620 Add result_dwo_abbrev_table.
14621 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14622 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14623 Update.
14624 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14625 parameter.
14626 (skip_children): Update.
14627 (abbrev_table::alloc_abbrev): Rename from
14628 abbrev_table_alloc_abbrev.
14629 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14630 (abbrev_table::lookup_abbrev): Rename from
14631 abbrev_table_lookup_abbrev.
14632 (abbrev_table_read_table): Return abbrev_table_up.
14633 (abbrev_table_free, abbrev_table_free_cleanup)
14634 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14635 (load_partial_dies): Update.
14636
14637 2018-01-17 Tom Tromey <tom@tromey.com>
14638
14639 * dwarf2read.c (dwarf2_compute_name): Update comment.
14640 (read_func_scope, read_variable): Update.
14641 (new_symbol): Remove.
14642 (new_symbol_full): Rename to new_symbol.
14643
14644 2018-01-17 Mike Gulick <mgulick@mathworks.com>
14645
14646 PR gdb/16577
14647 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14648 a warning instead of throwing an error, set section size to 0 and return
14649 NULL.
14650 * gdb_bfd.h (gdb_bfd_map_section): Update description.
14651
14652 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14653
14654 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14655 std::string.
14656 (linux_ptrace_attach_fail_reason_string): Likewise.
14657 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14658 Likewise.
14659 (linux_ptrace_attach_fail_reason_string): Likewise.
14660 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14661
14662 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14663
14664 * linux-nat.c (linux_nat_attach): Remove xstrdup.
14665
14666 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
14667
14668 PR gdb/21559
14669 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14670 checking for fs_base/gs_base fields in struct user_regs_struct.
14671 * configure: Regenerate.
14672
14673 2018-01-17 Yao Qi <yao.qi@linaro.org>
14674
14675 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14676 function.
14677 (aarch64_linux_init_abi): Install it to gdbarch hook
14678 gcc_target_options.
14679
14680 2018-01-15 Pedro Alves <palves@redhat.com>
14681
14682 * common/signals-state-save-restore.c
14683 (save_original_signals_state): Fix typos.
14684
14685 2017-01-12 Tom Tromey <tom@tromey.com>
14686 Sergio Durigan Junior <sergiodj@redhat.com>
14687
14688 * Makefile.in (install-only): Install gdb-add-index.
14689
14690 2018-01-12 John Baldwin <jhb@FreeBSD.org>
14691
14692 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14693
14694 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
14695
14696 * infrun.c (keep_going_pass_signal): Clear step-over info when
14697 insert_breakpoints fails.
14698
14699 2018-01-11 Pedro Alves <palves@redhat.com>
14700
14701 PR gdb/22583
14702 * infrun.c (resume): Rename to ...
14703 (resume_1): ... this.
14704 (resume): Reimplement as wrapper around resume_1.
14705
14706 2018-01-11 Pedro Alves <palves@redhat.com>
14707
14708 PR remote/22597
14709 * remote.c (remote_parse_stop_reply): Default to the last-set
14710 general thread instead of to 'magic_null_ptid'.
14711
14712 2018-01-10 Pedro Alves <palves@redhat.com>
14713
14714 * language.h (language_get_symbol_name_matcher): Rename ...
14715 (get_symbol_name_matcher): ... this.
14716 * language.c (language_get_symbol_name_matcher): Ditto.
14717 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14718 callers adjusted.
14719
14720 2018-01-10 Pedro Alves <palves@redhat.com>
14721
14722 PR gdb/22670
14723 * dwarf2read.c
14724 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14725 Adjust to use language_get_symbol_name_matcher instead of
14726 language_defn::la_get_symbol_name_matcher.
14727 * language.c (language_get_symbol_name_matcher): If in Ada mode
14728 and the lookup name is a verbatim match, return Ada's matcher.
14729 * language.h (language_get_symbol_name_matcher): Adjust comment.
14730 (ada_lookup_name_info::verbatim_p):: New method.
14731
14732 2018-01-10 Pedro Alves <palves@redhat.com>
14733
14734 PR gdb/22670
14735 * ada-lang.c (ada_collect_symbol_completion_matches): If the
14736 minsym's language is language_auto or language_cplus, pass down
14737 language_ada instead.
14738 * symtab.c (compare_symbol_name): Don't frob symbol language here.
14739
14740 2018-01-10 Pedro Alves <palves@redhat.com>
14741
14742 PR gdb/22670
14743 * minsyms.c (linkage_name_str): New function.
14744 (iterate_over_minimal_symbols): Use it.
14745
14746 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14747
14748 * NEWS: Document that 'info proc' now works on FreeBSD.
14749
14750 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14751
14752 * configure.ac: Check for kinfo_getfile in libutil.
14753 * configure: Regenerate.
14754 * config.in: Regenerate.
14755 * fbsd-nat.c: Include "fbsd-tdep.h".
14756 (fbsd_fetch_cmdline): New.
14757 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14758 rather than calling error.
14759 (fbsd_info_proc): New.
14760 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14761 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14762 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14763
14764 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14765
14766 * fbsd-nat.c (struct free_deleter): Remove.
14767 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14768
14769 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14770
14771 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14772 NULL for an empty pathname.
14773
14774 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14775
14776 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14777 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14778 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14779 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14780 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14781 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14782 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14783 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14784 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14785 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14786 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14787 (fbsd_core_fetch_timeval, fbsd_print_sigset)
14788 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14789 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
14790 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14791
14792 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
14793
14794 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14795 (gnu_xfer_auxv): New function.
14796 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14797 TARGET_OBJECT_AUXV.
14798
14799 2018-01-08 Yao Qi <yao.qi@linaro.org>
14800 Simon Marchi <simon.marchi@ericsson.com>
14801
14802 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14803 common/selftest.c.
14804 (COMMON_OBS): Remove selftest.o.
14805 * configure.ac: Append selftest-arch.c and common/selftest.c to
14806 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
14807 * configure: Re-generated.
14808 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14809 GDB_SELF_TEST.
14810 (maintenance_info_selftests): Likewise.
14811
14812 2018-01-08 Xavier Roirand <roirand@adacore.com>
14813
14814 * ada-valprint.c (val_print_packed_array_elements): Use
14815 proper number of elements when printing an array indexed
14816 by an enumeration type.
14817
14818 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14819
14820 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14821 (dw2_get_file_names_reader): Adjust.
14822 (lookup_dwo_signatured_type): Adjust.
14823 (lookup_dwp_signatured_type): Adjust.
14824 (lookup_signatured_type): Adjust.
14825 (create_type_unit_group): Adjust.
14826 (get_type_unit_group): Adjust.
14827 (process_psymtab_comp_unit_reader): Adjust.
14828 (build_type_psymtabs_reader): Adjust.
14829 (scan_partial_symbols): Adjust.
14830 (add_partial_symbol): Adjust.
14831 (add_partial_subprogram): Adjust.
14832 (peek_die_abbrev): Adjust.
14833 (fixup_go_packaging): Adjust.
14834 (process_imported_unit_die): Adjust.
14835 (dwarf2_compute_name): Adjust.
14836 (dwarf2_physname): Adjust.
14837 (read_import_statement): Adjust.
14838 (handle_DW_AT_stmt_list): Adjust.
14839 (read_file_scope): Adjust.
14840 (read_func_scope): Adjust.
14841 (read_lexical_block_scope): Adjust.
14842 (read_call_site_scope): Adjust.
14843 (read_variable): Adjust.
14844 (dwarf2_rnglists_process): Adjust.
14845 (dwarf2_ranges_process): Adjust.
14846 (dwarf2_ranges_read): Adjust.
14847 (dwarf2_get_pc_bounds): Adjust.
14848 (dwarf2_record_block_ranges): Adjust.
14849 (dwarf2_add_field): Adjust.
14850 (dwarf2_add_member_fn): Adjust.
14851 (read_structure_type): Adjust.
14852 (process_structure_scope): Adjust.
14853 (read_enumeration_type): Adjust.
14854 (read_array_type): Adjust.
14855 (mark_common_block_symbol_computed): Adjust.
14856 (read_common_block): Adjust.
14857 (read_namespace_type): Adjust.
14858 (read_namespace): Adjust.
14859 (read_module_type): Adjust.
14860 (read_tag_pointer_type): Adjust.
14861 (read_tag_ptr_to_member_type): Adjust.
14862 (read_tag_string_type): Adjust.
14863 (read_subroutine_type): Adjust.
14864 (read_typedef): Adjust.
14865 (read_base_type): Adjust.
14866 (attr_to_dynamic_prop): Adjust.
14867 (read_subrange_type): Adjust.
14868 (read_unspecified_type): Adjust.
14869 (dwarf2_read_abbrevs): Adjust.
14870 (load_partial_dies): Adjust.
14871 (read_partial_die): Adjust.
14872 (find_partial_die): Adjust.
14873 (guess_partial_die_structure_name): Adjust.
14874 (fixup_partial_die): Adjust.
14875 (read_attribute_value): Adjust.
14876 (read_addr_index): Adjust.
14877 (read_addr_index_from_leb128): Adjust.
14878 (read_str_index): Adjust.
14879 (dwarf2_string_attr): Adjust.
14880 (get_debug_line_section): Adjust.
14881 (dwarf_decode_line_header): Adjust.
14882 (lnp_state_machine::check_line_address): Adjust.
14883 (dwarf_decode_lines_1): Adjust.
14884 (dwarf_decode_lines): Adjust.
14885 (dwarf2_start_symtab): Adjust.
14886 (var_decode_location): Adjust.
14887 (new_symbol_full): Adjust.
14888 (dwarf2_const_value_data): Adjust.
14889 (dwarf2_const_value_attr): Adjust.
14890 (dwarf2_const_value): Adjust.
14891 (die_type): Adjust.
14892 (die_containing_type): Adjust.
14893 (build_error_marker_type): Adjust.
14894 (lookup_die_type): Adjust.
14895 (guess_full_die_structure_name): Adjust.
14896 (anonymous_struct_prefix): Adjust.
14897 (determine_prefix): Adjust.
14898 (dwarf2_name): Adjust.
14899 (follow_die_ref_or_sig): Adjust.
14900 (follow_die_offset): Adjust.
14901 (follow_die_ref): Adjust.
14902 (follow_die_sig_1): Adjust.
14903 (follow_die_sig): Adjust.
14904 (get_signatured_type): Adjust.
14905 (get_DW_AT_signature_type): Adjust.
14906 (decode_locdesc): Adjust.
14907 (dwarf_decode_macros): Adjust.
14908 (cu_debug_loc_section): Adjust.
14909 (fill_in_loclist_baton): Adjust.
14910 (dwarf2_symbol_mark_computed): Adjust.
14911 (init_one_comp_unit): Don't assign
14912 dwarf2_cu::dwarf2_per_objfile.
14913 (set_die_type): Adjust.
14914
14915 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14916
14917 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14918 <dwarf2_per_objfile>: New field.
14919 (dwarf2_per_objfile): Remove global.
14920 (get_dwarf2_per_objfile): New function.
14921 (set_dwarf2_per_objfile): New function.
14922 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14923 dwarf2_per_objfile.
14924 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14925 (read_abbrev_offset): Likewise.
14926 (read_indirect_string): Likewise.
14927 (read_indirect_line_string): Likewise.
14928 (read_indirect_string_at_offset): Likewise.
14929 (read_indirect_string_from_dwz): Likewise.
14930 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14931 dwarf2_per_objfile.
14932 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14933 (create_all_comp_units): Change objfile parameter to
14934 dwarf2_per_objfile.
14935 (create_all_type_units): Likewise.
14936 (process_queue): Add dwarf2_per_objfile parameter.
14937 (read_and_check_comp_unit_head): Likewise.
14938 (lookup_dwo_unit_in_dwp): Likewise.
14939 (get_dwp_file): Likewise.
14940 (process_cu_includes): Likewise.
14941 (struct free_dwo_file_cleanup_data): New struct.
14942 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14943 set_dwarf2_per_objfile.
14944 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14945 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14946 context, adjust calls.
14947 (dw2_instantiate_symtab): Likewise.
14948 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14949 (dw2_get_cu): Likewise.
14950 (create_cu_from_index_list): Change objfile parameter to
14951 dwarf2_per_objfile.
14952 (create_cus_from_index_list): Get dwarf2_per_objfile from
14953 context, adjust calls.
14954 (create_cus_from_index): Likewise.
14955 (create_signatured_type_table_from_index): Change objfile
14956 parameter to dwarf2_per_objfile.
14957 (create_signatured_type_table_from_debug_names): Change objfile
14958 parameter to dwarf2_per_objfile.
14959 (create_addrmap_from_index): Likewise.
14960 (create_addrmap_from_aranges): Likewise.
14961 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14962 (dw2_setup): Remove.
14963 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14964 context.
14965 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14966 get_dwarf2_per_objfile.
14967 (dw2_forget_cached_source_info): Likewise.
14968 (dw2_map_symtabs_matching_filename): Likewise.
14969 (struct dw2_symtab_iterator) <index>: Remove.
14970 <dwarf2_per_objfile>: New field.
14971 (dw2_symtab_iter_init): Replace index parameter with
14972 dwarf2_per_objfile.
14973 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14974 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14975 (dw2_print_stats): Likewise.
14976 (dw2_dump): Likewise.
14977 (dw2_expand_symtabs_for_function): Likewise.
14978 (dw2_expand_all_symtabs): Likewise.
14979 (dw2_expand_symtabs_with_fullname): Likewise.
14980 (dw2_expand_marked_cus): Replace index and objfile parameters
14981 with dwarf2_per_objfile.
14982 (dw_expand_symtabs_matching_file_matcher): Add
14983 dwarf2_per_objfile parameter and adjust calls.
14984 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14985 adjust calls.
14986 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14987 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14988 adjust calls.
14989 (create_cus_from_debug_names_list): Replace objfile parameter
14990 with dwarf2_per_objfile and adjust calls.
14991 (create_cus_from_debug_names): Likewise.
14992 (dwarf2_read_debug_names): Likewise.
14993 (mapped_debug_names::namei_to_name): Adjust call.
14994 (dw2_debug_names_iterator::next): Likewise.
14995 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14996 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14997 (dw2_debug_names_dump): Likewise.
14998 (dw2_debug_names_expand_symtabs_for_function): Likewise.
14999 (dw2_debug_names_expand_symtabs_matching): Likewise.
15000 (dwarf2_initialize_objfile): Likewise.
15001 (dwarf2_build_psymtabs): Likewise.
15002 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15003 this_cu.
15004 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15005 (read_and_check_comp_unit_head): Likewise.
15006 (read_abbrev_offset): Likewise.
15007 (create_debug_type_hash_table): Likewise.
15008 (create_debug_types_hash_table): Likewise.
15009 (create_all_type_units): Replace objfile parameter with
15010 dwarf2_per_objfile.
15011 (add_type_unit): Add dwarf2_per_objfile parameter.
15012 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15013 with dwarf2_per_objfile.
15014 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15015 (lookup_dwp_signatured_type): Likewise.
15016 (lookup_signatured_type): Likewise.
15017 (read_cutu_die_from_dwo): Likewise.
15018 (init_tu_and_read_dwo_dies): Likewise.
15019 (init_cutu_and_read_dies): Likewise.
15020 (init_cutu_and_read_dies_no_follow): Likewise.
15021 (allocate_type_unit_groups_table): Add objfile parameter.
15022 (create_type_unit_group): Use dwarf2_per_objfile from cu.
15023 (get_type_unit_group): Likewise.
15024 (process_psymtab_comp_unit): Update call.
15025 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15026 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15027 (print_tu_stats): Likewise.
15028 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15029 in void* parameter.
15030 (build_type_psymtabs): Change objfile parameter to
15031 dwarf2_per_objfile.
15032 (process_skeletonless_type_unit): Use dwarf2_per_objfile
15033 passed in void* parameter.
15034 (process_skeletonless_type_units): Change objfile parameter to
15035 dwarf2_per_objfile.
15036 (set_partial_user): Likewise.
15037 (dwarf2_build_psymtabs_hard): Likewise.
15038 (read_comp_units_from_section): Likewise.
15039 (create_all_comp_units): Likewise.
15040 (scan_partial_symbols): Update calls.
15041 (add_partial_symbol): Likewise.
15042 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15043 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15044 (process_queue): Add dwarf2_per_objfile parameter.
15045 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15046 (compute_compunit_symtab_includes): Likewise.
15047 (process_cu_includes): Add dwarf2_per_objfile parameter.
15048 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15049 (process_full_type_unit): Likewise.
15050 (process_imported_unit_die): Update call.
15051 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15052 (read_file_scope): Likewise.
15053 (allocate_dwo_file_hash_table): Add objfile parameter.
15054 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15055 (create_cus_hash_table): Likewise.
15056 (create_dwp_hash_table): Likewise.
15057 (create_dwo_unit_in_dwp_v1): Likewise.
15058 (create_dwp_v2_section): Likewise.
15059 (create_dwo_unit_in_dwp_v2): Likewise.
15060 (lookup_dwo_unit_in_dwp): Likewise.
15061 (try_open_dwop_file): Likewise.
15062 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15063 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15064 cleanup to include a reference to dwarf2_per_objfile.
15065 (open_dwp_file): Add dwarf2_per_objfile parameter.
15066 (open_and_init_dwp_file): Likewise.
15067 (get_dwp_file): Likewise.
15068 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15069 (queue_and_load_all_dwo_tus): Update call.
15070 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15071 data.
15072 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15073 (dwarf2_ranges_process): Likewise.
15074 (dwarf2_get_pc_bounds): Likewise.
15075 (mark_common_block_symbol_computed): Likewise.
15076 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15077 (dwarf2_read_abbrevs): Update call.
15078 (read_partial_die): Use dwarf2_per_objfile from cu.
15079 (find_partial_die): Likewise.
15080 (fixup_partial_die): Likewise.
15081 (read_attribute_value): Likewise.
15082 (read_indirect_string_at_offset_from): Add objfile parameter.
15083 (read_indirect_string_at_offset): Add dwarf2_per_objfile
15084 parameter.
15085 (read_indirect_string_from_dwz): Add objfile parameter.
15086 (read_indirect_string): Add objfile parameter.
15087 (read_addr_index_1): Add dwarf2_per_objfile parameter.
15088 (read_addr_index): Use dwarf2_per_objfile from cu.
15089 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15090 call dw2_setup.
15091 (read_str_index): Use dwarf2_per_objfile from cu.
15092 (get_debug_line_section): Likewise.
15093 (read_formatted_entries): Add dwarf2_per_objfile parameter.
15094 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15095 (new_symbol_full): Use dwarf2_per_objfile from cu.
15096 (build_error_marker_type): Likewise.
15097 (lookup_die_type): Likewise.
15098 (determine_prefix): Likewise.
15099 (follow_die_offset): Likewise.
15100 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15101 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15102 (dwarf2_fetch_die_type_sect_off): Likewise.
15103 (dwarf2_get_die_type): Likewise.
15104 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15105 (get_signatured_type): Likewise.
15106 (get_DW_AT_signature_type): Likewise.
15107 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15108 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15109 (cu_debug_loc_section): Likewise.
15110 (fill_in_loclist_baton): Likewise.
15111 (dwarf2_symbol_mark_computed): Likewise.
15112 (dwarf2_find_containing_comp_unit): Change objfile parameter to
15113 dwarf2_per_objfile.
15114 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15115 parameter.
15116 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15117 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15118 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15119 (set_die_type): Use dwarf2_free_objfile from cu.
15120 (get_die_type_at_offset): Likewise.
15121 (dwarf2_per_objfile_free): Don't assign global variable.
15122 (debug_names) <constructor>: Add dwarf2_per_objfile
15123 parameter, update m_debugstrlookup construction.
15124 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15125 parameter.
15126 <m_dwarf2_per_objfile>: New field.
15127 <lookup>: Use m_dwarf2_per_objfile.
15128 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15129 (psyms_seen_size): Likewise.
15130 (write_gdbindex): Replace objfile parameter with
15131 dwarf2_per_objfile.
15132 (write_debug_names): Likewise.
15133 (write_psymtabs_to_index): Likewise.
15134 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15135 calls.
15136
15137 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15138
15139 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15140 <dwarf2_per_objfile>: New field.
15141 (struct dwarf2_per_cu_data) <objfile>: Remove.
15142 <dwarf2_per_objfile>: New field.
15143 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15144 of objfile.
15145 (create_signatured_type_table_from_index): Likewise.
15146 (create_debug_type_hash_table): Likewise.
15147 (fill_in_sig_entry_from_dwo_entry): Likewise.
15148 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15149 (create_type_unit_group): Assign dwarf2_per_objfile instead of
15150 objfile.
15151 (create_partial_symtab): Access objfile through
15152 dwarf2_per_objfile.
15153 (process_psymtab_comp_unit_reader): Likewise.
15154 (read_comp_units_from_section): Likewise.
15155 (scan_partial_symbols): Likewise.
15156 (add_partial_symbol): Likewise.
15157 (add_partial_subprogram): Likewise.
15158 (peek_die_abbrev): Likewise.
15159 (fixup_go_packaging): Likewise.
15160 (process_full_comp_unit): Likewise.
15161 (process_full_type_unit): Likewise.
15162 (process_imported_unit_die): Likewise.
15163 (dwarf2_compute_name): Likewise.
15164 (dwarf2_physname): Likewise.
15165 (read_import_statement): Likewise.
15166 (create_cus_hash_table): Assign dwarf2_physname instead of
15167 objfile.
15168 (read_func_scope): Access objfile through dwarf2_per_objfile.
15169 (read_lexical_block_scope): Likewise.
15170 (read_call_site_scope): Likewise.
15171 (read_variable): Likewise.
15172 (dwarf2_rnglists_process): Likewise.
15173 (dwarf2_ranges_process): Likewise.
15174 (dwarf2_ranges_read): Likewise.
15175 (dwarf2_record_block_ranges): Likewise.
15176 (dwarf2_add_field): Likewise.
15177 (dwarf2_add_member_fn): Likewise.
15178 (read_structure_type): Likewise.
15179 (process_structure_scope): Likewise.
15180 (read_enumeration_type): Likewise.
15181 (read_array_type): Likewise.
15182 (read_common_block): Likewise.
15183 (read_namespace_type): Likewise.
15184 (read_namespace): Likewise.
15185 (read_module_type): Likewise.
15186 (read_tag_pointer_type): Likewise.
15187 (read_tag_ptr_to_member_type): Likewise.
15188 (read_tag_string_type): Likewise.
15189 (read_subroutine_type): Likewise.
15190 (read_typedef): Likewise.
15191 (read_base_type): Likewise.
15192 (attr_to_dynamic_prop): Likewise.
15193 (read_subrange_type): Likewise.
15194 (read_unspecified_type): Likewise.
15195 (load_partial_dies): Likewise.
15196 (read_partial_die): Likewise.
15197 (find_partial_die): Likewise.
15198 (guess_partial_die_structure_name): Likewise.
15199 (fixup_partial_die): Likewise.
15200 (read_attribute_value): Likewise.
15201 (read_addr_index_from_leb128): Likewise.
15202 (dwarf2_read_addr_index): Likewise.
15203 (dwarf2_string_attr): Likewise.
15204 (lnp_state_machine::check_line_address): Likewise.
15205 (dwarf_decode_lines_1): Likewise.
15206 (dwarf_decode_lines): Likewise.
15207 (dwarf2_start_symtab): Likewise.
15208 (var_decode_location): Likewise.
15209 (new_symbol_full): Likewise.
15210 (dwarf2_const_value_data): Likewise.
15211 (dwarf2_const_value_attr): Likewise.
15212 (dwarf2_const_value): Likewise.
15213 (die_type): Likewise.
15214 (die_containing_type): Likewise.
15215 (lookup_die_type): Likewise.
15216 (guess_full_die_structure_name): Likewise.
15217 (anonymous_struct_prefix): Likewise.
15218 (dwarf2_name): Likewise.
15219 (follow_die_ref_or_sig): Likewise.
15220 (follow_die_offset): Likewise.
15221 (follow_die_ref): Likewise.
15222 (dwarf2_fetch_die_loc_sect_off): Likewise.
15223 (dwarf2_fetch_constant_bytes): Likewise.
15224 (dwarf2_fetch_die_type_sect_off): Likewise.
15225 (dwarf2_get_die_type): Likewise.
15226 (follow_die_sig): Likewise.
15227 (decode_locdesc): Likewise.
15228 (dwarf2_per_cu_objfile): Likewise.
15229 (dwarf2_per_cu_text_offset): Likewise.
15230 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15231 objfile.
15232 (set_die_type): Access objfile through
15233 dwarf2_per_objfile.
15234
15235 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15236
15237 * valprint.c (converted_character_d): Remove typedef.
15238 (DEF_VEC_O (converted_character_d)): Remove.
15239 (count_next_character): Use std::vector.
15240 (print_converted_chars_to_obstack): Likewise.
15241 (generic_printstr): Likewise.
15242
15243 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15244
15245 * xml-support.h (struct gdb_xml_value): Add constructor.
15246 <value>: Change type to unique_xmalloc_ptr.
15247 (gdb_xml_value_s): Remove typedef.
15248 (DEF_VEC_O (gdb_xml_value_s)): Remove.
15249 (gdb_xml_element_start_handler): Change parameter type to
15250 std::vector.
15251 (xml_find_attribute): Likewise.
15252 * xml-support.c (xml_find_attribute): Change parameter type to
15253 std::vector and adjust.
15254 (gdb_xml_values_cleanup): Remove.
15255 (gdb_xml_parser::start_element): Adjust to std::vector.
15256 (xinclude_start_include): Change paraeter type to std::vector
15257 and adjust.
15258 * btrace.c (check_xml_btrace_version): Likewise.
15259 (parse_xml_btrace_block): Likewise.
15260 (parse_xml_btrace_pt_config_cpu): Likewise.
15261 (parse_xml_btrace_pt): Likewise.
15262 (parse_xml_btrace_conf_bts): Likewise.
15263 (parse_xml_btrace_conf_pt): Likewise.
15264 * memory-map.c (memory_map_start_memory): Likewise.
15265 (memory_map_start_property): Likewise.
15266 * osdata.c (osdata_start_osdata): Likewise.
15267 (osdata_start_item): Likewise.
15268 (osdata_start_column): Likewise.
15269 * remote.c (start_thread): Likewise.
15270 * solib-aix.c (library_list_start_library): Likewise.
15271 (library_list_start_list): Likewise.
15272 * solib-svr4.c (library_list_start_library): Likewise.
15273 (svr4_library_list_start_list): Likewise.
15274 * solib-target.c (library_list_start_segment): Likewise.
15275 (library_list_start_section): Likewise.
15276 (library_list_start_library): Likewise.
15277 (library_list_start_list): Likewise.
15278 * tracepoint.c (traceframe_info_start_memory): Likewise.
15279 (traceframe_info_start_tvar): Likewise.
15280 * xml-syscall.c (syscall_start_syscall): Likewise.
15281 * xml-tdesc.c (tdesc_start_target): Likewise.
15282 (tdesc_start_feature): Likewise.
15283 (tdesc_start_reg): Likewise.
15284 (tdesc_start_union): Likewise.
15285 (tdesc_start_struct): Likewise.
15286 (tdesc_start_flags): Likewise.
15287 (tdesc_start_enum): Likewise.
15288 (tdesc_start_field): Likewise.
15289 (tdesc_start_enum_value): Likewise.
15290 (tdesc_start_vector): Likewise.
15291
15292 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15293
15294 * extension.h (struct xmethod_worker) <clone>: Remove.
15295 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15296 Remove.
15297 (python_xmethod_worker::clone): Remove.
15298 * valops.c (find_overload_match): Use std::move instead of
15299 clone.
15300
15301 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15302
15303 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15304 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15305 <free_xmethod_worker_data>: Remove.
15306 <get_matching_xmethod_workers>: Chance VEC to std::vector.
15307 <get_xmethod_arg_types>: Remove.
15308 <get_xmethod_result_type>: Remove.
15309 <invoke_xmethod>: Remove.
15310 * extension.c (new_xmethod_worker): Remove.
15311 (clone_xmethod_worker): Remove.
15312 (get_matching_xmethod_workers): Return void, pass std::vector by
15313 pointer.
15314 (get_xmethod_arg_types): Rename to...
15315 (xmethod_worker::get_arg_types): ... this, and adjust.
15316 (get_xmethod_result_type): Rename to...
15317 (xmethod_worker::get_result_type): ... this, and adjust.
15318 (invoke_xmethod): Remove.
15319 (free_xmethod_worker): Remove.
15320 (free_xmethod_worker_vec): Remove.
15321 * extension.h (enum ext_lang_rc): Move here from
15322 extension-priv.h.
15323 (struct xmethod_worker): Add constructor and destructor.
15324 <data>: Remove.
15325 <value>: Remove.
15326 <invoke, clone, do_get_result_type, do_get_arg_types>: New
15327 virtual pure methods.
15328 <get_arg_types, get_result_type>: New methods.
15329 (xmethod_worker_ptr): Remove typedef.
15330 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15331 (xmethod_worker_vec): Remove typedef.
15332 (xmethod_worker_up): New typedef.
15333 (invoke_xmethod): Remove.
15334 (clone_xmethod_worker): Remove.
15335 (free_xmethod_worker): Remove.
15336 (free_xmethod_worker_vec): Remove.
15337 (get_xmethod_arg_types): Remove.
15338 (get_xmethod_result_type): Remove.
15339 * valops.c (find_method_list): Use std::vector, don't use
15340 intermediate vector.
15341 (value_find_oload_method_list): Use std::vector.
15342 (find_overload_match): Use std::vector.
15343 (find_oload_champ): Use std::vector.
15344 * value.c (value_free): Use operator delete.
15345 (value_of_xmethod): Rename to...
15346 (value_from_xmethod): ... this. Don't assign
15347 xmethod_worker::value, take rvalue-reference.
15348 (result_type_of_xmethod): Adjust.
15349 (call_xmethod): Adjust.
15350 * value.h: Include extension.h.
15351 (struct xmethod_worker): Don't forward-declare.
15352 (value_of_xmethod): Rename to...
15353 (value_from_xmethod): ... this, take rvalue-reference.
15354 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15355 (struct python_xmethod_worker): ... this, add constructor and
15356 destructor.
15357 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15358 (gdbpy_free_xmethod_worker_data): Rename to...
15359 (python_xmethod_worker::~python_xmethod_worker): ... this and
15360 adjust.
15361 (gdbpy_clone_xmethod_worker_data): Rename to...
15362 (python_xmethod_worker::clone): ... this and adjust.
15363 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15364 temporary vector.
15365 (gdbpy_get_xmethod_arg_types): Rename to...
15366 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15367 (gdbpy_get_xmethod_result_type): Rename to...
15368 (python_xmethod_worker::do_get_result_type): ... this and
15369 adjust.
15370 (gdbpy_invoke_xmethod): Rename to...
15371 (python_xmethod_worker::invoke): ... this and adjust.
15372 (new_python_xmethod_worker): Rename to...
15373 (python_xmethod_worker::python_xmethod_worker): ... this and
15374 adjust.
15375 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15376 Remove.
15377 (gdbpy_free_xmethod_worker_data): Remove.
15378 (gdbpy_get_matching_xmethod_workers): Use std::vector.
15379 (gdbpy_get_xmethod_arg_types): Remove.
15380 (gdbpy_get_xmethod_result_type): Remove.
15381 (gdbpy_invoke_xmethod): Remove.
15382 * python/python.c (python_extension_ops): Remove obsolete
15383 callbacks.
15384
15385 2018-01-05 Pedro Alves <palves@redhat.com>
15386
15387 PR gdb/18653
15388 * common/signals-state-save-restore.c
15389 (save_original_signals_state): New parameter 'quiet'. Warn if we
15390 find a custom handler preinstalled, instead of internal erroring.
15391 But only warn if !quiet.
15392 * common/signals-state-save-restore.h
15393 (save_original_signals_state): New parameter 'quiet'.
15394 * main.c (captured_main_1): Move save_original_signals_state call
15395 after option handling, and pass QUIET.
15396
15397 2018-01-05 Pedro Alves <palves@redhat.com>
15398
15399 * spu-tdep.c (spu_catch_start): Pass
15400 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15401
15402 2018-01-05 Pedro Alves <palves@redhat.com>
15403
15404 PR gdb/22670
15405 * ada-lang.c (literal_symbol_name_matcher): New function.
15406 (ada_get_symbol_name_matcher): Use it for
15407 symbol_name_match_type::SEARCH_NAME.
15408 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
15409 it down instead of assuming symbol_name_match_type::FULL.
15410 * block.h (block_lookup_symbol): New parameter 'match_type'.
15411 * c-valprint.c (print_unpacked_pointer): Use
15412 lookup_symbol_search_name instead of lookup_symbol.
15413 * compile/compile-object-load.c (get_out_value_type): Pass down
15414 symbol_name_match_type::SEARCH_NAME.
15415 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15416 symbol_name_match_type::FULL.
15417 * cp-support.c (cp_get_symbol_name_matcher): Handle
15418 symbol_name_match_type::SEARCH_NAME.
15419 * infrun.c (insert_exception_resume_breakpoint): Use
15420 lookup_symbol_search_name.
15421 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15422 * psymtab.c (maintenance_check_psymtabs): Use
15423 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15424 * stack.c (print_frame_args): Use lookup_symbol_search_name and
15425 SYMBOL_SEARCH_NAME.
15426 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15427 if symbol_name_match_type::SEARCH_NAME.
15428 (lookup_symbol_in_language): Pass down
15429 symbol_name_match_type::FULL.
15430 (lookup_symbol_search_name): New.
15431 (lookup_language_this): Pass down
15432 symbol_name_match_type::SEARCH_NAME.
15433 (lookup_symbol_aux, lookup_local_symbol): New parameter
15434 'match_type'. Pass it down.
15435 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15436 (lookup_symbol_search_name): New declaration.
15437 (lookup_symbol_in_block): New 'match_type' parameter.
15438
15439 2018-01-05 Pedro Alves <palves@redhat.com>
15440
15441 PR gdb/22670
15442 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15443 ada_lookup_symbol.
15444 (ada_lookup_symbol): Reimplement in terms of
15445 ada_lookup_symbol_list, bits factored out from
15446 ada_lookup_encoded_symbol.
15447
15448 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15449
15450 * ada-exp.y (write_object_renaming): When subscripting an array
15451 using a symbol as the index, pass the block in call to
15452 ada_lookup_encoded_symbol when looking that symbol up.
15453
15454 2018-01-05 Jerome Guitton <guitton@adacore.com>
15455
15456 * ada-lang.c (ada_array_length): Use ada_index_type instead of
15457 TYPE_INDEX_TYPE.
15458
15459 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15460
15461 * ada-lang.c (ada_to_fixed_value_create): Add handling of
15462 the case where VALUE_LVAL (val0) is not lval_memory.
15463
15464 2018-01-05 Xavier Roirand <roirand@adacore.com>
15465
15466 * ada-valprint.c (print_optional_low_bound): Handle
15467 character-indexed array printing like boolean-indexed array
15468 printing.
15469
15470 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15471
15472 * NEWS: Create a new section for the next release branch.
15473 Rename the section of the current branch, now that it has
15474 been cut.
15475
15476 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15477
15478 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15479 * version.in: Bump version to 8.1.50.DATE-git.
15480
15481 2018-01-03 Xavier Roirand <roirand@adacore.com>
15482
15483 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15484 Add field.
15485 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15486 Add field.
15487 (default_exception_support_info) <catch_handlers_sym>: Add field.
15488 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15489 (ada_exception_name_addr_1): Add "catch handlers" handling.
15490 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15491 Update all callers.
15492 (create_excep_cond_exprs) <ex>: Add parameter.
15493 (re_set_exception): Update create_excep_cond_exprs call.
15494 (print_it_exception, print_one_exception, print_mention_exception)
15495 (print_recreate_exception): Add "catch handler" handling.
15496 (allocate_location_catch_handlers, re_set_catch_handlers)
15497 (check_status_catch_handlers, print_it_catch_handlers)
15498 (print_one_catch_handlers, print_mention_catch_handlers)
15499 (print_recreate_catch_handlers): New function.
15500 (catch_handlers_breakpoint_ops): New variable.
15501 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15502 Add parameter. Add "catch handler" handling.
15503 (ada_exception_sym_name, ada_exception_breakpoint_ops):
15504 Add "catch handler" handling.
15505 (ada_exception_catchpoint_cond_string): Add "catch handler"
15506 handling.
15507 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15508 call.
15509 (catch_ada_handlers_command): New function.
15510 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15511 operations structure.
15512 (_initialize_ada_language): Add "catch handlers" command entry.
15513 * NEWS: Document "catch handlers" feature.
15514
15515 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15516
15517 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15518 account when creating the array type of the slice.
15519 (ada_value_slice): Likewise.
15520
15521 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15522
15523 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15524 New enum value.
15525 (create_array_type_with_stride): Add byte_stride_prop parameter.
15526 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15527 New parameter. Update all callers in this file.
15528 (array_type_has_dynamic_stride): New function.
15529 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15530 of arrays with dynamic byte strides.
15531 * dwarf2read.c (read_array_type): Add support for dynamic
15532 DW_AT_byte_stride attributes.
15533
15534 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15535
15536 * dwarf2read.c (read_unspecified_type): Treat
15537 DW_TAG_enumeration_type DIEs from Ada units as stubs.
15538
15539 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15540
15541 Update copyright year range in all GDB files.
15542
15543 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
15544
15545 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15546 and gdb/testsuite/gdb.base/step-line.c.
15547
15548 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15549
15550 * copyright.py (main): Dump the contents of
15551 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15552 even if BY_HAND is empty.
15553
15554 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15555
15556 * top.c (print_gdb_version): Update Copyright year in version
15557 message.
15558
15559 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15560
15561 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15562
15563 For older changes see ChangeLog-2017.
15564 \f
15565 Local Variables:
15566 mode: change-log
15567 left-margin: 8
15568 fill-column: 74
15569 version-control: never
15570 coding: utf-8
15571 End: