gdb: xtensa: use linux ABI code for uclinux
[binutils-gdb.git] / gdb / ChangeLog
1 2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
2
3 * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
4 so that it applies to uclinux as well.
5
6 2018-11-06 Marius Muench <marius.muench@eurecom.fr>
7
8 * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
9 when on AAPCS.
10
11 2018-11-06 John Baldwin <jhb@FreeBSD.org>
12
13 * riscv-fbsd-nat.c (getregs_supplies): Return true for
14 RISCV_CSR_SSTATUS_REGNUM.
15
16 2018-11-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
17
18 * source.c (open_source_file): Fix leak by transferring the
19 current s->fullname to the unique_xmalloc_ptr fullname given
20 to find_and_open_source.
21
22 2018-11-04 Tom Tromey <tom@tromey.com>
23
24 * varobj.c (install_default_visualizer): Update.
25 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
26 Return gdbpy_ref.
27 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
28 (find_pretty_printer_from_progspace)
29 (find_pretty_printer_from_gdb, find_pretty_printer)
30 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
31 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
32 Update.
33
34 2018-11-04 Tom Tromey <tom@tromey.com>
35
36 * python/python.c (gdbpy_parameter_value): Update.
37 * python/python-internal.h (python_string_to_unicode)
38 (python_string_to_target_python_string)
39 (host_string_to_python_string): Return gdbpy_ref.
40 * python/py-utils.c (python_string_to_unicode)
41 (unicode_to_encoded_python_string)
42 (unicode_to_target_python_string)
43 (python_string_to_target_string)
44 (python_string_to_target_python_string): Return gdbpy_ref.
45 (python_string_to_host_string): Update.
46 (host_string_to_python_string): Return gdbpy_ref.
47 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
48 (stpy_fullname): Update.
49 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
50 Update.
51 * python/py-prettyprint.c (print_string_repr): Update.
52 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
53 (objfpy_get_build_id): Update.
54 * python/py-breakpoint.c (bppy_get_location)
55 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
56 Update.
57
58 2018-11-04 Tom Tromey <tom@tromey.com>
59
60 * python/python-internal.h (gdb_py_object_from_longest)
61 (gdb_py_object_from_ulongest): Return gdbpy_ref.
62 * python/py-value.c (valpy_int): Update.
63 * python/py-utils.c (gdb_py_object_from_longest): Return
64 gdbpy_ref.
65 (gdb_py_object_from_ulongest): Likewise.
66 * python/py-type.c (typy_get_alignof): Update.
67 * python/py-linetable.c (ltpy_get_all_source_lines)
68 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
69 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
70
71 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
72
73 * ada-lang.c (_initialize_ada_language): Fix typo.
74
75 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
76
77 * language.c (type): Remove.
78 (_initialize_language): Remove assignment to type.
79
80 2018-11-02 Joel Brobecker <brobecker@adacore.com>
81
82 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
83 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
84 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
85 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
86 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
87 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
88 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
89 and aarch64-ravenscar-thread.o.
90 * NEWS: Add entry documenting Ravenscar tasking support
91 on AArch64 ELF.
92
93 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
94
95 * symtab.c (info_functions_command): Initialize quiet flag.
96 * stack.c (info_args_command): Likewise.
97
98 2018-11-01 Jim Wilson <jimw@sifive.com>
99
100 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
101 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
102 debugging messages.
103
104 2018-11-01 Joel Brobecker <brobecker@adacore.com>
105
106 * ada-lang.c (ada_watch_location_expression): New function.
107 (ada_language_defn): Set la_watch_location_expression to
108 ada_watch_location_expression.
109
110 2018-11-01 Joel Brobecker <brobecker@adacore.com>
111
112 * print-utils.c (int_string): Remove unnecessary trailing spaces.
113
114 2018-11-01 Joel Brobecker <brobecker@adacore.com>
115
116 * rs6000-tdep.c (skip_prologue): Fix potential negative left
117 shifting.
118
119 2018-11-01 Jerome Guitton <guitton@adacore.com>
120 Joel Brobecker <brobecker@adacore.com>
121
122 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
123 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
124 * arm-pikeos-tdep.c: New file.
125 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
126 embedded system.
127 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
128
129 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
130
131 * common/pathstuff.c (get_standard_temp_dir): New.
132 * common/pathstuff.h (get_standard_temp_dir): New.
133 * config.in: Re-generate.
134 * configure: Re-generate.
135 * configure.ac: Don't check for mkdtemp.
136 * gnulib/aclocal-m4-deps.mk: Re-generate.
137 * gnulib/aclocal.m4: Re-generate.
138 * gnulib/config.in: Re-generate.
139 * gnulib/configure: Re-generate.
140 * gnulib/import/Makefile.am: Re-generate.
141 * gnulib/import/Makefile.in: Re-generate.
142 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
143 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
144 * gnulib/import/m4/mkdtemp.m4: New file.
145 * gnulib/import/mkdtemp.c: New file.
146 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
147 Add mkdtemp module.
148 * unittests/mkdir-recursive-selftests.c (test): Use
149 get_standard_temp_dir.
150 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
151 ifdef.
152 * compile/compile.c (get_compile_file_tempdir): Likewise.
153
154 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
155
156 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
157 (SIG_FRAME_LR_OFFSET64): New define.
158 (SIG_FRAME_FP_OFFSET64): New define.
159 (aix_sighandle_frame_cache): New Function.
160 (aix_sighandle_frame_this_id): New Function.
161 (aix_sighandle_frame_prev_register): New Function.
162 (aix_sighandle_frame_sniffer): New Function.
163 (aix_sighandle_frame_unwind): New global variable.
164 (rs6000_aix_init_osabi): Install new frame unwinder.
165
166 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
167
168 PR gdb/23835
169 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
170 already defined.
171
172 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
173
174 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
175
176 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
177
178 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
179 (producer_is_icc): New function.
180 (check_producer): Set producer_is_icc field on dwarf2_cu.
181 (dwarf2_init_integer_type): New function.
182 (read_base_type): Call dwarf2_init_integer_type instead of
183 init_integer_type in all cases.
184 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
185 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
186 LEN is greater than 0.
187
188 2018-10-30 Tom Tromey <tom@tromey.com>
189
190 * main.c (captured_main_1): Check return value of bfd_init.
191
192 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
193
194 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
195 Adjust comments.
196
197 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
198
199 * procfs.c: Include common/pathstuff.h.
200
201 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
202
203 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
204 Add missing braces. No functional change.
205
206 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
207
208 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
209 to report a bad option and fix indentation.
210 * demangle.c (demangle_command): Use report_unrecognized_option_error
211 to report a bad option and correctly report the bad option.
212
213 2018-10-27 Tom Tromey <tom@tromey.com>
214
215 PR cli/23364:
216 * darwin-nat.c (copied_shell): New global.
217 (may_have_sip): Rename from should_disable_startup_with_shell.
218 (copy_shell_to_cache, maybe_cache_shell): New functions.
219 (darwin_nat_target::create_inferior): Update. Use
220 copied_shell.
221
222 2018-10-27 Tom Tromey <tom@tromey.com>
223
224 * unittests/scoped_fd-selftests.c (test_to_file): New function.
225 (run_tests): Call test_to_file.
226 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
227 temporary files.
228 * common/scoped_fd.h (scoped_fd::to_file): New method.
229
230 2018-10-27 Tom Tromey <tom@tromey.com>
231
232 * unittests/scoped_mmap-selftests.c (test_normal): Use
233 gdb_mkostemp_cloexec.
234 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
235 Use gdb_mkostemp_cloexec.
236 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
237 gnulib/config.in, gnulib/configure,
238 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
239 gnulib/import/m4/gnulib-cache.m4,
240 gnulib/import/m4/gnulib-comp.m4: Update.
241 * gnulib/import/m4/mkostemp.m4: New file.
242 * gnulib/import/m4/mkstemp.m4: Remove.
243 * gnulib/import/mkostemp.c: New file.
244 * gnulib/import/mkstemp.m4: Remove.
245 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
246 mkstemp, add mkostemp. Apply new patch.
247 * gnulib/import/stdlib.in.h: Apply patch.
248 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
249 New file.
250 * dwarf-index-write.c (write_psymtabs_to_index): Use
251 gdb_mkostemp_cloexec.
252 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
253
254 2018-10-27 Tom Tromey <tom@tromey.com>
255
256 * unittests/mkdir-recursive-selftests.c: New file.
257 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
258 unittests/mkdir-recursive-selftests.c.
259 * dwarf-index-cache.c (mkdir_recursive): Move to
260 common/filestuff.c.
261 (index_cache::store): Check return value of mkdir_recursive.
262 (create_dir_and_check, test_mkdir_recursive): Move to new file.
263 (_initialize_index_cache): Don't register test.
264 * common/filestuff.h (mkdir_recursive): Declare.
265 * common/filestuff.c (mkdir_recursive): Move from
266 dwarf-index-cache.c. Return bool.
267
268 2018-10-27 Tom Tromey <tom@tromey.com>
269
270 * dwarf-index-write.c (write_psymtabs_to_index): Move
271 make_temp_filename to common/pathstuff.c.
272 * common/pathstuff.h (make_temp_filename): Declare.
273 * common/pathstuff.c (make_temp_filename): New function, moved
274 from dwarf-index-write.c.
275
276 2018-10-27 Tom Tromey <tom@tromey.com>
277
278 * procfs.c (procfs_target::create_inferior): Use get_shell.
279 * cli/cli-cmds.c (shell_escape): Use get_shell.
280 * windows-nat.c (windows_nat_target::create_inferior): Use
281 get_shell.
282 * common/pathstuff.c (get_shell): New function.
283 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
284 (fork_inferior): Use get_shell.
285 * common/pathstuff.h (get_shell): Declare.
286
287 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
288
289 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
290
291 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
292
293 * stack.c (print_variable_and_value_data): Add preg and treg.
294 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
295 and update callers.
296 (print_frame_arg_vars): Likewise.
297 (prepare_reg): New function.
298 (info_locals_command): Extract info print args and use them.
299 (info_args_command): Likewise.
300 (_initialize_stack): Modify on-line help.
301 * symtab.c (treg_matches_sym_type_name): New function.
302 (search_symbols): New arg t_regexp.
303 (symtab_symbol_info): New args quiet, regexp, t_regexp.
304 (info_variables_command): Extract info print args and use them.
305 (info_functions_command): Likewise.
306 (info_types_command): Update call to symtab_symbol_info.
307 (_initialize_symtab): Modify on-line help.
308 * symtab.h (treg_matches_sym_type_name): New function.
309 (search_symbols): New t_regexp arg.
310
311 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
312
313 * cli-utils.c (extract_arg_maybe_quoted): New function.
314 (extract_info_print_args): New function.
315 (info_print_args_help): New function.
316 (report_unrecognized_option_error): New function.
317 * cli-utils.h (extract_arg_maybe_quoted): New function.
318 (extract_info_print_args): New function.
319 (info_print_args_help): New function.
320 (report_unrecognized_option_error): New function.
321
322 2018-10-26 Tom Tromey <tom@tromey.com>
323
324 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
325 (compute_compunit_symtab_includes): Update.
326 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
327 (compunit_symtab_ptr): Likewise.
328
329 2018-10-26 John Baldwin <jhb@FreeBSD.org>
330
331 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
332 default_print_auxv_entry for specific tag values.
333
334 2018-10-26 John Baldwin <jhb@FreeBSD.org>
335
336 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
337
338 2018-10-26 Jim Wilson <jimw@sifive.com>
339
340 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
341 (riscv_linux_sigframe_init): Declare.
342 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
343 (riscv_linux_sigframe): New.
344 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
345 (riscv_linux_sigframe_init): Define.
346 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
347
348 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
349 (riscv_isa_flen): Likewise. Drop static.
350 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
351 (riscv_isa_flen): Likewise. Declare.
352
353 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
354 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
355
356 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
357 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
358 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
359 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
360 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
361 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
362 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
363 Define.
364 (struct ppc_linux_features) <htm>: New field.
365 (ppc_linux_no_features): Add initializer for htm field.
366 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
367 new tdescs.
368 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
369 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
370 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
371 Define if not already defined.
372 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
373 and rs6000/powerpc-isa207-htm-vsx64l.
374 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
375 rs6000/powerpc-isa207-htm-vsx64l.xml.
376 * features/rs6000/power-htm-spr.xml: New file.
377 * features/rs6000/power-htm-core.xml: New file.
378 * features/rs6000/power64-htm-core.xml: New file.
379 * features/rs6000/power-htm-fpu.xml: New file.
380 * features/rs6000/power-htm-altivec.xml: New file.
381 * features/rs6000/power-htm-vsx.xml: New file.
382 * features/rs6000/power-htm-ppr.xml: New file.
383 * features/rs6000/power-htm-dscr.xml: New file.
384 * features/rs6000/power-htm-tar.xml: New file.
385 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
386 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
387 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
388 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
389 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
390 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
391 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
392 fetch_regset with HTM regsets.
393 (store_register, store_ppc_registers): Call store_regset with HTM
394 regsets.
395 (ppc_linux_nat_target::read_description): Set htm field in the
396 features struct if needed.
397 * ppc-linux-tdep.c: Include
398 features/rs6000/powerpc-isa207-htm-vsx32l.c and
399 features/rs6000/powerpc-isa207-htm-vsx64l.c.
400 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
401 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
402 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
403 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
404 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
405 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
406 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
407 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
408 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
409 (ppc32_linux_ctarregset): New globals.
410 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
411 (ppc_linux_collect_core_cpgrregset): New function.
412 (ppc_linux_iterate_over_regset_sections): Call back with the htm
413 regsets.
414 (ppc_linux_core_read_description): Check if the tm spr section is
415 present and set htm in the features struct.
416 (_initialize_ppc_linux_tdep): Call
417 initialize_tdesc_powerpc_isa207_htm_vsx32l and
418 initialize_tdesc_powerpc_isa207_htm_vsx64l.
419 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
420 Declare.
421 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
422 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
423 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
424 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
425 New fields.
426 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
427 Likewise.
428 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
429 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
430 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
431 New enum fields.
432 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
433 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
434 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
435 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
436 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
437 <PPC_CTAR_REGNUM>: Likewise.
438 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
439 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
440 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
441 (IS_CEFP_PSEUDOREG): Define.
442 (rs6000_register_name): Hide the upper halves of checkpointed VSX
443 registers. Return names for the checkpointed DFP, VSX, and EFP
444 pseudo registers.
445 (rs6000_pseudo_register_type): Remove initial assert and raise an
446 internal error in the else clause instead. Return types for the
447 checkpointed DFP, VSX, and EFP pseudo registers.
448 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
449 checkpointed DFP pseudo registers.
450 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
451 checkpointed VSX pseudo registers.
452 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
453 from efpr_pseudo_register_read and
454 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
455 registers.
456 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
457 Handle checkpointed DFP, VSX, and EFP registers.
458 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
459 (efp_ax_pseudo_register_collect): New functions.
460 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
461 register logic to new functions. Handle checkpointed DFP, VSX,
462 and EFP pseudo registers.
463 (rs6000_gdbarch_init): Look for and validate the htm features.
464 Include checkpointed DFP, VSX and EFP pseudo-registers.
465 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
466 HTM registers.
467
468 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
469
470 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
471 without altivec or fpu.
472
473 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
474 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
475
476 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
477 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
478 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
479 Define if not already defined.
480 * features/rs6000/power-ebb.xml: New file.
481 * features/rs6000/power-linux-pmu.xml: New file.
482 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
483 features.
484 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
485 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
486 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
487 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
488 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
489 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
490 fetch_regset with ebb and pmu regsets.
491 (store_register, store_ppc_registers): Call store_regset with ebb
492 and pmu regsets.
493 (ppc_linux_nat_target::read_description): Set isa207 field in the
494 features struct if ebb and pmu are avaiable.
495 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
496 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
497 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
498 and pmu regsets.
499 (ppc_linux_core_read_description): Check if the pmu section is
500 present and set isa207 in the features struct.
501 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
502 (ppc32_linux_pmuregset): Declare.
503 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
504 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
505 <ppc_sier_regnum>: New field.
506 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
507 New enum values.
508 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
509 values.
510 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
511 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
512 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
513 ebb and pmu features.
514
515 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
516 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
517
518 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
519 (tdesc_powerpc_isa207_vsx64l): Declare.
520 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
521 (struct ppc_linux_features) <isa207>: New field.
522 (ppc_linux_no_features): Add initializer for isa207 field.
523 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
524 new tdescs.
525 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
526 (NT_PPC_TAR): Define if not already defined.
527 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
528 rs6000/powerpc-isa207-vsx64l.
529 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
530 rs6000/powerpc-isa207-vsx64l.xml.
531 * features/rs6000/power-tar.xml: New file.
532 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
533 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
534 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
535 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
536 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
537 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
538 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
539 fetch_regset with the TAR regset.
540 (store_register, store_ppc_registers): Call store_regset with the
541 TAR regset.
542 (ppc_linux_nat_target::read_description): Set isa207 field in the
543 features struct if needed.
544 * ppc-linux-tdep.c: Include
545 features/rs6000/powerpc-isa207-vsx32l.c and
546 features/rs6000/powerpc-isa207-vsx64l.c.
547 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
548 (ppc_linux_iterate_over_regset_sections): Call back with the tar
549 regset.
550 (ppc_linux_core_read_description): Check if the tar section is
551 present and set isa207 in the features struct.
552 (_initialize_ppc_linux_tdep): Call
553 initialize_tdesc_powerpc_isa207_vsx32l and
554 initialize_tdesc_powerpc_isa207_vsx64l.
555 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
556 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
557 (enum) <PPC_TAR_REGNUM>: New enum value.
558 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
559 feature.
560 (ppc_process_record_op31): Record changes to TAR.
561
562 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
563 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
564
565 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
566 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
567 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
568 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
569 (struct ppc_linux_features) <ppr_dscr>: New field.
570 (ppc_linux_no_features): Add initializer for ppr_dscr field.
571 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
572 new tdescs.
573 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
574 Define if not already defined.
575 * features/Makefile (WHICH): Add
576 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
577 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
578 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
579 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
580 * features/rs6000/power-dscr.xml: New file.
581 * features/rs6000/power-ppr.xml: New file.
582 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
583 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
584 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
585 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
586 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
587 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
588 * ppc-linux-nat.c: Include <sys/uio.h>.
589 (fetch_regset, store_regset, check_regset): New functions.
590 (fetch_register, fetch_ppc_registers): Call fetch_regset with
591 DSCR and PPR regsets.
592 (store_register, store_ppc_registers): Call store_regset with
593 DSCR and PPR regsets.
594 (ppc_linux_get_hwcap2): New function.
595 (ppc_linux_nat_target::read_description): Call
596 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
597 features struct if needed.
598 * ppc-linux-tdep.c: Include
599 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
600 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
601 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
602 (ppc32_linux_dscrregset): New globals.
603 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
604 and dscr regsets.
605 (ppc_linux_core_read_description): Check if the ppr and dscr
606 sections are present and set ppr_dscr in the features struct.
607 (_initialize_ppc_linux_tdep): Call
608 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
609 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
610 * ppc-linux-tdep.h (ppc32_linux_pprregset)
611 (ppc32_linux_dscrregset): Declare.
612 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
613 <ppc_dscr_regnum>: New field.
614 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
615 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
616 and dscr features.
617 (ppc_process_record_op31): Record changes to PPR and DSCR.
618
619 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
620
621 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
622 second initializer line for the have_* variables. Initialize
623 have_fpu to 0 instead of 1.
624
625 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
626
627 * arch/ppc-linux-common.c (ppc_linux_match_description):
628 Parenthesize tdesc assignements and indent them properly.
629
630 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
631
632 * ppc-linux-nat.c (fetch_register): Change if statement to else
633 if.
634 (store_register): Likewise.
635
636 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
637
638 * rs6000-tdep.c: Remove reggroups.h include.
639 (rs6000_pseudo_register_reggroup_p): Remove.
640 (rs6000_gdbarch_init): Remove call to
641 set_tdesc_pseudo_register_reggroup_p.
642
643 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
644
645 * reggroups.c (default_register_reggroup_p): Return true for
646 decfloat registers and float_reggroup.
647
648 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
649
650 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
651 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
652 ppc_linux_collect_vrregset by regcache_collect_regset.
653
654 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
655
656 * linux-tdep.c (linux_collect_regset_section_cb): Use
657 std::vector<gdb_byte> instead of char * and malloc for buf.
658 Remove xfree.
659
660 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
661
662 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
663 symtab_start instead of always using language_unknown.
664
665 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
666
667 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
668 READ_P parameter, catch and ignore register access errors from
669 either the old or new MISA location.
670 (riscv_has_feature): Update call to riscv_read_misa_reg.
671
672 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
673
674 * python/py-function.c (convert_values_to_python): Return
675 gdbpy_ref<>. Add header comment.
676 (fnpy_call): Adjust.
677
678 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
679
680 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
681 (cmdpy_completer_handle_brkchars): Adjust.
682 (cmdpy_completer): Adjust.
683
684 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
685
686 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
687 Pass correct regnum to raw_supply_zeroed.
688
689 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
690
691 * regcache.c (cooked_read_test): Add CSKY to the list of
692 architectures with a save_reggroup
693
694 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
695
696 PR gdb/23368
697 * infrun.c (follow_exec): In the follow_exec_mode_new case,
698 transfer terminal state from old new new inferior.
699 * terminal.h (swap_terminal_info): New function.
700 * inflow.c (swap_terminal_info): New function.
701
702 2018-10-23 Tom Tromey <tom@tromey.com>
703
704 * record-btrace.c (get_thread_current_frame_id): Rename from
705 get_thread_current_frame. Return a frame_id.
706 (record_btrace_start_replaying): Update.
707
708 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
709
710 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
711 for CSRs.
712
713 2018-10-23 Joel Brobecker <brobecker@adacore.com>
714
715 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
716 have_nonsteppable_watchpoint attribute to 1.
717
718 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
719
720 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
721 register names.
722 (struct register_alias): Rename to...
723 (struct riscv_register_alias): ...this, and update comment.
724 (riscv_register_aliases): Update type, and alias names. Remove
725 CSR names from this list.
726 (riscv_register_name): Use riscv_gdb_reg_names for int and float
727 register names. Add an extra assertion.
728 (riscv_is_regnum_a_named_csr): New function.
729 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
730
731 2018-10-22 Jim Wilson <jimw@sifive.com>
732
733 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
734 FP reg smaller than FP reg size, and fill with -1 instead of 0.
735
736 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
737 (riscv_register_type): Use them.
738 (riscv_print_one_register_info): Handle union of floats same as float.
739 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
740 riscv_fpreg_q_type fields.
741
742 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
743
744 * gdbarch.sh (gdbarch_num_cooked_regs): New.
745 * gdbarch.h: Re-generate.
746 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
747 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
748 * eval.c (evaluate_subexp_standard): Likewise.
749 * findvar.c (value_of_register): Likewise.
750 (value_of_register_lazy): Likewise.
751 (address_from_register): Likewise.
752 * frame.c (get_frame_register_bytes): Likewise.
753 * gdbarch-selftests.c (register_to_value_test): Likewise.
754 * h8300-tdep.c (h8300_register_type): Likewise.
755 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
756 (i386_svr4_reg_to_regnum): Likewise.
757 * infcmd.c (default_print_registers_info): Likewise.
758 (registers_info): Likewise.
759 (print_vector_info): Likewise.
760 (default_print_float_info): Likewise.
761 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
762 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
763 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
764 (mi_cmd_data_list_changed_registers): Likewise.
765 (mi_cmd_data_list_register_values): Likewise.
766 (mi_cmd_data_write_register_values): Likewise.
767 (mi_cmd_trace_frame_collected): Likewise.
768 * mips-tdep.c (print_gp_register_row): Likewise.
769 (mips_print_registers_info): Likewise.
770 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
771 * regcache.c (init_regcache_descr): Likewise.
772 (register_size): Likewise.
773 (register_dump::dump): Likewise.
774 (cooked_read_test): Likewise.
775 (cooked_write_test): Likewise.
776 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
777 (rs6000_gdbarch_init): Likewise.
778 * stabsread.c (stab_reg_to_regnum): Likewise.
779 * stack.c (info_frame_command): Likewise.
780 * target-descriptions.c (tdesc_register_name): Likewise.
781 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
782 * tui/tui-regs.c (tui_show_register_group): Likewise.
783 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
784 (user_reg_map_regnum_to_name): Likewise.
785 (value_of_user_reg): Likewise.
786 (maintenance_print_user_registers): Likewise.
787 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
788 (xtensa_register_name): Likewise.
789 (xtensa_register_type): Likewise.
790 (xtensa_reg_to_regnum): Likewise.
791 (xtensa_pseudo_register_read): Likewise.
792 (xtensa_pseudo_register_write): Likewise.
793
794 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
795
796 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
797 correctly-sized buffer with raw_read.
798 (amd64_pseudo_register_write): Use correctly-sized buffer for
799 raw_read/raw_write.
800
801 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
802
803 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
804 in add_prefix_cmd of set print type.
805
806 2018-10-19 Tom Tromey <tom@tromey.com>
807
808 PR tui/18388:
809 * NEWS: Mention tabset deprecation.
810 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
811 (update_tab_width): New function.
812 (tui_set_tab_width, tui_show_tab_width): New functions.
813 (tui_set_tab_width_command): Use update_tab_width.
814 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
815 Add new "set tui tab-width" command.
816 * tui/tui-source.c (tui_set_source_content): Update.
817 * tui/tui-disasm.c (tui_set_disassem_content): Update.
818 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
819 Don't declare.
820 (tui_tab_width): Declare.
821 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
822 (tui_set_default_tab_len): Remove.
823
824 2018-10-19 Tom Tromey <tom@tromey.com>
825
826 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
827 (key_is_backspace, tui_getc): Don't declare.
828 * tui/tui-io.c (key_is_start_sequence): Now static.
829 (key_is_end_sequence, key_is_backspace): Remove.
830 (tui_getc): Now static.
831
832 2018-10-19 Tom Tromey <tom@tromey.com>
833
834 * symfile.c (reread_symbols): Clear "static_links".
835
836 2018-10-19 Alan Hayward <alan.hayward@arm.com>
837
838 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
839 define.
840 (aarch64_linux_sigframe_init): Extra boundary checks.
841
842 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
843
844 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
845 the possibly non-existent tdesc type 'vec128', but the type of raw
846 register v16 instead.
847
848 2018-10-19 Gary Benson <gbenson@redhat.com>
849
850 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
851
852 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
853
854 PR cli/23785
855 * cli/cli-dump.c (restore_binary_file): Check if "file" is
856 NULL.
857
858 2018-10-17 Paul Koning <paul_koning@dell.com>
859
860 * charset.c (convert_between_encodings): Fix unsigned overflow.
861
862 2018-10-17 John Baldwin <jhb@FreeBSD.org>
863
864 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
865 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
866 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
867 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
868 New functions.
869 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
870 and fbsd_info_proc_mappings_header.
871 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
872 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
873 New.
874
875 2018-10-17 Joel Brobecker <brobecker@adacore.com>
876
877 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
878 Solaris Maintainer.
879
880 2018-10-15 Tom Tromey <tom@tromey.com>
881
882 * tui/tui.c (strcat_to_buf): Remove casts.
883 * tui/tui-winsource.c (tui_show_source_line)
884 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
885 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
886 * tui/tui-windata.c (tui_first_data_item_displayed)
887 (tui_delete_data_content_windows, tui_erase_data_content)
888 (tui_display_all_data, tui_display_data_from)
889 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
890 * tui/tui-win.c (tui_set_win_height)
891 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
892 casts.
893 * tui/tui-win.c (tui_resize_all): Remove casts.
894 (tui_scroll_backward_command, tui_set_focus)
895 (tui_set_tab_width_command): Likewise.
896 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
897 * tui/tui-regs.c (tui_show_register_group): Remove cast.
898 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
899 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
900 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
901 Remove casts.
902
903 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
904
905 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
906 AArch64/ARM maintainer.
907
908 2018-10-11 Gary Benson <gbenson@redhat.com>
909
910 * interps.h (interp::m_name): Make private and mutable.
911 * interps.c (interp::~interp): Free m_name.
912
913 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
914 Simon Marchi <simark@simark.ca>
915
916 * README (`configure' options): Add documentation for new
917 "--enable-unit-tests" option.
918 * acinclude.m4: Include "selftest.m4".
919 * configure: Regenerate.
920 * configure.ac: Use "GDB_AC_SELFTEST".
921 * maint.c (maintenance_selftest): Update message informing
922 that selftests have been disabled.
923 (maintenance_info_selftests): Likewise.
924 * selftest.m4: New file.
925
926 2018-10-10 Gary Benson <gbenson@redhat.com>
927
928 * remote.c (remote_target::remote_send_printf): Add
929 missing va_end found by Coverity.
930
931 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
932
933 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
934
935 2018-10-09 Tom Tromey <tom@tromey.com>
936
937 * configure: Rebuild.
938 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
939 * NEWS: Update --enable-ubsan documentation.
940
941 2018-10-09 Gary Benson <gbenson@redhat.com>
942
943 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
944 found by Coverity.
945
946 2018-10-08 Tom Tromey <tom@tromey.com>
947
948 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
949 variable.
950 (riscv_fbsd_init_abi): Likewise.
951
952 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
953 * valops.c (value_struct_elt_for_reference): Rename local variable
954 to work around the shadowing a previous local warning.
955
956 2018-10-08 John Baldwin <jhb@FreeBSD.org>
957
958 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
959 * NEWS: Mention new FreeBSD/riscv native configuration.
960 * configure.host: Add riscv*-*-freebsd*.
961 * configure.nat: Likewise.
962 * riscv-fbsd-nat.c: New file.
963
964 2018-10-08 John Baldwin <jhb@FreeBSD.org>
965
966 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
967 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
968 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
969 * NEWS: Mention new FreeBSD/riscv target.
970 * configure.tgt: Add riscv*-*-freebsd*.
971 * riscv-fbsd-tdep.c: New file.
972 * riscv-fbsd-tdep.h: New file.
973
974 2018-10-08 John Baldwin <jhb@FreeBSD.org>
975
976 * regcache.h (struct regcache_map_entry): Note that this type can
977 be used with traditional frame caches.
978 * trad-frame.c (trad_frame_set_reg_regmap): New.
979 * trad-frame.h (trad_frame_set_reg_regmap): New.
980
981 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
982
983 PR c++/16841
984 * valops.c (get_virtual_base_offset): New function.
985 (value_struct_elt_for_reference): Use it to get virtual base offset
986 and add it in calculating class member address.
987
988 2018-10-08 John Darrington <john@darrington.wattle.id.au>
989
990 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
991 (check_producer): Check if the producer is codewarrior.
992 (producer_is_codewarrior): New function.
993 (lnp_state_machine::record_line): Ignore is_stmt flag for records
994 produced by codewarrior.
995 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
996
997 2018-10-06 Tom Tromey <tom@tromey.com>
998
999 PR python/19399:
1000 * python/py-inferior.c: Add "architecture" entry.
1001 (infpy_architecture): New function.
1002
1003 2018-10-06 Tom Tromey <tom@tromey.com>
1004
1005 PR python/21765:
1006 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1007 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1008 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
1009 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1010
1011 2018-10-06 Tom Tromey <tom@tromey.com>
1012
1013 PR build/17077:
1014 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1015 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1016 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1017 #include.
1018
1019 2018-10-06 Tom Tromey <tom@tromey.com>
1020
1021 * python/py-breakpoint.c (bppy_get_location): Handle a
1022 bp_breakpoint without a location.
1023
1024 2018-10-06 Tom Tromey <tom@tromey.com>
1025
1026 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1027 (_RegEx): Reformat help text.
1028 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1029 (AnyCallerIs, AnyCallerMatches): Reformat help text.
1030 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1031 text.
1032 * python/lib/gdb/command/xmethods.py (InfoXMethod)
1033 (EnableXMethod, DisableXMethod): Remove help indentation.
1034 Capitalize meta-syntactic variables.
1035 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1036 (EnableUnwinder, DisableUnwinder): Remove help indentation.
1037 Capitalize meta-syntactic variables.
1038 * python/lib/gdb/command/explore.py (ExploreCommand)
1039 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1040 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1041 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1042 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1043 Remove help indentation.
1044 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1045 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1046 (DisableFrameFilter, SetFrameFilterPriority)
1047 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1048
1049 2018-10-06 Tom Tromey <tom@tromey.com>
1050
1051 PR tui/28819:
1052 * tui/tui-io.c (gdb_wgetch): New function.
1053 (tui_mld_getc, tui_getc): Use it.
1054
1055 2018-10-05 Tom Tromey <tom@tromey.com>
1056
1057 * sol-thread.c (sol_thread_target::wait): Rename inner
1058 "save_ptid".
1059
1060 2018-10-04 Tom Tromey <tom@tromey.com>
1061
1062 * configure: Rebuild.
1063 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1064
1065 2018-10-04 Tom Tromey <tom@tromey.com>
1066
1067 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1068 declaration of "block".
1069
1070 2018-10-04 Tom Tromey <tom@tromey.com>
1071
1072 * common/filestuff.c (fdwalk): Remove inner declaration of
1073 "result".
1074
1075 2018-10-04 Tom Tromey <tom@tromey.com>
1076
1077 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1078 "structs_addr" and hoist declaration.
1079
1080 2018-10-04 Tom Tromey <tom@tromey.com>
1081
1082 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1083 variable "size".
1084
1085 2018-10-04 Tom Tromey <tom@tromey.com>
1086
1087 * mdebugread.c (parse_partial_symbols): Use std::string.
1088
1089 2018-10-04 Tom Tromey <tom@tromey.com>
1090
1091 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1092 * p-valprint.c (pascal_val_print): Split inner "i" variable.
1093 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1094 header.
1095 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1096 more inner scope.
1097 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1098 * varobj.c (varobj_update): Rename inner "newobj",
1099 "type_changed".
1100 * valprint.c (generic_emit_char): Rename inner "buf".
1101 * valops.c (find_overload_match): Rename inner "temp".
1102 (value_struct_elt_for_reference): Declare "v" in more inner
1103 scope.
1104 * v850-tdep.c (v850_push_dummy_call): Rename "len".
1105 * unittests/array-view-selftests.c (run_tests): Rename inner
1106 "vec".
1107 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1108 header.
1109 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1110 "tsv" in more inner scope.
1111 (print_one_static_tracepoint_marker): Rename inner
1112 "tuple_emitter".
1113 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1114 (tic6x_push_dummy_call): Don't redeclare "addr".
1115 * target-float.c: Declare "dto" lower.
1116 * symtab.c (lookup_local_symbol): Rename inner "sym".
1117 (find_pc_sect_line): Rename inner "pc".
1118 * stack.c (print_frame): Don't redeclare "gdbarch".
1119 (return_command): Rename inner "gdbarch".
1120 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1121 "sp".
1122 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1123 header.
1124 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1125 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1126 scope.
1127 * remote.c (remote_target::update_thread_list): Don't redeclare
1128 "tp".
1129 (remote_target::process_initial_stop_replies): Rename inner
1130 "thread".
1131 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1132 (remote_target::wait_as): Don't redeclare "stop_reply".
1133 (remote_target::get_thread_local_address): Rename inner
1134 "result".
1135 (remote_target::get_tib_address): Likewise.
1136
1137 * regcache.c (cooked_read_test): Rename "regnum".
1138 * record-btrace.c (cmd_record_btrace_start): Rename inner
1139 "exception".
1140 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1141 loop header.
1142 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1143 header.
1144 (ppu2spu_sniffer): Rename inner "buf".
1145 * parse.c (operator_check_standard): Rename inner "type",
1146 "objfile".
1147 * p-valprint.c (pascal_val_print): Introduce new scope for
1148 "low_bound", "high_bound".
1149 * p-exp.y (yylex): Declare "i" in loop header.
1150 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1151 Lower declaration of "s".
1152 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1153 header.
1154 (nios2_push_dummy_call): Rename "len".
1155 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1156 "buf".
1157 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1158 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1159 (linux_xfer_osdata_modules): Likewise.
1160 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1161 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1162 (mips_o64_push_dummy_call): Likewise.
1163 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1164 "op".
1165 * mi/mi-main.c (list_available_thread_groups): Rename inner
1166 "tuple_emitter".
1167 (mi_cmd_data_read_memory): Rename inner "opts".
1168 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1169 "tuple_emitter".
1170 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1171 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
1172 more inner scope.
1173 (parse_partial_symbols): Rename inner "pst", "p", "name"
1174 * main.c (captured_main_1): Rename inner "i"s.
1175 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1176 "oso2".
1177 * linux-tdep.c (linux_info_proc): Rename inner "filename".
1178 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1179 * infrun.c (handle_no_resumed): Don't redeclare "thread".
1180 (handle_signal_stop): Rename inner "gdbarch".
1181 (handle_command): Declare "signum" in loop header.
1182 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1183 "status".
1184 (examine_prologue): Rename inner "sol" and "sof".
1185 (ia64_extract_return_value): Rename inner "val". Declare another
1186 "val" in a more inner scope.
1187 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1188 inner scope.
1189 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1190 "except".
1191 * findvar.c (default_read_var_value): Don't redeclare "addr".
1192 * f-exp.y (yylex): Declare "i" in loop header.
1193 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1194 Rename inner "type", "expect_type".
1195 (evaluate_subexp_for_sizeof): Rename inner "pc".
1196 * elfread.c (elf_symfile_read): Rename inner "abfd".
1197 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1198 "bytes_read".
1199 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1200 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1201 (dwarf_decode_line_header): Rename inner "lh".
1202 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1203 "offset". Declare "i" in loop header.
1204 (disassemble_dwarf_expression): Rename inner "addr_size".
1205 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1206 inner "result".
1207 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1208 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1209 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1210 "inner_list_emitter".
1211 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1212 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1213 declaration in a block.
1214 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1215 * cp-valprint.c (cp_print_value_fields): Don't redeclare
1216 "obstack_final_size".
1217 * cp-support.c (inspect_type): Declare "i" in loop header.
1218 * compile/compile.c (compile_instance::insert_symbol_error):
1219 Rename inner "e".
1220 * common/agent.c (agent_run_command): Remove inner "ret"
1221 declaration.
1222 * coffread.c (coff_symfile_read): Rename inner "name".
1223 (coff_symfile_read): Rename inner "abfd".
1224 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1225 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1226 "high".
1227 * c-exp.y (lex_one_token): Move "len" declaration lower.
1228 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1229 "gdbarch".
1230 (create_exception_master_breakpoint): Likewise. Don't redeclare
1231 "b".
1232 (watch_command_1): Declare "mark" later.
1233 (clear_command): Don't shadow "a" or "b".
1234 (delete_command): Rename inner "b".
1235 (delete_trace_command): Likewise.
1236 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1237 "op".
1238 (arm_gdbarch_init): Remove inner "e_flags".
1239 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1240 "offset" in inner blocks.
1241
1242 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
1243
1244 * dwarf-index-write.c (file_write): Don't write if the vector is
1245 empty.
1246
1247 2018-10-05 Tom de Vries <tdevries@suse.de>
1248
1249 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1250 PyArg_ParseTuple call.
1251
1252 2018-10-05 Tom de Vries <tdevries@suse.de>
1253
1254 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1255 PyArg_ParseTuple call.
1256
1257 2018-10-04 Joel Brobecker <brobecker@adacore.com>
1258
1259 * psymtab.c (recursively_search_psymtabs): Reformat parameters
1260 to avoid exceeding 80 characters per line limit.
1261
1262 2018-10-04 Tom Tromey <tom@tromey.com>
1263
1264 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1265 (reread_symbols): Update.
1266 * complaints.h (clear_complaints): Remove argument.
1267 * complaints.c (enum complaint_series): Remove.
1268 (series): Remove global.
1269 (complaint_internal): Update.
1270 (clear_complaints): Remove argument.
1271
1272 2018-10-04 Tom Tromey <tom@tromey.com>
1273
1274 * symfile.c (symbol_file_add_with_addrs): Do not print "no
1275 debugging symbols" message if there is a separate debug objfile.
1276
1277 2018-10-04 Tom Tromey <tom@tromey.com>
1278
1279 PR cli/19551:
1280 * symfile.c (symbol_file_add_with_addrs): Update output.
1281 * psymtab.c (require_partial_symbols): Update output.
1282
1283 2018-10-04 Tom Tromey <tom@tromey.com>
1284
1285 PR cli/22234:
1286 * complaints.c: Emit \n.
1287
1288 2018-10-04 Tom Tromey <tom@tromey.com>
1289
1290 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1291 (separate_debug_file_exists, find_separate_debug_file)
1292 (add_symbol_file_command, reread_symbols, allocate_symtab)
1293 (allocate_compunit_symtab): Use filtered printing, not
1294 unfiltered.
1295 * psymtab.c (require_partial_symbols, dump_psymtab)
1296 (allocate_psymtab): Use filtered printing, not unfiltered.
1297
1298 2018-10-04 Tom Tromey <tom@tromey.com>
1299
1300 * complaints.c (complaint_internal): Correctly check complaint
1301 count.
1302
1303 2018-10-04 Tom Tromey <tom@tromey.com>
1304
1305 * complaints.h (struct complaints): Remove declaration.
1306 * complaints.c (clear_complaints): Remove an unused variable.
1307
1308 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1309
1310 * MAINTAINERS (Write After Approval): Add self.
1311
1312 2018-10-03 Tom Tromey <tom@tromey.com>
1313
1314 * guile/scm-value.c (gdbscm_value_to_string): Initialize
1315 "buffer_contents".
1316 * coffread.c (coff_symtab_read): Initialize "newobj".
1317
1318 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
1319
1320 * dwarf2read.c (read_func_scope): Remove struct keyword in
1321 range-based for.
1322
1323 2018-10-03 Tom Tromey <tom@tromey.com>
1324
1325 * README: Mention --enable-ubsan.
1326 * NEWS: Mention --enable-ubsan.
1327 * acinclude.m4: Include sanitize.m4.
1328 * configure: Rebuild.
1329 * configure.ac: Call AM_GDB_UBSAN.
1330 * sanitize.m4: New file.
1331
1332 2018-10-03 Tom Tromey <tom@tromey.com>
1333
1334 * expression.h (enum exp_opcode): Use uint8_t as base type.
1335 * expprint.c (op_name): Handle invalid opcodes.
1336
1337 2018-10-03 Tom Tromey <tom@tromey.com>
1338
1339 * parse.c (prefixify_expression): Add assert.
1340 (parse_exp_in_context_1): Throw exception if the expression is
1341 empty.
1342
1343 2018-10-03 Tom Tromey <tom@tromey.com>
1344
1345 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1346
1347 2018-10-03 Tom Tromey <tom@tromey.com>
1348
1349 * c-exp.y (parse_number): Work in unsigned. Remove casts.
1350
1351 2018-10-03 Tom Tromey <tom@tromey.com>
1352
1353 * dwarf2read.c (read_subrange_type): Make "negative_mask"
1354 unsigned.
1355
1356 2018-10-03 Tom Tromey <tom@tromey.com>
1357
1358 * findvar.c (extract_integer): Do work in an unsigned type.
1359
1360 2018-10-03 Tom Tromey <tom@tromey.com>
1361
1362 * common/enum-flags.h (enum_flags::operator~): Add static assert.
1363 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1364 base type.
1365 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1366 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1367 type.
1368 * c-lang.h (enum c_string_type_values): Use unsigned as base
1369 type.
1370 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1371
1372 2018-10-03 Tom Tromey <tom@tromey.com>
1373
1374 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1375 <~dwarf2_frame_state_reg_info>: Update.
1376 <dwarf2_frame_state_reg_info>: Update.
1377 <alloc_regs>: Add assertion. Update.
1378 <reg>: Now a std::vector.
1379 <num_regs>: Remove.
1380 <swap>: Update.
1381 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1382 (execute_cfa_program_test, dwarf2_frame_cache): Update.
1383
1384 2018-10-03 Tom Tromey <tom@tromey.com>
1385
1386 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1387
1388 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1389
1390 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1391
1392 2018-10-02 Tom Tromey <tom@tromey.com>
1393
1394 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1395
1396 2018-10-02 John Darrington <john@darrington.wattle.id.au>
1397
1398 * NEWS: Mention changed commands.
1399 * ser-uds.c: New file.
1400 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1401 * configure: Regenerate.
1402 * Makefile.in: Add new file.
1403 * serial.c (serial_open): Check if filename is a socket
1404 and lookup the appropriate interface accordingly.
1405
1406 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1407
1408 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1409 define.
1410 (AARCH64_EXTRA_MAGIC): Likewise.
1411 (AARCH64_FPSIMD_MAGIC): Likewise.
1412 (AARCH64_SVE_MAGIC): Likewise.
1413 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1414 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1415 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1416 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1417 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1418 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1419 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1420 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1421 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1422 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1423 (read_aarch64_ctx): Add function.
1424 (aarch64_linux_sigframe_init): Detect FP registers.
1425
1426 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1427
1428 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1429 (AARCH64_D0_REGNUM): Likewise.
1430 (AARCH64_S0_REGNUM): Likewise.
1431 (AARCH64_H0_REGNUM): Likewise.
1432 (AARCH64_B0_REGNUM): Likewise.
1433 (AARCH64_SVE_V0_REGNUM): Likewise.
1434 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1435 (AARCH64_D0_REGNUM): Likewise.
1436 (AARCH64_S0_REGNUM): Likewise.
1437 (AARCH64_H0_REGNUM): Likewise.
1438 (AARCH64_B0_REGNUM): Likewise.
1439 (AARCH64_SVE_V0_REGNUM): Likewise.
1440
1441 2018-10-01 Gary Benson <gbenson@redhat.com>
1442
1443 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1444 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1445 prfpregset_t instead of gdb_prfpregset_t.
1446 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1447 * configure, config.in: Rebuild.
1448
1449 2018-10-01 Gary Benson <gbenson@redhat.com>
1450
1451 * common/gdb_proc_service.h: New file, factored out from...
1452 * gdb_proc_service.h: Moved common code to the above file.
1453 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1454
1455 2018-10-01 Gary Benson <gbenson@redhat.com>
1456
1457 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1458 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
1459
1460 2018-10-01 Gary Benson <gbenson@redhat.com>
1461
1462 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1463 (AC_CHECK_HEADERS): Check for linux/elf.h.
1464 * configure, config.in: Rebuild.
1465 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1466 doesn't define elf_fpregset_t.
1467
1468 2018-10-01 Gary Benson <gbenson@redhat.com>
1469
1470 * gdb_proc_service.h: Whitespace change.
1471
1472 2018-10-01 Tom Tromey <tom@tromey.com>
1473
1474 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1475 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1476 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1477
1478 2018-10-01 Tom Tromey <tom@tromey.com>
1479
1480 * README: Minor change.
1481
1482 2018-09-30 Pedro Alves <palves@redhat.com>
1483
1484 * darwin-nat-info.c (darwin_debug_regions_recurse)
1485 (info_mach_exceptions_command): Remove unused local variables.
1486 * darwin-nat.c (darwin_decode_notify_message)
1487 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1488 (darwin_stop_inferior, darwin_setup_exceptions)
1489 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1490 (darwin_nat_target::attach, darwin_nat_target::detach)
1491 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1492 local variables.
1493 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1494 variables.
1495
1496 2018-09-29 Tom Tromey <tom@tromey.com>
1497
1498 * README: Remove some leftover text.
1499
1500 2018-09-29 Tom Tromey <tom@tromey.com>
1501
1502 * PROBLEMS: Rewrite.
1503 * README: Update.
1504
1505 2018-09-28 John Baldwin <jhb@FreeBSD.org>
1506
1507 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1508 case with explicit breakpoint kind.
1509 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1510 'additional_info' and related logic.
1511 (riscv_debug_breakpoints): New variable.
1512 (riscv_breakpoint_kind_from_pc): Use the length of the existing
1513 instruction to determine the breakpoint kind.
1514 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1515 flag. Update description of 'set/show riscv
1516 use-compressed-breakpoints' flag.
1517
1518 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
1519
1520 (NEWS): Mention changes to frame related commands.
1521 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1522 (add_prefix_cmd_suppress_notification): New function.
1523 (add_com_suppress_notification): Call
1524 add_cmd_suppress_notification.
1525 * command.h (add_cmd_suppress_notification): Declare.
1526 (add_prefix_cmd_suppress_notification): Declare.
1527 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1528 (parse_frame_specification): Moved from stack.c, with
1529 simplification to handle a single argument.
1530 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1531 switch to the selected frame. Add a header comment.
1532 * stack.c: Remove 'safe-ctype.h' include.
1533 (find_frame_for_function): Add declaration.
1534 (find_frame_for_address): New function.
1535 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1536 (frame_selection_by_function_completer): New function.
1537 (info_frame_command): Rename to...
1538 (info_frame_command_core): ...this, and update parameter types.
1539 (select_frame_command): Rename to...
1540 (select_frame_command_core): ...this, and update parameter types.
1541 (frame_command): Rename to...
1542 (frame_command_core): ...this, and update parameter types.
1543 (class frame_command_helper): New class to wrap implementations of
1544 frame related sub-commands.
1545 (frame_apply_cmd_list): New static global.
1546 (frame_cmd_list): Make static.
1547 (select_frame_cmd_list): New global for sub-commands.
1548 (info_frame_cmd_list): New global for sub-commands.
1549 (_initialize_stack): Register sub-commands for 'frame',
1550 'select-frame', and 'info frame'. Update 'frame apply' commands
1551 to use frame_apply_cmd_list. Move function local static
1552 frame_apply_list to file static frame_apply_cmd_list for
1553 consistency.
1554 * stack.h (select_frame_command): Delete declarationn.
1555 (select_frame_for_mi): Declare new function.
1556
1557 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
1558
1559 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1560 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1561 and NOP.
1562
1563 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
1564
1565 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1566
1567 2018-09-26 Tom Tromey <tom@tromey.com>
1568
1569 * valops.c (auto_abandon): Remove dead code.
1570
1571 2018-09-26 Tom Tromey <tom@tromey.com>
1572
1573 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1574
1575 2018-09-24 Tom Tromey <tom@tromey.com>
1576
1577 * common/pathstuff.c (get_standard_cache_dir): Make
1578 "xdg_cache_home" and "home" const.
1579 * top.c (init_history): Make "tmpenv" const.
1580 * main.c (get_init_files): Make "homedir" const.
1581
1582 2018-09-23 Tom Tromey <tom@tromey.com>
1583
1584 PR python/18852:
1585 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1586
1587 2018-09-23 Tom Tromey <tom@tromey.com>
1588
1589 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1590 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1591 * python/python-internal.h (gdbpy_handle_exception): Declare.
1592 * python/py-utils.c (gdbpy_handle_exception): New function.
1593
1594 2018-09-23 Tom Tromey <tom@tromey.com>
1595
1596 PR python/17284:
1597 * python/py-type.c (typy_template_argument): Check for negative
1598 argument number.
1599
1600 2018-09-23 Tom Tromey <tom@tromey.com>
1601
1602 PR python/14062:
1603 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1604
1605 2018-09-23 Tom Tromey <tom@tromey.com>
1606
1607 PR python/18170:
1608 * python/py-value.c (valpy_int): Allow conversion from pointer
1609 type.
1610
1611 2018-09-23 Tom Tromey <tom@tromey.com>
1612
1613 PR python/20126:
1614 * python/py-value.c (valpy_int): Respect type sign.
1615
1616 2018-09-23 Tom Tromey <tom@tromey.com>
1617
1618 PR python/18352;
1619 * python/py-value.c (valpy_float): Allow conversions from int or
1620 char.
1621 (valpy_int, valpy_long): Allow conversions from float.
1622
1623 2018-09-23 Tom Tromey <tom@tromey.com>
1624
1625 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1626 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1627
1628 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1629
1630 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1631 __sighndlr.
1632 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1633
1634 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
1635
1636 * windows-nat.c (windows_nat_target::wait): Remove a spurious
1637 target_terminal::ours().
1638
1639 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
1640
1641 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1642 of vl to ULONGEST.
1643
1644 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
1645
1646 * breakpoint.c (update_inserted_breakpoint_locations): Remove
1647 redundant condition.
1648
1649 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1650
1651 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1652
1653 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1654 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
1655 * sol-thread.c (ps_pdmodel): Don't guard definition.
1656
1657 * procfs.c: Fix formatting.
1658
1659 * procfs.c (sysset_t_alloc): Remove.
1660 (create_procinfo): Use XNEW instead of sysset_t_alloc.
1661 (procfs_debug_inferior): Likewise.
1662 (procfs_set_exec_trap): Likewise.
1663 (proc_set_traced_sysentry): Don't allocate argp dynamically.
1664 (proc_set_traced_sysexit): Likewise.
1665
1666 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1667 (dead_procinfo): Likewise.
1668 (proc_warn): Likewise.
1669 (proc_error): Likewise.
1670 (proc_get_LDT_entry): Likewise.
1671 (do_attach): Likewise.
1672 (procfs_target::pid_to_str): Likewise.
1673 (iterate_over_mappings): Likewise.
1674
1675 * procfs.c (create_procinfo): Fix ARI warning.
1676 (proc_get_status): Likewise.
1677 (proc_stop_process): Likewise.
1678 (proc_run_process): Likewise.
1679 (proc_kill): Likewise.
1680 (proc_get_LDT_entry): Likewise.
1681 (procfs_find_LDT_entry): Likewise.
1682 (proc_update_threads): Likewise.
1683 (proc_iterate_over_threads): Likewise.
1684 (do_attach): Likewise.
1685 (procfs_xfer_memory): Likewise.
1686 (invalidate_cache): Likewise.
1687 (procfs_target::resume): Likewise.
1688 (procfs_init_inferior): Likewise.
1689 (procfs_set_exec_trap): Likewise.
1690 (procfs_target::thread_alive): Likewise.
1691 (procfs_target::pid_to_exec_file): Likewise.
1692 (iterate_over_mappings): Likewise.
1693 (procfs_target::make_corefile_notes): Likewise.
1694 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1695
1696 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1697 (procfs_find_LDT_entry): Likewise.
1698 * sol-thread.c (ps_lgetLDT): Likewise.
1699
1700 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1701
1702 PR tdep/17903
1703 * procfs.c (procfs_target): Declare pid_to_exec_file.
1704 (procfs_target::pid_to_exec_file): New.
1705
1706 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1707
1708 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1709 renaming.
1710 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1711 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1712
1713 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1714
1715 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1716 (supply_fpregset, fill_fpregset): Move ...
1717 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1718 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1719 Remove references to ioctl-based procfs.
1720 Include <sys/reg.h>.
1721 Remove PR_MODEL_NATIVE guards.
1722 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1723 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1724
1725 2018-09-19 Xavier Roirand <roirand@adacore.com>
1726
1727 PR gdb/20981:
1728 * solib-darwin.c (darwin_get_dyld_bfd): New function.
1729 (darwin_solib_get_all_image_info_addr_at_init): Update call.
1730 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1731
1732 2018-09-19 John Baldwin <jhb@FreeBSD.org>
1733
1734 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1735 (fbsd_print_sockaddr_in6): Likewise.
1736
1737 2018-09-19 Richard Bunt <richard.bunt@arm.com>
1738 Chris January <chris.january@arm.com>
1739
1740 * eval.c (skip_undetermined_arglist): Skip argument list helper.
1741 (evaluate_subexp_standard): Return a dummy type when
1742 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1743 OP_F77_UNDETERMINED_ARGLIST case.
1744 * expression.h (enum noside): Update comment.
1745
1746 2018-09-19 George Vasick <george.vasick@oracle.com>
1747
1748 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1749
1750 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
1751 April Chin <april.chin@oracle.com>
1752 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1753
1754 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1755 uint_t lwpid_t.
1756 (create_procinfo): Print pids in /proc without leading zeros.
1757
1758 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
1759
1760 * nios2-tdep.c (nios2_gcc_target_options): New.
1761 (nios2_gdb_arch_init): Install new hook.
1762
1763 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
1764
1765 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1766 New file.
1767 * update-gnulib.sh: Apply patch.
1768 * configure: Re-generate.
1769
1770 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1771
1772 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1773 description. Make "info proc" command descriptions more
1774 consistent.
1775
1776 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1777
1778 * NEWS: Mention 'info proc files' command.
1779
1780 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1781
1782 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1783 descriptors for IP_FILES and IP_ALL.
1784
1785 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1786
1787 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1788 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1789 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1790 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1791 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1792 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1793 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1794 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1795 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1796 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1797 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1798 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1799 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1800 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1801 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1802 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1803 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1804 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1805 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1806 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1807 (struct fbsd_sockaddr_un): New types.
1808 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1809 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1810 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1811 (fbsd_core_info_proc_files): New functions.
1812 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1813 IP_ALL.
1814 * fbsd-tdep.h (fbsd_info_proc_files_header)
1815 (fbsd_info_proc_files_entry): New.
1816
1817 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1818
1819 * defs.h (enum info_proc_what) [IP_FILES]: New value.
1820 * infcmd.c (info_proc_cmd_files): New function.
1821 (_initialize_infcmd): Register 'info proc files' command.
1822
1823 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1824
1825 * gnulib/aclocal-m4-deps.mk: Re-generate.
1826 * gnulib/aclocal.m4: Re-generate.
1827 * gnulib/config.in: Re-generate.
1828 * gnulib/configure: Re-generate.
1829 * gnulib/import/Makefile.am: Re-generate.
1830 * gnulib/import/Makefile.in: Re-generate.
1831 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1832 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1833 * gnulib/import/arpa_inet.in.h: New file.
1834 * gnulib/import/inet_ntop.c: New file.
1835 * gnulib/import/m4/arpa_inet_h.m4: New file.
1836 * gnulib/import/m4/inet_ntop.m4: New file.
1837 * gnulib/import/m4/netinet_in_h.m4: New file.
1838 * gnulib/import/m4/socklen.m4: New file.
1839 * gnulib/import/m4/sockpfaf.m4: New file.
1840 * gnulib/import/m4/stdalign.m4: New file.
1841 * gnulib/import/m4/sys_uio_h.m4: New file.
1842 * gnulib/import/netinet_in.in.h: New file.
1843 * gnulib/import/stdalign.in.h: New file.
1844 * gnulib/import/sys_socket.c: New file.
1845 * gnulib/import/sys_socket.in.h: New file.
1846 * gnulib/import/sys_uio.in.h: New file.
1847 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1848 module.
1849
1850 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1851
1852 * gnulib/aclocal-m4-deps.mk: New file.
1853 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1854 deterministically.
1855
1856 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1857
1858 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1859 KVE_PATH.
1860
1861 2018-09-18 Tom Tromey <tom@tromey.com>
1862
1863 * compile/compile-object-load.c (struct
1864 link_hash_table_cleanup_data): Add constructor and destructor.
1865 Use DISABLE_COPY_AND_ASSIGN.
1866 (~link_hash_table_cleanup_data): Rename from
1867 link_hash_table_free. Now a destructor.
1868 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
1869
1870 2018-09-18 Tom Tromey <tom@tromey.com>
1871
1872 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1873 * compile/compile-object-load.c (struct munmap_list): Move to
1874 header file.
1875 (munmap_list::add): Rename from munmap_list_add; rewrite.
1876 (munmap_list::~munmap_list): Rename from munmap_list_free.
1877 (munmap_listp_free_cleanup): Remove.
1878 (compile_object_load): Update.
1879 * compile/compile-object-load.h (struct munmap_list): Move from
1880 compile-object-load.c. Rewrite.
1881
1882 2018-09-18 Alan Hayward <alan.hayward@arm.com>
1883
1884 * aarch64-tdep.c (pass_in_v): Use register size.
1885 (aarch64_extract_return_value): Likewise.
1886 (aarch64_store_return_value): Likewise.
1887
1888 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1889
1890 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1891 rlim_t.
1892
1893 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1894
1895 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1896 Fix short help line.
1897
1898 2018-09-17 Tom Tromey <tom@tromey.com>
1899
1900 PR python/20445:
1901 * configure: Rebuild.
1902 * configure.ac: Conditionally use -DNDEBUG for Python.
1903
1904 2018-09-17 Tom Tromey <tom@tromey.com>
1905
1906 * configure: Rebuild.
1907 * configure.ac: Use gmp as a library dependency when checking for
1908 mpfr.
1909
1910 2018-09-17 Pedro Alves <palves@redhat.com>
1911
1912 * python/py-inferior.c (find_inferior_object): Delete.
1913
1914 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
1915
1916 * compile/compile-cplus-types.c
1917 (compile_cplus_instance::enter_scope): Don't use new_scope after
1918 std::move.
1919
1920 2018-09-17 Tom Tromey <tom@tromey.com>
1921
1922 * common/pathstuff.c (get_standard_cache_dir): Use
1923 ~/Library/Caches on macOS.
1924 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1925
1926 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1927
1928 PR python/23669
1929 * breakpoint.c (commands_cmd_element): New.
1930 (_initialize_breakpoint): Assign commands_cmd_element.
1931 * breakpoint.h (commands_cmd_element): New.
1932 * cli/cli-script.c (while_cmd_element, if_command,
1933 define_cmd_element): New.
1934 (command_name_equals): Remove.
1935 (process_next_line): Compare commands by pointer, not by name.
1936 (_initialize_cli_script): Assign the various cmd_list_element
1937 variables.
1938 * compile/compile.c (compile_cmd_element): New.
1939 (_initialize_compile): Assign compile_cmd_element.
1940 * compile/compile.h (compile_cmd_element): New.
1941 * guile/guile.c (guile_cmd_element): New.
1942 (install_gdb_commands): Assign guile_cmd_element.
1943 * guile/guile.h (guile_cmd_element): New.
1944 * python/python.c (python_cmd_element): New.
1945 (_initialize_python): Assign python_cmd_element.
1946 * python/python.h (python_cmd_element): New.
1947 * tracepoint.c (while_stepping_cmd_element): New.
1948 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1949 * tracepoint.h (while_stepping_cmd_element): New.
1950
1951 2018-09-17 Tom Tromey <tom@tromey.com>
1952
1953 * infrun.c (save_infcall_suspend_state): Return
1954 infcall_suspend_state_up.
1955 (save_infcall_control_state): Return infcall_control_state_up.
1956 * inferior.h (save_infcall_suspend_state)
1957 (save_infcall_control_state): Declare later. Return unique
1958 pointers.
1959
1960 2018-09-17 Tom Tromey <tom@tromey.com>
1961
1962 * infrun.c (struct stop_context): Declare constructor,
1963 destructor, "changed" method.
1964 (stop_context::stop_context): Rename from save_stop_context.
1965 (stop_context::~stop_context): Rename from
1966 release_stop_context_cleanup.
1967 (normal_stop): Update.
1968 (stop_context::changed): Rename from stop_context_changed. Return
1969 bool.
1970
1971 2018-09-17 Tom Tromey <tom@tromey.com>
1972
1973 * inferior.h (struct infcall_suspend_state_deleter): New.
1974 (infcall_suspend_state_up): New typedef.
1975 (struct infcall_control_state_deleter): New.
1976 (infcall_control_state_up): New typedef.
1977 (make_cleanup_restore_infcall_suspend_state)
1978 (make_cleanup_restore_infcall_control_state): Don't declare.
1979 * infcall.c (call_function_by_hand_dummy): Update.
1980 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1981 (make_cleanup_restore_infcall_suspend_state): Remove.
1982 (do_restore_infcall_control_state_cleanup)
1983 (make_cleanup_restore_infcall_control_state): Remove.
1984
1985 2018-09-17 Tom Tromey <tom@tromey.com>
1986
1987 * gdbthread.h (struct thread_control_state): Add initializer.
1988 (class thread_info) <control>: Remove initializer.
1989 * inferior.h (struct inferior_control_state): Add initializer.
1990 (class inferior) <control>: Remove initializer.
1991 (exit_inferior_1): Update.
1992 * infrun.c (struct infcall_control_state): Add constructors.
1993 (save_infcall_control_state): Use new.
1994 (restore_infcall_control_state, discard_infcall_control_state):
1995 Use delete.
1996
1997 2018-09-17 Tom Tromey <tom@tromey.com>
1998
1999 * infrun.c (struct infcall_suspend_state) <registers>: Now a
2000 unique_ptr.
2001 <siginfo_data>: Now a unique_xmalloc_ptr.
2002 (save_infcall_suspend_state, restore_infcall_suspend_state)
2003 (discard_infcall_suspend_state)
2004 (get_infcall_suspend_state_regcache): Update.
2005
2006 2018-09-17 Tom Tromey <tom@tromey.com>
2007
2008 * gdbthread.h (struct thread_suspend_state): Add initializers.
2009 (class thread_info) <suspend>: Remove initializer.
2010 * infrun.c (struct infcall_suspend_state): Add initializers.
2011 (save_infcall_suspend_state): Use new.
2012 (discard_infcall_suspend_state): Use delete.
2013
2014 2018-09-16 Tom Tromey <tom@tromey.com>
2015
2016 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2017 Remove.
2018 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2019 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2020 (py_varobj_iter_new): Likewise.
2021 (py_varobj_get_iterator): Use gdbpy_ref.
2022
2023 2018-09-16 Tom Tromey <tom@tromey.com>
2024
2025 * python/py-threadevent.c (py_get_event_thread): Simplify.
2026 * python/py-inferior.c (infpy_thread_from_thread_handle):
2027 Return immediately after calling thread_to_thread_object. Use
2028 Py_RETURN_NONE.
2029 (thread_to_thread_object): Set the exception on a NULL return.
2030
2031 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2032
2033 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2034
2035 2018-09-16 Tom Tromey <tom@tromey.com>
2036
2037 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2038 Remove.
2039
2040 2018-09-16 Tom Tromey <tom@tromey.com>
2041
2042 * python/python-internal.h (thread_to_thread_object): Change
2043 return type.
2044 * python/py-inferior.c (thread_to_thread_object): Return a new
2045 reference.
2046 (infpy_thread_from_thread_handle): Update.
2047 * python/py-infthread.c (gdbpy_selected_thread): Update.
2048 * python/py-stopevent.c (create_stop_event_object): Update.
2049 * python/py-threadevent.c (py_get_event_thread): Return a new
2050 reference.
2051 (py_get_event_thread): Update.
2052 * python/py-event.h (py_get_event_thread): Change return type.
2053 * python/py-continueevent.c (create_continue_event_object):
2054 Update.
2055
2056 2018-09-16 Tom Tromey <tom@tromey.com>
2057
2058 * python/py-progspace.c (pspy_get_objfiles): Update.
2059 * python/python-internal.h (objfile_to_objfile_object): Change
2060 return type.
2061 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2062 Update.
2063 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2064 Update.
2065 * python/python.c (gdbpy_get_current_objfile): Update.
2066 (gdbpy_objfiles): Update.
2067 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2068 Update.
2069 (objfile_to_objfile_object): Return a new reference.
2070 * python/py-symtab.c (stpy_get_objfile): Update.
2071 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2072 Update.
2073
2074 2018-09-16 Tom Tromey <tom@tromey.com>
2075
2076 * python/py-inferior.c (infpy_get_progspace): Update.
2077 * python/python-internal.h (pspace_to_pspace_object): Change
2078 return type.
2079 * python/py-newobjfileevent.c
2080 (create_clear_objfiles_event_object): Update.
2081 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2082 Update.
2083 * python/python.c (gdbpy_get_current_progspace): Update.
2084 (gdbpy_progspaces): Update.
2085 * python/py-progspace.c (pspace_to_pspace_object): Return a new
2086 reference.
2087 * python/py-objfile.c (objfpy_get_progspace): Update.
2088 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2089 Update.
2090
2091 2018-09-16 Tom Tromey <tom@tromey.com>
2092
2093 * python/lib/gdb/__init__.py (current_progspace, objfiles)
2094 (solib_name, block_for_pc, find_pc_line): New functions.
2095 (execute_unwinders): Update.
2096 * python/py-block.c (gdbpy_block_for_pc): Remove.
2097 * python/py-inferior.c (infpy_get_progspace): New function.
2098 (inferior_object_getset) <progspace>: Add.
2099 * python/py-progspace.c (pspy_objfiles): Rewrite.
2100 (pspy_solib_name, pspy_block_for_pc)
2101 (pspy_find_pc_line, pspy_is_valid): New functions.
2102 (progspace_object_methods): Add entries for solib_name,
2103 block_for_pc, find_pc_line, is_valid.
2104 * python/python-internal.h (gdbpy_block_for_pc)
2105 (build_objfiles_list): Don't declare.
2106 * python/python.c: Don't include solib.h.
2107 (gdbpy_solib_name, gdbpy_find_pc_line)
2108 (gdbpy_get_current_progspace, build_objfiles_list)
2109 (gdbpy_objfiles): Remove.
2110 (GdbMethods) <current_progspace, objfiles, block_for_pc,
2111 solib_name, find_pc_line>: Remove entries.
2112
2113 2018-09-16 Tom Tromey <tom@tromey.com>
2114
2115 * top.c (new_ui_command): Use GNU style for metasyntactic
2116 variables.
2117 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2118 variables.
2119 * maint.c (maintenance_translate_address): Remove "<>" around
2120 text.
2121 * interps.c (interpreter_exec_cmd): Use GNU style for
2122 metasyntactic variables.
2123 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2124 metasyntactic variables.
2125 * tracepoint.c (tfind_range_command): Use GNU style for
2126 metasyntactic variables.
2127 (tfind_outside_command): Likewise.
2128 (_initialize_tracepoint): Likewise.
2129 * remote.c (extended_remote_target::create_inferior): Use GNU
2130 style for metasyntactic variables.
2131 * sparc64-tdep.c (adi_examine_command): Use GNU style for
2132 metasyntactic variables.
2133 (adi_assign_command): Likewise.
2134
2135 2018-09-16 Tom Tromey <tom@tromey.com>
2136
2137 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2138 metasyntactic variables. Print message if no disassembler options
2139 are available.
2140
2141 2018-09-15 Tom Tromey <tom@tromey.com>
2142
2143 * infcmd.c (get_inferior_args): Return const char *.
2144 * inferior.h (get_inferior_args): Return type now const.
2145 * linux-tdep.c (linux_fill_prpsinfo): Update.
2146 * procfs.c (procfs_target::make_corefile_notes): Update.
2147
2148 2018-09-07 Tom Tromey <tom@tromey.com>
2149
2150 * python/python.c (execute_gdb_command): Call bpstat_do_actions
2151 inside the TRY.
2152
2153 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
2154
2155 * nios2-tdep.c (nios2_type_align): New.
2156 (nios2_gdb_arch_init): Install type_align hook.
2157
2158 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2159
2160 * eval.c (fake_method::fake_method): Call xzalloc directly for a
2161 type that is neither object file owned, nor gdbarch owned.
2162 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2163 gdbarch is non-NULL.
2164 (alloc_type_instance): Allocate non-objfile owned types on the
2165 gdbarch obstack.
2166 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2167 using TYPE_ALLOC to ensure memory is allocated on the correct
2168 obstack.
2169 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2170 obstack, or the gdbarch obstack.
2171 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2172
2173 2018-09-14 Tom Tromey <tom@tromey.com>
2174
2175 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2176 block.
2177
2178 2018-09-14 Tom Tromey <tom@tromey.com>
2179
2180 * nat/fork-inferior.c (get_startup_shell): Remove "static".
2181
2182 2018-09-13 Tom Tromey <tom@tromey.com>
2183
2184 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2185 static.
2186
2187 2018-09-13 Tom Tromey <tom@tromey.com>
2188
2189 * exec.c (try_open_exec_file): Use std::string.
2190
2191 2018-09-13 Tom Tromey <tom@tromey.com>
2192
2193 * utils.h (gdb_bfd_errmsg): Return std::string.
2194 * exec.c (exec_file_attach): Update.
2195 * compile/compile-object-load.c (compile_object_load): Update.
2196 * utils.c (gdb_bfd_errmsg): Return std::string.
2197
2198 2018-09-13 Tom Tromey <tom@tromey.com>
2199
2200 * procfs.c (struct procinfo_deleter): New.
2201 (procinfo_up): New typedef.
2202 (do_destroy_procinfo_cleanup): Remove.
2203 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
2204
2205 2018-09-13 Tom Tromey <tom@tromey.com>
2206
2207 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2208
2209 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2210 2018-09-13 Tom Tromey <tom@tromey.com>
2211
2212 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2213 (pspy_get_objfiles): New function.
2214 (progspace_object_methods): New.
2215 (pspace_object_type): Add tp_methods callback.
2216 * python/python-internal.h (build_objfiles_list): New
2217 declaration.
2218 * python/python.c (build_objfiles_list): New function.
2219 (gdbpy_objfiles): Implement using build_objfiles_list.
2220 * NEWS: Mention the Progspace.objfiles method.
2221
2222 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2223
2224 * python/py-inferior.c (infpy_get_progspace): New function.
2225 (inferior_object_getset): Add progspace property.
2226 * NEWS: Mention the new property.
2227
2228 2018-09-13 Tom Tromey <tom@tromey.com>
2229
2230 PR rust/23650:
2231 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2232
2233 2018-09-13 Tom Tromey <tom@tromey.com>
2234
2235 PR rust/23626:
2236 * rust-lang.c (rust_enum_variant): Now static.
2237 (rust_empty_enum_p): New function.
2238 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2239 Handle empty enum.
2240
2241 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2242
2243 * python/py-inferior.c (infpy_repr): New.
2244 (inferior_object_type): Register infpy_repr.
2245 * python/py-objfile.c (objfpy_repr): New.
2246 (objfile_object_type): Register objfpy_repr.
2247
2248 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2249
2250 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2251
2252 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2253
2254 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2255 typo.
2256
2257 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
2258
2259 * common/common-utils.c: Don't include '<sys/stat.h>'.
2260 (is_regular_file): Move to...
2261 * common/filestuff.c (is_regular_file): ... here.
2262 * common/common-utils.h (is_regular_file): Move to...
2263 * common/filestuff.h (is_regular_file): ... here.
2264
2265 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
2266
2267 * skip.c (debug_skip): New variable.
2268 (skiplist_entry::do_skip_file_p): Add debug output.
2269 (skiplist_entry::do_skip_gfile_p): Likewise.
2270 (skiplist_entry::skip_function_p): Likewise.
2271 (_initialize_step_skip): Create debug command.
2272 * NEWS: Mention set/show debug skip.
2273
2274 2018-09-11 Xavier Roirand <roirand@adacore.com>
2275
2276 * darwin-nat.c (should_disable_startup_with_shell):
2277 New function.
2278 (darwin_nat_target::create_inferior): Add call.
2279
2280 2018-09-11 Xavier Roirand <roirand@adacore.com>
2281
2282 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2283 inf_port, msg_state>: Initialize.
2284 (struct darwin_thread_info) <signaled, single_step>: Change
2285 type and initialize.
2286 (struct darwin_thread_info) <event>: Initialize.
2287
2288 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2289
2290 PR gdb/23555
2291 PR gdb/23558
2292 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2293 guesses.
2294
2295 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2296
2297 Revert:
2298 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2299
2300 PR gdb/23555
2301 PR gdb/23558
2302 * gnulib/aclocal.m4: Regenerate.
2303 * gnulib/config.in: Regenerate.
2304 * gnulib/configure: Regenerate.
2305 * gnulib/import/Makefile.am: Update.
2306 * gnulib/import/Makefile.in: Update.
2307 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2308 * gnulib/import/_Noreturn.h: ... this.
2309 * gnulib/import/alloca.in.h: Update.
2310 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2311 * gnulib/import/arg-nonnull.h: ... this.
2312 * gnulib/import/assure.h: Update.
2313 * gnulib/import/at-func.c: Update.
2314 * gnulib/import/basename-lgpl.c: Update.
2315 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2316 * gnulib/import/c++defs.h: ... this.
2317 * gnulib/import/canonicalize-lgpl.c: Update.
2318 * gnulib/import/cdefs.h: Update.
2319 * gnulib/import/chdir-long.c: Update.
2320 * gnulib/import/chdir-long.h: Update.
2321 * gnulib/import/cloexec.c: Update.
2322 * gnulib/import/cloexec.h: Update.
2323 * gnulib/import/close.c: Update.
2324 * gnulib/import/closedir.c: Update.
2325 * gnulib/import/config.charset: Update.
2326 * gnulib/import/dirent-private.h: Update.
2327 * gnulib/import/dirent.in.h: Update.
2328 * gnulib/import/dirfd.c: Update.
2329 * gnulib/import/dirname-lgpl.c: Update.
2330 * gnulib/import/dirname.h: Update.
2331 * gnulib/import/dosname.h: Update.
2332 * gnulib/import/dup-safer-flag.c: Update.
2333 * gnulib/import/dup-safer.c: Update.
2334 * gnulib/import/dup.c: Update.
2335 * gnulib/import/dup2.c: Update.
2336 * gnulib/import/errno.in.h: Update.
2337 * gnulib/import/error.c: Update.
2338 * gnulib/import/error.h: Update.
2339 * gnulib/import/exitfail.c: Update.
2340 * gnulib/import/exitfail.h: Update.
2341 * gnulib/import/extra/update-copyright: Update.
2342 * gnulib/import/fchdir.c: Update.
2343 * gnulib/import/fcntl.c: Update.
2344 * gnulib/import/fcntl.in.h: Update.
2345 * gnulib/import/fd-hook.c: Update.
2346 * gnulib/import/fd-hook.h: Update.
2347 * gnulib/import/fd-safer-flag.c: Update.
2348 * gnulib/import/fd-safer.c: Update.
2349 * gnulib/import/fdopendir.c: Update.
2350 * gnulib/import/filename.h: Update.
2351 * gnulib/import/filenamecat-lgpl.c: Update.
2352 * gnulib/import/filenamecat.h: Update.
2353 * gnulib/import/flexmember.h: Update.
2354 * gnulib/import/float+.h: Update.
2355 * gnulib/import/float.c: Update.
2356 * gnulib/import/float.in.h: Update.
2357 * gnulib/import/fnmatch.c: Update.
2358 * gnulib/import/fnmatch.in.h: Update.
2359 * gnulib/import/fnmatch_loop.c: Update.
2360 * gnulib/import/fpucw.h: Update.
2361 * gnulib/import/frexp.c: Update.
2362 * gnulib/import/frexpl.c: Update.
2363 * gnulib/import/fstat.c: Update.
2364 * gnulib/import/fstatat.c: Update.
2365 * gnulib/import/getcwd-lgpl.c: Update.
2366 * gnulib/import/getcwd.c: Update.
2367 * gnulib/import/getdtablesize.c: Update.
2368 * gnulib/import/getlogin_r.c: Update.
2369 * gnulib/import/getprogname.c: Update.
2370 * gnulib/import/getprogname.h: Update.
2371 * gnulib/import/gettext.h: Update.
2372 * gnulib/import/gettimeofday.c: Update.
2373 * gnulib/import/glob-libc.h: Update.
2374 * gnulib/import/glob.c: Update.
2375 * gnulib/import/glob.in.h: Update.
2376 * gnulib/import/glob_internal.h: Update.
2377 * gnulib/import/glob_pattern_p.c: Update.
2378 * gnulib/import/globfree.c: Update.
2379 * gnulib/import/hard-locale.c: Update.
2380 * gnulib/import/hard-locale.h: Update.
2381 * gnulib/import/intprops.h: Update.
2382 * gnulib/import/inttypes.in.h: Update.
2383 * gnulib/import/isnan.c: Update.
2384 * gnulib/import/isnand-nolibm.h: Update.
2385 * gnulib/import/isnand.c: Update.
2386 * gnulib/import/isnanl-nolibm.h: Update.
2387 * gnulib/import/isnanl.c: Update.
2388 * gnulib/import/itold.c: Update.
2389 * gnulib/import/libc-config.h: Update.
2390 * gnulib/import/limits.in.h: Update.
2391 * gnulib/import/localcharset.c: Update.
2392 * gnulib/import/localcharset.h: Update.
2393 * gnulib/import/localtime-buffer.c: Update.
2394 * gnulib/import/localtime-buffer.h: Update.
2395 * gnulib/import/lstat.c: Update.
2396 * gnulib/import/m4/00gnulib.m4: Update.
2397 * gnulib/import/m4/__inline.m4: Update.
2398 * gnulib/import/m4/absolute-header.m4: Update.
2399 * gnulib/import/m4/alloca.m4: Update.
2400 * gnulib/import/m4/builtin-expect.m4: Update.
2401 * gnulib/import/m4/canonicalize.m4: Update.
2402 * gnulib/import/m4/chdir-long.m4: Update.
2403 * gnulib/import/m4/close.m4: Update.
2404 * gnulib/import/m4/closedir.m4: Update.
2405 * gnulib/import/m4/configmake.m4: Update.
2406 * gnulib/import/m4/d-ino.m4: Update.
2407 * gnulib/import/m4/d-type.m4: Update.
2408 * gnulib/import/m4/dirent_h.m4: Update.
2409 * gnulib/import/m4/dirfd.m4: Update.
2410 * gnulib/import/m4/dirname.m4: Update.
2411 * gnulib/import/m4/double-slash-root.m4: Update.
2412 * gnulib/import/m4/dup.m4: Update.
2413 * gnulib/import/m4/dup2.m4: Update.
2414 * gnulib/import/m4/eealloc.m4: Update.
2415 * gnulib/import/m4/environ.m4: Update.
2416 * gnulib/import/m4/errno_h.m4: Update.
2417 * gnulib/import/m4/error.m4: Update.
2418 * gnulib/import/m4/exponentd.m4: Update.
2419 * gnulib/import/m4/exponentl.m4: Update.
2420 * gnulib/import/m4/extensions.m4: Update.
2421 * gnulib/import/m4/extern-inline.m4: Update.
2422 * gnulib/import/m4/fchdir.m4: Update.
2423 * gnulib/import/m4/fcntl-o.m4: Update.
2424 * gnulib/import/m4/fcntl.m4: Update.
2425 * gnulib/import/m4/fcntl_h.m4: Update.
2426 * gnulib/import/m4/fdopendir.m4: Update.
2427 * gnulib/import/m4/filenamecat.m4: Update.
2428 * gnulib/import/m4/flexmember.m4: Update.
2429 * gnulib/import/m4/float_h.m4: Update.
2430 * gnulib/import/m4/fnmatch.m4: Update.
2431 * gnulib/import/m4/fnmatch_h.m4: Update.
2432 * gnulib/import/m4/fpieee.m4: Update.
2433 * gnulib/import/m4/frexp.m4: Update.
2434 * gnulib/import/m4/frexpl.m4: Update.
2435 * gnulib/import/m4/fstat.m4: Update.
2436 * gnulib/import/m4/fstatat.m4: Update.
2437 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2438 * gnulib/import/m4/getcwd-path-max.m4: Update.
2439 * gnulib/import/m4/getcwd.m4: Update.
2440 * gnulib/import/m4/getdtablesize.m4: Update.
2441 * gnulib/import/m4/getlogin.m4: Update.
2442 * gnulib/import/m4/getlogin_r.m4: Update.
2443 * gnulib/import/m4/getpagesize.m4: Update.
2444 * gnulib/import/m4/getprogname.m4: Update.
2445 * gnulib/import/m4/gettimeofday.m4: Update.
2446 * gnulib/import/m4/glibc21.m4: Update.
2447 * gnulib/import/m4/glob.m4: Update.
2448 * gnulib/import/m4/glob_h.m4: Update.
2449 * gnulib/import/m4/gnulib-cache.m4: Update.
2450 * gnulib/import/m4/gnulib-common.m4: Update.
2451 * gnulib/import/m4/gnulib-comp.m4: Update.
2452 * gnulib/import/m4/gnulib-tool.m4: Update.
2453 * gnulib/import/m4/hard-locale.m4: Update.
2454 * gnulib/import/m4/include_next.m4: Update.
2455 * gnulib/import/m4/inttypes-pri.m4: Update.
2456 * gnulib/import/m4/inttypes.m4: Update.
2457 * gnulib/import/m4/isnand.m4: Update.
2458 * gnulib/import/m4/isnanl.m4: Update.
2459 * gnulib/import/m4/largefile.m4: Update.
2460 * gnulib/import/m4/limits-h.m4: Update.
2461 * gnulib/import/m4/localcharset.m4: Update.
2462 * gnulib/import/m4/locale-fr.m4: Update.
2463 * gnulib/import/m4/locale-ja.m4: Update.
2464 * gnulib/import/m4/locale-zh.m4: Update.
2465 * gnulib/import/m4/localtime-buffer.m4: Update.
2466 * gnulib/import/m4/longlong.m4: Update.
2467 * gnulib/import/m4/lstat.m4: Update.
2468 * gnulib/import/m4/malloc.m4: Update.
2469 * gnulib/import/m4/malloca.m4: Update.
2470 * gnulib/import/m4/math_h.m4: Update.
2471 * gnulib/import/m4/mbrtowc.m4: Update.
2472 * gnulib/import/m4/mbsinit.m4: Update.
2473 * gnulib/import/m4/mbsrtowcs.m4: Update.
2474 * gnulib/import/m4/mbstate_t.m4: Update.
2475 * gnulib/import/m4/memchr.m4: Update.
2476 * gnulib/import/m4/memmem.m4: Update.
2477 * gnulib/import/m4/mempcpy.m4: Update.
2478 * gnulib/import/m4/memrchr.m4: Update.
2479 * gnulib/import/m4/mkdir.m4: Update.
2480 * gnulib/import/m4/mkstemp.m4: Update.
2481 * gnulib/import/m4/mmap-anon.m4: Update.
2482 * gnulib/import/m4/mode_t.m4: Update.
2483 * gnulib/import/m4/msvc-inval.m4: Update.
2484 * gnulib/import/m4/msvc-nothrow.m4: Update.
2485 * gnulib/import/m4/multiarch.m4: Update.
2486 * gnulib/import/m4/nocrash.m4: Update.
2487 * gnulib/import/m4/off_t.m4: Update.
2488 * gnulib/import/m4/onceonly.m4: Update.
2489 * gnulib/import/m4/open-cloexec.m4: Update.
2490 * gnulib/import/m4/open.m4: Update.
2491 * gnulib/import/m4/openat.m4: Update.
2492 * gnulib/import/m4/opendir.m4: Update.
2493 * gnulib/import/m4/pathmax.m4: Update.
2494 * gnulib/import/m4/rawmemchr.m4: Update.
2495 * gnulib/import/m4/readdir.m4: Update.
2496 * gnulib/import/m4/readlink.m4: Update.
2497 * gnulib/import/m4/realloc.m4: Update.
2498 * gnulib/import/m4/rename.m4: Update.
2499 * gnulib/import/m4/rewinddir.m4: Update.
2500 * gnulib/import/m4/rmdir.m4: Update.
2501 * gnulib/import/m4/save-cwd.m4: Update.
2502 * gnulib/import/m4/secure_getenv.m4: Update.
2503 * gnulib/import/m4/setenv.m4: Update.
2504 * gnulib/import/m4/signal_h.m4: Update.
2505 * gnulib/import/m4/ssize_t.m4: Update.
2506 * gnulib/import/m4/stat-time.m4: Update.
2507 * gnulib/import/m4/stat.m4: Update.
2508 * gnulib/import/m4/std-gnu11.m4: Update.
2509 * gnulib/import/m4/stdbool.m4: Update.
2510 * gnulib/import/m4/stddef_h.m4: Update.
2511 * gnulib/import/m4/stdint.m4: Update.
2512 * gnulib/import/m4/stdio_h.m4: Update.
2513 * gnulib/import/m4/stdlib_h.m4: Update.
2514 * gnulib/import/m4/strchrnul.m4: Update.
2515 * gnulib/import/m4/strdup.m4: Update.
2516 * gnulib/import/m4/strerror.m4: Update.
2517 * gnulib/import/m4/string_h.m4: Update.
2518 * gnulib/import/m4/strstr.m4: Update.
2519 * gnulib/import/m4/strtok_r.m4: Update.
2520 * gnulib/import/m4/sys_socket_h.m4: Update.
2521 * gnulib/import/m4/sys_stat_h.m4: Update.
2522 * gnulib/import/m4/sys_time_h.m4: Update.
2523 * gnulib/import/m4/sys_types_h.m4: Update.
2524 * gnulib/import/m4/tempname.m4: Update.
2525 * gnulib/import/m4/time_h.m4: Update.
2526 * gnulib/import/m4/unistd-safer.m4: Update.
2527 * gnulib/import/m4/unistd_h.m4: Update.
2528 * gnulib/import/m4/warn-on-use.m4: Update.
2529 * gnulib/import/m4/wchar_h.m4: Update.
2530 * gnulib/import/m4/wchar_t.m4: Update.
2531 * gnulib/import/m4/wctype_h.m4: Update.
2532 * gnulib/import/m4/wint_t.m4: Update.
2533 * gnulib/import/malloc.c: Update.
2534 * gnulib/import/malloc/scratch_buffer.h: Update.
2535 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2536 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2537 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2538 * gnulib/import/malloca.c: Update.
2539 * gnulib/import/malloca.h: Update.
2540 * gnulib/import/malloca.valgrind: Update.
2541 * gnulib/import/math.in.h: Update.
2542 * gnulib/import/mbrtowc.c: Update.
2543 * gnulib/import/mbsinit.c: Update.
2544 * gnulib/import/mbsrtowcs-impl.h: Update.
2545 * gnulib/import/mbsrtowcs-state.c: Update.
2546 * gnulib/import/mbsrtowcs.c: Update.
2547 * gnulib/import/memchr.c: Update.
2548 * gnulib/import/memmem.c: Update.
2549 * gnulib/import/mempcpy.c: Update.
2550 * gnulib/import/memrchr.c: Update.
2551 * gnulib/import/mkdir.c: Update.
2552 * gnulib/import/mkstemp.c: Update.
2553 * gnulib/import/msvc-inval.c: Update.
2554 * gnulib/import/msvc-inval.h: Update.
2555 * gnulib/import/msvc-nothrow.c: Update.
2556 * gnulib/import/msvc-nothrow.h: Update.
2557 * gnulib/import/open.c: Update.
2558 * gnulib/import/openat-die.c: Update.
2559 * gnulib/import/openat-priv.h: Update.
2560 * gnulib/import/openat-proc.c: Update.
2561 * gnulib/import/openat.c: Update.
2562 * gnulib/import/openat.h: Update.
2563 * gnulib/import/opendir.c: Update.
2564 * gnulib/import/pathmax.h: Update.
2565 * gnulib/import/pipe-safer.c: Update.
2566 * gnulib/import/rawmemchr.c: Update.
2567 * gnulib/import/readdir.c: Update.
2568 * gnulib/import/readlink.c: Update.
2569 * gnulib/import/realloc.c: Update.
2570 * gnulib/import/ref-add.sin: Update.
2571 * gnulib/import/ref-del.sin: Update.
2572 * gnulib/import/rename.c: Update.
2573 * gnulib/import/rewinddir.c: Update.
2574 * gnulib/import/rmdir.c: Update.
2575 * gnulib/import/same-inode.h: Update.
2576 * gnulib/import/save-cwd.c: Update.
2577 * gnulib/import/save-cwd.h: Update.
2578 * gnulib/import/scratch_buffer.h: Update.
2579 * gnulib/import/secure_getenv.c: Update.
2580 * gnulib/import/setenv.c: Update.
2581 * gnulib/import/signal.in.h: Update.
2582 * gnulib/import/stat-time.c: Update.
2583 * gnulib/import/stat-time.h: Update.
2584 * gnulib/import/stat-w32.c: Update.
2585 * gnulib/import/stat-w32.h: Update.
2586 * gnulib/import/stat.c: Update.
2587 * gnulib/import/stdbool.in.h: Update.
2588 * gnulib/import/stddef.in.h: Update.
2589 * gnulib/import/stdint.in.h: Update.
2590 * gnulib/import/stdio.in.h: Update.
2591 * gnulib/import/stdlib.in.h: Update.
2592 * gnulib/import/str-two-way.h: Update.
2593 * gnulib/import/strchrnul.c: Update.
2594 * gnulib/import/strdup.c: Update.
2595 * gnulib/import/streq.h: Update.
2596 * gnulib/import/strerror-override.c: Update.
2597 * gnulib/import/strerror-override.h: Update.
2598 * gnulib/import/strerror.c: Update.
2599 * gnulib/import/string.in.h: Update.
2600 * gnulib/import/stripslash.c: Update.
2601 * gnulib/import/strnlen1.c: Update.
2602 * gnulib/import/strnlen1.h: Update.
2603 * gnulib/import/strstr.c: Update.
2604 * gnulib/import/strtok_r.c: Update.
2605 * gnulib/import/sys_stat.in.h: Update.
2606 * gnulib/import/sys_time.in.h: Update.
2607 * gnulib/import/sys_types.in.h: Update.
2608 * gnulib/import/tempname.c: Update.
2609 * gnulib/import/tempname.h: Update.
2610 * gnulib/import/time.in.h: Update.
2611 * gnulib/import/unistd--.h: Update.
2612 * gnulib/import/unistd-safer.h: Update.
2613 * gnulib/import/unistd.in.h: Update.
2614 * gnulib/import/unsetenv.c: Update.
2615 * gnulib/import/verify.h: Update.
2616 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2617 * gnulib/import/wchar.in.h: Update.
2618 * gnulib/import/wctype.in.h: Update.
2619 * gnulib/import/xalloc-oversized.h: Update.
2620 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2621 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2622
2623 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
2624
2625 * record-btrace.c (get_thread_current_frame): Remove
2626 old_inferior_ptid.
2627
2628 2018-09-10 Jerome Guitton <guitton@adacore.com>
2629
2630 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2631 with check_tag to 1 if and only if the type is tagged and the
2632 component being searched cannot been found in the current
2633 view. Otherwise, always call ada_to_fixed_type with
2634 check_tag to 0.
2635
2636 2018-09-10 Xavier Roirand <roirand@adacore.com>
2637
2638 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2639 declaration.
2640 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2641 * ada-varobj.c (ada_varobj_get_number_of_children,
2642 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2643
2644 2018-09-10 Xavier Roirand <roirand@adacore.com>
2645
2646 * ada-valprint.c (ada_value_print): Use type instead of
2647 enclosing type.
2648
2649 2018-09-10 Xavier Roirand <roirand@adacore.com>
2650
2651 * ada-lang.c (ada_value_subscript): Handle case when parameter is
2652 an array of access to unconstrained array.
2653
2654 2018-09-10 Xavier Roirand <roirand@adacore.com>
2655
2656 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2657 (ada_check_typedef): Use it.
2658
2659 2018-09-10 Xavier Roirand <roirand@adacore.com>
2660
2661 * ada-varobj.c (ada_varobj_describe_struct_child)
2662 (ada_varobj_describe_child): Handle union case like struct one.
2663
2664 2018-09-10 Tom Tromey <tom@tromey.com>
2665
2666 PR python/18380:
2667 * python/python.c (_initialize_python): Make example in "python"
2668 help work in Python 3.
2669
2670 2018-09-10 Eli Zaretskii <eliz@gnu.org>
2671
2672 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2673 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
2674 $(EXEEXT) to the script, as it is not a program.
2675
2676 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
2677
2678 * python/py-prettyprint.c (pretty_print_one_value): Return
2679 gdbpy_ref<>.
2680 (print_string_repr): Adjust.
2681 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2682 * python/python-internal.h (apply_varobj_pretty_printer): Return
2683 gdbpy_ref<>.
2684 * varobj.c (varobj_value_get_print_value): Adjust.
2685
2686 2018-09-08 Tom Tromey <tom@tromey.com>
2687
2688 PR python/16047:
2689 * python/py-prettyprint.c (pretty_print_one_value): Check for
2690 to_string method.
2691
2692 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2693
2694 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2695 replace_operator_with_call.
2696
2697 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2698
2699 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2700
2701 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2702
2703 * ada-typeprint.c (print_range): Print the bounds using TYPE
2704 rather than its TYPE_TARGET_TYPE.
2705
2706 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2707
2708 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2709 call to ada_to_fixed_value_create.
2710
2711 2018-09-08 Jerome Guitton <guitton@adacore.com>
2712
2713 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2714
2715 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2716
2717 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2718 by calls to error.
2719
2720 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2721
2722 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2723 Move update of loop variable "fi".
2724
2725 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2726
2727 * ada-lang.c (value_assign_to_component): In the case of
2728 big-endian targets, extract the bits of the given VAL
2729 using an src_offset of zero if container is not a scalar.
2730
2731 2018-09-06 Simon Ser <contact@emersion.fr>
2732
2733 PR gdb/23105
2734 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2735 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2736 * fbsd-tdep.c (fbsd_make_note_desc): New.
2737 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2738 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2739 * target.h (enum target_object) Add FreeBSD-specific
2740 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2741
2742 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2743
2744 * compile/compile-c.h (generate_c_for_variable_locations):
2745 Change reference to pointer.
2746 * compile/compile-c-support.c (compile_program) <compute>:
2747 Likewise.
2748 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2749 (generate_c_for_for_one_variable): Likewise
2750 (generate_c_for_variable_locations): Likewise
2751 * compile/compile-c-types.c (compile_c_instance::convert_type):
2752 Likewise
2753 * compile/compile-cplus-symbols.c (convert_one_symbol):
2754 std::move the scope passed to enter_scope.
2755 * compile/compile-cplus-types.c
2756 (compile_cplus_instance::enter_scope): Make parameter
2757 rvalue-reference.
2758 (compile_cplus_instance::new_scope): Change reference to
2759 pointer.
2760 (compile_cplus_instance::convert_type): Likewise
2761 (compile_cplus_convert_typedef): std::move the scope passed to
2762 enter_scope.
2763 (compile_cplus_convert_struct_or_union): Likewise.
2764 (compile_cplus_convert_enum): Likewise.
2765 (compile_cplus_convert_namespace): Likewise.
2766 * compile/compile-cplus.h (compile_cplus_instance)
2767 <enter_scope>: Make parameter rvalue-reference.
2768 * compile/compile-internal.h (compile_instance)
2769 <get_cached_type>: Likewise
2770 * compile/compile-loc2c.c (push): Likewise
2771 (pushf): Likewise
2772 (unary): Likewise
2773 (binary): Likewise
2774 (print_label): Likewise
2775 (pushf_register_address): Likewise
2776 (pushf_register): Likewise
2777 (do_compile_dwarf_expr_to_c): Likewise
2778 (compile_dwarf_expr_to_c): Likewise
2779 (compile_dwarf_bounds_to_c): Likewise
2780 * compile/compile.c (compile_instance::get_cached_type):
2781 Likewise
2782 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2783 (compile_dwarf_bounds_to_c): Likewise
2784 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2785 (dwarf2_compile_property_to_c): Likewise
2786 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2787 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2788 Likewise
2789
2790 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2791
2792 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2793 * tui/tui-data.c (init_content_element): Don't initialize it.
2794
2795 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2796
2797 * tui/tui-data.h (struct tui_win_info)
2798 <detail::opaque>: Remove.
2799 * tui/tui-data.c (init_win_info): Remove assignment.
2800
2801 2018-09-05 Tom Tromey <tom@tromey.com>
2802
2803 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2804 -Wformat-nonliteral.
2805 * target-float.c (host_float_ops<T>::to_string)
2806 (host_float_ops<T>::from_string): Use
2807 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2808 * configure: Rebuild.
2809
2810 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
2811
2812 * printcmd.c (printf_c_string): Use
2813 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2814 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2815
2816 2018-09-05 Tom Tromey <tom@tromey.com>
2817
2818 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2819
2820 2018-09-05 Tom de Vries <tdevries@suse.de>
2821
2822 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2823 with resolve_abstract_p == true.
2824 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2825 defaulting to false. Propagate resolve_abstract_p to
2826 dwarf2_fetch_die_loc_sect_off.
2827 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2828 parameter, defaulting to false.
2829 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2830 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2831 parameter.
2832 * dwarf2read.h (struct die_info): Forward-declare.
2833 (die_info_ptr): New typedef.
2834 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2835
2836 2018-09-05 Joel Brobecker <brobecker@adacore.com>
2837
2838 GDB 8.2 released.
2839
2840 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
2841 Pedro Alves <palves@redhat.com>
2842
2843 * gnulib/Makefile.in (aclocal_m4_deps): Move to
2844 "aclocal-m4-deps.mk". Include file here.
2845 $(srcdir)/aclocal.m4: Add "configure.ac".
2846 * gnulib/aclocal-m4-deps.mk: New file.
2847 * gnulib/update-gnulib.sh: Automatically update
2848 "aclocal-m4-deps.mk".
2849
2850 2018-09-04 Tom Tromey <tom@tromey.com>
2851
2852 * configure: Rebuild.
2853 * configure.ac: Remove multi-ice code.
2854
2855 2018-09-04 Tom Tromey <tom@tromey.com>
2856
2857 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2858 (ada-exp.o): Update.
2859
2860 2018-09-04 Tom Tromey <tom@tromey.com>
2861
2862 * Makefile.in (printcmd.o, target-float.o): Remove.
2863 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2864
2865 2018-09-04 Tom Tromey <tom@tromey.com>
2866
2867 * gnulib/Makefile.in: Remove obsolete comment.
2868 * Makefile.in: Remove obsolete comment.
2869
2870 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
2871
2872 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2873 line with '+'.
2874
2875 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2876
2877 * riscv-tdep.c: Add 'prologue-value.h' include.
2878 (struct riscv_unwind_cache): New struct.
2879 (riscv_debug_unwinder): New global.
2880 (riscv_scan_prologue): Update arguments, capture register details
2881 from prologue scan.
2882 (riscv_skip_prologue): Reformat arguments line, move end of
2883 prologue calculation into riscv_scan_prologue.
2884 (riscv_frame_cache): Update return type, create
2885 riscv_unwind_cache, scan the prologue, and fill in remaining cache
2886 details.
2887 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2888 (riscv_frame_prev_register): Use the trad_frame within the
2889 riscv_unwind_cache.
2890 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2891 flag.
2892
2893 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2894
2895 * trad-frame.h (trad_frame_set_realreg): Declare.
2896 (trad_frame_set_addr): Declare.
2897 * trad-frame.c (trad_frame_set_realreg): Define new function.
2898 (trad_frame_set_addr): Define new function.
2899 (trad_frame_set_reg_realreg): Use new function.
2900 (trad_frame_set_reg_addr): Use new function.
2901
2902 2018-09-01 Keith Seitz <keiths@redhat.com>
2903
2904 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2905 pulongest instead of "%lld".
2906 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2907 ATTRIBUTE_UNUSED.
2908
2909 2018-08-31 Tom Tromey <tom@tromey.com>
2910
2911 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2912 variant part type.
2913
2914 2018-08-31 Pedro Alves <palves@redhat.com>
2915
2916 * gdbarch.h: Regenerate.
2917
2918 2018-08-31 Pedro Alves <palves@redhat.com>
2919
2920 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2921 * target.h (Hardware watchpoint interfaces): Describe
2922 continuable/steppable/non-steppable watchpoints.
2923 * gdbarch.h, gdbarch.c: Regenerate.
2924
2925 2018-08-31 Pedro Alves <palves@redhat.com>
2926
2927 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2928 Delete.
2929 * s390-linux-nat.c
2930 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2931 * target.h (target_ops::have_continuable_watchpoint): Delete.
2932 (target_have_continuable_watchpoint): Delete.
2933 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2934 * target-delegates.c: Regenerate.
2935
2936 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2937
2938 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2939 the files present in "gnulib/import/m4/".
2940
2941 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2942
2943 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2944 c.sw, c.swsp, and c.sdsp.
2945
2946 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2947
2948 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2949 (riscv_read_misa_reg): Don't cache value read into inferior data.
2950 (riscv_new_inferior_data): Delete.
2951 (riscv_inferior_data_cleanup): Delete.
2952 (riscv_inferior_data): Delete.
2953 (riscv_invalidate_inferior_data): Delete.
2954 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2955
2956 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2957
2958 * compile/compile-cplus-types.c
2959 (compile_cplus_instance::leave_scope): Take the address of scope
2960 object.
2961 (compile_cplus_instance::convert_qualified_base): Compare quals
2962 to 0.
2963
2964 2018-08-30 Keith Seitz <keiths@redhat.com>
2965
2966 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2967 Use "%s" and host_address_to_string instead of "%p" in printf.
2968
2969 2018-08-29 Keith Seitz <keiths@redhat.com>
2970
2971 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2972 and compile-cplus-types.c.
2973 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2974 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2975 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2976 Declare.
2977 * compile/compile-c-support.c: Include compile-cplus.h.
2978 (load_libcompile): Templatize.
2979 (get_compile_context): "New" function.
2980 (c_get_compile_context): Use get_compile_context.
2981 (cplus_get_compile_context): New function.
2982 (cplus_push_user_expression, cplus_pop_user_expression)
2983 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2984 (cplus_compute_program): Define new structs/functions.
2985 * compile/compile-cplus-symmbols.c: New file.
2986 * compile/compile-cplus-types.c: New file.
2987 * compile/compile-cplus.h: New file.
2988 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2989 Declare.
2990 * compile/compile-object-load.c (get_out_value_type): Use
2991 strncmp_iw when comparing symbol names.
2992 (compile_object_load): Add mst_bss and mst_data.
2993 * compile/compile.c (_initialize_compile): Remove
2994 -Wno-implicit-function-declaration from `compile_args'.
2995 * compile/gcc-cp-plugin.h: New file.
2996 * NEWS: Mention C++ compile support and new debug options.
2997
2998 2018-08-29 Keith Seitz <keiths@redhat.com>
2999
3000 * linespec.c (collect_info::add_symbol): Make virtual.
3001 (struct symbol_searcher_collect_info): New struct.
3002 (symbol_searcher::find_all_symbols): New method.
3003 * symtab.h (class symbol_searcher): New class.
3004
3005 2018-08-29 Keith Seitz <keiths@redhat.com>
3006
3007 * linespec.c (struct linespec) <function_symbols, label_symbols>:
3008 Change to vector of block_symbol. Update all users.
3009 (struct collect_info) <symbols>: Likewise.
3010 (collect_info::add_symbol): Take block_symbol as argument.
3011 Update all callers.
3012 (decode_compound_collector) <m_symbols>: Change type to vector
3013 of block_symbol. Update all users.
3014 (decode_compound_collector::operator ()): Change parameter type
3015 to block_symbol.
3016 (find_method, find_function_symbols, find_linespec_symbols)
3017 (find_label_symbols_in_block, find_label_symbols): Change symbol
3018 vectors to block_symbol vectors.
3019 * symtab.h (symbol_found_callback_ftype): Change parameter type to
3020 block_symbol.
3021
3022 2018-08-29 Keith Seitz <keiths@redhat.com>
3023
3024 * linespec.c (symbolp): Remove typedef and VEC definitions.
3025 (bound_minimal_symbol_d): Likewise.
3026
3027 2018-08-29 Keith Seitz <keiths@redhat.com>
3028
3029 * linespec.c (decode_compound_collector::decode_compound_collector):
3030 Remove initialization for `m_symtabs'.
3031 (decode_compound_collector::release_symbols): Change return type
3032 to std::vector. Update all callers.
3033 (class decode_compound_collector) <m_symbols>: Change type to
3034 std::vector.
3035 (lookup_prefix_sym): Change return type to std::vector. Update all
3036 callers.
3037 (compare_symbols): Remove.
3038 (std_compare_symbols): Rename to `compare_symbols'.
3039 (find_method): Change `sym_classes' parameter to std::vector.
3040 Update all callers. Use std::sort to sort sym_classes.
3041 (find_linespec_symbols): Remove cleanup.
3042
3043 2018-08-29 Keith Seitz <keiths@redhat.com>
3044
3045 * linespec.c (struct linespec) <minimal_symbols>: Change type to
3046 std::vector. Update all users.
3047 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3048 (struct collect_info) <minimal_symbols>: Likewise.
3049 (compare_msymbols): Return bool. Change parameters to const
3050 bound_minimal_symbol references.
3051 (find_method, find_function_symbols, find_linespec_symbols): Change
3052 `minsyms' parameter to std::vector. Update all callers.
3053
3054 2018-08-29 Keith Seitz <keiths@redhat.com>
3055
3056 * linespec.c (struct linespec) <label_symbols>: Change type to
3057 std::vector. Update all users.
3058 (find_label_symbols_in_block): Change `result' parameter to
3059 std::vector. Update all callers.
3060 (find_label_symbols): Return std::vector. Update all callers.
3061
3062 2018-08-29 Keith Seitz <keiths@redhat.com>
3063
3064 * linespec.c (struct linespec) <function_symbols>: Change type to
3065 std::vector. Update all users.
3066 (struct collect_info) <function_symbols>: Likewise.
3067 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3068 (std_compare_symbols): New function.
3069 (find_method, find_function_symbols, find_linespec_symbols)
3070 (find_label_symbols_in_block): Change `symbols' parameter to
3071 std::vector. Update all callers.
3072 (find_label_symbols): Likewise for `function_symbols' and
3073 `label_funcs_ret'.
3074
3075 2018-08-29 Keith Seitz <keiths@redhat.com>
3076
3077 * linespec.c (symtab_vector_up): Define.
3078 (struct linespec) <file_symtabs>: Change type to std::vector *.
3079 Update all uses.
3080 (struct collect_info) <file_symtabs>: Likewise.
3081 (collect_symtabs_from_filename): Return symtab_vector_up.
3082 Update all callers.
3083 (decode_objc): Remove cleanup.
3084 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3085 (symtab_collector::release_symtabs): Return symtab_vector_up.
3086 Update all callers.
3087 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3088 Update all users.
3089 (collect_symtabs_from_filename, symtabs_from_filename): Return
3090 symtab_vector_up. Update all callers.
3091
3092 2018-08-29 Tom Tromey <tom@tromey.com>
3093
3094 * csky-tdep.c (csky_analyze_prologue): Use
3095 core_addr_to_string_nz.
3096
3097 2018-08-29 Tom Tromey <tom@tromey.com>
3098
3099 * windows-nat.c (struct xlate_exception) <them>: Change type to
3100 DWORD.
3101 (xlate): Fix formatting. Remove last entry.
3102 (struct xlate_exception, xlate): Comment out.
3103 (windows_nat_target::resume): Use ranged for.
3104
3105 2018-08-29 Jim Wilson <jimw@sifive.com>
3106
3107 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3108 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3109 of NT_PRFPREG.
3110 (riscv_linux_nat_target::store_registers): Likewise.
3111
3112 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3113
3114 PR gdb/23555
3115 PR gdb/23558
3116 * gnulib/aclocal.m4: Regenerate.
3117 * gnulib/config.in: Regenerate.
3118 * gnulib/configure: Regenerate.
3119 * gnulib/import/Makefile.am: Update.
3120 * gnulib/import/Makefile.in: Update.
3121 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3122 * gnulib/import/_Noreturn.h: ... this.
3123 * gnulib/import/alloca.in.h: Update.
3124 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3125 * gnulib/import/arg-nonnull.h: ... this.
3126 * gnulib/import/assure.h: Update.
3127 * gnulib/import/at-func.c: Update.
3128 * gnulib/import/basename-lgpl.c: Update.
3129 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3130 * gnulib/import/c++defs.h: ... this.
3131 * gnulib/import/canonicalize-lgpl.c: Update.
3132 * gnulib/import/cdefs.h: Update.
3133 * gnulib/import/chdir-long.c: Update.
3134 * gnulib/import/chdir-long.h: Update.
3135 * gnulib/import/cloexec.c: Update.
3136 * gnulib/import/cloexec.h: Update.
3137 * gnulib/import/close.c: Update.
3138 * gnulib/import/closedir.c: Update.
3139 * gnulib/import/config.charset: Update.
3140 * gnulib/import/dirent-private.h: Update.
3141 * gnulib/import/dirent.in.h: Update.
3142 * gnulib/import/dirfd.c: Update.
3143 * gnulib/import/dirname-lgpl.c: Update.
3144 * gnulib/import/dirname.h: Update.
3145 * gnulib/import/dosname.h: Update.
3146 * gnulib/import/dup-safer-flag.c: Update.
3147 * gnulib/import/dup-safer.c: Update.
3148 * gnulib/import/dup.c: Update.
3149 * gnulib/import/dup2.c: Update.
3150 * gnulib/import/errno.in.h: Update.
3151 * gnulib/import/error.c: Update.
3152 * gnulib/import/error.h: Update.
3153 * gnulib/import/exitfail.c: Update.
3154 * gnulib/import/exitfail.h: Update.
3155 * gnulib/import/extra/update-copyright: Update.
3156 * gnulib/import/fchdir.c: Update.
3157 * gnulib/import/fcntl.c: Update.
3158 * gnulib/import/fcntl.in.h: Update.
3159 * gnulib/import/fd-hook.c: Update.
3160 * gnulib/import/fd-hook.h: Update.
3161 * gnulib/import/fd-safer-flag.c: Update.
3162 * gnulib/import/fd-safer.c: Update.
3163 * gnulib/import/fdopendir.c: Update.
3164 * gnulib/import/filename.h: Update.
3165 * gnulib/import/filenamecat-lgpl.c: Update.
3166 * gnulib/import/filenamecat.h: Update.
3167 * gnulib/import/flexmember.h: Update.
3168 * gnulib/import/float+.h: Update.
3169 * gnulib/import/float.c: Update.
3170 * gnulib/import/float.in.h: Update.
3171 * gnulib/import/fnmatch.c: Update.
3172 * gnulib/import/fnmatch.in.h: Update.
3173 * gnulib/import/fnmatch_loop.c: Update.
3174 * gnulib/import/fpucw.h: Update.
3175 * gnulib/import/frexp.c: Update.
3176 * gnulib/import/frexpl.c: Update.
3177 * gnulib/import/fstat.c: Update.
3178 * gnulib/import/fstatat.c: Update.
3179 * gnulib/import/getcwd-lgpl.c: Update.
3180 * gnulib/import/getcwd.c: Update.
3181 * gnulib/import/getdtablesize.c: Update.
3182 * gnulib/import/getlogin_r.c: Update.
3183 * gnulib/import/getprogname.c: Update.
3184 * gnulib/import/getprogname.h: Update.
3185 * gnulib/import/gettext.h: Update.
3186 * gnulib/import/gettimeofday.c: Update.
3187 * gnulib/import/glob-libc.h: Update.
3188 * gnulib/import/glob.c: Update.
3189 * gnulib/import/glob.in.h: Update.
3190 * gnulib/import/glob_internal.h: Update.
3191 * gnulib/import/glob_pattern_p.c: Update.
3192 * gnulib/import/globfree.c: Update.
3193 * gnulib/import/hard-locale.c: Update.
3194 * gnulib/import/hard-locale.h: Update.
3195 * gnulib/import/intprops.h: Update.
3196 * gnulib/import/inttypes.in.h: Update.
3197 * gnulib/import/isnan.c: Update.
3198 * gnulib/import/isnand-nolibm.h: Update.
3199 * gnulib/import/isnand.c: Update.
3200 * gnulib/import/isnanl-nolibm.h: Update.
3201 * gnulib/import/isnanl.c: Update.
3202 * gnulib/import/itold.c: Update.
3203 * gnulib/import/libc-config.h: Update.
3204 * gnulib/import/limits.in.h: Update.
3205 * gnulib/import/localcharset.c: Update.
3206 * gnulib/import/localcharset.h: Update.
3207 * gnulib/import/localtime-buffer.c: Update.
3208 * gnulib/import/localtime-buffer.h: Update.
3209 * gnulib/import/lstat.c: Update.
3210 * gnulib/import/m4/00gnulib.m4: Update.
3211 * gnulib/import/m4/__inline.m4: Update.
3212 * gnulib/import/m4/absolute-header.m4: Update.
3213 * gnulib/import/m4/alloca.m4: Update.
3214 * gnulib/import/m4/builtin-expect.m4: Update.
3215 * gnulib/import/m4/canonicalize.m4: Update.
3216 * gnulib/import/m4/chdir-long.m4: Update.
3217 * gnulib/import/m4/close.m4: Update.
3218 * gnulib/import/m4/closedir.m4: Update.
3219 * gnulib/import/m4/configmake.m4: Update.
3220 * gnulib/import/m4/d-ino.m4: Update.
3221 * gnulib/import/m4/d-type.m4: Update.
3222 * gnulib/import/m4/dirent_h.m4: Update.
3223 * gnulib/import/m4/dirfd.m4: Update.
3224 * gnulib/import/m4/dirname.m4: Update.
3225 * gnulib/import/m4/double-slash-root.m4: Update.
3226 * gnulib/import/m4/dup.m4: Update.
3227 * gnulib/import/m4/dup2.m4: Update.
3228 * gnulib/import/m4/eealloc.m4: Update.
3229 * gnulib/import/m4/environ.m4: Update.
3230 * gnulib/import/m4/errno_h.m4: Update.
3231 * gnulib/import/m4/error.m4: Update.
3232 * gnulib/import/m4/exponentd.m4: Update.
3233 * gnulib/import/m4/exponentl.m4: Update.
3234 * gnulib/import/m4/extensions.m4: Update.
3235 * gnulib/import/m4/extern-inline.m4: Update.
3236 * gnulib/import/m4/fchdir.m4: Update.
3237 * gnulib/import/m4/fcntl-o.m4: Update.
3238 * gnulib/import/m4/fcntl.m4: Update.
3239 * gnulib/import/m4/fcntl_h.m4: Update.
3240 * gnulib/import/m4/fdopendir.m4: Update.
3241 * gnulib/import/m4/filenamecat.m4: Update.
3242 * gnulib/import/m4/flexmember.m4: Update.
3243 * gnulib/import/m4/float_h.m4: Update.
3244 * gnulib/import/m4/fnmatch.m4: Update.
3245 * gnulib/import/m4/fnmatch_h.m4: Update.
3246 * gnulib/import/m4/fpieee.m4: Update.
3247 * gnulib/import/m4/frexp.m4: Update.
3248 * gnulib/import/m4/frexpl.m4: Update.
3249 * gnulib/import/m4/fstat.m4: Update.
3250 * gnulib/import/m4/fstatat.m4: Update.
3251 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3252 * gnulib/import/m4/getcwd-path-max.m4: Update.
3253 * gnulib/import/m4/getcwd.m4: Update.
3254 * gnulib/import/m4/getdtablesize.m4: Update.
3255 * gnulib/import/m4/getlogin.m4: Update.
3256 * gnulib/import/m4/getlogin_r.m4: Update.
3257 * gnulib/import/m4/getpagesize.m4: Update.
3258 * gnulib/import/m4/getprogname.m4: Update.
3259 * gnulib/import/m4/gettimeofday.m4: Update.
3260 * gnulib/import/m4/glibc21.m4: Update.
3261 * gnulib/import/m4/glob.m4: Update.
3262 * gnulib/import/m4/glob_h.m4: Update.
3263 * gnulib/import/m4/gnulib-cache.m4: Update.
3264 * gnulib/import/m4/gnulib-common.m4: Update.
3265 * gnulib/import/m4/gnulib-comp.m4: Update.
3266 * gnulib/import/m4/gnulib-tool.m4: Update.
3267 * gnulib/import/m4/hard-locale.m4: Update.
3268 * gnulib/import/m4/include_next.m4: Update.
3269 * gnulib/import/m4/inttypes-pri.m4: Update.
3270 * gnulib/import/m4/inttypes.m4: Update.
3271 * gnulib/import/m4/isnand.m4: Update.
3272 * gnulib/import/m4/isnanl.m4: Update.
3273 * gnulib/import/m4/largefile.m4: Update.
3274 * gnulib/import/m4/limits-h.m4: Update.
3275 * gnulib/import/m4/localcharset.m4: Update.
3276 * gnulib/import/m4/locale-fr.m4: Update.
3277 * gnulib/import/m4/locale-ja.m4: Update.
3278 * gnulib/import/m4/locale-zh.m4: Update.
3279 * gnulib/import/m4/localtime-buffer.m4: Update.
3280 * gnulib/import/m4/longlong.m4: Update.
3281 * gnulib/import/m4/lstat.m4: Update.
3282 * gnulib/import/m4/malloc.m4: Update.
3283 * gnulib/import/m4/malloca.m4: Update.
3284 * gnulib/import/m4/math_h.m4: Update.
3285 * gnulib/import/m4/mbrtowc.m4: Update.
3286 * gnulib/import/m4/mbsinit.m4: Update.
3287 * gnulib/import/m4/mbsrtowcs.m4: Update.
3288 * gnulib/import/m4/mbstate_t.m4: Update.
3289 * gnulib/import/m4/memchr.m4: Update.
3290 * gnulib/import/m4/memmem.m4: Update.
3291 * gnulib/import/m4/mempcpy.m4: Update.
3292 * gnulib/import/m4/memrchr.m4: Update.
3293 * gnulib/import/m4/mkdir.m4: Update.
3294 * gnulib/import/m4/mkstemp.m4: Update.
3295 * gnulib/import/m4/mmap-anon.m4: Update.
3296 * gnulib/import/m4/mode_t.m4: Update.
3297 * gnulib/import/m4/msvc-inval.m4: Update.
3298 * gnulib/import/m4/msvc-nothrow.m4: Update.
3299 * gnulib/import/m4/multiarch.m4: Update.
3300 * gnulib/import/m4/nocrash.m4: Update.
3301 * gnulib/import/m4/off_t.m4: Update.
3302 * gnulib/import/m4/onceonly.m4: Update.
3303 * gnulib/import/m4/open-cloexec.m4: Update.
3304 * gnulib/import/m4/open.m4: Update.
3305 * gnulib/import/m4/openat.m4: Update.
3306 * gnulib/import/m4/opendir.m4: Update.
3307 * gnulib/import/m4/pathmax.m4: Update.
3308 * gnulib/import/m4/rawmemchr.m4: Update.
3309 * gnulib/import/m4/readdir.m4: Update.
3310 * gnulib/import/m4/readlink.m4: Update.
3311 * gnulib/import/m4/realloc.m4: Update.
3312 * gnulib/import/m4/rename.m4: Update.
3313 * gnulib/import/m4/rewinddir.m4: Update.
3314 * gnulib/import/m4/rmdir.m4: Update.
3315 * gnulib/import/m4/save-cwd.m4: Update.
3316 * gnulib/import/m4/secure_getenv.m4: Update.
3317 * gnulib/import/m4/setenv.m4: Update.
3318 * gnulib/import/m4/signal_h.m4: Update.
3319 * gnulib/import/m4/ssize_t.m4: Update.
3320 * gnulib/import/m4/stat-time.m4: Update.
3321 * gnulib/import/m4/stat.m4: Update.
3322 * gnulib/import/m4/std-gnu11.m4: Update.
3323 * gnulib/import/m4/stdbool.m4: Update.
3324 * gnulib/import/m4/stddef_h.m4: Update.
3325 * gnulib/import/m4/stdint.m4: Update.
3326 * gnulib/import/m4/stdio_h.m4: Update.
3327 * gnulib/import/m4/stdlib_h.m4: Update.
3328 * gnulib/import/m4/strchrnul.m4: Update.
3329 * gnulib/import/m4/strdup.m4: Update.
3330 * gnulib/import/m4/strerror.m4: Update.
3331 * gnulib/import/m4/string_h.m4: Update.
3332 * gnulib/import/m4/strstr.m4: Update.
3333 * gnulib/import/m4/strtok_r.m4: Update.
3334 * gnulib/import/m4/sys_socket_h.m4: Update.
3335 * gnulib/import/m4/sys_stat_h.m4: Update.
3336 * gnulib/import/m4/sys_time_h.m4: Update.
3337 * gnulib/import/m4/sys_types_h.m4: Update.
3338 * gnulib/import/m4/tempname.m4: Update.
3339 * gnulib/import/m4/time_h.m4: Update.
3340 * gnulib/import/m4/unistd-safer.m4: Update.
3341 * gnulib/import/m4/unistd_h.m4: Update.
3342 * gnulib/import/m4/warn-on-use.m4: Update.
3343 * gnulib/import/m4/wchar_h.m4: Update.
3344 * gnulib/import/m4/wchar_t.m4: Update.
3345 * gnulib/import/m4/wctype_h.m4: Update.
3346 * gnulib/import/m4/wint_t.m4: Update.
3347 * gnulib/import/malloc.c: Update.
3348 * gnulib/import/malloc/scratch_buffer.h: Update.
3349 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3350 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3351 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3352 * gnulib/import/malloca.c: Update.
3353 * gnulib/import/malloca.h: Update.
3354 * gnulib/import/malloca.valgrind: Update.
3355 * gnulib/import/math.in.h: Update.
3356 * gnulib/import/mbrtowc.c: Update.
3357 * gnulib/import/mbsinit.c: Update.
3358 * gnulib/import/mbsrtowcs-impl.h: Update.
3359 * gnulib/import/mbsrtowcs-state.c: Update.
3360 * gnulib/import/mbsrtowcs.c: Update.
3361 * gnulib/import/memchr.c: Update.
3362 * gnulib/import/memmem.c: Update.
3363 * gnulib/import/mempcpy.c: Update.
3364 * gnulib/import/memrchr.c: Update.
3365 * gnulib/import/mkdir.c: Update.
3366 * gnulib/import/mkstemp.c: Update.
3367 * gnulib/import/msvc-inval.c: Update.
3368 * gnulib/import/msvc-inval.h: Update.
3369 * gnulib/import/msvc-nothrow.c: Update.
3370 * gnulib/import/msvc-nothrow.h: Update.
3371 * gnulib/import/open.c: Update.
3372 * gnulib/import/openat-die.c: Update.
3373 * gnulib/import/openat-priv.h: Update.
3374 * gnulib/import/openat-proc.c: Update.
3375 * gnulib/import/openat.c: Update.
3376 * gnulib/import/openat.h: Update.
3377 * gnulib/import/opendir.c: Update.
3378 * gnulib/import/pathmax.h: Update.
3379 * gnulib/import/pipe-safer.c: Update.
3380 * gnulib/import/rawmemchr.c: Update.
3381 * gnulib/import/readdir.c: Update.
3382 * gnulib/import/readlink.c: Update.
3383 * gnulib/import/realloc.c: Update.
3384 * gnulib/import/ref-add.sin: Update.
3385 * gnulib/import/ref-del.sin: Update.
3386 * gnulib/import/rename.c: Update.
3387 * gnulib/import/rewinddir.c: Update.
3388 * gnulib/import/rmdir.c: Update.
3389 * gnulib/import/same-inode.h: Update.
3390 * gnulib/import/save-cwd.c: Update.
3391 * gnulib/import/save-cwd.h: Update.
3392 * gnulib/import/scratch_buffer.h: Update.
3393 * gnulib/import/secure_getenv.c: Update.
3394 * gnulib/import/setenv.c: Update.
3395 * gnulib/import/signal.in.h: Update.
3396 * gnulib/import/stat-time.c: Update.
3397 * gnulib/import/stat-time.h: Update.
3398 * gnulib/import/stat-w32.c: Update.
3399 * gnulib/import/stat-w32.h: Update.
3400 * gnulib/import/stat.c: Update.
3401 * gnulib/import/stdbool.in.h: Update.
3402 * gnulib/import/stddef.in.h: Update.
3403 * gnulib/import/stdint.in.h: Update.
3404 * gnulib/import/stdio.in.h: Update.
3405 * gnulib/import/stdlib.in.h: Update.
3406 * gnulib/import/str-two-way.h: Update.
3407 * gnulib/import/strchrnul.c: Update.
3408 * gnulib/import/strdup.c: Update.
3409 * gnulib/import/streq.h: Update.
3410 * gnulib/import/strerror-override.c: Update.
3411 * gnulib/import/strerror-override.h: Update.
3412 * gnulib/import/strerror.c: Update.
3413 * gnulib/import/string.in.h: Update.
3414 * gnulib/import/stripslash.c: Update.
3415 * gnulib/import/strnlen1.c: Update.
3416 * gnulib/import/strnlen1.h: Update.
3417 * gnulib/import/strstr.c: Update.
3418 * gnulib/import/strtok_r.c: Update.
3419 * gnulib/import/sys_stat.in.h: Update.
3420 * gnulib/import/sys_time.in.h: Update.
3421 * gnulib/import/sys_types.in.h: Update.
3422 * gnulib/import/tempname.c: Update.
3423 * gnulib/import/tempname.h: Update.
3424 * gnulib/import/time.in.h: Update.
3425 * gnulib/import/unistd--.h: Update.
3426 * gnulib/import/unistd-safer.h: Update.
3427 * gnulib/import/unistd.in.h: Update.
3428 * gnulib/import/unsetenv.c: Update.
3429 * gnulib/import/verify.h: Update.
3430 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3431 * gnulib/import/wchar.in.h: Update.
3432 * gnulib/import/wctype.in.h: Update.
3433 * gnulib/import/xalloc-oversized.h: Update.
3434 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3435 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3436
3437 2018-08-16 Gary Benson <gbenson@redhat.com>
3438
3439 PR gdb/13000:
3440 * gdb/main.c (captured_main_1): Exit with nonzero status
3441 in batch mode if the last command to be executed failed.
3442 * NEWS: Mention the above.
3443
3444 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
3445
3446 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3447 end of warning message.
3448
3449 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3450
3451 PR gdb/22943:
3452 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3453 (aarch64_extract_return_value): Use
3454 aapcs_is_vfp_call_or_return_candidate.
3455 (aarch64_return_in_memory): Likewise.
3456 (aarch64_store_return_value): Likewise.
3457
3458 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3459
3460 * aarch64-tdep.c
3461 (aapcs_is_vfp_call_or_return_candidate): Make static
3462 (pass_in_v_or_stack): Remove function.
3463 (pass_in_v_vfp_candidate): New function.
3464 (aarch64_push_dummy_call): Check for float register candidates.
3465
3466 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3467
3468 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3469 (aapcs_is_vfp_call_or_return_candidate_1): New function.
3470 (aapcs_is_vfp_call_or_return_candidate): Likewise.
3471
3472 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
3473
3474 PR build/23399
3475 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3476 (struct ipa_sym_addresses): Rename to...
3477 (struct ipa_sym_addresses_common): ... this.
3478 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3479
3480 2018-08-28 Tom Tromey <tom@tromey.com>
3481
3482 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3483 (token_fifo): Now a std::vector.
3484 (yylex, c_parse): Update.
3485 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3486 (token_fifo): Now a std::vector.
3487 (yylex, d_parse): Update.
3488 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3489 (token_fifo): Now a std::vector.
3490 (yylex, go_parse): Update.
3491
3492 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
3493
3494 * parser-defs.h (struct type_stack) <elements>: Change type to
3495 std::vector<union type_stack_elt>.
3496 <depth, size>: Remove.
3497 * parse.c (parse_exp_in_context_1): Adjust.
3498 (type_stack_reserve): Remove.
3499 (check_type_stack_depth): Remove.
3500 (insert_into_type_stack): Adjust to std::vector.
3501 (insert_type): Likewise.
3502 (push_type): Likewise.
3503 (push_type_int): Likewise.
3504 (insert_type_address_space): Likewise.
3505 (pop_type): Likewise.
3506 (pop_type_int): Likewise.
3507 (pop_typelist): Likewise.
3508 (pop_type_stack): Likewise.
3509 (append_type_stack): Likewise.
3510 (push_type_stack): Likewise.
3511 (get_type_stack): Likewise.
3512 (type_stack_cleanup): Likewise.
3513 (push_typelist): Likewise.
3514 (follow_types): Likewise.
3515 (_initialize_parse): Likewise.
3516
3517 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
3518
3519 * NEWS: Mention csky target.
3520
3521 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
3522 Hafiz Abid Qadeer <abidh@codesourcery.com>
3523 Don Breazeal <donb@codesourcery.com>
3524
3525 * csky-linux-tdep.c: New file.
3526 * csky-tdep.c: Likewise.
3527 * csky-tdep.h: Likewise.
3528 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3529 csky-tdep.o.
3530 (HFILES_NO_SRCDIR): Add csky-tdep.h.
3531 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3532 * configure.tgt: Add csky support.
3533
3534 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
3535
3536 * python/py-framefilter.c (py_print_frame): Print frame architecture
3537 when printing on an MI output.
3538
3539 2018-08-27 Tom Tromey <tom@tromey.com>
3540
3541 PR build/23087:
3542 * configure: Rebuild.
3543 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3544
3545 2018-08-27 Tom Tromey <tom@tromey.com>
3546
3547 * aarch64-linux-tdep.c
3548 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3549 casts to int.
3550
3551 2018-08-27 Tom Tromey <tom@tromey.com>
3552
3553 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3554 unsigned.
3555 (ppc64_standard_linkage1, ppc64_standard_linkage2)
3556 (ppc64_standard_linkage3, ppc64_standard_linkage4)
3557 (ppc64_standard_linkage5, ppc64_standard_linkage6)
3558 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3559 unsigned.
3560
3561 2018-08-27 Tom Tromey <tom@tromey.com>
3562
3563 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3564 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3565
3566 2018-08-27 Tom Tromey <tom@tromey.com>
3567
3568 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3569 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3570 ULONGEST_MAX.
3571 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3572 ULONGEST_MAX.
3573 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3574 ULONGEST_MAX.
3575 * sparc-linux-tdep.c (sparc32_linux_sigframe)
3576 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3577 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3578 ULONGEST_MAX.
3579 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3580 (ppc64_linux_sigaction_tramp_frame)
3581 (ppc32_linux_sighandler_tramp_frame)
3582 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3583 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3584 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3585 * mn10300-linux-tdep.c (am33_linux_sigframe)
3586 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3587 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3588 * mips-linux-tdep.c (mips_linux_o32_sigframe)
3589 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3590 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3591 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3592 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3593 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3594 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3595 * microblaze-linux-tdep.c
3596 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3597 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3598 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3599 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3600 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3601 * common/common-types.h (ULONGEST_MAX): New define.
3602 (CORE_ADDR_MAX): Fix formatting.
3603 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3604 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3605 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3606 (arm_linux_rt_sigreturn_tramp_frame)
3607 (arm_eabi_linux_sigreturn_tramp_frame)
3608 (arm_eabi_linux_rt_sigreturn_tramp_frame)
3609 (thumb2_eabi_linux_sigreturn_tramp_frame)
3610 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3611 (arm_linux_restart_syscall_tramp_frame)
3612 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3613 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3614 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3615 ULONGEST_MAX.
3616 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3617
3618 2018-08-27 Tom Tromey <tom@tromey.com>
3619
3620 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3621 CORE_ADDR_MAX.
3622 * mips-tdep.c (mips_deal_with_atomic_sequence)
3623 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3624 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3625 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3626 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3627 CORE_ADDR_MAX.
3628 * aarch64-tdep.c (aarch64_software_single_step): Use
3629 CORE_ADDR_MAX.
3630
3631 2018-08-27 Tom Tromey <tom@tromey.com>
3632
3633 * linespec.c (complete_linespec_component): Add cast to "char".
3634 * completer.c (completion_tracker::build_completion_result): Add
3635 cast to "char".
3636
3637 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3638
3639 * solist.h (struct solist, struct target_so_ops): Fix
3640 indentation.
3641
3642 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3643
3644 * ada-tasks.c (ada_task_info_s): Remove typedef.
3645 (DEF_VEC_O(ada_task_info_s)): Remove.
3646 (struct ada_tasks_inferior_data): Initialize fields.
3647 <task_list>: Make an std::vector.
3648 (get_ada_tasks_inferior_data): Allocate with new.
3649 (ada_get_task_number): Adjust.
3650 (get_task_number_from_id): Likewise.
3651 (valid_task_id): Likewise.
3652 (ada_get_task_info_from_ptid): Likewise.
3653 (iterate_over_live_ada_tasks): Likewise.
3654 (add_ada_task): Likewise.
3655 (read_known_tasks): Likewise.
3656 (ada_build_task_list): Likewise.
3657 (print_ada_task_info): Likewise.
3658 (info_task): Likewise.
3659 (task_command_1): Likewise.
3660
3661 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3662
3663 * ada-lang.c (add_angle_brackets): Return std::string.
3664
3665 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
3666
3667 * python/py-threadevent.c (py_get_event_thread): Initialize
3668 pythread.
3669
3670 2018-08-24 Pedro Alves <palves@redhat.com>
3671
3672 * python/py-bpevent.c (create_breakpoint_event_object): Use
3673 copy-initialization.
3674 * python/py-continueevent.c (emit_continue_event): Use
3675 copy-initialization.
3676 * python/py-exitedevent.c (create_exited_event_object): Return a
3677 gdbpy_ref<>.
3678 (emit_exited_event): Use copy-initialization.
3679 * python/py-inferior.c (python_new_inferior)
3680 (python_inferior_deleted, add_thread_object): Use
3681 copy-initialization.
3682 * python/py-infevents.c (create_inferior_call_event_object)
3683 (create_register_changed_event_object)
3684 (create_memory_changed_event_object): Return a gdbpy_ref<>.
3685 (emit_inferior_call_event, emit_memory_changed_event)
3686 (emit_register_changed_event): Use copy-initialization.
3687 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3688 Return a gdbpy_ref<>.
3689 (emit_new_objfile_event): Use copy-initialization.
3690 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3691 (emit_clear_objfiles_event): Use copy-initialization.
3692 * python/py-signalevent.c (create_signal_event_object): Use
3693 copy-initialization.
3694 * python/py-threadevent.c (create_thread_event_object): Use
3695 copy-initialization.
3696
3697 2018-08-24 Pedro Alves <palves@redhat.com>
3698 Simon Marchi <simon.marchi@ericsson.com>
3699
3700 PR gdb/23379
3701 * python/py-continueevent.c: Include "gdbthread.h".
3702 (create_continue_event_object): Add intro comment. Add 'ptid'
3703 parameter. Use it to find thread to pass to
3704 create_thread_event_object.
3705 (emit_continue_event): Pass PTID down to
3706 create_continue_event_object.
3707 * python/py-event.h (py_get_event_thread): Declare.
3708 (create_thread_event_object): Remove default from 'thread'
3709 parameter.
3710 * python/py-stopevent.c (create_stop_event_object): Use
3711 py_get_event_thread.
3712 * python/py-threadevent.c (get_event_thread): Rename to ...
3713 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3714 and use it to find the thread.
3715 (create_thread_event_object): Assert that THREAD isn't null.
3716 Don't find the event thread here.
3717
3718 2018-08-23 Kevin Buettner <kevinb@redhat.com>
3719
3720 * block.h (blockrange, blockranges): New struct declarations.
3721 (struct block): Add new field named `ranges'.
3722 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3723 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3724 macros for accessing ranges in struct block.
3725 (make_blockranges): New declaration.
3726 block.c (make_blockranges): New function.
3727 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3728 for block.
3729 * symtab.h (find_pc_partial_function): Add new parameter `block'.
3730 * blockframe.c (cache_pc_function_block): New static global.
3731 (clear_pc_function_cache): Clear cache_pc_function_block.
3732 (find_pc_partial_function): Move comment to symtab.h. Add
3733 support for non-contiguous blocks.
3734 * cli/cli-cmds.c (block.h): Include.
3735 (print_disassembly): Handle printing of non-contiguous blocks.
3736 (disassemble_current_function): Likewise.
3737 (disassemble_command): Likewise.
3738
3739 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3740 BLOCK_START.
3741 * blockframe.c (get_pc_function_start): Likewise.
3742 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3743 (gcc_symbol_address): Likewise.
3744 * compile/compile-object-run.c (compile_object_run): Likewise.
3745 * compile/compile.c (get_expr_block_and_pc): Likewise.
3746 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3747 (func_addr_to_tail_call_list): Likewise.
3748 * findvar.c (default_read_var_value): Likewise.
3749 * inline-frame.c (inline_frame_this_id): Likewise.
3750 (skip-inline_frames): Likewise.
3751 * infcmd.c (until_next_command): Likewise.
3752 * linespec.c (convert_linespec_to_sals): Likewise.
3753 * parse.c (parse_exp_in_context_1): Likewise.
3754 * printcmd.c (build_address_symbolic): likewise.
3755 (info_address_command): Likewise.
3756 symtab.c (find_function_start_sal): Likewise.
3757 (skip_prologue_sal): Likewise.
3758 (find_function_alias_target): Likewise.
3759 (find_gnu_ifunc): Likewise.
3760 * stack.c (find_frame_funname): Likewise.
3761 * symtab.c (fixup_symbol_section): Likewise.
3762 (find_function_start_sal): Likewise.
3763 (skip_prologue_sal): Likewsie.
3764 (find_function_alias_target): Likewise.
3765 (find_gnu_ifunc): Likewise.
3766 * tracepoint.c (info_scope_command): Likewise.
3767 * value.c (value_fn_field): Likewise.
3768
3769 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3770 in place of find_pc_partial_function.
3771 * blockframe.c (find_function_entry_range_from_pc): New function.
3772 * symtab.h (find_function_entry_range_from_pc): Declare and document.
3773 * objfiles.c (objfile_relocate1): Relocate start and end addresses
3774 for each range in a block.
3775
3776
3777 2018-08-23 Xavier Roirand <roirand@adacore.com>
3778
3779 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3780 incrementation.
3781
3782 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3783
3784 * solib-svr4.c (read_program_headers_from_bfd): Return
3785 gdb::optional<gdb::byte_vector>.
3786 (svr4_exec_displacement): Adjust.
3787
3788 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3789
3790 * solib-svr4.c (read_program_header): Return
3791 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3792 (find_program_interpreter): Return
3793 gdb::optional<gdb::byte_vector>.
3794 (scan_dyntag_auxv): Adjust.
3795 (enable_break): Adjust.
3796 (svr4_exec_displacement): Adjust.
3797
3798 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3799
3800 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3801 * inf-child.c (inf_child_target::terminal_save_inferior): New.
3802
3803 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3804
3805 * guile/scm-string.c (gdbscm_scm_from_printf): Use
3806 string_vprintf.
3807 * guile/scm-utils.c (gdbscm_printf): Likewise.
3808 * serial.c (serial_printf): Likewise.
3809 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3810
3811 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
3812
3813 * stack.c (print_frame): Print frame architecture when printing on
3814 an MI output.
3815 * NEWS: Mention new "arch" attribute in frame output.
3816
3817 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3818
3819 * arch/aarch64.h (aarch64_regnum): Update comment.
3820
3821 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3822
3823 * NEWS: Add SVE to 8.2 section.
3824
3825 2018-08-21 Pedro Alves <palves@redhat.com>
3826
3827 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3828 out from gdbscm_parse_function_args.
3829 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3830 gdbscm_parse_function_args_1.
3831
3832 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
3833
3834 PR gdb/17816
3835 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3836 operator.
3837
3838 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
3839
3840 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3841
3842 2018-08-19 Michael Spang <spang@google.com>
3843
3844 PR gdb/11786
3845 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3846 for PT_TLS segments.
3847
3848 2018-08-18 Kevin Buettner <kevinb@redhat.com>
3849
3850 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3851 dwarf_variable_value.
3852 * dwarf2-frame.c (class dwarf_expr_executor):
3853 Add override for dwarf_variable_value.
3854 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3855 (class symbol_needs_eval_context): Likewise.
3856 (indirect_synthetic_pointer): Add forward declaration.
3857 (sect_variable_value): New function.
3858 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3859 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3860 for DW_OP_GNU_variable_value.
3861
3862 2018-08-16 Tom Tromey <tom@tromey.com>
3863
3864 * top.c (read_command_file): Update.
3865 (command_line_input): Remove "repeat" argument.
3866 * ada-lang.c (get_selections): Update.
3867 * linespec.c (decode_line_2): Update.
3868 * defs.h (command_line_input): Remove argument.
3869 * cli/cli-script.c (read_next_line): Update.
3870 * python/py-gdb-readline.c: Update.
3871
3872 2018-08-17 Tom Tromey <tom@tromey.com>
3873
3874 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3875 command_line_input.
3876
3877 2018-08-15 Tom Tromey <tom@tromey.com>
3878
3879 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3880
3881 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
3882
3883 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3884 If used, use find_pc_partial_function to find address range
3885 to disassemble.
3886 * mi/mi-main.c (mi_cmd_list_features): Report
3887 "data-disassemble-a-option" feature.
3888 * NEWS: Mention new -data-disassemble option -a.
3889
3890 2018-08-13 Tom Tromey <tom@tromey.com>
3891
3892 * common/common-defs.h (_FORTIFY_SOURCE): Define.
3893
3894 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3895
3896 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3897 (aarch64_linux_collect_sve_regset): Likewise.
3898 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3899 * regcache.h (regcache_map_entry_size): New function.
3900
3901 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3902
3903 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3904 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3905 (SVE_HEADER_VL_LENGTH): Likewise.
3906 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3907 (SVE_HEADER_FLAGS_LENGTH): Likewise.
3908 (SVE_HEADER_RESERVED_LENGTH): Likewise.
3909 (SVE_HEADER_SIZE_OFFSET): Likewise.
3910 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3911 (SVE_HEADER_VL_OFFSET): Likewise.
3912 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3913 (SVE_HEADER_FLAGS_OFFSET): Likewise.
3914 (SVE_HEADER_RESERVED_OFFSET): Likewise.
3915 (SVE_HEADER_SIZE): Likewise.
3916 (aarch64_linux_core_read_vq): Add function.
3917 (aarch64_linux_core_read_description): Check for SVE section.
3918
3919 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3920
3921 * aarch64-fbsd-tdep.c
3922 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3923 collect_size.
3924 * aarch64-linux-tdep.c
3925 (aarch64_linux_iterate_over_regset_sections): Likewise.
3926 * alpha-linux-tdep.c
3927 (alpha_linux_iterate_over_regset_sections):
3928 * alpha-nbsd-tdep.c
3929 (alphanbsd_iterate_over_regset_sections): Likewise.
3930 * amd64-fbsd-tdep.c
3931 (amd64fbsd_iterate_over_regset_sections): Likewise.
3932 * amd64-linux-tdep.c
3933 (amd64_linux_iterate_over_regset_sections): Likewise.
3934 * arm-bsd-tdep.c
3935 (armbsd_iterate_over_regset_sections): Likewise.
3936 * arm-fbsd-tdep.c
3937 (arm_fbsd_iterate_over_regset_sections): Likewise.
3938 * arm-linux-tdep.c
3939 (arm_linux_iterate_over_regset_sections): Likewise.
3940 * corelow.c (get_core_registers_cb): Likewise.
3941 (core_target::fetch_registers): Likewise.
3942 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3943 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3944 * gdbarch.h (void): Regenerate.
3945 * gdbarch.sh: Add supply_size and collect_size.
3946 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3947 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3948 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3949 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3950 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3951 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3952 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3953 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3954 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3955 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3956 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3957 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3958 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3959 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3960 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3961 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3962 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3963 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3964 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3965 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3966 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3967 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3968 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3969 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3970 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3971 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3972 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3973 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3974 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3975 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3976
3977 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3978
3979 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3980 with string_printf.
3981
3982 2018-08-10 Keith Seitz <keiths@redhat.com>
3983
3984 * compile/compile-c-support.c (add_code_header, add_code_footer):
3985 Move into policy class.
3986 (c_push_user_expression, pop_user_expression_nop)
3987 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3988 (compile_program): New host class.
3989 (c_compile_program): New typedef.
3990 (c_compute_porgram): Use c_compile_program.
3991
3992 2018-08-10 Keith Seitz <keiths@redhat.com>
3993
3994 * compile/compile-internal.h (compile_instance::~compile_instance):
3995 Remove calls to htab_delete.
3996 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3997 * compile.c (compile_instance::compile_instance): Initialize
3998 htab unique pointers.
3999 (compile_instance::get_cached_type, compile_instance::insert_type)
4000 (compile_instance::error_symbol_once): Update for unique_ptr.
4001
4002 2018-08-10 Keith Seitz <keiths@redhat.com>
4003
4004 * compile/compile-c-symbols.c (struct symbol_error)
4005 (hash_symbol_error, eq_symbol_error, del_symbol_error)
4006 (compile_instance::insert_symbol_error)
4007 (compile_instance::error_symbol_once): Move to ...
4008 * compile/compile.c: ... here.
4009
4010 2018-08-10 Keith Seitz <keiths@redhat.com>
4011
4012 * compile/compile-c-support.c (c_get_compile_context): Use `new'
4013 instead of `new_compile_instance'.
4014 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4015 Update description.
4016 If the symbol error map is not initialized, create it.
4017 (generate_c_for_for_one_symbol): Do not check/initialize
4018 the symbol error map.
4019 * compile/compile-c-types.c (compile_c_instance): Make a class.
4020 Update all callers.
4021 (compile_instance::compile_instance): Initialize the type cache.
4022 (get_cached_type): New function.
4023 (insert_type): Update description.
4024 (compile_c_instance::m_default_cflags): Define.
4025 (convert_type): Update description. Use get_cached_type.
4026 (delete_instance): Moved to destructor.
4027 (new_compile_instance): Moved to constructor.
4028 * compile/compile-c.h (compile_c_instance): Make class inheriting
4029 from compile_instance.
4030 <base>: Remove field.
4031 <type_map, symbol_err_map>: Move to base class.
4032 <c_plugin>: Rename to `m_plugin' and remove pointer type.
4033 * compile/compile-internal.h (compile_instance): Make class.
4034 <type_map_t, symbol_err_map_t>: Define.
4035 <fe>: Rename to `m_gcc_fe'.
4036 <scope, block, gcc_target_options>: Add `m_' prefix.
4037 <m_type_map, m_symbol_err_map>: New fields, moved from
4038 compile_c_instance.
4039 <destroy>: Remove.
4040 (convert_type, new_compile_instance): Remove.
4041 * compile/compile.c (cleanup_compile_instance): Remove.
4042 (compile_to_object): Use unique_ptr to eliminate cleanups.
4043 (compile_instance::set_print_callback, compile_instance::version)
4044 (compile_instance::set_verbose)
4045 (compile_instance::set_driver_filename)
4046 (compile_instance::set_triplet_regexp)
4047 (compile_instance::set_arguments)
4048 (compile_instance::set_source_file)
4049 (compile_instance::compile): Define.
4050
4051 2018-08-10 Keith Seitz <keiths@redhat.com>
4052
4053 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4054 * compile/compile-c-types.c: Define GCC_METHODN macros and include
4055 gcc-c-fe.def to define C plugin.
4056 (delete_instance): Delete `c_plugin'.
4057 (new_compile_instance): Initialize `c_plugin'.
4058 * compile/compile-c.h: Include gcc_c_plugin.h.
4059 (struct compile_c_instance) <c_plugin>: New member.
4060 * gcc-c-plugin.h: New file.
4061 Update all callers with API change.
4062
4063 2018-08-10 Keith Seitz <keiths@redhat.com>
4064
4065 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4066 (HFILES_NO_SRCDIR): ... to here.
4067 Add compile-internal.h and compile-c.h.
4068 * compile/compile-c-support.c: Include compile-c.h.
4069 * compile/compile-c-symbols.c: Include compile-c.h.
4070 (generate_c_for_variable_locations): Update comment.
4071 * compile/compile-c-types.c: Include compile-c.h.
4072 * compile/compile-c.h: New file -- moved C language declarations
4073 from other files here.
4074 * compile/compile-internal.h: Do not include hashtab.h or
4075 common/enum-flags.h.
4076 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4077 (gcc_convert_symbol, gcc_symbol_address)
4078 (generate_c_for_variable_locations, c_get_mode_for_size)
4079 (c_get_range_decl_name): Definitions moved to compile-c.h.
4080 * compile/compile-loc2c.c: Include compile-c.h.
4081
4082 2018-08-10 Keith Seitz <keiths@redhat.com>
4083
4084 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4085 (c_symbol_substitution_name): ... this.
4086 Update all callers.
4087
4088 2018-08-10 Keith Seitz <keiths@redhat.com>
4089
4090 * compile/compile-c-support.c (c_compute_program): Use
4091 unique_xmalloc_ptr to eliminate cleanup.
4092 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4093 Return a unique_xmalloc_ptr and eliminate cleanup.
4094 * compile/compile-internal.h (generate_c_for_variable_locations):
4095 Return unique_xmalloc_ptr and update description.
4096
4097 2018-08-10 Alan Hayward <alan.hayward@arm.com>
4098
4099 * corelow.c (core_target::get_core_register_section): Rename
4100 min_size to section_min_size.
4101
4102 2018-08-09 Jim Wilson <jimw@sifive.com>
4103
4104 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4105 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4106 * NEWS: Mention new GNU/Linux RISC-V target.
4107 * configure.host: Add riscv*-*-linux*.
4108 * configure.nat: Add riscv*.
4109 * configure.tgt: Add riscv*-*-linux*.
4110 * riscv-linux-nat.c: New file.
4111 * riscv-linux-tdep.c: New file.
4112
4113 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
4114
4115 * infrun.c (resume): Make static, add forward declaration.
4116 (proceed): Update header comment.
4117 * infrun.h (resume): Delete declaration.
4118
4119 2018-08-09 Tom Tromey <tom@tromey.com>
4120
4121 * riscv-tdep.h: Minor formatting fixes.
4122
4123 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
4124
4125 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4126 * dwarf-index-cache.c (create_dir_and_check): Likewise.
4127 (test_mkdir_recursive): Likewise.
4128 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4129
4130 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
4131
4132 * valarith.c (value_subscripted_rvalue): If an array is not in
4133 memory, and we don't know the upper bound, then we can't know that
4134 the requested element exists or not.
4135
4136 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
4137
4138 * target.c (str_comma_list_concat_elem): Fix typo in comment.
4139 (target_options_to_string): Add comment.
4140
4141 2018-08-08 Tom Tromey <tom@tromey.com>
4142
4143 * unittests/scoped_mmap-selftests.c: Check result of "write".
4144
4145 2018-08-08 Jim Wilson <jimw@sifive.com>
4146
4147 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4148 (decode_register_index_short): New.
4149 (decode_j_type_insn, decode_cj_type_insn): New.
4150 (decode_b_type_insn, decode_cb_type_insn): New.
4151 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
4152 local xlen. Check xlen when decoding ambiguous compressed insns. In
4153 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4154 is_c_sw_insn instead of is_sw_insn.
4155 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4156 (riscv_software_single_step): New.
4157 * riscv-tdep.h (riscv_software_single_step): Declare.
4158
4159 * riscv-tdep.c (riscv_isa_xlen): Drop static.
4160 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4161
4162 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
4163
4164 PR gdb/18050:
4165 * target.c (dispose_inferior): Don't dispose of inferiors that are
4166 already killed.
4167
4168 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
4169
4170 * remote.c (remote_target::download_tracepoint): Change char* to
4171 const char*.
4172
4173 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
4174
4175 * target.h (target_options_to_string): Return an std::string.
4176 * target.c (str_comma_list_concat_elem): Return void, use
4177 std::string.
4178 (do_option): Likewise.
4179 (target_options_to_string): Return an std::string.
4180 * linux-nat.c (linux_nat_target::wait): Adjust.
4181 * target-debug.h (target_debug_print_options): Adjust.
4182
4183 2018-08-07 Tom Tromey <tom@tromey.com>
4184
4185 * Makefile.in (CPPFLAGS): New variable.
4186 (INTERNAL_CPPFLAGS): Use it.
4187
4188 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4189
4190 * NEWS: Mention the index cache.
4191
4192 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4193
4194 * common/pathstuff.h (get_standard_cache_dir): New.
4195 * common/pathstuff.c (get_standard_cache_dir): New.
4196 * build-id.h (build_id_to_string): New.
4197 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4198 DEBUG_STR_SUFFIX): Move to here.
4199 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4200 DEBUG_STR_SUFFIX): Move from there.
4201 (write_psymtabs_to_index): Make non-static, add basename
4202 parameter. Write to temporary files, rename when done.
4203 (save_gdb_index_command): Adjust call to
4204 write_psymtabs_to_index.
4205 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4206 field.
4207 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4208 (get_gdb_index_contents_from_cache): New.
4209 (get_gdb_index_contents_from_cache_dwz): New.
4210 (dwarf2_initialize_objfile): Read index from cache.
4211 (dwarf2_build_psymtabs): Save to index.
4212 * dwarf-index-cache.h: New file.
4213 * dwarf-index-cache.c: New file.
4214 * dwarf-index-write.h: New file.
4215
4216 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4217
4218 * gnulib/aclocal.m4: Re-generate.
4219 * gnulib/config.in: Re-generate.
4220 * gnulib/configure: Re-generate.
4221 * gnulib/import/Makefile.am: Re-generate.
4222 * gnulib/import/Makefile.in: Re-generate.
4223 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4224 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4225 * gnulib/import/m4/mkdir.m4: New file.
4226 * gnulib/import/mkdir.c: New file.
4227 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4228 module.
4229
4230 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4231
4232 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4233 * common/scoped_mmap.c: New file.
4234 * common/scoped_mmap.h (destroy): New method.
4235 (~scoped_mmap, reset): Use destroy.
4236 (scoped_mmap): New move constructor.
4237 (mmap_file): New declaration.
4238 * unittests/scoped_mmap-selftests.c (test_normal,
4239 test_invalid_filename, run_tests): New functions.
4240 (_initialize_scoped_mmap_selftests): Register selftest.
4241
4242 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4243
4244 * dwarf2read.c (read_gdb_index_from_section): Rename to...
4245 (read_gdb_index_from_buffer): ... this. Remove section
4246 parameter, add buffer parameter.
4247 (get_gdb_index_contents_ftype,
4248 get_gdb_index_contents_dwz_ftype): New typedefs.
4249 (dwarf2_read_gdb_index): Add callback parameters to get the
4250 index contents.
4251 (get_gdb_index_contents_from_section): New.
4252 (dwarf2_initialize_objfile): Update call to
4253 dwarf2_read_gdb_index.
4254
4255 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4256
4257 * common/filestuff.h (gdb_fopen_cloexec): New overload.
4258 (gdb_open_cloexec): Likewise.
4259 * nat/linux-osdata.c (command_from_pid): Use string_printf.
4260 (commandline_from_pid): Likewise.
4261 (linux_xfer_osdata_threads): Likewise.
4262 (linux_xfer_osdata_fds): Likewise.
4263 * ada-lang.c (is_package_name): Likewise.
4264 * auxv.c (procfs_xfer_auxv): Likewise.
4265 * breakpoint.c (print_one_breakpoint_location): Use
4266 uiout::field_fmt.
4267 (print_one_catch_solib): Use string_printf.
4268 * coff-pe-read.c (add_pe_exported_sym): Likewise.
4269 (add_pe_forwarded_sym): Likewise.
4270 * dwarf2read.c (create_type_unit_group): Likewise.
4271 (build_error_marker_type): Likewise.
4272 * infcall.c (get_function_name): Likewise.
4273 * valprint.c (print_converted_chars_to_obstack): Likewise.
4274 * xtensa-tdep.c (xtensa_register_type): Likewise.
4275
4276 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
4277
4278 * remote.c (remote_target::download_tracepoint): Fix format
4279 string errors.
4280
4281 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4282
4283 * tracefile.c: Include common/byte-vector.h.
4284 (trace_save): Change type of buf to gdb::byte_vector. Initialize
4285 with trace_regblock_size if needed. Update uses of buf.
4286
4287 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4288
4289 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4290 std::vector<unsigned char>.
4291 * tracepoint.c (collection_list::collection_list): Remove
4292 m_regs_mask initializer from initializer list. Resize
4293 m_regs_mask using the largest remote register number.
4294 (collection_list::add_remote_register): Remove size check on
4295 m_regs_mask. Use at to access element.
4296 (collection_list::stringify): Change type of temp_buf to
4297 gdb::char_vector. Update uses of temp_buf. Resize if needed to
4298 stringify the register mask. Use pack_hex_byte for the register
4299 mask.
4300
4301 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4302
4303 * tracepoint.h (class collection_list) <add_register>: Remove.
4304 <add_remote_register, add_ax_registers, add_local_register>:
4305 Declare.
4306 <add_memrange>: Add scope parameter.
4307 * tracepoint.c (encode_actions_1): Likewise.
4308 (collection_list::add_register): Rename to ...
4309 (collection_list::add_remote_register): ... this. Update
4310 comment.
4311 (collection_list::add_ax_registers, add_local_register): New
4312 methods.
4313 (collection_list::add_memrange): Add scope parameter. Call
4314 add_local_register instead of add_register.
4315 (finalize_tracepoint_aexpr): New function.
4316 (collection_list::collect_symbol): Update calls to add_memrange.
4317 Call add_local_register instead of add_register. Call
4318 add_ax_registers. Call finalize_tracepoint_aexpr.
4319 (encode_actions_1): Get remote regnos for $reg action. Call
4320 add_remote_register, add_ax_registers, and add_local_register.
4321 Update call to add_memrange. Call finalize_tracepoint_aexpr.
4322 (validate_actionline): Call finalize_tracepoint_aexpr.
4323
4324 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4325
4326 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4327 Replace array buf with gdb::char_vector buf, of size
4328 get_remote_packet_size (). Replace references to buf and
4329 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
4330 and xsnprintf with snprintf. Raise errors if the buffer is too
4331 small.
4332
4333 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4334
4335 * remote.c (remote_target::download_tracepoint): Fix the has_more
4336 predicate in the QTDP action list iteration.
4337
4338 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4339
4340 * remote.c (remote_target::download_tracepoint): Fix indentation
4341 in for block.
4342
4343 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4344
4345 * proc-api.c (_initialize_proc_api): Remove c, unused.
4346 * procfs.c (procfs_init_inferior): Remove signals, unused.
4347 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4348 unused.
4349
4350 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
4351 Andrew Burgess <andrew.burgess@embecosm.com>
4352
4353 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4354 'W_STOPCODE (0)' as this could be ambiguous.
4355
4356 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
4357
4358 * ser-tcp.c (net_open): Fix thinko when deciding whether to
4359 disable TCP's Nagle algorithm (use "ai_protocol" instead of
4360 "ai_socktype").
4361
4362 2018-08-02 Tom Tromey <tom@tromey.com>
4363
4364 PR symtab/16842.
4365 * dwarf2read.c (read_func_scope): Set symtab on template parameter
4366 symbols.
4367 (process_structure_scope): Likewise.
4368
4369 2018-08-02 Xavier Roirand <roirand@adacore.com>
4370
4371 PR gdb/22629:
4372 * darwin-nat.c (darwin_kill_inferior): Fix handling of
4373 kill inferior.
4374
4375 2018-08-02 Tom Tromey <tom@tromey.com>
4376
4377 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4378 (darwin_suspend_inferior, darwin_resume_inferior)
4379 (darwin_decode_notify_message, darwin_resume_inferior_threads)
4380 (darwin_check_new_threads): Check result of get_darwin_inferior.
4381
4382 2018-07-31 Joel Brobecker <brobecker@adacore.com>
4383
4384 GDB 8.1.1 released.
4385
4386 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
4387
4388 * varobj.c (varobj_get_path_expr_parent): Report an error if
4389 parent is a dynamic varobj.
4390
4391 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4392
4393 * gnulib/aclocal.m4: Re-generate.
4394 * gnulib/config.in: Re-generate.
4395 * gnulib/configure: Re-generate.
4396 * gnulib/import/Makefile.in: Re-generate.
4397 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4398 * gnulib/import/m4/onceonly.m4: Re-generate.
4399
4400 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4401
4402 * target-descriptions.c (struct xml_test_tdesc): New.
4403 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4404 (record_xml_tdesc): Update.
4405 (maintenance_check_xml_descriptions): Update.
4406 * target-descriptions.h (record_xml_tdesc): Update comment.
4407
4408 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
4409
4410 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4411 checking array bounds are defined.
4412
4413 2018-07-30 Tom Tromey <tom@tromey.com>
4414
4415 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4416 irreflexivity violation.
4417
4418 2018-07-30 Tom Tromey <tom@tromey.com>
4419
4420 * cli/cli-decode.c (lookup_cmd): Remove lint code.
4421 * value.c (unpack_long): Remove lint code.
4422 * valops.c (value_ind): Remove lint code.
4423 * valarith.c (value_x_binop, value_x_unop, value_equal)
4424 (value_pos): Remove lint code.
4425
4426 2018-07-28 Tom de Vries <tdevries@suse.de>
4427
4428 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4429 with undefined upper bound as <optimized out>.
4430
4431 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
4432
4433 * gcore.in: Rename variable "name" to "prefix". Expand
4434 "usage" text.
4435
4436 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
4437
4438 * windows-nat.c (windows_nat_target::create_inferior): Update to
4439 call close() in global namespace.
4440
4441 2018-07-26 Tom Tromey <tom@tromey.com>
4442
4443 * dwarf-index-write.c (add_address_entry): Don't add objfile
4444 offsets.
4445 * dbxread.c (find_stab_function): Rename from
4446 find_stab_function_addr. Return a bound_minimal_symbol.
4447 (read_dbx_symtab): Use raw_text_low, raw_text_high.
4448 Don't add objfile offsets.
4449 (end_psymtab): Use raw_text_low, raw_text_high,
4450 MSYMBOL_VALUE_RAW_ADDRESS.
4451 (read_ofile_symtab): Update.
4452 (process_one_symbol): Update.
4453 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4454 offsets.
4455 (dw2_relocate): Remove.
4456 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4457 searching addrmap.
4458 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4459 Update.
4460 (process_psymtab_comp_unit_reader, add_partial_symbol)
4461 (add_partial_subprogram, dwarf2_ranges_read): Update.
4462 (load_partial_dies): Update.
4463 (add_address_entry): Don't add objfile offsets.
4464 (dwarf2_build_include_psymtabs): Update.
4465 (create_addrmap_from_aranges): Don't add objfile offsets.
4466 (dw2_find_pc_sect_compunit_symtab): Update.
4467 * mdebugread.c (parse_symbol): Don't add objfile offsets.
4468 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4469 Update.
4470 (parse_partial_symbols): Don't add objfile offsets. Use
4471 raw_text_low, raw_text_high. Update.
4472 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4473 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4474 or call 'relocate' quick function. Clear psymbol_map.
4475 * psympriv.h (struct partial_symbol) <address>: Add section
4476 offset.
4477 <set_unrelocated_address>: Rename from set_address.
4478 <raw_text_low, raw_text_high>: New methods.
4479 <text_low, text_high>: Add objfile parameter.
4480 (add_psymbol_to_bcache): Add 'section' parameter. Call
4481 set_unrelocated_address.
4482 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4483 (find_pc_psymbol): Update.
4484 (fixup_psymbol_section, relocate_psymtabs): Remove.
4485 (dump_psymtab, psym_functions): Update.
4486 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4487 parameter.
4488 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4489 (start_psymtab_common): Update.
4490 * symfile-debug.c (debug_qf_relocate): Remove.
4491 (debug_sym_quick_functions): Update.
4492 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4493 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4494 Update.
4495
4496 2018-07-26 Tom Tromey <tromey@redhat.com>
4497
4498 * dbxread.c (end_psymtab): Use text_high_valid and
4499 text_low_valid.
4500 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4501 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4502 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4503 Update comment.
4504 <text_low_valid, text_high_valid>: New fields.
4505 <set_text_low, set_text_high>: Update.
4506 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4507
4508 2018-07-26 Tom Tromey <tom@tromey.com>
4509
4510 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4511 Update.
4512 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4513 textlow and texthigh fields.
4514 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4515 Update.
4516 * mdebugread.c (parse_lines, parse_partial_symbols)
4517 (psymtab_to_symtab_1): Update.
4518 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4519 Rename fields. Update comment. Now private.
4520 <text_low, text_high, set_text_low, set_text_high>: New methods.
4521 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4522 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4523 (start_psymtab_common, maintenance_info_psymtabs)
4524 (maintenance_check_psymtabs): Update.
4525 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4526 texthigh fields.
4527 (scan_xcoff_symtab): Update.
4528
4529 2018-07-26 Tom Tromey <tromey@redhat.com>
4530
4531 * psympriv.h (struct partial_symbol) <unrelocated_address,
4532 address, set_address>: New methods.
4533 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4534 (fixup_psymbol_section, relocate_psymtabs): Update.
4535 (print_partial_symbols): Add 'objfile' parameter. Update.
4536 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4537 Update.
4538
4539 2018-07-26 Tom Tromey <tom@tromey.com>
4540
4541 * dwarf-index-write.c (write_psymbols, debug_names::insert)
4542 (debug_names::write_psymbols): Update.
4543 * psympriv.h (struct partial_symbol): Derive from
4544 general_symbol_info.
4545 <obj_section>: New method.
4546 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4547 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4548 (find_pc_sect_psymbol, fixup_psymbol_section)
4549 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4550 (print_partial_symbols, recursively_search_psymtabs)
4551 (compare_psymbols, psymbol_hash, psymbol_compare)
4552 (add_psymbol_to_bcache, maintenance_check_psymtabs)
4553 (psymbol_name_matches, psym_fill_psymbol_map): Update.
4554
4555 2018-07-26 Tom Tromey <tromey@redhat.com>
4556
4557 * dbxread.c (end_psymtab): Remove dead code.
4558
4559 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
4560
4561 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4562 DWARF unwinders are disabled.
4563 * dwarf2-frame.c: Add dwarf2read.h include.
4564 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4565 disabled.
4566 (dwarf2_frame_unwinders_enabled_p): Define.
4567 (show_dwarf_unwinders_enabled_p): New function.
4568 (_initialize_dwarf2_frame): Register switch to control DWARF
4569 unwinder use.
4570 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4571 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4572 (show_dwarf_cmdlist): Remove static keyword.
4573 * dwarf2read.h (set_dwarf_cmdlist): Declare.
4574 (show_dwarf_cmdlist): Declare.
4575 * NEWS: Document new feature.
4576
4577 2018-07-26 Tom de Vries <tdevries@suse.de>
4578
4579 PR breakpoints/23366
4580 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4581
4582 2018-07-26 Tom de Vries <tdevries@suse.de>
4583
4584 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4585 DW_AT_count can't be translated to a dynamic prop.
4586
4587 2018-07-25 Tom de Vries <tdevries@suse.de>
4588
4589 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4590 try/catch.
4591
4592 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
4593
4594 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4595
4596 2018-07-25 Joel Brobecker <brobecker@adacore.com>
4597
4598 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4599
4600 2018-07-24 Keith Seitz <keiths@redhat.comt
4601
4602 PR symtab/23010
4603 * dwarf2read.c (dw2_add_symbol_to_list): New function.
4604 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4605 instead of add_symbol_to_list.
4606 (read_file_scope): Call prepare_one_comp_unit before reading
4607 any other DIEs.
4608
4609 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
4610
4611 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4612
4613 2018-07-24 Tom Tromey <tom@tromey.com>
4614
4615 * utils.c (malloc, realloc, free): Don't declare.
4616 * configure, config.in: Rebuild.
4617 * configure.ac: Don't check for declarations of free, malloc, or
4618 realloc.
4619
4620 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4621
4622 * aarch64-linux-nat.c
4623 (aarch64_linux_nat_target::stopped_data_address): Remove unused
4624 variable.
4625 * arm-linux-nat.c (fetch_regs): Likewise.
4626 (store_regs): Likewise.
4627 (fetch_vfp_regs): Likewise.
4628 (store_vfp_regs): Likewise.
4629 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4630 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4631 (arm_linux_nat_target::insert_watchpoint): Likewise.
4632 (arm_linux_nat_target::remove_watchpoint): Likewise.
4633 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4634 Likewise.
4635 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4636 Likewise.
4637 * ppc-linux-nat.c (fetch_register): Likewise.
4638 (fetch_all_gp_regs): Likewise.
4639 (fetch_ppc_registers): Likewise.
4640 (store_all_gp_regs): Likewise.
4641 (store_ppc_registers): Likewise.
4642 (hwdebug_insert_point): Likewise.
4643 (can_use_watchpoint_cond_accel): Likewise.
4644 * remote-sim.c (gdb_os_write_stdout): Likewise.
4645
4646 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4647 Tom Tromey <tom@tromey.com>
4648
4649 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4650 test for it.
4651 * configure: Rebuild.
4652
4653 2018-07-22 Tom Tromey <tom@tromey.com>
4654
4655 * regformats/regdat.sh: Define xmltarget_${name} inside
4656 #ifndef IN_PROCESS_AGENT.
4657
4658 2018-07-22 Tom Tromey <tom@tromey.com>
4659
4660 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4661
4662 2018-07-22 Tom Tromey <tom@tromey.com>
4663
4664 * symfile.c (reread_symbols): Notify iter, not objfile.
4665
4666 2018-07-22 Tom Tromey <tom@tromey.com>
4667
4668 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4669 Use arch_ops.
4670 (ravenscar_thread_target::prepare_to_store): Likewise.
4671
4672 2018-07-22 Tom Tromey <tom@tromey.com>
4673
4674 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4675 unused variable. Call value_fetch_lazy when needed.
4676 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4677 Remove unused variable. Call value_fetch_lazy when needed.
4678
4679 2018-07-22 Tom Tromey <tom@tromey.com>
4680
4681 * m32c-tdep.c (mark_dma): Return void.
4682 (make_regs): Remove unused declarations.
4683
4684 2018-07-22 Tom Tromey <tom@tromey.com>
4685
4686 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4687 cmdscm_get_valid_command_smob_arg_unsafe for effect.
4688 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4689 bkscm_get_valid_block_smob_arg_unsafe for effect.
4690
4691 2018-07-22 Tom Tromey <tom@tromey.com>
4692
4693 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4694 value_type.
4695
4696 2018-07-22 Tom Tromey <tom@tromey.com>
4697
4698 * windows-nat.c (saved_context): Conditionally define.
4699 * remote.c (remote_target::remote_btrace_maybe_reopen):
4700 Conditionally declare "warned".
4701 * inflow.c (sigquit_ours): Conditionally define.
4702 (new_tty): Move "tty" declaration inside #if.
4703 * guile/guile.c (guile_datadir): Conditionally define.
4704 * charset.c (set_be_le_names): Move some declarations inside #if.
4705 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4706 #if.
4707 (parse_xml_btrace_conf): Likewise.
4708
4709 2018-07-22 Tom Tromey <tom@tromey.com>
4710
4711 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4712
4713 2018-07-22 Tom Tromey <tom@tromey.com>
4714
4715 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4716 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4717 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4718 * buildsym-legacy.c (get_macro_table): Remove unused variable.
4719 * stack.c (frame_apply_level_command): Remove unused variable.
4720 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4721 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4722 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4723 unused variable.
4724 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4725 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4726 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4727 variable.
4728 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4729 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4730 variable.
4731 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4732 Remove unused variable.
4733 * cli/cli-script.c (recurse_read_control_structure): Remove unused
4734 variable.
4735 * common/tdesc.c (print_xml_feature::visit): Remove unused
4736 variable.
4737 * compile/compile-object-load.c (store_regs): Remove unused
4738 variables.
4739 * complaints.c (clear_complaints): Remove unused variable.
4740 * corelow.c (core_target_open): Remove unused variable.
4741 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4742 variable.
4743 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4744 variable.
4745 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4746 variable.
4747 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4748 variable.
4749 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4750 variable.
4751 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4752 variable.
4753 * ia64-tdep.c (examine_prologue): Remove unused variable.
4754 * infcall.c (run_inferior_call): Remove unused variable.
4755 * inferior.c (exit_inferior): Remove unused variable.
4756 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4757 * linespec.c (decode_line_2): Remove unused variable.
4758 * linux-nat.c (super_close): Remove.
4759 * linux-tdep.c (linux_info_proc): Remove unused variable.
4760 * mi/mi-main.c (mi_execute_command): Remove unused variable.
4761 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4762 Remove unused variable.
4763 * parse.c (find_minsym_type_and_address): Remove unused variable.
4764 * printcmd.c (info_symbol_command, printf_floating): Remove unused
4765 variable.
4766 * python/py-breakpoint.c (bppy_set_commands): Remove unused
4767 variable.
4768 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4769 variables.
4770 * record-btrace.c (record_btrace_target::store_registers): Remove
4771 unused variable.
4772 (cmd_show_record_btrace_cpu): Remove unused variable.
4773 * riscv-tdep.c (riscv_register_reggroup_p)
4774 (riscv_push_dummy_call, riscv_return_value): Remove unused
4775 variable.
4776 * rust-exp.y (literal): Remove unused variable.
4777 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4778 unused variable.
4779 <STRUCTOP_ANONYMOUS>: Likewise.
4780 * s390-linux-tdep.c (s390_linux_init_abi_31)
4781 (s390_linux_init_abi_64): Remove unused variable.
4782 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4783 (file_select_thread, net_windows_open, _initialize_ser_windows):
4784 Remove unused variables.
4785 * symtab.c (find_pc_sect_line): Remove unused variable.
4786 * target-memory.c (compute_garbled_blocks): Remove unused
4787 variable.
4788 (target_write_memory_blocks): Remove unused variable.
4789 * target.c (target_stack::unpush): Remove unused variables.
4790 * tracepoint.c (start_tracing, all_tracepoint_actions)
4791 (merge_uploaded_trace_state_variables)
4792 (print_one_static_tracepoint_marker): Remove unused variable.
4793 * unittests/basic_string_view/element_access/char/1.cc (test01):
4794 Remove unused variable.
4795 * windows-nat.c (windows_continue, windows_add_all_dlls)
4796 (do_initial_windows_stuff, windows_nat_target::create_inferior):
4797 Remove unused variables.
4798
4799 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
4800
4801 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4802 attr_profile in HAVE_ELF.
4803 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4804 HAVE_ELF.
4805
4806 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
4807
4808 * frame.c (frame_register_unwind): Change parameter name.
4809 (frame_unwind_register): Likewise.
4810 (frame_unwind_register_value): Likewise.
4811 (frame_unwind_register_signed): Likewise.
4812 (frame_unwind_register_unsigned): Likewise.
4813 * frame.h (frame_register_unwind): Likewise.
4814 (frame_unwind_register): Likewise.
4815 (frame_unwind_register_value): Likewise.
4816 (frame_unwind_register_signed): Likewise.
4817 (frame_unwind_register_unsigned): Likewise.
4818 (frame_unwind_arch): Likewise.
4819
4820 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4821
4822 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4823 ISA maintenance.
4824
4825 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4826
4827 * mips-linux-nat.c (mips_linux_nat_target::read_description):
4828 Call `get_ptrace_pid' rather than extracting the ptrace PID by
4829 hand.
4830
4831 2018-07-20 Keith Seitz <keiths@redhat.com>
4832
4833 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4834 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4835 m_compunit_symtab, m_language>: Add "m_" prefix.
4836 Update all uses.
4837 * buildsym.c: Update all uses.
4838
4839 2018-07-20 Tom Tromey <tom@tromey.com>
4840
4841 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4842 * buildsym.h (record_line_ftype): Remove typedef.
4843
4844 2018-07-20 Tom Tromey <tom@tromey.com>
4845
4846 * buildsym-legacy.h (augment_type_symtab): Don't declare.
4847 (end_expandable_symtab): Likewise.
4848 (end_symtab_get_static_block): Likewise.
4849 (end_symtab_from_static_block): Likewise.
4850 * buildsym-legacy.c (augment_type_symtab): Remove.
4851 (end_expandable_symtab): Remove.
4852 (end_symtab_get_static_block): Remove.
4853 (end_symtab_from_static_block): Remove.
4854
4855 2018-07-20 Tom Tromey <tom@tromey.com>
4856
4857 * dwarf2read.c: Include buildsym.h.
4858 (struct dwarf2_cu) <builder>: New method.
4859 (fixup_go_packaging): Update.
4860 (process_full_comp_unit, process_full_type_unit): Update. Don't
4861 use scoped_free_pendings.
4862 (using_directives): Add "cu" parameter, remove "language".
4863 (read_import_statement, setup_type_unit_groups, )
4864 (read_func_scope, read_lexical_block_scope)
4865 (dwarf2_record_block_ranges, read_namespace): Update.
4866 (lnp_state_machine::lnp_state_machine): Add cu parameter.
4867 (lnp_state_machine::handle_end_sequence): Update.
4868 (class lnp_state_machine) <m_cu>: New member.
4869 <m_record_line_callback>: Remove.
4870 <m_currently_recording_lines>: New member.
4871 (lnp_state_machine::handle_set_file): Update.
4872 (noop_record_line): Remove.
4873 (dwarf_record_line_p): Add cu parameter.
4874 (dwarf_record_line_1, dwarf_finish_line): Likewise.
4875 (lnp_state_machine::record_line)
4876 (lnp_state_machine::lnp_state_machine)
4877 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4878 (dwarf_decode_lines): Update.
4879 (dwarf2_start_subfile): Add cu parameter.
4880 (dwarf2_start_symtab, new_symbol): Update.
4881 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4882 Remove dwarf2_per_objfile parameter.
4883 (dwarf_decode_macros): Update.
4884
4885 2018-07-20 Tom Tromey <tom@tromey.com>
4886
4887 * stabsread.c (define_symbol): Update.
4888 * buildsym-legacy.h (get_buildsym_compunit): Declare.
4889 * dwarf2read.c (new_symbol): Update.
4890 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4891 * cp-namespace.c: Include buildsym.h.
4892 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4893 * buildsym-legacy.c (get_buildsym_compunit): New function.
4894
4895 2018-07-20 Tom Tromey <tom@tromey.com>
4896
4897 * xcoffread.c: Include buildsym-legacy.h.
4898 * windows-nat.c: Include buildsym-legacy.h.
4899 * stabsread.c: Include buildsym-legacy.h.
4900 * mdebugread.c: Include buildsym-legacy.h.
4901 * buildsym-legacy.h: New file.
4902 * buildsym-legacy.c: New file, from buildsym.c.
4903 * go32-nat.c: Include buildsym-legacy.h.
4904 * dwarf2read.c: Include buildsym-legacy.h.
4905 * dbxread.c: Include buildsym-legacy.h.
4906 * cp-namespace.c: Include buildsym-legacy.h.
4907 * coffread.c: Include buildsym-legacy.h.
4908 * buildsym.h: Move some contents to buildsym-legacy.h.
4909 * buildsym.c: Include buildsym-legacy.h. Move many functions to
4910 buildsym-legacy.c.
4911 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4912
4913 2018-07-20 Tom Tromey <tom@tromey.com>
4914
4915 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4916 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4917 (buildsym_compunit::buildsym_compunit)
4918 (buildsym_compunit::~buildsym_compunit)
4919 (buildsym_compunit::get_macro_table): Define.
4920
4921 2018-07-20 Tom Tromey <tom@tromey.com>
4922
4923 * buildsym.c (reset_symtab_globals): Remove.
4924 (buildsym_compunit::end_symtab_from_static_block): Update.
4925 (buildsym_compunit::augment_type_symtab): Update.
4926 (end_symtab_from_static_block): Call free_buildsym_compunit.
4927 (augment_type_symtab, end_symtab, end_expandable_symtab):
4928 Likewise.
4929
4930 2018-07-20 Tom Tromey <tom@tromey.com>
4931
4932 * arch-utils.c: Do not include buildsym.h.
4933 * mipsread.c: Do not include buildsym.h.
4934 * machoread.c: Do not include buildsym.h.
4935 * elfread.c: Do not include buildsym.h.
4936
4937 2018-07-20 Tom Tromey <tom@tromey.com>
4938
4939 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4940 initialization.
4941 (buildsym_compunit): Add new constructor.
4942 (struct buildsym_compunit) <get_last_source_file, finish_block,
4943 record_block_range, start_subfile, patch_subfile_names,
4944 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4945 set_last_source_start_addr, get_last_source_start_addr,
4946 get_local_using_directives, set_local_using_directives,
4947 get_global_using_directives, outermost_context_p,
4948 get_current_context_stack, get_context_stack_depth,
4949 get_current_subfile, get_local_symbols, get_file_symbols,
4950 get_global_symbols, record_debugformat, record_producer,
4951 push_context, pop_context, end_symtab_get_static_block,
4952 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4953 New public methods.
4954 <record_pending_block, finish_block_internal, make_blockvector,
4955 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4956 private methods.
4957 Update all users.
4958
4959 2018-05-22 Tom Tromey <tom@tromey.com>
4960
4961 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4962 parameter.
4963 (finish_block_internal): Update.
4964
4965 2018-07-20 Tom Tromey <tom@tromey.com>
4966
4967 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4968 parameter.
4969 (finish_block_internal): Update.
4970
4971 2018-07-20 Tom Tromey <tom@tromey.com>
4972
4973 * buildsym.h (EXTERN): Don't define or undef.
4974 * buildsym.c (EXTERN): Don't define.
4975
4976 2018-07-20 Tom Tromey <tom@tromey.com>
4977
4978 * buildsym.c: Remove TODO comment.
4979
4980 2018-07-20 Tom Tromey <tom@tromey.com>
4981
4982 * coffread.c (coff_symtab_read): Update.
4983 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4984 (xcoff_new_init): Update.
4985 * mipsread.c (mipscoff_new_init): Update.
4986 * mdebugread.c (mdebug_build_psymtabs): Update.
4987 * elfread.c (elf_new_init): Update.
4988 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4989 Update.
4990 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4991 (coffstab_build_psymtabs, elfstab_build_psymtabs)
4992 (stabsect_build_psymtabs): Update.
4993 * buildsym.h (buildsym_init): Don't declare.
4994 * buildsym.c: Update comment.
4995 (prepare_for_building): Remove.
4996 (start_symtab, restart_symtab): Update.
4997 (reset_symtab_globals): Update comment.
4998 (buildsym_init): Remove.
4999
5000 2018-07-20 Tom Tromey <tom@tromey.com>
5001
5002 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5003 * stabsread.c (patch_block_stabs, define_symbol, read_type)
5004 (read_enum_type, common_block_start, common_block_end)
5005 (cleanup_undefined_types_1, finish_global_stabs): Update.
5006 * mdebugread.c (psymtab_to_symtab_1): Update.
5007 * dwarf2read.c (fixup_go_packaging, read_func_scope)
5008 (read_lexical_block_scope, new_symbol): Update.
5009 * dbxread.c (process_one_symbol): Update.
5010 * coffread.c (coff_symtab_read, process_coff_symbol)
5011 (coff_read_enum_type): Update.
5012 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5013 declare.
5014 (get_local_symbols, get_file_symbols, get_global_symbols): New
5015 functions.
5016 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5017 m_global_symbols.
5018 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5019 (~scoped_free_pendings): Update.
5020 (finish_block, prepare_for_building, reset_symtab_globals)
5021 (end_symtab_get_static_block, end_symtab_with_blockvector)
5022 (augment_type_symtab, push_context): Update.
5023 (get_local_symbols, get_file_symbols, get_global_symbols): New
5024 functions.
5025 (buildsym_init): Update.
5026
5027 2018-07-20 Tom Tromey <tom@tromey.com>
5028
5029 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5030 (process_full_type_unit): Likewise.
5031 (dwarf2_start_symtab): Set list_in_scope.
5032
5033 2018-07-20 Tom Tromey <tom@tromey.com>
5034
5035 * dwarf2read.c (process_psymtab_comp_unit_reader)
5036 (build_type_psymtabs_reader): Do not set list_in_scope.
5037
5038 2018-07-20 Tom Tromey <tom@tromey.com>
5039
5040 * buildsym.c (free_pendings): Remove.
5041 (add_symbol_to_list, scoped_free_pendings)
5042 (finish_block_internal, buildsym_init): Update.
5043
5044 2018-07-20 Tom Tromey <tom@tromey.com>
5045
5046 * xcoffread.c (read_xcoff_symtab): Update.
5047 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5048 Update.
5049 * dbxread.c (process_one_symbol): Update.
5050 * coffread.c (coff_symtab_read): Update.
5051 * buildsym.h (finish_block): Update.
5052 * buildsym.c (finish_block): Remove "listhead" argument.
5053 (end_symtab_get_static_block): Update.
5054
5055 2018-07-20 Tom Tromey <tom@tromey.com>
5056
5057 * buildsym.h (class scoped_free_pendings): Remove constructor.
5058 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5059 method.
5060 <m_pending_block_obstack, m_pending_blocks>: New members.
5061 (pending_block_obstack, pending_blocks): Remove.
5062 (scoped_free_pendings::scoped_free_pendings): Default.
5063 (~scoped_free_pendings): Update.
5064 (free_pending_blocks): Remove.
5065 (finish_block_internal, record_pending_block, make_blockvector)
5066 (end_symtab_get_static_block, augment_type_symtab, push_context)
5067 (buildsym_init): Update.
5068
5069 2018-07-20 Tom Tromey <tom@tromey.com>
5070
5071 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5072 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5073 members.
5074 (pending_addrmap, pending_addrmap_obstack)
5075 (pending_addrmap_interesting): Remove.
5076 (scoped_free_pendings, record_block_range, make_blockvector)
5077 (prepare_for_building, reset_symtab_globals, buildsym_init):
5078 Update.
5079
5080 2018-07-20 Tom Tromey <tom@tromey.com>
5081
5082 * xcoffread.c (process_linenos): Update.
5083 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5084 * mdebugread.c (psymtab_to_symtab_1): Update.
5085 * dwarf2read.c (setup_type_unit_groups)
5086 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5087 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5088 * dbxread.c (process_one_symbol): Update.
5089 * coffread.c (coff_symtab_read, enter_linenos)
5090 (process_coff_symbol): Update.
5091 * buildsym.h (current_subfile): Don't declare.
5092 (get_current_subfile): Declare.
5093 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5094 member.
5095 (start_subfile, free_buildsym_compunit, push_subfile)
5096 (prepare_for_building, start_symtab): Update.
5097 (get_current_subfile): New function.
5098
5099 2018-07-20 Tom Tromey <tom@tromey.com>
5100
5101 * coffread.c (coff_symtab_read): Update.
5102 * xcoffread.c (read_xcoff_symtab): Update.
5103 * dwarf2read.c (new_symbol): Update.
5104 (read_func_scope, read_lexical_block_scope): Update.
5105 * dbxread.c (process_one_symbol): Update.
5106 * buildsym.h (context_stack, context_stack_depth): Don't declare.
5107 (outermost_context_p): Remove macro.
5108 (outermost_context_p, get_current_context_stack)
5109 (get_context_stack_depth): Declare.
5110 (pop_context): Return struct context_stack.
5111 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5112 member.
5113 (context_stack_size): Remove.
5114 (INITIAL_CONTEXT_STACK_SIZE): Remove.
5115 (prepare_for_building, end_symtab_get_static_block)
5116 (augment_type_symtab, push_context): Update.
5117 (pop_context): Return struct context_stack.
5118 (outermost_context_p, get_current_context_stack)
5119 (get_context_stack_depth): New functions.
5120 (buildsym_init): Update.
5121
5122 2018-07-20 Tom Tromey <tom@tromey.com>
5123
5124 * rust-exp.y: Now a pure parser. Update all rules.
5125 (%union): Move earlier.
5126 (current_parser, work_obstack): Remove globals.
5127 (rust_parser, ~rust_parser): Update.
5128 (class rust_parser) <copy_name, concat3, crate_name, super_name,
5129 lex_character, lex_number, lex_string, lex_identifier,
5130 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5131 convert_name, convert_params_to_expression,
5132 convert_ast_to_expression, ast_basic_type, ast_operation,
5133 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5134 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5135 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5136 ast_array_type, ast_slice_type, ast_reference_type,
5137 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5138 (rust_parse): Update.
5139 (rustyyerror, rustyylex): Add parser parameter.
5140 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5141 (rust_lex_stringish_test, rust_lex_test_sequence)
5142 (rust_lex_test_trailing_dot, rust_lex_test_completion)
5143 (rust_lex_test_push_back, rust_lex_tests): Update.
5144
5145 2018-07-19 Pedro Alves <palves@redhat.com>
5146
5147 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5148 gdb::unique_xmalloc_ptr.
5149 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5150 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5151 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5152 copy-initialization.
5153 * guile/scm-pretty-print.c (ppscm_print_children): Use
5154 gdb::unique_xmalloc_ptr instead of cleanups.
5155 (gdbscm_apply_val_pretty_printer): Remove cleanups.
5156 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5157 gdb::unique_xmalloc_ptr.
5158 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5159 Adjust to use gdb::unique_xmalloc_ptr.
5160 * guile/scm-utils.c (extract_arg): Adjust.
5161 * guile/scm-value.c (gdbscm_value_field): Adjust to use
5162 gdb::unique_xmalloc_ptr instead of a cleanup.
5163
5164 2018-07-19 Tom Tromey <tom@tromey.com>
5165
5166 * utils.c (do_value_free_to_mark)
5167 (make_cleanup_value_free_to_mark): Remove.
5168 * utils.h (make_cleanup_value_free_to_mark): Remove.
5169
5170 2018-07-19 Pedro Alves <palves@redhat.com>
5171
5172 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5173 forwarding reference.
5174
5175 2018-07-18 Pedro Alves <palves@redhat.com>
5176
5177 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5178 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
5179 cleanup.
5180
5181 2018-07-18 Pedro Alves <palves@redhat.com>
5182
5183 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5184 exceptions.
5185 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5186 (gdbscm_wrap): New.
5187 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5188 directly instead of a cleanup.
5189 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5190 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
5191 (vlscm_binop_gdbthrow): New, factored out from ...
5192 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
5193 (vlscm_rich_compare): Use gdbscm_wrap.
5194 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5195 instead of a cleanup.
5196 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5197 cleanup.
5198 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5199 Use xfree directly instead of a cleanup.
5200 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5201 Adjust to use gdbscm_wrap and scoped_value_mark.
5202 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5203 (gdbscm_value_address, gdbscm_value_dereference)
5204 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5205 scoped_value_mark.
5206 (gdbscm_value_dynamic_type): Use scoped_value_mark.
5207 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5208 scoped_value_mark.
5209 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5210 gdbscm_wrap and scoped_value_mark.
5211 (gdbscm_value_to_string): Use xfree directly instead of a
5212 cleanup. Move 'buffer' unique_ptr to TRY scope.
5213 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5214 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
5215 scoped_value_mark.
5216 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5217 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5218 scoped_value_mark.
5219 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5220 gdbscm_wrap.
5221
5222 2018-07-18 Tom de Vries <tdevries@suse.de>
5223
5224 * findvar.c (default_read_var_value): Also resolve dynamic type for
5225 LOC_OPTIMIZED_OUT vars.
5226
5227 2018-07-18 Maciej W. Rozycki <macro@mips.com>
5228
5229 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5230 decoding.
5231
5232 2018-07-17 Tom Tromey <tom@tromey.com>
5233
5234 * guile/scm-param.c (pascm_set_func, pascm_show_func)
5235 (compute_enum_list, pascm_set_param_value_x)
5236 (gdbscm_parameter_value): Update.
5237 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5238 (gdbscm_scm_to_host_string): Update.
5239 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5240 Update.
5241 * guile/scm-cmd.c (cmdscm_add_completion): Update.
5242 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5243 * guile/scm-string.c (gdbscm_scm_to_string): Return
5244 unique_xmalloc_ptr.
5245 (gdbscm_scm_to_host_string): Likewise.
5246
5247 2018-07-17 Tom Tromey <tom@tromey.com>
5248
5249 * guile/guile.c (gdbscm_eval_from_control_command): Update.
5250 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5251 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5252 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5253 unique_xmalloc_ptr.
5254
5255 2018-07-17 Tom Tromey <tom@tromey.com>
5256
5257 * guile/scm-param.c (pascm_signal_setshow_error): Update.
5258 * guile/guile-internal.h (gdbscm_exception_message_to_string):
5259 Update.
5260 * guile/scm-cmd.c (cmdscm_function): Update.
5261 * guile/scm-pretty-print.c
5262 (ppscm_print_exception_unless_memory_error): Update.
5263 * guile/scm-exception.c (gdbscm_exception_message_to_string):
5264 Return unique_xmalloc_ptr.
5265
5266 2018-07-17 Tom Tromey <tom@tromey.com>
5267
5268 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5269 Use string_printf.
5270
5271 2018-07-17 Jim Wilson <jimw@sifive.com>
5272
5273 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5274 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
5275 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
5276 unecessary braces after EF_RISCV_RVC test. Delete call to
5277 set_gdbarch_decr_pc_after_break.
5278
5279 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5280 RISCV_LAST_FP_REGNUM + 1.
5281 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5282
5283 2018-07-17 Tom Tromey <tom@tromey.com>
5284
5285 * configure.ac: Remove --disable-gdbcli.
5286 * configure: Rebuild.
5287 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5288 (SUBDIR_CLI_CFLAGS): Remove.
5289 (SFILES): Use SUBDIR_CLI_SRCS.
5290 (COMMON_OBS): Use SUBDIR_CLI_OBS.
5291
5292 2018-07-17 Tom Tromey <tom@tromey.com>
5293
5294 PR gdb/18624:
5295 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5296
5297 2018-07-16 Jim Wilson <jimw@sifive.com>
5298
5299 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5300
5301 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5302
5303 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5304 variable.
5305 (libunwind_frame_sniffer): Likewise.
5306 (libunwind_frame_prev_register): Likewise.
5307 (libunwind_sigtramp_frame_sniffer): Likewise.
5308 * ia64-tdep.c (ia64_access_reg): Likewise.
5309 (ia64_access_rse_reg): Likewise.
5310 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5311 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5312
5313 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5314
5315 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5316
5317 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5318
5319 * remote-sim.c (gdbsim_target::close,
5320 gdbsim_target::mourn_inferior): Remove unused variables.
5321
5322 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
5323
5324 * ia64-tdep.c (ktab_buf): New global.
5325 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5326 (get_kernel_table): Adjust.
5327
5328 2018-07-16 Tom Tromey <tom@tromey.com>
5329
5330 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5331 * dwarf2read.c (using_directives, new_symbol): Use
5332 outermost_context_p.
5333 * dbxread.c (process_one_symbol): Use outermost_context_p.
5334 * coffread.c (coff_symtab_read): Use outermost_context_p.
5335
5336 2018-07-16 Tom Tromey <tom@tromey.com>
5337
5338 * dwarf2read.c (using_directives, read_func_scope)
5339 (read_lexical_block_scope): Update.
5340 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5341 * buildsym.h (local_using_directives, global_using_directives):
5342 Don't declare.
5343 (get_local_using_directives, set_local_using_directives)
5344 (get_global_using_directives): Declare.
5345 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5346 m_global_using_directives>: New members.
5347 (finish_block_internal, prepare_for_building)
5348 (reset_symtab_globals, end_symtab_get_static_block)
5349 (push_context): Update.
5350 (get_local_using_directives, set_local_using_directives)
5351 (get_global_using_directives): New functions.
5352 (buildsym_init): Update.
5353
5354 2018-07-16 Tom Tromey <tom@tromey.com>
5355
5356 * xcoffread.c (xcoff_initial_scan): Don't call
5357 free_pending_blocks.
5358 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5359 * buildsym.h (class scoped_free_pendings): Add constructor.
5360 (free_pending_blocks): Don't declare.
5361 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5362 (free_pending_blocks): Now static.
5363
5364 2018-07-16 Tom Tromey <tom@tromey.com>
5365
5366 * buildsym.h (push_subfile, pop_subfile): Update declarations.
5367 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5368 member.
5369 (struct subfile_stack): Remove.
5370 (subfile_stack): Remove.
5371 (push_subfile, pop_subfile, buildsym_init): Update.
5372
5373 2018-07-16 Tom Tromey <tom@tromey.com>
5374
5375 * buildsym.c (push_subfile): Use gdb_assert.
5376 (pop_subfile): Use gdb_assert.
5377
5378 2018-07-16 Tom Tromey <tom@tromey.com>
5379
5380 * buildsym.h (merge_symbol_lists): Remove.
5381 * buildsym.c (merge_symbol_lists): Remove.
5382
5383 2018-07-16 Tom Tromey <tom@tromey.com>
5384
5385 * stabsread.c (scan_file_globals): Update comment.
5386 * stabsread.h (scan_file_globals): Move from buildsym.h.
5387 * buildsym.h (scan_file_globals): Move to stabsread.h.
5388
5389 2018-07-16 Tom Tromey <tom@tromey.com>
5390
5391 * xcoffread.c (xcoff_new_init): Update.
5392 * mipsread.c (mipscoff_new_init): Update.
5393 * mdebugread.c (mdebug_build_psymtabs): Update.
5394 * elfread.c (elf_new_init): Update.
5395 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5396 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5397 * buildsym.h (buildsym_new_init): Don't declare.
5398 * buildsym.c (buildsym_new_init): Remove.
5399
5400 2018-07-16 Tom Tromey <tom@tromey.com>
5401
5402 * stabsread.h (within_function): Move from buildsym.h.
5403 * stabsread.c (start_stabs): Clear within_function.
5404 * coffread.c (coff_start_symtab): Clear within_function.
5405 * buildsym.h (within_function): Move to stabsread.h.
5406 * buildsym.c (prepare_for_building): Update.
5407
5408 2018-07-16 Tom Tromey <tom@tromey.com>
5409
5410 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5411 * dwarf2read.c (dwarf2_start_symtab): Don't set
5412 processing_gcc_compilation.
5413 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5414
5415 2018-07-16 Tom Tromey <tom@tromey.com>
5416
5417 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5418 (next_symbol_text_func): Move from buildsym.h.
5419 * stabsread.c (hashname): Move from buildsym.c.
5420 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5421 (next_symbol_text_func, hashname): Move to stabsread.h.
5422 * buildsym.c: Don't include bcache.h
5423 (hashname): Move to stasbread.c.
5424
5425 2018-07-16 Tom Tromey <tom@tromey.com>
5426
5427 * buildsym.h (context_stack_size): Don't declare.
5428 * buildsym.c (context_stack_size): New global.
5429
5430 2018-07-16 Tom Tromey <tom@tromey.com>
5431
5432 * dbxread.c (processing_acc_compilation): New global.
5433 * buildsym.h (processing_acc_compilation): Don't declare.
5434
5435 2018-07-16 Tom Tromey <tom@tromey.com>
5436
5437 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5438 * dbxread.c (read_ofile_symtab): Update.
5439 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5440 * buildsym.h (last_source_start_addr): Remove.
5441 (set_last_source_start_addr, get_last_source_start_addr):
5442 Declare.
5443 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5444 parameter.
5445 (struct buildsym_compunit) <m_last_source_start_addr>: New
5446 member.
5447 (prepare_for_building): Remove start_addr parameter.
5448 (start_symtab, restart_symtab, end_symtab_get_static_block)
5449 (end_symtab_with_blockvector): Update.
5450 (set_last_source_start_addr, get_last_source_start_addr): New
5451 functions.
5452
5453 2018-07-16 Tom Tromey <tom@tromey.com>
5454
5455 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5456 member.
5457 (have_line_numbers): Remove.
5458 (record_line, prepare_for_building, end_symtab_get_static_block)
5459 (augment_type_symtab): Update.
5460
5461 2018-07-16 Tom Tromey <tom@tromey.com>
5462
5463 * buildsym.c (~buildsym_compunit): Free the macro table.
5464 (struct buildsym_compunit) <get_macro_table, release_macros>: New
5465 methods.
5466 <m_pending_macros>: New member.
5467 (pending_macros): Remove.
5468 (~scoped_free_pendings, get_macro_table, prepare_for_building)
5469 (reset_symtab_globals, end_symtab_get_static_block)
5470 (end_symtab_with_blockvector, augment_type_symtab)
5471 (buildsym_init): Update.
5472
5473 2018-07-16 Tom Tromey <tom@tromey.com>
5474
5475 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5476 parameter.
5477 (buildsym_compunit::set_last_source_file): New method.
5478 <m_last_source_file>: New member.
5479 (prepare_for_building): Remove "name" parameter.
5480 (start_symtab, restart_symtab, reset_symtab_globals): Update.
5481 (last_source_file): Remove.
5482 (set_last_source_file, get_last_source_file): Update.
5483
5484 2018-07-16 Tom Tromey <tom@tromey.com>
5485
5486 * buildsym.c (prepare_for_building): Add assert.
5487
5488 2018-07-16 Tom Tromey <tom@tromey.com>
5489
5490 * buildsym.c (~buildsym_compunit): Update.
5491 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5492 (start_subfile, patch_subfile_names)
5493 (end_symtab_with_blockvector): Update.
5494
5495 2018-07-16 Tom Tromey <tom@tromey.com>
5496
5497 * buildsym.c (struct buildsym_compunit): Add constructor,
5498 destructor, initializers.
5499 (start_buildsym_compunit): Remove.
5500 (free_buildsym_compunit): Use "delete".
5501 (start_symtab, restart_symtab): Use "new".
5502
5503 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
5504
5505 * symfile.c (set_objfile_default_section_offset): Remove struct
5506 keyword.
5507
5508 2018-07-14 Stafford Horne <shorne@gmail.com>
5509
5510 * (Responsible Maintainers): Add myself as or1k maintainer.
5511
5512 2018-07-13 Tom Tromey <tom@tromey.com>
5513
5514 * symfile.c (set_objfile_default_section_offset): Use extra braces
5515 around initializer.
5516
5517 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5518
5519 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5520 non-branching basr.
5521
5522 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5523
5524 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5525 unittests/cli-utils-selftests.c
5526 * unittests/cli-utils-selftests.c: New file.
5527
5528 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5529
5530 * NEWS: Mention new commands. Mention change to 'thread apply'.
5531
5532 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5533
5534 * thread.c (thr_try_catch_cmd): New function.
5535 (thread_apply_all_command): Handle qcs flags.
5536 (thread_apply_command): Handle qcs flags.
5537 (taas_command): New function.
5538 (tfaas_command): New function.
5539 (_initialize_thread): Update to setup the new commands 'taas
5540 and 'tfaas'. Change doc string for 'thread apply'.
5541
5542 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5543
5544 * stack.c: (trailing_outermost_frame): New function, mostly
5545 extracted from backtrace_command_1.
5546 (leading_innermost_frame): New function.
5547 (backtrace_command_1): Update to call trailing_outermost_frame.
5548 (frame_apply_command_count): New function.
5549 (frame_apply_level_command): New function.
5550 (frame_apply_all_command): New function.
5551 (frame_apply_command): New function.
5552 (faas_command): New function.
5553 (frame_cmd_list): New variable.
5554 (_initialize_stack): Update to setup the new commands 'frame apply'
5555 and 'faas'.
5556
5557 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5558
5559 * cli-utils.c (number_or_range_parser::get_number): Only handle
5560 numbers or convenience var as numbers.
5561 (parse_flags): New function.
5562 (parse_flags_qcs): New function.
5563 (number_or_range_parser::finished): Ensure parsing end is detected
5564 before end of string.
5565 * cli-utils.h (parse_flags): New function.
5566 (parse_flags_qcs): New function.
5567 (number_or_range_parser): Remove m_finished bool.
5568 (number_or_range_parser::skip_range): Set m_in_range to false.
5569
5570 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
5571
5572 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5573 on Windows.
5574
5575 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5576 Jan Kratochvil <jan.kratochvil@redhat.com>
5577 Paul Fertser <fercerpav@gmail.com>
5578 Tsutomu Seki <sekiriki@gmail.com>
5579 Pedro Alves <palves@redhat.com>
5580
5581 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5582 'unittests/parse-connection-spec-selftests.c'.
5583 (COMMON_SFILES): Add 'common/netstuff.c'.
5584 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5585 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5586 * common/netstuff.c: New file.
5587 * common/netstuff.h: New file.
5588 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5589 (wait_for_connect): Update comment. New parameter
5590 'gdb::optional<int> sock' instead of 'struct serial *scb'.
5591 Use 'sock' directly instead of 'scb->fd'.
5592 (try_connect): New function, with code from 'net_open'.
5593 (net_open): Rewrite main loop to deal with multiple
5594 sockets/addresses. Handle IPv6-style hostnames; implement
5595 support for IPv6 connections.
5596 * unittests/parse-connection-spec-selftests.c: New file.
5597
5598 2018-07-11 Pedro Alves <palves@redhat.com>
5599
5600 PR gdb/23377
5601 * remote.c (remote_target::remote_detach_pid): Call
5602 set_current_process.
5603
5604 2018-07-11 Pedro Alves <palves@redhat.com>
5605
5606 * h8300-tdep.c (h8300_gdbarch_init): Remove
5607 set_gdbarch_ecoff_reg_to_regnum calls.
5608
5609 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5610
5611 PR c++/23373
5612 * c-typeprint.c (c_type_print_base_struct_union): Don't print
5613 offsets/sizes for static members of a class/struct.
5614
5615 2018-07-11 Alan Hayward <alan.hayward@arm.com>
5616
5617 * target-descriptions.c (tdesc_register_bitsize): Rename.
5618 * target-descriptions.h (tdesc_register_bitsize): Likewise.
5619 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5620 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5621
5622 2018-07-10 Tom Tromey <tom@tromey.com>
5623
5624 * breakpoint.c (moribund_locations): Now static and a
5625 std::vector.
5626 (breakpoint_init_inferior, moribund_breakpoint_here_p)
5627 (build_bpstat_chain, update_global_location_list)
5628 (breakpoint_retire_moribund): Update.
5629 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
5630 VEC.
5631
5632 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5633
5634 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5635 (riscv_register_reggroup_p): Use new function, remove unneeded
5636 parenthesis.
5637 (riscv_push_dummy_call): Extend assert to compare against xlen or
5638 flen based on register type.
5639
5640 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5641
5642 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5643
5644 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
5645
5646 * remote.c (show_hardware_watchpoint_limit): New function.
5647 (show_hardware_watchpoint_length_limit): New function.
5648 (show_hardware_breakpoint_limit): New function.
5649 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5650 where appropriate, update help text.
5651
5652 2018-07-09 Tom Tromey <tom@tromey.com>
5653
5654 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5655 (CLIBS): Don't mention NAT_CLIBS.
5656
5657 2018-07-09 Tom Tromey <tom@tromey.com>
5658
5659 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5660 (LIBGDB_OBS, clean mostlyclean): Update.
5661 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5662
5663 2018-07-09 Tom Tromey <tom@tromey.com>
5664
5665 * Makefile.in (%.c: %.y): Use ECHO_YACC.
5666 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
5667 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5668
5669 2018-07-09 Tom Tromey <tom@tromey.com>
5670
5671 * Makefile.in (ALLDEPFILES): Remove exec.c.
5672 (COMMON_OBS): Remove exec.o.
5673 (COMMON_SFILES): Add exec.c.
5674
5675 2018-07-09 Tom Tromey <tom@tromey.com>
5676
5677 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5678
5679 2018-07-09 Tom Tromey <tom@tromey.com>
5680
5681 * Makefile.in (clean mostlyclean): Remove stamp-version.
5682 (version.c): Depend on stamp-version.
5683 (stamp-version): New rule, from version.c rule.
5684
5685 2018-07-09 Tom Tromey <tom@tromey.com>
5686
5687 * Makefile.in (init.c): Depend on stamp-init.
5688 (stamp-init): New rule, from init.c rule.
5689 (clean mostlyclean): Remove stamp-init.
5690
5691 2018-07-09 Tom Tromey <tom@tromey.com>
5692
5693 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5694 SUBDIR_GCC_COMPILE_SRCS.
5695
5696 2018-07-09 Tom Tromey <tom@tromey.com>
5697
5698 * Makefile.in (init.c): Remove some unused sed rules.
5699
5700 2018-07-09 Tom Tromey <tom@tromey.com>
5701
5702 * Makefile.in (TSOBS): Remove.
5703 (INIT_FILES): Update.
5704 (LIBGDB_OBS): Update.
5705 (COMMON_SFILES): Add inflow.c.
5706 (SFILES): Remove inflow.c.
5707
5708 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5709
5710 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5711
5712 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
5713
5714 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5715 get_saveloc_name, is_signal_frame_name, step_name,
5716 init_remote_name, create_addr_space_name,
5717 destroy_addr_space_name, search_unwind_table_name,
5718 find_dyn_list_name): Constify.
5719
5720 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
5721
5722 * darwin-nat.c (darwin_pthread_kill): New function.
5723 (darwin_resume_thread): Use darwin_pthread_kill.
5724
5725 2018-07-05 Tom de Vries <tdevries@suse.de>
5726
5727 * macroexp.c (macro_buffer) <operator=>: New member function.
5728
5729 2018-07-04 Tom Tromey <tom@tromey.com>
5730
5731 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5732
5733 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
5734
5735 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5736 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5737 * maint.c: Likewise.
5738 * top.c: Likewise.
5739
5740 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5741
5742 * NEWS: Create a new section for the next release branch.
5743 Rename the section of the current branch, now that it has
5744 been cut.
5745
5746 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5747
5748 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5749 * version.in: Bump version to 8.2.50.DATE-git.
5750
5751 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5752 Pedro Alves <palves@redhat.com>
5753
5754 * linux-nat.c (linux_init_ptrace): Rename to ...
5755 (linux_init_ptrace_procfs): ... this. Call
5756 linux_proc_init_warnings.
5757 (linux_nat_target::post_attach)
5758 (linux_nat_target::post_startup_inferior): Adjust.
5759 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5760 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5761
5762 2018-07-04 Tom de Vries <tdevries@suse.de>
5763
5764 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5765 check ...
5766 (read_comp_unit_head): ... here.
5767
5768 2018-07-03 Tom Tromey <tom@tromey.com>
5769
5770 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5771 (stop_tracing, tstatus_command)
5772 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5773 (print_one_static_tracepoint_marker): Update.
5774 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5775 std::vector.
5776 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
5777 VEC.
5778 (all_tracepoints, static_tracepoints_here): Return std::vector.
5779
5780 2018-07-03 Tom Tromey <tom@tromey.com>
5781
5782 * common/ptid.c (ptid_equal): Remove.
5783 * common/ptid.h (ptid_equal): Don't declare.
5784 * ada-tasks.c: Update.
5785 * breakpoint.c: Update.
5786 * common/agent.c: Update.
5787 * corelow.c: Update.
5788 * darwin-nat-info.c: Update.
5789 * darwin-nat.c: Update.
5790 * dcache.c: Update.
5791 * dtrace-probe.c: Update.
5792 * dummy-frame.c: Update.
5793 * fbsd-nat.c: Update.
5794 * frame.c: Update.
5795 * gdbthread.h: Update.
5796 * gnu-nat.c: Update.
5797 * go32-nat.c: Update.
5798 * inf-loop.c: Update.
5799 * inf-ptrace.c: Update.
5800 * infcall.c: Update.
5801 * infcmd.c: Update.
5802 * inflow.c: Update.
5803 * infrun.c: Update.
5804 * linux-fork.c: Update.
5805 * linux-nat.c: Update.
5806 * linux-thread-db.c: Update.
5807 * mi/mi-cmd-var.c: Update.
5808 * mi/mi-interp.c: Update.
5809 * mi/mi-main.c: Update.
5810 * nto-procfs.c: Update.
5811 * ppc-linux-tdep.c: Update.
5812 * procfs.c: Update.
5813 * python/py-inferior.c: Update.
5814 * python/py-record-btrace.c: Update.
5815 * python/py-record.c: Update.
5816 * ravenscar-thread.c: Update.
5817 * regcache.c: Update.
5818 * remote-sim.c: Update.
5819 * remote.c: Update.
5820 * sol-thread.c: Update.
5821 * solib.c: Update.
5822 * target.c: Update.
5823 * tui/tui-stack.c: Update.
5824 * varobj.c: Update.
5825 * windows-nat.c: Update.
5826 * windows-tdep.c: Update.
5827
5828 2018-07-03 Tom Tromey <tom@tromey.com>
5829
5830 * common/ptid.c (ptid_match): Remove.
5831 * common/ptid.h (ptid_match): Don't declare.
5832 * fbsd-nat.c: Update.
5833 * infcmd.c: Update.
5834 * infrun.c: Update.
5835 * linux-nat.c: Update.
5836 * record-btrace.c: Update.
5837 * regcache.c: Update.
5838 * remote.c: Update.
5839
5840 2018-07-03 Tom Tromey <tom@tromey.com>
5841
5842 * common/ptid.c (ptid_tid_p): Remove.
5843 * common/ptid.h (ptid_tid_p): Don't declare.
5844 * sol-thread.c: Update.
5845
5846 2018-07-03 Tom Tromey <tom@tromey.com>
5847
5848 * common/ptid.c (ptid_lwp_p): Remove.
5849 * common/ptid.h (ptid_lwp_p): Don't declare.
5850 * fbsd-nat.c: Update.
5851 * linux-nat.c: Update.
5852 * nat/linux-procfs.c: Update.
5853 * nat/x86-linux-dregs.c: Update.
5854 * sol-thread.c: Update.
5855
5856 2018-07-03 Tom Tromey <tom@tromey.com>
5857
5858 * common/ptid.c (ptid_is_pid): Remove.
5859 * common/ptid.h (ptid_is_pid): Don't declare.
5860 * infrun.c: Update.
5861 * linux-nat.c: Update.
5862 * mi/mi-interp.c: Update.
5863 * remote.c: Update.
5864 * thread.c: Update.
5865
5866 2018-07-03 Tom Tromey <tom@tromey.com>
5867
5868 * common/ptid.c (ptid_get_tid): Remove.
5869 * common/ptid.h (ptid_get_tid): Don't declare.
5870 * ada-tasks.c: Update.
5871 * aix-thread.c: Update.
5872 * bsd-uthread.c: Update.
5873 * darwin-nat.c: Update.
5874 * fbsd-nat.c: Update.
5875 * i386-darwin-nat.c: Update.
5876 * infrun.c: Update.
5877 * linux-tdep.c: Update.
5878 * nto-procfs.c: Update.
5879 * ppc-ravenscar-thread.c: Update.
5880 * python/py-infthread.c: Update.
5881 * ravenscar-thread.c: Update.
5882 * sol-thread.c: Update.
5883 * sparc-ravenscar-thread.c: Update.
5884 * windows-nat.c: Update.
5885
5886 2018-07-03 Tom Tromey <tom@tromey.com>
5887
5888 * common/ptid.c (ptid_get_lwp): Remove.
5889 * common/ptid.h (ptid_get_lwp): Don't declare.
5890 * aarch64-linux-nat.c: Update.
5891 * ada-tasks.c: Update.
5892 * aix-thread.c: Update.
5893 * amd64-linux-nat.c: Update.
5894 * arm-linux-nat.c: Update.
5895 * corelow.c: Update.
5896 * fbsd-nat.c: Update.
5897 * fbsd-tdep.c: Update.
5898 * gnu-nat.c: Update.
5899 * i386-cygwin-tdep.c: Update.
5900 * i386-gnu-nat.c: Update.
5901 * i386-linux-nat.c: Update.
5902 * ia64-linux-nat.c: Update.
5903 * inf-ptrace.c: Update.
5904 * infrun.c: Update.
5905 * linux-fork.c: Update.
5906 * linux-nat.c: Update.
5907 * linux-tdep.c: Update.
5908 * linux-thread-db.c: Update.
5909 * mips-linux-nat.c: Update.
5910 * nat/aarch64-linux-hw-point.c: Update.
5911 * nat/aarch64-linux.c: Update.
5912 * nat/linux-btrace.c: Update.
5913 * nat/linux-osdata.c: Update.
5914 * nat/linux-procfs.c: Update.
5915 * nat/x86-linux-dregs.c: Update.
5916 * obsd-nat.c: Update.
5917 * ppc-fbsd-nat.c: Update.
5918 * ppc-linux-nat.c: Update.
5919 * procfs.c: Update.
5920 * python/py-infthread.c: Update.
5921 * ravenscar-thread.c: Update.
5922 * remote.c: Update.
5923 * s390-linux-nat.c: Update.
5924 * sol-thread.c: Update.
5925 * sol2-tdep.c: Update.
5926 * spu-linux-nat.c: Update.
5927 * x86-linux-nat.c: Update.
5928 * xtensa-linux-nat.c: Update.
5929
5930 2018-07-03 Tom Tromey <tom@tromey.com>
5931
5932 * common/ptid.c (ptid_get_pid): Remove.
5933 * common/ptid.h (ptid_get_pid): Don't declare.
5934 * aarch64-linux-nat.c: Update.
5935 * ada-lang.c: Update.
5936 * aix-thread.c: Update.
5937 * alpha-bsd-nat.c: Update.
5938 * amd64-fbsd-nat.c: Update.
5939 * amd64-linux-nat.c: Update.
5940 * arm-linux-nat.c: Update.
5941 * arm-nbsd-nat.c: Update.
5942 * auxv.c: Update.
5943 * break-catch-syscall.c: Update.
5944 * breakpoint.c: Update.
5945 * bsd-uthread.c: Update.
5946 * corelow.c: Update.
5947 * ctf.c: Update.
5948 * darwin-nat.c: Update.
5949 * fbsd-nat.c: Update.
5950 * fbsd-tdep.c: Update.
5951 * gcore.c: Update.
5952 * gnu-nat.c: Update.
5953 * hppa-nbsd-nat.c: Update.
5954 * hppa-obsd-nat.c: Update.
5955 * i386-fbsd-nat.c: Update.
5956 * ia64-linux-nat.c: Update.
5957 * inf-ptrace.c: Update.
5958 * infcmd.c: Update.
5959 * inferior.c: Update.
5960 * inferior.h: Update.
5961 * inflow.c: Update.
5962 * infrun.c: Update.
5963 * linux-fork.c: Update.
5964 * linux-nat.c: Update.
5965 * linux-tdep.c: Update.
5966 * linux-thread-db.c: Update.
5967 * m68k-bsd-nat.c: Update.
5968 * mi/mi-interp.c: Update.
5969 * mi/mi-main.c: Update.
5970 * mips-linux-nat.c: Update.
5971 * mips-nbsd-nat.c: Update.
5972 * mips64-obsd-nat.c: Update.
5973 * nat/aarch64-linux-hw-point.c: Update.
5974 * nat/aarch64-linux.c: Update.
5975 * nat/linux-btrace.c: Update.
5976 * nat/linux-osdata.c: Update.
5977 * nat/linux-procfs.c: Update.
5978 * nat/x86-linux-dregs.c: Update.
5979 * nto-procfs.c: Update.
5980 * obsd-nat.c: Update.
5981 * ppc-linux-nat.c: Update.
5982 * ppc-nbsd-nat.c: Update.
5983 * ppc-obsd-nat.c: Update.
5984 * proc-service.c: Update.
5985 * procfs.c: Update.
5986 * python/py-inferior.c: Update.
5987 * python/py-infthread.c: Update.
5988 * ravenscar-thread.c: Update.
5989 * record.c: Update.
5990 * remote-sim.c: Update.
5991 * remote.c: Update.
5992 * rs6000-nat.c: Update.
5993 * s390-linux-nat.c: Update.
5994 * sh-nbsd-nat.c: Update.
5995 * sol-thread.c: Update.
5996 * sparc-nat.c: Update.
5997 * sparc64-tdep.c: Update.
5998 * spu-linux-nat.c: Update.
5999 * spu-tdep.c: Update.
6000 * target-debug.h: Update.
6001 * target.c: Update.
6002 * thread.c: Update.
6003 * tid-parse.c: Update.
6004 * tracefile-tfile.c: Update.
6005 * vax-bsd-nat.c: Update.
6006 * windows-nat.c: Update.
6007 * x86-linux-nat.c: Update.
6008 * x86-nat.c: Update.
6009
6010 2018-07-03 Tom Tromey <tom@tromey.com>
6011
6012 * common/ptid.c (pid_to_ptid): Remove.
6013 * common/ptid.h (pid_to_ptid): Don't declare.
6014 * aix-thread.c: Update.
6015 * arm-linux-nat.c: Update.
6016 * common/ptid.c: Update.
6017 * common/ptid.h: Update.
6018 * corelow.c: Update.
6019 * ctf.c: Update.
6020 * darwin-nat.c: Update.
6021 * fbsd-nat.c: Update.
6022 * fork-child.c: Update.
6023 * gnu-nat.c: Update.
6024 * go32-nat.c: Update.
6025 * inf-ptrace.c: Update.
6026 * infcmd.c: Update.
6027 * inferior.c: Update.
6028 * infrun.c: Update.
6029 * linux-fork.c: Update.
6030 * linux-nat.c: Update.
6031 * nat/aarch64-linux-hw-point.c: Update.
6032 * nat/fork-inferior.c: Update.
6033 * nat/x86-linux-dregs.c: Update.
6034 * nto-procfs.c: Update.
6035 * obsd-nat.c: Update.
6036 * procfs.c: Update.
6037 * progspace.c: Update.
6038 * remote.c: Update.
6039 * rs6000-nat.c: Update.
6040 * s390-linux-nat.c: Update.
6041 * sol-thread.c: Update.
6042 * spu-linux-nat.c: Update.
6043 * target.c: Update.
6044 * top.c: Update.
6045 * tracefile-tfile.c: Update.
6046 * windows-nat.c: Update.
6047
6048 2018-07-03 Tom Tromey <tom@tromey.com>
6049
6050 * common/ptid.h (ptid_build): Don't declare.
6051 * common/ptid.c (ptid_build): Remove.
6052 * aix-thread.c: Update.
6053 * bsd-kvm.c: Update.
6054 * bsd-uthread.c: Update.
6055 * common/agent.c: Update.
6056 * common/ptid.c: Update.
6057 * common/ptid.h: Update.
6058 * corelow.c: Update.
6059 * darwin-nat.c: Update.
6060 * fbsd-nat.c: Update.
6061 * gnu-nat.c: Update.
6062 * linux-fork.c: Update.
6063 * linux-nat.c: Update.
6064 * linux-thread-db.c: Update.
6065 * nat/linux-osdata.c: Update.
6066 * nat/linux-procfs.c: Update.
6067 * nto-procfs.c: Update.
6068 * obsd-nat.c: Update.
6069 * proc-service.c: Update.
6070 * procfs.c: Update.
6071 * ravenscar-thread.c: Update.
6072 * remote-sim.c: Update.
6073 * remote.c: Update.
6074 * sol-thread.c: Update.
6075 * target.c: Update.
6076 * windows-nat.c: Update.
6077
6078 2018-07-03 Tom Tromey <tom@tromey.com>
6079
6080 * infrun.c (follow_exec): Use exit_inferior_silent.
6081 * inferior.c (exit_inferior_num_silent): Remove.
6082 * inferior.h (exit_inferior_num_silent): Don't declare.
6083
6084 2018-07-03 Tom Tromey <tom@tromey.com>
6085
6086 PR cli/23340:
6087 * darwin-nat.c (darwin_attach_pid): Reset inferior and
6088 inferior_ptid on error.
6089
6090 2018-07-02 Maciej W. Rozycki <macro@mips.com>
6091 Simon Marchi <simon.marchi@polymtl.ca>
6092
6093 PR tdep/8282
6094 * disasm.h (gdb_disassembler): Add
6095 `m_disassembler_options_holder'. member
6096 * disasm.c (get_all_disassembler_options): New function.
6097 (gdb_disassembler::gdb_disassembler): Use it.
6098 (gdb_buffered_insn_length_init_dis): Likewise.
6099 (gdb_buffered_insn_length): Adjust accordingly.
6100 (set_disassembler_options): Handle options with arguments.
6101 (show_disassembler_options_sfunc): Likewise. Add a leading new
6102 line if showing options with descriptions.
6103 (disassembler_options_completer): Adapt to using the
6104 `disasm_options_and_args_t' structure.
6105 * mips-tdep.c (mips_disassembler_options): New variable.
6106 (mips_disassembler_options_o32): Likewise.
6107 (mips_disassembler_options_n32): Likewise.
6108 (mips_disassembler_options_n64): Likewise.
6109 (gdb_print_insn_mips): Don't set `disassembler_options'.
6110 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6111 functions.
6112 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6113 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
6114 `gdbarch_disassembler_options_implicit' and
6115 `gdbarch_valid_disassembler_options'.
6116 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6117 `disasm_options_and_args_t' structure.
6118 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6119 method.
6120 (valid_disassembler_options): Switch from `disasm_options_t' to
6121 the `disasm_options_and_args_t' structure.
6122 * NEWS: Document `set disassembler-options' support for the MIPS
6123 target.
6124 * gdbarch.h: Regenerate.
6125 * gdbarch.c: Regenerate.
6126
6127 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
6128
6129 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6130
6131 2018-06-29 Joel Brobecker <brobecker@adacore.com>
6132
6133 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6134 parameter in call to amd64_target_description.
6135 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6136 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6137 (amd64fbsd_init_abi): Likewise.
6138 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6139 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6140 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6141 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6142
6143 2018-06-29 Pedro Alves <palves@redhat.com>
6144
6145 * gdb/amd64-tdep.h (amd64_create_target_description): Add
6146 "segments" parameter.
6147 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6148 (_initialize_amd64_tdep): Update call to
6149 amd64_create_target_description.
6150 (amd64_target_description): Add "segments" parameter. Adjust
6151 the implementation to use it.
6152 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6153 call to amd64_create_target_description.
6154 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6155 * gdb/arch/amd64.h (amd64_create_target_description): Add
6156 "segments" register.
6157 * gdb/arch/amd64.c (amd64_create_target_description): Add
6158 "segments" parameter. Call create_feature_i386_64bit_segments
6159 only if SEGMENTS is true.
6160 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6161 call to amd64_create_target_description.
6162
6163 2018-06-29 Pedro Alves <palves@redhat.com>
6164
6165 * thread.c (thread_target_id_str): New, factored out from ...
6166 (print_thread_info_1): ... here. Use it to compute the max
6167 "Target Id" column width.
6168
6169 2018-06-29 Pedro Alves <palves@redhat.com>
6170
6171 * remote.c (remote_target::extra_thread_info): Delete
6172 'display_buf' and 'n' locals. from the cache, regardless of
6173 packet mechanims is in use. Use cache for qThreadExtra and qP
6174 methods too.
6175
6176 2018-06-29 Pedro Alves <palves@redhat.com>
6177
6178 * blockframe.c (find_pc_sect_containing_function): New function.
6179 * breakpoint.c (print_breakpoint_location): Don't call
6180 find_pc_sect_function.
6181 * linespec.c (create_sals_line_offset): Record the location's
6182 symbol in the sal.
6183 * linespec.c (convert_address_location_to_sals): Fill in sal's
6184 symbol with find_pc_sect_containing_function.
6185 * symtab.c (find_function_start_sal): Rename to ...
6186 (find_function_start_sal_1): ... this.
6187 (find_function_start_sal): Reimplement as wrapper around
6188 find_function_start_sal_1, and use
6189 find_pc_sect_containing_function to fill in the sal's symbol.
6190 (find_function_start_sal(symbol*, bool)): Adjust.
6191 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6192 comments.
6193 (find_pc_sect_containing_function): Declare.
6194
6195 2018-06-29 Pedro Alves <palves@redhat.com>
6196
6197 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6198 true if the the location has no symbol.
6199
6200 2018-06-28 Tom Tromey <tom@tromey.com>
6201
6202 * NEWS: Mention --enable-codesign.
6203 * silent-rules.mk (ECHO_SIGN): New variable.
6204 * configure.ac: Add --enable-codesign.
6205 * configure: Rebuild.
6206 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6207 (gdb$(EXEEXT)): Optionally invoke codesign.
6208
6209 2018-06-28 Pedro Alves <palves@redhat.com>
6210
6211 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6212 comments.
6213 (switch_to_thread_no_regs): Adjust comment.
6214 * infcmd.c (stop_pc): Delete.
6215 (post_create_inferior, info_program_command): Replace references
6216 to stop_pc with references to thread_info->suspend.stop_pc.
6217 * inferior.h (stop_pc): Delete declaration.
6218 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6219 (handle_inferior_event_1, handle_signal_stop)
6220 (process_event_stop_test, keep_going_stepped_thread)
6221 (handle_step_into_function, handle_step_into_function_backward)
6222 (print_stop_location): Replace references to stop_pc with
6223 references to thread_info->suspend.stop_pc.
6224 (struct infcall_suspend_state) <stop_pc>: Delete field.
6225 (save_infcall_suspend_state, restore_infcall_suspend_state):
6226 Remove references to inf_stat->stop_pc.
6227 * linux-fork.c (fork_load_infrun_state): Likewise.
6228 * record-btrace.c (record_btrace_set_replay): Likewise.
6229 * record-full.c (record_full_goto_entry): Likewise.
6230 * remote.c (print_one_stopped_thread): Likewise.
6231 * target.c (target_resume): Extend comment.
6232 * thread.c (set_executing_thread): New.
6233 (set_executing): Use it.
6234 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6235 Remove references to stop_pc.
6236
6237 2018-06-28 Pedro Alves <palves@redhat.com>
6238
6239 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6240 Moving fetching stop_pc until after ecs->event_thread is refreshed.
6241
6242 2018-06-28 Tom Tromey <tom@tromey.com>
6243
6244 * coffread.c (coff_symfile_finish): Update.
6245 * xcoffread.c (xcoff_symfile_finish): Update.
6246 * elfread.c (elf_symfile_finish): Update.
6247 * symfile.h (dwarf2_free_objfile): Don't declare.
6248 * dwarf2read.c (_initialize_dwarf2_read): Use
6249 register_objfile_data_with_cleanup.
6250 (dwarf2_free_objfile): Now static. Change signature.
6251
6252 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6253
6254 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6255 option "-o" to add-symbol-file-load to add an offset to each
6256 section's load address.
6257 * symfile.c (set_objfile_default_section_offset): New function.
6258
6259 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6260
6261 * symfile.c (add_symbol_file_command): Make sure that sections
6262 with the same name are sorted in the same order.
6263
6264 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6265
6266 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6267 require the second argument. If omitted, load sections at the
6268 addresses specified in the file.
6269
6270 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6271
6272 * symfile.c (symbol_file_command, symbol_file_add_main_1)
6273 (_initialize_symfile): Add option "-o" to symbol-file to add an
6274 offset to each section of the symbol file.
6275
6276 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6277
6278 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6279
6280 2018-06-27 Tom Tromey <tom@tromey.com>
6281
6282 * stack.c (_initialize_stack): Update "func" help text.
6283
6284 2018-06-27 Tom Tromey <tom@tromey.com>
6285
6286 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6287 std::vector.
6288 (unwind_infopy_str, pyuw_create_unwind_info)
6289 (unwind_infopy_add_saved_register, pyuw_sniffer)
6290 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6291 Update.
6292 (struct saved_reg): Add constructor.
6293 <value>: Now a gdbpy_ref<>.
6294
6295 2018-06-27 Tom Tromey <tom@tromey.com>
6296
6297 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6298
6299 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6300
6301 * gdb-gdb.py.in: Format using autopep8.
6302
6303 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6304
6305 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6306 (type_lookup_function): Recognize CORE_ADDR values.
6307
6308 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6309
6310 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6311 print tag_name.
6312
6313 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6314
6315 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6316 <__lt__>: Add.
6317
6318 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6319
6320 * gdb-gdb.py: Move to...
6321 * gdb-gdb.py.in: ... here.
6322 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6323 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6324 dependencies.
6325 (distclean): Remove gdb-gdb.py when cleaning.
6326 (gdb-gdb.py, gdb-gdb.gdb): New rules.
6327 * configure: Re-generate.
6328
6329 2018-06-27 Pedro Alves <palves@redhat.com>
6330
6331 * proc-service.c (get_ps_regcache): New.
6332 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6333 (ps_lsetfpregs): Use it.
6334
6335 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
6336
6337 PR gdb/21695
6338 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6339 (dwarf_decode_lines_1): Adjust.
6340
6341 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6342
6343 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6344 override.
6345 <info_proc>: Likewise.
6346
6347 2018-06-26 Joel Brobecker <brobecker@adacore.com>
6348
6349 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6350 to windows_fetch_one_register, and only handle the case of
6351 fetching one register. Move the code that reloads the context
6352 and iterates over all registers if R is negative to...
6353 (windows_nat_target::fetch_registers): ... here.
6354 (do_windows_store_inferior_registers): Rename to
6355 windows_store_one_register, and only handle the case of storing
6356 one register. Move the code that handles the case where r is
6357 negative to...
6358 (windows_nat_target::store_registers) ... here.
6359
6360 2018-06-26 Tom Tromey <tom@tromey.com>
6361
6362 PR rust/22574:
6363 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6364 * rust-lang.c (rust_print_struct_def): Add podata parameter.
6365 Update.
6366 (rust_internal_print_type): Add podata parameter.
6367 (rust_print_type): Update.
6368
6369 2018-06-26 Tom Tromey <tom@tromey.com>
6370
6371 * typeprint.h (struct print_offset_data) <update, finish,
6372 maybe_print_hole>: New methods.
6373 <indentation>: New constant.
6374 * typeprint.c (print_offset_data::indentation): Define.
6375 (print_offset_data::maybe_print_hole, print_offset_data::update)
6376 (print_offset_data::finish): Move from c-typeprint.c and rename.
6377 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6378 (print_spaces_filtered_with_print_options): Update.
6379 (c_print_type_union_field_offset, maybe_print_hole)
6380 (c_print_type_struct_field_offset): Move to typeprint.c and
6381 rename.
6382 (c_type_print_base_struct_union): Update.
6383
6384 2018-06-25 Pedro Alves <palves@redhat.com>
6385
6386 * gdbthread.h (thread_info_ref, delete_thread)
6387 (delete_thread_silent, first_thread_of_inferior)
6388 (any_thread_of_inferior, switch_to_thread)
6389 (enable_thread_stack_temporaries)
6390 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6391 (get_last_thread_stack_temporary)
6392 (value_in_thread_stack_temporaries, can_access_registers_thread):
6393 Spell out "struct thread_info" instead of just "thread_info".
6394 * inferior.h (notice_new_inferior): Likewise.
6395
6396 2018-06-25 Pedro Alves <palves@redhat.com>
6397
6398 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6399 pass thread_info pointer to delete_thread.
6400 (windows_nat_target::detach): Pass inferior pointer to
6401 detach_inferior.
6402 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6403 delete_thread.
6404 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6405 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6406 and pass a thread_info pointer to delete_thread.
6407 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6408 pass thread_info pointer to delete_thread.
6409 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6410 delete_thread_silent call.
6411 * procfs.c (procfs_target::detach): Pass inferior pointer to
6412 detach_inferior.
6413 (procfs_target::wait): Pass thread_info pointer to delete_thread.
6414 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6415 delete_thread_silent call.
6416 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6417 pass thread_info pointer to delete_thread.
6418 (windows_nat_target::detach): Pass inferior pointer to
6419 delete_inferior.
6420
6421 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6422
6423 * regcache.c (readable_regcache::read_part): Fix asserts.
6424 (reg_buffer::raw_collect_part): New function.
6425 (regcache::write_part): Fix asserts.
6426 (reg_buffer::raw_supply_part): New function.
6427 (regcache::transfer_regset_register): New helper function.
6428 (regcache::transfer_regset): Call new functions.
6429 (regcache_supply_regset): Use gdb_byte*.
6430 (regcache::supply_regset): Likewise.
6431 (regcache_collect_regset): Likewise.
6432 (regcache::collect_regset): Likewise.
6433 * regcache.h (reg_buffer::raw_collect_part): New declaration.
6434 (reg_buffer::raw_supply_part): Likewise.
6435 (regcache::transfer_regset_register): Likewise.
6436 (regcache::transfer_regset): Use gdb_byte*.
6437
6438 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6439
6440 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6441
6442 2018-06-21 Pedro Alves <palves@redhat.com>
6443
6444 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6445 instead of a ptid_t. All callers adjusted.
6446 * ada-tasks.c (ada_get_task_number): Likewise. All callers
6447 adjusted.
6448 (print_ada_task_info, display_current_task_id, task_command_1):
6449 Adjust.
6450 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6451 inferior_thread.
6452 (breakpoint_kind): Adjust.
6453 (remove_breakpoints_pid): Rename to ...
6454 (remove_breakpoints_inf): ... this. Adjust to take an inferior
6455 pointer. All callers adjusted.
6456 (bpstat_clear_actions): Use inferior_thread.
6457 (get_bpstat_thread): New.
6458 (bpstat_do_actions): Use it.
6459 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6460 to take a thread_info pointer. All callers adjusted.
6461 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6462 (breakpoint_re_set_thread): Use inferior_thread.
6463 * breakpoint.h (struct inferior): Forward declare.
6464 (bpstat_stop_status): Update.
6465 (remove_breakpoints_pid): Delete.
6466 (remove_breakpoints_inf): New.
6467 * bsd-uthread.c (bsd_uthread_target::wait)
6468 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6469 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6470 (maint_btrace_packet_history_cmd)
6471 (maint_btrace_clear_packet_history_cmd): Adjust.
6472 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6473 inferior_thread.
6474 * cli/cli-interp.c: Include "inferior.h".
6475 * common/refcounted-object.h (struct
6476 refcounted_object_ref_policy): New.
6477 * compile/compile-object-load.c: Include gdbthread.h.
6478 (store_regs): Use inferior_thread.
6479 * corelow.c (core_target::close): Use current_inferior.
6480 (core_target_open): Adjust to use first_thread_of_inferior and use
6481 the current inferior.
6482 * ctf.c (ctf_target::close): Adjust to use current_inferior.
6483 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6484 <thread>: ... this new field. All references adjusted.
6485 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6486 Take a thread_info pointer instead of a ptid_t.
6487 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6488 (dummy_frame_discard, register_dummy_frame_dtor): Take a
6489 thread_info pointer instead of a ptid_t.
6490 * elfread.c: Include "inferior.h".
6491 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6492 Use inferior_thread.
6493 * eval.c (evaluate_subexp): Likewise.
6494 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6495 inferior_thread.
6496 * gdb_proc_service.h (struct thread_info): Forward declare.
6497 (struct ps_prochandle) <ptid>: Delete, replaced by ...
6498 <thread>: ... this new field. All references adjusted.
6499 * gdbarch.h, gdbarch.c: Regenerate.
6500 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6501 'thread' parameter. All implementations and callers adjusted.
6502 * gdbthread.h (thread_info) <set_running>: New method.
6503 (delete_thread, delete_thread_silent): Take a thread_info pointer
6504 instead of a ptid.
6505 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6506 (first_thread_of_process): Delete, replaced by ...
6507 (first_thread_of_inferior): ... this new function. All callers
6508 adjusted.
6509 (any_live_thread_of_process): Delete, replaced by ...
6510 (any_live_thread_of_inferior): ... this new function. All callers
6511 adjusted.
6512 (switch_to_thread, switch_to_no_thread): Declare.
6513 (is_executing): Delete.
6514 (enable_thread_stack_temporaries): Update comment.
6515 <enable_thread_stack_temporaries>: Take a thread_info pointer
6516 instead of a ptid_t. Incref the thread.
6517 <~enable_thread_stack_temporaries>: Decref the thread.
6518 <m_ptid>: Delete
6519 <m_thr>: New.
6520 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6521 (get_last_thread_stack_temporary)
6522 (value_in_thread_stack_temporaries, can_access_registers_thread):
6523 Take a thread_info pointer instead of a ptid_t. All callers
6524 adjusted.
6525 * infcall.c (get_call_return_value): Use inferior_thread.
6526 (run_inferior_call): Work with thread pointers instead of ptid_t.
6527 (call_function_by_hand_dummy): Work with thread pointers instead
6528 of ptid_t. Use thread_info_ref.
6529 * infcmd.c (proceed_thread_callback): Access thread's state
6530 directly.
6531 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6532 access thread's state directly.
6533 (continue_command): Use inferior_thread.
6534 (info_program_command): Use find_thread_ptid and access thread
6535 state directly.
6536 (proceed_after_attach_callback): Use thread state directly.
6537 (notice_new_inferior): Take a thread_info pointer instead of a
6538 ptid_t. All callers adjusted.
6539 (exit_inferior): Take an inferior pointer instead of a pid. All
6540 callers adjusted.
6541 (exit_inferior_silent): New.
6542 (detach_inferior): Delete.
6543 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6544 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6545 (detach_inferior_command, kill_inferior_command): Use
6546 find_inferior_id instead of valid_gdb_inferior_id and
6547 gdb_inferior_id_to_pid.
6548 (inferior_command): Use inferior and thread pointers.
6549 * inferior.h (struct thread_info): Forward declare.
6550 (notice_new_inferior): Take a thread_info pointer instead of a
6551 ptid_t. All callers adjusted.
6552 (detach_inferior): Delete declaration.
6553 (exit_inferior, exit_inferior_silent): Take an inferior pointer
6554 instead of a pid. All callers adjusted.
6555 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6556 (valid_gdb_inferior_id): Delete.
6557 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6558 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6559 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6560 ...
6561 <inf>: ... this new field.
6562 <step_ptid>: Delete, replaced by ...
6563 <step_thread>: ... this new field.
6564 (get_displaced_stepping_state): Take an inferior pointer instead
6565 of a pid. All callers adjusted.
6566 (displaced_step_in_progress_any_inferior): Adjust.
6567 (displaced_step_in_progress_thread): Take a thread pointer instead
6568 of a ptid_t. All callers adjusted.
6569 (displaced_step_in_progress, add_displaced_stepping_state): Take
6570 an inferior pointer instead of a pid. All callers adjusted.
6571 (get_displaced_step_closure_by_addr): Adjust.
6572 (remove_displaced_stepping_state): Take an inferior pointer
6573 instead of a pid. All callers adjusted.
6574 (displaced_step_prepare_throw, displaced_step_prepare)
6575 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6576 All callers adjusted.
6577 (start_step_over): Adjust.
6578 (infrun_thread_ptid_changed): Remove bit updating ptids in the
6579 displaced step queue.
6580 (do_target_resume): Adjust.
6581 (fetch_inferior_event): Use inferior_thread.
6582 (context_switch, get_inferior_stop_soon): Take an
6583 execution_control_state pointer instead of a ptid_t. All callers
6584 adjusted.
6585 (switch_to_thread_cleanup): Delete.
6586 (stop_all_threads): Use scoped_restore_current_thread.
6587 * inline-frame.c: Include "gdbthread.h".
6588 (inline_state) <inline_state>: Take a thread pointer instead of a
6589 ptid_t. All callers adjusted.
6590 <ptid>: Delete, replaced by ...
6591 <thread>: ... this new field.
6592 (find_inline_frame_state): Take a thread pointer instead of a
6593 ptid_t. All callers adjusted.
6594 (skip_inline_frames, step_into_inline_frame)
6595 (inline_skipped_frames, inline_skipped_symbol): Take a thread
6596 pointer instead of a ptid_t. All callers adjusted.
6597 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6598 (inline_skipped_frames, inline_skipped_symbol): Likewise.
6599 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6600 pointers directly.
6601 * linux-nat.c (get_detach_signal): Likewise.
6602 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6603 (thread_db_notice_clone): Adjust.
6604 (thread_db_find_new_threads_silently)
6605 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6606 a thread pointer instead of a ptid_t. All callers adjusted.
6607 * mi/mi-cmd-var.c: Include "inferior.h".
6608 (mi_cmd_var_update_iter): Update to use thread pointers.
6609 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6610 inferior directly.
6611 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6612 out to ...
6613 (mi_output_running): ... this new function.
6614 (mi_on_resume_1): Adjust to use it.
6615 (mi_user_selected_context_changed): Adjust to use inferior_thread.
6616 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6617 directly.
6618 (interrupt_thread_callback): : Adjust to use thread and inferior
6619 pointers.
6620 * proc-service.c: Include "gdbthread.h".
6621 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6622 * progspace-and-thread.c: Include "inferior.h".
6623 * progspace.c: Include "inferior.h".
6624 * python/py-exitedevent.c (create_exited_event_object): Adjust to
6625 hold a reference to an inferior_object.
6626 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6627 inferior_thread.
6628 * python/py-inferior.c (struct inferior_object): Give the type a
6629 tag name instead of a typedef.
6630 (python_on_normal_stop): No need to check if the current thread is
6631 listed.
6632 (inferior_to_inferior_object): Change return type to
6633 inferior_object. All callers adjusted.
6634 (find_thread_object): Delete, bits factored out to ...
6635 (thread_to_thread_object): ... this new function.
6636 * python/py-infthread.c (create_thread_object): Use
6637 inferior_to_inferior_object.
6638 (thpy_is_stopped): Use thread pointer directly.
6639 (gdbpy_selected_thread): Use inferior_thread.
6640 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6641 field, replaced with ...
6642 <thread>: ... this new field. All users adjusted.
6643 (btpy_insn_or_gap_new): Drop const.
6644 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
6645 callers adjusted.
6646 * python/py-record.c: Include "gdbthread.h".
6647 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6648 a ptid_t. All callers adjusted.
6649 (gdbpy_current_recording): Use inferior_thread.
6650 * python/py-record.h (recpy_record_object) <ptid>: Delete
6651 field, replaced with ...
6652 <thread>: ... this new field. All users adjusted.
6653 (recpy_element_object) <ptid>: Delete
6654 field, replaced with ...
6655 <thread>: ... this new field. All users adjusted.
6656 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6657 a ptid_t. All callers adjusted.
6658 * python/py-threadevent.c: Include "gdbthread.h".
6659 (get_event_thread): Use thread_to_thread_object.
6660 * python/python-internal.h (struct inferior_object): Forward
6661 declare.
6662 (find_thread_object, find_inferior_object): Delete declarations.
6663 (thread_to_thread_object, inferior_to_inferior_object): New
6664 declarations.
6665 * record-btrace.c: Include "inferior.h".
6666 (require_btrace_thread): Use inferior_thread.
6667 (record_btrace_frame_sniffer)
6668 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6669 (get_thread_current_frame): Use scoped_restore_current_thread and
6670 switch_to_thread.
6671 (get_thread_current_frame): Use thread pointer directly.
6672 (record_btrace_replay_at_breakpoint): Use thread's inferior
6673 pointer directly.
6674 * record-full.c: Include "inferior.h".
6675 * regcache.c: Include "gdbthread.h".
6676 (get_thread_arch_regcache): Use the inferior's address space
6677 directly.
6678 (get_thread_regcache, registers_changed_thread): New.
6679 * regcache.h (get_thread_regcache(thread_info *thread)): New
6680 overload.
6681 (registers_changed_thread): New.
6682 (remote_target) <remote_detach_1>: Swap order of parameters.
6683 (remote_add_thread): <remote_add_thread>: Return the new thread.
6684 (get_remote_thread_info(ptid_t)): New overload.
6685 (remote_target::remote_notice_new_inferior): Use thread pointers
6686 directly.
6687 (remote_target::process_initial_stop_replies): Use
6688 thread_info::set_running.
6689 (remote_target::remote_detach_1, remote_target::detach)
6690 (extended_remote_target::detach): Adjust.
6691 * stack.c (frame_show_address): Use inferior_thread.
6692 * target-debug.h (target_debug_print_thread_info_pp): New.
6693 * target-delegates.c: Regenerate.
6694 * target.c (default_thread_address_space): Delete.
6695 (memory_xfer_partial_1): Use current_inferior.
6696 (target_detach): Use current_inferior.
6697 (target_thread_address_space): Delete.
6698 (generic_mourn_inferior): Use current_inferior.
6699 * target.h (struct target_ops) <thread_address_space>: Delete.
6700 (target_thread_address_space): Delete.
6701 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
6702 pointers directly.
6703 (delete_thread_1, delete_thread, delete_thread_silent): Take a
6704 thread pointer instead of a ptid_t. Adjust all callers.
6705 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6706 (first_thread_of_process): Delete, replaced by ...
6707 (first_thread_of_inferior): ... this new function. All callers
6708 adjusted.
6709 (any_thread_of_process): Rename to ...
6710 (any_thread_of_inferior): ... this, and take an inferior pointer.
6711 (any_live_thread_of_process): Rename to ...
6712 (any_live_thread_of_inferior): ... this, and take an inferior
6713 pointer.
6714 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6715 (value_in_thread_stack_temporaries)
6716 (get_last_thread_stack_temporary): Take a thread pointer instead
6717 of a ptid_t. Adjust all callers.
6718 (thread_info::set_running): New.
6719 (validate_registers_access): Use inferior_thread.
6720 (can_access_registers_ptid): Rename to ...
6721 (can_access_registers_thread): ... this, and take a thread
6722 pointer.
6723 (print_thread_info_1): Adjust to compare thread pointers instead
6724 of ptids.
6725 (switch_to_no_thread, switch_to_thread): Make extern.
6726 (scoped_restore_current_thread::~scoped_restore_current_thread):
6727 Use m_thread pointer directly.
6728 (scoped_restore_current_thread::scoped_restore_current_thread):
6729 Use inferior_thread.
6730 (thread_command): Use thread pointer directly.
6731 (thread_num_make_value_helper): Use inferior_thread.
6732 * top.c (execute_command): Use inferior_thread.
6733 * tui/tui-interp.c: Include "inferior.h".
6734 * varobj.c (varobj_create): Use inferior_thread.
6735 (value_of_root_1): Use find_thread_global_id instead of
6736 global_thread_id_to_ptid.
6737
6738 2018-06-21 Alan Hayward <alan.hayward@arm.com>
6739
6740 * regcache.c (readable_regcache::read_part): Avoid memcpy when
6741 possible.
6742 (regcache::write_part): Likewise.
6743 (readable_regcache::cooked_read_part): Update comment.
6744 (readable_regcache::cooked_write_part): Likewise.
6745 * regcache.h: (readable_regcache::read_part): Likewise.
6746 (regcache::write_part): Likewise.
6747
6748 2018-06-21 Richard Bunt <richard.bunt@arm.com>
6749 Dirk Schubert <dirk.schubert@arm.com>
6750
6751 * aarch64-linux-nat.c (post_attach): New.
6752 (aarch64_linux_nat_target::post_attach): Override post_attach to
6753 record the number of hardware debug registers.
6754
6755 2018-06-20 Tom Tromey <tom@tromey.com>
6756
6757 * python/py-param.c (add_setshow_generic): Make parameters const.
6758 (parmpy_init): Update.
6759
6760 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6761
6762 * regcache.h (regcache_cooked_read_ftype): Rename to...
6763 (register_read_ftype): ...this, change type to function_view.
6764 (class reg_buffer) <save>: Remove src parameter.
6765 (readonly_detached_regcache) <readonly_detached_regcache>: Make
6766 parameter non-const in first overload. Remove src parameter in
6767 second overload.
6768 * regcache.c (do_cooked_read): Remove.
6769 (readonly_detached_regcache::readonly_detached_regcache): Make
6770 parameter non-const, adjust call to other constructor.
6771 (reg_buffer::save): Remove src parameter.
6772 * frame.c (do_frame_register_read): Remove.
6773 (frame_save_as_regcache): Use lambda function.
6774 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6775 parameter to ppu2spu_data *.
6776 (ppu2spu_sniffer): Use lambda function.
6777
6778 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6779
6780 * record-full.c (record_full_target::insert_breakpoint): Remove
6781 "struct" keyword, add const.
6782
6783 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6784
6785 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6786 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6787 * configure.ac: Remove AC_PREREQ, add missing quoting.
6788 * gnulib/configure.ac: Modernize usage of
6789 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
6790 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6791 (AUTOMAKE_VERSION): Bump to 1.15.1.
6792 * configure: Re-generate.
6793 * config.in: Re-generate.
6794 * aclocal.m4: Re-generate.
6795 * gnulib/aclocal.m4: Re-generate.
6796 * gnulib/config.in: Re-generate.
6797 * gnulib/configure: Re-generate.
6798 * gnulib/import/Makefile.in: Re-generate.
6799
6800 2018-06-19 Pedro Alves <palves@redhat.com>
6801
6802 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6803 (lookup_minimal_symbol_by_pc_section): ... here with
6804 gdb_assert_not_reached added.
6805
6806 2018-06-19 Pedro Alves <palves@redhat.com>
6807
6808 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6809 parameter with a block parameter. Compare location's block symbol
6810 with the frame's block instead of addresses.
6811 (skip_inline_frames): Pass the current block instead of the
6812 frame's address. Break out as soon as we determine the frame
6813 should not be skipped.
6814
6815 2018-06-18 Tom Tromey <tom@tromey.com>
6816
6817 * solib-aix.c (solib_aix_get_section_offsets): Return
6818 unique_xmalloc_ptr.
6819 (solib_aix_solib_create_inferior_hook): Update.
6820
6821 2018-06-18 Tom Tromey <tom@tromey.com>
6822
6823 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6824
6825 2018-06-18 Tom Tromey <tom@tromey.com>
6826
6827 * solib-frv.c (frv_relocate_main_executable): Use
6828 unique_xmalloc_ptr.
6829 * solib-dsbt.c (dsbt_relocate_main_executable): Use
6830 unique_xmalloc_ptr.
6831
6832 2018-06-18 Tom Tromey <tom@tromey.com>
6833
6834 * objfiles.h (inhibit_section_map_updates): Update.
6835 (resume_section_map_updates, resume_section_map_updates_cleanup):
6836 Remove.
6837 * solib-svr4.c (svr4_handle_solib_event): Update.
6838 * objfiles.c (inhibit_section_map_updates): Return
6839 scoped_restore_tmpl<int>.
6840 (resume_section_map_updates, resume_section_map_updates_cleanup):
6841 Remove.
6842
6843 2018-06-18 Tom Tromey <tom@tromey.com>
6844
6845 * valprint.h (read_string): Update.
6846 * valprint.c (read_string): Change type of "buffer".
6847 (val_print_string): Update.
6848 * python/py-value.c (valpy_string): Update.
6849 * language.h (struct language_defn) <la_get_string>: Change
6850 type of "buffer".
6851 (default_get_string, c_get_string): Update.
6852 * language.c (default_get_string): Change type of "buffer".
6853 * guile/scm-value.c (gdbscm_value_to_string): Update.
6854 * c-lang.c (c_get_string): Change type of "buffer".
6855
6856 2018-06-18 Tom Tromey <tom@tromey.com>
6857
6858 * ser-mingw.c (struct pipe_state_destroyer): New.
6859 (pipe_state_up): New typedef.
6860 (cleanup_pipe_state): Remove.
6861 (pipe_windows_open): Use pipe_state_up. Don't release argv.
6862
6863 2018-06-18 Tom Tromey <tom@tromey.com>
6864
6865 * rust-lang.h (rust_yyerror): Don't declare.
6866 * rust-lang.c (rust_language_defn): Update.
6867 * rust-exp.y (yyerror): Now static.
6868 * parse.c (parse_exp_in_context_1): Update.
6869 * p-lang.h (p_yyerror): Don't declare.
6870 * p-lang.c (p_language_defn): Update.
6871 * p-exp.y (yyerror): Now static.
6872 * opencl-lang.c (opencl_language_defn): Update.
6873 * objc-lang.c (objc_language_defn): Update.
6874 * m2-lang.h (m2_yyerror): Don't declare.
6875 * m2-lang.c (m2_language_defn): Update.
6876 * m2-exp.y (yyerror): Now static.
6877 * language.h (struct language_defn) <la_error>: Remove.
6878 * language.c (unk_lang_error): Remove.
6879 (unknown_language_defn, auto_language_defn): Remove.
6880 * go-lang.h (go_yyerror): Don't declare.
6881 * go-lang.c (go_language_defn): Update.
6882 * go-exp.y (yyerror): Now static.
6883 * f-lang.h (f_yyerror): Don't declare.
6884 * f-lang.c (f_language_defn): Update.
6885 * f-exp.y (yyerror): Now static.
6886 * d-lang.h (d_yyerror): Don't declare.
6887 * d-lang.c (d_language_defn): Update.
6888 * d-exp.y (yyerror): Now static.
6889 * c-lang.h (c_yyerror): Don't declare.
6890 * c-lang.c (c_language_defn, cplus_language_defn)
6891 (asm_language_defn, minimal_language_defn): Update.
6892 * c-exp.y (yyerror): Now static.
6893 * ada-lang.h (ada_yyerror): Don't declare.
6894 * ada-lang.c (ada_language_defn): Update.
6895 * ada-exp.y (yyerror): Now static.
6896
6897 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6898
6899 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6900 (store_sveregs_to_thread): Likewise.
6901 (aarch64_linux_fetch_inferior_registers): Check for SVE.
6902 (aarch64_linux_store_inferior_registers): Likewise.
6903 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6904 function.
6905 (aarch64_sve_regs_copy_to_regcache): Likewise.
6906 (aarch64_sve_regs_copy_from_regcache): Likewise.
6907 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6908 declaration.
6909 (aarch64_sve_regs_copy_to_regcache): Likewise.
6910 (aarch64_sve_regs_copy_from_regcache): Likewise.
6911 (sve_context): Structure from Linux headers.
6912 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6913 (SVE_SIG_ZREG_SIZE): Likewise.
6914 (SVE_SIG_PREG_SIZE): Likewise.
6915 (SVE_SIG_FFR_SIZE): Likewise.
6916 (SVE_SIG_REGS_OFFSET): Likewise.
6917 (SVE_SIG_ZREGS_OFFSET): Likewise.
6918 (SVE_SIG_ZREG_OFFSET): Likewise.
6919 (SVE_SIG_ZREGS_SIZE): Likewise.
6920 (SVE_SIG_PREGS_OFFSET): Likewise.
6921 (SVE_SIG_PREG_OFFSET): Likewise.
6922 (SVE_SIG_PREGS_SIZE): Likewise.
6923 (SVE_SIG_FFR_OFFSET): Likewise.
6924 (SVE_SIG_REGS_SIZE): Likewise.
6925 (SVE_SIG_CONTEXT_SIZE): Likewise.
6926 (SVE_PT_REGS_MASK): Likewise.
6927 (SVE_PT_REGS_FPSIMD): Likewise.
6928 (SVE_PT_REGS_SVE): Likewise.
6929 (SVE_PT_VL_INHERIT): Likewise.
6930 (SVE_PT_VL_ONEXEC): Likewise.
6931 (SVE_PT_REGS_OFFSET): Likewise.
6932 (SVE_PT_FPSIMD_OFFSET): Likewise.
6933 (SVE_PT_FPSIMD_SIZE): Likewise.
6934 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6935 (SVE_PT_SVE_PREG_SIZE): Likewise.
6936 (SVE_PT_SVE_FFR_SIZE): Likewise.
6937 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6938 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6939 (__SVE_SIG_TO_PT): Likewise.
6940 (SVE_PT_SVE_OFFSET): Likewise.
6941 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6942 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6943 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6944 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6945 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6946 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6947 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6948 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6949 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6950 (SVE_PT_SVE_SIZE): Likewise.
6951 (SVE_PT_SIZE): Likewise.
6952 (HAS_SVE_STATE): New define.
6953
6954 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6955
6956 * nat/aarch64-sve-linux-sigcontext.h: New file.
6957 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6958 new files.
6959 (SVE_VQ_MIN): Likewise.
6960 (SVE_VQ_MAX): Likewise.
6961 (SVE_VL_MIN): Likewise.
6962 (SVE_VL_MAX): Likewise.
6963 (SVE_NUM_ZREGS): Likewise.
6964 (SVE_NUM_PREGS): Likewise.
6965 (sve_vl_valid): Likewise.
6966 (struct user_sve_header): Likewise.
6967
6968 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6969 Richard Bunt <Richard.Bunt@arm.com>
6970
6971 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6972 was requested by GDB.
6973
6974 2018-06-15 Tom de Vries <tdevries@suse.de>
6975
6976 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6977
6978 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6979
6980 * gnulib/update-gnulib.sh: Print expected versions of
6981 autoconf/aclocal.
6982
6983 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6984
6985 * arch-utils.c (default_type_align): Use type_length_units.
6986 * gdbtypes.c (type_align): Use type_length_units.
6987
6988 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6989
6990 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6991 of 'define' command.
6992
6993 2018-06-14 Tom de Vries <tdevries@suse.de>
6994
6995 PR cli/22573
6996 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6997 get_no_prettyformat_print_options.
6998
6999 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
7000
7001 * sparc-nat.h: Include target.h.
7002 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7003 <fetch_registers>: Remove this argument in function call.
7004 <store_registers>: Remove this argument in function call, remove
7005 extra semicolon.
7006 <low_forget_process>: Call sparc64_forget_process instead of
7007 sparc_forget_process.
7008
7009 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7010
7011 * procfs.c (_initialize_procfs): Use add_inf_child_target.
7012 (procfs_target::make_corefile_notes): Adjust to new
7013 target_read_alloc return type.
7014
7015 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7016 Stephen Roberts <stephen.roberts@arm.com>
7017
7018 PR gdb/22882
7019 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7020 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7021 Move should_notify_stop local into more inner scope.
7022
7023 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7024 Stephen Roberts <stephen.roberts@arm.com>
7025
7026 PR gdb/22882
7027 * infrun.c (resume_1): Add call to mark_async_event_handler.
7028
7029 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7030
7031 * infrun.c (do_target_wait): Change old version of $pc printed.
7032
7033 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
7034
7035 * dwarf2read.c (read_index_from_section): Rename to...
7036 (read_gdb_index_from_section): ... this, update all callers.
7037 (dwarf2_read_index): Rename to...
7038 (dwarf2_read_gdb_index): ... this, update all callers.
7039
7040 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
7041
7042 * gdb/hppa-linux-nat.c
7043 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7044 hppa_linux_nat_target::fetch_registers.
7045
7046 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7047
7048 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7049 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7050 (AARCH64_DWARF_SVE_FFR): Likewise.
7051 (AARCH64_DWARF_SVE_P0): Likewise.
7052 (AARCH64_DWARF_SVE_Z0): Likewise.
7053
7054 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7055
7056 * common/common-regcache.h (raw_compare): New function.
7057 * regcache.c (regcache::raw_compare): Likewise.
7058 * regcache.h (regcache::raw_compare): New declaration.
7059
7060 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7061
7062 * common/common-regcache.h (reg_buffer_common): New structure.
7063 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7064 (reg_buffer::raw_supply): Likewise.
7065 (reg_buffer::raw_supply_integer): Likewise.
7066 (reg_buffer::raw_supply_zeroed): Likewise.
7067 (reg_buffer::raw_collect): Likewise.
7068 (reg_buffer::raw_collect_integer): Likewise.
7069 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7070 (reg_buffer::raw_supply): Likewise.
7071 (reg_buffer::raw_supply_integer): Likewise.
7072 (reg_buffer::raw_supply_zeroed): Likewise.
7073 (reg_buffer::raw_collect): Likewise.
7074 (reg_buffer::raw_collect_integer): Likewise.
7075
7076 2018-06-10 Tom Tromey <tom@tromey.com>
7077
7078 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
7079 (class remote_state) <stop_reply_queue>: Now std::vector.
7080 (remote_state::~remote_state)
7081 (remote_target::stop_reply_queue_length): Update.
7082 (struct queue_iter_param, remove_child_of_pending_fork)
7083 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7084 (check_pending_event_prevents_wildcard_vcont_callback)
7085 (remove_stop_reply_for_inferior)
7086 (remove_stop_reply_of_remote_state)
7087 (remote_notif_remove_once_on_match)
7088 (stop_reply_match_ptid_and_ws)
7089 (remote_kill_child_of_pending_fork): Remove.
7090 (remote_target::remove_new_fork_children)
7091 (remote_target::check_pending_events_prevent_wildcard_vcont)
7092 (remote_target::discard_pending_stop_replies)
7093 (remote_target::discard_pending_stop_replies_in_queue)
7094 (remote_target::remote_notif_remove_queued_reply)
7095 (remote_target::queued_stop_reply)
7096 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7097 (remote_target::wait, remote_target::kill_new_fork_children)
7098 (remote_target::async): Update.
7099
7100 2018-06-10 Tom Tromey <tom@tromey.com>
7101
7102 * record-full.c (record_full_arch_list_cleanups): Remove.
7103 (record_full_message): Use try/catch.
7104 (record_full_wait_cleanups): Remove.
7105 (record_full_wait_1): Use try/catch.
7106 (record_full_restore): Likewise.
7107
7108 2018-06-10 Tom Tromey <tom@tromey.com>
7109
7110 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
7111 declare VEC. Add constructor.
7112 <in_target_beneath>: Now bool.
7113 (record_full_breakpoints): Now a std::vector, static.
7114 (record_full_sync_record_breakpoints)
7115 (record_full_init_record_breakpoints)
7116 (record_full_target::insert_breakpoint)
7117 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
7118
7119 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7120
7121 * dwarf2read.c (process_cu_includes): Remove struct keyword.
7122 * serial.c (serial_interface_lookup): Remove struct keyword.
7123
7124 2018-06-10 Tom Tromey <tom@tromey.com>
7125
7126 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7127 method.
7128 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7129 a method.
7130 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7131 method.
7132 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7133 "beneath" as a method.
7134 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7135 Use "beneath" as a method.
7136
7137 2018-06-10 Tom Tromey <tom@tromey.com>
7138
7139 * tracefile.c (struct trace_file_writer_deleter): New.
7140 <operator()>: Rename from trace_file_writer_xfree.
7141 (trace_file_writer_up): New typedef.
7142 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7143
7144 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
7145
7146 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7147 <m_registers, m_register_status>: Change type to
7148 std::unique_ptr.
7149 * regcache.c (reg_buffer::reg_buffer): Use new instead of
7150 XCNEWVEC.
7151
7152 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
7153
7154 * common/common-regcache.h (enum register_status): Add
7155 underlying type "signed char".
7156 * regcache.h (reg_buffer) <m_register_status>: Change type to
7157 register_status *.
7158 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7159 register_status instead of signed char.
7160 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7161 (reg_buffer::get_register_status): Remove cast.
7162 (readable_regcache::raw_read): Remove cast.
7163 (readable_regcache::cooked_read): Remove cast.
7164
7165 2018-06-09 Tom Tromey <tom@tromey.com>
7166
7167 * source.c (reverse_search_command, forward_search_command): Use
7168 scoped_fd.
7169
7170 2018-06-09 Tom Tromey <tom@tromey.com>
7171
7172 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
7173 (serial_ops_list): Now static, std::vector.
7174 (serial_interface_lookup, serial_add_interface): Update.
7175
7176 2018-06-09 Tom Tromey <tom@tromey.com>
7177
7178 * dwarf2read.c (process_cu_includes): Update.
7179 (process_full_comp_unit): Update.
7180 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7181 std::vector.
7182
7183 2018-06-08 Paul Koning <paul_koning@dell.com>
7184
7185 PR gdb/23252
7186
7187 * python/python.c (do_start_initialization):
7188 Avoid call to internal Python API.
7189 (init__gdb_module): New function.
7190
7191 2018-06-08 Gary Benson <gbenson@redhat.com>
7192
7193 * linux-thread-db.c (valprint.h): New include.
7194 (struct check_thread_db_info): New structure.
7195 (check_thread_db_on_load, tdb_testinfo): New static globals.
7196 (check_thread_db, check_thread_db_callback): New functions.
7197 (try_thread_db_load_1): Run integrity checks if requested.
7198 (maintenance_check_libthread_db): New function.
7199 (_initialize_thread_db): Register "maint check libthread-db"
7200 and "maint set/show check-libthread-db".
7201 * NEWS: Mention the above new commands.
7202
7203 2018-06-08 Tom Tromey <tom@tromey.com>
7204
7205 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7206 now a method.
7207
7208 2018-06-08 Tom Tromey <tom@tromey.com>
7209
7210 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7211
7212 2018-06-08 Tom Tromey <tom@tromey.com>
7213
7214 * common/btrace-common.h (struct btrace_data): Add constructor,
7215 destructor, move assignment operator.
7216 <empty, clear, fini>: New methods.
7217 <format>: Initialize.
7218 (btrace_data_init, btrace_data_fini, btrace_data_clear)
7219 (btrace_data_empty): Don't declare.
7220 * common/btrace-common.c (btrace_data_init): Remove.
7221 (btrace_data::fini): Rename from btrace_data_fini.
7222 (btrace_data::empty): Rename from btrace_data_empty.
7223 (btrace_data::clear): Rename from btrace_data_clear. Return
7224 bool.
7225 * btrace.h (make_cleanup_btrace_data): Don't declare.
7226 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7227 (parse_xml_btrace): Update.
7228 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7229 (maint_btrace_clear_packet_history_cmd): Update.
7230
7231 2018-06-07 Pedro Alves <palves@redhat.com>
7232
7233 * target.h (target_ops) <beneath>: Now a method. All references
7234 updated.
7235 (class target_stack): New.
7236 * target.c (g_target_stack): New.
7237 (g_current_top_target): Delete.
7238 (current_top_target): Get the top target out of g_target_stack.
7239 (target_stack::push, target_stack::unpush): New.
7240 (push_target, unpush_target): Reimplement.
7241 (target_is_pushed): Reimplement in terms of g_target_stack.
7242 (target_ops::beneath, target_stack::find_beneath): New.
7243
7244 2018-06-07 Pedro Alves <palves@redhat.com>
7245
7246 * target.h (find_target_beneath): Delete declaration.
7247 * target.c (find_target_beneath): Delete definition.
7248 * aix-thread.c: All callers of find_target_beneath adjusted to
7249 call target_ops::beneath instead.
7250 * bsd-uthread.c: Likewise.
7251 * linux-thread-db.c: Likewise.
7252 * ravenscar-thread.c: Likewise.
7253 * sol-thread.c: Likewise.
7254 * spu-multiarch.c: Likewise.
7255
7256 2018-06-07 Pedro Alves <palves@redhat.com>
7257
7258 * target.h (target_ops) <beneath>: Now a method. All references
7259 updated.
7260 (target_ops) <m_beneath>: New.
7261 * target.c (target_ops::beneath): New.
7262 * corelow.c: Adjust all references to target_ops::beneath.
7263 * linux-thread-db.c: Likewise.
7264 * make-target-delegates: Likewise.
7265 * record-btrace.c: Likewise.
7266 * record-full.c: Likewise.
7267 * remote.c: Likewise.
7268 * target.c: Likewise.
7269 * target-delegates.c: Regenerate.
7270
7271 2018-06-07 Pedro Alves <palves@redhat.com>
7272
7273 * target.h (target_stack): Delete.
7274 (current_top_target): Declare function.
7275 * target.c (target_stack): Delete.
7276 (g_current_top_target): New.
7277 (current_top_target): New function.
7278 * auxv.c: Use current_top_target instead of target_stack
7279 throughout.
7280 * avr-tdep.c: Likewise.
7281 * breakpoint.c: Likewise.
7282 * corefile.c: Likewise.
7283 * elfread.c: Likewise.
7284 * eval.c: Likewise.
7285 * exceptions.c: Likewise.
7286 * frame.c: Likewise.
7287 * gdbarch-selftests.c: Likewise.
7288 * gnu-v3-abi.c: Likewise.
7289 * ia64-tdep.c: Likewise.
7290 * ia64-vms-tdep.c: Likewise.
7291 * infcall.c: Likewise.
7292 * infcmd.c: Likewise.
7293 * infrun.c: Likewise.
7294 * linespec.c: Likewise.
7295 * linux-tdep.c: Likewise.
7296 * minsyms.c: Likewise.
7297 * ppc-linux-nat.c: Likewise.
7298 * ppc-linux-tdep.c: Likewise.
7299 * procfs.c: Likewise.
7300 * regcache.c: Likewise.
7301 * remote.c: Likewise.
7302 * rs6000-tdep.c: Likewise.
7303 * s390-linux-nat.c: Likewise.
7304 * s390-tdep.c: Likewise.
7305 * solib-aix.c: Likewise.
7306 * solib-darwin.c: Likewise.
7307 * solib-dsbt.c: Likewise.
7308 * solib-spu.c: Likewise.
7309 * solib-svr4.c: Likewise.
7310 * solib-target.c: Likewise.
7311 * sparc-tdep.c: Likewise.
7312 * sparc64-tdep.c: Likewise.
7313 * spu-tdep.c: Likewise.
7314 * symfile.c: Likewise.
7315 * symtab.c: Likewise.
7316 * target-descriptions.c: Likewise.
7317 * target-memory.c: Likewise.
7318 * target.c: Likewise.
7319 * target.h: Likewise.
7320 * tracefile-tfile.c: Likewise.
7321 * tracepoint.c: Likewise.
7322 * valops.c: Likewise.
7323 * valprint.c: Likewise.
7324 * value.c: Likewise.
7325 * windows-tdep.c: Likewise.
7326 * mi/mi-main.c: Likewise.
7327
7328 2018-06-07 Tom Tromey <tom@tromey.com>
7329
7330 * valprint.h (build_address_symbolic): Declare.
7331 * printcmd.c (print_address_symbolic): Update.
7332 (build_address_symbolic): Change "name" and "filename" to
7333 std::string.
7334 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7335 Update.
7336 * defs.h (build_address_symbolic): Remove declaration.
7337
7338 2018-06-07 Alan Hayward <alan.hayward@arm.com>
7339
7340 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7341 (aarch64_vnv_type): Add function.
7342 (aarch64_pseudo_register_name): Add V regs for SVE.
7343 (aarch64_pseudo_register_type): Likewise.
7344 (aarch64_pseudo_register_reggroup_p): Likewise.
7345 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7346 (aarch64_pseudo_read_value): Add V regs for SVE.
7347 (aarch64_pseudo_write_2): Use V0 offset for SVE
7348 (aarch64_pseudo_write): Add V regs for SVE.
7349 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7350
7351 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
7352
7353 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7354 (sve_vl_from_vq): Likewise.
7355
7356 2018-06-05 Tom Tromey <tom@tromey.com>
7357
7358 * cli/cli-cmds.c (show_version): Update.
7359 * top.c (print_gdb_version): Add "interactive" parameter.
7360 Update.
7361 * main.c (captured_main_1): Update.
7362 * top.h (print_gdb_version): Add "interactive" parameter and a
7363 comment.
7364
7365 2018-06-05 David Malcolm <dmalcolm@redhat.com>
7366
7367 * common/enum-flags.h: Add trailing semicolon to example in
7368 comment.
7369
7370 2018-06-05 Tom Tromey <tom@tromey.com>
7371
7372 PR cli/12326:
7373 * NEWS: Add entry about pager.
7374 * utils.c (pagination_disabled_for_command): New global.
7375 (prompt_for_continue): Allow "c" response to prompt.
7376 (reinitialize_more_filter): Clear
7377 pagination_disabled_for_command.
7378 (fputs_maybe_filtered): Check pagination_disabled_for_command.
7379
7380 2018-06-04 Tom Tromey <tom@tromey.com>
7381
7382 * ada-lang.h (ada_lookup_symbol_list): Update.
7383 * ada-lang.c (resolve_subexp): Update.
7384 (symbols_are_identical_enums): Change type of syms. Remove nsyms
7385 parameter.
7386 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7387 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7388 results parameter to std::vector.
7389 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7390 Update.
7391 * ada-exp.y (block_lookup): Update.
7392 (select_possible_type_sym): Change type of syms. Remove nsyms
7393 parameter.
7394 (write_var_or_type, write_name_assoc): Update.
7395
7396 2018-06-04 Joel Brobecker <brobecker@adacore.com>
7397
7398 * windows-nat.c (windows_nat_target::xfer_partial): Return
7399 TARGET_XFER_E_IO if we need to delegate to the target beneath
7400 but BENEATH is NULL.
7401
7402 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
7403
7404 * Makefile.in (config.status): Add configure.nat as a
7405 dependency.
7406
7407 2018-06-04 Tom Tromey <tom@tromey.com>
7408
7409 * cp-name-parser.y (cpname_state): Add method declarations.
7410 (HANDLE_QUAL): Update.
7411 (cpname_state::d_grab, cpname_state::fill_comp)
7412 (cpname_state::make_operator, cpname_state::make_dtor)
7413 (cpname_state::make_builtin_type, cpname_state::make_name)
7414 (cpname_state::d_qualify, cpname_state::d_int_type)
7415 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7416 (%union): Move earlier.
7417
7418 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7419
7420 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7421
7422 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7423
7424 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7425 (aarch64_pseudo_write_1): Likewise.
7426 (aarch64_pseudo_read_value): Use helper.
7427 (aarch64_pseudo_write): Likewise.
7428
7429 2018-06-04 Pedro Alves <palves@redhat.com>
7430
7431 * darwin-nat.c (darwin_ops): Delete.
7432 (darwin_attach_pid): Use get_native_target.
7433
7434 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7435
7436 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7437 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7438
7439 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7440
7441 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7442 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7443 (aarch64_gdbarch_init): Check for SVE.
7444 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7445
7446 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7447
7448 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7449 * aarch64-tdep.h (aarch64_read_description): Likewise.
7450 * arch/aarch64.c (aarch64_create_target_description): Likewise.
7451 * arch/aarch64.h (aarch64_create_target_description): Likewise.
7452 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7453 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7454 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7455
7456 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
7457
7458 * value.c (value_fetch_lazy_bitfield): New.
7459 (value_fetch_lazy_memory): New.
7460 (value_fetch_lazy_register): New.
7461 (value_fetch_lazy): Factor out to smaller functions.
7462
7463 2018-06-01 Tom Tromey <tom@tromey.com>
7464
7465 * cp-name-parser.y (backslashable, represented): Now const.
7466
7467 2018-06-01 Tom Tromey <tom@tromey.com>
7468
7469 * cp-name-parser.y: Include parser-defs.h.
7470 (parser_fprintf): Remove declaration.
7471
7472 2018-06-01 Tom Tromey <tom@tromey.com>
7473
7474 * cp-name-parser.y: Use %pure-parser, %lex-param, and
7475 %parse-param.
7476 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7477 (global_result): Remove globals.
7478 (struct cpname_state): New.
7479 (yyparse): Don't declare.
7480 (yylex, yyerror): Move declarations after %union.
7481 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7482 (make_name): Add state parameter.
7483 Update all callers.
7484 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7485 parameter.
7486 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7487 Update.
7488 (yylex): Add lvalp, state parameters.
7489 (yyerror): Add state parameter.
7490 (cp_demangled_name_to_comp): Update.
7491
7492 2018-06-01 Tom Tromey <tom@tromey.com>
7493
7494 * cp-name-parser.y (parser_fprintf): Declare.
7495 (GDB_YY_REMAP_PREFIX): Define.
7496 Include yy-remap.h. Don't redefine yy* identifiers.
7497
7498 2018-06-01 Tom Tromey <tom@tromey.com>
7499
7500 * python/py-type.c (typy_legacy_template_argument): Update.
7501 * cp-support.h (cp_demangled_name_to_comp): Update.
7502 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7503 parameter to be a "std::string *".
7504 (main): Update.
7505
7506 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
7507
7508 * ada-lex.l: Include "diagnostics.h" instead of
7509 "common/diagnostics.h".
7510 * unittests/environ-selftests.c: Likewise.
7511 * common/diagnostics.h: Moved to ../include.
7512
7513 2018-06-01 Joel Brobecker <brobecker@adacore.com>
7514
7515 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7516 to language_mode_manual while calling breakpoint_re_set_one.
7517
7518 2018-06-01 Tom Tromey <tom@tromey.com>
7519
7520 * valops.c (value_cast_structs, destructor_name_p): Update.
7521 * symtab.c (gdb_mangle_name): Update.
7522 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7523 Update.
7524 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7525 (pascal_object_print_value_fields, pascal_object_print_value):
7526 Update.
7527 * p-typeprint.c (pascal_type_print_derivation_info): Update.
7528 * linespec.c (find_methods): Update.
7529 * gdbtypes.h (type_name_no_tag): Remove.
7530 (type_name_or_error): Rename from type_name_no_tag_or_error.
7531 * gdbtypes.c (type_name_no_tag): Remove.
7532 (type_name_or_error): Rename from type_name_no_tag_or_error.
7533 (lookup_struct_elt_type, check_typedef): Update.
7534 * expprint.c (print_subexp_standard): Update.
7535 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7536 * d-namespace.c (d_lookup_nested_symbol): Update.
7537 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7538 (cp_print_class_member): Update.
7539 * cp-namespace.c (cp_lookup_nested_symbol): Update.
7540 * completer.c (add_struct_fields): Update.
7541 * c-typeprint.c (cp_type_print_derivation_info)
7542 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7543 Update.
7544 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7545 (ada_prefer_type, ada_is_exception_sym): Update.
7546
7547 2018-06-01 Tom Tromey <tom@tromey.com>
7548
7549 * valops.c (enum_constant_from_type, value_namespace_elt)
7550 (value_maybe_namespace_elt): Update.
7551 * valarith.c (find_size_for_pointer_math): Update.
7552 * target-descriptions.c (make_gdb_type): Update.
7553 * symmisc.c (print_symbol): Update.
7554 * stabsread.c (define_symbol, read_type)
7555 (complain_about_struct_wipeout, add_undefined_type)
7556 (cleanup_undefined_types_1): Update.
7557 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7558 (rust_range_type_p, val_print_struct, rust_print_struct_def)
7559 (rust_internal_print_type, rust_composite_type)
7560 (rust_evaluate_funcall, rust_evaluate_subexp)
7561 (rust_inclusive_range_type_p): Update.
7562 * python/py-type.c (typy_get_tag): Update.
7563 * p-typeprint.c (pascal_type_print_base): Update.
7564 * mdebugread.c (parse_symbol, parse_type): Update.
7565 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7566 Update.
7567 * guile/scm-type.c (gdbscm_type_tag): Update.
7568 * go-lang.c (sixg_string_p): Update.
7569 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7570 Update.
7571 * gdbtypes.h (struct main_type) <tag_name>: Remove.
7572 (TYPE_TAG_NAME): Remove.
7573 * gdbtypes.c (type_name_no_tag): Simplify.
7574 (check_typedef, check_types_equal, recursive_dump_type)
7575 (copy_type_recursive, arch_composite_type): Update.
7576 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
7577 in summary mode when needed.
7578 * eval.c (evaluate_funcall): Update.
7579 * dwarf2read.c (fixup_go_packaging, read_structure_type)
7580 (process_structure_scope, read_enumeration_type)
7581 (read_namespace_type, read_module_type, determine_prefix): Update.
7582 * cp-support.c (inspect_type): Update.
7583 * coffread.c (process_coff_symbol, decode_base_type): Update.
7584 * c-varobj.c (c_is_path_expr_parent): Update.
7585 * c-typeprint.c (c_type_print_base_struct_union): Update.
7586 (c_type_print_base_1): Update. Print struct/class/union/enum in
7587 summary when using C language.
7588 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7589 (gen_maybe_namespace_elt): Update.
7590 * ada-lang.c (ada_type_name): Simplify.
7591 (empty_record, ada_template_to_fixed_record_type_1)
7592 (template_to_static_fixed_type)
7593 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7594
7595 2018-06-01 Tom Tromey <tom@tromey.com>
7596
7597 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7598 c_print_type.
7599 * c-typeprint.c (c_print_type_1): Add "language" parameter.
7600 (c_print_type): Update.
7601 (c_print_type): New overload.
7602 (c_type_print_varspec_prefix, c_type_print_args)
7603 (c_type_print_varspec_suffix, c_print_type_no_offsets)
7604 (c_type_print_base_struct_union, c_type_print_base_1)
7605 (cp_type_print_method_args): Add "language" parameter.
7606 (c_type_print_base): Update.
7607 * c-lang.h (c_print_type): Add new overload.
7608
7609 2018-06-01 Tom Tromey <tom@tromey.com>
7610
7611 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7612 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7613
7614 2018-06-01 Alan Hayward <alan.hayward@arm.com>
7615
7616 * aarch64-tdep.c (aarch64_sve_register_names): New const
7617 var.
7618 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7619 (AARCH64_SVE_Z_REGS_NUM): New define.
7620 (AARCH64_SVE_P_REGS_NUM): Likewise.
7621 (AARCH64_SVE_NUM_REGS): Likewise.
7622
7623 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7624
7625 * nat/linux-ptrace.h [__alpha__]
7626 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7627 definitions.
7628
7629 2018-05-31 Maciej W. Rozycki <macro@mips.com>
7630
7631 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7632 the endianness selected.
7633 * NEWS: Document `set endian auto' mode operation update.
7634
7635 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7636
7637 * Makefile.in: Add new header.
7638 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7639 (sve_vl_from_vg): Likewise.
7640 (sve_vq_from_vl): Likewise.
7641 (sve_vl_from_vq): Likewise.
7642 (sve_vq_from_vg): Likewise.
7643 (sve_vg_from_vq): Likewise.
7644 * configure.nat: Add new c file.
7645 * nat/aarch64-sve-linux-ptrace.c: New file.
7646 * nat/aarch64-sve-linux-ptrace.h: New file.
7647
7648 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7649
7650 * aarch64-linux-nat.c (aarch64_linux_read_description):
7651 Add parmeter zero.
7652 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7653 Likewise.
7654 * aarch64-tdep.c (tdesc_aarch64_list): Add.
7655 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7656 (aarch64_gdbarch_init): Add parmeter zero.
7657 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7658 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7659 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7660 parmeter.
7661 * doc/gdb.texinfo: Describe SVE feature
7662 * features/aarch64-sve.c: New file.
7663
7664 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
7665
7666 PR gdb/23210
7667 * gdbarch.sh (significant_addr_bit): Default to zero when
7668 not set by target architecture.
7669 * gdbarch.c: Re-generated.
7670 * utils.c (address_significant): Update.
7671
7672 2018-05-30 Joel Brobecker <brobecker@adacore.com>
7673
7674 * stack.c (func_command): Remove trailing newline in call to error.
7675
7676 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7677
7678 * regcache.h (regcache_raw_collect): Remove, update callers to
7679 use regcache::raw_collect.
7680 * regcache.c (regcache_raw_collect): Remove.
7681
7682 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7683
7684 * regcache.h (regcache_raw_supply): Remove, update callers to
7685 use detached_regcache::raw_supply.
7686 * regcache.c (regcache_raw_supply): Remove.
7687
7688 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7689
7690 * regcache.h (regcache_cooked_write_part): Remove, update
7691 callers to use regcache::cooked_write_part.
7692 * regcache.c (regcache_cooked_write_part): Remove.
7693
7694 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7695
7696 * regcache.h (regcache_cooked_read_part): Remove, update callers
7697 to use readable_regcache::cooked_read_part.
7698 * regcache.c (regcache_cooked_read_part): Remove.
7699
7700 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7701
7702 * regcache.h (regcache_cooked_read_value): Remove, update
7703 callers to use readable_regcache::cooked_read_value.
7704 * regcache.c (regcache_cooked_read_value): Remove.
7705
7706 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7707
7708 * regcache.h (regcache_cooked_write): Remove, update callers to
7709 use regcache::cooked_write.
7710 * regcache.c (regcache_cooked_write): Remove.
7711
7712 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7713
7714 * regcache.h (regcache_invalidate): Remove, update callers to
7715 use detached_regcache::invalidate instead.
7716 * regcache.c (regcache_invalidate): Remove.
7717
7718 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7719
7720 * regcache.h (regcache_raw_write_part): Remove, update callers
7721 to use regcache::raw_write_part instead.
7722 * regcache.c (regcache_raw_write_part): Remove.
7723
7724 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7725
7726 * regcache.h (regcache_raw_read_part): Remove, update callers to
7727 use readable_regcache::raw_read_part instead.
7728 * regcache.c (regcache_raw_read_part): Remove.
7729
7730 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7731
7732 * regcache.h (regcache_cooked_read): Remove, update callers to
7733 use readable_regcache::cooked_read instead.
7734 * regcache.c (regcache_cooked_read): Remove.
7735
7736 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7737
7738 * regcache.h (regcache_raw_write): Remove, update callers to use
7739 regcache::raw_write instead.
7740 * regcache.c (regcache_raw_write): Remove.
7741
7742 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7743
7744 * regcache.h (regcache_raw_read): Remove, update callers to use
7745 readable_regcache::raw_read instead.
7746 * regcache.c (regcache_raw_read): Remove.
7747
7748 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7749
7750 * regcache.h (regcache_raw_update): Remove, update callers to
7751 use readable_regcache::raw_update instead.
7752 * regcache.c (regcache_raw_update): Remove.
7753
7754 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7755
7756 * regcache.h (regcache_register_status): Remove, update callers
7757 to use reg_buffer::get_register_status directly instead.
7758 * regcache.c (regcache_register_status): Remove.
7759
7760 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7761
7762 * regcache.h (regcache_get_ptid): Remove, update all callers to
7763 call regcache::ptid instead.
7764 * regcache.c (regcache_get_ptid): Remove.
7765
7766 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7767
7768 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7769
7770 2018-05-30 Pedro Alves <palves@redhat.com>
7771
7772 * common/common-exceptions.h (exception_rethrow): Use
7773 ATTRIBUTE_NORETURN.
7774
7775 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
7776
7777 * breakpoint.c (print_solib_event, check_status_catch_solib):
7778 Remove struct keyword in range-based for loops.
7779 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7780 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7781 Likewise.
7782 * linespec.c (find_superclass_methods, search_minsyms_for_name):
7783 Likewise.
7784 * symfile.c (addr_info_make_relative): Likewise.
7785 * thread.c (value_in_thread_stack_temporaries): Likewise.
7786
7787 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
7788
7789 PR gdb/16841
7790 * valops.c (value_struct_elt_for_reference): Call check_typedef on
7791 aggregate type to get its real type before accessing it.
7792
7793 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
7794
7795 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7796 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7797 * coff-pe-read.c (add_pe_forwarded_sym): Replace
7798 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7799 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7800 * jit.c (jit_breakpoint_re_set_internal): Likewise.
7801 * printcmd.c (info_address_command): Likewise.
7802
7803 2018-05-29 Tom Tromey <tom@tromey.com>
7804
7805 * windows-nat.c (handle_exception): Update fall-through comment.
7806
7807 2018-05-29 Tom Tromey <tom@tromey.com>
7808
7809 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
7810 (struct program_space) <added_solibs>: Now a std::vector.
7811 * breakpoint.c (print_solib_event): Update.
7812 (check_status_catch_solib): Update.
7813 * progspace.c (clear_program_space_solib_cache): Update.
7814 * solib.c (update_solib_list): Update.
7815
7816 2018-05-29 Tom Tromey <tom@tromey.com>
7817
7818 * python/py-type.c (typy_richcompare): Update.
7819 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7820 * gdbtypes.h (types_deeply_equal): Return bool.
7821 (types_equal): Likewise.
7822 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
7823 declare VEC.
7824 (check_types_equal): Change worklist to std::vector. Return
7825 bool.
7826 (struct type_equality_entry): Add constructor.
7827 (compare_maybe_null_strings): Return bool.
7828 (check_types_worklist): Return bool. Change worklist to
7829 std::vector.
7830 (types_deeply_equal): Use std::vector.
7831 (types_equal): Return bool.
7832 (compare_maybe_null_strings): Simplify.
7833
7834 2018-05-29 Tom Tromey <tom@tromey.com>
7835
7836 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
7837
7838 2018-05-29 Tom Tromey <tom@tromey.com>
7839
7840 * objc-lang.h: Don't include cp-support.h.
7841 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
7842 declare VEC.
7843
7844 2018-05-27 Tom Tromey <tom@tromey.com>
7845
7846 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7847
7848 2018-05-25 Tom Tromey <tom@tromey.com>
7849
7850 * value.c (value::location): Initialize.
7851
7852 2018-05-25 Tom Tromey <tom@tromey.com>
7853
7854 * dbxread.c (init_bincl_list): Remove.
7855 (bincl_list): Now a std::vector.
7856 (bincls_allocated, next_bincl): Remove.
7857 (free_bincl_list, do_free_bincl_list_cleanup)
7858 (make_cleanup_free_bincl_list): Remove.
7859 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7860 unique_xmalloc_ptr.
7861 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7862 (struct header_file_location): Add constructor.
7863 (add_bincl_to_list): Remove.
7864
7865 2018-05-25 Tom Tromey <tom@tromey.com>
7866
7867 * tui/tui.c (tui_enable): Update.
7868 * mi/mi-interp.c (mi_interp::init): Update.
7869 * interps.h (class interp) <name>: New method.
7870 <m_name>: Rename from name.
7871 (~scoped_restore_interp): Update.
7872 * interps.c (interp::interp): Update.
7873 (interp_add, interp_set, interp_lookup_existing)
7874 (current_interp_named_p): Update.
7875
7876 2018-05-25 Tom Tromey <tom@tromey.com>
7877
7878 * interps.c (interp_name): Remove.
7879 * mi/mi-interp.c (mi_interp::init): Update.
7880 * interps.h (interp_name): Remove.
7881 (~scoped_restore_interp): Update.
7882 * tui/tui.c (tui_enable): Update.
7883
7884 2018-05-25 Tom Tromey <tom@tromey.com>
7885
7886 * utils.c (fputs_maybe_filtered): Update.
7887 * linespec.c (decode_line_full): Update.
7888 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7889 (mi_print_breakpoint_for_event, mi_solib_loaded)
7890 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7891 (mi_user_selected_context_changed): Update.
7892 * mi/mi-main.c (mi_execute_command): Update.
7893 * cli/cli-script.c (execute_control_command): Update.
7894 * python/python.c (execute_gdb_command): Update.
7895 * solib.c (info_sharedlibrary_command): Update.
7896 * interps.c (interp_ui_out): Remove.
7897 * interps.h (interp_ui_out): Remove.
7898
7899 2018-05-25 Tom Tromey <tom@tromey.com>
7900
7901 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7902 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7903 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7904
7905 2018-05-25 Tom Tromey <tom@tromey.com>
7906
7907 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7908 * interps.c (interp_exec): Use scoped_restore.
7909
7910 2018-05-25 Tom Tromey <tom@tromey.com>
7911
7912 * remote.c (remote_target::remote_file_get): Use
7913 gdb::byte_vector.
7914 (remote_target::remote_file_put): Likewise.
7915
7916 2018-05-25 Tom Tromey <tom@tromey.com>
7917
7918 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7919 a std::string.
7920 (get_pe_section_index, add_pe_exported_sym): Update.
7921 (read_pe_exported_syms): Use gdb::def_vector.
7922
7923 2018-05-25 Tom Tromey <tom@tromey.com>
7924
7925 * frame.c (remove_prev_frame): Remove.
7926 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7927
7928 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7929
7930 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7931 Remove prototypes.
7932 * mips-linux-nat.c (supply_fpregset): Always call
7933 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7934 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7935 `mips_fill_fpregset'.
7936 * mips-linux-tdep.c (mips_supply_fpregset)
7937 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7938 (mips_fill_fpregset_wrapper): Remove functions.
7939 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7940 (mips_linux_fpregset): Remove variable.
7941 (mips_linux_iterate_over_regset_sections): Use
7942 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7943 (mips_linux_o32_sigframe_init): Remove comment.
7944
7945 2018-05-25 Pedro Alves <palves@redhat.com>
7946
7947 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7948 (struct readahead_cache, struct packet_reg, struct
7949 remote_arch_state, class remote_state): Move higher up in the
7950 file.
7951 (remote_target::m_remote_state): Now an object instead of a pointer.
7952 (remote_target::get_remote_state): Adjust.
7953
7954 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7955
7956 * stack.c (select_and_print_frame): Delete.
7957 (struct function_bounds): Move struct within function.
7958 (func_command): Most content moved into new function
7959 find_frame_for_function, use new function, print result, add
7960 function comment.
7961 (find_frame_for_function): New function, now returns a result.
7962
7963 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7964
7965 * stack.c (iterate_over_block_arg_vars): Fix comment.
7966 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7967
7968 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7969
7970 PR gdb/23203
7971 * frame.c
7972 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7973 Define.
7974 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7975 Define.
7976 * frame.h (class scoped_restore_selected_frame): New class.
7977 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7978 of any exception, use scoped_restore_selected_frame to restore the
7979 frame instead.
7980
7981 2018-05-24 Pedro Alves <palves@redhat.com>
7982
7983 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7984 override.
7985
7986 2018-05-23 Tom Tromey <tom@tromey.com>
7987
7988 * complaints.c (struct complaints): Remove.
7989 (symfile_complaint_book): Remove.
7990 (series): New global.
7991 (complaint_internal): Update.
7992 (clear_complaints): Update.
7993
7994 2018-05-23 Tom Tromey <tom@tromey.com>
7995
7996 * complaints.c (counters): New global.
7997 (struct complain): Remove.
7998 (struct complaints) <root>: Remove.
7999 (complaint_sentinel): Remove.
8000 (symfile_complaint_book): Update.
8001 (find_complaint) Remove.
8002 (complaint_internal, clear_complaints): Update.
8003
8004 2018-05-23 Tom Tromey <tom@tromey.com>
8005
8006 * complaints.c (struct complain) <file, line>: Remove.
8007 (find_complaint): Remove file, line parameters.
8008 (complaint_internal): Update.
8009
8010 2018-05-23 Tom Tromey <tom@tromey.com>
8011
8012 * complaints.c (vcomplaint): Remove.
8013 (complaint_internal) Merge in contents of vcomplaint.
8014
8015 2018-05-23 Tom Tromey <tom@tromey.com>
8016
8017 * complaints.c (struct complaints) <explanation>: Remove.
8018 (symfile_explanations): Remove.
8019 (symfile_complaint_book): Update.
8020 (vcomplaint): Update.
8021 (struct explanation): Remove.
8022
8023 2018-05-23 Tom Tromey <tom@tromey.com>
8024
8025 * complaints.c (symfile_complaints): Remove.
8026 (complaint_internal): Remove "complaints" parameter.
8027 (clear_complaints, vcomplaint): Remove "c" parameter.
8028 (get_complaints): Remove.
8029 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8030 (dwarf2_debug_line_missing_file_complaint)
8031 (dwarf2_debug_line_missing_end_sequence_complaint)
8032 (dwarf2_complex_location_expr_complaint)
8033 (dwarf2_const_value_length_mismatch_complaint)
8034 (dwarf2_section_buffer_overflow_complaint)
8035 (dwarf2_macro_malformed_definition_complaint)
8036 (dwarf2_invalid_attrib_class_complaint)
8037 (create_addrmap_from_index, dw2_symtab_iter_next)
8038 (dw2_expand_marked_cus)
8039 (dw2_debug_names_iterator::find_vec_in_debug_names)
8040 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8041 (create_debug_type_hash_table, init_cutu_and_read_dies)
8042 (partial_die_parent_scope, add_partial_enumeration)
8043 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8044 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8045 (read_import_statement, read_file_scope, create_dwo_cu_reader)
8046 (create_cus_hash_table, create_dwp_hash_table)
8047 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8048 (dwarf2_rnglists_process, dwarf2_ranges_process)
8049 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8050 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8051 (handle_struct_member_die, process_structure_scope)
8052 (read_array_type, read_common_block, read_module_type)
8053 (read_tag_pointer_type, read_typedef, read_base_type)
8054 (read_subrange_type, load_partial_dies, partial_die_info::read)
8055 (partial_die_info::read, partial_die_info::read)
8056 (partial_die_info::read, read_checked_initial_length_and_offset)
8057 (dwarf2_string_attr, read_formatted_entries)
8058 (dwarf_decode_line_header)
8059 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8060 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8061 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8062 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8063 (get_signatured_type, get_DW_AT_signature_type)
8064 (decode_locdesc, file_file_name, consume_improper_spaces)
8065 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8066 (dwarf_decode_macro_bytes, dwarf_decode_macros)
8067 (dwarf2_symbol_mark_computed, set_die_type)
8068 (read_attribute_value): Update.
8069 * stap-probe.c (handle_stap_probe, get_stap_base_address):
8070 Update.
8071 * dbxread.c (unknown_symtype_complaint)
8072 (lbrac_mismatch_complaint, repeated_header_complaint)
8073 (set_namestring, function_outside_compilation_unit_complaint)
8074 (read_dbx_symtab, process_one_symbol): Update.
8075 * gdbtypes.c (stub_noname_complaint): Update.
8076 * windows-nat.c (handle_unload_dll): Update.
8077 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8078 (decode_base_type): Update.
8079 * xcoffread.c (bf_notfound_complaint, ef_complaint)
8080 (eb_complaint, record_include_begin, record_include_end)
8081 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8082 (process_xcoff_symbol, read_symbol)
8083 (function_outside_compilation_unit_complaint)
8084 (scan_xcoff_symtab): Update.
8085 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8086 * buildsym.c (finish_block_internal, make_blockvector)
8087 (end_symtab_get_static_block, augment_type_symtab): Update.
8088 * dtrace-probe.c (dtrace_process_dof)
8089 (dtrace_static_probe_ops::get_probes): Update.
8090 * complaints.h (struct complaint): Don't declare.
8091 (symfile_complaints): Remove.
8092 (complaint_internal): Remove "complaints" parameter.
8093 (complaint): Likewise.
8094 (clear_complaints): Likewise.
8095 * symfile.c (syms_from_objfile_1, finish_new_objfile)
8096 (reread_symbols): Update.
8097 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8098 (dwarf2_frame_cache, decode_frame_entry): Update.
8099 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8100 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8101 (info_selectors_command): Update.
8102 * macrotab.c (macro_include, check_for_redefinition)
8103 (macro_undef): Update.
8104 * objfiles.c (filter_overlapping_sections): Update.
8105 * stabsread.c (invalid_cpp_abbrev_complaint)
8106 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8107 (define_symbol, error_type, read_type, rs6000_builtin_type)
8108 (stabs_method_name_from_physname, read_member_functions)
8109 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8110 (attach_fields_to_type, complain_about_struct_wipeout)
8111 (read_range_type, read_args, common_block_start)
8112 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8113 Update.
8114 * mdebugread.c (index_complaint, unknown_ext_complaint)
8115 (basic_type_complaint, bad_tag_guess_complaint)
8116 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8117 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8118 (parse_procedure, parse_lines)
8119 (function_outside_compilation_unit_complaint)
8120 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8121 (bad_tag_guess_complaint, reg_value_complaint): Update.
8122 * cp-support.c (demangled_name_complaint): Update.
8123 * macroscope.c (sal_macro_scope): Update.
8124 * dwarf-index-write.c (class debug_names): Update.
8125
8126 2018-05-23 Tom Tromey <tom@tromey.com>
8127
8128 * complaints.c (clear_complaints): Remove "noisy" parameter.
8129 * complaints.h (clear_complaints): Update.
8130 * symfile.c (syms_from_objfile_1, finish_new_objfile)
8131 (reread_symbols): Update.
8132
8133 2018-05-23 Tom Tromey <tom@tromey.com>
8134
8135 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8136 SUBSEQUENT_MESSAGE.
8137 (vcomplaint, clear_complaints): Update.
8138 (symfile_explanations): Remove some messages.
8139
8140 2018-05-23 Tom Tromey <tom@tromey.com>
8141
8142 * complaints.c (internal_complaint): Remove.
8143 * complaints.h (internal_complaint): Remove.
8144
8145 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8146
8147 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8148
8149 2018-05-22 Pedro Alves <palves@redhat.com>
8150
8151 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8152 (remote_fileio_badfd, remote_fileio_return_errno)
8153 (remote_fileio_return_success, remote_fileio_func_open)
8154 (remote_fileio_func_open, remote_fileio_func_close)
8155 (remote_fileio_func_read, remote_fileio_func_write)
8156 (remote_fileio_func_lseek, remote_fileio_func_rename)
8157 (remote_fileio_func_unlink, remote_fileio_func_stat)
8158 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8159 (remote_fileio_func_isatty, remote_fileio_func_system): Add
8160 remote_target parameter.
8161 (remote_fio_func_map) <func>: Add remote_target parameter.
8162 (do_remote_fileio_request, remote_fileio_request):
8163 * remote-fileio.h (remote_fileio_request):
8164 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8165 remote_target parameter.
8166 (remote_notif_process, handle_notification): Adjust to pass down
8167 the remote.
8168 (remote_notif_state_allocate): Add remote_target parameter. Save
8169 it.
8170 * remote-notif.h (struct remote_target): Forward declare.
8171 (struct notif_client) <parse, ack, can_get_pending_events>: Add
8172 remote_target parameter.
8173 (struct remote_notif_state) <remote>: New field.
8174 (remote_notif_ack, remote_notif_parse): Add remote_target
8175 parameter.
8176 (remote_notif_state_allocate, remote_notif_state_allocate): Add
8177 remote_target parameter.
8178 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8179 (threads_listing_context, rmt_thread_action, protocol_feature)
8180 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8181 (packet_result, struct threads_listing_context, remote_state):
8182 Move definitions and declarations higher up.
8183 (remote_target) <~remote_target>: Declare.
8184 (remote_download_command_source, remote_file_put, remote_file_get)
8185 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8186 (remote_hostio_pread_vFile, remote_hostio_send_command)
8187 (remote_hostio_set_filesystem, remote_hostio_open)
8188 (remote_hostio_close, remote_hostio_unlink, remote_state)
8189 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8190 (get_memory_write_packet_size, get_memory_read_packet_size)
8191 (append_pending_thread_resumptions, remote_detach_1)
8192 (append_resumption, remote_resume_with_vcont)
8193 (add_current_inferior_and_thread, wait_ns, wait_as)
8194 (process_stop_reply, remote_notice_new_inferior)
8195 (process_initial_stop_replies, remote_add_thread)
8196 (btrace_sync_conf, remote_btrace_maybe_reopen)
8197 (remove_new_fork_children, kill_new_fork_children)
8198 (discard_pending_stop_replies, stop_reply_queue_length)
8199 (check_pending_events_prevent_wildcard_vcont)
8200 (discard_pending_stop_replies_in_queue, stop_reply)
8201 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8202 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8203 (remote_interrupt_as, remote_interrupt_ns)
8204 (remote_get_noisy_reply, remote_query_attached)
8205 (remote_add_inferior, remote_current_thread, get_current_thread)
8206 (set_thread, set_general_thread, set_continue_thread)
8207 (set_general_process, write_ptid)
8208 (remote_unpack_thread_info_response, remote_get_threadinfo)
8209 (parse_threadlist_response, remote_get_threadlist)
8210 (remote_threadlist_iterator, remote_get_threads_with_ql)
8211 (remote_get_threads_with_qxfer)
8212 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8213 (get_offsets, remote_check_symbols, remote_supported_packet)
8214 (remote_query_supported, remote_packet_size)
8215 (remote_serial_quit_handler, remote_detach_pid)
8216 (remote_vcont_probe, remote_resume_with_hc)
8217 (send_interrupt_sequence, interrupt_query)
8218 (remote_notif_get_pending_events, fetch_register_using_p)
8219 (send_g_packet, process_g_packet, fetch_registers_using_g)
8220 (store_register_using_P, store_registers_using_G)
8221 (set_remote_traceframe, check_binary_download)
8222 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8223 (remote_xfer_live_readonly_partial, remote_read_bytes)
8224 (remote_send_printf, remote_flash_write, readchar)
8225 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8226 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8227 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8228 (extended_remote_disable_randomization, extended_remote_run)
8229 (send_environment_packet, extended_remote_environment_support)
8230 (extended_remote_set_inferior_cwd, remote_write_qxfer)
8231 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8232 (packet_command): Now methods of ...
8233 (remote_target): ... this class.
8234 (m_remote_state) <remote_target>: New field.
8235 (struct remote_state) <stop_reply_queue,
8236 remote_async_inferior_event_token, wait_forever_enabled_p>: New
8237 fields.
8238 (remote_state::remote_state): Allocate stop_reply_queue.
8239 (remote_state): Delete global.
8240 (get_remote_state_raw): Delete.
8241 (remote_target::get_remote_state): Allocate m_remote_state on
8242 demand.
8243 (get_current_remote_target): New.
8244 (remote_ops, extended_remote_ops): Delete.
8245 (wait_forever_enabled_p, remote_async_inferior_event_token):
8246 Delete, moved to struct remote_state.
8247 (remote_target::close): Delete self. Destruction bits split to
8248 ...
8249 (remote_target::~remote_target): ... this.
8250 (show_memory_packet_size): Adjust to use
8251 get_current_remote_target.
8252 (struct protocol_feature) <func>: Add remote_target parameter.
8253 All callers adjusted.
8254 (curr_quit_handler_target): New.
8255 (remote_serial_quit_handler): Reimplement.
8256 (remote_target::open_1): Adjust to use get_current_remote_target.
8257 Heap-allocate remote_target/extended_remote_target instances.
8258 (vcont_builder::vcont_builder): Add remote_target parameter, and
8259 save it in m_remote. All callers adjusted.
8260 (vcont_builder::m_remote): New field.
8261 (vcont_builder::restart, vcont_builder::flush)
8262 (vcont_builder::push_action): Use it.
8263 (remote_target::commit_resume): Use it.
8264 (struct queue_iter_param) <remote>: New field.
8265 (remote_target::remove_new_fork_children): Fill in 'remote' field.
8266 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8267 (check_pending_event_prevents_wildcard_vcont_callback)
8268 (remote_target::check_pending_events_prevent_wildcard_vcont)
8269 (remote_target::discard_pending_stop_replies)
8270 (remote_target::discard_pending_stop_replies_in_queue)
8271 (remote_target::remote_notif_remove_queued_reply): Fill in
8272 'remote' field.
8273 (remote_notif_get_pending_events): New.
8274 (remote_target::readchar, remote_target::remote_serial_write):
8275 Save/restore curr_quit_handler_target.
8276 (putpkt): New.
8277 (kill_new_fork_children): Fill in 'remote' field.
8278 (packet_command): Use get_current_remote_target, defer to
8279 remote_target method of same name.
8280 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8281 parameter, and save it in m_remote. All callers adjusted.
8282 (scoped_remote_fd::release): Use m_remote.
8283 (scoped_remote_fd::m_remote): New field.
8284 (remote_file_put, remote_file_get, remote_file_delete): Use
8285 get_current_remote_target, defer to remote_target method of same
8286 name.
8287 (remote_btrace_reset): Add remote_state paremeter. Update all
8288 callers.
8289 (remote_async_inferior_event_handler). Pass down 'data'.
8290 (remote_new_objfile): Use get_current_remote_target.
8291 (remote_target::vcont_r_supported): New.
8292 (set_range_stepping): Use get_current_remote_target and
8293 remote_target::vcont_r_supported.
8294 (_initialize_remote): Don't allocate 'remote_state' and
8295 'stop_reply_queue' globals.
8296 * remote.h (struct remote_target): Forward declare.
8297 (getpkt, putpkt, remote_notif_get_pending_events): Add
8298 'remote_target' parameter.
8299
8300 2018-05-22 Pedro Alves <palves@redhat.com>
8301
8302 * remote.c (vcont_builder): Now a class. Make all data members
8303 private.
8304 (vcont_builder) <vcont_builder, restart, flush, push_action>:
8305 Declare methods.
8306 (vcont_builder_restart): Rename to ...
8307 (vcont_builder::restart): ... this.
8308 (vcont_builder_flush): Rename to ...
8309 (vcont_builder::flush): ... this.
8310 (vcont_builder_push_action): Rename to ...
8311 (vcont_builder::push_action): ... this.
8312 (remote_target::commit_resume): Adjust.
8313
8314 2018-05-22 Pedro Alves <palves@redhat.com>
8315
8316 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8317 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8318 (get_fixed_memory_packet_size): New.
8319 (get_memory_packet_size): Use it.
8320 (set_memory_packet_size): Don't override the config size with
8321 DEFAULT_MAX_MEMORY_PACKET_SIZE.
8322 (show_memory_packet_size): Use get_fixed_memory_packet_size.
8323 Don't refer to get_memory_packet_size if not connected to a remote
8324 target. Show "(default)" if configured size is 0.
8325
8326 2018-05-22 Pedro Alves <palves@redhat.com>
8327
8328 * remote.c (remote_target::mourn_inferior): Move
8329 discard_pending_stop_replies call here from ...
8330 (_initialize_remote): ... here.
8331
8332 2018-05-22 Pedro Alves <palves@redhat.com>
8333
8334 * remote.c (compare_section_command): Remove set_general_process
8335 call.
8336
8337 2018-05-22 Pedro Alves <palves@redhat.com>
8338
8339 * remote.c (struct packet_reg, struct remote_arch_state):
8340 Move higher up in the file.
8341 (remote_state) <m_arch_states>: Store remote_arch_state values
8342 instead of remote_arch_state pointers.
8343 (remote_state::get_remote_arch_state): Adjust.
8344
8345 2018-05-22 Pedro Alves <palves@redhat.com>
8346
8347 * remote.c: Include <unordered_map>.
8348 (remote_state): Now a class.
8349 (remote_state) <get_remote_arch_state>: Declare method.
8350 <get_remote_arch_state>: New field.
8351 (remote_arch_state) <remote_arch_state>: Declare ctor.
8352 <regs>: Now a unique_ptr.
8353 (remote_gdbarch_data_handle): Delete.
8354 (get_remote_arch_state): Delete.
8355 (remote_state::get_remote_arch_state): New.
8356 (get_remote_state): Adjust to call remote_state's
8357 get_remote_arch_state method.
8358 (init_remote_state): Delete, bits factored out to ...
8359 (remote_arch_state::remote_arch_state): ... this new method.
8360 (get_remote_packet_size, get_memory_packet_size)
8361 (process_g_packet, remote_target::fetch_registers)
8362 (remote_target::prepare_to_store, store_registers_using_G)
8363 (remote_target::store_registers, remote_target::get_trace_status):
8364 Adjust to call remote_state's method.
8365 (_initialize_remote): Remove reference to
8366 remote_gdbarch_data_handle.
8367
8368 2018-05-22 Pedro Alves <palves@redhat.com>
8369
8370 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8371 pread>: New method declarations.
8372 (remote_target::open_1): Adjust.
8373 (readahead_cache_invalidate): Rename to ...
8374 (readahead_cache::invalidate): ... this, and adjust to be a class
8375 method.
8376 (readahead_cache_invalidate_fd): Rename to ...
8377 (readahead_cache::invalidate_fd): ... this, and adjust to be a
8378 class method.
8379 (remote_hostio_pwrite): Adjust.
8380 (remote_hostio_pread_from_cache): Rename to ...
8381 (readahead_cache::pread): ... this, and adjust to be a class
8382 method.
8383 (remote_hostio_close): Adjust.
8384
8385 2018-05-22 Pedro Alves <palves@redhat.com>
8386
8387 * remote.c (remote_hostio_close_cleanup): Delete.
8388 (class scoped_remote_fd): New.
8389 (remote_file_put, remote_file_get): Use it.
8390
8391 2018-05-22 Pedro Alves <palves@redhat.com>
8392
8393 (struct vCont_action_support): Use bool and initialize all fields.
8394 (struct readahead_cache): Initialize all fields.
8395 (remote_state): Use bool and initialize all fields.
8396 (remote_state::remote_state, remote_state::~remote_state): New.
8397 (new_remote_state): Delete.
8398 (_initialize_remote): Use new to allocate remote_state.
8399
8400 2018-05-22 Pedro Alves <palves@redhat.com>
8401 張俊芝 <zjz@zjz.name>
8402
8403 PR gdb/22973
8404 * c-exp.y: Include "c-support.h".
8405 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8406 of tolower. Use c_ident_is_alpha to scan names.
8407 * c-lang.c: Include "c-support.h".
8408 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8409 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8410 * c-support.h: New file, with bits factored out from ...
8411 * cp-name-parser.y: ... this file.
8412 Include "c-support.h".
8413 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8414 c-support.h and renamed.
8415 (symbol_end, yylex): Adjust.
8416
8417 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8418
8419 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8420 parameter type to CORE_ADDR.
8421 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8422 parameter type in declaration to CORE_ADDR.
8423 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8424 target_auxv_search to get AT_HWCAP and use the result to get the
8425 target description.
8426 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8427 to CORE_ADDR. Remove the cast of the return value to unsigned
8428 long. Fix error predicate of target_auxv_search.
8429 (ppc_linux_nat_target::read_description): Change the type of the
8430 hwcap variable to CORE_ADDR.
8431
8432 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8433
8434 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8435 if the size of fpscr is larger than 32 bits.
8436
8437 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8438
8439 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8440 (ppc32_linux_vsxregmap): New global.
8441 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8442 regcache_supply_regset, and regcache_collect_regset.
8443 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8444 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8445 (fetch_vsx_register, store_vsx_register): Remove.
8446 (fetch_vsx_registers): Add regno parameter. Get regset using
8447 ppc_linux_vsxregset. Use regset to supply registers.
8448 (store_vsx_registers): Add regno parameter. Get regset using
8449 ppc_linux_vsxregset. Use regset to collect registers.
8450 (fetch_register): Call fetch_vsx_registers instead of
8451 fetch_vsx_register.
8452 (store_register): Call store_vsx_registers instead of
8453 store_vsx_register.
8454 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8455 new regno parameter.
8456 (store_ppc_registers): Call store_vsx_registers with -1 for the
8457 new regno parameter.
8458 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8459 (ppc_collect_vsxregset): Remove.
8460
8461 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8462
8463 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8464 offset fields.
8465 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8466 for vector register offset fields.
8467 (ppc64_fbsd_reg_offsets): Likewise.
8468 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8469 to vector register offset fields.
8470 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8471 to vector register offset fields.
8472 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8473 vector register offset fields.
8474 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8475 initializers for vector register offset fields.
8476 (rs6000_aix64_reg_offsets): Likewise.
8477 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8478 (ppc_supply_vrregset): Remove.
8479 (ppc_collect_vrregset): Remove.
8480 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8481 (ppc_linux_vrregset) : New function.
8482 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8483 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8484 (ppc32_linux_vrregset): Remove.
8485 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8486 and use result instead of ppc32_linux_vrregset.
8487 (ppc32_linux_reg_offsets): Remove initializers for vector register
8488 offset fields.
8489 (ppc64_linux_reg_offsets): Likewise.
8490 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8491 * ppc-linux-nat.c: Include regset.h.
8492 (gdb_vrregset_t): Adjust comment to account for little-endian
8493 mode.
8494 (supply_vrregset, fill_vrregset): Remove.
8495 (fetch_altivec_register, store_altivec_register): Remove.
8496 (fetch_altivec_registers): Add regno parameter. Get regset using
8497 ppc_linux_vrregset. Use regset to supply registers.
8498 (store_altivec_registers): Add regno parameter. Get regset using
8499 ppc_linux_vrregset. Use regset to collect registers.
8500 (fetch_register): Call fetch_altivec_registers instead of
8501 fetch_altivec_register.
8502 (store_register): Call store_altivec_registers instead of
8503 store_altivec_register.
8504 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8505 the new regno parameter.
8506 (store_ppc_registers): Call store_altivec_registers with -1 for
8507 the new regno parameter.
8508
8509 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8510
8511 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8512 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8513 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8514 (gdb_vrregset_t): Change array type size to
8515 PPC_LINUX_SIZEOF_VRREGSET.
8516 (gdb_vsxregset_t): Change array type size to
8517 PPC_LINUX_SIZEOF_VSXREGSET.
8518 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8519 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8520 PPC_LINUX_SIZEOF_VSXREGSET.
8521
8522 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8523
8524 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8525 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8526 nat/ppc-linux.c.
8527 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8528 ppc_linux_target_wordsize with tid.
8529 (ppc_linux_nat_target::read_description): Call ppc_linux_target
8530 wordsize with tid.
8531 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8532 (ppc64_64bit_inferior_p): Add static and inline specifiers.
8533 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8534 tid parameter. Remove static specifier.
8535 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8536 (ppc_linux_target_wordsize): New declaration.
8537
8538 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8539
8540 * arch/ppc-linux-common.c: New file.
8541 * arch/ppc-linux-common.h: New file.
8542 * arch/ppc-linux-tdesc.h: New file.
8543 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8544 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8545 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8546 arch/ppc-linux-tdesc.h.
8547 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8548 arch/ppc-linux-tdesc.h.
8549 (ppc_linux_nat_target::read_description): Remove target
8550 description matching code. Fill a ppc_linux_features struct and
8551 call ppc_linux_match_description with it. Move comment about ISA
8552 2.05 to ppc-linux-common.c.
8553 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8554 arch/ppc-linux-tdesc.h.
8555 (ppc_linux_core_read_description): Remove target description
8556 matching code. Fill a ppc_linux_features struct and call
8557 ppc_linux_match_description with it.
8558 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8559 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8560 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8561 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8562 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8563 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8564 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8565 (tdesc_powerpc_e500l): Remove.
8566
8567 2018-05-22 Joel Brobecker <brobecker@adacore.com>
8568
8569 * ada-lang.c (catch_assert_command): Pass empty string instead
8570 of NULL for excep_string argument.
8571
8572 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8573
8574 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8575 the width of the requested register exceeds the width of the
8576 `ptrace' data type.
8577
8578 2018-05-21 Tom Tromey <tom@tromey.com>
8579
8580 * printcmd.c (output_command): Remove.
8581 (output_command_const): Rename to output_command.
8582 * valprint.h (output_command): Rename from output_command_const.
8583 * tracepoint.c (trace_dump_actions): Call output_command.
8584
8585 2018-05-21 Tom Tromey <tom@tromey.com>
8586
8587 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8588 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8589 * ada-lang.h (create_ada_exception_catchpoint): Update.
8590 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8591 std::string.
8592 (create_excep_cond_exprs, ~ada_catchpoint)
8593 (should_stop_exception, print_one_exception)
8594 (print_mention_exception, print_recreate_exception): Update.
8595 (ada_get_next_arg): Remove.
8596 (catch_ada_exception_command_split): Use std::string. Change type
8597 of "excep_string", "cond_string".
8598 (catch_ada_exception_command): Update.
8599 (create_ada_exception_catchpoint): Change type of excep_string.
8600 (ada_exception_sal): Remove excep_string parameter.
8601 (~ada_catchpoint): Remove.
8602
8603 2018-05-21 Tom Tromey <tom@tromey.com>
8604
8605 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8606 cleanup.
8607
8608 2018-05-21 Tom Tromey <tom@tromey.com>
8609
8610 * ada-lang.c (ada_exception_message_1, ada_exception_message):
8611 Return unique_xmalloc_ptr.
8612 (print_it_exception): Update.
8613
8614 2018-05-21 Tom Tromey <tom@tromey.com>
8615
8616 * tracepoint.c (trace_dump_actions): Use std::string.
8617
8618 2018-05-21 Tom Tromey <tom@tromey.com>
8619
8620 * symfile.c (reread_symbols): Use std::string for original_name.
8621
8622 2018-05-21 Tom Tromey <tom@tromey.com>
8623
8624 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8625 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
8626 constructor.
8627
8628 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
8629
8630 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8631 instance to...
8632 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8633 * objfiles.c (get_objfile_bfd_data): Allocate
8634 objfile_per_bfd_storage with obstack_new when allocating on
8635 obstack.
8636
8637 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8638
8639 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8640 OBSTACK_ZALLOC.
8641 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8642 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8643 * mdebugread.c (mdebug_build_psymtabs): Likewise.
8644 (add_pending): Likewise.
8645 (parse_symbol): Likewise.
8646 (parse_partial_symbols): Likewise.
8647 (psymtab_to_symtab_1): Likewise.
8648 (new_psymtab): Likewise.
8649 (elfmdebug_build_psymtabs): Likewise.
8650 * minsyms.c (terminate_minimal_symbol_table): Likewise.
8651 * objfiles.c (get_objfile_bfd_data): Likewise.
8652 (objfile_register_static_link): Likewise.
8653 * psymtab.c (allocate_psymtab): Likewise.
8654 * stabsread.c (read_member_functions): Likewise.
8655 * xcoffread.c (xcoff_end_psymtab): Likewise.
8656
8657 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8658
8659 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8660 compiler supports std::is_trivially_constructible.
8661 * common/poison.h: Include obstack.h.
8662 (IsMallocable): Define to is_trivially_constructible if the
8663 compiler supports it, define to true_type otherwise.
8664 (xobnew): New.
8665 (XOBNEW): Redefine.
8666 (xobnewvec): New.
8667 (XOBNEWVEC): Redefine.
8668 * gdb_obstack.h (obstack_zalloc): New.
8669 (OBSTACK_ZALLOC): Redefine.
8670 (obstack_calloc): New.
8671 (OBSTACK_CALLOC): Redefine.
8672 (obstack_new): New.
8673 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8674 (gdbarch_obstack): New declaration in gdbarch.h, definition in
8675 gdbarch.c.
8676 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8677 obstack_calloc/obstack_zalloc.
8678 (gdbarch_obstack_zalloc): Remove.
8679 * target-descriptions.c (tdesc_data_init): Use obstack_new.
8680
8681 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8682
8683 * stack.c (backtrace_command_1): Remove useless variable int i.
8684
8685 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8686
8687 * stack.c (print_frame_info): Fix comment.
8688
8689 2018-05-18 Tom Tromey <tom@tromey.com>
8690
8691 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8692 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8693 (~dwarf2_per_objfile): Update
8694 (dwarf2_get_dwz_file): Use new.
8695 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8696 unique_ptr.
8697
8698 2018-05-18 Tom Tromey <tom@tromey.com>
8699
8700 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8701 unique_ptr.
8702 * dwarf2read.c (struct dwp_file): Add constructor and
8703 initializers.
8704 (open_and_init_dwp_file): Return a unique_ptr.
8705 (dwarf2_per_objfile, create_dwp_hash_table)
8706 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8707 (lookup_dwo_unit_in_dwp): Update.
8708 (open_and_init_dwp_file, get_dwp_file): Update.
8709
8710 2018-05-18 Tom Tromey <tom@tromey.com>
8711
8712 * dwarf2read.c (dwarf2_per_objfile): Update.
8713 (struct mapped_index): Add initializers.
8714 (dwarf2_read_index): Use new.
8715 (dw2_symtab_iter_init): Update.
8716 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8717 unique_ptr.
8718
8719 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8720
8721 * dwarf2read.c (mapped_index) <total_size>: Remove.
8722
8723 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8724
8725 * unittests/format_pieces-selftests.c (test_format_specifier):
8726 Add ARI comments.
8727
8728 2018-05-18 Tom Tromey <tom@tromey.com>
8729
8730 * c-typeprint.c (maybe_print_hole): New function.
8731 (c_print_type_struct_field_offset): Update.
8732 (c_type_print_base_struct_union): Call maybe_print_hole.
8733
8734 2018-05-17 Keith Seitz <keiths@redhat.com>
8735
8736 * breakpoint.c (build_bpstat_chain): New function, moved from
8737 bpstat_stop_status.
8738 (bpstat_stop_status): Add optional parameter, `stop_chain'.
8739 If no stop chain is passed, call build_bpstat_chain to build it.
8740 * breakpoint.h (build_bpstat_chain): Declare.
8741 (bpstat_stop_status): Move documentation here from breakpoint.c.
8742 * infrun.c (handle_signal_stop): Before eliding inlined frames,
8743 build the stop chain and pass it to skip_inline_frames.
8744 Pass this stop chain to bpstat_stop_status.
8745 * inline-frame.c: Include breakpoint.h.
8746 (stopped_by_user_bp_inline_frame): New function.
8747 (skip_inline_frames): Add parameter `stop_chain'.
8748 Move documention to inline-frame.h.
8749 If non-NULL, use stopped_by_user_bp_inline_frame to determine
8750 whether the frame should be elided.
8751 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8752 Add moved documentation and update for new parameter.
8753
8754 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8755
8756 PR cli/14975
8757 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8758 unittests/format_pieces-selftests.c.
8759 * common/format.h (format_piece) <operator==>: New.
8760 (format_pieces) <operator[]>: Remove.
8761 * common/format.c (format_pieces::format_pieces): Handle \e.
8762 * unittests/format_pieces-selftests.c: New.
8763
8764 2018-05-17 Tom Tromey <tom@tromey.com>
8765
8766 PR symtab/23010:
8767 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8768 (dw2_instantiate_symtab): Add skip_partial parameter.
8769 (dw2_find_last_source_symtab, dw2_map_expand_apply)
8770 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8771 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8772 (dw2_expand_symtabs_matching_one)
8773 (dw2_find_pc_sect_compunit_symtab)
8774 (dw2_debug_names_lookup_symbol)
8775 (dw2_debug_names_expand_symtabs_for_function): Update.
8776 (init_cutu_and_read_dies): Add skip_partial parameter.
8777 (process_psymtab_comp_unit, build_type_psymtabs_1)
8778 (process_skeletonless_type_unit, load_partial_comp_unit)
8779 (psymtab_to_symtab_1): Update.
8780 (load_full_comp_unit): Add skip_partial parameter.
8781 (process_imported_unit_die, dwarf2_read_addr_index)
8782 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8783 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8784 (read_signatured_type): Update.
8785
8786 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8787
8788 * value.c (release_value): Remove unused variable.
8789 (record_latest_value): Likewise.
8790 (access_value_history): Likewise.
8791 (preserve_values): Likewise.
8792
8793 2018-05-17 Tom Tromey <tom@tromey.com>
8794
8795 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8796 Initialize.
8797
8798 2018-05-16 Maciej W. Rozycki <macro@mips.com>
8799
8800 PR gdb/22286
8801 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8802 Also handle registers whose width is not a multiple of
8803 PTRACE_TYPE_RET.
8804 (linux_nat_trad_target::store_register): Likewise.
8805
8806 2018-05-16 Tom Tromey <tom@tromey.com>
8807
8808 * gdbcore.h (core_bfd): Redefine.
8809 * corelow.c (core_target::close): Update.
8810 (core_target_open): Update.
8811 * progspace.h (struct program_space) <cbfd>: Now a
8812 gdb_bfd_ref_ptr.
8813
8814 2018-05-16 Tom Tromey <tom@tromey.com>
8815
8816 PR cli/19551:
8817 * symfile-add-flags.h (enum symfile_add_flags)
8818 <SYMFILE_NOT_FILENAME>: New constant.
8819 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
8820 objfile name from BFD.
8821 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8822 * minidebug.c (find_separate_debug_file_in_section): Put
8823 ".gnu_debugdata" into BFD's file name.
8824
8825 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
8826
8827 * regcache.c (regcache_read_ftype, regcache_write_ftype):
8828 Remove.
8829
8830 2018-05-15 Tamar Christina <tamar.christina@arm.com>
8831
8832 PR binutils/21446
8833 * aarch64-tdep.c (aarch64_analyze_prologue,
8834 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8835 Indicate not interested in errors.
8836
8837 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8838
8839 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8840 Supply the MIPS_ZERO_REGNUM register.
8841
8842 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8843
8844 * mips-tdep.c (mask_address_var): Make variable static.
8845
8846 2018-05-14 Tom Tromey <tom@tromey.com>
8847
8848 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8849
8850 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
8851
8852 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8853 FXSAVE_ADDR for the mxcsr register.
8854
8855 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
8856
8857 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8858
8859 2018-05-11 Pedro Alves <palves@redhat.com>
8860
8861 * corelow.c (core_target) <core_target>: No longer inline.
8862 Initialize m_core_gdbarch, m_core_vec and build the section table
8863 here.
8864 <~core_target>: New.
8865 <core_gdbarch, get_core_register_section>: New methods.
8866 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8867 factored out from ...
8868 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8869 (core_ops): Delete.
8870 (sniff_core_bfd): Add gdbarch parameter.
8871 (core_close): Delete, merged into ...
8872 (core_target::close): ... here. Delete self.
8873 (core_close_cleanup): Delete.
8874 (core_target_open): Allocate a core_target on the heap. Use a
8875 unique_ptr instead of a cleanup. Bits moved into the core_target
8876 ctor. Adjust to use core_target methods instead of globals.
8877 (get_core_register_section): Rename to ...
8878 (core_target::get_core_register_section): ... this and adjust.
8879 (struct get_core_registers_cb_data): New.
8880 (get_core_registers_cb): Use it. Use bool.
8881 (core_target::fetch_registers, core_target::files_info)
8882 (core_target::xfer_partial, core_target::read_description)
8883 (core_target::pid_to, core_target::thread_name): Adjust to
8884 reference class fields instead of globals.
8885 * target.h (struct target_ops_deleter, target_ops_up): New.
8886
8887 2018-05-11 Pedro Alves <palves@redhat.com>
8888
8889 * corefile.c (core_file_command): Move to corelow.c.
8890 * corelow.c (the_core_target): Delete.
8891 (core_file_command): Moved from corefile.c. Check exec_bfd
8892 instead of the_core_target. Use target_detach instead of calling
8893 into the_core_target directly.
8894 (maybe_say_no_core_file_now): New.
8895 (core_target::detach): Use it.
8896 (_initialize_corelow): Remove references to the_core_target.
8897 * gdbcore.h (the_core_target): Delete.
8898
8899 2018-05-11 Tom Tromey <tromey@redhat.com>
8900 Pedro Alves <palves@redhat.com>
8901
8902 * corefile.c (core_bfd): Remove.
8903 * gdbcore.h (core_bfd): Now a macro.
8904 * progspace.h (struct program_space) <cbfd>: New field.
8905
8906 2018-05-11 Tom Tromey <tom@tromey.com>
8907
8908 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8909 gdb::def_vector.
8910
8911 2018-05-10 Tom Tromey <tom@tromey.com>
8912
8913 * configure: Rebuild.
8914 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8915
8916 2018-05-10 Joel Brobecker <brobecker@adacore.com>
8917
8918 PR server/23158:
8919 * regformats/regdat.sh: Adjust script, following the addition
8920 of the new expedite_regs parameter to init_target_desc.
8921
8922 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
8923
8924 PR gdb/23127
8925 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8926 set_gdbarch_significant_addr_bit.
8927 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8928 set_gdbarch_significant_addr_bit.
8929 * utils.c (address_significant): Update to sign extend addr.
8930
8931 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8932
8933 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8934 (xtensa_linux_init_abi): Limit tdep->num_regs by
8935 tdep->num_nopriv_regs.
8936 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8937 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8938 not initialized.
8939
8940 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8941
8942 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8943
8944 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8945
8946 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8947 (I387_MXCSR_INIT_VAL): New constant.
8948 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8949 buffer if it was supplied by the inferior.
8950 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8951 (i387_xsave_get_clear_bv): New function.
8952 (i387_supply_xsave): Only read x87 control registers from the
8953 xsave buffer if the feature is enabled, and the state will have
8954 been written, otherwise, provide a suitable default.
8955 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8956 including x87 control registers. Update control registers if they
8957 have changed from the default value, and mark features as enabled
8958 as required.
8959 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8960
8961 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8962
8963 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8964
8965 2018-05-07 Tom Tromey <tom@tromey.com>
8966
8967 * configure: Rebuild.
8968 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8969
8970 2018-05-07 Tom Tromey <tom@tromey.com>
8971
8972 PR tdep/20362:
8973 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8974 bit. Use correct value for VDIV.
8975
8976 2018-05-04 Tom Tromey <tom@tromey.com>
8977
8978 * configure: Rebuild.
8979 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8980
8981 2018-05-04 Tom Tromey <tom@tromey.com>
8982
8983 * linux-record.c (record_linux_system_call) <case
8984 RECORD_SYS_RECVFROM>: Add "break".
8985
8986 2018-05-04 Tom Tromey <tom@tromey.com>
8987
8988 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8989 Add missing "break".
8990 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8991 Add missing "break".
8992
8993 2018-05-04 Tom Tromey <tom@tromey.com>
8994
8995 * rs6000-tdep.c (ppc_process_record_op4)
8996 (ppc_process_record_op63): Add fall-through comment.
8997
8998 2018-05-04 Tom Tromey <tom@tromey.com>
8999
9000 * i386-tdep.c (i386_process_record): Add fall-through comment.
9001
9002 2018-05-04 Tom Tromey <tom@tromey.com>
9003
9004 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9005 comment.
9006
9007 2018-05-04 Tom Tromey <tom@tromey.com>
9008
9009 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9010 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9011 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9012 comment.
9013 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9014 comment.
9015 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9016 comment.
9017
9018 2018-05-04 Tom Tromey <tom@tromey.com>
9019
9020 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9021
9022 2018-05-04 Tom Tromey <tom@tromey.com>
9023
9024 * s390-tdep.c (s390_process_record): Fix fall-through comments.
9025 * xcoffread.c (scan_xcoff_symtab): Move comment later.
9026 * symfile.c (section_is_mapped): Fix fall-through comment.
9027 * stabsread.c (define_symbol, read_member_functions): Fix
9028 fall-through comment.
9029 * s390-linux-tdep.c (s390_process_record): Fix fall-through
9030 comment.
9031 * remote.c (remote_wait_as): Fix fall-through comment.
9032 * p-exp.y (yylex): Fix fall-through comment.
9033 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9034 comment.
9035 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9036 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9037 * jv-exp.y (yylex): Fix fall-through comment.
9038 * go-exp.y (lex_one_token): Fix fall-through comment.
9039 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9040 fall-through comment.
9041 * f-exp.y (yylex): Fix fall-through comment.
9042 * dwarf2read.c (process_die): Fix fall-through comments.
9043 * dbxread.c (process_one_symbol): Fix fall-through comment.
9044 * d-exp.y (lex_one_token): Fix fall-through comment.
9045 * cp-name-parser.y (yylex): Fix fall-through comment.
9046 * coffread.c (coff_symtab_read): Fix fall-through comment.
9047 * c-exp.y (lex_one_token): Fix fall-through comment.
9048 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9049 comment.
9050 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9051 comment.
9052
9053 2018-05-04 Tom Tromey <tom@tromey.com>
9054
9055 PR python/22730:
9056 * NEWS: Mention gdb.execute change.
9057 * gdbcmd.h (execute_control_command): Don't declare.
9058 * python/python.c (execute_gdb_command): Use read_command_lines_1,
9059 execute_control_commands, execute_control_commands_to_string.
9060 * cli/cli-script.h (execute_control_commands)
9061 (execute_control_commands_to_string): Declare.
9062 (execute_control_command): Add from_tty parameter.
9063 * cli/cli-script.c (execute_control_commands)
9064 (execute_control_commands_to_string): New functions.
9065 (execute_user_command): Use execute_control_commands.
9066 (execute_control_command_1): Add "from_tty" parameter. Update.
9067 (execute_control_command): Likewise.
9068
9069 2018-05-04 Tom Tromey <tom@tromey.com>
9070
9071 PR python/22731:
9072 * NEWS: Mention that breakpoint commands are writable.
9073 * python/py-breakpoint.c (bppy_set_commands): New function.
9074 (breakpoint_object_getset) <"commands">: Use it.
9075
9076 2018-05-04 Tom Tromey <tom@tromey.com>
9077
9078 * tracepoint.c (actions_command): Update.
9079 * mi/mi-cmd-break.c (mi_command_line_array)
9080 (mi_command_line_array_cnt, mi_command_line_array_ptr)
9081 (mi_read_next_line): Remove.
9082 (mi_cmd_break_commands): Update.
9083 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9084 function_view.
9085 * cli/cli-script.c (get_command_line): Update.
9086 (process_next_line): Use function_view. Constify.
9087 (recurse_read_control_structure, read_command_lines)
9088 (read_command_lines_1): Change argument types to function_view.
9089 (do_define_command, document_command): Update.
9090 * breakpoint.h (check_tracepoint_command): Don't declare.
9091 * breakpoint.c (check_tracepoint_command): Remove.
9092 (commands_command_1, create_tracepoint_from_upload): Update.
9093
9094 2018-05-04 Tom Tromey <tom@tromey.com>
9095
9096 PR gdb/11750:
9097 * cli/cli-script.h (enum command_control_type) <define_control>:
9098 New constant.
9099 * cli/cli-script.c (multi_line_command_p): Handle define_control.
9100 (build_command_line, execute_control_command_1)
9101 (process_next_line): Likewise.
9102 (do_define_command): New function, extracted from define_command.
9103 (define_command): Use it.
9104
9105 2018-05-04 Tom Tromey <tom@tromey.com>
9106
9107 * tracepoint.c (actions_command): Update.
9108 * cli/cli-script.h (read_command_lines): Update.
9109 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9110 (MAX_TMPBUF): Remove define.
9111 (define_command): Use string_printf.
9112 (document_command): Likewise.
9113 * breakpoint.c (commands_command_1): Update.
9114
9115 2018-05-04 Tom Tromey <tom@tromey.com>
9116
9117 * top.c (execute_command): Update.
9118 * cli/cli-script.h (print_command_lines): Now varargs.
9119 * cli/cli-script.c (print_command_lines): Now varargs.
9120 (execute_control_command_1) <case while_control, case if_control>:
9121 Update.
9122
9123 2018-05-04 Tom Tromey <tom@tromey.com>
9124
9125 * tracepoint.c (all_tracepoint_actions): Rename from
9126 all_tracepoint_actions_and_cleanup. Change return type.
9127 (actions_command, encode_actions_1, encode_actions)
9128 (trace_dump_actions, tdump_command): Update.
9129 * remote.c (remote_download_command_source): Update.
9130 * python/python.c (gdbpy_eval_from_control_command)
9131 (python_command, python_interactive_command): Update.
9132 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9133 * guile/guile.c (guile_command)
9134 (gdbscm_eval_from_control_command, guile_command): Update.
9135 * compile/compile.c (compile_code_command)
9136 (compile_print_command, compile_to_object): Update.
9137 * cli/cli-script.h (struct command_lines_deleter): New.
9138 (counted_command_line): New typedef.
9139 (struct command_line): Add constructor, destructor.
9140 <body_list>: Remove.
9141 <body_list_0, body_list_1>: New members.
9142 (command_line_up): Remove typedef.
9143 (read_command_lines, read_command_lines_1, get_command_line):
9144 Update.
9145 (copy_command_lines): Don't declare.
9146 * cli/cli-script.c (build_command_line): Use "new".
9147 (get_command_line): Return counted_command_line.
9148 (print_command_lines, execute_user_command)
9149 (execute_control_command_1, while_command, if_command): Update.
9150 (realloc_body_list): Remove.
9151 (process_next_line, recurse_read_control_structure): Update.
9152 (read_command_lines, read_command_lines_1): Return counted_command_line.
9153 (free_command_lines): Use "delete".
9154 (copy_command_lines): Remove.
9155 (define_command, document_command, show_user_1): Update.
9156 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9157 a counted_command_line.
9158 * breakpoint.h (counted_command_line): Remove typedef.
9159 (breakpoint_set_commands): Update.
9160 * breakpoint.c (check_no_tracepoint_commands)
9161 (validate_commands_for_breakpoint): Update.
9162 (breakpoint_set_commands): Change commands to be a
9163 counted_command_line.
9164 (commands_command_1, update_dprintf_command_list)
9165 (create_tracepoint_from_upload): Update.
9166
9167 2018-05-04 Tom Tromey <tom@tromey.com>
9168
9169 * cli/cli-decode.h (cmd_list_element): New constructor.
9170 (~cmd_list_element): New destructor.
9171 (struct cmd_list_element): Add initializers.
9172 * cli/cli-decode.c (do_add_cmd): Use "new".
9173 (delete_cmd): Use "delete".
9174
9175 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
9176 Pedro Alves <palves@redhat.com>
9177
9178 PR breakpoints/19806 and support for PR external/20207.
9179 * NEWS: Mention Aarch64 watchpoint improvements.
9180 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9181 watchpoints and PR external/20207 watchpoints.
9182 * nat/aarch64-linux-hw-point.c
9183 (kernel_supports_any_contiguous_range): New.
9184 (aarch64_watchpoint_offset): New.
9185 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9186 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9187 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9188 (aarch64_align_watchpoint): New parameters aligned_offset_p and
9189 next_addr_orig_p. Support PR external/20207 watchpoints.
9190 (aarch64_downgrade_regs): New.
9191 (aarch64_dr_state_insert_one_point): New parameters offset and
9192 addr_orig.
9193 (aarch64_dr_state_remove_one_point): Likewise.
9194 (aarch64_handle_breakpoint): Update caller.
9195 (aarch64_handle_aligned_watchpoint): Likewise.
9196 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9197 aligned_offset.
9198 (aarch64_linux_set_debug_regs): Remove const from state. Call
9199 aarch64_downgrade_regs.
9200 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9201 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9202 (DR_CONTROL_MASK): ... this.
9203 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9204 (unsigned int aarch64_watchpoint_offset): New prototype.
9205 (aarch64_linux_set_debug_regs): Remove const from state.
9206 * utils.c (align_up, align_down): Move to ...
9207 * common/common-utils.c (align_up, align_down): ... here.
9208 * utils.h (align_up, align_down): Move to ...
9209 * common/common-utils.h (align_up, align_down): ... here.
9210
9211 2018-05-04 Joel Brobecker <brobecker@adacore.com>
9212
9213 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9214 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9215 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9216 Re-implement to match the ABI as summarized in GCC's
9217 gcc/config/sparc/sparc.c. All callers updated.
9218 (sparc32_store_arguments): Remove assertion.
9219
9220 2018-05-04 Tom Tromey <tom@tromey.com>
9221
9222 * printcmd.c: Don't include tui.h.
9223 (decode_format): Use skip_spaces.
9224
9225 2018-05-04 Tom Tromey <tom@tromey.com>
9226
9227 PR gdb/22619:
9228 * printcmd.c (last_count): New global.
9229 (x_command): Use saved count when repeating.
9230
9231 2018-05-04 Tom Tromey <tom@tromey.com>
9232
9233 * nto-procfs.c (do_closedir_cleanup): Remove.
9234 (procfs_pidlist): Use gdb_dir_up.
9235 * procfs.c (do_closedir_cleanup): Remove.
9236 (proc_update_threads): Use gdb_dir_up.
9237 * common/filestuff.h (struct gdb_dir_deleter): New.
9238 (gdb_dir_up): New typedef.
9239
9240 2018-05-04 Tom Tromey <tom@tromey.com>
9241
9242 * ada-lang.c (print_mention_exception): Use std::string.
9243
9244 2018-05-04 Tom Tromey <tom@tromey.com>
9245
9246 * ada-lang.c (create_excep_cond_exprs): Update.
9247 (ada_exception_catchpoint_cond_string): Use std::string.
9248
9249 2018-05-04 Tom Tromey <tom@tromey.com>
9250
9251 * ada-lang.c (xget_renaming_scope): Return std::string.
9252 (old_renaming_is_invisible): Update.
9253
9254 2018-05-04 Tom Tromey <tom@tromey.com>
9255
9256 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9257 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9258
9259 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
9260
9261 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9262
9263 2018-05-04 Tom Tromey <tom@tromey.com>
9264
9265 * remote.c (remote_query_supported_append): Change type.
9266 (remote_check_symbols): Update.
9267
9268 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
9269
9270 PR gdb/11420
9271 * configure.ac: Prepend libpython.
9272 * python/python-config.py: Likewise.
9273 * configure: Regenerate.
9274
9275 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
9276
9277 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9278
9279 2018-05-03 Pedro Alves <palves@redhat.com>
9280
9281 * s390-linux-nat.c
9282 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9283 override. Write 'true' instead of '1'.
9284 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9285 declaration.
9286
9287 2018-05-02 Pedro Alves <palves@redhat.com>
9288
9289 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9290 add_inf_child_target.
9291 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9292 add_inf_child_target.
9293 * aix-thread.c (aix_thread_target_info): New.
9294 (aix_thread_target) <shortname, longname, doc>: Delete.
9295 <info>: New.
9296 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9297 add_inf_child_target.
9298 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9299 add_inf_child_target.
9300 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9301 add_inf_child_target.
9302 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9303 add_inf_child_target.
9304 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9305 add_inf_child_target.
9306 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9307 add_inf_child_target.
9308 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9309 add_inf_child_target.
9310 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9311 add_inf_child_target.
9312 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9313 add_inf_child_target.
9314 * bfd-target.c (target_bfd_target_info): New.
9315 (target_bfd) <shortname, longname, doc>: Delete.
9316 <info>: New.
9317 * bsd-kvm.c (bsd_kvm_target_info): New.
9318 (bsd_kvm_target) <shortname, longname, doc>: Delete.
9319 <info>: New.
9320 (bsd_kvm_target::open): Rename to ...
9321 (bsd_kvm_target_open): ... this. Adjust.
9322 * bsd-uthread.c (bsd_uthread_target_info): New.
9323 (bsd_uthread_target) <shortname, longname, doc>: Delete.
9324 <info>: New.
9325 * corefile.c (core_file_command): Adjust.
9326 * corelow.c (core_target_info): New.
9327 (core_target) <shortname, longname, doc>: Delete.
9328 <info>: New.
9329 (core_target::open): Rename to ...
9330 (core_target_open): ... this. Adjust.
9331 * ctf.c (ctf_target_info): New.
9332 (ctf_target) <shortname, longname, doc>: Delete.
9333 <info>: New.
9334 (ctf_target::open): Rename to ...
9335 (ctf_target_open): ... this.
9336 (_initialize_ctf): Adjust.
9337 * exec.c (exec_target_info): New.
9338 (exec_target) <shortname, longname, doc>: Delete.
9339 <info>: New.
9340 (exec_target::open): Rename to ...
9341 (exec_target_open): ... this.
9342 * gdbcore.h (core_target_open): Declare.
9343 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9344 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9345 add_inf_child_target.
9346 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9347 add_inf_child_target.
9348 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9349 add_inf_child_target.
9350 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9351 add_inf_child_target.
9352 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9353 add_inf_child_target.
9354 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9355 add_inf_child_target.
9356 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9357 add_inf_child_target.
9358 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9359 add_inf_child_target.
9360 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9361 add_inf_child_target.
9362 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9363 add_inf_child_target.
9364 * inf-child.c (inf_child_target_info): New.
9365 (inf_child_target::info): New.
9366 (inf_child_open_target): Remove 'target' parameter. Use
9367 get_native_target instead.
9368 (inf_child_target::open): Delete.
9369 (add_inf_child_target): New.
9370 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9371 Delete.
9372 <info>: New.
9373 (add_inf_child_target): Declare.
9374 (inf_child_open_target): Declare.
9375 * linux-thread-db.c (thread_db_target_info): New.
9376 (thread_db_target) <shortname, longname, doc>: Delete.
9377 <info>: New.
9378 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9379 add_inf_child_target.
9380 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9381 add_inf_child_target.
9382 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9383 add_inf_child_target.
9384 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9385 add_inf_child_target.
9386 * make-target-delegates (print_class): Adjust.
9387 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9388 add_inf_child_target.
9389 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9390 add_inf_child_target.
9391 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9392 add_inf_child_target.
9393 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9394 add_inf_child_target.
9395 * nto-procfs.c (nto_native_target_info): New.
9396 (nto_procfs_target_native) <shortname, longname, doc>:
9397 Delete.
9398 <info>: New.
9399 (nto_procfs_target_info): New.
9400 (nto_procfs_target_procfs) <shortname, longname, doc>:
9401 Delete.
9402 <info>: New.
9403 (init_procfs_targets): Adjust.
9404 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9405 add_inf_child_target.
9406 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9407 add_inf_child_target.
9408 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9409 add_inf_child_target.
9410 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9411 add_inf_child_target.
9412 * ravenscar-thread.c (ravenscar_target_info): New.
9413 (ravenscar_thread_target) <shortname, longname, doc>:
9414 Delete.
9415 <info>: New.
9416 * record-btrace.c (record_btrace_target_info):
9417 (record_btrace_target) <shortname, longname, doc>: Delete.
9418 <info>: New.
9419 (record_btrace_target::open): Rename to ...
9420 (record_btrace_target_open): ... this. Adjust.
9421 * record-full.c (record_longname, record_doc): New.
9422 (record_full_base_target) <shortname, longname, doc>: Delete.
9423 <info>: New.
9424 (record_full_target_info): New.
9425 (record_full_target): <shortname>: Delete.
9426 <info>: New.
9427 (record_full_core_open_1, record_full_open_1): Update comments.
9428 (record_full_base_target::open): Rename to ...
9429 (record_full_open): ... this.
9430 (cmd_record_full_restore): Update.
9431 (_initialize_record_full): Update.
9432 * remote-sim.c (remote_sim_target_info): New.
9433 (gdbsim_target) <shortname, longname, doc>: Delete.
9434 <info>: New.
9435 (gdbsim_target::open): Rename to ...
9436 (gdbsim_target_open): ... this.
9437 (_initialize_remote_sim): Adjust.
9438 * remote.c (remote_doc): New.
9439 (remote_target_info): New.
9440 (remote_target) <shortname, longname, doc>: Delete.
9441 <info>: New.
9442 (extended_remote_target_info): New.
9443 (extended_remote_target) <shortname, longname, doc>: Delete.
9444 <info>: New.
9445 (remote_target::open_1): Make static. Adjust.
9446 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9447 * s390-linux-nat.c (_initialize_s390_nat): Use
9448 add_inf_child_target.
9449 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9450 add_inf_child_target.
9451 * sol-thread.c (thread_db_target_info): New.
9452 (sol_thread_target) <shortname, longname, doc>: Delete.
9453 <info>: New.
9454 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9455 add_inf_child_target.
9456 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9457 add_inf_child_target.
9458 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9459 add_inf_child_target.
9460 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9461 add_inf_child_target.
9462 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9463 add_inf_child_target.
9464 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9465 add_inf_child_target.
9466 * spu-linux-nat.c (_initialize_spu_nat): Use
9467 add_inf_child_target.
9468 * spu-multiarch.c (spu_multiarch_target_info): New.
9469 (spu_multiarch_target) <shortname, longname, doc>: Delete.
9470 <info>: New.
9471 * target-delegates.c: Regenerate.
9472 * target.c: Include <unordered_map>.
9473 (target_ops_p): Delete.
9474 (DEF_VEC_P(target_ops_p)): Delete.
9475 (target_factories): New.
9476 (test_target_info): New.
9477 (test_target_ops::info): New.
9478 (open_target): Adjust to use target_factories.
9479 (add_target_with_completer): Rename to ...
9480 (add_target): ... this. Change prototype. Register target_info
9481 and open callback in target_factories. Register target_info in
9482 command context instead of target_ops.
9483 (add_target): Delete old implementation.
9484 (add_deprecated_target_alias): Change prototype. Adjust.
9485 (the_native_target): New.
9486 (set_native_target, get_native_target): New.
9487 (find_default_run_target): Use the_native_target.
9488 (find_attach_target, find_run_target): Simplify.
9489 (target_ops::open): Delete.
9490 (dummy_target_info): New.
9491 (dummy_target::shortname, dummy_target::longname)
9492 (dummy_target::doc): Delete.
9493 (dummy_target::info): New.
9494 (debug_target::shortname, debug_target::longname)
9495 (debug_target::doc): Delete.
9496 (debug_target::info): New.
9497 * target.h (struct target_info): New.
9498 (target_ops::~target_ops): Add comment.
9499 (target_ops::info): New.
9500 (target_ops::shortname, target_ops::longname, target_ops::doc): No
9501 longer virtual. Implement in terms of target_info.
9502 (set_native_target, get_native_target): Declare.
9503 (target_open_ftype): New.
9504 (add_target, add_target_with_completer)
9505 (add_deprecated_target_alias): Change prototype.
9506 (test_target) <shortname, longname, doc>: Delete.
9507 <info>: New.
9508 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9509 add_inf_child_target.
9510 * tracefile-tfile.c (tfile_target_info): New.
9511 (tfile_target) <shortname, longname, doc>: Delete.
9512 <info>: New.
9513 (tfile_target::open): Rename to ...
9514 (tfile_target_open): ... this.
9515 (_initialize_tracefile_tfile): Adjust.
9516 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9517 add_inf_child_target.
9518 * windows-nat.c (_initialize_windows_nat): Use
9519 add_inf_child_target.
9520 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9521 add_inf_child_target.
9522
9523 2018-05-02 Pedro Alves <palves@redhat.com>
9524
9525 * linux-nat.h (linux_nat_target) <low_new_thread,
9526 low_delete_thread, low_new_fork, low_forget_process,
9527 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9528 New virtual methods.
9529 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9530 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9531 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9532 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9533 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9534 Delete.
9535 * linux-fork.c (delete_fork): Adjust to call low method.
9536 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9537 (linux_nat_new_fork, linux_nat_forget_process_hook)
9538 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9539 (linux_nat_status_is_event):
9540 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9541 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9542 to call low method.
9543 (sigtrap_is_event): Rename to ...
9544 (linux_nat_target::low_status_is_event): ... this.
9545 (linux_nat_set_status_is_event): Delete.
9546 (save_stop_reason, linux_nat_wait_1)
9547 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9548 low methods.
9549 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9550 (linux_nat_set_new_fork, linux_nat_set_forget_process)
9551 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9552 (linux_nat_set_prepare_to_resume): Delete.
9553 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9554 low virtual methods.
9555 * amd64-linux-nat.c: Likewise.
9556 * arm-linux-nat.c: Likewise.
9557 * i386-linux-nat.c: Likewise.
9558 * ia64-linux-nat.c: Likewise.
9559 * mips-linux-nat.c: Likewise.
9560 * ppc-linux-nat.c: Likewise.
9561 * s390-linux-nat.c: Likewise.
9562 * sparc64-linux-nat.c: Likewise.
9563 * x86-linux-nat.c: Likewise.
9564 * x86-linux-nat.h: Include "nat/x86-linux.h".
9565 (x86_linux_nat_target) <low_new_fork, low_forget_process,
9566 low_prepare_to_resume, low_new_thread, low_delete_thread>:
9567 Override methods.
9568
9569 2018-05-02 Pedro Alves <palves@redhat.com>
9570
9571 * target.h (target_ops)
9572 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9573 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9574 stopped_by_watchpoint, have_continuable_watchpoint,
9575 stopped_data_address, watchpoint_addr_within_range,
9576 can_accel_watchpoint_condition, can_run, thread_alive,
9577 has_all_memory, has_memory, has_stack, has_registers,
9578 has_execution, can_async_p, is_async_p, supports_non_stop,
9579 always_non_stop_p, can_execute_reverse, supports_multi_process,
9580 supports_enable_disable_tracepoint,
9581 supports_disable_randomization, supports_string_tracing,
9582 supports_evaluation_of_breakpoint_conditions,
9583 can_run_breakpoint_commands, filesystem_is_local,
9584 can_download_tracepoint, get_trace_state_variable_value,
9585 set_trace_notes, get_tib_address, use_agent, can_use_agent,
9586 record_is_replaying, record_will_replay,
9587 augmented_libraries_svr4_read>: Adjust to return bool.
9588 * aarch64-linux-nat.c: All implementations adjusted.
9589 * aix-thread.c: All implementations adjusted.
9590 * arm-linux-nat.c: All implementations adjusted.
9591 * breakpoint.c: All implementations adjusted.
9592 * bsd-kvm.c: All implementations adjusted.
9593 * bsd-uthread.c: All implementations adjusted.
9594 * corelow.c: All implementations adjusted.
9595 * ctf.c: All implementations adjusted.
9596 * darwin-nat.c: All implementations adjusted.
9597 * darwin-nat.h: All implementations adjusted.
9598 * exec.c: All implementations adjusted.
9599 * fbsd-nat.c: All implementations adjusted.
9600 * fbsd-nat.h: All implementations adjusted.
9601 * gnu-nat.c: All implementations adjusted.
9602 * gnu-nat.h: All implementations adjusted.
9603 * go32-nat.c: All implementations adjusted.
9604 * ia64-linux-nat.c: All implementations adjusted.
9605 * inf-child.c: All implementations adjusted.
9606 * inf-child.h: All implementations adjusted.
9607 * inf-ptrace.c: All implementations adjusted.
9608 * inf-ptrace.h: All implementations adjusted.
9609 * linux-nat.c: All implementations adjusted.
9610 * linux-nat.h: All implementations adjusted.
9611 * mips-linux-nat.c: All implementations adjusted.
9612 * nto-procfs.c: All implementations adjusted.
9613 * ppc-linux-nat.c: All implementations adjusted.
9614 * procfs.c: All implementations adjusted.
9615 * ravenscar-thread.c: All implementations adjusted.
9616 * record-btrace.c: All implementations adjusted.
9617 * record-full.c: All implementations adjusted.
9618 * remote-sim.c: All implementations adjusted.
9619 * remote.c: All implementations adjusted.
9620 * s390-linux-nat.c: All implementations adjusted.
9621 * sol-thread.c: All implementations adjusted.
9622 * spu-multiarch.c: All implementations adjusted.
9623 * target-delegates.c: All implementations adjusted.
9624 * target.c: All implementations adjusted.
9625 * target.h: All implementations adjusted.
9626 * tracefile-tfile.c: All implementations adjusted.
9627 * tracefile.c: All implementations adjusted.
9628 * tracefile.h: All implementations adjusted.
9629 * windows-nat.c: All implementations adjusted.
9630 * x86-linux-nat.h: All implementations adjusted.
9631 * x86-nat.h: All implementations adjusted.
9632
9633 2018-05-02 Pedro Alves <palves@redhat.com>
9634
9635 * make-target-delegates (scan_target_h): Don't trim lines here.
9636 Replace sequences of tabs and/or whitespace with a single
9637 whitespace.
9638 (top level, parsing methods): Trim each line before processing it
9639 here.
9640
9641 2018-05-02 Pedro Alves <palves@redhat.com>
9642 John Baldwin <jhb@freebsd.org>
9643
9644 * target.h (enum strata) <debug_stratum>: New.
9645 (struct target_ops) <all delegation methods>: Replace by C++
9646 virtual methods, and drop "to_" prefix. All references updated
9647 throughout.
9648 <to_shortname, to_longname, to_doc, to_data,
9649 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9650 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9651 virtual methods. All references updated throughout.
9652 <can_attach, supports_terminal_ours, can_create_inferior,
9653 get_thread_control_capabilities, attach_no_wait>: New
9654 virtual methods.
9655 <insert_breakpoint, remove_breakpoint>: Now
9656 TARGET_DEFAULT_NORETURN methods.
9657 <info_proc>: Now returns bool.
9658 <to_magic>: Delete.
9659 (OPS_MAGIC): Delete.
9660 (current_target): Delete. All references replaced by references
9661 to ...
9662 (target_stack): ... this. New.
9663 (target_shortname, target_longname): Adjust.
9664 (target_can_run): Now a function declaration.
9665 (default_child_has_all_memory, default_child_has_memory)
9666 (default_child_has_stack, default_child_has_registers)
9667 (default_child_has_execution): Remove target_ops parameter.
9668 (complete_target_initialization): Delete.
9669 (memory_breakpoint_target): New template class.
9670 (test_target_ops): Refactor as a C++ class with virtual methods.
9671 * make-target-delegates (NAME_PART): Tighten.
9672 (POINTER_PART, CP_SYMBOL): New.
9673 (SIMPLE_RETURN_PART): Reimplement.
9674 (VEC_RETURN_PART): Expect less.
9675 (RETURN_PART, VIRTUAL_PART): New.
9676 (METHOD): Adjust to C++ virtual methods.
9677 (scan_target_h): Remove reference to C99.
9678 (dname): Output "target_ops::" prefix.
9679 (write_function_header): Adjust to output a C++ class method.
9680 (write_declaration): New.
9681 (write_delegator): Adjust to output a C++ class method.
9682 (tdname): Output "dummy_target::" prefix.
9683 (write_tdefault, write_debugmethod): Adjust to output a C++ class
9684 method.
9685 (tdefault_names, debug_names): Delete.
9686 (return_types, tdefaults, styles, argtypes_array): New.
9687 (top level): All methods are delegators.
9688 (print_class): New.
9689 (top level): Print dummy_target and debug_target classes.
9690 * target-delegates.c: Regenerate.
9691 * target-debug.h (target_debug_print_enum_info_proc_what)
9692 (target_debug_print_thread_control_capabilities)
9693 (target_debug_print_thread_info_p): New.
9694 * target.c (dummy_target): Delete.
9695 (the_dummy_target, the_debug_target): New.
9696 (target_stack): Now extern.
9697 (set_targetdebug): Push/unpush debug target.
9698 (default_child_has_all_memory, default_child_has_memory)
9699 (default_child_has_stack, default_child_has_registers)
9700 (default_child_has_execution): Remove target_ops parameter.
9701 (complete_target_initialization): Delete.
9702 (add_target_with_completer): No longer call
9703 complete_target_initialization.
9704 (target_supports_terminal_ours): Use regular delegation.
9705 (update_current_target): Delete.
9706 (push_target): No longer check magic number. Don't call
9707 update_current_target.
9708 (unpush_target): Don't call update_current_target.
9709 (target_is_pushed): No longer check magic number.
9710 (target_require_runnable): Skip for all stratums over
9711 process_stratum.
9712 (target_ops::info_proc): New.
9713 (target_info_proc): Use find_target_at and
9714 find_default_run_target.
9715 (target_supports_disable_randomization): Use regular delegation.
9716 (target_get_osdata): Use find_target_at.
9717 (target_ops::open, target_ops::close, target_ops::can_attach)
9718 (target_ops::attach, target_ops::can_create_inferior)
9719 (target_ops::create_inferior, target_ops::can_run)
9720 (target_can_run): New.
9721 (default_fileio_target): Use regular delegation.
9722 (target_ops::fileio_open, target_ops::fileio_pwrite)
9723 (target_ops::fileio_pread, target_ops::fileio_fstat)
9724 (target_ops::fileio_close, target_ops::fileio_unlink)
9725 (target_ops::fileio_readlink): New.
9726 (target_fileio_open_1, target_fileio_unlink)
9727 (target_fileio_readlink): Always call the target method. Handle
9728 FILEIO_ENOSYS.
9729 (return_zero, return_zero_has_execution): Delete.
9730 (init_dummy_target): Delete.
9731 (dummy_target::dummy_target, dummy_target::shortname)
9732 (dummy_target::longname, dummy_target::doc)
9733 (debug_target::debug_target, debug_target::shortname)
9734 (debug_target::longname, debug_target::doc): New.
9735 (target_supports_delete_record): Use regular delegation.
9736 (setup_target_debug): Delete.
9737 (maintenance_print_target_stack): Skip debug_stratum.
9738 (initialize_targets): Instantiate the_dummy_target and
9739 the_debug_target.
9740 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
9741 use target_stack.
9742 (target_auxv_search, fprint_target_auxv): Adjust.
9743 (info_auxv_command): Adjust to use target_stack.
9744 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9745 * exceptions.c (print_flush): Handle a NULL target_stack.
9746 * regcache.c (target_ops_no_register): Refactor as class with
9747 virtual methods.
9748
9749 * exec.c (exec_target): New class.
9750 (exec_ops): Now an exec_target.
9751 (exec_open, exec_close_1, exec_get_section_table)
9752 (exec_xfer_partial, exec_files_info, exec_has_memory)
9753 (exec_make_note_section): Refactor as exec_target methods.
9754 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9755 Delete.
9756 (exec_target::find_memory_regions): New.
9757 (_initialize_exec): Don't call init_exec_ops.
9758 * gdbcore.h (exec_file_clear): Delete.
9759
9760 * corefile.c (core_target): Delete.
9761 (core_file_command): Adjust.
9762 * corelow.c (core_target): New class.
9763 (the_core_target): New.
9764 (core_close): Remove target_ops parameter.
9765 (core_close_cleanup): Adjust.
9766 (core_target::close): New.
9767 (core_open, core_detach, get_core_registers, core_files_info)
9768 (core_xfer_partial, core_thread_alive, core_read_description)
9769 (core_pid_to_str, core_thread_name, core_has_memory)
9770 (core_has_stack, core_has_registers, core_info_proc): Rework as
9771 core_target methods.
9772 (ignore, core_remove_breakpoint, init_core_ops): Delete.
9773 (_initialize_corelow): Initialize the_core_target.
9774 * gdbcore.h (core_target): Delete.
9775 (the_core_target): New.
9776
9777 * ctf.c: (ctf_target): New class.
9778 (ctf_ops): Now a ctf_target.
9779 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9780 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9781 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9782 methods.
9783 (init_ctf_ops): Delete.
9784 (_initialize_ctf): Don't call it.
9785 * tracefile-tfile.c (tfile_target): New class.
9786 (tfile_ops): Now a tfile_target.
9787 (tfile_open, tfile_close, tfile_files_info)
9788 (tfile_get_tracepoint_status, tfile_trace_find)
9789 (tfile_fetch_registers, tfile_xfer_partial)
9790 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9791 Refactor as tfile_target methods.
9792 (tfile_xfer_partial_features): Remove target_ops parameter.
9793 (init_tfile_ops): Delete.
9794 (_initialize_tracefile_tfile): Don't call it.
9795 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9796 (tracefile_has_stack, tracefile_has_registers)
9797 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9798 tracefile_target methods.
9799 (init_tracefile_ops): Delete.
9800 (tracefile_target::tracefile_target): New.
9801 * tracefile.h: Include "target.h".
9802 (tracefile_target): New class.
9803 (init_tracefile_ops): Delete.
9804
9805 * spu-multiarch.c (spu_multiarch_target): New class.
9806 (spu_ops): Now a spu_multiarch_target.
9807 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9808 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9809 (spu_search_memory, spu_mourn_inferior): Refactor as
9810 spu_multiarch_target methods.
9811 (init_spu_ops): Delete.
9812 (_initialize_spu_multiarch): Remove references to init_spu_ops,
9813 complete_target_initialization.
9814
9815 * ravenscar-thread.c (ravenscar_thread_target): New class.
9816 (ravenscar_ops): Now a ravenscar_thread_target.
9817 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9818 (ravenscar_thread_alive, ravenscar_pid_to_str)
9819 (ravenscar_fetch_registers, ravenscar_store_registers)
9820 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9821 (ravenscar_stopped_by_hw_breakpoint)
9822 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9823 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9824 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9825 methods.
9826 (init_ravenscar_thread_ops): Delete.
9827 (_initialize_ravenscar): Remove references to
9828 init_ravenscar_thread_ops and complete_target_initialization.
9829
9830 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9831 (bsd_uthread_target): New class.
9832 (bsd_uthread_ops): Now a bsd_uthread_target.
9833 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9834 (bsd_uthread_close, bsd_uthread_mourn_inferior)
9835 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9836 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9837 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9838 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9839 (bsd_uthread_target): Delete function.
9840 (_initialize_bsd_uthread): Remove reference to
9841 complete_target_initialization.
9842
9843 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
9844 (target_bfd): ... this new class.
9845 (target_bfd_xfer_partial, target_bfd_get_section_table)
9846 (target_bfd_close): Refactor as target_bfd methods.
9847 (target_bfd::~target_bfd): New.
9848 (target_bfd_reopen): Adjust.
9849 (target_bfd::close): New.
9850
9851 * record-btrace.c (record_btrace_target): New class.
9852 (record_btrace_ops): Now a record_btrace_target.
9853 (record_btrace_open, record_btrace_stop_recording)
9854 (record_btrace_disconnect, record_btrace_close)
9855 (record_btrace_async, record_btrace_info)
9856 (record_btrace_insn_history, record_btrace_insn_history_range)
9857 (record_btrace_insn_history_from, record_btrace_call_history)
9858 (record_btrace_call_history_range)
9859 (record_btrace_call_history_from, record_btrace_record_method)
9860 (record_btrace_is_replaying, record_btrace_will_replay)
9861 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9862 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9863 (record_btrace_store_registers, record_btrace_prepare_to_store)
9864 (record_btrace_to_get_unwinder)
9865 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9866 (record_btrace_commit_resume, record_btrace_wait)
9867 (record_btrace_stop, record_btrace_can_execute_reverse)
9868 (record_btrace_stopped_by_sw_breakpoint)
9869 (record_btrace_supports_stopped_by_sw_breakpoint)
9870 (record_btrace_stopped_by_hw_breakpoint)
9871 (record_btrace_supports_stopped_by_hw_breakpoint)
9872 (record_btrace_update_thread_list, record_btrace_thread_alive)
9873 (record_btrace_goto_begin, record_btrace_goto_end)
9874 (record_btrace_goto, record_btrace_stop_replaying_all)
9875 (record_btrace_execution_direction)
9876 (record_btrace_prepare_to_generate_core)
9877 (record_btrace_done_generating_core): Refactor as
9878 record_btrace_target methods.
9879 (init_record_btrace_ops): Delete.
9880 (_initialize_record_btrace): Remove reference to
9881 init_record_btrace_ops.
9882 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9883 the execution_direction global.
9884 (record_full_base_target, record_full_target)
9885 (record_full_core_target): New classes.
9886 (record_full_ops): Now a record_full_target.
9887 (record_full_core_ops): Now a record_full_core_target.
9888 (record_full_target::detach, record_full_target::disconnect)
9889 (record_full_core_target::disconnect)
9890 (record_full_target::mourn_inferior, record_full_target::kill):
9891 New.
9892 (record_full_open, record_full_close, record_full_async): Refactor
9893 as methods of the record_full_base_target class.
9894 (record_full_resume, record_full_commit_resume): Refactor
9895 as methods of the record_full_target class.
9896 (record_full_wait, record_full_stopped_by_watchpoint)
9897 (record_full_stopped_data_address)
9898 (record_full_stopped_by_sw_breakpoint)
9899 (record_full_supports_stopped_by_sw_breakpoint)
9900 (record_full_stopped_by_hw_breakpoint)
9901 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9902 methods of the record_full_base_target class.
9903 (record_full_store_registers, record_full_xfer_partial)
9904 (record_full_insert_breakpoint, record_full_remove_breakpoint):
9905 Refactor as methods of the record_full_target class.
9906 (record_full_can_execute_reverse, record_full_get_bookmark)
9907 (record_full_goto_bookmark, record_full_execution_direction)
9908 (record_full_record_method, record_full_info, record_full_delete)
9909 (record_full_is_replaying, record_full_will_replay)
9910 (record_full_goto_begin, record_full_goto_end, record_full_goto)
9911 (record_full_stop_replaying): Refactor as methods of the
9912 record_full_base_target class.
9913 (record_full_core_resume, record_full_core_kill)
9914 (record_full_core_fetch_registers)
9915 (record_full_core_prepare_to_store)
9916 (record_full_core_store_registers, record_full_core_xfer_partial)
9917 (record_full_core_insert_breakpoint)
9918 (record_full_core_remove_breakpoint)
9919 (record_full_core_has_execution): Refactor
9920 as methods of the record_full_core_target class.
9921 (record_full_base_target::supports_delete_record): New.
9922 (init_record_full_ops): Delete.
9923 (init_record_full_core_ops): Delete.
9924 (record_full_save): Refactor as method of the
9925 record_full_base_target class.
9926 (_initialize_record_full): Remove references to
9927 init_record_full_ops and init_record_full_core_ops.
9928
9929 * remote.c (remote_target, extended_remote_target): New classes.
9930 (remote_ops): Now a remote_target.
9931 (extended_remote_ops): Now an extended_remote_target.
9932 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9933 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9934 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9935 (remote_pass_signals, remote_set_syscall_catchpoint)
9936 (remote_program_signals, )
9937 (remote_thread_always_alive): Remove target_ops parameter.
9938 (remote_thread_alive, remote_thread_name)
9939 (remote_update_thread_list, remote_threads_extra_info)
9940 (remote_static_tracepoint_marker_at)
9941 (remote_static_tracepoint_markers_by_strid)
9942 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9943 (remote_open): Refactor as methods of remote_target.
9944 (extended_remote_open, extended_remote_detach)
9945 (extended_remote_attach, extended_remote_post_attach):
9946 (extended_remote_supports_disable_randomization)
9947 (extended_remote_create_inferior): : Refactor as method of
9948 extended_remote_target.
9949 (remote_set_permissions, remote_open_1, remote_detach)
9950 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9951 (remote_resume, remote_commit_resume, remote_stop)
9952 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9953 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9954 (remote_prepare_to_store, remote_store_registers)
9955 (remote_flash_erase, remote_flash_done, remote_files_info)
9956 (remote_kill, remote_mourn, remote_insert_breakpoint)
9957 (remote_remove_breakpoint, remote_insert_watchpoint)
9958 (remote_watchpoint_addr_within_range)
9959 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9960 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9961 (remote_supports_stopped_by_sw_breakpoint)
9962 (remote_stopped_by_hw_breakpoint)
9963 (remote_supports_stopped_by_hw_breakpoint)
9964 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9965 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9966 (remote_verify_memory): Refactor as methods of remote_target.
9967 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9968 parameter.
9969 (remote_xfer_partial, remote_get_memory_xfer_limit)
9970 (remote_search_memory, remote_rcmd, remote_memory_map)
9971 (remote_pid_to_str, remote_get_thread_local_address)
9972 (remote_get_tib_address, remote_read_description): Refactor as
9973 methods of remote_target.
9974 (remote_target::fileio_open, remote_target::fileio_pwrite)
9975 (remote_target::fileio_pread, remote_target::fileio_close): New.
9976 (remote_hostio_readlink, remote_hostio_fstat)
9977 (remote_filesystem_is_local, remote_can_execute_reverse)
9978 (remote_supports_non_stop, remote_supports_disable_randomization)
9979 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9980 (remote_supports_enable_disable_tracepoint)
9981 (remote_supports_string_tracing)
9982 (remote_can_run_breakpoint_commands, remote_trace_init)
9983 (remote_download_tracepoint, remote_can_download_tracepoint)
9984 (remote_download_trace_state_variable, remote_enable_tracepoint)
9985 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9986 (remote_trace_start, remote_get_trace_status)
9987 (remote_get_tracepoint_status, remote_trace_stop)
9988 (remote_trace_find, remote_get_trace_state_variable_value)
9989 (remote_save_trace_data, remote_get_raw_trace_data)
9990 (remote_set_disconnected_tracing, remote_core_of_thread)
9991 (remote_set_circular_trace_buffer, remote_traceframe_info)
9992 (remote_get_min_fast_tracepoint_insn_len)
9993 (remote_set_trace_buffer_size, remote_set_trace_notes)
9994 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9995 (remote_disable_btrace, remote_teardown_btrace)
9996 (remote_read_btrace, remote_btrace_conf)
9997 (remote_augmented_libraries_svr4_read, remote_load)
9998 (remote_pid_to_exec_file, remote_can_do_single_step)
9999 (remote_execution_direction, remote_thread_handle_to_thread_info):
10000 Refactor as methods of remote_target.
10001 (init_remote_ops, init_extended_remote_ops): Delete.
10002 (remote_can_async_p, remote_is_async_p, remote_async)
10003 (remote_thread_events, remote_upload_tracepoints)
10004 (remote_upload_trace_state_variables): Refactor as methods of
10005 remote_target.
10006 (_initialize_remote): Remove references to init_remote_ops and
10007 init_extended_remote_ops.
10008
10009 * remote-sim.c (gdbsim_target): New class.
10010 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10011 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10012 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10013 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10014 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10015 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10016 Refactor as methods of gdbsim_target.
10017 (gdbsim_ops): Now a gdbsim_target.
10018 (init_gdbsim_ops): Delete.
10019 (gdbsim_cntrl_c): Adjust.
10020 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10021
10022 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10023 (the_amd64_linux_nat_target): New.
10024 (amd64_linux_fetch_inferior_registers)
10025 (amd64_linux_store_inferior_registers): Refactor as methods of
10026 amd64_linux_nat_target.
10027 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
10028 * i386-linux-nat.c: Don't include "linux-nat.h".
10029 (i386_linux_nat_target): New class.
10030 (the_i386_linux_nat_target): New.
10031 (i386_linux_fetch_inferior_registers)
10032 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10033 as methods of i386_linux_nat_target.
10034 (_initialize_i386_linux_nat): Adjust. Set linux_target.
10035 * inf-child.c (inf_child_ops): Delete.
10036 (inf_child_fetch_inferior_registers)
10037 (inf_child_store_inferior_registers): Delete.
10038 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10039 methods of inf_child_target.
10040 (inf_child_target::supports_terminal_ours)
10041 (inf_child_target::terminal_init)
10042 (inf_child_target::terminal_inferior)
10043 (inf_child_target::terminal_ours_for_output)
10044 (inf_child_target::terminal_ours, inf_child_target::interrupt)
10045 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10046 New.
10047 (inf_child_open, inf_child_disconnect, inf_child_close)
10048 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10049 (inf_child_post_startup_inferior, inf_child_can_run)
10050 (inf_child_pid_to_exec_file): Refactor as methods of
10051 inf_child_target.
10052 (inf_child_follow_fork): Delete.
10053 (inf_child_target::can_create_inferior)
10054 (inf_child_target::can_attach): New.
10055 (inf_child_target::has_all_memory, inf_child_target::has_memory)
10056 (inf_child_target::has_stack, inf_child_target::has_registers)
10057 (inf_child_target::has_execution): New.
10058 (inf_child_fileio_open, inf_child_fileio_pwrite)
10059 (inf_child_fileio_pread, inf_child_fileio_fstat)
10060 (inf_child_fileio_close, inf_child_fileio_unlink)
10061 (inf_child_fileio_readlink, inf_child_use_agent)
10062 (inf_child_can_use_agent): Refactor as methods of
10063 inf_child_target.
10064 (return_zero, inf_child_target): Delete.
10065 (inf_child_target::inf_child_target): New.
10066 * inf-child.h: Include "target.h".
10067 (inf_child_target): Delete function prototype.
10068 (inf_child_target): New class.
10069 (inf_child_open_target, inf_child_mourn_inferior)
10070 (inf_child_maybe_unpush_target): Delete.
10071 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10072 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10073 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10074 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10075 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10076 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10077 (inf_ptrace_wait, inf_ptrace_xfer_partial)
10078 (inf_ptrace_thread_alive, inf_ptrace_files_info)
10079 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10080 methods of inf_ptrace_target.
10081 (inf_ptrace_target): Delete function.
10082 * inf-ptrace.h: Include "inf-child.h".
10083 (inf_ptrace_target): Delete function declaration.
10084 (inf_ptrace_target): New class.
10085 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10086 * linux-nat.c (linux_target): New.
10087 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10088 (linux_nat_target::~linux_nat_target): New.
10089 (linux_child_post_attach, linux_child_post_startup_inferior)
10090 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10091 (linux_child_remove_fork_catchpoint)
10092 (linux_child_insert_vfork_catchpoint)
10093 (linux_child_remove_vfork_catchpoint)
10094 (linux_child_insert_exec_catchpoint)
10095 (linux_child_remove_exec_catchpoint)
10096 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10097 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10098 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10099 (linux_nat_stopped_data_address)
10100 (linux_nat_stopped_by_sw_breakpoint)
10101 (linux_nat_supports_stopped_by_sw_breakpoint)
10102 (linux_nat_stopped_by_hw_breakpoint)
10103 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10104 (linux_nat_kill, linux_nat_mourn_inferior)
10105 (linux_nat_xfer_partial, linux_nat_thread_alive)
10106 (linux_nat_update_thread_list, linux_nat_pid_to_str)
10107 (linux_nat_thread_name, linux_child_pid_to_exec_file)
10108 (linux_child_static_tracepoint_markers_by_strid)
10109 (linux_nat_is_async_p, linux_nat_can_async_p)
10110 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10111 (linux_nat_supports_multi_process)
10112 (linux_nat_supports_disable_randomization, linux_nat_async)
10113 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10114 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10115 (linux_nat_fileio_open, linux_nat_fileio_readlink)
10116 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10117 methods of linux_nat_target.
10118 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10119 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10120 parameter.
10121 (check_stopped_by_watchpoint): Adjust.
10122 (linux_xfer_partial): Delete.
10123 (linux_target_install_ops, linux_target, linux_nat_add_target):
10124 Delete.
10125 (linux_nat_target::linux_nat_target): New.
10126 * linux-nat.h: Include "inf-ptrace.h".
10127 (linux_nat_target): New.
10128 (linux_target, linux_target_install_ops, linux_nat_add_target):
10129 Delete function declarations.
10130 (linux_target): Declare global.
10131 * linux-thread-db.c (thread_db_target): New.
10132 (thread_db_target::thread_db_target): New.
10133 (thread_db_ops): Delete.
10134 (the_thread_db_target): New.
10135 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10136 (thread_db_update_thread_list, thread_db_pid_to_str)
10137 (thread_db_extra_thread_info)
10138 (thread_db_thread_handle_to_thread_info)
10139 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10140 (thread_db_resume): Refactor as methods of thread_db_target.
10141 (init_thread_db_ops): Delete.
10142 (_initialize_thread_db): Remove reference to init_thread_db_ops.
10143 * x86-linux-nat.c: Don't include "linux-nat.h".
10144 (super_post_startup_inferior): Delete.
10145 (x86_linux_nat_target::~x86_linux_nat_target): New.
10146 (x86_linux_child_post_startup_inferior)
10147 (x86_linux_read_description, x86_linux_enable_btrace)
10148 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10149 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10150 methods of x86_linux_nat_target.
10151 (x86_linux_create_target): Delete. Bits folded ...
10152 (x86_linux_add_target): ... here. Now takes a linux_nat_target
10153 pointer.
10154 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10155 (x86_linux_nat_target): New class.
10156 (x86_linux_create_target): Delete.
10157 (x86_linux_add_target): Now takes a linux_nat_target pointer.
10158 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10159 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10160 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10161 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10162 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10163 make extern.
10164 (x86_use_watchpoints): Delete.
10165 * x86-nat.h: Include "breakpoint.h" and "target.h".
10166 (x86_use_watchpoints): Delete.
10167 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10168 (x86_stopped_by_watchpoint, x86_stopped_data_address)
10169 (x86_insert_watchpoint, x86_remove_watchpoint)
10170 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10171 (x86_stopped_by_hw_breakpoint): New declarations.
10172 (x86_nat_target): New template class.
10173
10174 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10175 (the_ppc_linux_nat_target): New.
10176 (ppc_linux_fetch_inferior_registers)
10177 (ppc_linux_can_use_hw_breakpoint)
10178 (ppc_linux_region_ok_for_hw_watchpoint)
10179 (ppc_linux_ranged_break_num_registers)
10180 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10181 (ppc_linux_insert_mask_watchpoint)
10182 (ppc_linux_remove_mask_watchpoint)
10183 (ppc_linux_can_accel_watchpoint_condition)
10184 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10185 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10186 (ppc_linux_watchpoint_addr_within_range)
10187 (ppc_linux_masked_watch_num_registers)
10188 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10189 (ppc_linux_read_description): Refactor as methods of
10190 ppc_linux_nat_target.
10191 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
10192
10193 * procfs.c (procfs_xfer_partial): Delete forward declaration.
10194 (procfs_target): New class.
10195 (the_procfs_target): New.
10196 (procfs_target): Delete function.
10197 (procfs_auxv_parse, procfs_attach, procfs_detach)
10198 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10199 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10200 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10201 (procfs_create_inferior, procfs_update_thread_list)
10202 (procfs_thread_alive, procfs_pid_to_str)
10203 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10204 (procfs_stopped_data_address, procfs_insert_watchpoint)
10205 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10206 (proc_find_memory_regions, procfs_info_proc)
10207 (procfs_make_note_section): Refactor as methods of procfs_target.
10208 (_initialize_procfs): Adjust.
10209 * sol-thread.c (sol_thread_target): New class.
10210 (sol_thread_ops): Now a sol_thread_target.
10211 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10212 (sol_thread_fetch_registers, sol_thread_store_registers)
10213 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10214 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10215 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10216 (init_sol_thread_ops): Delete.
10217 (_initialize_sol_thread): Adjust. Remove references to
10218 init_sol_thread_ops and complete_target_initialization.
10219
10220 * windows-nat.c (windows_nat_target): New class.
10221 (windows_fetch_inferior_registers)
10222 (windows_store_inferior_registers, windows_resume, windows_wait)
10223 (windows_attach, windows_detach, windows_pid_to_exec_file)
10224 (windows_files_info, windows_create_inferior)
10225 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10226 (windows_close, windows_pid_to_str, windows_xfer_partial)
10227 (windows_get_tib_address, windows_get_ada_task_ptid)
10228 (windows_thread_name, windows_thread_alive): Refactor as
10229 windows_nat_target methods.
10230 (do_initial_windows_stuff): Adjust.
10231 (windows_target): Delete function.
10232 (_initialize_windows_nat): Adjust.
10233
10234 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10235 (darwin_mourn_inferior, darwin_kill_inferior)
10236 (darwin_create_inferior, darwin_attach, darwin_detach)
10237 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10238 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10239 (darwin_supports_multi_process): Refactor as darwin_nat_target
10240 methods.
10241 (darwin_resume_to, darwin_files_info): Delete.
10242 (_initialize_darwin_inferior): Rename to ...
10243 (_initialize_darwin_nat): ... this. Adjust to C++ification.
10244 * darwin-nat.h: Include "inf-child.h".
10245 (darwin_nat_target): New class.
10246 (darwin_complete_target): Delete.
10247 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10248 (darwin_target): New.
10249 (i386_darwin_fetch_inferior_registers)
10250 (i386_darwin_store_inferior_registers): Refactor as methods of
10251 darwin_nat_target.
10252 (darwin_complete_target): Delete, with ...
10253 (_initialize_i386_darwin_nat): ... bits factored out here.
10254
10255 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10256 (the_alpha_linux_nat_target): New.
10257 (alpha_linux_register_u_offset): Refactor as
10258 alpha_linux_nat_target method.
10259 (_initialize_alpha_linux_nat): Adjust.
10260 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10261 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10262 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10263 methods of linux_nat_trad_target.
10264 (linux_trad_target): Delete.
10265 * linux-nat-trad.h (linux_trad_target): Delete function.
10266 (linux_nat_trad_target): New class.
10267 * mips-linux-nat.c (mips_linux_nat_target): New class.
10268 (super_fetch_registers, super_store_registers, super_close):
10269 Delete.
10270 (the_mips_linux_nat_target): New.
10271 (mips64_linux_regsets_fetch_registers)
10272 (mips64_linux_regsets_store_registers)
10273 (mips64_linux_fetch_registers, mips64_linux_store_registers)
10274 (mips_linux_register_u_offset, mips_linux_read_description)
10275 (mips_linux_can_use_hw_breakpoint)
10276 (mips_linux_stopped_by_watchpoint)
10277 (mips_linux_stopped_data_address)
10278 (mips_linux_region_ok_for_hw_watchpoint)
10279 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10280 (mips_linux_close): Refactor as methods of mips_linux_nat.
10281 (_initialize_mips_linux_nat): Adjust to C++ification.
10282
10283 * aix-thread.c (aix_thread_target): New class.
10284 (aix_thread_ops): Now an aix_thread_target.
10285 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10286 (aix_thread_fetch_registers, aix_thread_store_registers)
10287 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10288 (aix_thread_thread_alive, aix_thread_pid_to_str)
10289 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10290 Refactor as methods of aix_thread_target.
10291 (init_aix_thread_ops): Delete.
10292 (_initialize_aix_thread): Remove references to init_aix_thread_ops
10293 and complete_target_initialization.
10294 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10295 (rs6000_nat_target): New class.
10296 (the_rs6000_nat_target): New.
10297 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10298 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10299 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10300 (super_create_inferior): Delete.
10301 (_initialize_rs6000_nat): Adjust to C++ification.
10302
10303 * arm-linux-nat.c (arm_linux_nat_target): New class.
10304 (the_arm_linux_nat_target): New.
10305 (arm_linux_fetch_inferior_registers)
10306 (arm_linux_store_inferior_registers, arm_linux_read_description)
10307 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10308 (arm_linux_remove_hw_breakpoint)
10309 (arm_linux_region_ok_for_hw_watchpoint)
10310 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10311 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10312 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10313 arm_linux_nat_target.
10314 (_initialize_arm_linux_nat): Adjust to C++ification.
10315
10316 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10317 (the_aarch64_linux_nat_target): New.
10318 (aarch64_linux_fetch_inferior_registers)
10319 (aarch64_linux_store_inferior_registers)
10320 (aarch64_linux_child_post_startup_inferior)
10321 (aarch64_linux_read_description)
10322 (aarch64_linux_can_use_hw_breakpoint)
10323 (aarch64_linux_insert_hw_breakpoint)
10324 (aarch64_linux_remove_hw_breakpoint)
10325 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10326 (aarch64_linux_region_ok_for_hw_watchpoint)
10327 (aarch64_linux_stopped_data_address)
10328 (aarch64_linux_stopped_by_watchpoint)
10329 (aarch64_linux_watchpoint_addr_within_range)
10330 (aarch64_linux_can_do_single_step): Refactor as methods of
10331 aarch64_linux_nat_target.
10332 (super_post_startup_inferior): Delete.
10333 (_initialize_aarch64_linux_nat): Adjust to C++ification.
10334
10335 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10336 (the_hppa_linux_nat_target): New.
10337 (hppa_linux_fetch_inferior_registers)
10338 (hppa_linux_store_inferior_registers): Refactor as methods of
10339 hppa_linux_nat_target.
10340 (_initialize_hppa_linux_nat): Adjust to C++ification.
10341
10342 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10343 (the_ia64_linux_nat_target): New.
10344 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10345 (ia64_linux_stopped_data_address)
10346 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10347 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10348 ia64_linux_nat_target methods.
10349 (super_xfer_partial): Delete.
10350 (_initialize_ia64_linux_nat): Adjust to C++ification.
10351
10352 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10353 (the_m32r_linux_nat_target): New.
10354 (m32r_linux_fetch_inferior_registers)
10355 (m32r_linux_store_inferior_registers): Refactor as
10356 m32r_linux_nat_target methods.
10357 (_initialize_m32r_linux_nat): Adjust to C++ification.
10358
10359 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10360 (the_m68k_linux_nat_target): New.
10361 (m68k_linux_fetch_inferior_registers)
10362 (m68k_linux_store_inferior_registers): Refactor as
10363 m68k_linux_nat_target methods.
10364 (_initialize_m68k_linux_nat): Adjust to C++ification.
10365
10366 * s390-linux-nat.c (s390_linux_nat_target): New class.
10367 (the_s390_linux_nat_target): New.
10368 (s390_linux_fetch_inferior_registers)
10369 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10370 (s390_insert_watchpoint, s390_remove_watchpoint)
10371 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10372 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10373 (s390_auxv_parse, s390_read_description): Refactor as methods of
10374 s390_linux_nat_target.
10375 (_initialize_s390_nat): Adjust to C++ification.
10376
10377 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10378 (the_sparc_linux_nat_target): New.
10379 (_initialize_sparc_linux_nat): Adjust to C++ification.
10380 * sparc-nat.c (sparc_fetch_inferior_registers)
10381 (sparc_store_inferior_registers): Remove target_ops parameter.
10382 * sparc-nat.h (sparc_fetch_inferior_registers)
10383 (sparc_store_inferior_registers): Remove target_ops parameter.
10384 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10385 (the_sparc64_linux_nat_target): New.
10386 (_initialize_sparc64_linux_nat): Adjust to C++ification.
10387
10388 * spu-linux-nat.c (spu_linux_nat_target): New class.
10389 (the_spu_linux_nat_target): New.
10390 (spu_child_post_startup_inferior, spu_child_post_attach)
10391 (spu_child_wait, spu_fetch_inferior_registers)
10392 (spu_store_inferior_registers, spu_xfer_partial)
10393 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10394 methods.
10395 (_initialize_spu_nat): Adjust to C++ification.
10396
10397 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10398 (the_tilegx_linux_nat_target): New.
10399 (fetch_inferior_registers, store_inferior_registers):
10400 Refactor as methods.
10401 (_initialize_tile_linux_nat): Adjust to C++ification.
10402
10403 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10404 (the_xtensa_linux_nat_target): New.
10405 (xtensa_linux_fetch_inferior_registers)
10406 (xtensa_linux_store_inferior_registers): Refactor as
10407 xtensa_linux_nat_target methods.
10408 (_initialize_xtensa_linux_nat): Adjust to C++ification.
10409
10410 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10411 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10412 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10413 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10414 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10415 (fbsd_stopped_by_sw_breakpoint)
10416 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10417 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10418 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10419 (fbsd_post_startup_inferior, fbsd_post_attach)
10420 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10421 (fbsd_set_syscall_catchpoint)
10422 (super_xfer_partial, super_resume, super_wait)
10423 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10424 (fbsd_handle_debug_trap): Remove target_ops parameter.
10425 (fbsd_nat_add_target): Delete.
10426 * fbsd-nat.h: Include "inf-ptrace.h".
10427 (fbsd_nat_add_target): Delete.
10428 (USE_SIGTRAP_SIGINFO): Define.
10429 (fbsd_nat_target): New class.
10430
10431 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10432 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10433 (amd64bsd_target): Delete.
10434 * amd64-bsd-nat.h: New file.
10435 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10436 "x86-bsd-nat.h".
10437 (amd64_fbsd_nat_target): New class.
10438 (the_amd64_fbsd_nat_target): New.
10439 (amd64fbsd_read_description): Refactor as method of
10440 amd64_fbsd_nat_target.
10441 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10442 (_initialize_amd64fbsd_nat): Adjust to C++ification.
10443 * amd64-nat.h (amd64bsd_target): Delete function declaration.
10444 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10445 (i386bsd_store_inferior_registers): Remove target_ops parameter.
10446 (i386bsd_target): Delete.
10447 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10448 (i386bsd_fetch_inferior_registers)
10449 (i386bsd_store_inferior_registers): Declare.
10450 (i386_bsd_nat_target): New class.
10451 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10452 (the_i386_fbsd_nat_target): New.
10453 (i386fbsd_resume, i386fbsd_read_description): Refactor as
10454 i386_fbsd_nat_target methods.
10455 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10456 (_initialize_i386fbsd_nat): Adjust to C++ification.
10457 * x86-bsd-nat.c (super_mourn_inferior): Delete.
10458 (x86bsd_mourn_inferior, x86bsd_target): Delete.
10459 (_initialize_x86_bsd_nat): Adjust to C++ification.
10460 * x86-bsd-nat.h: Include "x86-nat.h".
10461 (x86bsd_target): Delete declaration.
10462 (x86bsd_nat_target): New class.
10463
10464 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10465 (the_aarch64_fbsd_nat_target): New.
10466 (aarch64_fbsd_fetch_inferior_registers)
10467 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10468 aarch64_fbsd_nat_target.
10469 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10470 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10471 (the_alpha_bsd_nat_target): New.
10472 (alphabsd_fetch_inferior_registers)
10473 (alphabsd_store_inferior_registers): Refactor as
10474 alpha_bsd_nat_target methods.
10475 (_initialize_alphabsd_nat): Refactor as methods of
10476 alpha_bsd_nat_target.
10477 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10478 (the_amd64_nbsd_nat_target): New.
10479 (_initialize_amd64nbsd_nat): Adjust to C++ification.
10480 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10481 (the_amd64_obsd_nat_target): New.
10482 (_initialize_amd64obsd_nat): Adjust to C++ification.
10483 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10484 (the_arm_fbsd_nat_target): New.
10485 (arm_fbsd_fetch_inferior_registers)
10486 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10487 (_initialize_arm_fbsd_nat): Refactor as methods of
10488 arm_fbsd_nat_target.
10489 (_initialize_arm_fbsd_nat): Adjust to C++ification.
10490 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10491 (the_arm_netbsd_nat_target): New.
10492 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10493 arm_netbsd_nat_target.
10494 (_initialize_arm_netbsd_nat): Adjust to C++ification.
10495 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10496 (the_hppa_nbsd_nat_target): New.
10497 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10498 hppa_nbsd_nat_target methods.
10499 (_initialize_hppanbsd_nat): Adjust to C++ification.
10500 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10501 (the_hppa_obsd_nat_target): New.
10502 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10503 methods of hppa_obsd_nat_target.
10504 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
10505 add_target.
10506 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10507 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
10508 add_target.
10509 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10510 (_initialize_i386obsd_nat): Use add_target.
10511 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10512 (the_m68k_bsd_nat_target): New.
10513 (m68kbsd_fetch_inferior_registers)
10514 (m68kbsd_store_inferior_registers): Refactor as methods of
10515 m68k_bsd_nat_target.
10516 (_initialize_m68kbsd_nat): Adjust to C++ification.
10517 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10518 (the_mips_fbsd_nat_target): New.
10519 (mips_fbsd_fetch_inferior_registers)
10520 (mips_fbsd_store_inferior_registers): Refactor as methods of
10521 mips_fbsd_nat_target.
10522 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
10523 add_target.
10524 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10525 (the_mips_nbsd_nat_target): New.
10526 (mipsnbsd_fetch_inferior_registers)
10527 (mipsnbsd_store_inferior_registers): Refactor as methods of
10528 mips_nbsd_nat_target.
10529 (_initialize_mipsnbsd_nat): Adjust to C++ification.
10530 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10531 (the_mips64_obsd_nat_target): New.
10532 (mips64obsd_fetch_inferior_registers)
10533 (mips64obsd_store_inferior_registers): Refactor as methods of
10534 mips64_obsd_nat_target.
10535 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
10536 add_target.
10537 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10538 nbsd_nat_target.
10539 * nbsd-nat.h: Include "inf-ptrace.h".
10540 (nbsd_nat_target): New class.
10541 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10542 (obsd_wait): Refactor as methods of obsd_nat_target.
10543 (obsd_add_target): Delete.
10544 * obsd-nat.h: Include "inf-ptrace.h".
10545 (obsd_nat_target): New class.
10546 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10547 (the_ppc_fbsd_nat_target): New.
10548 (ppcfbsd_fetch_inferior_registers)
10549 (ppcfbsd_store_inferior_registers): Refactor as methods of
10550 ppc_fbsd_nat_target.
10551 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
10552 add_target.
10553 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10554 (the_ppc_nbsd_nat_target): New.
10555 (ppcnbsd_fetch_inferior_registers)
10556 (ppcnbsd_store_inferior_registers): Refactor as methods of
10557 ppc_nbsd_nat_target.
10558 (_initialize_ppcnbsd_nat): Adjust to C++ification.
10559 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10560 (the_ppc_obsd_nat_target): New.
10561 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10562 methods of ppc_obsd_nat_target.
10563 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
10564 add_target.
10565 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10566 (the_sh_nbsd_nat_target): New.
10567 (shnbsd_fetch_inferior_registers)
10568 (shnbsd_store_inferior_registers): Refactor as methods of
10569 sh_nbsd_nat_target.
10570 (_initialize_shnbsd_nat): Adjust to C++ification.
10571 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10572 (inf_ptrace_xfer_partial): Delete.
10573 (sparc_xfer_partial, sparc_target): Delete.
10574 * sparc-nat.h (sparc_fetch_inferior_registers)
10575 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10576 (sparc_target): Delete function declaration.
10577 (sparc_target): New template class.
10578 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10579 (_initialize_sparcnbsd_nat): Adjust to C++ification.
10580 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10581 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
10582 add_target.
10583 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10584 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10585 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10586 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
10587 add_target.
10588 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10589 (the_vax_bsd_nat_target): New.
10590 (vaxbsd_fetch_inferior_registers)
10591 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10592 methods.
10593 (_initialize_vaxbsd_nat): Adjust to C++ification.
10594
10595 * bsd-kvm.c (bsd_kvm_target): New class.
10596 (bsd_kvm_ops): Now a bsd_kvm_target.
10597 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10598 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10599 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10600 bsd_kvm_target.
10601 (bsd_kvm_return_one): Delete.
10602 (bsd_kvm_add_target): Adjust to C++ification.
10603
10604 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10605 (nto_procfs_target_procfs): New classes.
10606 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10607 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10608 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10609 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10610 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10611 (procfs_remove_hw_breakpoint, procfs_resume)
10612 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10613 (procfs_kill_inferior, procfs_store_registers)
10614 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10615 as methods of nto_procfs_target.
10616 (nto_procfs_ops): Now an nto_procfs_target_procfs.
10617 (nto_native_ops): Delete.
10618 (procfs_open, procfs_native_open): Delete.
10619 (nto_native_ops): Now an nto_procfs_target_native.
10620 (init_procfs_targets): Adjust to C++ification.
10621 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10622 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10623 Refactor as methods of nto_procfs_target.
10624
10625 * go32-nat.c (go32_nat_target): New class.
10626 (the_go32_nat_target): New.
10627 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10628 (go32_store_registers, go32_xfer_partial, go32_files_info)
10629 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10630 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10631 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10632 (go32_pid_to_str): Refactor as methods of go32_nat_target.
10633 (go32_target): Delete.
10634 (_initialize_go32_nat): Adjust to C++ification.
10635
10636 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10637 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10638 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10639 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10640 gnu_nat_target.
10641 (gnu_target): Delete.
10642 * gnu-nat.h (gnu_target): Delete.
10643 (gnu_nat_target): New class.
10644 * i386-gnu-nat.c (gnu_base_target): New.
10645 (i386_gnu_nat_target): New class.
10646 (the_i386_gnu_nat_target): New.
10647 (_initialize_i386gnu_nat): Adjust to C++ification.
10648
10649 2018-05-02 Pedro Alves <palves@redhat.com>
10650
10651 * bfd-target.c (target_bfd_xclose): Rename to ...
10652 (target_bfd_close): ... this.
10653 (target_bfd_reopen): Adjust.
10654 * target.c (target_close): Remove references to to_xclose.
10655 * target.h (target_ops::to_xclose): Delete.
10656 (target_ops::to_close): Update comments.
10657
10658 2018-05-02 Pedro Alves <palves@redhat.com>
10659
10660 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10661 "linux-nat.h".
10662 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10663 * inf-ptrace.c (inf_ptrace_register_u_offset)
10664 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10665 (inf_ptrace_store_register, inf_ptrace_store_registers)
10666 (inf_ptrace_trad_target): Move to ...
10667 * linux-nat-trad.c: ... this new file.
10668 * linux-nat-trad.h: New file.
10669 * linux-nat.c (linux_target_install_ops): Make extern.
10670 (linux_trad_target): Delete.
10671 * linux-nat.h (linux_trad_target): Delete declaration.
10672 (linux_target_install_ops): Declare.
10673 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10674 "linux-nat.h".
10675
10676 2018-05-02 Pedro Alves <palves@redhat.com>
10677
10678 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10679 procfs_target/add_target here.
10680 * procfs.c (procfs_target): Make static.
10681 (_initialize_procfs): Call add_target here.
10682 * procfs.h (struct target_ops): Remove forward declaration.
10683 (procfs_target): Remove declaration.
10684 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10685
10686 2018-05-02 Pedro Alves <palves@redhat.com>
10687
10688 * procfs.c (procfs_stopped_by_watchpoint)
10689 (procfs_insert_watchpoint, procfs_remove_watchpoint)
10690 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10691 Forward declare.
10692 (procfs_use_watchpoints): Delete, move contents...
10693 (procfs_target): ... here.
10694 * procfs.h (procfs_use_watchpoints): Delete declaration.
10695 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10696 procfs_use_watchpoints.
10697 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10698 procfs_use_watchpoints.
10699
10700 2018-05-02 Tom Tromey <tom@tromey.com>
10701
10702 PR python/20084:
10703 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10704 and var_zuinteger_unlimited.
10705 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10706 and PARAM_ZUINTEGER_UNLIMITED.
10707 (set_parameter_value): Handle var_zuinteger and
10708 var_zuinteger_unlimited.
10709 (add_setshow_generic): Likewise.
10710 (parmpy_init): Likewise.
10711
10712 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
10713
10714 PR rust/23124
10715 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10716 pointer is not null before dereferencing it.
10717
10718 2018-04-30 Tom Tromey <tom@tromey.com>
10719
10720 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10721 is_mi_like_p.
10722
10723 2018-04-30 Tom Tromey <tom@tromey.com>
10724
10725 * breakpoint.c (mention): Remove use of is_mi_like_p.
10726 (print_mention_ranged_breakpoint): Likewise.
10727 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10728 of is_mi_like_p.
10729
10730 2018-04-30 Tom Tromey <tom@tromey.com>
10731
10732 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10733
10734 2018-04-30 Tom Tromey <tom@tromey.com>
10735
10736 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10737 (info_spu_event_command): Remove some uses of is_mi_like_p.
10738
10739 2018-04-30 Tom Tromey <tom@tromey.com>
10740
10741 * python/py-framefilter.c (py_print_single_arg)
10742 (enumerate_locals, py_print_args, py_print_frame): Remove some
10743 uses of is_mi_like_p.
10744
10745 2018-04-30 Tom Tromey <tom@tromey.com>
10746
10747 * ui-out.c: Update.
10748 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10749 * ui-out.h (ui_out::is_mi_like_p): Now const.
10750 (ui_out::do_is_mi_like_p): Now const.
10751 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10752
10753 2018-04-30 Tom Tromey <tom@tromey.com>
10754
10755 * varobj.c (varobj_set_visualizer): Use new_reference.
10756 * python/python.c (gdbpy_decode_line): Use new_reference.
10757 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10758 new_reference.
10759
10760 2018-04-30 Tom Tromey <tom@tromey.com>
10761
10762 * varobj.c (install_new_value): Use new_reference.
10763 * value.h (value_incref): Return void. Swap intro comment with
10764 value_decref.
10765 * value.c (set_value_parent): Use new_reference.
10766 (value_incref): Return void. Update intro comment.
10767 (release_value): Use new_reference.
10768 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10769
10770 2018-04-30 Tom Tromey <tom@tromey.com>
10771
10772 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10773 * gdb_bfd.h (new_bfd_ref): Remove.
10774 (gdb_bfd_open): Update comment.
10775 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10776 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10777 (gdb_bfd_fdopenr): Use new_reference.
10778 * exec.c (exec_file_attach): Use new_reference.
10779
10780 2018-04-30 Tom Tromey <tom@tromey.com>
10781
10782 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10783 method.
10784
10785 2018-04-30 Tom Tromey <tom@tromey.com>
10786
10787 * jit.c (jit_read_code_entry): Use type_align.
10788 * i386-tdep.c (i386_gdbarch_init): Don't call
10789 set_gdbarch_long_long_align_bit.
10790 * gdbarch.sh: Remove long_long_align_bit.
10791 * gdbarch.c, gdbarch.h: Rebuild.
10792 * arc-tdep.c (arc_type_align): New function.
10793 (arc_gdbarch_init): Use arc_type_align. Don't call
10794 set_gdbarch_long_long_align_bit.
10795
10796 2018-04-30 Tom Tromey <tom@tromey.com>
10797
10798 * rust-lang.c (rust_type_alignment): Remove.
10799 (rust_composite_type): Use type_align.
10800
10801 2018-04-30 Tom Tromey <tom@tromey.com>
10802
10803 * NEWS: Mention Type.align.
10804 * python/py-type.c (typy_get_alignof): New function.
10805 (type_object_getset): Add "alignof".
10806
10807 2018-04-30 Tom Tromey <tom@tromey.com>
10808
10809 PR exp/17095:
10810 * NEWS: Update.
10811 * std-operator.def (UNOP_ALIGNOF): New operator.
10812 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10813 New.
10814 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10815 * c-lang.c (c_op_print_tab): Add alignof.
10816 * c-exp.y (ALIGNOF): New token.
10817 (exp): Add "ALIGNOF" production.
10818 (ident_tokens): Add _Alignof and alignof.
10819
10820 2018-04-30 Tom Tromey <tom@tromey.com>
10821
10822 * i386-tdep.c (i386_type_align): New function.
10823 (i386_gdbarch_init): Update.
10824 * gdbarch.sh (type_align): New method.
10825 * gdbarch.c, gdbarch.h: Rebuild.
10826 * arch-utils.h (default_type_align): Declare.
10827 * arch-utils.c (default_type_align): New function.
10828 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10829 (struct type) <align_log2>: New field.
10830 <instance_flags>: Now a bitfield.
10831 (TYPE_RAW_ALIGN): New macro.
10832 (type_align, type_raw_align, set_type_align): Declare.
10833 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10834 functions.
10835 * dwarf2read.c (quirk_rust_enum): Set type alignment.
10836 (get_alignment, maybe_set_alignment): New functions.
10837 (read_structure_type, read_enumeration_type, read_array_type)
10838 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10839 (read_subrange_type, read_base_type): Set type alignment.
10840
10841 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
10842
10843 * dwarf2read.c (read_index_from_section): Use bool.
10844
10845 2018-04-29 Fabian Groffen <grobian@gentoo.org>
10846
10847 PR gdb/22950
10848 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10849 with #ifdef.
10850
10851 2018-04-29 John Reiser <jreiser@BitWagon.com>
10852
10853 PR build/22873
10854 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10855 last step, and do it atomically.
10856
10857 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
10858
10859 * compile/compile-c-types.c (convert_int, convert_float):
10860 Update for C FE v1.
10861
10862 2018-04-27 Tom Tromey <tom@tromey.com>
10863
10864 PR rust/22545:
10865 * rust-lang.c (rust_inclusive_range_type_p): New function.
10866 (rust_range): Handle inclusive ranges.
10867 (rust_compute_range): Likewise.
10868 * rust-exp.y (struct rust_op) <inclusive>: New field.
10869 (DOTDOTEQ): New constant.
10870 (range_expr): Add "..=" productions.
10871 (operator_tokens): Add "..=" token.
10872 (ast_range): Add "inclusive" parameter.
10873 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10874 ranges.
10875 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10876 bounds values.
10877 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10878 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10879 Update comments.
10880 * expprint.c (print_subexp_standard): Handle new bounds values.
10881 (dump_subexp_body_standard): Likewise.
10882
10883 2018-04-27 Tom Tromey <tom@tromey.com>
10884
10885 * configure: Rebuild.
10886 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10887 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10888 "OVERRIDE".
10889 (class symbol_needs_eval_context): Likewise.
10890 * dwarf2read.c (mock_mapped_index::symbol_name_count)
10891 (mock_mapped_index::symbol_name_at): Use "override". Remove
10892 "virtual".
10893 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10894 "override".
10895 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10896 * aarch64-tdep.c (instruction_reader::read): Use "override".
10897 (instruction_reader_test::read): Likewise.
10898 * arm-tdep.c (instruction_reader::read): Use "override".
10899 (instruction_reader_thumb::read): Likewise.
10900
10901 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
10902
10903 PR remote/9665
10904 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10905 instead of remote_send.
10906 (remote_send): Remove.
10907
10908 2018-04-26 Pedro Alves <palves@redhat.com>
10909
10910 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10911 find_function_start_sal instead of find_pc_line.
10912
10913 2018-04-26 Pedro Alves <palves@redhat.com>
10914
10915 * breakpoint.c (set_breakpoint_location_function): Handle
10916 mst_data_gnu_ifunc.
10917 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10918 * elfread.c (elf_symtab_read): Give data symbols with
10919 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10920 (elf_rel_plt_read): Update comment.
10921 * linespec.c (convert_linespec_to_sals): Handle
10922 mst_data_gnu_ifunc.
10923 (minsym_found): Handle mst_data_gnu_ifunc.
10924 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10925 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10926 * parse.c (find_minsym_type_and_address): Handle
10927 mst_data_gnu_ifunc.
10928 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10929 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10930 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10931 comment.
10932 <mst_data_gnu_ifunc>: New enumerator.
10933
10934 2018-04-26 Pedro Alves <palves@redhat.com>
10935
10936 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10937 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10938 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10939 Handle it.
10940 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10941 (lookup_minimal_symbol_by_pc): Adjust.
10942 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10943 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10944 * minsyms.h (lookup_msym_prefer): New enum.
10945 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10946 parameter by a lookup_msym_prefer parameter.
10947
10948 2018-04-26 Pedro Alves <palves@redhat.com>
10949
10950 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10951 ends in "@plt" instead of looking at the symbol's section.
10952
10953 2018-04-26 Pedro Alves <palves@redhat.com>
10954
10955 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10956 all references.
10957 (find_pc_partial_function_gnu_ifunc): Rename to ...
10958 (find_pc_partial_function): ... this, and remove references to
10959 'is_gnu_ifunc_p'.
10960 (find_pc_partial_function): Delete old implementation.
10961 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10962
10963 2018-04-26 Pedro Alves <palves@redhat.com>
10964
10965 * linespec.c (struct bound_minimal_symbol_search_key): New.
10966 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10967 skip first line if we found a GNU ifunc minimal symbol by name.
10968 (compare_msymbols): Change parameters to work with a destructured
10969 lhs minsym.
10970 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10971 functions.
10972
10973 2018-04-26 Pedro Alves <palves@redhat.com>
10974
10975 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10976 ifunc targets here. Instead, if we have an ifunc minsym, use its
10977 address/name.
10978 (add_location_to_breakpoint): Store the minsym and the objfile in
10979 the breakpoint location.
10980 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10981 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10982 Record the minsym in the sal.
10983 * symtab.h (symtab_and_line) <msymbol>: New field.
10984
10985 2018-04-26 Pedro Alves <palves@redhat.com>
10986
10987 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10988 unless we actually resolved the ifunc.
10989
10990 2018-04-26 Pedro Alves <palves@redhat.com>
10991
10992 * c-exp.y (variable production): Prefer ifunc minsyms over
10993 regular function symbols.
10994 * symtab.c (find_gnu_ifunc): New function.
10995 * minsyms.h (lookup_msym_prefer): New enum.
10996 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10997 parameter by a lookup_msym_prefer parameter.
10998 * symtab.h (find_gnu_ifunc): New declaration.
10999
11000 2018-04-26 Pedro Alves <palves@redhat.com>
11001
11002 * blockframe.c (find_gnu_ifunc_target_type): New function.
11003 (find_function_type): New.
11004 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11005 return a value with a memory address.
11006 (eval_call): For calls to GNU ifunc functions, try to find the
11007 type of the target function from the type that the resolver
11008 returns.
11009 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11010 symbols.
11011 * infcall.c (find_function_return_type): Delete.
11012 (find_function_addr): Add 'function_type' parameter. For calls to
11013 GNU ifunc functions, try to find the type of the target function
11014 from the type that the resolver returns, and return it via
11015 FUNCTION_TYPE.
11016 (call_function_by_hand_dummy): Adjust to use the function type
11017 returned by find_function_addr.
11018 (find_function_addr): Add 'function_type' parameter and move
11019 description here.
11020 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11021 declarations.
11022
11023 2018-04-26 Pedro Alves <palves@redhat.com>
11024
11025 * c-exp.y (variable production): Skip finding an alias for ifunc
11026 symbols.
11027
11028 2018-04-26 Pedro Alves <palves@redhat.com>
11029
11030 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11031
11032 2018-04-25 Pedro Alves <palves@redhat.com>
11033
11034 * infcmd.c (kill_command): Print the pid as string, not the whole
11035 thread's ptid. Add comment. s/has been killed/killed/ in output
11036 message.
11037 * remote.c (remote_detach_1): Print the pid as string, not the
11038 whole thread's ptid.
11039
11040 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11041 Sergio Durigan Junior <sergiodj@redhat.com>
11042 Pedro Alves <palves@redhat.com>
11043
11044 * infcmd.c (kill_command): Print message when inferior has
11045 been killed.
11046 * inferior.c (print_inferior_events): Remove 'static'. Set as
11047 '1'.
11048 (add_inferior): Improve message printed when
11049 'print_inferior_events' is on.
11050 (exit_inferior): Remove message printed when
11051 'print_inferior_events' is on.
11052 (detach_inferior): Improve message printed when
11053 'print_inferior_events' is on.
11054 (initialize_inferiors): Use 'add_inferior_silent' to set
11055 'current_inferior_'.
11056 * inferior.h (print_inferior_events): Declare here as
11057 'extern'.
11058 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11059 '[Detaching...]' messages when 'print_inferior_events' is on.
11060 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
11061 as prefix/suffix for messages. Remove periods. Fix erroneous
11062 'Detaching after fork from child...', replace it by '... from
11063 parent...'.
11064 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11065 prefix/suffix when printing 'Detaching...' messages. Print
11066 them when 'print_inferior_events' is on.
11067 * remote.c (remote_detach_1): Print message when detaching
11068 from inferior and '!is_fork_parent'.
11069
11070 2018-04-24 Tom Tromey <tom@tromey.com>
11071
11072 * cli-out.h: Reindent.
11073
11074 2018-04-24 Tom Tromey <tom@tromey.com>
11075
11076 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11077 (cli_ui_out::do_field_string): Use fputs_filtered.
11078 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11079
11080 2018-04-23 Tom Tromey <tom@tromey.com>
11081
11082 * guile/scm-frame.c (gdbscm_frame_read_var): Use
11083 gdb::unique_xmalloc_ptr.
11084
11085 2018-04-23 Tom Tromey <tom@tromey.com>
11086
11087 * configure: Rebuild.
11088
11089 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
11090
11091 PR gdb/23095
11092 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11093 prepare_for_testing. Set normal_bp to r_debug_state if target
11094 is bsd.
11095
11096 2018-04-21 Pedro Alves <palves@redhat.com>
11097 Rajendra SY <rajendra.sy@gmail.com>
11098
11099 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11100 * remote.c (extended_remote_attach): In all-stop mode, mark the
11101 thread as executing.
11102
11103 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
11104
11105 * thread.c (thread_apply_all_command): Fix comment.
11106 (thread_command): Fix comment.
11107
11108 2018-04-10 Alan Hayward <alan.hayward@arm.com>
11109
11110 * common/tdesc.h (tdesc_create_feature): Remove xml filename
11111 parameter.
11112 * features/aarch64-core.c (create_feature_aarch64_core):
11113 Regenerate.
11114 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11115 Likewise.
11116 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11117 Likewise.
11118 * features/i386/32bit-avx512.c
11119 (create_feature_i386_32bit_avx512): Likewise.
11120 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11121 Likewise.
11122 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11123 Likewise.
11124 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11125 Likewise.
11126 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11127 Likewise.
11128 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11129 Likewise.
11130 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11131 Likewise.
11132 * features/i386/64bit-avx512.c
11133 (create_feature_i386_64bit_avx512): Likewise.
11134 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11135 Likewise.
11136 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11137 Likewise.
11138 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11139 Likewise.
11140 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11141 Likewise.
11142 * features/i386/64bit-segments.c
11143 (create_feature_i386_64bit_segments): Likewise.
11144 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11145 Likewise.
11146 * features/i386/x32-core.c
11147 (create_feature_i386_x32_core): Likewise.
11148 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11149 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11150 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11151 * target-descriptions.c: In generated code, don't pass xml
11152 filename.
11153
11154 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11155
11156 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11157 (print_xml_feature::visit_post): Likewise.
11158 (print_xml_feature::visit): Likewise.
11159 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11160 (print_xml_feature): Add new class.
11161 * regformats/regdat.sh: Null xmltarget on feature targets.
11162 * target-descriptions.c (struct target_desc): Add xmltarget.
11163 (maintenance_check_tdesc_xml_convert): Add unittest function.
11164 (tdesc_get_features_xml): Add function to get xml.
11165 (maintenance_check_xml_descriptions): Test xml generation.
11166 * xml-tdesc.c (string_read_description_xml): Add function.
11167 * xml-tdesc.h (string_read_description_xml): Add declaration.
11168
11169 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11170
11171 * features/Makefile: Add feature marker to targets with new style
11172 target descriptions.
11173 * regformats/aarch64.dat: Regenerate.
11174 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11175 * regformats/i386/amd64-avx-linux.dat: Likewise.
11176 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11177 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11178 * regformats/i386/amd64-linux.dat: Likewise.
11179 * regformats/i386/amd64-mpx-linux.dat: Likewise.
11180 * regformats/i386/amd64.dat: Likewise.
11181 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11182 * regformats/i386/i386-avx-linux.dat: Likewise.
11183 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11184 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11185 * regformats/i386/i386-linux.dat: Likewise.
11186 * regformats/i386/i386-mmx-linux.dat: Likewise.
11187 * regformats/i386/i386-mpx-linux.dat: Likewise.
11188 * regformats/i386/i386.dat: Likewise.
11189 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11190 * regformats/i386/x32-avx-linux.dat: Likewise.
11191 * regformats/i386/x32-linux.dat: Likewise.
11192 * regformats/tic6x-c62x-linux.dat: Likewise.
11193 * regformats/tic6x-c64x-linux.dat: Likewise.
11194 * regformats/tic6x-c64xp-linux.dat: Likewise.
11195 * regformats/regdat.sh: Parse feature marker.
11196
11197 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11198
11199 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11200 (tdesc_osabi_name): Likewise.
11201 * target-descriptions.c (tdesc_architecture_name): Add new
11202 function.
11203 (tdesc_osabi_name): Likewise.
11204
11205 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11206
11207 * common/tdesc.c (tdesc_predefined_type): Move to here.
11208 (tdesc_named_type): Likewise.
11209 (tdesc_create_vector): Likewise.
11210 (tdesc_create_struct): Likewise.
11211 (tdesc_set_struct_size): Likewise.
11212 (tdesc_create_union): Likewise.
11213 (tdesc_create_flags): Likewise.
11214 (tdesc_create_enum): Likewise.
11215 (tdesc_add_field): Likewise.
11216 (tdesc_add_typed_bitfield): Likewise.
11217 (tdesc_add_bitfield): Likewise.
11218 (tdesc_add_flag): Likewise.
11219 (tdesc_add_enum_value): Likewise.
11220 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11221 (struct tdesc_type_vector): Likewise.
11222 (struct tdesc_type_field): Likewise.
11223 (struct tdesc_type_with_fields): Likewise.
11224 (tdesc_create_enum): Add declaration.
11225 (tdesc_add_typed_bitfield): Likewise.
11226 (tdesc_add_enum_value): Likewise.
11227 * target-descriptions.c (tdesc_type_field): Move from here.
11228 (tdesc_type_builtin): Likewise.
11229 (tdesc_type_vector): Likewise.
11230 (tdesc_type_with_fields): Likewise.
11231 (tdesc_predefined_types): Likewise.
11232 (tdesc_named_type): Likewise.
11233 (tdesc_create_vector): Likewise.
11234 (tdesc_create_struct): Likewise.
11235 (tdesc_set_struct_size): Likewise.
11236 (tdesc_create_union): Likewise.
11237 (tdesc_create_flags): Likewise.
11238 (tdesc_create_enum): Likewise.
11239 (tdesc_add_field): Likewise.
11240 (tdesc_add_typed_bitfield): Likewise.
11241 (tdesc_add_bitfield): Likewise.
11242 (tdesc_add_flag): Likewise.
11243 (tdesc_add_enum_value): Likewise.
11244 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11245 (tdesc_add_typed_bitfield): Likewise.
11246 (tdesc_add_enum_value): Likewise.
11247
11248 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11249
11250 * common/tdesc.c (tdesc_feature::accept): Move to here.
11251 (tdesc_feature::operator==): Likewise.
11252 (tdesc_create_reg): Likewise.
11253 * common/tdesc.h (tdesc_type_kind): Likewise.
11254 (struct tdesc_type): Likewise.
11255 (struct tdesc_feature): Likewise.
11256 * regformats/regdat.sh: Create a feature.
11257 * target-descriptions.c (tdesc_type_kind): Move from here.
11258 (tdesc_type): Likewise.
11259 (tdesc_type_up): Likewise.
11260 (tdesc_feature): Likewise.
11261 (tdesc_create_reg): Likewise.
11262
11263 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11264
11265 * Makefile.in: Add arch/tdesc.c
11266 * common/tdesc.c: New file.
11267 * common/tdesc.h (tdesc_element_visitor): Move to here.
11268 (tdesc_element): Likewise.
11269 (tdesc_reg): Likewise.
11270 (tdesc_reg_up): Likewise.
11271 * regformats/regdef.h (reg): Add offset to constructors.
11272 * target-descriptions.c (tdesc_element_visitor): Move from here.
11273 (tdesc_element): Likewise.
11274 (tdesc_reg): Likewise.
11275 (tdesc_reg_up): Likewise.
11276
11277 2018-04-17 Tom Tromey <tom@tromey.com>
11278
11279 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11280 discriminant field.
11281
11282 2018-04-17 Tom Tromey <tom@tromey.com>
11283
11284 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11285
11286 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
11287
11288 * symtab.c (print_symbol_info): Skip printing filename and line
11289 number when `last' is NULL.
11290 (symtab_symbol_info): Use empty string instead of NULL for first
11291 invocation of print_symbol_info.
11292 (rbreak_command): Pass NULL to `last' parameter of
11293 print_symbol_info.
11294
11295 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
11296
11297 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11298 instead of nullptr.
11299
11300 2018-04-16 Pedro Alves <palves@redhat.com>
11301
11302 * MAINTAINERS (sh): Remove.
11303 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11304 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11305 (ALLDEPFILES): Remove sh64-tdep.c.
11306 * NEWS: Mentions that support for SH-5/SH64 is removed.
11307 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11308 (sh*-*-openbsd*): Ditto.
11309 (sh64-*-elf*): Remove.
11310 (sh*): Remove.
11311 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11312 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11313 * sh-tdep.c: No longer include "sh64-tdep.h".
11314 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11315 * sh64-tdep.c, sh64-tdep.h: Remove files.
11316
11317 2018-04-16 Pedro Alves <palves@redhat.com>
11318
11319 * MAINTAINERS: Remove m88k.
11320 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11321 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11322 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11323 * NEWS: Mention that support for m88k was removed.
11324 * configure.host (m88*-*-*): Remove support.
11325 * configure.nat (m88k-*-*): Remove support.
11326 * configure.tgt (m88*-*-openbsd*): Remove.
11327 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11328
11329 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
11330
11331 * configure.tgt (x86_tobjs): New variable.
11332 (amd64_tobjs, i386_tobjs): Use it.
11333
11334 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11335
11336 * symtab.c (print_symbol_info): Precede the symbol definition by
11337 the line number when available.
11338 * NEWS: Advertise this enhancement.
11339
11340 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11341
11342 * NEWS (New options): announce set/show record btrace cpu.
11343 * btrace.c: Include record-btrace.h.
11344 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11345 the vendor is unknown.
11346 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
11347 Maybe overwrite the btrace configuration's cpu.
11348 (btrace_compute_ftrace): Add cpu parameter. Update callers.
11349 (btrace_fetch): Add cpu parameter. Update callers.
11350 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11351 Maybe overwrite the btrace configuration's cpu. Skip enabling
11352 errata workarounds if the vendor is unknown.
11353 * python/py-record-btrace.c: Include record-btrace.h.
11354 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11355 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11356 * record-btrace.c (record_btrace_cpu_state_kind): New.
11357 (record_btrace_cpu): New.
11358 (set_record_btrace_cpu_cmdlist): New.
11359 (record_btrace_get_cpu): New.
11360 (require_btrace_thread, record_btrace_info)
11361 (record_btrace_resume_thread): Call record_btrace_get_cpu.
11362 (cmd_set_record_btrace_cpu_none): New.
11363 (cmd_set_record_btrace_cpu_auto): New.
11364 (cmd_set_record_btrace_cpu): New.
11365 (cmd_show_record_btrace_cpu): New.
11366 (_initialize_record_btrace): Initialize set/show record btrace cpu
11367 commands.
11368 * record-btrace.h (record_btrace_get_cpu): New.
11369
11370 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11371
11372 * record.c (set_record_command): Fix typo in message.
11373
11374 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11375
11376 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11377
11378 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11379
11380 * infrun.c (process_event_stop_test): Call
11381 gdbarch_in_indirect_branch_thunk.
11382 * gdbarch.sh (in_indirect_branch_thunk): New.
11383 * gdbarch.c: Regenerated.
11384 * gdbarch.h: Regenerated.
11385 * x86-tdep.h: New.
11386 * x86-tdep.c: New.
11387 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11388 (HFILES_NO_SRCDIR): Add x86-tdep.h.
11389 (ALLDEPFILES): Add x86-tdep.c.
11390 * arch-utils.h (default_in_indirect_branch_thunk): New.
11391 * arch-utils.c (default_in_indirect_branch_thunk): New.
11392 * i386-tdep: Include x86-tdep.h.
11393 (i386_in_indirect_branch_thunk): New.
11394 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11395 function.
11396 * amd64-tdep: Include x86-tdep.h.
11397 (amd64_in_indirect_branch_thunk): New.
11398 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11399
11400 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11401
11402 PR gdb/23053
11403 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11404 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11405 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11406 regression.
11407
11408 2018-04-12 Tom Tromey <tom@tromey.com>
11409
11410 * rust-lang.c (rust_print_struct_def): Remove univariant code.
11411 (rust_evaluate_subexp): Likewise.
11412
11413 2018-04-12 Pedro Alves <palves@redhat.com>
11414
11415 * procfs.c (procfs_detach): Make forward declaration's prototype
11416 match definition's protototype.
11417 (proc_get_LDT_entry): Remove stale do_cleanups call.
11418
11419 2018-04-12 Pedro Alves <palves@redhat.com>
11420
11421 * target.h (target_ops::to_has_exited): Delete.
11422 (target_has_exited): Delete.
11423 * target-delegates.c: Regenerate.
11424
11425 2018-04-11 Pedro Alves <palves@redhat.com>
11426
11427 * target.c (fileio_fh_t::t): Add comment.
11428 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11429 (target_fileio_close): Handle a NULL target.
11430 (invalidate_fileio_fh): New.
11431 (target_close): Call it.
11432 * remote.c (remote_hostio_send_command): No longer check whether
11433 remote_desc is open.
11434
11435 2018-04-11 Pedro Alves <palves@redhat.com>
11436
11437 * target.c (fileio_fh_t): Make it a named struct instead of a
11438 typedef.
11439 (fileio_fh_t::is_closed): New method.
11440 (DEF_VEC_O (fileio_fh_t)): Remove.
11441 (fileio_fhandles): Now a std::vector.
11442 (is_closed_fileio_fh): Delete.
11443 (acquire_fileio_fd): Adjust. Rename parameters.
11444 (release_fileio_fd): Adjust.
11445 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11446 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11447 (target_fileio_close): Adjust.
11448
11449 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
11450
11451 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11452 index.
11453
11454 2018-04-10 Pedro Alves <palves@redhat.com>
11455
11456 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11457 (scoped_finish_thread_state): New class.
11458 * infcmd.c (run_command_1): Use it instead of finish_thread_state
11459 cleanup.
11460 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11461 (fetch_inferior_event, normal_stop): Likewise.
11462 * thread.c (finish_thread_state_cleanup): Delete.
11463
11464 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11465 Pedro Alves <palves@redhat.com>
11466
11467 * value.c: Include "selftest.h" and "common/array-view.h".
11468 (struct range) <operator ==>: New.
11469 (test_ranges_contain): New.
11470 (check_ranges_vector): New.
11471 (test_insert_into_bit_range_vector): New.
11472 (_initialize_values): Register selftests.
11473 * common/array-view.h (operator==, operator!=): New.
11474
11475 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11476
11477 * common/gdb_vecs.h (unordered_remove): Add overload that takes
11478 an iterator.
11479 * inline-frame.c: Include <algorithm>.
11480 (struct inline_state): Add constructor.
11481 (inline_state_s): Remove.
11482 (DEF_VEC_O(inline_state_s)): Remove.
11483 (inline_states): Change type to std::vector.
11484 (find_inline_frame_state): Adjust to std::vector.
11485 (allocate_inline_frame_state): Remove.
11486 (clear_inline_frame_state): Adjust to std::vector.
11487 (skip_inline_frames): Adjust to std::vector.
11488
11489 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11490
11491 * tracepoint.h (struct trace_state_variable): Add constructor.
11492 <name>: Change type to std::string.
11493 * tracepoint.c (tsv_s): Remove.
11494 (DEF_VEC_O(tsv_s)): Remove.
11495 (tvariables): Change to std::vector.
11496 (create_trace_state_variable): Adjust to std::vector.
11497 (find_trace_state_variable): Likewise.
11498 (find_trace_state_variable_by_number): Likewise.
11499 (delete_trace_state_variable): Likewise.
11500 (trace_variable_command): Adjust to std::string.
11501 (delete_trace_variable_command): Likewise.
11502 (tvariables_info_1): Adjust to std::vector.
11503 (save_trace_state_variables): Likewise.
11504 (start_tracing): Likewise.
11505 (merge_uploaded_trace_state_variables): Adjust to std::vector
11506 and std::string.
11507 * target.h (struct target_ops)
11508 <to_download_trace_state_variable>: Pass reference to
11509 trace_state_variable.
11510 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11511 * target-delegates.c: Re-generate.
11512 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11513 (mi_tsv_deleted): Likewise.
11514 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11515 * remote.c (remote_download_trace_state_variable): Change
11516 pointer to reference and adjust.
11517 * make-target-delegates (parse_argtypes): Handle references.
11518 (write_function_header): Likewise.
11519 (munge_type): Likewise.
11520
11521 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11522
11523 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11524 string_view-selftests.c.
11525 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11526 testsuite.
11527 * unittests/basic_string_view/cons/char/1.cc: Likewise.
11528 * unittests/basic_string_view/cons/char/2.cc: Likewise.
11529 * unittests/basic_string_view/cons/char/3.cc: Likewise.
11530 * unittests/basic_string_view/element_access/char/1.cc:
11531 Likewise.
11532 * unittests/basic_string_view/element_access/char/empty.cc:
11533 Likewise.
11534 * unittests/basic_string_view/element_access/char/front_back.cc:
11535 Likewise.
11536 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11537 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11538 Likewise.
11539 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11540 Likewise.
11541 * unittests/basic_string_view/modifiers/swap/char/1.cc:
11542 Likewise.
11543 * unittests/basic_string_view/operations/compare/char/1.cc:
11544 Likewise.
11545 * unittests/basic_string_view/operations/compare/char/13650.cc:
11546 Likewise.
11547 * unittests/basic_string_view/operations/copy/char/1.cc:
11548 Likewise.
11549 * unittests/basic_string_view/operations/data/char/1.cc:
11550 Likewise.
11551 * unittests/basic_string_view/operations/find/char/1.cc:
11552 Likewise.
11553 * unittests/basic_string_view/operations/find/char/2.cc:
11554 Likewise.
11555 * unittests/basic_string_view/operations/find/char/3.cc:
11556 Likewise.
11557 * unittests/basic_string_view/operations/find/char/4.cc:
11558 Likewise.
11559 * unittests/basic_string_view/operations/rfind/char/1.cc:
11560 Likewise.
11561 * unittests/basic_string_view/operations/rfind/char/2.cc:
11562 Likewise.
11563 * unittests/basic_string_view/operations/rfind/char/3.cc:
11564 Likewise.
11565 * unittests/basic_string_view/operations/substr/char/1.cc:
11566 Likewise.
11567 * unittests/basic_string_view/operators/char/2.cc: Likewise.
11568 * unittests/string_view-selftests.c: New file.
11569
11570 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11571
11572 * unittests/basic_string_view/capacity/1.cc: New file.
11573 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11574 * unittests/basic_string_view/cons/char/1.cc: New file.
11575 * unittests/basic_string_view/cons/char/2.cc: New file.
11576 * unittests/basic_string_view/cons/char/3.cc: New file.
11577 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11578 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11579 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11580 * unittests/basic_string_view/element_access/char/1.cc: New file.
11581 * unittests/basic_string_view/element_access/char/2.cc: New file.
11582 * unittests/basic_string_view/element_access/char/empty.cc: New file.
11583 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11584 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11585 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11586 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11587 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11588 * unittests/basic_string_view/include.cc: New file.
11589 * unittests/basic_string_view/inserters/char/1.cc: New file.
11590 * unittests/basic_string_view/inserters/char/2.cc: New file.
11591 * unittests/basic_string_view/inserters/char/3.cc: New file.
11592 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11593 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11594 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11595 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11596 * unittests/basic_string_view/literals/types.cc: New file.
11597 * unittests/basic_string_view/literals/values.cc: New file.
11598 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11599 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11600 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11601 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11602 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11603 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11604 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11605 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11606 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11607 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11608 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11609 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11610 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11611 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11612 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11613 * unittests/basic_string_view/operations/data/char/1.cc: New file.
11614 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11615 * unittests/basic_string_view/operations/find/char/1.cc: New file.
11616 * unittests/basic_string_view/operations/find/char/2.cc: New file.
11617 * unittests/basic_string_view/operations/find/char/3.cc: New file.
11618 * unittests/basic_string_view/operations/find/char/4.cc: New file.
11619 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11620 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11621 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11622 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11623 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11624 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11625 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11626 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11627 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11628 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11629 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11630 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11631 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11632 * unittests/basic_string_view/operators/char/2.cc: New file.
11633 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11634 * unittests/basic_string_view/range_access/char/1.cc: New file.
11635 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11636 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11637 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11638 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11639 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11640 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11641 * unittests/basic_string_view/requirements/typedefs.cc: New file.
11642 * unittests/basic_string_view/typedefs.cc: New file.
11643 * unittests/basic_string_view/types/1.cc: New file.
11644
11645 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11646
11647 * common/gdb_string_view.h: Remove libstdc++ implementation
11648 details, adjust to gdb reality.
11649 * common/gdb_string_view.tcc: Likewise.
11650 * cli/cli-script.c (struct string_view): Remove.
11651 (user_args) <m_args>: Change element type to gdb::string_view.
11652 (user_args::insert_args): Adjust.
11653
11654 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11655
11656 * common/gdb_string_view.h: New file.
11657 * common/gdb_string_view.tcc: New file.
11658
11659 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11660
11661 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11662 * configure: Re-generate.
11663
11664 2018-04-09 Pedro Alves <palves@redhat.com>
11665
11666 * gdbarch.sh: Include "observable.h" instead of "observer.h".
11667 (set_target_gdbarch): Call
11668 gdb::observers::architecture_changed.notify instead of
11669 observer_notify_architecture_changed.
11670
11671 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11672
11673 * tracepoint.c (struct current_traceframe_cleanup): Remove.
11674 (do_restore_current_traceframe_cleanup): Remove.
11675 (restore_current_traceframe_cleanup_dtor): Remove.
11676 (make_cleanup_restore_current_traceframe): Remove.
11677 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11678 New.
11679 * tracepoint.h (struct scoped_restore_current_traceframe): New.
11680 * infrun.c (fetch_inferior_event): Use
11681 scoped_restore_current_traceframe.
11682
11683 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11684
11685 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11686 Remove.
11687 <n_allocated_type_units>: Remove.
11688 <all_type_units>: Change to std::vector.
11689 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11690 to std::vector change.
11691 (dwarf2_per_objfile::get_cutu): Likewise.
11692 (dwarf2_per_objfile::get_tu): Likewise.
11693 (create_signatured_type_table_from_index): Likewise.
11694 (create_signatured_type_table_from_debug_names): Likewise.
11695 (dw2_symtab_iter_next): Likewise.
11696 (dw2_print_stats): Likewise.
11697 (dw2_expand_all_symtabs): Likewise.
11698 (dw2_expand_marked_cus): Likewise.
11699 (dw2_debug_names_iterator::next): Likewise.
11700 (dwarf2_initialize_objfile): Likewise.
11701 (add_signatured_type_cu_to_table): Likewise.
11702 (create_all_type_units): Likewise.
11703 (add_type_unit): Likewise.
11704 (struct tu_abbrev_offset): Add constructor.
11705 (build_type_psymtabs_1): Adjust to std::vector change.
11706 (print_tu_stats): Likewise.
11707 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11708 (write_debug_names): Likewise.
11709
11710 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11711
11712 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11713 Make an std::vector.
11714 <n_comp_units>: Remove.
11715 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11716 to std::vector change.
11717 (dwarf2_per_objfile::get_cutu): Likewise.
11718 (dwarf2_per_objfile::get_cu): Likewise.
11719 (create_cus_from_index): Likewise.
11720 (create_addrmap_from_index): Likewise.
11721 (create_addrmap_from_aranges): Likewise.
11722 (dwarf2_read_index): Likewise.
11723 (dw2_find_last_source_symtab): Likewise.
11724 (dw2_map_symtabs_matching_filename): Likewise.
11725 (dw2_symtab_iter_next): Likewise.
11726 (dw2_print_stats): Likewise.
11727 (dw2_expand_all_symtabs): Likewise.
11728 (dw2_expand_symtabs_with_fullname): Likewise.
11729 (dw2_expand_marked_cus): Likewise.
11730 (dw2_map_symbol_filenames): Likewise.
11731 (create_cus_from_debug_names): Likewise.
11732 (dwarf2_read_debug_names): Likewise.
11733 (dw2_debug_names_iterator::next): Likewise.
11734 (dwarf2_initialize_objfile): Likewise.
11735 (set_partial_user): Likewise.
11736 (dwarf2_build_psymtabs_hard): Likewise.
11737 (read_comp_units_from_section): Remove arguments, adjust to
11738 std::vector change.
11739 (create_all_comp_units): Adjust to std::vector and
11740 read_comp_units_from_section changes.
11741 (dwarf2_find_containing_comp_unit): Adjust to std::vector
11742 change.
11743 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11744 (psyms_seen_size): Likewise.
11745 (write_gdbindex): Likewise.
11746 (write_debug_names): Likewise.
11747
11748 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11749
11750 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11751 with dwarf2_per_objfile.
11752 (create_cus_from_index): Likewise.
11753 (create_signatured_type_table_from_index): Likewise.
11754 (dwarf2_read_index): Likewise.
11755 (dwarf2_initialize_objfile): Likewise.
11756 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
11757 per_cu rather than get_dwarf2_per_objfile.
11758
11759 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11760
11761 * dwarf2read.h (struct signatured_type): Forward declare.
11762 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11763 New methods.
11764 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11765 (dw2_get_cutu): ...this.
11766 (dwarf2_per_objfile::get_cu): Rename from...
11767 (dw2_get_cu): ...this.
11768 (dwarf2_per_objfile::get_tu): New.
11769 (create_addrmap_from_index): Adjust.
11770 (create_addrmap_from_aranges): Adjust.
11771 (dw2_find_last_source_symtab): Adjust.
11772 (dw2_map_symtabs_matching_filename): Adjust.
11773 (dw2_symtab_iter_next): Adjust.
11774 (dw2_print_stats): Adjust.
11775 (dw2_expand_all_symtabs): Adjust.
11776 (dw2_expand_symtabs_with_fullname): Adjust.
11777 (dw2_expand_marked_cus): Adjust.
11778 (dw_expand_symtabs_matching_file_matcher): Adjust.
11779 (dw2_map_symbol_filenames): Adjust.
11780 (dw2_debug_names_iterator::next): Adjust.
11781 (dwarf2_initialize_objfile): Adjust.
11782 (set_partial_user): Adjust.
11783 (dwarf2_build_psymtabs_hard): Adjust.
11784
11785 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11786
11787 * dwarf2read.c (create_signatured_type_table_from_debug_names):
11788 Remove unused variables.
11789 (dw2_map_symtabs_matching_filename): Likewise.
11790 (dwarf2_record_block_ranges): Likewise.
11791 (dwarf2_read_addr_index): Likewise.
11792 (follow_die_offset): Likewise.
11793
11794 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11795
11796 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11797 to symbol_file_add_main.
11798
11799 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11800
11801 PR mi/22299
11802 * mi/mi-console.c (do_fputc_async_safe): New.
11803 (mi_console_file::write_async_safe): New.
11804 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11805 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11806 New.
11807 * ui-file.c (ui_file::putstrn): Adjust call to
11808 fputstrn_unfiltered.
11809 * utils.c (printchar): Replace do_fputs and do_fprintf
11810 parameters by do_fputc.
11811 (fputstr_filtered): Adjust call to printchar.
11812 (fputstr_unfiltered): Likewise.
11813 (fputstrn_filtered): Likewise.
11814 (fputstrn_unfiltered): Add do_fputc parameter, pass to
11815 printchar.
11816 * utils.h (do_fputc_ftype): New typedef.
11817 (fputstrn_unfiltered): Add do_fputc parameter.
11818
11819 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11820
11821 * regformats/i386/i386-avx.dat: Remove.
11822
11823 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11824
11825 PR gdb/22979
11826 * amd64-tdep.c (amd64_none_init_abi): New function.
11827 (amd64_x32_none_init_abi): New function.
11828 (_initialize_amd64_tdep): Register handlers for x86-64 and
11829 x64_32 with GDB_OSABI_NONE.
11830 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11831 GDB_OSABI_NONE osabi.
11832
11833 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11834
11835 PR gdb/22980
11836 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11837 GDB_OSABI_NONE.
11838 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11839 * osabi.c (gdb_osabi_names): Add "unknown" entry.
11840
11841 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11842
11843 * common/byte-vector.h (char_vector): New type.
11844 * target.h (target_read_alloc): Return
11845 gdb::optional<byte_vector>.
11846 (target_read_stralloc): Return gdb::optional<char_vector>.
11847 (target_get_osdata): Return gdb::optional<char_vector>.
11848 * target.c (target_read_alloc_1): Templatize. Replacement
11849 manual memory management with vector.
11850 (target_read_alloc): Change return type, adjust.
11851 (target_read_stralloc): Change return type, adjust.
11852 (target_get_osdata): Change return type, adjust.
11853 * auxv.c (struct auxv_info) <length>: Remove.
11854 <data>: Change type to gdb::optional<byte_vector>.
11855 (auxv_inferior_data_cleanup): Free auxv_info with delete.
11856 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11857 (target_auxv_search): Adjust.
11858 (fprint_target_auxv): Adjust.
11859 * avr-tdep.c (avr_io_reg_read_command): Adjust.
11860 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11861 (linux_make_corefile_notes): Adjust.
11862 * osdata.c (get_osdata): Adjust.
11863 * remote.c (remote_get_threads_with_qxfer): Adjust.
11864 (remote_memory_map): Adjust.
11865 (remote_traceframe_info): Adjust.
11866 (btrace_read_config): Adjust.
11867 (remote_read_btrace): Adjust.
11868 (remote_pid_to_exec_file): Adjust.
11869 * solib-aix.c (solib_aix_get_library_list): Adjust.
11870 * solib-dsbt.c (decode_loadmap): Don't free buf.
11871 (dsbt_get_initial_loadmaps): Adjust.
11872 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11873 * solib-target.c (solib_target_current_sos): Adjust.
11874 * tracepoint.c (sdata_make_value): Adjust.
11875 * xml-support.c (xinclude_start_include): Adjust.
11876 (xml_fetch_content_from_file): Adjust.
11877 * xml-support.h (xml_fetch_another): Change return type.
11878 (xml_fetch_content_from_file): Change return type.
11879 * xml-syscall.c (xml_init_syscalls_info): Adjust.
11880 * xml-tdesc.c (file_read_description_xml): Adjust.
11881 (fetch_available_features_from_target): Change return type.
11882 (target_fetch_description_xml): Adjust.
11883 (target_read_description_xml): Adjust.
11884
11885 2018-04-06 Tom Tromey <tom@tromey.com>
11886
11887 * value.c (~value): Update.
11888 (struct value) <contents>: Now unique_xmalloc_ptr.
11889 (value_contents_bits_eq, allocate_value_contents)
11890 (value_contents_raw, value_contents_all_raw)
11891 (value_contents_for_printing, value_contents_for_printing_const)
11892 (set_value_enclosing_type): Update.
11893
11894 2018-04-06 Tom Tromey <tom@tromey.com>
11895
11896 * value.c (range_s): Remove typedef, VEC.
11897 (struct range): Add operator<.
11898 (range_lessthan): Remove.
11899 (ranges_contain): Change type.
11900 (~value): Update.
11901 (struct value) <unavailable, optimized_out>: Now std::vector.
11902 (value_entirely_available)
11903 (value_entirely_covered_by_range_vector)
11904 (value_entirely_unavailable, value_entirely_optimized_out):
11905 Update.
11906 (insert_into_bit_range_vector): Change argument type.
11907 (find_first_range_overlap): Likewise.
11908 (struct ranges_and_idx, value_contents_bits_eq)
11909 (require_not_optimized_out, require_available): Update.
11910 (ranges_copy_adjusted): Change argument types.
11911 (value_optimized_out, value_copy, value_fetch_lazy): Update.
11912
11913 2018-04-06 Tom Tromey <tom@tromey.com>
11914
11915 * value.c (~value): Update.
11916 (struct value) <parent>: Now a value_ref_ptr.
11917 (value_parent, set_value_parent, value_address, value_copy):
11918 Update.
11919
11920 2018-04-06 Tom Tromey <tom@tromey.com>
11921
11922 * value.c (struct value): Add constructor, destructor, and member
11923 initializers.
11924 (allocate_value_lazy, value_decref): Update.
11925
11926 2018-04-06 Tom Tromey <tom@tromey.com>
11927
11928 * value.c (struct value) <released, next>: Remove.
11929 (all_values): Now a std::vector.
11930 (allocate_value_lazy): Update.
11931 (value_next): Remove.
11932 (value_mark, value_free_to_mark, release_value)
11933 (value_release_to_mark): Update.
11934
11935 2018-04-06 Tom Tromey <tom@tromey.com>
11936
11937 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11938 (free_value_chain): Remove.
11939 * value.c (free_value_chain): Remove.
11940 (value_release_to_mark): Return a std::vector.
11941 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11942 std::vector.
11943 (check_condition): Update.
11944 * eval.c (fetch_subexp_value): Change "val_chain" to a
11945 std::vector.
11946 * breakpoint.c (update_watchpoint): Update.
11947 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11948
11949 2018-04-06 Tom Tromey <tom@tromey.com>
11950
11951 * value.h (free_all_values): Remove.
11952 * value.c (free_all_values): Remove.
11953
11954 2018-04-06 Tom Tromey <tom@tromey.com>
11955
11956 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11957 (value_history_chain, value_history_count): Remove.
11958 (value_history): New global.
11959 (record_latest_value, access_value_history, show_values)
11960 (preserve_values): Update.
11961
11962 2018-04-06 Tom Tromey <tom@tromey.com>
11963
11964 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11965 * varobj.c (varobj_set_display_format, varobj_set_value)
11966 (install_default_visualizer, construct_visualizer)
11967 (install_new_value, ~varobj, varobj_get_value_type)
11968 (my_value_of_variable, varobj_editable_p): Update.
11969 * c-varobj.c (c_describe_child, c_value_of_variable)
11970 (cplus_number_of_children, cplus_describe_child): Update.
11971 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11972 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11973 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11974
11975 2018-04-06 Tom Tromey <tom@tromey.com>
11976
11977 * printcmd.c (last_examine_address): Change type to
11978 value_ref_ptr.
11979 (do_examine, x_command): Update.
11980
11981 2018-04-06 Tom Tromey <tom@tromey.com>
11982
11983 * value.c (release_value): Update.
11984 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11985 (struct bpstats) <val>: Now a value_ref_ptr.
11986 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11987 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11988 (~watchpoint, print_it_watchpoint, watch_command_1)
11989 (invalidate_bp_value_on_memory_change): Update.
11990
11991 2018-04-06 Tom Tromey <tom@tromey.com>
11992
11993 * varobj.c (varobj_clear_saved_item)
11994 (update_dynamic_varobj_children, install_new_value, ~varobj):
11995 Update.
11996 * value.h (value_incref): Move declaration earlier.
11997 (value_decref): Rename from value_free.
11998 (struct value_ref_policy): New.
11999 (value_ref_ptr): New typedef.
12000 (struct value_deleter): Remove.
12001 (gdb_value_up): Remove typedef.
12002 (release_value): Change return type.
12003 (release_value_or_incref): Remove.
12004 * value.c (set_value_parent): Update.
12005 (value_incref): Change return type.
12006 (value_decref): Rename from value_free.
12007 (value_free_to_mark, free_all_values, free_value_chain): Update.
12008 (release_value): Return value_ref_ptr.
12009 (release_value_or_incref): Remove.
12010 (record_latest_value, set_internalvar, clear_internalvar):
12011 Update.
12012 * stack.c (info_frame_command): Don't call value_free.
12013 * python/py-value.c (valpy_dealloc, valpy_new)
12014 (value_to_value_object): Update.
12015 * printcmd.c (do_examine): Update.
12016 * opencl-lang.c (lval_func_free_closure): Update.
12017 * mi/mi-main.c (register_changed_p): Don't call value_free.
12018 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12019 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12020 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12021 value_free.
12022 * guile/scm-value.c (vlscm_free_value_smob)
12023 (vlscm_scm_from_value): Update.
12024 * frame.c (frame_register_unwind, frame_unwind_register_signed)
12025 (frame_unwind_register_unsigned, get_frame_register_bytes)
12026 (put_frame_register_bytes): Don't call value_free.
12027 * findvar.c (address_from_register): Don't call value_free.
12028 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12029 * dwarf2loc.c (entry_data_value_free_closure)
12030 (value_of_dwarf_reg_entry, free_pieced_value_closure)
12031 (dwarf2_evaluate_loc_desc_full): Update.
12032 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12033 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12034 (~watchpoint, watch_command_1)
12035 (invalidate_bp_value_on_memory_change): Update.
12036 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12037
12038 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
12039
12040 PR gdb/23022
12041 * warning.m4: Add -Wno-error=deprecated-register.
12042 * configure: Re-generate.
12043
12044 2018-04-05 Tom Tromey <tom@tromey.com>
12045
12046 * linespec.h: Remove include of "vec.h".
12047
12048 2018-04-05 Tom Tromey <tom@tromey.com>
12049
12050 * linespec.c (typep): Remove typedef.
12051 (find_methods, find_superclass_methods): Take a std::vector.
12052 (find_method): Use std::vector.
12053
12054 2018-04-05 Tom Tromey <tom@tromey.com>
12055
12056 * utils.c (compare_strings): Remove.
12057 * utils.h (compare_strings): Remove.
12058 * objc-lang.h (find_imps): Update.
12059 * objc-lang.c (find_methods): Take a std::vector.
12060 (uniquify_strings, find_imps): Likewise.
12061 * linespec.c (find_methods): Take a std::vector.
12062 (decode_objc): Use std::vector.
12063 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12064 a std::vector.
12065 (find_method, find_function_symbols): Use std::vector.
12066
12067 2018-04-05 Tom Tromey <tom@tromey.com>
12068
12069 * completer.c (completion_tracker::completion_tracker): Remove
12070 cast.
12071 (completion_tracker::discard_completions): Likewise.
12072 * breakpoint.c (ambiguous_names_p): Remove cast.
12073 * ada-lang.c (_initialize_ada_language): Remove cast.
12074 * utils.h (streq): Update.
12075 (streq_hash): Add new declaration.
12076 * utils.c (streq): Return bool.
12077 (streq_hash): New function.
12078
12079 2018-04-05 Tom Tromey <tom@tromey.com>
12080
12081 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12082 Remove a string copy.
12083
12084 2018-04-05 Tom Tromey <tom@tromey.com>
12085
12086 * linespec.c (filter_results): Use std::vector.
12087 (decode_line_2, decode_line_full): Update.
12088
12089 2018-04-05 Tom Tromey <tom@tromey.com>
12090
12091 * linespec.c (canonical_to_fullform): Return std::string.
12092 (filter_results): Update.
12093 (struct decode_line_2_item): Add constructor.
12094 <fullform, displayform>: Now std::string.
12095 (decode_line_2_compare_items): Now a std::sort comparator.
12096 (decode_line_2): Update.
12097
12098 2018-04-05 Tom Tromey <tom@tromey.com>
12099
12100 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12101 (unexpected_linespec_error): Update.
12102 (linespec_parse_basic, parse_linespec): Update.
12103
12104 2018-04-05 Tom Tromey <tom@tromey.com>
12105
12106 * linespec.c (linespec_parse_basic): Reindent.
12107
12108 2018-04-05 Tom Tromey <tom@tromey.com>
12109
12110 * minsyms.h (iterate_over_minimal_symbols): Update.
12111 * minsyms.c (iterate_over_minimal_symbols): Take a
12112 gdb::function_view.
12113 * linespec.c (struct collect_minsyms): Remove.
12114 (compare_msyms): Now a std::sort comparator.
12115 (add_minsym): Add parameters.
12116 (search_minsyms_for_name): Update. Use std::vector.
12117
12118 2018-04-03 Tom Tromey <tom@tromey.com>
12119
12120 * mipsread.c (read_alphacoff_dynamic_symtab): Use
12121 gdb::byte_vector.
12122
12123 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
12124
12125 * MAINTAINERS (Write After Approval): Add Weimin Pan.
12126
12127 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
12128
12129 PR gdb/16959
12130 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
12131 printing static type.
12132
12133 2018-04-01 Tom Tromey <tom@tromey.com>
12134
12135 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12136 (rs6000_xfer_shared_libraries): Update.
12137
12138 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
12139
12140 * common/gdb_vecs.h (char_ptr): Remove.
12141 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12142
12143 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
12144
12145 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12146 with std::vector.
12147 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12148
12149 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
12150
12151 * tracepoint.h (struct uploaded_tp): Initialize fields.
12152 <actions, step_actions, cmd_strings>: Change type to
12153 std::vector<char *>.
12154 * tracepoint.c (get_uploaded_tp): Allocate with new.
12155 (free_uploaded_tps): Free with delete.
12156 (parse_tracepoint_definition): Adjust to std::vector change.
12157 * breakpoint.c (read_uploaded_action): Likewise.
12158 (create_tracepoint_from_upload): Likewise.
12159 * ctf.c (ctf_write_uploaded_tp): Likewise.
12160 (SET_ARRAY_FIELD): Likewise.
12161 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12162
12163 2018-03-30 Tom Tromey <tom@tromey.com>
12164
12165 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
12166 std::unique_ptr.
12167 (svr4_keep_data_in_core): Update.
12168 (svr4_read_so_list): Update.
12169
12170 2018-03-30 Tom Tromey <tom@tromey.com>
12171
12172 * windows-nat.c (handle_output_debug_string, handle_exception):
12173 Update.
12174 * target.h (target_read_string): Update.
12175 * target.c (target_read_string): Change "string" to
12176 unique_xmalloc_ptr.
12177 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12178 Update.
12179 * solib-frv.c (frv_current_sos): Update.
12180 * solib-dsbt.c (dsbt_current_sos): Update.
12181 * solib-darwin.c (darwin_current_sos): Update.
12182 * linux-thread-db.c (inferior_has_bug): Update.
12183 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12184 Update. Remove alloca.
12185 * ada-lang.c (ada_main_name): Update.
12186
12187 2018-03-30 Tom Tromey <tom@tromey.com>
12188
12189 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12190 (struct dwo_file_deleter): New.
12191 (dwo_file_up): New typedef.
12192 (open_and_init_dwo_file): Use dwo_file_up.
12193 (free_dwo_file_cleanup): Remove.
12194
12195 2018-03-30 Tom Tromey <tom@tromey.com>
12196
12197 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12198 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12199
12200 2018-03-30 Tom Tromey <tom@tromey.com>
12201
12202 * dwarf2read.c (class free_cached_comp_units): New class.
12203 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12204 (free_cached_comp_units): Remove function.
12205
12206 2018-03-30 Tom Tromey <tom@tromey.com>
12207
12208 * utils.h (make_cleanup_unpush_target): Remove.
12209 * inf-ptrace.c (struct target_unpusher): New.
12210 (target_unpush_up) New typedef.
12211 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12212 target_unpush_up.
12213 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12214
12215 2018-03-27 Tom Tromey <tom@tromey.com>
12216
12217 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12218
12219 2018-03-27 Pedro Alves <palves@redhat.com>
12220 Tom Tromey <tom@tromey.com>
12221
12222 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12223 destructor. Now a class.
12224 (gdb_readline_wrapper_cleanup): Remove function.
12225 (gdb_readline_wrapper): Remove cleanups.
12226
12227 2018-03-27 Tom Tromey <tom@tromey.com>
12228
12229 * typeprint.h (struct type_print_options) <local_typedefs,
12230 global_typedefs>: Remove "struct" keyword.
12231 (class typedef_hash_table): New class.
12232 (recursively_update_typedef_hash, add_template_parameters)
12233 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12234 (find_typedef_in_hash): Don't declare.
12235 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12236 (typedef_hash_table::recursively_update): Rename from
12237 recursively_update_typedef_hash. Now a member.
12238 (typedef_hash_table::add_template_parameters): Rename from
12239 add_template_parameters. Now a member.
12240 (typedef_hash_table::typedef_hash_table): Now a constructor;
12241 rename from create_typedef_hash.
12242 (typedef_hash_table::~typedef_hash_table): Now a destructor;
12243 rename from free_typedef_hash.
12244 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12245 (do_free_global_table): Remove.
12246 (typedef_hash_table::typedef_hash_table): New constructor; renamed
12247 from copy_type_recursive.
12248 (create_global_typedef_table): Remove.
12249 (typedef_hash_table::find_global_typedef): Now a member of
12250 typedef_hash_table.
12251 (typedef_hash_table::find_typedef): Rename from
12252 find_typedef_in_hash; now a member.
12253 (whatis_exp): Update.
12254 * extension.h (struct ext_lang_type_printers): Add constructor and
12255 destructor.
12256 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12257 declare.
12258 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12259 Now a constructor; rename from start_ext_lang_type_printers.
12260 (ext_lang_type_printers): Now a destructor; rename from
12261 free_ext_lang_type_printers.
12262 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12263 Update.
12264 (c_type_print_base_struct_union): Update. Remove cleanups.
12265
12266 2018-03-27 Tom Tromey <tom@tromey.com>
12267
12268 * dwarf-index-write.c: Include <cmath>.
12269
12270 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12271
12272 * NEWS: Add entry describing new "set|show varsize-limit" command.
12273 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12274 command.
12275 * printcmd.c (_initialize_printcmd): Add "set var" alias of
12276 "set variable".
12277
12278 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
12279
12280 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12281 dwarf-index-write.c
12282 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12283 * dwarf-index-common.c: New file.
12284 * dwarf-index-common.h: New file.
12285 * dwarf-index-write.c: New file.
12286 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12287 (struct dwarf2_section_info): Move from here.
12288 (dwarf2_section_info_def): Likewise.
12289 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12290 (offset_type): Likewise.
12291 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12292 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12293 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12294 (byte_swap): Likewise.
12295 (MAYBE_SWAP): Likewise.
12296 (dwarf2_per_cu_ptr): Likewise.
12297 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12298 (struct tu_stats): Likewise.
12299 (struct dwarf2_per_objfile): Likewise.
12300 (struct dwarf2_per_cu_data): Likewise.
12301 (struct signatured_type): Likewise.
12302 (sig_type_ptr): Likewise.
12303 (DEF_VEC_P (sig_type_ptr)): Likewise.
12304 (INDEX4_SUFFIX): Likewise.
12305 (INDEX5_SUFFIX): Likewise.
12306 (DEBUG_STR_SUFFIX): Likewise.
12307 (dwarf2_read_section): Make non-static.
12308 (mapped_index_string_hash): Move from here.
12309 (dwarf5_djb_hash): Likewise.
12310 (file_write): Likewise.
12311 (class data_buf): Likewise.
12312 (struct symtab_index_entry): Likewise.
12313 (struct mapped_symtab): Likewise.
12314 (find_slot): Likewise.
12315 (hash_expand): Likewise.
12316 (add_index_entry): Likewise.
12317 (uniquify_cu_indices): Likewise.
12318 (class c_str_view): Likewise.
12319 (class c_str_view_hasher): Likewise.
12320 (class vector_hasher): Likewise.
12321 (write_hash_table): Likewise.
12322 (psym_index_map): Likewise.
12323 (struct addrmap_index_data): Likewise.
12324 (add_address_entry): Likewise.
12325 (add_address_entry_worker): Likewise.
12326 (write_address_map): Likewise.
12327 (symbol_kind): Likewise.
12328 (write_psymbols): Likewise.
12329 (struct signatured_type_index_data): Likewise.
12330 (write_one_signatured_type): Likewise.
12331 (recursively_count_psymbols): Likewise.
12332 (recursively_write_psymbols): Likewise.
12333 (class debug_names): Likewise.
12334 (check_dwarf64_offsets): Likewise.
12335 (psyms_seen_size): Likewise.
12336 (write_gdbindex): Likewise.
12337 (write_debug_names): Likewise.
12338 (assert_file_size): Likewise.
12339 (write_psymtabs_to_index): Likewise.
12340 (save_gdb_index_command): Likewise.
12341 (_initialize_dwarf2_read): Don't register the "save gdb-index"
12342 command.
12343 * dwarf2read.h: New file.
12344
12345 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12346
12347 PR gdb/22670
12348 * dwarf2read.c (dwarf2_physname): Do not return the demangled
12349 symbol name if the CU's language stores symbol names in linkage
12350 format.
12351 * language.h (struct language_defn)
12352 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
12353 all instances of this struct.
12354
12355 2018-03-26 Tom Tromey <tom@tromey.com>
12356
12357 * stack.c (backtrace_command_1): Remove verbose code.
12358
12359 2018-03-26 Tom Tromey <tom@tromey.com>
12360
12361 * python/py-framefilter.c (py_print_type): Don't catch
12362 exceptions. Return void.
12363 (py_print_value): Likewise.
12364 (py_print_single_arg): Likewise.
12365 (enumerate_args): Don't catch exceptions.
12366 (py_print_args): Likewise.
12367 (py_print_frame): Likewise.
12368 (gdbpy_apply_frame_filter): Catch exceptions here.
12369
12370 2018-03-26 Tom Tromey <tom@tromey.com>
12371
12372 * stack.c (_initialize_stack): Remove trailing newlines from help
12373 text. Add "Usage" line to "backtrace" help.
12374
12375 2018-03-26 Tom Tromey <tom@tromey.com>
12376
12377 PR python/16486:
12378 * python/py-framefilter.c (py_print_args): Call wrap_hint.
12379
12380 2018-03-26 Tom Tromey <tom@tromey.com>
12381
12382 * python/py-framefilter.c (py_print_single_arg): Return
12383 EXT_LANG_BT_ERROR from catch.
12384
12385 2018-03-26 Tom Tromey <tom@tromey.com>
12386
12387 PR backtrace/15584:
12388 * stack.c (backtrace_command_1): Move some code into no-filters
12389 "if".
12390
12391 2018-03-26 Tom Tromey <tom@tromey.com>
12392
12393 * python/py-framefilter.c (throw_quit_or_print_exception): New
12394 function.
12395 (gdbpy_apply_frame_filter): Use it.
12396
12397 2018-03-26 Tom Tromey <tom@tromey.com>
12398
12399 PR cli/17716:
12400 * python/py-framefilter.c (py_print_type, py_print_value)
12401 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12402 RETURN_MASK_ERROR.
12403
12404 2018-03-26 Tom Tromey <tom@tromey.com>
12405
12406 * python/py-framefilter.c (enumerate_args): Use
12407 gdb::unique_xmalloc_ptr.
12408
12409 2018-03-26 Tom Tromey <tom@tromey.com>
12410
12411 * python/py-framefilter.c (py_print_frame): Return
12412 EXT_LANG_BT_OK.
12413 (gdbpy_apply_frame_filter): Update comment.
12414 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12415 Remove.
12416 <EXT_LANG_BT_NO_FILTERS>: Change value.
12417
12418 2018-03-26 Tom Tromey <tom@tromey.com>
12419
12420 PR backtrace/15582:
12421 * stack.c (backtrace_command): Parse "hide" argument.
12422 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12423 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12424 constant.
12425
12426 2018-03-26 Tom Tromey <tom@tromey.com>
12427
12428 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12429 add "flags".
12430 (backtrace_command): Remove "fulltrace", add "flags".
12431
12432 2018-03-26 Tom Tromey <tom@tromey.com>
12433
12434 * stack.c (backtrace_command): Rewrite command line parsing.
12435
12436 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12437
12438 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12439
12440 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12441
12442 * filename-seen-cache.h: Add include guard.
12443
12444 2018-03-26 Keith Seitz <keiths@redhat.com>
12445
12446 * symfile.c (place_section): Remove "struct" from section_addr_info
12447 in comment.
12448 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12449 "struct" keyword from section_addr_info.
12450
12451 2018-03-26 Alan Hayward <alan.hayward@arm.com>
12452
12453 * regformats/regdef.h (reg): Add constructors.
12454
12455 2018-03-25 Pedro Alves <palves@redhat.com>
12456
12457 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12458 if then/else bodies in var_func_name extraction.
12459
12460 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
12461
12462 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12463 lookup_minimal_symbol() to find symbol entry.
12464 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12465
12466 2018-03-23 Keith Seitz <keiths@redhat.com>
12467
12468 PR c++/22968
12469 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12470 nested type definitions for C++, too.
12471
12472 2018-03-23 Tom Tromey <tom@tromey.com>
12473
12474 * machoread.c (struct oso_el): Add a constructor. Don't define as
12475 a typedef.
12476 (macho_register_oso): Remove.
12477 (macho_symtab_read): Take a std::vector.
12478 (oso_el_compare_name): Now a std::sort comparator.
12479 (macho_symfile_read_all_oso): Take a std::vector.
12480 (macho_symfile_read): Use std::vector. Remove cleanups.
12481
12482 2018-03-22 Tom Tromey <tom@tromey.com>
12483
12484 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12485 (record_full_goto_bookmark): Use std::string.
12486
12487 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12488
12489 PR tdep/18295
12490 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12491 a single mask.
12492
12493 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12494
12495 * rs6000-tdep.c (store_insn_p): New function.
12496 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12497 and cr_reg to their unshifted values. Use store_insn_p to
12498 match LR saves using either R1 or fdata->alloca_reg. Use
12499 store_insn_p to match CR saves. Set alloca_reg_offset
12500 when alloca_reg and framep are set. Remove lr_reg shift
12501 when assigning to fdata->lr_register.
12502
12503 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
12504
12505 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12506 command line args instead of emitting a warning.
12507
12508 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12509
12510 * tracepoint.h (struct static_tracepoint_marker): Initialize
12511 fields, define default constructor, move constructor and move
12512 assignment, disable the rest.
12513 <str_id, extra>: Make std::string.
12514 (release_static_tracepoint_marker): Remove.
12515 (free_current_marker): Remove.
12516 * tracepoint.c (free_current_marker): Remove.
12517 (parse_static_tracepoint_marker_definition): Adjust to
12518 std::string, use new hex2str overload.
12519 (release_static_tracepoint_marker): Remove.
12520 (print_one_static_tracepoint_marker): Get marker by reference
12521 and adjust to std::string.
12522 (info_static_tracepoint_markers_command): Adjust to std::vector
12523 changes
12524 * target.h (static_tracepoint_marker_p): Remove typedef.
12525 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12526 (struct target_ops) <to_static_tracepoint_marker_at>: Return
12527 bool.
12528 <to_static_tracepoint_markers_by_strid>: Return std::vector.
12529 * target-debug.h
12530 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12531 (target_debug_print_std_vector_static_tracepoint_marker): New.
12532 (target_debug_print_struct_static_tracepoint_marker_p): Rename
12533 to...
12534 (target_debug_print_static_tracepoint_marker_p): ... this.
12535 * target-delegates.c: Re-generate.
12536 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12537 Make std::string.
12538 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12539 (decode_static_tracepoint_spec): Adjust to std::vector.
12540 (tracepoint_print_one_detail): Adjust to std::string.
12541 (strace_marker_decode_location): Adjust to std::string.
12542 (update_static_tracepoint): Adjust to std::string, remove call
12543 to release_static_tracepoint_marker.
12544 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12545 Adjust to std::vector.
12546 * remote.c (remote_static_tracepoint_marker_at): Return bool.
12547 (remote_static_tracepoint_markers_by_strid): Adjust to
12548 std::vector.
12549 * common/rsp-low.h (hex2str): New overload with explicit count
12550 of bytes.
12551 * common/rsp-low.c (hex2str): New overload with explicit count
12552 of bytes.
12553 * unittests/rsp-low-selftests.c (test_hex2str): New function.
12554 (_initialize_rsp_low_selftests): Add test_hex2str test.
12555 * unittests/tracepoint-selftests.c
12556 (test_parse_static_tracepoint_marker_definition): Adjust to
12557 std::string.
12558
12559 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12560
12561 * tracepoint.c (parse_static_tracepoint_marker_definition):
12562 Consider case where the definition is followed by more
12563 definitions.
12564 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12565 tracepoint-selftests.c.
12566 * unittests/tracepoint-selftests.c: New.
12567
12568 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12569
12570 * MAINTAINERS (Write After Approval): Add Pedro Franco de
12571 Carvalho.
12572
12573 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12574
12575 * symtab.c (find_pc_sect_line): fixed indentation.
12576
12577 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12578
12579 * symtab.c (find_pc_sect_line): now uses binary search.
12580
12581 2018-03-19 Tom Tromey <tom@tromey.com>
12582
12583 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12584 "IDENT" production.
12585
12586 2018-03-19 Pedro Alves <palves@redhat.com>
12587 Tom Tromey <tom@tromey.com>
12588
12589 * unittests/observable-selftests.c: New file.
12590 * common/observable.h: New file.
12591 * observable.h: New file.
12592 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12593 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12594 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12595 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12596 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12597 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12598 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12599 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12600 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12601 python/py-breakpoint.c, python/py-finishbreakpoint.c,
12602 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12603 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12604 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12605 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12606 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12607 tui/tui-interp.c, valops.c: Update all users.
12608 * tui/tui-hooks.c (tui_bp_created_observer)
12609 (tui_bp_deleted_observer, tui_bp_modified_observer)
12610 (tui_inferior_exit_observer, tui_before_prompt_observer)
12611 (tui_normal_stop_observer, tui_register_changed_observer):
12612 Remove.
12613 (tui_observers_token): New global.
12614 (attach_or_detach, tui_attach_detach_observers): New functions.
12615 (tui_install_hooks, tui_remove_hooks): Use
12616 tui_attach_detach_observers.
12617 * record-btrace.c (record_btrace_thread_observer): Remove.
12618 (record_btrace_thread_observer_token): New global.
12619 * observer.sh: Remove.
12620 * observer.c: Rename to observable.c.
12621 * observable.c (namespace gdb_observers): Define new objects.
12622 (observer_debug): Move into gdb_observers namespace.
12623 (struct observer, struct observer_list, xalloc_observer_list_node)
12624 (xfree_observer_list_node, generic_observer_attach)
12625 (generic_observer_detach, generic_observer_notify): Remove.
12626 (_initialize_observer): Update.
12627 Don't include observer.inc.
12628 * Makefile.in (generated_files): Remove observer.h, observer.inc.
12629 (clean mostlyclean): Likewise.
12630 (observer.h, observer.inc): Remove targets.
12631 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12632 (COMMON_SFILES): Use observable.c, not observer.c.
12633 * .gitignore: Remove observer.h.
12634
12635 2018-03-18 Tom Tromey <tom@tromey.com>
12636
12637 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12638 gdb::def_vector.
12639 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12640
12641 2018-03-17 Tom Tromey <tom@tromey.com>
12642
12643 * auto-load.c (auto_load_objfile_script_1): Use std::string.
12644
12645 2018-03-17 Tom Tromey <tom@tromey.com>
12646
12647 * target.c (class scoped_target_fd): New.
12648 (target_fileio_close_cleanup): Remove.
12649 (target_fileio_read_alloc_1): Use scoped_target_fd.
12650
12651 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
12652
12653 * silent-rules.mk: New.
12654 * Makefile.in: Include silent-rules.mk
12655 (srcdir, VPATH, top_srcdir): Move up.
12656 (COMPILE): Add ECHO_CXX.
12657 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12658 (init.c): Add ECHO_INIT_C.
12659 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12660 (version.c): Add ECHO_GEN.
12661 (printcmd.o): Add ECHO_CXX.
12662 (target-float.o): Add ECHO_CXX.
12663 (ada-exp.o): Add ECHO_CXX.
12664 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12665 (insight$(EXEEXT)): Add ECHO_CXXLD.
12666 * gnulib/configure.ac: Add AM_SILENT_RULES.
12667 * gnulib/aclocal.m4: Re-generate.
12668 * gnulib/configure: Re-generate.
12669 * gnulib/import/Makefile.in: Re-generate.
12670
12671 2018-03-16 Tom Tromey <tom@tromey.com>
12672
12673 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12674 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12675 * utils.c (do_free_section_addr_info)
12676 (make_cleanup_free_section_addr_info): Remove.
12677 * symfile.h (struct other_sections): Add constructor.
12678 (struct section_addr_info): Remove.
12679 (section_addr_info): New typedef.
12680 (struct sym_fns) <sym_offsets>: Change type of parameter.
12681 (build_section_addr_info_from_objfile)
12682 (relative_addr_info_to_section_offsets, addr_info_make_relative)
12683 (default_symfile_offsets, symbol_file_add)
12684 (symbol_file_add_from_bfd)
12685 (build_section_addr_info_from_section_table): Update.
12686 (alloc_section_addr_info, free_section_addr_info): Don't declare.
12687 * symfile.c (alloc_section_addr_info): Remove.
12688 (build_section_addr_info_from_section_table): Change return type.
12689 Update.
12690 (build_section_addr_info_from_bfd)
12691 (build_section_addr_info_from_objfile): Likewise.
12692 (free_section_addr_info): Remove.
12693 (relative_addr_info_to_section_offsets): Change type of "addrs".
12694 (addrs_section_compar): Now a std::sort comparator.
12695 (addrs_section_sort): Change return type.
12696 (addr_info_make_relative): Change type of "addrs". Update.
12697 (default_symfile_offsets, syms_from_objfile_1)
12698 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12699 (symbol_file_add_separate): Update.
12700 (symbol_file_add): Change type of "addrs". Update.
12701 (add_symbol_file_command): Update. Remove cleanups.
12702 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
12703 cleanups.
12704 * symfile-debug.c (debug_sym_offsets): Change type of "info".
12705 * solib.c (solib_read_symbols): Update.
12706 * objfiles.c (objfile_relocate): Update. Remove cleanups.
12707 * machoread.c (macho_symfile_offsets): Update.
12708 * jit.c (jit_bfd_try_read_symtab): Update.
12709
12710 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
12711
12712 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12713 unittests/utils-selftests.c.
12714 * unittests/utils-selftests.c: New file.
12715
12716 2018-03-14 Tom Tromey <tom@tromey.com>
12717
12718 PR cli/14977:
12719 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12720 for NULL.
12721
12722 2018-03-14 Tom Tromey <tom@tromey.com>
12723
12724 PR cli/19918:
12725 * printcmd.c (printf_pointer): Allow "-" in format.
12726
12727 2018-03-14 Tom Tromey <tom@tromey.com>
12728
12729 * printcmd.c (_initialize_printcmd): Add usage to printf.
12730
12731 2018-03-14 Yao Qi <qiyao@sourceware.org>
12732
12733 * MAINTAINERS: Update my email address.
12734
12735 2018-03-13 Tom Tromey <tom@tromey.com>
12736
12737 * machoread.c (macho_check_dsym): Change filenamep to a
12738 std::string*.
12739 (macho_symfile_read): Update.
12740 * symfile.c (load_command): Use std::string.
12741
12742 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
12743
12744 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12745 to error message string.
12746 (riscv_register_name): Use xsnprintf instead of sprintf.
12747 (riscv_insn::fetch_instruction): Use gdb_assert instead of
12748 internal_error.
12749 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12750 error.
12751 (riscv_push_dummy_call): Likewise.
12752
12753 2018-03-12 Tom Tromey <tom@tromey.com>
12754
12755 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12756 Use gdb::byte_vector.
12757 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12758
12759 2018-03-12 Yao Qi <yao.qi@linaro.org>
12760
12761 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12762 parameter type to readable_regcache.
12763 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12764 the declaration.
12765
12766 2018-03-11 Tom Tromey <tom@tromey.com>
12767
12768 * dwarf2read.c (struct nextfield): Add initializers.
12769 (struct nextfnfield): Remove.
12770 (struct fnfieldlist): Add initializers. Remove "length" and
12771 "head", use std::vector.
12772 (struct decl_field_list): Remove.
12773 (struct field_info): Add initializers.
12774 <fields, baseclasses>: Now std::vector.
12775 <nbaseclasses, nfnfields, typedef_field_list_count,
12776 nested_types_list_count>: Remove.
12777 (dwarf2_add_field, dwarf2_add_type_defn)
12778 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12779 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12780 (process_structure_scope): Update.
12781
12782 2018-03-11 Tom Tromey <tom@tromey.com>
12783
12784 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12785 for use by std::sort.
12786 (build_type_psymtabs_1): Use std::vector.
12787
12788 2018-03-09 Eli Zaretskii <eliz@gnu.org>
12789
12790 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12791 and LIBMPFR in the printed configuration.
12792
12793 2018-03-08 Tom Tromey <tom@tromey.com>
12794
12795 * source.c (get_filename_and_charpos): Use scoped_fd.
12796 * nto-procfs.c (procfs_open_1): Use scoped_fd.
12797 (procfs_pidlist): Likewise.
12798 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12799 (iterate_over_mappings): Likewise.
12800
12801 2018-03-08 Tom Tromey <tom@tromey.com>
12802
12803 * infcall.c (struct call_return_meta_info)
12804 <stack_temporaries_enabled>: Remove.
12805 (get_call_return_value, call_function_by_hand_dummy): Update.
12806 * thread.c (disable_thread_stack_temporaries): Remove.
12807 (enable_thread_stack_temporaries): Remove.
12808 (thread_stack_temporaries_enabled_p): Return bool.
12809 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12810 (get_last_thread_stack_temporary): Update.
12811 * eval.c (evaluate_subexp): Update.
12812 * gdbthread.h (class enable_thread_stack_temporaries): Now a
12813 class, not a function.
12814 (value_ptr, value_vec): Remove typedefs.
12815 (class thread_info) <stack_temporaries_enabled>: Now bool.
12816 <stack_temporaries>: Now a std::vector.
12817 (thread_stack_temporaries_enabled_p)
12818 (value_in_thread_stack_temporaries): Return bool.
12819
12820 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
12821
12822 * remote.c (putpkt_binary): Fix omitted bytes reporting.
12823 (getpkt_or_notif_sane_1): Likewise.
12824
12825 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12826
12827 * build-id.c (build_id_to_debug_bfd): Use std::string.
12828
12829 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12830
12831 * build-id.c (find_separate_debug_file_by_buildid): Return
12832 std::string.
12833 * build-id.h (find_separate_debug_file_by_buildid): Return
12834 std::string.
12835 * coffread.c (coff_symfile_read): Adjust to std::string.
12836 * elfread.c (elf_symfile_read): Adjust to std::string.
12837 * symfile.c (separate_debug_file_exists): Change parameter to
12838 std::string.
12839 (find_separate_debug_file): Return std::string.
12840 (find_separate_debug_file_by_debuglink): Return std::string.
12841 * symfile.h (find_separate_debug_file_by_debuglink): Return
12842 std::string.
12843
12844 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12845
12846 * common/xml-utils.c (xml_escape_text): Move code to...
12847 (xml_escape_text_append): ... this new function.
12848 * common/xml-utils.h (xml_escape_text_append): New declaration.
12849 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12850 New function.
12851 (_initialize_xml_utils): register test_xml_escape_text_append as
12852 a selftest.
12853
12854 2018-03-07 Alan Hayward <alan.hayward@arm.com>
12855
12856 * defs.h: Remove MAX_REGISTER_SIZE.
12857 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12858 asserts.
12859 * python/py-unwind.c (pyuw_sniffer): Likewise.
12860
12861 2018-03-07 Tom Tromey <tom@tromey.com>
12862
12863 * linux-tdep.c (linux_info_proc): Update.
12864 * target.h (struct target_ops) <to_fileio_readlink>: Return
12865 optional<string>.
12866 (target_fileio_readlink): Return optional<string>.
12867 * remote.c (remote_hostio_readlink): Return optional<string>.
12868 * inf-child.c (inf_child_fileio_readlink): Return
12869 optional<string>.
12870 * target.c (target_fileio_readlink): Return optional<string>.
12871
12872 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
12873
12874 * regcache.c (cooked_read_test): Add riscv to the list of
12875 architectures that have a save_reggroup.
12876
12877 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
12878
12879 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12880 value is not a dynamic class object.
12881
12882 2018-03-06 Tom Tromey <tom@tromey.com>
12883
12884 * rust-exp.y: Formatting fixes.
12885
12886 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12887
12888 * riscv-tdep.c (riscv_register_name): Remove target description
12889 support.
12890 (riscv_gdbarch_init): Remove target description check.
12891
12892 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12893
12894 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12895 comment.
12896 * riscv-tdep.h: Likewise.
12897
12898 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12899
12900 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12901 (riscv_pseudo_register_write): Delete.
12902 (riscv_gdbarch_init): Remove all use of pseudo registers.
12903
12904 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12905
12906 * record-btrace.c (btrace_print_lines): Replace cleanup
12907 parameter with RAII equivalents.
12908 (btrace_insn_history): Replace cleanup with RAII equivalents.
12909 * ui-out.h (make_cleanup_ui_out_list_begin_end,
12910 make_cleanup_ui_out_tuple_begin_end): Remove.
12911 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12912 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12913 make_cleanup_ui_out_list_begin_end): Remove.
12914
12915 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12916
12917 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12918 parameter types to std::vector. Use bool.
12919 (record_btrace_wait): Replace VEC(tp_t) with
12920 std::vector<thread_info *>.
12921 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12922
12923 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12924
12925 * record-btrace.c (record_btrace_disable_callback): Remove.
12926 (struct scoped_btrace_disable): New.
12927 (record_btrace_open): Use scoped_btrace_disable.
12928
12929 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12930
12931 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12932 reading values from registers.
12933
12934 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12935
12936 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12937 where appropriate.
12938
12939 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12940
12941 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12942 change parameter type. Use GDB's print functions, and use
12943 core_addr_to_string where appropriate.
12944 (riscv_push_dummy_call): Use core_addr_to_string where
12945 appropriate, update call to riscv_print_arg_location, and reindent
12946 a few lines.
12947 (riscv_return_value): Update call to riscv_print_arg_location.
12948
12949 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12950 Tim Newsome <tim@sifive.com>
12951 Albert Ou <a0u@eecs.berkeley.edu>
12952 Darius Rad <darius@bluespec.com>
12953
12954 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12955 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12956 (ALLDEPFILES): Add riscv-tdep.c
12957 * configure.tgt: Add riscv support.
12958 * riscv-tdep.c: New file.
12959 * riscv-tdep.h: New file.
12960 * NEWS: Mention new target.
12961 * MAINTAINERS: Add entry for riscv.
12962
12963 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12964
12965 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12966 fields within aggregates.
12967
12968 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12969
12970 * record-btrace.c (btrace_print_lines): Change type of flags to
12971 gdb_disassembly_flags.
12972
12973 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12974
12975 * fbsd-nat.c: Include "inf-ptrace.h".
12976 (USE_SIGTRAP_SIGINFO): Conditionally define.
12977 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12978 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12979 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12980 function.
12981 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12982 Likewise.
12983 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12984 Likewise.
12985 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12986 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12987 "supports_stopped_by_hw_breakpoint" target methods.
12988
12989 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12990
12991 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12992 * fbsd-nat.c (debug_fbsd_nat): New variable.
12993 (show_fbsd_nat_debug): New function.
12994 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12995 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12996
12997 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12998
12999 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13000 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13001 prototype.
13002 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13003 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13004 method.
13005
13006 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13007
13008 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13009 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13010
13011 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13012
13013 * charset.c (struct charset_vector): New.
13014 (charsets): Change type to charset_vector.
13015 (find_charset_names): Adjust.
13016 (add_one): Adjust.
13017 (_initialize_charset): Adjust.
13018
13019 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13020
13021 * progspace.h (struct program_space) <deleted_solibs>: Change
13022 type to std::vector<std::string>.
13023 * progspace.c (clear_program_space_solib_cache): Adjust.
13024 * breakpoint.c (print_solib_event): Adjust.
13025 (check_status_catch_solib): Adjust.
13026 * solib.c (update_solib_list): Adjust.
13027 * ui-out.h (class ui_out) <field_string>: New overload.
13028 * ui-out.c (ui_out::field_string): New overload.
13029
13030 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13031
13032 * progspace.h (struct program_space): Add constructor and
13033 destructor, initialize fields.
13034 (add_program_space): Remove.
13035 * progspace.c (add_program_space): Rename to...
13036 (program_space::program_space): ... this.
13037 (release_program_space): Rename to...
13038 (program_space::~program_space): ... this.
13039 (delete_program_space): Use delete to delete program_space.
13040 (initialize_progspace): Use new to allocate program_space.
13041 * inferior.c (add_inferior_with_spaces): Likewise.
13042 (clone_inferior_command): Likewise.
13043 * infrun.c (follow_fork_inferior): Likewise.
13044 (handle_vfork_child_exec_or_exit): Likewise.
13045
13046 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13047
13048 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13049 (delim_string_to_char_ptr_vec): Return std::vector of
13050 gdb::unique_xmalloc_ptr.
13051 (dirnames_to_char_ptr_vec_append): Take std::vector of
13052 gdb::unique_xmalloc_ptr.
13053 (dirnames_to_char_ptr_vec): Return std::vector of
13054 gdb::unique_xmalloc_ptr.
13055 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13056 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13057 (delim_string_to_char_ptr_vec): Return an std::vector of
13058 gdb::unique_xmalloc_ptr, adjust the code.
13059 (dirnames_to_char_ptr_vec_append): Take an std::vector of
13060 gdb::unique_xmalloc_ptr, adjust the code.
13061 (dirnames_to_char_ptr_vec): Return an std::vector of
13062 gdb::unique_xmalloc_ptr, adjust the code.
13063 * auto-load.c (auto_load_safe_path_vec): Change type to
13064 std::vector of gdb::unique_xmalloc_ptr.
13065 (auto_load_expand_dir_vars): Return an std::vector of
13066 gdb::unique_xmalloc_ptr, adjust the code.
13067 (auto_load_safe_path_vec_update): Adjust.
13068 (filename_is_in_auto_load_safe_path_vec): Adjust.
13069 (auto_load_objfile_script_1): Adjust.
13070 * build-id.c (build_id_to_debug_bfd): Adjust.
13071 * linux-thread-db.c (thread_db_load_search): Adjust.
13072 * source.c (add_path): Adjust.
13073 (openp): Adjust.
13074 * symfile.c (find_separate_debug_file): Adjust.
13075 * utils.c (do_free_char_ptr_vec): Remove.
13076 (make_cleanup_free_char_ptr_vec): Remove.
13077
13078 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
13079
13080 PR gdb/22907
13081 * common/pathstuff.c: Conditionally include "<windows.h>".
13082
13083 2018-03-01 Georg Sauthoff <mail@georg.so>
13084
13085 PR gdb/22888
13086 * gcore.in: Quote variables and switch interpreter to bash.
13087
13088 2018-03-01 Tom Tromey <tom@tromey.com>
13089
13090 * dwarf2read.c (alloc_discriminant_info): Fix default_index
13091 assertion. Add assertion for discriminant_index.
13092 (quirk_rust_enum): Use correct base type name in univariant case.
13093
13094 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
13095
13096 * record.c (get_call_history_modifiers): Return a
13097 record_print_flags.
13098 (cmd_record_call_history): Adjust.
13099 * record-btrace.c (record_btrace_call_history): Adjust.
13100 (record_btrace_call_history_range): Adjust.
13101 (record_btrace_call_history_from): Adjust.
13102 * target-debug.h (target_debug_print_record_print_flags): New.
13103 * target-delegates.c: Re-generate.
13104 * target.c (target_call_history): Change flags type.
13105 (target_call_history_from): Likewise.
13106 (target_call_history_range): Likewise.
13107 * target.h (struct target_ops) <target_call_history>: Likewise.
13108 (target_call_history_from): Likewise.
13109 (target_call_history_range): Likewise.
13110
13111 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
13112 Simon Marchi <simon.marchi@polymtl.ca>
13113
13114 * common/common-utils.c: Include "sys/stat.h".
13115 (is_regular_file): Move here from "source.c"; change return
13116 type to "bool".
13117 * common/common-utils.h (is_regular_file): New prototype.
13118 * common/pathstuff.c (contains_dir_separator): New function.
13119 * common/pathstuff.h (contains_dir_separator): New prototype.
13120 * source.c: Don't include "sys/stat.h".
13121 (is_regular_file): Move to "common/common-utils.c".
13122
13123 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
13124
13125 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13126 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13127 * auto-load.c: Include "common/pathstuff.h".
13128 * common/common-def.h (current_directory): Move here.
13129 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13130 function.
13131 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13132 prototype.
13133 * common/pathstuff.c: New file.
13134 * common/pathstuff.h: New file.
13135 * compile/compile.c: Include "common/pathstuff.h".
13136 * defs.h (current_directory): Move to "common/common-defs.h".
13137 * dwarf2read.c: Include "common/pathstuff.h".
13138 * exec.c: Likewise.
13139 * guile/scm-safe-call.c: Likewise.
13140 * linux-thread-db.c: Likewise.
13141 * main.c: Likewise.
13142 * nto-tdep.c: Likewise.
13143 * objfiles.c: Likewise.
13144 * source.c: Likewise.
13145 * symtab.c: Likewise.
13146 * utils.c: Include "common/pathstuff.h".
13147 (gdb_realpath): Move to "common/pathstuff.c".
13148 (gdb_realpath_keepfile): Likewise.
13149 (gdb_abspath): Likewise.
13150 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13151 (gdb_realpath_keepfile): Likewise.
13152 (gdb_abspath): Likewise.
13153
13154 2018-02-28 John Baldwin <jhb@FreeBSD.org>
13155
13156 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13157 wildcard process pid for super_resume for kernels with a
13158 specific bug.
13159
13160 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
13161
13162 * compile/compile.c (get_args): Add additional comments
13163 explaining function.
13164
13165 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
13166 Tom Tromey <tom@tromey.com>
13167
13168 * target.h (memory_write_request_s): Remove typedef. Don't define
13169 VEC.
13170 (target_write_memory_blocks): Change argument to std::vector.
13171 (struct memory_write_request): Add constructor.
13172 * target-memory.c (compare_block_starting_address): Return bool.
13173 Change argument types.
13174 (claim_memory): Change arguments to use std::vector.
13175 (split_regular_and_flash_blocks, blocks_to_erase)
13176 (compute_garbled_blocks): Likewise.
13177 (cleanup_request_data, cleanup_write_requests_vector): Remove.
13178 (target_write_memory_blocks): Change argument to std::vector.
13179 * symfile.c (struct load_section_data): Add constructor and
13180 destructor. Use std::vector for "requests".
13181 (struct load_progress_data): Add initializers.
13182 (load_section_callback): Update. Use "new".
13183 (clear_memory_write_data): Remove.
13184 (generic_load): Update.
13185
13186 2018-02-27 Alan Hayward <alan.hayward@arm.com>
13187
13188 * arch/aarch64.h: Use common/tdesc.h.
13189
13190 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13191
13192 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13193 architecture with a 64-bit ABI.
13194
13195 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13196
13197 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13198 ahead of target description loading.
13199
13200 2018-02-26 Tom Tromey <tom@tromey.com>
13201
13202 * stack.c (backtrace_command_1): Update.
13203 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13204 of "flags".
13205 * python/py-framefilter.c (py_print_frame)
13206 (gdbpy_apply_frame_filter): Change type of "flags".
13207 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13208 of "flags".
13209 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13210 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13211 * extension.h (enum frame_filter_flag): Rename from
13212 frame_filter_flags.
13213 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13214 (apply_ext_lang_frame_filter): Change type of "flags".
13215 * extension.c (apply_ext_lang_frame_filter): Change type of
13216 "flags".
13217 * extension-priv.h (struct extension_language_ops)
13218 <apply_frame_filter>: Change type of "flags".
13219
13220 2018-02-26 Tom Tromey <tom@tromey.com>
13221
13222 PR python/16497:
13223 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
13224 off-by-one in py_end computation.
13225 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13226 PRINT_MORE_FRAMES.
13227 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13228 constant.
13229
13230 2018-02-26 Tom Tromey <tom@tromey.com>
13231
13232 * dwarf2read.c (struct variant_field): New.
13233 (struct nextfield) <variant>: New field.
13234 (dwarf2_add_field): Handle DW_TAG_variant_part.
13235 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13236 discriminated union.
13237 (read_structure_type): Handle DW_TAG_variant_part.
13238 (handle_struct_member_die): New function, extracted from
13239 process_structure_scope. Handle DW_TAG_variant.
13240 (process_structure_scope): Handle discriminated unions. Call
13241 handle_struct_member_die.
13242
13243 2018-02-26 Tom Tromey <tom@tromey.com>
13244
13245 * rust-lang.h (rust_last_path_segment): Declare.
13246 * rust-lang.c (rust_last_path_segment): Now public. Change
13247 contract.
13248 (struct disr_info): Remove.
13249 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13250 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13251 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13252 (rust_enum_p, rust_enum_variant): New function.
13253 (rust_underscore_fields): Remove "offset" parameter.
13254 (rust_print_enum): New function.
13255 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13256 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13257 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
13258 enums.
13259 (rust_internal_print_type): New function, from rust_print_type.
13260 Remove enum code.
13261 (rust_print_type): Call rust_internal_print_type.
13262 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13263 Update enum handling.
13264 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13265 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13266 (rust_union_quirks): New functions.
13267 (process_full_comp_unit, process_full_type_unit): Call
13268 rust_union_quirks.
13269 (process_structure_scope): Update rust_unions if necessary.
13270
13271 2018-02-26 Tom Tromey <tom@tromey.com>
13272
13273 * value.h (value_union_variant): Declare.
13274 * valops.c (value_union_variant): New function.
13275 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13276 (struct discriminant_info): New.
13277 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13278 enumerator.
13279 (struct main_type) <flag_discriminated_union>: New field.
13280
13281 2018-02-26 Tom Tromey <tom@tromey.com>
13282
13283 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13284 unittests/unpack-selftests.c.
13285 * unittests/unpack-selftests.c: New file.
13286 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13287
13288 2018-02-26 Yao Qi <yao.qi@linaro.org>
13289
13290 * dwarf2read.c (struct partial_die_info) <read>: New method.
13291 (read_partial_die): Remove the declaration.
13292 (load_partial_dies): Update.
13293 (partial_die_info::partial_die_info):
13294 (read_partial_die): Change it to partial_die_info::read.
13295
13296 2018-02-26 Yao Qi <yao.qi@linaro.org>
13297
13298 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13299 (fixup_partial_die): Remove declaration.
13300 (scan_partial_symbols): Update.
13301 (partial_die_parent_scope): Likewise.
13302 (partial_die_full_name): Likewise.
13303 (fixup_partial_die): Change it to partial_die_info::fixup.
13304
13305 2018-02-26 Yao Qi <yao.qi@linaro.org>
13306
13307 * dwarf2read.c (read_partial_die): Update the declaration.
13308 (load_partial_dies): Caller update.
13309 (read_partial_die): Remove one argument abbrev_len.
13310
13311 2018-02-26 Yao Qi <yao.qi@linaro.org>
13312
13313 * dwarf2read.c (struct partial_die_info): Add ctor, delete
13314 assignment operator.
13315 (load_partial_dies): Use ctor and copy ctor.
13316 (read_partial_die): Update.
13317 (dwarf2_cu::find_partial_die): Use ctor.
13318
13319 2018-02-26 Yao Qi <yao.qi@linaro.org>
13320
13321 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13322 (find_partial_die_in_comp_unit): Change it to
13323 dwarf2_cu::find_partial_die.
13324 (find_partial_die): Update.
13325
13326 2018-02-26 Yao Qi <yao.qi@linaro.org>
13327
13328 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13329 is NULL.
13330
13331 2018-02-26 Yao Qi <yao.qi@linaro.org>
13332
13333 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13334
13335 2018-02-26 Alan Hayward <alan.hayward@arm.com>
13336
13337 * arch/amd64.h: Use common/tdesc.h.
13338 * arch/i386.c: Likewise.
13339 * arch/i386.h: Likewise.
13340 * arch/tic6x.c: Likewise.
13341 * arch/tdesc.h: Move file from here...
13342 * common/tdesc.h: ...to here.
13343 * features/aarch64-core.c: Regenerate.
13344 * features/aarch64-fpu.c: Regenerate.
13345 * features/i386/32bit-avx.c: Regenerate.
13346 * features/i386/32bit-avx512.c: Regenerate.
13347 * features/i386/32bit-core.c: Regenerate.
13348 * features/i386/32bit-linux.c: Regenerate.
13349 * features/i386/32bit-mpx.c: Regenerate.
13350 * features/i386/32bit-pkeys.c: Regenerate.
13351 * features/i386/32bit-sse.c: Regenerate.
13352 * features/i386/64bit-avx.c: Regenerate.
13353 * features/i386/64bit-avx512.c: Regenerate.
13354 * features/i386/64bit-core.c: Regenerate.
13355 * features/i386/64bit-linux.c: Regenerate.
13356 * features/i386/64bit-mpx.c: Regenerate.
13357 * features/i386/64bit-pkeys.c: Regenerate.
13358 * features/i386/64bit-segments.c: Regenerate.
13359 * features/i386/64bit-sse.c: Regenerate.
13360 * features/i386/x32-core.c: Regenerate.
13361 * features/tic6x-c6xp.c: Regenerate.
13362 * features/tic6x-core.c: Regenerate.
13363 * features/tic6x-gp.c: Regenerate.
13364 * target-descriptions.c: Use common/tdesc.h.
13365 * target-descriptions.h: Likewise.
13366
13367 2018-02-24 Tom Tromey <tom@tromey.com>
13368
13369 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13370 (try_thread_db_load_from_dir, thread_db_load_search): Use
13371 std::string.
13372 (info_auto_load_libthread_db_compare): Return bool. Change
13373 argument types.
13374 (info_auto_load_libthread_db): Use std::vector, std::string.
13375 Remove cleanups.
13376
13377 2018-02-24 Tom Tromey <tom@tromey.com>
13378
13379 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13380 std::string.
13381 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13382 std::string*.
13383 * gdbarch.c: Rebuild.
13384 * gdbarch.h: Rebuild.
13385 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13386 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13387 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13388 std::string*.
13389
13390 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
13391
13392 * gdbtypes.h (sect_offset): Change type to uint64_t.
13393 (sect_offset_str): New function.
13394 * dwarf2read.c (create_addrmap_from_aranges): Use
13395 sect_offset_str.
13396 (error_check_comp_unit_head): Likewise.
13397 (create_debug_type_hash_table): Likewise.
13398 (read_cutu_die_from_dwo): Likewise.
13399 (init_cutu_and_read_dies): Likewise.
13400 (init_cutu_and_read_dies_no_follow): Likewise.
13401 (process_psymtab_comp_unit_reader): Likewise.
13402 (partial_die_parent_scope): Likewise.
13403 (peek_die_abbrev): Likewise.
13404 (process_queue): Likewise.
13405 (dwarf2_physname): Likewise.
13406 (read_namespace_alias): Likewise.
13407 (read_import_statement): Likewise.
13408 (create_dwo_cu_reader): Likewise.
13409 (create_cus_hash_table): Likewise.
13410 (lookup_dwo_cutu): Likewise.
13411 (inherit_abstract_dies): Likewise.
13412 (read_func_scope): Likewise.
13413 (read_call_site_scope): Likewise.
13414 (dwarf2_add_member_fn): Likewise.
13415 (read_common_block): Likewise.
13416 (read_module_type): Likewise.
13417 (read_typedef): Likewise.
13418 (read_subrange_type): Likewise.
13419 (load_partial_dies): Likewise.
13420 (read_partial_die): Likewise.
13421 (find_partial_die): Likewise.
13422 (read_str_index): Likewise.
13423 (dwarf2_string_attr): Likewise.
13424 (build_error_marker_type): Likewise.
13425 (lookup_die_type): Likewise.
13426 (dump_die_shallow): Likewise.
13427 (follow_die_ref): Likewise.
13428 (dwarf2_fetch_die_loc_sect_off): Likewise.
13429 (dwarf2_fetch_constant_bytes): Likewise.
13430 (follow_die_sig): Likewise.
13431 (get_signatured_type): Likewise.
13432 (get_DW_AT_signature_type): Likewise.
13433 (dwarf2_find_containing_comp_unit): Likewise.
13434 (set_die_type): Likewise.
13435
13436 2018-02-21 John Baldwin <jhb@FreeBSD.org>
13437
13438 * arch/aarch64.c: Include "common-defs.h".
13439 * arch/amd64.c: Likewise.
13440 * arch/i386.c: Likewise.
13441
13442 2018-02-21 Tom Tromey <tom@tromey.com>
13443
13444 * value.h: (extract_field_op): Update.
13445 * eval.c (extract_field_op): Return a const char *.
13446 * expression.h (parse_expression_for_completion): Update.
13447 * completer.c (complete_expression): Update.
13448 (add_struct_fields): Make fieldname const.
13449 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13450 (mark_completion_tag, parse_exp_in_context_1): Update.
13451 (parse_expression_for_completion): Change "name" to
13452 unique_xmalloc_ptr*.
13453
13454 2018-02-21 Tom Tromey <tom@tromey.com>
13455
13456 * infcall.c (call_function_by_hand_dummy): Use std::vector.
13457
13458 2018-02-21 Yao Qi <yao.qi@linaro.org>
13459
13460 * avr-tdep.c (avr_read_pc): Change parameter type to
13461 readable_regcache.
13462 * gdbarch.sh (read_pc): Likewise.
13463 * gdbarch.c: Re-generated.
13464 * gdbarch.h: Re-generated.
13465 * hppa-tdep.c (hppa_read_pc): Change parameter type to
13466 readable_regcache.
13467 * ia64-tdep.c (ia64_read_pc): Likewise.
13468 * mips-tdep.c (mips_read_pc): Likewise.
13469 * spu-tdep.c (spu_read_pc): Likewise.
13470
13471 2018-02-21 Yao Qi <yao.qi@linaro.org>
13472
13473 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13474 * regcache-dump.c: New file.
13475 * regcache.c: Move register_dump to regcache-dump.c.
13476 (maintenance_print_registers): Likewise.
13477 (maintenance_print_raw_registers): Likewise.
13478 (maintenance_print_cooked_registers): Likewise.
13479 (maintenance_print_register_groups): Likewise.
13480 (maintenance_print_remote_registers): Likewise.
13481 (_initialize_regcache): Likewise.
13482 * regcache.h (register_dump): Moved from regcache.c.
13483
13484 2018-02-21 Yao Qi <yao.qi@linaro.org>
13485
13486 * regcache.c (regcache::regcache): Update.
13487 (regcache::invalidate): Move it to detached_regcache::invalidate.
13488 (get_thread_arch_aspace_regcache): Update.
13489 (regcache::raw_update): Update.
13490 (regcache::cooked_read): Remove some code.
13491 (regcache::cooked_read_value): Likewise.
13492 (regcache::raw_write): Remove assert on m_readonly_p.
13493 (regcache::raw_supply_integer): Move it to
13494 detached_regcache::raw_supply_integer.
13495 (regcache::raw_supply_zeroed): Likewise.
13496 * regcache.h (detached_regcache) <raw_supply_integer>: New
13497 declaration.
13498 <raw_supply_zeroed, invalidate>: Likewise.
13499 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13500 <invalidate>: Likewise.
13501 <m_readonly_p>: Removed.
13502
13503 2018-02-21 Yao Qi <yao.qi@linaro.org>
13504
13505 * infcmd.c (get_return_value): Let stop_regs point to
13506 get_current_regcache.
13507 * regcache.c (regcache::regcache): Remove.
13508 (register_dump_reg_buffer): New class.
13509 (regcache_print): Adjust.
13510 * regcache.h (regcache): Remove constructors.
13511
13512 2018-02-21 Yao Qi <yao.qi@linaro.org>
13513
13514 * regcache.c (class register_dump): New class.
13515 (register_dump_regcache, register_dump_none): New class.
13516 (register_dump_remote, register_dump_groups): New class.
13517 (regcache_print): Update.
13518 * regcache.h (regcache_dump_what): Move it to regcache.c.
13519 (regcache) <dump>: Remove.
13520
13521 2018-02-21 Yao Qi <yao.qi@linaro.org>
13522
13523 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13524 reg_buffer_rw *.
13525 (jit_unwind_reg_set_impl): Call raw_supply.
13526 (jit_frame_sniffer): Use reg_buffer_rw.
13527 * record-full.c (record_full_core_regbuf): Change its type.
13528 (record_full_core_open_1): Use reg_buffer_rw.
13529 (record_full_close): Likewise.
13530 (record_full_core_fetch_registers): Use regcache->raw_supply.
13531 (record_full_core_store_registers): Likewise.
13532 * regcache.c (regcache::get_register_status): Move it to
13533 reg_buffer.
13534 (regcache_raw_set_cached_value): Remove.
13535 (regcache::raw_set_cached_value): Remove.
13536 (regcache::raw_write): Call raw_supply.
13537 (regcache::raw_supply): Move it to reg_buffer_rw.
13538 * regcache.h (regcache_raw_set_cached_value): Remove.
13539 (reg_buffer_rw): New class.
13540
13541 2018-02-21 Yao Qi <yao.qi@linaro.org>
13542
13543 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13544 readonly_detached_regcache.
13545 (dummy_frame_prev_register): Use regcache->cooked_read.
13546 * frame.c (frame_save_as_regcache): Change return type.
13547 (frame_pop): Update.
13548 * frame.h (frame_save_as_regcache): Update declaration.
13549 * inferior.h (get_infcall_suspend_state_regcache): Update
13550 declaration.
13551 * infrun.c (infcall_suspend_state) <registers>: use
13552 readonly_detached_regcache.
13553 (save_infcall_suspend_state): Don't use regcache_dup.
13554 (get_infcall_suspend_state_regcache): Change return type.
13555 * linux-fork.c (struct fork_info) <savedregs>: Change to
13556 readonly_detached_regcache.
13557 <pc>: New field.
13558 (fork_save_infrun_state): Don't use regcache_dup.
13559 (info_checkpoints_command): Adjust.
13560 * mi/mi-main.c (register_changed_p): Update declaration.
13561 (mi_cmd_data_list_changed_registers): Use
13562 readonly_detached_regcache.
13563 (register_changed_p): Change parameter type to
13564 readonly_detached_regcache.
13565 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13566 readonly_detached_regcache.
13567 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13568 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13569 New.
13570 (regcache::save): Move it to reg_buffer.
13571 (regcache::restore): Change parameter type.
13572 (regcache_dup): Remove.
13573 * regcache.h (reg_buffer) <save>: New method.
13574 (readonly_detached_regcache): New class.
13575 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13576 readonly_detached_regcache.
13577 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13578
13579 2018-02-21 Yao Qi <yao.qi@linaro.org>
13580
13581 * frame.c (frame_save_as_regcache): Use regcache method save.
13582 (frame_pop): Use regcache method restore.
13583 * infrun.c (restore_infcall_suspend_state): Likewise.
13584 * linux-fork.c (fork_load_infrun_state): Likewise.
13585 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13586 save.
13587 * regcache.c (regcache_save): Remove.
13588 (regcache::restore): More asserts.
13589 (regcache_cpy): Remove.
13590 * regcache.h (regcache_save): Remove the declaration.
13591 (regcache::restore): Move from private to public.
13592 Remove the friend declaration of regcache_cpy.
13593 (regcache_cpy): Remove declaration.
13594
13595 2018-02-21 Yao Qi <yao.qi@linaro.org>
13596
13597 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13598 parameter type to 'readable_regcache *'.
13599 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13600 * arm-tdep.c (arm_neon_quad_read): Likewise.
13601 (arm_pseudo_read): Likewise.
13602 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13603 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13604 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13605 * gdbarch.c: Re-generated.
13606 * gdbarch.h: Re-generated.
13607 * gdbarch.sh (pseudo_register_read): Change parameter type to
13608 'readable_regcache *'.
13609 (pseudo_register_read_value): Likewise.
13610 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13611 (h8300_pseudo_register_read): Likewise.
13612 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13613 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13614 (i386_pseudo_register_read_into_value): Likewise.
13615 (i386_pseudo_register_read_value): Likewise.
13616 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13617 declaration.
13618 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13619 * m32c-tdep.c (m32c_raw_read): Likewise.
13620 (m32c_read_flg): Likewise.
13621 (m32c_banked_register): Likewise.
13622 (m32c_banked_read): Likewise.
13623 (m32c_sb_read): Likewise.
13624 (m32c_part_read): Likewise.
13625 (m32c_cat_read): Likewise.
13626 (m32c_r3r2r1r0_read): Likewise.
13627 (m32c_pseudo_register_read): Likewise.
13628 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13629 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13630 (mep_pseudo_cr64_read): Likewise.
13631 (mep_pseudo_register_read): Likewise.
13632 * mips-tdep.c (mips_pseudo_register_read): Likewise.
13633 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13634 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13635 * regcache.c (regcache::raw_read): Move it to readable_regcache.
13636 (regcache::cooked_read): Likewise.
13637 (regcache::cooked_read_value): Likewise.
13638 (regcache_cooked_read_signed):
13639 (regcache::cooked_read): Likewise.
13640 * regcache.h (readable_regcache): New class.
13641 (regcache): Inherit readable_regcache. Move some methods to
13642 readable_regcache.
13643 * rl78-tdep.c (rl78_pseudo_register_read): Change
13644 parameter type to 'readable_regcache *'.
13645 * rs6000-tdep.c (do_regcache_raw_read): Remove.
13646 (e500_pseudo_register_read): Change parameter type to
13647 'readable_regcache *'.
13648 (dfp_pseudo_register_read): Likewise.
13649 (vsx_pseudo_register_read): Likewise.
13650 (efpr_pseudo_register_read): Likewise.
13651 * s390-tdep.c (s390_pseudo_register_read): Likewise.
13652 * sh-tdep.c (sh_pseudo_register_read): Likewise.
13653 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13654 (sh64_pseudo_register_read): Likewise.
13655 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13656 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13657 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13658 (spu_pseudo_register_read): Likewise.
13659 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13660 (xtensa_pseudo_register_read): Likewise.
13661
13662 2018-02-21 Yao Qi <yao.qi@linaro.org>
13663
13664 * regcache.c (regcache::regcache): Call reg_buffer ctor.
13665 (regcache::arch): Move it to reg_buffer::arch.
13666 (regcache::register_buffer): Likewise.
13667 (regcache::assert_regnum): Likewise.
13668 (regcache::num_raw_registers): Likewise.
13669 * regcache.h (reg_buffer): New class.
13670 (regcache): Inherit reg_buffer.
13671
13672 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
13673
13674 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13675 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13676
13677 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
13678
13679 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13680
13681 2018-02-19 Alan Hayward <alan.hayward@arm.com>
13682
13683 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13684 (SFILES): Remove common/*.c files.
13685 (COMMON_OBS): Remove some *.o files built from common/*.c files.
13686 * common/common.host: Add common reference.
13687 * configure.ac: Likewise.
13688 * configure: Regenerate.
13689
13690 2018-02-16 Yao Qi <yao.qi@linaro.org>
13691
13692 * block.c (block_namespace_info): Inherit allocate_on_obstack.
13693 (block_initialize_namespace): Use new.
13694 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13695 (dwarf2_free_objfile): Use delete.
13696 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13697 (copy_type_recursive): Use new.
13698 * gdb_obstack.h (allocate_on_obstack): New.
13699
13700 2018-02-15 Yao Qi <yao.qi@linaro.org>
13701
13702 PR gdb/22849
13703 * inferior.c (exit_inferior_1): Reset inf->control.
13704
13705 2018-02-15 Joel Brobecker <brobecker@adacore.com>
13706
13707 * ada-lang.c (ada_to_fixed_value_create): Delete advance
13708 declaration.
13709
13710 2018-02-14 Pedro Alves <palves@redhat.com>
13711
13712 * frame-unwind.c (frame_unwind_try_unwinder): Always call
13713 frame_cleanup_after_sniffer on exception.
13714
13715 2018-02-14 Tom Tromey <tom@tromey.com>
13716
13717 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13718 const.
13719 (solib_bfd_open): Make pathname const.
13720 * solib.c (solib_bfd_open): Make pathname const.
13721 * solib-spu.c (spu_bfd_fopen): Make name const.
13722 (spu_bfd_open): Make pathname const.
13723 * solib-darwin.c (darwin_bfd_open): Make pathname const.
13724 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13725
13726 2018-02-14 Tom Tromey <tom@tromey.com>
13727
13728 * symfile.c (symfile_bfd_open): Update.
13729 * source.h (openp, source_full_path_of, find_and_open_source):
13730 Change argument type to unique_xmalloc_ptr.
13731 * source.c (openp): Take a unique_xmalloc_ptr.
13732 (source_full_path_of, find_and_open_source): Likewise.
13733 (open_source_file, symtab_to_fullname): Update.
13734 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13735 unique_xmalloc_ptr.
13736 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13737 (exec_file_find): Update.
13738 * psymtab.c (psymtab_to_fullname): Update.
13739 * nto-tdep.h (nto_find_and_open_solib): Update.
13740 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13741 unique_xmalloc_ptr.
13742 * exec.c (exec_file_attach): Update.
13743 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13744 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13745
13746 2018-02-14 Tom Tromey <tom@tromey.com>
13747
13748 * solib.c: Include source.h.
13749 * nto-tdep.c: Include source.h.
13750 * mi/mi-cmd-env.c: Include source.h.
13751 * infcmd.c: Include source.h.
13752 * exec.c: Include source.h.
13753 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13754 (add_path, directory_switch, source_path, init_source_path): Move
13755 declarations...
13756 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13757 (add_path, directory_switch, source_path, init_source_path):
13758 ...here.
13759
13760 2018-02-14 Tom Tromey <tom@tromey.com>
13761
13762 * solist.h (exec_file_find, solib_find): Return
13763 unique_xmalloc_ptr.
13764 (solib_bfd_fopen): Take a const char *.
13765 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13766 (exec_file_find, solib_find): Likewise.
13767 (solib_bfd_fopen): Do not take ownership of "pathname".
13768 (solib_bfd_open): Use unique_xmalloc_ptr.
13769 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13770 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13771 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13772 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13773
13774 2018-02-14 Joel Brobecker <brobecker@adacore.com>
13775
13776 * ada-lang.c (name_match_type_from_name): Remove reference to
13777 ada_name_for_lookup in function's documentation.
13778 * ada-lang.h (ada_name_for_lookup): Delete declaration.
13779
13780 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13781
13782 * defs.h (enum openp_flags): New enum.
13783 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13784 Move to enum openp_flags.
13785 (openp_flags): New enum flags.
13786 (openp): Change parameter type to openp_flags.
13787 * source.c (openp): Change parameter type to openp_flags.
13788 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13789 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13790
13791 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13792
13793 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13794 per-command.
13795
13796 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
13797
13798 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13799 into...
13800 (class dwarf2_queue_guard): ...the destructor of this new class.
13801 (dw2_do_instantiate_symtab): Create instance of the new class
13802 dwarf2_queue_guard, remove cleanup.
13803
13804 2018-02-09 Tom Tromey <tom@tromey.com>
13805
13806 * source.c (find_source_lines): Don't reference past the end of
13807 the vector.
13808
13809 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13810
13811 * remote.c (remote_btrace_maybe_reopen): Change error message.
13812 * btrace.c (btrace_enable): Likewise.
13813 (parse_xml_btrace): Likewise.
13814 (parse_xml_btrace_conf): Likewise.
13815
13816 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13817
13818 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13819 (linux_enable_pt, linux_enable_bts): Call
13820 diagnose_perf_event_open_fail.
13821
13822 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13823
13824 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13825 Remove parameter and change return type. Update callers. Move it.
13826 (linux_enable_bts, linux_enable_pt): Improve error message.
13827 (linux_enable_pt): Remove zero buffer size check.
13828 (linux_enable_btrace): Improve error messages. Remove NULL return
13829 check.
13830
13831 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13832
13833 * btrace.c (btrace_enable): Remove target_supports_btrace call.
13834 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13835 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13836 (linux_supports_pt, linux_supports_btrace): Remove.
13837 (linux_enable_bts): Call cpu_supports_bts.
13838 * nat/linux-btrace.h (linux_supports_btrace): Remove.
13839 * remote.c (remote_supports_btrace): Remove.
13840 (init_remote_ops): Remove remote_supports_btrace.
13841 * target-delegates.c: Regenerated.
13842 * target.c (target_supports_btrace): Remove.
13843 * target.h (target_ops) <to_supports_btrace>: Remove
13844 (target_supports_btrace): Remove.
13845 * x86-linux-nat.c (x86_linux_create_target): Remove
13846 linux_supports_btrace.
13847
13848 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13849
13850 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13851 btrace failed.
13852 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13853 exception and use message in own exception.
13854
13855 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13856
13857 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13858 (perf_event_pt_event_type): Use gdb_file_up.
13859 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13860 scoped_fd, and scoped_mmap.
13861
13862 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13863
13864 * common/scoped_mmap.h: New.
13865 * unittests/scoped_mmap-selftest.c: New.
13866 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13867 unittests/scoped_mmap-selftest.c.
13868
13869 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13870
13871 * common/scoped_fd.h: New.
13872 * unittests/scoped_fd-selftest.c: New.
13873 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13874 unittests/scoped_fd-selftest.c.
13875
13876 2018-02-09 Tom Tromey <tom@tromey.com>
13877
13878 * auto-load.c (auto_load_section_scripts): Use
13879 gdb::unique_xmalloc_ptr.
13880
13881 2018-02-09 Tom Tromey <tom@tromey.com>
13882
13883 * auto-load.c (execute_script_contents): Use std::string.
13884
13885 2018-02-09 Joel Brobecker <brobecker@adacore.com>
13886
13887 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13888 Python function, rather than a new command.
13889
13890 2018-02-08 Tom Tromey <tom@tromey.com>
13891
13892 * solib.c (solib_find_1): Use std::string.
13893 (solib_bfd_fopen): Use unique_xmalloc_ptr.
13894
13895 2018-02-08 Tom Tromey <tom@tromey.com>
13896
13897 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13898
13899 2018-02-08 Tom Tromey <tom@tromey.com>
13900
13901 * source.c (find_source_lines): Use gdb::def_vector.
13902
13903 2018-02-08 Tom Tromey <tom@tromey.com>
13904
13905 * macrocmd.c (struct temporary_macro_definition): New.
13906 (macro_define_command): Use temporary_macro_definition. Remove
13907 cleanups.
13908 (free_macro_definition_ptr): Remove.
13909
13910 2018-02-08 Tom Tromey <tom@tromey.com>
13911
13912 * macroexp.c (maybe_expand): Use std::string.
13913
13914 2018-02-08 Tom Tromey <tom@tromey.com>
13915
13916 * macroexp.c (struct macro_buffer): Add initializers for some
13917 members.
13918 (init_buffer, init_shared_buffer, free_buffer)
13919 (free_buffer_return_text): Remove.
13920 (macro_buffer): New constructors.
13921 (~macro_buffer): New destructor.
13922 (macro_buffer::set_shared): New method.
13923 (macro_buffer::resize_buffer, macro_buffer::appendc)
13924 (macro_buffer::appendmem): Now methods, not free functions.
13925 (set_token, append_tokens_without_splicing, stringify)
13926 (macro_stringify): Update.
13927 (gather_arguments): Change return type. Remove argc_p argument,
13928 add args_ptr argument. Use std::vector.
13929 (substitute_args): Remove argc argument. Accept std::vector.
13930 (expand): Update. Use std::vector.
13931 (scan, macro_expand, macro_expand_next): Update.
13932
13933 2018-02-08 Tom Tromey <tom@tromey.com>
13934
13935 * symtab.c (default_collect_symbol_completion_matches_break_on):
13936 Use unique_xmalloc_ptr.
13937 * macroscope.h: (sal_macro_scope, user_macro_scope)
13938 (default_macro_scope): Return unique_xmalloc_ptr.
13939 * macroscope.c (sal_macro_scope, user_macro_scope)
13940 (default_macro_scope): Return unique_xmalloc_ptr.
13941 * macroexp.h (macro_expand, macro_expand_once): Return
13942 unique_xmalloc_ptr.
13943 * macroexp.c (macro_expand, macro_expand_once): Return
13944 unique_xmalloc_ptr.
13945 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13946 (info_macro_command, info_macros_command): Use
13947 unique_xmalloc_ptr.
13948 * compile/compile-c-support.c (write_macro_definitions): Use
13949 unique_xmalloc_ptr.
13950 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13951
13952 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13953
13954 * value.c (value_static_field): Assign field type instead of
13955 containing type when returning an optimized out value.
13956
13957 2018-02-06 Yao Qi <yao.qi@linaro.org>
13958
13959 * ft32-tdep.c (ft32_read_pc): Remove.
13960 (ft32_write_pc): Remove.
13961 (ft32_gdbarch_init): Update.
13962 * m32r-tdep.c (m32r_read_pc): Remove.
13963 (m32r_gdbarch_init): Update.
13964 * mep-tdep.c (mep_read_pc): Remove.
13965 (mep_gdbarch_init): Update.
13966 * microblaze-tdep.c (microblaze_write_pc): Remove.
13967 (microblaze_gdbarch_init): Update.
13968 * mn10300-tdep.c (mn10300_read_pc): Remove.
13969 (mn10300_write_pc): Remove.
13970 (mn10300_gdbarch_init): Update.
13971 * moxie-tdep.c (moxie_read_pc): Remove.
13972 (moxie_write_pc): Remove.
13973 (moxie_gdbarch_init): Update.
13974
13975 2018-02-06 Yao Qi <yao.qi@linaro.org>
13976
13977 * expprint.c (print_subexp_standard): Handle
13978 OP_F77_UNDETERMINED_ARGLIST.
13979 (dump_subexp_body_standard): Likewise.
13980
13981 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13982
13983 * target-descriptions.c (tdesc_element_visitor) Add empty
13984 implementations.
13985 (tdesc_type): Move make_gdb_type from here.
13986 (tdesc_type_builtin): Likewise.
13987 (tdesc_type_vector): Likewise.
13988 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13989 (make_gdb_type_struct): Move from tdesc_type_with_fields.
13990 (make_gdb_type_union): Likewise.
13991 (make_gdb_type_flags): Likewise.
13992 (make_gdb_type_enum): Likewise.
13993 (make_gdb_type): New function.
13994 (tdesc_register_type): Use static make_gdb_type.
13995
13996 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
13997
13998 * infcmd.c (default_print_one_register_info): Align natural-format
13999 column values consistently one under another.
14000 (pad_to_column): New function.
14001
14002 2018-02-05 Joel Brobecker <brobecker@adacore.com>
14003
14004 * dwarf2read.c (dwarf2_physname): Move commment.
14005
14006 2018-02-01 Leszek Swirski <leszeks@google.com>
14007
14008 * varobj.c (varobj_formatted_print_options): Allow recursive
14009 pretty printing if pretty printing is enabled.
14010
14011 2018-02-01 Leszek Swirski <leszeks@google.com>
14012
14013 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14014 names after a structop as a filename.
14015
14016 2018-02-01 Yao Qi <yao.qi@linaro.org>
14017
14018 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14019 (arm_record_coproc_data_proc): Likewise.
14020
14021 2018-02-01 Yao Qi <yao.qi@linaro.org>
14022
14023 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14024
14025 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
14026
14027 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14028 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14029
14030 2018-01-31 Pedro Alves <palves@redhat.com>
14031
14032 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14033 * inflow.c (child_terminal_save_inferior): Wrap reference to
14034 tcgetpgrp in HAVE_TERMIOS_H.
14035 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14036 _WIN32.
14037 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14038 always iterate over all inferiors.
14039 (gdbsim_cntrl_c): Adjust.
14040 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14041
14042 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14043
14044 * gdbtypes.c (lookup_array_range_type): Make sure the array's
14045 index type is objfile-owned if the element type is as well.
14046
14047 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14048
14049 GDB 8.1 released.
14050
14051 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
14052
14053 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14054 "features/s390x-linux64.c".
14055 (_initialize_s390_linux_tdep): Remove initialization of tdescs
14056 s390_linux32 and s390x_linux64.
14057 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14058 default tdesc.
14059 * s390-tdep.c: Include "features/s390-linux32.c" and
14060 "features/s390x-linux64.c".
14061 (s390_tdesc_valid): Add check for tdesc_has_registers.
14062 (s390_gdbarch_init): Make sure there is always a valid tdesc.
14063 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14064 tdesc_s390x_linux64.
14065 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14066 tdesc_s390x_linux64 to...
14067 * s390-tdep.h: ...here.
14068
14069 2018-01-30 Pedro Alves <palves@redhat.com>
14070
14071 PR gdb/13211
14072 * config.in, configure: Regenerate.
14073 * configure.ac: Check for getpgid.
14074 * go32-nat.c (go32_pass_ctrlc): New.
14075 (go32_target): Install it.
14076 * inf-child.c (inf_child_target): Install
14077 child_terminal_save_inferior, child_pass_ctrlc and
14078 child_interrupt.
14079 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14080 (inf_ptrace_target): No longer install it.
14081 * infcmd.c (interrupt_target_1): Adjust.
14082 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14083 (child_interrupt): Declare.
14084 (inferior::terminal_state): New.
14085 * inflow.c (struct terminal_info): Update comments.
14086 (inferior_process_group): Delete.
14087 (terminal_is_ours): Delete.
14088 (gdb_tty_state): New.
14089 (child_terminal_init): Adjust.
14090 (is_gdb_terminal, sharing_input_terminal_1)
14091 (sharing_input_terminal): New functions.
14092 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
14093 Set the process's actual process group in the foreground if
14094 possible. Handle is_ours_for_output/is_ours distinction. Don't
14095 mark terminal as the inferior's if not sharing GDB's terminal.
14096 Don't check attach_flag.
14097 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14098 pass down a target_terminal_state.
14099 (child_terminal_save_inferior): New, factored out from ...
14100 (child_terminal_ours_1): ... this. Handle
14101 target_terminal_state::is_ours_for_output.
14102 (child_interrupt, child_pass_ctrlc): New.
14103 (inflow_inferior_exit): Clear the inferior's terminal_state.
14104 (copy_terminal_info): Copy the inferior's terminal state.
14105 (_initialize_inflow): Remove reference to terminal_is_ours.
14106 * inflow.h (inferior_process_group): Delete.
14107 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14108 * procfs.c (procfs_target): Don't install procfs_interrupt.
14109 (procfs_interrupt): Delete.
14110 * remote.c (remote_serial_quit_handler): Adjust.
14111 (remote_interrupt): Remove ptid parameter. Adjust.
14112 * target-delegates.c: Regenerate.
14113 * target.c: Include "terminal.h".
14114 (target_terminal::terminal_state): Rename to ...
14115 (target_terminal::m_terminal_state): ... this.
14116 (target_terminal::init): Adjust.
14117 (target_terminal::inferior): Adjust to per-inferior
14118 terminal_state.
14119 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14120 (target_terminal::ours, target_terminal::ours_for_output): Use
14121 target_terminal_is_ours_kind.
14122 (target_interrupt): Remove ptid parameter. Adjust.
14123 (default_target_pass_ctrlc): Adjust.
14124 * target.h (target_ops::to_terminal_save_inferior): New field.
14125 (target_ops::to_interrupt): Remove ptid_t parameter.
14126 (target_interrupt): Remove ptid_t parameter. Update comment.
14127 (target_pass_ctrlc): Update comment.
14128 * target/target.h (target_terminal_state): New scoped enum,
14129 factored out of ...
14130 (target_terminal::terminal_state): ... here.
14131 (target_terminal::inferior): Update comments.
14132 (target_terminal::restore_inferior): New.
14133 (target_terminal::is_inferior, target_terminal::is_ours)
14134 (target_terminal::is_ours_for_output): Adjust.
14135 (target_terminal::scoped_restore_terminal_state): Adjust to
14136 rename, and call restore_inferior() instead of inferior().
14137 (target_terminal::scoped_restore_terminal_state::m_state): Change
14138 type.
14139 (target_terminal::terminal_state): Rename to ...
14140 (target_terminal::m_terminal_state): ... this and change type.
14141
14142 2018-01-30 Pedro Alves <palves@redhat.com>
14143
14144 * linux-nat.c (wait_for_signal): New function.
14145 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14146 directly.
14147 (async_terminal_is_ours)
14148 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14149 (linux_nat_add_target): Don't override
14150 to_terminal_inferior/to_terminal_ours.
14151
14152 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
14153
14154 * remote.c (remote_follow_fork): Don't call "detach_inferior".
14155
14156 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
14157
14158 * dwarf2read.c (free_dwo_files): Add forward-declaration.
14159 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14160 dwarf2_per_objfile_free here.
14161 (dwarf2_per_objfile_free): Remove.
14162 (_initialize_dwarf2_read): Don't register
14163 dwarf2_per_objfile_free as a registry cleanup.
14164
14165 2018-01-27 Eli Zaretskii <eliz@gnu.org>
14166
14167 Avoid compilation errors in MinGW native builds
14168
14169 The error is triggered by including python-internal.h, and the
14170 error message is:
14171
14172 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14173 from build-gnulib/import/math.h:27,
14174 from d:/usr/Python26/include/pyport.h:235,
14175 from d:/usr/Python26/include/Python.h:58,
14176 from python/python-internal.h:94,
14177 from python/py-arch.c:24:
14178 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14179 using ::hypot;
14180 ^~~~~
14181
14182 This happens because Python headers define 'hypot' to expand t
14183 '_hypot' in the Windows builds.
14184 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14185 'hypoth'. This avoids a compilation error.
14186
14187 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14188
14189 * MAINTAINERS (Write After Approval): Fix ordering.
14190
14191 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14192
14193 * MAINTAINERS (Write After Approval): Add Alan Hayward.
14194
14195 2018-01-26 Alan Modra <amodra@gmail.com>
14196
14197 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14198 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14199 Remove nop. Make const. Comment.
14200 (powerpc32_plt_stub_so_2): New.
14201 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14202 Correct count. Update uses.
14203 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14204 Move common code reading PLT entry word. Correct
14205 powerpc32_plt_stub PLT address calculation.
14206 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14207 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14208 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14209 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14210 (ppc64_standard_linkage8): Likewise.
14211 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14212 Correct insns description.
14213 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14214
14215 2018-01-24 Pedro Alves <palves@redhat.com>
14216
14217 GCC PR libstdc++/83906
14218 * gdbtypes.c (operator==(const dynamic_prop &,
14219 const dynamic_prop &)): New.
14220 (operator==(const range_bounds &, const range_bounds &)): New.
14221 (check_types_equal): Use them instead of memcmp.
14222 * gdbtypes.h (operator==(const dynamic_prop &,
14223 const dynamic_prop &)): Declare.
14224 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14225 (operator==(const range_bounds &, const range_bounds &)): Declare.
14226 (operator!=(const range_bounds &, const range_bounds &)): Declare.
14227
14228 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14229
14230 * s390-linux-tdep.c (s390_record_address_mask)
14231 (s390_record_calc_disp_common, s390_record_calc_disp)
14232 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14233 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14234 (s390_process_record): Move to s390-tdep.c.
14235 (s390_linux_init_abi_any): Adjust.
14236 * s390-tdep.c (s390_record_address_mask)
14237 (s390_record_calc_disp_common, s390_record_calc_disp)
14238 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14239 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14240 (s390_process_record): Moved from s390-linux-tdep.c
14241 (s390_gdbarch_init): Adjust.
14242
14243 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14244
14245 * s390-linux-nat.c (s390-tdep.h): New include.
14246 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14247 (HFILES_NO_SRCDIR): Add s390-tdep.h.
14248 (ALLDEPFILES): Add s390-tdep.c.
14249 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14250 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14251 * s390-tdep.h: ...this. New file.
14252 * s390-linux-tdep.c (s390-tdep.h): New include.
14253 (_initialize_s390_tdep): Rename to...
14254 (_initialize_s390_linux_tdep): ...this and adjust.
14255 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14256 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14257 s390-tdep.h.
14258 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14259 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14260 (s390_is_partial_instruction, s390_software_single_step)
14261 (is_non_branch_ril, s390_displaced_step_copy_insn)
14262 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14263 (s390_prologue_data, s390_addr, s390_store, s390_load)
14264 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14265 (s390_register_call_saved, s390_guess_tracepoint_registers)
14266 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14267 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14268 (s390_pseudo_register_name, s390_pseudo_register_type)
14269 (s390_pseudo_register_read, s390_pseudo_register_write)
14270 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14271 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14272 (s390_addr_bits_remove, s390_address_class_type_flags)
14273 (s390_address_class_type_flags_to_name)
14274 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14275 (s390_function_arg_float, s390_function_arg_vector)
14276 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14277 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14278 (s390_frame_align, s390_register_return_value, s390_return_value)
14279 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14280 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14281 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14282 (s390_trad_frame_prev_register, s390_unwind_cache)
14283 (s390_prologue_frame_unwind_cache)
14284 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14285 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14286 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14287 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14288 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14289 (s390_frame_base_address, s390_local_base_address)
14290 (s390_frame_base, s390_gcc_target_options)
14291 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14292 (s390_validate_reg_range, s390_tdesc_valid)
14293 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14294 * s390-tdep.c: ...this. New file.
14295
14296 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14297
14298 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14299 (s390_process_record, s390_gdbarch_tdep_alloc)
14300 (s390_linux_init_abi_any): Use/set new hook.
14301
14302 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14303
14304 * s390-linux-tdep.c (osabi.h): New include.
14305 (s390_linux_init_abi_31, s390_linux_init_abi_64)
14306 (s390_linux_init_abi_any): New functions.
14307 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14308
14309 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14310
14311 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14312 tdesc_has_registers check
14313
14314 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14315
14316 * s390-linux-tdep.c (s390_tdesc_valid): New function.
14317 (s390_validate_reg_range): New macro.
14318 (s390_gdbarch_init): Adjust.
14319
14320 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14321
14322 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14323 (s390_gdbarch_tdep_alloc): Adjust.
14324 (s390_gdbarch_init): Adjust.
14325
14326 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14327
14328 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14329 <have_tdb>: Change type to bool.
14330 (s390_gdbarch_tdep_alloc): Adjust.
14331 (s390_gdbarch_init): Adjust.
14332
14333 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14334
14335 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14336 (gdbarch_tdep) <have_upper, have_vx>: New fields.
14337 (s390_gdbarch_tdep_alloc): New function.
14338 (s390_gdbarch_init): Allocate tdep at start and use its fields
14339 instead of separate variables.
14340
14341 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14342
14343 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14344 when looking for cached gdbarch and add comment for remaining.
14345
14346 2018-01-22 Pedro Alves <palves@redhat.com>
14347 Sergio Durigan Junior <sergiodj@redhat.com>
14348
14349 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14350 case.
14351
14352 2018-01-22 Maciej W. Rozycki <macro@mips.com>
14353
14354 * MAINTAINERS: Update my company e-mail address.
14355
14356 2018-01-22 Yao Qi <yao.qi@linaro.org>
14357
14358 * regcache.c (cooked_write_test): New function.
14359 (_initialize_regcache): Register the test.
14360
14361 2018-01-22 Yao Qi <yao.qi@linaro.org>
14362
14363 * ia64-tdep.c (ia64_pseudo_register_read): Call
14364 regcache->cooked_read instead of regcache_cooked_read_unsigned.
14365 * m32c-tdep.c (m32c_cat_read): Likewise.
14366 (m32c_r3r2r1r0_read): Likewise.
14367 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14368 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14369
14370 2018-01-22 Yao Qi <yao.qi@linaro.org>
14371
14372 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14373 method raw_read instead of regcache_raw_read.
14374 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14375 * arm-tdep.c (arm_neon_quad_read): Likewise.
14376 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14377 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14378 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14379 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14380 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14381 (i386_pseudo_register_read_into_value): Likewise.
14382 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14383 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14384 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14385 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14386 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14387 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14388 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14389 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14390 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14391
14392 2018-01-22 Yao Qi <yao.qi@linaro.org>
14393
14394 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14395 * configure.tgt: Remove target mt.
14396 * mt-tdep.c: Remove.
14397 * regcache.c (cooked_read_test): Remove the check for mt.
14398
14399 2018-01-22 Yao Qi <yao.qi@linaro.org>
14400
14401 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14402 instead of gdbarch_pseudo_register_read_value.
14403
14404 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14405
14406 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14407 language is Ada.
14408
14409 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14410
14411 * linespec.c (create_sals_line_offset): Remove code that preserved
14412 the symtab_and_line's line number.
14413
14414 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14415
14416 * varobj.c (varobj_create): Don't set valid_block when creating a
14417 floating varobj.
14418
14419 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14420
14421 * varobj.c (varobj_create): Remove out of date comment.
14422
14423 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14424
14425 PR mi/20395
14426 * ada-exp.y (write_var_from_sym): Pass extra parameter when
14427 updating innermost block.
14428 * parse.c (innermost_block_tracker::update): Take extra type
14429 parameter, and check types match before updating innermost block.
14430 (write_dollar_variable): Update innermost block for registers.
14431 * parser-defs.h (enum innermost_block_tracker_type): New enum.
14432 (innermost_block_tracker::innermost_block_tracker): Initialise
14433 m_types member.
14434 (innermost_block_tracker::reset): Take type parameter.
14435 (innermost_block_tracker::update): Take type parameter, and pass
14436 type through as needed.
14437 (innermost_block_tracker::m_types): New member.
14438 * varobj.c (varobj_create): Pass type when reseting innermost
14439 block.
14440
14441 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14442
14443 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14444 * ada-lang.c (resolve_subexp): Likewise.
14445 * breakpoint.c (set_breakpoint_condition) Likewise.
14446 (watch_command_1) Likewise.
14447 * c-exp.y (variable): Likewise.
14448 * d-exp.y (PrimaryExpression): Likewise.
14449 * f-exp.y (variable): Likewise.
14450 * go-exp.y (variable): Likewise.
14451 * m2-exp.y (variable): Likewise.
14452 * objfiles.c (objfile::~objfile): Likewise.
14453 * p-exp.y (variable): Likewise.
14454 * parse.c (innermost_block): Change type.
14455 * parser-defs.h (class innermost_block_tracker): New.
14456 (innermost_block): Change to innermost_block_tracker.
14457 * printcmd.c (display_command): Switch to innermost_block API.
14458 (do_one_display): Likewise.
14459 * rust-exp.y (do_one_display): Likewise.
14460 * symfile.c (clear_symtab_users): Likewise.
14461 * varobj.c (varobj_create): Switch to innermost_block API, replace
14462 use of innermost_block with block stored on varobj object.
14463
14464 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14465
14466 * expression.h (innermost_block): Remove declaration.
14467 * varobj.c: Add 'parser-defs.h' include.
14468
14469 2018-01-19 Tom Tromey <tom@tromey.com>
14470
14471 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14472 symbols in the static and global blocks.
14473
14474 2018-01-19 James Clarke <jrtc27@jrtc27.com>
14475
14476 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14477 gdb_ptrace.h, and move including gdb_wait.h ...
14478 * nat/linux-ptrace.h: ... to here.
14479
14480 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14481
14482 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14483 inf_ptrace_detach_success.
14484 (inf_ptrace_detach_success): Add inferior parameter, use it
14485 instead of inferior_ptid, pass it to detach_inferior.
14486 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14487 parameter.
14488 * inferior.c (detach_inferior): Add overload that takes an
14489 inferior object.
14490 * inferior.h (detach_inferior): Likewise.
14491 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14492 use inferior_ptid, adjust call to inf_ptrace_detach_success.
14493 * linux-thread-db.c (thread_db_detach): Use inf parameter.
14494
14495 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14496
14497 * target.h (struct target_ops) <to_detach>: Add inferior
14498 parameter.
14499 (target_detach): Likewise.
14500 * target.c (dispose_inferior): Pass inferior down.
14501 (target_detach): Pass inferior down. Assert that it is equal to
14502 the current inferior.
14503 * aix-thread.c (aix_thread_detach): Pass inferior down.
14504 * corefile.c (core_file_command): Pass current_inferior() down.
14505 * corelow.c (core_detach): Add inferior parameter.
14506 * darwin-nat.c (darwin_detach): Likewise.
14507 * gnu-nat.c (gnu_detach): Likewise.
14508 * inf-ptrace.c (inf_ptrace_detach): Likewise.
14509 * infcmd.c (detach_command): Pass current_inferior() down to
14510 target_detach.
14511 * infrun.c (follow_fork_inferior): Pass parent_inf to
14512 target_detach.
14513 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14514 target_detach.
14515 * linux-nat.c (linux_nat_detach): Add inferior parameter.
14516 * linux-thread-db.c (thread_db_detach): Likewise.
14517 * nto-procfs.c (procfs_detach): Likewise.
14518 * procfs.c (procfs_detach): Likewise.
14519 * record.c (record_detach): Likewise.
14520 * record.h (struct inferior): Forward-declare.
14521 (record_detach): Add inferior parameter.
14522 * remote-sim.c (gdbsim_detach): Likewise.
14523 * remote.c (remote_detach_1): Likewise.
14524 (remote_detach): Likewise.
14525 (extended_remote_detach): Likewise.
14526 * sol-thread.c (sol_thread_detach): Likewise.
14527 * target-debug.h (target_debug_print_inferior_p): New macro.
14528 * target-delegates.c: Re-generate.
14529 * top.c (kill_or_detach): Pass inferior down to target_detach.
14530 * windows-nat.c (windows_detach): Add inferior parameter.
14531
14532 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14533
14534 * target.h (struct target_ops) <to_detach>: Remove args
14535 parameter.
14536 (target_detach): Likewise.
14537 * target.c (dispose_inferior): Adjust.
14538 (target_detach): Remove args parameter, adjust.
14539 * aix-thread.c (aix_thread_detach): Adjust.
14540 * corefile.c (core_file_command): Adjust.
14541 * corelow.c (core_detach): Adjust.
14542 * darwin-nat.c (darwin_detach): Adjust.
14543 * gnu-nat.c (gnu_detach): Adjust.
14544 * inf-ptrace.c (inf_ptrace_detach): Adjust.
14545 * infcmd.c (detach_command): Adjust
14546 * infrun.c (follow_fork_inferior): Adjust.
14547 (handle_vfork_child_exec_or_exit): Adjust.
14548 * linux-fork.c (linux_fork_detach): Remove args parameter.
14549 * linux-fork.h (linux_fork_detach): Likewise.
14550 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14551 * linux-thread-db.c (thread_db_detach): Likewise.
14552 * nto-procfs.c (procfs_detach): Likewise.
14553 * procfs.c (procfs_detach): Likewise.
14554 (do_detach): Remove signo parameter.
14555 * record.c (record_detach): Remove args parameter.
14556 * record.h (record_detach): Likewise.
14557 * remote-sim.c (gdbsim_detach): Likewise.
14558 * remote.c (remote_detach_1): Likewise.
14559 (remote_detach): Likewise.
14560 (extended_remote_detach): Likewise.
14561 * sol-thread.c (sol_thread_detach): Likewise.
14562 * target-delegates.c: Re-generate.
14563 * top.c (struct qt_args) <args>: Remove field.
14564 (kill_or_detach): Don't pass args.
14565 (quit_force): Don't set args.
14566 * windows-nat.c (windows_detach): Remove args parameter.
14567
14568 2018-01-19 Yao Qi <yao.qi@linaro.org>
14569
14570 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14571 (arm_linux_init_abi): Install it.
14572
14573 2018-01-19 Yao Qi <yao.qi@linaro.org>
14574
14575 * osabi.c (gdb_osabi_names): Extend the regexp for
14576 arm-linux-gnueabihf.
14577
14578 2018-01-18 Yao Qi <yao.qi@linaro.org>
14579
14580 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14581 m_abbrevs.
14582 (abbrev_table::add_abbrev): Update.
14583 (abbrev_table::lookup_abbrev): Update.
14584
14585 2018-01-18 Yao Qi <yao.qi@linaro.org>
14586
14587 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14588
14589 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
14590
14591 * compile/compile.c (compile_to_object): Convert "triplet_rx"
14592 to "std::string".
14593
14594 2018-01-17 Tom Tromey <tom@tromey.com>
14595
14596 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
14597
14598 2018-01-17 Tom Tromey <tom@tromey.com>
14599
14600 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14601 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14602 (create_array_type_with_stride): Update.
14603 * dwarf2read.c (set_die_type): Update.
14604
14605 2018-01-17 Tom Tromey <tom@tromey.com>
14606
14607 * dwarf2read.c (delayed_method_info): Remove typedef.
14608 (dwarf2_cu::method_info): Now a std::vector.
14609 (add_to_method_list): Update.
14610 (free_delayed_list): Remove.
14611 (compute_delayed_physnames): Update.
14612 (process_full_comp_unit, process_full_type_unit): Clear the method
14613 list. Remove cleanups.
14614 (psymtab_include_file_name): Add name_holder parameter. Use
14615 unique_xmalloc_ptr.
14616 (dwarf_decode_lines): Update.
14617
14618 2018-01-17 Tom Tromey <tom@tromey.com>
14619 Simon Marchi <simon.marchi@ericsson.com>
14620
14621 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14622 (dwarf2_per_objfile::free_cached_comp_units)
14623 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14624 (init_cutu_and_read_dies_no_follow): Update.
14625 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14626 (dwarf2_cu::~dwarf2_cu): New.
14627 (free_heap_comp_unit, free_stack_comp_unit): Remove.
14628 (age_cached_comp_units, free_one_cached_comp_unit): Update.
14629
14630 2018-01-17 Tom Tromey <tom@tromey.com>
14631 Simon Marchi <simon.marchi@ericsson.com>
14632
14633 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14634 (struct die_reader_specs) <abbrev_table>: New member.
14635 (struct abbrev_table): Add constructor.
14636 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14637 <abbrev_obstack>: Now an auto_obstack.
14638 (abbrev_table_up): New typedef.
14639 (init_cu_die_reader): Add abbrev_table parameter.
14640 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14641 Add result_dwo_abbrev_table.
14642 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14643 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14644 Update.
14645 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14646 parameter.
14647 (skip_children): Update.
14648 (abbrev_table::alloc_abbrev): Rename from
14649 abbrev_table_alloc_abbrev.
14650 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14651 (abbrev_table::lookup_abbrev): Rename from
14652 abbrev_table_lookup_abbrev.
14653 (abbrev_table_read_table): Return abbrev_table_up.
14654 (abbrev_table_free, abbrev_table_free_cleanup)
14655 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14656 (load_partial_dies): Update.
14657
14658 2018-01-17 Tom Tromey <tom@tromey.com>
14659
14660 * dwarf2read.c (dwarf2_compute_name): Update comment.
14661 (read_func_scope, read_variable): Update.
14662 (new_symbol): Remove.
14663 (new_symbol_full): Rename to new_symbol.
14664
14665 2018-01-17 Mike Gulick <mgulick@mathworks.com>
14666
14667 PR gdb/16577
14668 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14669 a warning instead of throwing an error, set section size to 0 and return
14670 NULL.
14671 * gdb_bfd.h (gdb_bfd_map_section): Update description.
14672
14673 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14674
14675 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14676 std::string.
14677 (linux_ptrace_attach_fail_reason_string): Likewise.
14678 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14679 Likewise.
14680 (linux_ptrace_attach_fail_reason_string): Likewise.
14681 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14682
14683 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14684
14685 * linux-nat.c (linux_nat_attach): Remove xstrdup.
14686
14687 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
14688
14689 PR gdb/21559
14690 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14691 checking for fs_base/gs_base fields in struct user_regs_struct.
14692 * configure: Regenerate.
14693
14694 2018-01-17 Yao Qi <yao.qi@linaro.org>
14695
14696 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14697 function.
14698 (aarch64_linux_init_abi): Install it to gdbarch hook
14699 gcc_target_options.
14700
14701 2018-01-15 Pedro Alves <palves@redhat.com>
14702
14703 * common/signals-state-save-restore.c
14704 (save_original_signals_state): Fix typos.
14705
14706 2017-01-12 Tom Tromey <tom@tromey.com>
14707 Sergio Durigan Junior <sergiodj@redhat.com>
14708
14709 * Makefile.in (install-only): Install gdb-add-index.
14710
14711 2018-01-12 John Baldwin <jhb@FreeBSD.org>
14712
14713 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14714
14715 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
14716
14717 * infrun.c (keep_going_pass_signal): Clear step-over info when
14718 insert_breakpoints fails.
14719
14720 2018-01-11 Pedro Alves <palves@redhat.com>
14721
14722 PR gdb/22583
14723 * infrun.c (resume): Rename to ...
14724 (resume_1): ... this.
14725 (resume): Reimplement as wrapper around resume_1.
14726
14727 2018-01-11 Pedro Alves <palves@redhat.com>
14728
14729 PR remote/22597
14730 * remote.c (remote_parse_stop_reply): Default to the last-set
14731 general thread instead of to 'magic_null_ptid'.
14732
14733 2018-01-10 Pedro Alves <palves@redhat.com>
14734
14735 * language.h (language_get_symbol_name_matcher): Rename ...
14736 (get_symbol_name_matcher): ... this.
14737 * language.c (language_get_symbol_name_matcher): Ditto.
14738 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14739 callers adjusted.
14740
14741 2018-01-10 Pedro Alves <palves@redhat.com>
14742
14743 PR gdb/22670
14744 * dwarf2read.c
14745 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14746 Adjust to use language_get_symbol_name_matcher instead of
14747 language_defn::la_get_symbol_name_matcher.
14748 * language.c (language_get_symbol_name_matcher): If in Ada mode
14749 and the lookup name is a verbatim match, return Ada's matcher.
14750 * language.h (language_get_symbol_name_matcher): Adjust comment.
14751 (ada_lookup_name_info::verbatim_p):: New method.
14752
14753 2018-01-10 Pedro Alves <palves@redhat.com>
14754
14755 PR gdb/22670
14756 * ada-lang.c (ada_collect_symbol_completion_matches): If the
14757 minsym's language is language_auto or language_cplus, pass down
14758 language_ada instead.
14759 * symtab.c (compare_symbol_name): Don't frob symbol language here.
14760
14761 2018-01-10 Pedro Alves <palves@redhat.com>
14762
14763 PR gdb/22670
14764 * minsyms.c (linkage_name_str): New function.
14765 (iterate_over_minimal_symbols): Use it.
14766
14767 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14768
14769 * NEWS: Document that 'info proc' now works on FreeBSD.
14770
14771 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14772
14773 * configure.ac: Check for kinfo_getfile in libutil.
14774 * configure: Regenerate.
14775 * config.in: Regenerate.
14776 * fbsd-nat.c: Include "fbsd-tdep.h".
14777 (fbsd_fetch_cmdline): New.
14778 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14779 rather than calling error.
14780 (fbsd_info_proc): New.
14781 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14782 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14783 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14784
14785 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14786
14787 * fbsd-nat.c (struct free_deleter): Remove.
14788 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14789
14790 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14791
14792 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14793 NULL for an empty pathname.
14794
14795 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14796
14797 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14798 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14799 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14800 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14801 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14802 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14803 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14804 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14805 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14806 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14807 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14808 (fbsd_core_fetch_timeval, fbsd_print_sigset)
14809 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14810 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
14811 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14812
14813 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
14814
14815 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14816 (gnu_xfer_auxv): New function.
14817 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14818 TARGET_OBJECT_AUXV.
14819
14820 2018-01-08 Yao Qi <yao.qi@linaro.org>
14821 Simon Marchi <simon.marchi@ericsson.com>
14822
14823 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14824 common/selftest.c.
14825 (COMMON_OBS): Remove selftest.o.
14826 * configure.ac: Append selftest-arch.c and common/selftest.c to
14827 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
14828 * configure: Re-generated.
14829 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14830 GDB_SELF_TEST.
14831 (maintenance_info_selftests): Likewise.
14832
14833 2018-01-08 Xavier Roirand <roirand@adacore.com>
14834
14835 * ada-valprint.c (val_print_packed_array_elements): Use
14836 proper number of elements when printing an array indexed
14837 by an enumeration type.
14838
14839 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14840
14841 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14842 (dw2_get_file_names_reader): Adjust.
14843 (lookup_dwo_signatured_type): Adjust.
14844 (lookup_dwp_signatured_type): Adjust.
14845 (lookup_signatured_type): Adjust.
14846 (create_type_unit_group): Adjust.
14847 (get_type_unit_group): Adjust.
14848 (process_psymtab_comp_unit_reader): Adjust.
14849 (build_type_psymtabs_reader): Adjust.
14850 (scan_partial_symbols): Adjust.
14851 (add_partial_symbol): Adjust.
14852 (add_partial_subprogram): Adjust.
14853 (peek_die_abbrev): Adjust.
14854 (fixup_go_packaging): Adjust.
14855 (process_imported_unit_die): Adjust.
14856 (dwarf2_compute_name): Adjust.
14857 (dwarf2_physname): Adjust.
14858 (read_import_statement): Adjust.
14859 (handle_DW_AT_stmt_list): Adjust.
14860 (read_file_scope): Adjust.
14861 (read_func_scope): Adjust.
14862 (read_lexical_block_scope): Adjust.
14863 (read_call_site_scope): Adjust.
14864 (read_variable): Adjust.
14865 (dwarf2_rnglists_process): Adjust.
14866 (dwarf2_ranges_process): Adjust.
14867 (dwarf2_ranges_read): Adjust.
14868 (dwarf2_get_pc_bounds): Adjust.
14869 (dwarf2_record_block_ranges): Adjust.
14870 (dwarf2_add_field): Adjust.
14871 (dwarf2_add_member_fn): Adjust.
14872 (read_structure_type): Adjust.
14873 (process_structure_scope): Adjust.
14874 (read_enumeration_type): Adjust.
14875 (read_array_type): Adjust.
14876 (mark_common_block_symbol_computed): Adjust.
14877 (read_common_block): Adjust.
14878 (read_namespace_type): Adjust.
14879 (read_namespace): Adjust.
14880 (read_module_type): Adjust.
14881 (read_tag_pointer_type): Adjust.
14882 (read_tag_ptr_to_member_type): Adjust.
14883 (read_tag_string_type): Adjust.
14884 (read_subroutine_type): Adjust.
14885 (read_typedef): Adjust.
14886 (read_base_type): Adjust.
14887 (attr_to_dynamic_prop): Adjust.
14888 (read_subrange_type): Adjust.
14889 (read_unspecified_type): Adjust.
14890 (dwarf2_read_abbrevs): Adjust.
14891 (load_partial_dies): Adjust.
14892 (read_partial_die): Adjust.
14893 (find_partial_die): Adjust.
14894 (guess_partial_die_structure_name): Adjust.
14895 (fixup_partial_die): Adjust.
14896 (read_attribute_value): Adjust.
14897 (read_addr_index): Adjust.
14898 (read_addr_index_from_leb128): Adjust.
14899 (read_str_index): Adjust.
14900 (dwarf2_string_attr): Adjust.
14901 (get_debug_line_section): Adjust.
14902 (dwarf_decode_line_header): Adjust.
14903 (lnp_state_machine::check_line_address): Adjust.
14904 (dwarf_decode_lines_1): Adjust.
14905 (dwarf_decode_lines): Adjust.
14906 (dwarf2_start_symtab): Adjust.
14907 (var_decode_location): Adjust.
14908 (new_symbol_full): Adjust.
14909 (dwarf2_const_value_data): Adjust.
14910 (dwarf2_const_value_attr): Adjust.
14911 (dwarf2_const_value): Adjust.
14912 (die_type): Adjust.
14913 (die_containing_type): Adjust.
14914 (build_error_marker_type): Adjust.
14915 (lookup_die_type): Adjust.
14916 (guess_full_die_structure_name): Adjust.
14917 (anonymous_struct_prefix): Adjust.
14918 (determine_prefix): Adjust.
14919 (dwarf2_name): Adjust.
14920 (follow_die_ref_or_sig): Adjust.
14921 (follow_die_offset): Adjust.
14922 (follow_die_ref): Adjust.
14923 (follow_die_sig_1): Adjust.
14924 (follow_die_sig): Adjust.
14925 (get_signatured_type): Adjust.
14926 (get_DW_AT_signature_type): Adjust.
14927 (decode_locdesc): Adjust.
14928 (dwarf_decode_macros): Adjust.
14929 (cu_debug_loc_section): Adjust.
14930 (fill_in_loclist_baton): Adjust.
14931 (dwarf2_symbol_mark_computed): Adjust.
14932 (init_one_comp_unit): Don't assign
14933 dwarf2_cu::dwarf2_per_objfile.
14934 (set_die_type): Adjust.
14935
14936 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14937
14938 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14939 <dwarf2_per_objfile>: New field.
14940 (dwarf2_per_objfile): Remove global.
14941 (get_dwarf2_per_objfile): New function.
14942 (set_dwarf2_per_objfile): New function.
14943 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14944 dwarf2_per_objfile.
14945 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14946 (read_abbrev_offset): Likewise.
14947 (read_indirect_string): Likewise.
14948 (read_indirect_line_string): Likewise.
14949 (read_indirect_string_at_offset): Likewise.
14950 (read_indirect_string_from_dwz): Likewise.
14951 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14952 dwarf2_per_objfile.
14953 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14954 (create_all_comp_units): Change objfile parameter to
14955 dwarf2_per_objfile.
14956 (create_all_type_units): Likewise.
14957 (process_queue): Add dwarf2_per_objfile parameter.
14958 (read_and_check_comp_unit_head): Likewise.
14959 (lookup_dwo_unit_in_dwp): Likewise.
14960 (get_dwp_file): Likewise.
14961 (process_cu_includes): Likewise.
14962 (struct free_dwo_file_cleanup_data): New struct.
14963 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14964 set_dwarf2_per_objfile.
14965 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14966 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14967 context, adjust calls.
14968 (dw2_instantiate_symtab): Likewise.
14969 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14970 (dw2_get_cu): Likewise.
14971 (create_cu_from_index_list): Change objfile parameter to
14972 dwarf2_per_objfile.
14973 (create_cus_from_index_list): Get dwarf2_per_objfile from
14974 context, adjust calls.
14975 (create_cus_from_index): Likewise.
14976 (create_signatured_type_table_from_index): Change objfile
14977 parameter to dwarf2_per_objfile.
14978 (create_signatured_type_table_from_debug_names): Change objfile
14979 parameter to dwarf2_per_objfile.
14980 (create_addrmap_from_index): Likewise.
14981 (create_addrmap_from_aranges): Likewise.
14982 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14983 (dw2_setup): Remove.
14984 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14985 context.
14986 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14987 get_dwarf2_per_objfile.
14988 (dw2_forget_cached_source_info): Likewise.
14989 (dw2_map_symtabs_matching_filename): Likewise.
14990 (struct dw2_symtab_iterator) <index>: Remove.
14991 <dwarf2_per_objfile>: New field.
14992 (dw2_symtab_iter_init): Replace index parameter with
14993 dwarf2_per_objfile.
14994 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14995 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14996 (dw2_print_stats): Likewise.
14997 (dw2_dump): Likewise.
14998 (dw2_expand_symtabs_for_function): Likewise.
14999 (dw2_expand_all_symtabs): Likewise.
15000 (dw2_expand_symtabs_with_fullname): Likewise.
15001 (dw2_expand_marked_cus): Replace index and objfile parameters
15002 with dwarf2_per_objfile.
15003 (dw_expand_symtabs_matching_file_matcher): Add
15004 dwarf2_per_objfile parameter and adjust calls.
15005 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15006 adjust calls.
15007 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15008 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15009 adjust calls.
15010 (create_cus_from_debug_names_list): Replace objfile parameter
15011 with dwarf2_per_objfile and adjust calls.
15012 (create_cus_from_debug_names): Likewise.
15013 (dwarf2_read_debug_names): Likewise.
15014 (mapped_debug_names::namei_to_name): Adjust call.
15015 (dw2_debug_names_iterator::next): Likewise.
15016 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15017 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15018 (dw2_debug_names_dump): Likewise.
15019 (dw2_debug_names_expand_symtabs_for_function): Likewise.
15020 (dw2_debug_names_expand_symtabs_matching): Likewise.
15021 (dwarf2_initialize_objfile): Likewise.
15022 (dwarf2_build_psymtabs): Likewise.
15023 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15024 this_cu.
15025 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15026 (read_and_check_comp_unit_head): Likewise.
15027 (read_abbrev_offset): Likewise.
15028 (create_debug_type_hash_table): Likewise.
15029 (create_debug_types_hash_table): Likewise.
15030 (create_all_type_units): Replace objfile parameter with
15031 dwarf2_per_objfile.
15032 (add_type_unit): Add dwarf2_per_objfile parameter.
15033 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15034 with dwarf2_per_objfile.
15035 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15036 (lookup_dwp_signatured_type): Likewise.
15037 (lookup_signatured_type): Likewise.
15038 (read_cutu_die_from_dwo): Likewise.
15039 (init_tu_and_read_dwo_dies): Likewise.
15040 (init_cutu_and_read_dies): Likewise.
15041 (init_cutu_and_read_dies_no_follow): Likewise.
15042 (allocate_type_unit_groups_table): Add objfile parameter.
15043 (create_type_unit_group): Use dwarf2_per_objfile from cu.
15044 (get_type_unit_group): Likewise.
15045 (process_psymtab_comp_unit): Update call.
15046 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15047 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15048 (print_tu_stats): Likewise.
15049 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15050 in void* parameter.
15051 (build_type_psymtabs): Change objfile parameter to
15052 dwarf2_per_objfile.
15053 (process_skeletonless_type_unit): Use dwarf2_per_objfile
15054 passed in void* parameter.
15055 (process_skeletonless_type_units): Change objfile parameter to
15056 dwarf2_per_objfile.
15057 (set_partial_user): Likewise.
15058 (dwarf2_build_psymtabs_hard): Likewise.
15059 (read_comp_units_from_section): Likewise.
15060 (create_all_comp_units): Likewise.
15061 (scan_partial_symbols): Update calls.
15062 (add_partial_symbol): Likewise.
15063 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15064 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15065 (process_queue): Add dwarf2_per_objfile parameter.
15066 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15067 (compute_compunit_symtab_includes): Likewise.
15068 (process_cu_includes): Add dwarf2_per_objfile parameter.
15069 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15070 (process_full_type_unit): Likewise.
15071 (process_imported_unit_die): Update call.
15072 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15073 (read_file_scope): Likewise.
15074 (allocate_dwo_file_hash_table): Add objfile parameter.
15075 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15076 (create_cus_hash_table): Likewise.
15077 (create_dwp_hash_table): Likewise.
15078 (create_dwo_unit_in_dwp_v1): Likewise.
15079 (create_dwp_v2_section): Likewise.
15080 (create_dwo_unit_in_dwp_v2): Likewise.
15081 (lookup_dwo_unit_in_dwp): Likewise.
15082 (try_open_dwop_file): Likewise.
15083 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15084 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15085 cleanup to include a reference to dwarf2_per_objfile.
15086 (open_dwp_file): Add dwarf2_per_objfile parameter.
15087 (open_and_init_dwp_file): Likewise.
15088 (get_dwp_file): Likewise.
15089 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15090 (queue_and_load_all_dwo_tus): Update call.
15091 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15092 data.
15093 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15094 (dwarf2_ranges_process): Likewise.
15095 (dwarf2_get_pc_bounds): Likewise.
15096 (mark_common_block_symbol_computed): Likewise.
15097 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15098 (dwarf2_read_abbrevs): Update call.
15099 (read_partial_die): Use dwarf2_per_objfile from cu.
15100 (find_partial_die): Likewise.
15101 (fixup_partial_die): Likewise.
15102 (read_attribute_value): Likewise.
15103 (read_indirect_string_at_offset_from): Add objfile parameter.
15104 (read_indirect_string_at_offset): Add dwarf2_per_objfile
15105 parameter.
15106 (read_indirect_string_from_dwz): Add objfile parameter.
15107 (read_indirect_string): Add objfile parameter.
15108 (read_addr_index_1): Add dwarf2_per_objfile parameter.
15109 (read_addr_index): Use dwarf2_per_objfile from cu.
15110 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15111 call dw2_setup.
15112 (read_str_index): Use dwarf2_per_objfile from cu.
15113 (get_debug_line_section): Likewise.
15114 (read_formatted_entries): Add dwarf2_per_objfile parameter.
15115 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15116 (new_symbol_full): Use dwarf2_per_objfile from cu.
15117 (build_error_marker_type): Likewise.
15118 (lookup_die_type): Likewise.
15119 (determine_prefix): Likewise.
15120 (follow_die_offset): Likewise.
15121 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15122 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15123 (dwarf2_fetch_die_type_sect_off): Likewise.
15124 (dwarf2_get_die_type): Likewise.
15125 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15126 (get_signatured_type): Likewise.
15127 (get_DW_AT_signature_type): Likewise.
15128 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15129 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15130 (cu_debug_loc_section): Likewise.
15131 (fill_in_loclist_baton): Likewise.
15132 (dwarf2_symbol_mark_computed): Likewise.
15133 (dwarf2_find_containing_comp_unit): Change objfile parameter to
15134 dwarf2_per_objfile.
15135 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15136 parameter.
15137 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15138 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15139 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15140 (set_die_type): Use dwarf2_free_objfile from cu.
15141 (get_die_type_at_offset): Likewise.
15142 (dwarf2_per_objfile_free): Don't assign global variable.
15143 (debug_names) <constructor>: Add dwarf2_per_objfile
15144 parameter, update m_debugstrlookup construction.
15145 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15146 parameter.
15147 <m_dwarf2_per_objfile>: New field.
15148 <lookup>: Use m_dwarf2_per_objfile.
15149 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15150 (psyms_seen_size): Likewise.
15151 (write_gdbindex): Replace objfile parameter with
15152 dwarf2_per_objfile.
15153 (write_debug_names): Likewise.
15154 (write_psymtabs_to_index): Likewise.
15155 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15156 calls.
15157
15158 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15159
15160 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15161 <dwarf2_per_objfile>: New field.
15162 (struct dwarf2_per_cu_data) <objfile>: Remove.
15163 <dwarf2_per_objfile>: New field.
15164 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15165 of objfile.
15166 (create_signatured_type_table_from_index): Likewise.
15167 (create_debug_type_hash_table): Likewise.
15168 (fill_in_sig_entry_from_dwo_entry): Likewise.
15169 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15170 (create_type_unit_group): Assign dwarf2_per_objfile instead of
15171 objfile.
15172 (create_partial_symtab): Access objfile through
15173 dwarf2_per_objfile.
15174 (process_psymtab_comp_unit_reader): Likewise.
15175 (read_comp_units_from_section): Likewise.
15176 (scan_partial_symbols): Likewise.
15177 (add_partial_symbol): Likewise.
15178 (add_partial_subprogram): Likewise.
15179 (peek_die_abbrev): Likewise.
15180 (fixup_go_packaging): Likewise.
15181 (process_full_comp_unit): Likewise.
15182 (process_full_type_unit): Likewise.
15183 (process_imported_unit_die): Likewise.
15184 (dwarf2_compute_name): Likewise.
15185 (dwarf2_physname): Likewise.
15186 (read_import_statement): Likewise.
15187 (create_cus_hash_table): Assign dwarf2_physname instead of
15188 objfile.
15189 (read_func_scope): Access objfile through dwarf2_per_objfile.
15190 (read_lexical_block_scope): Likewise.
15191 (read_call_site_scope): Likewise.
15192 (read_variable): Likewise.
15193 (dwarf2_rnglists_process): Likewise.
15194 (dwarf2_ranges_process): Likewise.
15195 (dwarf2_ranges_read): Likewise.
15196 (dwarf2_record_block_ranges): Likewise.
15197 (dwarf2_add_field): Likewise.
15198 (dwarf2_add_member_fn): Likewise.
15199 (read_structure_type): Likewise.
15200 (process_structure_scope): Likewise.
15201 (read_enumeration_type): Likewise.
15202 (read_array_type): Likewise.
15203 (read_common_block): Likewise.
15204 (read_namespace_type): Likewise.
15205 (read_namespace): Likewise.
15206 (read_module_type): Likewise.
15207 (read_tag_pointer_type): Likewise.
15208 (read_tag_ptr_to_member_type): Likewise.
15209 (read_tag_string_type): Likewise.
15210 (read_subroutine_type): Likewise.
15211 (read_typedef): Likewise.
15212 (read_base_type): Likewise.
15213 (attr_to_dynamic_prop): Likewise.
15214 (read_subrange_type): Likewise.
15215 (read_unspecified_type): Likewise.
15216 (load_partial_dies): Likewise.
15217 (read_partial_die): Likewise.
15218 (find_partial_die): Likewise.
15219 (guess_partial_die_structure_name): Likewise.
15220 (fixup_partial_die): Likewise.
15221 (read_attribute_value): Likewise.
15222 (read_addr_index_from_leb128): Likewise.
15223 (dwarf2_read_addr_index): Likewise.
15224 (dwarf2_string_attr): Likewise.
15225 (lnp_state_machine::check_line_address): Likewise.
15226 (dwarf_decode_lines_1): Likewise.
15227 (dwarf_decode_lines): Likewise.
15228 (dwarf2_start_symtab): Likewise.
15229 (var_decode_location): Likewise.
15230 (new_symbol_full): Likewise.
15231 (dwarf2_const_value_data): Likewise.
15232 (dwarf2_const_value_attr): Likewise.
15233 (dwarf2_const_value): Likewise.
15234 (die_type): Likewise.
15235 (die_containing_type): Likewise.
15236 (lookup_die_type): Likewise.
15237 (guess_full_die_structure_name): Likewise.
15238 (anonymous_struct_prefix): Likewise.
15239 (dwarf2_name): Likewise.
15240 (follow_die_ref_or_sig): Likewise.
15241 (follow_die_offset): Likewise.
15242 (follow_die_ref): Likewise.
15243 (dwarf2_fetch_die_loc_sect_off): Likewise.
15244 (dwarf2_fetch_constant_bytes): Likewise.
15245 (dwarf2_fetch_die_type_sect_off): Likewise.
15246 (dwarf2_get_die_type): Likewise.
15247 (follow_die_sig): Likewise.
15248 (decode_locdesc): Likewise.
15249 (dwarf2_per_cu_objfile): Likewise.
15250 (dwarf2_per_cu_text_offset): Likewise.
15251 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15252 objfile.
15253 (set_die_type): Access objfile through
15254 dwarf2_per_objfile.
15255
15256 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15257
15258 * valprint.c (converted_character_d): Remove typedef.
15259 (DEF_VEC_O (converted_character_d)): Remove.
15260 (count_next_character): Use std::vector.
15261 (print_converted_chars_to_obstack): Likewise.
15262 (generic_printstr): Likewise.
15263
15264 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15265
15266 * xml-support.h (struct gdb_xml_value): Add constructor.
15267 <value>: Change type to unique_xmalloc_ptr.
15268 (gdb_xml_value_s): Remove typedef.
15269 (DEF_VEC_O (gdb_xml_value_s)): Remove.
15270 (gdb_xml_element_start_handler): Change parameter type to
15271 std::vector.
15272 (xml_find_attribute): Likewise.
15273 * xml-support.c (xml_find_attribute): Change parameter type to
15274 std::vector and adjust.
15275 (gdb_xml_values_cleanup): Remove.
15276 (gdb_xml_parser::start_element): Adjust to std::vector.
15277 (xinclude_start_include): Change paraeter type to std::vector
15278 and adjust.
15279 * btrace.c (check_xml_btrace_version): Likewise.
15280 (parse_xml_btrace_block): Likewise.
15281 (parse_xml_btrace_pt_config_cpu): Likewise.
15282 (parse_xml_btrace_pt): Likewise.
15283 (parse_xml_btrace_conf_bts): Likewise.
15284 (parse_xml_btrace_conf_pt): Likewise.
15285 * memory-map.c (memory_map_start_memory): Likewise.
15286 (memory_map_start_property): Likewise.
15287 * osdata.c (osdata_start_osdata): Likewise.
15288 (osdata_start_item): Likewise.
15289 (osdata_start_column): Likewise.
15290 * remote.c (start_thread): Likewise.
15291 * solib-aix.c (library_list_start_library): Likewise.
15292 (library_list_start_list): Likewise.
15293 * solib-svr4.c (library_list_start_library): Likewise.
15294 (svr4_library_list_start_list): Likewise.
15295 * solib-target.c (library_list_start_segment): Likewise.
15296 (library_list_start_section): Likewise.
15297 (library_list_start_library): Likewise.
15298 (library_list_start_list): Likewise.
15299 * tracepoint.c (traceframe_info_start_memory): Likewise.
15300 (traceframe_info_start_tvar): Likewise.
15301 * xml-syscall.c (syscall_start_syscall): Likewise.
15302 * xml-tdesc.c (tdesc_start_target): Likewise.
15303 (tdesc_start_feature): Likewise.
15304 (tdesc_start_reg): Likewise.
15305 (tdesc_start_union): Likewise.
15306 (tdesc_start_struct): Likewise.
15307 (tdesc_start_flags): Likewise.
15308 (tdesc_start_enum): Likewise.
15309 (tdesc_start_field): Likewise.
15310 (tdesc_start_enum_value): Likewise.
15311 (tdesc_start_vector): Likewise.
15312
15313 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15314
15315 * extension.h (struct xmethod_worker) <clone>: Remove.
15316 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15317 Remove.
15318 (python_xmethod_worker::clone): Remove.
15319 * valops.c (find_overload_match): Use std::move instead of
15320 clone.
15321
15322 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15323
15324 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15325 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15326 <free_xmethod_worker_data>: Remove.
15327 <get_matching_xmethod_workers>: Chance VEC to std::vector.
15328 <get_xmethod_arg_types>: Remove.
15329 <get_xmethod_result_type>: Remove.
15330 <invoke_xmethod>: Remove.
15331 * extension.c (new_xmethod_worker): Remove.
15332 (clone_xmethod_worker): Remove.
15333 (get_matching_xmethod_workers): Return void, pass std::vector by
15334 pointer.
15335 (get_xmethod_arg_types): Rename to...
15336 (xmethod_worker::get_arg_types): ... this, and adjust.
15337 (get_xmethod_result_type): Rename to...
15338 (xmethod_worker::get_result_type): ... this, and adjust.
15339 (invoke_xmethod): Remove.
15340 (free_xmethod_worker): Remove.
15341 (free_xmethod_worker_vec): Remove.
15342 * extension.h (enum ext_lang_rc): Move here from
15343 extension-priv.h.
15344 (struct xmethod_worker): Add constructor and destructor.
15345 <data>: Remove.
15346 <value>: Remove.
15347 <invoke, clone, do_get_result_type, do_get_arg_types>: New
15348 virtual pure methods.
15349 <get_arg_types, get_result_type>: New methods.
15350 (xmethod_worker_ptr): Remove typedef.
15351 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15352 (xmethod_worker_vec): Remove typedef.
15353 (xmethod_worker_up): New typedef.
15354 (invoke_xmethod): Remove.
15355 (clone_xmethod_worker): Remove.
15356 (free_xmethod_worker): Remove.
15357 (free_xmethod_worker_vec): Remove.
15358 (get_xmethod_arg_types): Remove.
15359 (get_xmethod_result_type): Remove.
15360 * valops.c (find_method_list): Use std::vector, don't use
15361 intermediate vector.
15362 (value_find_oload_method_list): Use std::vector.
15363 (find_overload_match): Use std::vector.
15364 (find_oload_champ): Use std::vector.
15365 * value.c (value_free): Use operator delete.
15366 (value_of_xmethod): Rename to...
15367 (value_from_xmethod): ... this. Don't assign
15368 xmethod_worker::value, take rvalue-reference.
15369 (result_type_of_xmethod): Adjust.
15370 (call_xmethod): Adjust.
15371 * value.h: Include extension.h.
15372 (struct xmethod_worker): Don't forward-declare.
15373 (value_of_xmethod): Rename to...
15374 (value_from_xmethod): ... this, take rvalue-reference.
15375 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15376 (struct python_xmethod_worker): ... this, add constructor and
15377 destructor.
15378 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15379 (gdbpy_free_xmethod_worker_data): Rename to...
15380 (python_xmethod_worker::~python_xmethod_worker): ... this and
15381 adjust.
15382 (gdbpy_clone_xmethod_worker_data): Rename to...
15383 (python_xmethod_worker::clone): ... this and adjust.
15384 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15385 temporary vector.
15386 (gdbpy_get_xmethod_arg_types): Rename to...
15387 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15388 (gdbpy_get_xmethod_result_type): Rename to...
15389 (python_xmethod_worker::do_get_result_type): ... this and
15390 adjust.
15391 (gdbpy_invoke_xmethod): Rename to...
15392 (python_xmethod_worker::invoke): ... this and adjust.
15393 (new_python_xmethod_worker): Rename to...
15394 (python_xmethod_worker::python_xmethod_worker): ... this and
15395 adjust.
15396 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15397 Remove.
15398 (gdbpy_free_xmethod_worker_data): Remove.
15399 (gdbpy_get_matching_xmethod_workers): Use std::vector.
15400 (gdbpy_get_xmethod_arg_types): Remove.
15401 (gdbpy_get_xmethod_result_type): Remove.
15402 (gdbpy_invoke_xmethod): Remove.
15403 * python/python.c (python_extension_ops): Remove obsolete
15404 callbacks.
15405
15406 2018-01-05 Pedro Alves <palves@redhat.com>
15407
15408 PR gdb/18653
15409 * common/signals-state-save-restore.c
15410 (save_original_signals_state): New parameter 'quiet'. Warn if we
15411 find a custom handler preinstalled, instead of internal erroring.
15412 But only warn if !quiet.
15413 * common/signals-state-save-restore.h
15414 (save_original_signals_state): New parameter 'quiet'.
15415 * main.c (captured_main_1): Move save_original_signals_state call
15416 after option handling, and pass QUIET.
15417
15418 2018-01-05 Pedro Alves <palves@redhat.com>
15419
15420 * spu-tdep.c (spu_catch_start): Pass
15421 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15422
15423 2018-01-05 Pedro Alves <palves@redhat.com>
15424
15425 PR gdb/22670
15426 * ada-lang.c (literal_symbol_name_matcher): New function.
15427 (ada_get_symbol_name_matcher): Use it for
15428 symbol_name_match_type::SEARCH_NAME.
15429 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
15430 it down instead of assuming symbol_name_match_type::FULL.
15431 * block.h (block_lookup_symbol): New parameter 'match_type'.
15432 * c-valprint.c (print_unpacked_pointer): Use
15433 lookup_symbol_search_name instead of lookup_symbol.
15434 * compile/compile-object-load.c (get_out_value_type): Pass down
15435 symbol_name_match_type::SEARCH_NAME.
15436 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15437 symbol_name_match_type::FULL.
15438 * cp-support.c (cp_get_symbol_name_matcher): Handle
15439 symbol_name_match_type::SEARCH_NAME.
15440 * infrun.c (insert_exception_resume_breakpoint): Use
15441 lookup_symbol_search_name.
15442 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15443 * psymtab.c (maintenance_check_psymtabs): Use
15444 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15445 * stack.c (print_frame_args): Use lookup_symbol_search_name and
15446 SYMBOL_SEARCH_NAME.
15447 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15448 if symbol_name_match_type::SEARCH_NAME.
15449 (lookup_symbol_in_language): Pass down
15450 symbol_name_match_type::FULL.
15451 (lookup_symbol_search_name): New.
15452 (lookup_language_this): Pass down
15453 symbol_name_match_type::SEARCH_NAME.
15454 (lookup_symbol_aux, lookup_local_symbol): New parameter
15455 'match_type'. Pass it down.
15456 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15457 (lookup_symbol_search_name): New declaration.
15458 (lookup_symbol_in_block): New 'match_type' parameter.
15459
15460 2018-01-05 Pedro Alves <palves@redhat.com>
15461
15462 PR gdb/22670
15463 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15464 ada_lookup_symbol.
15465 (ada_lookup_symbol): Reimplement in terms of
15466 ada_lookup_symbol_list, bits factored out from
15467 ada_lookup_encoded_symbol.
15468
15469 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15470
15471 * ada-exp.y (write_object_renaming): When subscripting an array
15472 using a symbol as the index, pass the block in call to
15473 ada_lookup_encoded_symbol when looking that symbol up.
15474
15475 2018-01-05 Jerome Guitton <guitton@adacore.com>
15476
15477 * ada-lang.c (ada_array_length): Use ada_index_type instead of
15478 TYPE_INDEX_TYPE.
15479
15480 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15481
15482 * ada-lang.c (ada_to_fixed_value_create): Add handling of
15483 the case where VALUE_LVAL (val0) is not lval_memory.
15484
15485 2018-01-05 Xavier Roirand <roirand@adacore.com>
15486
15487 * ada-valprint.c (print_optional_low_bound): Handle
15488 character-indexed array printing like boolean-indexed array
15489 printing.
15490
15491 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15492
15493 * NEWS: Create a new section for the next release branch.
15494 Rename the section of the current branch, now that it has
15495 been cut.
15496
15497 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15498
15499 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15500 * version.in: Bump version to 8.1.50.DATE-git.
15501
15502 2018-01-03 Xavier Roirand <roirand@adacore.com>
15503
15504 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15505 Add field.
15506 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15507 Add field.
15508 (default_exception_support_info) <catch_handlers_sym>: Add field.
15509 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15510 (ada_exception_name_addr_1): Add "catch handlers" handling.
15511 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15512 Update all callers.
15513 (create_excep_cond_exprs) <ex>: Add parameter.
15514 (re_set_exception): Update create_excep_cond_exprs call.
15515 (print_it_exception, print_one_exception, print_mention_exception)
15516 (print_recreate_exception): Add "catch handler" handling.
15517 (allocate_location_catch_handlers, re_set_catch_handlers)
15518 (check_status_catch_handlers, print_it_catch_handlers)
15519 (print_one_catch_handlers, print_mention_catch_handlers)
15520 (print_recreate_catch_handlers): New function.
15521 (catch_handlers_breakpoint_ops): New variable.
15522 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15523 Add parameter. Add "catch handler" handling.
15524 (ada_exception_sym_name, ada_exception_breakpoint_ops):
15525 Add "catch handler" handling.
15526 (ada_exception_catchpoint_cond_string): Add "catch handler"
15527 handling.
15528 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15529 call.
15530 (catch_ada_handlers_command): New function.
15531 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15532 operations structure.
15533 (_initialize_ada_language): Add "catch handlers" command entry.
15534 * NEWS: Document "catch handlers" feature.
15535
15536 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15537
15538 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15539 account when creating the array type of the slice.
15540 (ada_value_slice): Likewise.
15541
15542 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15543
15544 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15545 New enum value.
15546 (create_array_type_with_stride): Add byte_stride_prop parameter.
15547 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15548 New parameter. Update all callers in this file.
15549 (array_type_has_dynamic_stride): New function.
15550 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15551 of arrays with dynamic byte strides.
15552 * dwarf2read.c (read_array_type): Add support for dynamic
15553 DW_AT_byte_stride attributes.
15554
15555 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15556
15557 * dwarf2read.c (read_unspecified_type): Treat
15558 DW_TAG_enumeration_type DIEs from Ada units as stubs.
15559
15560 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15561
15562 Update copyright year range in all GDB files.
15563
15564 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
15565
15566 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15567 and gdb/testsuite/gdb.base/step-line.c.
15568
15569 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15570
15571 * copyright.py (main): Dump the contents of
15572 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15573 even if BY_HAND is empty.
15574
15575 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15576
15577 * top.c (print_gdb_version): Update Copyright year in version
15578 message.
15579
15580 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15581
15582 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15583
15584 For older changes see ChangeLog-2017.
15585 \f
15586 Local Variables:
15587 mode: change-log
15588 left-margin: 8
15589 fill-column: 74
15590 version-control: never
15591 coding: utf-8
15592 End: