gdb: Guard against NULL dereference in dwarf2_init_integer_type
[binutils-gdb.git] / gdb / ChangeLog
1 2018-11-07 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * dwarf2read.c (dwarf2_init_integer_type): Check for name being
4 NULL before dereferencing it.
5
6 2018-11-06 Tom de Vries <tdevries@suse.de>
7
8 * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
9 program headers.
10
11 2018-11-06 Max Filippov <jcmvbkbc@gmail.com>
12
13 * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
14 so that it applies to uclinux as well.
15
16 2018-11-06 Marius Muench <marius.muench@eurecom.fr>
17
18 * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
19 when on AAPCS.
20
21 2018-11-06 John Baldwin <jhb@FreeBSD.org>
22
23 * riscv-fbsd-nat.c (getregs_supplies): Return true for
24 RISCV_CSR_SSTATUS_REGNUM.
25
26 2018-11-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
27
28 * source.c (open_source_file): Fix leak by transferring the
29 current s->fullname to the unique_xmalloc_ptr fullname given
30 to find_and_open_source.
31
32 2018-11-04 Tom Tromey <tom@tromey.com>
33
34 * varobj.c (install_default_visualizer): Update.
35 * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
36 Return gdbpy_ref.
37 * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
38 (find_pretty_printer_from_progspace)
39 (find_pretty_printer_from_gdb, find_pretty_printer)
40 (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
41 (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
42 Update.
43
44 2018-11-04 Tom Tromey <tom@tromey.com>
45
46 * python/python.c (gdbpy_parameter_value): Update.
47 * python/python-internal.h (python_string_to_unicode)
48 (python_string_to_target_python_string)
49 (host_string_to_python_string): Return gdbpy_ref.
50 * python/py-utils.c (python_string_to_unicode)
51 (unicode_to_encoded_python_string)
52 (unicode_to_target_python_string)
53 (python_string_to_target_string)
54 (python_string_to_target_python_string): Return gdbpy_ref.
55 (python_string_to_host_string): Update.
56 (host_string_to_python_string): Return gdbpy_ref.
57 * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
58 (stpy_fullname): Update.
59 * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
60 Update.
61 * python/py-prettyprint.c (print_string_repr): Update.
62 * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
63 (objfpy_get_build_id): Update.
64 * python/py-breakpoint.c (bppy_get_location)
65 (bppy_get_expression, bppy_get_condition, bppy_get_commands):
66 Update.
67
68 2018-11-04 Tom Tromey <tom@tromey.com>
69
70 * python/python-internal.h (gdb_py_object_from_longest)
71 (gdb_py_object_from_ulongest): Return gdbpy_ref.
72 * python/py-value.c (valpy_int): Update.
73 * python/py-utils.c (gdb_py_object_from_longest): Return
74 gdbpy_ref.
75 (gdb_py_object_from_ulongest): Likewise.
76 * python/py-type.c (typy_get_alignof): Update.
77 * python/py-linetable.c (ltpy_get_all_source_lines)
78 (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
79 * python/py-block.c (blpy_get_start, blpy_get_end): Update.
80
81 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
82
83 * ada-lang.c (_initialize_ada_language): Fix typo.
84
85 2018-11-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
86
87 * language.c (type): Remove.
88 (_initialize_language): Remove assignment to type.
89
90 2018-11-02 Joel Brobecker <brobecker@adacore.com>
91
92 * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
93 * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
94 (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
95 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
96 (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
97 (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
98 * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
99 and aarch64-ravenscar-thread.o.
100 * NEWS: Add entry documenting Ravenscar tasking support
101 on AArch64 ELF.
102
103 2018-11-02 Matthew Malcomson <matthew.malcomson@arm.com>
104
105 * symtab.c (info_functions_command): Initialize quiet flag.
106 * stack.c (info_args_command): Likewise.
107
108 2018-11-01 Jim Wilson <jimw@sifive.com>
109
110 * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
111 Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
112 debugging messages.
113
114 2018-11-01 Joel Brobecker <brobecker@adacore.com>
115
116 * ada-lang.c (ada_watch_location_expression): New function.
117 (ada_language_defn): Set la_watch_location_expression to
118 ada_watch_location_expression.
119
120 2018-11-01 Joel Brobecker <brobecker@adacore.com>
121
122 * print-utils.c (int_string): Remove unnecessary trailing spaces.
123
124 2018-11-01 Joel Brobecker <brobecker@adacore.com>
125
126 * rs6000-tdep.c (skip_prologue): Fix potential negative left
127 shifting.
128
129 2018-11-01 Jerome Guitton <guitton@adacore.com>
130 Joel Brobecker <brobecker@adacore.com>
131
132 * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
133 * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
134 * arm-pikeos-tdep.c: New file.
135 * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
136 embedded system.
137 * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
138
139 2018-11-01 Simon Marchi <simon.marchi@ericsson.com>
140
141 * common/pathstuff.c (get_standard_temp_dir): New.
142 * common/pathstuff.h (get_standard_temp_dir): New.
143 * config.in: Re-generate.
144 * configure: Re-generate.
145 * configure.ac: Don't check for mkdtemp.
146 * gnulib/aclocal-m4-deps.mk: Re-generate.
147 * gnulib/aclocal.m4: Re-generate.
148 * gnulib/config.in: Re-generate.
149 * gnulib/configure: Re-generate.
150 * gnulib/import/Makefile.am: Re-generate.
151 * gnulib/import/Makefile.in: Re-generate.
152 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
153 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
154 * gnulib/import/m4/mkdtemp.m4: New file.
155 * gnulib/import/mkdtemp.c: New file.
156 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
157 Add mkdtemp module.
158 * unittests/mkdir-recursive-selftests.c (test): Use
159 get_standard_temp_dir.
160 (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
161 ifdef.
162 * compile/compile.c (get_compile_file_tempdir): Likewise.
163
164 2018-11-01 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
165
166 * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
167 (SIG_FRAME_LR_OFFSET64): New define.
168 (SIG_FRAME_FP_OFFSET64): New define.
169 (aix_sighandle_frame_cache): New Function.
170 (aix_sighandle_frame_this_id): New Function.
171 (aix_sighandle_frame_prev_register): New Function.
172 (aix_sighandle_frame_sniffer): New Function.
173 (aix_sighandle_frame_unwind): New global variable.
174 (rs6000_aix_init_osabi): Install new frame unwinder.
175
176 2018-10-31 Sergio Durigan Junior <sergiodj@redhat.com>
177
178 PR gdb/23835
179 * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
180 already defined.
181
182 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
183
184 * ppc-linux-nat.c: Include nat/linux-ptrace.h.
185
186 2018-10-31 Andrew Burgess <andrew.burgess@embecosm.com>
187
188 * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
189 (producer_is_icc): New function.
190 (check_producer): Set producer_is_icc field on dwarf2_cu.
191 (dwarf2_init_integer_type): New function.
192 (read_base_type): Call dwarf2_init_integer_type instead of
193 init_integer_type in all cases.
194 (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
195 * valprint.c (maybe_negate_by_bytes): Add an assertion that the
196 LEN is greater than 0.
197
198 2018-10-30 Tom Tromey <tom@tromey.com>
199
200 * main.c (captured_main_1): Check return value of bfd_init.
201
202 2018-10-29 Sergio Durigan Junior <sergiodj@redhat.com>
203
204 * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
205 Adjust comments.
206
207 2018-10-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
208
209 * procfs.c: Include common/pathstuff.h.
210
211 2018-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
212
213 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
214 Add missing braces. No functional change.
215
216 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
217
218 * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
219 to report a bad option and fix indentation.
220 * demangle.c (demangle_command): Use report_unrecognized_option_error
221 to report a bad option and correctly report the bad option.
222
223 2018-10-27 Tom Tromey <tom@tromey.com>
224
225 PR cli/23364:
226 * darwin-nat.c (copied_shell): New global.
227 (may_have_sip): Rename from should_disable_startup_with_shell.
228 (copy_shell_to_cache, maybe_cache_shell): New functions.
229 (darwin_nat_target::create_inferior): Update. Use
230 copied_shell.
231
232 2018-10-27 Tom Tromey <tom@tromey.com>
233
234 * unittests/scoped_fd-selftests.c (test_to_file): New function.
235 (run_tests): Call test_to_file.
236 * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
237 temporary files.
238 * common/scoped_fd.h (scoped_fd::to_file): New method.
239
240 2018-10-27 Tom Tromey <tom@tromey.com>
241
242 * unittests/scoped_mmap-selftests.c (test_normal): Use
243 gdb_mkostemp_cloexec.
244 * unittests/scoped_fd-selftests.c (test_destroy, test_release):
245 Use gdb_mkostemp_cloexec.
246 * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
247 gnulib/config.in, gnulib/configure,
248 gnulib/import/Makefile.am, gnulib/import/Makefile.in,
249 gnulib/import/m4/gnulib-cache.m4,
250 gnulib/import/m4/gnulib-comp.m4: Update.
251 * gnulib/import/m4/mkostemp.m4: New file.
252 * gnulib/import/m4/mkstemp.m4: Remove.
253 * gnulib/import/mkostemp.c: New file.
254 * gnulib/import/mkstemp.m4: Remove.
255 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
256 mkstemp, add mkostemp. Apply new patch.
257 * gnulib/import/stdlib.in.h: Apply patch.
258 * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
259 New file.
260 * dwarf-index-write.c (write_psymtabs_to_index): Use
261 gdb_mkostemp_cloexec.
262 * common/filestuff.h (gdb_mkostemp_cloexec): New function.
263
264 2018-10-27 Tom Tromey <tom@tromey.com>
265
266 * unittests/mkdir-recursive-selftests.c: New file.
267 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
268 unittests/mkdir-recursive-selftests.c.
269 * dwarf-index-cache.c (mkdir_recursive): Move to
270 common/filestuff.c.
271 (index_cache::store): Check return value of mkdir_recursive.
272 (create_dir_and_check, test_mkdir_recursive): Move to new file.
273 (_initialize_index_cache): Don't register test.
274 * common/filestuff.h (mkdir_recursive): Declare.
275 * common/filestuff.c (mkdir_recursive): Move from
276 dwarf-index-cache.c. Return bool.
277
278 2018-10-27 Tom Tromey <tom@tromey.com>
279
280 * dwarf-index-write.c (write_psymtabs_to_index): Move
281 make_temp_filename to common/pathstuff.c.
282 * common/pathstuff.h (make_temp_filename): Declare.
283 * common/pathstuff.c (make_temp_filename): New function, moved
284 from dwarf-index-write.c.
285
286 2018-10-27 Tom Tromey <tom@tromey.com>
287
288 * procfs.c (procfs_target::create_inferior): Use get_shell.
289 * cli/cli-cmds.c (shell_escape): Use get_shell.
290 * windows-nat.c (windows_nat_target::create_inferior): Use
291 get_shell.
292 * common/pathstuff.c (get_shell): New function.
293 * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
294 (fork_inferior): Use get_shell.
295 * common/pathstuff.h (get_shell): Declare.
296
297 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
298
299 * NEWS: Mention changes to 'info [args|functions|locals|variables]'
300
301 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
302
303 * stack.c (print_variable_and_value_data): Add preg and treg.
304 (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
305 and update callers.
306 (print_frame_arg_vars): Likewise.
307 (prepare_reg): New function.
308 (info_locals_command): Extract info print args and use them.
309 (info_args_command): Likewise.
310 (_initialize_stack): Modify on-line help.
311 * symtab.c (treg_matches_sym_type_name): New function.
312 (search_symbols): New arg t_regexp.
313 (symtab_symbol_info): New args quiet, regexp, t_regexp.
314 (info_variables_command): Extract info print args and use them.
315 (info_functions_command): Likewise.
316 (info_types_command): Update call to symtab_symbol_info.
317 (_initialize_symtab): Modify on-line help.
318 * symtab.h (treg_matches_sym_type_name): New function.
319 (search_symbols): New t_regexp arg.
320
321 2018-10-27 Philippe Waroquiers <philippe.waroquiers@skynet.be>
322
323 * cli-utils.c (extract_arg_maybe_quoted): New function.
324 (extract_info_print_args): New function.
325 (info_print_args_help): New function.
326 (report_unrecognized_option_error): New function.
327 * cli-utils.h (extract_arg_maybe_quoted): New function.
328 (extract_info_print_args): New function.
329 (info_print_args_help): New function.
330 (report_unrecognized_option_error): New function.
331
332 2018-10-26 Tom Tromey <tom@tromey.com>
333
334 * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
335 (compute_compunit_symtab_includes): Update.
336 * symtab.h: (symtab_ptr): Remove typedef. Don't define a VEC.
337 (compunit_symtab_ptr): Likewise.
338
339 2018-10-26 John Baldwin <jhb@FreeBSD.org>
340
341 * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
342 default_print_auxv_entry for specific tag values.
343
344 2018-10-26 John Baldwin <jhb@FreeBSD.org>
345
346 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
347
348 2018-10-26 Jim Wilson <jimw@sifive.com>
349
350 * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
351 (riscv_linux_sigframe_init): Declare.
352 (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
353 (riscv_linux_sigframe): New.
354 (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
355 (riscv_linux_sigframe_init): Define.
356 (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
357
358 * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
359 (riscv_isa_flen): Likewise. Drop static.
360 * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
361 (riscv_isa_flen): Likewise. Declare.
362
363 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
364 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
365
366 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
367 (tdesc_powerpc_isa207_htm_vsx64l): Declare.
368 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
369 (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
370 (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
371 (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
372 (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
373 Define.
374 (struct ppc_linux_features) <htm>: New field.
375 (ppc_linux_no_features): Add initializer for htm field.
376 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
377 new tdescs.
378 * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
379 (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
380 (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
381 Define if not already defined.
382 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
383 and rs6000/powerpc-isa207-htm-vsx64l.
384 (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
385 rs6000/powerpc-isa207-htm-vsx64l.xml.
386 * features/rs6000/power-htm-spr.xml: New file.
387 * features/rs6000/power-htm-core.xml: New file.
388 * features/rs6000/power64-htm-core.xml: New file.
389 * features/rs6000/power-htm-fpu.xml: New file.
390 * features/rs6000/power-htm-altivec.xml: New file.
391 * features/rs6000/power-htm-vsx.xml: New file.
392 * features/rs6000/power-htm-ppr.xml: New file.
393 * features/rs6000/power-htm-dscr.xml: New file.
394 * features/rs6000/power-htm-tar.xml: New file.
395 * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
396 * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
397 * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
398 * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
399 * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
400 * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
401 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
402 fetch_regset with HTM regsets.
403 (store_register, store_ppc_registers): Call store_regset with HTM
404 regsets.
405 (ppc_linux_nat_target::read_description): Set htm field in the
406 features struct if needed.
407 * ppc-linux-tdep.c: Include
408 features/rs6000/powerpc-isa207-htm-vsx32l.c and
409 features/rs6000/powerpc-isa207-htm-vsx64l.c.
410 (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
411 (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
412 (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
413 (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
414 (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
415 (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
416 (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
417 (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
418 (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
419 (ppc32_linux_ctarregset): New globals.
420 (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
421 (ppc_linux_collect_core_cpgrregset): New function.
422 (ppc_linux_iterate_over_regset_sections): Call back with the htm
423 regsets.
424 (ppc_linux_core_read_description): Check if the tm spr section is
425 present and set htm in the features struct.
426 (_initialize_ppc_linux_tdep): Call
427 initialize_tdesc_powerpc_isa207_htm_vsx32l and
428 initialize_tdesc_powerpc_isa207_htm_vsx64l.
429 * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
430 Declare.
431 (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
432 (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
433 (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
434 * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
435 New fields.
436 <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
437 Likewise.
438 <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
439 <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
440 (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
441 New enum fields.
442 <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
443 <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
444 <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
445 <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
446 <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
447 <PPC_CTAR_REGNUM>: Likewise.
448 (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
449 (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
450 * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
451 (IS_CEFP_PSEUDOREG): Define.
452 (rs6000_register_name): Hide the upper halves of checkpointed VSX
453 registers. Return names for the checkpointed DFP, VSX, and EFP
454 pseudo registers.
455 (rs6000_pseudo_register_type): Remove initial assert and raise an
456 internal error in the else clause instead. Return types for the
457 checkpointed DFP, VSX, and EFP pseudo registers.
458 (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
459 checkpointed DFP pseudo registers.
460 (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
461 checkpointed VSX pseudo registers.
462 (efp_pseudo_register_read, efp_pseudo_register_write): Rename
463 from efpr_pseudo_register_read and
464 efpr_pseudo_register_write. Handle checkpointed EFP pseudo
465 registers.
466 (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
467 Handle checkpointed DFP, VSX, and EFP registers.
468 (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
469 (efp_ax_pseudo_register_collect): New functions.
470 (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
471 register logic to new functions. Handle checkpointed DFP, VSX,
472 and EFP pseudo registers.
473 (rs6000_gdbarch_init): Look for and validate the htm features.
474 Include checkpointed DFP, VSX and EFP pseudo-registers.
475 * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
476 HTM registers.
477
478 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
479
480 * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
481 without altivec or fpu.
482
483 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
484 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
485
486 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
487 (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
488 * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
489 Define if not already defined.
490 * features/rs6000/power-ebb.xml: New file.
491 * features/rs6000/power-linux-pmu.xml: New file.
492 * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
493 features.
494 * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
495 * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
496 * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
497 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
498 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
499 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
500 fetch_regset with ebb and pmu regsets.
501 (store_register, store_ppc_registers): Call store_regset with ebb
502 and pmu regsets.
503 (ppc_linux_nat_target::read_description): Set isa207 field in the
504 features struct if ebb and pmu are avaiable.
505 * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
506 (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
507 (ppc_linux_iterate_over_regset_sections): Call back with the ebb
508 and pmu regsets.
509 (ppc_linux_core_read_description): Check if the pmu section is
510 present and set isa207 in the features struct.
511 * ppc-linux-tdep.h (ppc32_linux_ebbregset)
512 (ppc32_linux_pmuregset): Declare.
513 * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
514 <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
515 <ppc_sier_regnum>: New field.
516 (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
517 New enum values.
518 <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
519 values.
520 <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
521 (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
522 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
523 ebb and pmu features.
524
525 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
526 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
527
528 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
529 (tdesc_powerpc_isa207_vsx64l): Declare.
530 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
531 (struct ppc_linux_features) <isa207>: New field.
532 (ppc_linux_no_features): Add initializer for isa207 field.
533 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
534 new tdescs.
535 * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
536 (NT_PPC_TAR): Define if not already defined.
537 * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
538 rs6000/powerpc-isa207-vsx64l.
539 (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
540 rs6000/powerpc-isa207-vsx64l.xml.
541 * features/rs6000/power-tar.xml: New file.
542 * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
543 * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
544 * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
545 * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
546 * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
547 * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
548 * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
549 fetch_regset with the TAR regset.
550 (store_register, store_ppc_registers): Call store_regset with the
551 TAR regset.
552 (ppc_linux_nat_target::read_description): Set isa207 field in the
553 features struct if needed.
554 * ppc-linux-tdep.c: Include
555 features/rs6000/powerpc-isa207-vsx32l.c and
556 features/rs6000/powerpc-isa207-vsx64l.c.
557 (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
558 (ppc_linux_iterate_over_regset_sections): Call back with the tar
559 regset.
560 (ppc_linux_core_read_description): Check if the tar section is
561 present and set isa207 in the features struct.
562 (_initialize_ppc_linux_tdep): Call
563 initialize_tdesc_powerpc_isa207_vsx32l and
564 initialize_tdesc_powerpc_isa207_vsx64l.
565 * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
566 * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
567 (enum) <PPC_TAR_REGNUM>: New enum value.
568 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
569 feature.
570 (ppc_process_record_op31): Record changes to TAR.
571
572 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
573 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
574
575 * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
576 (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
577 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
578 (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
579 (struct ppc_linux_features) <ppr_dscr>: New field.
580 (ppc_linux_no_features): Add initializer for ppr_dscr field.
581 * arch/ppc-linux-common.c (ppc_linux_match_description): Return
582 new tdescs.
583 * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
584 Define if not already defined.
585 * features/Makefile (WHICH): Add
586 rs6000/powerpc-isa205-ppr-dscr-vsx32l and
587 rs6000/powerpc-isa205-ppr-dscr-vsx64l.
588 (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
589 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
590 * features/rs6000/power-dscr.xml: New file.
591 * features/rs6000/power-ppr.xml: New file.
592 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
593 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
594 * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
595 * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
596 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
597 * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
598 * ppc-linux-nat.c: Include <sys/uio.h>.
599 (fetch_regset, store_regset, check_regset): New functions.
600 (fetch_register, fetch_ppc_registers): Call fetch_regset with
601 DSCR and PPR regsets.
602 (store_register, store_ppc_registers): Call store_regset with
603 DSCR and PPR regsets.
604 (ppc_linux_get_hwcap2): New function.
605 (ppc_linux_nat_target::read_description): Call
606 ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
607 features struct if needed.
608 * ppc-linux-tdep.c: Include
609 features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
610 features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
611 (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
612 (ppc32_linux_dscrregset): New globals.
613 (ppc_linux_iterate_over_regset_sections): Call back with the ppr
614 and dscr regsets.
615 (ppc_linux_core_read_description): Check if the ppr and dscr
616 sections are present and set ppr_dscr in the features struct.
617 (_initialize_ppc_linux_tdep): Call
618 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
619 initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
620 * ppc-linux-tdep.h (ppc32_linux_pprregset)
621 (ppc32_linux_dscrregset): Declare.
622 * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
623 <ppc_dscr_regnum>: New field.
624 (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
625 * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
626 and dscr features.
627 (ppc_process_record_op31): Record changes to PPR and DSCR.
628
629 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
630
631 * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
632 second initializer line for the have_* variables. Initialize
633 have_fpu to 0 instead of 1.
634
635 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
636
637 * arch/ppc-linux-common.c (ppc_linux_match_description):
638 Parenthesize tdesc assignements and indent them properly.
639
640 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
641
642 * ppc-linux-nat.c (fetch_register): Change if statement to else
643 if.
644 (store_register): Likewise.
645
646 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
647
648 * rs6000-tdep.c: Remove reggroups.h include.
649 (rs6000_pseudo_register_reggroup_p): Remove.
650 (rs6000_gdbarch_init): Remove call to
651 set_tdesc_pseudo_register_reggroup_p.
652
653 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
654
655 * reggroups.c (default_register_reggroup_p): Return true for
656 decfloat registers and float_reggroup.
657
658 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
659
660 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
661 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
662 ppc_linux_collect_vrregset by regcache_collect_regset.
663
664 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
665
666 * linux-tdep.c (linux_collect_regset_section_cb): Use
667 std::vector<gdb_byte> instead of char * and malloc for buf.
668 Remove xfree.
669
670 2018-10-26 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
671
672 * xcoffread.c (read_xcoff_symtab): Pass deduced language to
673 symtab_start instead of always using language_unknown.
674
675 2018-10-26 Andrew Burgess <andrew.burgess@embecosm.com>
676
677 * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
678 READ_P parameter, catch and ignore register access errors from
679 either the old or new MISA location.
680 (riscv_has_feature): Update call to riscv_read_misa_reg.
681
682 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
683
684 * python/py-function.c (convert_values_to_python): Return
685 gdbpy_ref<>. Add header comment.
686 (fnpy_call): Adjust.
687
688 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
689
690 * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
691 (cmdpy_completer_handle_brkchars): Adjust.
692 (cmdpy_completer): Adjust.
693
694 2018-10-25 Andrew Burgess <andrew.burgess@embecosm.com>
695
696 * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
697 Pass correct regnum to raw_supply_zeroed.
698
699 2018-10-23 Hafiz Abid Qadeer <abidh@codesourcery.com>
700
701 * regcache.c (cooked_read_test): Add CSKY to the list of
702 architectures with a save_reggroup
703
704 2018-10-23 Simon Marchi <simon.marchi@polymtl.ca>
705
706 PR gdb/23368
707 * infrun.c (follow_exec): In the follow_exec_mode_new case,
708 transfer terminal state from old new new inferior.
709 * terminal.h (swap_terminal_info): New function.
710 * inflow.c (swap_terminal_info): New function.
711
712 2018-10-23 Tom Tromey <tom@tromey.com>
713
714 * record-btrace.c (get_thread_current_frame_id): Rename from
715 get_thread_current_frame. Return a frame_id.
716 (record_btrace_start_replaying): Update.
717
718 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
719
720 * riscv-tdep.c (riscv_register_name): Use the user-friendly names
721 for CSRs.
722
723 2018-10-23 Joel Brobecker <brobecker@adacore.com>
724
725 * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
726 have_nonsteppable_watchpoint attribute to 1.
727
728 2018-10-23 Andrew Burgess <andrew.burgess@embecosm.com>
729
730 * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
731 register names.
732 (struct register_alias): Rename to...
733 (struct riscv_register_alias): ...this, and update comment.
734 (riscv_register_aliases): Update type, and alias names. Remove
735 CSR names from this list.
736 (riscv_register_name): Use riscv_gdb_reg_names for int and float
737 register names. Add an extra assertion.
738 (riscv_is_regnum_a_named_csr): New function.
739 (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
740
741 2018-10-22 Jim Wilson <jimw@sifive.com>
742
743 * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
744 FP reg smaller than FP reg size, and fill with -1 instead of 0.
745
746 * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
747 (riscv_register_type): Use them.
748 (riscv_print_one_register_info): Handle union of floats same as float.
749 * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
750 riscv_fpreg_q_type fields.
751
752 2018-10-21 Simon Marchi <simon.marchi@ericsson.com>
753
754 * gdbarch.sh (gdbarch_num_cooked_regs): New.
755 * gdbarch.h: Re-generate.
756 * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
757 * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
758 * eval.c (evaluate_subexp_standard): Likewise.
759 * findvar.c (value_of_register): Likewise.
760 (value_of_register_lazy): Likewise.
761 (address_from_register): Likewise.
762 * frame.c (get_frame_register_bytes): Likewise.
763 * gdbarch-selftests.c (register_to_value_test): Likewise.
764 * h8300-tdep.c (h8300_register_type): Likewise.
765 * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
766 (i386_svr4_reg_to_regnum): Likewise.
767 * infcmd.c (default_print_registers_info): Likewise.
768 (registers_info): Likewise.
769 (print_vector_info): Likewise.
770 (default_print_float_info): Likewise.
771 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
772 * mdebugread.c (mdebug_reg_to_regnum): Likewise.
773 * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
774 (mi_cmd_data_list_changed_registers): Likewise.
775 (mi_cmd_data_list_register_values): Likewise.
776 (mi_cmd_data_write_register_values): Likewise.
777 (mi_cmd_trace_frame_collected): Likewise.
778 * mips-tdep.c (print_gp_register_row): Likewise.
779 (mips_print_registers_info): Likewise.
780 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
781 * regcache.c (init_regcache_descr): Likewise.
782 (register_size): Likewise.
783 (register_dump::dump): Likewise.
784 (cooked_read_test): Likewise.
785 (cooked_write_test): Likewise.
786 * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
787 (rs6000_gdbarch_init): Likewise.
788 * stabsread.c (stab_reg_to_regnum): Likewise.
789 * stack.c (info_frame_command): Likewise.
790 * target-descriptions.c (tdesc_register_name): Likewise.
791 * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
792 * tui/tui-regs.c (tui_show_register_group): Likewise.
793 * user-regs.c (user_reg_map_name_to_regnum): Likewise.
794 (user_reg_map_regnum_to_name): Likewise.
795 (value_of_user_reg): Likewise.
796 (maintenance_print_user_registers): Likewise.
797 * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
798 (xtensa_register_name): Likewise.
799 (xtensa_register_type): Likewise.
800 (xtensa_reg_to_regnum): Likewise.
801 (xtensa_pseudo_register_read): Likewise.
802 (xtensa_pseudo_register_write): Likewise.
803
804 2018-10-21 Simon Marchi <simon.marchi@polymtl.ca>
805
806 * amd64-tdep.c (amd64_pseudo_register_read_value): Use
807 correctly-sized buffer with raw_read.
808 (amd64_pseudo_register_write): Use correctly-sized buffer for
809 raw_read/raw_write.
810
811 2018-10-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
812
813 * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
814 in add_prefix_cmd of set print type.
815
816 2018-10-19 Tom Tromey <tom@tromey.com>
817
818 PR tui/18388:
819 * NEWS: Mention tabset deprecation.
820 * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
821 (update_tab_width): New function.
822 (tui_set_tab_width, tui_show_tab_width): New functions.
823 (tui_set_tab_width_command): Use update_tab_width.
824 (_initialize_tui_win): Move to end of file. Deprecate "tabset".
825 Add new "set tui tab-width" command.
826 * tui/tui-source.c (tui_set_source_content): Update.
827 * tui/tui-disasm.c (tui_set_disassem_content): Update.
828 * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
829 Don't declare.
830 (tui_tab_width): Declare.
831 * tui/tui-data.c (default_tab_len, tui_default_tab_len)
832 (tui_set_default_tab_len): Remove.
833
834 2018-10-19 Tom Tromey <tom@tromey.com>
835
836 * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
837 (key_is_backspace, tui_getc): Don't declare.
838 * tui/tui-io.c (key_is_start_sequence): Now static.
839 (key_is_end_sequence, key_is_backspace): Remove.
840 (tui_getc): Now static.
841
842 2018-10-19 Tom Tromey <tom@tromey.com>
843
844 * symfile.c (reread_symbols): Clear "static_links".
845
846 2018-10-19 Alan Hayward <alan.hayward@arm.com>
847
848 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
849 define.
850 (aarch64_linux_sigframe_init): Extra boundary checks.
851
852 2018-10-19 Andreas Arnez <arnez@linux.ibm.com>
853
854 * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
855 the possibly non-existent tdesc type 'vec128', but the type of raw
856 register v16 instead.
857
858 2018-10-19 Gary Benson <gbenson@redhat.com>
859
860 * cli/cli-interp.c (cli_interp::~cli_interp): New function.
861
862 2018-10-18 Sergio Durigan Junior <sergiodj@redhat.com>
863
864 PR cli/23785
865 * cli/cli-dump.c (restore_binary_file): Check if "file" is
866 NULL.
867
868 2018-10-17 Paul Koning <paul_koning@dell.com>
869
870 * charset.c (convert_between_encodings): Fix unsigned overflow.
871
872 2018-10-17 John Baldwin <jhb@FreeBSD.org>
873
874 * fbsd-nat.c (fbsd_nat_target::info_proc) Use
875 fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
876 * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
877 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
878 New functions.
879 (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
880 and fbsd_info_proc_mappings_header.
881 * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
882 (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
883 New.
884
885 2018-10-17 Joel Brobecker <brobecker@adacore.com>
886
887 * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
888 Solaris Maintainer.
889
890 2018-10-15 Tom Tromey <tom@tromey.com>
891
892 * tui/tui.c (strcat_to_buf): Remove casts.
893 * tui/tui-winsource.c (tui_show_source_line)
894 (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
895 * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
896 * tui/tui-windata.c (tui_first_data_item_displayed)
897 (tui_delete_data_content_windows, tui_erase_data_content)
898 (tui_display_all_data, tui_display_data_from)
899 (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
900 * tui/tui-win.c (tui_set_win_height)
901 (make_invisible_and_set_new_height, parse_scrolling_args): Remove
902 casts.
903 * tui/tui-win.c (tui_resize_all): Remove casts.
904 (tui_scroll_backward_command, tui_set_focus)
905 (tui_set_tab_width_command): Likewise.
906 * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
907 * tui/tui-regs.c (tui_show_register_group): Remove cast.
908 * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
909 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
910 * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
911 Remove casts.
912
913 2018-10-15 Simon Marchi <simon.marchi@ericsson.com>
914
915 * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
916 AArch64/ARM maintainer.
917
918 2018-10-11 Gary Benson <gbenson@redhat.com>
919
920 * interps.h (interp::m_name): Make private and mutable.
921 * interps.c (interp::~interp): Free m_name.
922
923 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
924 Simon Marchi <simark@simark.ca>
925
926 * README (`configure' options): Add documentation for new
927 "--enable-unit-tests" option.
928 * acinclude.m4: Include "selftest.m4".
929 * configure: Regenerate.
930 * configure.ac: Use "GDB_AC_SELFTEST".
931 * maint.c (maintenance_selftest): Update message informing
932 that selftests have been disabled.
933 (maintenance_info_selftests): Likewise.
934 * selftest.m4: New file.
935
936 2018-10-10 Gary Benson <gbenson@redhat.com>
937
938 * remote.c (remote_target::remote_send_printf): Add
939 missing va_end found by Coverity.
940
941 2018-10-10 Markus Metzger <markus.t.metzger@intel.com>
942
943 * btrace.c (ftrace_update_function): Add indirect jump heuristic.
944
945 2018-10-09 Tom Tromey <tom@tromey.com>
946
947 * configure: Rebuild.
948 * sanitize.m4 (AM_GDB_UBSAN): Default to no.
949 * NEWS: Update --enable-ubsan documentation.
950
951 2018-10-09 Gary Benson <gbenson@redhat.com>
952
953 * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
954 found by Coverity.
955
956 2018-10-08 Tom Tromey <tom@tromey.com>
957
958 * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
959 variable.
960 (riscv_fbsd_init_abi): Likewise.
961
962 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
963 * valops.c (value_struct_elt_for_reference): Rename local variable
964 to work around the shadowing a previous local warning.
965
966 2018-10-08 John Baldwin <jhb@FreeBSD.org>
967
968 * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
969 * NEWS: Mention new FreeBSD/riscv native configuration.
970 * configure.host: Add riscv*-*-freebsd*.
971 * configure.nat: Likewise.
972 * riscv-fbsd-nat.c: New file.
973
974 2018-10-08 John Baldwin <jhb@FreeBSD.org>
975
976 * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
977 (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
978 (ALLDEPFILES): Add riscv-fbsd-tdep.c.
979 * NEWS: Mention new FreeBSD/riscv target.
980 * configure.tgt: Add riscv*-*-freebsd*.
981 * riscv-fbsd-tdep.c: New file.
982 * riscv-fbsd-tdep.h: New file.
983
984 2018-10-08 John Baldwin <jhb@FreeBSD.org>
985
986 * regcache.h (struct regcache_map_entry): Note that this type can
987 be used with traditional frame caches.
988 * trad-frame.c (trad_frame_set_reg_regmap): New.
989 * trad-frame.h (trad_frame_set_reg_regmap): New.
990
991 2018-10-08 Weimin Pan <weimin.pan@oracle.com>
992
993 PR c++/16841
994 * valops.c (get_virtual_base_offset): New function.
995 (value_struct_elt_for_reference): Use it to get virtual base offset
996 and add it in calculating class member address.
997
998 2018-10-08 John Darrington <john@darrington.wattle.id.au>
999
1000 * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1001 (check_producer): Check if the producer is codewarrior.
1002 (producer_is_codewarrior): New function.
1003 (lnp_state_machine::record_line): Ignore is_stmt flag for records
1004 produced by codewarrior.
1005 (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1006
1007 2018-10-06 Tom Tromey <tom@tromey.com>
1008
1009 PR python/19399:
1010 * python/py-inferior.c: Add "architecture" entry.
1011 (infpy_architecture): New function.
1012
1013 2018-10-06 Tom Tromey <tom@tromey.com>
1014
1015 PR python/21765:
1016 * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1017 SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1018 SYMBOL_TYPES_DOMAIN. Define SYMBOL_MODULE_DOMAIN,
1019 SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1020
1021 2018-10-06 Tom Tromey <tom@tromey.com>
1022
1023 PR build/17077:
1024 * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1025 * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1026 microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1027 #include.
1028
1029 2018-10-06 Tom Tromey <tom@tromey.com>
1030
1031 * python/py-breakpoint.c (bppy_get_location): Handle a
1032 bp_breakpoint without a location.
1033
1034 2018-10-06 Tom Tromey <tom@tromey.com>
1035
1036 * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1037 (_RegEx): Reformat help text.
1038 * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1039 (AnyCallerIs, AnyCallerMatches): Reformat help text.
1040 * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1041 text.
1042 * python/lib/gdb/command/xmethods.py (InfoXMethod)
1043 (EnableXMethod, DisableXMethod): Remove help indentation.
1044 Capitalize meta-syntactic variables.
1045 * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1046 (EnableUnwinder, DisableUnwinder): Remove help indentation.
1047 Capitalize meta-syntactic variables.
1048 * python/lib/gdb/command/explore.py (ExploreCommand)
1049 (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1050 * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1051 (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1052 * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1053 Remove help indentation.
1054 (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1055 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1056 (DisableFrameFilter, SetFrameFilterPriority)
1057 (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1058
1059 2018-10-06 Tom Tromey <tom@tromey.com>
1060
1061 PR tui/28819:
1062 * tui/tui-io.c (gdb_wgetch): New function.
1063 (tui_mld_getc, tui_getc): Use it.
1064
1065 2018-10-05 Tom Tromey <tom@tromey.com>
1066
1067 * sol-thread.c (sol_thread_target::wait): Rename inner
1068 "save_ptid".
1069
1070 2018-10-04 Tom Tromey <tom@tromey.com>
1071
1072 * configure: Rebuild.
1073 * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1074
1075 2018-10-04 Tom Tromey <tom@tromey.com>
1076
1077 * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1078 declaration of "block".
1079
1080 2018-10-04 Tom Tromey <tom@tromey.com>
1081
1082 * common/filestuff.c (fdwalk): Remove inner declaration of
1083 "result".
1084
1085 2018-10-04 Tom Tromey <tom@tromey.com>
1086
1087 * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1088 "structs_addr" and hoist declaration.
1089
1090 2018-10-04 Tom Tromey <tom@tromey.com>
1091
1092 * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1093 variable "size".
1094
1095 2018-10-04 Tom Tromey <tom@tromey.com>
1096
1097 * mdebugread.c (parse_partial_symbols): Use std::string.
1098
1099 2018-10-04 Tom Tromey <tom@tromey.com>
1100
1101 * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1102 * p-valprint.c (pascal_val_print): Split inner "i" variable.
1103 * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1104 header.
1105 * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1106 more inner scope.
1107 * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1108 * varobj.c (varobj_update): Rename inner "newobj",
1109 "type_changed".
1110 * valprint.c (generic_emit_char): Rename inner "buf".
1111 * valops.c (find_overload_match): Rename inner "temp".
1112 (value_struct_elt_for_reference): Declare "v" in more inner
1113 scope.
1114 * v850-tdep.c (v850_push_dummy_call): Rename "len".
1115 * unittests/array-view-selftests.c (run_tests): Rename inner
1116 "vec".
1117 * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1118 header.
1119 * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1120 "tsv" in more inner scope.
1121 (print_one_static_tracepoint_marker): Rename inner
1122 "tuple_emitter".
1123 * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1124 (tic6x_push_dummy_call): Don't redeclare "addr".
1125 * target-float.c: Declare "dto" lower.
1126 * symtab.c (lookup_local_symbol): Rename inner "sym".
1127 (find_pc_sect_line): Rename inner "pc".
1128 * stack.c (print_frame): Don't redeclare "gdbarch".
1129 (return_command): Rename inner "gdbarch".
1130 * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1131 "sp".
1132 * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1133 header.
1134 * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1135 * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1136 scope.
1137 * remote.c (remote_target::update_thread_list): Don't redeclare
1138 "tp".
1139 (remote_target::process_initial_stop_replies): Rename inner
1140 "thread".
1141 (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1142 (remote_target::wait_as): Don't redeclare "stop_reply".
1143 (remote_target::get_thread_local_address): Rename inner
1144 "result".
1145 (remote_target::get_tib_address): Likewise.
1146
1147 * regcache.c (cooked_read_test): Rename "regnum".
1148 * record-btrace.c (cmd_record_btrace_start): Rename inner
1149 "exception".
1150 * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1151 loop header.
1152 * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1153 header.
1154 (ppu2spu_sniffer): Rename inner "buf".
1155 * parse.c (operator_check_standard): Rename inner "type",
1156 "objfile".
1157 * p-valprint.c (pascal_val_print): Introduce new scope for
1158 "low_bound", "high_bound".
1159 * p-exp.y (yylex): Declare "i" in loop header.
1160 * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1161 Lower declaration of "s".
1162 * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1163 header.
1164 (nios2_push_dummy_call): Rename "len".
1165 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1166 "buf".
1167 (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1168 (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1169 (linux_xfer_osdata_modules): Likewise.
1170 * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1171 (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1172 (mips_o64_push_dummy_call): Likewise.
1173 * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1174 "op".
1175 * mi/mi-main.c (list_available_thread_groups): Rename inner
1176 "tuple_emitter".
1177 (mi_cmd_data_read_memory): Rename inner "opts".
1178 * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1179 "tuple_emitter".
1180 * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1181 * mdebugread.c (parse_symbol): Rename inner "b". Declare "f" in
1182 more inner scope.
1183 (parse_partial_symbols): Rename inner "pst", "p", "name"
1184 * main.c (captured_main_1): Rename inner "i"s.
1185 * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1186 "oso2".
1187 * linux-tdep.c (linux_info_proc): Rename inner "filename".
1188 * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1189 * infrun.c (handle_no_resumed): Don't redeclare "thread".
1190 (handle_signal_stop): Rename inner "gdbarch".
1191 (handle_command): Declare "signum" in loop header.
1192 * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1193 "status".
1194 (examine_prologue): Rename inner "sol" and "sof".
1195 (ia64_extract_return_value): Rename inner "val". Declare another
1196 "val" in a more inner scope.
1197 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1198 inner scope.
1199 * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1200 "except".
1201 * findvar.c (default_read_var_value): Don't redeclare "addr".
1202 * f-exp.y (yylex): Declare "i" in loop header.
1203 * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1204 Rename inner "type", "expect_type".
1205 (evaluate_subexp_for_sizeof): Rename inner "pc".
1206 * elfread.c (elf_symfile_read): Rename inner "abfd".
1207 * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1208 "bytes_read".
1209 (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1210 (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1211 (dwarf_decode_line_header): Rename inner "lh".
1212 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1213 "offset". Declare "i" in loop header.
1214 (disassemble_dwarf_expression): Rename inner "addr_size".
1215 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1216 inner "result".
1217 (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1218 * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1219 * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1220 "inner_list_emitter".
1221 (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1222 * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1223 declaration in a block.
1224 * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1225 * cp-valprint.c (cp_print_value_fields): Don't redeclare
1226 "obstack_final_size".
1227 * cp-support.c (inspect_type): Declare "i" in loop header.
1228 * compile/compile.c (compile_instance::insert_symbol_error):
1229 Rename inner "e".
1230 * common/agent.c (agent_run_command): Remove inner "ret"
1231 declaration.
1232 * coffread.c (coff_symfile_read): Rename inner "name".
1233 (coff_symfile_read): Rename inner "abfd".
1234 * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1235 * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1236 "high".
1237 * c-exp.y (lex_one_token): Move "len" declaration lower.
1238 * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1239 "gdbarch".
1240 (create_exception_master_breakpoint): Likewise. Don't redeclare
1241 "b".
1242 (watch_command_1): Declare "mark" later.
1243 (clear_command): Don't shadow "a" or "b".
1244 (delete_command): Rename inner "b".
1245 (delete_trace_command): Likewise.
1246 * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1247 "op".
1248 (arm_gdbarch_init): Remove inner "e_flags".
1249 * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1250 "offset" in inner blocks.
1251
1252 2018-10-04 Simon Marchi <simon.marchi@ericsson.com>
1253
1254 * dwarf-index-write.c (file_write): Don't write if the vector is
1255 empty.
1256
1257 2018-10-05 Tom de Vries <tdevries@suse.de>
1258
1259 * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1260 PyArg_ParseTuple call.
1261
1262 2018-10-05 Tom de Vries <tdevries@suse.de>
1263
1264 * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1265 PyArg_ParseTuple call.
1266
1267 2018-10-04 Joel Brobecker <brobecker@adacore.com>
1268
1269 * psymtab.c (recursively_search_psymtabs): Reformat parameters
1270 to avoid exceeding 80 characters per line limit.
1271
1272 2018-10-04 Tom Tromey <tom@tromey.com>
1273
1274 * symfile.c (syms_from_objfile_1, finish_new_objfile)
1275 (reread_symbols): Update.
1276 * complaints.h (clear_complaints): Remove argument.
1277 * complaints.c (enum complaint_series): Remove.
1278 (series): Remove global.
1279 (complaint_internal): Update.
1280 (clear_complaints): Remove argument.
1281
1282 2018-10-04 Tom Tromey <tom@tromey.com>
1283
1284 * symfile.c (symbol_file_add_with_addrs): Do not print "no
1285 debugging symbols" message if there is a separate debug objfile.
1286
1287 2018-10-04 Tom Tromey <tom@tromey.com>
1288
1289 PR cli/19551:
1290 * symfile.c (symbol_file_add_with_addrs): Update output.
1291 * psymtab.c (require_partial_symbols): Update output.
1292
1293 2018-10-04 Tom Tromey <tom@tromey.com>
1294
1295 PR cli/22234:
1296 * complaints.c: Emit \n.
1297
1298 2018-10-04 Tom Tromey <tom@tromey.com>
1299
1300 * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1301 (separate_debug_file_exists, find_separate_debug_file)
1302 (add_symbol_file_command, reread_symbols, allocate_symtab)
1303 (allocate_compunit_symtab): Use filtered printing, not
1304 unfiltered.
1305 * psymtab.c (require_partial_symbols, dump_psymtab)
1306 (allocate_psymtab): Use filtered printing, not unfiltered.
1307
1308 2018-10-04 Tom Tromey <tom@tromey.com>
1309
1310 * complaints.c (complaint_internal): Correctly check complaint
1311 count.
1312
1313 2018-10-04 Tom Tromey <tom@tromey.com>
1314
1315 * complaints.h (struct complaints): Remove declaration.
1316 * complaints.c (clear_complaints): Remove an unused variable.
1317
1318 2018-10-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1319
1320 * MAINTAINERS (Write After Approval): Add self.
1321
1322 2018-10-03 Tom Tromey <tom@tromey.com>
1323
1324 * guile/scm-value.c (gdbscm_value_to_string): Initialize
1325 "buffer_contents".
1326 * coffread.c (coff_symtab_read): Initialize "newobj".
1327
1328 2018-10-03 Simon Marchi <simon.marchi@polymtl.ca>
1329
1330 * dwarf2read.c (read_func_scope): Remove struct keyword in
1331 range-based for.
1332
1333 2018-10-03 Tom Tromey <tom@tromey.com>
1334
1335 * README: Mention --enable-ubsan.
1336 * NEWS: Mention --enable-ubsan.
1337 * acinclude.m4: Include sanitize.m4.
1338 * configure: Rebuild.
1339 * configure.ac: Call AM_GDB_UBSAN.
1340 * sanitize.m4: New file.
1341
1342 2018-10-03 Tom Tromey <tom@tromey.com>
1343
1344 * expression.h (enum exp_opcode): Use uint8_t as base type.
1345 * expprint.c (op_name): Handle invalid opcodes.
1346
1347 2018-10-03 Tom Tromey <tom@tromey.com>
1348
1349 * parse.c (prefixify_expression): Add assert.
1350 (parse_exp_in_context_1): Throw exception if the expression is
1351 empty.
1352
1353 2018-10-03 Tom Tromey <tom@tromey.com>
1354
1355 * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1356
1357 2018-10-03 Tom Tromey <tom@tromey.com>
1358
1359 * c-exp.y (parse_number): Work in unsigned. Remove casts.
1360
1361 2018-10-03 Tom Tromey <tom@tromey.com>
1362
1363 * dwarf2read.c (read_subrange_type): Make "negative_mask"
1364 unsigned.
1365
1366 2018-10-03 Tom Tromey <tom@tromey.com>
1367
1368 * findvar.c (extract_integer): Do work in an unsigned type.
1369
1370 2018-10-03 Tom Tromey <tom@tromey.com>
1371
1372 * common/enum-flags.h (enum_flags::operator~): Add static assert.
1373 * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1374 base type.
1375 * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1376 * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1377 type.
1378 * c-lang.h (enum c_string_type_values): Use unsigned as base
1379 type.
1380 * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1381
1382 2018-10-03 Tom Tromey <tom@tromey.com>
1383
1384 * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1385 <~dwarf2_frame_state_reg_info>: Update.
1386 <dwarf2_frame_state_reg_info>: Update.
1387 <alloc_regs>: Add assertion. Update.
1388 <reg>: Now a std::vector.
1389 <num_regs>: Remove.
1390 <swap>: Update.
1391 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1392 (execute_cfa_program_test, dwarf2_frame_cache): Update.
1393
1394 2018-10-03 Tom Tromey <tom@tromey.com>
1395
1396 * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1397
1398 2018-10-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1399
1400 * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1401
1402 2018-10-02 Tom Tromey <tom@tromey.com>
1403
1404 * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1405
1406 2018-10-02 John Darrington <john@darrington.wattle.id.au>
1407
1408 * NEWS: Mention changed commands.
1409 * ser-uds.c: New file.
1410 * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1411 * configure: Regenerate.
1412 * Makefile.in: Add new file.
1413 * serial.c (serial_open): Check if filename is a socket
1414 and lookup the appropriate interface accordingly.
1415
1416 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1417
1418 * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1419 define.
1420 (AARCH64_EXTRA_MAGIC): Likewise.
1421 (AARCH64_FPSIMD_MAGIC): Likewise.
1422 (AARCH64_SVE_MAGIC): Likewise.
1423 (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1424 (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1425 (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1426 (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1427 (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1428 (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1429 (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1430 (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1431 (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1432 (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1433 (read_aarch64_ctx): Add function.
1434 (aarch64_linux_sigframe_init): Detect FP registers.
1435
1436 2018-10-01 Alan Hayward <alan.hayward@arm.com>
1437
1438 * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1439 (AARCH64_D0_REGNUM): Likewise.
1440 (AARCH64_S0_REGNUM): Likewise.
1441 (AARCH64_H0_REGNUM): Likewise.
1442 (AARCH64_B0_REGNUM): Likewise.
1443 (AARCH64_SVE_V0_REGNUM): Likewise.
1444 * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1445 (AARCH64_D0_REGNUM): Likewise.
1446 (AARCH64_S0_REGNUM): Likewise.
1447 (AARCH64_H0_REGNUM): Likewise.
1448 (AARCH64_B0_REGNUM): Likewise.
1449 (AARCH64_SVE_V0_REGNUM): Likewise.
1450
1451 2018-10-01 Gary Benson <gbenson@redhat.com>
1452
1453 * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1454 * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1455 prfpregset_t instead of gdb_prfpregset_t.
1456 * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1457 * configure, config.in: Rebuild.
1458
1459 2018-10-01 Gary Benson <gbenson@redhat.com>
1460
1461 * common/gdb_proc_service.h: New file, factored out from...
1462 * gdb_proc_service.h: Moved common code to the above file.
1463 * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1464
1465 2018-10-01 Gary Benson <gbenson@redhat.com>
1466
1467 * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1468 undefined. Use elf_fpregset_t if prfpregset_t is undefined.
1469
1470 2018-10-01 Gary Benson <gbenson@redhat.com>
1471
1472 * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1473 (AC_CHECK_HEADERS): Check for linux/elf.h.
1474 * configure, config.in: Rebuild.
1475 * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1476 doesn't define elf_fpregset_t.
1477
1478 2018-10-01 Gary Benson <gbenson@redhat.com>
1479
1480 * gdb_proc_service.h: Whitespace change.
1481
1482 2018-10-01 Tom Tromey <tom@tromey.com>
1483
1484 * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1485 * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1486 * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1487
1488 2018-10-01 Tom Tromey <tom@tromey.com>
1489
1490 * README: Minor change.
1491
1492 2018-09-30 Pedro Alves <palves@redhat.com>
1493
1494 * darwin-nat-info.c (darwin_debug_regions_recurse)
1495 (info_mach_exceptions_command): Remove unused local variables.
1496 * darwin-nat.c (darwin_decode_notify_message)
1497 (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1498 (darwin_stop_inferior, darwin_setup_exceptions)
1499 (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1500 (darwin_nat_target::attach, darwin_nat_target::detach)
1501 (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1502 local variables.
1503 * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1504 variables.
1505
1506 2018-09-29 Tom Tromey <tom@tromey.com>
1507
1508 * README: Remove some leftover text.
1509
1510 2018-09-29 Tom Tromey <tom@tromey.com>
1511
1512 * PROBLEMS: Rewrite.
1513 * README: Update.
1514
1515 2018-09-28 John Baldwin <jhb@FreeBSD.org>
1516
1517 * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1518 case with explicit breakpoint kind.
1519 * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1520 'additional_info' and related logic.
1521 (riscv_debug_breakpoints): New variable.
1522 (riscv_breakpoint_kind_from_pc): Use the length of the existing
1523 instruction to determine the breakpoint kind.
1524 (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1525 flag. Update description of 'set/show riscv
1526 use-compressed-breakpoints' flag.
1527
1528 2018-09-28 Andrew Burgess <andrew.burgess@embecosm.com>
1529
1530 (NEWS): Mention changes to frame related commands.
1531 * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1532 (add_prefix_cmd_suppress_notification): New function.
1533 (add_com_suppress_notification): Call
1534 add_cmd_suppress_notification.
1535 * command.h (add_cmd_suppress_notification): Declare.
1536 (add_prefix_cmd_suppress_notification): Declare.
1537 * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1538 (parse_frame_specification): Moved from stack.c, with
1539 simplification to handle a single argument.
1540 (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1541 switch to the selected frame. Add a header comment.
1542 * stack.c: Remove 'safe-ctype.h' include.
1543 (find_frame_for_function): Add declaration.
1544 (find_frame_for_address): New function.
1545 (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1546 (frame_selection_by_function_completer): New function.
1547 (info_frame_command): Rename to...
1548 (info_frame_command_core): ...this, and update parameter types.
1549 (select_frame_command): Rename to...
1550 (select_frame_command_core): ...this, and update parameter types.
1551 (frame_command): Rename to...
1552 (frame_command_core): ...this, and update parameter types.
1553 (class frame_command_helper): New class to wrap implementations of
1554 frame related sub-commands.
1555 (frame_apply_cmd_list): New static global.
1556 (frame_cmd_list): Make static.
1557 (select_frame_cmd_list): New global for sub-commands.
1558 (info_frame_cmd_list): New global for sub-commands.
1559 (_initialize_stack): Register sub-commands for 'frame',
1560 'select-frame', and 'info frame'. Update 'frame apply' commands
1561 to use frame_apply_cmd_list. Move function local static
1562 frame_apply_list to file static frame_apply_cmd_list for
1563 consistency.
1564 * stack.h (select_frame_command): Delete declarationn.
1565 (select_frame_for_mi): Declare new function.
1566
1567 2018-09-26 Andrew Burgess <andrew.burgess@embecosm.com>
1568
1569 * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1570 (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1571 and NOP.
1572
1573 2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
1574
1575 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1576
1577 2018-09-26 Tom Tromey <tom@tromey.com>
1578
1579 * valops.c (auto_abandon): Remove dead code.
1580
1581 2018-09-26 Tom Tromey <tom@tromey.com>
1582
1583 * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1584
1585 2018-09-24 Tom Tromey <tom@tromey.com>
1586
1587 * common/pathstuff.c (get_standard_cache_dir): Make
1588 "xdg_cache_home" and "home" const.
1589 * top.c (init_history): Make "tmpenv" const.
1590 * main.c (get_init_files): Make "homedir" const.
1591
1592 2018-09-23 Tom Tromey <tom@tromey.com>
1593
1594 PR python/18852:
1595 * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1596
1597 2018-09-23 Tom Tromey <tom@tromey.com>
1598
1599 * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1600 * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1601 * python/python-internal.h (gdbpy_handle_exception): Declare.
1602 * python/py-utils.c (gdbpy_handle_exception): New function.
1603
1604 2018-09-23 Tom Tromey <tom@tromey.com>
1605
1606 PR python/17284:
1607 * python/py-type.c (typy_template_argument): Check for negative
1608 argument number.
1609
1610 2018-09-23 Tom Tromey <tom@tromey.com>
1611
1612 PR python/14062:
1613 * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1614
1615 2018-09-23 Tom Tromey <tom@tromey.com>
1616
1617 PR python/18170:
1618 * python/py-value.c (valpy_int): Allow conversion from pointer
1619 type.
1620
1621 2018-09-23 Tom Tromey <tom@tromey.com>
1622
1623 PR python/20126:
1624 * python/py-value.c (valpy_int): Respect type sign.
1625
1626 2018-09-23 Tom Tromey <tom@tromey.com>
1627
1628 PR python/18352;
1629 * python/py-value.c (valpy_float): Allow conversions from int or
1630 char.
1631 (valpy_int, valpy_long): Allow conversions from float.
1632
1633 2018-09-23 Tom Tromey <tom@tromey.com>
1634
1635 * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1636 * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1637
1638 2018-09-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1639
1640 * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1641 __sighndlr.
1642 * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1643
1644 2018-08-02 Jon Turney <jon.turney@dronecode.org.uk>
1645
1646 * windows-nat.c (windows_nat_target::wait): Remove a spurious
1647 target_terminal::ours().
1648
1649 2018-09-23 Simon Marchi <simon.marchi@ericsson.com>
1650
1651 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1652 of vl to ULONGEST.
1653
1654 2018-09-21 Yacov Simhony <ysimhony@gmail.com>
1655
1656 * breakpoint.c (update_inserted_breakpoint_locations): Remove
1657 redundant condition.
1658
1659 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1660
1661 * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1662
1663 * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1664 * sparc-sol2-nat.c: Likewise. Remove Linux, __arch64__ references.
1665 * sol-thread.c (ps_pdmodel): Don't guard definition.
1666
1667 * procfs.c: Fix formatting.
1668
1669 * procfs.c (sysset_t_alloc): Remove.
1670 (create_procinfo): Use XNEW instead of sysset_t_alloc.
1671 (procfs_debug_inferior): Likewise.
1672 (procfs_set_exec_trap): Likewise.
1673 (proc_set_traced_sysentry): Don't allocate argp dynamically.
1674 (proc_set_traced_sysexit): Likewise.
1675
1676 * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1677 (dead_procinfo): Likewise.
1678 (proc_warn): Likewise.
1679 (proc_error): Likewise.
1680 (proc_get_LDT_entry): Likewise.
1681 (do_attach): Likewise.
1682 (procfs_target::pid_to_str): Likewise.
1683 (iterate_over_mappings): Likewise.
1684
1685 * procfs.c (create_procinfo): Fix ARI warning.
1686 (proc_get_status): Likewise.
1687 (proc_stop_process): Likewise.
1688 (proc_run_process): Likewise.
1689 (proc_kill): Likewise.
1690 (proc_get_LDT_entry): Likewise.
1691 (procfs_find_LDT_entry): Likewise.
1692 (proc_update_threads): Likewise.
1693 (proc_iterate_over_threads): Likewise.
1694 (do_attach): Likewise.
1695 (procfs_xfer_memory): Likewise.
1696 (invalidate_cache): Likewise.
1697 (procfs_target::resume): Likewise.
1698 (procfs_init_inferior): Likewise.
1699 (procfs_set_exec_trap): Likewise.
1700 (procfs_target::thread_alive): Likewise.
1701 (procfs_target::pid_to_exec_file): Likewise.
1702 (iterate_over_mappings): Likewise.
1703 (procfs_target::make_corefile_notes): Likewise.
1704 * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1705
1706 * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1707 (procfs_find_LDT_entry): Likewise.
1708 * sol-thread.c (ps_lgetLDT): Likewise.
1709
1710 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1711
1712 PR tdep/17903
1713 * procfs.c (procfs_target): Declare pid_to_exec_file.
1714 (procfs_target::pid_to_exec_file): New.
1715
1716 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1717
1718 * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1719 renaming.
1720 Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1721 AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1722
1723 2018-09-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1724
1725 * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1726 (supply_fpregset, fill_fpregset): Move ...
1727 * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1728 Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1729 Remove references to ioctl-based procfs.
1730 Include <sys/reg.h>.
1731 Remove PR_MODEL_NATIVE guards.
1732 * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1733 * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1734
1735 2018-09-19 Xavier Roirand <roirand@adacore.com>
1736
1737 PR gdb/20981:
1738 * solib-darwin.c (darwin_get_dyld_bfd): New function.
1739 (darwin_solib_get_all_image_info_addr_at_init): Update call.
1740 (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1741
1742 2018-09-19 John Baldwin <jhb@FreeBSD.org>
1743
1744 * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1745 (fbsd_print_sockaddr_in6): Likewise.
1746
1747 2018-09-19 Richard Bunt <richard.bunt@arm.com>
1748 Chris January <chris.january@arm.com>
1749
1750 * eval.c (skip_undetermined_arglist): Skip argument list helper.
1751 (evaluate_subexp_standard): Return a dummy type when
1752 honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1753 OP_F77_UNDETERMINED_ARGLIST case.
1754 * expression.h (enum noside): Update comment.
1755
1756 2018-09-19 George Vasick <george.vasick@oracle.com>
1757
1758 * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1759
1760 2018-09-19 Stefan Teleman <stefan.teleman@oracle.com>
1761 April Chin <april.chin@oracle.com>
1762 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1763
1764 * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1765 uint_t lwpid_t.
1766 (create_procinfo): Print pids in /proc without leading zeros.
1767
1768 2018-09-18 Sandra Loosemore <sandra@codesourcery.com>
1769
1770 * nios2-tdep.c (nios2_gcc_target_options): New.
1771 (nios2_gdb_arch_init): Install new hook.
1772
1773 2018-09-18 Simon Marchi <simon.marchi@ericsson.com>
1774
1775 * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1776 New file.
1777 * update-gnulib.sh: Apply patch.
1778 * configure: Re-generate.
1779
1780 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1781
1782 * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1783 description. Make "info proc" command descriptions more
1784 consistent.
1785
1786 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1787
1788 * NEWS: Mention 'info proc files' command.
1789
1790 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1791
1792 * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1793 descriptors for IP_FILES and IP_ALL.
1794
1795 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1796
1797 * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1798 (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1799 (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1800 (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1801 (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1802 (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1803 (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1804 (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1805 (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1806 (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1807 (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1808 (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1809 (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1810 (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1811 (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1812 (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1813 (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1814 (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1815 (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1816 (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1817 (struct fbsd_sockaddr_un): New types.
1818 (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1819 (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1820 (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1821 (fbsd_core_info_proc_files): New functions.
1822 (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1823 IP_ALL.
1824 * fbsd-tdep.h (fbsd_info_proc_files_header)
1825 (fbsd_info_proc_files_entry): New.
1826
1827 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1828
1829 * defs.h (enum info_proc_what) [IP_FILES]: New value.
1830 * infcmd.c (info_proc_cmd_files): New function.
1831 (_initialize_infcmd): Register 'info proc files' command.
1832
1833 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1834
1835 * gnulib/aclocal-m4-deps.mk: Re-generate.
1836 * gnulib/aclocal.m4: Re-generate.
1837 * gnulib/config.in: Re-generate.
1838 * gnulib/configure: Re-generate.
1839 * gnulib/import/Makefile.am: Re-generate.
1840 * gnulib/import/Makefile.in: Re-generate.
1841 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1842 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1843 * gnulib/import/arpa_inet.in.h: New file.
1844 * gnulib/import/inet_ntop.c: New file.
1845 * gnulib/import/m4/arpa_inet_h.m4: New file.
1846 * gnulib/import/m4/inet_ntop.m4: New file.
1847 * gnulib/import/m4/netinet_in_h.m4: New file.
1848 * gnulib/import/m4/socklen.m4: New file.
1849 * gnulib/import/m4/sockpfaf.m4: New file.
1850 * gnulib/import/m4/stdalign.m4: New file.
1851 * gnulib/import/m4/sys_uio_h.m4: New file.
1852 * gnulib/import/netinet_in.in.h: New file.
1853 * gnulib/import/stdalign.in.h: New file.
1854 * gnulib/import/sys_socket.c: New file.
1855 * gnulib/import/sys_socket.in.h: New file.
1856 * gnulib/import/sys_uio.in.h: New file.
1857 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1858 module.
1859
1860 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1861
1862 * gnulib/aclocal-m4-deps.mk: New file.
1863 * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1864 deterministically.
1865
1866 2018-09-18 John Baldwin <jhb@FreeBSD.org>
1867
1868 * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1869 KVE_PATH.
1870
1871 2018-09-18 Tom Tromey <tom@tromey.com>
1872
1873 * compile/compile-object-load.c (struct
1874 link_hash_table_cleanup_data): Add constructor and destructor.
1875 Use DISABLE_COPY_AND_ASSIGN.
1876 (~link_hash_table_cleanup_data): Rename from
1877 link_hash_table_free. Now a destructor.
1878 (copy_sections): Use gdb::unique_xmalloc_ptr. Remove cleanups.
1879
1880 2018-09-18 Tom Tromey <tom@tromey.com>
1881
1882 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1883 * compile/compile-object-load.c (struct munmap_list): Move to
1884 header file.
1885 (munmap_list::add): Rename from munmap_list_add; rewrite.
1886 (munmap_list::~munmap_list): Rename from munmap_list_free.
1887 (munmap_listp_free_cleanup): Remove.
1888 (compile_object_load): Update.
1889 * compile/compile-object-load.h (struct munmap_list): Move from
1890 compile-object-load.c. Rewrite.
1891
1892 2018-09-18 Alan Hayward <alan.hayward@arm.com>
1893
1894 * aarch64-tdep.c (pass_in_v): Use register size.
1895 (aarch64_extract_return_value): Likewise.
1896 (aarch64_store_return_value): Likewise.
1897
1898 2018-09-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1899
1900 * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1901 rlim_t.
1902
1903 2018-09-17 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1904
1905 * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1906 Fix short help line.
1907
1908 2018-09-17 Tom Tromey <tom@tromey.com>
1909
1910 PR python/20445:
1911 * configure: Rebuild.
1912 * configure.ac: Conditionally use -DNDEBUG for Python.
1913
1914 2018-09-17 Tom Tromey <tom@tromey.com>
1915
1916 * configure: Rebuild.
1917 * configure.ac: Use gmp as a library dependency when checking for
1918 mpfr.
1919
1920 2018-09-17 Pedro Alves <palves@redhat.com>
1921
1922 * python/py-inferior.c (find_inferior_object): Delete.
1923
1924 2018-09-17 Simon Marchi <simon.marchi@ericsson.com>
1925
1926 * compile/compile-cplus-types.c
1927 (compile_cplus_instance::enter_scope): Don't use new_scope after
1928 std::move.
1929
1930 2018-09-17 Tom Tromey <tom@tromey.com>
1931
1932 * common/pathstuff.c (get_standard_cache_dir): Use
1933 ~/Library/Caches on macOS.
1934 * common/pathstuff.h (get_standard_cache_dir): Update comment.
1935
1936 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
1937
1938 PR python/23669
1939 * breakpoint.c (commands_cmd_element): New.
1940 (_initialize_breakpoint): Assign commands_cmd_element.
1941 * breakpoint.h (commands_cmd_element): New.
1942 * cli/cli-script.c (while_cmd_element, if_command,
1943 define_cmd_element): New.
1944 (command_name_equals): Remove.
1945 (process_next_line): Compare commands by pointer, not by name.
1946 (_initialize_cli_script): Assign the various cmd_list_element
1947 variables.
1948 * compile/compile.c (compile_cmd_element): New.
1949 (_initialize_compile): Assign compile_cmd_element.
1950 * compile/compile.h (compile_cmd_element): New.
1951 * guile/guile.c (guile_cmd_element): New.
1952 (install_gdb_commands): Assign guile_cmd_element.
1953 * guile/guile.h (guile_cmd_element): New.
1954 * python/python.c (python_cmd_element): New.
1955 (_initialize_python): Assign python_cmd_element.
1956 * python/python.h (python_cmd_element): New.
1957 * tracepoint.c (while_stepping_cmd_element): New.
1958 (_initialize_tracepoint): Assign while_stepping_cmd_element.
1959 * tracepoint.h (while_stepping_cmd_element): New.
1960
1961 2018-09-17 Tom Tromey <tom@tromey.com>
1962
1963 * infrun.c (save_infcall_suspend_state): Return
1964 infcall_suspend_state_up.
1965 (save_infcall_control_state): Return infcall_control_state_up.
1966 * inferior.h (save_infcall_suspend_state)
1967 (save_infcall_control_state): Declare later. Return unique
1968 pointers.
1969
1970 2018-09-17 Tom Tromey <tom@tromey.com>
1971
1972 * infrun.c (struct stop_context): Declare constructor,
1973 destructor, "changed" method.
1974 (stop_context::stop_context): Rename from save_stop_context.
1975 (stop_context::~stop_context): Rename from
1976 release_stop_context_cleanup.
1977 (normal_stop): Update.
1978 (stop_context::changed): Rename from stop_context_changed. Return
1979 bool.
1980
1981 2018-09-17 Tom Tromey <tom@tromey.com>
1982
1983 * inferior.h (struct infcall_suspend_state_deleter): New.
1984 (infcall_suspend_state_up): New typedef.
1985 (struct infcall_control_state_deleter): New.
1986 (infcall_control_state_up): New typedef.
1987 (make_cleanup_restore_infcall_suspend_state)
1988 (make_cleanup_restore_infcall_control_state): Don't declare.
1989 * infcall.c (call_function_by_hand_dummy): Update.
1990 * infrun.c (do_restore_infcall_suspend_state_cleanup)
1991 (make_cleanup_restore_infcall_suspend_state): Remove.
1992 (do_restore_infcall_control_state_cleanup)
1993 (make_cleanup_restore_infcall_control_state): Remove.
1994
1995 2018-09-17 Tom Tromey <tom@tromey.com>
1996
1997 * gdbthread.h (struct thread_control_state): Add initializer.
1998 (class thread_info) <control>: Remove initializer.
1999 * inferior.h (struct inferior_control_state): Add initializer.
2000 (class inferior) <control>: Remove initializer.
2001 (exit_inferior_1): Update.
2002 * infrun.c (struct infcall_control_state): Add constructors.
2003 (save_infcall_control_state): Use new.
2004 (restore_infcall_control_state, discard_infcall_control_state):
2005 Use delete.
2006
2007 2018-09-17 Tom Tromey <tom@tromey.com>
2008
2009 * infrun.c (struct infcall_suspend_state) <registers>: Now a
2010 unique_ptr.
2011 <siginfo_data>: Now a unique_xmalloc_ptr.
2012 (save_infcall_suspend_state, restore_infcall_suspend_state)
2013 (discard_infcall_suspend_state)
2014 (get_infcall_suspend_state_regcache): Update.
2015
2016 2018-09-17 Tom Tromey <tom@tromey.com>
2017
2018 * gdbthread.h (struct thread_suspend_state): Add initializers.
2019 (class thread_info) <suspend>: Remove initializer.
2020 * infrun.c (struct infcall_suspend_state): Add initializers.
2021 (save_infcall_suspend_state): Use new.
2022 (discard_infcall_suspend_state): Use delete.
2023
2024 2018-09-16 Tom Tromey <tom@tromey.com>
2025
2026 * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2027 Remove.
2028 * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2029 rvalue reference. Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2030 (py_varobj_iter_new): Likewise.
2031 (py_varobj_get_iterator): Use gdbpy_ref.
2032
2033 2018-09-16 Tom Tromey <tom@tromey.com>
2034
2035 * python/py-threadevent.c (py_get_event_thread): Simplify.
2036 * python/py-inferior.c (infpy_thread_from_thread_handle):
2037 Return immediately after calling thread_to_thread_object. Use
2038 Py_RETURN_NONE.
2039 (thread_to_thread_object): Set the exception on a NULL return.
2040
2041 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2042
2043 * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2044
2045 2018-09-16 Tom Tromey <tom@tromey.com>
2046
2047 * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2048 Remove.
2049
2050 2018-09-16 Tom Tromey <tom@tromey.com>
2051
2052 * python/python-internal.h (thread_to_thread_object): Change
2053 return type.
2054 * python/py-inferior.c (thread_to_thread_object): Return a new
2055 reference.
2056 (infpy_thread_from_thread_handle): Update.
2057 * python/py-infthread.c (gdbpy_selected_thread): Update.
2058 * python/py-stopevent.c (create_stop_event_object): Update.
2059 * python/py-threadevent.c (py_get_event_thread): Return a new
2060 reference.
2061 (py_get_event_thread): Update.
2062 * python/py-event.h (py_get_event_thread): Change return type.
2063 * python/py-continueevent.c (create_continue_event_object):
2064 Update.
2065
2066 2018-09-16 Tom Tromey <tom@tromey.com>
2067
2068 * python/py-progspace.c (pspy_get_objfiles): Update.
2069 * python/python-internal.h (objfile_to_objfile_object): Change
2070 return type.
2071 * python/py-newobjfileevent.c (create_new_objfile_event_object):
2072 Update.
2073 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2074 Update.
2075 * python/python.c (gdbpy_get_current_objfile): Update.
2076 (gdbpy_objfiles): Update.
2077 * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2078 Update.
2079 (objfile_to_objfile_object): Return a new reference.
2080 * python/py-symtab.c (stpy_get_objfile): Update.
2081 * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2082 Update.
2083
2084 2018-09-16 Tom Tromey <tom@tromey.com>
2085
2086 * python/py-inferior.c (infpy_get_progspace): Update.
2087 * python/python-internal.h (pspace_to_pspace_object): Change
2088 return type.
2089 * python/py-newobjfileevent.c
2090 (create_clear_objfiles_event_object): Update.
2091 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2092 Update.
2093 * python/python.c (gdbpy_get_current_progspace): Update.
2094 (gdbpy_progspaces): Update.
2095 * python/py-progspace.c (pspace_to_pspace_object): Return a new
2096 reference.
2097 * python/py-objfile.c (objfpy_get_progspace): Update.
2098 * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2099 Update.
2100
2101 2018-09-16 Tom Tromey <tom@tromey.com>
2102
2103 * python/lib/gdb/__init__.py (current_progspace, objfiles)
2104 (solib_name, block_for_pc, find_pc_line): New functions.
2105 (execute_unwinders): Update.
2106 * python/py-block.c (gdbpy_block_for_pc): Remove.
2107 * python/py-inferior.c (infpy_get_progspace): New function.
2108 (inferior_object_getset) <progspace>: Add.
2109 * python/py-progspace.c (pspy_objfiles): Rewrite.
2110 (pspy_solib_name, pspy_block_for_pc)
2111 (pspy_find_pc_line, pspy_is_valid): New functions.
2112 (progspace_object_methods): Add entries for solib_name,
2113 block_for_pc, find_pc_line, is_valid.
2114 * python/python-internal.h (gdbpy_block_for_pc)
2115 (build_objfiles_list): Don't declare.
2116 * python/python.c: Don't include solib.h.
2117 (gdbpy_solib_name, gdbpy_find_pc_line)
2118 (gdbpy_get_current_progspace, build_objfiles_list)
2119 (gdbpy_objfiles): Remove.
2120 (GdbMethods) <current_progspace, objfiles, block_for_pc,
2121 solib_name, find_pc_line>: Remove entries.
2122
2123 2018-09-16 Tom Tromey <tom@tromey.com>
2124
2125 * top.c (new_ui_command): Use GNU style for metasyntactic
2126 variables.
2127 * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2128 variables.
2129 * maint.c (maintenance_translate_address): Remove "<>" around
2130 text.
2131 * interps.c (interpreter_exec_cmd): Use GNU style for
2132 metasyntactic variables.
2133 * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2134 metasyntactic variables.
2135 * tracepoint.c (tfind_range_command): Use GNU style for
2136 metasyntactic variables.
2137 (tfind_outside_command): Likewise.
2138 (_initialize_tracepoint): Likewise.
2139 * remote.c (extended_remote_target::create_inferior): Use GNU
2140 style for metasyntactic variables.
2141 * sparc64-tdep.c (adi_examine_command): Use GNU style for
2142 metasyntactic variables.
2143 (adi_assign_command): Likewise.
2144
2145 2018-09-16 Tom Tromey <tom@tromey.com>
2146
2147 * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2148 metasyntactic variables. Print message if no disassembler options
2149 are available.
2150
2151 2018-09-15 Tom Tromey <tom@tromey.com>
2152
2153 * infcmd.c (get_inferior_args): Return const char *.
2154 * inferior.h (get_inferior_args): Return type now const.
2155 * linux-tdep.c (linux_fill_prpsinfo): Update.
2156 * procfs.c (procfs_target::make_corefile_notes): Update.
2157
2158 2018-09-07 Tom Tromey <tom@tromey.com>
2159
2160 * python/python.c (execute_gdb_command): Call bpstat_do_actions
2161 inside the TRY.
2162
2163 2018-09-14 Sandra Loosemore <sandra@codesourcery.com>
2164
2165 * nios2-tdep.c (nios2_type_align): New.
2166 (nios2_gdb_arch_init): Install type_align hook.
2167
2168 2018-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
2169
2170 * eval.c (fake_method::fake_method): Call xzalloc directly for a
2171 type that is neither object file owned, nor gdbarch owned.
2172 * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2173 gdbarch is non-NULL.
2174 (alloc_type_instance): Allocate non-objfile owned types on the
2175 gdbarch obstack.
2176 (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2177 using TYPE_ALLOC to ensure memory is allocated on the correct
2178 obstack.
2179 * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2180 obstack, or the gdbarch obstack.
2181 (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2182
2183 2018-09-14 Tom Tromey <tom@tromey.com>
2184
2185 * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2186 block.
2187
2188 2018-09-14 Tom Tromey <tom@tromey.com>
2189
2190 * nat/fork-inferior.c (get_startup_shell): Remove "static".
2191
2192 2018-09-13 Tom Tromey <tom@tromey.com>
2193
2194 * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2195 static.
2196
2197 2018-09-13 Tom Tromey <tom@tromey.com>
2198
2199 * exec.c (try_open_exec_file): Use std::string.
2200
2201 2018-09-13 Tom Tromey <tom@tromey.com>
2202
2203 * utils.h (gdb_bfd_errmsg): Return std::string.
2204 * exec.c (exec_file_attach): Update.
2205 * compile/compile-object-load.c (compile_object_load): Update.
2206 * utils.c (gdb_bfd_errmsg): Return std::string.
2207
2208 2018-09-13 Tom Tromey <tom@tromey.com>
2209
2210 * procfs.c (struct procinfo_deleter): New.
2211 (procinfo_up): New typedef.
2212 (do_destroy_procinfo_cleanup): Remove.
2213 (procfs_target::info_proc): Use procinfo_up. Remove cleanups.
2214
2215 2018-09-13 Tom Tromey <tom@tromey.com>
2216
2217 * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2218
2219 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2220 2018-09-13 Tom Tromey <tom@tromey.com>
2221
2222 * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2223 (pspy_get_objfiles): New function.
2224 (progspace_object_methods): New.
2225 (pspace_object_type): Add tp_methods callback.
2226 * python/python-internal.h (build_objfiles_list): New
2227 declaration.
2228 * python/python.c (build_objfiles_list): New function.
2229 (gdbpy_objfiles): Implement using build_objfiles_list.
2230 * NEWS: Mention the Progspace.objfiles method.
2231
2232 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2233
2234 * python/py-inferior.c (infpy_get_progspace): New function.
2235 (inferior_object_getset): Add progspace property.
2236 * NEWS: Mention the new property.
2237
2238 2018-09-13 Tom Tromey <tom@tromey.com>
2239
2240 PR rust/23650:
2241 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2242
2243 2018-09-13 Tom Tromey <tom@tromey.com>
2244
2245 PR rust/23626:
2246 * rust-lang.c (rust_enum_variant): Now static.
2247 (rust_empty_enum_p): New function.
2248 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2249 Handle empty enum.
2250
2251 2018-09-13 Simon Marchi <simon.marchi@ericsson.com>
2252
2253 * python/py-inferior.c (infpy_repr): New.
2254 (inferior_object_type): Register infpy_repr.
2255 * python/py-objfile.c (objfpy_repr): New.
2256 (objfile_object_type): Register objfpy_repr.
2257
2258 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2259
2260 * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2261
2262 2018-09-12 John Baldwin <jhb@FreeBSD.org>
2263
2264 * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2265 typo.
2266
2267 2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
2268
2269 * common/common-utils.c: Don't include '<sys/stat.h>'.
2270 (is_regular_file): Move to...
2271 * common/filestuff.c (is_regular_file): ... here.
2272 * common/common-utils.h (is_regular_file): Move to...
2273 * common/filestuff.h (is_regular_file): ... here.
2274
2275 2018-09-12 Simon Marchi <simon.marchi@ericsson.com>
2276
2277 * skip.c (debug_skip): New variable.
2278 (skiplist_entry::do_skip_file_p): Add debug output.
2279 (skiplist_entry::do_skip_gfile_p): Likewise.
2280 (skiplist_entry::skip_function_p): Likewise.
2281 (_initialize_step_skip): Create debug command.
2282 * NEWS: Mention set/show debug skip.
2283
2284 2018-09-11 Xavier Roirand <roirand@adacore.com>
2285
2286 * darwin-nat.c (should_disable_startup_with_shell):
2287 New function.
2288 (darwin_nat_target::create_inferior): Add call.
2289
2290 2018-09-11 Xavier Roirand <roirand@adacore.com>
2291
2292 * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2293 inf_port, msg_state>: Initialize.
2294 (struct darwin_thread_info) <signaled, single_step>: Change
2295 type and initialize.
2296 (struct darwin_thread_info) <event>: Initialize.
2297
2298 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2299
2300 PR gdb/23555
2301 PR gdb/23558
2302 * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2303 guesses.
2304
2305 2018-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2306
2307 Revert:
2308 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
2309
2310 PR gdb/23555
2311 PR gdb/23558
2312 * gnulib/aclocal.m4: Regenerate.
2313 * gnulib/config.in: Regenerate.
2314 * gnulib/configure: Regenerate.
2315 * gnulib/import/Makefile.am: Update.
2316 * gnulib/import/Makefile.in: Update.
2317 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2318 * gnulib/import/_Noreturn.h: ... this.
2319 * gnulib/import/alloca.in.h: Update.
2320 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2321 * gnulib/import/arg-nonnull.h: ... this.
2322 * gnulib/import/assure.h: Update.
2323 * gnulib/import/at-func.c: Update.
2324 * gnulib/import/basename-lgpl.c: Update.
2325 * gnulib/import/extra/snippet/c++defs.h: Rename to...
2326 * gnulib/import/c++defs.h: ... this.
2327 * gnulib/import/canonicalize-lgpl.c: Update.
2328 * gnulib/import/cdefs.h: Update.
2329 * gnulib/import/chdir-long.c: Update.
2330 * gnulib/import/chdir-long.h: Update.
2331 * gnulib/import/cloexec.c: Update.
2332 * gnulib/import/cloexec.h: Update.
2333 * gnulib/import/close.c: Update.
2334 * gnulib/import/closedir.c: Update.
2335 * gnulib/import/config.charset: Update.
2336 * gnulib/import/dirent-private.h: Update.
2337 * gnulib/import/dirent.in.h: Update.
2338 * gnulib/import/dirfd.c: Update.
2339 * gnulib/import/dirname-lgpl.c: Update.
2340 * gnulib/import/dirname.h: Update.
2341 * gnulib/import/dosname.h: Update.
2342 * gnulib/import/dup-safer-flag.c: Update.
2343 * gnulib/import/dup-safer.c: Update.
2344 * gnulib/import/dup.c: Update.
2345 * gnulib/import/dup2.c: Update.
2346 * gnulib/import/errno.in.h: Update.
2347 * gnulib/import/error.c: Update.
2348 * gnulib/import/error.h: Update.
2349 * gnulib/import/exitfail.c: Update.
2350 * gnulib/import/exitfail.h: Update.
2351 * gnulib/import/extra/update-copyright: Update.
2352 * gnulib/import/fchdir.c: Update.
2353 * gnulib/import/fcntl.c: Update.
2354 * gnulib/import/fcntl.in.h: Update.
2355 * gnulib/import/fd-hook.c: Update.
2356 * gnulib/import/fd-hook.h: Update.
2357 * gnulib/import/fd-safer-flag.c: Update.
2358 * gnulib/import/fd-safer.c: Update.
2359 * gnulib/import/fdopendir.c: Update.
2360 * gnulib/import/filename.h: Update.
2361 * gnulib/import/filenamecat-lgpl.c: Update.
2362 * gnulib/import/filenamecat.h: Update.
2363 * gnulib/import/flexmember.h: Update.
2364 * gnulib/import/float+.h: Update.
2365 * gnulib/import/float.c: Update.
2366 * gnulib/import/float.in.h: Update.
2367 * gnulib/import/fnmatch.c: Update.
2368 * gnulib/import/fnmatch.in.h: Update.
2369 * gnulib/import/fnmatch_loop.c: Update.
2370 * gnulib/import/fpucw.h: Update.
2371 * gnulib/import/frexp.c: Update.
2372 * gnulib/import/frexpl.c: Update.
2373 * gnulib/import/fstat.c: Update.
2374 * gnulib/import/fstatat.c: Update.
2375 * gnulib/import/getcwd-lgpl.c: Update.
2376 * gnulib/import/getcwd.c: Update.
2377 * gnulib/import/getdtablesize.c: Update.
2378 * gnulib/import/getlogin_r.c: Update.
2379 * gnulib/import/getprogname.c: Update.
2380 * gnulib/import/getprogname.h: Update.
2381 * gnulib/import/gettext.h: Update.
2382 * gnulib/import/gettimeofday.c: Update.
2383 * gnulib/import/glob-libc.h: Update.
2384 * gnulib/import/glob.c: Update.
2385 * gnulib/import/glob.in.h: Update.
2386 * gnulib/import/glob_internal.h: Update.
2387 * gnulib/import/glob_pattern_p.c: Update.
2388 * gnulib/import/globfree.c: Update.
2389 * gnulib/import/hard-locale.c: Update.
2390 * gnulib/import/hard-locale.h: Update.
2391 * gnulib/import/intprops.h: Update.
2392 * gnulib/import/inttypes.in.h: Update.
2393 * gnulib/import/isnan.c: Update.
2394 * gnulib/import/isnand-nolibm.h: Update.
2395 * gnulib/import/isnand.c: Update.
2396 * gnulib/import/isnanl-nolibm.h: Update.
2397 * gnulib/import/isnanl.c: Update.
2398 * gnulib/import/itold.c: Update.
2399 * gnulib/import/libc-config.h: Update.
2400 * gnulib/import/limits.in.h: Update.
2401 * gnulib/import/localcharset.c: Update.
2402 * gnulib/import/localcharset.h: Update.
2403 * gnulib/import/localtime-buffer.c: Update.
2404 * gnulib/import/localtime-buffer.h: Update.
2405 * gnulib/import/lstat.c: Update.
2406 * gnulib/import/m4/00gnulib.m4: Update.
2407 * gnulib/import/m4/__inline.m4: Update.
2408 * gnulib/import/m4/absolute-header.m4: Update.
2409 * gnulib/import/m4/alloca.m4: Update.
2410 * gnulib/import/m4/builtin-expect.m4: Update.
2411 * gnulib/import/m4/canonicalize.m4: Update.
2412 * gnulib/import/m4/chdir-long.m4: Update.
2413 * gnulib/import/m4/close.m4: Update.
2414 * gnulib/import/m4/closedir.m4: Update.
2415 * gnulib/import/m4/configmake.m4: Update.
2416 * gnulib/import/m4/d-ino.m4: Update.
2417 * gnulib/import/m4/d-type.m4: Update.
2418 * gnulib/import/m4/dirent_h.m4: Update.
2419 * gnulib/import/m4/dirfd.m4: Update.
2420 * gnulib/import/m4/dirname.m4: Update.
2421 * gnulib/import/m4/double-slash-root.m4: Update.
2422 * gnulib/import/m4/dup.m4: Update.
2423 * gnulib/import/m4/dup2.m4: Update.
2424 * gnulib/import/m4/eealloc.m4: Update.
2425 * gnulib/import/m4/environ.m4: Update.
2426 * gnulib/import/m4/errno_h.m4: Update.
2427 * gnulib/import/m4/error.m4: Update.
2428 * gnulib/import/m4/exponentd.m4: Update.
2429 * gnulib/import/m4/exponentl.m4: Update.
2430 * gnulib/import/m4/extensions.m4: Update.
2431 * gnulib/import/m4/extern-inline.m4: Update.
2432 * gnulib/import/m4/fchdir.m4: Update.
2433 * gnulib/import/m4/fcntl-o.m4: Update.
2434 * gnulib/import/m4/fcntl.m4: Update.
2435 * gnulib/import/m4/fcntl_h.m4: Update.
2436 * gnulib/import/m4/fdopendir.m4: Update.
2437 * gnulib/import/m4/filenamecat.m4: Update.
2438 * gnulib/import/m4/flexmember.m4: Update.
2439 * gnulib/import/m4/float_h.m4: Update.
2440 * gnulib/import/m4/fnmatch.m4: Update.
2441 * gnulib/import/m4/fnmatch_h.m4: Update.
2442 * gnulib/import/m4/fpieee.m4: Update.
2443 * gnulib/import/m4/frexp.m4: Update.
2444 * gnulib/import/m4/frexpl.m4: Update.
2445 * gnulib/import/m4/fstat.m4: Update.
2446 * gnulib/import/m4/fstatat.m4: Update.
2447 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2448 * gnulib/import/m4/getcwd-path-max.m4: Update.
2449 * gnulib/import/m4/getcwd.m4: Update.
2450 * gnulib/import/m4/getdtablesize.m4: Update.
2451 * gnulib/import/m4/getlogin.m4: Update.
2452 * gnulib/import/m4/getlogin_r.m4: Update.
2453 * gnulib/import/m4/getpagesize.m4: Update.
2454 * gnulib/import/m4/getprogname.m4: Update.
2455 * gnulib/import/m4/gettimeofday.m4: Update.
2456 * gnulib/import/m4/glibc21.m4: Update.
2457 * gnulib/import/m4/glob.m4: Update.
2458 * gnulib/import/m4/glob_h.m4: Update.
2459 * gnulib/import/m4/gnulib-cache.m4: Update.
2460 * gnulib/import/m4/gnulib-common.m4: Update.
2461 * gnulib/import/m4/gnulib-comp.m4: Update.
2462 * gnulib/import/m4/gnulib-tool.m4: Update.
2463 * gnulib/import/m4/hard-locale.m4: Update.
2464 * gnulib/import/m4/include_next.m4: Update.
2465 * gnulib/import/m4/inttypes-pri.m4: Update.
2466 * gnulib/import/m4/inttypes.m4: Update.
2467 * gnulib/import/m4/isnand.m4: Update.
2468 * gnulib/import/m4/isnanl.m4: Update.
2469 * gnulib/import/m4/largefile.m4: Update.
2470 * gnulib/import/m4/limits-h.m4: Update.
2471 * gnulib/import/m4/localcharset.m4: Update.
2472 * gnulib/import/m4/locale-fr.m4: Update.
2473 * gnulib/import/m4/locale-ja.m4: Update.
2474 * gnulib/import/m4/locale-zh.m4: Update.
2475 * gnulib/import/m4/localtime-buffer.m4: Update.
2476 * gnulib/import/m4/longlong.m4: Update.
2477 * gnulib/import/m4/lstat.m4: Update.
2478 * gnulib/import/m4/malloc.m4: Update.
2479 * gnulib/import/m4/malloca.m4: Update.
2480 * gnulib/import/m4/math_h.m4: Update.
2481 * gnulib/import/m4/mbrtowc.m4: Update.
2482 * gnulib/import/m4/mbsinit.m4: Update.
2483 * gnulib/import/m4/mbsrtowcs.m4: Update.
2484 * gnulib/import/m4/mbstate_t.m4: Update.
2485 * gnulib/import/m4/memchr.m4: Update.
2486 * gnulib/import/m4/memmem.m4: Update.
2487 * gnulib/import/m4/mempcpy.m4: Update.
2488 * gnulib/import/m4/memrchr.m4: Update.
2489 * gnulib/import/m4/mkdir.m4: Update.
2490 * gnulib/import/m4/mkstemp.m4: Update.
2491 * gnulib/import/m4/mmap-anon.m4: Update.
2492 * gnulib/import/m4/mode_t.m4: Update.
2493 * gnulib/import/m4/msvc-inval.m4: Update.
2494 * gnulib/import/m4/msvc-nothrow.m4: Update.
2495 * gnulib/import/m4/multiarch.m4: Update.
2496 * gnulib/import/m4/nocrash.m4: Update.
2497 * gnulib/import/m4/off_t.m4: Update.
2498 * gnulib/import/m4/onceonly.m4: Update.
2499 * gnulib/import/m4/open-cloexec.m4: Update.
2500 * gnulib/import/m4/open.m4: Update.
2501 * gnulib/import/m4/openat.m4: Update.
2502 * gnulib/import/m4/opendir.m4: Update.
2503 * gnulib/import/m4/pathmax.m4: Update.
2504 * gnulib/import/m4/rawmemchr.m4: Update.
2505 * gnulib/import/m4/readdir.m4: Update.
2506 * gnulib/import/m4/readlink.m4: Update.
2507 * gnulib/import/m4/realloc.m4: Update.
2508 * gnulib/import/m4/rename.m4: Update.
2509 * gnulib/import/m4/rewinddir.m4: Update.
2510 * gnulib/import/m4/rmdir.m4: Update.
2511 * gnulib/import/m4/save-cwd.m4: Update.
2512 * gnulib/import/m4/secure_getenv.m4: Update.
2513 * gnulib/import/m4/setenv.m4: Update.
2514 * gnulib/import/m4/signal_h.m4: Update.
2515 * gnulib/import/m4/ssize_t.m4: Update.
2516 * gnulib/import/m4/stat-time.m4: Update.
2517 * gnulib/import/m4/stat.m4: Update.
2518 * gnulib/import/m4/std-gnu11.m4: Update.
2519 * gnulib/import/m4/stdbool.m4: Update.
2520 * gnulib/import/m4/stddef_h.m4: Update.
2521 * gnulib/import/m4/stdint.m4: Update.
2522 * gnulib/import/m4/stdio_h.m4: Update.
2523 * gnulib/import/m4/stdlib_h.m4: Update.
2524 * gnulib/import/m4/strchrnul.m4: Update.
2525 * gnulib/import/m4/strdup.m4: Update.
2526 * gnulib/import/m4/strerror.m4: Update.
2527 * gnulib/import/m4/string_h.m4: Update.
2528 * gnulib/import/m4/strstr.m4: Update.
2529 * gnulib/import/m4/strtok_r.m4: Update.
2530 * gnulib/import/m4/sys_socket_h.m4: Update.
2531 * gnulib/import/m4/sys_stat_h.m4: Update.
2532 * gnulib/import/m4/sys_time_h.m4: Update.
2533 * gnulib/import/m4/sys_types_h.m4: Update.
2534 * gnulib/import/m4/tempname.m4: Update.
2535 * gnulib/import/m4/time_h.m4: Update.
2536 * gnulib/import/m4/unistd-safer.m4: Update.
2537 * gnulib/import/m4/unistd_h.m4: Update.
2538 * gnulib/import/m4/warn-on-use.m4: Update.
2539 * gnulib/import/m4/wchar_h.m4: Update.
2540 * gnulib/import/m4/wchar_t.m4: Update.
2541 * gnulib/import/m4/wctype_h.m4: Update.
2542 * gnulib/import/m4/wint_t.m4: Update.
2543 * gnulib/import/malloc.c: Update.
2544 * gnulib/import/malloc/scratch_buffer.h: Update.
2545 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2546 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2547 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2548 * gnulib/import/malloca.c: Update.
2549 * gnulib/import/malloca.h: Update.
2550 * gnulib/import/malloca.valgrind: Update.
2551 * gnulib/import/math.in.h: Update.
2552 * gnulib/import/mbrtowc.c: Update.
2553 * gnulib/import/mbsinit.c: Update.
2554 * gnulib/import/mbsrtowcs-impl.h: Update.
2555 * gnulib/import/mbsrtowcs-state.c: Update.
2556 * gnulib/import/mbsrtowcs.c: Update.
2557 * gnulib/import/memchr.c: Update.
2558 * gnulib/import/memmem.c: Update.
2559 * gnulib/import/mempcpy.c: Update.
2560 * gnulib/import/memrchr.c: Update.
2561 * gnulib/import/mkdir.c: Update.
2562 * gnulib/import/mkstemp.c: Update.
2563 * gnulib/import/msvc-inval.c: Update.
2564 * gnulib/import/msvc-inval.h: Update.
2565 * gnulib/import/msvc-nothrow.c: Update.
2566 * gnulib/import/msvc-nothrow.h: Update.
2567 * gnulib/import/open.c: Update.
2568 * gnulib/import/openat-die.c: Update.
2569 * gnulib/import/openat-priv.h: Update.
2570 * gnulib/import/openat-proc.c: Update.
2571 * gnulib/import/openat.c: Update.
2572 * gnulib/import/openat.h: Update.
2573 * gnulib/import/opendir.c: Update.
2574 * gnulib/import/pathmax.h: Update.
2575 * gnulib/import/pipe-safer.c: Update.
2576 * gnulib/import/rawmemchr.c: Update.
2577 * gnulib/import/readdir.c: Update.
2578 * gnulib/import/readlink.c: Update.
2579 * gnulib/import/realloc.c: Update.
2580 * gnulib/import/ref-add.sin: Update.
2581 * gnulib/import/ref-del.sin: Update.
2582 * gnulib/import/rename.c: Update.
2583 * gnulib/import/rewinddir.c: Update.
2584 * gnulib/import/rmdir.c: Update.
2585 * gnulib/import/same-inode.h: Update.
2586 * gnulib/import/save-cwd.c: Update.
2587 * gnulib/import/save-cwd.h: Update.
2588 * gnulib/import/scratch_buffer.h: Update.
2589 * gnulib/import/secure_getenv.c: Update.
2590 * gnulib/import/setenv.c: Update.
2591 * gnulib/import/signal.in.h: Update.
2592 * gnulib/import/stat-time.c: Update.
2593 * gnulib/import/stat-time.h: Update.
2594 * gnulib/import/stat-w32.c: Update.
2595 * gnulib/import/stat-w32.h: Update.
2596 * gnulib/import/stat.c: Update.
2597 * gnulib/import/stdbool.in.h: Update.
2598 * gnulib/import/stddef.in.h: Update.
2599 * gnulib/import/stdint.in.h: Update.
2600 * gnulib/import/stdio.in.h: Update.
2601 * gnulib/import/stdlib.in.h: Update.
2602 * gnulib/import/str-two-way.h: Update.
2603 * gnulib/import/strchrnul.c: Update.
2604 * gnulib/import/strdup.c: Update.
2605 * gnulib/import/streq.h: Update.
2606 * gnulib/import/strerror-override.c: Update.
2607 * gnulib/import/strerror-override.h: Update.
2608 * gnulib/import/strerror.c: Update.
2609 * gnulib/import/string.in.h: Update.
2610 * gnulib/import/stripslash.c: Update.
2611 * gnulib/import/strnlen1.c: Update.
2612 * gnulib/import/strnlen1.h: Update.
2613 * gnulib/import/strstr.c: Update.
2614 * gnulib/import/strtok_r.c: Update.
2615 * gnulib/import/sys_stat.in.h: Update.
2616 * gnulib/import/sys_time.in.h: Update.
2617 * gnulib/import/sys_types.in.h: Update.
2618 * gnulib/import/tempname.c: Update.
2619 * gnulib/import/tempname.h: Update.
2620 * gnulib/import/time.in.h: Update.
2621 * gnulib/import/unistd--.h: Update.
2622 * gnulib/import/unistd-safer.h: Update.
2623 * gnulib/import/unistd.in.h: Update.
2624 * gnulib/import/unsetenv.c: Update.
2625 * gnulib/import/verify.h: Update.
2626 * gnulib/import/extra/snippet/warn-on-use.h: Update.
2627 * gnulib/import/wchar.in.h: Update.
2628 * gnulib/import/wctype.in.h: Update.
2629 * gnulib/import/xalloc-oversized.h: Update.
2630 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2631 "53e2c179f26a890fa6685af4b6c1397ee370433b".
2632
2633 2018-09-10 Simon Marchi <simon.marchi@ericsson.com>
2634
2635 * record-btrace.c (get_thread_current_frame): Remove
2636 old_inferior_ptid.
2637
2638 2018-09-10 Jerome Guitton <guitton@adacore.com>
2639
2640 * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2641 with check_tag to 1 if and only if the type is tagged and the
2642 component being searched cannot been found in the current
2643 view. Otherwise, always call ada_to_fixed_type with
2644 check_tag to 0.
2645
2646 2018-09-10 Xavier Roirand <roirand@adacore.com>
2647
2648 * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2649 declaration.
2650 * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2651 * ada-varobj.c (ada_varobj_get_number_of_children,
2652 ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2653
2654 2018-09-10 Xavier Roirand <roirand@adacore.com>
2655
2656 * ada-valprint.c (ada_value_print): Use type instead of
2657 enclosing type.
2658
2659 2018-09-10 Xavier Roirand <roirand@adacore.com>
2660
2661 * ada-lang.c (ada_value_subscript): Handle case when parameter is
2662 an array of access to unconstrained array.
2663
2664 2018-09-10 Xavier Roirand <roirand@adacore.com>
2665
2666 * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2667 (ada_check_typedef): Use it.
2668
2669 2018-09-10 Xavier Roirand <roirand@adacore.com>
2670
2671 * ada-varobj.c (ada_varobj_describe_struct_child)
2672 (ada_varobj_describe_child): Handle union case like struct one.
2673
2674 2018-09-10 Tom Tromey <tom@tromey.com>
2675
2676 PR python/18380:
2677 * python/python.c (_initialize_python): Make example in "python"
2678 help work in Python 3.
2679
2680 2018-09-10 Eli Zaretskii <eliz@gnu.org>
2681
2682 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2683 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
2684 $(EXEEXT) to the script, as it is not a program.
2685
2686 2018-09-09 Simon Marchi <simon.marchi@ericsson.com>
2687
2688 * python/py-prettyprint.c (pretty_print_one_value): Return
2689 gdbpy_ref<>.
2690 (print_string_repr): Adjust.
2691 (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2692 * python/python-internal.h (apply_varobj_pretty_printer): Return
2693 gdbpy_ref<>.
2694 * varobj.c (varobj_value_get_print_value): Adjust.
2695
2696 2018-09-08 Tom Tromey <tom@tromey.com>
2697
2698 PR python/16047:
2699 * python/py-prettyprint.c (pretty_print_one_value): Check for
2700 to_string method.
2701
2702 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2703
2704 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2705 replace_operator_with_call.
2706
2707 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2708
2709 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2710
2711 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2712
2713 * ada-typeprint.c (print_range): Print the bounds using TYPE
2714 rather than its TYPE_TARGET_TYPE.
2715
2716 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2717
2718 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2719 call to ada_to_fixed_value_create.
2720
2721 2018-09-08 Jerome Guitton <guitton@adacore.com>
2722
2723 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2724
2725 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2726
2727 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2728 by calls to error.
2729
2730 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2731
2732 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2733 Move update of loop variable "fi".
2734
2735 2018-09-08 Joel Brobecker <brobecker@adacore.com>
2736
2737 * ada-lang.c (value_assign_to_component): In the case of
2738 big-endian targets, extract the bits of the given VAL
2739 using an src_offset of zero if container is not a scalar.
2740
2741 2018-09-06 Simon Ser <contact@emersion.fr>
2742
2743 PR gdb/23105
2744 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2745 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2746 * fbsd-tdep.c (fbsd_make_note_desc): New.
2747 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2748 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2749 * target.h (enum target_object) Add FreeBSD-specific
2750 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2751
2752 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2753
2754 * compile/compile-c.h (generate_c_for_variable_locations):
2755 Change reference to pointer.
2756 * compile/compile-c-support.c (compile_program) <compute>:
2757 Likewise.
2758 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2759 (generate_c_for_for_one_variable): Likewise
2760 (generate_c_for_variable_locations): Likewise
2761 * compile/compile-c-types.c (compile_c_instance::convert_type):
2762 Likewise
2763 * compile/compile-cplus-symbols.c (convert_one_symbol):
2764 std::move the scope passed to enter_scope.
2765 * compile/compile-cplus-types.c
2766 (compile_cplus_instance::enter_scope): Make parameter
2767 rvalue-reference.
2768 (compile_cplus_instance::new_scope): Change reference to
2769 pointer.
2770 (compile_cplus_instance::convert_type): Likewise
2771 (compile_cplus_convert_typedef): std::move the scope passed to
2772 enter_scope.
2773 (compile_cplus_convert_struct_or_union): Likewise.
2774 (compile_cplus_convert_enum): Likewise.
2775 (compile_cplus_convert_namespace): Likewise.
2776 * compile/compile-cplus.h (compile_cplus_instance)
2777 <enter_scope>: Make parameter rvalue-reference.
2778 * compile/compile-internal.h (compile_instance)
2779 <get_cached_type>: Likewise
2780 * compile/compile-loc2c.c (push): Likewise
2781 (pushf): Likewise
2782 (unary): Likewise
2783 (binary): Likewise
2784 (print_label): Likewise
2785 (pushf_register_address): Likewise
2786 (pushf_register): Likewise
2787 (do_compile_dwarf_expr_to_c): Likewise
2788 (compile_dwarf_expr_to_c): Likewise
2789 (compile_dwarf_bounds_to_c): Likewise
2790 * compile/compile.c (compile_instance::get_cached_type):
2791 Likewise
2792 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2793 (compile_dwarf_bounds_to_c): Likewise
2794 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2795 (dwarf2_compile_property_to_c): Likewise
2796 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2797 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2798 Likewise
2799
2800 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2801
2802 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2803 * tui/tui-data.c (init_content_element): Don't initialize it.
2804
2805 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
2806
2807 * tui/tui-data.h (struct tui_win_info)
2808 <detail::opaque>: Remove.
2809 * tui/tui-data.c (init_win_info): Remove assignment.
2810
2811 2018-09-05 Tom Tromey <tom@tromey.com>
2812
2813 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2814 -Wformat-nonliteral.
2815 * target-float.c (host_float_ops<T>::to_string)
2816 (host_float_ops<T>::from_string): Use
2817 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2818 * configure: Rebuild.
2819
2820 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
2821
2822 * printcmd.c (printf_c_string): Use
2823 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2824 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2825
2826 2018-09-05 Tom Tromey <tom@tromey.com>
2827
2828 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2829
2830 2018-09-05 Tom de Vries <tdevries@suse.de>
2831
2832 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2833 with resolve_abstract_p == true.
2834 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2835 defaulting to false. Propagate resolve_abstract_p to
2836 dwarf2_fetch_die_loc_sect_off.
2837 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2838 parameter, defaulting to false.
2839 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2840 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2841 parameter.
2842 * dwarf2read.h (struct die_info): Forward-declare.
2843 (die_info_ptr): New typedef.
2844 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2845
2846 2018-09-05 Joel Brobecker <brobecker@adacore.com>
2847
2848 GDB 8.2 released.
2849
2850 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
2851 Pedro Alves <palves@redhat.com>
2852
2853 * gnulib/Makefile.in (aclocal_m4_deps): Move to
2854 "aclocal-m4-deps.mk". Include file here.
2855 $(srcdir)/aclocal.m4: Add "configure.ac".
2856 * gnulib/aclocal-m4-deps.mk: New file.
2857 * gnulib/update-gnulib.sh: Automatically update
2858 "aclocal-m4-deps.mk".
2859
2860 2018-09-04 Tom Tromey <tom@tromey.com>
2861
2862 * configure: Rebuild.
2863 * configure.ac: Remove multi-ice code.
2864
2865 2018-09-04 Tom Tromey <tom@tromey.com>
2866
2867 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2868 (ada-exp.o): Update.
2869
2870 2018-09-04 Tom Tromey <tom@tromey.com>
2871
2872 * Makefile.in (printcmd.o, target-float.o): Remove.
2873 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2874
2875 2018-09-04 Tom Tromey <tom@tromey.com>
2876
2877 * gnulib/Makefile.in: Remove obsolete comment.
2878 * Makefile.in: Remove obsolete comment.
2879
2880 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
2881
2882 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2883 line with '+'.
2884
2885 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2886
2887 * riscv-tdep.c: Add 'prologue-value.h' include.
2888 (struct riscv_unwind_cache): New struct.
2889 (riscv_debug_unwinder): New global.
2890 (riscv_scan_prologue): Update arguments, capture register details
2891 from prologue scan.
2892 (riscv_skip_prologue): Reformat arguments line, move end of
2893 prologue calculation into riscv_scan_prologue.
2894 (riscv_frame_cache): Update return type, create
2895 riscv_unwind_cache, scan the prologue, and fill in remaining cache
2896 details.
2897 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2898 (riscv_frame_prev_register): Use the trad_frame within the
2899 riscv_unwind_cache.
2900 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2901 flag.
2902
2903 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
2904
2905 * trad-frame.h (trad_frame_set_realreg): Declare.
2906 (trad_frame_set_addr): Declare.
2907 * trad-frame.c (trad_frame_set_realreg): Define new function.
2908 (trad_frame_set_addr): Define new function.
2909 (trad_frame_set_reg_realreg): Use new function.
2910 (trad_frame_set_reg_addr): Use new function.
2911
2912 2018-09-01 Keith Seitz <keiths@redhat.com>
2913
2914 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2915 pulongest instead of "%lld".
2916 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2917 ATTRIBUTE_UNUSED.
2918
2919 2018-08-31 Tom Tromey <tom@tromey.com>
2920
2921 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2922 variant part type.
2923
2924 2018-08-31 Pedro Alves <palves@redhat.com>
2925
2926 * gdbarch.h: Regenerate.
2927
2928 2018-08-31 Pedro Alves <palves@redhat.com>
2929
2930 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2931 * target.h (Hardware watchpoint interfaces): Describe
2932 continuable/steppable/non-steppable watchpoints.
2933 * gdbarch.h, gdbarch.c: Regenerate.
2934
2935 2018-08-31 Pedro Alves <palves@redhat.com>
2936
2937 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2938 Delete.
2939 * s390-linux-nat.c
2940 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2941 * target.h (target_ops::have_continuable_watchpoint): Delete.
2942 (target_have_continuable_watchpoint): Delete.
2943 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2944 * target-delegates.c: Regenerate.
2945
2946 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2947
2948 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2949 the files present in "gnulib/import/m4/".
2950
2951 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2952
2953 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2954 c.sw, c.swsp, and c.sdsp.
2955
2956 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
2957
2958 * riscv-tdep.c (struct riscv_inferior_data): Delete.
2959 (riscv_read_misa_reg): Don't cache value read into inferior data.
2960 (riscv_new_inferior_data): Delete.
2961 (riscv_inferior_data_cleanup): Delete.
2962 (riscv_inferior_data): Delete.
2963 (riscv_invalidate_inferior_data): Delete.
2964 (_initialize_riscv_tdep): Remove initialisation of inferior data.
2965
2966 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
2967
2968 * compile/compile-cplus-types.c
2969 (compile_cplus_instance::leave_scope): Take the address of scope
2970 object.
2971 (compile_cplus_instance::convert_qualified_base): Compare quals
2972 to 0.
2973
2974 2018-08-30 Keith Seitz <keiths@redhat.com>
2975
2976 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2977 Use "%s" and host_address_to_string instead of "%p" in printf.
2978
2979 2018-08-29 Keith Seitz <keiths@redhat.com>
2980
2981 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2982 and compile-cplus-types.c.
2983 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2984 * c-lang.c (cplus_language_defn): Set C++ compile functions.
2985 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2986 Declare.
2987 * compile/compile-c-support.c: Include compile-cplus.h.
2988 (load_libcompile): Templatize.
2989 (get_compile_context): "New" function.
2990 (c_get_compile_context): Use get_compile_context.
2991 (cplus_get_compile_context): New function.
2992 (cplus_push_user_expression, cplus_pop_user_expression)
2993 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2994 (cplus_compute_program): Define new structs/functions.
2995 * compile/compile-cplus-symmbols.c: New file.
2996 * compile/compile-cplus-types.c: New file.
2997 * compile/compile-cplus.h: New file.
2998 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2999 Declare.
3000 * compile/compile-object-load.c (get_out_value_type): Use
3001 strncmp_iw when comparing symbol names.
3002 (compile_object_load): Add mst_bss and mst_data.
3003 * compile/compile.c (_initialize_compile): Remove
3004 -Wno-implicit-function-declaration from `compile_args'.
3005 * compile/gcc-cp-plugin.h: New file.
3006 * NEWS: Mention C++ compile support and new debug options.
3007
3008 2018-08-29 Keith Seitz <keiths@redhat.com>
3009
3010 * linespec.c (collect_info::add_symbol): Make virtual.
3011 (struct symbol_searcher_collect_info): New struct.
3012 (symbol_searcher::find_all_symbols): New method.
3013 * symtab.h (class symbol_searcher): New class.
3014
3015 2018-08-29 Keith Seitz <keiths@redhat.com>
3016
3017 * linespec.c (struct linespec) <function_symbols, label_symbols>:
3018 Change to vector of block_symbol. Update all users.
3019 (struct collect_info) <symbols>: Likewise.
3020 (collect_info::add_symbol): Take block_symbol as argument.
3021 Update all callers.
3022 (decode_compound_collector) <m_symbols>: Change type to vector
3023 of block_symbol. Update all users.
3024 (decode_compound_collector::operator ()): Change parameter type
3025 to block_symbol.
3026 (find_method, find_function_symbols, find_linespec_symbols)
3027 (find_label_symbols_in_block, find_label_symbols): Change symbol
3028 vectors to block_symbol vectors.
3029 * symtab.h (symbol_found_callback_ftype): Change parameter type to
3030 block_symbol.
3031
3032 2018-08-29 Keith Seitz <keiths@redhat.com>
3033
3034 * linespec.c (symbolp): Remove typedef and VEC definitions.
3035 (bound_minimal_symbol_d): Likewise.
3036
3037 2018-08-29 Keith Seitz <keiths@redhat.com>
3038
3039 * linespec.c (decode_compound_collector::decode_compound_collector):
3040 Remove initialization for `m_symtabs'.
3041 (decode_compound_collector::release_symbols): Change return type
3042 to std::vector. Update all callers.
3043 (class decode_compound_collector) <m_symbols>: Change type to
3044 std::vector.
3045 (lookup_prefix_sym): Change return type to std::vector. Update all
3046 callers.
3047 (compare_symbols): Remove.
3048 (std_compare_symbols): Rename to `compare_symbols'.
3049 (find_method): Change `sym_classes' parameter to std::vector.
3050 Update all callers. Use std::sort to sort sym_classes.
3051 (find_linespec_symbols): Remove cleanup.
3052
3053 2018-08-29 Keith Seitz <keiths@redhat.com>
3054
3055 * linespec.c (struct linespec) <minimal_symbols>: Change type to
3056 std::vector. Update all users.
3057 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3058 (struct collect_info) <minimal_symbols>: Likewise.
3059 (compare_msymbols): Return bool. Change parameters to const
3060 bound_minimal_symbol references.
3061 (find_method, find_function_symbols, find_linespec_symbols): Change
3062 `minsyms' parameter to std::vector. Update all callers.
3063
3064 2018-08-29 Keith Seitz <keiths@redhat.com>
3065
3066 * linespec.c (struct linespec) <label_symbols>: Change type to
3067 std::vector. Update all users.
3068 (find_label_symbols_in_block): Change `result' parameter to
3069 std::vector. Update all callers.
3070 (find_label_symbols): Return std::vector. Update all callers.
3071
3072 2018-08-29 Keith Seitz <keiths@redhat.com>
3073
3074 * linespec.c (struct linespec) <function_symbols>: Change type to
3075 std::vector. Update all users.
3076 (struct collect_info) <function_symbols>: Likewise.
3077 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3078 (std_compare_symbols): New function.
3079 (find_method, find_function_symbols, find_linespec_symbols)
3080 (find_label_symbols_in_block): Change `symbols' parameter to
3081 std::vector. Update all callers.
3082 (find_label_symbols): Likewise for `function_symbols' and
3083 `label_funcs_ret'.
3084
3085 2018-08-29 Keith Seitz <keiths@redhat.com>
3086
3087 * linespec.c (symtab_vector_up): Define.
3088 (struct linespec) <file_symtabs>: Change type to std::vector *.
3089 Update all uses.
3090 (struct collect_info) <file_symtabs>: Likewise.
3091 (collect_symtabs_from_filename): Return symtab_vector_up.
3092 Update all callers.
3093 (decode_objc): Remove cleanup.
3094 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3095 (symtab_collector::release_symtabs): Return symtab_vector_up.
3096 Update all callers.
3097 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3098 Update all users.
3099 (collect_symtabs_from_filename, symtabs_from_filename): Return
3100 symtab_vector_up. Update all callers.
3101
3102 2018-08-29 Tom Tromey <tom@tromey.com>
3103
3104 * csky-tdep.c (csky_analyze_prologue): Use
3105 core_addr_to_string_nz.
3106
3107 2018-08-29 Tom Tromey <tom@tromey.com>
3108
3109 * windows-nat.c (struct xlate_exception) <them>: Change type to
3110 DWORD.
3111 (xlate): Fix formatting. Remove last entry.
3112 (struct xlate_exception, xlate): Comment out.
3113 (windows_nat_target::resume): Use ranged for.
3114
3115 2018-08-29 Jim Wilson <jimw@sifive.com>
3116
3117 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3118 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3119 of NT_PRFPREG.
3120 (riscv_linux_nat_target::store_registers): Likewise.
3121
3122 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
3123
3124 PR gdb/23555
3125 PR gdb/23558
3126 * gnulib/aclocal.m4: Regenerate.
3127 * gnulib/config.in: Regenerate.
3128 * gnulib/configure: Regenerate.
3129 * gnulib/import/Makefile.am: Update.
3130 * gnulib/import/Makefile.in: Update.
3131 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3132 * gnulib/import/_Noreturn.h: ... this.
3133 * gnulib/import/alloca.in.h: Update.
3134 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3135 * gnulib/import/arg-nonnull.h: ... this.
3136 * gnulib/import/assure.h: Update.
3137 * gnulib/import/at-func.c: Update.
3138 * gnulib/import/basename-lgpl.c: Update.
3139 * gnulib/import/extra/snippet/c++defs.h: Rename to...
3140 * gnulib/import/c++defs.h: ... this.
3141 * gnulib/import/canonicalize-lgpl.c: Update.
3142 * gnulib/import/cdefs.h: Update.
3143 * gnulib/import/chdir-long.c: Update.
3144 * gnulib/import/chdir-long.h: Update.
3145 * gnulib/import/cloexec.c: Update.
3146 * gnulib/import/cloexec.h: Update.
3147 * gnulib/import/close.c: Update.
3148 * gnulib/import/closedir.c: Update.
3149 * gnulib/import/config.charset: Update.
3150 * gnulib/import/dirent-private.h: Update.
3151 * gnulib/import/dirent.in.h: Update.
3152 * gnulib/import/dirfd.c: Update.
3153 * gnulib/import/dirname-lgpl.c: Update.
3154 * gnulib/import/dirname.h: Update.
3155 * gnulib/import/dosname.h: Update.
3156 * gnulib/import/dup-safer-flag.c: Update.
3157 * gnulib/import/dup-safer.c: Update.
3158 * gnulib/import/dup.c: Update.
3159 * gnulib/import/dup2.c: Update.
3160 * gnulib/import/errno.in.h: Update.
3161 * gnulib/import/error.c: Update.
3162 * gnulib/import/error.h: Update.
3163 * gnulib/import/exitfail.c: Update.
3164 * gnulib/import/exitfail.h: Update.
3165 * gnulib/import/extra/update-copyright: Update.
3166 * gnulib/import/fchdir.c: Update.
3167 * gnulib/import/fcntl.c: Update.
3168 * gnulib/import/fcntl.in.h: Update.
3169 * gnulib/import/fd-hook.c: Update.
3170 * gnulib/import/fd-hook.h: Update.
3171 * gnulib/import/fd-safer-flag.c: Update.
3172 * gnulib/import/fd-safer.c: Update.
3173 * gnulib/import/fdopendir.c: Update.
3174 * gnulib/import/filename.h: Update.
3175 * gnulib/import/filenamecat-lgpl.c: Update.
3176 * gnulib/import/filenamecat.h: Update.
3177 * gnulib/import/flexmember.h: Update.
3178 * gnulib/import/float+.h: Update.
3179 * gnulib/import/float.c: Update.
3180 * gnulib/import/float.in.h: Update.
3181 * gnulib/import/fnmatch.c: Update.
3182 * gnulib/import/fnmatch.in.h: Update.
3183 * gnulib/import/fnmatch_loop.c: Update.
3184 * gnulib/import/fpucw.h: Update.
3185 * gnulib/import/frexp.c: Update.
3186 * gnulib/import/frexpl.c: Update.
3187 * gnulib/import/fstat.c: Update.
3188 * gnulib/import/fstatat.c: Update.
3189 * gnulib/import/getcwd-lgpl.c: Update.
3190 * gnulib/import/getcwd.c: Update.
3191 * gnulib/import/getdtablesize.c: Update.
3192 * gnulib/import/getlogin_r.c: Update.
3193 * gnulib/import/getprogname.c: Update.
3194 * gnulib/import/getprogname.h: Update.
3195 * gnulib/import/gettext.h: Update.
3196 * gnulib/import/gettimeofday.c: Update.
3197 * gnulib/import/glob-libc.h: Update.
3198 * gnulib/import/glob.c: Update.
3199 * gnulib/import/glob.in.h: Update.
3200 * gnulib/import/glob_internal.h: Update.
3201 * gnulib/import/glob_pattern_p.c: Update.
3202 * gnulib/import/globfree.c: Update.
3203 * gnulib/import/hard-locale.c: Update.
3204 * gnulib/import/hard-locale.h: Update.
3205 * gnulib/import/intprops.h: Update.
3206 * gnulib/import/inttypes.in.h: Update.
3207 * gnulib/import/isnan.c: Update.
3208 * gnulib/import/isnand-nolibm.h: Update.
3209 * gnulib/import/isnand.c: Update.
3210 * gnulib/import/isnanl-nolibm.h: Update.
3211 * gnulib/import/isnanl.c: Update.
3212 * gnulib/import/itold.c: Update.
3213 * gnulib/import/libc-config.h: Update.
3214 * gnulib/import/limits.in.h: Update.
3215 * gnulib/import/localcharset.c: Update.
3216 * gnulib/import/localcharset.h: Update.
3217 * gnulib/import/localtime-buffer.c: Update.
3218 * gnulib/import/localtime-buffer.h: Update.
3219 * gnulib/import/lstat.c: Update.
3220 * gnulib/import/m4/00gnulib.m4: Update.
3221 * gnulib/import/m4/__inline.m4: Update.
3222 * gnulib/import/m4/absolute-header.m4: Update.
3223 * gnulib/import/m4/alloca.m4: Update.
3224 * gnulib/import/m4/builtin-expect.m4: Update.
3225 * gnulib/import/m4/canonicalize.m4: Update.
3226 * gnulib/import/m4/chdir-long.m4: Update.
3227 * gnulib/import/m4/close.m4: Update.
3228 * gnulib/import/m4/closedir.m4: Update.
3229 * gnulib/import/m4/configmake.m4: Update.
3230 * gnulib/import/m4/d-ino.m4: Update.
3231 * gnulib/import/m4/d-type.m4: Update.
3232 * gnulib/import/m4/dirent_h.m4: Update.
3233 * gnulib/import/m4/dirfd.m4: Update.
3234 * gnulib/import/m4/dirname.m4: Update.
3235 * gnulib/import/m4/double-slash-root.m4: Update.
3236 * gnulib/import/m4/dup.m4: Update.
3237 * gnulib/import/m4/dup2.m4: Update.
3238 * gnulib/import/m4/eealloc.m4: Update.
3239 * gnulib/import/m4/environ.m4: Update.
3240 * gnulib/import/m4/errno_h.m4: Update.
3241 * gnulib/import/m4/error.m4: Update.
3242 * gnulib/import/m4/exponentd.m4: Update.
3243 * gnulib/import/m4/exponentl.m4: Update.
3244 * gnulib/import/m4/extensions.m4: Update.
3245 * gnulib/import/m4/extern-inline.m4: Update.
3246 * gnulib/import/m4/fchdir.m4: Update.
3247 * gnulib/import/m4/fcntl-o.m4: Update.
3248 * gnulib/import/m4/fcntl.m4: Update.
3249 * gnulib/import/m4/fcntl_h.m4: Update.
3250 * gnulib/import/m4/fdopendir.m4: Update.
3251 * gnulib/import/m4/filenamecat.m4: Update.
3252 * gnulib/import/m4/flexmember.m4: Update.
3253 * gnulib/import/m4/float_h.m4: Update.
3254 * gnulib/import/m4/fnmatch.m4: Update.
3255 * gnulib/import/m4/fnmatch_h.m4: Update.
3256 * gnulib/import/m4/fpieee.m4: Update.
3257 * gnulib/import/m4/frexp.m4: Update.
3258 * gnulib/import/m4/frexpl.m4: Update.
3259 * gnulib/import/m4/fstat.m4: Update.
3260 * gnulib/import/m4/fstatat.m4: Update.
3261 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3262 * gnulib/import/m4/getcwd-path-max.m4: Update.
3263 * gnulib/import/m4/getcwd.m4: Update.
3264 * gnulib/import/m4/getdtablesize.m4: Update.
3265 * gnulib/import/m4/getlogin.m4: Update.
3266 * gnulib/import/m4/getlogin_r.m4: Update.
3267 * gnulib/import/m4/getpagesize.m4: Update.
3268 * gnulib/import/m4/getprogname.m4: Update.
3269 * gnulib/import/m4/gettimeofday.m4: Update.
3270 * gnulib/import/m4/glibc21.m4: Update.
3271 * gnulib/import/m4/glob.m4: Update.
3272 * gnulib/import/m4/glob_h.m4: Update.
3273 * gnulib/import/m4/gnulib-cache.m4: Update.
3274 * gnulib/import/m4/gnulib-common.m4: Update.
3275 * gnulib/import/m4/gnulib-comp.m4: Update.
3276 * gnulib/import/m4/gnulib-tool.m4: Update.
3277 * gnulib/import/m4/hard-locale.m4: Update.
3278 * gnulib/import/m4/include_next.m4: Update.
3279 * gnulib/import/m4/inttypes-pri.m4: Update.
3280 * gnulib/import/m4/inttypes.m4: Update.
3281 * gnulib/import/m4/isnand.m4: Update.
3282 * gnulib/import/m4/isnanl.m4: Update.
3283 * gnulib/import/m4/largefile.m4: Update.
3284 * gnulib/import/m4/limits-h.m4: Update.
3285 * gnulib/import/m4/localcharset.m4: Update.
3286 * gnulib/import/m4/locale-fr.m4: Update.
3287 * gnulib/import/m4/locale-ja.m4: Update.
3288 * gnulib/import/m4/locale-zh.m4: Update.
3289 * gnulib/import/m4/localtime-buffer.m4: Update.
3290 * gnulib/import/m4/longlong.m4: Update.
3291 * gnulib/import/m4/lstat.m4: Update.
3292 * gnulib/import/m4/malloc.m4: Update.
3293 * gnulib/import/m4/malloca.m4: Update.
3294 * gnulib/import/m4/math_h.m4: Update.
3295 * gnulib/import/m4/mbrtowc.m4: Update.
3296 * gnulib/import/m4/mbsinit.m4: Update.
3297 * gnulib/import/m4/mbsrtowcs.m4: Update.
3298 * gnulib/import/m4/mbstate_t.m4: Update.
3299 * gnulib/import/m4/memchr.m4: Update.
3300 * gnulib/import/m4/memmem.m4: Update.
3301 * gnulib/import/m4/mempcpy.m4: Update.
3302 * gnulib/import/m4/memrchr.m4: Update.
3303 * gnulib/import/m4/mkdir.m4: Update.
3304 * gnulib/import/m4/mkstemp.m4: Update.
3305 * gnulib/import/m4/mmap-anon.m4: Update.
3306 * gnulib/import/m4/mode_t.m4: Update.
3307 * gnulib/import/m4/msvc-inval.m4: Update.
3308 * gnulib/import/m4/msvc-nothrow.m4: Update.
3309 * gnulib/import/m4/multiarch.m4: Update.
3310 * gnulib/import/m4/nocrash.m4: Update.
3311 * gnulib/import/m4/off_t.m4: Update.
3312 * gnulib/import/m4/onceonly.m4: Update.
3313 * gnulib/import/m4/open-cloexec.m4: Update.
3314 * gnulib/import/m4/open.m4: Update.
3315 * gnulib/import/m4/openat.m4: Update.
3316 * gnulib/import/m4/opendir.m4: Update.
3317 * gnulib/import/m4/pathmax.m4: Update.
3318 * gnulib/import/m4/rawmemchr.m4: Update.
3319 * gnulib/import/m4/readdir.m4: Update.
3320 * gnulib/import/m4/readlink.m4: Update.
3321 * gnulib/import/m4/realloc.m4: Update.
3322 * gnulib/import/m4/rename.m4: Update.
3323 * gnulib/import/m4/rewinddir.m4: Update.
3324 * gnulib/import/m4/rmdir.m4: Update.
3325 * gnulib/import/m4/save-cwd.m4: Update.
3326 * gnulib/import/m4/secure_getenv.m4: Update.
3327 * gnulib/import/m4/setenv.m4: Update.
3328 * gnulib/import/m4/signal_h.m4: Update.
3329 * gnulib/import/m4/ssize_t.m4: Update.
3330 * gnulib/import/m4/stat-time.m4: Update.
3331 * gnulib/import/m4/stat.m4: Update.
3332 * gnulib/import/m4/std-gnu11.m4: Update.
3333 * gnulib/import/m4/stdbool.m4: Update.
3334 * gnulib/import/m4/stddef_h.m4: Update.
3335 * gnulib/import/m4/stdint.m4: Update.
3336 * gnulib/import/m4/stdio_h.m4: Update.
3337 * gnulib/import/m4/stdlib_h.m4: Update.
3338 * gnulib/import/m4/strchrnul.m4: Update.
3339 * gnulib/import/m4/strdup.m4: Update.
3340 * gnulib/import/m4/strerror.m4: Update.
3341 * gnulib/import/m4/string_h.m4: Update.
3342 * gnulib/import/m4/strstr.m4: Update.
3343 * gnulib/import/m4/strtok_r.m4: Update.
3344 * gnulib/import/m4/sys_socket_h.m4: Update.
3345 * gnulib/import/m4/sys_stat_h.m4: Update.
3346 * gnulib/import/m4/sys_time_h.m4: Update.
3347 * gnulib/import/m4/sys_types_h.m4: Update.
3348 * gnulib/import/m4/tempname.m4: Update.
3349 * gnulib/import/m4/time_h.m4: Update.
3350 * gnulib/import/m4/unistd-safer.m4: Update.
3351 * gnulib/import/m4/unistd_h.m4: Update.
3352 * gnulib/import/m4/warn-on-use.m4: Update.
3353 * gnulib/import/m4/wchar_h.m4: Update.
3354 * gnulib/import/m4/wchar_t.m4: Update.
3355 * gnulib/import/m4/wctype_h.m4: Update.
3356 * gnulib/import/m4/wint_t.m4: Update.
3357 * gnulib/import/malloc.c: Update.
3358 * gnulib/import/malloc/scratch_buffer.h: Update.
3359 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3360 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3361 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3362 * gnulib/import/malloca.c: Update.
3363 * gnulib/import/malloca.h: Update.
3364 * gnulib/import/malloca.valgrind: Update.
3365 * gnulib/import/math.in.h: Update.
3366 * gnulib/import/mbrtowc.c: Update.
3367 * gnulib/import/mbsinit.c: Update.
3368 * gnulib/import/mbsrtowcs-impl.h: Update.
3369 * gnulib/import/mbsrtowcs-state.c: Update.
3370 * gnulib/import/mbsrtowcs.c: Update.
3371 * gnulib/import/memchr.c: Update.
3372 * gnulib/import/memmem.c: Update.
3373 * gnulib/import/mempcpy.c: Update.
3374 * gnulib/import/memrchr.c: Update.
3375 * gnulib/import/mkdir.c: Update.
3376 * gnulib/import/mkstemp.c: Update.
3377 * gnulib/import/msvc-inval.c: Update.
3378 * gnulib/import/msvc-inval.h: Update.
3379 * gnulib/import/msvc-nothrow.c: Update.
3380 * gnulib/import/msvc-nothrow.h: Update.
3381 * gnulib/import/open.c: Update.
3382 * gnulib/import/openat-die.c: Update.
3383 * gnulib/import/openat-priv.h: Update.
3384 * gnulib/import/openat-proc.c: Update.
3385 * gnulib/import/openat.c: Update.
3386 * gnulib/import/openat.h: Update.
3387 * gnulib/import/opendir.c: Update.
3388 * gnulib/import/pathmax.h: Update.
3389 * gnulib/import/pipe-safer.c: Update.
3390 * gnulib/import/rawmemchr.c: Update.
3391 * gnulib/import/readdir.c: Update.
3392 * gnulib/import/readlink.c: Update.
3393 * gnulib/import/realloc.c: Update.
3394 * gnulib/import/ref-add.sin: Update.
3395 * gnulib/import/ref-del.sin: Update.
3396 * gnulib/import/rename.c: Update.
3397 * gnulib/import/rewinddir.c: Update.
3398 * gnulib/import/rmdir.c: Update.
3399 * gnulib/import/same-inode.h: Update.
3400 * gnulib/import/save-cwd.c: Update.
3401 * gnulib/import/save-cwd.h: Update.
3402 * gnulib/import/scratch_buffer.h: Update.
3403 * gnulib/import/secure_getenv.c: Update.
3404 * gnulib/import/setenv.c: Update.
3405 * gnulib/import/signal.in.h: Update.
3406 * gnulib/import/stat-time.c: Update.
3407 * gnulib/import/stat-time.h: Update.
3408 * gnulib/import/stat-w32.c: Update.
3409 * gnulib/import/stat-w32.h: Update.
3410 * gnulib/import/stat.c: Update.
3411 * gnulib/import/stdbool.in.h: Update.
3412 * gnulib/import/stddef.in.h: Update.
3413 * gnulib/import/stdint.in.h: Update.
3414 * gnulib/import/stdio.in.h: Update.
3415 * gnulib/import/stdlib.in.h: Update.
3416 * gnulib/import/str-two-way.h: Update.
3417 * gnulib/import/strchrnul.c: Update.
3418 * gnulib/import/strdup.c: Update.
3419 * gnulib/import/streq.h: Update.
3420 * gnulib/import/strerror-override.c: Update.
3421 * gnulib/import/strerror-override.h: Update.
3422 * gnulib/import/strerror.c: Update.
3423 * gnulib/import/string.in.h: Update.
3424 * gnulib/import/stripslash.c: Update.
3425 * gnulib/import/strnlen1.c: Update.
3426 * gnulib/import/strnlen1.h: Update.
3427 * gnulib/import/strstr.c: Update.
3428 * gnulib/import/strtok_r.c: Update.
3429 * gnulib/import/sys_stat.in.h: Update.
3430 * gnulib/import/sys_time.in.h: Update.
3431 * gnulib/import/sys_types.in.h: Update.
3432 * gnulib/import/tempname.c: Update.
3433 * gnulib/import/tempname.h: Update.
3434 * gnulib/import/time.in.h: Update.
3435 * gnulib/import/unistd--.h: Update.
3436 * gnulib/import/unistd-safer.h: Update.
3437 * gnulib/import/unistd.in.h: Update.
3438 * gnulib/import/unsetenv.c: Update.
3439 * gnulib/import/verify.h: Update.
3440 * gnulib/import/extra/snippet/warn-on-use.h: Update.
3441 * gnulib/import/wchar.in.h: Update.
3442 * gnulib/import/wctype.in.h: Update.
3443 * gnulib/import/xalloc-oversized.h: Update.
3444 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3445 "53e2c179f26a890fa6685af4b6c1397ee370433b".
3446
3447 2018-08-16 Gary Benson <gbenson@redhat.com>
3448
3449 PR gdb/13000:
3450 * gdb/main.c (captured_main_1): Exit with nonzero status
3451 in batch mode if the last command to be executed failed.
3452 * NEWS: Mention the above.
3453
3454 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
3455
3456 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3457 end of warning message.
3458
3459 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3460
3461 PR gdb/22943:
3462 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3463 (aarch64_extract_return_value): Use
3464 aapcs_is_vfp_call_or_return_candidate.
3465 (aarch64_return_in_memory): Likewise.
3466 (aarch64_store_return_value): Likewise.
3467
3468 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3469
3470 * aarch64-tdep.c
3471 (aapcs_is_vfp_call_or_return_candidate): Make static
3472 (pass_in_v_or_stack): Remove function.
3473 (pass_in_v_vfp_candidate): New function.
3474 (aarch64_push_dummy_call): Check for float register candidates.
3475
3476 2018-08-29 Alan Hayward <alan.hayward@arm.com>
3477
3478 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3479 (aapcs_is_vfp_call_or_return_candidate_1): New function.
3480 (aapcs_is_vfp_call_or_return_candidate): Likewise.
3481
3482 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
3483
3484 PR build/23399
3485 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3486 (struct ipa_sym_addresses): Rename to...
3487 (struct ipa_sym_addresses_common): ... this.
3488 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3489
3490 2018-08-28 Tom Tromey <tom@tromey.com>
3491
3492 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3493 (token_fifo): Now a std::vector.
3494 (yylex, c_parse): Update.
3495 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3496 (token_fifo): Now a std::vector.
3497 (yylex, d_parse): Update.
3498 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3499 (token_fifo): Now a std::vector.
3500 (yylex, go_parse): Update.
3501
3502 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
3503
3504 * parser-defs.h (struct type_stack) <elements>: Change type to
3505 std::vector<union type_stack_elt>.
3506 <depth, size>: Remove.
3507 * parse.c (parse_exp_in_context_1): Adjust.
3508 (type_stack_reserve): Remove.
3509 (check_type_stack_depth): Remove.
3510 (insert_into_type_stack): Adjust to std::vector.
3511 (insert_type): Likewise.
3512 (push_type): Likewise.
3513 (push_type_int): Likewise.
3514 (insert_type_address_space): Likewise.
3515 (pop_type): Likewise.
3516 (pop_type_int): Likewise.
3517 (pop_typelist): Likewise.
3518 (pop_type_stack): Likewise.
3519 (append_type_stack): Likewise.
3520 (push_type_stack): Likewise.
3521 (get_type_stack): Likewise.
3522 (type_stack_cleanup): Likewise.
3523 (push_typelist): Likewise.
3524 (follow_types): Likewise.
3525 (_initialize_parse): Likewise.
3526
3527 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
3528
3529 * NEWS: Mention csky target.
3530
3531 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
3532 Hafiz Abid Qadeer <abidh@codesourcery.com>
3533 Don Breazeal <donb@codesourcery.com>
3534
3535 * csky-linux-tdep.c: New file.
3536 * csky-tdep.c: Likewise.
3537 * csky-tdep.h: Likewise.
3538 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3539 csky-tdep.o.
3540 (HFILES_NO_SRCDIR): Add csky-tdep.h.
3541 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3542 * configure.tgt: Add csky support.
3543
3544 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
3545
3546 * python/py-framefilter.c (py_print_frame): Print frame architecture
3547 when printing on an MI output.
3548
3549 2018-08-27 Tom Tromey <tom@tromey.com>
3550
3551 PR build/23087:
3552 * configure: Rebuild.
3553 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3554
3555 2018-08-27 Tom Tromey <tom@tromey.com>
3556
3557 * aarch64-linux-tdep.c
3558 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3559 casts to int.
3560
3561 2018-08-27 Tom Tromey <tom@tromey.com>
3562
3563 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3564 unsigned.
3565 (ppc64_standard_linkage1, ppc64_standard_linkage2)
3566 (ppc64_standard_linkage3, ppc64_standard_linkage4)
3567 (ppc64_standard_linkage5, ppc64_standard_linkage6)
3568 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3569 unsigned.
3570
3571 2018-08-27 Tom Tromey <tom@tromey.com>
3572
3573 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3574 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3575
3576 2018-08-27 Tom Tromey <tom@tromey.com>
3577
3578 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3579 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3580 ULONGEST_MAX.
3581 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3582 ULONGEST_MAX.
3583 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3584 ULONGEST_MAX.
3585 * sparc-linux-tdep.c (sparc32_linux_sigframe)
3586 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3587 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3588 ULONGEST_MAX.
3589 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3590 (ppc64_linux_sigaction_tramp_frame)
3591 (ppc32_linux_sighandler_tramp_frame)
3592 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3593 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3594 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3595 * mn10300-linux-tdep.c (am33_linux_sigframe)
3596 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3597 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3598 * mips-linux-tdep.c (mips_linux_o32_sigframe)
3599 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3600 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3601 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3602 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3603 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3604 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3605 * microblaze-linux-tdep.c
3606 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3607 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3608 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3609 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3610 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3611 * common/common-types.h (ULONGEST_MAX): New define.
3612 (CORE_ADDR_MAX): Fix formatting.
3613 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3614 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3615 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3616 (arm_linux_rt_sigreturn_tramp_frame)
3617 (arm_eabi_linux_sigreturn_tramp_frame)
3618 (arm_eabi_linux_rt_sigreturn_tramp_frame)
3619 (thumb2_eabi_linux_sigreturn_tramp_frame)
3620 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3621 (arm_linux_restart_syscall_tramp_frame)
3622 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3623 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3624 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3625 ULONGEST_MAX.
3626 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3627
3628 2018-08-27 Tom Tromey <tom@tromey.com>
3629
3630 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3631 CORE_ADDR_MAX.
3632 * mips-tdep.c (mips_deal_with_atomic_sequence)
3633 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3634 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3635 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3636 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3637 CORE_ADDR_MAX.
3638 * aarch64-tdep.c (aarch64_software_single_step): Use
3639 CORE_ADDR_MAX.
3640
3641 2018-08-27 Tom Tromey <tom@tromey.com>
3642
3643 * linespec.c (complete_linespec_component): Add cast to "char".
3644 * completer.c (completion_tracker::build_completion_result): Add
3645 cast to "char".
3646
3647 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3648
3649 * solist.h (struct solist, struct target_so_ops): Fix
3650 indentation.
3651
3652 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3653
3654 * ada-tasks.c (ada_task_info_s): Remove typedef.
3655 (DEF_VEC_O(ada_task_info_s)): Remove.
3656 (struct ada_tasks_inferior_data): Initialize fields.
3657 <task_list>: Make an std::vector.
3658 (get_ada_tasks_inferior_data): Allocate with new.
3659 (ada_get_task_number): Adjust.
3660 (get_task_number_from_id): Likewise.
3661 (valid_task_id): Likewise.
3662 (ada_get_task_info_from_ptid): Likewise.
3663 (iterate_over_live_ada_tasks): Likewise.
3664 (add_ada_task): Likewise.
3665 (read_known_tasks): Likewise.
3666 (ada_build_task_list): Likewise.
3667 (print_ada_task_info): Likewise.
3668 (info_task): Likewise.
3669 (task_command_1): Likewise.
3670
3671 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
3672
3673 * ada-lang.c (add_angle_brackets): Return std::string.
3674
3675 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
3676
3677 * python/py-threadevent.c (py_get_event_thread): Initialize
3678 pythread.
3679
3680 2018-08-24 Pedro Alves <palves@redhat.com>
3681
3682 * python/py-bpevent.c (create_breakpoint_event_object): Use
3683 copy-initialization.
3684 * python/py-continueevent.c (emit_continue_event): Use
3685 copy-initialization.
3686 * python/py-exitedevent.c (create_exited_event_object): Return a
3687 gdbpy_ref<>.
3688 (emit_exited_event): Use copy-initialization.
3689 * python/py-inferior.c (python_new_inferior)
3690 (python_inferior_deleted, add_thread_object): Use
3691 copy-initialization.
3692 * python/py-infevents.c (create_inferior_call_event_object)
3693 (create_register_changed_event_object)
3694 (create_memory_changed_event_object): Return a gdbpy_ref<>.
3695 (emit_inferior_call_event, emit_memory_changed_event)
3696 (emit_register_changed_event): Use copy-initialization.
3697 * python/py-newobjfileevent.c (create_new_objfile_event_object):
3698 Return a gdbpy_ref<>.
3699 (emit_new_objfile_event): Use copy-initialization.
3700 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3701 (emit_clear_objfiles_event): Use copy-initialization.
3702 * python/py-signalevent.c (create_signal_event_object): Use
3703 copy-initialization.
3704 * python/py-threadevent.c (create_thread_event_object): Use
3705 copy-initialization.
3706
3707 2018-08-24 Pedro Alves <palves@redhat.com>
3708 Simon Marchi <simon.marchi@ericsson.com>
3709
3710 PR gdb/23379
3711 * python/py-continueevent.c: Include "gdbthread.h".
3712 (create_continue_event_object): Add intro comment. Add 'ptid'
3713 parameter. Use it to find thread to pass to
3714 create_thread_event_object.
3715 (emit_continue_event): Pass PTID down to
3716 create_continue_event_object.
3717 * python/py-event.h (py_get_event_thread): Declare.
3718 (create_thread_event_object): Remove default from 'thread'
3719 parameter.
3720 * python/py-stopevent.c (create_stop_event_object): Use
3721 py_get_event_thread.
3722 * python/py-threadevent.c (get_event_thread): Rename to ...
3723 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3724 and use it to find the thread.
3725 (create_thread_event_object): Assert that THREAD isn't null.
3726 Don't find the event thread here.
3727
3728 2018-08-23 Kevin Buettner <kevinb@redhat.com>
3729
3730 * block.h (blockrange, blockranges): New struct declarations.
3731 (struct block): Add new field named `ranges'.
3732 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3733 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3734 macros for accessing ranges in struct block.
3735 (make_blockranges): New declaration.
3736 block.c (make_blockranges): New function.
3737 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3738 for block.
3739 * symtab.h (find_pc_partial_function): Add new parameter `block'.
3740 * blockframe.c (cache_pc_function_block): New static global.
3741 (clear_pc_function_cache): Clear cache_pc_function_block.
3742 (find_pc_partial_function): Move comment to symtab.h. Add
3743 support for non-contiguous blocks.
3744 * cli/cli-cmds.c (block.h): Include.
3745 (print_disassembly): Handle printing of non-contiguous blocks.
3746 (disassemble_current_function): Likewise.
3747 (disassemble_command): Likewise.
3748
3749 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3750 BLOCK_START.
3751 * blockframe.c (get_pc_function_start): Likewise.
3752 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3753 (gcc_symbol_address): Likewise.
3754 * compile/compile-object-run.c (compile_object_run): Likewise.
3755 * compile/compile.c (get_expr_block_and_pc): Likewise.
3756 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3757 (func_addr_to_tail_call_list): Likewise.
3758 * findvar.c (default_read_var_value): Likewise.
3759 * inline-frame.c (inline_frame_this_id): Likewise.
3760 (skip-inline_frames): Likewise.
3761 * infcmd.c (until_next_command): Likewise.
3762 * linespec.c (convert_linespec_to_sals): Likewise.
3763 * parse.c (parse_exp_in_context_1): Likewise.
3764 * printcmd.c (build_address_symbolic): likewise.
3765 (info_address_command): Likewise.
3766 symtab.c (find_function_start_sal): Likewise.
3767 (skip_prologue_sal): Likewise.
3768 (find_function_alias_target): Likewise.
3769 (find_gnu_ifunc): Likewise.
3770 * stack.c (find_frame_funname): Likewise.
3771 * symtab.c (fixup_symbol_section): Likewise.
3772 (find_function_start_sal): Likewise.
3773 (skip_prologue_sal): Likewsie.
3774 (find_function_alias_target): Likewise.
3775 (find_gnu_ifunc): Likewise.
3776 * tracepoint.c (info_scope_command): Likewise.
3777 * value.c (value_fn_field): Likewise.
3778
3779 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3780 in place of find_pc_partial_function.
3781 * blockframe.c (find_function_entry_range_from_pc): New function.
3782 * symtab.h (find_function_entry_range_from_pc): Declare and document.
3783 * objfiles.c (objfile_relocate1): Relocate start and end addresses
3784 for each range in a block.
3785
3786
3787 2018-08-23 Xavier Roirand <roirand@adacore.com>
3788
3789 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3790 incrementation.
3791
3792 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3793
3794 * solib-svr4.c (read_program_headers_from_bfd): Return
3795 gdb::optional<gdb::byte_vector>.
3796 (svr4_exec_displacement): Adjust.
3797
3798 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3799
3800 * solib-svr4.c (read_program_header): Return
3801 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3802 (find_program_interpreter): Return
3803 gdb::optional<gdb::byte_vector>.
3804 (scan_dyntag_auxv): Adjust.
3805 (enable_break): Adjust.
3806 (svr4_exec_displacement): Adjust.
3807
3808 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3809
3810 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3811 * inf-child.c (inf_child_target::terminal_save_inferior): New.
3812
3813 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
3814
3815 * guile/scm-string.c (gdbscm_scm_from_printf): Use
3816 string_vprintf.
3817 * guile/scm-utils.c (gdbscm_printf): Likewise.
3818 * serial.c (serial_printf): Likewise.
3819 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3820
3821 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
3822
3823 * stack.c (print_frame): Print frame architecture when printing on
3824 an MI output.
3825 * NEWS: Mention new "arch" attribute in frame output.
3826
3827 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3828
3829 * arch/aarch64.h (aarch64_regnum): Update comment.
3830
3831 2018-08-21 Alan Hayward <alan.hayward@arm.com>
3832
3833 * NEWS: Add SVE to 8.2 section.
3834
3835 2018-08-21 Pedro Alves <palves@redhat.com>
3836
3837 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3838 out from gdbscm_parse_function_args.
3839 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3840 gdbscm_parse_function_args_1.
3841
3842 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
3843
3844 PR gdb/17816
3845 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3846 operator.
3847
3848 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
3849
3850 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3851
3852 2018-08-19 Michael Spang <spang@google.com>
3853
3854 PR gdb/11786
3855 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3856 for PT_TLS segments.
3857
3858 2018-08-18 Kevin Buettner <kevinb@redhat.com>
3859
3860 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3861 dwarf_variable_value.
3862 * dwarf2-frame.c (class dwarf_expr_executor):
3863 Add override for dwarf_variable_value.
3864 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3865 (class symbol_needs_eval_context): Likewise.
3866 (indirect_synthetic_pointer): Add forward declaration.
3867 (sect_variable_value): New function.
3868 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3869 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3870 for DW_OP_GNU_variable_value.
3871
3872 2018-08-16 Tom Tromey <tom@tromey.com>
3873
3874 * top.c (read_command_file): Update.
3875 (command_line_input): Remove "repeat" argument.
3876 * ada-lang.c (get_selections): Update.
3877 * linespec.c (decode_line_2): Update.
3878 * defs.h (command_line_input): Remove argument.
3879 * cli/cli-script.c (read_next_line): Update.
3880 * python/py-gdb-readline.c: Update.
3881
3882 2018-08-17 Tom Tromey <tom@tromey.com>
3883
3884 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3885 command_line_input.
3886
3887 2018-08-15 Tom Tromey <tom@tromey.com>
3888
3889 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3890
3891 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
3892
3893 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3894 If used, use find_pc_partial_function to find address range
3895 to disassemble.
3896 * mi/mi-main.c (mi_cmd_list_features): Report
3897 "data-disassemble-a-option" feature.
3898 * NEWS: Mention new -data-disassemble option -a.
3899
3900 2018-08-13 Tom Tromey <tom@tromey.com>
3901
3902 * common/common-defs.h (_FORTIFY_SOURCE): Define.
3903
3904 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3905
3906 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3907 (aarch64_linux_collect_sve_regset): Likewise.
3908 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3909 * regcache.h (regcache_map_entry_size): New function.
3910
3911 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3912
3913 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3914 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3915 (SVE_HEADER_VL_LENGTH): Likewise.
3916 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3917 (SVE_HEADER_FLAGS_LENGTH): Likewise.
3918 (SVE_HEADER_RESERVED_LENGTH): Likewise.
3919 (SVE_HEADER_SIZE_OFFSET): Likewise.
3920 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3921 (SVE_HEADER_VL_OFFSET): Likewise.
3922 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3923 (SVE_HEADER_FLAGS_OFFSET): Likewise.
3924 (SVE_HEADER_RESERVED_OFFSET): Likewise.
3925 (SVE_HEADER_SIZE): Likewise.
3926 (aarch64_linux_core_read_vq): Add function.
3927 (aarch64_linux_core_read_description): Check for SVE section.
3928
3929 2018-08-13 Alan Hayward <alan.hayward@arm.com>
3930
3931 * aarch64-fbsd-tdep.c
3932 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3933 collect_size.
3934 * aarch64-linux-tdep.c
3935 (aarch64_linux_iterate_over_regset_sections): Likewise.
3936 * alpha-linux-tdep.c
3937 (alpha_linux_iterate_over_regset_sections):
3938 * alpha-nbsd-tdep.c
3939 (alphanbsd_iterate_over_regset_sections): Likewise.
3940 * amd64-fbsd-tdep.c
3941 (amd64fbsd_iterate_over_regset_sections): Likewise.
3942 * amd64-linux-tdep.c
3943 (amd64_linux_iterate_over_regset_sections): Likewise.
3944 * arm-bsd-tdep.c
3945 (armbsd_iterate_over_regset_sections): Likewise.
3946 * arm-fbsd-tdep.c
3947 (arm_fbsd_iterate_over_regset_sections): Likewise.
3948 * arm-linux-tdep.c
3949 (arm_linux_iterate_over_regset_sections): Likewise.
3950 * corelow.c (get_core_registers_cb): Likewise.
3951 (core_target::fetch_registers): Likewise.
3952 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3953 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3954 * gdbarch.h (void): Regenerate.
3955 * gdbarch.sh: Add supply_size and collect_size.
3956 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3957 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3958 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3959 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3960 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3961 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3962 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3963 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3964 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3965 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3966 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3967 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3968 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3969 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3970 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3971 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3972 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3973 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3974 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3975 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3976 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3977 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3978 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3979 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3980 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3981 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3982 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3983 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3984 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3985 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3986
3987 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
3988
3989 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3990 with string_printf.
3991
3992 2018-08-10 Keith Seitz <keiths@redhat.com>
3993
3994 * compile/compile-c-support.c (add_code_header, add_code_footer):
3995 Move into policy class.
3996 (c_push_user_expression, pop_user_expression_nop)
3997 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3998 (compile_program): New host class.
3999 (c_compile_program): New typedef.
4000 (c_compute_porgram): Use c_compile_program.
4001
4002 2018-08-10 Keith Seitz <keiths@redhat.com>
4003
4004 * compile/compile-internal.h (compile_instance::~compile_instance):
4005 Remove calls to htab_delete.
4006 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4007 * compile.c (compile_instance::compile_instance): Initialize
4008 htab unique pointers.
4009 (compile_instance::get_cached_type, compile_instance::insert_type)
4010 (compile_instance::error_symbol_once): Update for unique_ptr.
4011
4012 2018-08-10 Keith Seitz <keiths@redhat.com>
4013
4014 * compile/compile-c-symbols.c (struct symbol_error)
4015 (hash_symbol_error, eq_symbol_error, del_symbol_error)
4016 (compile_instance::insert_symbol_error)
4017 (compile_instance::error_symbol_once): Move to ...
4018 * compile/compile.c: ... here.
4019
4020 2018-08-10 Keith Seitz <keiths@redhat.com>
4021
4022 * compile/compile-c-support.c (c_get_compile_context): Use `new'
4023 instead of `new_compile_instance'.
4024 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4025 Update description.
4026 If the symbol error map is not initialized, create it.
4027 (generate_c_for_for_one_symbol): Do not check/initialize
4028 the symbol error map.
4029 * compile/compile-c-types.c (compile_c_instance): Make a class.
4030 Update all callers.
4031 (compile_instance::compile_instance): Initialize the type cache.
4032 (get_cached_type): New function.
4033 (insert_type): Update description.
4034 (compile_c_instance::m_default_cflags): Define.
4035 (convert_type): Update description. Use get_cached_type.
4036 (delete_instance): Moved to destructor.
4037 (new_compile_instance): Moved to constructor.
4038 * compile/compile-c.h (compile_c_instance): Make class inheriting
4039 from compile_instance.
4040 <base>: Remove field.
4041 <type_map, symbol_err_map>: Move to base class.
4042 <c_plugin>: Rename to `m_plugin' and remove pointer type.
4043 * compile/compile-internal.h (compile_instance): Make class.
4044 <type_map_t, symbol_err_map_t>: Define.
4045 <fe>: Rename to `m_gcc_fe'.
4046 <scope, block, gcc_target_options>: Add `m_' prefix.
4047 <m_type_map, m_symbol_err_map>: New fields, moved from
4048 compile_c_instance.
4049 <destroy>: Remove.
4050 (convert_type, new_compile_instance): Remove.
4051 * compile/compile.c (cleanup_compile_instance): Remove.
4052 (compile_to_object): Use unique_ptr to eliminate cleanups.
4053 (compile_instance::set_print_callback, compile_instance::version)
4054 (compile_instance::set_verbose)
4055 (compile_instance::set_driver_filename)
4056 (compile_instance::set_triplet_regexp)
4057 (compile_instance::set_arguments)
4058 (compile_instance::set_source_file)
4059 (compile_instance::compile): Define.
4060
4061 2018-08-10 Keith Seitz <keiths@redhat.com>
4062
4063 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4064 * compile/compile-c-types.c: Define GCC_METHODN macros and include
4065 gcc-c-fe.def to define C plugin.
4066 (delete_instance): Delete `c_plugin'.
4067 (new_compile_instance): Initialize `c_plugin'.
4068 * compile/compile-c.h: Include gcc_c_plugin.h.
4069 (struct compile_c_instance) <c_plugin>: New member.
4070 * gcc-c-plugin.h: New file.
4071 Update all callers with API change.
4072
4073 2018-08-10 Keith Seitz <keiths@redhat.com>
4074
4075 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4076 (HFILES_NO_SRCDIR): ... to here.
4077 Add compile-internal.h and compile-c.h.
4078 * compile/compile-c-support.c: Include compile-c.h.
4079 * compile/compile-c-symbols.c: Include compile-c.h.
4080 (generate_c_for_variable_locations): Update comment.
4081 * compile/compile-c-types.c: Include compile-c.h.
4082 * compile/compile-c.h: New file -- moved C language declarations
4083 from other files here.
4084 * compile/compile-internal.h: Do not include hashtab.h or
4085 common/enum-flags.h.
4086 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4087 (gcc_convert_symbol, gcc_symbol_address)
4088 (generate_c_for_variable_locations, c_get_mode_for_size)
4089 (c_get_range_decl_name): Definitions moved to compile-c.h.
4090 * compile/compile-loc2c.c: Include compile-c.h.
4091
4092 2018-08-10 Keith Seitz <keiths@redhat.com>
4093
4094 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4095 (c_symbol_substitution_name): ... this.
4096 Update all callers.
4097
4098 2018-08-10 Keith Seitz <keiths@redhat.com>
4099
4100 * compile/compile-c-support.c (c_compute_program): Use
4101 unique_xmalloc_ptr to eliminate cleanup.
4102 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4103 Return a unique_xmalloc_ptr and eliminate cleanup.
4104 * compile/compile-internal.h (generate_c_for_variable_locations):
4105 Return unique_xmalloc_ptr and update description.
4106
4107 2018-08-10 Alan Hayward <alan.hayward@arm.com>
4108
4109 * corelow.c (core_target::get_core_register_section): Rename
4110 min_size to section_min_size.
4111
4112 2018-08-09 Jim Wilson <jimw@sifive.com>
4113
4114 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4115 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4116 * NEWS: Mention new GNU/Linux RISC-V target.
4117 * configure.host: Add riscv*-*-linux*.
4118 * configure.nat: Add riscv*.
4119 * configure.tgt: Add riscv*-*-linux*.
4120 * riscv-linux-nat.c: New file.
4121 * riscv-linux-tdep.c: New file.
4122
4123 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
4124
4125 * infrun.c (resume): Make static, add forward declaration.
4126 (proceed): Update header comment.
4127 * infrun.h (resume): Delete declaration.
4128
4129 2018-08-09 Tom Tromey <tom@tromey.com>
4130
4131 * riscv-tdep.h: Minor formatting fixes.
4132
4133 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
4134
4135 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4136 * dwarf-index-cache.c (create_dir_and_check): Likewise.
4137 (test_mkdir_recursive): Likewise.
4138 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4139
4140 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
4141
4142 * valarith.c (value_subscripted_rvalue): If an array is not in
4143 memory, and we don't know the upper bound, then we can't know that
4144 the requested element exists or not.
4145
4146 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
4147
4148 * target.c (str_comma_list_concat_elem): Fix typo in comment.
4149 (target_options_to_string): Add comment.
4150
4151 2018-08-08 Tom Tromey <tom@tromey.com>
4152
4153 * unittests/scoped_mmap-selftests.c: Check result of "write".
4154
4155 2018-08-08 Jim Wilson <jimw@sifive.com>
4156
4157 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4158 (decode_register_index_short): New.
4159 (decode_j_type_insn, decode_cj_type_insn): New.
4160 (decode_b_type_insn, decode_cb_type_insn): New.
4161 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
4162 local xlen. Check xlen when decoding ambiguous compressed insns. In
4163 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4164 is_c_sw_insn instead of is_sw_insn.
4165 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4166 (riscv_software_single_step): New.
4167 * riscv-tdep.h (riscv_software_single_step): Declare.
4168
4169 * riscv-tdep.c (riscv_isa_xlen): Drop static.
4170 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4171
4172 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
4173
4174 PR gdb/18050:
4175 * target.c (dispose_inferior): Don't dispose of inferiors that are
4176 already killed.
4177
4178 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
4179
4180 * remote.c (remote_target::download_tracepoint): Change char* to
4181 const char*.
4182
4183 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
4184
4185 * target.h (target_options_to_string): Return an std::string.
4186 * target.c (str_comma_list_concat_elem): Return void, use
4187 std::string.
4188 (do_option): Likewise.
4189 (target_options_to_string): Return an std::string.
4190 * linux-nat.c (linux_nat_target::wait): Adjust.
4191 * target-debug.h (target_debug_print_options): Adjust.
4192
4193 2018-08-07 Tom Tromey <tom@tromey.com>
4194
4195 * Makefile.in (CPPFLAGS): New variable.
4196 (INTERNAL_CPPFLAGS): Use it.
4197
4198 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4199
4200 * NEWS: Mention the index cache.
4201
4202 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4203
4204 * common/pathstuff.h (get_standard_cache_dir): New.
4205 * common/pathstuff.c (get_standard_cache_dir): New.
4206 * build-id.h (build_id_to_string): New.
4207 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4208 DEBUG_STR_SUFFIX): Move to here.
4209 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4210 DEBUG_STR_SUFFIX): Move from there.
4211 (write_psymtabs_to_index): Make non-static, add basename
4212 parameter. Write to temporary files, rename when done.
4213 (save_gdb_index_command): Adjust call to
4214 write_psymtabs_to_index.
4215 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4216 field.
4217 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4218 (get_gdb_index_contents_from_cache): New.
4219 (get_gdb_index_contents_from_cache_dwz): New.
4220 (dwarf2_initialize_objfile): Read index from cache.
4221 (dwarf2_build_psymtabs): Save to index.
4222 * dwarf-index-cache.h: New file.
4223 * dwarf-index-cache.c: New file.
4224 * dwarf-index-write.h: New file.
4225
4226 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4227
4228 * gnulib/aclocal.m4: Re-generate.
4229 * gnulib/config.in: Re-generate.
4230 * gnulib/configure: Re-generate.
4231 * gnulib/import/Makefile.am: Re-generate.
4232 * gnulib/import/Makefile.in: Re-generate.
4233 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4234 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4235 * gnulib/import/m4/mkdir.m4: New file.
4236 * gnulib/import/mkdir.c: New file.
4237 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4238 module.
4239
4240 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4241
4242 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4243 * common/scoped_mmap.c: New file.
4244 * common/scoped_mmap.h (destroy): New method.
4245 (~scoped_mmap, reset): Use destroy.
4246 (scoped_mmap): New move constructor.
4247 (mmap_file): New declaration.
4248 * unittests/scoped_mmap-selftests.c (test_normal,
4249 test_invalid_filename, run_tests): New functions.
4250 (_initialize_scoped_mmap_selftests): Register selftest.
4251
4252 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4253
4254 * dwarf2read.c (read_gdb_index_from_section): Rename to...
4255 (read_gdb_index_from_buffer): ... this. Remove section
4256 parameter, add buffer parameter.
4257 (get_gdb_index_contents_ftype,
4258 get_gdb_index_contents_dwz_ftype): New typedefs.
4259 (dwarf2_read_gdb_index): Add callback parameters to get the
4260 index contents.
4261 (get_gdb_index_contents_from_section): New.
4262 (dwarf2_initialize_objfile): Update call to
4263 dwarf2_read_gdb_index.
4264
4265 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
4266
4267 * common/filestuff.h (gdb_fopen_cloexec): New overload.
4268 (gdb_open_cloexec): Likewise.
4269 * nat/linux-osdata.c (command_from_pid): Use string_printf.
4270 (commandline_from_pid): Likewise.
4271 (linux_xfer_osdata_threads): Likewise.
4272 (linux_xfer_osdata_fds): Likewise.
4273 * ada-lang.c (is_package_name): Likewise.
4274 * auxv.c (procfs_xfer_auxv): Likewise.
4275 * breakpoint.c (print_one_breakpoint_location): Use
4276 uiout::field_fmt.
4277 (print_one_catch_solib): Use string_printf.
4278 * coff-pe-read.c (add_pe_exported_sym): Likewise.
4279 (add_pe_forwarded_sym): Likewise.
4280 * dwarf2read.c (create_type_unit_group): Likewise.
4281 (build_error_marker_type): Likewise.
4282 * infcall.c (get_function_name): Likewise.
4283 * valprint.c (print_converted_chars_to_obstack): Likewise.
4284 * xtensa-tdep.c (xtensa_register_type): Likewise.
4285
4286 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
4287
4288 * remote.c (remote_target::download_tracepoint): Fix format
4289 string errors.
4290
4291 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4292
4293 * tracefile.c: Include common/byte-vector.h.
4294 (trace_save): Change type of buf to gdb::byte_vector. Initialize
4295 with trace_regblock_size if needed. Update uses of buf.
4296
4297 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4298
4299 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4300 std::vector<unsigned char>.
4301 * tracepoint.c (collection_list::collection_list): Remove
4302 m_regs_mask initializer from initializer list. Resize
4303 m_regs_mask using the largest remote register number.
4304 (collection_list::add_remote_register): Remove size check on
4305 m_regs_mask. Use at to access element.
4306 (collection_list::stringify): Change type of temp_buf to
4307 gdb::char_vector. Update uses of temp_buf. Resize if needed to
4308 stringify the register mask. Use pack_hex_byte for the register
4309 mask.
4310
4311 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4312
4313 * tracepoint.h (class collection_list) <add_register>: Remove.
4314 <add_remote_register, add_ax_registers, add_local_register>:
4315 Declare.
4316 <add_memrange>: Add scope parameter.
4317 * tracepoint.c (encode_actions_1): Likewise.
4318 (collection_list::add_register): Rename to ...
4319 (collection_list::add_remote_register): ... this. Update
4320 comment.
4321 (collection_list::add_ax_registers, add_local_register): New
4322 methods.
4323 (collection_list::add_memrange): Add scope parameter. Call
4324 add_local_register instead of add_register.
4325 (finalize_tracepoint_aexpr): New function.
4326 (collection_list::collect_symbol): Update calls to add_memrange.
4327 Call add_local_register instead of add_register. Call
4328 add_ax_registers. Call finalize_tracepoint_aexpr.
4329 (encode_actions_1): Get remote regnos for $reg action. Call
4330 add_remote_register, add_ax_registers, and add_local_register.
4331 Update call to add_memrange. Call finalize_tracepoint_aexpr.
4332 (validate_actionline): Call finalize_tracepoint_aexpr.
4333
4334 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4335
4336 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4337 Replace array buf with gdb::char_vector buf, of size
4338 get_remote_packet_size (). Replace references to buf and
4339 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
4340 and xsnprintf with snprintf. Raise errors if the buffer is too
4341 small.
4342
4343 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4344
4345 * remote.c (remote_target::download_tracepoint): Fix the has_more
4346 predicate in the QTDP action list iteration.
4347
4348 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4349
4350 * remote.c (remote_target::download_tracepoint): Fix indentation
4351 in for block.
4352
4353 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4354
4355 * proc-api.c (_initialize_proc_api): Remove c, unused.
4356 * procfs.c (procfs_init_inferior): Remove signals, unused.
4357 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4358 unused.
4359
4360 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
4361 Andrew Burgess <andrew.burgess@embecosm.com>
4362
4363 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4364 'W_STOPCODE (0)' as this could be ambiguous.
4365
4366 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
4367
4368 * ser-tcp.c (net_open): Fix thinko when deciding whether to
4369 disable TCP's Nagle algorithm (use "ai_protocol" instead of
4370 "ai_socktype").
4371
4372 2018-08-02 Tom Tromey <tom@tromey.com>
4373
4374 PR symtab/16842.
4375 * dwarf2read.c (read_func_scope): Set symtab on template parameter
4376 symbols.
4377 (process_structure_scope): Likewise.
4378
4379 2018-08-02 Xavier Roirand <roirand@adacore.com>
4380
4381 PR gdb/22629:
4382 * darwin-nat.c (darwin_kill_inferior): Fix handling of
4383 kill inferior.
4384
4385 2018-08-02 Tom Tromey <tom@tromey.com>
4386
4387 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4388 (darwin_suspend_inferior, darwin_resume_inferior)
4389 (darwin_decode_notify_message, darwin_resume_inferior_threads)
4390 (darwin_check_new_threads): Check result of get_darwin_inferior.
4391
4392 2018-07-31 Joel Brobecker <brobecker@adacore.com>
4393
4394 GDB 8.1.1 released.
4395
4396 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
4397
4398 * varobj.c (varobj_get_path_expr_parent): Report an error if
4399 parent is a dynamic varobj.
4400
4401 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4402
4403 * gnulib/aclocal.m4: Re-generate.
4404 * gnulib/config.in: Re-generate.
4405 * gnulib/configure: Re-generate.
4406 * gnulib/import/Makefile.in: Re-generate.
4407 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4408 * gnulib/import/m4/onceonly.m4: Re-generate.
4409
4410 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
4411
4412 * target-descriptions.c (struct xml_test_tdesc): New.
4413 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4414 (record_xml_tdesc): Update.
4415 (maintenance_check_xml_descriptions): Update.
4416 * target-descriptions.h (record_xml_tdesc): Update comment.
4417
4418 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
4419
4420 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4421 checking array bounds are defined.
4422
4423 2018-07-30 Tom Tromey <tom@tromey.com>
4424
4425 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4426 irreflexivity violation.
4427
4428 2018-07-30 Tom Tromey <tom@tromey.com>
4429
4430 * cli/cli-decode.c (lookup_cmd): Remove lint code.
4431 * value.c (unpack_long): Remove lint code.
4432 * valops.c (value_ind): Remove lint code.
4433 * valarith.c (value_x_binop, value_x_unop, value_equal)
4434 (value_pos): Remove lint code.
4435
4436 2018-07-28 Tom de Vries <tdevries@suse.de>
4437
4438 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4439 with undefined upper bound as <optimized out>.
4440
4441 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
4442
4443 * gcore.in: Rename variable "name" to "prefix". Expand
4444 "usage" text.
4445
4446 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
4447
4448 * windows-nat.c (windows_nat_target::create_inferior): Update to
4449 call close() in global namespace.
4450
4451 2018-07-26 Tom Tromey <tom@tromey.com>
4452
4453 * dwarf-index-write.c (add_address_entry): Don't add objfile
4454 offsets.
4455 * dbxread.c (find_stab_function): Rename from
4456 find_stab_function_addr. Return a bound_minimal_symbol.
4457 (read_dbx_symtab): Use raw_text_low, raw_text_high.
4458 Don't add objfile offsets.
4459 (end_psymtab): Use raw_text_low, raw_text_high,
4460 MSYMBOL_VALUE_RAW_ADDRESS.
4461 (read_ofile_symtab): Update.
4462 (process_one_symbol): Update.
4463 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4464 offsets.
4465 (dw2_relocate): Remove.
4466 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4467 searching addrmap.
4468 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4469 Update.
4470 (process_psymtab_comp_unit_reader, add_partial_symbol)
4471 (add_partial_subprogram, dwarf2_ranges_read): Update.
4472 (load_partial_dies): Update.
4473 (add_address_entry): Don't add objfile offsets.
4474 (dwarf2_build_include_psymtabs): Update.
4475 (create_addrmap_from_aranges): Don't add objfile offsets.
4476 (dw2_find_pc_sect_compunit_symtab): Update.
4477 * mdebugread.c (parse_symbol): Don't add objfile offsets.
4478 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4479 Update.
4480 (parse_partial_symbols): Don't add objfile offsets. Use
4481 raw_text_low, raw_text_high. Update.
4482 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4483 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4484 or call 'relocate' quick function. Clear psymbol_map.
4485 * psympriv.h (struct partial_symbol) <address>: Add section
4486 offset.
4487 <set_unrelocated_address>: Rename from set_address.
4488 <raw_text_low, raw_text_high>: New methods.
4489 <text_low, text_high>: Add objfile parameter.
4490 (add_psymbol_to_bcache): Add 'section' parameter. Call
4491 set_unrelocated_address.
4492 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4493 (find_pc_psymbol): Update.
4494 (fixup_psymbol_section, relocate_psymtabs): Remove.
4495 (dump_psymtab, psym_functions): Update.
4496 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4497 parameter.
4498 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4499 (start_psymtab_common): Update.
4500 * symfile-debug.c (debug_qf_relocate): Remove.
4501 (debug_sym_quick_functions): Update.
4502 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4503 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4504 Update.
4505
4506 2018-07-26 Tom Tromey <tromey@redhat.com>
4507
4508 * dbxread.c (end_psymtab): Use text_high_valid and
4509 text_low_valid.
4510 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4511 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4512 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4513 Update comment.
4514 <text_low_valid, text_high_valid>: New fields.
4515 <set_text_low, set_text_high>: Update.
4516 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4517
4518 2018-07-26 Tom Tromey <tom@tromey.com>
4519
4520 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4521 Update.
4522 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4523 textlow and texthigh fields.
4524 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4525 Update.
4526 * mdebugread.c (parse_lines, parse_partial_symbols)
4527 (psymtab_to_symtab_1): Update.
4528 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4529 Rename fields. Update comment. Now private.
4530 <text_low, text_high, set_text_low, set_text_high>: New methods.
4531 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4532 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4533 (start_psymtab_common, maintenance_info_psymtabs)
4534 (maintenance_check_psymtabs): Update.
4535 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4536 texthigh fields.
4537 (scan_xcoff_symtab): Update.
4538
4539 2018-07-26 Tom Tromey <tromey@redhat.com>
4540
4541 * psympriv.h (struct partial_symbol) <unrelocated_address,
4542 address, set_address>: New methods.
4543 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4544 (fixup_psymbol_section, relocate_psymtabs): Update.
4545 (print_partial_symbols): Add 'objfile' parameter. Update.
4546 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4547 Update.
4548
4549 2018-07-26 Tom Tromey <tom@tromey.com>
4550
4551 * dwarf-index-write.c (write_psymbols, debug_names::insert)
4552 (debug_names::write_psymbols): Update.
4553 * psympriv.h (struct partial_symbol): Derive from
4554 general_symbol_info.
4555 <obj_section>: New method.
4556 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4557 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4558 (find_pc_sect_psymbol, fixup_psymbol_section)
4559 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4560 (print_partial_symbols, recursively_search_psymtabs)
4561 (compare_psymbols, psymbol_hash, psymbol_compare)
4562 (add_psymbol_to_bcache, maintenance_check_psymtabs)
4563 (psymbol_name_matches, psym_fill_psymbol_map): Update.
4564
4565 2018-07-26 Tom Tromey <tromey@redhat.com>
4566
4567 * dbxread.c (end_psymtab): Remove dead code.
4568
4569 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
4570
4571 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4572 DWARF unwinders are disabled.
4573 * dwarf2-frame.c: Add dwarf2read.h include.
4574 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4575 disabled.
4576 (dwarf2_frame_unwinders_enabled_p): Define.
4577 (show_dwarf_unwinders_enabled_p): New function.
4578 (_initialize_dwarf2_frame): Register switch to control DWARF
4579 unwinder use.
4580 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4581 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4582 (show_dwarf_cmdlist): Remove static keyword.
4583 * dwarf2read.h (set_dwarf_cmdlist): Declare.
4584 (show_dwarf_cmdlist): Declare.
4585 * NEWS: Document new feature.
4586
4587 2018-07-26 Tom de Vries <tdevries@suse.de>
4588
4589 PR breakpoints/23366
4590 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4591
4592 2018-07-26 Tom de Vries <tdevries@suse.de>
4593
4594 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4595 DW_AT_count can't be translated to a dynamic prop.
4596
4597 2018-07-25 Tom de Vries <tdevries@suse.de>
4598
4599 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4600 try/catch.
4601
4602 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
4603
4604 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4605
4606 2018-07-25 Joel Brobecker <brobecker@adacore.com>
4607
4608 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4609
4610 2018-07-24 Keith Seitz <keiths@redhat.comt
4611
4612 PR symtab/23010
4613 * dwarf2read.c (dw2_add_symbol_to_list): New function.
4614 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4615 instead of add_symbol_to_list.
4616 (read_file_scope): Call prepare_one_comp_unit before reading
4617 any other DIEs.
4618
4619 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
4620
4621 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4622
4623 2018-07-24 Tom Tromey <tom@tromey.com>
4624
4625 * utils.c (malloc, realloc, free): Don't declare.
4626 * configure, config.in: Rebuild.
4627 * configure.ac: Don't check for declarations of free, malloc, or
4628 realloc.
4629
4630 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4631
4632 * aarch64-linux-nat.c
4633 (aarch64_linux_nat_target::stopped_data_address): Remove unused
4634 variable.
4635 * arm-linux-nat.c (fetch_regs): Likewise.
4636 (store_regs): Likewise.
4637 (fetch_vfp_regs): Likewise.
4638 (store_vfp_regs): Likewise.
4639 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4640 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4641 (arm_linux_nat_target::insert_watchpoint): Likewise.
4642 (arm_linux_nat_target::remove_watchpoint): Likewise.
4643 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4644 Likewise.
4645 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4646 Likewise.
4647 * ppc-linux-nat.c (fetch_register): Likewise.
4648 (fetch_all_gp_regs): Likewise.
4649 (fetch_ppc_registers): Likewise.
4650 (store_all_gp_regs): Likewise.
4651 (store_ppc_registers): Likewise.
4652 (hwdebug_insert_point): Likewise.
4653 (can_use_watchpoint_cond_accel): Likewise.
4654 * remote-sim.c (gdb_os_write_stdout): Likewise.
4655
4656 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
4657 Tom Tromey <tom@tromey.com>
4658
4659 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4660 test for it.
4661 * configure: Rebuild.
4662
4663 2018-07-22 Tom Tromey <tom@tromey.com>
4664
4665 * regformats/regdat.sh: Define xmltarget_${name} inside
4666 #ifndef IN_PROCESS_AGENT.
4667
4668 2018-07-22 Tom Tromey <tom@tromey.com>
4669
4670 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4671
4672 2018-07-22 Tom Tromey <tom@tromey.com>
4673
4674 * symfile.c (reread_symbols): Notify iter, not objfile.
4675
4676 2018-07-22 Tom Tromey <tom@tromey.com>
4677
4678 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4679 Use arch_ops.
4680 (ravenscar_thread_target::prepare_to_store): Likewise.
4681
4682 2018-07-22 Tom Tromey <tom@tromey.com>
4683
4684 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4685 unused variable. Call value_fetch_lazy when needed.
4686 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4687 Remove unused variable. Call value_fetch_lazy when needed.
4688
4689 2018-07-22 Tom Tromey <tom@tromey.com>
4690
4691 * m32c-tdep.c (mark_dma): Return void.
4692 (make_regs): Remove unused declarations.
4693
4694 2018-07-22 Tom Tromey <tom@tromey.com>
4695
4696 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4697 cmdscm_get_valid_command_smob_arg_unsafe for effect.
4698 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4699 bkscm_get_valid_block_smob_arg_unsafe for effect.
4700
4701 2018-07-22 Tom Tromey <tom@tromey.com>
4702
4703 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4704 value_type.
4705
4706 2018-07-22 Tom Tromey <tom@tromey.com>
4707
4708 * windows-nat.c (saved_context): Conditionally define.
4709 * remote.c (remote_target::remote_btrace_maybe_reopen):
4710 Conditionally declare "warned".
4711 * inflow.c (sigquit_ours): Conditionally define.
4712 (new_tty): Move "tty" declaration inside #if.
4713 * guile/guile.c (guile_datadir): Conditionally define.
4714 * charset.c (set_be_le_names): Move some declarations inside #if.
4715 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4716 #if.
4717 (parse_xml_btrace_conf): Likewise.
4718
4719 2018-07-22 Tom Tromey <tom@tromey.com>
4720
4721 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4722
4723 2018-07-22 Tom Tromey <tom@tromey.com>
4724
4725 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4726 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4727 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4728 * buildsym-legacy.c (get_macro_table): Remove unused variable.
4729 * stack.c (frame_apply_level_command): Remove unused variable.
4730 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4731 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4732 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4733 unused variable.
4734 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4735 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4736 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4737 variable.
4738 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4739 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4740 variable.
4741 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4742 Remove unused variable.
4743 * cli/cli-script.c (recurse_read_control_structure): Remove unused
4744 variable.
4745 * common/tdesc.c (print_xml_feature::visit): Remove unused
4746 variable.
4747 * compile/compile-object-load.c (store_regs): Remove unused
4748 variables.
4749 * complaints.c (clear_complaints): Remove unused variable.
4750 * corelow.c (core_target_open): Remove unused variable.
4751 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4752 variable.
4753 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4754 variable.
4755 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4756 variable.
4757 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4758 variable.
4759 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4760 variable.
4761 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4762 variable.
4763 * ia64-tdep.c (examine_prologue): Remove unused variable.
4764 * infcall.c (run_inferior_call): Remove unused variable.
4765 * inferior.c (exit_inferior): Remove unused variable.
4766 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4767 * linespec.c (decode_line_2): Remove unused variable.
4768 * linux-nat.c (super_close): Remove.
4769 * linux-tdep.c (linux_info_proc): Remove unused variable.
4770 * mi/mi-main.c (mi_execute_command): Remove unused variable.
4771 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4772 Remove unused variable.
4773 * parse.c (find_minsym_type_and_address): Remove unused variable.
4774 * printcmd.c (info_symbol_command, printf_floating): Remove unused
4775 variable.
4776 * python/py-breakpoint.c (bppy_set_commands): Remove unused
4777 variable.
4778 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4779 variables.
4780 * record-btrace.c (record_btrace_target::store_registers): Remove
4781 unused variable.
4782 (cmd_show_record_btrace_cpu): Remove unused variable.
4783 * riscv-tdep.c (riscv_register_reggroup_p)
4784 (riscv_push_dummy_call, riscv_return_value): Remove unused
4785 variable.
4786 * rust-exp.y (literal): Remove unused variable.
4787 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4788 unused variable.
4789 <STRUCTOP_ANONYMOUS>: Likewise.
4790 * s390-linux-tdep.c (s390_linux_init_abi_31)
4791 (s390_linux_init_abi_64): Remove unused variable.
4792 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4793 (file_select_thread, net_windows_open, _initialize_ser_windows):
4794 Remove unused variables.
4795 * symtab.c (find_pc_sect_line): Remove unused variable.
4796 * target-memory.c (compute_garbled_blocks): Remove unused
4797 variable.
4798 (target_write_memory_blocks): Remove unused variable.
4799 * target.c (target_stack::unpush): Remove unused variables.
4800 * tracepoint.c (start_tracing, all_tracepoint_actions)
4801 (merge_uploaded_trace_state_variables)
4802 (print_one_static_tracepoint_marker): Remove unused variable.
4803 * unittests/basic_string_view/element_access/char/1.cc (test01):
4804 Remove unused variable.
4805 * windows-nat.c (windows_continue, windows_add_all_dlls)
4806 (do_initial_windows_stuff, windows_nat_target::create_inferior):
4807 Remove unused variables.
4808
4809 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
4810
4811 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4812 attr_profile in HAVE_ELF.
4813 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4814 HAVE_ELF.
4815
4816 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
4817
4818 * frame.c (frame_register_unwind): Change parameter name.
4819 (frame_unwind_register): Likewise.
4820 (frame_unwind_register_value): Likewise.
4821 (frame_unwind_register_signed): Likewise.
4822 (frame_unwind_register_unsigned): Likewise.
4823 * frame.h (frame_register_unwind): Likewise.
4824 (frame_unwind_register): Likewise.
4825 (frame_unwind_register_value): Likewise.
4826 (frame_unwind_register_signed): Likewise.
4827 (frame_unwind_register_unsigned): Likewise.
4828 (frame_unwind_arch): Likewise.
4829
4830 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4831
4832 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4833 ISA maintenance.
4834
4835 2018-07-20 Maciej W. Rozycki <macro@mips.com>
4836
4837 * mips-linux-nat.c (mips_linux_nat_target::read_description):
4838 Call `get_ptrace_pid' rather than extracting the ptrace PID by
4839 hand.
4840
4841 2018-07-20 Keith Seitz <keiths@redhat.com>
4842
4843 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4844 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4845 m_compunit_symtab, m_language>: Add "m_" prefix.
4846 Update all uses.
4847 * buildsym.c: Update all uses.
4848
4849 2018-07-20 Tom Tromey <tom@tromey.com>
4850
4851 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4852 * buildsym.h (record_line_ftype): Remove typedef.
4853
4854 2018-07-20 Tom Tromey <tom@tromey.com>
4855
4856 * buildsym-legacy.h (augment_type_symtab): Don't declare.
4857 (end_expandable_symtab): Likewise.
4858 (end_symtab_get_static_block): Likewise.
4859 (end_symtab_from_static_block): Likewise.
4860 * buildsym-legacy.c (augment_type_symtab): Remove.
4861 (end_expandable_symtab): Remove.
4862 (end_symtab_get_static_block): Remove.
4863 (end_symtab_from_static_block): Remove.
4864
4865 2018-07-20 Tom Tromey <tom@tromey.com>
4866
4867 * dwarf2read.c: Include buildsym.h.
4868 (struct dwarf2_cu) <builder>: New method.
4869 (fixup_go_packaging): Update.
4870 (process_full_comp_unit, process_full_type_unit): Update. Don't
4871 use scoped_free_pendings.
4872 (using_directives): Add "cu" parameter, remove "language".
4873 (read_import_statement, setup_type_unit_groups, )
4874 (read_func_scope, read_lexical_block_scope)
4875 (dwarf2_record_block_ranges, read_namespace): Update.
4876 (lnp_state_machine::lnp_state_machine): Add cu parameter.
4877 (lnp_state_machine::handle_end_sequence): Update.
4878 (class lnp_state_machine) <m_cu>: New member.
4879 <m_record_line_callback>: Remove.
4880 <m_currently_recording_lines>: New member.
4881 (lnp_state_machine::handle_set_file): Update.
4882 (noop_record_line): Remove.
4883 (dwarf_record_line_p): Add cu parameter.
4884 (dwarf_record_line_1, dwarf_finish_line): Likewise.
4885 (lnp_state_machine::record_line)
4886 (lnp_state_machine::lnp_state_machine)
4887 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4888 (dwarf_decode_lines): Update.
4889 (dwarf2_start_subfile): Add cu parameter.
4890 (dwarf2_start_symtab, new_symbol): Update.
4891 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4892 Remove dwarf2_per_objfile parameter.
4893 (dwarf_decode_macros): Update.
4894
4895 2018-07-20 Tom Tromey <tom@tromey.com>
4896
4897 * stabsread.c (define_symbol): Update.
4898 * buildsym-legacy.h (get_buildsym_compunit): Declare.
4899 * dwarf2read.c (new_symbol): Update.
4900 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4901 * cp-namespace.c: Include buildsym.h.
4902 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4903 * buildsym-legacy.c (get_buildsym_compunit): New function.
4904
4905 2018-07-20 Tom Tromey <tom@tromey.com>
4906
4907 * xcoffread.c: Include buildsym-legacy.h.
4908 * windows-nat.c: Include buildsym-legacy.h.
4909 * stabsread.c: Include buildsym-legacy.h.
4910 * mdebugread.c: Include buildsym-legacy.h.
4911 * buildsym-legacy.h: New file.
4912 * buildsym-legacy.c: New file, from buildsym.c.
4913 * go32-nat.c: Include buildsym-legacy.h.
4914 * dwarf2read.c: Include buildsym-legacy.h.
4915 * dbxread.c: Include buildsym-legacy.h.
4916 * cp-namespace.c: Include buildsym-legacy.h.
4917 * coffread.c: Include buildsym-legacy.h.
4918 * buildsym.h: Move some contents to buildsym-legacy.h.
4919 * buildsym.c: Include buildsym-legacy.h. Move many functions to
4920 buildsym-legacy.c.
4921 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4922
4923 2018-07-20 Tom Tromey <tom@tromey.com>
4924
4925 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4926 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4927 (buildsym_compunit::buildsym_compunit)
4928 (buildsym_compunit::~buildsym_compunit)
4929 (buildsym_compunit::get_macro_table): Define.
4930
4931 2018-07-20 Tom Tromey <tom@tromey.com>
4932
4933 * buildsym.c (reset_symtab_globals): Remove.
4934 (buildsym_compunit::end_symtab_from_static_block): Update.
4935 (buildsym_compunit::augment_type_symtab): Update.
4936 (end_symtab_from_static_block): Call free_buildsym_compunit.
4937 (augment_type_symtab, end_symtab, end_expandable_symtab):
4938 Likewise.
4939
4940 2018-07-20 Tom Tromey <tom@tromey.com>
4941
4942 * arch-utils.c: Do not include buildsym.h.
4943 * mipsread.c: Do not include buildsym.h.
4944 * machoread.c: Do not include buildsym.h.
4945 * elfread.c: Do not include buildsym.h.
4946
4947 2018-07-20 Tom Tromey <tom@tromey.com>
4948
4949 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4950 initialization.
4951 (buildsym_compunit): Add new constructor.
4952 (struct buildsym_compunit) <get_last_source_file, finish_block,
4953 record_block_range, start_subfile, patch_subfile_names,
4954 push_subfile, pop_subfile, record_line, get_compunit_symtab,
4955 set_last_source_start_addr, get_last_source_start_addr,
4956 get_local_using_directives, set_local_using_directives,
4957 get_global_using_directives, outermost_context_p,
4958 get_current_context_stack, get_context_stack_depth,
4959 get_current_subfile, get_local_symbols, get_file_symbols,
4960 get_global_symbols, record_debugformat, record_producer,
4961 push_context, pop_context, end_symtab_get_static_block,
4962 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4963 New public methods.
4964 <record_pending_block, finish_block_internal, make_blockvector,
4965 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4966 private methods.
4967 Update all users.
4968
4969 2018-05-22 Tom Tromey <tom@tromey.com>
4970
4971 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4972 parameter.
4973 (finish_block_internal): Update.
4974
4975 2018-07-20 Tom Tromey <tom@tromey.com>
4976
4977 * buildsym.c (record_pending_block): Move earlier. Remove objfile
4978 parameter.
4979 (finish_block_internal): Update.
4980
4981 2018-07-20 Tom Tromey <tom@tromey.com>
4982
4983 * buildsym.h (EXTERN): Don't define or undef.
4984 * buildsym.c (EXTERN): Don't define.
4985
4986 2018-07-20 Tom Tromey <tom@tromey.com>
4987
4988 * buildsym.c: Remove TODO comment.
4989
4990 2018-07-20 Tom Tromey <tom@tromey.com>
4991
4992 * coffread.c (coff_symtab_read): Update.
4993 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4994 (xcoff_new_init): Update.
4995 * mipsread.c (mipscoff_new_init): Update.
4996 * mdebugread.c (mdebug_build_psymtabs): Update.
4997 * elfread.c (elf_new_init): Update.
4998 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4999 Update.
5000 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5001 (coffstab_build_psymtabs, elfstab_build_psymtabs)
5002 (stabsect_build_psymtabs): Update.
5003 * buildsym.h (buildsym_init): Don't declare.
5004 * buildsym.c: Update comment.
5005 (prepare_for_building): Remove.
5006 (start_symtab, restart_symtab): Update.
5007 (reset_symtab_globals): Update comment.
5008 (buildsym_init): Remove.
5009
5010 2018-07-20 Tom Tromey <tom@tromey.com>
5011
5012 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5013 * stabsread.c (patch_block_stabs, define_symbol, read_type)
5014 (read_enum_type, common_block_start, common_block_end)
5015 (cleanup_undefined_types_1, finish_global_stabs): Update.
5016 * mdebugread.c (psymtab_to_symtab_1): Update.
5017 * dwarf2read.c (fixup_go_packaging, read_func_scope)
5018 (read_lexical_block_scope, new_symbol): Update.
5019 * dbxread.c (process_one_symbol): Update.
5020 * coffread.c (coff_symtab_read, process_coff_symbol)
5021 (coff_read_enum_type): Update.
5022 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5023 declare.
5024 (get_local_symbols, get_file_symbols, get_global_symbols): New
5025 functions.
5026 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5027 m_global_symbols.
5028 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5029 (~scoped_free_pendings): Update.
5030 (finish_block, prepare_for_building, reset_symtab_globals)
5031 (end_symtab_get_static_block, end_symtab_with_blockvector)
5032 (augment_type_symtab, push_context): Update.
5033 (get_local_symbols, get_file_symbols, get_global_symbols): New
5034 functions.
5035 (buildsym_init): Update.
5036
5037 2018-07-20 Tom Tromey <tom@tromey.com>
5038
5039 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5040 (process_full_type_unit): Likewise.
5041 (dwarf2_start_symtab): Set list_in_scope.
5042
5043 2018-07-20 Tom Tromey <tom@tromey.com>
5044
5045 * dwarf2read.c (process_psymtab_comp_unit_reader)
5046 (build_type_psymtabs_reader): Do not set list_in_scope.
5047
5048 2018-07-20 Tom Tromey <tom@tromey.com>
5049
5050 * buildsym.c (free_pendings): Remove.
5051 (add_symbol_to_list, scoped_free_pendings)
5052 (finish_block_internal, buildsym_init): Update.
5053
5054 2018-07-20 Tom Tromey <tom@tromey.com>
5055
5056 * xcoffread.c (read_xcoff_symtab): Update.
5057 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5058 Update.
5059 * dbxread.c (process_one_symbol): Update.
5060 * coffread.c (coff_symtab_read): Update.
5061 * buildsym.h (finish_block): Update.
5062 * buildsym.c (finish_block): Remove "listhead" argument.
5063 (end_symtab_get_static_block): Update.
5064
5065 2018-07-20 Tom Tromey <tom@tromey.com>
5066
5067 * buildsym.h (class scoped_free_pendings): Remove constructor.
5068 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5069 method.
5070 <m_pending_block_obstack, m_pending_blocks>: New members.
5071 (pending_block_obstack, pending_blocks): Remove.
5072 (scoped_free_pendings::scoped_free_pendings): Default.
5073 (~scoped_free_pendings): Update.
5074 (free_pending_blocks): Remove.
5075 (finish_block_internal, record_pending_block, make_blockvector)
5076 (end_symtab_get_static_block, augment_type_symtab, push_context)
5077 (buildsym_init): Update.
5078
5079 2018-07-20 Tom Tromey <tom@tromey.com>
5080
5081 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5082 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5083 members.
5084 (pending_addrmap, pending_addrmap_obstack)
5085 (pending_addrmap_interesting): Remove.
5086 (scoped_free_pendings, record_block_range, make_blockvector)
5087 (prepare_for_building, reset_symtab_globals, buildsym_init):
5088 Update.
5089
5090 2018-07-20 Tom Tromey <tom@tromey.com>
5091
5092 * xcoffread.c (process_linenos): Update.
5093 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5094 * mdebugread.c (psymtab_to_symtab_1): Update.
5095 * dwarf2read.c (setup_type_unit_groups)
5096 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5097 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5098 * dbxread.c (process_one_symbol): Update.
5099 * coffread.c (coff_symtab_read, enter_linenos)
5100 (process_coff_symbol): Update.
5101 * buildsym.h (current_subfile): Don't declare.
5102 (get_current_subfile): Declare.
5103 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5104 member.
5105 (start_subfile, free_buildsym_compunit, push_subfile)
5106 (prepare_for_building, start_symtab): Update.
5107 (get_current_subfile): New function.
5108
5109 2018-07-20 Tom Tromey <tom@tromey.com>
5110
5111 * coffread.c (coff_symtab_read): Update.
5112 * xcoffread.c (read_xcoff_symtab): Update.
5113 * dwarf2read.c (new_symbol): Update.
5114 (read_func_scope, read_lexical_block_scope): Update.
5115 * dbxread.c (process_one_symbol): Update.
5116 * buildsym.h (context_stack, context_stack_depth): Don't declare.
5117 (outermost_context_p): Remove macro.
5118 (outermost_context_p, get_current_context_stack)
5119 (get_context_stack_depth): Declare.
5120 (pop_context): Return struct context_stack.
5121 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5122 member.
5123 (context_stack_size): Remove.
5124 (INITIAL_CONTEXT_STACK_SIZE): Remove.
5125 (prepare_for_building, end_symtab_get_static_block)
5126 (augment_type_symtab, push_context): Update.
5127 (pop_context): Return struct context_stack.
5128 (outermost_context_p, get_current_context_stack)
5129 (get_context_stack_depth): New functions.
5130 (buildsym_init): Update.
5131
5132 2018-07-20 Tom Tromey <tom@tromey.com>
5133
5134 * rust-exp.y: Now a pure parser. Update all rules.
5135 (%union): Move earlier.
5136 (current_parser, work_obstack): Remove globals.
5137 (rust_parser, ~rust_parser): Update.
5138 (class rust_parser) <copy_name, concat3, crate_name, super_name,
5139 lex_character, lex_number, lex_string, lex_identifier,
5140 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5141 convert_name, convert_params_to_expression,
5142 convert_ast_to_expression, ast_basic_type, ast_operation,
5143 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5144 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5145 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5146 ast_array_type, ast_slice_type, ast_reference_type,
5147 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5148 (rust_parse): Update.
5149 (rustyyerror, rustyylex): Add parser parameter.
5150 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5151 (rust_lex_stringish_test, rust_lex_test_sequence)
5152 (rust_lex_test_trailing_dot, rust_lex_test_completion)
5153 (rust_lex_test_push_back, rust_lex_tests): Update.
5154
5155 2018-07-19 Pedro Alves <palves@redhat.com>
5156
5157 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5158 gdb::unique_xmalloc_ptr.
5159 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5160 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5161 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5162 copy-initialization.
5163 * guile/scm-pretty-print.c (ppscm_print_children): Use
5164 gdb::unique_xmalloc_ptr instead of cleanups.
5165 (gdbscm_apply_val_pretty_printer): Remove cleanups.
5166 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5167 gdb::unique_xmalloc_ptr.
5168 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5169 Adjust to use gdb::unique_xmalloc_ptr.
5170 * guile/scm-utils.c (extract_arg): Adjust.
5171 * guile/scm-value.c (gdbscm_value_field): Adjust to use
5172 gdb::unique_xmalloc_ptr instead of a cleanup.
5173
5174 2018-07-19 Tom Tromey <tom@tromey.com>
5175
5176 * utils.c (do_value_free_to_mark)
5177 (make_cleanup_value_free_to_mark): Remove.
5178 * utils.h (make_cleanup_value_free_to_mark): Remove.
5179
5180 2018-07-19 Pedro Alves <palves@redhat.com>
5181
5182 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5183 forwarding reference.
5184
5185 2018-07-18 Pedro Alves <palves@redhat.com>
5186
5187 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5188 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
5189 cleanup.
5190
5191 2018-07-18 Pedro Alves <palves@redhat.com>
5192
5193 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5194 exceptions.
5195 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5196 (gdbscm_wrap): New.
5197 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5198 directly instead of a cleanup.
5199 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5200 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
5201 (vlscm_binop_gdbthrow): New, factored out from ...
5202 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
5203 (vlscm_rich_compare): Use gdbscm_wrap.
5204 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5205 instead of a cleanup.
5206 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5207 cleanup.
5208 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5209 Use xfree directly instead of a cleanup.
5210 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5211 Adjust to use gdbscm_wrap and scoped_value_mark.
5212 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5213 (gdbscm_value_address, gdbscm_value_dereference)
5214 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5215 scoped_value_mark.
5216 (gdbscm_value_dynamic_type): Use scoped_value_mark.
5217 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5218 scoped_value_mark.
5219 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5220 gdbscm_wrap and scoped_value_mark.
5221 (gdbscm_value_to_string): Use xfree directly instead of a
5222 cleanup. Move 'buffer' unique_ptr to TRY scope.
5223 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5224 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
5225 scoped_value_mark.
5226 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5227 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5228 scoped_value_mark.
5229 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5230 gdbscm_wrap.
5231
5232 2018-07-18 Tom de Vries <tdevries@suse.de>
5233
5234 * findvar.c (default_read_var_value): Also resolve dynamic type for
5235 LOC_OPTIMIZED_OUT vars.
5236
5237 2018-07-18 Maciej W. Rozycki <macro@mips.com>
5238
5239 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5240 decoding.
5241
5242 2018-07-17 Tom Tromey <tom@tromey.com>
5243
5244 * guile/scm-param.c (pascm_set_func, pascm_show_func)
5245 (compute_enum_list, pascm_set_param_value_x)
5246 (gdbscm_parameter_value): Update.
5247 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5248 (gdbscm_scm_to_host_string): Update.
5249 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5250 Update.
5251 * guile/scm-cmd.c (cmdscm_add_completion): Update.
5252 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5253 * guile/scm-string.c (gdbscm_scm_to_string): Return
5254 unique_xmalloc_ptr.
5255 (gdbscm_scm_to_host_string): Likewise.
5256
5257 2018-07-17 Tom Tromey <tom@tromey.com>
5258
5259 * guile/guile.c (gdbscm_eval_from_control_command): Update.
5260 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5261 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5262 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5263 unique_xmalloc_ptr.
5264
5265 2018-07-17 Tom Tromey <tom@tromey.com>
5266
5267 * guile/scm-param.c (pascm_signal_setshow_error): Update.
5268 * guile/guile-internal.h (gdbscm_exception_message_to_string):
5269 Update.
5270 * guile/scm-cmd.c (cmdscm_function): Update.
5271 * guile/scm-pretty-print.c
5272 (ppscm_print_exception_unless_memory_error): Update.
5273 * guile/scm-exception.c (gdbscm_exception_message_to_string):
5274 Return unique_xmalloc_ptr.
5275
5276 2018-07-17 Tom Tromey <tom@tromey.com>
5277
5278 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5279 Use string_printf.
5280
5281 2018-07-17 Jim Wilson <jimw@sifive.com>
5282
5283 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5284 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
5285 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
5286 unecessary braces after EF_RISCV_RVC test. Delete call to
5287 set_gdbarch_decr_pc_after_break.
5288
5289 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5290 RISCV_LAST_FP_REGNUM + 1.
5291 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5292
5293 2018-07-17 Tom Tromey <tom@tromey.com>
5294
5295 * configure.ac: Remove --disable-gdbcli.
5296 * configure: Rebuild.
5297 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5298 (SUBDIR_CLI_CFLAGS): Remove.
5299 (SFILES): Use SUBDIR_CLI_SRCS.
5300 (COMMON_OBS): Use SUBDIR_CLI_OBS.
5301
5302 2018-07-17 Tom Tromey <tom@tromey.com>
5303
5304 PR gdb/18624:
5305 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5306
5307 2018-07-16 Jim Wilson <jimw@sifive.com>
5308
5309 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5310
5311 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5312
5313 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5314 variable.
5315 (libunwind_frame_sniffer): Likewise.
5316 (libunwind_frame_prev_register): Likewise.
5317 (libunwind_sigtramp_frame_sniffer): Likewise.
5318 * ia64-tdep.c (ia64_access_reg): Likewise.
5319 (ia64_access_rse_reg): Likewise.
5320 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5321 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5322
5323 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5324
5325 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5326
5327 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
5328
5329 * remote-sim.c (gdbsim_target::close,
5330 gdbsim_target::mourn_inferior): Remove unused variables.
5331
5332 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
5333
5334 * ia64-tdep.c (ktab_buf): New global.
5335 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5336 (get_kernel_table): Adjust.
5337
5338 2018-07-16 Tom Tromey <tom@tromey.com>
5339
5340 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5341 * dwarf2read.c (using_directives, new_symbol): Use
5342 outermost_context_p.
5343 * dbxread.c (process_one_symbol): Use outermost_context_p.
5344 * coffread.c (coff_symtab_read): Use outermost_context_p.
5345
5346 2018-07-16 Tom Tromey <tom@tromey.com>
5347
5348 * dwarf2read.c (using_directives, read_func_scope)
5349 (read_lexical_block_scope): Update.
5350 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5351 * buildsym.h (local_using_directives, global_using_directives):
5352 Don't declare.
5353 (get_local_using_directives, set_local_using_directives)
5354 (get_global_using_directives): Declare.
5355 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5356 m_global_using_directives>: New members.
5357 (finish_block_internal, prepare_for_building)
5358 (reset_symtab_globals, end_symtab_get_static_block)
5359 (push_context): Update.
5360 (get_local_using_directives, set_local_using_directives)
5361 (get_global_using_directives): New functions.
5362 (buildsym_init): Update.
5363
5364 2018-07-16 Tom Tromey <tom@tromey.com>
5365
5366 * xcoffread.c (xcoff_initial_scan): Don't call
5367 free_pending_blocks.
5368 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5369 * buildsym.h (class scoped_free_pendings): Add constructor.
5370 (free_pending_blocks): Don't declare.
5371 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5372 (free_pending_blocks): Now static.
5373
5374 2018-07-16 Tom Tromey <tom@tromey.com>
5375
5376 * buildsym.h (push_subfile, pop_subfile): Update declarations.
5377 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5378 member.
5379 (struct subfile_stack): Remove.
5380 (subfile_stack): Remove.
5381 (push_subfile, pop_subfile, buildsym_init): Update.
5382
5383 2018-07-16 Tom Tromey <tom@tromey.com>
5384
5385 * buildsym.c (push_subfile): Use gdb_assert.
5386 (pop_subfile): Use gdb_assert.
5387
5388 2018-07-16 Tom Tromey <tom@tromey.com>
5389
5390 * buildsym.h (merge_symbol_lists): Remove.
5391 * buildsym.c (merge_symbol_lists): Remove.
5392
5393 2018-07-16 Tom Tromey <tom@tromey.com>
5394
5395 * stabsread.c (scan_file_globals): Update comment.
5396 * stabsread.h (scan_file_globals): Move from buildsym.h.
5397 * buildsym.h (scan_file_globals): Move to stabsread.h.
5398
5399 2018-07-16 Tom Tromey <tom@tromey.com>
5400
5401 * xcoffread.c (xcoff_new_init): Update.
5402 * mipsread.c (mipscoff_new_init): Update.
5403 * mdebugread.c (mdebug_build_psymtabs): Update.
5404 * elfread.c (elf_new_init): Update.
5405 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5406 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5407 * buildsym.h (buildsym_new_init): Don't declare.
5408 * buildsym.c (buildsym_new_init): Remove.
5409
5410 2018-07-16 Tom Tromey <tom@tromey.com>
5411
5412 * stabsread.h (within_function): Move from buildsym.h.
5413 * stabsread.c (start_stabs): Clear within_function.
5414 * coffread.c (coff_start_symtab): Clear within_function.
5415 * buildsym.h (within_function): Move to stabsread.h.
5416 * buildsym.c (prepare_for_building): Update.
5417
5418 2018-07-16 Tom Tromey <tom@tromey.com>
5419
5420 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5421 * dwarf2read.c (dwarf2_start_symtab): Don't set
5422 processing_gcc_compilation.
5423 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5424
5425 2018-07-16 Tom Tromey <tom@tromey.com>
5426
5427 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5428 (next_symbol_text_func): Move from buildsym.h.
5429 * stabsread.c (hashname): Move from buildsym.c.
5430 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5431 (next_symbol_text_func, hashname): Move to stabsread.h.
5432 * buildsym.c: Don't include bcache.h
5433 (hashname): Move to stasbread.c.
5434
5435 2018-07-16 Tom Tromey <tom@tromey.com>
5436
5437 * buildsym.h (context_stack_size): Don't declare.
5438 * buildsym.c (context_stack_size): New global.
5439
5440 2018-07-16 Tom Tromey <tom@tromey.com>
5441
5442 * dbxread.c (processing_acc_compilation): New global.
5443 * buildsym.h (processing_acc_compilation): Don't declare.
5444
5445 2018-07-16 Tom Tromey <tom@tromey.com>
5446
5447 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5448 * dbxread.c (read_ofile_symtab): Update.
5449 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5450 * buildsym.h (last_source_start_addr): Remove.
5451 (set_last_source_start_addr, get_last_source_start_addr):
5452 Declare.
5453 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5454 parameter.
5455 (struct buildsym_compunit) <m_last_source_start_addr>: New
5456 member.
5457 (prepare_for_building): Remove start_addr parameter.
5458 (start_symtab, restart_symtab, end_symtab_get_static_block)
5459 (end_symtab_with_blockvector): Update.
5460 (set_last_source_start_addr, get_last_source_start_addr): New
5461 functions.
5462
5463 2018-07-16 Tom Tromey <tom@tromey.com>
5464
5465 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5466 member.
5467 (have_line_numbers): Remove.
5468 (record_line, prepare_for_building, end_symtab_get_static_block)
5469 (augment_type_symtab): Update.
5470
5471 2018-07-16 Tom Tromey <tom@tromey.com>
5472
5473 * buildsym.c (~buildsym_compunit): Free the macro table.
5474 (struct buildsym_compunit) <get_macro_table, release_macros>: New
5475 methods.
5476 <m_pending_macros>: New member.
5477 (pending_macros): Remove.
5478 (~scoped_free_pendings, get_macro_table, prepare_for_building)
5479 (reset_symtab_globals, end_symtab_get_static_block)
5480 (end_symtab_with_blockvector, augment_type_symtab)
5481 (buildsym_init): Update.
5482
5483 2018-07-16 Tom Tromey <tom@tromey.com>
5484
5485 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5486 parameter.
5487 (buildsym_compunit::set_last_source_file): New method.
5488 <m_last_source_file>: New member.
5489 (prepare_for_building): Remove "name" parameter.
5490 (start_symtab, restart_symtab, reset_symtab_globals): Update.
5491 (last_source_file): Remove.
5492 (set_last_source_file, get_last_source_file): Update.
5493
5494 2018-07-16 Tom Tromey <tom@tromey.com>
5495
5496 * buildsym.c (prepare_for_building): Add assert.
5497
5498 2018-07-16 Tom Tromey <tom@tromey.com>
5499
5500 * buildsym.c (~buildsym_compunit): Update.
5501 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5502 (start_subfile, patch_subfile_names)
5503 (end_symtab_with_blockvector): Update.
5504
5505 2018-07-16 Tom Tromey <tom@tromey.com>
5506
5507 * buildsym.c (struct buildsym_compunit): Add constructor,
5508 destructor, initializers.
5509 (start_buildsym_compunit): Remove.
5510 (free_buildsym_compunit): Use "delete".
5511 (start_symtab, restart_symtab): Use "new".
5512
5513 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
5514
5515 * symfile.c (set_objfile_default_section_offset): Remove struct
5516 keyword.
5517
5518 2018-07-14 Stafford Horne <shorne@gmail.com>
5519
5520 * (Responsible Maintainers): Add myself as or1k maintainer.
5521
5522 2018-07-13 Tom Tromey <tom@tromey.com>
5523
5524 * symfile.c (set_objfile_default_section_offset): Use extra braces
5525 around initializer.
5526
5527 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5528
5529 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5530 non-branching basr.
5531
5532 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5533
5534 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5535 unittests/cli-utils-selftests.c
5536 * unittests/cli-utils-selftests.c: New file.
5537
5538 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5539
5540 * NEWS: Mention new commands. Mention change to 'thread apply'.
5541
5542 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5543
5544 * thread.c (thr_try_catch_cmd): New function.
5545 (thread_apply_all_command): Handle qcs flags.
5546 (thread_apply_command): Handle qcs flags.
5547 (taas_command): New function.
5548 (tfaas_command): New function.
5549 (_initialize_thread): Update to setup the new commands 'taas
5550 and 'tfaas'. Change doc string for 'thread apply'.
5551
5552 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5553
5554 * stack.c: (trailing_outermost_frame): New function, mostly
5555 extracted from backtrace_command_1.
5556 (leading_innermost_frame): New function.
5557 (backtrace_command_1): Update to call trailing_outermost_frame.
5558 (frame_apply_command_count): New function.
5559 (frame_apply_level_command): New function.
5560 (frame_apply_all_command): New function.
5561 (frame_apply_command): New function.
5562 (faas_command): New function.
5563 (frame_cmd_list): New variable.
5564 (_initialize_stack): Update to setup the new commands 'frame apply'
5565 and 'faas'.
5566
5567 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5568
5569 * cli-utils.c (number_or_range_parser::get_number): Only handle
5570 numbers or convenience var as numbers.
5571 (parse_flags): New function.
5572 (parse_flags_qcs): New function.
5573 (number_or_range_parser::finished): Ensure parsing end is detected
5574 before end of string.
5575 * cli-utils.h (parse_flags): New function.
5576 (parse_flags_qcs): New function.
5577 (number_or_range_parser): Remove m_finished bool.
5578 (number_or_range_parser::skip_range): Set m_in_range to false.
5579
5580 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
5581
5582 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5583 on Windows.
5584
5585 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5586 Jan Kratochvil <jan.kratochvil@redhat.com>
5587 Paul Fertser <fercerpav@gmail.com>
5588 Tsutomu Seki <sekiriki@gmail.com>
5589 Pedro Alves <palves@redhat.com>
5590
5591 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5592 'unittests/parse-connection-spec-selftests.c'.
5593 (COMMON_SFILES): Add 'common/netstuff.c'.
5594 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5595 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5596 * common/netstuff.c: New file.
5597 * common/netstuff.h: New file.
5598 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5599 (wait_for_connect): Update comment. New parameter
5600 'gdb::optional<int> sock' instead of 'struct serial *scb'.
5601 Use 'sock' directly instead of 'scb->fd'.
5602 (try_connect): New function, with code from 'net_open'.
5603 (net_open): Rewrite main loop to deal with multiple
5604 sockets/addresses. Handle IPv6-style hostnames; implement
5605 support for IPv6 connections.
5606 * unittests/parse-connection-spec-selftests.c: New file.
5607
5608 2018-07-11 Pedro Alves <palves@redhat.com>
5609
5610 PR gdb/23377
5611 * remote.c (remote_target::remote_detach_pid): Call
5612 set_current_process.
5613
5614 2018-07-11 Pedro Alves <palves@redhat.com>
5615
5616 * h8300-tdep.c (h8300_gdbarch_init): Remove
5617 set_gdbarch_ecoff_reg_to_regnum calls.
5618
5619 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5620
5621 PR c++/23373
5622 * c-typeprint.c (c_type_print_base_struct_union): Don't print
5623 offsets/sizes for static members of a class/struct.
5624
5625 2018-07-11 Alan Hayward <alan.hayward@arm.com>
5626
5627 * target-descriptions.c (tdesc_register_bitsize): Rename.
5628 * target-descriptions.h (tdesc_register_bitsize): Likewise.
5629 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5630 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5631
5632 2018-07-10 Tom Tromey <tom@tromey.com>
5633
5634 * breakpoint.c (moribund_locations): Now static and a
5635 std::vector.
5636 (breakpoint_init_inferior, moribund_breakpoint_here_p)
5637 (build_bpstat_chain, update_global_location_list)
5638 (breakpoint_retire_moribund): Update.
5639 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
5640 VEC.
5641
5642 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5643
5644 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5645 (riscv_register_reggroup_p): Use new function, remove unneeded
5646 parenthesis.
5647 (riscv_push_dummy_call): Extend assert to compare against xlen or
5648 flen based on register type.
5649
5650 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
5651
5652 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5653
5654 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
5655
5656 * remote.c (show_hardware_watchpoint_limit): New function.
5657 (show_hardware_watchpoint_length_limit): New function.
5658 (show_hardware_breakpoint_limit): New function.
5659 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5660 where appropriate, update help text.
5661
5662 2018-07-09 Tom Tromey <tom@tromey.com>
5663
5664 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5665 (CLIBS): Don't mention NAT_CLIBS.
5666
5667 2018-07-09 Tom Tromey <tom@tromey.com>
5668
5669 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5670 (LIBGDB_OBS, clean mostlyclean): Update.
5671 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5672
5673 2018-07-09 Tom Tromey <tom@tromey.com>
5674
5675 * Makefile.in (%.c: %.y): Use ECHO_YACC.
5676 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
5677 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5678
5679 2018-07-09 Tom Tromey <tom@tromey.com>
5680
5681 * Makefile.in (ALLDEPFILES): Remove exec.c.
5682 (COMMON_OBS): Remove exec.o.
5683 (COMMON_SFILES): Add exec.c.
5684
5685 2018-07-09 Tom Tromey <tom@tromey.com>
5686
5687 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5688
5689 2018-07-09 Tom Tromey <tom@tromey.com>
5690
5691 * Makefile.in (clean mostlyclean): Remove stamp-version.
5692 (version.c): Depend on stamp-version.
5693 (stamp-version): New rule, from version.c rule.
5694
5695 2018-07-09 Tom Tromey <tom@tromey.com>
5696
5697 * Makefile.in (init.c): Depend on stamp-init.
5698 (stamp-init): New rule, from init.c rule.
5699 (clean mostlyclean): Remove stamp-init.
5700
5701 2018-07-09 Tom Tromey <tom@tromey.com>
5702
5703 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5704 SUBDIR_GCC_COMPILE_SRCS.
5705
5706 2018-07-09 Tom Tromey <tom@tromey.com>
5707
5708 * Makefile.in (init.c): Remove some unused sed rules.
5709
5710 2018-07-09 Tom Tromey <tom@tromey.com>
5711
5712 * Makefile.in (TSOBS): Remove.
5713 (INIT_FILES): Update.
5714 (LIBGDB_OBS): Update.
5715 (COMMON_SFILES): Add inflow.c.
5716 (SFILES): Remove inflow.c.
5717
5718 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5719
5720 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5721
5722 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
5723
5724 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5725 get_saveloc_name, is_signal_frame_name, step_name,
5726 init_remote_name, create_addr_space_name,
5727 destroy_addr_space_name, search_unwind_table_name,
5728 find_dyn_list_name): Constify.
5729
5730 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
5731
5732 * darwin-nat.c (darwin_pthread_kill): New function.
5733 (darwin_resume_thread): Use darwin_pthread_kill.
5734
5735 2018-07-05 Tom de Vries <tdevries@suse.de>
5736
5737 * macroexp.c (macro_buffer) <operator=>: New member function.
5738
5739 2018-07-04 Tom Tromey <tom@tromey.com>
5740
5741 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5742
5743 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
5744
5745 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5746 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5747 * maint.c: Likewise.
5748 * top.c: Likewise.
5749
5750 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5751
5752 * NEWS: Create a new section for the next release branch.
5753 Rename the section of the current branch, now that it has
5754 been cut.
5755
5756 2018-07-04 Joel Brobecker <brobecker@adacore.com>
5757
5758 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5759 * version.in: Bump version to 8.2.50.DATE-git.
5760
5761 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5762 Pedro Alves <palves@redhat.com>
5763
5764 * linux-nat.c (linux_init_ptrace): Rename to ...
5765 (linux_init_ptrace_procfs): ... this. Call
5766 linux_proc_init_warnings.
5767 (linux_nat_target::post_attach)
5768 (linux_nat_target::post_startup_inferior): Adjust.
5769 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5770 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5771
5772 2018-07-04 Tom de Vries <tdevries@suse.de>
5773
5774 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5775 check ...
5776 (read_comp_unit_head): ... here.
5777
5778 2018-07-03 Tom Tromey <tom@tromey.com>
5779
5780 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5781 (stop_tracing, tstatus_command)
5782 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5783 (print_one_static_tracepoint_marker): Update.
5784 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5785 std::vector.
5786 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
5787 VEC.
5788 (all_tracepoints, static_tracepoints_here): Return std::vector.
5789
5790 2018-07-03 Tom Tromey <tom@tromey.com>
5791
5792 * common/ptid.c (ptid_equal): Remove.
5793 * common/ptid.h (ptid_equal): Don't declare.
5794 * ada-tasks.c: Update.
5795 * breakpoint.c: Update.
5796 * common/agent.c: Update.
5797 * corelow.c: Update.
5798 * darwin-nat-info.c: Update.
5799 * darwin-nat.c: Update.
5800 * dcache.c: Update.
5801 * dtrace-probe.c: Update.
5802 * dummy-frame.c: Update.
5803 * fbsd-nat.c: Update.
5804 * frame.c: Update.
5805 * gdbthread.h: Update.
5806 * gnu-nat.c: Update.
5807 * go32-nat.c: Update.
5808 * inf-loop.c: Update.
5809 * inf-ptrace.c: Update.
5810 * infcall.c: Update.
5811 * infcmd.c: Update.
5812 * inflow.c: Update.
5813 * infrun.c: Update.
5814 * linux-fork.c: Update.
5815 * linux-nat.c: Update.
5816 * linux-thread-db.c: Update.
5817 * mi/mi-cmd-var.c: Update.
5818 * mi/mi-interp.c: Update.
5819 * mi/mi-main.c: Update.
5820 * nto-procfs.c: Update.
5821 * ppc-linux-tdep.c: Update.
5822 * procfs.c: Update.
5823 * python/py-inferior.c: Update.
5824 * python/py-record-btrace.c: Update.
5825 * python/py-record.c: Update.
5826 * ravenscar-thread.c: Update.
5827 * regcache.c: Update.
5828 * remote-sim.c: Update.
5829 * remote.c: Update.
5830 * sol-thread.c: Update.
5831 * solib.c: Update.
5832 * target.c: Update.
5833 * tui/tui-stack.c: Update.
5834 * varobj.c: Update.
5835 * windows-nat.c: Update.
5836 * windows-tdep.c: Update.
5837
5838 2018-07-03 Tom Tromey <tom@tromey.com>
5839
5840 * common/ptid.c (ptid_match): Remove.
5841 * common/ptid.h (ptid_match): Don't declare.
5842 * fbsd-nat.c: Update.
5843 * infcmd.c: Update.
5844 * infrun.c: Update.
5845 * linux-nat.c: Update.
5846 * record-btrace.c: Update.
5847 * regcache.c: Update.
5848 * remote.c: Update.
5849
5850 2018-07-03 Tom Tromey <tom@tromey.com>
5851
5852 * common/ptid.c (ptid_tid_p): Remove.
5853 * common/ptid.h (ptid_tid_p): Don't declare.
5854 * sol-thread.c: Update.
5855
5856 2018-07-03 Tom Tromey <tom@tromey.com>
5857
5858 * common/ptid.c (ptid_lwp_p): Remove.
5859 * common/ptid.h (ptid_lwp_p): Don't declare.
5860 * fbsd-nat.c: Update.
5861 * linux-nat.c: Update.
5862 * nat/linux-procfs.c: Update.
5863 * nat/x86-linux-dregs.c: Update.
5864 * sol-thread.c: Update.
5865
5866 2018-07-03 Tom Tromey <tom@tromey.com>
5867
5868 * common/ptid.c (ptid_is_pid): Remove.
5869 * common/ptid.h (ptid_is_pid): Don't declare.
5870 * infrun.c: Update.
5871 * linux-nat.c: Update.
5872 * mi/mi-interp.c: Update.
5873 * remote.c: Update.
5874 * thread.c: Update.
5875
5876 2018-07-03 Tom Tromey <tom@tromey.com>
5877
5878 * common/ptid.c (ptid_get_tid): Remove.
5879 * common/ptid.h (ptid_get_tid): Don't declare.
5880 * ada-tasks.c: Update.
5881 * aix-thread.c: Update.
5882 * bsd-uthread.c: Update.
5883 * darwin-nat.c: Update.
5884 * fbsd-nat.c: Update.
5885 * i386-darwin-nat.c: Update.
5886 * infrun.c: Update.
5887 * linux-tdep.c: Update.
5888 * nto-procfs.c: Update.
5889 * ppc-ravenscar-thread.c: Update.
5890 * python/py-infthread.c: Update.
5891 * ravenscar-thread.c: Update.
5892 * sol-thread.c: Update.
5893 * sparc-ravenscar-thread.c: Update.
5894 * windows-nat.c: Update.
5895
5896 2018-07-03 Tom Tromey <tom@tromey.com>
5897
5898 * common/ptid.c (ptid_get_lwp): Remove.
5899 * common/ptid.h (ptid_get_lwp): Don't declare.
5900 * aarch64-linux-nat.c: Update.
5901 * ada-tasks.c: Update.
5902 * aix-thread.c: Update.
5903 * amd64-linux-nat.c: Update.
5904 * arm-linux-nat.c: Update.
5905 * corelow.c: Update.
5906 * fbsd-nat.c: Update.
5907 * fbsd-tdep.c: Update.
5908 * gnu-nat.c: Update.
5909 * i386-cygwin-tdep.c: Update.
5910 * i386-gnu-nat.c: Update.
5911 * i386-linux-nat.c: Update.
5912 * ia64-linux-nat.c: Update.
5913 * inf-ptrace.c: Update.
5914 * infrun.c: Update.
5915 * linux-fork.c: Update.
5916 * linux-nat.c: Update.
5917 * linux-tdep.c: Update.
5918 * linux-thread-db.c: Update.
5919 * mips-linux-nat.c: Update.
5920 * nat/aarch64-linux-hw-point.c: Update.
5921 * nat/aarch64-linux.c: Update.
5922 * nat/linux-btrace.c: Update.
5923 * nat/linux-osdata.c: Update.
5924 * nat/linux-procfs.c: Update.
5925 * nat/x86-linux-dregs.c: Update.
5926 * obsd-nat.c: Update.
5927 * ppc-fbsd-nat.c: Update.
5928 * ppc-linux-nat.c: Update.
5929 * procfs.c: Update.
5930 * python/py-infthread.c: Update.
5931 * ravenscar-thread.c: Update.
5932 * remote.c: Update.
5933 * s390-linux-nat.c: Update.
5934 * sol-thread.c: Update.
5935 * sol2-tdep.c: Update.
5936 * spu-linux-nat.c: Update.
5937 * x86-linux-nat.c: Update.
5938 * xtensa-linux-nat.c: Update.
5939
5940 2018-07-03 Tom Tromey <tom@tromey.com>
5941
5942 * common/ptid.c (ptid_get_pid): Remove.
5943 * common/ptid.h (ptid_get_pid): Don't declare.
5944 * aarch64-linux-nat.c: Update.
5945 * ada-lang.c: Update.
5946 * aix-thread.c: Update.
5947 * alpha-bsd-nat.c: Update.
5948 * amd64-fbsd-nat.c: Update.
5949 * amd64-linux-nat.c: Update.
5950 * arm-linux-nat.c: Update.
5951 * arm-nbsd-nat.c: Update.
5952 * auxv.c: Update.
5953 * break-catch-syscall.c: Update.
5954 * breakpoint.c: Update.
5955 * bsd-uthread.c: Update.
5956 * corelow.c: Update.
5957 * ctf.c: Update.
5958 * darwin-nat.c: Update.
5959 * fbsd-nat.c: Update.
5960 * fbsd-tdep.c: Update.
5961 * gcore.c: Update.
5962 * gnu-nat.c: Update.
5963 * hppa-nbsd-nat.c: Update.
5964 * hppa-obsd-nat.c: Update.
5965 * i386-fbsd-nat.c: Update.
5966 * ia64-linux-nat.c: Update.
5967 * inf-ptrace.c: Update.
5968 * infcmd.c: Update.
5969 * inferior.c: Update.
5970 * inferior.h: Update.
5971 * inflow.c: Update.
5972 * infrun.c: Update.
5973 * linux-fork.c: Update.
5974 * linux-nat.c: Update.
5975 * linux-tdep.c: Update.
5976 * linux-thread-db.c: Update.
5977 * m68k-bsd-nat.c: Update.
5978 * mi/mi-interp.c: Update.
5979 * mi/mi-main.c: Update.
5980 * mips-linux-nat.c: Update.
5981 * mips-nbsd-nat.c: Update.
5982 * mips64-obsd-nat.c: Update.
5983 * nat/aarch64-linux-hw-point.c: Update.
5984 * nat/aarch64-linux.c: Update.
5985 * nat/linux-btrace.c: Update.
5986 * nat/linux-osdata.c: Update.
5987 * nat/linux-procfs.c: Update.
5988 * nat/x86-linux-dregs.c: Update.
5989 * nto-procfs.c: Update.
5990 * obsd-nat.c: Update.
5991 * ppc-linux-nat.c: Update.
5992 * ppc-nbsd-nat.c: Update.
5993 * ppc-obsd-nat.c: Update.
5994 * proc-service.c: Update.
5995 * procfs.c: Update.
5996 * python/py-inferior.c: Update.
5997 * python/py-infthread.c: Update.
5998 * ravenscar-thread.c: Update.
5999 * record.c: Update.
6000 * remote-sim.c: Update.
6001 * remote.c: Update.
6002 * rs6000-nat.c: Update.
6003 * s390-linux-nat.c: Update.
6004 * sh-nbsd-nat.c: Update.
6005 * sol-thread.c: Update.
6006 * sparc-nat.c: Update.
6007 * sparc64-tdep.c: Update.
6008 * spu-linux-nat.c: Update.
6009 * spu-tdep.c: Update.
6010 * target-debug.h: Update.
6011 * target.c: Update.
6012 * thread.c: Update.
6013 * tid-parse.c: Update.
6014 * tracefile-tfile.c: Update.
6015 * vax-bsd-nat.c: Update.
6016 * windows-nat.c: Update.
6017 * x86-linux-nat.c: Update.
6018 * x86-nat.c: Update.
6019
6020 2018-07-03 Tom Tromey <tom@tromey.com>
6021
6022 * common/ptid.c (pid_to_ptid): Remove.
6023 * common/ptid.h (pid_to_ptid): Don't declare.
6024 * aix-thread.c: Update.
6025 * arm-linux-nat.c: Update.
6026 * common/ptid.c: Update.
6027 * common/ptid.h: Update.
6028 * corelow.c: Update.
6029 * ctf.c: Update.
6030 * darwin-nat.c: Update.
6031 * fbsd-nat.c: Update.
6032 * fork-child.c: Update.
6033 * gnu-nat.c: Update.
6034 * go32-nat.c: Update.
6035 * inf-ptrace.c: Update.
6036 * infcmd.c: Update.
6037 * inferior.c: Update.
6038 * infrun.c: Update.
6039 * linux-fork.c: Update.
6040 * linux-nat.c: Update.
6041 * nat/aarch64-linux-hw-point.c: Update.
6042 * nat/fork-inferior.c: Update.
6043 * nat/x86-linux-dregs.c: Update.
6044 * nto-procfs.c: Update.
6045 * obsd-nat.c: Update.
6046 * procfs.c: Update.
6047 * progspace.c: Update.
6048 * remote.c: Update.
6049 * rs6000-nat.c: Update.
6050 * s390-linux-nat.c: Update.
6051 * sol-thread.c: Update.
6052 * spu-linux-nat.c: Update.
6053 * target.c: Update.
6054 * top.c: Update.
6055 * tracefile-tfile.c: Update.
6056 * windows-nat.c: Update.
6057
6058 2018-07-03 Tom Tromey <tom@tromey.com>
6059
6060 * common/ptid.h (ptid_build): Don't declare.
6061 * common/ptid.c (ptid_build): Remove.
6062 * aix-thread.c: Update.
6063 * bsd-kvm.c: Update.
6064 * bsd-uthread.c: Update.
6065 * common/agent.c: Update.
6066 * common/ptid.c: Update.
6067 * common/ptid.h: Update.
6068 * corelow.c: Update.
6069 * darwin-nat.c: Update.
6070 * fbsd-nat.c: Update.
6071 * gnu-nat.c: Update.
6072 * linux-fork.c: Update.
6073 * linux-nat.c: Update.
6074 * linux-thread-db.c: Update.
6075 * nat/linux-osdata.c: Update.
6076 * nat/linux-procfs.c: Update.
6077 * nto-procfs.c: Update.
6078 * obsd-nat.c: Update.
6079 * proc-service.c: Update.
6080 * procfs.c: Update.
6081 * ravenscar-thread.c: Update.
6082 * remote-sim.c: Update.
6083 * remote.c: Update.
6084 * sol-thread.c: Update.
6085 * target.c: Update.
6086 * windows-nat.c: Update.
6087
6088 2018-07-03 Tom Tromey <tom@tromey.com>
6089
6090 * infrun.c (follow_exec): Use exit_inferior_silent.
6091 * inferior.c (exit_inferior_num_silent): Remove.
6092 * inferior.h (exit_inferior_num_silent): Don't declare.
6093
6094 2018-07-03 Tom Tromey <tom@tromey.com>
6095
6096 PR cli/23340:
6097 * darwin-nat.c (darwin_attach_pid): Reset inferior and
6098 inferior_ptid on error.
6099
6100 2018-07-02 Maciej W. Rozycki <macro@mips.com>
6101 Simon Marchi <simon.marchi@polymtl.ca>
6102
6103 PR tdep/8282
6104 * disasm.h (gdb_disassembler): Add
6105 `m_disassembler_options_holder'. member
6106 * disasm.c (get_all_disassembler_options): New function.
6107 (gdb_disassembler::gdb_disassembler): Use it.
6108 (gdb_buffered_insn_length_init_dis): Likewise.
6109 (gdb_buffered_insn_length): Adjust accordingly.
6110 (set_disassembler_options): Handle options with arguments.
6111 (show_disassembler_options_sfunc): Likewise. Add a leading new
6112 line if showing options with descriptions.
6113 (disassembler_options_completer): Adapt to using the
6114 `disasm_options_and_args_t' structure.
6115 * mips-tdep.c (mips_disassembler_options): New variable.
6116 (mips_disassembler_options_o32): Likewise.
6117 (mips_disassembler_options_n32): Likewise.
6118 (mips_disassembler_options_n64): Likewise.
6119 (gdb_print_insn_mips): Don't set `disassembler_options'.
6120 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6121 functions.
6122 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6123 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
6124 `gdbarch_disassembler_options_implicit' and
6125 `gdbarch_valid_disassembler_options'.
6126 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6127 `disasm_options_and_args_t' structure.
6128 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6129 method.
6130 (valid_disassembler_options): Switch from `disasm_options_t' to
6131 the `disasm_options_and_args_t' structure.
6132 * NEWS: Document `set disassembler-options' support for the MIPS
6133 target.
6134 * gdbarch.h: Regenerate.
6135 * gdbarch.c: Regenerate.
6136
6137 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
6138
6139 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6140
6141 2018-06-29 Joel Brobecker <brobecker@adacore.com>
6142
6143 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6144 parameter in call to amd64_target_description.
6145 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6146 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6147 (amd64fbsd_init_abi): Likewise.
6148 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6149 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6150 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6151 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6152
6153 2018-06-29 Pedro Alves <palves@redhat.com>
6154
6155 * gdb/amd64-tdep.h (amd64_create_target_description): Add
6156 "segments" parameter.
6157 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6158 (_initialize_amd64_tdep): Update call to
6159 amd64_create_target_description.
6160 (amd64_target_description): Add "segments" parameter. Adjust
6161 the implementation to use it.
6162 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6163 call to amd64_create_target_description.
6164 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6165 * gdb/arch/amd64.h (amd64_create_target_description): Add
6166 "segments" register.
6167 * gdb/arch/amd64.c (amd64_create_target_description): Add
6168 "segments" parameter. Call create_feature_i386_64bit_segments
6169 only if SEGMENTS is true.
6170 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6171 call to amd64_create_target_description.
6172
6173 2018-06-29 Pedro Alves <palves@redhat.com>
6174
6175 * thread.c (thread_target_id_str): New, factored out from ...
6176 (print_thread_info_1): ... here. Use it to compute the max
6177 "Target Id" column width.
6178
6179 2018-06-29 Pedro Alves <palves@redhat.com>
6180
6181 * remote.c (remote_target::extra_thread_info): Delete
6182 'display_buf' and 'n' locals. from the cache, regardless of
6183 packet mechanims is in use. Use cache for qThreadExtra and qP
6184 methods too.
6185
6186 2018-06-29 Pedro Alves <palves@redhat.com>
6187
6188 * blockframe.c (find_pc_sect_containing_function): New function.
6189 * breakpoint.c (print_breakpoint_location): Don't call
6190 find_pc_sect_function.
6191 * linespec.c (create_sals_line_offset): Record the location's
6192 symbol in the sal.
6193 * linespec.c (convert_address_location_to_sals): Fill in sal's
6194 symbol with find_pc_sect_containing_function.
6195 * symtab.c (find_function_start_sal): Rename to ...
6196 (find_function_start_sal_1): ... this.
6197 (find_function_start_sal): Reimplement as wrapper around
6198 find_function_start_sal_1, and use
6199 find_pc_sect_containing_function to fill in the sal's symbol.
6200 (find_function_start_sal(symbol*, bool)): Adjust.
6201 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6202 comments.
6203 (find_pc_sect_containing_function): Declare.
6204
6205 2018-06-29 Pedro Alves <palves@redhat.com>
6206
6207 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6208 true if the the location has no symbol.
6209
6210 2018-06-28 Tom Tromey <tom@tromey.com>
6211
6212 * NEWS: Mention --enable-codesign.
6213 * silent-rules.mk (ECHO_SIGN): New variable.
6214 * configure.ac: Add --enable-codesign.
6215 * configure: Rebuild.
6216 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6217 (gdb$(EXEEXT)): Optionally invoke codesign.
6218
6219 2018-06-28 Pedro Alves <palves@redhat.com>
6220
6221 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6222 comments.
6223 (switch_to_thread_no_regs): Adjust comment.
6224 * infcmd.c (stop_pc): Delete.
6225 (post_create_inferior, info_program_command): Replace references
6226 to stop_pc with references to thread_info->suspend.stop_pc.
6227 * inferior.h (stop_pc): Delete declaration.
6228 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6229 (handle_inferior_event_1, handle_signal_stop)
6230 (process_event_stop_test, keep_going_stepped_thread)
6231 (handle_step_into_function, handle_step_into_function_backward)
6232 (print_stop_location): Replace references to stop_pc with
6233 references to thread_info->suspend.stop_pc.
6234 (struct infcall_suspend_state) <stop_pc>: Delete field.
6235 (save_infcall_suspend_state, restore_infcall_suspend_state):
6236 Remove references to inf_stat->stop_pc.
6237 * linux-fork.c (fork_load_infrun_state): Likewise.
6238 * record-btrace.c (record_btrace_set_replay): Likewise.
6239 * record-full.c (record_full_goto_entry): Likewise.
6240 * remote.c (print_one_stopped_thread): Likewise.
6241 * target.c (target_resume): Extend comment.
6242 * thread.c (set_executing_thread): New.
6243 (set_executing): Use it.
6244 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6245 Remove references to stop_pc.
6246
6247 2018-06-28 Pedro Alves <palves@redhat.com>
6248
6249 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6250 Moving fetching stop_pc until after ecs->event_thread is refreshed.
6251
6252 2018-06-28 Tom Tromey <tom@tromey.com>
6253
6254 * coffread.c (coff_symfile_finish): Update.
6255 * xcoffread.c (xcoff_symfile_finish): Update.
6256 * elfread.c (elf_symfile_finish): Update.
6257 * symfile.h (dwarf2_free_objfile): Don't declare.
6258 * dwarf2read.c (_initialize_dwarf2_read): Use
6259 register_objfile_data_with_cleanup.
6260 (dwarf2_free_objfile): Now static. Change signature.
6261
6262 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6263
6264 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6265 option "-o" to add-symbol-file-load to add an offset to each
6266 section's load address.
6267 * symfile.c (set_objfile_default_section_offset): New function.
6268
6269 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6270
6271 * symfile.c (add_symbol_file_command): Make sure that sections
6272 with the same name are sorted in the same order.
6273
6274 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6275
6276 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6277 require the second argument. If omitted, load sections at the
6278 addresses specified in the file.
6279
6280 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6281
6282 * symfile.c (symbol_file_command, symbol_file_add_main_1)
6283 (_initialize_symfile): Add option "-o" to symbol-file to add an
6284 offset to each section of the symbol file.
6285
6286 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
6287
6288 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6289
6290 2018-06-27 Tom Tromey <tom@tromey.com>
6291
6292 * stack.c (_initialize_stack): Update "func" help text.
6293
6294 2018-06-27 Tom Tromey <tom@tromey.com>
6295
6296 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6297 std::vector.
6298 (unwind_infopy_str, pyuw_create_unwind_info)
6299 (unwind_infopy_add_saved_register, pyuw_sniffer)
6300 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6301 Update.
6302 (struct saved_reg): Add constructor.
6303 <value>: Now a gdbpy_ref<>.
6304
6305 2018-06-27 Tom Tromey <tom@tromey.com>
6306
6307 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6308
6309 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6310
6311 * gdb-gdb.py.in: Format using autopep8.
6312
6313 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6314
6315 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6316 (type_lookup_function): Recognize CORE_ADDR values.
6317
6318 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6319
6320 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6321 print tag_name.
6322
6323 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6324
6325 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6326 <__lt__>: Add.
6327
6328 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6329
6330 * gdb-gdb.py: Move to...
6331 * gdb-gdb.py.in: ... here.
6332 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6333 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6334 dependencies.
6335 (distclean): Remove gdb-gdb.py when cleaning.
6336 (gdb-gdb.py, gdb-gdb.gdb): New rules.
6337 * configure: Re-generate.
6338
6339 2018-06-27 Pedro Alves <palves@redhat.com>
6340
6341 * proc-service.c (get_ps_regcache): New.
6342 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6343 (ps_lsetfpregs): Use it.
6344
6345 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
6346
6347 PR gdb/21695
6348 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6349 (dwarf_decode_lines_1): Adjust.
6350
6351 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
6352
6353 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6354 override.
6355 <info_proc>: Likewise.
6356
6357 2018-06-26 Joel Brobecker <brobecker@adacore.com>
6358
6359 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6360 to windows_fetch_one_register, and only handle the case of
6361 fetching one register. Move the code that reloads the context
6362 and iterates over all registers if R is negative to...
6363 (windows_nat_target::fetch_registers): ... here.
6364 (do_windows_store_inferior_registers): Rename to
6365 windows_store_one_register, and only handle the case of storing
6366 one register. Move the code that handles the case where r is
6367 negative to...
6368 (windows_nat_target::store_registers) ... here.
6369
6370 2018-06-26 Tom Tromey <tom@tromey.com>
6371
6372 PR rust/22574:
6373 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6374 * rust-lang.c (rust_print_struct_def): Add podata parameter.
6375 Update.
6376 (rust_internal_print_type): Add podata parameter.
6377 (rust_print_type): Update.
6378
6379 2018-06-26 Tom Tromey <tom@tromey.com>
6380
6381 * typeprint.h (struct print_offset_data) <update, finish,
6382 maybe_print_hole>: New methods.
6383 <indentation>: New constant.
6384 * typeprint.c (print_offset_data::indentation): Define.
6385 (print_offset_data::maybe_print_hole, print_offset_data::update)
6386 (print_offset_data::finish): Move from c-typeprint.c and rename.
6387 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6388 (print_spaces_filtered_with_print_options): Update.
6389 (c_print_type_union_field_offset, maybe_print_hole)
6390 (c_print_type_struct_field_offset): Move to typeprint.c and
6391 rename.
6392 (c_type_print_base_struct_union): Update.
6393
6394 2018-06-25 Pedro Alves <palves@redhat.com>
6395
6396 * gdbthread.h (thread_info_ref, delete_thread)
6397 (delete_thread_silent, first_thread_of_inferior)
6398 (any_thread_of_inferior, switch_to_thread)
6399 (enable_thread_stack_temporaries)
6400 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6401 (get_last_thread_stack_temporary)
6402 (value_in_thread_stack_temporaries, can_access_registers_thread):
6403 Spell out "struct thread_info" instead of just "thread_info".
6404 * inferior.h (notice_new_inferior): Likewise.
6405
6406 2018-06-25 Pedro Alves <palves@redhat.com>
6407
6408 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6409 pass thread_info pointer to delete_thread.
6410 (windows_nat_target::detach): Pass inferior pointer to
6411 detach_inferior.
6412 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6413 delete_thread.
6414 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6415 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6416 and pass a thread_info pointer to delete_thread.
6417 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6418 pass thread_info pointer to delete_thread.
6419 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6420 delete_thread_silent call.
6421 * procfs.c (procfs_target::detach): Pass inferior pointer to
6422 detach_inferior.
6423 (procfs_target::wait): Pass thread_info pointer to delete_thread.
6424 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6425 delete_thread_silent call.
6426 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6427 pass thread_info pointer to delete_thread.
6428 (windows_nat_target::detach): Pass inferior pointer to
6429 delete_inferior.
6430
6431 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6432
6433 * regcache.c (readable_regcache::read_part): Fix asserts.
6434 (reg_buffer::raw_collect_part): New function.
6435 (regcache::write_part): Fix asserts.
6436 (reg_buffer::raw_supply_part): New function.
6437 (regcache::transfer_regset_register): New helper function.
6438 (regcache::transfer_regset): Call new functions.
6439 (regcache_supply_regset): Use gdb_byte*.
6440 (regcache::supply_regset): Likewise.
6441 (regcache_collect_regset): Likewise.
6442 (regcache::collect_regset): Likewise.
6443 * regcache.h (reg_buffer::raw_collect_part): New declaration.
6444 (reg_buffer::raw_supply_part): Likewise.
6445 (regcache::transfer_regset_register): Likewise.
6446 (regcache::transfer_regset): Use gdb_byte*.
6447
6448 2018-06-22 Alan Hayward <alan.hayward@arm.com>
6449
6450 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6451
6452 2018-06-21 Pedro Alves <palves@redhat.com>
6453
6454 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6455 instead of a ptid_t. All callers adjusted.
6456 * ada-tasks.c (ada_get_task_number): Likewise. All callers
6457 adjusted.
6458 (print_ada_task_info, display_current_task_id, task_command_1):
6459 Adjust.
6460 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6461 inferior_thread.
6462 (breakpoint_kind): Adjust.
6463 (remove_breakpoints_pid): Rename to ...
6464 (remove_breakpoints_inf): ... this. Adjust to take an inferior
6465 pointer. All callers adjusted.
6466 (bpstat_clear_actions): Use inferior_thread.
6467 (get_bpstat_thread): New.
6468 (bpstat_do_actions): Use it.
6469 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6470 to take a thread_info pointer. All callers adjusted.
6471 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6472 (breakpoint_re_set_thread): Use inferior_thread.
6473 * breakpoint.h (struct inferior): Forward declare.
6474 (bpstat_stop_status): Update.
6475 (remove_breakpoints_pid): Delete.
6476 (remove_breakpoints_inf): New.
6477 * bsd-uthread.c (bsd_uthread_target::wait)
6478 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6479 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6480 (maint_btrace_packet_history_cmd)
6481 (maint_btrace_clear_packet_history_cmd): Adjust.
6482 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6483 inferior_thread.
6484 * cli/cli-interp.c: Include "inferior.h".
6485 * common/refcounted-object.h (struct
6486 refcounted_object_ref_policy): New.
6487 * compile/compile-object-load.c: Include gdbthread.h.
6488 (store_regs): Use inferior_thread.
6489 * corelow.c (core_target::close): Use current_inferior.
6490 (core_target_open): Adjust to use first_thread_of_inferior and use
6491 the current inferior.
6492 * ctf.c (ctf_target::close): Adjust to use current_inferior.
6493 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6494 <thread>: ... this new field. All references adjusted.
6495 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6496 Take a thread_info pointer instead of a ptid_t.
6497 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6498 (dummy_frame_discard, register_dummy_frame_dtor): Take a
6499 thread_info pointer instead of a ptid_t.
6500 * elfread.c: Include "inferior.h".
6501 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6502 Use inferior_thread.
6503 * eval.c (evaluate_subexp): Likewise.
6504 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6505 inferior_thread.
6506 * gdb_proc_service.h (struct thread_info): Forward declare.
6507 (struct ps_prochandle) <ptid>: Delete, replaced by ...
6508 <thread>: ... this new field. All references adjusted.
6509 * gdbarch.h, gdbarch.c: Regenerate.
6510 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6511 'thread' parameter. All implementations and callers adjusted.
6512 * gdbthread.h (thread_info) <set_running>: New method.
6513 (delete_thread, delete_thread_silent): Take a thread_info pointer
6514 instead of a ptid.
6515 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6516 (first_thread_of_process): Delete, replaced by ...
6517 (first_thread_of_inferior): ... this new function. All callers
6518 adjusted.
6519 (any_live_thread_of_process): Delete, replaced by ...
6520 (any_live_thread_of_inferior): ... this new function. All callers
6521 adjusted.
6522 (switch_to_thread, switch_to_no_thread): Declare.
6523 (is_executing): Delete.
6524 (enable_thread_stack_temporaries): Update comment.
6525 <enable_thread_stack_temporaries>: Take a thread_info pointer
6526 instead of a ptid_t. Incref the thread.
6527 <~enable_thread_stack_temporaries>: Decref the thread.
6528 <m_ptid>: Delete
6529 <m_thr>: New.
6530 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6531 (get_last_thread_stack_temporary)
6532 (value_in_thread_stack_temporaries, can_access_registers_thread):
6533 Take a thread_info pointer instead of a ptid_t. All callers
6534 adjusted.
6535 * infcall.c (get_call_return_value): Use inferior_thread.
6536 (run_inferior_call): Work with thread pointers instead of ptid_t.
6537 (call_function_by_hand_dummy): Work with thread pointers instead
6538 of ptid_t. Use thread_info_ref.
6539 * infcmd.c (proceed_thread_callback): Access thread's state
6540 directly.
6541 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6542 access thread's state directly.
6543 (continue_command): Use inferior_thread.
6544 (info_program_command): Use find_thread_ptid and access thread
6545 state directly.
6546 (proceed_after_attach_callback): Use thread state directly.
6547 (notice_new_inferior): Take a thread_info pointer instead of a
6548 ptid_t. All callers adjusted.
6549 (exit_inferior): Take an inferior pointer instead of a pid. All
6550 callers adjusted.
6551 (exit_inferior_silent): New.
6552 (detach_inferior): Delete.
6553 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6554 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6555 (detach_inferior_command, kill_inferior_command): Use
6556 find_inferior_id instead of valid_gdb_inferior_id and
6557 gdb_inferior_id_to_pid.
6558 (inferior_command): Use inferior and thread pointers.
6559 * inferior.h (struct thread_info): Forward declare.
6560 (notice_new_inferior): Take a thread_info pointer instead of a
6561 ptid_t. All callers adjusted.
6562 (detach_inferior): Delete declaration.
6563 (exit_inferior, exit_inferior_silent): Take an inferior pointer
6564 instead of a pid. All callers adjusted.
6565 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6566 (valid_gdb_inferior_id): Delete.
6567 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6568 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6569 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6570 ...
6571 <inf>: ... this new field.
6572 <step_ptid>: Delete, replaced by ...
6573 <step_thread>: ... this new field.
6574 (get_displaced_stepping_state): Take an inferior pointer instead
6575 of a pid. All callers adjusted.
6576 (displaced_step_in_progress_any_inferior): Adjust.
6577 (displaced_step_in_progress_thread): Take a thread pointer instead
6578 of a ptid_t. All callers adjusted.
6579 (displaced_step_in_progress, add_displaced_stepping_state): Take
6580 an inferior pointer instead of a pid. All callers adjusted.
6581 (get_displaced_step_closure_by_addr): Adjust.
6582 (remove_displaced_stepping_state): Take an inferior pointer
6583 instead of a pid. All callers adjusted.
6584 (displaced_step_prepare_throw, displaced_step_prepare)
6585 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6586 All callers adjusted.
6587 (start_step_over): Adjust.
6588 (infrun_thread_ptid_changed): Remove bit updating ptids in the
6589 displaced step queue.
6590 (do_target_resume): Adjust.
6591 (fetch_inferior_event): Use inferior_thread.
6592 (context_switch, get_inferior_stop_soon): Take an
6593 execution_control_state pointer instead of a ptid_t. All callers
6594 adjusted.
6595 (switch_to_thread_cleanup): Delete.
6596 (stop_all_threads): Use scoped_restore_current_thread.
6597 * inline-frame.c: Include "gdbthread.h".
6598 (inline_state) <inline_state>: Take a thread pointer instead of a
6599 ptid_t. All callers adjusted.
6600 <ptid>: Delete, replaced by ...
6601 <thread>: ... this new field.
6602 (find_inline_frame_state): Take a thread pointer instead of a
6603 ptid_t. All callers adjusted.
6604 (skip_inline_frames, step_into_inline_frame)
6605 (inline_skipped_frames, inline_skipped_symbol): Take a thread
6606 pointer instead of a ptid_t. All callers adjusted.
6607 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6608 (inline_skipped_frames, inline_skipped_symbol): Likewise.
6609 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6610 pointers directly.
6611 * linux-nat.c (get_detach_signal): Likewise.
6612 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6613 (thread_db_notice_clone): Adjust.
6614 (thread_db_find_new_threads_silently)
6615 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6616 a thread pointer instead of a ptid_t. All callers adjusted.
6617 * mi/mi-cmd-var.c: Include "inferior.h".
6618 (mi_cmd_var_update_iter): Update to use thread pointers.
6619 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6620 inferior directly.
6621 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6622 out to ...
6623 (mi_output_running): ... this new function.
6624 (mi_on_resume_1): Adjust to use it.
6625 (mi_user_selected_context_changed): Adjust to use inferior_thread.
6626 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6627 directly.
6628 (interrupt_thread_callback): : Adjust to use thread and inferior
6629 pointers.
6630 * proc-service.c: Include "gdbthread.h".
6631 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6632 * progspace-and-thread.c: Include "inferior.h".
6633 * progspace.c: Include "inferior.h".
6634 * python/py-exitedevent.c (create_exited_event_object): Adjust to
6635 hold a reference to an inferior_object.
6636 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6637 inferior_thread.
6638 * python/py-inferior.c (struct inferior_object): Give the type a
6639 tag name instead of a typedef.
6640 (python_on_normal_stop): No need to check if the current thread is
6641 listed.
6642 (inferior_to_inferior_object): Change return type to
6643 inferior_object. All callers adjusted.
6644 (find_thread_object): Delete, bits factored out to ...
6645 (thread_to_thread_object): ... this new function.
6646 * python/py-infthread.c (create_thread_object): Use
6647 inferior_to_inferior_object.
6648 (thpy_is_stopped): Use thread pointer directly.
6649 (gdbpy_selected_thread): Use inferior_thread.
6650 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6651 field, replaced with ...
6652 <thread>: ... this new field. All users adjusted.
6653 (btpy_insn_or_gap_new): Drop const.
6654 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
6655 callers adjusted.
6656 * python/py-record.c: Include "gdbthread.h".
6657 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6658 a ptid_t. All callers adjusted.
6659 (gdbpy_current_recording): Use inferior_thread.
6660 * python/py-record.h (recpy_record_object) <ptid>: Delete
6661 field, replaced with ...
6662 <thread>: ... this new field. All users adjusted.
6663 (recpy_element_object) <ptid>: Delete
6664 field, replaced with ...
6665 <thread>: ... this new field. All users adjusted.
6666 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6667 a ptid_t. All callers adjusted.
6668 * python/py-threadevent.c: Include "gdbthread.h".
6669 (get_event_thread): Use thread_to_thread_object.
6670 * python/python-internal.h (struct inferior_object): Forward
6671 declare.
6672 (find_thread_object, find_inferior_object): Delete declarations.
6673 (thread_to_thread_object, inferior_to_inferior_object): New
6674 declarations.
6675 * record-btrace.c: Include "inferior.h".
6676 (require_btrace_thread): Use inferior_thread.
6677 (record_btrace_frame_sniffer)
6678 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6679 (get_thread_current_frame): Use scoped_restore_current_thread and
6680 switch_to_thread.
6681 (get_thread_current_frame): Use thread pointer directly.
6682 (record_btrace_replay_at_breakpoint): Use thread's inferior
6683 pointer directly.
6684 * record-full.c: Include "inferior.h".
6685 * regcache.c: Include "gdbthread.h".
6686 (get_thread_arch_regcache): Use the inferior's address space
6687 directly.
6688 (get_thread_regcache, registers_changed_thread): New.
6689 * regcache.h (get_thread_regcache(thread_info *thread)): New
6690 overload.
6691 (registers_changed_thread): New.
6692 (remote_target) <remote_detach_1>: Swap order of parameters.
6693 (remote_add_thread): <remote_add_thread>: Return the new thread.
6694 (get_remote_thread_info(ptid_t)): New overload.
6695 (remote_target::remote_notice_new_inferior): Use thread pointers
6696 directly.
6697 (remote_target::process_initial_stop_replies): Use
6698 thread_info::set_running.
6699 (remote_target::remote_detach_1, remote_target::detach)
6700 (extended_remote_target::detach): Adjust.
6701 * stack.c (frame_show_address): Use inferior_thread.
6702 * target-debug.h (target_debug_print_thread_info_pp): New.
6703 * target-delegates.c: Regenerate.
6704 * target.c (default_thread_address_space): Delete.
6705 (memory_xfer_partial_1): Use current_inferior.
6706 (target_detach): Use current_inferior.
6707 (target_thread_address_space): Delete.
6708 (generic_mourn_inferior): Use current_inferior.
6709 * target.h (struct target_ops) <thread_address_space>: Delete.
6710 (target_thread_address_space): Delete.
6711 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
6712 pointers directly.
6713 (delete_thread_1, delete_thread, delete_thread_silent): Take a
6714 thread pointer instead of a ptid_t. Adjust all callers.
6715 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6716 (first_thread_of_process): Delete, replaced by ...
6717 (first_thread_of_inferior): ... this new function. All callers
6718 adjusted.
6719 (any_thread_of_process): Rename to ...
6720 (any_thread_of_inferior): ... this, and take an inferior pointer.
6721 (any_live_thread_of_process): Rename to ...
6722 (any_live_thread_of_inferior): ... this, and take an inferior
6723 pointer.
6724 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6725 (value_in_thread_stack_temporaries)
6726 (get_last_thread_stack_temporary): Take a thread pointer instead
6727 of a ptid_t. Adjust all callers.
6728 (thread_info::set_running): New.
6729 (validate_registers_access): Use inferior_thread.
6730 (can_access_registers_ptid): Rename to ...
6731 (can_access_registers_thread): ... this, and take a thread
6732 pointer.
6733 (print_thread_info_1): Adjust to compare thread pointers instead
6734 of ptids.
6735 (switch_to_no_thread, switch_to_thread): Make extern.
6736 (scoped_restore_current_thread::~scoped_restore_current_thread):
6737 Use m_thread pointer directly.
6738 (scoped_restore_current_thread::scoped_restore_current_thread):
6739 Use inferior_thread.
6740 (thread_command): Use thread pointer directly.
6741 (thread_num_make_value_helper): Use inferior_thread.
6742 * top.c (execute_command): Use inferior_thread.
6743 * tui/tui-interp.c: Include "inferior.h".
6744 * varobj.c (varobj_create): Use inferior_thread.
6745 (value_of_root_1): Use find_thread_global_id instead of
6746 global_thread_id_to_ptid.
6747
6748 2018-06-21 Alan Hayward <alan.hayward@arm.com>
6749
6750 * regcache.c (readable_regcache::read_part): Avoid memcpy when
6751 possible.
6752 (regcache::write_part): Likewise.
6753 (readable_regcache::cooked_read_part): Update comment.
6754 (readable_regcache::cooked_write_part): Likewise.
6755 * regcache.h: (readable_regcache::read_part): Likewise.
6756 (regcache::write_part): Likewise.
6757
6758 2018-06-21 Richard Bunt <richard.bunt@arm.com>
6759 Dirk Schubert <dirk.schubert@arm.com>
6760
6761 * aarch64-linux-nat.c (post_attach): New.
6762 (aarch64_linux_nat_target::post_attach): Override post_attach to
6763 record the number of hardware debug registers.
6764
6765 2018-06-20 Tom Tromey <tom@tromey.com>
6766
6767 * python/py-param.c (add_setshow_generic): Make parameters const.
6768 (parmpy_init): Update.
6769
6770 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6771
6772 * regcache.h (regcache_cooked_read_ftype): Rename to...
6773 (register_read_ftype): ...this, change type to function_view.
6774 (class reg_buffer) <save>: Remove src parameter.
6775 (readonly_detached_regcache) <readonly_detached_regcache>: Make
6776 parameter non-const in first overload. Remove src parameter in
6777 second overload.
6778 * regcache.c (do_cooked_read): Remove.
6779 (readonly_detached_regcache::readonly_detached_regcache): Make
6780 parameter non-const, adjust call to other constructor.
6781 (reg_buffer::save): Remove src parameter.
6782 * frame.c (do_frame_register_read): Remove.
6783 (frame_save_as_regcache): Use lambda function.
6784 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6785 parameter to ppu2spu_data *.
6786 (ppu2spu_sniffer): Use lambda function.
6787
6788 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
6789
6790 * record-full.c (record_full_target::insert_breakpoint): Remove
6791 "struct" keyword, add const.
6792
6793 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
6794
6795 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6796 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6797 * configure.ac: Remove AC_PREREQ, add missing quoting.
6798 * gnulib/configure.ac: Modernize usage of
6799 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
6800 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6801 (AUTOMAKE_VERSION): Bump to 1.15.1.
6802 * configure: Re-generate.
6803 * config.in: Re-generate.
6804 * aclocal.m4: Re-generate.
6805 * gnulib/aclocal.m4: Re-generate.
6806 * gnulib/config.in: Re-generate.
6807 * gnulib/configure: Re-generate.
6808 * gnulib/import/Makefile.in: Re-generate.
6809
6810 2018-06-19 Pedro Alves <palves@redhat.com>
6811
6812 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6813 (lookup_minimal_symbol_by_pc_section): ... here with
6814 gdb_assert_not_reached added.
6815
6816 2018-06-19 Pedro Alves <palves@redhat.com>
6817
6818 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6819 parameter with a block parameter. Compare location's block symbol
6820 with the frame's block instead of addresses.
6821 (skip_inline_frames): Pass the current block instead of the
6822 frame's address. Break out as soon as we determine the frame
6823 should not be skipped.
6824
6825 2018-06-18 Tom Tromey <tom@tromey.com>
6826
6827 * solib-aix.c (solib_aix_get_section_offsets): Return
6828 unique_xmalloc_ptr.
6829 (solib_aix_solib_create_inferior_hook): Update.
6830
6831 2018-06-18 Tom Tromey <tom@tromey.com>
6832
6833 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6834
6835 2018-06-18 Tom Tromey <tom@tromey.com>
6836
6837 * solib-frv.c (frv_relocate_main_executable): Use
6838 unique_xmalloc_ptr.
6839 * solib-dsbt.c (dsbt_relocate_main_executable): Use
6840 unique_xmalloc_ptr.
6841
6842 2018-06-18 Tom Tromey <tom@tromey.com>
6843
6844 * objfiles.h (inhibit_section_map_updates): Update.
6845 (resume_section_map_updates, resume_section_map_updates_cleanup):
6846 Remove.
6847 * solib-svr4.c (svr4_handle_solib_event): Update.
6848 * objfiles.c (inhibit_section_map_updates): Return
6849 scoped_restore_tmpl<int>.
6850 (resume_section_map_updates, resume_section_map_updates_cleanup):
6851 Remove.
6852
6853 2018-06-18 Tom Tromey <tom@tromey.com>
6854
6855 * valprint.h (read_string): Update.
6856 * valprint.c (read_string): Change type of "buffer".
6857 (val_print_string): Update.
6858 * python/py-value.c (valpy_string): Update.
6859 * language.h (struct language_defn) <la_get_string>: Change
6860 type of "buffer".
6861 (default_get_string, c_get_string): Update.
6862 * language.c (default_get_string): Change type of "buffer".
6863 * guile/scm-value.c (gdbscm_value_to_string): Update.
6864 * c-lang.c (c_get_string): Change type of "buffer".
6865
6866 2018-06-18 Tom Tromey <tom@tromey.com>
6867
6868 * ser-mingw.c (struct pipe_state_destroyer): New.
6869 (pipe_state_up): New typedef.
6870 (cleanup_pipe_state): Remove.
6871 (pipe_windows_open): Use pipe_state_up. Don't release argv.
6872
6873 2018-06-18 Tom Tromey <tom@tromey.com>
6874
6875 * rust-lang.h (rust_yyerror): Don't declare.
6876 * rust-lang.c (rust_language_defn): Update.
6877 * rust-exp.y (yyerror): Now static.
6878 * parse.c (parse_exp_in_context_1): Update.
6879 * p-lang.h (p_yyerror): Don't declare.
6880 * p-lang.c (p_language_defn): Update.
6881 * p-exp.y (yyerror): Now static.
6882 * opencl-lang.c (opencl_language_defn): Update.
6883 * objc-lang.c (objc_language_defn): Update.
6884 * m2-lang.h (m2_yyerror): Don't declare.
6885 * m2-lang.c (m2_language_defn): Update.
6886 * m2-exp.y (yyerror): Now static.
6887 * language.h (struct language_defn) <la_error>: Remove.
6888 * language.c (unk_lang_error): Remove.
6889 (unknown_language_defn, auto_language_defn): Remove.
6890 * go-lang.h (go_yyerror): Don't declare.
6891 * go-lang.c (go_language_defn): Update.
6892 * go-exp.y (yyerror): Now static.
6893 * f-lang.h (f_yyerror): Don't declare.
6894 * f-lang.c (f_language_defn): Update.
6895 * f-exp.y (yyerror): Now static.
6896 * d-lang.h (d_yyerror): Don't declare.
6897 * d-lang.c (d_language_defn): Update.
6898 * d-exp.y (yyerror): Now static.
6899 * c-lang.h (c_yyerror): Don't declare.
6900 * c-lang.c (c_language_defn, cplus_language_defn)
6901 (asm_language_defn, minimal_language_defn): Update.
6902 * c-exp.y (yyerror): Now static.
6903 * ada-lang.h (ada_yyerror): Don't declare.
6904 * ada-lang.c (ada_language_defn): Update.
6905 * ada-exp.y (yyerror): Now static.
6906
6907 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6908
6909 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6910 (store_sveregs_to_thread): Likewise.
6911 (aarch64_linux_fetch_inferior_registers): Check for SVE.
6912 (aarch64_linux_store_inferior_registers): Likewise.
6913 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6914 function.
6915 (aarch64_sve_regs_copy_to_regcache): Likewise.
6916 (aarch64_sve_regs_copy_from_regcache): Likewise.
6917 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6918 declaration.
6919 (aarch64_sve_regs_copy_to_regcache): Likewise.
6920 (aarch64_sve_regs_copy_from_regcache): Likewise.
6921 (sve_context): Structure from Linux headers.
6922 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6923 (SVE_SIG_ZREG_SIZE): Likewise.
6924 (SVE_SIG_PREG_SIZE): Likewise.
6925 (SVE_SIG_FFR_SIZE): Likewise.
6926 (SVE_SIG_REGS_OFFSET): Likewise.
6927 (SVE_SIG_ZREGS_OFFSET): Likewise.
6928 (SVE_SIG_ZREG_OFFSET): Likewise.
6929 (SVE_SIG_ZREGS_SIZE): Likewise.
6930 (SVE_SIG_PREGS_OFFSET): Likewise.
6931 (SVE_SIG_PREG_OFFSET): Likewise.
6932 (SVE_SIG_PREGS_SIZE): Likewise.
6933 (SVE_SIG_FFR_OFFSET): Likewise.
6934 (SVE_SIG_REGS_SIZE): Likewise.
6935 (SVE_SIG_CONTEXT_SIZE): Likewise.
6936 (SVE_PT_REGS_MASK): Likewise.
6937 (SVE_PT_REGS_FPSIMD): Likewise.
6938 (SVE_PT_REGS_SVE): Likewise.
6939 (SVE_PT_VL_INHERIT): Likewise.
6940 (SVE_PT_VL_ONEXEC): Likewise.
6941 (SVE_PT_REGS_OFFSET): Likewise.
6942 (SVE_PT_FPSIMD_OFFSET): Likewise.
6943 (SVE_PT_FPSIMD_SIZE): Likewise.
6944 (SVE_PT_SVE_ZREG_SIZE): Likewise.
6945 (SVE_PT_SVE_PREG_SIZE): Likewise.
6946 (SVE_PT_SVE_FFR_SIZE): Likewise.
6947 (SVE_PT_SVE_FPSR_SIZE): Likewise.
6948 (SVE_PT_SVE_FPCR_SIZE): Likewise.
6949 (__SVE_SIG_TO_PT): Likewise.
6950 (SVE_PT_SVE_OFFSET): Likewise.
6951 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6952 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6953 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6954 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6955 (SVE_PT_SVE_PREG_OFFSET): Likewise.
6956 (SVE_PT_SVE_PREGS_SIZE): Likewise.
6957 (SVE_PT_SVE_FFR_OFFSET): Likewise.
6958 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6959 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6960 (SVE_PT_SVE_SIZE): Likewise.
6961 (SVE_PT_SIZE): Likewise.
6962 (HAS_SVE_STATE): New define.
6963
6964 2018-06-18 Alan Hayward <alan.hayward@arm.com>
6965
6966 * nat/aarch64-sve-linux-sigcontext.h: New file.
6967 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6968 new files.
6969 (SVE_VQ_MIN): Likewise.
6970 (SVE_VQ_MAX): Likewise.
6971 (SVE_VL_MIN): Likewise.
6972 (SVE_VL_MAX): Likewise.
6973 (SVE_NUM_ZREGS): Likewise.
6974 (SVE_NUM_PREGS): Likewise.
6975 (sve_vl_valid): Likewise.
6976 (struct user_sve_header): Likewise.
6977
6978 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
6979 Richard Bunt <Richard.Bunt@arm.com>
6980
6981 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6982 was requested by GDB.
6983
6984 2018-06-15 Tom de Vries <tdevries@suse.de>
6985
6986 * MAINTAINERS (Write After Approval): Add Tom de Vries.
6987
6988 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
6989
6990 * gnulib/update-gnulib.sh: Print expected versions of
6991 autoconf/aclocal.
6992
6993 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
6994
6995 * arch-utils.c (default_type_align): Use type_length_units.
6996 * gdbtypes.c (type_align): Use type_length_units.
6997
6998 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6999
7000 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7001 of 'define' command.
7002
7003 2018-06-14 Tom de Vries <tdevries@suse.de>
7004
7005 PR cli/22573
7006 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7007 get_no_prettyformat_print_options.
7008
7009 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
7010
7011 * sparc-nat.h: Include target.h.
7012 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7013 <fetch_registers>: Remove this argument in function call.
7014 <store_registers>: Remove this argument in function call, remove
7015 extra semicolon.
7016 <low_forget_process>: Call sparc64_forget_process instead of
7017 sparc_forget_process.
7018
7019 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7020
7021 * procfs.c (_initialize_procfs): Use add_inf_child_target.
7022 (procfs_target::make_corefile_notes): Adjust to new
7023 target_read_alloc return type.
7024
7025 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7026 Stephen Roberts <stephen.roberts@arm.com>
7027
7028 PR gdb/22882
7029 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7030 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7031 Move should_notify_stop local into more inner scope.
7032
7033 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7034 Stephen Roberts <stephen.roberts@arm.com>
7035
7036 PR gdb/22882
7037 * infrun.c (resume_1): Add call to mark_async_event_handler.
7038
7039 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
7040
7041 * infrun.c (do_target_wait): Change old version of $pc printed.
7042
7043 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
7044
7045 * dwarf2read.c (read_index_from_section): Rename to...
7046 (read_gdb_index_from_section): ... this, update all callers.
7047 (dwarf2_read_index): Rename to...
7048 (dwarf2_read_gdb_index): ... this, update all callers.
7049
7050 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
7051
7052 * gdb/hppa-linux-nat.c
7053 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7054 hppa_linux_nat_target::fetch_registers.
7055
7056 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7057
7058 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7059 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7060 (AARCH64_DWARF_SVE_FFR): Likewise.
7061 (AARCH64_DWARF_SVE_P0): Likewise.
7062 (AARCH64_DWARF_SVE_Z0): Likewise.
7063
7064 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7065
7066 * common/common-regcache.h (raw_compare): New function.
7067 * regcache.c (regcache::raw_compare): Likewise.
7068 * regcache.h (regcache::raw_compare): New declaration.
7069
7070 2018-06-11 Alan Hayward <alan.hayward@arm.com>
7071
7072 * common/common-regcache.h (reg_buffer_common): New structure.
7073 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7074 (reg_buffer::raw_supply): Likewise.
7075 (reg_buffer::raw_supply_integer): Likewise.
7076 (reg_buffer::raw_supply_zeroed): Likewise.
7077 (reg_buffer::raw_collect): Likewise.
7078 (reg_buffer::raw_collect_integer): Likewise.
7079 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7080 (reg_buffer::raw_supply): Likewise.
7081 (reg_buffer::raw_supply_integer): Likewise.
7082 (reg_buffer::raw_supply_zeroed): Likewise.
7083 (reg_buffer::raw_collect): Likewise.
7084 (reg_buffer::raw_collect_integer): Likewise.
7085
7086 2018-06-10 Tom Tromey <tom@tromey.com>
7087
7088 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
7089 (class remote_state) <stop_reply_queue>: Now std::vector.
7090 (remote_state::~remote_state)
7091 (remote_target::stop_reply_queue_length): Update.
7092 (struct queue_iter_param, remove_child_of_pending_fork)
7093 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7094 (check_pending_event_prevents_wildcard_vcont_callback)
7095 (remove_stop_reply_for_inferior)
7096 (remove_stop_reply_of_remote_state)
7097 (remote_notif_remove_once_on_match)
7098 (stop_reply_match_ptid_and_ws)
7099 (remote_kill_child_of_pending_fork): Remove.
7100 (remote_target::remove_new_fork_children)
7101 (remote_target::check_pending_events_prevent_wildcard_vcont)
7102 (remote_target::discard_pending_stop_replies)
7103 (remote_target::discard_pending_stop_replies_in_queue)
7104 (remote_target::remote_notif_remove_queued_reply)
7105 (remote_target::queued_stop_reply)
7106 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7107 (remote_target::wait, remote_target::kill_new_fork_children)
7108 (remote_target::async): Update.
7109
7110 2018-06-10 Tom Tromey <tom@tromey.com>
7111
7112 * record-full.c (record_full_arch_list_cleanups): Remove.
7113 (record_full_message): Use try/catch.
7114 (record_full_wait_cleanups): Remove.
7115 (record_full_wait_1): Use try/catch.
7116 (record_full_restore): Likewise.
7117
7118 2018-06-10 Tom Tromey <tom@tromey.com>
7119
7120 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
7121 declare VEC. Add constructor.
7122 <in_target_beneath>: Now bool.
7123 (record_full_breakpoints): Now a std::vector, static.
7124 (record_full_sync_record_breakpoints)
7125 (record_full_init_record_breakpoints)
7126 (record_full_target::insert_breakpoint)
7127 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
7128
7129 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7130
7131 * dwarf2read.c (process_cu_includes): Remove struct keyword.
7132 * serial.c (serial_interface_lookup): Remove struct keyword.
7133
7134 2018-06-10 Tom Tromey <tom@tromey.com>
7135
7136 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7137 method.
7138 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7139 a method.
7140 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7141 method.
7142 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7143 "beneath" as a method.
7144 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7145 Use "beneath" as a method.
7146
7147 2018-06-10 Tom Tromey <tom@tromey.com>
7148
7149 * tracefile.c (struct trace_file_writer_deleter): New.
7150 <operator()>: Rename from trace_file_writer_xfree.
7151 (trace_file_writer_up): New typedef.
7152 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7153
7154 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
7155
7156 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7157 <m_registers, m_register_status>: Change type to
7158 std::unique_ptr.
7159 * regcache.c (reg_buffer::reg_buffer): Use new instead of
7160 XCNEWVEC.
7161
7162 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
7163
7164 * common/common-regcache.h (enum register_status): Add
7165 underlying type "signed char".
7166 * regcache.h (reg_buffer) <m_register_status>: Change type to
7167 register_status *.
7168 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7169 register_status instead of signed char.
7170 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7171 (reg_buffer::get_register_status): Remove cast.
7172 (readable_regcache::raw_read): Remove cast.
7173 (readable_regcache::cooked_read): Remove cast.
7174
7175 2018-06-09 Tom Tromey <tom@tromey.com>
7176
7177 * source.c (reverse_search_command, forward_search_command): Use
7178 scoped_fd.
7179
7180 2018-06-09 Tom Tromey <tom@tromey.com>
7181
7182 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
7183 (serial_ops_list): Now static, std::vector.
7184 (serial_interface_lookup, serial_add_interface): Update.
7185
7186 2018-06-09 Tom Tromey <tom@tromey.com>
7187
7188 * dwarf2read.c (process_cu_includes): Update.
7189 (process_full_comp_unit): Update.
7190 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7191 std::vector.
7192
7193 2018-06-08 Paul Koning <paul_koning@dell.com>
7194
7195 PR gdb/23252
7196
7197 * python/python.c (do_start_initialization):
7198 Avoid call to internal Python API.
7199 (init__gdb_module): New function.
7200
7201 2018-06-08 Gary Benson <gbenson@redhat.com>
7202
7203 * linux-thread-db.c (valprint.h): New include.
7204 (struct check_thread_db_info): New structure.
7205 (check_thread_db_on_load, tdb_testinfo): New static globals.
7206 (check_thread_db, check_thread_db_callback): New functions.
7207 (try_thread_db_load_1): Run integrity checks if requested.
7208 (maintenance_check_libthread_db): New function.
7209 (_initialize_thread_db): Register "maint check libthread-db"
7210 and "maint set/show check-libthread-db".
7211 * NEWS: Mention the above new commands.
7212
7213 2018-06-08 Tom Tromey <tom@tromey.com>
7214
7215 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7216 now a method.
7217
7218 2018-06-08 Tom Tromey <tom@tromey.com>
7219
7220 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7221
7222 2018-06-08 Tom Tromey <tom@tromey.com>
7223
7224 * common/btrace-common.h (struct btrace_data): Add constructor,
7225 destructor, move assignment operator.
7226 <empty, clear, fini>: New methods.
7227 <format>: Initialize.
7228 (btrace_data_init, btrace_data_fini, btrace_data_clear)
7229 (btrace_data_empty): Don't declare.
7230 * common/btrace-common.c (btrace_data_init): Remove.
7231 (btrace_data::fini): Rename from btrace_data_fini.
7232 (btrace_data::empty): Rename from btrace_data_empty.
7233 (btrace_data::clear): Rename from btrace_data_clear. Return
7234 bool.
7235 * btrace.h (make_cleanup_btrace_data): Don't declare.
7236 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7237 (parse_xml_btrace): Update.
7238 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7239 (maint_btrace_clear_packet_history_cmd): Update.
7240
7241 2018-06-07 Pedro Alves <palves@redhat.com>
7242
7243 * target.h (target_ops) <beneath>: Now a method. All references
7244 updated.
7245 (class target_stack): New.
7246 * target.c (g_target_stack): New.
7247 (g_current_top_target): Delete.
7248 (current_top_target): Get the top target out of g_target_stack.
7249 (target_stack::push, target_stack::unpush): New.
7250 (push_target, unpush_target): Reimplement.
7251 (target_is_pushed): Reimplement in terms of g_target_stack.
7252 (target_ops::beneath, target_stack::find_beneath): New.
7253
7254 2018-06-07 Pedro Alves <palves@redhat.com>
7255
7256 * target.h (find_target_beneath): Delete declaration.
7257 * target.c (find_target_beneath): Delete definition.
7258 * aix-thread.c: All callers of find_target_beneath adjusted to
7259 call target_ops::beneath instead.
7260 * bsd-uthread.c: Likewise.
7261 * linux-thread-db.c: Likewise.
7262 * ravenscar-thread.c: Likewise.
7263 * sol-thread.c: Likewise.
7264 * spu-multiarch.c: Likewise.
7265
7266 2018-06-07 Pedro Alves <palves@redhat.com>
7267
7268 * target.h (target_ops) <beneath>: Now a method. All references
7269 updated.
7270 (target_ops) <m_beneath>: New.
7271 * target.c (target_ops::beneath): New.
7272 * corelow.c: Adjust all references to target_ops::beneath.
7273 * linux-thread-db.c: Likewise.
7274 * make-target-delegates: Likewise.
7275 * record-btrace.c: Likewise.
7276 * record-full.c: Likewise.
7277 * remote.c: Likewise.
7278 * target.c: Likewise.
7279 * target-delegates.c: Regenerate.
7280
7281 2018-06-07 Pedro Alves <palves@redhat.com>
7282
7283 * target.h (target_stack): Delete.
7284 (current_top_target): Declare function.
7285 * target.c (target_stack): Delete.
7286 (g_current_top_target): New.
7287 (current_top_target): New function.
7288 * auxv.c: Use current_top_target instead of target_stack
7289 throughout.
7290 * avr-tdep.c: Likewise.
7291 * breakpoint.c: Likewise.
7292 * corefile.c: Likewise.
7293 * elfread.c: Likewise.
7294 * eval.c: Likewise.
7295 * exceptions.c: Likewise.
7296 * frame.c: Likewise.
7297 * gdbarch-selftests.c: Likewise.
7298 * gnu-v3-abi.c: Likewise.
7299 * ia64-tdep.c: Likewise.
7300 * ia64-vms-tdep.c: Likewise.
7301 * infcall.c: Likewise.
7302 * infcmd.c: Likewise.
7303 * infrun.c: Likewise.
7304 * linespec.c: Likewise.
7305 * linux-tdep.c: Likewise.
7306 * minsyms.c: Likewise.
7307 * ppc-linux-nat.c: Likewise.
7308 * ppc-linux-tdep.c: Likewise.
7309 * procfs.c: Likewise.
7310 * regcache.c: Likewise.
7311 * remote.c: Likewise.
7312 * rs6000-tdep.c: Likewise.
7313 * s390-linux-nat.c: Likewise.
7314 * s390-tdep.c: Likewise.
7315 * solib-aix.c: Likewise.
7316 * solib-darwin.c: Likewise.
7317 * solib-dsbt.c: Likewise.
7318 * solib-spu.c: Likewise.
7319 * solib-svr4.c: Likewise.
7320 * solib-target.c: Likewise.
7321 * sparc-tdep.c: Likewise.
7322 * sparc64-tdep.c: Likewise.
7323 * spu-tdep.c: Likewise.
7324 * symfile.c: Likewise.
7325 * symtab.c: Likewise.
7326 * target-descriptions.c: Likewise.
7327 * target-memory.c: Likewise.
7328 * target.c: Likewise.
7329 * target.h: Likewise.
7330 * tracefile-tfile.c: Likewise.
7331 * tracepoint.c: Likewise.
7332 * valops.c: Likewise.
7333 * valprint.c: Likewise.
7334 * value.c: Likewise.
7335 * windows-tdep.c: Likewise.
7336 * mi/mi-main.c: Likewise.
7337
7338 2018-06-07 Tom Tromey <tom@tromey.com>
7339
7340 * valprint.h (build_address_symbolic): Declare.
7341 * printcmd.c (print_address_symbolic): Update.
7342 (build_address_symbolic): Change "name" and "filename" to
7343 std::string.
7344 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7345 Update.
7346 * defs.h (build_address_symbolic): Remove declaration.
7347
7348 2018-06-07 Alan Hayward <alan.hayward@arm.com>
7349
7350 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7351 (aarch64_vnv_type): Add function.
7352 (aarch64_pseudo_register_name): Add V regs for SVE.
7353 (aarch64_pseudo_register_type): Likewise.
7354 (aarch64_pseudo_register_reggroup_p): Likewise.
7355 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7356 (aarch64_pseudo_read_value): Add V regs for SVE.
7357 (aarch64_pseudo_write_2): Use V0 offset for SVE
7358 (aarch64_pseudo_write): Add V regs for SVE.
7359 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7360
7361 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
7362
7363 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7364 (sve_vl_from_vq): Likewise.
7365
7366 2018-06-05 Tom Tromey <tom@tromey.com>
7367
7368 * cli/cli-cmds.c (show_version): Update.
7369 * top.c (print_gdb_version): Add "interactive" parameter.
7370 Update.
7371 * main.c (captured_main_1): Update.
7372 * top.h (print_gdb_version): Add "interactive" parameter and a
7373 comment.
7374
7375 2018-06-05 David Malcolm <dmalcolm@redhat.com>
7376
7377 * common/enum-flags.h: Add trailing semicolon to example in
7378 comment.
7379
7380 2018-06-05 Tom Tromey <tom@tromey.com>
7381
7382 PR cli/12326:
7383 * NEWS: Add entry about pager.
7384 * utils.c (pagination_disabled_for_command): New global.
7385 (prompt_for_continue): Allow "c" response to prompt.
7386 (reinitialize_more_filter): Clear
7387 pagination_disabled_for_command.
7388 (fputs_maybe_filtered): Check pagination_disabled_for_command.
7389
7390 2018-06-04 Tom Tromey <tom@tromey.com>
7391
7392 * ada-lang.h (ada_lookup_symbol_list): Update.
7393 * ada-lang.c (resolve_subexp): Update.
7394 (symbols_are_identical_enums): Change type of syms. Remove nsyms
7395 parameter.
7396 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7397 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7398 results parameter to std::vector.
7399 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7400 Update.
7401 * ada-exp.y (block_lookup): Update.
7402 (select_possible_type_sym): Change type of syms. Remove nsyms
7403 parameter.
7404 (write_var_or_type, write_name_assoc): Update.
7405
7406 2018-06-04 Joel Brobecker <brobecker@adacore.com>
7407
7408 * windows-nat.c (windows_nat_target::xfer_partial): Return
7409 TARGET_XFER_E_IO if we need to delegate to the target beneath
7410 but BENEATH is NULL.
7411
7412 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
7413
7414 * Makefile.in (config.status): Add configure.nat as a
7415 dependency.
7416
7417 2018-06-04 Tom Tromey <tom@tromey.com>
7418
7419 * cp-name-parser.y (cpname_state): Add method declarations.
7420 (HANDLE_QUAL): Update.
7421 (cpname_state::d_grab, cpname_state::fill_comp)
7422 (cpname_state::make_operator, cpname_state::make_dtor)
7423 (cpname_state::make_builtin_type, cpname_state::make_name)
7424 (cpname_state::d_qualify, cpname_state::d_int_type)
7425 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7426 (%union): Move earlier.
7427
7428 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7429
7430 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7431
7432 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7433
7434 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7435 (aarch64_pseudo_write_1): Likewise.
7436 (aarch64_pseudo_read_value): Use helper.
7437 (aarch64_pseudo_write): Likewise.
7438
7439 2018-06-04 Pedro Alves <palves@redhat.com>
7440
7441 * darwin-nat.c (darwin_ops): Delete.
7442 (darwin_attach_pid): Use get_native_target.
7443
7444 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7445
7446 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7447 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7448
7449 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7450
7451 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7452 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7453 (aarch64_gdbarch_init): Check for SVE.
7454 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7455
7456 2018-06-04 Alan Hayward <alan.hayward@arm.com>
7457
7458 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7459 * aarch64-tdep.h (aarch64_read_description): Likewise.
7460 * arch/aarch64.c (aarch64_create_target_description): Likewise.
7461 * arch/aarch64.h (aarch64_create_target_description): Likewise.
7462 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7463 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7464 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7465
7466 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
7467
7468 * value.c (value_fetch_lazy_bitfield): New.
7469 (value_fetch_lazy_memory): New.
7470 (value_fetch_lazy_register): New.
7471 (value_fetch_lazy): Factor out to smaller functions.
7472
7473 2018-06-01 Tom Tromey <tom@tromey.com>
7474
7475 * cp-name-parser.y (backslashable, represented): Now const.
7476
7477 2018-06-01 Tom Tromey <tom@tromey.com>
7478
7479 * cp-name-parser.y: Include parser-defs.h.
7480 (parser_fprintf): Remove declaration.
7481
7482 2018-06-01 Tom Tromey <tom@tromey.com>
7483
7484 * cp-name-parser.y: Use %pure-parser, %lex-param, and
7485 %parse-param.
7486 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7487 (global_result): Remove globals.
7488 (struct cpname_state): New.
7489 (yyparse): Don't declare.
7490 (yylex, yyerror): Move declarations after %union.
7491 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7492 (make_name): Add state parameter.
7493 Update all callers.
7494 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7495 parameter.
7496 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7497 Update.
7498 (yylex): Add lvalp, state parameters.
7499 (yyerror): Add state parameter.
7500 (cp_demangled_name_to_comp): Update.
7501
7502 2018-06-01 Tom Tromey <tom@tromey.com>
7503
7504 * cp-name-parser.y (parser_fprintf): Declare.
7505 (GDB_YY_REMAP_PREFIX): Define.
7506 Include yy-remap.h. Don't redefine yy* identifiers.
7507
7508 2018-06-01 Tom Tromey <tom@tromey.com>
7509
7510 * python/py-type.c (typy_legacy_template_argument): Update.
7511 * cp-support.h (cp_demangled_name_to_comp): Update.
7512 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7513 parameter to be a "std::string *".
7514 (main): Update.
7515
7516 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
7517
7518 * ada-lex.l: Include "diagnostics.h" instead of
7519 "common/diagnostics.h".
7520 * unittests/environ-selftests.c: Likewise.
7521 * common/diagnostics.h: Moved to ../include.
7522
7523 2018-06-01 Joel Brobecker <brobecker@adacore.com>
7524
7525 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7526 to language_mode_manual while calling breakpoint_re_set_one.
7527
7528 2018-06-01 Tom Tromey <tom@tromey.com>
7529
7530 * valops.c (value_cast_structs, destructor_name_p): Update.
7531 * symtab.c (gdb_mangle_name): Update.
7532 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7533 Update.
7534 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7535 (pascal_object_print_value_fields, pascal_object_print_value):
7536 Update.
7537 * p-typeprint.c (pascal_type_print_derivation_info): Update.
7538 * linespec.c (find_methods): Update.
7539 * gdbtypes.h (type_name_no_tag): Remove.
7540 (type_name_or_error): Rename from type_name_no_tag_or_error.
7541 * gdbtypes.c (type_name_no_tag): Remove.
7542 (type_name_or_error): Rename from type_name_no_tag_or_error.
7543 (lookup_struct_elt_type, check_typedef): Update.
7544 * expprint.c (print_subexp_standard): Update.
7545 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7546 * d-namespace.c (d_lookup_nested_symbol): Update.
7547 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7548 (cp_print_class_member): Update.
7549 * cp-namespace.c (cp_lookup_nested_symbol): Update.
7550 * completer.c (add_struct_fields): Update.
7551 * c-typeprint.c (cp_type_print_derivation_info)
7552 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7553 Update.
7554 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7555 (ada_prefer_type, ada_is_exception_sym): Update.
7556
7557 2018-06-01 Tom Tromey <tom@tromey.com>
7558
7559 * valops.c (enum_constant_from_type, value_namespace_elt)
7560 (value_maybe_namespace_elt): Update.
7561 * valarith.c (find_size_for_pointer_math): Update.
7562 * target-descriptions.c (make_gdb_type): Update.
7563 * symmisc.c (print_symbol): Update.
7564 * stabsread.c (define_symbol, read_type)
7565 (complain_about_struct_wipeout, add_undefined_type)
7566 (cleanup_undefined_types_1): Update.
7567 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7568 (rust_range_type_p, val_print_struct, rust_print_struct_def)
7569 (rust_internal_print_type, rust_composite_type)
7570 (rust_evaluate_funcall, rust_evaluate_subexp)
7571 (rust_inclusive_range_type_p): Update.
7572 * python/py-type.c (typy_get_tag): Update.
7573 * p-typeprint.c (pascal_type_print_base): Update.
7574 * mdebugread.c (parse_symbol, parse_type): Update.
7575 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7576 Update.
7577 * guile/scm-type.c (gdbscm_type_tag): Update.
7578 * go-lang.c (sixg_string_p): Update.
7579 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7580 Update.
7581 * gdbtypes.h (struct main_type) <tag_name>: Remove.
7582 (TYPE_TAG_NAME): Remove.
7583 * gdbtypes.c (type_name_no_tag): Simplify.
7584 (check_typedef, check_types_equal, recursive_dump_type)
7585 (copy_type_recursive, arch_composite_type): Update.
7586 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
7587 in summary mode when needed.
7588 * eval.c (evaluate_funcall): Update.
7589 * dwarf2read.c (fixup_go_packaging, read_structure_type)
7590 (process_structure_scope, read_enumeration_type)
7591 (read_namespace_type, read_module_type, determine_prefix): Update.
7592 * cp-support.c (inspect_type): Update.
7593 * coffread.c (process_coff_symbol, decode_base_type): Update.
7594 * c-varobj.c (c_is_path_expr_parent): Update.
7595 * c-typeprint.c (c_type_print_base_struct_union): Update.
7596 (c_type_print_base_1): Update. Print struct/class/union/enum in
7597 summary when using C language.
7598 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7599 (gen_maybe_namespace_elt): Update.
7600 * ada-lang.c (ada_type_name): Simplify.
7601 (empty_record, ada_template_to_fixed_record_type_1)
7602 (template_to_static_fixed_type)
7603 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7604
7605 2018-06-01 Tom Tromey <tom@tromey.com>
7606
7607 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7608 c_print_type.
7609 * c-typeprint.c (c_print_type_1): Add "language" parameter.
7610 (c_print_type): Update.
7611 (c_print_type): New overload.
7612 (c_type_print_varspec_prefix, c_type_print_args)
7613 (c_type_print_varspec_suffix, c_print_type_no_offsets)
7614 (c_type_print_base_struct_union, c_type_print_base_1)
7615 (cp_type_print_method_args): Add "language" parameter.
7616 (c_type_print_base): Update.
7617 * c-lang.h (c_print_type): Add new overload.
7618
7619 2018-06-01 Tom Tromey <tom@tromey.com>
7620
7621 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7622 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7623
7624 2018-06-01 Alan Hayward <alan.hayward@arm.com>
7625
7626 * aarch64-tdep.c (aarch64_sve_register_names): New const
7627 var.
7628 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7629 (AARCH64_SVE_Z_REGS_NUM): New define.
7630 (AARCH64_SVE_P_REGS_NUM): Likewise.
7631 (AARCH64_SVE_NUM_REGS): Likewise.
7632
7633 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
7634
7635 * nat/linux-ptrace.h [__alpha__]
7636 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7637 definitions.
7638
7639 2018-05-31 Maciej W. Rozycki <macro@mips.com>
7640
7641 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7642 the endianness selected.
7643 * NEWS: Document `set endian auto' mode operation update.
7644
7645 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7646
7647 * Makefile.in: Add new header.
7648 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7649 (sve_vl_from_vg): Likewise.
7650 (sve_vq_from_vl): Likewise.
7651 (sve_vl_from_vq): Likewise.
7652 (sve_vq_from_vg): Likewise.
7653 (sve_vg_from_vq): Likewise.
7654 * configure.nat: Add new c file.
7655 * nat/aarch64-sve-linux-ptrace.c: New file.
7656 * nat/aarch64-sve-linux-ptrace.h: New file.
7657
7658 2018-05-31 Alan Hayward <alan.hayward@arm.com>
7659
7660 * aarch64-linux-nat.c (aarch64_linux_read_description):
7661 Add parmeter zero.
7662 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7663 Likewise.
7664 * aarch64-tdep.c (tdesc_aarch64_list): Add.
7665 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7666 (aarch64_gdbarch_init): Add parmeter zero.
7667 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7668 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7669 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7670 parmeter.
7671 * doc/gdb.texinfo: Describe SVE feature
7672 * features/aarch64-sve.c: New file.
7673
7674 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
7675
7676 PR gdb/23210
7677 * gdbarch.sh (significant_addr_bit): Default to zero when
7678 not set by target architecture.
7679 * gdbarch.c: Re-generated.
7680 * utils.c (address_significant): Update.
7681
7682 2018-05-30 Joel Brobecker <brobecker@adacore.com>
7683
7684 * stack.c (func_command): Remove trailing newline in call to error.
7685
7686 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7687
7688 * regcache.h (regcache_raw_collect): Remove, update callers to
7689 use regcache::raw_collect.
7690 * regcache.c (regcache_raw_collect): Remove.
7691
7692 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7693
7694 * regcache.h (regcache_raw_supply): Remove, update callers to
7695 use detached_regcache::raw_supply.
7696 * regcache.c (regcache_raw_supply): Remove.
7697
7698 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7699
7700 * regcache.h (regcache_cooked_write_part): Remove, update
7701 callers to use regcache::cooked_write_part.
7702 * regcache.c (regcache_cooked_write_part): Remove.
7703
7704 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7705
7706 * regcache.h (regcache_cooked_read_part): Remove, update callers
7707 to use readable_regcache::cooked_read_part.
7708 * regcache.c (regcache_cooked_read_part): Remove.
7709
7710 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7711
7712 * regcache.h (regcache_cooked_read_value): Remove, update
7713 callers to use readable_regcache::cooked_read_value.
7714 * regcache.c (regcache_cooked_read_value): Remove.
7715
7716 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7717
7718 * regcache.h (regcache_cooked_write): Remove, update callers to
7719 use regcache::cooked_write.
7720 * regcache.c (regcache_cooked_write): Remove.
7721
7722 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7723
7724 * regcache.h (regcache_invalidate): Remove, update callers to
7725 use detached_regcache::invalidate instead.
7726 * regcache.c (regcache_invalidate): Remove.
7727
7728 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7729
7730 * regcache.h (regcache_raw_write_part): Remove, update callers
7731 to use regcache::raw_write_part instead.
7732 * regcache.c (regcache_raw_write_part): Remove.
7733
7734 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7735
7736 * regcache.h (regcache_raw_read_part): Remove, update callers to
7737 use readable_regcache::raw_read_part instead.
7738 * regcache.c (regcache_raw_read_part): Remove.
7739
7740 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7741
7742 * regcache.h (regcache_cooked_read): Remove, update callers to
7743 use readable_regcache::cooked_read instead.
7744 * regcache.c (regcache_cooked_read): Remove.
7745
7746 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7747
7748 * regcache.h (regcache_raw_write): Remove, update callers to use
7749 regcache::raw_write instead.
7750 * regcache.c (regcache_raw_write): Remove.
7751
7752 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7753
7754 * regcache.h (regcache_raw_read): Remove, update callers to use
7755 readable_regcache::raw_read instead.
7756 * regcache.c (regcache_raw_read): Remove.
7757
7758 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7759
7760 * regcache.h (regcache_raw_update): Remove, update callers to
7761 use readable_regcache::raw_update instead.
7762 * regcache.c (regcache_raw_update): Remove.
7763
7764 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7765
7766 * regcache.h (regcache_register_status): Remove, update callers
7767 to use reg_buffer::get_register_status directly instead.
7768 * regcache.c (regcache_register_status): Remove.
7769
7770 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7771
7772 * regcache.h (regcache_get_ptid): Remove, update all callers to
7773 call regcache::ptid instead.
7774 * regcache.c (regcache_get_ptid): Remove.
7775
7776 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
7777
7778 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7779
7780 2018-05-30 Pedro Alves <palves@redhat.com>
7781
7782 * common/common-exceptions.h (exception_rethrow): Use
7783 ATTRIBUTE_NORETURN.
7784
7785 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
7786
7787 * breakpoint.c (print_solib_event, check_status_catch_solib):
7788 Remove struct keyword in range-based for loops.
7789 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7790 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7791 Likewise.
7792 * linespec.c (find_superclass_methods, search_minsyms_for_name):
7793 Likewise.
7794 * symfile.c (addr_info_make_relative): Likewise.
7795 * thread.c (value_in_thread_stack_temporaries): Likewise.
7796
7797 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
7798
7799 PR gdb/16841
7800 * valops.c (value_struct_elt_for_reference): Call check_typedef on
7801 aggregate type to get its real type before accessing it.
7802
7803 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
7804
7805 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7806 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7807 * coff-pe-read.c (add_pe_forwarded_sym): Replace
7808 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7809 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7810 * jit.c (jit_breakpoint_re_set_internal): Likewise.
7811 * printcmd.c (info_address_command): Likewise.
7812
7813 2018-05-29 Tom Tromey <tom@tromey.com>
7814
7815 * windows-nat.c (handle_exception): Update fall-through comment.
7816
7817 2018-05-29 Tom Tromey <tom@tromey.com>
7818
7819 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
7820 (struct program_space) <added_solibs>: Now a std::vector.
7821 * breakpoint.c (print_solib_event): Update.
7822 (check_status_catch_solib): Update.
7823 * progspace.c (clear_program_space_solib_cache): Update.
7824 * solib.c (update_solib_list): Update.
7825
7826 2018-05-29 Tom Tromey <tom@tromey.com>
7827
7828 * python/py-type.c (typy_richcompare): Update.
7829 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7830 * gdbtypes.h (types_deeply_equal): Return bool.
7831 (types_equal): Likewise.
7832 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
7833 declare VEC.
7834 (check_types_equal): Change worklist to std::vector. Return
7835 bool.
7836 (struct type_equality_entry): Add constructor.
7837 (compare_maybe_null_strings): Return bool.
7838 (check_types_worklist): Return bool. Change worklist to
7839 std::vector.
7840 (types_deeply_equal): Use std::vector.
7841 (types_equal): Return bool.
7842 (compare_maybe_null_strings): Simplify.
7843
7844 2018-05-29 Tom Tromey <tom@tromey.com>
7845
7846 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
7847
7848 2018-05-29 Tom Tromey <tom@tromey.com>
7849
7850 * objc-lang.h: Don't include cp-support.h.
7851 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
7852 declare VEC.
7853
7854 2018-05-27 Tom Tromey <tom@tromey.com>
7855
7856 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7857
7858 2018-05-25 Tom Tromey <tom@tromey.com>
7859
7860 * value.c (value::location): Initialize.
7861
7862 2018-05-25 Tom Tromey <tom@tromey.com>
7863
7864 * dbxread.c (init_bincl_list): Remove.
7865 (bincl_list): Now a std::vector.
7866 (bincls_allocated, next_bincl): Remove.
7867 (free_bincl_list, do_free_bincl_list_cleanup)
7868 (make_cleanup_free_bincl_list): Remove.
7869 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7870 unique_xmalloc_ptr.
7871 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7872 (struct header_file_location): Add constructor.
7873 (add_bincl_to_list): Remove.
7874
7875 2018-05-25 Tom Tromey <tom@tromey.com>
7876
7877 * tui/tui.c (tui_enable): Update.
7878 * mi/mi-interp.c (mi_interp::init): Update.
7879 * interps.h (class interp) <name>: New method.
7880 <m_name>: Rename from name.
7881 (~scoped_restore_interp): Update.
7882 * interps.c (interp::interp): Update.
7883 (interp_add, interp_set, interp_lookup_existing)
7884 (current_interp_named_p): Update.
7885
7886 2018-05-25 Tom Tromey <tom@tromey.com>
7887
7888 * interps.c (interp_name): Remove.
7889 * mi/mi-interp.c (mi_interp::init): Update.
7890 * interps.h (interp_name): Remove.
7891 (~scoped_restore_interp): Update.
7892 * tui/tui.c (tui_enable): Update.
7893
7894 2018-05-25 Tom Tromey <tom@tromey.com>
7895
7896 * utils.c (fputs_maybe_filtered): Update.
7897 * linespec.c (decode_line_full): Update.
7898 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7899 (mi_print_breakpoint_for_event, mi_solib_loaded)
7900 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7901 (mi_user_selected_context_changed): Update.
7902 * mi/mi-main.c (mi_execute_command): Update.
7903 * cli/cli-script.c (execute_control_command): Update.
7904 * python/python.c (execute_gdb_command): Update.
7905 * solib.c (info_sharedlibrary_command): Update.
7906 * interps.c (interp_ui_out): Remove.
7907 * interps.h (interp_ui_out): Remove.
7908
7909 2018-05-25 Tom Tromey <tom@tromey.com>
7910
7911 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7912 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7913 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7914
7915 2018-05-25 Tom Tromey <tom@tromey.com>
7916
7917 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7918 * interps.c (interp_exec): Use scoped_restore.
7919
7920 2018-05-25 Tom Tromey <tom@tromey.com>
7921
7922 * remote.c (remote_target::remote_file_get): Use
7923 gdb::byte_vector.
7924 (remote_target::remote_file_put): Likewise.
7925
7926 2018-05-25 Tom Tromey <tom@tromey.com>
7927
7928 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7929 a std::string.
7930 (get_pe_section_index, add_pe_exported_sym): Update.
7931 (read_pe_exported_syms): Use gdb::def_vector.
7932
7933 2018-05-25 Tom Tromey <tom@tromey.com>
7934
7935 * frame.c (remove_prev_frame): Remove.
7936 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7937
7938 2018-05-25 Maciej W. Rozycki <macro@mips.com>
7939
7940 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7941 Remove prototypes.
7942 * mips-linux-nat.c (supply_fpregset): Always call
7943 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7944 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7945 `mips_fill_fpregset'.
7946 * mips-linux-tdep.c (mips_supply_fpregset)
7947 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7948 (mips_fill_fpregset_wrapper): Remove functions.
7949 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7950 (mips_linux_fpregset): Remove variable.
7951 (mips_linux_iterate_over_regset_sections): Use
7952 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7953 (mips_linux_o32_sigframe_init): Remove comment.
7954
7955 2018-05-25 Pedro Alves <palves@redhat.com>
7956
7957 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7958 (struct readahead_cache, struct packet_reg, struct
7959 remote_arch_state, class remote_state): Move higher up in the
7960 file.
7961 (remote_target::m_remote_state): Now an object instead of a pointer.
7962 (remote_target::get_remote_state): Adjust.
7963
7964 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7965
7966 * stack.c (select_and_print_frame): Delete.
7967 (struct function_bounds): Move struct within function.
7968 (func_command): Most content moved into new function
7969 find_frame_for_function, use new function, print result, add
7970 function comment.
7971 (find_frame_for_function): New function, now returns a result.
7972
7973 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7974
7975 * stack.c (iterate_over_block_arg_vars): Fix comment.
7976 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7977
7978 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
7979
7980 PR gdb/23203
7981 * frame.c
7982 (scoped_restore_selected_frame::scoped_restore_selected_frame):
7983 Define.
7984 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7985 Define.
7986 * frame.h (class scoped_restore_selected_frame): New class.
7987 * stack.c (print_frame_local_vars): Remove catching and rethrowing
7988 of any exception, use scoped_restore_selected_frame to restore the
7989 frame instead.
7990
7991 2018-05-24 Pedro Alves <palves@redhat.com>
7992
7993 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7994 override.
7995
7996 2018-05-23 Tom Tromey <tom@tromey.com>
7997
7998 * complaints.c (struct complaints): Remove.
7999 (symfile_complaint_book): Remove.
8000 (series): New global.
8001 (complaint_internal): Update.
8002 (clear_complaints): Update.
8003
8004 2018-05-23 Tom Tromey <tom@tromey.com>
8005
8006 * complaints.c (counters): New global.
8007 (struct complain): Remove.
8008 (struct complaints) <root>: Remove.
8009 (complaint_sentinel): Remove.
8010 (symfile_complaint_book): Update.
8011 (find_complaint) Remove.
8012 (complaint_internal, clear_complaints): Update.
8013
8014 2018-05-23 Tom Tromey <tom@tromey.com>
8015
8016 * complaints.c (struct complain) <file, line>: Remove.
8017 (find_complaint): Remove file, line parameters.
8018 (complaint_internal): Update.
8019
8020 2018-05-23 Tom Tromey <tom@tromey.com>
8021
8022 * complaints.c (vcomplaint): Remove.
8023 (complaint_internal) Merge in contents of vcomplaint.
8024
8025 2018-05-23 Tom Tromey <tom@tromey.com>
8026
8027 * complaints.c (struct complaints) <explanation>: Remove.
8028 (symfile_explanations): Remove.
8029 (symfile_complaint_book): Update.
8030 (vcomplaint): Update.
8031 (struct explanation): Remove.
8032
8033 2018-05-23 Tom Tromey <tom@tromey.com>
8034
8035 * complaints.c (symfile_complaints): Remove.
8036 (complaint_internal): Remove "complaints" parameter.
8037 (clear_complaints, vcomplaint): Remove "c" parameter.
8038 (get_complaints): Remove.
8039 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8040 (dwarf2_debug_line_missing_file_complaint)
8041 (dwarf2_debug_line_missing_end_sequence_complaint)
8042 (dwarf2_complex_location_expr_complaint)
8043 (dwarf2_const_value_length_mismatch_complaint)
8044 (dwarf2_section_buffer_overflow_complaint)
8045 (dwarf2_macro_malformed_definition_complaint)
8046 (dwarf2_invalid_attrib_class_complaint)
8047 (create_addrmap_from_index, dw2_symtab_iter_next)
8048 (dw2_expand_marked_cus)
8049 (dw2_debug_names_iterator::find_vec_in_debug_names)
8050 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8051 (create_debug_type_hash_table, init_cutu_and_read_dies)
8052 (partial_die_parent_scope, add_partial_enumeration)
8053 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8054 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8055 (read_import_statement, read_file_scope, create_dwo_cu_reader)
8056 (create_cus_hash_table, create_dwp_hash_table)
8057 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8058 (dwarf2_rnglists_process, dwarf2_ranges_process)
8059 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8060 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8061 (handle_struct_member_die, process_structure_scope)
8062 (read_array_type, read_common_block, read_module_type)
8063 (read_tag_pointer_type, read_typedef, read_base_type)
8064 (read_subrange_type, load_partial_dies, partial_die_info::read)
8065 (partial_die_info::read, partial_die_info::read)
8066 (partial_die_info::read, read_checked_initial_length_and_offset)
8067 (dwarf2_string_attr, read_formatted_entries)
8068 (dwarf_decode_line_header)
8069 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8070 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8071 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8072 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8073 (get_signatured_type, get_DW_AT_signature_type)
8074 (decode_locdesc, file_file_name, consume_improper_spaces)
8075 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8076 (dwarf_decode_macro_bytes, dwarf_decode_macros)
8077 (dwarf2_symbol_mark_computed, set_die_type)
8078 (read_attribute_value): Update.
8079 * stap-probe.c (handle_stap_probe, get_stap_base_address):
8080 Update.
8081 * dbxread.c (unknown_symtype_complaint)
8082 (lbrac_mismatch_complaint, repeated_header_complaint)
8083 (set_namestring, function_outside_compilation_unit_complaint)
8084 (read_dbx_symtab, process_one_symbol): Update.
8085 * gdbtypes.c (stub_noname_complaint): Update.
8086 * windows-nat.c (handle_unload_dll): Update.
8087 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8088 (decode_base_type): Update.
8089 * xcoffread.c (bf_notfound_complaint, ef_complaint)
8090 (eb_complaint, record_include_begin, record_include_end)
8091 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8092 (process_xcoff_symbol, read_symbol)
8093 (function_outside_compilation_unit_complaint)
8094 (scan_xcoff_symtab): Update.
8095 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8096 * buildsym.c (finish_block_internal, make_blockvector)
8097 (end_symtab_get_static_block, augment_type_symtab): Update.
8098 * dtrace-probe.c (dtrace_process_dof)
8099 (dtrace_static_probe_ops::get_probes): Update.
8100 * complaints.h (struct complaint): Don't declare.
8101 (symfile_complaints): Remove.
8102 (complaint_internal): Remove "complaints" parameter.
8103 (complaint): Likewise.
8104 (clear_complaints): Likewise.
8105 * symfile.c (syms_from_objfile_1, finish_new_objfile)
8106 (reread_symbols): Update.
8107 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8108 (dwarf2_frame_cache, decode_frame_entry): Update.
8109 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8110 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8111 (info_selectors_command): Update.
8112 * macrotab.c (macro_include, check_for_redefinition)
8113 (macro_undef): Update.
8114 * objfiles.c (filter_overlapping_sections): Update.
8115 * stabsread.c (invalid_cpp_abbrev_complaint)
8116 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8117 (define_symbol, error_type, read_type, rs6000_builtin_type)
8118 (stabs_method_name_from_physname, read_member_functions)
8119 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8120 (attach_fields_to_type, complain_about_struct_wipeout)
8121 (read_range_type, read_args, common_block_start)
8122 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8123 Update.
8124 * mdebugread.c (index_complaint, unknown_ext_complaint)
8125 (basic_type_complaint, bad_tag_guess_complaint)
8126 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8127 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8128 (parse_procedure, parse_lines)
8129 (function_outside_compilation_unit_complaint)
8130 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8131 (bad_tag_guess_complaint, reg_value_complaint): Update.
8132 * cp-support.c (demangled_name_complaint): Update.
8133 * macroscope.c (sal_macro_scope): Update.
8134 * dwarf-index-write.c (class debug_names): Update.
8135
8136 2018-05-23 Tom Tromey <tom@tromey.com>
8137
8138 * complaints.c (clear_complaints): Remove "noisy" parameter.
8139 * complaints.h (clear_complaints): Update.
8140 * symfile.c (syms_from_objfile_1, finish_new_objfile)
8141 (reread_symbols): Update.
8142
8143 2018-05-23 Tom Tromey <tom@tromey.com>
8144
8145 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8146 SUBSEQUENT_MESSAGE.
8147 (vcomplaint, clear_complaints): Update.
8148 (symfile_explanations): Remove some messages.
8149
8150 2018-05-23 Tom Tromey <tom@tromey.com>
8151
8152 * complaints.c (internal_complaint): Remove.
8153 * complaints.h (internal_complaint): Remove.
8154
8155 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8156
8157 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8158
8159 2018-05-22 Pedro Alves <palves@redhat.com>
8160
8161 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8162 (remote_fileio_badfd, remote_fileio_return_errno)
8163 (remote_fileio_return_success, remote_fileio_func_open)
8164 (remote_fileio_func_open, remote_fileio_func_close)
8165 (remote_fileio_func_read, remote_fileio_func_write)
8166 (remote_fileio_func_lseek, remote_fileio_func_rename)
8167 (remote_fileio_func_unlink, remote_fileio_func_stat)
8168 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8169 (remote_fileio_func_isatty, remote_fileio_func_system): Add
8170 remote_target parameter.
8171 (remote_fio_func_map) <func>: Add remote_target parameter.
8172 (do_remote_fileio_request, remote_fileio_request):
8173 * remote-fileio.h (remote_fileio_request):
8174 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8175 remote_target parameter.
8176 (remote_notif_process, handle_notification): Adjust to pass down
8177 the remote.
8178 (remote_notif_state_allocate): Add remote_target parameter. Save
8179 it.
8180 * remote-notif.h (struct remote_target): Forward declare.
8181 (struct notif_client) <parse, ack, can_get_pending_events>: Add
8182 remote_target parameter.
8183 (struct remote_notif_state) <remote>: New field.
8184 (remote_notif_ack, remote_notif_parse): Add remote_target
8185 parameter.
8186 (remote_notif_state_allocate, remote_notif_state_allocate): Add
8187 remote_target parameter.
8188 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8189 (threads_listing_context, rmt_thread_action, protocol_feature)
8190 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8191 (packet_result, struct threads_listing_context, remote_state):
8192 Move definitions and declarations higher up.
8193 (remote_target) <~remote_target>: Declare.
8194 (remote_download_command_source, remote_file_put, remote_file_get)
8195 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8196 (remote_hostio_pread_vFile, remote_hostio_send_command)
8197 (remote_hostio_set_filesystem, remote_hostio_open)
8198 (remote_hostio_close, remote_hostio_unlink, remote_state)
8199 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8200 (get_memory_write_packet_size, get_memory_read_packet_size)
8201 (append_pending_thread_resumptions, remote_detach_1)
8202 (append_resumption, remote_resume_with_vcont)
8203 (add_current_inferior_and_thread, wait_ns, wait_as)
8204 (process_stop_reply, remote_notice_new_inferior)
8205 (process_initial_stop_replies, remote_add_thread)
8206 (btrace_sync_conf, remote_btrace_maybe_reopen)
8207 (remove_new_fork_children, kill_new_fork_children)
8208 (discard_pending_stop_replies, stop_reply_queue_length)
8209 (check_pending_events_prevent_wildcard_vcont)
8210 (discard_pending_stop_replies_in_queue, stop_reply)
8211 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8212 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8213 (remote_interrupt_as, remote_interrupt_ns)
8214 (remote_get_noisy_reply, remote_query_attached)
8215 (remote_add_inferior, remote_current_thread, get_current_thread)
8216 (set_thread, set_general_thread, set_continue_thread)
8217 (set_general_process, write_ptid)
8218 (remote_unpack_thread_info_response, remote_get_threadinfo)
8219 (parse_threadlist_response, remote_get_threadlist)
8220 (remote_threadlist_iterator, remote_get_threads_with_ql)
8221 (remote_get_threads_with_qxfer)
8222 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8223 (get_offsets, remote_check_symbols, remote_supported_packet)
8224 (remote_query_supported, remote_packet_size)
8225 (remote_serial_quit_handler, remote_detach_pid)
8226 (remote_vcont_probe, remote_resume_with_hc)
8227 (send_interrupt_sequence, interrupt_query)
8228 (remote_notif_get_pending_events, fetch_register_using_p)
8229 (send_g_packet, process_g_packet, fetch_registers_using_g)
8230 (store_register_using_P, store_registers_using_G)
8231 (set_remote_traceframe, check_binary_download)
8232 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8233 (remote_xfer_live_readonly_partial, remote_read_bytes)
8234 (remote_send_printf, remote_flash_write, readchar)
8235 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8236 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8237 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8238 (extended_remote_disable_randomization, extended_remote_run)
8239 (send_environment_packet, extended_remote_environment_support)
8240 (extended_remote_set_inferior_cwd, remote_write_qxfer)
8241 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8242 (packet_command): Now methods of ...
8243 (remote_target): ... this class.
8244 (m_remote_state) <remote_target>: New field.
8245 (struct remote_state) <stop_reply_queue,
8246 remote_async_inferior_event_token, wait_forever_enabled_p>: New
8247 fields.
8248 (remote_state::remote_state): Allocate stop_reply_queue.
8249 (remote_state): Delete global.
8250 (get_remote_state_raw): Delete.
8251 (remote_target::get_remote_state): Allocate m_remote_state on
8252 demand.
8253 (get_current_remote_target): New.
8254 (remote_ops, extended_remote_ops): Delete.
8255 (wait_forever_enabled_p, remote_async_inferior_event_token):
8256 Delete, moved to struct remote_state.
8257 (remote_target::close): Delete self. Destruction bits split to
8258 ...
8259 (remote_target::~remote_target): ... this.
8260 (show_memory_packet_size): Adjust to use
8261 get_current_remote_target.
8262 (struct protocol_feature) <func>: Add remote_target parameter.
8263 All callers adjusted.
8264 (curr_quit_handler_target): New.
8265 (remote_serial_quit_handler): Reimplement.
8266 (remote_target::open_1): Adjust to use get_current_remote_target.
8267 Heap-allocate remote_target/extended_remote_target instances.
8268 (vcont_builder::vcont_builder): Add remote_target parameter, and
8269 save it in m_remote. All callers adjusted.
8270 (vcont_builder::m_remote): New field.
8271 (vcont_builder::restart, vcont_builder::flush)
8272 (vcont_builder::push_action): Use it.
8273 (remote_target::commit_resume): Use it.
8274 (struct queue_iter_param) <remote>: New field.
8275 (remote_target::remove_new_fork_children): Fill in 'remote' field.
8276 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8277 (check_pending_event_prevents_wildcard_vcont_callback)
8278 (remote_target::check_pending_events_prevent_wildcard_vcont)
8279 (remote_target::discard_pending_stop_replies)
8280 (remote_target::discard_pending_stop_replies_in_queue)
8281 (remote_target::remote_notif_remove_queued_reply): Fill in
8282 'remote' field.
8283 (remote_notif_get_pending_events): New.
8284 (remote_target::readchar, remote_target::remote_serial_write):
8285 Save/restore curr_quit_handler_target.
8286 (putpkt): New.
8287 (kill_new_fork_children): Fill in 'remote' field.
8288 (packet_command): Use get_current_remote_target, defer to
8289 remote_target method of same name.
8290 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8291 parameter, and save it in m_remote. All callers adjusted.
8292 (scoped_remote_fd::release): Use m_remote.
8293 (scoped_remote_fd::m_remote): New field.
8294 (remote_file_put, remote_file_get, remote_file_delete): Use
8295 get_current_remote_target, defer to remote_target method of same
8296 name.
8297 (remote_btrace_reset): Add remote_state paremeter. Update all
8298 callers.
8299 (remote_async_inferior_event_handler). Pass down 'data'.
8300 (remote_new_objfile): Use get_current_remote_target.
8301 (remote_target::vcont_r_supported): New.
8302 (set_range_stepping): Use get_current_remote_target and
8303 remote_target::vcont_r_supported.
8304 (_initialize_remote): Don't allocate 'remote_state' and
8305 'stop_reply_queue' globals.
8306 * remote.h (struct remote_target): Forward declare.
8307 (getpkt, putpkt, remote_notif_get_pending_events): Add
8308 'remote_target' parameter.
8309
8310 2018-05-22 Pedro Alves <palves@redhat.com>
8311
8312 * remote.c (vcont_builder): Now a class. Make all data members
8313 private.
8314 (vcont_builder) <vcont_builder, restart, flush, push_action>:
8315 Declare methods.
8316 (vcont_builder_restart): Rename to ...
8317 (vcont_builder::restart): ... this.
8318 (vcont_builder_flush): Rename to ...
8319 (vcont_builder::flush): ... this.
8320 (vcont_builder_push_action): Rename to ...
8321 (vcont_builder::push_action): ... this.
8322 (remote_target::commit_resume): Adjust.
8323
8324 2018-05-22 Pedro Alves <palves@redhat.com>
8325
8326 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8327 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8328 (get_fixed_memory_packet_size): New.
8329 (get_memory_packet_size): Use it.
8330 (set_memory_packet_size): Don't override the config size with
8331 DEFAULT_MAX_MEMORY_PACKET_SIZE.
8332 (show_memory_packet_size): Use get_fixed_memory_packet_size.
8333 Don't refer to get_memory_packet_size if not connected to a remote
8334 target. Show "(default)" if configured size is 0.
8335
8336 2018-05-22 Pedro Alves <palves@redhat.com>
8337
8338 * remote.c (remote_target::mourn_inferior): Move
8339 discard_pending_stop_replies call here from ...
8340 (_initialize_remote): ... here.
8341
8342 2018-05-22 Pedro Alves <palves@redhat.com>
8343
8344 * remote.c (compare_section_command): Remove set_general_process
8345 call.
8346
8347 2018-05-22 Pedro Alves <palves@redhat.com>
8348
8349 * remote.c (struct packet_reg, struct remote_arch_state):
8350 Move higher up in the file.
8351 (remote_state) <m_arch_states>: Store remote_arch_state values
8352 instead of remote_arch_state pointers.
8353 (remote_state::get_remote_arch_state): Adjust.
8354
8355 2018-05-22 Pedro Alves <palves@redhat.com>
8356
8357 * remote.c: Include <unordered_map>.
8358 (remote_state): Now a class.
8359 (remote_state) <get_remote_arch_state>: Declare method.
8360 <get_remote_arch_state>: New field.
8361 (remote_arch_state) <remote_arch_state>: Declare ctor.
8362 <regs>: Now a unique_ptr.
8363 (remote_gdbarch_data_handle): Delete.
8364 (get_remote_arch_state): Delete.
8365 (remote_state::get_remote_arch_state): New.
8366 (get_remote_state): Adjust to call remote_state's
8367 get_remote_arch_state method.
8368 (init_remote_state): Delete, bits factored out to ...
8369 (remote_arch_state::remote_arch_state): ... this new method.
8370 (get_remote_packet_size, get_memory_packet_size)
8371 (process_g_packet, remote_target::fetch_registers)
8372 (remote_target::prepare_to_store, store_registers_using_G)
8373 (remote_target::store_registers, remote_target::get_trace_status):
8374 Adjust to call remote_state's method.
8375 (_initialize_remote): Remove reference to
8376 remote_gdbarch_data_handle.
8377
8378 2018-05-22 Pedro Alves <palves@redhat.com>
8379
8380 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8381 pread>: New method declarations.
8382 (remote_target::open_1): Adjust.
8383 (readahead_cache_invalidate): Rename to ...
8384 (readahead_cache::invalidate): ... this, and adjust to be a class
8385 method.
8386 (readahead_cache_invalidate_fd): Rename to ...
8387 (readahead_cache::invalidate_fd): ... this, and adjust to be a
8388 class method.
8389 (remote_hostio_pwrite): Adjust.
8390 (remote_hostio_pread_from_cache): Rename to ...
8391 (readahead_cache::pread): ... this, and adjust to be a class
8392 method.
8393 (remote_hostio_close): Adjust.
8394
8395 2018-05-22 Pedro Alves <palves@redhat.com>
8396
8397 * remote.c (remote_hostio_close_cleanup): Delete.
8398 (class scoped_remote_fd): New.
8399 (remote_file_put, remote_file_get): Use it.
8400
8401 2018-05-22 Pedro Alves <palves@redhat.com>
8402
8403 (struct vCont_action_support): Use bool and initialize all fields.
8404 (struct readahead_cache): Initialize all fields.
8405 (remote_state): Use bool and initialize all fields.
8406 (remote_state::remote_state, remote_state::~remote_state): New.
8407 (new_remote_state): Delete.
8408 (_initialize_remote): Use new to allocate remote_state.
8409
8410 2018-05-22 Pedro Alves <palves@redhat.com>
8411 張俊芝 <zjz@zjz.name>
8412
8413 PR gdb/22973
8414 * c-exp.y: Include "c-support.h".
8415 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8416 of tolower. Use c_ident_is_alpha to scan names.
8417 * c-lang.c: Include "c-support.h".
8418 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8419 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8420 * c-support.h: New file, with bits factored out from ...
8421 * cp-name-parser.y: ... this file.
8422 Include "c-support.h".
8423 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8424 c-support.h and renamed.
8425 (symbol_end, yylex): Adjust.
8426
8427 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8428
8429 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8430 parameter type to CORE_ADDR.
8431 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8432 parameter type in declaration to CORE_ADDR.
8433 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8434 target_auxv_search to get AT_HWCAP and use the result to get the
8435 target description.
8436 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8437 to CORE_ADDR. Remove the cast of the return value to unsigned
8438 long. Fix error predicate of target_auxv_search.
8439 (ppc_linux_nat_target::read_description): Change the type of the
8440 hwcap variable to CORE_ADDR.
8441
8442 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8443
8444 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8445 if the size of fpscr is larger than 32 bits.
8446
8447 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8448
8449 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8450 (ppc32_linux_vsxregmap): New global.
8451 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8452 regcache_supply_regset, and regcache_collect_regset.
8453 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8454 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8455 (fetch_vsx_register, store_vsx_register): Remove.
8456 (fetch_vsx_registers): Add regno parameter. Get regset using
8457 ppc_linux_vsxregset. Use regset to supply registers.
8458 (store_vsx_registers): Add regno parameter. Get regset using
8459 ppc_linux_vsxregset. Use regset to collect registers.
8460 (fetch_register): Call fetch_vsx_registers instead of
8461 fetch_vsx_register.
8462 (store_register): Call store_vsx_registers instead of
8463 store_vsx_register.
8464 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8465 new regno parameter.
8466 (store_ppc_registers): Call store_vsx_registers with -1 for the
8467 new regno parameter.
8468 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8469 (ppc_collect_vsxregset): Remove.
8470
8471 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8472
8473 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8474 offset fields.
8475 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8476 for vector register offset fields.
8477 (ppc64_fbsd_reg_offsets): Likewise.
8478 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8479 to vector register offset fields.
8480 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8481 to vector register offset fields.
8482 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8483 vector register offset fields.
8484 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8485 initializers for vector register offset fields.
8486 (rs6000_aix64_reg_offsets): Likewise.
8487 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8488 (ppc_supply_vrregset): Remove.
8489 (ppc_collect_vrregset): Remove.
8490 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8491 (ppc_linux_vrregset) : New function.
8492 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8493 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8494 (ppc32_linux_vrregset): Remove.
8495 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8496 and use result instead of ppc32_linux_vrregset.
8497 (ppc32_linux_reg_offsets): Remove initializers for vector register
8498 offset fields.
8499 (ppc64_linux_reg_offsets): Likewise.
8500 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8501 * ppc-linux-nat.c: Include regset.h.
8502 (gdb_vrregset_t): Adjust comment to account for little-endian
8503 mode.
8504 (supply_vrregset, fill_vrregset): Remove.
8505 (fetch_altivec_register, store_altivec_register): Remove.
8506 (fetch_altivec_registers): Add regno parameter. Get regset using
8507 ppc_linux_vrregset. Use regset to supply registers.
8508 (store_altivec_registers): Add regno parameter. Get regset using
8509 ppc_linux_vrregset. Use regset to collect registers.
8510 (fetch_register): Call fetch_altivec_registers instead of
8511 fetch_altivec_register.
8512 (store_register): Call store_altivec_registers instead of
8513 store_altivec_register.
8514 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8515 the new regno parameter.
8516 (store_ppc_registers): Call store_altivec_registers with -1 for
8517 the new regno parameter.
8518
8519 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8520
8521 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8522 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8523 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8524 (gdb_vrregset_t): Change array type size to
8525 PPC_LINUX_SIZEOF_VRREGSET.
8526 (gdb_vsxregset_t): Change array type size to
8527 PPC_LINUX_SIZEOF_VSXREGSET.
8528 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8529 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8530 PPC_LINUX_SIZEOF_VSXREGSET.
8531
8532 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8533
8534 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8535 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8536 nat/ppc-linux.c.
8537 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8538 ppc_linux_target_wordsize with tid.
8539 (ppc_linux_nat_target::read_description): Call ppc_linux_target
8540 wordsize with tid.
8541 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8542 (ppc64_64bit_inferior_p): Add static and inline specifiers.
8543 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8544 tid parameter. Remove static specifier.
8545 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8546 (ppc_linux_target_wordsize): New declaration.
8547
8548 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8549
8550 * arch/ppc-linux-common.c: New file.
8551 * arch/ppc-linux-common.h: New file.
8552 * arch/ppc-linux-tdesc.h: New file.
8553 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8554 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8555 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8556 arch/ppc-linux-tdesc.h.
8557 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8558 arch/ppc-linux-tdesc.h.
8559 (ppc_linux_nat_target::read_description): Remove target
8560 description matching code. Fill a ppc_linux_features struct and
8561 call ppc_linux_match_description with it. Move comment about ISA
8562 2.05 to ppc-linux-common.c.
8563 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8564 arch/ppc-linux-tdesc.h.
8565 (ppc_linux_core_read_description): Remove target description
8566 matching code. Fill a ppc_linux_features struct and call
8567 ppc_linux_match_description with it.
8568 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8569 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8570 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8571 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8572 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8573 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8574 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8575 (tdesc_powerpc_e500l): Remove.
8576
8577 2018-05-22 Joel Brobecker <brobecker@adacore.com>
8578
8579 * ada-lang.c (catch_assert_command): Pass empty string instead
8580 of NULL for excep_string argument.
8581
8582 2018-05-22 Maciej W. Rozycki <macro@mips.com>
8583
8584 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8585 the width of the requested register exceeds the width of the
8586 `ptrace' data type.
8587
8588 2018-05-21 Tom Tromey <tom@tromey.com>
8589
8590 * printcmd.c (output_command): Remove.
8591 (output_command_const): Rename to output_command.
8592 * valprint.h (output_command): Rename from output_command_const.
8593 * tracepoint.c (trace_dump_actions): Call output_command.
8594
8595 2018-05-21 Tom Tromey <tom@tromey.com>
8596
8597 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8598 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8599 * ada-lang.h (create_ada_exception_catchpoint): Update.
8600 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8601 std::string.
8602 (create_excep_cond_exprs, ~ada_catchpoint)
8603 (should_stop_exception, print_one_exception)
8604 (print_mention_exception, print_recreate_exception): Update.
8605 (ada_get_next_arg): Remove.
8606 (catch_ada_exception_command_split): Use std::string. Change type
8607 of "excep_string", "cond_string".
8608 (catch_ada_exception_command): Update.
8609 (create_ada_exception_catchpoint): Change type of excep_string.
8610 (ada_exception_sal): Remove excep_string parameter.
8611 (~ada_catchpoint): Remove.
8612
8613 2018-05-21 Tom Tromey <tom@tromey.com>
8614
8615 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8616 cleanup.
8617
8618 2018-05-21 Tom Tromey <tom@tromey.com>
8619
8620 * ada-lang.c (ada_exception_message_1, ada_exception_message):
8621 Return unique_xmalloc_ptr.
8622 (print_it_exception): Update.
8623
8624 2018-05-21 Tom Tromey <tom@tromey.com>
8625
8626 * tracepoint.c (trace_dump_actions): Use std::string.
8627
8628 2018-05-21 Tom Tromey <tom@tromey.com>
8629
8630 * symfile.c (reread_symbols): Use std::string for original_name.
8631
8632 2018-05-21 Tom Tromey <tom@tromey.com>
8633
8634 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8635 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
8636 constructor.
8637
8638 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
8639
8640 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8641 instance to...
8642 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8643 * objfiles.c (get_objfile_bfd_data): Allocate
8644 objfile_per_bfd_storage with obstack_new when allocating on
8645 obstack.
8646
8647 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8648
8649 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8650 OBSTACK_ZALLOC.
8651 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8652 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8653 * mdebugread.c (mdebug_build_psymtabs): Likewise.
8654 (add_pending): Likewise.
8655 (parse_symbol): Likewise.
8656 (parse_partial_symbols): Likewise.
8657 (psymtab_to_symtab_1): Likewise.
8658 (new_psymtab): Likewise.
8659 (elfmdebug_build_psymtabs): Likewise.
8660 * minsyms.c (terminate_minimal_symbol_table): Likewise.
8661 * objfiles.c (get_objfile_bfd_data): Likewise.
8662 (objfile_register_static_link): Likewise.
8663 * psymtab.c (allocate_psymtab): Likewise.
8664 * stabsread.c (read_member_functions): Likewise.
8665 * xcoffread.c (xcoff_end_psymtab): Likewise.
8666
8667 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
8668
8669 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8670 compiler supports std::is_trivially_constructible.
8671 * common/poison.h: Include obstack.h.
8672 (IsMallocable): Define to is_trivially_constructible if the
8673 compiler supports it, define to true_type otherwise.
8674 (xobnew): New.
8675 (XOBNEW): Redefine.
8676 (xobnewvec): New.
8677 (XOBNEWVEC): Redefine.
8678 * gdb_obstack.h (obstack_zalloc): New.
8679 (OBSTACK_ZALLOC): Redefine.
8680 (obstack_calloc): New.
8681 (OBSTACK_CALLOC): Redefine.
8682 (obstack_new): New.
8683 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8684 (gdbarch_obstack): New declaration in gdbarch.h, definition in
8685 gdbarch.c.
8686 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8687 obstack_calloc/obstack_zalloc.
8688 (gdbarch_obstack_zalloc): Remove.
8689 * target-descriptions.c (tdesc_data_init): Use obstack_new.
8690
8691 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8692
8693 * stack.c (backtrace_command_1): Remove useless variable int i.
8694
8695 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8696
8697 * stack.c (print_frame_info): Fix comment.
8698
8699 2018-05-18 Tom Tromey <tom@tromey.com>
8700
8701 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8702 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8703 (~dwarf2_per_objfile): Update
8704 (dwarf2_get_dwz_file): Use new.
8705 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8706 unique_ptr.
8707
8708 2018-05-18 Tom Tromey <tom@tromey.com>
8709
8710 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8711 unique_ptr.
8712 * dwarf2read.c (struct dwp_file): Add constructor and
8713 initializers.
8714 (open_and_init_dwp_file): Return a unique_ptr.
8715 (dwarf2_per_objfile, create_dwp_hash_table)
8716 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8717 (lookup_dwo_unit_in_dwp): Update.
8718 (open_and_init_dwp_file, get_dwp_file): Update.
8719
8720 2018-05-18 Tom Tromey <tom@tromey.com>
8721
8722 * dwarf2read.c (dwarf2_per_objfile): Update.
8723 (struct mapped_index): Add initializers.
8724 (dwarf2_read_index): Use new.
8725 (dw2_symtab_iter_init): Update.
8726 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8727 unique_ptr.
8728
8729 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8730
8731 * dwarf2read.c (mapped_index) <total_size>: Remove.
8732
8733 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
8734
8735 * unittests/format_pieces-selftests.c (test_format_specifier):
8736 Add ARI comments.
8737
8738 2018-05-18 Tom Tromey <tom@tromey.com>
8739
8740 * c-typeprint.c (maybe_print_hole): New function.
8741 (c_print_type_struct_field_offset): Update.
8742 (c_type_print_base_struct_union): Call maybe_print_hole.
8743
8744 2018-05-17 Keith Seitz <keiths@redhat.com>
8745
8746 * breakpoint.c (build_bpstat_chain): New function, moved from
8747 bpstat_stop_status.
8748 (bpstat_stop_status): Add optional parameter, `stop_chain'.
8749 If no stop chain is passed, call build_bpstat_chain to build it.
8750 * breakpoint.h (build_bpstat_chain): Declare.
8751 (bpstat_stop_status): Move documentation here from breakpoint.c.
8752 * infrun.c (handle_signal_stop): Before eliding inlined frames,
8753 build the stop chain and pass it to skip_inline_frames.
8754 Pass this stop chain to bpstat_stop_status.
8755 * inline-frame.c: Include breakpoint.h.
8756 (stopped_by_user_bp_inline_frame): New function.
8757 (skip_inline_frames): Add parameter `stop_chain'.
8758 Move documention to inline-frame.h.
8759 If non-NULL, use stopped_by_user_bp_inline_frame to determine
8760 whether the frame should be elided.
8761 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8762 Add moved documentation and update for new parameter.
8763
8764 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8765
8766 PR cli/14975
8767 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8768 unittests/format_pieces-selftests.c.
8769 * common/format.h (format_piece) <operator==>: New.
8770 (format_pieces) <operator[]>: Remove.
8771 * common/format.c (format_pieces::format_pieces): Handle \e.
8772 * unittests/format_pieces-selftests.c: New.
8773
8774 2018-05-17 Tom Tromey <tom@tromey.com>
8775
8776 PR symtab/23010:
8777 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8778 (dw2_instantiate_symtab): Add skip_partial parameter.
8779 (dw2_find_last_source_symtab, dw2_map_expand_apply)
8780 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8781 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8782 (dw2_expand_symtabs_matching_one)
8783 (dw2_find_pc_sect_compunit_symtab)
8784 (dw2_debug_names_lookup_symbol)
8785 (dw2_debug_names_expand_symtabs_for_function): Update.
8786 (init_cutu_and_read_dies): Add skip_partial parameter.
8787 (process_psymtab_comp_unit, build_type_psymtabs_1)
8788 (process_skeletonless_type_unit, load_partial_comp_unit)
8789 (psymtab_to_symtab_1): Update.
8790 (load_full_comp_unit): Add skip_partial parameter.
8791 (process_imported_unit_die, dwarf2_read_addr_index)
8792 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8793 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8794 (read_signatured_type): Update.
8795
8796 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
8797
8798 * value.c (release_value): Remove unused variable.
8799 (record_latest_value): Likewise.
8800 (access_value_history): Likewise.
8801 (preserve_values): Likewise.
8802
8803 2018-05-17 Tom Tromey <tom@tromey.com>
8804
8805 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8806 Initialize.
8807
8808 2018-05-16 Maciej W. Rozycki <macro@mips.com>
8809
8810 PR gdb/22286
8811 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8812 Also handle registers whose width is not a multiple of
8813 PTRACE_TYPE_RET.
8814 (linux_nat_trad_target::store_register): Likewise.
8815
8816 2018-05-16 Tom Tromey <tom@tromey.com>
8817
8818 * gdbcore.h (core_bfd): Redefine.
8819 * corelow.c (core_target::close): Update.
8820 (core_target_open): Update.
8821 * progspace.h (struct program_space) <cbfd>: Now a
8822 gdb_bfd_ref_ptr.
8823
8824 2018-05-16 Tom Tromey <tom@tromey.com>
8825
8826 PR cli/19551:
8827 * symfile-add-flags.h (enum symfile_add_flags)
8828 <SYMFILE_NOT_FILENAME>: New constant.
8829 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
8830 objfile name from BFD.
8831 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8832 * minidebug.c (find_separate_debug_file_in_section): Put
8833 ".gnu_debugdata" into BFD's file name.
8834
8835 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
8836
8837 * regcache.c (regcache_read_ftype, regcache_write_ftype):
8838 Remove.
8839
8840 2018-05-15 Tamar Christina <tamar.christina@arm.com>
8841
8842 PR binutils/21446
8843 * aarch64-tdep.c (aarch64_analyze_prologue,
8844 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8845 Indicate not interested in errors.
8846
8847 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8848
8849 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8850 Supply the MIPS_ZERO_REGNUM register.
8851
8852 2018-05-15 Maciej W. Rozycki <macro@mips.com>
8853
8854 * mips-tdep.c (mask_address_var): Make variable static.
8855
8856 2018-05-14 Tom Tromey <tom@tromey.com>
8857
8858 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8859
8860 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
8861
8862 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8863 FXSAVE_ADDR for the mxcsr register.
8864
8865 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
8866
8867 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8868
8869 2018-05-11 Pedro Alves <palves@redhat.com>
8870
8871 * corelow.c (core_target) <core_target>: No longer inline.
8872 Initialize m_core_gdbarch, m_core_vec and build the section table
8873 here.
8874 <~core_target>: New.
8875 <core_gdbarch, get_core_register_section>: New methods.
8876 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8877 factored out from ...
8878 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8879 (core_ops): Delete.
8880 (sniff_core_bfd): Add gdbarch parameter.
8881 (core_close): Delete, merged into ...
8882 (core_target::close): ... here. Delete self.
8883 (core_close_cleanup): Delete.
8884 (core_target_open): Allocate a core_target on the heap. Use a
8885 unique_ptr instead of a cleanup. Bits moved into the core_target
8886 ctor. Adjust to use core_target methods instead of globals.
8887 (get_core_register_section): Rename to ...
8888 (core_target::get_core_register_section): ... this and adjust.
8889 (struct get_core_registers_cb_data): New.
8890 (get_core_registers_cb): Use it. Use bool.
8891 (core_target::fetch_registers, core_target::files_info)
8892 (core_target::xfer_partial, core_target::read_description)
8893 (core_target::pid_to, core_target::thread_name): Adjust to
8894 reference class fields instead of globals.
8895 * target.h (struct target_ops_deleter, target_ops_up): New.
8896
8897 2018-05-11 Pedro Alves <palves@redhat.com>
8898
8899 * corefile.c (core_file_command): Move to corelow.c.
8900 * corelow.c (the_core_target): Delete.
8901 (core_file_command): Moved from corefile.c. Check exec_bfd
8902 instead of the_core_target. Use target_detach instead of calling
8903 into the_core_target directly.
8904 (maybe_say_no_core_file_now): New.
8905 (core_target::detach): Use it.
8906 (_initialize_corelow): Remove references to the_core_target.
8907 * gdbcore.h (the_core_target): Delete.
8908
8909 2018-05-11 Tom Tromey <tromey@redhat.com>
8910 Pedro Alves <palves@redhat.com>
8911
8912 * corefile.c (core_bfd): Remove.
8913 * gdbcore.h (core_bfd): Now a macro.
8914 * progspace.h (struct program_space) <cbfd>: New field.
8915
8916 2018-05-11 Tom Tromey <tom@tromey.com>
8917
8918 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8919 gdb::def_vector.
8920
8921 2018-05-10 Tom Tromey <tom@tromey.com>
8922
8923 * configure: Rebuild.
8924 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8925
8926 2018-05-10 Joel Brobecker <brobecker@adacore.com>
8927
8928 PR server/23158:
8929 * regformats/regdat.sh: Adjust script, following the addition
8930 of the new expedite_regs parameter to init_target_desc.
8931
8932 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
8933
8934 PR gdb/23127
8935 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8936 set_gdbarch_significant_addr_bit.
8937 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8938 set_gdbarch_significant_addr_bit.
8939 * utils.c (address_significant): Update to sign extend addr.
8940
8941 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
8942
8943 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8944 (xtensa_linux_init_abi): Limit tdep->num_regs by
8945 tdep->num_nopriv_regs.
8946 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8947 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8948 not initialized.
8949
8950 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
8951
8952 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8953
8954 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
8955
8956 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8957 (I387_MXCSR_INIT_VAL): New constant.
8958 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8959 buffer if it was supplied by the inferior.
8960 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8961 (i387_xsave_get_clear_bv): New function.
8962 (i387_supply_xsave): Only read x87 control registers from the
8963 xsave buffer if the feature is enabled, and the state will have
8964 been written, otherwise, provide a suitable default.
8965 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8966 including x87 control registers. Update control registers if they
8967 have changed from the default value, and mark features as enabled
8968 as required.
8969 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8970
8971 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8972
8973 * spu-tdep.c (info_spu_event_command): Fix output formatting.
8974
8975 2018-05-07 Tom Tromey <tom@tromey.com>
8976
8977 * configure: Rebuild.
8978 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8979
8980 2018-05-07 Tom Tromey <tom@tromey.com>
8981
8982 PR tdep/20362:
8983 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8984 bit. Use correct value for VDIV.
8985
8986 2018-05-04 Tom Tromey <tom@tromey.com>
8987
8988 * configure: Rebuild.
8989 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8990
8991 2018-05-04 Tom Tromey <tom@tromey.com>
8992
8993 * linux-record.c (record_linux_system_call) <case
8994 RECORD_SYS_RECVFROM>: Add "break".
8995
8996 2018-05-04 Tom Tromey <tom@tromey.com>
8997
8998 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8999 Add missing "break".
9000 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9001 Add missing "break".
9002
9003 2018-05-04 Tom Tromey <tom@tromey.com>
9004
9005 * rs6000-tdep.c (ppc_process_record_op4)
9006 (ppc_process_record_op63): Add fall-through comment.
9007
9008 2018-05-04 Tom Tromey <tom@tromey.com>
9009
9010 * i386-tdep.c (i386_process_record): Add fall-through comment.
9011
9012 2018-05-04 Tom Tromey <tom@tromey.com>
9013
9014 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9015 comment.
9016
9017 2018-05-04 Tom Tromey <tom@tromey.com>
9018
9019 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9020 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9021 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9022 comment.
9023 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9024 comment.
9025 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9026 comment.
9027
9028 2018-05-04 Tom Tromey <tom@tromey.com>
9029
9030 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9031
9032 2018-05-04 Tom Tromey <tom@tromey.com>
9033
9034 * s390-tdep.c (s390_process_record): Fix fall-through comments.
9035 * xcoffread.c (scan_xcoff_symtab): Move comment later.
9036 * symfile.c (section_is_mapped): Fix fall-through comment.
9037 * stabsread.c (define_symbol, read_member_functions): Fix
9038 fall-through comment.
9039 * s390-linux-tdep.c (s390_process_record): Fix fall-through
9040 comment.
9041 * remote.c (remote_wait_as): Fix fall-through comment.
9042 * p-exp.y (yylex): Fix fall-through comment.
9043 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9044 comment.
9045 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9046 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9047 * jv-exp.y (yylex): Fix fall-through comment.
9048 * go-exp.y (lex_one_token): Fix fall-through comment.
9049 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9050 fall-through comment.
9051 * f-exp.y (yylex): Fix fall-through comment.
9052 * dwarf2read.c (process_die): Fix fall-through comments.
9053 * dbxread.c (process_one_symbol): Fix fall-through comment.
9054 * d-exp.y (lex_one_token): Fix fall-through comment.
9055 * cp-name-parser.y (yylex): Fix fall-through comment.
9056 * coffread.c (coff_symtab_read): Fix fall-through comment.
9057 * c-exp.y (lex_one_token): Fix fall-through comment.
9058 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9059 comment.
9060 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9061 comment.
9062
9063 2018-05-04 Tom Tromey <tom@tromey.com>
9064
9065 PR python/22730:
9066 * NEWS: Mention gdb.execute change.
9067 * gdbcmd.h (execute_control_command): Don't declare.
9068 * python/python.c (execute_gdb_command): Use read_command_lines_1,
9069 execute_control_commands, execute_control_commands_to_string.
9070 * cli/cli-script.h (execute_control_commands)
9071 (execute_control_commands_to_string): Declare.
9072 (execute_control_command): Add from_tty parameter.
9073 * cli/cli-script.c (execute_control_commands)
9074 (execute_control_commands_to_string): New functions.
9075 (execute_user_command): Use execute_control_commands.
9076 (execute_control_command_1): Add "from_tty" parameter. Update.
9077 (execute_control_command): Likewise.
9078
9079 2018-05-04 Tom Tromey <tom@tromey.com>
9080
9081 PR python/22731:
9082 * NEWS: Mention that breakpoint commands are writable.
9083 * python/py-breakpoint.c (bppy_set_commands): New function.
9084 (breakpoint_object_getset) <"commands">: Use it.
9085
9086 2018-05-04 Tom Tromey <tom@tromey.com>
9087
9088 * tracepoint.c (actions_command): Update.
9089 * mi/mi-cmd-break.c (mi_command_line_array)
9090 (mi_command_line_array_cnt, mi_command_line_array_ptr)
9091 (mi_read_next_line): Remove.
9092 (mi_cmd_break_commands): Update.
9093 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9094 function_view.
9095 * cli/cli-script.c (get_command_line): Update.
9096 (process_next_line): Use function_view. Constify.
9097 (recurse_read_control_structure, read_command_lines)
9098 (read_command_lines_1): Change argument types to function_view.
9099 (do_define_command, document_command): Update.
9100 * breakpoint.h (check_tracepoint_command): Don't declare.
9101 * breakpoint.c (check_tracepoint_command): Remove.
9102 (commands_command_1, create_tracepoint_from_upload): Update.
9103
9104 2018-05-04 Tom Tromey <tom@tromey.com>
9105
9106 PR gdb/11750:
9107 * cli/cli-script.h (enum command_control_type) <define_control>:
9108 New constant.
9109 * cli/cli-script.c (multi_line_command_p): Handle define_control.
9110 (build_command_line, execute_control_command_1)
9111 (process_next_line): Likewise.
9112 (do_define_command): New function, extracted from define_command.
9113 (define_command): Use it.
9114
9115 2018-05-04 Tom Tromey <tom@tromey.com>
9116
9117 * tracepoint.c (actions_command): Update.
9118 * cli/cli-script.h (read_command_lines): Update.
9119 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9120 (MAX_TMPBUF): Remove define.
9121 (define_command): Use string_printf.
9122 (document_command): Likewise.
9123 * breakpoint.c (commands_command_1): Update.
9124
9125 2018-05-04 Tom Tromey <tom@tromey.com>
9126
9127 * top.c (execute_command): Update.
9128 * cli/cli-script.h (print_command_lines): Now varargs.
9129 * cli/cli-script.c (print_command_lines): Now varargs.
9130 (execute_control_command_1) <case while_control, case if_control>:
9131 Update.
9132
9133 2018-05-04 Tom Tromey <tom@tromey.com>
9134
9135 * tracepoint.c (all_tracepoint_actions): Rename from
9136 all_tracepoint_actions_and_cleanup. Change return type.
9137 (actions_command, encode_actions_1, encode_actions)
9138 (trace_dump_actions, tdump_command): Update.
9139 * remote.c (remote_download_command_source): Update.
9140 * python/python.c (gdbpy_eval_from_control_command)
9141 (python_command, python_interactive_command): Update.
9142 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9143 * guile/guile.c (guile_command)
9144 (gdbscm_eval_from_control_command, guile_command): Update.
9145 * compile/compile.c (compile_code_command)
9146 (compile_print_command, compile_to_object): Update.
9147 * cli/cli-script.h (struct command_lines_deleter): New.
9148 (counted_command_line): New typedef.
9149 (struct command_line): Add constructor, destructor.
9150 <body_list>: Remove.
9151 <body_list_0, body_list_1>: New members.
9152 (command_line_up): Remove typedef.
9153 (read_command_lines, read_command_lines_1, get_command_line):
9154 Update.
9155 (copy_command_lines): Don't declare.
9156 * cli/cli-script.c (build_command_line): Use "new".
9157 (get_command_line): Return counted_command_line.
9158 (print_command_lines, execute_user_command)
9159 (execute_control_command_1, while_command, if_command): Update.
9160 (realloc_body_list): Remove.
9161 (process_next_line, recurse_read_control_structure): Update.
9162 (read_command_lines, read_command_lines_1): Return counted_command_line.
9163 (free_command_lines): Use "delete".
9164 (copy_command_lines): Remove.
9165 (define_command, document_command, show_user_1): Update.
9166 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9167 a counted_command_line.
9168 * breakpoint.h (counted_command_line): Remove typedef.
9169 (breakpoint_set_commands): Update.
9170 * breakpoint.c (check_no_tracepoint_commands)
9171 (validate_commands_for_breakpoint): Update.
9172 (breakpoint_set_commands): Change commands to be a
9173 counted_command_line.
9174 (commands_command_1, update_dprintf_command_list)
9175 (create_tracepoint_from_upload): Update.
9176
9177 2018-05-04 Tom Tromey <tom@tromey.com>
9178
9179 * cli/cli-decode.h (cmd_list_element): New constructor.
9180 (~cmd_list_element): New destructor.
9181 (struct cmd_list_element): Add initializers.
9182 * cli/cli-decode.c (do_add_cmd): Use "new".
9183 (delete_cmd): Use "delete".
9184
9185 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
9186 Pedro Alves <palves@redhat.com>
9187
9188 PR breakpoints/19806 and support for PR external/20207.
9189 * NEWS: Mention Aarch64 watchpoint improvements.
9190 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9191 watchpoints and PR external/20207 watchpoints.
9192 * nat/aarch64-linux-hw-point.c
9193 (kernel_supports_any_contiguous_range): New.
9194 (aarch64_watchpoint_offset): New.
9195 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9196 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9197 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9198 (aarch64_align_watchpoint): New parameters aligned_offset_p and
9199 next_addr_orig_p. Support PR external/20207 watchpoints.
9200 (aarch64_downgrade_regs): New.
9201 (aarch64_dr_state_insert_one_point): New parameters offset and
9202 addr_orig.
9203 (aarch64_dr_state_remove_one_point): Likewise.
9204 (aarch64_handle_breakpoint): Update caller.
9205 (aarch64_handle_aligned_watchpoint): Likewise.
9206 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9207 aligned_offset.
9208 (aarch64_linux_set_debug_regs): Remove const from state. Call
9209 aarch64_downgrade_regs.
9210 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9211 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9212 (DR_CONTROL_MASK): ... this.
9213 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9214 (unsigned int aarch64_watchpoint_offset): New prototype.
9215 (aarch64_linux_set_debug_regs): Remove const from state.
9216 * utils.c (align_up, align_down): Move to ...
9217 * common/common-utils.c (align_up, align_down): ... here.
9218 * utils.h (align_up, align_down): Move to ...
9219 * common/common-utils.h (align_up, align_down): ... here.
9220
9221 2018-05-04 Joel Brobecker <brobecker@adacore.com>
9222
9223 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9224 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9225 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9226 Re-implement to match the ABI as summarized in GCC's
9227 gcc/config/sparc/sparc.c. All callers updated.
9228 (sparc32_store_arguments): Remove assertion.
9229
9230 2018-05-04 Tom Tromey <tom@tromey.com>
9231
9232 * printcmd.c: Don't include tui.h.
9233 (decode_format): Use skip_spaces.
9234
9235 2018-05-04 Tom Tromey <tom@tromey.com>
9236
9237 PR gdb/22619:
9238 * printcmd.c (last_count): New global.
9239 (x_command): Use saved count when repeating.
9240
9241 2018-05-04 Tom Tromey <tom@tromey.com>
9242
9243 * nto-procfs.c (do_closedir_cleanup): Remove.
9244 (procfs_pidlist): Use gdb_dir_up.
9245 * procfs.c (do_closedir_cleanup): Remove.
9246 (proc_update_threads): Use gdb_dir_up.
9247 * common/filestuff.h (struct gdb_dir_deleter): New.
9248 (gdb_dir_up): New typedef.
9249
9250 2018-05-04 Tom Tromey <tom@tromey.com>
9251
9252 * ada-lang.c (print_mention_exception): Use std::string.
9253
9254 2018-05-04 Tom Tromey <tom@tromey.com>
9255
9256 * ada-lang.c (create_excep_cond_exprs): Update.
9257 (ada_exception_catchpoint_cond_string): Use std::string.
9258
9259 2018-05-04 Tom Tromey <tom@tromey.com>
9260
9261 * ada-lang.c (xget_renaming_scope): Return std::string.
9262 (old_renaming_is_invisible): Update.
9263
9264 2018-05-04 Tom Tromey <tom@tromey.com>
9265
9266 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9267 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9268
9269 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
9270
9271 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9272
9273 2018-05-04 Tom Tromey <tom@tromey.com>
9274
9275 * remote.c (remote_query_supported_append): Change type.
9276 (remote_check_symbols): Update.
9277
9278 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
9279
9280 PR gdb/11420
9281 * configure.ac: Prepend libpython.
9282 * python/python-config.py: Likewise.
9283 * configure: Regenerate.
9284
9285 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
9286
9287 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9288
9289 2018-05-03 Pedro Alves <palves@redhat.com>
9290
9291 * s390-linux-nat.c
9292 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9293 override. Write 'true' instead of '1'.
9294 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9295 declaration.
9296
9297 2018-05-02 Pedro Alves <palves@redhat.com>
9298
9299 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9300 add_inf_child_target.
9301 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9302 add_inf_child_target.
9303 * aix-thread.c (aix_thread_target_info): New.
9304 (aix_thread_target) <shortname, longname, doc>: Delete.
9305 <info>: New.
9306 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9307 add_inf_child_target.
9308 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9309 add_inf_child_target.
9310 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9311 add_inf_child_target.
9312 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9313 add_inf_child_target.
9314 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9315 add_inf_child_target.
9316 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9317 add_inf_child_target.
9318 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9319 add_inf_child_target.
9320 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9321 add_inf_child_target.
9322 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9323 add_inf_child_target.
9324 * bfd-target.c (target_bfd_target_info): New.
9325 (target_bfd) <shortname, longname, doc>: Delete.
9326 <info>: New.
9327 * bsd-kvm.c (bsd_kvm_target_info): New.
9328 (bsd_kvm_target) <shortname, longname, doc>: Delete.
9329 <info>: New.
9330 (bsd_kvm_target::open): Rename to ...
9331 (bsd_kvm_target_open): ... this. Adjust.
9332 * bsd-uthread.c (bsd_uthread_target_info): New.
9333 (bsd_uthread_target) <shortname, longname, doc>: Delete.
9334 <info>: New.
9335 * corefile.c (core_file_command): Adjust.
9336 * corelow.c (core_target_info): New.
9337 (core_target) <shortname, longname, doc>: Delete.
9338 <info>: New.
9339 (core_target::open): Rename to ...
9340 (core_target_open): ... this. Adjust.
9341 * ctf.c (ctf_target_info): New.
9342 (ctf_target) <shortname, longname, doc>: Delete.
9343 <info>: New.
9344 (ctf_target::open): Rename to ...
9345 (ctf_target_open): ... this.
9346 (_initialize_ctf): Adjust.
9347 * exec.c (exec_target_info): New.
9348 (exec_target) <shortname, longname, doc>: Delete.
9349 <info>: New.
9350 (exec_target::open): Rename to ...
9351 (exec_target_open): ... this.
9352 * gdbcore.h (core_target_open): Declare.
9353 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9354 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9355 add_inf_child_target.
9356 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9357 add_inf_child_target.
9358 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9359 add_inf_child_target.
9360 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9361 add_inf_child_target.
9362 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9363 add_inf_child_target.
9364 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9365 add_inf_child_target.
9366 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9367 add_inf_child_target.
9368 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9369 add_inf_child_target.
9370 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9371 add_inf_child_target.
9372 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9373 add_inf_child_target.
9374 * inf-child.c (inf_child_target_info): New.
9375 (inf_child_target::info): New.
9376 (inf_child_open_target): Remove 'target' parameter. Use
9377 get_native_target instead.
9378 (inf_child_target::open): Delete.
9379 (add_inf_child_target): New.
9380 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9381 Delete.
9382 <info>: New.
9383 (add_inf_child_target): Declare.
9384 (inf_child_open_target): Declare.
9385 * linux-thread-db.c (thread_db_target_info): New.
9386 (thread_db_target) <shortname, longname, doc>: Delete.
9387 <info>: New.
9388 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9389 add_inf_child_target.
9390 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9391 add_inf_child_target.
9392 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9393 add_inf_child_target.
9394 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9395 add_inf_child_target.
9396 * make-target-delegates (print_class): Adjust.
9397 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9398 add_inf_child_target.
9399 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9400 add_inf_child_target.
9401 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9402 add_inf_child_target.
9403 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9404 add_inf_child_target.
9405 * nto-procfs.c (nto_native_target_info): New.
9406 (nto_procfs_target_native) <shortname, longname, doc>:
9407 Delete.
9408 <info>: New.
9409 (nto_procfs_target_info): New.
9410 (nto_procfs_target_procfs) <shortname, longname, doc>:
9411 Delete.
9412 <info>: New.
9413 (init_procfs_targets): Adjust.
9414 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9415 add_inf_child_target.
9416 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9417 add_inf_child_target.
9418 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9419 add_inf_child_target.
9420 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9421 add_inf_child_target.
9422 * ravenscar-thread.c (ravenscar_target_info): New.
9423 (ravenscar_thread_target) <shortname, longname, doc>:
9424 Delete.
9425 <info>: New.
9426 * record-btrace.c (record_btrace_target_info):
9427 (record_btrace_target) <shortname, longname, doc>: Delete.
9428 <info>: New.
9429 (record_btrace_target::open): Rename to ...
9430 (record_btrace_target_open): ... this. Adjust.
9431 * record-full.c (record_longname, record_doc): New.
9432 (record_full_base_target) <shortname, longname, doc>: Delete.
9433 <info>: New.
9434 (record_full_target_info): New.
9435 (record_full_target): <shortname>: Delete.
9436 <info>: New.
9437 (record_full_core_open_1, record_full_open_1): Update comments.
9438 (record_full_base_target::open): Rename to ...
9439 (record_full_open): ... this.
9440 (cmd_record_full_restore): Update.
9441 (_initialize_record_full): Update.
9442 * remote-sim.c (remote_sim_target_info): New.
9443 (gdbsim_target) <shortname, longname, doc>: Delete.
9444 <info>: New.
9445 (gdbsim_target::open): Rename to ...
9446 (gdbsim_target_open): ... this.
9447 (_initialize_remote_sim): Adjust.
9448 * remote.c (remote_doc): New.
9449 (remote_target_info): New.
9450 (remote_target) <shortname, longname, doc>: Delete.
9451 <info>: New.
9452 (extended_remote_target_info): New.
9453 (extended_remote_target) <shortname, longname, doc>: Delete.
9454 <info>: New.
9455 (remote_target::open_1): Make static. Adjust.
9456 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9457 * s390-linux-nat.c (_initialize_s390_nat): Use
9458 add_inf_child_target.
9459 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9460 add_inf_child_target.
9461 * sol-thread.c (thread_db_target_info): New.
9462 (sol_thread_target) <shortname, longname, doc>: Delete.
9463 <info>: New.
9464 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9465 add_inf_child_target.
9466 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9467 add_inf_child_target.
9468 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9469 add_inf_child_target.
9470 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9471 add_inf_child_target.
9472 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9473 add_inf_child_target.
9474 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9475 add_inf_child_target.
9476 * spu-linux-nat.c (_initialize_spu_nat): Use
9477 add_inf_child_target.
9478 * spu-multiarch.c (spu_multiarch_target_info): New.
9479 (spu_multiarch_target) <shortname, longname, doc>: Delete.
9480 <info>: New.
9481 * target-delegates.c: Regenerate.
9482 * target.c: Include <unordered_map>.
9483 (target_ops_p): Delete.
9484 (DEF_VEC_P(target_ops_p)): Delete.
9485 (target_factories): New.
9486 (test_target_info): New.
9487 (test_target_ops::info): New.
9488 (open_target): Adjust to use target_factories.
9489 (add_target_with_completer): Rename to ...
9490 (add_target): ... this. Change prototype. Register target_info
9491 and open callback in target_factories. Register target_info in
9492 command context instead of target_ops.
9493 (add_target): Delete old implementation.
9494 (add_deprecated_target_alias): Change prototype. Adjust.
9495 (the_native_target): New.
9496 (set_native_target, get_native_target): New.
9497 (find_default_run_target): Use the_native_target.
9498 (find_attach_target, find_run_target): Simplify.
9499 (target_ops::open): Delete.
9500 (dummy_target_info): New.
9501 (dummy_target::shortname, dummy_target::longname)
9502 (dummy_target::doc): Delete.
9503 (dummy_target::info): New.
9504 (debug_target::shortname, debug_target::longname)
9505 (debug_target::doc): Delete.
9506 (debug_target::info): New.
9507 * target.h (struct target_info): New.
9508 (target_ops::~target_ops): Add comment.
9509 (target_ops::info): New.
9510 (target_ops::shortname, target_ops::longname, target_ops::doc): No
9511 longer virtual. Implement in terms of target_info.
9512 (set_native_target, get_native_target): Declare.
9513 (target_open_ftype): New.
9514 (add_target, add_target_with_completer)
9515 (add_deprecated_target_alias): Change prototype.
9516 (test_target) <shortname, longname, doc>: Delete.
9517 <info>: New.
9518 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9519 add_inf_child_target.
9520 * tracefile-tfile.c (tfile_target_info): New.
9521 (tfile_target) <shortname, longname, doc>: Delete.
9522 <info>: New.
9523 (tfile_target::open): Rename to ...
9524 (tfile_target_open): ... this.
9525 (_initialize_tracefile_tfile): Adjust.
9526 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9527 add_inf_child_target.
9528 * windows-nat.c (_initialize_windows_nat): Use
9529 add_inf_child_target.
9530 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9531 add_inf_child_target.
9532
9533 2018-05-02 Pedro Alves <palves@redhat.com>
9534
9535 * linux-nat.h (linux_nat_target) <low_new_thread,
9536 low_delete_thread, low_new_fork, low_forget_process,
9537 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9538 New virtual methods.
9539 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9540 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9541 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9542 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9543 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9544 Delete.
9545 * linux-fork.c (delete_fork): Adjust to call low method.
9546 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9547 (linux_nat_new_fork, linux_nat_forget_process_hook)
9548 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9549 (linux_nat_status_is_event):
9550 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9551 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9552 to call low method.
9553 (sigtrap_is_event): Rename to ...
9554 (linux_nat_target::low_status_is_event): ... this.
9555 (linux_nat_set_status_is_event): Delete.
9556 (save_stop_reason, linux_nat_wait_1)
9557 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9558 low methods.
9559 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9560 (linux_nat_set_new_fork, linux_nat_set_forget_process)
9561 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9562 (linux_nat_set_prepare_to_resume): Delete.
9563 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9564 low virtual methods.
9565 * amd64-linux-nat.c: Likewise.
9566 * arm-linux-nat.c: Likewise.
9567 * i386-linux-nat.c: Likewise.
9568 * ia64-linux-nat.c: Likewise.
9569 * mips-linux-nat.c: Likewise.
9570 * ppc-linux-nat.c: Likewise.
9571 * s390-linux-nat.c: Likewise.
9572 * sparc64-linux-nat.c: Likewise.
9573 * x86-linux-nat.c: Likewise.
9574 * x86-linux-nat.h: Include "nat/x86-linux.h".
9575 (x86_linux_nat_target) <low_new_fork, low_forget_process,
9576 low_prepare_to_resume, low_new_thread, low_delete_thread>:
9577 Override methods.
9578
9579 2018-05-02 Pedro Alves <palves@redhat.com>
9580
9581 * target.h (target_ops)
9582 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9583 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9584 stopped_by_watchpoint, have_continuable_watchpoint,
9585 stopped_data_address, watchpoint_addr_within_range,
9586 can_accel_watchpoint_condition, can_run, thread_alive,
9587 has_all_memory, has_memory, has_stack, has_registers,
9588 has_execution, can_async_p, is_async_p, supports_non_stop,
9589 always_non_stop_p, can_execute_reverse, supports_multi_process,
9590 supports_enable_disable_tracepoint,
9591 supports_disable_randomization, supports_string_tracing,
9592 supports_evaluation_of_breakpoint_conditions,
9593 can_run_breakpoint_commands, filesystem_is_local,
9594 can_download_tracepoint, get_trace_state_variable_value,
9595 set_trace_notes, get_tib_address, use_agent, can_use_agent,
9596 record_is_replaying, record_will_replay,
9597 augmented_libraries_svr4_read>: Adjust to return bool.
9598 * aarch64-linux-nat.c: All implementations adjusted.
9599 * aix-thread.c: All implementations adjusted.
9600 * arm-linux-nat.c: All implementations adjusted.
9601 * breakpoint.c: All implementations adjusted.
9602 * bsd-kvm.c: All implementations adjusted.
9603 * bsd-uthread.c: All implementations adjusted.
9604 * corelow.c: All implementations adjusted.
9605 * ctf.c: All implementations adjusted.
9606 * darwin-nat.c: All implementations adjusted.
9607 * darwin-nat.h: All implementations adjusted.
9608 * exec.c: All implementations adjusted.
9609 * fbsd-nat.c: All implementations adjusted.
9610 * fbsd-nat.h: All implementations adjusted.
9611 * gnu-nat.c: All implementations adjusted.
9612 * gnu-nat.h: All implementations adjusted.
9613 * go32-nat.c: All implementations adjusted.
9614 * ia64-linux-nat.c: All implementations adjusted.
9615 * inf-child.c: All implementations adjusted.
9616 * inf-child.h: All implementations adjusted.
9617 * inf-ptrace.c: All implementations adjusted.
9618 * inf-ptrace.h: All implementations adjusted.
9619 * linux-nat.c: All implementations adjusted.
9620 * linux-nat.h: All implementations adjusted.
9621 * mips-linux-nat.c: All implementations adjusted.
9622 * nto-procfs.c: All implementations adjusted.
9623 * ppc-linux-nat.c: All implementations adjusted.
9624 * procfs.c: All implementations adjusted.
9625 * ravenscar-thread.c: All implementations adjusted.
9626 * record-btrace.c: All implementations adjusted.
9627 * record-full.c: All implementations adjusted.
9628 * remote-sim.c: All implementations adjusted.
9629 * remote.c: All implementations adjusted.
9630 * s390-linux-nat.c: All implementations adjusted.
9631 * sol-thread.c: All implementations adjusted.
9632 * spu-multiarch.c: All implementations adjusted.
9633 * target-delegates.c: All implementations adjusted.
9634 * target.c: All implementations adjusted.
9635 * target.h: All implementations adjusted.
9636 * tracefile-tfile.c: All implementations adjusted.
9637 * tracefile.c: All implementations adjusted.
9638 * tracefile.h: All implementations adjusted.
9639 * windows-nat.c: All implementations adjusted.
9640 * x86-linux-nat.h: All implementations adjusted.
9641 * x86-nat.h: All implementations adjusted.
9642
9643 2018-05-02 Pedro Alves <palves@redhat.com>
9644
9645 * make-target-delegates (scan_target_h): Don't trim lines here.
9646 Replace sequences of tabs and/or whitespace with a single
9647 whitespace.
9648 (top level, parsing methods): Trim each line before processing it
9649 here.
9650
9651 2018-05-02 Pedro Alves <palves@redhat.com>
9652 John Baldwin <jhb@freebsd.org>
9653
9654 * target.h (enum strata) <debug_stratum>: New.
9655 (struct target_ops) <all delegation methods>: Replace by C++
9656 virtual methods, and drop "to_" prefix. All references updated
9657 throughout.
9658 <to_shortname, to_longname, to_doc, to_data,
9659 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9660 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9661 virtual methods. All references updated throughout.
9662 <can_attach, supports_terminal_ours, can_create_inferior,
9663 get_thread_control_capabilities, attach_no_wait>: New
9664 virtual methods.
9665 <insert_breakpoint, remove_breakpoint>: Now
9666 TARGET_DEFAULT_NORETURN methods.
9667 <info_proc>: Now returns bool.
9668 <to_magic>: Delete.
9669 (OPS_MAGIC): Delete.
9670 (current_target): Delete. All references replaced by references
9671 to ...
9672 (target_stack): ... this. New.
9673 (target_shortname, target_longname): Adjust.
9674 (target_can_run): Now a function declaration.
9675 (default_child_has_all_memory, default_child_has_memory)
9676 (default_child_has_stack, default_child_has_registers)
9677 (default_child_has_execution): Remove target_ops parameter.
9678 (complete_target_initialization): Delete.
9679 (memory_breakpoint_target): New template class.
9680 (test_target_ops): Refactor as a C++ class with virtual methods.
9681 * make-target-delegates (NAME_PART): Tighten.
9682 (POINTER_PART, CP_SYMBOL): New.
9683 (SIMPLE_RETURN_PART): Reimplement.
9684 (VEC_RETURN_PART): Expect less.
9685 (RETURN_PART, VIRTUAL_PART): New.
9686 (METHOD): Adjust to C++ virtual methods.
9687 (scan_target_h): Remove reference to C99.
9688 (dname): Output "target_ops::" prefix.
9689 (write_function_header): Adjust to output a C++ class method.
9690 (write_declaration): New.
9691 (write_delegator): Adjust to output a C++ class method.
9692 (tdname): Output "dummy_target::" prefix.
9693 (write_tdefault, write_debugmethod): Adjust to output a C++ class
9694 method.
9695 (tdefault_names, debug_names): Delete.
9696 (return_types, tdefaults, styles, argtypes_array): New.
9697 (top level): All methods are delegators.
9698 (print_class): New.
9699 (top level): Print dummy_target and debug_target classes.
9700 * target-delegates.c: Regenerate.
9701 * target-debug.h (target_debug_print_enum_info_proc_what)
9702 (target_debug_print_thread_control_capabilities)
9703 (target_debug_print_thread_info_p): New.
9704 * target.c (dummy_target): Delete.
9705 (the_dummy_target, the_debug_target): New.
9706 (target_stack): Now extern.
9707 (set_targetdebug): Push/unpush debug target.
9708 (default_child_has_all_memory, default_child_has_memory)
9709 (default_child_has_stack, default_child_has_registers)
9710 (default_child_has_execution): Remove target_ops parameter.
9711 (complete_target_initialization): Delete.
9712 (add_target_with_completer): No longer call
9713 complete_target_initialization.
9714 (target_supports_terminal_ours): Use regular delegation.
9715 (update_current_target): Delete.
9716 (push_target): No longer check magic number. Don't call
9717 update_current_target.
9718 (unpush_target): Don't call update_current_target.
9719 (target_is_pushed): No longer check magic number.
9720 (target_require_runnable): Skip for all stratums over
9721 process_stratum.
9722 (target_ops::info_proc): New.
9723 (target_info_proc): Use find_target_at and
9724 find_default_run_target.
9725 (target_supports_disable_randomization): Use regular delegation.
9726 (target_get_osdata): Use find_target_at.
9727 (target_ops::open, target_ops::close, target_ops::can_attach)
9728 (target_ops::attach, target_ops::can_create_inferior)
9729 (target_ops::create_inferior, target_ops::can_run)
9730 (target_can_run): New.
9731 (default_fileio_target): Use regular delegation.
9732 (target_ops::fileio_open, target_ops::fileio_pwrite)
9733 (target_ops::fileio_pread, target_ops::fileio_fstat)
9734 (target_ops::fileio_close, target_ops::fileio_unlink)
9735 (target_ops::fileio_readlink): New.
9736 (target_fileio_open_1, target_fileio_unlink)
9737 (target_fileio_readlink): Always call the target method. Handle
9738 FILEIO_ENOSYS.
9739 (return_zero, return_zero_has_execution): Delete.
9740 (init_dummy_target): Delete.
9741 (dummy_target::dummy_target, dummy_target::shortname)
9742 (dummy_target::longname, dummy_target::doc)
9743 (debug_target::debug_target, debug_target::shortname)
9744 (debug_target::longname, debug_target::doc): New.
9745 (target_supports_delete_record): Use regular delegation.
9746 (setup_target_debug): Delete.
9747 (maintenance_print_target_stack): Skip debug_stratum.
9748 (initialize_targets): Instantiate the_dummy_target and
9749 the_debug_target.
9750 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
9751 use target_stack.
9752 (target_auxv_search, fprint_target_auxv): Adjust.
9753 (info_auxv_command): Adjust to use target_stack.
9754 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9755 * exceptions.c (print_flush): Handle a NULL target_stack.
9756 * regcache.c (target_ops_no_register): Refactor as class with
9757 virtual methods.
9758
9759 * exec.c (exec_target): New class.
9760 (exec_ops): Now an exec_target.
9761 (exec_open, exec_close_1, exec_get_section_table)
9762 (exec_xfer_partial, exec_files_info, exec_has_memory)
9763 (exec_make_note_section): Refactor as exec_target methods.
9764 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9765 Delete.
9766 (exec_target::find_memory_regions): New.
9767 (_initialize_exec): Don't call init_exec_ops.
9768 * gdbcore.h (exec_file_clear): Delete.
9769
9770 * corefile.c (core_target): Delete.
9771 (core_file_command): Adjust.
9772 * corelow.c (core_target): New class.
9773 (the_core_target): New.
9774 (core_close): Remove target_ops parameter.
9775 (core_close_cleanup): Adjust.
9776 (core_target::close): New.
9777 (core_open, core_detach, get_core_registers, core_files_info)
9778 (core_xfer_partial, core_thread_alive, core_read_description)
9779 (core_pid_to_str, core_thread_name, core_has_memory)
9780 (core_has_stack, core_has_registers, core_info_proc): Rework as
9781 core_target methods.
9782 (ignore, core_remove_breakpoint, init_core_ops): Delete.
9783 (_initialize_corelow): Initialize the_core_target.
9784 * gdbcore.h (core_target): Delete.
9785 (the_core_target): New.
9786
9787 * ctf.c: (ctf_target): New class.
9788 (ctf_ops): Now a ctf_target.
9789 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9790 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9791 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9792 methods.
9793 (init_ctf_ops): Delete.
9794 (_initialize_ctf): Don't call it.
9795 * tracefile-tfile.c (tfile_target): New class.
9796 (tfile_ops): Now a tfile_target.
9797 (tfile_open, tfile_close, tfile_files_info)
9798 (tfile_get_tracepoint_status, tfile_trace_find)
9799 (tfile_fetch_registers, tfile_xfer_partial)
9800 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9801 Refactor as tfile_target methods.
9802 (tfile_xfer_partial_features): Remove target_ops parameter.
9803 (init_tfile_ops): Delete.
9804 (_initialize_tracefile_tfile): Don't call it.
9805 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9806 (tracefile_has_stack, tracefile_has_registers)
9807 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9808 tracefile_target methods.
9809 (init_tracefile_ops): Delete.
9810 (tracefile_target::tracefile_target): New.
9811 * tracefile.h: Include "target.h".
9812 (tracefile_target): New class.
9813 (init_tracefile_ops): Delete.
9814
9815 * spu-multiarch.c (spu_multiarch_target): New class.
9816 (spu_ops): Now a spu_multiarch_target.
9817 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9818 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9819 (spu_search_memory, spu_mourn_inferior): Refactor as
9820 spu_multiarch_target methods.
9821 (init_spu_ops): Delete.
9822 (_initialize_spu_multiarch): Remove references to init_spu_ops,
9823 complete_target_initialization.
9824
9825 * ravenscar-thread.c (ravenscar_thread_target): New class.
9826 (ravenscar_ops): Now a ravenscar_thread_target.
9827 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9828 (ravenscar_thread_alive, ravenscar_pid_to_str)
9829 (ravenscar_fetch_registers, ravenscar_store_registers)
9830 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9831 (ravenscar_stopped_by_hw_breakpoint)
9832 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9833 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9834 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9835 methods.
9836 (init_ravenscar_thread_ops): Delete.
9837 (_initialize_ravenscar): Remove references to
9838 init_ravenscar_thread_ops and complete_target_initialization.
9839
9840 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9841 (bsd_uthread_target): New class.
9842 (bsd_uthread_ops): Now a bsd_uthread_target.
9843 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9844 (bsd_uthread_close, bsd_uthread_mourn_inferior)
9845 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9846 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9847 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9848 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9849 (bsd_uthread_target): Delete function.
9850 (_initialize_bsd_uthread): Remove reference to
9851 complete_target_initialization.
9852
9853 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
9854 (target_bfd): ... this new class.
9855 (target_bfd_xfer_partial, target_bfd_get_section_table)
9856 (target_bfd_close): Refactor as target_bfd methods.
9857 (target_bfd::~target_bfd): New.
9858 (target_bfd_reopen): Adjust.
9859 (target_bfd::close): New.
9860
9861 * record-btrace.c (record_btrace_target): New class.
9862 (record_btrace_ops): Now a record_btrace_target.
9863 (record_btrace_open, record_btrace_stop_recording)
9864 (record_btrace_disconnect, record_btrace_close)
9865 (record_btrace_async, record_btrace_info)
9866 (record_btrace_insn_history, record_btrace_insn_history_range)
9867 (record_btrace_insn_history_from, record_btrace_call_history)
9868 (record_btrace_call_history_range)
9869 (record_btrace_call_history_from, record_btrace_record_method)
9870 (record_btrace_is_replaying, record_btrace_will_replay)
9871 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9872 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9873 (record_btrace_store_registers, record_btrace_prepare_to_store)
9874 (record_btrace_to_get_unwinder)
9875 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9876 (record_btrace_commit_resume, record_btrace_wait)
9877 (record_btrace_stop, record_btrace_can_execute_reverse)
9878 (record_btrace_stopped_by_sw_breakpoint)
9879 (record_btrace_supports_stopped_by_sw_breakpoint)
9880 (record_btrace_stopped_by_hw_breakpoint)
9881 (record_btrace_supports_stopped_by_hw_breakpoint)
9882 (record_btrace_update_thread_list, record_btrace_thread_alive)
9883 (record_btrace_goto_begin, record_btrace_goto_end)
9884 (record_btrace_goto, record_btrace_stop_replaying_all)
9885 (record_btrace_execution_direction)
9886 (record_btrace_prepare_to_generate_core)
9887 (record_btrace_done_generating_core): Refactor as
9888 record_btrace_target methods.
9889 (init_record_btrace_ops): Delete.
9890 (_initialize_record_btrace): Remove reference to
9891 init_record_btrace_ops.
9892 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9893 the execution_direction global.
9894 (record_full_base_target, record_full_target)
9895 (record_full_core_target): New classes.
9896 (record_full_ops): Now a record_full_target.
9897 (record_full_core_ops): Now a record_full_core_target.
9898 (record_full_target::detach, record_full_target::disconnect)
9899 (record_full_core_target::disconnect)
9900 (record_full_target::mourn_inferior, record_full_target::kill):
9901 New.
9902 (record_full_open, record_full_close, record_full_async): Refactor
9903 as methods of the record_full_base_target class.
9904 (record_full_resume, record_full_commit_resume): Refactor
9905 as methods of the record_full_target class.
9906 (record_full_wait, record_full_stopped_by_watchpoint)
9907 (record_full_stopped_data_address)
9908 (record_full_stopped_by_sw_breakpoint)
9909 (record_full_supports_stopped_by_sw_breakpoint)
9910 (record_full_stopped_by_hw_breakpoint)
9911 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9912 methods of the record_full_base_target class.
9913 (record_full_store_registers, record_full_xfer_partial)
9914 (record_full_insert_breakpoint, record_full_remove_breakpoint):
9915 Refactor as methods of the record_full_target class.
9916 (record_full_can_execute_reverse, record_full_get_bookmark)
9917 (record_full_goto_bookmark, record_full_execution_direction)
9918 (record_full_record_method, record_full_info, record_full_delete)
9919 (record_full_is_replaying, record_full_will_replay)
9920 (record_full_goto_begin, record_full_goto_end, record_full_goto)
9921 (record_full_stop_replaying): Refactor as methods of the
9922 record_full_base_target class.
9923 (record_full_core_resume, record_full_core_kill)
9924 (record_full_core_fetch_registers)
9925 (record_full_core_prepare_to_store)
9926 (record_full_core_store_registers, record_full_core_xfer_partial)
9927 (record_full_core_insert_breakpoint)
9928 (record_full_core_remove_breakpoint)
9929 (record_full_core_has_execution): Refactor
9930 as methods of the record_full_core_target class.
9931 (record_full_base_target::supports_delete_record): New.
9932 (init_record_full_ops): Delete.
9933 (init_record_full_core_ops): Delete.
9934 (record_full_save): Refactor as method of the
9935 record_full_base_target class.
9936 (_initialize_record_full): Remove references to
9937 init_record_full_ops and init_record_full_core_ops.
9938
9939 * remote.c (remote_target, extended_remote_target): New classes.
9940 (remote_ops): Now a remote_target.
9941 (extended_remote_ops): Now an extended_remote_target.
9942 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9943 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9944 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9945 (remote_pass_signals, remote_set_syscall_catchpoint)
9946 (remote_program_signals, )
9947 (remote_thread_always_alive): Remove target_ops parameter.
9948 (remote_thread_alive, remote_thread_name)
9949 (remote_update_thread_list, remote_threads_extra_info)
9950 (remote_static_tracepoint_marker_at)
9951 (remote_static_tracepoint_markers_by_strid)
9952 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9953 (remote_open): Refactor as methods of remote_target.
9954 (extended_remote_open, extended_remote_detach)
9955 (extended_remote_attach, extended_remote_post_attach):
9956 (extended_remote_supports_disable_randomization)
9957 (extended_remote_create_inferior): : Refactor as method of
9958 extended_remote_target.
9959 (remote_set_permissions, remote_open_1, remote_detach)
9960 (remote_follow_fork, remote_follow_exec, remote_disconnect)
9961 (remote_resume, remote_commit_resume, remote_stop)
9962 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9963 (remote_terminal_ours, remote_wait, remote_fetch_registers)
9964 (remote_prepare_to_store, remote_store_registers)
9965 (remote_flash_erase, remote_flash_done, remote_files_info)
9966 (remote_kill, remote_mourn, remote_insert_breakpoint)
9967 (remote_remove_breakpoint, remote_insert_watchpoint)
9968 (remote_watchpoint_addr_within_range)
9969 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9970 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9971 (remote_supports_stopped_by_sw_breakpoint)
9972 (remote_stopped_by_hw_breakpoint)
9973 (remote_supports_stopped_by_hw_breakpoint)
9974 (remote_stopped_by_watchpoint, remote_stopped_data_address)
9975 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9976 (remote_verify_memory): Refactor as methods of remote_target.
9977 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9978 parameter.
9979 (remote_xfer_partial, remote_get_memory_xfer_limit)
9980 (remote_search_memory, remote_rcmd, remote_memory_map)
9981 (remote_pid_to_str, remote_get_thread_local_address)
9982 (remote_get_tib_address, remote_read_description): Refactor as
9983 methods of remote_target.
9984 (remote_target::fileio_open, remote_target::fileio_pwrite)
9985 (remote_target::fileio_pread, remote_target::fileio_close): New.
9986 (remote_hostio_readlink, remote_hostio_fstat)
9987 (remote_filesystem_is_local, remote_can_execute_reverse)
9988 (remote_supports_non_stop, remote_supports_disable_randomization)
9989 (remote_supports_multi_process, remote_supports_cond_breakpoints)
9990 (remote_supports_enable_disable_tracepoint)
9991 (remote_supports_string_tracing)
9992 (remote_can_run_breakpoint_commands, remote_trace_init)
9993 (remote_download_tracepoint, remote_can_download_tracepoint)
9994 (remote_download_trace_state_variable, remote_enable_tracepoint)
9995 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9996 (remote_trace_start, remote_get_trace_status)
9997 (remote_get_tracepoint_status, remote_trace_stop)
9998 (remote_trace_find, remote_get_trace_state_variable_value)
9999 (remote_save_trace_data, remote_get_raw_trace_data)
10000 (remote_set_disconnected_tracing, remote_core_of_thread)
10001 (remote_set_circular_trace_buffer, remote_traceframe_info)
10002 (remote_get_min_fast_tracepoint_insn_len)
10003 (remote_set_trace_buffer_size, remote_set_trace_notes)
10004 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10005 (remote_disable_btrace, remote_teardown_btrace)
10006 (remote_read_btrace, remote_btrace_conf)
10007 (remote_augmented_libraries_svr4_read, remote_load)
10008 (remote_pid_to_exec_file, remote_can_do_single_step)
10009 (remote_execution_direction, remote_thread_handle_to_thread_info):
10010 Refactor as methods of remote_target.
10011 (init_remote_ops, init_extended_remote_ops): Delete.
10012 (remote_can_async_p, remote_is_async_p, remote_async)
10013 (remote_thread_events, remote_upload_tracepoints)
10014 (remote_upload_trace_state_variables): Refactor as methods of
10015 remote_target.
10016 (_initialize_remote): Remove references to init_remote_ops and
10017 init_extended_remote_ops.
10018
10019 * remote-sim.c (gdbsim_target): New class.
10020 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10021 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10022 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10023 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10024 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10025 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10026 Refactor as methods of gdbsim_target.
10027 (gdbsim_ops): Now a gdbsim_target.
10028 (init_gdbsim_ops): Delete.
10029 (gdbsim_cntrl_c): Adjust.
10030 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10031
10032 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10033 (the_amd64_linux_nat_target): New.
10034 (amd64_linux_fetch_inferior_registers)
10035 (amd64_linux_store_inferior_registers): Refactor as methods of
10036 amd64_linux_nat_target.
10037 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
10038 * i386-linux-nat.c: Don't include "linux-nat.h".
10039 (i386_linux_nat_target): New class.
10040 (the_i386_linux_nat_target): New.
10041 (i386_linux_fetch_inferior_registers)
10042 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10043 as methods of i386_linux_nat_target.
10044 (_initialize_i386_linux_nat): Adjust. Set linux_target.
10045 * inf-child.c (inf_child_ops): Delete.
10046 (inf_child_fetch_inferior_registers)
10047 (inf_child_store_inferior_registers): Delete.
10048 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10049 methods of inf_child_target.
10050 (inf_child_target::supports_terminal_ours)
10051 (inf_child_target::terminal_init)
10052 (inf_child_target::terminal_inferior)
10053 (inf_child_target::terminal_ours_for_output)
10054 (inf_child_target::terminal_ours, inf_child_target::interrupt)
10055 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10056 New.
10057 (inf_child_open, inf_child_disconnect, inf_child_close)
10058 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10059 (inf_child_post_startup_inferior, inf_child_can_run)
10060 (inf_child_pid_to_exec_file): Refactor as methods of
10061 inf_child_target.
10062 (inf_child_follow_fork): Delete.
10063 (inf_child_target::can_create_inferior)
10064 (inf_child_target::can_attach): New.
10065 (inf_child_target::has_all_memory, inf_child_target::has_memory)
10066 (inf_child_target::has_stack, inf_child_target::has_registers)
10067 (inf_child_target::has_execution): New.
10068 (inf_child_fileio_open, inf_child_fileio_pwrite)
10069 (inf_child_fileio_pread, inf_child_fileio_fstat)
10070 (inf_child_fileio_close, inf_child_fileio_unlink)
10071 (inf_child_fileio_readlink, inf_child_use_agent)
10072 (inf_child_can_use_agent): Refactor as methods of
10073 inf_child_target.
10074 (return_zero, inf_child_target): Delete.
10075 (inf_child_target::inf_child_target): New.
10076 * inf-child.h: Include "target.h".
10077 (inf_child_target): Delete function prototype.
10078 (inf_child_target): New class.
10079 (inf_child_open_target, inf_child_mourn_inferior)
10080 (inf_child_maybe_unpush_target): Delete.
10081 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10082 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10083 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10084 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10085 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10086 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10087 (inf_ptrace_wait, inf_ptrace_xfer_partial)
10088 (inf_ptrace_thread_alive, inf_ptrace_files_info)
10089 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10090 methods of inf_ptrace_target.
10091 (inf_ptrace_target): Delete function.
10092 * inf-ptrace.h: Include "inf-child.h".
10093 (inf_ptrace_target): Delete function declaration.
10094 (inf_ptrace_target): New class.
10095 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10096 * linux-nat.c (linux_target): New.
10097 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10098 (linux_nat_target::~linux_nat_target): New.
10099 (linux_child_post_attach, linux_child_post_startup_inferior)
10100 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10101 (linux_child_remove_fork_catchpoint)
10102 (linux_child_insert_vfork_catchpoint)
10103 (linux_child_remove_vfork_catchpoint)
10104 (linux_child_insert_exec_catchpoint)
10105 (linux_child_remove_exec_catchpoint)
10106 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10107 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10108 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10109 (linux_nat_stopped_data_address)
10110 (linux_nat_stopped_by_sw_breakpoint)
10111 (linux_nat_supports_stopped_by_sw_breakpoint)
10112 (linux_nat_stopped_by_hw_breakpoint)
10113 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10114 (linux_nat_kill, linux_nat_mourn_inferior)
10115 (linux_nat_xfer_partial, linux_nat_thread_alive)
10116 (linux_nat_update_thread_list, linux_nat_pid_to_str)
10117 (linux_nat_thread_name, linux_child_pid_to_exec_file)
10118 (linux_child_static_tracepoint_markers_by_strid)
10119 (linux_nat_is_async_p, linux_nat_can_async_p)
10120 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10121 (linux_nat_supports_multi_process)
10122 (linux_nat_supports_disable_randomization, linux_nat_async)
10123 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10124 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10125 (linux_nat_fileio_open, linux_nat_fileio_readlink)
10126 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10127 methods of linux_nat_target.
10128 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10129 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10130 parameter.
10131 (check_stopped_by_watchpoint): Adjust.
10132 (linux_xfer_partial): Delete.
10133 (linux_target_install_ops, linux_target, linux_nat_add_target):
10134 Delete.
10135 (linux_nat_target::linux_nat_target): New.
10136 * linux-nat.h: Include "inf-ptrace.h".
10137 (linux_nat_target): New.
10138 (linux_target, linux_target_install_ops, linux_nat_add_target):
10139 Delete function declarations.
10140 (linux_target): Declare global.
10141 * linux-thread-db.c (thread_db_target): New.
10142 (thread_db_target::thread_db_target): New.
10143 (thread_db_ops): Delete.
10144 (the_thread_db_target): New.
10145 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10146 (thread_db_update_thread_list, thread_db_pid_to_str)
10147 (thread_db_extra_thread_info)
10148 (thread_db_thread_handle_to_thread_info)
10149 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10150 (thread_db_resume): Refactor as methods of thread_db_target.
10151 (init_thread_db_ops): Delete.
10152 (_initialize_thread_db): Remove reference to init_thread_db_ops.
10153 * x86-linux-nat.c: Don't include "linux-nat.h".
10154 (super_post_startup_inferior): Delete.
10155 (x86_linux_nat_target::~x86_linux_nat_target): New.
10156 (x86_linux_child_post_startup_inferior)
10157 (x86_linux_read_description, x86_linux_enable_btrace)
10158 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10159 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10160 methods of x86_linux_nat_target.
10161 (x86_linux_create_target): Delete. Bits folded ...
10162 (x86_linux_add_target): ... here. Now takes a linux_nat_target
10163 pointer.
10164 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10165 (x86_linux_nat_target): New class.
10166 (x86_linux_create_target): Delete.
10167 (x86_linux_add_target): Now takes a linux_nat_target pointer.
10168 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10169 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10170 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10171 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10172 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10173 make extern.
10174 (x86_use_watchpoints): Delete.
10175 * x86-nat.h: Include "breakpoint.h" and "target.h".
10176 (x86_use_watchpoints): Delete.
10177 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10178 (x86_stopped_by_watchpoint, x86_stopped_data_address)
10179 (x86_insert_watchpoint, x86_remove_watchpoint)
10180 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10181 (x86_stopped_by_hw_breakpoint): New declarations.
10182 (x86_nat_target): New template class.
10183
10184 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10185 (the_ppc_linux_nat_target): New.
10186 (ppc_linux_fetch_inferior_registers)
10187 (ppc_linux_can_use_hw_breakpoint)
10188 (ppc_linux_region_ok_for_hw_watchpoint)
10189 (ppc_linux_ranged_break_num_registers)
10190 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10191 (ppc_linux_insert_mask_watchpoint)
10192 (ppc_linux_remove_mask_watchpoint)
10193 (ppc_linux_can_accel_watchpoint_condition)
10194 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10195 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10196 (ppc_linux_watchpoint_addr_within_range)
10197 (ppc_linux_masked_watch_num_registers)
10198 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10199 (ppc_linux_read_description): Refactor as methods of
10200 ppc_linux_nat_target.
10201 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
10202
10203 * procfs.c (procfs_xfer_partial): Delete forward declaration.
10204 (procfs_target): New class.
10205 (the_procfs_target): New.
10206 (procfs_target): Delete function.
10207 (procfs_auxv_parse, procfs_attach, procfs_detach)
10208 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10209 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10210 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10211 (procfs_create_inferior, procfs_update_thread_list)
10212 (procfs_thread_alive, procfs_pid_to_str)
10213 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10214 (procfs_stopped_data_address, procfs_insert_watchpoint)
10215 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10216 (proc_find_memory_regions, procfs_info_proc)
10217 (procfs_make_note_section): Refactor as methods of procfs_target.
10218 (_initialize_procfs): Adjust.
10219 * sol-thread.c (sol_thread_target): New class.
10220 (sol_thread_ops): Now a sol_thread_target.
10221 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10222 (sol_thread_fetch_registers, sol_thread_store_registers)
10223 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10224 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10225 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10226 (init_sol_thread_ops): Delete.
10227 (_initialize_sol_thread): Adjust. Remove references to
10228 init_sol_thread_ops and complete_target_initialization.
10229
10230 * windows-nat.c (windows_nat_target): New class.
10231 (windows_fetch_inferior_registers)
10232 (windows_store_inferior_registers, windows_resume, windows_wait)
10233 (windows_attach, windows_detach, windows_pid_to_exec_file)
10234 (windows_files_info, windows_create_inferior)
10235 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10236 (windows_close, windows_pid_to_str, windows_xfer_partial)
10237 (windows_get_tib_address, windows_get_ada_task_ptid)
10238 (windows_thread_name, windows_thread_alive): Refactor as
10239 windows_nat_target methods.
10240 (do_initial_windows_stuff): Adjust.
10241 (windows_target): Delete function.
10242 (_initialize_windows_nat): Adjust.
10243
10244 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10245 (darwin_mourn_inferior, darwin_kill_inferior)
10246 (darwin_create_inferior, darwin_attach, darwin_detach)
10247 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10248 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10249 (darwin_supports_multi_process): Refactor as darwin_nat_target
10250 methods.
10251 (darwin_resume_to, darwin_files_info): Delete.
10252 (_initialize_darwin_inferior): Rename to ...
10253 (_initialize_darwin_nat): ... this. Adjust to C++ification.
10254 * darwin-nat.h: Include "inf-child.h".
10255 (darwin_nat_target): New class.
10256 (darwin_complete_target): Delete.
10257 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10258 (darwin_target): New.
10259 (i386_darwin_fetch_inferior_registers)
10260 (i386_darwin_store_inferior_registers): Refactor as methods of
10261 darwin_nat_target.
10262 (darwin_complete_target): Delete, with ...
10263 (_initialize_i386_darwin_nat): ... bits factored out here.
10264
10265 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10266 (the_alpha_linux_nat_target): New.
10267 (alpha_linux_register_u_offset): Refactor as
10268 alpha_linux_nat_target method.
10269 (_initialize_alpha_linux_nat): Adjust.
10270 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10271 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10272 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10273 methods of linux_nat_trad_target.
10274 (linux_trad_target): Delete.
10275 * linux-nat-trad.h (linux_trad_target): Delete function.
10276 (linux_nat_trad_target): New class.
10277 * mips-linux-nat.c (mips_linux_nat_target): New class.
10278 (super_fetch_registers, super_store_registers, super_close):
10279 Delete.
10280 (the_mips_linux_nat_target): New.
10281 (mips64_linux_regsets_fetch_registers)
10282 (mips64_linux_regsets_store_registers)
10283 (mips64_linux_fetch_registers, mips64_linux_store_registers)
10284 (mips_linux_register_u_offset, mips_linux_read_description)
10285 (mips_linux_can_use_hw_breakpoint)
10286 (mips_linux_stopped_by_watchpoint)
10287 (mips_linux_stopped_data_address)
10288 (mips_linux_region_ok_for_hw_watchpoint)
10289 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10290 (mips_linux_close): Refactor as methods of mips_linux_nat.
10291 (_initialize_mips_linux_nat): Adjust to C++ification.
10292
10293 * aix-thread.c (aix_thread_target): New class.
10294 (aix_thread_ops): Now an aix_thread_target.
10295 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10296 (aix_thread_fetch_registers, aix_thread_store_registers)
10297 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10298 (aix_thread_thread_alive, aix_thread_pid_to_str)
10299 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10300 Refactor as methods of aix_thread_target.
10301 (init_aix_thread_ops): Delete.
10302 (_initialize_aix_thread): Remove references to init_aix_thread_ops
10303 and complete_target_initialization.
10304 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10305 (rs6000_nat_target): New class.
10306 (the_rs6000_nat_target): New.
10307 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10308 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10309 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10310 (super_create_inferior): Delete.
10311 (_initialize_rs6000_nat): Adjust to C++ification.
10312
10313 * arm-linux-nat.c (arm_linux_nat_target): New class.
10314 (the_arm_linux_nat_target): New.
10315 (arm_linux_fetch_inferior_registers)
10316 (arm_linux_store_inferior_registers, arm_linux_read_description)
10317 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10318 (arm_linux_remove_hw_breakpoint)
10319 (arm_linux_region_ok_for_hw_watchpoint)
10320 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10321 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10322 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10323 arm_linux_nat_target.
10324 (_initialize_arm_linux_nat): Adjust to C++ification.
10325
10326 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10327 (the_aarch64_linux_nat_target): New.
10328 (aarch64_linux_fetch_inferior_registers)
10329 (aarch64_linux_store_inferior_registers)
10330 (aarch64_linux_child_post_startup_inferior)
10331 (aarch64_linux_read_description)
10332 (aarch64_linux_can_use_hw_breakpoint)
10333 (aarch64_linux_insert_hw_breakpoint)
10334 (aarch64_linux_remove_hw_breakpoint)
10335 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10336 (aarch64_linux_region_ok_for_hw_watchpoint)
10337 (aarch64_linux_stopped_data_address)
10338 (aarch64_linux_stopped_by_watchpoint)
10339 (aarch64_linux_watchpoint_addr_within_range)
10340 (aarch64_linux_can_do_single_step): Refactor as methods of
10341 aarch64_linux_nat_target.
10342 (super_post_startup_inferior): Delete.
10343 (_initialize_aarch64_linux_nat): Adjust to C++ification.
10344
10345 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10346 (the_hppa_linux_nat_target): New.
10347 (hppa_linux_fetch_inferior_registers)
10348 (hppa_linux_store_inferior_registers): Refactor as methods of
10349 hppa_linux_nat_target.
10350 (_initialize_hppa_linux_nat): Adjust to C++ification.
10351
10352 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10353 (the_ia64_linux_nat_target): New.
10354 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10355 (ia64_linux_stopped_data_address)
10356 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10357 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10358 ia64_linux_nat_target methods.
10359 (super_xfer_partial): Delete.
10360 (_initialize_ia64_linux_nat): Adjust to C++ification.
10361
10362 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10363 (the_m32r_linux_nat_target): New.
10364 (m32r_linux_fetch_inferior_registers)
10365 (m32r_linux_store_inferior_registers): Refactor as
10366 m32r_linux_nat_target methods.
10367 (_initialize_m32r_linux_nat): Adjust to C++ification.
10368
10369 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10370 (the_m68k_linux_nat_target): New.
10371 (m68k_linux_fetch_inferior_registers)
10372 (m68k_linux_store_inferior_registers): Refactor as
10373 m68k_linux_nat_target methods.
10374 (_initialize_m68k_linux_nat): Adjust to C++ification.
10375
10376 * s390-linux-nat.c (s390_linux_nat_target): New class.
10377 (the_s390_linux_nat_target): New.
10378 (s390_linux_fetch_inferior_registers)
10379 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10380 (s390_insert_watchpoint, s390_remove_watchpoint)
10381 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10382 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10383 (s390_auxv_parse, s390_read_description): Refactor as methods of
10384 s390_linux_nat_target.
10385 (_initialize_s390_nat): Adjust to C++ification.
10386
10387 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10388 (the_sparc_linux_nat_target): New.
10389 (_initialize_sparc_linux_nat): Adjust to C++ification.
10390 * sparc-nat.c (sparc_fetch_inferior_registers)
10391 (sparc_store_inferior_registers): Remove target_ops parameter.
10392 * sparc-nat.h (sparc_fetch_inferior_registers)
10393 (sparc_store_inferior_registers): Remove target_ops parameter.
10394 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10395 (the_sparc64_linux_nat_target): New.
10396 (_initialize_sparc64_linux_nat): Adjust to C++ification.
10397
10398 * spu-linux-nat.c (spu_linux_nat_target): New class.
10399 (the_spu_linux_nat_target): New.
10400 (spu_child_post_startup_inferior, spu_child_post_attach)
10401 (spu_child_wait, spu_fetch_inferior_registers)
10402 (spu_store_inferior_registers, spu_xfer_partial)
10403 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10404 methods.
10405 (_initialize_spu_nat): Adjust to C++ification.
10406
10407 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10408 (the_tilegx_linux_nat_target): New.
10409 (fetch_inferior_registers, store_inferior_registers):
10410 Refactor as methods.
10411 (_initialize_tile_linux_nat): Adjust to C++ification.
10412
10413 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10414 (the_xtensa_linux_nat_target): New.
10415 (xtensa_linux_fetch_inferior_registers)
10416 (xtensa_linux_store_inferior_registers): Refactor as
10417 xtensa_linux_nat_target methods.
10418 (_initialize_xtensa_linux_nat): Adjust to C++ification.
10419
10420 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10421 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10422 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10423 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10424 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10425 (fbsd_stopped_by_sw_breakpoint)
10426 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10427 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10428 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10429 (fbsd_post_startup_inferior, fbsd_post_attach)
10430 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10431 (fbsd_set_syscall_catchpoint)
10432 (super_xfer_partial, super_resume, super_wait)
10433 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10434 (fbsd_handle_debug_trap): Remove target_ops parameter.
10435 (fbsd_nat_add_target): Delete.
10436 * fbsd-nat.h: Include "inf-ptrace.h".
10437 (fbsd_nat_add_target): Delete.
10438 (USE_SIGTRAP_SIGINFO): Define.
10439 (fbsd_nat_target): New class.
10440
10441 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10442 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10443 (amd64bsd_target): Delete.
10444 * amd64-bsd-nat.h: New file.
10445 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10446 "x86-bsd-nat.h".
10447 (amd64_fbsd_nat_target): New class.
10448 (the_amd64_fbsd_nat_target): New.
10449 (amd64fbsd_read_description): Refactor as method of
10450 amd64_fbsd_nat_target.
10451 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10452 (_initialize_amd64fbsd_nat): Adjust to C++ification.
10453 * amd64-nat.h (amd64bsd_target): Delete function declaration.
10454 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10455 (i386bsd_store_inferior_registers): Remove target_ops parameter.
10456 (i386bsd_target): Delete.
10457 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10458 (i386bsd_fetch_inferior_registers)
10459 (i386bsd_store_inferior_registers): Declare.
10460 (i386_bsd_nat_target): New class.
10461 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10462 (the_i386_fbsd_nat_target): New.
10463 (i386fbsd_resume, i386fbsd_read_description): Refactor as
10464 i386_fbsd_nat_target methods.
10465 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10466 (_initialize_i386fbsd_nat): Adjust to C++ification.
10467 * x86-bsd-nat.c (super_mourn_inferior): Delete.
10468 (x86bsd_mourn_inferior, x86bsd_target): Delete.
10469 (_initialize_x86_bsd_nat): Adjust to C++ification.
10470 * x86-bsd-nat.h: Include "x86-nat.h".
10471 (x86bsd_target): Delete declaration.
10472 (x86bsd_nat_target): New class.
10473
10474 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10475 (the_aarch64_fbsd_nat_target): New.
10476 (aarch64_fbsd_fetch_inferior_registers)
10477 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10478 aarch64_fbsd_nat_target.
10479 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10480 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10481 (the_alpha_bsd_nat_target): New.
10482 (alphabsd_fetch_inferior_registers)
10483 (alphabsd_store_inferior_registers): Refactor as
10484 alpha_bsd_nat_target methods.
10485 (_initialize_alphabsd_nat): Refactor as methods of
10486 alpha_bsd_nat_target.
10487 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10488 (the_amd64_nbsd_nat_target): New.
10489 (_initialize_amd64nbsd_nat): Adjust to C++ification.
10490 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10491 (the_amd64_obsd_nat_target): New.
10492 (_initialize_amd64obsd_nat): Adjust to C++ification.
10493 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10494 (the_arm_fbsd_nat_target): New.
10495 (arm_fbsd_fetch_inferior_registers)
10496 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10497 (_initialize_arm_fbsd_nat): Refactor as methods of
10498 arm_fbsd_nat_target.
10499 (_initialize_arm_fbsd_nat): Adjust to C++ification.
10500 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10501 (the_arm_netbsd_nat_target): New.
10502 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10503 arm_netbsd_nat_target.
10504 (_initialize_arm_netbsd_nat): Adjust to C++ification.
10505 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10506 (the_hppa_nbsd_nat_target): New.
10507 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10508 hppa_nbsd_nat_target methods.
10509 (_initialize_hppanbsd_nat): Adjust to C++ification.
10510 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10511 (the_hppa_obsd_nat_target): New.
10512 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10513 methods of hppa_obsd_nat_target.
10514 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
10515 add_target.
10516 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10517 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
10518 add_target.
10519 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10520 (_initialize_i386obsd_nat): Use add_target.
10521 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10522 (the_m68k_bsd_nat_target): New.
10523 (m68kbsd_fetch_inferior_registers)
10524 (m68kbsd_store_inferior_registers): Refactor as methods of
10525 m68k_bsd_nat_target.
10526 (_initialize_m68kbsd_nat): Adjust to C++ification.
10527 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10528 (the_mips_fbsd_nat_target): New.
10529 (mips_fbsd_fetch_inferior_registers)
10530 (mips_fbsd_store_inferior_registers): Refactor as methods of
10531 mips_fbsd_nat_target.
10532 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
10533 add_target.
10534 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10535 (the_mips_nbsd_nat_target): New.
10536 (mipsnbsd_fetch_inferior_registers)
10537 (mipsnbsd_store_inferior_registers): Refactor as methods of
10538 mips_nbsd_nat_target.
10539 (_initialize_mipsnbsd_nat): Adjust to C++ification.
10540 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10541 (the_mips64_obsd_nat_target): New.
10542 (mips64obsd_fetch_inferior_registers)
10543 (mips64obsd_store_inferior_registers): Refactor as methods of
10544 mips64_obsd_nat_target.
10545 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
10546 add_target.
10547 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10548 nbsd_nat_target.
10549 * nbsd-nat.h: Include "inf-ptrace.h".
10550 (nbsd_nat_target): New class.
10551 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10552 (obsd_wait): Refactor as methods of obsd_nat_target.
10553 (obsd_add_target): Delete.
10554 * obsd-nat.h: Include "inf-ptrace.h".
10555 (obsd_nat_target): New class.
10556 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10557 (the_ppc_fbsd_nat_target): New.
10558 (ppcfbsd_fetch_inferior_registers)
10559 (ppcfbsd_store_inferior_registers): Refactor as methods of
10560 ppc_fbsd_nat_target.
10561 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
10562 add_target.
10563 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10564 (the_ppc_nbsd_nat_target): New.
10565 (ppcnbsd_fetch_inferior_registers)
10566 (ppcnbsd_store_inferior_registers): Refactor as methods of
10567 ppc_nbsd_nat_target.
10568 (_initialize_ppcnbsd_nat): Adjust to C++ification.
10569 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10570 (the_ppc_obsd_nat_target): New.
10571 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10572 methods of ppc_obsd_nat_target.
10573 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
10574 add_target.
10575 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10576 (the_sh_nbsd_nat_target): New.
10577 (shnbsd_fetch_inferior_registers)
10578 (shnbsd_store_inferior_registers): Refactor as methods of
10579 sh_nbsd_nat_target.
10580 (_initialize_shnbsd_nat): Adjust to C++ification.
10581 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10582 (inf_ptrace_xfer_partial): Delete.
10583 (sparc_xfer_partial, sparc_target): Delete.
10584 * sparc-nat.h (sparc_fetch_inferior_registers)
10585 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10586 (sparc_target): Delete function declaration.
10587 (sparc_target): New template class.
10588 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10589 (_initialize_sparcnbsd_nat): Adjust to C++ification.
10590 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10591 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
10592 add_target.
10593 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10594 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10595 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10596 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
10597 add_target.
10598 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10599 (the_vax_bsd_nat_target): New.
10600 (vaxbsd_fetch_inferior_registers)
10601 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10602 methods.
10603 (_initialize_vaxbsd_nat): Adjust to C++ification.
10604
10605 * bsd-kvm.c (bsd_kvm_target): New class.
10606 (bsd_kvm_ops): Now a bsd_kvm_target.
10607 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10608 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10609 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10610 bsd_kvm_target.
10611 (bsd_kvm_return_one): Delete.
10612 (bsd_kvm_add_target): Adjust to C++ification.
10613
10614 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10615 (nto_procfs_target_procfs): New classes.
10616 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10617 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10618 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10619 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10620 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10621 (procfs_remove_hw_breakpoint, procfs_resume)
10622 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10623 (procfs_kill_inferior, procfs_store_registers)
10624 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10625 as methods of nto_procfs_target.
10626 (nto_procfs_ops): Now an nto_procfs_target_procfs.
10627 (nto_native_ops): Delete.
10628 (procfs_open, procfs_native_open): Delete.
10629 (nto_native_ops): Now an nto_procfs_target_native.
10630 (init_procfs_targets): Adjust to C++ification.
10631 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10632 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10633 Refactor as methods of nto_procfs_target.
10634
10635 * go32-nat.c (go32_nat_target): New class.
10636 (the_go32_nat_target): New.
10637 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10638 (go32_store_registers, go32_xfer_partial, go32_files_info)
10639 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10640 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10641 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10642 (go32_pid_to_str): Refactor as methods of go32_nat_target.
10643 (go32_target): Delete.
10644 (_initialize_go32_nat): Adjust to C++ification.
10645
10646 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10647 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10648 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10649 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10650 gnu_nat_target.
10651 (gnu_target): Delete.
10652 * gnu-nat.h (gnu_target): Delete.
10653 (gnu_nat_target): New class.
10654 * i386-gnu-nat.c (gnu_base_target): New.
10655 (i386_gnu_nat_target): New class.
10656 (the_i386_gnu_nat_target): New.
10657 (_initialize_i386gnu_nat): Adjust to C++ification.
10658
10659 2018-05-02 Pedro Alves <palves@redhat.com>
10660
10661 * bfd-target.c (target_bfd_xclose): Rename to ...
10662 (target_bfd_close): ... this.
10663 (target_bfd_reopen): Adjust.
10664 * target.c (target_close): Remove references to to_xclose.
10665 * target.h (target_ops::to_xclose): Delete.
10666 (target_ops::to_close): Update comments.
10667
10668 2018-05-02 Pedro Alves <palves@redhat.com>
10669
10670 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10671 "linux-nat.h".
10672 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10673 * inf-ptrace.c (inf_ptrace_register_u_offset)
10674 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10675 (inf_ptrace_store_register, inf_ptrace_store_registers)
10676 (inf_ptrace_trad_target): Move to ...
10677 * linux-nat-trad.c: ... this new file.
10678 * linux-nat-trad.h: New file.
10679 * linux-nat.c (linux_target_install_ops): Make extern.
10680 (linux_trad_target): Delete.
10681 * linux-nat.h (linux_trad_target): Delete declaration.
10682 (linux_target_install_ops): Declare.
10683 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10684 "linux-nat.h".
10685
10686 2018-05-02 Pedro Alves <palves@redhat.com>
10687
10688 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10689 procfs_target/add_target here.
10690 * procfs.c (procfs_target): Make static.
10691 (_initialize_procfs): Call add_target here.
10692 * procfs.h (struct target_ops): Remove forward declaration.
10693 (procfs_target): Remove declaration.
10694 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10695
10696 2018-05-02 Pedro Alves <palves@redhat.com>
10697
10698 * procfs.c (procfs_stopped_by_watchpoint)
10699 (procfs_insert_watchpoint, procfs_remove_watchpoint)
10700 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10701 Forward declare.
10702 (procfs_use_watchpoints): Delete, move contents...
10703 (procfs_target): ... here.
10704 * procfs.h (procfs_use_watchpoints): Delete declaration.
10705 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10706 procfs_use_watchpoints.
10707 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10708 procfs_use_watchpoints.
10709
10710 2018-05-02 Tom Tromey <tom@tromey.com>
10711
10712 PR python/20084:
10713 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10714 and var_zuinteger_unlimited.
10715 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10716 and PARAM_ZUINTEGER_UNLIMITED.
10717 (set_parameter_value): Handle var_zuinteger and
10718 var_zuinteger_unlimited.
10719 (add_setshow_generic): Likewise.
10720 (parmpy_init): Likewise.
10721
10722 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
10723
10724 PR rust/23124
10725 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10726 pointer is not null before dereferencing it.
10727
10728 2018-04-30 Tom Tromey <tom@tromey.com>
10729
10730 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10731 is_mi_like_p.
10732
10733 2018-04-30 Tom Tromey <tom@tromey.com>
10734
10735 * breakpoint.c (mention): Remove use of is_mi_like_p.
10736 (print_mention_ranged_breakpoint): Likewise.
10737 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10738 of is_mi_like_p.
10739
10740 2018-04-30 Tom Tromey <tom@tromey.com>
10741
10742 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10743
10744 2018-04-30 Tom Tromey <tom@tromey.com>
10745
10746 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10747 (info_spu_event_command): Remove some uses of is_mi_like_p.
10748
10749 2018-04-30 Tom Tromey <tom@tromey.com>
10750
10751 * python/py-framefilter.c (py_print_single_arg)
10752 (enumerate_locals, py_print_args, py_print_frame): Remove some
10753 uses of is_mi_like_p.
10754
10755 2018-04-30 Tom Tromey <tom@tromey.com>
10756
10757 * ui-out.c: Update.
10758 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10759 * ui-out.h (ui_out::is_mi_like_p): Now const.
10760 (ui_out::do_is_mi_like_p): Now const.
10761 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10762
10763 2018-04-30 Tom Tromey <tom@tromey.com>
10764
10765 * varobj.c (varobj_set_visualizer): Use new_reference.
10766 * python/python.c (gdbpy_decode_line): Use new_reference.
10767 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10768 new_reference.
10769
10770 2018-04-30 Tom Tromey <tom@tromey.com>
10771
10772 * varobj.c (install_new_value): Use new_reference.
10773 * value.h (value_incref): Return void. Swap intro comment with
10774 value_decref.
10775 * value.c (set_value_parent): Use new_reference.
10776 (value_incref): Return void. Update intro comment.
10777 (release_value): Use new_reference.
10778 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10779
10780 2018-04-30 Tom Tromey <tom@tromey.com>
10781
10782 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10783 * gdb_bfd.h (new_bfd_ref): Remove.
10784 (gdb_bfd_open): Update comment.
10785 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10786 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10787 (gdb_bfd_fdopenr): Use new_reference.
10788 * exec.c (exec_file_attach): Use new_reference.
10789
10790 2018-04-30 Tom Tromey <tom@tromey.com>
10791
10792 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10793 method.
10794
10795 2018-04-30 Tom Tromey <tom@tromey.com>
10796
10797 * jit.c (jit_read_code_entry): Use type_align.
10798 * i386-tdep.c (i386_gdbarch_init): Don't call
10799 set_gdbarch_long_long_align_bit.
10800 * gdbarch.sh: Remove long_long_align_bit.
10801 * gdbarch.c, gdbarch.h: Rebuild.
10802 * arc-tdep.c (arc_type_align): New function.
10803 (arc_gdbarch_init): Use arc_type_align. Don't call
10804 set_gdbarch_long_long_align_bit.
10805
10806 2018-04-30 Tom Tromey <tom@tromey.com>
10807
10808 * rust-lang.c (rust_type_alignment): Remove.
10809 (rust_composite_type): Use type_align.
10810
10811 2018-04-30 Tom Tromey <tom@tromey.com>
10812
10813 * NEWS: Mention Type.align.
10814 * python/py-type.c (typy_get_alignof): New function.
10815 (type_object_getset): Add "alignof".
10816
10817 2018-04-30 Tom Tromey <tom@tromey.com>
10818
10819 PR exp/17095:
10820 * NEWS: Update.
10821 * std-operator.def (UNOP_ALIGNOF): New operator.
10822 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10823 New.
10824 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10825 * c-lang.c (c_op_print_tab): Add alignof.
10826 * c-exp.y (ALIGNOF): New token.
10827 (exp): Add "ALIGNOF" production.
10828 (ident_tokens): Add _Alignof and alignof.
10829
10830 2018-04-30 Tom Tromey <tom@tromey.com>
10831
10832 * i386-tdep.c (i386_type_align): New function.
10833 (i386_gdbarch_init): Update.
10834 * gdbarch.sh (type_align): New method.
10835 * gdbarch.c, gdbarch.h: Rebuild.
10836 * arch-utils.h (default_type_align): Declare.
10837 * arch-utils.c (default_type_align): New function.
10838 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10839 (struct type) <align_log2>: New field.
10840 <instance_flags>: Now a bitfield.
10841 (TYPE_RAW_ALIGN): New macro.
10842 (type_align, type_raw_align, set_type_align): Declare.
10843 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10844 functions.
10845 * dwarf2read.c (quirk_rust_enum): Set type alignment.
10846 (get_alignment, maybe_set_alignment): New functions.
10847 (read_structure_type, read_enumeration_type, read_array_type)
10848 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10849 (read_subrange_type, read_base_type): Set type alignment.
10850
10851 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
10852
10853 * dwarf2read.c (read_index_from_section): Use bool.
10854
10855 2018-04-29 Fabian Groffen <grobian@gentoo.org>
10856
10857 PR gdb/22950
10858 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10859 with #ifdef.
10860
10861 2018-04-29 John Reiser <jreiser@BitWagon.com>
10862
10863 PR build/22873
10864 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10865 last step, and do it atomically.
10866
10867 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
10868
10869 * compile/compile-c-types.c (convert_int, convert_float):
10870 Update for C FE v1.
10871
10872 2018-04-27 Tom Tromey <tom@tromey.com>
10873
10874 PR rust/22545:
10875 * rust-lang.c (rust_inclusive_range_type_p): New function.
10876 (rust_range): Handle inclusive ranges.
10877 (rust_compute_range): Likewise.
10878 * rust-exp.y (struct rust_op) <inclusive>: New field.
10879 (DOTDOTEQ): New constant.
10880 (range_expr): Add "..=" productions.
10881 (operator_tokens): Add "..=" token.
10882 (ast_range): Add "inclusive" parameter.
10883 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10884 ranges.
10885 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10886 bounds values.
10887 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10888 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10889 Update comments.
10890 * expprint.c (print_subexp_standard): Handle new bounds values.
10891 (dump_subexp_body_standard): Likewise.
10892
10893 2018-04-27 Tom Tromey <tom@tromey.com>
10894
10895 * configure: Rebuild.
10896 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10897 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10898 "OVERRIDE".
10899 (class symbol_needs_eval_context): Likewise.
10900 * dwarf2read.c (mock_mapped_index::symbol_name_count)
10901 (mock_mapped_index::symbol_name_at): Use "override". Remove
10902 "virtual".
10903 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10904 "override".
10905 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10906 * aarch64-tdep.c (instruction_reader::read): Use "override".
10907 (instruction_reader_test::read): Likewise.
10908 * arm-tdep.c (instruction_reader::read): Use "override".
10909 (instruction_reader_thumb::read): Likewise.
10910
10911 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
10912
10913 PR remote/9665
10914 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10915 instead of remote_send.
10916 (remote_send): Remove.
10917
10918 2018-04-26 Pedro Alves <palves@redhat.com>
10919
10920 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10921 find_function_start_sal instead of find_pc_line.
10922
10923 2018-04-26 Pedro Alves <palves@redhat.com>
10924
10925 * breakpoint.c (set_breakpoint_location_function): Handle
10926 mst_data_gnu_ifunc.
10927 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10928 * elfread.c (elf_symtab_read): Give data symbols with
10929 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10930 (elf_rel_plt_read): Update comment.
10931 * linespec.c (convert_linespec_to_sals): Handle
10932 mst_data_gnu_ifunc.
10933 (minsym_found): Handle mst_data_gnu_ifunc.
10934 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10935 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10936 * parse.c (find_minsym_type_and_address): Handle
10937 mst_data_gnu_ifunc.
10938 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10939 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10940 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10941 comment.
10942 <mst_data_gnu_ifunc>: New enumerator.
10943
10944 2018-04-26 Pedro Alves <palves@redhat.com>
10945
10946 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10947 (lookup_minimal_symbol_by_pc_section): ... this. Replace
10948 'want_trampoline' parameter by a lookup_msym_prefer parameter.
10949 Handle it.
10950 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10951 (lookup_minimal_symbol_by_pc): Adjust.
10952 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10953 (lookup_solib_trampoline_symbol_by_pc): Adjust.
10954 * minsyms.h (lookup_msym_prefer): New enum.
10955 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10956 parameter by a lookup_msym_prefer parameter.
10957
10958 2018-04-26 Pedro Alves <palves@redhat.com>
10959
10960 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10961 ends in "@plt" instead of looking at the symbol's section.
10962
10963 2018-04-26 Pedro Alves <palves@redhat.com>
10964
10965 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
10966 all references.
10967 (find_pc_partial_function_gnu_ifunc): Rename to ...
10968 (find_pc_partial_function): ... this, and remove references to
10969 'is_gnu_ifunc_p'.
10970 (find_pc_partial_function): Delete old implementation.
10971 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10972
10973 2018-04-26 Pedro Alves <palves@redhat.com>
10974
10975 * linespec.c (struct bound_minimal_symbol_search_key): New.
10976 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
10977 skip first line if we found a GNU ifunc minimal symbol by name.
10978 (compare_msymbols): Change parameters to work with a destructured
10979 lhs minsym.
10980 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10981 functions.
10982
10983 2018-04-26 Pedro Alves <palves@redhat.com>
10984
10985 * breakpoint.c (set_breakpoint_location_function): Don't resolve
10986 ifunc targets here. Instead, if we have an ifunc minsym, use its
10987 address/name.
10988 (add_location_to_breakpoint): Store the minsym and the objfile in
10989 the breakpoint location.
10990 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10991 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10992 Record the minsym in the sal.
10993 * symtab.h (symtab_and_line) <msymbol>: New field.
10994
10995 2018-04-26 Pedro Alves <palves@redhat.com>
10996
10997 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10998 unless we actually resolved the ifunc.
10999
11000 2018-04-26 Pedro Alves <palves@redhat.com>
11001
11002 * c-exp.y (variable production): Prefer ifunc minsyms over
11003 regular function symbols.
11004 * symtab.c (find_gnu_ifunc): New function.
11005 * minsyms.h (lookup_msym_prefer): New enum.
11006 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11007 parameter by a lookup_msym_prefer parameter.
11008 * symtab.h (find_gnu_ifunc): New declaration.
11009
11010 2018-04-26 Pedro Alves <palves@redhat.com>
11011
11012 * blockframe.c (find_gnu_ifunc_target_type): New function.
11013 (find_function_type): New.
11014 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11015 return a value with a memory address.
11016 (eval_call): For calls to GNU ifunc functions, try to find the
11017 type of the target function from the type that the resolver
11018 returns.
11019 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11020 symbols.
11021 * infcall.c (find_function_return_type): Delete.
11022 (find_function_addr): Add 'function_type' parameter. For calls to
11023 GNU ifunc functions, try to find the type of the target function
11024 from the type that the resolver returns, and return it via
11025 FUNCTION_TYPE.
11026 (call_function_by_hand_dummy): Adjust to use the function type
11027 returned by find_function_addr.
11028 (find_function_addr): Add 'function_type' parameter and move
11029 description here.
11030 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11031 declarations.
11032
11033 2018-04-26 Pedro Alves <palves@redhat.com>
11034
11035 * c-exp.y (variable production): Skip finding an alias for ifunc
11036 symbols.
11037
11038 2018-04-26 Pedro Alves <palves@redhat.com>
11039
11040 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11041
11042 2018-04-25 Pedro Alves <palves@redhat.com>
11043
11044 * infcmd.c (kill_command): Print the pid as string, not the whole
11045 thread's ptid. Add comment. s/has been killed/killed/ in output
11046 message.
11047 * remote.c (remote_detach_1): Print the pid as string, not the
11048 whole thread's ptid.
11049
11050 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11051 Sergio Durigan Junior <sergiodj@redhat.com>
11052 Pedro Alves <palves@redhat.com>
11053
11054 * infcmd.c (kill_command): Print message when inferior has
11055 been killed.
11056 * inferior.c (print_inferior_events): Remove 'static'. Set as
11057 '1'.
11058 (add_inferior): Improve message printed when
11059 'print_inferior_events' is on.
11060 (exit_inferior): Remove message printed when
11061 'print_inferior_events' is on.
11062 (detach_inferior): Improve message printed when
11063 'print_inferior_events' is on.
11064 (initialize_inferiors): Use 'add_inferior_silent' to set
11065 'current_inferior_'.
11066 * inferior.h (print_inferior_events): Declare here as
11067 'extern'.
11068 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11069 '[Detaching...]' messages when 'print_inferior_events' is on.
11070 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
11071 as prefix/suffix for messages. Remove periods. Fix erroneous
11072 'Detaching after fork from child...', replace it by '... from
11073 parent...'.
11074 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11075 prefix/suffix when printing 'Detaching...' messages. Print
11076 them when 'print_inferior_events' is on.
11077 * remote.c (remote_detach_1): Print message when detaching
11078 from inferior and '!is_fork_parent'.
11079
11080 2018-04-24 Tom Tromey <tom@tromey.com>
11081
11082 * cli-out.h: Reindent.
11083
11084 2018-04-24 Tom Tromey <tom@tromey.com>
11085
11086 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11087 (cli_ui_out::do_field_string): Use fputs_filtered.
11088 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11089
11090 2018-04-23 Tom Tromey <tom@tromey.com>
11091
11092 * guile/scm-frame.c (gdbscm_frame_read_var): Use
11093 gdb::unique_xmalloc_ptr.
11094
11095 2018-04-23 Tom Tromey <tom@tromey.com>
11096
11097 * configure: Rebuild.
11098
11099 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
11100
11101 PR gdb/23095
11102 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11103 prepare_for_testing. Set normal_bp to r_debug_state if target
11104 is bsd.
11105
11106 2018-04-21 Pedro Alves <palves@redhat.com>
11107 Rajendra SY <rajendra.sy@gmail.com>
11108
11109 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11110 * remote.c (extended_remote_attach): In all-stop mode, mark the
11111 thread as executing.
11112
11113 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
11114
11115 * thread.c (thread_apply_all_command): Fix comment.
11116 (thread_command): Fix comment.
11117
11118 2018-04-10 Alan Hayward <alan.hayward@arm.com>
11119
11120 * common/tdesc.h (tdesc_create_feature): Remove xml filename
11121 parameter.
11122 * features/aarch64-core.c (create_feature_aarch64_core):
11123 Regenerate.
11124 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11125 Likewise.
11126 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11127 Likewise.
11128 * features/i386/32bit-avx512.c
11129 (create_feature_i386_32bit_avx512): Likewise.
11130 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11131 Likewise.
11132 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11133 Likewise.
11134 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11135 Likewise.
11136 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11137 Likewise.
11138 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11139 Likewise.
11140 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11141 Likewise.
11142 * features/i386/64bit-avx512.c
11143 (create_feature_i386_64bit_avx512): Likewise.
11144 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11145 Likewise.
11146 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11147 Likewise.
11148 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11149 Likewise.
11150 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11151 Likewise.
11152 * features/i386/64bit-segments.c
11153 (create_feature_i386_64bit_segments): Likewise.
11154 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11155 Likewise.
11156 * features/i386/x32-core.c
11157 (create_feature_i386_x32_core): Likewise.
11158 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11159 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11160 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11161 * target-descriptions.c: In generated code, don't pass xml
11162 filename.
11163
11164 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11165
11166 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11167 (print_xml_feature::visit_post): Likewise.
11168 (print_xml_feature::visit): Likewise.
11169 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11170 (print_xml_feature): Add new class.
11171 * regformats/regdat.sh: Null xmltarget on feature targets.
11172 * target-descriptions.c (struct target_desc): Add xmltarget.
11173 (maintenance_check_tdesc_xml_convert): Add unittest function.
11174 (tdesc_get_features_xml): Add function to get xml.
11175 (maintenance_check_xml_descriptions): Test xml generation.
11176 * xml-tdesc.c (string_read_description_xml): Add function.
11177 * xml-tdesc.h (string_read_description_xml): Add declaration.
11178
11179 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11180
11181 * features/Makefile: Add feature marker to targets with new style
11182 target descriptions.
11183 * regformats/aarch64.dat: Regenerate.
11184 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11185 * regformats/i386/amd64-avx-linux.dat: Likewise.
11186 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11187 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11188 * regformats/i386/amd64-linux.dat: Likewise.
11189 * regformats/i386/amd64-mpx-linux.dat: Likewise.
11190 * regformats/i386/amd64.dat: Likewise.
11191 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11192 * regformats/i386/i386-avx-linux.dat: Likewise.
11193 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11194 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11195 * regformats/i386/i386-linux.dat: Likewise.
11196 * regformats/i386/i386-mmx-linux.dat: Likewise.
11197 * regformats/i386/i386-mpx-linux.dat: Likewise.
11198 * regformats/i386/i386.dat: Likewise.
11199 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11200 * regformats/i386/x32-avx-linux.dat: Likewise.
11201 * regformats/i386/x32-linux.dat: Likewise.
11202 * regformats/tic6x-c62x-linux.dat: Likewise.
11203 * regformats/tic6x-c64x-linux.dat: Likewise.
11204 * regformats/tic6x-c64xp-linux.dat: Likewise.
11205 * regformats/regdat.sh: Parse feature marker.
11206
11207 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11208
11209 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11210 (tdesc_osabi_name): Likewise.
11211 * target-descriptions.c (tdesc_architecture_name): Add new
11212 function.
11213 (tdesc_osabi_name): Likewise.
11214
11215 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11216
11217 * common/tdesc.c (tdesc_predefined_type): Move to here.
11218 (tdesc_named_type): Likewise.
11219 (tdesc_create_vector): Likewise.
11220 (tdesc_create_struct): Likewise.
11221 (tdesc_set_struct_size): Likewise.
11222 (tdesc_create_union): Likewise.
11223 (tdesc_create_flags): Likewise.
11224 (tdesc_create_enum): Likewise.
11225 (tdesc_add_field): Likewise.
11226 (tdesc_add_typed_bitfield): Likewise.
11227 (tdesc_add_bitfield): Likewise.
11228 (tdesc_add_flag): Likewise.
11229 (tdesc_add_enum_value): Likewise.
11230 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11231 (struct tdesc_type_vector): Likewise.
11232 (struct tdesc_type_field): Likewise.
11233 (struct tdesc_type_with_fields): Likewise.
11234 (tdesc_create_enum): Add declaration.
11235 (tdesc_add_typed_bitfield): Likewise.
11236 (tdesc_add_enum_value): Likewise.
11237 * target-descriptions.c (tdesc_type_field): Move from here.
11238 (tdesc_type_builtin): Likewise.
11239 (tdesc_type_vector): Likewise.
11240 (tdesc_type_with_fields): Likewise.
11241 (tdesc_predefined_types): Likewise.
11242 (tdesc_named_type): Likewise.
11243 (tdesc_create_vector): Likewise.
11244 (tdesc_create_struct): Likewise.
11245 (tdesc_set_struct_size): Likewise.
11246 (tdesc_create_union): Likewise.
11247 (tdesc_create_flags): Likewise.
11248 (tdesc_create_enum): Likewise.
11249 (tdesc_add_field): Likewise.
11250 (tdesc_add_typed_bitfield): Likewise.
11251 (tdesc_add_bitfield): Likewise.
11252 (tdesc_add_flag): Likewise.
11253 (tdesc_add_enum_value): Likewise.
11254 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11255 (tdesc_add_typed_bitfield): Likewise.
11256 (tdesc_add_enum_value): Likewise.
11257
11258 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11259
11260 * common/tdesc.c (tdesc_feature::accept): Move to here.
11261 (tdesc_feature::operator==): Likewise.
11262 (tdesc_create_reg): Likewise.
11263 * common/tdesc.h (tdesc_type_kind): Likewise.
11264 (struct tdesc_type): Likewise.
11265 (struct tdesc_feature): Likewise.
11266 * regformats/regdat.sh: Create a feature.
11267 * target-descriptions.c (tdesc_type_kind): Move from here.
11268 (tdesc_type): Likewise.
11269 (tdesc_type_up): Likewise.
11270 (tdesc_feature): Likewise.
11271 (tdesc_create_reg): Likewise.
11272
11273 2018-04-18 Alan Hayward <alan.hayward@arm.com>
11274
11275 * Makefile.in: Add arch/tdesc.c
11276 * common/tdesc.c: New file.
11277 * common/tdesc.h (tdesc_element_visitor): Move to here.
11278 (tdesc_element): Likewise.
11279 (tdesc_reg): Likewise.
11280 (tdesc_reg_up): Likewise.
11281 * regformats/regdef.h (reg): Add offset to constructors.
11282 * target-descriptions.c (tdesc_element_visitor): Move from here.
11283 (tdesc_element): Likewise.
11284 (tdesc_reg): Likewise.
11285 (tdesc_reg_up): Likewise.
11286
11287 2018-04-17 Tom Tromey <tom@tromey.com>
11288
11289 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11290 discriminant field.
11291
11292 2018-04-17 Tom Tromey <tom@tromey.com>
11293
11294 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11295
11296 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
11297
11298 * symtab.c (print_symbol_info): Skip printing filename and line
11299 number when `last' is NULL.
11300 (symtab_symbol_info): Use empty string instead of NULL for first
11301 invocation of print_symbol_info.
11302 (rbreak_command): Pass NULL to `last' parameter of
11303 print_symbol_info.
11304
11305 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
11306
11307 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11308 instead of nullptr.
11309
11310 2018-04-16 Pedro Alves <palves@redhat.com>
11311
11312 * MAINTAINERS (sh): Remove.
11313 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11314 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11315 (ALLDEPFILES): Remove sh64-tdep.c.
11316 * NEWS: Mentions that support for SH-5/SH64 is removed.
11317 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11318 (sh*-*-openbsd*): Ditto.
11319 (sh64-*-elf*): Remove.
11320 (sh*): Remove.
11321 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11322 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11323 * sh-tdep.c: No longer include "sh64-tdep.h".
11324 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11325 * sh64-tdep.c, sh64-tdep.h: Remove files.
11326
11327 2018-04-16 Pedro Alves <palves@redhat.com>
11328
11329 * MAINTAINERS: Remove m88k.
11330 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11331 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11332 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11333 * NEWS: Mention that support for m88k was removed.
11334 * configure.host (m88*-*-*): Remove support.
11335 * configure.nat (m88k-*-*): Remove support.
11336 * configure.tgt (m88*-*-openbsd*): Remove.
11337 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11338
11339 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
11340
11341 * configure.tgt (x86_tobjs): New variable.
11342 (amd64_tobjs, i386_tobjs): Use it.
11343
11344 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11345
11346 * symtab.c (print_symbol_info): Precede the symbol definition by
11347 the line number when available.
11348 * NEWS: Advertise this enhancement.
11349
11350 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11351
11352 * NEWS (New options): announce set/show record btrace cpu.
11353 * btrace.c: Include record-btrace.h.
11354 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11355 the vendor is unknown.
11356 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
11357 Maybe overwrite the btrace configuration's cpu.
11358 (btrace_compute_ftrace): Add cpu parameter. Update callers.
11359 (btrace_fetch): Add cpu parameter. Update callers.
11360 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11361 Maybe overwrite the btrace configuration's cpu. Skip enabling
11362 errata workarounds if the vendor is unknown.
11363 * python/py-record-btrace.c: Include record-btrace.h.
11364 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11365 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11366 * record-btrace.c (record_btrace_cpu_state_kind): New.
11367 (record_btrace_cpu): New.
11368 (set_record_btrace_cpu_cmdlist): New.
11369 (record_btrace_get_cpu): New.
11370 (require_btrace_thread, record_btrace_info)
11371 (record_btrace_resume_thread): Call record_btrace_get_cpu.
11372 (cmd_set_record_btrace_cpu_none): New.
11373 (cmd_set_record_btrace_cpu_auto): New.
11374 (cmd_set_record_btrace_cpu): New.
11375 (cmd_show_record_btrace_cpu): New.
11376 (_initialize_record_btrace): Initialize set/show record btrace cpu
11377 commands.
11378 * record-btrace.h (record_btrace_get_cpu): New.
11379
11380 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11381
11382 * record.c (set_record_command): Fix typo in message.
11383
11384 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11385
11386 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11387
11388 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
11389
11390 * infrun.c (process_event_stop_test): Call
11391 gdbarch_in_indirect_branch_thunk.
11392 * gdbarch.sh (in_indirect_branch_thunk): New.
11393 * gdbarch.c: Regenerated.
11394 * gdbarch.h: Regenerated.
11395 * x86-tdep.h: New.
11396 * x86-tdep.c: New.
11397 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11398 (HFILES_NO_SRCDIR): Add x86-tdep.h.
11399 (ALLDEPFILES): Add x86-tdep.c.
11400 * arch-utils.h (default_in_indirect_branch_thunk): New.
11401 * arch-utils.c (default_in_indirect_branch_thunk): New.
11402 * i386-tdep: Include x86-tdep.h.
11403 (i386_in_indirect_branch_thunk): New.
11404 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11405 function.
11406 * amd64-tdep: Include x86-tdep.h.
11407 (amd64_in_indirect_branch_thunk): New.
11408 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11409
11410 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11411
11412 PR gdb/23053
11413 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11414 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11415 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11416 regression.
11417
11418 2018-04-12 Tom Tromey <tom@tromey.com>
11419
11420 * rust-lang.c (rust_print_struct_def): Remove univariant code.
11421 (rust_evaluate_subexp): Likewise.
11422
11423 2018-04-12 Pedro Alves <palves@redhat.com>
11424
11425 * procfs.c (procfs_detach): Make forward declaration's prototype
11426 match definition's protototype.
11427 (proc_get_LDT_entry): Remove stale do_cleanups call.
11428
11429 2018-04-12 Pedro Alves <palves@redhat.com>
11430
11431 * target.h (target_ops::to_has_exited): Delete.
11432 (target_has_exited): Delete.
11433 * target-delegates.c: Regenerate.
11434
11435 2018-04-11 Pedro Alves <palves@redhat.com>
11436
11437 * target.c (fileio_fh_t::t): Add comment.
11438 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11439 (target_fileio_close): Handle a NULL target.
11440 (invalidate_fileio_fh): New.
11441 (target_close): Call it.
11442 * remote.c (remote_hostio_send_command): No longer check whether
11443 remote_desc is open.
11444
11445 2018-04-11 Pedro Alves <palves@redhat.com>
11446
11447 * target.c (fileio_fh_t): Make it a named struct instead of a
11448 typedef.
11449 (fileio_fh_t::is_closed): New method.
11450 (DEF_VEC_O (fileio_fh_t)): Remove.
11451 (fileio_fhandles): Now a std::vector.
11452 (is_closed_fileio_fh): Delete.
11453 (acquire_fileio_fd): Adjust. Rename parameters.
11454 (release_fileio_fd): Adjust.
11455 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11456 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11457 (target_fileio_close): Adjust.
11458
11459 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
11460
11461 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11462 index.
11463
11464 2018-04-10 Pedro Alves <palves@redhat.com>
11465
11466 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11467 (scoped_finish_thread_state): New class.
11468 * infcmd.c (run_command_1): Use it instead of finish_thread_state
11469 cleanup.
11470 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11471 (fetch_inferior_event, normal_stop): Likewise.
11472 * thread.c (finish_thread_state_cleanup): Delete.
11473
11474 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11475 Pedro Alves <palves@redhat.com>
11476
11477 * value.c: Include "selftest.h" and "common/array-view.h".
11478 (struct range) <operator ==>: New.
11479 (test_ranges_contain): New.
11480 (check_ranges_vector): New.
11481 (test_insert_into_bit_range_vector): New.
11482 (_initialize_values): Register selftests.
11483 * common/array-view.h (operator==, operator!=): New.
11484
11485 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11486
11487 * common/gdb_vecs.h (unordered_remove): Add overload that takes
11488 an iterator.
11489 * inline-frame.c: Include <algorithm>.
11490 (struct inline_state): Add constructor.
11491 (inline_state_s): Remove.
11492 (DEF_VEC_O(inline_state_s)): Remove.
11493 (inline_states): Change type to std::vector.
11494 (find_inline_frame_state): Adjust to std::vector.
11495 (allocate_inline_frame_state): Remove.
11496 (clear_inline_frame_state): Adjust to std::vector.
11497 (skip_inline_frames): Adjust to std::vector.
11498
11499 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11500
11501 * tracepoint.h (struct trace_state_variable): Add constructor.
11502 <name>: Change type to std::string.
11503 * tracepoint.c (tsv_s): Remove.
11504 (DEF_VEC_O(tsv_s)): Remove.
11505 (tvariables): Change to std::vector.
11506 (create_trace_state_variable): Adjust to std::vector.
11507 (find_trace_state_variable): Likewise.
11508 (find_trace_state_variable_by_number): Likewise.
11509 (delete_trace_state_variable): Likewise.
11510 (trace_variable_command): Adjust to std::string.
11511 (delete_trace_variable_command): Likewise.
11512 (tvariables_info_1): Adjust to std::vector.
11513 (save_trace_state_variables): Likewise.
11514 (start_tracing): Likewise.
11515 (merge_uploaded_trace_state_variables): Adjust to std::vector
11516 and std::string.
11517 * target.h (struct target_ops)
11518 <to_download_trace_state_variable>: Pass reference to
11519 trace_state_variable.
11520 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11521 * target-delegates.c: Re-generate.
11522 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11523 (mi_tsv_deleted): Likewise.
11524 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11525 * remote.c (remote_download_trace_state_variable): Change
11526 pointer to reference and adjust.
11527 * make-target-delegates (parse_argtypes): Handle references.
11528 (write_function_header): Likewise.
11529 (munge_type): Likewise.
11530
11531 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11532
11533 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11534 string_view-selftests.c.
11535 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11536 testsuite.
11537 * unittests/basic_string_view/cons/char/1.cc: Likewise.
11538 * unittests/basic_string_view/cons/char/2.cc: Likewise.
11539 * unittests/basic_string_view/cons/char/3.cc: Likewise.
11540 * unittests/basic_string_view/element_access/char/1.cc:
11541 Likewise.
11542 * unittests/basic_string_view/element_access/char/empty.cc:
11543 Likewise.
11544 * unittests/basic_string_view/element_access/char/front_back.cc:
11545 Likewise.
11546 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11547 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11548 Likewise.
11549 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11550 Likewise.
11551 * unittests/basic_string_view/modifiers/swap/char/1.cc:
11552 Likewise.
11553 * unittests/basic_string_view/operations/compare/char/1.cc:
11554 Likewise.
11555 * unittests/basic_string_view/operations/compare/char/13650.cc:
11556 Likewise.
11557 * unittests/basic_string_view/operations/copy/char/1.cc:
11558 Likewise.
11559 * unittests/basic_string_view/operations/data/char/1.cc:
11560 Likewise.
11561 * unittests/basic_string_view/operations/find/char/1.cc:
11562 Likewise.
11563 * unittests/basic_string_view/operations/find/char/2.cc:
11564 Likewise.
11565 * unittests/basic_string_view/operations/find/char/3.cc:
11566 Likewise.
11567 * unittests/basic_string_view/operations/find/char/4.cc:
11568 Likewise.
11569 * unittests/basic_string_view/operations/rfind/char/1.cc:
11570 Likewise.
11571 * unittests/basic_string_view/operations/rfind/char/2.cc:
11572 Likewise.
11573 * unittests/basic_string_view/operations/rfind/char/3.cc:
11574 Likewise.
11575 * unittests/basic_string_view/operations/substr/char/1.cc:
11576 Likewise.
11577 * unittests/basic_string_view/operators/char/2.cc: Likewise.
11578 * unittests/string_view-selftests.c: New file.
11579
11580 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11581
11582 * unittests/basic_string_view/capacity/1.cc: New file.
11583 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11584 * unittests/basic_string_view/cons/char/1.cc: New file.
11585 * unittests/basic_string_view/cons/char/2.cc: New file.
11586 * unittests/basic_string_view/cons/char/3.cc: New file.
11587 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11588 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11589 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11590 * unittests/basic_string_view/element_access/char/1.cc: New file.
11591 * unittests/basic_string_view/element_access/char/2.cc: New file.
11592 * unittests/basic_string_view/element_access/char/empty.cc: New file.
11593 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11594 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11595 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11596 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11597 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11598 * unittests/basic_string_view/include.cc: New file.
11599 * unittests/basic_string_view/inserters/char/1.cc: New file.
11600 * unittests/basic_string_view/inserters/char/2.cc: New file.
11601 * unittests/basic_string_view/inserters/char/3.cc: New file.
11602 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11603 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11604 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11605 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11606 * unittests/basic_string_view/literals/types.cc: New file.
11607 * unittests/basic_string_view/literals/values.cc: New file.
11608 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11609 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11610 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11611 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11612 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11613 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11614 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11615 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11616 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11617 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11618 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11619 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11620 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11621 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11622 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11623 * unittests/basic_string_view/operations/data/char/1.cc: New file.
11624 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11625 * unittests/basic_string_view/operations/find/char/1.cc: New file.
11626 * unittests/basic_string_view/operations/find/char/2.cc: New file.
11627 * unittests/basic_string_view/operations/find/char/3.cc: New file.
11628 * unittests/basic_string_view/operations/find/char/4.cc: New file.
11629 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11630 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11631 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11632 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11633 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11634 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11635 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11636 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11637 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11638 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11639 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11640 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11641 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11642 * unittests/basic_string_view/operators/char/2.cc: New file.
11643 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11644 * unittests/basic_string_view/range_access/char/1.cc: New file.
11645 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11646 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11647 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11648 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11649 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11650 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11651 * unittests/basic_string_view/requirements/typedefs.cc: New file.
11652 * unittests/basic_string_view/typedefs.cc: New file.
11653 * unittests/basic_string_view/types/1.cc: New file.
11654
11655 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11656
11657 * common/gdb_string_view.h: Remove libstdc++ implementation
11658 details, adjust to gdb reality.
11659 * common/gdb_string_view.tcc: Likewise.
11660 * cli/cli-script.c (struct string_view): Remove.
11661 (user_args) <m_args>: Change element type to gdb::string_view.
11662 (user_args::insert_args): Adjust.
11663
11664 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11665
11666 * common/gdb_string_view.h: New file.
11667 * common/gdb_string_view.tcc: New file.
11668
11669 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
11670
11671 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11672 * configure: Re-generate.
11673
11674 2018-04-09 Pedro Alves <palves@redhat.com>
11675
11676 * gdbarch.sh: Include "observable.h" instead of "observer.h".
11677 (set_target_gdbarch): Call
11678 gdb::observers::architecture_changed.notify instead of
11679 observer_notify_architecture_changed.
11680
11681 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11682
11683 * tracepoint.c (struct current_traceframe_cleanup): Remove.
11684 (do_restore_current_traceframe_cleanup): Remove.
11685 (restore_current_traceframe_cleanup_dtor): Remove.
11686 (make_cleanup_restore_current_traceframe): Remove.
11687 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11688 New.
11689 * tracepoint.h (struct scoped_restore_current_traceframe): New.
11690 * infrun.c (fetch_inferior_event): Use
11691 scoped_restore_current_traceframe.
11692
11693 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11694
11695 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11696 Remove.
11697 <n_allocated_type_units>: Remove.
11698 <all_type_units>: Change to std::vector.
11699 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11700 to std::vector change.
11701 (dwarf2_per_objfile::get_cutu): Likewise.
11702 (dwarf2_per_objfile::get_tu): Likewise.
11703 (create_signatured_type_table_from_index): Likewise.
11704 (create_signatured_type_table_from_debug_names): Likewise.
11705 (dw2_symtab_iter_next): Likewise.
11706 (dw2_print_stats): Likewise.
11707 (dw2_expand_all_symtabs): Likewise.
11708 (dw2_expand_marked_cus): Likewise.
11709 (dw2_debug_names_iterator::next): Likewise.
11710 (dwarf2_initialize_objfile): Likewise.
11711 (add_signatured_type_cu_to_table): Likewise.
11712 (create_all_type_units): Likewise.
11713 (add_type_unit): Likewise.
11714 (struct tu_abbrev_offset): Add constructor.
11715 (build_type_psymtabs_1): Adjust to std::vector change.
11716 (print_tu_stats): Likewise.
11717 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11718 (write_debug_names): Likewise.
11719
11720 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11721
11722 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11723 Make an std::vector.
11724 <n_comp_units>: Remove.
11725 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11726 to std::vector change.
11727 (dwarf2_per_objfile::get_cutu): Likewise.
11728 (dwarf2_per_objfile::get_cu): Likewise.
11729 (create_cus_from_index): Likewise.
11730 (create_addrmap_from_index): Likewise.
11731 (create_addrmap_from_aranges): Likewise.
11732 (dwarf2_read_index): Likewise.
11733 (dw2_find_last_source_symtab): Likewise.
11734 (dw2_map_symtabs_matching_filename): Likewise.
11735 (dw2_symtab_iter_next): Likewise.
11736 (dw2_print_stats): Likewise.
11737 (dw2_expand_all_symtabs): Likewise.
11738 (dw2_expand_symtabs_with_fullname): Likewise.
11739 (dw2_expand_marked_cus): Likewise.
11740 (dw2_map_symbol_filenames): Likewise.
11741 (create_cus_from_debug_names): Likewise.
11742 (dwarf2_read_debug_names): Likewise.
11743 (dw2_debug_names_iterator::next): Likewise.
11744 (dwarf2_initialize_objfile): Likewise.
11745 (set_partial_user): Likewise.
11746 (dwarf2_build_psymtabs_hard): Likewise.
11747 (read_comp_units_from_section): Remove arguments, adjust to
11748 std::vector change.
11749 (create_all_comp_units): Adjust to std::vector and
11750 read_comp_units_from_section changes.
11751 (dwarf2_find_containing_comp_unit): Adjust to std::vector
11752 change.
11753 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11754 (psyms_seen_size): Likewise.
11755 (write_gdbindex): Likewise.
11756 (write_debug_names): Likewise.
11757
11758 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11759
11760 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11761 with dwarf2_per_objfile.
11762 (create_cus_from_index): Likewise.
11763 (create_signatured_type_table_from_index): Likewise.
11764 (dwarf2_read_index): Likewise.
11765 (dwarf2_initialize_objfile): Likewise.
11766 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
11767 per_cu rather than get_dwarf2_per_objfile.
11768
11769 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11770
11771 * dwarf2read.h (struct signatured_type): Forward declare.
11772 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11773 New methods.
11774 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11775 (dw2_get_cutu): ...this.
11776 (dwarf2_per_objfile::get_cu): Rename from...
11777 (dw2_get_cu): ...this.
11778 (dwarf2_per_objfile::get_tu): New.
11779 (create_addrmap_from_index): Adjust.
11780 (create_addrmap_from_aranges): Adjust.
11781 (dw2_find_last_source_symtab): Adjust.
11782 (dw2_map_symtabs_matching_filename): Adjust.
11783 (dw2_symtab_iter_next): Adjust.
11784 (dw2_print_stats): Adjust.
11785 (dw2_expand_all_symtabs): Adjust.
11786 (dw2_expand_symtabs_with_fullname): Adjust.
11787 (dw2_expand_marked_cus): Adjust.
11788 (dw_expand_symtabs_matching_file_matcher): Adjust.
11789 (dw2_map_symbol_filenames): Adjust.
11790 (dw2_debug_names_iterator::next): Adjust.
11791 (dwarf2_initialize_objfile): Adjust.
11792 (set_partial_user): Adjust.
11793 (dwarf2_build_psymtabs_hard): Adjust.
11794
11795 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11796
11797 * dwarf2read.c (create_signatured_type_table_from_debug_names):
11798 Remove unused variables.
11799 (dw2_map_symtabs_matching_filename): Likewise.
11800 (dwarf2_record_block_ranges): Likewise.
11801 (dwarf2_read_addr_index): Likewise.
11802 (follow_die_offset): Likewise.
11803
11804 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11805
11806 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11807 to symbol_file_add_main.
11808
11809 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11810
11811 PR mi/22299
11812 * mi/mi-console.c (do_fputc_async_safe): New.
11813 (mi_console_file::write_async_safe): New.
11814 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11815 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11816 New.
11817 * ui-file.c (ui_file::putstrn): Adjust call to
11818 fputstrn_unfiltered.
11819 * utils.c (printchar): Replace do_fputs and do_fprintf
11820 parameters by do_fputc.
11821 (fputstr_filtered): Adjust call to printchar.
11822 (fputstr_unfiltered): Likewise.
11823 (fputstrn_filtered): Likewise.
11824 (fputstrn_unfiltered): Add do_fputc parameter, pass to
11825 printchar.
11826 * utils.h (do_fputc_ftype): New typedef.
11827 (fputstrn_unfiltered): Add do_fputc parameter.
11828
11829 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
11830
11831 * regformats/i386/i386-avx.dat: Remove.
11832
11833 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11834
11835 PR gdb/22979
11836 * amd64-tdep.c (amd64_none_init_abi): New function.
11837 (amd64_x32_none_init_abi): New function.
11838 (_initialize_amd64_tdep): Register handlers for x86-64 and
11839 x64_32 with GDB_OSABI_NONE.
11840 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11841 GDB_OSABI_NONE osabi.
11842
11843 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11844
11845 PR gdb/22980
11846 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11847 GDB_OSABI_NONE.
11848 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11849 * osabi.c (gdb_osabi_names): Add "unknown" entry.
11850
11851 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
11852
11853 * common/byte-vector.h (char_vector): New type.
11854 * target.h (target_read_alloc): Return
11855 gdb::optional<byte_vector>.
11856 (target_read_stralloc): Return gdb::optional<char_vector>.
11857 (target_get_osdata): Return gdb::optional<char_vector>.
11858 * target.c (target_read_alloc_1): Templatize. Replacement
11859 manual memory management with vector.
11860 (target_read_alloc): Change return type, adjust.
11861 (target_read_stralloc): Change return type, adjust.
11862 (target_get_osdata): Change return type, adjust.
11863 * auxv.c (struct auxv_info) <length>: Remove.
11864 <data>: Change type to gdb::optional<byte_vector>.
11865 (auxv_inferior_data_cleanup): Free auxv_info with delete.
11866 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11867 (target_auxv_search): Adjust.
11868 (fprint_target_auxv): Adjust.
11869 * avr-tdep.c (avr_io_reg_read_command): Adjust.
11870 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11871 (linux_make_corefile_notes): Adjust.
11872 * osdata.c (get_osdata): Adjust.
11873 * remote.c (remote_get_threads_with_qxfer): Adjust.
11874 (remote_memory_map): Adjust.
11875 (remote_traceframe_info): Adjust.
11876 (btrace_read_config): Adjust.
11877 (remote_read_btrace): Adjust.
11878 (remote_pid_to_exec_file): Adjust.
11879 * solib-aix.c (solib_aix_get_library_list): Adjust.
11880 * solib-dsbt.c (decode_loadmap): Don't free buf.
11881 (dsbt_get_initial_loadmaps): Adjust.
11882 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11883 * solib-target.c (solib_target_current_sos): Adjust.
11884 * tracepoint.c (sdata_make_value): Adjust.
11885 * xml-support.c (xinclude_start_include): Adjust.
11886 (xml_fetch_content_from_file): Adjust.
11887 * xml-support.h (xml_fetch_another): Change return type.
11888 (xml_fetch_content_from_file): Change return type.
11889 * xml-syscall.c (xml_init_syscalls_info): Adjust.
11890 * xml-tdesc.c (file_read_description_xml): Adjust.
11891 (fetch_available_features_from_target): Change return type.
11892 (target_fetch_description_xml): Adjust.
11893 (target_read_description_xml): Adjust.
11894
11895 2018-04-06 Tom Tromey <tom@tromey.com>
11896
11897 * value.c (~value): Update.
11898 (struct value) <contents>: Now unique_xmalloc_ptr.
11899 (value_contents_bits_eq, allocate_value_contents)
11900 (value_contents_raw, value_contents_all_raw)
11901 (value_contents_for_printing, value_contents_for_printing_const)
11902 (set_value_enclosing_type): Update.
11903
11904 2018-04-06 Tom Tromey <tom@tromey.com>
11905
11906 * value.c (range_s): Remove typedef, VEC.
11907 (struct range): Add operator<.
11908 (range_lessthan): Remove.
11909 (ranges_contain): Change type.
11910 (~value): Update.
11911 (struct value) <unavailable, optimized_out>: Now std::vector.
11912 (value_entirely_available)
11913 (value_entirely_covered_by_range_vector)
11914 (value_entirely_unavailable, value_entirely_optimized_out):
11915 Update.
11916 (insert_into_bit_range_vector): Change argument type.
11917 (find_first_range_overlap): Likewise.
11918 (struct ranges_and_idx, value_contents_bits_eq)
11919 (require_not_optimized_out, require_available): Update.
11920 (ranges_copy_adjusted): Change argument types.
11921 (value_optimized_out, value_copy, value_fetch_lazy): Update.
11922
11923 2018-04-06 Tom Tromey <tom@tromey.com>
11924
11925 * value.c (~value): Update.
11926 (struct value) <parent>: Now a value_ref_ptr.
11927 (value_parent, set_value_parent, value_address, value_copy):
11928 Update.
11929
11930 2018-04-06 Tom Tromey <tom@tromey.com>
11931
11932 * value.c (struct value): Add constructor, destructor, and member
11933 initializers.
11934 (allocate_value_lazy, value_decref): Update.
11935
11936 2018-04-06 Tom Tromey <tom@tromey.com>
11937
11938 * value.c (struct value) <released, next>: Remove.
11939 (all_values): Now a std::vector.
11940 (allocate_value_lazy): Update.
11941 (value_next): Remove.
11942 (value_mark, value_free_to_mark, release_value)
11943 (value_release_to_mark): Update.
11944
11945 2018-04-06 Tom Tromey <tom@tromey.com>
11946
11947 * value.h (fetch_subexp_value, value_release_to_mark): Update.
11948 (free_value_chain): Remove.
11949 * value.c (free_value_chain): Remove.
11950 (value_release_to_mark): Return a std::vector.
11951 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11952 std::vector.
11953 (check_condition): Update.
11954 * eval.c (fetch_subexp_value): Change "val_chain" to a
11955 std::vector.
11956 * breakpoint.c (update_watchpoint): Update.
11957 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11958
11959 2018-04-06 Tom Tromey <tom@tromey.com>
11960
11961 * value.h (free_all_values): Remove.
11962 * value.c (free_all_values): Remove.
11963
11964 2018-04-06 Tom Tromey <tom@tromey.com>
11965
11966 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11967 (value_history_chain, value_history_count): Remove.
11968 (value_history): New global.
11969 (record_latest_value, access_value_history, show_values)
11970 (preserve_values): Update.
11971
11972 2018-04-06 Tom Tromey <tom@tromey.com>
11973
11974 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11975 * varobj.c (varobj_set_display_format, varobj_set_value)
11976 (install_default_visualizer, construct_visualizer)
11977 (install_new_value, ~varobj, varobj_get_value_type)
11978 (my_value_of_variable, varobj_editable_p): Update.
11979 * c-varobj.c (c_describe_child, c_value_of_variable)
11980 (cplus_number_of_children, cplus_describe_child): Update.
11981 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11982 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11983 (ada_value_of_variable, ada_value_is_changeable_p): Update.
11984
11985 2018-04-06 Tom Tromey <tom@tromey.com>
11986
11987 * printcmd.c (last_examine_address): Change type to
11988 value_ref_ptr.
11989 (do_examine, x_command): Update.
11990
11991 2018-04-06 Tom Tromey <tom@tromey.com>
11992
11993 * value.c (release_value): Update.
11994 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11995 (struct bpstats) <val>: Now a value_ref_ptr.
11996 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11997 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11998 (~watchpoint, print_it_watchpoint, watch_command_1)
11999 (invalidate_bp_value_on_memory_change): Update.
12000
12001 2018-04-06 Tom Tromey <tom@tromey.com>
12002
12003 * varobj.c (varobj_clear_saved_item)
12004 (update_dynamic_varobj_children, install_new_value, ~varobj):
12005 Update.
12006 * value.h (value_incref): Move declaration earlier.
12007 (value_decref): Rename from value_free.
12008 (struct value_ref_policy): New.
12009 (value_ref_ptr): New typedef.
12010 (struct value_deleter): Remove.
12011 (gdb_value_up): Remove typedef.
12012 (release_value): Change return type.
12013 (release_value_or_incref): Remove.
12014 * value.c (set_value_parent): Update.
12015 (value_incref): Change return type.
12016 (value_decref): Rename from value_free.
12017 (value_free_to_mark, free_all_values, free_value_chain): Update.
12018 (release_value): Return value_ref_ptr.
12019 (release_value_or_incref): Remove.
12020 (record_latest_value, set_internalvar, clear_internalvar):
12021 Update.
12022 * stack.c (info_frame_command): Don't call value_free.
12023 * python/py-value.c (valpy_dealloc, valpy_new)
12024 (value_to_value_object): Update.
12025 * printcmd.c (do_examine): Update.
12026 * opencl-lang.c (lval_func_free_closure): Update.
12027 * mi/mi-main.c (register_changed_p): Don't call value_free.
12028 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12029 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12030 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12031 value_free.
12032 * guile/scm-value.c (vlscm_free_value_smob)
12033 (vlscm_scm_from_value): Update.
12034 * frame.c (frame_register_unwind, frame_unwind_register_signed)
12035 (frame_unwind_register_unsigned, get_frame_register_bytes)
12036 (put_frame_register_bytes): Don't call value_free.
12037 * findvar.c (address_from_register): Don't call value_free.
12038 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12039 * dwarf2loc.c (entry_data_value_free_closure)
12040 (value_of_dwarf_reg_entry, free_pieced_value_closure)
12041 (dwarf2_evaluate_loc_desc_full): Update.
12042 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12043 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12044 (~watchpoint, watch_command_1)
12045 (invalidate_bp_value_on_memory_change): Update.
12046 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12047
12048 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
12049
12050 PR gdb/23022
12051 * warning.m4: Add -Wno-error=deprecated-register.
12052 * configure: Re-generate.
12053
12054 2018-04-05 Tom Tromey <tom@tromey.com>
12055
12056 * linespec.h: Remove include of "vec.h".
12057
12058 2018-04-05 Tom Tromey <tom@tromey.com>
12059
12060 * linespec.c (typep): Remove typedef.
12061 (find_methods, find_superclass_methods): Take a std::vector.
12062 (find_method): Use std::vector.
12063
12064 2018-04-05 Tom Tromey <tom@tromey.com>
12065
12066 * utils.c (compare_strings): Remove.
12067 * utils.h (compare_strings): Remove.
12068 * objc-lang.h (find_imps): Update.
12069 * objc-lang.c (find_methods): Take a std::vector.
12070 (uniquify_strings, find_imps): Likewise.
12071 * linespec.c (find_methods): Take a std::vector.
12072 (decode_objc): Use std::vector.
12073 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12074 a std::vector.
12075 (find_method, find_function_symbols): Use std::vector.
12076
12077 2018-04-05 Tom Tromey <tom@tromey.com>
12078
12079 * completer.c (completion_tracker::completion_tracker): Remove
12080 cast.
12081 (completion_tracker::discard_completions): Likewise.
12082 * breakpoint.c (ambiguous_names_p): Remove cast.
12083 * ada-lang.c (_initialize_ada_language): Remove cast.
12084 * utils.h (streq): Update.
12085 (streq_hash): Add new declaration.
12086 * utils.c (streq): Return bool.
12087 (streq_hash): New function.
12088
12089 2018-04-05 Tom Tromey <tom@tromey.com>
12090
12091 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12092 Remove a string copy.
12093
12094 2018-04-05 Tom Tromey <tom@tromey.com>
12095
12096 * linespec.c (filter_results): Use std::vector.
12097 (decode_line_2, decode_line_full): Update.
12098
12099 2018-04-05 Tom Tromey <tom@tromey.com>
12100
12101 * linespec.c (canonical_to_fullform): Return std::string.
12102 (filter_results): Update.
12103 (struct decode_line_2_item): Add constructor.
12104 <fullform, displayform>: Now std::string.
12105 (decode_line_2_compare_items): Now a std::sort comparator.
12106 (decode_line_2): Update.
12107
12108 2018-04-05 Tom Tromey <tom@tromey.com>
12109
12110 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12111 (unexpected_linespec_error): Update.
12112 (linespec_parse_basic, parse_linespec): Update.
12113
12114 2018-04-05 Tom Tromey <tom@tromey.com>
12115
12116 * linespec.c (linespec_parse_basic): Reindent.
12117
12118 2018-04-05 Tom Tromey <tom@tromey.com>
12119
12120 * minsyms.h (iterate_over_minimal_symbols): Update.
12121 * minsyms.c (iterate_over_minimal_symbols): Take a
12122 gdb::function_view.
12123 * linespec.c (struct collect_minsyms): Remove.
12124 (compare_msyms): Now a std::sort comparator.
12125 (add_minsym): Add parameters.
12126 (search_minsyms_for_name): Update. Use std::vector.
12127
12128 2018-04-03 Tom Tromey <tom@tromey.com>
12129
12130 * mipsread.c (read_alphacoff_dynamic_symtab): Use
12131 gdb::byte_vector.
12132
12133 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
12134
12135 * MAINTAINERS (Write After Approval): Add Weimin Pan.
12136
12137 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
12138
12139 PR gdb/16959
12140 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
12141 printing static type.
12142
12143 2018-04-01 Tom Tromey <tom@tromey.com>
12144
12145 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12146 (rs6000_xfer_shared_libraries): Update.
12147
12148 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
12149
12150 * common/gdb_vecs.h (char_ptr): Remove.
12151 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12152
12153 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
12154
12155 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12156 with std::vector.
12157 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12158
12159 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
12160
12161 * tracepoint.h (struct uploaded_tp): Initialize fields.
12162 <actions, step_actions, cmd_strings>: Change type to
12163 std::vector<char *>.
12164 * tracepoint.c (get_uploaded_tp): Allocate with new.
12165 (free_uploaded_tps): Free with delete.
12166 (parse_tracepoint_definition): Adjust to std::vector change.
12167 * breakpoint.c (read_uploaded_action): Likewise.
12168 (create_tracepoint_from_upload): Likewise.
12169 * ctf.c (ctf_write_uploaded_tp): Likewise.
12170 (SET_ARRAY_FIELD): Likewise.
12171 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12172
12173 2018-03-30 Tom Tromey <tom@tromey.com>
12174
12175 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
12176 std::unique_ptr.
12177 (svr4_keep_data_in_core): Update.
12178 (svr4_read_so_list): Update.
12179
12180 2018-03-30 Tom Tromey <tom@tromey.com>
12181
12182 * windows-nat.c (handle_output_debug_string, handle_exception):
12183 Update.
12184 * target.h (target_read_string): Update.
12185 * target.c (target_read_string): Change "string" to
12186 unique_xmalloc_ptr.
12187 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12188 Update.
12189 * solib-frv.c (frv_current_sos): Update.
12190 * solib-dsbt.c (dsbt_current_sos): Update.
12191 * solib-darwin.c (darwin_current_sos): Update.
12192 * linux-thread-db.c (inferior_has_bug): Update.
12193 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12194 Update. Remove alloca.
12195 * ada-lang.c (ada_main_name): Update.
12196
12197 2018-03-30 Tom Tromey <tom@tromey.com>
12198
12199 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12200 (struct dwo_file_deleter): New.
12201 (dwo_file_up): New typedef.
12202 (open_and_init_dwo_file): Use dwo_file_up.
12203 (free_dwo_file_cleanup): Remove.
12204
12205 2018-03-30 Tom Tromey <tom@tromey.com>
12206
12207 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12208 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12209
12210 2018-03-30 Tom Tromey <tom@tromey.com>
12211
12212 * dwarf2read.c (class free_cached_comp_units): New class.
12213 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12214 (free_cached_comp_units): Remove function.
12215
12216 2018-03-30 Tom Tromey <tom@tromey.com>
12217
12218 * utils.h (make_cleanup_unpush_target): Remove.
12219 * inf-ptrace.c (struct target_unpusher): New.
12220 (target_unpush_up) New typedef.
12221 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12222 target_unpush_up.
12223 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12224
12225 2018-03-27 Tom Tromey <tom@tromey.com>
12226
12227 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12228
12229 2018-03-27 Pedro Alves <palves@redhat.com>
12230 Tom Tromey <tom@tromey.com>
12231
12232 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12233 destructor. Now a class.
12234 (gdb_readline_wrapper_cleanup): Remove function.
12235 (gdb_readline_wrapper): Remove cleanups.
12236
12237 2018-03-27 Tom Tromey <tom@tromey.com>
12238
12239 * typeprint.h (struct type_print_options) <local_typedefs,
12240 global_typedefs>: Remove "struct" keyword.
12241 (class typedef_hash_table): New class.
12242 (recursively_update_typedef_hash, add_template_parameters)
12243 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12244 (find_typedef_in_hash): Don't declare.
12245 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12246 (typedef_hash_table::recursively_update): Rename from
12247 recursively_update_typedef_hash. Now a member.
12248 (typedef_hash_table::add_template_parameters): Rename from
12249 add_template_parameters. Now a member.
12250 (typedef_hash_table::typedef_hash_table): Now a constructor;
12251 rename from create_typedef_hash.
12252 (typedef_hash_table::~typedef_hash_table): Now a destructor;
12253 rename from free_typedef_hash.
12254 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12255 (do_free_global_table): Remove.
12256 (typedef_hash_table::typedef_hash_table): New constructor; renamed
12257 from copy_type_recursive.
12258 (create_global_typedef_table): Remove.
12259 (typedef_hash_table::find_global_typedef): Now a member of
12260 typedef_hash_table.
12261 (typedef_hash_table::find_typedef): Rename from
12262 find_typedef_in_hash; now a member.
12263 (whatis_exp): Update.
12264 * extension.h (struct ext_lang_type_printers): Add constructor and
12265 destructor.
12266 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12267 declare.
12268 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12269 Now a constructor; rename from start_ext_lang_type_printers.
12270 (ext_lang_type_printers): Now a destructor; rename from
12271 free_ext_lang_type_printers.
12272 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12273 Update.
12274 (c_type_print_base_struct_union): Update. Remove cleanups.
12275
12276 2018-03-27 Tom Tromey <tom@tromey.com>
12277
12278 * dwarf-index-write.c: Include <cmath>.
12279
12280 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12281
12282 * NEWS: Add entry describing new "set|show varsize-limit" command.
12283 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12284 command.
12285 * printcmd.c (_initialize_printcmd): Add "set var" alias of
12286 "set variable".
12287
12288 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
12289
12290 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12291 dwarf-index-write.c
12292 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12293 * dwarf-index-common.c: New file.
12294 * dwarf-index-common.h: New file.
12295 * dwarf-index-write.c: New file.
12296 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12297 (struct dwarf2_section_info): Move from here.
12298 (dwarf2_section_info_def): Likewise.
12299 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12300 (offset_type): Likewise.
12301 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12302 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12303 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12304 (byte_swap): Likewise.
12305 (MAYBE_SWAP): Likewise.
12306 (dwarf2_per_cu_ptr): Likewise.
12307 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12308 (struct tu_stats): Likewise.
12309 (struct dwarf2_per_objfile): Likewise.
12310 (struct dwarf2_per_cu_data): Likewise.
12311 (struct signatured_type): Likewise.
12312 (sig_type_ptr): Likewise.
12313 (DEF_VEC_P (sig_type_ptr)): Likewise.
12314 (INDEX4_SUFFIX): Likewise.
12315 (INDEX5_SUFFIX): Likewise.
12316 (DEBUG_STR_SUFFIX): Likewise.
12317 (dwarf2_read_section): Make non-static.
12318 (mapped_index_string_hash): Move from here.
12319 (dwarf5_djb_hash): Likewise.
12320 (file_write): Likewise.
12321 (class data_buf): Likewise.
12322 (struct symtab_index_entry): Likewise.
12323 (struct mapped_symtab): Likewise.
12324 (find_slot): Likewise.
12325 (hash_expand): Likewise.
12326 (add_index_entry): Likewise.
12327 (uniquify_cu_indices): Likewise.
12328 (class c_str_view): Likewise.
12329 (class c_str_view_hasher): Likewise.
12330 (class vector_hasher): Likewise.
12331 (write_hash_table): Likewise.
12332 (psym_index_map): Likewise.
12333 (struct addrmap_index_data): Likewise.
12334 (add_address_entry): Likewise.
12335 (add_address_entry_worker): Likewise.
12336 (write_address_map): Likewise.
12337 (symbol_kind): Likewise.
12338 (write_psymbols): Likewise.
12339 (struct signatured_type_index_data): Likewise.
12340 (write_one_signatured_type): Likewise.
12341 (recursively_count_psymbols): Likewise.
12342 (recursively_write_psymbols): Likewise.
12343 (class debug_names): Likewise.
12344 (check_dwarf64_offsets): Likewise.
12345 (psyms_seen_size): Likewise.
12346 (write_gdbindex): Likewise.
12347 (write_debug_names): Likewise.
12348 (assert_file_size): Likewise.
12349 (write_psymtabs_to_index): Likewise.
12350 (save_gdb_index_command): Likewise.
12351 (_initialize_dwarf2_read): Don't register the "save gdb-index"
12352 command.
12353 * dwarf2read.h: New file.
12354
12355 2018-03-27 Joel Brobecker <brobecker@adacore.com>
12356
12357 PR gdb/22670
12358 * dwarf2read.c (dwarf2_physname): Do not return the demangled
12359 symbol name if the CU's language stores symbol names in linkage
12360 format.
12361 * language.h (struct language_defn)
12362 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
12363 all instances of this struct.
12364
12365 2018-03-26 Tom Tromey <tom@tromey.com>
12366
12367 * stack.c (backtrace_command_1): Remove verbose code.
12368
12369 2018-03-26 Tom Tromey <tom@tromey.com>
12370
12371 * python/py-framefilter.c (py_print_type): Don't catch
12372 exceptions. Return void.
12373 (py_print_value): Likewise.
12374 (py_print_single_arg): Likewise.
12375 (enumerate_args): Don't catch exceptions.
12376 (py_print_args): Likewise.
12377 (py_print_frame): Likewise.
12378 (gdbpy_apply_frame_filter): Catch exceptions here.
12379
12380 2018-03-26 Tom Tromey <tom@tromey.com>
12381
12382 * stack.c (_initialize_stack): Remove trailing newlines from help
12383 text. Add "Usage" line to "backtrace" help.
12384
12385 2018-03-26 Tom Tromey <tom@tromey.com>
12386
12387 PR python/16486:
12388 * python/py-framefilter.c (py_print_args): Call wrap_hint.
12389
12390 2018-03-26 Tom Tromey <tom@tromey.com>
12391
12392 * python/py-framefilter.c (py_print_single_arg): Return
12393 EXT_LANG_BT_ERROR from catch.
12394
12395 2018-03-26 Tom Tromey <tom@tromey.com>
12396
12397 PR backtrace/15584:
12398 * stack.c (backtrace_command_1): Move some code into no-filters
12399 "if".
12400
12401 2018-03-26 Tom Tromey <tom@tromey.com>
12402
12403 * python/py-framefilter.c (throw_quit_or_print_exception): New
12404 function.
12405 (gdbpy_apply_frame_filter): Use it.
12406
12407 2018-03-26 Tom Tromey <tom@tromey.com>
12408
12409 PR cli/17716:
12410 * python/py-framefilter.c (py_print_type, py_print_value)
12411 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12412 RETURN_MASK_ERROR.
12413
12414 2018-03-26 Tom Tromey <tom@tromey.com>
12415
12416 * python/py-framefilter.c (enumerate_args): Use
12417 gdb::unique_xmalloc_ptr.
12418
12419 2018-03-26 Tom Tromey <tom@tromey.com>
12420
12421 * python/py-framefilter.c (py_print_frame): Return
12422 EXT_LANG_BT_OK.
12423 (gdbpy_apply_frame_filter): Update comment.
12424 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12425 Remove.
12426 <EXT_LANG_BT_NO_FILTERS>: Change value.
12427
12428 2018-03-26 Tom Tromey <tom@tromey.com>
12429
12430 PR backtrace/15582:
12431 * stack.c (backtrace_command): Parse "hide" argument.
12432 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12433 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12434 constant.
12435
12436 2018-03-26 Tom Tromey <tom@tromey.com>
12437
12438 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12439 add "flags".
12440 (backtrace_command): Remove "fulltrace", add "flags".
12441
12442 2018-03-26 Tom Tromey <tom@tromey.com>
12443
12444 * stack.c (backtrace_command): Rewrite command line parsing.
12445
12446 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12447
12448 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12449
12450 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
12451
12452 * filename-seen-cache.h: Add include guard.
12453
12454 2018-03-26 Keith Seitz <keiths@redhat.com>
12455
12456 * symfile.c (place_section): Remove "struct" from section_addr_info
12457 in comment.
12458 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12459 "struct" keyword from section_addr_info.
12460
12461 2018-03-26 Alan Hayward <alan.hayward@arm.com>
12462
12463 * regformats/regdef.h (reg): Add constructors.
12464
12465 2018-03-25 Pedro Alves <palves@redhat.com>
12466
12467 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12468 if then/else bodies in var_func_name extraction.
12469
12470 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
12471
12472 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12473 lookup_minimal_symbol() to find symbol entry.
12474 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12475
12476 2018-03-23 Keith Seitz <keiths@redhat.com>
12477
12478 PR c++/22968
12479 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12480 nested type definitions for C++, too.
12481
12482 2018-03-23 Tom Tromey <tom@tromey.com>
12483
12484 * machoread.c (struct oso_el): Add a constructor. Don't define as
12485 a typedef.
12486 (macho_register_oso): Remove.
12487 (macho_symtab_read): Take a std::vector.
12488 (oso_el_compare_name): Now a std::sort comparator.
12489 (macho_symfile_read_all_oso): Take a std::vector.
12490 (macho_symfile_read): Use std::vector. Remove cleanups.
12491
12492 2018-03-22 Tom Tromey <tom@tromey.com>
12493
12494 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12495 (record_full_goto_bookmark): Use std::string.
12496
12497 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12498
12499 PR tdep/18295
12500 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12501 a single mask.
12502
12503 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12504
12505 * rs6000-tdep.c (store_insn_p): New function.
12506 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12507 and cr_reg to their unshifted values. Use store_insn_p to
12508 match LR saves using either R1 or fdata->alloca_reg. Use
12509 store_insn_p to match CR saves. Set alloca_reg_offset
12510 when alloca_reg and framep are set. Remove lr_reg shift
12511 when assigning to fdata->lr_register.
12512
12513 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
12514
12515 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12516 command line args instead of emitting a warning.
12517
12518 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12519
12520 * tracepoint.h (struct static_tracepoint_marker): Initialize
12521 fields, define default constructor, move constructor and move
12522 assignment, disable the rest.
12523 <str_id, extra>: Make std::string.
12524 (release_static_tracepoint_marker): Remove.
12525 (free_current_marker): Remove.
12526 * tracepoint.c (free_current_marker): Remove.
12527 (parse_static_tracepoint_marker_definition): Adjust to
12528 std::string, use new hex2str overload.
12529 (release_static_tracepoint_marker): Remove.
12530 (print_one_static_tracepoint_marker): Get marker by reference
12531 and adjust to std::string.
12532 (info_static_tracepoint_markers_command): Adjust to std::vector
12533 changes
12534 * target.h (static_tracepoint_marker_p): Remove typedef.
12535 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12536 (struct target_ops) <to_static_tracepoint_marker_at>: Return
12537 bool.
12538 <to_static_tracepoint_markers_by_strid>: Return std::vector.
12539 * target-debug.h
12540 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12541 (target_debug_print_std_vector_static_tracepoint_marker): New.
12542 (target_debug_print_struct_static_tracepoint_marker_p): Rename
12543 to...
12544 (target_debug_print_static_tracepoint_marker_p): ... this.
12545 * target-delegates.c: Re-generate.
12546 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12547 Make std::string.
12548 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12549 (decode_static_tracepoint_spec): Adjust to std::vector.
12550 (tracepoint_print_one_detail): Adjust to std::string.
12551 (strace_marker_decode_location): Adjust to std::string.
12552 (update_static_tracepoint): Adjust to std::string, remove call
12553 to release_static_tracepoint_marker.
12554 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12555 Adjust to std::vector.
12556 * remote.c (remote_static_tracepoint_marker_at): Return bool.
12557 (remote_static_tracepoint_markers_by_strid): Adjust to
12558 std::vector.
12559 * common/rsp-low.h (hex2str): New overload with explicit count
12560 of bytes.
12561 * common/rsp-low.c (hex2str): New overload with explicit count
12562 of bytes.
12563 * unittests/rsp-low-selftests.c (test_hex2str): New function.
12564 (_initialize_rsp_low_selftests): Add test_hex2str test.
12565 * unittests/tracepoint-selftests.c
12566 (test_parse_static_tracepoint_marker_definition): Adjust to
12567 std::string.
12568
12569 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
12570
12571 * tracepoint.c (parse_static_tracepoint_marker_definition):
12572 Consider case where the definition is followed by more
12573 definitions.
12574 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12575 tracepoint-selftests.c.
12576 * unittests/tracepoint-selftests.c: New.
12577
12578 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
12579
12580 * MAINTAINERS (Write After Approval): Add Pedro Franco de
12581 Carvalho.
12582
12583 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12584
12585 * symtab.c (find_pc_sect_line): fixed indentation.
12586
12587 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
12588
12589 * symtab.c (find_pc_sect_line): now uses binary search.
12590
12591 2018-03-19 Tom Tromey <tom@tromey.com>
12592
12593 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12594 "IDENT" production.
12595
12596 2018-03-19 Pedro Alves <palves@redhat.com>
12597 Tom Tromey <tom@tromey.com>
12598
12599 * unittests/observable-selftests.c: New file.
12600 * common/observable.h: New file.
12601 * observable.h: New file.
12602 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12603 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12604 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12605 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12606 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12607 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12608 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12609 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12610 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12611 python/py-breakpoint.c, python/py-finishbreakpoint.c,
12612 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12613 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12614 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12615 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12616 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12617 tui/tui-interp.c, valops.c: Update all users.
12618 * tui/tui-hooks.c (tui_bp_created_observer)
12619 (tui_bp_deleted_observer, tui_bp_modified_observer)
12620 (tui_inferior_exit_observer, tui_before_prompt_observer)
12621 (tui_normal_stop_observer, tui_register_changed_observer):
12622 Remove.
12623 (tui_observers_token): New global.
12624 (attach_or_detach, tui_attach_detach_observers): New functions.
12625 (tui_install_hooks, tui_remove_hooks): Use
12626 tui_attach_detach_observers.
12627 * record-btrace.c (record_btrace_thread_observer): Remove.
12628 (record_btrace_thread_observer_token): New global.
12629 * observer.sh: Remove.
12630 * observer.c: Rename to observable.c.
12631 * observable.c (namespace gdb_observers): Define new objects.
12632 (observer_debug): Move into gdb_observers namespace.
12633 (struct observer, struct observer_list, xalloc_observer_list_node)
12634 (xfree_observer_list_node, generic_observer_attach)
12635 (generic_observer_detach, generic_observer_notify): Remove.
12636 (_initialize_observer): Update.
12637 Don't include observer.inc.
12638 * Makefile.in (generated_files): Remove observer.h, observer.inc.
12639 (clean mostlyclean): Likewise.
12640 (observer.h, observer.inc): Remove targets.
12641 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12642 (COMMON_SFILES): Use observable.c, not observer.c.
12643 * .gitignore: Remove observer.h.
12644
12645 2018-03-18 Tom Tromey <tom@tromey.com>
12646
12647 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12648 gdb::def_vector.
12649 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12650
12651 2018-03-17 Tom Tromey <tom@tromey.com>
12652
12653 * auto-load.c (auto_load_objfile_script_1): Use std::string.
12654
12655 2018-03-17 Tom Tromey <tom@tromey.com>
12656
12657 * target.c (class scoped_target_fd): New.
12658 (target_fileio_close_cleanup): Remove.
12659 (target_fileio_read_alloc_1): Use scoped_target_fd.
12660
12661 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
12662
12663 * silent-rules.mk: New.
12664 * Makefile.in: Include silent-rules.mk
12665 (srcdir, VPATH, top_srcdir): Move up.
12666 (COMPILE): Add ECHO_CXX.
12667 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12668 (init.c): Add ECHO_INIT_C.
12669 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12670 (version.c): Add ECHO_GEN.
12671 (printcmd.o): Add ECHO_CXX.
12672 (target-float.o): Add ECHO_CXX.
12673 (ada-exp.o): Add ECHO_CXX.
12674 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12675 (insight$(EXEEXT)): Add ECHO_CXXLD.
12676 * gnulib/configure.ac: Add AM_SILENT_RULES.
12677 * gnulib/aclocal.m4: Re-generate.
12678 * gnulib/configure: Re-generate.
12679 * gnulib/import/Makefile.in: Re-generate.
12680
12681 2018-03-16 Tom Tromey <tom@tromey.com>
12682
12683 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12684 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12685 * utils.c (do_free_section_addr_info)
12686 (make_cleanup_free_section_addr_info): Remove.
12687 * symfile.h (struct other_sections): Add constructor.
12688 (struct section_addr_info): Remove.
12689 (section_addr_info): New typedef.
12690 (struct sym_fns) <sym_offsets>: Change type of parameter.
12691 (build_section_addr_info_from_objfile)
12692 (relative_addr_info_to_section_offsets, addr_info_make_relative)
12693 (default_symfile_offsets, symbol_file_add)
12694 (symbol_file_add_from_bfd)
12695 (build_section_addr_info_from_section_table): Update.
12696 (alloc_section_addr_info, free_section_addr_info): Don't declare.
12697 * symfile.c (alloc_section_addr_info): Remove.
12698 (build_section_addr_info_from_section_table): Change return type.
12699 Update.
12700 (build_section_addr_info_from_bfd)
12701 (build_section_addr_info_from_objfile): Likewise.
12702 (free_section_addr_info): Remove.
12703 (relative_addr_info_to_section_offsets): Change type of "addrs".
12704 (addrs_section_compar): Now a std::sort comparator.
12705 (addrs_section_sort): Change return type.
12706 (addr_info_make_relative): Change type of "addrs". Update.
12707 (default_symfile_offsets, syms_from_objfile_1)
12708 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12709 (symbol_file_add_separate): Update.
12710 (symbol_file_add): Change type of "addrs". Update.
12711 (add_symbol_file_command): Update. Remove cleanups.
12712 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
12713 cleanups.
12714 * symfile-debug.c (debug_sym_offsets): Change type of "info".
12715 * solib.c (solib_read_symbols): Update.
12716 * objfiles.c (objfile_relocate): Update. Remove cleanups.
12717 * machoread.c (macho_symfile_offsets): Update.
12718 * jit.c (jit_bfd_try_read_symtab): Update.
12719
12720 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
12721
12722 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12723 unittests/utils-selftests.c.
12724 * unittests/utils-selftests.c: New file.
12725
12726 2018-03-14 Tom Tromey <tom@tromey.com>
12727
12728 PR cli/14977:
12729 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12730 for NULL.
12731
12732 2018-03-14 Tom Tromey <tom@tromey.com>
12733
12734 PR cli/19918:
12735 * printcmd.c (printf_pointer): Allow "-" in format.
12736
12737 2018-03-14 Tom Tromey <tom@tromey.com>
12738
12739 * printcmd.c (_initialize_printcmd): Add usage to printf.
12740
12741 2018-03-14 Yao Qi <qiyao@sourceware.org>
12742
12743 * MAINTAINERS: Update my email address.
12744
12745 2018-03-13 Tom Tromey <tom@tromey.com>
12746
12747 * machoread.c (macho_check_dsym): Change filenamep to a
12748 std::string*.
12749 (macho_symfile_read): Update.
12750 * symfile.c (load_command): Use std::string.
12751
12752 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
12753
12754 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12755 to error message string.
12756 (riscv_register_name): Use xsnprintf instead of sprintf.
12757 (riscv_insn::fetch_instruction): Use gdb_assert instead of
12758 internal_error.
12759 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12760 error.
12761 (riscv_push_dummy_call): Likewise.
12762
12763 2018-03-12 Tom Tromey <tom@tromey.com>
12764
12765 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12766 Use gdb::byte_vector.
12767 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12768
12769 2018-03-12 Yao Qi <yao.qi@linaro.org>
12770
12771 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12772 parameter type to readable_regcache.
12773 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12774 the declaration.
12775
12776 2018-03-11 Tom Tromey <tom@tromey.com>
12777
12778 * dwarf2read.c (struct nextfield): Add initializers.
12779 (struct nextfnfield): Remove.
12780 (struct fnfieldlist): Add initializers. Remove "length" and
12781 "head", use std::vector.
12782 (struct decl_field_list): Remove.
12783 (struct field_info): Add initializers.
12784 <fields, baseclasses>: Now std::vector.
12785 <nbaseclasses, nfnfields, typedef_field_list_count,
12786 nested_types_list_count>: Remove.
12787 (dwarf2_add_field, dwarf2_add_type_defn)
12788 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12789 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12790 (process_structure_scope): Update.
12791
12792 2018-03-11 Tom Tromey <tom@tromey.com>
12793
12794 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12795 for use by std::sort.
12796 (build_type_psymtabs_1): Use std::vector.
12797
12798 2018-03-09 Eli Zaretskii <eliz@gnu.org>
12799
12800 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12801 and LIBMPFR in the printed configuration.
12802
12803 2018-03-08 Tom Tromey <tom@tromey.com>
12804
12805 * source.c (get_filename_and_charpos): Use scoped_fd.
12806 * nto-procfs.c (procfs_open_1): Use scoped_fd.
12807 (procfs_pidlist): Likewise.
12808 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12809 (iterate_over_mappings): Likewise.
12810
12811 2018-03-08 Tom Tromey <tom@tromey.com>
12812
12813 * infcall.c (struct call_return_meta_info)
12814 <stack_temporaries_enabled>: Remove.
12815 (get_call_return_value, call_function_by_hand_dummy): Update.
12816 * thread.c (disable_thread_stack_temporaries): Remove.
12817 (enable_thread_stack_temporaries): Remove.
12818 (thread_stack_temporaries_enabled_p): Return bool.
12819 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12820 (get_last_thread_stack_temporary): Update.
12821 * eval.c (evaluate_subexp): Update.
12822 * gdbthread.h (class enable_thread_stack_temporaries): Now a
12823 class, not a function.
12824 (value_ptr, value_vec): Remove typedefs.
12825 (class thread_info) <stack_temporaries_enabled>: Now bool.
12826 <stack_temporaries>: Now a std::vector.
12827 (thread_stack_temporaries_enabled_p)
12828 (value_in_thread_stack_temporaries): Return bool.
12829
12830 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
12831
12832 * remote.c (putpkt_binary): Fix omitted bytes reporting.
12833 (getpkt_or_notif_sane_1): Likewise.
12834
12835 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12836
12837 * build-id.c (build_id_to_debug_bfd): Use std::string.
12838
12839 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12840
12841 * build-id.c (find_separate_debug_file_by_buildid): Return
12842 std::string.
12843 * build-id.h (find_separate_debug_file_by_buildid): Return
12844 std::string.
12845 * coffread.c (coff_symfile_read): Adjust to std::string.
12846 * elfread.c (elf_symfile_read): Adjust to std::string.
12847 * symfile.c (separate_debug_file_exists): Change parameter to
12848 std::string.
12849 (find_separate_debug_file): Return std::string.
12850 (find_separate_debug_file_by_debuglink): Return std::string.
12851 * symfile.h (find_separate_debug_file_by_debuglink): Return
12852 std::string.
12853
12854 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
12855
12856 * common/xml-utils.c (xml_escape_text): Move code to...
12857 (xml_escape_text_append): ... this new function.
12858 * common/xml-utils.h (xml_escape_text_append): New declaration.
12859 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12860 New function.
12861 (_initialize_xml_utils): register test_xml_escape_text_append as
12862 a selftest.
12863
12864 2018-03-07 Alan Hayward <alan.hayward@arm.com>
12865
12866 * defs.h: Remove MAX_REGISTER_SIZE.
12867 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12868 asserts.
12869 * python/py-unwind.c (pyuw_sniffer): Likewise.
12870
12871 2018-03-07 Tom Tromey <tom@tromey.com>
12872
12873 * linux-tdep.c (linux_info_proc): Update.
12874 * target.h (struct target_ops) <to_fileio_readlink>: Return
12875 optional<string>.
12876 (target_fileio_readlink): Return optional<string>.
12877 * remote.c (remote_hostio_readlink): Return optional<string>.
12878 * inf-child.c (inf_child_fileio_readlink): Return
12879 optional<string>.
12880 * target.c (target_fileio_readlink): Return optional<string>.
12881
12882 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
12883
12884 * regcache.c (cooked_read_test): Add riscv to the list of
12885 architectures that have a save_reggroup.
12886
12887 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
12888
12889 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12890 value is not a dynamic class object.
12891
12892 2018-03-06 Tom Tromey <tom@tromey.com>
12893
12894 * rust-exp.y: Formatting fixes.
12895
12896 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12897
12898 * riscv-tdep.c (riscv_register_name): Remove target description
12899 support.
12900 (riscv_gdbarch_init): Remove target description check.
12901
12902 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12903
12904 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12905 comment.
12906 * riscv-tdep.h: Likewise.
12907
12908 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12909
12910 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12911 (riscv_pseudo_register_write): Delete.
12912 (riscv_gdbarch_init): Remove all use of pseudo registers.
12913
12914 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12915
12916 * record-btrace.c (btrace_print_lines): Replace cleanup
12917 parameter with RAII equivalents.
12918 (btrace_insn_history): Replace cleanup with RAII equivalents.
12919 * ui-out.h (make_cleanup_ui_out_list_begin_end,
12920 make_cleanup_ui_out_tuple_begin_end): Remove.
12921 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12922 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12923 make_cleanup_ui_out_list_begin_end): Remove.
12924
12925 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12926
12927 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12928 parameter types to std::vector. Use bool.
12929 (record_btrace_wait): Replace VEC(tp_t) with
12930 std::vector<thread_info *>.
12931 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12932
12933 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
12934
12935 * record-btrace.c (record_btrace_disable_callback): Remove.
12936 (struct scoped_btrace_disable): New.
12937 (record_btrace_open): Use scoped_btrace_disable.
12938
12939 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12940
12941 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12942 reading values from registers.
12943
12944 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12945
12946 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12947 where appropriate.
12948
12949 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12950
12951 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12952 change parameter type. Use GDB's print functions, and use
12953 core_addr_to_string where appropriate.
12954 (riscv_push_dummy_call): Use core_addr_to_string where
12955 appropriate, update call to riscv_print_arg_location, and reindent
12956 a few lines.
12957 (riscv_return_value): Update call to riscv_print_arg_location.
12958
12959 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12960 Tim Newsome <tim@sifive.com>
12961 Albert Ou <a0u@eecs.berkeley.edu>
12962 Darius Rad <darius@bluespec.com>
12963
12964 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12965 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12966 (ALLDEPFILES): Add riscv-tdep.c
12967 * configure.tgt: Add riscv support.
12968 * riscv-tdep.c: New file.
12969 * riscv-tdep.h: New file.
12970 * NEWS: Mention new target.
12971 * MAINTAINERS: Add entry for riscv.
12972
12973 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
12974
12975 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12976 fields within aggregates.
12977
12978 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
12979
12980 * record-btrace.c (btrace_print_lines): Change type of flags to
12981 gdb_disassembly_flags.
12982
12983 2018-03-04 John Baldwin <jhb@FreeBSD.org>
12984
12985 * fbsd-nat.c: Include "inf-ptrace.h".
12986 (USE_SIGTRAP_SIGINFO): Conditionally define.
12987 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12988 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12989 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12990 function.
12991 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12992 Likewise.
12993 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12994 Likewise.
12995 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12996 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12997 "supports_stopped_by_hw_breakpoint" target methods.
12998
12999 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13000
13001 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13002 * fbsd-nat.c (debug_fbsd_nat): New variable.
13003 (show_fbsd_nat_debug): New function.
13004 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13005 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13006
13007 2018-03-04 John Baldwin <jhb@FreeBSD.org>
13008
13009 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13010 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13011 prototype.
13012 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13013 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13014 method.
13015
13016 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13017
13018 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13019 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13020
13021 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13022
13023 * charset.c (struct charset_vector): New.
13024 (charsets): Change type to charset_vector.
13025 (find_charset_names): Adjust.
13026 (add_one): Adjust.
13027 (_initialize_charset): Adjust.
13028
13029 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13030
13031 * progspace.h (struct program_space) <deleted_solibs>: Change
13032 type to std::vector<std::string>.
13033 * progspace.c (clear_program_space_solib_cache): Adjust.
13034 * breakpoint.c (print_solib_event): Adjust.
13035 (check_status_catch_solib): Adjust.
13036 * solib.c (update_solib_list): Adjust.
13037 * ui-out.h (class ui_out) <field_string>: New overload.
13038 * ui-out.c (ui_out::field_string): New overload.
13039
13040 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13041
13042 * progspace.h (struct program_space): Add constructor and
13043 destructor, initialize fields.
13044 (add_program_space): Remove.
13045 * progspace.c (add_program_space): Rename to...
13046 (program_space::program_space): ... this.
13047 (release_program_space): Rename to...
13048 (program_space::~program_space): ... this.
13049 (delete_program_space): Use delete to delete program_space.
13050 (initialize_progspace): Use new to allocate program_space.
13051 * inferior.c (add_inferior_with_spaces): Likewise.
13052 (clone_inferior_command): Likewise.
13053 * infrun.c (follow_fork_inferior): Likewise.
13054 (handle_vfork_child_exec_or_exit): Likewise.
13055
13056 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
13057
13058 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13059 (delim_string_to_char_ptr_vec): Return std::vector of
13060 gdb::unique_xmalloc_ptr.
13061 (dirnames_to_char_ptr_vec_append): Take std::vector of
13062 gdb::unique_xmalloc_ptr.
13063 (dirnames_to_char_ptr_vec): Return std::vector of
13064 gdb::unique_xmalloc_ptr.
13065 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13066 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13067 (delim_string_to_char_ptr_vec): Return an std::vector of
13068 gdb::unique_xmalloc_ptr, adjust the code.
13069 (dirnames_to_char_ptr_vec_append): Take an std::vector of
13070 gdb::unique_xmalloc_ptr, adjust the code.
13071 (dirnames_to_char_ptr_vec): Return an std::vector of
13072 gdb::unique_xmalloc_ptr, adjust the code.
13073 * auto-load.c (auto_load_safe_path_vec): Change type to
13074 std::vector of gdb::unique_xmalloc_ptr.
13075 (auto_load_expand_dir_vars): Return an std::vector of
13076 gdb::unique_xmalloc_ptr, adjust the code.
13077 (auto_load_safe_path_vec_update): Adjust.
13078 (filename_is_in_auto_load_safe_path_vec): Adjust.
13079 (auto_load_objfile_script_1): Adjust.
13080 * build-id.c (build_id_to_debug_bfd): Adjust.
13081 * linux-thread-db.c (thread_db_load_search): Adjust.
13082 * source.c (add_path): Adjust.
13083 (openp): Adjust.
13084 * symfile.c (find_separate_debug_file): Adjust.
13085 * utils.c (do_free_char_ptr_vec): Remove.
13086 (make_cleanup_free_char_ptr_vec): Remove.
13087
13088 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
13089
13090 PR gdb/22907
13091 * common/pathstuff.c: Conditionally include "<windows.h>".
13092
13093 2018-03-01 Georg Sauthoff <mail@georg.so>
13094
13095 PR gdb/22888
13096 * gcore.in: Quote variables and switch interpreter to bash.
13097
13098 2018-03-01 Tom Tromey <tom@tromey.com>
13099
13100 * dwarf2read.c (alloc_discriminant_info): Fix default_index
13101 assertion. Add assertion for discriminant_index.
13102 (quirk_rust_enum): Use correct base type name in univariant case.
13103
13104 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
13105
13106 * record.c (get_call_history_modifiers): Return a
13107 record_print_flags.
13108 (cmd_record_call_history): Adjust.
13109 * record-btrace.c (record_btrace_call_history): Adjust.
13110 (record_btrace_call_history_range): Adjust.
13111 (record_btrace_call_history_from): Adjust.
13112 * target-debug.h (target_debug_print_record_print_flags): New.
13113 * target-delegates.c: Re-generate.
13114 * target.c (target_call_history): Change flags type.
13115 (target_call_history_from): Likewise.
13116 (target_call_history_range): Likewise.
13117 * target.h (struct target_ops) <target_call_history>: Likewise.
13118 (target_call_history_from): Likewise.
13119 (target_call_history_range): Likewise.
13120
13121 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
13122 Simon Marchi <simon.marchi@polymtl.ca>
13123
13124 * common/common-utils.c: Include "sys/stat.h".
13125 (is_regular_file): Move here from "source.c"; change return
13126 type to "bool".
13127 * common/common-utils.h (is_regular_file): New prototype.
13128 * common/pathstuff.c (contains_dir_separator): New function.
13129 * common/pathstuff.h (contains_dir_separator): New prototype.
13130 * source.c: Don't include "sys/stat.h".
13131 (is_regular_file): Move to "common/common-utils.c".
13132
13133 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
13134
13135 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13136 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13137 * auto-load.c: Include "common/pathstuff.h".
13138 * common/common-def.h (current_directory): Move here.
13139 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13140 function.
13141 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13142 prototype.
13143 * common/pathstuff.c: New file.
13144 * common/pathstuff.h: New file.
13145 * compile/compile.c: Include "common/pathstuff.h".
13146 * defs.h (current_directory): Move to "common/common-defs.h".
13147 * dwarf2read.c: Include "common/pathstuff.h".
13148 * exec.c: Likewise.
13149 * guile/scm-safe-call.c: Likewise.
13150 * linux-thread-db.c: Likewise.
13151 * main.c: Likewise.
13152 * nto-tdep.c: Likewise.
13153 * objfiles.c: Likewise.
13154 * source.c: Likewise.
13155 * symtab.c: Likewise.
13156 * utils.c: Include "common/pathstuff.h".
13157 (gdb_realpath): Move to "common/pathstuff.c".
13158 (gdb_realpath_keepfile): Likewise.
13159 (gdb_abspath): Likewise.
13160 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13161 (gdb_realpath_keepfile): Likewise.
13162 (gdb_abspath): Likewise.
13163
13164 2018-02-28 John Baldwin <jhb@FreeBSD.org>
13165
13166 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13167 wildcard process pid for super_resume for kernels with a
13168 specific bug.
13169
13170 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
13171
13172 * compile/compile.c (get_args): Add additional comments
13173 explaining function.
13174
13175 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
13176 Tom Tromey <tom@tromey.com>
13177
13178 * target.h (memory_write_request_s): Remove typedef. Don't define
13179 VEC.
13180 (target_write_memory_blocks): Change argument to std::vector.
13181 (struct memory_write_request): Add constructor.
13182 * target-memory.c (compare_block_starting_address): Return bool.
13183 Change argument types.
13184 (claim_memory): Change arguments to use std::vector.
13185 (split_regular_and_flash_blocks, blocks_to_erase)
13186 (compute_garbled_blocks): Likewise.
13187 (cleanup_request_data, cleanup_write_requests_vector): Remove.
13188 (target_write_memory_blocks): Change argument to std::vector.
13189 * symfile.c (struct load_section_data): Add constructor and
13190 destructor. Use std::vector for "requests".
13191 (struct load_progress_data): Add initializers.
13192 (load_section_callback): Update. Use "new".
13193 (clear_memory_write_data): Remove.
13194 (generic_load): Update.
13195
13196 2018-02-27 Alan Hayward <alan.hayward@arm.com>
13197
13198 * arch/aarch64.h: Use common/tdesc.h.
13199
13200 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13201
13202 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13203 architecture with a 64-bit ABI.
13204
13205 2018-02-26 Maciej W. Rozycki <macro@mips.com>
13206
13207 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13208 ahead of target description loading.
13209
13210 2018-02-26 Tom Tromey <tom@tromey.com>
13211
13212 * stack.c (backtrace_command_1): Update.
13213 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13214 of "flags".
13215 * python/py-framefilter.c (py_print_frame)
13216 (gdbpy_apply_frame_filter): Change type of "flags".
13217 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13218 of "flags".
13219 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13220 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13221 * extension.h (enum frame_filter_flag): Rename from
13222 frame_filter_flags.
13223 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13224 (apply_ext_lang_frame_filter): Change type of "flags".
13225 * extension.c (apply_ext_lang_frame_filter): Change type of
13226 "flags".
13227 * extension-priv.h (struct extension_language_ops)
13228 <apply_frame_filter>: Change type of "flags".
13229
13230 2018-02-26 Tom Tromey <tom@tromey.com>
13231
13232 PR python/16497:
13233 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
13234 off-by-one in py_end computation.
13235 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13236 PRINT_MORE_FRAMES.
13237 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13238 constant.
13239
13240 2018-02-26 Tom Tromey <tom@tromey.com>
13241
13242 * dwarf2read.c (struct variant_field): New.
13243 (struct nextfield) <variant>: New field.
13244 (dwarf2_add_field): Handle DW_TAG_variant_part.
13245 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13246 discriminated union.
13247 (read_structure_type): Handle DW_TAG_variant_part.
13248 (handle_struct_member_die): New function, extracted from
13249 process_structure_scope. Handle DW_TAG_variant.
13250 (process_structure_scope): Handle discriminated unions. Call
13251 handle_struct_member_die.
13252
13253 2018-02-26 Tom Tromey <tom@tromey.com>
13254
13255 * rust-lang.h (rust_last_path_segment): Declare.
13256 * rust-lang.c (rust_last_path_segment): Now public. Change
13257 contract.
13258 (struct disr_info): Remove.
13259 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13260 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13261 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13262 (rust_enum_p, rust_enum_variant): New function.
13263 (rust_underscore_fields): Remove "offset" parameter.
13264 (rust_print_enum): New function.
13265 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13266 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13267 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
13268 enums.
13269 (rust_internal_print_type): New function, from rust_print_type.
13270 Remove enum code.
13271 (rust_print_type): Call rust_internal_print_type.
13272 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13273 Update enum handling.
13274 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13275 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13276 (rust_union_quirks): New functions.
13277 (process_full_comp_unit, process_full_type_unit): Call
13278 rust_union_quirks.
13279 (process_structure_scope): Update rust_unions if necessary.
13280
13281 2018-02-26 Tom Tromey <tom@tromey.com>
13282
13283 * value.h (value_union_variant): Declare.
13284 * valops.c (value_union_variant): New function.
13285 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13286 (struct discriminant_info): New.
13287 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13288 enumerator.
13289 (struct main_type) <flag_discriminated_union>: New field.
13290
13291 2018-02-26 Tom Tromey <tom@tromey.com>
13292
13293 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13294 unittests/unpack-selftests.c.
13295 * unittests/unpack-selftests.c: New file.
13296 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13297
13298 2018-02-26 Yao Qi <yao.qi@linaro.org>
13299
13300 * dwarf2read.c (struct partial_die_info) <read>: New method.
13301 (read_partial_die): Remove the declaration.
13302 (load_partial_dies): Update.
13303 (partial_die_info::partial_die_info):
13304 (read_partial_die): Change it to partial_die_info::read.
13305
13306 2018-02-26 Yao Qi <yao.qi@linaro.org>
13307
13308 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13309 (fixup_partial_die): Remove declaration.
13310 (scan_partial_symbols): Update.
13311 (partial_die_parent_scope): Likewise.
13312 (partial_die_full_name): Likewise.
13313 (fixup_partial_die): Change it to partial_die_info::fixup.
13314
13315 2018-02-26 Yao Qi <yao.qi@linaro.org>
13316
13317 * dwarf2read.c (read_partial_die): Update the declaration.
13318 (load_partial_dies): Caller update.
13319 (read_partial_die): Remove one argument abbrev_len.
13320
13321 2018-02-26 Yao Qi <yao.qi@linaro.org>
13322
13323 * dwarf2read.c (struct partial_die_info): Add ctor, delete
13324 assignment operator.
13325 (load_partial_dies): Use ctor and copy ctor.
13326 (read_partial_die): Update.
13327 (dwarf2_cu::find_partial_die): Use ctor.
13328
13329 2018-02-26 Yao Qi <yao.qi@linaro.org>
13330
13331 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13332 (find_partial_die_in_comp_unit): Change it to
13333 dwarf2_cu::find_partial_die.
13334 (find_partial_die): Update.
13335
13336 2018-02-26 Yao Qi <yao.qi@linaro.org>
13337
13338 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13339 is NULL.
13340
13341 2018-02-26 Yao Qi <yao.qi@linaro.org>
13342
13343 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13344
13345 2018-02-26 Alan Hayward <alan.hayward@arm.com>
13346
13347 * arch/amd64.h: Use common/tdesc.h.
13348 * arch/i386.c: Likewise.
13349 * arch/i386.h: Likewise.
13350 * arch/tic6x.c: Likewise.
13351 * arch/tdesc.h: Move file from here...
13352 * common/tdesc.h: ...to here.
13353 * features/aarch64-core.c: Regenerate.
13354 * features/aarch64-fpu.c: Regenerate.
13355 * features/i386/32bit-avx.c: Regenerate.
13356 * features/i386/32bit-avx512.c: Regenerate.
13357 * features/i386/32bit-core.c: Regenerate.
13358 * features/i386/32bit-linux.c: Regenerate.
13359 * features/i386/32bit-mpx.c: Regenerate.
13360 * features/i386/32bit-pkeys.c: Regenerate.
13361 * features/i386/32bit-sse.c: Regenerate.
13362 * features/i386/64bit-avx.c: Regenerate.
13363 * features/i386/64bit-avx512.c: Regenerate.
13364 * features/i386/64bit-core.c: Regenerate.
13365 * features/i386/64bit-linux.c: Regenerate.
13366 * features/i386/64bit-mpx.c: Regenerate.
13367 * features/i386/64bit-pkeys.c: Regenerate.
13368 * features/i386/64bit-segments.c: Regenerate.
13369 * features/i386/64bit-sse.c: Regenerate.
13370 * features/i386/x32-core.c: Regenerate.
13371 * features/tic6x-c6xp.c: Regenerate.
13372 * features/tic6x-core.c: Regenerate.
13373 * features/tic6x-gp.c: Regenerate.
13374 * target-descriptions.c: Use common/tdesc.h.
13375 * target-descriptions.h: Likewise.
13376
13377 2018-02-24 Tom Tromey <tom@tromey.com>
13378
13379 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13380 (try_thread_db_load_from_dir, thread_db_load_search): Use
13381 std::string.
13382 (info_auto_load_libthread_db_compare): Return bool. Change
13383 argument types.
13384 (info_auto_load_libthread_db): Use std::vector, std::string.
13385 Remove cleanups.
13386
13387 2018-02-24 Tom Tromey <tom@tromey.com>
13388
13389 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13390 std::string.
13391 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13392 std::string*.
13393 * gdbarch.c: Rebuild.
13394 * gdbarch.h: Rebuild.
13395 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13396 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13397 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13398 std::string*.
13399
13400 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
13401
13402 * gdbtypes.h (sect_offset): Change type to uint64_t.
13403 (sect_offset_str): New function.
13404 * dwarf2read.c (create_addrmap_from_aranges): Use
13405 sect_offset_str.
13406 (error_check_comp_unit_head): Likewise.
13407 (create_debug_type_hash_table): Likewise.
13408 (read_cutu_die_from_dwo): Likewise.
13409 (init_cutu_and_read_dies): Likewise.
13410 (init_cutu_and_read_dies_no_follow): Likewise.
13411 (process_psymtab_comp_unit_reader): Likewise.
13412 (partial_die_parent_scope): Likewise.
13413 (peek_die_abbrev): Likewise.
13414 (process_queue): Likewise.
13415 (dwarf2_physname): Likewise.
13416 (read_namespace_alias): Likewise.
13417 (read_import_statement): Likewise.
13418 (create_dwo_cu_reader): Likewise.
13419 (create_cus_hash_table): Likewise.
13420 (lookup_dwo_cutu): Likewise.
13421 (inherit_abstract_dies): Likewise.
13422 (read_func_scope): Likewise.
13423 (read_call_site_scope): Likewise.
13424 (dwarf2_add_member_fn): Likewise.
13425 (read_common_block): Likewise.
13426 (read_module_type): Likewise.
13427 (read_typedef): Likewise.
13428 (read_subrange_type): Likewise.
13429 (load_partial_dies): Likewise.
13430 (read_partial_die): Likewise.
13431 (find_partial_die): Likewise.
13432 (read_str_index): Likewise.
13433 (dwarf2_string_attr): Likewise.
13434 (build_error_marker_type): Likewise.
13435 (lookup_die_type): Likewise.
13436 (dump_die_shallow): Likewise.
13437 (follow_die_ref): Likewise.
13438 (dwarf2_fetch_die_loc_sect_off): Likewise.
13439 (dwarf2_fetch_constant_bytes): Likewise.
13440 (follow_die_sig): Likewise.
13441 (get_signatured_type): Likewise.
13442 (get_DW_AT_signature_type): Likewise.
13443 (dwarf2_find_containing_comp_unit): Likewise.
13444 (set_die_type): Likewise.
13445
13446 2018-02-21 John Baldwin <jhb@FreeBSD.org>
13447
13448 * arch/aarch64.c: Include "common-defs.h".
13449 * arch/amd64.c: Likewise.
13450 * arch/i386.c: Likewise.
13451
13452 2018-02-21 Tom Tromey <tom@tromey.com>
13453
13454 * value.h: (extract_field_op): Update.
13455 * eval.c (extract_field_op): Return a const char *.
13456 * expression.h (parse_expression_for_completion): Update.
13457 * completer.c (complete_expression): Update.
13458 (add_struct_fields): Make fieldname const.
13459 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13460 (mark_completion_tag, parse_exp_in_context_1): Update.
13461 (parse_expression_for_completion): Change "name" to
13462 unique_xmalloc_ptr*.
13463
13464 2018-02-21 Tom Tromey <tom@tromey.com>
13465
13466 * infcall.c (call_function_by_hand_dummy): Use std::vector.
13467
13468 2018-02-21 Yao Qi <yao.qi@linaro.org>
13469
13470 * avr-tdep.c (avr_read_pc): Change parameter type to
13471 readable_regcache.
13472 * gdbarch.sh (read_pc): Likewise.
13473 * gdbarch.c: Re-generated.
13474 * gdbarch.h: Re-generated.
13475 * hppa-tdep.c (hppa_read_pc): Change parameter type to
13476 readable_regcache.
13477 * ia64-tdep.c (ia64_read_pc): Likewise.
13478 * mips-tdep.c (mips_read_pc): Likewise.
13479 * spu-tdep.c (spu_read_pc): Likewise.
13480
13481 2018-02-21 Yao Qi <yao.qi@linaro.org>
13482
13483 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13484 * regcache-dump.c: New file.
13485 * regcache.c: Move register_dump to regcache-dump.c.
13486 (maintenance_print_registers): Likewise.
13487 (maintenance_print_raw_registers): Likewise.
13488 (maintenance_print_cooked_registers): Likewise.
13489 (maintenance_print_register_groups): Likewise.
13490 (maintenance_print_remote_registers): Likewise.
13491 (_initialize_regcache): Likewise.
13492 * regcache.h (register_dump): Moved from regcache.c.
13493
13494 2018-02-21 Yao Qi <yao.qi@linaro.org>
13495
13496 * regcache.c (regcache::regcache): Update.
13497 (regcache::invalidate): Move it to detached_regcache::invalidate.
13498 (get_thread_arch_aspace_regcache): Update.
13499 (regcache::raw_update): Update.
13500 (regcache::cooked_read): Remove some code.
13501 (regcache::cooked_read_value): Likewise.
13502 (regcache::raw_write): Remove assert on m_readonly_p.
13503 (regcache::raw_supply_integer): Move it to
13504 detached_regcache::raw_supply_integer.
13505 (regcache::raw_supply_zeroed): Likewise.
13506 * regcache.h (detached_regcache) <raw_supply_integer>: New
13507 declaration.
13508 <raw_supply_zeroed, invalidate>: Likewise.
13509 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13510 <invalidate>: Likewise.
13511 <m_readonly_p>: Removed.
13512
13513 2018-02-21 Yao Qi <yao.qi@linaro.org>
13514
13515 * infcmd.c (get_return_value): Let stop_regs point to
13516 get_current_regcache.
13517 * regcache.c (regcache::regcache): Remove.
13518 (register_dump_reg_buffer): New class.
13519 (regcache_print): Adjust.
13520 * regcache.h (regcache): Remove constructors.
13521
13522 2018-02-21 Yao Qi <yao.qi@linaro.org>
13523
13524 * regcache.c (class register_dump): New class.
13525 (register_dump_regcache, register_dump_none): New class.
13526 (register_dump_remote, register_dump_groups): New class.
13527 (regcache_print): Update.
13528 * regcache.h (regcache_dump_what): Move it to regcache.c.
13529 (regcache) <dump>: Remove.
13530
13531 2018-02-21 Yao Qi <yao.qi@linaro.org>
13532
13533 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13534 reg_buffer_rw *.
13535 (jit_unwind_reg_set_impl): Call raw_supply.
13536 (jit_frame_sniffer): Use reg_buffer_rw.
13537 * record-full.c (record_full_core_regbuf): Change its type.
13538 (record_full_core_open_1): Use reg_buffer_rw.
13539 (record_full_close): Likewise.
13540 (record_full_core_fetch_registers): Use regcache->raw_supply.
13541 (record_full_core_store_registers): Likewise.
13542 * regcache.c (regcache::get_register_status): Move it to
13543 reg_buffer.
13544 (regcache_raw_set_cached_value): Remove.
13545 (regcache::raw_set_cached_value): Remove.
13546 (regcache::raw_write): Call raw_supply.
13547 (regcache::raw_supply): Move it to reg_buffer_rw.
13548 * regcache.h (regcache_raw_set_cached_value): Remove.
13549 (reg_buffer_rw): New class.
13550
13551 2018-02-21 Yao Qi <yao.qi@linaro.org>
13552
13553 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13554 readonly_detached_regcache.
13555 (dummy_frame_prev_register): Use regcache->cooked_read.
13556 * frame.c (frame_save_as_regcache): Change return type.
13557 (frame_pop): Update.
13558 * frame.h (frame_save_as_regcache): Update declaration.
13559 * inferior.h (get_infcall_suspend_state_regcache): Update
13560 declaration.
13561 * infrun.c (infcall_suspend_state) <registers>: use
13562 readonly_detached_regcache.
13563 (save_infcall_suspend_state): Don't use regcache_dup.
13564 (get_infcall_suspend_state_regcache): Change return type.
13565 * linux-fork.c (struct fork_info) <savedregs>: Change to
13566 readonly_detached_regcache.
13567 <pc>: New field.
13568 (fork_save_infrun_state): Don't use regcache_dup.
13569 (info_checkpoints_command): Adjust.
13570 * mi/mi-main.c (register_changed_p): Update declaration.
13571 (mi_cmd_data_list_changed_registers): Use
13572 readonly_detached_regcache.
13573 (register_changed_p): Change parameter type to
13574 readonly_detached_regcache.
13575 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13576 readonly_detached_regcache.
13577 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13578 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13579 New.
13580 (regcache::save): Move it to reg_buffer.
13581 (regcache::restore): Change parameter type.
13582 (regcache_dup): Remove.
13583 * regcache.h (reg_buffer) <save>: New method.
13584 (readonly_detached_regcache): New class.
13585 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13586 readonly_detached_regcache.
13587 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13588
13589 2018-02-21 Yao Qi <yao.qi@linaro.org>
13590
13591 * frame.c (frame_save_as_regcache): Use regcache method save.
13592 (frame_pop): Use regcache method restore.
13593 * infrun.c (restore_infcall_suspend_state): Likewise.
13594 * linux-fork.c (fork_load_infrun_state): Likewise.
13595 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13596 save.
13597 * regcache.c (regcache_save): Remove.
13598 (regcache::restore): More asserts.
13599 (regcache_cpy): Remove.
13600 * regcache.h (regcache_save): Remove the declaration.
13601 (regcache::restore): Move from private to public.
13602 Remove the friend declaration of regcache_cpy.
13603 (regcache_cpy): Remove declaration.
13604
13605 2018-02-21 Yao Qi <yao.qi@linaro.org>
13606
13607 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13608 parameter type to 'readable_regcache *'.
13609 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13610 * arm-tdep.c (arm_neon_quad_read): Likewise.
13611 (arm_pseudo_read): Likewise.
13612 * avr-tdep.c (avr_pseudo_register_read): Likewise.
13613 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13614 * frv-tdep.c (frv_pseudo_register_read): Likewise.
13615 * gdbarch.c: Re-generated.
13616 * gdbarch.h: Re-generated.
13617 * gdbarch.sh (pseudo_register_read): Change parameter type to
13618 'readable_regcache *'.
13619 (pseudo_register_read_value): Likewise.
13620 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13621 (h8300_pseudo_register_read): Likewise.
13622 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13623 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13624 (i386_pseudo_register_read_into_value): Likewise.
13625 (i386_pseudo_register_read_value): Likewise.
13626 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13627 declaration.
13628 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13629 * m32c-tdep.c (m32c_raw_read): Likewise.
13630 (m32c_read_flg): Likewise.
13631 (m32c_banked_register): Likewise.
13632 (m32c_banked_read): Likewise.
13633 (m32c_sb_read): Likewise.
13634 (m32c_part_read): Likewise.
13635 (m32c_cat_read): Likewise.
13636 (m32c_r3r2r1r0_read): Likewise.
13637 (m32c_pseudo_register_read): Likewise.
13638 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13639 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13640 (mep_pseudo_cr64_read): Likewise.
13641 (mep_pseudo_register_read): Likewise.
13642 * mips-tdep.c (mips_pseudo_register_read): Likewise.
13643 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13644 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13645 * regcache.c (regcache::raw_read): Move it to readable_regcache.
13646 (regcache::cooked_read): Likewise.
13647 (regcache::cooked_read_value): Likewise.
13648 (regcache_cooked_read_signed):
13649 (regcache::cooked_read): Likewise.
13650 * regcache.h (readable_regcache): New class.
13651 (regcache): Inherit readable_regcache. Move some methods to
13652 readable_regcache.
13653 * rl78-tdep.c (rl78_pseudo_register_read): Change
13654 parameter type to 'readable_regcache *'.
13655 * rs6000-tdep.c (do_regcache_raw_read): Remove.
13656 (e500_pseudo_register_read): Change parameter type to
13657 'readable_regcache *'.
13658 (dfp_pseudo_register_read): Likewise.
13659 (vsx_pseudo_register_read): Likewise.
13660 (efpr_pseudo_register_read): Likewise.
13661 * s390-tdep.c (s390_pseudo_register_read): Likewise.
13662 * sh-tdep.c (sh_pseudo_register_read): Likewise.
13663 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13664 (sh64_pseudo_register_read): Likewise.
13665 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13666 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13667 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13668 (spu_pseudo_register_read): Likewise.
13669 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13670 (xtensa_pseudo_register_read): Likewise.
13671
13672 2018-02-21 Yao Qi <yao.qi@linaro.org>
13673
13674 * regcache.c (regcache::regcache): Call reg_buffer ctor.
13675 (regcache::arch): Move it to reg_buffer::arch.
13676 (regcache::register_buffer): Likewise.
13677 (regcache::assert_regnum): Likewise.
13678 (regcache::num_raw_registers): Likewise.
13679 * regcache.h (reg_buffer): New class.
13680 (regcache): Inherit reg_buffer.
13681
13682 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
13683
13684 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13685 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13686
13687 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
13688
13689 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13690
13691 2018-02-19 Alan Hayward <alan.hayward@arm.com>
13692
13693 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13694 (SFILES): Remove common/*.c files.
13695 (COMMON_OBS): Remove some *.o files built from common/*.c files.
13696 * common/common.host: Add common reference.
13697 * configure.ac: Likewise.
13698 * configure: Regenerate.
13699
13700 2018-02-16 Yao Qi <yao.qi@linaro.org>
13701
13702 * block.c (block_namespace_info): Inherit allocate_on_obstack.
13703 (block_initialize_namespace): Use new.
13704 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13705 (dwarf2_free_objfile): Use delete.
13706 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13707 (copy_type_recursive): Use new.
13708 * gdb_obstack.h (allocate_on_obstack): New.
13709
13710 2018-02-15 Yao Qi <yao.qi@linaro.org>
13711
13712 PR gdb/22849
13713 * inferior.c (exit_inferior_1): Reset inf->control.
13714
13715 2018-02-15 Joel Brobecker <brobecker@adacore.com>
13716
13717 * ada-lang.c (ada_to_fixed_value_create): Delete advance
13718 declaration.
13719
13720 2018-02-14 Pedro Alves <palves@redhat.com>
13721
13722 * frame-unwind.c (frame_unwind_try_unwinder): Always call
13723 frame_cleanup_after_sniffer on exception.
13724
13725 2018-02-14 Tom Tromey <tom@tromey.com>
13726
13727 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13728 const.
13729 (solib_bfd_open): Make pathname const.
13730 * solib.c (solib_bfd_open): Make pathname const.
13731 * solib-spu.c (spu_bfd_fopen): Make name const.
13732 (spu_bfd_open): Make pathname const.
13733 * solib-darwin.c (darwin_bfd_open): Make pathname const.
13734 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13735
13736 2018-02-14 Tom Tromey <tom@tromey.com>
13737
13738 * symfile.c (symfile_bfd_open): Update.
13739 * source.h (openp, source_full_path_of, find_and_open_source):
13740 Change argument type to unique_xmalloc_ptr.
13741 * source.c (openp): Take a unique_xmalloc_ptr.
13742 (source_full_path_of, find_and_open_source): Likewise.
13743 (open_source_file, symtab_to_fullname): Update.
13744 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13745 unique_xmalloc_ptr.
13746 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13747 (exec_file_find): Update.
13748 * psymtab.c (psymtab_to_fullname): Update.
13749 * nto-tdep.h (nto_find_and_open_solib): Update.
13750 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13751 unique_xmalloc_ptr.
13752 * exec.c (exec_file_attach): Update.
13753 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13754 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13755
13756 2018-02-14 Tom Tromey <tom@tromey.com>
13757
13758 * solib.c: Include source.h.
13759 * nto-tdep.c: Include source.h.
13760 * mi/mi-cmd-env.c: Include source.h.
13761 * infcmd.c: Include source.h.
13762 * exec.c: Include source.h.
13763 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13764 (add_path, directory_switch, source_path, init_source_path): Move
13765 declarations...
13766 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13767 (add_path, directory_switch, source_path, init_source_path):
13768 ...here.
13769
13770 2018-02-14 Tom Tromey <tom@tromey.com>
13771
13772 * solist.h (exec_file_find, solib_find): Return
13773 unique_xmalloc_ptr.
13774 (solib_bfd_fopen): Take a const char *.
13775 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13776 (exec_file_find, solib_find): Likewise.
13777 (solib_bfd_fopen): Do not take ownership of "pathname".
13778 (solib_bfd_open): Use unique_xmalloc_ptr.
13779 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13780 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13781 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13782 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13783
13784 2018-02-14 Joel Brobecker <brobecker@adacore.com>
13785
13786 * ada-lang.c (name_match_type_from_name): Remove reference to
13787 ada_name_for_lookup in function's documentation.
13788 * ada-lang.h (ada_name_for_lookup): Delete declaration.
13789
13790 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13791
13792 * defs.h (enum openp_flags): New enum.
13793 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13794 Move to enum openp_flags.
13795 (openp_flags): New enum flags.
13796 (openp): Change parameter type to openp_flags.
13797 * source.c (openp): Change parameter type to openp_flags.
13798 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13799 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13800
13801 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
13802
13803 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13804 per-command.
13805
13806 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
13807
13808 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13809 into...
13810 (class dwarf2_queue_guard): ...the destructor of this new class.
13811 (dw2_do_instantiate_symtab): Create instance of the new class
13812 dwarf2_queue_guard, remove cleanup.
13813
13814 2018-02-09 Tom Tromey <tom@tromey.com>
13815
13816 * source.c (find_source_lines): Don't reference past the end of
13817 the vector.
13818
13819 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13820
13821 * remote.c (remote_btrace_maybe_reopen): Change error message.
13822 * btrace.c (btrace_enable): Likewise.
13823 (parse_xml_btrace): Likewise.
13824 (parse_xml_btrace_conf): Likewise.
13825
13826 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13827
13828 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13829 (linux_enable_pt, linux_enable_bts): Call
13830 diagnose_perf_event_open_fail.
13831
13832 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13833
13834 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13835 Remove parameter and change return type. Update callers. Move it.
13836 (linux_enable_bts, linux_enable_pt): Improve error message.
13837 (linux_enable_pt): Remove zero buffer size check.
13838 (linux_enable_btrace): Improve error messages. Remove NULL return
13839 check.
13840
13841 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13842
13843 * btrace.c (btrace_enable): Remove target_supports_btrace call.
13844 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13845 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13846 (linux_supports_pt, linux_supports_btrace): Remove.
13847 (linux_enable_bts): Call cpu_supports_bts.
13848 * nat/linux-btrace.h (linux_supports_btrace): Remove.
13849 * remote.c (remote_supports_btrace): Remove.
13850 (init_remote_ops): Remove remote_supports_btrace.
13851 * target-delegates.c: Regenerated.
13852 * target.c (target_supports_btrace): Remove.
13853 * target.h (target_ops) <to_supports_btrace>: Remove
13854 (target_supports_btrace): Remove.
13855 * x86-linux-nat.c (x86_linux_create_target): Remove
13856 linux_supports_btrace.
13857
13858 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13859
13860 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13861 btrace failed.
13862 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13863 exception and use message in own exception.
13864
13865 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13866
13867 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13868 (perf_event_pt_event_type): Use gdb_file_up.
13869 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13870 scoped_fd, and scoped_mmap.
13871
13872 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13873
13874 * common/scoped_mmap.h: New.
13875 * unittests/scoped_mmap-selftest.c: New.
13876 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13877 unittests/scoped_mmap-selftest.c.
13878
13879 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
13880
13881 * common/scoped_fd.h: New.
13882 * unittests/scoped_fd-selftest.c: New.
13883 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13884 unittests/scoped_fd-selftest.c.
13885
13886 2018-02-09 Tom Tromey <tom@tromey.com>
13887
13888 * auto-load.c (auto_load_section_scripts): Use
13889 gdb::unique_xmalloc_ptr.
13890
13891 2018-02-09 Tom Tromey <tom@tromey.com>
13892
13893 * auto-load.c (execute_script_contents): Use std::string.
13894
13895 2018-02-09 Joel Brobecker <brobecker@adacore.com>
13896
13897 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13898 Python function, rather than a new command.
13899
13900 2018-02-08 Tom Tromey <tom@tromey.com>
13901
13902 * solib.c (solib_find_1): Use std::string.
13903 (solib_bfd_fopen): Use unique_xmalloc_ptr.
13904
13905 2018-02-08 Tom Tromey <tom@tromey.com>
13906
13907 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13908
13909 2018-02-08 Tom Tromey <tom@tromey.com>
13910
13911 * source.c (find_source_lines): Use gdb::def_vector.
13912
13913 2018-02-08 Tom Tromey <tom@tromey.com>
13914
13915 * macrocmd.c (struct temporary_macro_definition): New.
13916 (macro_define_command): Use temporary_macro_definition. Remove
13917 cleanups.
13918 (free_macro_definition_ptr): Remove.
13919
13920 2018-02-08 Tom Tromey <tom@tromey.com>
13921
13922 * macroexp.c (maybe_expand): Use std::string.
13923
13924 2018-02-08 Tom Tromey <tom@tromey.com>
13925
13926 * macroexp.c (struct macro_buffer): Add initializers for some
13927 members.
13928 (init_buffer, init_shared_buffer, free_buffer)
13929 (free_buffer_return_text): Remove.
13930 (macro_buffer): New constructors.
13931 (~macro_buffer): New destructor.
13932 (macro_buffer::set_shared): New method.
13933 (macro_buffer::resize_buffer, macro_buffer::appendc)
13934 (macro_buffer::appendmem): Now methods, not free functions.
13935 (set_token, append_tokens_without_splicing, stringify)
13936 (macro_stringify): Update.
13937 (gather_arguments): Change return type. Remove argc_p argument,
13938 add args_ptr argument. Use std::vector.
13939 (substitute_args): Remove argc argument. Accept std::vector.
13940 (expand): Update. Use std::vector.
13941 (scan, macro_expand, macro_expand_next): Update.
13942
13943 2018-02-08 Tom Tromey <tom@tromey.com>
13944
13945 * symtab.c (default_collect_symbol_completion_matches_break_on):
13946 Use unique_xmalloc_ptr.
13947 * macroscope.h: (sal_macro_scope, user_macro_scope)
13948 (default_macro_scope): Return unique_xmalloc_ptr.
13949 * macroscope.c (sal_macro_scope, user_macro_scope)
13950 (default_macro_scope): Return unique_xmalloc_ptr.
13951 * macroexp.h (macro_expand, macro_expand_once): Return
13952 unique_xmalloc_ptr.
13953 * macroexp.c (macro_expand, macro_expand_once): Return
13954 unique_xmalloc_ptr.
13955 * macrocmd.c (macro_expand_command, macro_expand_once_command)
13956 (info_macro_command, info_macros_command): Use
13957 unique_xmalloc_ptr.
13958 * compile/compile-c-support.c (write_macro_definitions): Use
13959 unique_xmalloc_ptr.
13960 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13961
13962 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
13963
13964 * value.c (value_static_field): Assign field type instead of
13965 containing type when returning an optimized out value.
13966
13967 2018-02-06 Yao Qi <yao.qi@linaro.org>
13968
13969 * ft32-tdep.c (ft32_read_pc): Remove.
13970 (ft32_write_pc): Remove.
13971 (ft32_gdbarch_init): Update.
13972 * m32r-tdep.c (m32r_read_pc): Remove.
13973 (m32r_gdbarch_init): Update.
13974 * mep-tdep.c (mep_read_pc): Remove.
13975 (mep_gdbarch_init): Update.
13976 * microblaze-tdep.c (microblaze_write_pc): Remove.
13977 (microblaze_gdbarch_init): Update.
13978 * mn10300-tdep.c (mn10300_read_pc): Remove.
13979 (mn10300_write_pc): Remove.
13980 (mn10300_gdbarch_init): Update.
13981 * moxie-tdep.c (moxie_read_pc): Remove.
13982 (moxie_write_pc): Remove.
13983 (moxie_gdbarch_init): Update.
13984
13985 2018-02-06 Yao Qi <yao.qi@linaro.org>
13986
13987 * expprint.c (print_subexp_standard): Handle
13988 OP_F77_UNDETERMINED_ARGLIST.
13989 (dump_subexp_body_standard): Likewise.
13990
13991 2018-02-05 Alan Hayward <alan.hayward@arm.com>
13992
13993 * target-descriptions.c (tdesc_element_visitor) Add empty
13994 implementations.
13995 (tdesc_type): Move make_gdb_type from here.
13996 (tdesc_type_builtin): Likewise.
13997 (tdesc_type_vector): Likewise.
13998 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13999 (make_gdb_type_struct): Move from tdesc_type_with_fields.
14000 (make_gdb_type_union): Likewise.
14001 (make_gdb_type_flags): Likewise.
14002 (make_gdb_type_enum): Likewise.
14003 (make_gdb_type): New function.
14004 (tdesc_register_type): Use static make_gdb_type.
14005
14006 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
14007
14008 * infcmd.c (default_print_one_register_info): Align natural-format
14009 column values consistently one under another.
14010 (pad_to_column): New function.
14011
14012 2018-02-05 Joel Brobecker <brobecker@adacore.com>
14013
14014 * dwarf2read.c (dwarf2_physname): Move commment.
14015
14016 2018-02-01 Leszek Swirski <leszeks@google.com>
14017
14018 * varobj.c (varobj_formatted_print_options): Allow recursive
14019 pretty printing if pretty printing is enabled.
14020
14021 2018-02-01 Leszek Swirski <leszeks@google.com>
14022
14023 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14024 names after a structop as a filename.
14025
14026 2018-02-01 Yao Qi <yao.qi@linaro.org>
14027
14028 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14029 (arm_record_coproc_data_proc): Likewise.
14030
14031 2018-02-01 Yao Qi <yao.qi@linaro.org>
14032
14033 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14034
14035 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
14036
14037 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14038 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14039
14040 2018-01-31 Pedro Alves <palves@redhat.com>
14041
14042 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14043 * inflow.c (child_terminal_save_inferior): Wrap reference to
14044 tcgetpgrp in HAVE_TERMIOS_H.
14045 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14046 _WIN32.
14047 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14048 always iterate over all inferiors.
14049 (gdbsim_cntrl_c): Adjust.
14050 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14051
14052 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14053
14054 * gdbtypes.c (lookup_array_range_type): Make sure the array's
14055 index type is objfile-owned if the element type is as well.
14056
14057 2018-01-31 Joel Brobecker <brobecker@adacore.com>
14058
14059 GDB 8.1 released.
14060
14061 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
14062
14063 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14064 "features/s390x-linux64.c".
14065 (_initialize_s390_linux_tdep): Remove initialization of tdescs
14066 s390_linux32 and s390x_linux64.
14067 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14068 default tdesc.
14069 * s390-tdep.c: Include "features/s390-linux32.c" and
14070 "features/s390x-linux64.c".
14071 (s390_tdesc_valid): Add check for tdesc_has_registers.
14072 (s390_gdbarch_init): Make sure there is always a valid tdesc.
14073 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14074 tdesc_s390x_linux64.
14075 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14076 tdesc_s390x_linux64 to...
14077 * s390-tdep.h: ...here.
14078
14079 2018-01-30 Pedro Alves <palves@redhat.com>
14080
14081 PR gdb/13211
14082 * config.in, configure: Regenerate.
14083 * configure.ac: Check for getpgid.
14084 * go32-nat.c (go32_pass_ctrlc): New.
14085 (go32_target): Install it.
14086 * inf-child.c (inf_child_target): Install
14087 child_terminal_save_inferior, child_pass_ctrlc and
14088 child_interrupt.
14089 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14090 (inf_ptrace_target): No longer install it.
14091 * infcmd.c (interrupt_target_1): Adjust.
14092 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14093 (child_interrupt): Declare.
14094 (inferior::terminal_state): New.
14095 * inflow.c (struct terminal_info): Update comments.
14096 (inferior_process_group): Delete.
14097 (terminal_is_ours): Delete.
14098 (gdb_tty_state): New.
14099 (child_terminal_init): Adjust.
14100 (is_gdb_terminal, sharing_input_terminal_1)
14101 (sharing_input_terminal): New functions.
14102 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
14103 Set the process's actual process group in the foreground if
14104 possible. Handle is_ours_for_output/is_ours distinction. Don't
14105 mark terminal as the inferior's if not sharing GDB's terminal.
14106 Don't check attach_flag.
14107 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14108 pass down a target_terminal_state.
14109 (child_terminal_save_inferior): New, factored out from ...
14110 (child_terminal_ours_1): ... this. Handle
14111 target_terminal_state::is_ours_for_output.
14112 (child_interrupt, child_pass_ctrlc): New.
14113 (inflow_inferior_exit): Clear the inferior's terminal_state.
14114 (copy_terminal_info): Copy the inferior's terminal state.
14115 (_initialize_inflow): Remove reference to terminal_is_ours.
14116 * inflow.h (inferior_process_group): Delete.
14117 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14118 * procfs.c (procfs_target): Don't install procfs_interrupt.
14119 (procfs_interrupt): Delete.
14120 * remote.c (remote_serial_quit_handler): Adjust.
14121 (remote_interrupt): Remove ptid parameter. Adjust.
14122 * target-delegates.c: Regenerate.
14123 * target.c: Include "terminal.h".
14124 (target_terminal::terminal_state): Rename to ...
14125 (target_terminal::m_terminal_state): ... this.
14126 (target_terminal::init): Adjust.
14127 (target_terminal::inferior): Adjust to per-inferior
14128 terminal_state.
14129 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14130 (target_terminal::ours, target_terminal::ours_for_output): Use
14131 target_terminal_is_ours_kind.
14132 (target_interrupt): Remove ptid parameter. Adjust.
14133 (default_target_pass_ctrlc): Adjust.
14134 * target.h (target_ops::to_terminal_save_inferior): New field.
14135 (target_ops::to_interrupt): Remove ptid_t parameter.
14136 (target_interrupt): Remove ptid_t parameter. Update comment.
14137 (target_pass_ctrlc): Update comment.
14138 * target/target.h (target_terminal_state): New scoped enum,
14139 factored out of ...
14140 (target_terminal::terminal_state): ... here.
14141 (target_terminal::inferior): Update comments.
14142 (target_terminal::restore_inferior): New.
14143 (target_terminal::is_inferior, target_terminal::is_ours)
14144 (target_terminal::is_ours_for_output): Adjust.
14145 (target_terminal::scoped_restore_terminal_state): Adjust to
14146 rename, and call restore_inferior() instead of inferior().
14147 (target_terminal::scoped_restore_terminal_state::m_state): Change
14148 type.
14149 (target_terminal::terminal_state): Rename to ...
14150 (target_terminal::m_terminal_state): ... this and change type.
14151
14152 2018-01-30 Pedro Alves <palves@redhat.com>
14153
14154 * linux-nat.c (wait_for_signal): New function.
14155 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14156 directly.
14157 (async_terminal_is_ours)
14158 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14159 (linux_nat_add_target): Don't override
14160 to_terminal_inferior/to_terminal_ours.
14161
14162 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
14163
14164 * remote.c (remote_follow_fork): Don't call "detach_inferior".
14165
14166 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
14167
14168 * dwarf2read.c (free_dwo_files): Add forward-declaration.
14169 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14170 dwarf2_per_objfile_free here.
14171 (dwarf2_per_objfile_free): Remove.
14172 (_initialize_dwarf2_read): Don't register
14173 dwarf2_per_objfile_free as a registry cleanup.
14174
14175 2018-01-27 Eli Zaretskii <eliz@gnu.org>
14176
14177 Avoid compilation errors in MinGW native builds
14178
14179 The error is triggered by including python-internal.h, and the
14180 error message is:
14181
14182 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14183 from build-gnulib/import/math.h:27,
14184 from d:/usr/Python26/include/pyport.h:235,
14185 from d:/usr/Python26/include/Python.h:58,
14186 from python/python-internal.h:94,
14187 from python/py-arch.c:24:
14188 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14189 using ::hypot;
14190 ^~~~~
14191
14192 This happens because Python headers define 'hypot' to expand t
14193 '_hypot' in the Windows builds.
14194 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14195 'hypoth'. This avoids a compilation error.
14196
14197 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14198
14199 * MAINTAINERS (Write After Approval): Fix ordering.
14200
14201 2018-01-26 Alan Hayward <alan.hayward@arm.com>
14202
14203 * MAINTAINERS (Write After Approval): Add Alan Hayward.
14204
14205 2018-01-26 Alan Modra <amodra@gmail.com>
14206
14207 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14208 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14209 Remove nop. Make const. Comment.
14210 (powerpc32_plt_stub_so_2): New.
14211 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14212 Correct count. Update uses.
14213 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14214 Move common code reading PLT entry word. Correct
14215 powerpc32_plt_stub PLT address calculation.
14216 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14217 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14218 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14219 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14220 (ppc64_standard_linkage8): Likewise.
14221 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14222 Correct insns description.
14223 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14224
14225 2018-01-24 Pedro Alves <palves@redhat.com>
14226
14227 GCC PR libstdc++/83906
14228 * gdbtypes.c (operator==(const dynamic_prop &,
14229 const dynamic_prop &)): New.
14230 (operator==(const range_bounds &, const range_bounds &)): New.
14231 (check_types_equal): Use them instead of memcmp.
14232 * gdbtypes.h (operator==(const dynamic_prop &,
14233 const dynamic_prop &)): Declare.
14234 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14235 (operator==(const range_bounds &, const range_bounds &)): Declare.
14236 (operator!=(const range_bounds &, const range_bounds &)): Declare.
14237
14238 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14239
14240 * s390-linux-tdep.c (s390_record_address_mask)
14241 (s390_record_calc_disp_common, s390_record_calc_disp)
14242 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14243 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14244 (s390_process_record): Move to s390-tdep.c.
14245 (s390_linux_init_abi_any): Adjust.
14246 * s390-tdep.c (s390_record_address_mask)
14247 (s390_record_calc_disp_common, s390_record_calc_disp)
14248 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14249 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14250 (s390_process_record): Moved from s390-linux-tdep.c
14251 (s390_gdbarch_init): Adjust.
14252
14253 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14254
14255 * s390-linux-nat.c (s390-tdep.h): New include.
14256 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14257 (HFILES_NO_SRCDIR): Add s390-tdep.h.
14258 (ALLDEPFILES): Add s390-tdep.c.
14259 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14260 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14261 * s390-tdep.h: ...this. New file.
14262 * s390-linux-tdep.c (s390-tdep.h): New include.
14263 (_initialize_s390_tdep): Rename to...
14264 (_initialize_s390_linux_tdep): ...this and adjust.
14265 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14266 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14267 s390-tdep.h.
14268 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14269 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14270 (s390_is_partial_instruction, s390_software_single_step)
14271 (is_non_branch_ril, s390_displaced_step_copy_insn)
14272 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14273 (s390_prologue_data, s390_addr, s390_store, s390_load)
14274 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14275 (s390_register_call_saved, s390_guess_tracepoint_registers)
14276 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14277 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14278 (s390_pseudo_register_name, s390_pseudo_register_type)
14279 (s390_pseudo_register_read, s390_pseudo_register_write)
14280 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14281 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14282 (s390_addr_bits_remove, s390_address_class_type_flags)
14283 (s390_address_class_type_flags_to_name)
14284 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14285 (s390_function_arg_float, s390_function_arg_vector)
14286 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14287 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14288 (s390_frame_align, s390_register_return_value, s390_return_value)
14289 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14290 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14291 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14292 (s390_trad_frame_prev_register, s390_unwind_cache)
14293 (s390_prologue_frame_unwind_cache)
14294 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14295 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14296 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14297 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14298 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14299 (s390_frame_base_address, s390_local_base_address)
14300 (s390_frame_base, s390_gcc_target_options)
14301 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14302 (s390_validate_reg_range, s390_tdesc_valid)
14303 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14304 * s390-tdep.c: ...this. New file.
14305
14306 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14307
14308 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14309 (s390_process_record, s390_gdbarch_tdep_alloc)
14310 (s390_linux_init_abi_any): Use/set new hook.
14311
14312 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14313
14314 * s390-linux-tdep.c (osabi.h): New include.
14315 (s390_linux_init_abi_31, s390_linux_init_abi_64)
14316 (s390_linux_init_abi_any): New functions.
14317 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14318
14319 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14320
14321 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14322 tdesc_has_registers check
14323
14324 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14325
14326 * s390-linux-tdep.c (s390_tdesc_valid): New function.
14327 (s390_validate_reg_range): New macro.
14328 (s390_gdbarch_init): Adjust.
14329
14330 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14331
14332 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14333 (s390_gdbarch_tdep_alloc): Adjust.
14334 (s390_gdbarch_init): Adjust.
14335
14336 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14337
14338 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14339 <have_tdb>: Change type to bool.
14340 (s390_gdbarch_tdep_alloc): Adjust.
14341 (s390_gdbarch_init): Adjust.
14342
14343 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14344
14345 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14346 (gdbarch_tdep) <have_upper, have_vx>: New fields.
14347 (s390_gdbarch_tdep_alloc): New function.
14348 (s390_gdbarch_init): Allocate tdep at start and use its fields
14349 instead of separate variables.
14350
14351 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14352
14353 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14354 when looking for cached gdbarch and add comment for remaining.
14355
14356 2018-01-22 Pedro Alves <palves@redhat.com>
14357 Sergio Durigan Junior <sergiodj@redhat.com>
14358
14359 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14360 case.
14361
14362 2018-01-22 Maciej W. Rozycki <macro@mips.com>
14363
14364 * MAINTAINERS: Update my company e-mail address.
14365
14366 2018-01-22 Yao Qi <yao.qi@linaro.org>
14367
14368 * regcache.c (cooked_write_test): New function.
14369 (_initialize_regcache): Register the test.
14370
14371 2018-01-22 Yao Qi <yao.qi@linaro.org>
14372
14373 * ia64-tdep.c (ia64_pseudo_register_read): Call
14374 regcache->cooked_read instead of regcache_cooked_read_unsigned.
14375 * m32c-tdep.c (m32c_cat_read): Likewise.
14376 (m32c_r3r2r1r0_read): Likewise.
14377 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14378 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14379
14380 2018-01-22 Yao Qi <yao.qi@linaro.org>
14381
14382 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14383 method raw_read instead of regcache_raw_read.
14384 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14385 * arm-tdep.c (arm_neon_quad_read): Likewise.
14386 * avr-tdep.c (avr_pseudo_register_read): Likewise.
14387 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14388 * frv-tdep.c (frv_pseudo_register_read): Likewise.
14389 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14390 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14391 (i386_pseudo_register_read_into_value): Likewise.
14392 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14393 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14394 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14395 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14396 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14397 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14398 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14399 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14400 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14401
14402 2018-01-22 Yao Qi <yao.qi@linaro.org>
14403
14404 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14405 * configure.tgt: Remove target mt.
14406 * mt-tdep.c: Remove.
14407 * regcache.c (cooked_read_test): Remove the check for mt.
14408
14409 2018-01-22 Yao Qi <yao.qi@linaro.org>
14410
14411 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14412 instead of gdbarch_pseudo_register_read_value.
14413
14414 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14415
14416 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14417 language is Ada.
14418
14419 2018-01-22 Joel Brobecker <brobecker@adacore.com>
14420
14421 * linespec.c (create_sals_line_offset): Remove code that preserved
14422 the symtab_and_line's line number.
14423
14424 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14425
14426 * varobj.c (varobj_create): Don't set valid_block when creating a
14427 floating varobj.
14428
14429 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14430
14431 * varobj.c (varobj_create): Remove out of date comment.
14432
14433 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14434
14435 PR mi/20395
14436 * ada-exp.y (write_var_from_sym): Pass extra parameter when
14437 updating innermost block.
14438 * parse.c (innermost_block_tracker::update): Take extra type
14439 parameter, and check types match before updating innermost block.
14440 (write_dollar_variable): Update innermost block for registers.
14441 * parser-defs.h (enum innermost_block_tracker_type): New enum.
14442 (innermost_block_tracker::innermost_block_tracker): Initialise
14443 m_types member.
14444 (innermost_block_tracker::reset): Take type parameter.
14445 (innermost_block_tracker::update): Take type parameter, and pass
14446 type through as needed.
14447 (innermost_block_tracker::m_types): New member.
14448 * varobj.c (varobj_create): Pass type when reseting innermost
14449 block.
14450
14451 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14452
14453 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14454 * ada-lang.c (resolve_subexp): Likewise.
14455 * breakpoint.c (set_breakpoint_condition) Likewise.
14456 (watch_command_1) Likewise.
14457 * c-exp.y (variable): Likewise.
14458 * d-exp.y (PrimaryExpression): Likewise.
14459 * f-exp.y (variable): Likewise.
14460 * go-exp.y (variable): Likewise.
14461 * m2-exp.y (variable): Likewise.
14462 * objfiles.c (objfile::~objfile): Likewise.
14463 * p-exp.y (variable): Likewise.
14464 * parse.c (innermost_block): Change type.
14465 * parser-defs.h (class innermost_block_tracker): New.
14466 (innermost_block): Change to innermost_block_tracker.
14467 * printcmd.c (display_command): Switch to innermost_block API.
14468 (do_one_display): Likewise.
14469 * rust-exp.y (do_one_display): Likewise.
14470 * symfile.c (clear_symtab_users): Likewise.
14471 * varobj.c (varobj_create): Switch to innermost_block API, replace
14472 use of innermost_block with block stored on varobj object.
14473
14474 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
14475
14476 * expression.h (innermost_block): Remove declaration.
14477 * varobj.c: Add 'parser-defs.h' include.
14478
14479 2018-01-19 Tom Tromey <tom@tromey.com>
14480
14481 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14482 symbols in the static and global blocks.
14483
14484 2018-01-19 James Clarke <jrtc27@jrtc27.com>
14485
14486 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14487 gdb_ptrace.h, and move including gdb_wait.h ...
14488 * nat/linux-ptrace.h: ... to here.
14489
14490 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14491
14492 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14493 inf_ptrace_detach_success.
14494 (inf_ptrace_detach_success): Add inferior parameter, use it
14495 instead of inferior_ptid, pass it to detach_inferior.
14496 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14497 parameter.
14498 * inferior.c (detach_inferior): Add overload that takes an
14499 inferior object.
14500 * inferior.h (detach_inferior): Likewise.
14501 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14502 use inferior_ptid, adjust call to inf_ptrace_detach_success.
14503 * linux-thread-db.c (thread_db_detach): Use inf parameter.
14504
14505 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14506
14507 * target.h (struct target_ops) <to_detach>: Add inferior
14508 parameter.
14509 (target_detach): Likewise.
14510 * target.c (dispose_inferior): Pass inferior down.
14511 (target_detach): Pass inferior down. Assert that it is equal to
14512 the current inferior.
14513 * aix-thread.c (aix_thread_detach): Pass inferior down.
14514 * corefile.c (core_file_command): Pass current_inferior() down.
14515 * corelow.c (core_detach): Add inferior parameter.
14516 * darwin-nat.c (darwin_detach): Likewise.
14517 * gnu-nat.c (gnu_detach): Likewise.
14518 * inf-ptrace.c (inf_ptrace_detach): Likewise.
14519 * infcmd.c (detach_command): Pass current_inferior() down to
14520 target_detach.
14521 * infrun.c (follow_fork_inferior): Pass parent_inf to
14522 target_detach.
14523 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14524 target_detach.
14525 * linux-nat.c (linux_nat_detach): Add inferior parameter.
14526 * linux-thread-db.c (thread_db_detach): Likewise.
14527 * nto-procfs.c (procfs_detach): Likewise.
14528 * procfs.c (procfs_detach): Likewise.
14529 * record.c (record_detach): Likewise.
14530 * record.h (struct inferior): Forward-declare.
14531 (record_detach): Add inferior parameter.
14532 * remote-sim.c (gdbsim_detach): Likewise.
14533 * remote.c (remote_detach_1): Likewise.
14534 (remote_detach): Likewise.
14535 (extended_remote_detach): Likewise.
14536 * sol-thread.c (sol_thread_detach): Likewise.
14537 * target-debug.h (target_debug_print_inferior_p): New macro.
14538 * target-delegates.c: Re-generate.
14539 * top.c (kill_or_detach): Pass inferior down to target_detach.
14540 * windows-nat.c (windows_detach): Add inferior parameter.
14541
14542 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
14543
14544 * target.h (struct target_ops) <to_detach>: Remove args
14545 parameter.
14546 (target_detach): Likewise.
14547 * target.c (dispose_inferior): Adjust.
14548 (target_detach): Remove args parameter, adjust.
14549 * aix-thread.c (aix_thread_detach): Adjust.
14550 * corefile.c (core_file_command): Adjust.
14551 * corelow.c (core_detach): Adjust.
14552 * darwin-nat.c (darwin_detach): Adjust.
14553 * gnu-nat.c (gnu_detach): Adjust.
14554 * inf-ptrace.c (inf_ptrace_detach): Adjust.
14555 * infcmd.c (detach_command): Adjust
14556 * infrun.c (follow_fork_inferior): Adjust.
14557 (handle_vfork_child_exec_or_exit): Adjust.
14558 * linux-fork.c (linux_fork_detach): Remove args parameter.
14559 * linux-fork.h (linux_fork_detach): Likewise.
14560 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14561 * linux-thread-db.c (thread_db_detach): Likewise.
14562 * nto-procfs.c (procfs_detach): Likewise.
14563 * procfs.c (procfs_detach): Likewise.
14564 (do_detach): Remove signo parameter.
14565 * record.c (record_detach): Remove args parameter.
14566 * record.h (record_detach): Likewise.
14567 * remote-sim.c (gdbsim_detach): Likewise.
14568 * remote.c (remote_detach_1): Likewise.
14569 (remote_detach): Likewise.
14570 (extended_remote_detach): Likewise.
14571 * sol-thread.c (sol_thread_detach): Likewise.
14572 * target-delegates.c: Re-generate.
14573 * top.c (struct qt_args) <args>: Remove field.
14574 (kill_or_detach): Don't pass args.
14575 (quit_force): Don't set args.
14576 * windows-nat.c (windows_detach): Remove args parameter.
14577
14578 2018-01-19 Yao Qi <yao.qi@linaro.org>
14579
14580 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14581 (arm_linux_init_abi): Install it.
14582
14583 2018-01-19 Yao Qi <yao.qi@linaro.org>
14584
14585 * osabi.c (gdb_osabi_names): Extend the regexp for
14586 arm-linux-gnueabihf.
14587
14588 2018-01-18 Yao Qi <yao.qi@linaro.org>
14589
14590 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14591 m_abbrevs.
14592 (abbrev_table::add_abbrev): Update.
14593 (abbrev_table::lookup_abbrev): Update.
14594
14595 2018-01-18 Yao Qi <yao.qi@linaro.org>
14596
14597 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14598
14599 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
14600
14601 * compile/compile.c (compile_to_object): Convert "triplet_rx"
14602 to "std::string".
14603
14604 2018-01-17 Tom Tromey <tom@tromey.com>
14605
14606 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
14607
14608 2018-01-17 Tom Tromey <tom@tromey.com>
14609
14610 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14611 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14612 (create_array_type_with_stride): Update.
14613 * dwarf2read.c (set_die_type): Update.
14614
14615 2018-01-17 Tom Tromey <tom@tromey.com>
14616
14617 * dwarf2read.c (delayed_method_info): Remove typedef.
14618 (dwarf2_cu::method_info): Now a std::vector.
14619 (add_to_method_list): Update.
14620 (free_delayed_list): Remove.
14621 (compute_delayed_physnames): Update.
14622 (process_full_comp_unit, process_full_type_unit): Clear the method
14623 list. Remove cleanups.
14624 (psymtab_include_file_name): Add name_holder parameter. Use
14625 unique_xmalloc_ptr.
14626 (dwarf_decode_lines): Update.
14627
14628 2018-01-17 Tom Tromey <tom@tromey.com>
14629 Simon Marchi <simon.marchi@ericsson.com>
14630
14631 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14632 (dwarf2_per_objfile::free_cached_comp_units)
14633 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14634 (init_cutu_and_read_dies_no_follow): Update.
14635 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14636 (dwarf2_cu::~dwarf2_cu): New.
14637 (free_heap_comp_unit, free_stack_comp_unit): Remove.
14638 (age_cached_comp_units, free_one_cached_comp_unit): Update.
14639
14640 2018-01-17 Tom Tromey <tom@tromey.com>
14641 Simon Marchi <simon.marchi@ericsson.com>
14642
14643 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14644 (struct die_reader_specs) <abbrev_table>: New member.
14645 (struct abbrev_table): Add constructor.
14646 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14647 <abbrev_obstack>: Now an auto_obstack.
14648 (abbrev_table_up): New typedef.
14649 (init_cu_die_reader): Add abbrev_table parameter.
14650 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14651 Add result_dwo_abbrev_table.
14652 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14653 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14654 Update.
14655 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14656 parameter.
14657 (skip_children): Update.
14658 (abbrev_table::alloc_abbrev): Rename from
14659 abbrev_table_alloc_abbrev.
14660 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14661 (abbrev_table::lookup_abbrev): Rename from
14662 abbrev_table_lookup_abbrev.
14663 (abbrev_table_read_table): Return abbrev_table_up.
14664 (abbrev_table_free, abbrev_table_free_cleanup)
14665 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14666 (load_partial_dies): Update.
14667
14668 2018-01-17 Tom Tromey <tom@tromey.com>
14669
14670 * dwarf2read.c (dwarf2_compute_name): Update comment.
14671 (read_func_scope, read_variable): Update.
14672 (new_symbol): Remove.
14673 (new_symbol_full): Rename to new_symbol.
14674
14675 2018-01-17 Mike Gulick <mgulick@mathworks.com>
14676
14677 PR gdb/16577
14678 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14679 a warning instead of throwing an error, set section size to 0 and return
14680 NULL.
14681 * gdb_bfd.h (gdb_bfd_map_section): Update description.
14682
14683 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14684
14685 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14686 std::string.
14687 (linux_ptrace_attach_fail_reason_string): Likewise.
14688 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14689 Likewise.
14690 (linux_ptrace_attach_fail_reason_string): Likewise.
14691 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14692
14693 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
14694
14695 * linux-nat.c (linux_nat_attach): Remove xstrdup.
14696
14697 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
14698
14699 PR gdb/21559
14700 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14701 checking for fs_base/gs_base fields in struct user_regs_struct.
14702 * configure: Regenerate.
14703
14704 2018-01-17 Yao Qi <yao.qi@linaro.org>
14705
14706 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14707 function.
14708 (aarch64_linux_init_abi): Install it to gdbarch hook
14709 gcc_target_options.
14710
14711 2018-01-15 Pedro Alves <palves@redhat.com>
14712
14713 * common/signals-state-save-restore.c
14714 (save_original_signals_state): Fix typos.
14715
14716 2017-01-12 Tom Tromey <tom@tromey.com>
14717 Sergio Durigan Junior <sergiodj@redhat.com>
14718
14719 * Makefile.in (install-only): Install gdb-add-index.
14720
14721 2018-01-12 John Baldwin <jhb@FreeBSD.org>
14722
14723 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14724
14725 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
14726
14727 * infrun.c (keep_going_pass_signal): Clear step-over info when
14728 insert_breakpoints fails.
14729
14730 2018-01-11 Pedro Alves <palves@redhat.com>
14731
14732 PR gdb/22583
14733 * infrun.c (resume): Rename to ...
14734 (resume_1): ... this.
14735 (resume): Reimplement as wrapper around resume_1.
14736
14737 2018-01-11 Pedro Alves <palves@redhat.com>
14738
14739 PR remote/22597
14740 * remote.c (remote_parse_stop_reply): Default to the last-set
14741 general thread instead of to 'magic_null_ptid'.
14742
14743 2018-01-10 Pedro Alves <palves@redhat.com>
14744
14745 * language.h (language_get_symbol_name_matcher): Rename ...
14746 (get_symbol_name_matcher): ... this.
14747 * language.c (language_get_symbol_name_matcher): Ditto.
14748 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14749 callers adjusted.
14750
14751 2018-01-10 Pedro Alves <palves@redhat.com>
14752
14753 PR gdb/22670
14754 * dwarf2read.c
14755 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14756 Adjust to use language_get_symbol_name_matcher instead of
14757 language_defn::la_get_symbol_name_matcher.
14758 * language.c (language_get_symbol_name_matcher): If in Ada mode
14759 and the lookup name is a verbatim match, return Ada's matcher.
14760 * language.h (language_get_symbol_name_matcher): Adjust comment.
14761 (ada_lookup_name_info::verbatim_p):: New method.
14762
14763 2018-01-10 Pedro Alves <palves@redhat.com>
14764
14765 PR gdb/22670
14766 * ada-lang.c (ada_collect_symbol_completion_matches): If the
14767 minsym's language is language_auto or language_cplus, pass down
14768 language_ada instead.
14769 * symtab.c (compare_symbol_name): Don't frob symbol language here.
14770
14771 2018-01-10 Pedro Alves <palves@redhat.com>
14772
14773 PR gdb/22670
14774 * minsyms.c (linkage_name_str): New function.
14775 (iterate_over_minimal_symbols): Use it.
14776
14777 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14778
14779 * NEWS: Document that 'info proc' now works on FreeBSD.
14780
14781 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14782
14783 * configure.ac: Check for kinfo_getfile in libutil.
14784 * configure: Regenerate.
14785 * config.in: Regenerate.
14786 * fbsd-nat.c: Include "fbsd-tdep.h".
14787 (fbsd_fetch_cmdline): New.
14788 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14789 rather than calling error.
14790 (fbsd_info_proc): New.
14791 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14792 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14793 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14794
14795 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14796
14797 * fbsd-nat.c (struct free_deleter): Remove.
14798 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14799
14800 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14801
14802 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14803 NULL for an empty pathname.
14804
14805 2018-01-09 John Baldwin <jhb@FreeBSD.org>
14806
14807 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14808 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14809 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14810 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14811 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14812 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14813 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14814 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14815 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14816 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14817 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14818 (fbsd_core_fetch_timeval, fbsd_print_sigset)
14819 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14820 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
14821 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14822
14823 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
14824
14825 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14826 (gnu_xfer_auxv): New function.
14827 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14828 TARGET_OBJECT_AUXV.
14829
14830 2018-01-08 Yao Qi <yao.qi@linaro.org>
14831 Simon Marchi <simon.marchi@ericsson.com>
14832
14833 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14834 common/selftest.c.
14835 (COMMON_OBS): Remove selftest.o.
14836 * configure.ac: Append selftest-arch.c and common/selftest.c to
14837 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
14838 * configure: Re-generated.
14839 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14840 GDB_SELF_TEST.
14841 (maintenance_info_selftests): Likewise.
14842
14843 2018-01-08 Xavier Roirand <roirand@adacore.com>
14844
14845 * ada-valprint.c (val_print_packed_array_elements): Use
14846 proper number of elements when printing an array indexed
14847 by an enumeration type.
14848
14849 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
14850
14851 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14852 (dw2_get_file_names_reader): Adjust.
14853 (lookup_dwo_signatured_type): Adjust.
14854 (lookup_dwp_signatured_type): Adjust.
14855 (lookup_signatured_type): Adjust.
14856 (create_type_unit_group): Adjust.
14857 (get_type_unit_group): Adjust.
14858 (process_psymtab_comp_unit_reader): Adjust.
14859 (build_type_psymtabs_reader): Adjust.
14860 (scan_partial_symbols): Adjust.
14861 (add_partial_symbol): Adjust.
14862 (add_partial_subprogram): Adjust.
14863 (peek_die_abbrev): Adjust.
14864 (fixup_go_packaging): Adjust.
14865 (process_imported_unit_die): Adjust.
14866 (dwarf2_compute_name): Adjust.
14867 (dwarf2_physname): Adjust.
14868 (read_import_statement): Adjust.
14869 (handle_DW_AT_stmt_list): Adjust.
14870 (read_file_scope): Adjust.
14871 (read_func_scope): Adjust.
14872 (read_lexical_block_scope): Adjust.
14873 (read_call_site_scope): Adjust.
14874 (read_variable): Adjust.
14875 (dwarf2_rnglists_process): Adjust.
14876 (dwarf2_ranges_process): Adjust.
14877 (dwarf2_ranges_read): Adjust.
14878 (dwarf2_get_pc_bounds): Adjust.
14879 (dwarf2_record_block_ranges): Adjust.
14880 (dwarf2_add_field): Adjust.
14881 (dwarf2_add_member_fn): Adjust.
14882 (read_structure_type): Adjust.
14883 (process_structure_scope): Adjust.
14884 (read_enumeration_type): Adjust.
14885 (read_array_type): Adjust.
14886 (mark_common_block_symbol_computed): Adjust.
14887 (read_common_block): Adjust.
14888 (read_namespace_type): Adjust.
14889 (read_namespace): Adjust.
14890 (read_module_type): Adjust.
14891 (read_tag_pointer_type): Adjust.
14892 (read_tag_ptr_to_member_type): Adjust.
14893 (read_tag_string_type): Adjust.
14894 (read_subroutine_type): Adjust.
14895 (read_typedef): Adjust.
14896 (read_base_type): Adjust.
14897 (attr_to_dynamic_prop): Adjust.
14898 (read_subrange_type): Adjust.
14899 (read_unspecified_type): Adjust.
14900 (dwarf2_read_abbrevs): Adjust.
14901 (load_partial_dies): Adjust.
14902 (read_partial_die): Adjust.
14903 (find_partial_die): Adjust.
14904 (guess_partial_die_structure_name): Adjust.
14905 (fixup_partial_die): Adjust.
14906 (read_attribute_value): Adjust.
14907 (read_addr_index): Adjust.
14908 (read_addr_index_from_leb128): Adjust.
14909 (read_str_index): Adjust.
14910 (dwarf2_string_attr): Adjust.
14911 (get_debug_line_section): Adjust.
14912 (dwarf_decode_line_header): Adjust.
14913 (lnp_state_machine::check_line_address): Adjust.
14914 (dwarf_decode_lines_1): Adjust.
14915 (dwarf_decode_lines): Adjust.
14916 (dwarf2_start_symtab): Adjust.
14917 (var_decode_location): Adjust.
14918 (new_symbol_full): Adjust.
14919 (dwarf2_const_value_data): Adjust.
14920 (dwarf2_const_value_attr): Adjust.
14921 (dwarf2_const_value): Adjust.
14922 (die_type): Adjust.
14923 (die_containing_type): Adjust.
14924 (build_error_marker_type): Adjust.
14925 (lookup_die_type): Adjust.
14926 (guess_full_die_structure_name): Adjust.
14927 (anonymous_struct_prefix): Adjust.
14928 (determine_prefix): Adjust.
14929 (dwarf2_name): Adjust.
14930 (follow_die_ref_or_sig): Adjust.
14931 (follow_die_offset): Adjust.
14932 (follow_die_ref): Adjust.
14933 (follow_die_sig_1): Adjust.
14934 (follow_die_sig): Adjust.
14935 (get_signatured_type): Adjust.
14936 (get_DW_AT_signature_type): Adjust.
14937 (decode_locdesc): Adjust.
14938 (dwarf_decode_macros): Adjust.
14939 (cu_debug_loc_section): Adjust.
14940 (fill_in_loclist_baton): Adjust.
14941 (dwarf2_symbol_mark_computed): Adjust.
14942 (init_one_comp_unit): Don't assign
14943 dwarf2_cu::dwarf2_per_objfile.
14944 (set_die_type): Adjust.
14945
14946 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
14947
14948 * dwarf2read.c (struct mapped_debug_names): Add constructor.
14949 <dwarf2_per_objfile>: New field.
14950 (dwarf2_per_objfile): Remove global.
14951 (get_dwarf2_per_objfile): New function.
14952 (set_dwarf2_per_objfile): New function.
14953 (dwarf2_build_psymtabs_hard): Change objfile parameter to
14954 dwarf2_per_objfile.
14955 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14956 (read_abbrev_offset): Likewise.
14957 (read_indirect_string): Likewise.
14958 (read_indirect_line_string): Likewise.
14959 (read_indirect_string_at_offset): Likewise.
14960 (read_indirect_string_from_dwz): Likewise.
14961 (dwarf2_find_containing_comp_unit): Change objfile parameter to
14962 dwarf2_per_objfile.
14963 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14964 (create_all_comp_units): Change objfile parameter to
14965 dwarf2_per_objfile.
14966 (create_all_type_units): Likewise.
14967 (process_queue): Add dwarf2_per_objfile parameter.
14968 (read_and_check_comp_unit_head): Likewise.
14969 (lookup_dwo_unit_in_dwp): Likewise.
14970 (get_dwp_file): Likewise.
14971 (process_cu_includes): Likewise.
14972 (struct free_dwo_file_cleanup_data): New struct.
14973 (dwarf2_has_info): Use get_dwarf2_per_objfile and
14974 set_dwarf2_per_objfile.
14975 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14976 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14977 context, adjust calls.
14978 (dw2_instantiate_symtab): Likewise.
14979 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14980 (dw2_get_cu): Likewise.
14981 (create_cu_from_index_list): Change objfile parameter to
14982 dwarf2_per_objfile.
14983 (create_cus_from_index_list): Get dwarf2_per_objfile from
14984 context, adjust calls.
14985 (create_cus_from_index): Likewise.
14986 (create_signatured_type_table_from_index): Change objfile
14987 parameter to dwarf2_per_objfile.
14988 (create_signatured_type_table_from_debug_names): Change objfile
14989 parameter to dwarf2_per_objfile.
14990 (create_addrmap_from_index): Likewise.
14991 (create_addrmap_from_aranges): Likewise.
14992 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14993 (dw2_setup): Remove.
14994 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14995 context.
14996 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14997 get_dwarf2_per_objfile.
14998 (dw2_forget_cached_source_info): Likewise.
14999 (dw2_map_symtabs_matching_filename): Likewise.
15000 (struct dw2_symtab_iterator) <index>: Remove.
15001 <dwarf2_per_objfile>: New field.
15002 (dw2_symtab_iter_init): Replace index parameter with
15003 dwarf2_per_objfile.
15004 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15005 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15006 (dw2_print_stats): Likewise.
15007 (dw2_dump): Likewise.
15008 (dw2_expand_symtabs_for_function): Likewise.
15009 (dw2_expand_all_symtabs): Likewise.
15010 (dw2_expand_symtabs_with_fullname): Likewise.
15011 (dw2_expand_marked_cus): Replace index and objfile parameters
15012 with dwarf2_per_objfile.
15013 (dw_expand_symtabs_matching_file_matcher): Add
15014 dwarf2_per_objfile parameter and adjust calls.
15015 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15016 adjust calls.
15017 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15018 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15019 adjust calls.
15020 (create_cus_from_debug_names_list): Replace objfile parameter
15021 with dwarf2_per_objfile and adjust calls.
15022 (create_cus_from_debug_names): Likewise.
15023 (dwarf2_read_debug_names): Likewise.
15024 (mapped_debug_names::namei_to_name): Adjust call.
15025 (dw2_debug_names_iterator::next): Likewise.
15026 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15027 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15028 (dw2_debug_names_dump): Likewise.
15029 (dw2_debug_names_expand_symtabs_for_function): Likewise.
15030 (dw2_debug_names_expand_symtabs_matching): Likewise.
15031 (dwarf2_initialize_objfile): Likewise.
15032 (dwarf2_build_psymtabs): Likewise.
15033 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15034 this_cu.
15035 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15036 (read_and_check_comp_unit_head): Likewise.
15037 (read_abbrev_offset): Likewise.
15038 (create_debug_type_hash_table): Likewise.
15039 (create_debug_types_hash_table): Likewise.
15040 (create_all_type_units): Replace objfile parameter with
15041 dwarf2_per_objfile.
15042 (add_type_unit): Add dwarf2_per_objfile parameter.
15043 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15044 with dwarf2_per_objfile.
15045 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15046 (lookup_dwp_signatured_type): Likewise.
15047 (lookup_signatured_type): Likewise.
15048 (read_cutu_die_from_dwo): Likewise.
15049 (init_tu_and_read_dwo_dies): Likewise.
15050 (init_cutu_and_read_dies): Likewise.
15051 (init_cutu_and_read_dies_no_follow): Likewise.
15052 (allocate_type_unit_groups_table): Add objfile parameter.
15053 (create_type_unit_group): Use dwarf2_per_objfile from cu.
15054 (get_type_unit_group): Likewise.
15055 (process_psymtab_comp_unit): Update call.
15056 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15057 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15058 (print_tu_stats): Likewise.
15059 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15060 in void* parameter.
15061 (build_type_psymtabs): Change objfile parameter to
15062 dwarf2_per_objfile.
15063 (process_skeletonless_type_unit): Use dwarf2_per_objfile
15064 passed in void* parameter.
15065 (process_skeletonless_type_units): Change objfile parameter to
15066 dwarf2_per_objfile.
15067 (set_partial_user): Likewise.
15068 (dwarf2_build_psymtabs_hard): Likewise.
15069 (read_comp_units_from_section): Likewise.
15070 (create_all_comp_units): Likewise.
15071 (scan_partial_symbols): Update calls.
15072 (add_partial_symbol): Likewise.
15073 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15074 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15075 (process_queue): Add dwarf2_per_objfile parameter.
15076 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15077 (compute_compunit_symtab_includes): Likewise.
15078 (process_cu_includes): Add dwarf2_per_objfile parameter.
15079 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15080 (process_full_type_unit): Likewise.
15081 (process_imported_unit_die): Update call.
15082 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15083 (read_file_scope): Likewise.
15084 (allocate_dwo_file_hash_table): Add objfile parameter.
15085 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15086 (create_cus_hash_table): Likewise.
15087 (create_dwp_hash_table): Likewise.
15088 (create_dwo_unit_in_dwp_v1): Likewise.
15089 (create_dwp_v2_section): Likewise.
15090 (create_dwo_unit_in_dwp_v2): Likewise.
15091 (lookup_dwo_unit_in_dwp): Likewise.
15092 (try_open_dwop_file): Likewise.
15093 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15094 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15095 cleanup to include a reference to dwarf2_per_objfile.
15096 (open_dwp_file): Add dwarf2_per_objfile parameter.
15097 (open_and_init_dwp_file): Likewise.
15098 (get_dwp_file): Likewise.
15099 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15100 (queue_and_load_all_dwo_tus): Update call.
15101 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15102 data.
15103 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15104 (dwarf2_ranges_process): Likewise.
15105 (dwarf2_get_pc_bounds): Likewise.
15106 (mark_common_block_symbol_computed): Likewise.
15107 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15108 (dwarf2_read_abbrevs): Update call.
15109 (read_partial_die): Use dwarf2_per_objfile from cu.
15110 (find_partial_die): Likewise.
15111 (fixup_partial_die): Likewise.
15112 (read_attribute_value): Likewise.
15113 (read_indirect_string_at_offset_from): Add objfile parameter.
15114 (read_indirect_string_at_offset): Add dwarf2_per_objfile
15115 parameter.
15116 (read_indirect_string_from_dwz): Add objfile parameter.
15117 (read_indirect_string): Add objfile parameter.
15118 (read_addr_index_1): Add dwarf2_per_objfile parameter.
15119 (read_addr_index): Use dwarf2_per_objfile from cu.
15120 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15121 call dw2_setup.
15122 (read_str_index): Use dwarf2_per_objfile from cu.
15123 (get_debug_line_section): Likewise.
15124 (read_formatted_entries): Add dwarf2_per_objfile parameter.
15125 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15126 (new_symbol_full): Use dwarf2_per_objfile from cu.
15127 (build_error_marker_type): Likewise.
15128 (lookup_die_type): Likewise.
15129 (determine_prefix): Likewise.
15130 (follow_die_offset): Likewise.
15131 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15132 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15133 (dwarf2_fetch_die_type_sect_off): Likewise.
15134 (dwarf2_get_die_type): Likewise.
15135 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15136 (get_signatured_type): Likewise.
15137 (get_DW_AT_signature_type): Likewise.
15138 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15139 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15140 (cu_debug_loc_section): Likewise.
15141 (fill_in_loclist_baton): Likewise.
15142 (dwarf2_symbol_mark_computed): Likewise.
15143 (dwarf2_find_containing_comp_unit): Change objfile parameter to
15144 dwarf2_per_objfile.
15145 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15146 parameter.
15147 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15148 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15149 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15150 (set_die_type): Use dwarf2_free_objfile from cu.
15151 (get_die_type_at_offset): Likewise.
15152 (dwarf2_per_objfile_free): Don't assign global variable.
15153 (debug_names) <constructor>: Add dwarf2_per_objfile
15154 parameter, update m_debugstrlookup construction.
15155 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15156 parameter.
15157 <m_dwarf2_per_objfile>: New field.
15158 <lookup>: Use m_dwarf2_per_objfile.
15159 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15160 (psyms_seen_size): Likewise.
15161 (write_gdbindex): Replace objfile parameter with
15162 dwarf2_per_objfile.
15163 (write_debug_names): Likewise.
15164 (write_psymtabs_to_index): Likewise.
15165 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15166 calls.
15167
15168 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15169
15170 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15171 <dwarf2_per_objfile>: New field.
15172 (struct dwarf2_per_cu_data) <objfile>: Remove.
15173 <dwarf2_per_objfile>: New field.
15174 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15175 of objfile.
15176 (create_signatured_type_table_from_index): Likewise.
15177 (create_debug_type_hash_table): Likewise.
15178 (fill_in_sig_entry_from_dwo_entry): Likewise.
15179 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15180 (create_type_unit_group): Assign dwarf2_per_objfile instead of
15181 objfile.
15182 (create_partial_symtab): Access objfile through
15183 dwarf2_per_objfile.
15184 (process_psymtab_comp_unit_reader): Likewise.
15185 (read_comp_units_from_section): Likewise.
15186 (scan_partial_symbols): Likewise.
15187 (add_partial_symbol): Likewise.
15188 (add_partial_subprogram): Likewise.
15189 (peek_die_abbrev): Likewise.
15190 (fixup_go_packaging): Likewise.
15191 (process_full_comp_unit): Likewise.
15192 (process_full_type_unit): Likewise.
15193 (process_imported_unit_die): Likewise.
15194 (dwarf2_compute_name): Likewise.
15195 (dwarf2_physname): Likewise.
15196 (read_import_statement): Likewise.
15197 (create_cus_hash_table): Assign dwarf2_physname instead of
15198 objfile.
15199 (read_func_scope): Access objfile through dwarf2_per_objfile.
15200 (read_lexical_block_scope): Likewise.
15201 (read_call_site_scope): Likewise.
15202 (read_variable): Likewise.
15203 (dwarf2_rnglists_process): Likewise.
15204 (dwarf2_ranges_process): Likewise.
15205 (dwarf2_ranges_read): Likewise.
15206 (dwarf2_record_block_ranges): Likewise.
15207 (dwarf2_add_field): Likewise.
15208 (dwarf2_add_member_fn): Likewise.
15209 (read_structure_type): Likewise.
15210 (process_structure_scope): Likewise.
15211 (read_enumeration_type): Likewise.
15212 (read_array_type): Likewise.
15213 (read_common_block): Likewise.
15214 (read_namespace_type): Likewise.
15215 (read_namespace): Likewise.
15216 (read_module_type): Likewise.
15217 (read_tag_pointer_type): Likewise.
15218 (read_tag_ptr_to_member_type): Likewise.
15219 (read_tag_string_type): Likewise.
15220 (read_subroutine_type): Likewise.
15221 (read_typedef): Likewise.
15222 (read_base_type): Likewise.
15223 (attr_to_dynamic_prop): Likewise.
15224 (read_subrange_type): Likewise.
15225 (read_unspecified_type): Likewise.
15226 (load_partial_dies): Likewise.
15227 (read_partial_die): Likewise.
15228 (find_partial_die): Likewise.
15229 (guess_partial_die_structure_name): Likewise.
15230 (fixup_partial_die): Likewise.
15231 (read_attribute_value): Likewise.
15232 (read_addr_index_from_leb128): Likewise.
15233 (dwarf2_read_addr_index): Likewise.
15234 (dwarf2_string_attr): Likewise.
15235 (lnp_state_machine::check_line_address): Likewise.
15236 (dwarf_decode_lines_1): Likewise.
15237 (dwarf_decode_lines): Likewise.
15238 (dwarf2_start_symtab): Likewise.
15239 (var_decode_location): Likewise.
15240 (new_symbol_full): Likewise.
15241 (dwarf2_const_value_data): Likewise.
15242 (dwarf2_const_value_attr): Likewise.
15243 (dwarf2_const_value): Likewise.
15244 (die_type): Likewise.
15245 (die_containing_type): Likewise.
15246 (lookup_die_type): Likewise.
15247 (guess_full_die_structure_name): Likewise.
15248 (anonymous_struct_prefix): Likewise.
15249 (dwarf2_name): Likewise.
15250 (follow_die_ref_or_sig): Likewise.
15251 (follow_die_offset): Likewise.
15252 (follow_die_ref): Likewise.
15253 (dwarf2_fetch_die_loc_sect_off): Likewise.
15254 (dwarf2_fetch_constant_bytes): Likewise.
15255 (dwarf2_fetch_die_type_sect_off): Likewise.
15256 (dwarf2_get_die_type): Likewise.
15257 (follow_die_sig): Likewise.
15258 (decode_locdesc): Likewise.
15259 (dwarf2_per_cu_objfile): Likewise.
15260 (dwarf2_per_cu_text_offset): Likewise.
15261 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15262 objfile.
15263 (set_die_type): Access objfile through
15264 dwarf2_per_objfile.
15265
15266 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
15267
15268 * valprint.c (converted_character_d): Remove typedef.
15269 (DEF_VEC_O (converted_character_d)): Remove.
15270 (count_next_character): Use std::vector.
15271 (print_converted_chars_to_obstack): Likewise.
15272 (generic_printstr): Likewise.
15273
15274 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15275
15276 * xml-support.h (struct gdb_xml_value): Add constructor.
15277 <value>: Change type to unique_xmalloc_ptr.
15278 (gdb_xml_value_s): Remove typedef.
15279 (DEF_VEC_O (gdb_xml_value_s)): Remove.
15280 (gdb_xml_element_start_handler): Change parameter type to
15281 std::vector.
15282 (xml_find_attribute): Likewise.
15283 * xml-support.c (xml_find_attribute): Change parameter type to
15284 std::vector and adjust.
15285 (gdb_xml_values_cleanup): Remove.
15286 (gdb_xml_parser::start_element): Adjust to std::vector.
15287 (xinclude_start_include): Change paraeter type to std::vector
15288 and adjust.
15289 * btrace.c (check_xml_btrace_version): Likewise.
15290 (parse_xml_btrace_block): Likewise.
15291 (parse_xml_btrace_pt_config_cpu): Likewise.
15292 (parse_xml_btrace_pt): Likewise.
15293 (parse_xml_btrace_conf_bts): Likewise.
15294 (parse_xml_btrace_conf_pt): Likewise.
15295 * memory-map.c (memory_map_start_memory): Likewise.
15296 (memory_map_start_property): Likewise.
15297 * osdata.c (osdata_start_osdata): Likewise.
15298 (osdata_start_item): Likewise.
15299 (osdata_start_column): Likewise.
15300 * remote.c (start_thread): Likewise.
15301 * solib-aix.c (library_list_start_library): Likewise.
15302 (library_list_start_list): Likewise.
15303 * solib-svr4.c (library_list_start_library): Likewise.
15304 (svr4_library_list_start_list): Likewise.
15305 * solib-target.c (library_list_start_segment): Likewise.
15306 (library_list_start_section): Likewise.
15307 (library_list_start_library): Likewise.
15308 (library_list_start_list): Likewise.
15309 * tracepoint.c (traceframe_info_start_memory): Likewise.
15310 (traceframe_info_start_tvar): Likewise.
15311 * xml-syscall.c (syscall_start_syscall): Likewise.
15312 * xml-tdesc.c (tdesc_start_target): Likewise.
15313 (tdesc_start_feature): Likewise.
15314 (tdesc_start_reg): Likewise.
15315 (tdesc_start_union): Likewise.
15316 (tdesc_start_struct): Likewise.
15317 (tdesc_start_flags): Likewise.
15318 (tdesc_start_enum): Likewise.
15319 (tdesc_start_field): Likewise.
15320 (tdesc_start_enum_value): Likewise.
15321 (tdesc_start_vector): Likewise.
15322
15323 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15324
15325 * extension.h (struct xmethod_worker) <clone>: Remove.
15326 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15327 Remove.
15328 (python_xmethod_worker::clone): Remove.
15329 * valops.c (find_overload_match): Use std::move instead of
15330 clone.
15331
15332 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
15333
15334 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15335 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15336 <free_xmethod_worker_data>: Remove.
15337 <get_matching_xmethod_workers>: Chance VEC to std::vector.
15338 <get_xmethod_arg_types>: Remove.
15339 <get_xmethod_result_type>: Remove.
15340 <invoke_xmethod>: Remove.
15341 * extension.c (new_xmethod_worker): Remove.
15342 (clone_xmethod_worker): Remove.
15343 (get_matching_xmethod_workers): Return void, pass std::vector by
15344 pointer.
15345 (get_xmethod_arg_types): Rename to...
15346 (xmethod_worker::get_arg_types): ... this, and adjust.
15347 (get_xmethod_result_type): Rename to...
15348 (xmethod_worker::get_result_type): ... this, and adjust.
15349 (invoke_xmethod): Remove.
15350 (free_xmethod_worker): Remove.
15351 (free_xmethod_worker_vec): Remove.
15352 * extension.h (enum ext_lang_rc): Move here from
15353 extension-priv.h.
15354 (struct xmethod_worker): Add constructor and destructor.
15355 <data>: Remove.
15356 <value>: Remove.
15357 <invoke, clone, do_get_result_type, do_get_arg_types>: New
15358 virtual pure methods.
15359 <get_arg_types, get_result_type>: New methods.
15360 (xmethod_worker_ptr): Remove typedef.
15361 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15362 (xmethod_worker_vec): Remove typedef.
15363 (xmethod_worker_up): New typedef.
15364 (invoke_xmethod): Remove.
15365 (clone_xmethod_worker): Remove.
15366 (free_xmethod_worker): Remove.
15367 (free_xmethod_worker_vec): Remove.
15368 (get_xmethod_arg_types): Remove.
15369 (get_xmethod_result_type): Remove.
15370 * valops.c (find_method_list): Use std::vector, don't use
15371 intermediate vector.
15372 (value_find_oload_method_list): Use std::vector.
15373 (find_overload_match): Use std::vector.
15374 (find_oload_champ): Use std::vector.
15375 * value.c (value_free): Use operator delete.
15376 (value_of_xmethod): Rename to...
15377 (value_from_xmethod): ... this. Don't assign
15378 xmethod_worker::value, take rvalue-reference.
15379 (result_type_of_xmethod): Adjust.
15380 (call_xmethod): Adjust.
15381 * value.h: Include extension.h.
15382 (struct xmethod_worker): Don't forward-declare.
15383 (value_of_xmethod): Rename to...
15384 (value_from_xmethod): ... this, take rvalue-reference.
15385 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15386 (struct python_xmethod_worker): ... this, add constructor and
15387 destructor.
15388 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15389 (gdbpy_free_xmethod_worker_data): Rename to...
15390 (python_xmethod_worker::~python_xmethod_worker): ... this and
15391 adjust.
15392 (gdbpy_clone_xmethod_worker_data): Rename to...
15393 (python_xmethod_worker::clone): ... this and adjust.
15394 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15395 temporary vector.
15396 (gdbpy_get_xmethod_arg_types): Rename to...
15397 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15398 (gdbpy_get_xmethod_result_type): Rename to...
15399 (python_xmethod_worker::do_get_result_type): ... this and
15400 adjust.
15401 (gdbpy_invoke_xmethod): Rename to...
15402 (python_xmethod_worker::invoke): ... this and adjust.
15403 (new_python_xmethod_worker): Rename to...
15404 (python_xmethod_worker::python_xmethod_worker): ... this and
15405 adjust.
15406 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15407 Remove.
15408 (gdbpy_free_xmethod_worker_data): Remove.
15409 (gdbpy_get_matching_xmethod_workers): Use std::vector.
15410 (gdbpy_get_xmethod_arg_types): Remove.
15411 (gdbpy_get_xmethod_result_type): Remove.
15412 (gdbpy_invoke_xmethod): Remove.
15413 * python/python.c (python_extension_ops): Remove obsolete
15414 callbacks.
15415
15416 2018-01-05 Pedro Alves <palves@redhat.com>
15417
15418 PR gdb/18653
15419 * common/signals-state-save-restore.c
15420 (save_original_signals_state): New parameter 'quiet'. Warn if we
15421 find a custom handler preinstalled, instead of internal erroring.
15422 But only warn if !quiet.
15423 * common/signals-state-save-restore.h
15424 (save_original_signals_state): New parameter 'quiet'.
15425 * main.c (captured_main_1): Move save_original_signals_state call
15426 after option handling, and pass QUIET.
15427
15428 2018-01-05 Pedro Alves <palves@redhat.com>
15429
15430 * spu-tdep.c (spu_catch_start): Pass
15431 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15432
15433 2018-01-05 Pedro Alves <palves@redhat.com>
15434
15435 PR gdb/22670
15436 * ada-lang.c (literal_symbol_name_matcher): New function.
15437 (ada_get_symbol_name_matcher): Use it for
15438 symbol_name_match_type::SEARCH_NAME.
15439 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
15440 it down instead of assuming symbol_name_match_type::FULL.
15441 * block.h (block_lookup_symbol): New parameter 'match_type'.
15442 * c-valprint.c (print_unpacked_pointer): Use
15443 lookup_symbol_search_name instead of lookup_symbol.
15444 * compile/compile-object-load.c (get_out_value_type): Pass down
15445 symbol_name_match_type::SEARCH_NAME.
15446 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15447 symbol_name_match_type::FULL.
15448 * cp-support.c (cp_get_symbol_name_matcher): Handle
15449 symbol_name_match_type::SEARCH_NAME.
15450 * infrun.c (insert_exception_resume_breakpoint): Use
15451 lookup_symbol_search_name.
15452 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15453 * psymtab.c (maintenance_check_psymtabs): Use
15454 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15455 * stack.c (print_frame_args): Use lookup_symbol_search_name and
15456 SYMBOL_SEARCH_NAME.
15457 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15458 if symbol_name_match_type::SEARCH_NAME.
15459 (lookup_symbol_in_language): Pass down
15460 symbol_name_match_type::FULL.
15461 (lookup_symbol_search_name): New.
15462 (lookup_language_this): Pass down
15463 symbol_name_match_type::SEARCH_NAME.
15464 (lookup_symbol_aux, lookup_local_symbol): New parameter
15465 'match_type'. Pass it down.
15466 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15467 (lookup_symbol_search_name): New declaration.
15468 (lookup_symbol_in_block): New 'match_type' parameter.
15469
15470 2018-01-05 Pedro Alves <palves@redhat.com>
15471
15472 PR gdb/22670
15473 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15474 ada_lookup_symbol.
15475 (ada_lookup_symbol): Reimplement in terms of
15476 ada_lookup_symbol_list, bits factored out from
15477 ada_lookup_encoded_symbol.
15478
15479 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15480
15481 * ada-exp.y (write_object_renaming): When subscripting an array
15482 using a symbol as the index, pass the block in call to
15483 ada_lookup_encoded_symbol when looking that symbol up.
15484
15485 2018-01-05 Jerome Guitton <guitton@adacore.com>
15486
15487 * ada-lang.c (ada_array_length): Use ada_index_type instead of
15488 TYPE_INDEX_TYPE.
15489
15490 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15491
15492 * ada-lang.c (ada_to_fixed_value_create): Add handling of
15493 the case where VALUE_LVAL (val0) is not lval_memory.
15494
15495 2018-01-05 Xavier Roirand <roirand@adacore.com>
15496
15497 * ada-valprint.c (print_optional_low_bound): Handle
15498 character-indexed array printing like boolean-indexed array
15499 printing.
15500
15501 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15502
15503 * NEWS: Create a new section for the next release branch.
15504 Rename the section of the current branch, now that it has
15505 been cut.
15506
15507 2018-01-05 Joel Brobecker <brobecker@adacore.com>
15508
15509 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15510 * version.in: Bump version to 8.1.50.DATE-git.
15511
15512 2018-01-03 Xavier Roirand <roirand@adacore.com>
15513
15514 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15515 Add field.
15516 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15517 Add field.
15518 (default_exception_support_info) <catch_handlers_sym>: Add field.
15519 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15520 (ada_exception_name_addr_1): Add "catch handlers" handling.
15521 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15522 Update all callers.
15523 (create_excep_cond_exprs) <ex>: Add parameter.
15524 (re_set_exception): Update create_excep_cond_exprs call.
15525 (print_it_exception, print_one_exception, print_mention_exception)
15526 (print_recreate_exception): Add "catch handler" handling.
15527 (allocate_location_catch_handlers, re_set_catch_handlers)
15528 (check_status_catch_handlers, print_it_catch_handlers)
15529 (print_one_catch_handlers, print_mention_catch_handlers)
15530 (print_recreate_catch_handlers): New function.
15531 (catch_handlers_breakpoint_ops): New variable.
15532 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15533 Add parameter. Add "catch handler" handling.
15534 (ada_exception_sym_name, ada_exception_breakpoint_ops):
15535 Add "catch handler" handling.
15536 (ada_exception_catchpoint_cond_string): Add "catch handler"
15537 handling.
15538 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15539 call.
15540 (catch_ada_handlers_command): New function.
15541 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15542 operations structure.
15543 (_initialize_ada_language): Add "catch handlers" command entry.
15544 * NEWS: Document "catch handlers" feature.
15545
15546 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15547
15548 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15549 account when creating the array type of the slice.
15550 (ada_value_slice): Likewise.
15551
15552 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15553
15554 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15555 New enum value.
15556 (create_array_type_with_stride): Add byte_stride_prop parameter.
15557 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15558 New parameter. Update all callers in this file.
15559 (array_type_has_dynamic_stride): New function.
15560 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15561 of arrays with dynamic byte strides.
15562 * dwarf2read.c (read_array_type): Add support for dynamic
15563 DW_AT_byte_stride attributes.
15564
15565 2018-01-02 Joel Brobecker <brobecker@adacore.com>
15566
15567 * dwarf2read.c (read_unspecified_type): Treat
15568 DW_TAG_enumeration_type DIEs from Ada units as stubs.
15569
15570 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15571
15572 Update copyright year range in all GDB files.
15573
15574 2018-01-01, 18 Joel Brobecker <brobecker@adacore.com>
15575
15576 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15577 and gdb/testsuite/gdb.base/step-line.c.
15578
15579 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15580
15581 * copyright.py (main): Dump the contents of
15582 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15583 even if BY_HAND is empty.
15584
15585 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15586
15587 * top.c (print_gdb_version): Update Copyright year in version
15588 message.
15589
15590 2018-01-01 Joel Brobecker <brobecker@adacore.com>
15591
15592 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15593
15594 For older changes see ChangeLog-2017.
15595 \f
15596 Local Variables:
15597 mode: change-log
15598 left-margin: 8
15599 fill-column: 74
15600 version-control: never
15601 coding: utf-8
15602 End: