Capitalize "<TAB>" in require_record_target error
[external/binutils.git] / gdb / ChangeLog
1 2018-11-08  Tom Tromey  <tom@tromey.com>
2
3         * record.c (require_record_target): Upper-case "<TAB>".
4
5 2018-11-08  Tom Tromey  <tom@tromey.com>
6
7         * python/lib/gdb/command/pretty_printers.py
8         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
9
10 2018-11-08  Tom Tromey  <tom@tromey.com>
11
12         PR gdb/23555:
13         PR gdb/23838:
14         * target.h (target_supports_terminal_ours): Return bool.
15         * target.c (target_supports_terminal_ours): Handle case where
16         current_top_target returns nullptr.  Return bool.
17
18 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
19
20         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
21         return the correct count for potential HFAs.
22
23 2018-11-08  Jan Beulich  <jbeulich@suse.com>
24
25         * i387-tdep.c (i387_supply_xsave): Split handling of
26         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
27         (i387_collect_xsave): Likewise.
28
29 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
30
31         * riscv-tdep.c (riscv_insn::decode): Update header comment.
32         (riscv_frame_this_id): Catch errors thrown while building the
33         frame cache, leave the frame id as the default, which is the outer
34         frame id.
35
36 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
37
38         * ada-lang.c (read_atcb): Only set task_info->called_task if
39         task_info->state == Entry_Caller_Sleep.
40         (print_ada_task_info): Do not check task_info->state before
41         checking task_info->called_task.
42         (info_task): Likewise.
43
44 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
45
46         * ada-tasks.c (read_atcb): Clear task_info before computing
47         the value of each of its fields.
48
49 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
50
51         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
52         NULL before dereferencing it.
53
54 2018-11-06  Tom de Vries  <tdevries@suse.de>
55
56         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
57         program headers.
58
59 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
60
61         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
62         so that it applies to uclinux as well.
63
64 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
65
66         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
67         when on AAPCS.
68
69 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
70
71         * riscv-fbsd-nat.c (getregs_supplies): Return true for
72         RISCV_CSR_SSTATUS_REGNUM.
73
74 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
75
76         * source.c (open_source_file): Fix leak by transferring the
77         current s->fullname to the unique_xmalloc_ptr fullname given
78         to find_and_open_source.
79
80 2018-11-04  Tom Tromey  <tom@tromey.com>
81
82         * varobj.c (install_default_visualizer): Update.
83         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
84         Return gdbpy_ref.
85         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
86         (find_pretty_printer_from_progspace)
87         (find_pretty_printer_from_gdb, find_pretty_printer)
88         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
89         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
90         Update.
91
92 2018-11-04  Tom Tromey  <tom@tromey.com>
93
94         * python/python.c (gdbpy_parameter_value): Update.
95         * python/python-internal.h (python_string_to_unicode)
96         (python_string_to_target_python_string)
97         (host_string_to_python_string): Return gdbpy_ref.
98         * python/py-utils.c (python_string_to_unicode)
99         (unicode_to_encoded_python_string)
100         (unicode_to_target_python_string)
101         (python_string_to_target_string)
102         (python_string_to_target_python_string): Return gdbpy_ref.
103         (python_string_to_host_string): Update.
104         (host_string_to_python_string): Return gdbpy_ref.
105         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
106         (stpy_fullname): Update.
107         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
108         Update.
109         * python/py-prettyprint.c (print_string_repr): Update.
110         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
111         (objfpy_get_build_id): Update.
112         * python/py-breakpoint.c (bppy_get_location)
113         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
114         Update.
115
116 2018-11-04  Tom Tromey  <tom@tromey.com>
117
118         * python/python-internal.h (gdb_py_object_from_longest)
119         (gdb_py_object_from_ulongest): Return gdbpy_ref.
120         * python/py-value.c (valpy_int): Update.
121         * python/py-utils.c (gdb_py_object_from_longest): Return
122         gdbpy_ref.
123         (gdb_py_object_from_ulongest): Likewise.
124         * python/py-type.c (typy_get_alignof): Update.
125         * python/py-linetable.c (ltpy_get_all_source_lines)
126         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
127         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
128
129 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
130
131         * ada-lang.c (_initialize_ada_language): Fix typo.
132
133 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
134
135         * language.c (type): Remove.
136         (_initialize_language): Remove assignment to type.
137
138 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
139
140         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
141         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
142         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
143         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
144         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
145         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
146         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
147         and aarch64-ravenscar-thread.o.
148         * NEWS: Add entry documenting Ravenscar tasking support
149         on AArch64 ELF.
150
151 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
152
153         * symtab.c (info_functions_command): Initialize quiet flag.
154         * stack.c (info_args_command): Likewise.
155
156 2018-11-01  Jim Wilson  <jimw@sifive.com>
157
158         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
159         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
160         debugging messages.
161
162 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
163
164         * ada-lang.c (ada_watch_location_expression): New function.
165         (ada_language_defn): Set la_watch_location_expression to
166         ada_watch_location_expression.
167
168 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
169
170         * print-utils.c (int_string): Remove unnecessary trailing spaces.
171
172 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
173
174         * rs6000-tdep.c (skip_prologue): Fix potential negative left
175         shifting.
176
177 2018-11-01  Jerome Guitton  <guitton@adacore.com>
178             Joel Brobecker  <brobecker@adacore.com>
179
180         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
181         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
182         * arm-pikeos-tdep.c: New file.
183         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
184         embedded system.
185         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
186
187 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
188
189         * common/pathstuff.c (get_standard_temp_dir): New.
190         * common/pathstuff.h (get_standard_temp_dir): New.
191         * config.in: Re-generate.
192         * configure: Re-generate.
193         * configure.ac: Don't check for mkdtemp.
194         * gnulib/aclocal-m4-deps.mk: Re-generate.
195         * gnulib/aclocal.m4: Re-generate.
196         * gnulib/config.in: Re-generate.
197         * gnulib/configure: Re-generate.
198         * gnulib/import/Makefile.am: Re-generate.
199         * gnulib/import/Makefile.in: Re-generate.
200         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
201         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
202         * gnulib/import/m4/mkdtemp.m4: New file.
203         * gnulib/import/mkdtemp.c: New file.
204         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
205         Add mkdtemp module.
206         * unittests/mkdir-recursive-selftests.c (test): Use
207         get_standard_temp_dir.
208         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
209         ifdef.
210         * compile/compile.c (get_compile_file_tempdir): Likewise.
211
212 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
213
214         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
215         (SIG_FRAME_LR_OFFSET64): New define.
216         (SIG_FRAME_FP_OFFSET64): New define.
217         (aix_sighandle_frame_cache): New Function.
218         (aix_sighandle_frame_this_id): New Function.
219         (aix_sighandle_frame_prev_register): New Function.
220         (aix_sighandle_frame_sniffer): New Function.
221         (aix_sighandle_frame_unwind): New global variable.
222         (rs6000_aix_init_osabi): Install new frame unwinder.
223
224 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
225
226         PR gdb/23835
227         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
228         already defined.
229
230 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
231
232         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
233
234 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
235
236         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
237         (producer_is_icc): New function.
238         (check_producer): Set producer_is_icc field on dwarf2_cu.
239         (dwarf2_init_integer_type): New function.
240         (read_base_type): Call dwarf2_init_integer_type instead of
241         init_integer_type in all cases.
242         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
243         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
244         LEN is greater than 0.
245
246 2018-10-30  Tom Tromey  <tom@tromey.com>
247
248         * main.c (captured_main_1): Check return value of bfd_init.
249
250 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
251
252         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
253         Adjust comments.
254
255 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
256
257         * procfs.c: Include common/pathstuff.h.
258
259 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
260
261         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
262         Add missing braces.  No functional change.
263
264 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
265
266         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
267         to report a bad option and fix indentation.
268         * demangle.c (demangle_command): Use report_unrecognized_option_error
269         to report a bad option and correctly report the bad option.
270
271 2018-10-27  Tom Tromey  <tom@tromey.com>
272
273         PR cli/23364:
274         * darwin-nat.c (copied_shell): New global.
275         (may_have_sip): Rename from should_disable_startup_with_shell.
276         (copy_shell_to_cache, maybe_cache_shell): New functions.
277         (darwin_nat_target::create_inferior): Update.  Use
278         copied_shell.
279
280 2018-10-27  Tom Tromey  <tom@tromey.com>
281
282         * unittests/scoped_fd-selftests.c (test_to_file): New function.
283         (run_tests): Call test_to_file.
284         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
285         temporary files.
286         * common/scoped_fd.h (scoped_fd::to_file): New method.
287
288 2018-10-27  Tom Tromey  <tom@tromey.com>
289
290         * unittests/scoped_mmap-selftests.c (test_normal): Use
291         gdb_mkostemp_cloexec.
292         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
293         Use gdb_mkostemp_cloexec.
294         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
295         gnulib/config.in, gnulib/configure,
296         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
297         gnulib/import/m4/gnulib-cache.m4,
298         gnulib/import/m4/gnulib-comp.m4: Update.
299         * gnulib/import/m4/mkostemp.m4: New file.
300         * gnulib/import/m4/mkstemp.m4: Remove.
301         * gnulib/import/mkostemp.c: New file.
302         * gnulib/import/mkstemp.m4: Remove.
303         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
304         mkstemp, add mkostemp.  Apply new patch.
305         * gnulib/import/stdlib.in.h: Apply patch.
306         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
307         New file.
308         * dwarf-index-write.c (write_psymtabs_to_index): Use
309         gdb_mkostemp_cloexec.
310         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
311
312 2018-10-27  Tom Tromey  <tom@tromey.com>
313
314         * unittests/mkdir-recursive-selftests.c: New file.
315         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
316         unittests/mkdir-recursive-selftests.c.
317         * dwarf-index-cache.c (mkdir_recursive): Move to
318         common/filestuff.c.
319         (index_cache::store): Check return value of mkdir_recursive.
320         (create_dir_and_check, test_mkdir_recursive): Move to new file.
321         (_initialize_index_cache): Don't register test.
322         * common/filestuff.h (mkdir_recursive): Declare.
323         * common/filestuff.c (mkdir_recursive): Move from
324         dwarf-index-cache.c.  Return bool.
325
326 2018-10-27  Tom Tromey  <tom@tromey.com>
327
328         * dwarf-index-write.c (write_psymtabs_to_index): Move
329         make_temp_filename to common/pathstuff.c.
330         * common/pathstuff.h (make_temp_filename): Declare.
331         * common/pathstuff.c (make_temp_filename): New function, moved
332         from dwarf-index-write.c.
333
334 2018-10-27  Tom Tromey  <tom@tromey.com>
335
336         * procfs.c (procfs_target::create_inferior): Use get_shell.
337         * cli/cli-cmds.c (shell_escape): Use get_shell.
338         * windows-nat.c (windows_nat_target::create_inferior): Use
339         get_shell.
340         * common/pathstuff.c (get_shell): New function.
341         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
342         (fork_inferior): Use get_shell.
343         * common/pathstuff.h (get_shell): Declare.
344
345 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
346
347         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
348
349 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
350
351         * stack.c (print_variable_and_value_data): Add preg and treg.
352         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
353         and update callers.
354         (print_frame_arg_vars): Likewise.
355         (prepare_reg): New function.
356         (info_locals_command): Extract info print args and use them.
357         (info_args_command): Likewise.
358         (_initialize_stack): Modify on-line help.
359         * symtab.c (treg_matches_sym_type_name): New function.
360         (search_symbols): New arg t_regexp.
361         (symtab_symbol_info): New args quiet, regexp, t_regexp.
362         (info_variables_command): Extract info print args and use them.
363         (info_functions_command): Likewise.
364         (info_types_command): Update call to symtab_symbol_info.
365         (_initialize_symtab): Modify on-line help.
366         * symtab.h (treg_matches_sym_type_name): New function.
367         (search_symbols): New t_regexp arg.
368
369 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
370
371         * cli-utils.c (extract_arg_maybe_quoted): New function.
372         (extract_info_print_args): New function.
373         (info_print_args_help): New function.
374         (report_unrecognized_option_error): New function.
375         * cli-utils.h (extract_arg_maybe_quoted): New function.
376         (extract_info_print_args): New function.
377         (info_print_args_help): New function.
378         (report_unrecognized_option_error): New function.
379
380 2018-10-26  Tom Tromey  <tom@tromey.com>
381
382         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
383         (compute_compunit_symtab_includes): Update.
384         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
385         (compunit_symtab_ptr): Likewise.
386
387 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
388
389         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
390         default_print_auxv_entry for specific tag values.
391
392 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
393
394         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
395
396 2018-10-26  Jim Wilson  <jimw@sifive.com>
397
398         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
399         (riscv_linux_sigframe_init): Declare.
400         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
401         (riscv_linux_sigframe): New.
402         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
403         (riscv_linux_sigframe_init): Define.
404         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
405
406         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
407         (riscv_isa_flen): Likewise.  Drop static.
408         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
409         (riscv_isa_flen): Likewise.  Declare.
410
411 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
412             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
413
414         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
415         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
416         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
417         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
418         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
419         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
420         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
421         Define.
422         (struct ppc_linux_features) <htm>: New field.
423         (ppc_linux_no_features): Add initializer for htm field.
424         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
425         new tdescs.
426         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
427         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
428         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
429         Define if not already defined.
430         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
431         and rs6000/powerpc-isa207-htm-vsx64l.
432         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
433         rs6000/powerpc-isa207-htm-vsx64l.xml.
434         * features/rs6000/power-htm-spr.xml: New file.
435         * features/rs6000/power-htm-core.xml: New file.
436         * features/rs6000/power64-htm-core.xml: New file.
437         * features/rs6000/power-htm-fpu.xml: New file.
438         * features/rs6000/power-htm-altivec.xml: New file.
439         * features/rs6000/power-htm-vsx.xml: New file.
440         * features/rs6000/power-htm-ppr.xml: New file.
441         * features/rs6000/power-htm-dscr.xml: New file.
442         * features/rs6000/power-htm-tar.xml: New file.
443         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
444         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
445         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
446         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
447         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
448         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
449         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
450         fetch_regset with HTM regsets.
451         (store_register, store_ppc_registers): Call store_regset with HTM
452         regsets.
453         (ppc_linux_nat_target::read_description): Set htm field in the
454         features struct if needed.
455         * ppc-linux-tdep.c: Include
456         features/rs6000/powerpc-isa207-htm-vsx32l.c and
457         features/rs6000/powerpc-isa207-htm-vsx64l.c.
458         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
459         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
460         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
461         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
462         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
463         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
464         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
465         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
466         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
467         (ppc32_linux_ctarregset): New globals.
468         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
469         (ppc_linux_collect_core_cpgrregset): New function.
470         (ppc_linux_iterate_over_regset_sections): Call back with the htm
471         regsets.
472         (ppc_linux_core_read_description): Check if the tm spr section is
473         present and set htm in the features struct.
474         (_initialize_ppc_linux_tdep): Call
475         initialize_tdesc_powerpc_isa207_htm_vsx32l and
476         initialize_tdesc_powerpc_isa207_htm_vsx64l.
477         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
478         Declare.
479         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
480         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
481         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
482         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
483         New fields.
484         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
485         Likewise.
486         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
487         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
488         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
489         New enum fields.
490         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
491         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
492         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
493         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
494         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
495         <PPC_CTAR_REGNUM>: Likewise.
496         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
497         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
498         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
499         (IS_CEFP_PSEUDOREG): Define.
500         (rs6000_register_name): Hide the upper halves of checkpointed VSX
501         registers.  Return names for the checkpointed DFP, VSX, and EFP
502         pseudo registers.
503         (rs6000_pseudo_register_type): Remove initial assert and raise an
504         internal error in the else clause instead.  Return types for the
505         checkpointed DFP, VSX, and EFP pseudo registers.
506         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
507         checkpointed DFP pseudo registers.
508         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
509         checkpointed VSX pseudo registers.
510         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
511         from efpr_pseudo_register_read and
512         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
513         registers.
514         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
515         Handle checkpointed DFP, VSX, and EFP registers.
516         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
517         (efp_ax_pseudo_register_collect): New functions.
518         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
519         register logic to new functions.  Handle checkpointed DFP, VSX,
520         and EFP pseudo registers.
521         (rs6000_gdbarch_init): Look for and validate the htm features.
522         Include checkpointed DFP, VSX and EFP pseudo-registers.
523         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
524         HTM registers.
525
526 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
527
528         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
529         without altivec or fpu.
530
531 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
532             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
533
534         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
535         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
536         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
537         Define if not already defined.
538         * features/rs6000/power-ebb.xml: New file.
539         * features/rs6000/power-linux-pmu.xml: New file.
540         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
541         features.
542         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
543         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
544         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
545         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
546         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
547         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
548         fetch_regset with ebb and pmu regsets.
549         (store_register, store_ppc_registers): Call store_regset with ebb
550         and pmu regsets.
551         (ppc_linux_nat_target::read_description): Set isa207 field in the
552         features struct if ebb and pmu are avaiable.
553         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
554         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
555         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
556         and pmu regsets.
557         (ppc_linux_core_read_description): Check if the pmu section is
558         present and set isa207 in the features struct.
559         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
560         (ppc32_linux_pmuregset): Declare.
561         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
562         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
563         <ppc_sier_regnum>: New field.
564         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
565         New enum values.
566         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
567         values.
568         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
569         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
570         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
571         ebb and pmu features.
572
573 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
574             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
575
576         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
577         (tdesc_powerpc_isa207_vsx64l): Declare.
578         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
579         (struct ppc_linux_features) <isa207>: New field.
580         (ppc_linux_no_features): Add initializer for isa207 field.
581         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
582         new tdescs.
583         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
584         (NT_PPC_TAR): Define if not already defined.
585         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
586         rs6000/powerpc-isa207-vsx64l.
587         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
588         rs6000/powerpc-isa207-vsx64l.xml.
589         * features/rs6000/power-tar.xml: New file.
590         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
591         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
592         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
593         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
594         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
595         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
596         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
597         fetch_regset with the TAR regset.
598         (store_register, store_ppc_registers): Call store_regset with the
599         TAR regset.
600         (ppc_linux_nat_target::read_description): Set isa207 field in the
601         features struct if needed.
602         * ppc-linux-tdep.c: Include
603         features/rs6000/powerpc-isa207-vsx32l.c and
604         features/rs6000/powerpc-isa207-vsx64l.c.
605         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
606         (ppc_linux_iterate_over_regset_sections): Call back with the tar
607         regset.
608         (ppc_linux_core_read_description): Check if the tar section is
609         present and set isa207 in the features struct.
610         (_initialize_ppc_linux_tdep): Call
611         initialize_tdesc_powerpc_isa207_vsx32l and
612         initialize_tdesc_powerpc_isa207_vsx64l.
613         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
614         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
615         (enum) <PPC_TAR_REGNUM>: New enum value.
616         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
617         feature.
618         (ppc_process_record_op31): Record changes to TAR.
619
620 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
621             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
622
623         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
624         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
625         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
626         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
627         (struct ppc_linux_features) <ppr_dscr>: New field.
628         (ppc_linux_no_features): Add initializer for ppr_dscr field.
629         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
630         new tdescs.
631         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
632         Define if not already defined.
633         * features/Makefile (WHICH): Add
634         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
635         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
636         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
637         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
638         * features/rs6000/power-dscr.xml: New file.
639         * features/rs6000/power-ppr.xml: New file.
640         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
641         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
642         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
643         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
644         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
645         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
646         * ppc-linux-nat.c: Include <sys/uio.h>.
647         (fetch_regset, store_regset, check_regset): New functions.
648         (fetch_register, fetch_ppc_registers): Call fetch_regset with
649         DSCR and PPR regsets.
650         (store_register, store_ppc_registers): Call store_regset with
651         DSCR and PPR regsets.
652         (ppc_linux_get_hwcap2): New function.
653         (ppc_linux_nat_target::read_description): Call
654         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
655         features struct if needed.
656         * ppc-linux-tdep.c: Include
657         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
658         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
659         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
660         (ppc32_linux_dscrregset): New globals.
661         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
662         and dscr regsets.
663         (ppc_linux_core_read_description): Check if the ppr and dscr
664         sections are present and set ppr_dscr in the features struct.
665         (_initialize_ppc_linux_tdep): Call
666         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
667         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
668         * ppc-linux-tdep.h (ppc32_linux_pprregset)
669         (ppc32_linux_dscrregset): Declare.
670         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
671         <ppc_dscr_regnum>: New field.
672         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
673         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
674         and dscr features.
675         (ppc_process_record_op31): Record changes to PPR and DSCR.
676
677 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
678
679         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
680         second initializer line for the have_* variables.  Initialize
681         have_fpu to 0 instead of 1.
682
683 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
684
685         * arch/ppc-linux-common.c (ppc_linux_match_description):
686         Parenthesize tdesc assignements and indent them properly.
687
688 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
689
690         * ppc-linux-nat.c (fetch_register): Change if statement to else
691         if.
692         (store_register): Likewise.
693
694 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
695
696         * rs6000-tdep.c: Remove reggroups.h include.
697         (rs6000_pseudo_register_reggroup_p): Remove.
698         (rs6000_gdbarch_init): Remove call to
699         set_tdesc_pseudo_register_reggroup_p.
700
701 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
702
703         * reggroups.c (default_register_reggroup_p): Return true for
704         decfloat registers and float_reggroup.
705
706 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
707
708         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
709         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
710         ppc_linux_collect_vrregset by regcache_collect_regset.
711
712 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
713
714         * linux-tdep.c (linux_collect_regset_section_cb): Use
715         std::vector<gdb_byte> instead of char * and malloc for buf.
716         Remove xfree.
717
718 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
719
720         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
721         symtab_start instead of always using language_unknown.
722
723 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
724
725         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
726         READ_P parameter, catch and ignore register access errors from
727         either the old or new MISA location.
728         (riscv_has_feature): Update call to riscv_read_misa_reg.
729
730 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
731
732         * python/py-function.c (convert_values_to_python): Return
733         gdbpy_ref<>.  Add header comment.
734         (fnpy_call): Adjust.
735
736 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
737
738         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
739         (cmdpy_completer_handle_brkchars): Adjust.
740         (cmdpy_completer): Adjust.
741
742 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
743
744         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
745         Pass correct regnum to raw_supply_zeroed.
746
747 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
748
749         * regcache.c (cooked_read_test): Add CSKY to the list of
750         architectures with a save_reggroup
751
752 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
753
754         PR gdb/23368
755         * infrun.c (follow_exec): In the follow_exec_mode_new case,
756         transfer terminal state from old new new inferior.
757         * terminal.h (swap_terminal_info): New function.
758         * inflow.c (swap_terminal_info): New function.
759
760 2018-10-23  Tom Tromey  <tom@tromey.com>
761
762         * record-btrace.c (get_thread_current_frame_id): Rename from
763         get_thread_current_frame.  Return a frame_id.
764         (record_btrace_start_replaying): Update.
765
766 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
767
768         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
769         for CSRs.
770
771 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
772
773         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
774         have_nonsteppable_watchpoint attribute to 1.
775
776 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
777
778         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
779         register names.
780         (struct register_alias): Rename to...
781         (struct riscv_register_alias): ...this, and update comment.
782         (riscv_register_aliases): Update type, and alias names.  Remove
783         CSR names from this list.
784         (riscv_register_name): Use riscv_gdb_reg_names for int and float
785         register names.  Add an extra assertion.
786         (riscv_is_regnum_a_named_csr): New function.
787         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
788
789 2018-10-22  Jim Wilson  <jimw@sifive.com>
790
791         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
792         FP reg smaller than FP reg size, and fill with -1 instead of 0.
793
794         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
795         (riscv_register_type): Use them.
796         (riscv_print_one_register_info): Handle union of floats same as float.
797         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
798         riscv_fpreg_q_type fields.
799
800 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
801
802         * gdbarch.sh (gdbarch_num_cooked_regs): New.
803         * gdbarch.h: Re-generate.
804         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
805         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
806         * eval.c (evaluate_subexp_standard): Likewise.
807         * findvar.c (value_of_register): Likewise.
808         (value_of_register_lazy): Likewise.
809         (address_from_register): Likewise.
810         * frame.c (get_frame_register_bytes): Likewise.
811         * gdbarch-selftests.c (register_to_value_test): Likewise.
812         * h8300-tdep.c (h8300_register_type): Likewise.
813         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
814         (i386_svr4_reg_to_regnum): Likewise.
815         * infcmd.c (default_print_registers_info): Likewise.
816         (registers_info): Likewise.
817         (print_vector_info): Likewise.
818         (default_print_float_info): Likewise.
819         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
820         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
821         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
822         (mi_cmd_data_list_changed_registers): Likewise.
823         (mi_cmd_data_list_register_values): Likewise.
824         (mi_cmd_data_write_register_values): Likewise.
825         (mi_cmd_trace_frame_collected): Likewise.
826         * mips-tdep.c (print_gp_register_row): Likewise.
827         (mips_print_registers_info): Likewise.
828         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
829         * regcache.c (init_regcache_descr): Likewise.
830         (register_size): Likewise.
831         (register_dump::dump): Likewise.
832         (cooked_read_test): Likewise.
833         (cooked_write_test): Likewise.
834         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
835         (rs6000_gdbarch_init): Likewise.
836         * stabsread.c (stab_reg_to_regnum): Likewise.
837         * stack.c (info_frame_command): Likewise.
838         * target-descriptions.c (tdesc_register_name): Likewise.
839         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
840         * tui/tui-regs.c (tui_show_register_group): Likewise.
841         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
842         (user_reg_map_regnum_to_name): Likewise.
843         (value_of_user_reg): Likewise.
844         (maintenance_print_user_registers): Likewise.
845         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
846         (xtensa_register_name): Likewise.
847         (xtensa_register_type): Likewise.
848         (xtensa_reg_to_regnum): Likewise.
849         (xtensa_pseudo_register_read): Likewise.
850         (xtensa_pseudo_register_write): Likewise.
851
852 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
853
854         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
855         correctly-sized buffer with raw_read.
856         (amd64_pseudo_register_write): Use correctly-sized buffer for
857         raw_read/raw_write.
858
859 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
860
861         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
862         in add_prefix_cmd of set print type.
863
864 2018-10-19  Tom Tromey  <tom@tromey.com>
865
866         PR tui/18388:
867         * NEWS: Mention tabset deprecation.
868         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
869         (update_tab_width): New function.
870         (tui_set_tab_width, tui_show_tab_width): New functions.
871         (tui_set_tab_width_command): Use update_tab_width.
872         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
873         Add new "set tui tab-width" command.
874         * tui/tui-source.c (tui_set_source_content): Update.
875         * tui/tui-disasm.c (tui_set_disassem_content): Update.
876         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
877         Don't declare.
878         (tui_tab_width): Declare.
879         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
880         (tui_set_default_tab_len): Remove.
881
882 2018-10-19  Tom Tromey  <tom@tromey.com>
883
884         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
885         (key_is_backspace, tui_getc): Don't declare.
886         * tui/tui-io.c (key_is_start_sequence): Now static.
887         (key_is_end_sequence, key_is_backspace): Remove.
888         (tui_getc): Now static.
889
890 2018-10-19  Tom Tromey  <tom@tromey.com>
891
892         * symfile.c (reread_symbols): Clear "static_links".
893
894 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
895
896         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
897         define.
898         (aarch64_linux_sigframe_init): Extra boundary checks.
899
900 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
901
902         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
903         the possibly non-existent tdesc type 'vec128', but the type of raw
904         register v16 instead.
905
906 2018-10-19  Gary Benson <gbenson@redhat.com>
907
908         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
909
910 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
911
912         PR cli/23785
913         * cli/cli-dump.c (restore_binary_file): Check if "file" is
914         NULL.
915
916 2018-10-17  Paul Koning  <paul_koning@dell.com>
917
918         * charset.c (convert_between_encodings): Fix unsigned overflow.
919
920 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
921
922         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
923         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
924         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
925         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
926         New functions.
927         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
928         and fbsd_info_proc_mappings_header.
929         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
930         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
931         New.
932
933 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
934
935         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
936         Solaris Maintainer.
937
938 2018-10-15  Tom Tromey  <tom@tromey.com>
939
940         * tui/tui.c (strcat_to_buf): Remove casts.
941         * tui/tui-winsource.c (tui_show_source_line)
942         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
943         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
944         * tui/tui-windata.c (tui_first_data_item_displayed)
945         (tui_delete_data_content_windows, tui_erase_data_content)
946         (tui_display_all_data, tui_display_data_from)
947         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
948         * tui/tui-win.c (tui_set_win_height)
949         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
950         casts.
951         * tui/tui-win.c (tui_resize_all): Remove casts.
952         (tui_scroll_backward_command, tui_set_focus)
953         (tui_set_tab_width_command): Likewise.
954         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
955         * tui/tui-regs.c (tui_show_register_group): Remove cast.
956         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
957         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
958         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
959         Remove casts.
960
961 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
962
963         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
964         AArch64/ARM maintainer.
965
966 2018-10-11  Gary Benson <gbenson@redhat.com>
967
968         * interps.h (interp::m_name): Make private and mutable.
969         * interps.c (interp::~interp): Free m_name.
970
971 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
972             Simon Marchi <simark@simark.ca>
973
974         * README (`configure' options): Add documentation for new
975         "--enable-unit-tests" option.
976         * acinclude.m4: Include "selftest.m4".
977         * configure: Regenerate.
978         * configure.ac: Use "GDB_AC_SELFTEST".
979         * maint.c (maintenance_selftest): Update message informing
980         that selftests have been disabled.
981         (maintenance_info_selftests): Likewise.
982         * selftest.m4: New file.
983
984 2018-10-10  Gary Benson <gbenson@redhat.com>
985
986         * remote.c (remote_target::remote_send_printf): Add
987         missing va_end found by Coverity.
988
989 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
990
991         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
992
993 2018-10-09  Tom Tromey  <tom@tromey.com>
994
995         * configure: Rebuild.
996         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
997         * NEWS: Update --enable-ubsan documentation.
998
999 2018-10-09  Gary Benson <gbenson@redhat.com>
1000
1001         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1002         found by Coverity.
1003
1004 2018-10-08  Tom Tromey  <tom@tromey.com>
1005
1006         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1007         variable.
1008         (riscv_fbsd_init_abi): Likewise.
1009
1010 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1011         * valops.c (value_struct_elt_for_reference): Rename local variable
1012         to work around the shadowing a previous local warning.
1013
1014 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1015
1016         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1017         * NEWS: Mention new FreeBSD/riscv native configuration.
1018         * configure.host: Add riscv*-*-freebsd*.
1019         * configure.nat: Likewise.
1020         * riscv-fbsd-nat.c: New file.
1021
1022 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1023
1024         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1025         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1026         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1027         * NEWS: Mention new FreeBSD/riscv target.
1028         * configure.tgt: Add riscv*-*-freebsd*.
1029         * riscv-fbsd-tdep.c: New file.
1030         * riscv-fbsd-tdep.h: New file.
1031
1032 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1033
1034         * regcache.h (struct regcache_map_entry): Note that this type can
1035         be used with traditional frame caches.
1036         * trad-frame.c (trad_frame_set_reg_regmap): New.
1037         * trad-frame.h (trad_frame_set_reg_regmap): New.
1038
1039 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1040
1041         PR c++/16841
1042         * valops.c (get_virtual_base_offset): New function.
1043         (value_struct_elt_for_reference): Use it to get virtual base offset
1044         and add it in calculating class member address.
1045
1046 2018-10-08   John Darrington <john@darrington.wattle.id.au>
1047
1048     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1049       (check_producer): Check if the producer is codewarrior.
1050       (producer_is_codewarrior): New function.
1051       (lnp_state_machine::record_line): Ignore is_stmt flag for records
1052        produced by codewarrior.
1053       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1054
1055 2018-10-06  Tom Tromey  <tom@tromey.com>
1056
1057         PR python/19399:
1058         * python/py-inferior.c: Add "architecture" entry.
1059         (infpy_architecture): New function.
1060
1061 2018-10-06  Tom Tromey  <tom@tromey.com>
1062
1063         PR python/21765:
1064         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1065         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1066         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1067         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1068
1069 2018-10-06  Tom Tromey  <tom@tromey.com>
1070
1071         PR build/17077:
1072         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1073         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1074         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1075         #include.
1076
1077 2018-10-06  Tom Tromey  <tom@tromey.com>
1078
1079         * python/py-breakpoint.c (bppy_get_location): Handle a
1080         bp_breakpoint without a location.
1081
1082 2018-10-06  Tom Tromey  <tom@tromey.com>
1083
1084         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1085         (_RegEx): Reformat help text.
1086         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1087         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1088         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1089         text.
1090         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1091         (EnableXMethod, DisableXMethod): Remove help indentation.
1092         Capitalize meta-syntactic variables.
1093         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1094         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1095         Capitalize meta-syntactic variables.
1096         * python/lib/gdb/command/explore.py (ExploreCommand)
1097         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1098         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1099         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1100         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1101         Remove help indentation.
1102         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1103         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1104         (DisableFrameFilter, SetFrameFilterPriority)
1105         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1106
1107 2018-10-06  Tom Tromey  <tom@tromey.com>
1108
1109         PR tui/28819:
1110         * tui/tui-io.c (gdb_wgetch): New function.
1111         (tui_mld_getc, tui_getc): Use it.
1112
1113 2018-10-05  Tom Tromey  <tom@tromey.com>
1114
1115         * sol-thread.c (sol_thread_target::wait): Rename inner
1116         "save_ptid".
1117
1118 2018-10-04  Tom Tromey  <tom@tromey.com>
1119
1120         * configure: Rebuild.
1121         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1122
1123 2018-10-04  Tom Tromey  <tom@tromey.com>
1124
1125         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1126         declaration of "block".
1127
1128 2018-10-04  Tom Tromey  <tom@tromey.com>
1129
1130         * common/filestuff.c (fdwalk): Remove inner declaration of
1131         "result".
1132
1133 2018-10-04  Tom Tromey  <tom@tromey.com>
1134
1135         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1136         "structs_addr" and hoist declaration.
1137
1138 2018-10-04  Tom Tromey  <tom@tromey.com>
1139
1140         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1141         variable "size".
1142
1143 2018-10-04  Tom Tromey  <tom@tromey.com>
1144
1145         * mdebugread.c (parse_partial_symbols): Use std::string.
1146
1147 2018-10-04  Tom Tromey  <tom@tromey.com>
1148
1149         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1150         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1151         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1152         header.
1153         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1154         more inner scope.
1155         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1156         * varobj.c (varobj_update): Rename inner "newobj",
1157         "type_changed".
1158         * valprint.c (generic_emit_char): Rename inner "buf".
1159         * valops.c (find_overload_match): Rename inner "temp".
1160         (value_struct_elt_for_reference): Declare "v" in more inner
1161         scope.
1162         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1163         * unittests/array-view-selftests.c (run_tests): Rename inner
1164         "vec".
1165         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1166         header.
1167         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1168         "tsv" in more inner scope.
1169         (print_one_static_tracepoint_marker): Rename inner
1170         "tuple_emitter".
1171         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1172         (tic6x_push_dummy_call): Don't redeclare "addr".
1173         * target-float.c: Declare "dto" lower.
1174         * symtab.c (lookup_local_symbol): Rename inner "sym".
1175         (find_pc_sect_line): Rename inner "pc".
1176         * stack.c (print_frame): Don't redeclare "gdbarch".
1177         (return_command): Rename inner "gdbarch".
1178         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1179         "sp".
1180         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1181         header.
1182         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1183         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1184         scope.
1185         * remote.c (remote_target::update_thread_list): Don't redeclare
1186         "tp".
1187         (remote_target::process_initial_stop_replies): Rename inner
1188         "thread".
1189         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1190         (remote_target::wait_as): Don't redeclare "stop_reply".
1191         (remote_target::get_thread_local_address): Rename inner
1192         "result".
1193         (remote_target::get_tib_address): Likewise.
1194
1195         * regcache.c (cooked_read_test): Rename "regnum".
1196         * record-btrace.c (cmd_record_btrace_start): Rename inner
1197         "exception".
1198         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1199         loop header.
1200         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1201         header.
1202         (ppu2spu_sniffer): Rename inner "buf".
1203         * parse.c (operator_check_standard): Rename inner "type",
1204         "objfile".
1205         * p-valprint.c (pascal_val_print): Introduce new scope for
1206         "low_bound", "high_bound".
1207         * p-exp.y (yylex): Declare "i" in loop header.
1208         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1209         Lower declaration of "s".
1210         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1211         header.
1212         (nios2_push_dummy_call): Rename "len".
1213         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1214         "buf".
1215         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1216         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1217         (linux_xfer_osdata_modules): Likewise.
1218         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1219         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1220         (mips_o64_push_dummy_call): Likewise.
1221         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1222         "op".
1223         * mi/mi-main.c (list_available_thread_groups): Rename inner
1224         "tuple_emitter".
1225         (mi_cmd_data_read_memory): Rename inner "opts".
1226         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1227         "tuple_emitter".
1228         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1229         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1230         more inner scope.
1231         (parse_partial_symbols): Rename inner "pst", "p", "name"
1232         * main.c (captured_main_1): Rename inner "i"s.
1233         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1234         "oso2".
1235         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1236         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1237         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1238         (handle_signal_stop): Rename inner "gdbarch".
1239         (handle_command): Declare "signum" in loop header.
1240         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1241         "status".
1242         (examine_prologue): Rename inner "sol" and "sof".
1243         (ia64_extract_return_value): Rename inner "val".  Declare another
1244         "val" in a more inner scope.
1245         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1246         inner scope.
1247         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1248         "except".
1249         * findvar.c (default_read_var_value): Don't redeclare "addr".
1250         * f-exp.y (yylex): Declare "i" in loop header.
1251         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1252         Rename inner "type", "expect_type".
1253         (evaluate_subexp_for_sizeof): Rename inner "pc".
1254         * elfread.c (elf_symfile_read): Rename inner "abfd".
1255         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1256         "bytes_read".
1257         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1258         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1259         (dwarf_decode_line_header): Rename inner "lh".
1260         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1261         "offset".  Declare "i" in loop header.
1262         (disassemble_dwarf_expression): Rename inner "addr_size".
1263         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1264         inner "result".
1265         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1266         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1267         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1268         "inner_list_emitter".
1269         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1270         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1271         declaration in a block.
1272         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1273         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1274         "obstack_final_size".
1275         * cp-support.c (inspect_type): Declare "i" in loop header.
1276         * compile/compile.c (compile_instance::insert_symbol_error):
1277         Rename inner "e".
1278         * common/agent.c (agent_run_command): Remove inner "ret"
1279         declaration.
1280         * coffread.c (coff_symfile_read): Rename inner "name".
1281         (coff_symfile_read): Rename inner "abfd".
1282         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1283         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1284         "high".
1285         * c-exp.y (lex_one_token): Move "len" declaration lower.
1286         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1287         "gdbarch".
1288         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1289         "b".
1290         (watch_command_1): Declare "mark" later.
1291         (clear_command): Don't shadow "a" or "b".
1292         (delete_command): Rename inner "b".
1293         (delete_trace_command): Likewise.
1294         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1295         "op".
1296         (arm_gdbarch_init): Remove inner "e_flags".
1297         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1298         "offset" in inner blocks.
1299
1300 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1301
1302         * dwarf-index-write.c (file_write): Don't write if the vector is
1303         empty.
1304
1305 2018-10-05  Tom de Vries  <tdevries@suse.de>
1306
1307         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1308         PyArg_ParseTuple call.
1309
1310 2018-10-05  Tom de Vries  <tdevries@suse.de>
1311
1312         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1313         PyArg_ParseTuple call.
1314
1315 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1316
1317         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1318         to avoid exceeding 80 characters per line limit.
1319
1320 2018-10-04  Tom Tromey  <tom@tromey.com>
1321
1322         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1323         (reread_symbols): Update.
1324         * complaints.h (clear_complaints): Remove argument.
1325         * complaints.c (enum complaint_series): Remove.
1326         (series): Remove global.
1327         (complaint_internal): Update.
1328         (clear_complaints): Remove argument.
1329
1330 2018-10-04  Tom Tromey  <tom@tromey.com>
1331
1332         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1333         debugging symbols" message if there is a separate debug objfile.
1334
1335 2018-10-04  Tom Tromey  <tom@tromey.com>
1336
1337         PR cli/19551:
1338         * symfile.c (symbol_file_add_with_addrs): Update output.
1339         * psymtab.c (require_partial_symbols): Update output.
1340
1341 2018-10-04  Tom Tromey  <tom@tromey.com>
1342
1343         PR cli/22234:
1344         * complaints.c: Emit \n.
1345
1346 2018-10-04  Tom Tromey  <tom@tromey.com>
1347
1348         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1349         (separate_debug_file_exists, find_separate_debug_file)
1350         (add_symbol_file_command, reread_symbols, allocate_symtab)
1351         (allocate_compunit_symtab): Use filtered printing, not
1352         unfiltered.
1353         * psymtab.c (require_partial_symbols, dump_psymtab)
1354         (allocate_psymtab): Use filtered printing, not unfiltered.
1355
1356 2018-10-04  Tom Tromey  <tom@tromey.com>
1357
1358         * complaints.c (complaint_internal): Correctly check complaint
1359         count.
1360
1361 2018-10-04  Tom Tromey  <tom@tromey.com>
1362
1363         * complaints.h (struct complaints): Remove declaration.
1364         * complaints.c (clear_complaints): Remove an unused variable.
1365
1366 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1367
1368         * MAINTAINERS (Write After Approval): Add self.
1369
1370 2018-10-03  Tom Tromey  <tom@tromey.com>
1371
1372         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1373         "buffer_contents".
1374         * coffread.c (coff_symtab_read): Initialize "newobj".
1375
1376 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1377
1378         * dwarf2read.c (read_func_scope): Remove struct keyword in
1379         range-based for.
1380
1381 2018-10-03  Tom Tromey  <tom@tromey.com>
1382
1383         * README: Mention --enable-ubsan.
1384         * NEWS: Mention --enable-ubsan.
1385         * acinclude.m4: Include sanitize.m4.
1386         * configure: Rebuild.
1387         * configure.ac: Call AM_GDB_UBSAN.
1388         * sanitize.m4: New file.
1389
1390 2018-10-03  Tom Tromey  <tom@tromey.com>
1391
1392         * expression.h (enum exp_opcode): Use uint8_t as base type.
1393         * expprint.c (op_name): Handle invalid opcodes.
1394
1395 2018-10-03  Tom Tromey  <tom@tromey.com>
1396
1397         * parse.c (prefixify_expression): Add assert.
1398         (parse_exp_in_context_1): Throw exception if the expression is
1399         empty.
1400
1401 2018-10-03  Tom Tromey  <tom@tromey.com>
1402
1403         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1404
1405 2018-10-03  Tom Tromey  <tom@tromey.com>
1406
1407         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1408
1409 2018-10-03  Tom Tromey  <tom@tromey.com>
1410
1411         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1412         unsigned.
1413
1414 2018-10-03  Tom Tromey  <tom@tromey.com>
1415
1416         * findvar.c (extract_integer): Do work in an unsigned type.
1417
1418 2018-10-03  Tom Tromey  <tom@tromey.com>
1419
1420         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1421         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1422         base type.
1423         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1424         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1425         type.
1426         * c-lang.h (enum c_string_type_values): Use unsigned as base
1427         type.
1428         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1429
1430 2018-10-03  Tom Tromey  <tom@tromey.com>
1431
1432         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1433         <~dwarf2_frame_state_reg_info>: Update.
1434         <dwarf2_frame_state_reg_info>: Update.
1435         <alloc_regs>: Add assertion.  Update.
1436         <reg>: Now a std::vector.
1437         <num_regs>: Remove.
1438         <swap>: Update.
1439         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1440         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1441
1442 2018-10-03  Tom Tromey  <tom@tromey.com>
1443
1444         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1445
1446 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1447
1448         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1449
1450 2018-10-02  Tom Tromey  <tom@tromey.com>
1451
1452         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1453
1454 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1455
1456         * NEWS: Mention changed commands.
1457         * ser-uds.c: New file.
1458         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1459         * configure: Regenerate.
1460         * Makefile.in: Add new file.
1461         * serial.c (serial_open): Check if filename is a socket
1462           and lookup the appropriate interface accordingly.
1463
1464 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1465
1466         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1467         define.
1468         (AARCH64_EXTRA_MAGIC): Likewise.
1469         (AARCH64_FPSIMD_MAGIC): Likewise.
1470         (AARCH64_SVE_MAGIC): Likewise.
1471         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1472         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1473         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1474         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1475         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1476         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1477         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1478         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1479         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1480         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1481         (read_aarch64_ctx): Add function.
1482         (aarch64_linux_sigframe_init): Detect FP registers.
1483
1484 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1485
1486         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1487         (AARCH64_D0_REGNUM): Likewise.
1488         (AARCH64_S0_REGNUM): Likewise.
1489         (AARCH64_H0_REGNUM): Likewise.
1490         (AARCH64_B0_REGNUM): Likewise.
1491         (AARCH64_SVE_V0_REGNUM): Likewise.
1492         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1493         (AARCH64_D0_REGNUM): Likewise.
1494         (AARCH64_S0_REGNUM): Likewise.
1495         (AARCH64_H0_REGNUM): Likewise.
1496         (AARCH64_B0_REGNUM): Likewise.
1497         (AARCH64_SVE_V0_REGNUM): Likewise.
1498
1499 2018-10-01  Gary Benson <gbenson@redhat.com>
1500
1501         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1502         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1503         prfpregset_t instead of gdb_prfpregset_t.
1504         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1505         * configure, config.in: Rebuild.
1506
1507 2018-10-01  Gary Benson <gbenson@redhat.com>
1508
1509         * common/gdb_proc_service.h: New file, factored out from...
1510         * gdb_proc_service.h: Moved common code to the above file.
1511         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1512
1513 2018-10-01  Gary Benson <gbenson@redhat.com>
1514
1515         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1516         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1517
1518 2018-10-01  Gary Benson <gbenson@redhat.com>
1519
1520         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1521         (AC_CHECK_HEADERS): Check for linux/elf.h.
1522         * configure, config.in: Rebuild.
1523         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1524         doesn't define elf_fpregset_t.
1525
1526 2018-10-01  Gary Benson <gbenson@redhat.com>
1527
1528         * gdb_proc_service.h: Whitespace change.
1529
1530 2018-10-01  Tom Tromey  <tom@tromey.com>
1531
1532         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1533         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1534         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1535
1536 2018-10-01  Tom Tromey  <tom@tromey.com>
1537
1538         * README: Minor change.
1539
1540 2018-09-30  Pedro Alves  <palves@redhat.com>
1541
1542         * darwin-nat-info.c (darwin_debug_regions_recurse)
1543         (info_mach_exceptions_command): Remove unused local variables.
1544         * darwin-nat.c (darwin_decode_notify_message)
1545         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1546         (darwin_stop_inferior, darwin_setup_exceptions)
1547         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1548         (darwin_nat_target::attach, darwin_nat_target::detach)
1549         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1550         local variables.
1551         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1552         variables.
1553
1554 2018-09-29  Tom Tromey  <tom@tromey.com>
1555
1556         * README: Remove some leftover text.
1557
1558 2018-09-29  Tom Tromey  <tom@tromey.com>
1559
1560         * PROBLEMS: Rewrite.
1561         * README: Update.
1562
1563 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1564
1565         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1566         case with explicit breakpoint kind.
1567         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1568         'additional_info' and related logic.
1569         (riscv_debug_breakpoints): New variable.
1570         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1571         instruction to determine the breakpoint kind.
1572         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1573         flag.  Update description of 'set/show riscv
1574         use-compressed-breakpoints' flag.
1575
1576 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1577
1578         (NEWS): Mention changes to frame related commands.
1579         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1580         (add_prefix_cmd_suppress_notification): New function.
1581         (add_com_suppress_notification): Call
1582         add_cmd_suppress_notification.
1583         * command.h (add_cmd_suppress_notification): Declare.
1584         (add_prefix_cmd_suppress_notification): Declare.
1585         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1586         (parse_frame_specification): Moved from stack.c, with
1587         simplification to handle a single argument.
1588         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1589         switch to the selected frame.  Add a header comment.
1590         * stack.c: Remove 'safe-ctype.h' include.
1591         (find_frame_for_function): Add declaration.
1592         (find_frame_for_address): New function.
1593         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1594         (frame_selection_by_function_completer): New function.
1595         (info_frame_command): Rename to...
1596         (info_frame_command_core): ...this, and update parameter types.
1597         (select_frame_command): Rename to...
1598         (select_frame_command_core): ...this, and update parameter types.
1599         (frame_command): Rename to...
1600         (frame_command_core): ...this, and update parameter types.
1601         (class frame_command_helper): New class to wrap implementations of
1602         frame related sub-commands.
1603         (frame_apply_cmd_list): New static global.
1604         (frame_cmd_list): Make static.
1605         (select_frame_cmd_list): New global for sub-commands.
1606         (info_frame_cmd_list): New global for sub-commands.
1607         (_initialize_stack): Register sub-commands for 'frame',
1608         'select-frame', and 'info frame'.  Update 'frame apply' commands
1609         to use frame_apply_cmd_list.  Move function local static
1610         frame_apply_list to file static frame_apply_cmd_list for
1611         consistency.
1612         * stack.h (select_frame_command): Delete declarationn.
1613         (select_frame_for_mi): Declare new function.
1614
1615 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1616
1617         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1618         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1619         and NOP.
1620
1621 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1622
1623         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1624
1625 2018-09-26  Tom Tromey  <tom@tromey.com>
1626
1627         * valops.c (auto_abandon): Remove dead code.
1628
1629 2018-09-26  Tom Tromey  <tom@tromey.com>
1630
1631         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1632
1633 2018-09-24  Tom Tromey  <tom@tromey.com>
1634
1635         * common/pathstuff.c (get_standard_cache_dir): Make
1636         "xdg_cache_home" and "home" const.
1637         * top.c (init_history): Make "tmpenv" const.
1638         * main.c (get_init_files): Make "homedir" const.
1639
1640 2018-09-23  Tom Tromey  <tom@tromey.com>
1641
1642         PR python/18852:
1643         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1644
1645 2018-09-23  Tom Tromey  <tom@tromey.com>
1646
1647         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1648         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1649         * python/python-internal.h (gdbpy_handle_exception): Declare.
1650         * python/py-utils.c (gdbpy_handle_exception): New function.
1651
1652 2018-09-23  Tom Tromey  <tom@tromey.com>
1653
1654         PR python/17284:
1655         * python/py-type.c (typy_template_argument): Check for negative
1656         argument number.
1657
1658 2018-09-23  Tom Tromey  <tom@tromey.com>
1659
1660         PR python/14062:
1661         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1662
1663 2018-09-23  Tom Tromey  <tom@tromey.com>
1664
1665         PR python/18170:
1666         * python/py-value.c (valpy_int): Allow conversion from pointer
1667         type.
1668
1669 2018-09-23  Tom Tromey  <tom@tromey.com>
1670
1671         PR python/20126:
1672         * python/py-value.c (valpy_int): Respect type sign.
1673
1674 2018-09-23  Tom Tromey  <tom@tromey.com>
1675
1676         PR python/18352;
1677         * python/py-value.c (valpy_float): Allow conversions from int or
1678         char.
1679         (valpy_int, valpy_long): Allow conversions from float.
1680
1681 2018-09-23  Tom Tromey  <tom@tromey.com>
1682
1683         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1684         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1685
1686 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1687
1688         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1689         __sighndlr.
1690         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1691
1692 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1693
1694         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1695         target_terminal::ours().
1696
1697 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1698
1699         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1700         of vl to ULONGEST.
1701
1702 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1703
1704         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1705         redundant condition.
1706
1707 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1708
1709         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1710
1711         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1712         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1713         * sol-thread.c (ps_pdmodel): Don't guard definition.
1714
1715         * procfs.c: Fix formatting.
1716
1717         * procfs.c (sysset_t_alloc): Remove.
1718         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1719         (procfs_debug_inferior): Likewise.
1720         (procfs_set_exec_trap): Likewise.
1721         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1722         (proc_set_traced_sysexit): Likewise.
1723
1724         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1725         (dead_procinfo): Likewise.
1726         (proc_warn): Likewise.
1727         (proc_error): Likewise.
1728         (proc_get_LDT_entry): Likewise.
1729         (do_attach): Likewise.
1730         (procfs_target::pid_to_str): Likewise.
1731         (iterate_over_mappings): Likewise.
1732
1733         * procfs.c (create_procinfo): Fix ARI warning.
1734         (proc_get_status): Likewise.
1735         (proc_stop_process): Likewise.
1736         (proc_run_process): Likewise.
1737         (proc_kill): Likewise.
1738         (proc_get_LDT_entry): Likewise.
1739         (procfs_find_LDT_entry): Likewise.
1740         (proc_update_threads): Likewise.
1741         (proc_iterate_over_threads): Likewise.
1742         (do_attach): Likewise.
1743         (procfs_xfer_memory): Likewise.
1744         (invalidate_cache): Likewise.
1745         (procfs_target::resume): Likewise.
1746         (procfs_init_inferior): Likewise.
1747         (procfs_set_exec_trap): Likewise.
1748         (procfs_target::thread_alive): Likewise.
1749         (procfs_target::pid_to_exec_file): Likewise.
1750         (iterate_over_mappings): Likewise.
1751         (procfs_target::make_corefile_notes): Likewise.
1752         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1753
1754         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1755         (procfs_find_LDT_entry): Likewise.
1756         * sol-thread.c (ps_lgetLDT): Likewise.
1757
1758 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1759
1760         PR tdep/17903
1761         * procfs.c (procfs_target): Declare pid_to_exec_file.
1762         (procfs_target::pid_to_exec_file): New.
1763
1764 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1765
1766         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1767         renaming.
1768         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1769         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1770
1771 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1772
1773         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1774         (supply_fpregset, fill_fpregset): Move ...
1775         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1776         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1777         Remove references to ioctl-based procfs.
1778         Include <sys/reg.h>.
1779         Remove PR_MODEL_NATIVE guards.
1780         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1781         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1782
1783 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1784
1785         PR gdb/20981:
1786         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1787         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1788         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1789
1790 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1791
1792         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1793         (fbsd_print_sockaddr_in6): Likewise.
1794
1795 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1796             Chris January  <chris.january@arm.com>
1797
1798         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1799         (evaluate_subexp_standard): Return a dummy type when
1800         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1801         OP_F77_UNDETERMINED_ARGLIST case.
1802         * expression.h (enum noside): Update comment.
1803
1804 2018-09-19  George Vasick <george.vasick@oracle.com>
1805
1806         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1807
1808 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1809             April Chin <april.chin@oracle.com>
1810             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1811
1812         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1813         uint_t lwpid_t.
1814         (create_procinfo): Print pids in /proc without leading zeros.
1815
1816 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1817
1818         * nios2-tdep.c (nios2_gcc_target_options): New.
1819         (nios2_gdb_arch_init): Install new hook.
1820
1821 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1822
1823         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1824         New file.
1825         * update-gnulib.sh: Apply patch.
1826         * configure: Re-generate.
1827
1828 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1829
1830         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1831         description.  Make "info proc" command descriptions more
1832         consistent.
1833
1834 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1835
1836         * NEWS: Mention 'info proc files' command.
1837
1838 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1839
1840         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1841         descriptors for IP_FILES and IP_ALL.
1842
1843 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1844
1845         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1846         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1847         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1848         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1849         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1850         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1851         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1852         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1853         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1854         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1855         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1856         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1857         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1858         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1859         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1860         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1861         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1862         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1863         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1864         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1865         (struct fbsd_sockaddr_un): New types.
1866         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1867         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1868         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1869         (fbsd_core_info_proc_files): New functions.
1870         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1871         IP_ALL.
1872         * fbsd-tdep.h (fbsd_info_proc_files_header)
1873         (fbsd_info_proc_files_entry): New.
1874
1875 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1876
1877         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1878         * infcmd.c (info_proc_cmd_files): New function.
1879         (_initialize_infcmd): Register 'info proc files' command.
1880
1881 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1882
1883         * gnulib/aclocal-m4-deps.mk: Re-generate.
1884         * gnulib/aclocal.m4: Re-generate.
1885         * gnulib/config.in: Re-generate.
1886         * gnulib/configure: Re-generate.
1887         * gnulib/import/Makefile.am: Re-generate.
1888         * gnulib/import/Makefile.in: Re-generate.
1889         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1890         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1891         * gnulib/import/arpa_inet.in.h: New file.
1892         * gnulib/import/inet_ntop.c: New file.
1893         * gnulib/import/m4/arpa_inet_h.m4: New file.
1894         * gnulib/import/m4/inet_ntop.m4: New file.
1895         * gnulib/import/m4/netinet_in_h.m4: New file.
1896         * gnulib/import/m4/socklen.m4: New file.
1897         * gnulib/import/m4/sockpfaf.m4: New file.
1898         * gnulib/import/m4/stdalign.m4: New file.
1899         * gnulib/import/m4/sys_uio_h.m4: New file.
1900         * gnulib/import/netinet_in.in.h: New file.
1901         * gnulib/import/stdalign.in.h: New file.
1902         * gnulib/import/sys_socket.c: New file.
1903         * gnulib/import/sys_socket.in.h: New file.
1904         * gnulib/import/sys_uio.in.h: New file.
1905         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1906         module.
1907
1908 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1909
1910         * gnulib/aclocal-m4-deps.mk: New file.
1911         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1912         deterministically.
1913
1914 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1915
1916         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1917         KVE_PATH.
1918
1919 2018-09-18  Tom Tromey  <tom@tromey.com>
1920
1921         * compile/compile-object-load.c (struct
1922         link_hash_table_cleanup_data): Add constructor and destructor.
1923         Use DISABLE_COPY_AND_ASSIGN.
1924         (~link_hash_table_cleanup_data): Rename from
1925         link_hash_table_free.  Now a destructor.
1926         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1927
1928 2018-09-18  Tom Tromey  <tom@tromey.com>
1929
1930         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1931         * compile/compile-object-load.c (struct munmap_list): Move to
1932         header file.
1933         (munmap_list::add): Rename from munmap_list_add; rewrite.
1934         (munmap_list::~munmap_list): Rename from munmap_list_free.
1935         (munmap_listp_free_cleanup): Remove.
1936         (compile_object_load): Update.
1937         * compile/compile-object-load.h (struct munmap_list): Move from
1938         compile-object-load.c.  Rewrite.
1939
1940 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1941
1942         * aarch64-tdep.c (pass_in_v): Use register size.
1943         (aarch64_extract_return_value): Likewise.
1944         (aarch64_store_return_value): Likewise.
1945
1946 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1947
1948         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1949         rlim_t.
1950
1951 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1952
1953         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1954         Fix short help line.
1955
1956 2018-09-17  Tom Tromey  <tom@tromey.com>
1957
1958         PR python/20445:
1959         * configure: Rebuild.
1960         * configure.ac: Conditionally use -DNDEBUG for Python.
1961
1962 2018-09-17  Tom Tromey  <tom@tromey.com>
1963
1964         * configure: Rebuild.
1965         * configure.ac: Use gmp as a library dependency when checking for
1966         mpfr.
1967
1968 2018-09-17  Pedro Alves  <palves@redhat.com>
1969
1970         * python/py-inferior.c (find_inferior_object): Delete.
1971
1972 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1973
1974         * compile/compile-cplus-types.c
1975         (compile_cplus_instance::enter_scope): Don't use new_scope after
1976         std::move.
1977
1978 2018-09-17  Tom Tromey  <tom@tromey.com>
1979
1980         * common/pathstuff.c (get_standard_cache_dir): Use
1981         ~/Library/Caches on macOS.
1982         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1983
1984 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1985
1986         PR python/23669
1987         * breakpoint.c (commands_cmd_element): New.
1988         (_initialize_breakpoint): Assign commands_cmd_element.
1989         * breakpoint.h (commands_cmd_element): New.
1990         * cli/cli-script.c (while_cmd_element, if_command,
1991         define_cmd_element): New.
1992         (command_name_equals): Remove.
1993         (process_next_line): Compare commands by pointer, not by name.
1994         (_initialize_cli_script): Assign the various cmd_list_element
1995         variables.
1996         * compile/compile.c (compile_cmd_element): New.
1997         (_initialize_compile): Assign compile_cmd_element.
1998         * compile/compile.h (compile_cmd_element): New.
1999         * guile/guile.c (guile_cmd_element): New.
2000         (install_gdb_commands): Assign guile_cmd_element.
2001         * guile/guile.h (guile_cmd_element): New.
2002         * python/python.c (python_cmd_element): New.
2003         (_initialize_python): Assign python_cmd_element.
2004         * python/python.h (python_cmd_element): New.
2005         * tracepoint.c (while_stepping_cmd_element): New.
2006         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2007         * tracepoint.h (while_stepping_cmd_element): New.
2008
2009 2018-09-17  Tom Tromey  <tom@tromey.com>
2010
2011         * infrun.c (save_infcall_suspend_state): Return
2012         infcall_suspend_state_up.
2013         (save_infcall_control_state): Return infcall_control_state_up.
2014         * inferior.h (save_infcall_suspend_state)
2015         (save_infcall_control_state): Declare later.  Return unique
2016         pointers.
2017
2018 2018-09-17  Tom Tromey  <tom@tromey.com>
2019
2020         * infrun.c (struct stop_context): Declare constructor,
2021         destructor, "changed" method.
2022         (stop_context::stop_context): Rename from save_stop_context.
2023         (stop_context::~stop_context): Rename from
2024         release_stop_context_cleanup.
2025         (normal_stop): Update.
2026         (stop_context::changed): Rename from stop_context_changed.  Return
2027         bool.
2028
2029 2018-09-17  Tom Tromey  <tom@tromey.com>
2030
2031         * inferior.h (struct infcall_suspend_state_deleter): New.
2032         (infcall_suspend_state_up): New typedef.
2033         (struct infcall_control_state_deleter): New.
2034         (infcall_control_state_up): New typedef.
2035         (make_cleanup_restore_infcall_suspend_state)
2036         (make_cleanup_restore_infcall_control_state): Don't declare.
2037         * infcall.c (call_function_by_hand_dummy): Update.
2038         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2039         (make_cleanup_restore_infcall_suspend_state): Remove.
2040         (do_restore_infcall_control_state_cleanup)
2041         (make_cleanup_restore_infcall_control_state): Remove.
2042
2043 2018-09-17  Tom Tromey  <tom@tromey.com>
2044
2045         * gdbthread.h (struct thread_control_state): Add initializer.
2046         (class thread_info) <control>: Remove initializer.
2047         * inferior.h (struct inferior_control_state): Add initializer.
2048         (class inferior) <control>: Remove initializer.
2049         (exit_inferior_1): Update.
2050         * infrun.c (struct infcall_control_state): Add constructors.
2051         (save_infcall_control_state): Use new.
2052         (restore_infcall_control_state, discard_infcall_control_state):
2053         Use delete.
2054
2055 2018-09-17  Tom Tromey  <tom@tromey.com>
2056
2057         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2058         unique_ptr.
2059         <siginfo_data>: Now a unique_xmalloc_ptr.
2060         (save_infcall_suspend_state, restore_infcall_suspend_state)
2061         (discard_infcall_suspend_state)
2062         (get_infcall_suspend_state_regcache): Update.
2063
2064 2018-09-17  Tom Tromey  <tom@tromey.com>
2065
2066         * gdbthread.h (struct thread_suspend_state): Add initializers.
2067         (class thread_info) <suspend>: Remove initializer.
2068         * infrun.c (struct infcall_suspend_state): Add initializers.
2069         (save_infcall_suspend_state): Use new.
2070         (discard_infcall_suspend_state): Use delete.
2071
2072 2018-09-16  Tom Tromey  <tom@tromey.com>
2073
2074         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2075         Remove.
2076         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2077         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2078         (py_varobj_iter_new): Likewise.
2079         (py_varobj_get_iterator): Use gdbpy_ref.
2080
2081 2018-09-16  Tom Tromey  <tom@tromey.com>
2082
2083         * python/py-threadevent.c (py_get_event_thread): Simplify.
2084         * python/py-inferior.c (infpy_thread_from_thread_handle):
2085         Return immediately after calling thread_to_thread_object.  Use
2086         Py_RETURN_NONE.
2087         (thread_to_thread_object): Set the exception on a NULL return.
2088
2089 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2090
2091         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2092
2093 2018-09-16  Tom Tromey  <tom@tromey.com>
2094
2095         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2096         Remove.
2097
2098 2018-09-16  Tom Tromey  <tom@tromey.com>
2099
2100         * python/python-internal.h (thread_to_thread_object): Change
2101         return type.
2102         * python/py-inferior.c (thread_to_thread_object): Return a new
2103         reference.
2104         (infpy_thread_from_thread_handle): Update.
2105         * python/py-infthread.c (gdbpy_selected_thread): Update.
2106         * python/py-stopevent.c (create_stop_event_object): Update.
2107         * python/py-threadevent.c (py_get_event_thread): Return a new
2108         reference.
2109         (py_get_event_thread): Update.
2110         * python/py-event.h (py_get_event_thread): Change return type.
2111         * python/py-continueevent.c (create_continue_event_object):
2112         Update.
2113
2114 2018-09-16  Tom Tromey  <tom@tromey.com>
2115
2116         * python/py-progspace.c (pspy_get_objfiles): Update.
2117         * python/python-internal.h (objfile_to_objfile_object): Change
2118         return type.
2119         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2120         Update.
2121         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2122         Update.
2123         * python/python.c (gdbpy_get_current_objfile): Update.
2124         (gdbpy_objfiles): Update.
2125         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2126         Update.
2127         (objfile_to_objfile_object): Return a new reference.
2128         * python/py-symtab.c (stpy_get_objfile): Update.
2129         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2130         Update.
2131
2132 2018-09-16  Tom Tromey  <tom@tromey.com>
2133
2134         * python/py-inferior.c (infpy_get_progspace): Update.
2135         * python/python-internal.h (pspace_to_pspace_object): Change
2136         return type.
2137         * python/py-newobjfileevent.c
2138         (create_clear_objfiles_event_object): Update.
2139         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2140         Update.
2141         * python/python.c (gdbpy_get_current_progspace): Update.
2142         (gdbpy_progspaces): Update.
2143         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2144         reference.
2145         * python/py-objfile.c (objfpy_get_progspace): Update.
2146         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2147         Update.
2148
2149 2018-09-16  Tom Tromey  <tom@tromey.com>
2150
2151         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2152         (solib_name, block_for_pc, find_pc_line): New functions.
2153         (execute_unwinders): Update.
2154         * python/py-block.c (gdbpy_block_for_pc): Remove.
2155         * python/py-inferior.c (infpy_get_progspace): New function.
2156         (inferior_object_getset) <progspace>: Add.
2157         * python/py-progspace.c (pspy_objfiles): Rewrite.
2158         (pspy_solib_name, pspy_block_for_pc)
2159         (pspy_find_pc_line, pspy_is_valid): New functions.
2160         (progspace_object_methods): Add entries for solib_name,
2161         block_for_pc, find_pc_line, is_valid.
2162         * python/python-internal.h (gdbpy_block_for_pc)
2163         (build_objfiles_list): Don't declare.
2164         * python/python.c: Don't include solib.h.
2165         (gdbpy_solib_name, gdbpy_find_pc_line)
2166         (gdbpy_get_current_progspace, build_objfiles_list)
2167         (gdbpy_objfiles): Remove.
2168         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2169         solib_name, find_pc_line>: Remove entries.
2170
2171 2018-09-16  Tom Tromey  <tom@tromey.com>
2172
2173         * top.c (new_ui_command): Use GNU style for metasyntactic
2174         variables.
2175         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2176         variables.
2177         * maint.c (maintenance_translate_address): Remove "<>" around
2178         text.
2179         * interps.c (interpreter_exec_cmd): Use GNU style for
2180         metasyntactic variables.
2181         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2182         metasyntactic variables.
2183         * tracepoint.c (tfind_range_command): Use GNU style for
2184         metasyntactic variables.
2185         (tfind_outside_command): Likewise.
2186         (_initialize_tracepoint): Likewise.
2187         * remote.c (extended_remote_target::create_inferior): Use GNU
2188         style for metasyntactic variables.
2189         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2190         metasyntactic variables.
2191         (adi_assign_command): Likewise.
2192
2193 2018-09-16  Tom Tromey  <tom@tromey.com>
2194
2195         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2196         metasyntactic variables.  Print message if no disassembler options
2197         are available.
2198
2199 2018-09-15  Tom Tromey  <tom@tromey.com>
2200
2201         * infcmd.c (get_inferior_args): Return const char *.
2202         * inferior.h (get_inferior_args): Return type now const.
2203         * linux-tdep.c (linux_fill_prpsinfo): Update.
2204         * procfs.c (procfs_target::make_corefile_notes): Update.
2205
2206 2018-09-07  Tom Tromey  <tom@tromey.com>
2207
2208         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2209         inside the TRY.
2210
2211 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2212
2213         * nios2-tdep.c (nios2_type_align): New.
2214         (nios2_gdb_arch_init): Install type_align hook.
2215
2216 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2217
2218         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2219         type that is neither object file owned, nor gdbarch owned.
2220         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2221         gdbarch is non-NULL.
2222         (alloc_type_instance): Allocate non-objfile owned types on the
2223         gdbarch obstack.
2224         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2225         using TYPE_ALLOC to ensure memory is allocated on the correct
2226         obstack.
2227         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2228         obstack, or the gdbarch obstack.
2229         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2230
2231 2018-09-14  Tom Tromey  <tom@tromey.com>
2232
2233         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2234         block.
2235
2236 2018-09-14  Tom Tromey  <tom@tromey.com>
2237
2238         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2239
2240 2018-09-13  Tom Tromey  <tom@tromey.com>
2241
2242         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2243         static.
2244
2245 2018-09-13  Tom Tromey  <tom@tromey.com>
2246
2247         * exec.c (try_open_exec_file): Use std::string.
2248
2249 2018-09-13  Tom Tromey  <tom@tromey.com>
2250
2251         * utils.h (gdb_bfd_errmsg): Return std::string.
2252         * exec.c (exec_file_attach): Update.
2253         * compile/compile-object-load.c (compile_object_load): Update.
2254         * utils.c (gdb_bfd_errmsg): Return std::string.
2255
2256 2018-09-13  Tom Tromey  <tom@tromey.com>
2257
2258         * procfs.c (struct procinfo_deleter): New.
2259         (procinfo_up): New typedef.
2260         (do_destroy_procinfo_cleanup): Remove.
2261         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2262
2263 2018-09-13  Tom Tromey  <tom@tromey.com>
2264
2265         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2266
2267 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2268 2018-09-13  Tom Tromey  <tom@tromey.com>
2269
2270         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2271         (pspy_get_objfiles): New function.
2272         (progspace_object_methods): New.
2273         (pspace_object_type): Add tp_methods callback.
2274         * python/python-internal.h (build_objfiles_list): New
2275         declaration.
2276         * python/python.c (build_objfiles_list): New function.
2277         (gdbpy_objfiles): Implement using build_objfiles_list.
2278         * NEWS: Mention the Progspace.objfiles method.
2279
2280 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2281
2282         * python/py-inferior.c (infpy_get_progspace): New function.
2283         (inferior_object_getset): Add progspace property.
2284         * NEWS: Mention the new property.
2285
2286 2018-09-13  Tom Tromey  <tom@tromey.com>
2287
2288         PR rust/23650:
2289         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2290
2291 2018-09-13  Tom Tromey  <tom@tromey.com>
2292
2293         PR rust/23626:
2294         * rust-lang.c (rust_enum_variant): Now static.
2295         (rust_empty_enum_p): New function.
2296         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2297         Handle empty enum.
2298
2299 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2300
2301         * python/py-inferior.c (infpy_repr): New.
2302         (inferior_object_type): Register infpy_repr.
2303         * python/py-objfile.c (objfpy_repr): New.
2304         (objfile_object_type): Register objfpy_repr.
2305
2306 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2307
2308         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2309
2310 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2311
2312         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2313         typo.
2314
2315 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2316
2317         * common/common-utils.c: Don't include '<sys/stat.h>'.
2318         (is_regular_file): Move to...
2319         * common/filestuff.c (is_regular_file): ... here.
2320         * common/common-utils.h (is_regular_file): Move to...
2321         * common/filestuff.h (is_regular_file): ... here.
2322
2323 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2324
2325         * skip.c (debug_skip): New variable.
2326         (skiplist_entry::do_skip_file_p): Add debug output.
2327         (skiplist_entry::do_skip_gfile_p): Likewise.
2328         (skiplist_entry::skip_function_p): Likewise.
2329         (_initialize_step_skip): Create debug command.
2330         * NEWS: Mention set/show debug skip.
2331
2332 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2333
2334         * darwin-nat.c (should_disable_startup_with_shell):
2335         New function.
2336         (darwin_nat_target::create_inferior): Add call.
2337
2338 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2339
2340         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2341         inf_port, msg_state>: Initialize.
2342         (struct darwin_thread_info) <signaled, single_step>: Change
2343         type and initialize.
2344         (struct darwin_thread_info) <event>: Initialize.
2345
2346 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2347
2348         PR gdb/23555
2349         PR gdb/23558
2350         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2351         guesses.
2352
2353 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2354
2355         Revert:
2356         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2357
2358         PR gdb/23555
2359         PR gdb/23558
2360         * gnulib/aclocal.m4: Regenerate.
2361         * gnulib/config.in: Regenerate.
2362         * gnulib/configure: Regenerate.
2363         * gnulib/import/Makefile.am: Update.
2364         * gnulib/import/Makefile.in: Update.
2365         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2366         * gnulib/import/_Noreturn.h: ... this.
2367         * gnulib/import/alloca.in.h: Update.
2368         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2369         * gnulib/import/arg-nonnull.h: ... this.
2370         * gnulib/import/assure.h: Update.
2371         * gnulib/import/at-func.c: Update.
2372         * gnulib/import/basename-lgpl.c: Update.
2373         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2374         * gnulib/import/c++defs.h: ... this.
2375         * gnulib/import/canonicalize-lgpl.c: Update.
2376         * gnulib/import/cdefs.h: Update.
2377         * gnulib/import/chdir-long.c: Update.
2378         * gnulib/import/chdir-long.h: Update.
2379         * gnulib/import/cloexec.c: Update.
2380         * gnulib/import/cloexec.h: Update.
2381         * gnulib/import/close.c: Update.
2382         * gnulib/import/closedir.c: Update.
2383         * gnulib/import/config.charset: Update.
2384         * gnulib/import/dirent-private.h: Update.
2385         * gnulib/import/dirent.in.h: Update.
2386         * gnulib/import/dirfd.c: Update.
2387         * gnulib/import/dirname-lgpl.c: Update.
2388         * gnulib/import/dirname.h: Update.
2389         * gnulib/import/dosname.h: Update.
2390         * gnulib/import/dup-safer-flag.c: Update.
2391         * gnulib/import/dup-safer.c: Update.
2392         * gnulib/import/dup.c: Update.
2393         * gnulib/import/dup2.c: Update.
2394         * gnulib/import/errno.in.h: Update.
2395         * gnulib/import/error.c: Update.
2396         * gnulib/import/error.h: Update.
2397         * gnulib/import/exitfail.c: Update.
2398         * gnulib/import/exitfail.h: Update.
2399         * gnulib/import/extra/update-copyright: Update.
2400         * gnulib/import/fchdir.c: Update.
2401         * gnulib/import/fcntl.c: Update.
2402         * gnulib/import/fcntl.in.h: Update.
2403         * gnulib/import/fd-hook.c: Update.
2404         * gnulib/import/fd-hook.h: Update.
2405         * gnulib/import/fd-safer-flag.c: Update.
2406         * gnulib/import/fd-safer.c: Update.
2407         * gnulib/import/fdopendir.c: Update.
2408         * gnulib/import/filename.h: Update.
2409         * gnulib/import/filenamecat-lgpl.c: Update.
2410         * gnulib/import/filenamecat.h: Update.
2411         * gnulib/import/flexmember.h: Update.
2412         * gnulib/import/float+.h: Update.
2413         * gnulib/import/float.c: Update.
2414         * gnulib/import/float.in.h: Update.
2415         * gnulib/import/fnmatch.c: Update.
2416         * gnulib/import/fnmatch.in.h: Update.
2417         * gnulib/import/fnmatch_loop.c: Update.
2418         * gnulib/import/fpucw.h: Update.
2419         * gnulib/import/frexp.c: Update.
2420         * gnulib/import/frexpl.c: Update.
2421         * gnulib/import/fstat.c: Update.
2422         * gnulib/import/fstatat.c: Update.
2423         * gnulib/import/getcwd-lgpl.c: Update.
2424         * gnulib/import/getcwd.c: Update.
2425         * gnulib/import/getdtablesize.c: Update.
2426         * gnulib/import/getlogin_r.c: Update.
2427         * gnulib/import/getprogname.c: Update.
2428         * gnulib/import/getprogname.h: Update.
2429         * gnulib/import/gettext.h: Update.
2430         * gnulib/import/gettimeofday.c: Update.
2431         * gnulib/import/glob-libc.h: Update.
2432         * gnulib/import/glob.c: Update.
2433         * gnulib/import/glob.in.h: Update.
2434         * gnulib/import/glob_internal.h: Update.
2435         * gnulib/import/glob_pattern_p.c: Update.
2436         * gnulib/import/globfree.c: Update.
2437         * gnulib/import/hard-locale.c: Update.
2438         * gnulib/import/hard-locale.h: Update.
2439         * gnulib/import/intprops.h: Update.
2440         * gnulib/import/inttypes.in.h: Update.
2441         * gnulib/import/isnan.c: Update.
2442         * gnulib/import/isnand-nolibm.h: Update.
2443         * gnulib/import/isnand.c: Update.
2444         * gnulib/import/isnanl-nolibm.h: Update.
2445         * gnulib/import/isnanl.c: Update.
2446         * gnulib/import/itold.c: Update.
2447         * gnulib/import/libc-config.h: Update.
2448         * gnulib/import/limits.in.h: Update.
2449         * gnulib/import/localcharset.c: Update.
2450         * gnulib/import/localcharset.h: Update.
2451         * gnulib/import/localtime-buffer.c: Update.
2452         * gnulib/import/localtime-buffer.h: Update.
2453         * gnulib/import/lstat.c: Update.
2454         * gnulib/import/m4/00gnulib.m4: Update.
2455         * gnulib/import/m4/__inline.m4: Update.
2456         * gnulib/import/m4/absolute-header.m4: Update.
2457         * gnulib/import/m4/alloca.m4: Update.
2458         * gnulib/import/m4/builtin-expect.m4: Update.
2459         * gnulib/import/m4/canonicalize.m4: Update.
2460         * gnulib/import/m4/chdir-long.m4: Update.
2461         * gnulib/import/m4/close.m4: Update.
2462         * gnulib/import/m4/closedir.m4: Update.
2463         * gnulib/import/m4/configmake.m4: Update.
2464         * gnulib/import/m4/d-ino.m4: Update.
2465         * gnulib/import/m4/d-type.m4: Update.
2466         * gnulib/import/m4/dirent_h.m4: Update.
2467         * gnulib/import/m4/dirfd.m4: Update.
2468         * gnulib/import/m4/dirname.m4: Update.
2469         * gnulib/import/m4/double-slash-root.m4: Update.
2470         * gnulib/import/m4/dup.m4: Update.
2471         * gnulib/import/m4/dup2.m4: Update.
2472         * gnulib/import/m4/eealloc.m4: Update.
2473         * gnulib/import/m4/environ.m4: Update.
2474         * gnulib/import/m4/errno_h.m4: Update.
2475         * gnulib/import/m4/error.m4: Update.
2476         * gnulib/import/m4/exponentd.m4: Update.
2477         * gnulib/import/m4/exponentl.m4: Update.
2478         * gnulib/import/m4/extensions.m4: Update.
2479         * gnulib/import/m4/extern-inline.m4: Update.
2480         * gnulib/import/m4/fchdir.m4: Update.
2481         * gnulib/import/m4/fcntl-o.m4: Update.
2482         * gnulib/import/m4/fcntl.m4: Update.
2483         * gnulib/import/m4/fcntl_h.m4: Update.
2484         * gnulib/import/m4/fdopendir.m4: Update.
2485         * gnulib/import/m4/filenamecat.m4: Update.
2486         * gnulib/import/m4/flexmember.m4: Update.
2487         * gnulib/import/m4/float_h.m4: Update.
2488         * gnulib/import/m4/fnmatch.m4: Update.
2489         * gnulib/import/m4/fnmatch_h.m4: Update.
2490         * gnulib/import/m4/fpieee.m4: Update.
2491         * gnulib/import/m4/frexp.m4: Update.
2492         * gnulib/import/m4/frexpl.m4: Update.
2493         * gnulib/import/m4/fstat.m4: Update.
2494         * gnulib/import/m4/fstatat.m4: Update.
2495         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2496         * gnulib/import/m4/getcwd-path-max.m4: Update.
2497         * gnulib/import/m4/getcwd.m4: Update.
2498         * gnulib/import/m4/getdtablesize.m4: Update.
2499         * gnulib/import/m4/getlogin.m4: Update.
2500         * gnulib/import/m4/getlogin_r.m4: Update.
2501         * gnulib/import/m4/getpagesize.m4: Update.
2502         * gnulib/import/m4/getprogname.m4: Update.
2503         * gnulib/import/m4/gettimeofday.m4: Update.
2504         * gnulib/import/m4/glibc21.m4: Update.
2505         * gnulib/import/m4/glob.m4: Update.
2506         * gnulib/import/m4/glob_h.m4: Update.
2507         * gnulib/import/m4/gnulib-cache.m4: Update.
2508         * gnulib/import/m4/gnulib-common.m4: Update.
2509         * gnulib/import/m4/gnulib-comp.m4: Update.
2510         * gnulib/import/m4/gnulib-tool.m4: Update.
2511         * gnulib/import/m4/hard-locale.m4: Update.
2512         * gnulib/import/m4/include_next.m4: Update.
2513         * gnulib/import/m4/inttypes-pri.m4: Update.
2514         * gnulib/import/m4/inttypes.m4: Update.
2515         * gnulib/import/m4/isnand.m4: Update.
2516         * gnulib/import/m4/isnanl.m4: Update.
2517         * gnulib/import/m4/largefile.m4: Update.
2518         * gnulib/import/m4/limits-h.m4: Update.
2519         * gnulib/import/m4/localcharset.m4: Update.
2520         * gnulib/import/m4/locale-fr.m4: Update.
2521         * gnulib/import/m4/locale-ja.m4: Update.
2522         * gnulib/import/m4/locale-zh.m4: Update.
2523         * gnulib/import/m4/localtime-buffer.m4: Update.
2524         * gnulib/import/m4/longlong.m4: Update.
2525         * gnulib/import/m4/lstat.m4: Update.
2526         * gnulib/import/m4/malloc.m4: Update.
2527         * gnulib/import/m4/malloca.m4: Update.
2528         * gnulib/import/m4/math_h.m4: Update.
2529         * gnulib/import/m4/mbrtowc.m4: Update.
2530         * gnulib/import/m4/mbsinit.m4: Update.
2531         * gnulib/import/m4/mbsrtowcs.m4: Update.
2532         * gnulib/import/m4/mbstate_t.m4: Update.
2533         * gnulib/import/m4/memchr.m4: Update.
2534         * gnulib/import/m4/memmem.m4: Update.
2535         * gnulib/import/m4/mempcpy.m4: Update.
2536         * gnulib/import/m4/memrchr.m4: Update.
2537         * gnulib/import/m4/mkdir.m4: Update.
2538         * gnulib/import/m4/mkstemp.m4: Update.
2539         * gnulib/import/m4/mmap-anon.m4: Update.
2540         * gnulib/import/m4/mode_t.m4: Update.
2541         * gnulib/import/m4/msvc-inval.m4: Update.
2542         * gnulib/import/m4/msvc-nothrow.m4: Update.
2543         * gnulib/import/m4/multiarch.m4: Update.
2544         * gnulib/import/m4/nocrash.m4: Update.
2545         * gnulib/import/m4/off_t.m4: Update.
2546         * gnulib/import/m4/onceonly.m4: Update.
2547         * gnulib/import/m4/open-cloexec.m4: Update.
2548         * gnulib/import/m4/open.m4: Update.
2549         * gnulib/import/m4/openat.m4: Update.
2550         * gnulib/import/m4/opendir.m4: Update.
2551         * gnulib/import/m4/pathmax.m4: Update.
2552         * gnulib/import/m4/rawmemchr.m4: Update.
2553         * gnulib/import/m4/readdir.m4: Update.
2554         * gnulib/import/m4/readlink.m4: Update.
2555         * gnulib/import/m4/realloc.m4: Update.
2556         * gnulib/import/m4/rename.m4: Update.
2557         * gnulib/import/m4/rewinddir.m4: Update.
2558         * gnulib/import/m4/rmdir.m4: Update.
2559         * gnulib/import/m4/save-cwd.m4: Update.
2560         * gnulib/import/m4/secure_getenv.m4: Update.
2561         * gnulib/import/m4/setenv.m4: Update.
2562         * gnulib/import/m4/signal_h.m4: Update.
2563         * gnulib/import/m4/ssize_t.m4: Update.
2564         * gnulib/import/m4/stat-time.m4: Update.
2565         * gnulib/import/m4/stat.m4: Update.
2566         * gnulib/import/m4/std-gnu11.m4: Update.
2567         * gnulib/import/m4/stdbool.m4: Update.
2568         * gnulib/import/m4/stddef_h.m4: Update.
2569         * gnulib/import/m4/stdint.m4: Update.
2570         * gnulib/import/m4/stdio_h.m4: Update.
2571         * gnulib/import/m4/stdlib_h.m4: Update.
2572         * gnulib/import/m4/strchrnul.m4: Update.
2573         * gnulib/import/m4/strdup.m4: Update.
2574         * gnulib/import/m4/strerror.m4: Update.
2575         * gnulib/import/m4/string_h.m4: Update.
2576         * gnulib/import/m4/strstr.m4: Update.
2577         * gnulib/import/m4/strtok_r.m4: Update.
2578         * gnulib/import/m4/sys_socket_h.m4: Update.
2579         * gnulib/import/m4/sys_stat_h.m4: Update.
2580         * gnulib/import/m4/sys_time_h.m4: Update.
2581         * gnulib/import/m4/sys_types_h.m4: Update.
2582         * gnulib/import/m4/tempname.m4: Update.
2583         * gnulib/import/m4/time_h.m4: Update.
2584         * gnulib/import/m4/unistd-safer.m4: Update.
2585         * gnulib/import/m4/unistd_h.m4: Update.
2586         * gnulib/import/m4/warn-on-use.m4: Update.
2587         * gnulib/import/m4/wchar_h.m4: Update.
2588         * gnulib/import/m4/wchar_t.m4: Update.
2589         * gnulib/import/m4/wctype_h.m4: Update.
2590         * gnulib/import/m4/wint_t.m4: Update.
2591         * gnulib/import/malloc.c: Update.
2592         * gnulib/import/malloc/scratch_buffer.h: Update.
2593         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2594         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2595         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2596         * gnulib/import/malloca.c: Update.
2597         * gnulib/import/malloca.h: Update.
2598         * gnulib/import/malloca.valgrind: Update.
2599         * gnulib/import/math.in.h: Update.
2600         * gnulib/import/mbrtowc.c: Update.
2601         * gnulib/import/mbsinit.c: Update.
2602         * gnulib/import/mbsrtowcs-impl.h: Update.
2603         * gnulib/import/mbsrtowcs-state.c: Update.
2604         * gnulib/import/mbsrtowcs.c: Update.
2605         * gnulib/import/memchr.c: Update.
2606         * gnulib/import/memmem.c: Update.
2607         * gnulib/import/mempcpy.c: Update.
2608         * gnulib/import/memrchr.c: Update.
2609         * gnulib/import/mkdir.c: Update.
2610         * gnulib/import/mkstemp.c: Update.
2611         * gnulib/import/msvc-inval.c: Update.
2612         * gnulib/import/msvc-inval.h: Update.
2613         * gnulib/import/msvc-nothrow.c: Update.
2614         * gnulib/import/msvc-nothrow.h: Update.
2615         * gnulib/import/open.c: Update.
2616         * gnulib/import/openat-die.c: Update.
2617         * gnulib/import/openat-priv.h: Update.
2618         * gnulib/import/openat-proc.c: Update.
2619         * gnulib/import/openat.c: Update.
2620         * gnulib/import/openat.h: Update.
2621         * gnulib/import/opendir.c: Update.
2622         * gnulib/import/pathmax.h: Update.
2623         * gnulib/import/pipe-safer.c: Update.
2624         * gnulib/import/rawmemchr.c: Update.
2625         * gnulib/import/readdir.c: Update.
2626         * gnulib/import/readlink.c: Update.
2627         * gnulib/import/realloc.c: Update.
2628         * gnulib/import/ref-add.sin: Update.
2629         * gnulib/import/ref-del.sin: Update.
2630         * gnulib/import/rename.c: Update.
2631         * gnulib/import/rewinddir.c: Update.
2632         * gnulib/import/rmdir.c: Update.
2633         * gnulib/import/same-inode.h: Update.
2634         * gnulib/import/save-cwd.c: Update.
2635         * gnulib/import/save-cwd.h: Update.
2636         * gnulib/import/scratch_buffer.h: Update.
2637         * gnulib/import/secure_getenv.c: Update.
2638         * gnulib/import/setenv.c: Update.
2639         * gnulib/import/signal.in.h: Update.
2640         * gnulib/import/stat-time.c: Update.
2641         * gnulib/import/stat-time.h: Update.
2642         * gnulib/import/stat-w32.c: Update.
2643         * gnulib/import/stat-w32.h: Update.
2644         * gnulib/import/stat.c: Update.
2645         * gnulib/import/stdbool.in.h: Update.
2646         * gnulib/import/stddef.in.h: Update.
2647         * gnulib/import/stdint.in.h: Update.
2648         * gnulib/import/stdio.in.h: Update.
2649         * gnulib/import/stdlib.in.h: Update.
2650         * gnulib/import/str-two-way.h: Update.
2651         * gnulib/import/strchrnul.c: Update.
2652         * gnulib/import/strdup.c: Update.
2653         * gnulib/import/streq.h: Update.
2654         * gnulib/import/strerror-override.c: Update.
2655         * gnulib/import/strerror-override.h: Update.
2656         * gnulib/import/strerror.c: Update.
2657         * gnulib/import/string.in.h: Update.
2658         * gnulib/import/stripslash.c: Update.
2659         * gnulib/import/strnlen1.c: Update.
2660         * gnulib/import/strnlen1.h: Update.
2661         * gnulib/import/strstr.c: Update.
2662         * gnulib/import/strtok_r.c: Update.
2663         * gnulib/import/sys_stat.in.h: Update.
2664         * gnulib/import/sys_time.in.h: Update.
2665         * gnulib/import/sys_types.in.h: Update.
2666         * gnulib/import/tempname.c: Update.
2667         * gnulib/import/tempname.h: Update.
2668         * gnulib/import/time.in.h: Update.
2669         * gnulib/import/unistd--.h: Update.
2670         * gnulib/import/unistd-safer.h: Update.
2671         * gnulib/import/unistd.in.h: Update.
2672         * gnulib/import/unsetenv.c: Update.
2673         * gnulib/import/verify.h: Update.
2674         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2675         * gnulib/import/wchar.in.h: Update.
2676         * gnulib/import/wctype.in.h: Update.
2677         * gnulib/import/xalloc-oversized.h: Update.
2678         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2679         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2680
2681 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2682
2683         * record-btrace.c (get_thread_current_frame): Remove
2684         old_inferior_ptid.
2685
2686 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2687
2688         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2689         with check_tag to 1 if and only if the type is tagged and the
2690         component being searched cannot been found in the current
2691         view. Otherwise, always call ada_to_fixed_type with
2692         check_tag to 0.
2693
2694 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2695
2696         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2697         declaration.
2698         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2699         * ada-varobj.c (ada_varobj_get_number_of_children,
2700         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2701
2702 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2703
2704         * ada-valprint.c (ada_value_print): Use type instead of
2705         enclosing type.
2706
2707 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2708
2709         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2710         an array of access to unconstrained array.
2711
2712 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2713
2714         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2715         (ada_check_typedef): Use it.
2716
2717 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2718
2719         * ada-varobj.c (ada_varobj_describe_struct_child)
2720         (ada_varobj_describe_child): Handle union case like struct one.
2721
2722 2018-09-10  Tom Tromey  <tom@tromey.com>
2723
2724         PR python/18380:
2725         * python/python.c (_initialize_python): Make example in "python"
2726         help work in Python 3.
2727
2728 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2729
2730         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2731         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2732         $(EXEEXT) to the script, as it is not a program.
2733
2734 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2735
2736         * python/py-prettyprint.c (pretty_print_one_value): Return
2737         gdbpy_ref<>.
2738         (print_string_repr): Adjust.
2739         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2740         * python/python-internal.h (apply_varobj_pretty_printer): Return
2741         gdbpy_ref<>.
2742         * varobj.c (varobj_value_get_print_value): Adjust.
2743
2744 2018-09-08  Tom Tromey  <tom@tromey.com>
2745
2746         PR python/16047:
2747         * python/py-prettyprint.c (pretty_print_one_value): Check for
2748         to_string method.
2749
2750 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2751
2752         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2753         replace_operator_with_call.
2754
2755 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2756
2757         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2758
2759 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2760
2761         * ada-typeprint.c (print_range): Print the bounds using TYPE
2762         rather than its TYPE_TARGET_TYPE.
2763
2764 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2765
2766         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2767         call to ada_to_fixed_value_create.
2768
2769 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2770
2771         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2772
2773 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2774
2775         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2776         by calls to error.
2777
2778 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2779
2780         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2781         Move update of loop variable "fi".
2782
2783 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2784
2785         * ada-lang.c (value_assign_to_component): In the case of
2786         big-endian targets, extract the bits of the given VAL
2787         using an src_offset of zero if container is not a scalar.
2788
2789 2018-09-06  Simon Ser  <contact@emersion.fr>
2790
2791         PR gdb/23105
2792         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2793         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2794         * fbsd-tdep.c (fbsd_make_note_desc): New.
2795         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2796         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2797         * target.h (enum target_object) Add FreeBSD-specific
2798         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2799
2800 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2801
2802         * compile/compile-c.h (generate_c_for_variable_locations):
2803         Change reference to pointer.
2804         * compile/compile-c-support.c (compile_program) <compute>:
2805         Likewise.
2806         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2807         (generate_c_for_for_one_variable): Likewise
2808         (generate_c_for_variable_locations): Likewise
2809         * compile/compile-c-types.c (compile_c_instance::convert_type):
2810         Likewise
2811         * compile/compile-cplus-symbols.c (convert_one_symbol):
2812         std::move the scope passed to enter_scope.
2813         * compile/compile-cplus-types.c
2814         (compile_cplus_instance::enter_scope): Make parameter
2815         rvalue-reference.
2816         (compile_cplus_instance::new_scope): Change reference to
2817         pointer.
2818         (compile_cplus_instance::convert_type): Likewise
2819         (compile_cplus_convert_typedef): std::move the scope passed to
2820         enter_scope.
2821         (compile_cplus_convert_struct_or_union): Likewise.
2822         (compile_cplus_convert_enum): Likewise.
2823         (compile_cplus_convert_namespace): Likewise.
2824         * compile/compile-cplus.h (compile_cplus_instance)
2825         <enter_scope>: Make parameter rvalue-reference.
2826         * compile/compile-internal.h (compile_instance)
2827         <get_cached_type>: Likewise
2828         * compile/compile-loc2c.c (push): Likewise
2829         (pushf): Likewise
2830         (unary): Likewise
2831         (binary): Likewise
2832         (print_label): Likewise
2833         (pushf_register_address): Likewise
2834         (pushf_register): Likewise
2835         (do_compile_dwarf_expr_to_c): Likewise
2836         (compile_dwarf_expr_to_c): Likewise
2837         (compile_dwarf_bounds_to_c): Likewise
2838         * compile/compile.c (compile_instance::get_cached_type):
2839         Likewise
2840         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2841         (compile_dwarf_bounds_to_c): Likewise
2842         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2843         (dwarf2_compile_property_to_c): Likewise
2844         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2845         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2846         Likewise
2847
2848 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2849
2850         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2851         * tui/tui-data.c (init_content_element): Don't initialize it.
2852
2853 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2854
2855         * tui/tui-data.h (struct tui_win_info)
2856         <detail::opaque>: Remove.
2857         * tui/tui-data.c (init_win_info): Remove assignment.
2858
2859 2018-09-05  Tom Tromey  <tom@tromey.com>
2860
2861         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2862         -Wformat-nonliteral.
2863         * target-float.c (host_float_ops<T>::to_string)
2864         (host_float_ops<T>::from_string): Use
2865         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2866         * configure: Rebuild.
2867
2868 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2869
2870         * printcmd.c (printf_c_string): Use
2871         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2872         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2873
2874 2018-09-05  Tom Tromey  <tom@tromey.com>
2875
2876         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2877
2878 2018-09-05  Tom de Vries  <tdevries@suse.de>
2879
2880         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2881         with resolve_abstract_p == true.
2882         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2883         defaulting to false. Propagate resolve_abstract_p to
2884         dwarf2_fetch_die_loc_sect_off.
2885         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2886         parameter, defaulting to false.
2887         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2888         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2889         parameter.
2890         * dwarf2read.h (struct die_info): Forward-declare.
2891         (die_info_ptr): New typedef.
2892         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2893
2894 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2895
2896         GDB 8.2 released.
2897
2898 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2899             Pedro Alves  <palves@redhat.com>
2900
2901         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2902         "aclocal-m4-deps.mk".  Include file here.
2903         $(srcdir)/aclocal.m4: Add "configure.ac".
2904         * gnulib/aclocal-m4-deps.mk: New file.
2905         * gnulib/update-gnulib.sh: Automatically update
2906         "aclocal-m4-deps.mk".
2907
2908 2018-09-04  Tom Tromey  <tom@tromey.com>
2909
2910         * configure: Rebuild.
2911         * configure.ac: Remove multi-ice code.
2912
2913 2018-09-04  Tom Tromey  <tom@tromey.com>
2914
2915         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2916         (ada-exp.o): Update.
2917
2918 2018-09-04  Tom Tromey  <tom@tromey.com>
2919
2920         * Makefile.in (printcmd.o, target-float.o): Remove.
2921         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2922
2923 2018-09-04  Tom Tromey  <tom@tromey.com>
2924
2925         * gnulib/Makefile.in: Remove obsolete comment.
2926         * Makefile.in: Remove obsolete comment.
2927
2928 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2929
2930         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2931         line with '+'.
2932
2933 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2934
2935         * riscv-tdep.c: Add 'prologue-value.h' include.
2936         (struct riscv_unwind_cache): New struct.
2937         (riscv_debug_unwinder): New global.
2938         (riscv_scan_prologue): Update arguments, capture register details
2939         from prologue scan.
2940         (riscv_skip_prologue): Reformat arguments line, move end of
2941         prologue calculation into riscv_scan_prologue.
2942         (riscv_frame_cache): Update return type, create
2943         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2944         details.
2945         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2946         (riscv_frame_prev_register): Use the trad_frame within the
2947         riscv_unwind_cache.
2948         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2949         flag.
2950
2951 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2952
2953         * trad-frame.h (trad_frame_set_realreg): Declare.
2954         (trad_frame_set_addr): Declare.
2955         * trad-frame.c (trad_frame_set_realreg): Define new function.
2956         (trad_frame_set_addr): Define new function.
2957         (trad_frame_set_reg_realreg): Use new function.
2958         (trad_frame_set_reg_addr): Use new function.
2959
2960 2018-09-01  Keith Seitz  <keiths@redhat.com>
2961
2962         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2963         pulongest instead of "%lld".
2964         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2965         ATTRIBUTE_UNUSED.
2966
2967 2018-08-31  Tom Tromey  <tom@tromey.com>
2968
2969         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2970         variant part type.
2971
2972 2018-08-31  Pedro Alves  <palves@redhat.com>
2973
2974         * gdbarch.h: Regenerate.
2975
2976 2018-08-31  Pedro Alves  <palves@redhat.com>
2977
2978         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2979         * target.h (Hardware watchpoint interfaces): Describe
2980         continuable/steppable/non-steppable watchpoints.
2981         * gdbarch.h, gdbarch.c: Regenerate.
2982
2983 2018-08-31  Pedro Alves  <palves@redhat.com>
2984
2985         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2986         Delete.
2987         * s390-linux-nat.c
2988         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2989         * target.h (target_ops::have_continuable_watchpoint): Delete.
2990         (target_have_continuable_watchpoint): Delete.
2991         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2992         * target-delegates.c: Regenerate.
2993
2994 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2995
2996         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2997         the files present in "gnulib/import/m4/".
2998
2999 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3000
3001         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3002         c.sw, c.swsp, and c.sdsp.
3003
3004 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3005
3006         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3007         (riscv_read_misa_reg): Don't cache value read into inferior data.
3008         (riscv_new_inferior_data): Delete.
3009         (riscv_inferior_data_cleanup): Delete.
3010         (riscv_inferior_data): Delete.
3011         (riscv_invalidate_inferior_data): Delete.
3012         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3013
3014 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3015
3016         * compile/compile-cplus-types.c
3017         (compile_cplus_instance::leave_scope): Take the address of scope
3018         object.
3019         (compile_cplus_instance::convert_qualified_base): Compare quals
3020         to 0.
3021
3022 2018-08-30  Keith Seitz  <keiths@redhat.com>
3023
3024         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3025         Use "%s" and host_address_to_string instead of "%p" in printf.
3026
3027 2018-08-29  Keith Seitz  <keiths@redhat.com>
3028
3029         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3030         and compile-cplus-types.c.
3031         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3032         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3033         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3034         Declare.
3035         * compile/compile-c-support.c: Include compile-cplus.h.
3036         (load_libcompile): Templatize.
3037         (get_compile_context): "New" function.
3038         (c_get_compile_context): Use get_compile_context.
3039         (cplus_get_compile_context): New function.
3040         (cplus_push_user_expression, cplus_pop_user_expression)
3041         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3042         (cplus_compute_program): Define new structs/functions.
3043         * compile/compile-cplus-symmbols.c: New file.
3044         * compile/compile-cplus-types.c: New file.
3045         * compile/compile-cplus.h: New file.
3046         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3047         Declare.
3048         * compile/compile-object-load.c (get_out_value_type): Use
3049         strncmp_iw when comparing symbol names.
3050         (compile_object_load): Add mst_bss and mst_data.
3051         * compile/compile.c (_initialize_compile): Remove
3052         -Wno-implicit-function-declaration from `compile_args'.
3053         * compile/gcc-cp-plugin.h: New file.
3054         * NEWS: Mention C++ compile support and new debug options.
3055
3056 2018-08-29  Keith Seitz  <keiths@redhat.com>
3057
3058         * linespec.c (collect_info::add_symbol): Make virtual.
3059         (struct symbol_searcher_collect_info): New struct.
3060         (symbol_searcher::find_all_symbols): New method.
3061         * symtab.h (class symbol_searcher): New class.
3062
3063 2018-08-29  Keith Seitz  <keiths@redhat.com>
3064
3065         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3066         Change to vector of block_symbol.  Update all users.
3067         (struct collect_info) <symbols>: Likewise.
3068         (collect_info::add_symbol): Take block_symbol as argument.
3069         Update all callers.
3070         (decode_compound_collector) <m_symbols>: Change type to vector
3071         of block_symbol.  Update all users.
3072         (decode_compound_collector::operator ()): Change parameter type
3073         to block_symbol.
3074         (find_method, find_function_symbols, find_linespec_symbols)
3075         (find_label_symbols_in_block, find_label_symbols): Change symbol
3076         vectors to block_symbol vectors.
3077         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3078         block_symbol.
3079
3080 2018-08-29  Keith Seitz  <keiths@redhat.com>
3081
3082         * linespec.c (symbolp): Remove typedef and VEC definitions.
3083         (bound_minimal_symbol_d): Likewise.
3084
3085 2018-08-29  Keith Seitz  <keiths@redhat.com>
3086
3087         * linespec.c (decode_compound_collector::decode_compound_collector):
3088         Remove initialization for `m_symtabs'.
3089         (decode_compound_collector::release_symbols): Change return type
3090         to std::vector.  Update all callers.
3091         (class decode_compound_collector) <m_symbols>: Change type to
3092         std::vector.
3093         (lookup_prefix_sym): Change return type to std::vector.  Update all
3094         callers.
3095         (compare_symbols): Remove.
3096         (std_compare_symbols): Rename to `compare_symbols'.
3097         (find_method): Change `sym_classes' parameter to std::vector.
3098         Update all callers.  Use std::sort to sort sym_classes.
3099         (find_linespec_symbols): Remove cleanup.
3100
3101 2018-08-29  Keith Seitz  <keiths@redhat.com>
3102
3103         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3104         std::vector.  Update all users.
3105         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3106         (struct collect_info) <minimal_symbols>: Likewise.
3107         (compare_msymbols): Return bool.  Change parameters to const
3108         bound_minimal_symbol references.
3109         (find_method, find_function_symbols, find_linespec_symbols): Change
3110         `minsyms' parameter to std::vector.  Update all callers.
3111
3112 2018-08-29  Keith Seitz  <keiths@redhat.com>
3113
3114         * linespec.c (struct linespec) <label_symbols>: Change type to
3115         std::vector.  Update all users.
3116         (find_label_symbols_in_block): Change `result' parameter to
3117         std::vector.  Update all callers.
3118         (find_label_symbols): Return std::vector.  Update all callers.
3119
3120 2018-08-29  Keith Seitz  <keiths@redhat.com>
3121
3122         * linespec.c (struct linespec) <function_symbols>: Change type to
3123         std::vector.  Update all users.
3124         (struct collect_info) <function_symbols>: Likewise.
3125         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3126         (std_compare_symbols): New function.
3127         (find_method, find_function_symbols, find_linespec_symbols)
3128         (find_label_symbols_in_block): Change `symbols' parameter to
3129         std::vector.  Update all callers.
3130         (find_label_symbols): Likewise for `function_symbols' and
3131         `label_funcs_ret'.
3132
3133 2018-08-29  Keith Seitz  <keiths@redhat.com>
3134
3135         * linespec.c (symtab_vector_up): Define.
3136         (struct linespec) <file_symtabs>: Change type to std::vector *.
3137         Update all uses.
3138         (struct collect_info) <file_symtabs>: Likewise.
3139         (collect_symtabs_from_filename): Return symtab_vector_up.
3140         Update all callers.
3141         (decode_objc): Remove cleanup.
3142         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3143         (symtab_collector::release_symtabs): Return symtab_vector_up.
3144         Update all callers.
3145         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3146         Update all users.
3147         (collect_symtabs_from_filename, symtabs_from_filename): Return
3148         symtab_vector_up.  Update all callers.
3149
3150 2018-08-29  Tom Tromey  <tom@tromey.com>
3151
3152         * csky-tdep.c (csky_analyze_prologue): Use
3153         core_addr_to_string_nz.
3154
3155 2018-08-29  Tom Tromey  <tom@tromey.com>
3156
3157         * windows-nat.c (struct xlate_exception) <them>: Change type to
3158         DWORD.
3159         (xlate): Fix formatting.  Remove last entry.
3160         (struct xlate_exception, xlate): Comment out.
3161         (windows_nat_target::resume): Use ranged for.
3162
3163 2018-08-29  Jim Wilson  <jimw@sifive.com>
3164
3165         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3166         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3167         of NT_PRFPREG.
3168         (riscv_linux_nat_target::store_registers): Likewise.
3169
3170 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3171
3172         PR gdb/23555
3173         PR gdb/23558
3174         * gnulib/aclocal.m4: Regenerate.
3175         * gnulib/config.in: Regenerate.
3176         * gnulib/configure: Regenerate.
3177         * gnulib/import/Makefile.am: Update.
3178         * gnulib/import/Makefile.in: Update.
3179         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3180         * gnulib/import/_Noreturn.h: ... this.
3181         * gnulib/import/alloca.in.h: Update.
3182         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3183         * gnulib/import/arg-nonnull.h: ... this.
3184         * gnulib/import/assure.h: Update.
3185         * gnulib/import/at-func.c: Update.
3186         * gnulib/import/basename-lgpl.c: Update.
3187         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3188         * gnulib/import/c++defs.h: ... this.
3189         * gnulib/import/canonicalize-lgpl.c: Update.
3190         * gnulib/import/cdefs.h: Update.
3191         * gnulib/import/chdir-long.c: Update.
3192         * gnulib/import/chdir-long.h: Update.
3193         * gnulib/import/cloexec.c: Update.
3194         * gnulib/import/cloexec.h: Update.
3195         * gnulib/import/close.c: Update.
3196         * gnulib/import/closedir.c: Update.
3197         * gnulib/import/config.charset: Update.
3198         * gnulib/import/dirent-private.h: Update.
3199         * gnulib/import/dirent.in.h: Update.
3200         * gnulib/import/dirfd.c: Update.
3201         * gnulib/import/dirname-lgpl.c: Update.
3202         * gnulib/import/dirname.h: Update.
3203         * gnulib/import/dosname.h: Update.
3204         * gnulib/import/dup-safer-flag.c: Update.
3205         * gnulib/import/dup-safer.c: Update.
3206         * gnulib/import/dup.c: Update.
3207         * gnulib/import/dup2.c: Update.
3208         * gnulib/import/errno.in.h: Update.
3209         * gnulib/import/error.c: Update.
3210         * gnulib/import/error.h: Update.
3211         * gnulib/import/exitfail.c: Update.
3212         * gnulib/import/exitfail.h: Update.
3213         * gnulib/import/extra/update-copyright: Update.
3214         * gnulib/import/fchdir.c: Update.
3215         * gnulib/import/fcntl.c: Update.
3216         * gnulib/import/fcntl.in.h: Update.
3217         * gnulib/import/fd-hook.c: Update.
3218         * gnulib/import/fd-hook.h: Update.
3219         * gnulib/import/fd-safer-flag.c: Update.
3220         * gnulib/import/fd-safer.c: Update.
3221         * gnulib/import/fdopendir.c: Update.
3222         * gnulib/import/filename.h: Update.
3223         * gnulib/import/filenamecat-lgpl.c: Update.
3224         * gnulib/import/filenamecat.h: Update.
3225         * gnulib/import/flexmember.h: Update.
3226         * gnulib/import/float+.h: Update.
3227         * gnulib/import/float.c: Update.
3228         * gnulib/import/float.in.h: Update.
3229         * gnulib/import/fnmatch.c: Update.
3230         * gnulib/import/fnmatch.in.h: Update.
3231         * gnulib/import/fnmatch_loop.c: Update.
3232         * gnulib/import/fpucw.h: Update.
3233         * gnulib/import/frexp.c: Update.
3234         * gnulib/import/frexpl.c: Update.
3235         * gnulib/import/fstat.c: Update.
3236         * gnulib/import/fstatat.c: Update.
3237         * gnulib/import/getcwd-lgpl.c: Update.
3238         * gnulib/import/getcwd.c: Update.
3239         * gnulib/import/getdtablesize.c: Update.
3240         * gnulib/import/getlogin_r.c: Update.
3241         * gnulib/import/getprogname.c: Update.
3242         * gnulib/import/getprogname.h: Update.
3243         * gnulib/import/gettext.h: Update.
3244         * gnulib/import/gettimeofday.c: Update.
3245         * gnulib/import/glob-libc.h: Update.
3246         * gnulib/import/glob.c: Update.
3247         * gnulib/import/glob.in.h: Update.
3248         * gnulib/import/glob_internal.h: Update.
3249         * gnulib/import/glob_pattern_p.c: Update.
3250         * gnulib/import/globfree.c: Update.
3251         * gnulib/import/hard-locale.c: Update.
3252         * gnulib/import/hard-locale.h: Update.
3253         * gnulib/import/intprops.h: Update.
3254         * gnulib/import/inttypes.in.h: Update.
3255         * gnulib/import/isnan.c: Update.
3256         * gnulib/import/isnand-nolibm.h: Update.
3257         * gnulib/import/isnand.c: Update.
3258         * gnulib/import/isnanl-nolibm.h: Update.
3259         * gnulib/import/isnanl.c: Update.
3260         * gnulib/import/itold.c: Update.
3261         * gnulib/import/libc-config.h: Update.
3262         * gnulib/import/limits.in.h: Update.
3263         * gnulib/import/localcharset.c: Update.
3264         * gnulib/import/localcharset.h: Update.
3265         * gnulib/import/localtime-buffer.c: Update.
3266         * gnulib/import/localtime-buffer.h: Update.
3267         * gnulib/import/lstat.c: Update.
3268         * gnulib/import/m4/00gnulib.m4: Update.
3269         * gnulib/import/m4/__inline.m4: Update.
3270         * gnulib/import/m4/absolute-header.m4: Update.
3271         * gnulib/import/m4/alloca.m4: Update.
3272         * gnulib/import/m4/builtin-expect.m4: Update.
3273         * gnulib/import/m4/canonicalize.m4: Update.
3274         * gnulib/import/m4/chdir-long.m4: Update.
3275         * gnulib/import/m4/close.m4: Update.
3276         * gnulib/import/m4/closedir.m4: Update.
3277         * gnulib/import/m4/configmake.m4: Update.
3278         * gnulib/import/m4/d-ino.m4: Update.
3279         * gnulib/import/m4/d-type.m4: Update.
3280         * gnulib/import/m4/dirent_h.m4: Update.
3281         * gnulib/import/m4/dirfd.m4: Update.
3282         * gnulib/import/m4/dirname.m4: Update.
3283         * gnulib/import/m4/double-slash-root.m4: Update.
3284         * gnulib/import/m4/dup.m4: Update.
3285         * gnulib/import/m4/dup2.m4: Update.
3286         * gnulib/import/m4/eealloc.m4: Update.
3287         * gnulib/import/m4/environ.m4: Update.
3288         * gnulib/import/m4/errno_h.m4: Update.
3289         * gnulib/import/m4/error.m4: Update.
3290         * gnulib/import/m4/exponentd.m4: Update.
3291         * gnulib/import/m4/exponentl.m4: Update.
3292         * gnulib/import/m4/extensions.m4: Update.
3293         * gnulib/import/m4/extern-inline.m4: Update.
3294         * gnulib/import/m4/fchdir.m4: Update.
3295         * gnulib/import/m4/fcntl-o.m4: Update.
3296         * gnulib/import/m4/fcntl.m4: Update.
3297         * gnulib/import/m4/fcntl_h.m4: Update.
3298         * gnulib/import/m4/fdopendir.m4: Update.
3299         * gnulib/import/m4/filenamecat.m4: Update.
3300         * gnulib/import/m4/flexmember.m4: Update.
3301         * gnulib/import/m4/float_h.m4: Update.
3302         * gnulib/import/m4/fnmatch.m4: Update.
3303         * gnulib/import/m4/fnmatch_h.m4: Update.
3304         * gnulib/import/m4/fpieee.m4: Update.
3305         * gnulib/import/m4/frexp.m4: Update.
3306         * gnulib/import/m4/frexpl.m4: Update.
3307         * gnulib/import/m4/fstat.m4: Update.
3308         * gnulib/import/m4/fstatat.m4: Update.
3309         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3310         * gnulib/import/m4/getcwd-path-max.m4: Update.
3311         * gnulib/import/m4/getcwd.m4: Update.
3312         * gnulib/import/m4/getdtablesize.m4: Update.
3313         * gnulib/import/m4/getlogin.m4: Update.
3314         * gnulib/import/m4/getlogin_r.m4: Update.
3315         * gnulib/import/m4/getpagesize.m4: Update.
3316         * gnulib/import/m4/getprogname.m4: Update.
3317         * gnulib/import/m4/gettimeofday.m4: Update.
3318         * gnulib/import/m4/glibc21.m4: Update.
3319         * gnulib/import/m4/glob.m4: Update.
3320         * gnulib/import/m4/glob_h.m4: Update.
3321         * gnulib/import/m4/gnulib-cache.m4: Update.
3322         * gnulib/import/m4/gnulib-common.m4: Update.
3323         * gnulib/import/m4/gnulib-comp.m4: Update.
3324         * gnulib/import/m4/gnulib-tool.m4: Update.
3325         * gnulib/import/m4/hard-locale.m4: Update.
3326         * gnulib/import/m4/include_next.m4: Update.
3327         * gnulib/import/m4/inttypes-pri.m4: Update.
3328         * gnulib/import/m4/inttypes.m4: Update.
3329         * gnulib/import/m4/isnand.m4: Update.
3330         * gnulib/import/m4/isnanl.m4: Update.
3331         * gnulib/import/m4/largefile.m4: Update.
3332         * gnulib/import/m4/limits-h.m4: Update.
3333         * gnulib/import/m4/localcharset.m4: Update.
3334         * gnulib/import/m4/locale-fr.m4: Update.
3335         * gnulib/import/m4/locale-ja.m4: Update.
3336         * gnulib/import/m4/locale-zh.m4: Update.
3337         * gnulib/import/m4/localtime-buffer.m4: Update.
3338         * gnulib/import/m4/longlong.m4: Update.
3339         * gnulib/import/m4/lstat.m4: Update.
3340         * gnulib/import/m4/malloc.m4: Update.
3341         * gnulib/import/m4/malloca.m4: Update.
3342         * gnulib/import/m4/math_h.m4: Update.
3343         * gnulib/import/m4/mbrtowc.m4: Update.
3344         * gnulib/import/m4/mbsinit.m4: Update.
3345         * gnulib/import/m4/mbsrtowcs.m4: Update.
3346         * gnulib/import/m4/mbstate_t.m4: Update.
3347         * gnulib/import/m4/memchr.m4: Update.
3348         * gnulib/import/m4/memmem.m4: Update.
3349         * gnulib/import/m4/mempcpy.m4: Update.
3350         * gnulib/import/m4/memrchr.m4: Update.
3351         * gnulib/import/m4/mkdir.m4: Update.
3352         * gnulib/import/m4/mkstemp.m4: Update.
3353         * gnulib/import/m4/mmap-anon.m4: Update.
3354         * gnulib/import/m4/mode_t.m4: Update.
3355         * gnulib/import/m4/msvc-inval.m4: Update.
3356         * gnulib/import/m4/msvc-nothrow.m4: Update.
3357         * gnulib/import/m4/multiarch.m4: Update.
3358         * gnulib/import/m4/nocrash.m4: Update.
3359         * gnulib/import/m4/off_t.m4: Update.
3360         * gnulib/import/m4/onceonly.m4: Update.
3361         * gnulib/import/m4/open-cloexec.m4: Update.
3362         * gnulib/import/m4/open.m4: Update.
3363         * gnulib/import/m4/openat.m4: Update.
3364         * gnulib/import/m4/opendir.m4: Update.
3365         * gnulib/import/m4/pathmax.m4: Update.
3366         * gnulib/import/m4/rawmemchr.m4: Update.
3367         * gnulib/import/m4/readdir.m4: Update.
3368         * gnulib/import/m4/readlink.m4: Update.
3369         * gnulib/import/m4/realloc.m4: Update.
3370         * gnulib/import/m4/rename.m4: Update.
3371         * gnulib/import/m4/rewinddir.m4: Update.
3372         * gnulib/import/m4/rmdir.m4: Update.
3373         * gnulib/import/m4/save-cwd.m4: Update.
3374         * gnulib/import/m4/secure_getenv.m4: Update.
3375         * gnulib/import/m4/setenv.m4: Update.
3376         * gnulib/import/m4/signal_h.m4: Update.
3377         * gnulib/import/m4/ssize_t.m4: Update.
3378         * gnulib/import/m4/stat-time.m4: Update.
3379         * gnulib/import/m4/stat.m4: Update.
3380         * gnulib/import/m4/std-gnu11.m4: Update.
3381         * gnulib/import/m4/stdbool.m4: Update.
3382         * gnulib/import/m4/stddef_h.m4: Update.
3383         * gnulib/import/m4/stdint.m4: Update.
3384         * gnulib/import/m4/stdio_h.m4: Update.
3385         * gnulib/import/m4/stdlib_h.m4: Update.
3386         * gnulib/import/m4/strchrnul.m4: Update.
3387         * gnulib/import/m4/strdup.m4: Update.
3388         * gnulib/import/m4/strerror.m4: Update.
3389         * gnulib/import/m4/string_h.m4: Update.
3390         * gnulib/import/m4/strstr.m4: Update.
3391         * gnulib/import/m4/strtok_r.m4: Update.
3392         * gnulib/import/m4/sys_socket_h.m4: Update.
3393         * gnulib/import/m4/sys_stat_h.m4: Update.
3394         * gnulib/import/m4/sys_time_h.m4: Update.
3395         * gnulib/import/m4/sys_types_h.m4: Update.
3396         * gnulib/import/m4/tempname.m4: Update.
3397         * gnulib/import/m4/time_h.m4: Update.
3398         * gnulib/import/m4/unistd-safer.m4: Update.
3399         * gnulib/import/m4/unistd_h.m4: Update.
3400         * gnulib/import/m4/warn-on-use.m4: Update.
3401         * gnulib/import/m4/wchar_h.m4: Update.
3402         * gnulib/import/m4/wchar_t.m4: Update.
3403         * gnulib/import/m4/wctype_h.m4: Update.
3404         * gnulib/import/m4/wint_t.m4: Update.
3405         * gnulib/import/malloc.c: Update.
3406         * gnulib/import/malloc/scratch_buffer.h: Update.
3407         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3408         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3409         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3410         * gnulib/import/malloca.c: Update.
3411         * gnulib/import/malloca.h: Update.
3412         * gnulib/import/malloca.valgrind: Update.
3413         * gnulib/import/math.in.h: Update.
3414         * gnulib/import/mbrtowc.c: Update.
3415         * gnulib/import/mbsinit.c: Update.
3416         * gnulib/import/mbsrtowcs-impl.h: Update.
3417         * gnulib/import/mbsrtowcs-state.c: Update.
3418         * gnulib/import/mbsrtowcs.c: Update.
3419         * gnulib/import/memchr.c: Update.
3420         * gnulib/import/memmem.c: Update.
3421         * gnulib/import/mempcpy.c: Update.
3422         * gnulib/import/memrchr.c: Update.
3423         * gnulib/import/mkdir.c: Update.
3424         * gnulib/import/mkstemp.c: Update.
3425         * gnulib/import/msvc-inval.c: Update.
3426         * gnulib/import/msvc-inval.h: Update.
3427         * gnulib/import/msvc-nothrow.c: Update.
3428         * gnulib/import/msvc-nothrow.h: Update.
3429         * gnulib/import/open.c: Update.
3430         * gnulib/import/openat-die.c: Update.
3431         * gnulib/import/openat-priv.h: Update.
3432         * gnulib/import/openat-proc.c: Update.
3433         * gnulib/import/openat.c: Update.
3434         * gnulib/import/openat.h: Update.
3435         * gnulib/import/opendir.c: Update.
3436         * gnulib/import/pathmax.h: Update.
3437         * gnulib/import/pipe-safer.c: Update.
3438         * gnulib/import/rawmemchr.c: Update.
3439         * gnulib/import/readdir.c: Update.
3440         * gnulib/import/readlink.c: Update.
3441         * gnulib/import/realloc.c: Update.
3442         * gnulib/import/ref-add.sin: Update.
3443         * gnulib/import/ref-del.sin: Update.
3444         * gnulib/import/rename.c: Update.
3445         * gnulib/import/rewinddir.c: Update.
3446         * gnulib/import/rmdir.c: Update.
3447         * gnulib/import/same-inode.h: Update.
3448         * gnulib/import/save-cwd.c: Update.
3449         * gnulib/import/save-cwd.h: Update.
3450         * gnulib/import/scratch_buffer.h: Update.
3451         * gnulib/import/secure_getenv.c: Update.
3452         * gnulib/import/setenv.c: Update.
3453         * gnulib/import/signal.in.h: Update.
3454         * gnulib/import/stat-time.c: Update.
3455         * gnulib/import/stat-time.h: Update.
3456         * gnulib/import/stat-w32.c: Update.
3457         * gnulib/import/stat-w32.h: Update.
3458         * gnulib/import/stat.c: Update.
3459         * gnulib/import/stdbool.in.h: Update.
3460         * gnulib/import/stddef.in.h: Update.
3461         * gnulib/import/stdint.in.h: Update.
3462         * gnulib/import/stdio.in.h: Update.
3463         * gnulib/import/stdlib.in.h: Update.
3464         * gnulib/import/str-two-way.h: Update.
3465         * gnulib/import/strchrnul.c: Update.
3466         * gnulib/import/strdup.c: Update.
3467         * gnulib/import/streq.h: Update.
3468         * gnulib/import/strerror-override.c: Update.
3469         * gnulib/import/strerror-override.h: Update.
3470         * gnulib/import/strerror.c: Update.
3471         * gnulib/import/string.in.h: Update.
3472         * gnulib/import/stripslash.c: Update.
3473         * gnulib/import/strnlen1.c: Update.
3474         * gnulib/import/strnlen1.h: Update.
3475         * gnulib/import/strstr.c: Update.
3476         * gnulib/import/strtok_r.c: Update.
3477         * gnulib/import/sys_stat.in.h: Update.
3478         * gnulib/import/sys_time.in.h: Update.
3479         * gnulib/import/sys_types.in.h: Update.
3480         * gnulib/import/tempname.c: Update.
3481         * gnulib/import/tempname.h: Update.
3482         * gnulib/import/time.in.h: Update.
3483         * gnulib/import/unistd--.h: Update.
3484         * gnulib/import/unistd-safer.h: Update.
3485         * gnulib/import/unistd.in.h: Update.
3486         * gnulib/import/unsetenv.c: Update.
3487         * gnulib/import/verify.h: Update.
3488         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3489         * gnulib/import/wchar.in.h: Update.
3490         * gnulib/import/wctype.in.h: Update.
3491         * gnulib/import/xalloc-oversized.h: Update.
3492         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3493         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3494
3495 2018-08-16  Gary Benson <gbenson@redhat.com>
3496
3497         PR gdb/13000:
3498         * gdb/main.c (captured_main_1): Exit with nonzero status
3499         in batch mode if the last command to be executed failed.
3500         * NEWS: Mention the above.
3501
3502 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3503
3504         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3505         end of warning message.
3506
3507 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3508
3509         PR gdb/22943:
3510         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3511         (aarch64_extract_return_value): Use
3512         aapcs_is_vfp_call_or_return_candidate.
3513         (aarch64_return_in_memory): Likewise.
3514         (aarch64_store_return_value): Likewise.
3515
3516 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3517
3518         * aarch64-tdep.c
3519         (aapcs_is_vfp_call_or_return_candidate): Make static
3520         (pass_in_v_or_stack): Remove function.
3521         (pass_in_v_vfp_candidate): New function.
3522         (aarch64_push_dummy_call): Check for float register candidates.
3523
3524 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3525
3526         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3527         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3528         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3529
3530 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3531
3532         PR build/23399
3533         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3534         (struct ipa_sym_addresses): Rename to...
3535         (struct ipa_sym_addresses_common): ... this.
3536         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3537
3538 2018-08-28  Tom Tromey  <tom@tromey.com>
3539
3540         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3541         (token_fifo): Now a std::vector.
3542         (yylex, c_parse): Update.
3543         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3544         (token_fifo): Now a std::vector.
3545         (yylex, d_parse): Update.
3546         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3547         (token_fifo): Now a std::vector.
3548         (yylex, go_parse): Update.
3549
3550 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3551
3552         * parser-defs.h (struct type_stack) <elements>: Change type to
3553         std::vector<union type_stack_elt>.
3554         <depth, size>: Remove.
3555         * parse.c (parse_exp_in_context_1): Adjust.
3556         (type_stack_reserve): Remove.
3557         (check_type_stack_depth): Remove.
3558         (insert_into_type_stack): Adjust to std::vector.
3559         (insert_type): Likewise.
3560         (push_type): Likewise.
3561         (push_type_int): Likewise.
3562         (insert_type_address_space): Likewise.
3563         (pop_type): Likewise.
3564         (pop_type_int): Likewise.
3565         (pop_typelist): Likewise.
3566         (pop_type_stack): Likewise.
3567         (append_type_stack): Likewise.
3568         (push_type_stack): Likewise.
3569         (get_type_stack): Likewise.
3570         (type_stack_cleanup): Likewise.
3571         (push_typelist): Likewise.
3572         (follow_types): Likewise.
3573         (_initialize_parse): Likewise.
3574
3575 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3576
3577         * NEWS: Mention csky target.
3578
3579 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3580             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3581             Don Breazeal  <donb@codesourcery.com>
3582
3583         * csky-linux-tdep.c: New file.
3584         * csky-tdep.c: Likewise.
3585         * csky-tdep.h: Likewise.
3586         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3587         csky-tdep.o.
3588         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3589         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3590         * configure.tgt: Add csky support.
3591
3592 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3593
3594         * python/py-framefilter.c (py_print_frame): Print frame architecture
3595         when printing on an MI output.
3596
3597 2018-08-27  Tom Tromey  <tom@tromey.com>
3598
3599         PR build/23087:
3600         * configure: Rebuild.
3601         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3602
3603 2018-08-27  Tom Tromey  <tom@tromey.com>
3604
3605         * aarch64-linux-tdep.c
3606         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3607         casts to int.
3608
3609 2018-08-27  Tom Tromey  <tom@tromey.com>
3610
3611         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3612         unsigned.
3613         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3614         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3615         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3616         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3617         unsigned.
3618
3619 2018-08-27  Tom Tromey  <tom@tromey.com>
3620
3621         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3622         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3623
3624 2018-08-27  Tom Tromey  <tom@tromey.com>
3625
3626         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3627         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3628         ULONGEST_MAX.
3629         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3630         ULONGEST_MAX.
3631         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3632         ULONGEST_MAX.
3633         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3634         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3635         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3636         ULONGEST_MAX.
3637         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3638         (ppc64_linux_sigaction_tramp_frame)
3639         (ppc32_linux_sighandler_tramp_frame)
3640         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3641         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3642         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3643         * mn10300-linux-tdep.c (am33_linux_sigframe)
3644         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3645         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3646         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3647         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3648         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3649         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3650         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3651         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3652         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3653         * microblaze-linux-tdep.c
3654         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3655         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3656         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3657         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3658         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3659         * common/common-types.h (ULONGEST_MAX): New define.
3660         (CORE_ADDR_MAX): Fix formatting.
3661         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3662         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3663         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3664         (arm_linux_rt_sigreturn_tramp_frame)
3665         (arm_eabi_linux_sigreturn_tramp_frame)
3666         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3667         (thumb2_eabi_linux_sigreturn_tramp_frame)
3668         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3669         (arm_linux_restart_syscall_tramp_frame)
3670         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3671         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3672         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3673         ULONGEST_MAX.
3674         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3675
3676 2018-08-27  Tom Tromey  <tom@tromey.com>
3677
3678         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3679         CORE_ADDR_MAX.
3680         * mips-tdep.c (mips_deal_with_atomic_sequence)
3681         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3682         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3683         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3684         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3685         CORE_ADDR_MAX.
3686         * aarch64-tdep.c (aarch64_software_single_step): Use
3687         CORE_ADDR_MAX.
3688
3689 2018-08-27  Tom Tromey  <tom@tromey.com>
3690
3691         * linespec.c (complete_linespec_component): Add cast to "char".
3692         * completer.c (completion_tracker::build_completion_result): Add
3693         cast to "char".
3694
3695 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3696
3697         * solist.h (struct solist, struct target_so_ops): Fix
3698         indentation.
3699
3700 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3701
3702         * ada-tasks.c (ada_task_info_s): Remove typedef.
3703         (DEF_VEC_O(ada_task_info_s)): Remove.
3704         (struct ada_tasks_inferior_data): Initialize fields.
3705         <task_list>: Make an std::vector.
3706         (get_ada_tasks_inferior_data): Allocate with new.
3707         (ada_get_task_number): Adjust.
3708         (get_task_number_from_id): Likewise.
3709         (valid_task_id): Likewise.
3710         (ada_get_task_info_from_ptid): Likewise.
3711         (iterate_over_live_ada_tasks): Likewise.
3712         (add_ada_task): Likewise.
3713         (read_known_tasks): Likewise.
3714         (ada_build_task_list): Likewise.
3715         (print_ada_task_info): Likewise.
3716         (info_task): Likewise.
3717         (task_command_1): Likewise.
3718
3719 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3720
3721         * ada-lang.c (add_angle_brackets): Return std::string.
3722
3723 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3724
3725         * python/py-threadevent.c (py_get_event_thread): Initialize
3726         pythread.
3727
3728 2018-08-24  Pedro Alves  <palves@redhat.com>
3729
3730         * python/py-bpevent.c (create_breakpoint_event_object): Use
3731         copy-initialization.
3732         * python/py-continueevent.c (emit_continue_event): Use
3733         copy-initialization.
3734         * python/py-exitedevent.c (create_exited_event_object): Return a
3735         gdbpy_ref<>.
3736         (emit_exited_event): Use copy-initialization.
3737         * python/py-inferior.c (python_new_inferior)
3738         (python_inferior_deleted, add_thread_object): Use
3739         copy-initialization.
3740         * python/py-infevents.c (create_inferior_call_event_object)
3741         (create_register_changed_event_object)
3742         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3743         (emit_inferior_call_event, emit_memory_changed_event)
3744         (emit_register_changed_event): Use copy-initialization.
3745         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3746         Return a gdbpy_ref<>.
3747         (emit_new_objfile_event): Use copy-initialization.
3748         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3749         (emit_clear_objfiles_event): Use copy-initialization.
3750         * python/py-signalevent.c (create_signal_event_object): Use
3751         copy-initialization.
3752         * python/py-threadevent.c (create_thread_event_object): Use
3753         copy-initialization.
3754
3755 2018-08-24  Pedro Alves  <palves@redhat.com>
3756             Simon Marchi  <simon.marchi@ericsson.com>
3757
3758         PR gdb/23379
3759         * python/py-continueevent.c: Include "gdbthread.h".
3760         (create_continue_event_object): Add intro comment.  Add 'ptid'
3761         parameter.  Use it to find thread to pass to
3762         create_thread_event_object.
3763         (emit_continue_event): Pass PTID down to
3764         create_continue_event_object.
3765         * python/py-event.h (py_get_event_thread): Declare.
3766         (create_thread_event_object): Remove default from 'thread'
3767         parameter.
3768         * python/py-stopevent.c (create_stop_event_object): Use
3769         py_get_event_thread.
3770         * python/py-threadevent.c (get_event_thread): Rename to ...
3771         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3772         and use it to find the thread.
3773         (create_thread_event_object): Assert that THREAD isn't null.
3774         Don't find the event thread here.
3775
3776 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3777
3778         * block.h (blockrange, blockranges): New struct declarations.
3779         (struct block): Add new field named `ranges'.
3780         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3781         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3782         macros for accessing ranges in struct block.
3783         (make_blockranges): New declaration.
3784         block.c (make_blockranges): New function.
3785         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3786         for block.
3787         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3788         * blockframe.c (cache_pc_function_block): New static global.
3789         (clear_pc_function_cache): Clear cache_pc_function_block.
3790         (find_pc_partial_function): Move comment to symtab.h.  Add
3791         support for non-contiguous blocks.
3792         * cli/cli-cmds.c (block.h): Include.
3793         (print_disassembly): Handle printing of non-contiguous blocks.
3794         (disassemble_current_function): Likewise.
3795         (disassemble_command): Likewise.
3796
3797         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3798         BLOCK_START.
3799         * blockframe.c (get_pc_function_start): Likewise.
3800         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3801         (gcc_symbol_address): Likewise.
3802         * compile/compile-object-run.c (compile_object_run): Likewise.
3803         * compile/compile.c (get_expr_block_and_pc): Likewise.
3804         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3805         (func_addr_to_tail_call_list): Likewise.
3806         * findvar.c (default_read_var_value): Likewise.
3807         * inline-frame.c (inline_frame_this_id): Likewise.
3808         (skip-inline_frames): Likewise.
3809         * infcmd.c (until_next_command): Likewise.
3810         * linespec.c (convert_linespec_to_sals): Likewise.
3811         * parse.c (parse_exp_in_context_1): Likewise.
3812         * printcmd.c (build_address_symbolic): likewise.
3813         (info_address_command): Likewise.
3814         symtab.c (find_function_start_sal): Likewise.
3815         (skip_prologue_sal): Likewise.
3816         (find_function_alias_target): Likewise.
3817         (find_gnu_ifunc): Likewise.
3818         * stack.c (find_frame_funname): Likewise.
3819         * symtab.c (fixup_symbol_section): Likewise.
3820         (find_function_start_sal): Likewise.
3821         (skip_prologue_sal): Likewsie.
3822         (find_function_alias_target): Likewise.
3823         (find_gnu_ifunc): Likewise.
3824         * tracepoint.c (info_scope_command): Likewise.
3825         * value.c (value_fn_field): Likewise.
3826
3827         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3828         in place of find_pc_partial_function.
3829         * blockframe.c (find_function_entry_range_from_pc): New function.
3830         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3831         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3832         for each range in a block.
3833
3834
3835 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3836
3837         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3838         incrementation.
3839
3840 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3841
3842         * solib-svr4.c (read_program_headers_from_bfd): Return
3843         gdb::optional<gdb::byte_vector>.
3844         (svr4_exec_displacement): Adjust.
3845
3846 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3847
3848         * solib-svr4.c (read_program_header): Return
3849         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3850         (find_program_interpreter): Return
3851         gdb::optional<gdb::byte_vector>.
3852         (scan_dyntag_auxv): Adjust.
3853         (enable_break): Adjust.
3854         (svr4_exec_displacement): Adjust.
3855
3856 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3857
3858         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3859         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3860
3861 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3862
3863         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3864         string_vprintf.
3865         * guile/scm-utils.c (gdbscm_printf): Likewise.
3866         * serial.c (serial_printf): Likewise.
3867         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3868
3869 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3870
3871         * stack.c (print_frame): Print frame architecture when printing on
3872         an MI output.
3873         * NEWS: Mention new "arch" attribute in frame output.
3874
3875 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3876
3877         * arch/aarch64.h (aarch64_regnum): Update comment.
3878
3879 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3880
3881         * NEWS: Add SVE to 8.2 section.
3882
3883 2018-08-21  Pedro Alves  <palves@redhat.com>
3884
3885         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3886         out from gdbscm_parse_function_args.
3887         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3888         gdbscm_parse_function_args_1.
3889
3890 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3891
3892         PR gdb/17816
3893         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3894         operator.
3895
3896 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3897
3898         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3899
3900 2018-08-19  Michael Spang  <spang@google.com>
3901
3902         PR gdb/11786
3903         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3904         for PT_TLS segments.
3905
3906 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3907
3908         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3909         dwarf_variable_value.
3910         * dwarf2-frame.c (class dwarf_expr_executor):
3911         Add override for dwarf_variable_value.
3912         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3913         (class symbol_needs_eval_context): Likewise.
3914         (indirect_synthetic_pointer): Add forward declaration.
3915         (sect_variable_value): New function.
3916         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3917         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3918         for DW_OP_GNU_variable_value.
3919
3920 2018-08-16  Tom Tromey  <tom@tromey.com>
3921
3922         * top.c (read_command_file): Update.
3923         (command_line_input): Remove "repeat" argument.
3924         * ada-lang.c (get_selections): Update.
3925         * linespec.c (decode_line_2): Update.
3926         * defs.h (command_line_input): Remove argument.
3927         * cli/cli-script.c (read_next_line): Update.
3928         * python/py-gdb-readline.c: Update.
3929
3930 2018-08-17  Tom Tromey  <tom@tromey.com>
3931
3932         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3933         command_line_input.
3934
3935 2018-08-15  Tom Tromey  <tom@tromey.com>
3936
3937         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3938
3939 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3940
3941         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3942         If used, use find_pc_partial_function to find address range
3943         to disassemble.
3944         * mi/mi-main.c (mi_cmd_list_features): Report
3945         "data-disassemble-a-option" feature.
3946         * NEWS: Mention new -data-disassemble option -a.
3947
3948 2018-08-13  Tom Tromey  <tom@tromey.com>
3949
3950         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3951
3952 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3953
3954         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3955         (aarch64_linux_collect_sve_regset): Likewise.
3956         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3957         * regcache.h (regcache_map_entry_size): New function.
3958
3959 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3960
3961         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3962         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3963         (SVE_HEADER_VL_LENGTH): Likewise.
3964         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3965         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3966         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3967         (SVE_HEADER_SIZE_OFFSET): Likewise.
3968         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3969         (SVE_HEADER_VL_OFFSET): Likewise.
3970         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3971         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3972         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3973         (SVE_HEADER_SIZE): Likewise.
3974         (aarch64_linux_core_read_vq): Add function.
3975         (aarch64_linux_core_read_description): Check for SVE section.
3976
3977 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3978
3979         * aarch64-fbsd-tdep.c
3980         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3981         collect_size.
3982         * aarch64-linux-tdep.c
3983         (aarch64_linux_iterate_over_regset_sections): Likewise.
3984         * alpha-linux-tdep.c
3985         (alpha_linux_iterate_over_regset_sections):
3986         * alpha-nbsd-tdep.c
3987         (alphanbsd_iterate_over_regset_sections): Likewise.
3988         * amd64-fbsd-tdep.c
3989         (amd64fbsd_iterate_over_regset_sections): Likewise.
3990         * amd64-linux-tdep.c
3991         (amd64_linux_iterate_over_regset_sections): Likewise.
3992         * arm-bsd-tdep.c
3993         (armbsd_iterate_over_regset_sections): Likewise.
3994         * arm-fbsd-tdep.c
3995         (arm_fbsd_iterate_over_regset_sections): Likewise.
3996         * arm-linux-tdep.c
3997         (arm_linux_iterate_over_regset_sections): Likewise.
3998         * corelow.c (get_core_registers_cb): Likewise.
3999         (core_target::fetch_registers): Likewise.
4000         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4001         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4002         * gdbarch.h (void): Regenerate.
4003         * gdbarch.sh: Add supply_size and collect_size.
4004         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4005         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4006         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4007         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4008         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4009         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4010         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4011         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4012         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4013         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4014         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4015         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4016         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4017         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4018         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
4019         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4020         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4021         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4022         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4023         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4024         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4025         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
4026         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4027         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4028         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4029         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4030         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4031         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4032         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4033         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4034
4035 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4036
4037         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4038         with string_printf.
4039
4040 2018-08-10  Keith Seitz  <keiths@redhat.com>
4041
4042         * compile/compile-c-support.c (add_code_header, add_code_footer):
4043         Move into policy class.
4044         (c_push_user_expression, pop_user_expression_nop)
4045         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4046         (compile_program): New host class.
4047         (c_compile_program): New typedef.
4048         (c_compute_porgram): Use c_compile_program.
4049
4050 2018-08-10  Keith Seitz  <keiths@redhat.com>
4051
4052         * compile/compile-internal.h (compile_instance::~compile_instance):
4053         Remove calls to htab_delete.
4054         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4055         * compile.c (compile_instance::compile_instance): Initialize
4056         htab unique pointers.
4057         (compile_instance::get_cached_type, compile_instance::insert_type)
4058         (compile_instance::error_symbol_once): Update for unique_ptr.
4059
4060 2018-08-10  Keith Seitz  <keiths@redhat.com>
4061
4062         * compile/compile-c-symbols.c (struct symbol_error)
4063         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4064         (compile_instance::insert_symbol_error)
4065         (compile_instance::error_symbol_once): Move to ...
4066         * compile/compile.c: ... here.
4067
4068 2018-08-10  Keith Seitz  <keiths@redhat.com>
4069
4070         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4071         instead of `new_compile_instance'.
4072         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4073         Update description.
4074         If the symbol error map is not initialized, create it.
4075         (generate_c_for_for_one_symbol): Do not check/initialize
4076         the symbol error map.
4077         * compile/compile-c-types.c (compile_c_instance): Make a class.
4078         Update all callers.
4079         (compile_instance::compile_instance): Initialize the type cache.
4080         (get_cached_type): New function.
4081         (insert_type): Update description.
4082         (compile_c_instance::m_default_cflags): Define.
4083         (convert_type): Update description.  Use get_cached_type.
4084         (delete_instance): Moved to destructor.
4085         (new_compile_instance): Moved to constructor.
4086         * compile/compile-c.h (compile_c_instance): Make class inheriting
4087         from compile_instance.
4088         <base>: Remove field.
4089         <type_map, symbol_err_map>: Move to base class.
4090         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4091         * compile/compile-internal.h (compile_instance): Make class.
4092         <type_map_t, symbol_err_map_t>: Define.
4093         <fe>: Rename to `m_gcc_fe'.
4094         <scope, block, gcc_target_options>: Add `m_' prefix.
4095         <m_type_map, m_symbol_err_map>: New fields, moved from
4096         compile_c_instance.
4097         <destroy>: Remove.
4098         (convert_type, new_compile_instance): Remove.
4099         * compile/compile.c (cleanup_compile_instance): Remove.
4100         (compile_to_object): Use unique_ptr to eliminate cleanups.
4101         (compile_instance::set_print_callback, compile_instance::version)
4102         (compile_instance::set_verbose)
4103         (compile_instance::set_driver_filename)
4104         (compile_instance::set_triplet_regexp)
4105         (compile_instance::set_arguments)
4106         (compile_instance::set_source_file)
4107         (compile_instance::compile): Define.
4108
4109 2018-08-10  Keith Seitz  <keiths@redhat.com>
4110
4111         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4112         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4113         gcc-c-fe.def to define C plugin.
4114         (delete_instance): Delete `c_plugin'.
4115         (new_compile_instance): Initialize `c_plugin'.
4116         * compile/compile-c.h: Include gcc_c_plugin.h.
4117         (struct compile_c_instance) <c_plugin>: New member.
4118         * gcc-c-plugin.h: New file.
4119         Update all callers with API change.
4120
4121 2018-08-10  Keith Seitz  <keiths@redhat.com>
4122
4123         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4124         (HFILES_NO_SRCDIR): ... to here.
4125         Add compile-internal.h and compile-c.h.
4126         * compile/compile-c-support.c: Include compile-c.h.
4127         * compile/compile-c-symbols.c: Include compile-c.h.
4128         (generate_c_for_variable_locations): Update comment.
4129         * compile/compile-c-types.c: Include compile-c.h.
4130         * compile/compile-c.h: New file -- moved C language declarations
4131         from other files here.
4132         * compile/compile-internal.h: Do not include hashtab.h or
4133         common/enum-flags.h.
4134         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4135         (gcc_convert_symbol, gcc_symbol_address)
4136         (generate_c_for_variable_locations, c_get_mode_for_size)
4137         (c_get_range_decl_name): Definitions moved to compile-c.h.
4138         * compile/compile-loc2c.c: Include compile-c.h.
4139
4140 2018-08-10  Keith Seitz  <keiths@redhat.com>
4141
4142         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4143         (c_symbol_substitution_name): ... this.
4144         Update all callers.
4145
4146 2018-08-10  Keith Seitz  <keiths@redhat.com>
4147
4148         * compile/compile-c-support.c (c_compute_program): Use
4149         unique_xmalloc_ptr to eliminate cleanup.
4150         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4151         Return a unique_xmalloc_ptr and eliminate cleanup.
4152         * compile/compile-internal.h (generate_c_for_variable_locations):
4153         Return unique_xmalloc_ptr and update description.
4154
4155 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4156
4157         * corelow.c (core_target::get_core_register_section): Rename
4158         min_size to section_min_size.
4159
4160 2018-08-09  Jim Wilson  <jimw@sifive.com>
4161
4162         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4163         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4164         * NEWS: Mention new GNU/Linux RISC-V target.
4165         * configure.host: Add riscv*-*-linux*.
4166         * configure.nat: Add riscv*.
4167         * configure.tgt: Add riscv*-*-linux*.
4168         * riscv-linux-nat.c: New file.
4169         * riscv-linux-tdep.c: New file.
4170
4171 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4172
4173         * infrun.c (resume): Make static, add forward declaration.
4174         (proceed): Update header comment.
4175         * infrun.h (resume): Delete declaration.
4176
4177 2018-08-09  Tom Tromey  <tom@tromey.com>
4178
4179         * riscv-tdep.h: Minor formatting fixes.
4180
4181 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4182
4183         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4184         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4185         (test_mkdir_recursive): Likewise.
4186         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4187
4188 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4189
4190         * valarith.c (value_subscripted_rvalue): If an array is not in
4191         memory, and we don't know the upper bound, then we can't know that
4192         the requested element exists or not.
4193
4194 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4195
4196         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4197         (target_options_to_string): Add comment.
4198
4199 2018-08-08  Tom Tromey  <tom@tromey.com>
4200
4201         * unittests/scoped_mmap-selftests.c: Check result of "write".
4202
4203 2018-08-08  Jim Wilson  <jimw@sifive.com>
4204
4205         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4206         (decode_register_index_short): New.
4207         (decode_j_type_insn, decode_cj_type_insn): New.
4208         (decode_b_type_insn, decode_cb_type_insn): New.
4209         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4210         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4211         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4212         is_c_sw_insn instead of is_sw_insn.
4213         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4214         (riscv_software_single_step): New.
4215         * riscv-tdep.h (riscv_software_single_step): Declare.
4216
4217         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4218         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4219
4220 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4221
4222         PR gdb/18050:
4223         * target.c (dispose_inferior): Don't dispose of inferiors that are
4224         already killed.
4225
4226 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4227
4228         * remote.c (remote_target::download_tracepoint): Change char* to
4229         const char*.
4230
4231 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4232
4233         * target.h (target_options_to_string): Return an std::string.
4234         * target.c (str_comma_list_concat_elem): Return void, use
4235         std::string.
4236         (do_option): Likewise.
4237         (target_options_to_string): Return an std::string.
4238         * linux-nat.c (linux_nat_target::wait): Adjust.
4239         * target-debug.h (target_debug_print_options): Adjust.
4240
4241 2018-08-07  Tom Tromey  <tom@tromey.com>
4242
4243         * Makefile.in (CPPFLAGS): New variable.
4244         (INTERNAL_CPPFLAGS): Use it.
4245
4246 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4247
4248         * NEWS: Mention the index cache.
4249
4250 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4251
4252         * common/pathstuff.h (get_standard_cache_dir): New.
4253         * common/pathstuff.c (get_standard_cache_dir): New.
4254         * build-id.h (build_id_to_string): New.
4255         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4256         DEBUG_STR_SUFFIX): Move to here.
4257         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4258         DEBUG_STR_SUFFIX): Move from there.
4259         (write_psymtabs_to_index): Make non-static, add basename
4260         parameter.  Write to temporary files, rename when done.
4261         (save_gdb_index_command): Adjust call to
4262         write_psymtabs_to_index.
4263         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4264         field.
4265         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4266         (get_gdb_index_contents_from_cache): New.
4267         (get_gdb_index_contents_from_cache_dwz): New.
4268         (dwarf2_initialize_objfile): Read index from cache.
4269         (dwarf2_build_psymtabs): Save to index.
4270         * dwarf-index-cache.h: New file.
4271         * dwarf-index-cache.c: New file.
4272         * dwarf-index-write.h: New file.
4273
4274 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4275
4276         * gnulib/aclocal.m4: Re-generate.
4277         * gnulib/config.in: Re-generate.
4278         * gnulib/configure: Re-generate.
4279         * gnulib/import/Makefile.am: Re-generate.
4280         * gnulib/import/Makefile.in: Re-generate.
4281         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4282         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4283         * gnulib/import/m4/mkdir.m4: New file.
4284         * gnulib/import/mkdir.c: New file.
4285         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4286         module.
4287
4288 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4289
4290         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4291         * common/scoped_mmap.c: New file.
4292         * common/scoped_mmap.h (destroy): New method.
4293         (~scoped_mmap, reset): Use destroy.
4294         (scoped_mmap): New move constructor.
4295         (mmap_file): New declaration.
4296         * unittests/scoped_mmap-selftests.c (test_normal,
4297         test_invalid_filename, run_tests): New functions.
4298         (_initialize_scoped_mmap_selftests): Register selftest.
4299
4300 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4301
4302         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4303         (read_gdb_index_from_buffer): ... this.  Remove section
4304         parameter, add buffer parameter.
4305         (get_gdb_index_contents_ftype,
4306         get_gdb_index_contents_dwz_ftype): New typedefs.
4307         (dwarf2_read_gdb_index): Add callback parameters to get the
4308         index contents.
4309         (get_gdb_index_contents_from_section): New.
4310         (dwarf2_initialize_objfile): Update call to
4311         dwarf2_read_gdb_index.
4312
4313 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4314
4315         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4316         (gdb_open_cloexec): Likewise.
4317         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4318         (commandline_from_pid): Likewise.
4319         (linux_xfer_osdata_threads): Likewise.
4320         (linux_xfer_osdata_fds): Likewise.
4321         * ada-lang.c (is_package_name): Likewise.
4322         * auxv.c (procfs_xfer_auxv): Likewise.
4323         * breakpoint.c (print_one_breakpoint_location): Use
4324         uiout::field_fmt.
4325         (print_one_catch_solib): Use string_printf.
4326         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4327         (add_pe_forwarded_sym): Likewise.
4328         * dwarf2read.c (create_type_unit_group): Likewise.
4329         (build_error_marker_type): Likewise.
4330         * infcall.c (get_function_name): Likewise.
4331         * valprint.c (print_converted_chars_to_obstack): Likewise.
4332         * xtensa-tdep.c (xtensa_register_type): Likewise.
4333
4334 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4335
4336         * remote.c (remote_target::download_tracepoint): Fix format
4337         string errors.
4338
4339 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4340
4341         * tracefile.c: Include common/byte-vector.h.
4342         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4343         with trace_regblock_size if needed.  Update uses of buf.
4344
4345 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4346
4347         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4348         std::vector<unsigned char>.
4349         * tracepoint.c (collection_list::collection_list): Remove
4350         m_regs_mask initializer from initializer list.  Resize
4351         m_regs_mask using the largest remote register number.
4352         (collection_list::add_remote_register): Remove size check on
4353         m_regs_mask.  Use at to access element.
4354         (collection_list::stringify): Change type of temp_buf to
4355         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4356         stringify the register mask.  Use pack_hex_byte for the register
4357         mask.
4358
4359 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4360
4361         * tracepoint.h (class collection_list) <add_register>: Remove.
4362         <add_remote_register, add_ax_registers, add_local_register>:
4363         Declare.
4364         <add_memrange>: Add scope parameter.
4365         * tracepoint.c (encode_actions_1): Likewise.
4366         (collection_list::add_register): Rename to ...
4367         (collection_list::add_remote_register): ... this.  Update
4368         comment.
4369         (collection_list::add_ax_registers, add_local_register): New
4370         methods.
4371         (collection_list::add_memrange): Add scope parameter.  Call
4372         add_local_register instead of add_register.
4373         (finalize_tracepoint_aexpr): New function.
4374         (collection_list::collect_symbol): Update calls to add_memrange.
4375         Call add_local_register instead of add_register.  Call
4376         add_ax_registers.  Call finalize_tracepoint_aexpr.
4377         (encode_actions_1): Get remote regnos for $reg action.  Call
4378         add_remote_register, add_ax_registers, and add_local_register.
4379         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4380         (validate_actionline): Call finalize_tracepoint_aexpr.
4381
4382 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4383
4384         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4385         Replace array buf with gdb::char_vector buf, of size
4386         get_remote_packet_size ().  Replace references to buf and
4387         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4388         and xsnprintf with snprintf.  Raise errors if the buffer is too
4389         small.
4390
4391 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4392
4393         * remote.c (remote_target::download_tracepoint): Fix the has_more
4394         predicate in the QTDP action list iteration.
4395
4396 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4397
4398         * remote.c (remote_target::download_tracepoint): Fix indentation
4399         in for block.
4400
4401 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4402
4403         * proc-api.c (_initialize_proc_api): Remove c, unused.
4404         * procfs.c (procfs_init_inferior): Remove signals, unused.
4405         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4406         unused.
4407
4408 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4409             Andrew Burgess  <andrew.burgess@embecosm.com>
4410
4411         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4412         'W_STOPCODE (0)' as this could be ambiguous.
4413
4414 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4415
4416         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4417         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4418         "ai_socktype").
4419
4420 2018-08-02  Tom Tromey  <tom@tromey.com>
4421
4422         PR symtab/16842.
4423         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4424         symbols.
4425         (process_structure_scope): Likewise.
4426
4427 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4428
4429         PR gdb/22629:
4430         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4431         kill inferior.
4432
4433 2018-08-02  Tom Tromey  <tom@tromey.com>
4434
4435         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4436         (darwin_suspend_inferior, darwin_resume_inferior)
4437         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4438         (darwin_check_new_threads): Check result of get_darwin_inferior.
4439
4440 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4441
4442         GDB 8.1.1 released.
4443
4444 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4445
4446         * varobj.c (varobj_get_path_expr_parent): Report an error if
4447         parent is a dynamic varobj.
4448
4449 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4450
4451         * gnulib/aclocal.m4: Re-generate.
4452         * gnulib/config.in: Re-generate.
4453         * gnulib/configure: Re-generate.
4454         * gnulib/import/Makefile.in: Re-generate.
4455         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4456         * gnulib/import/m4/onceonly.m4: Re-generate.
4457
4458 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4459
4460         * target-descriptions.c (struct xml_test_tdesc): New.
4461         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4462         (record_xml_tdesc): Update.
4463         (maintenance_check_xml_descriptions): Update.
4464         * target-descriptions.h (record_xml_tdesc): Update comment.
4465
4466 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4467
4468         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4469         checking array bounds are defined.
4470
4471 2018-07-30  Tom Tromey  <tom@tromey.com>
4472
4473         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4474         irreflexivity violation.
4475
4476 2018-07-30  Tom Tromey  <tom@tromey.com>
4477
4478         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4479         * value.c (unpack_long): Remove lint code.
4480         * valops.c (value_ind): Remove lint code.
4481         * valarith.c (value_x_binop, value_x_unop, value_equal)
4482         (value_pos): Remove lint code.
4483
4484 2018-07-28  Tom de Vries  <tdevries@suse.de>
4485
4486         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4487         with undefined upper bound as <optimized out>.
4488
4489 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4490
4491         * gcore.in: Rename variable "name" to "prefix".  Expand
4492         "usage" text.
4493
4494 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4495
4496         * windows-nat.c (windows_nat_target::create_inferior): Update to
4497         call close() in global namespace.
4498
4499 2018-07-26  Tom Tromey  <tom@tromey.com>
4500
4501         * dwarf-index-write.c (add_address_entry): Don't add objfile
4502         offsets.
4503         * dbxread.c (find_stab_function): Rename from
4504         find_stab_function_addr.  Return a bound_minimal_symbol.
4505         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4506         Don't add objfile offsets.
4507         (end_psymtab): Use raw_text_low, raw_text_high,
4508         MSYMBOL_VALUE_RAW_ADDRESS.
4509         (read_ofile_symtab): Update.
4510         (process_one_symbol): Update.
4511         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4512         offsets.
4513         (dw2_relocate): Remove.
4514         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4515         searching addrmap.
4516         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4517         Update.
4518         (process_psymtab_comp_unit_reader, add_partial_symbol)
4519         (add_partial_subprogram, dwarf2_ranges_read): Update.
4520         (load_partial_dies): Update.
4521         (add_address_entry): Don't add objfile offsets.
4522         (dwarf2_build_include_psymtabs): Update.
4523         (create_addrmap_from_aranges): Don't add objfile offsets.
4524         (dw2_find_pc_sect_compunit_symtab): Update.
4525         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4526         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4527         Update.
4528         (parse_partial_symbols): Don't add objfile offsets.  Use
4529         raw_text_low, raw_text_high.  Update.
4530         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4531         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4532         or call 'relocate' quick function.  Clear psymbol_map.
4533         * psympriv.h (struct partial_symbol) <address>: Add section
4534         offset.
4535         <set_unrelocated_address>: Rename from set_address.
4536         <raw_text_low, raw_text_high>: New methods.
4537         <text_low, text_high>: Add objfile parameter.
4538         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4539         set_unrelocated_address.
4540         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4541         (find_pc_psymbol): Update.
4542         (fixup_psymbol_section, relocate_psymtabs): Remove.
4543         (dump_psymtab, psym_functions): Update.
4544         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4545         parameter.
4546         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4547         (start_psymtab_common): Update.
4548         * symfile-debug.c (debug_qf_relocate): Remove.
4549         (debug_sym_quick_functions): Update.
4550         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4551         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4552         Update.
4553
4554 2018-07-26  Tom Tromey  <tromey@redhat.com>
4555
4556         * dbxread.c (end_psymtab): Use text_high_valid and
4557         text_low_valid.
4558         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4559         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4560         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4561         Update comment.
4562         <text_low_valid, text_high_valid>: New fields.
4563         <set_text_low, set_text_high>: Update.
4564         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4565
4566 2018-07-26  Tom Tromey  <tom@tromey.com>
4567
4568         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4569         Update.
4570         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4571         textlow and texthigh fields.
4572         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4573         Update.
4574         * mdebugread.c (parse_lines, parse_partial_symbols)
4575         (psymtab_to_symtab_1): Update.
4576         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4577         Rename fields.  Update comment.  Now private.
4578         <text_low, text_high, set_text_low, set_text_high>: New methods.
4579         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4580         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4581         (start_psymtab_common, maintenance_info_psymtabs)
4582         (maintenance_check_psymtabs): Update.
4583         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4584         texthigh fields.
4585         (scan_xcoff_symtab): Update.
4586
4587 2018-07-26  Tom Tromey  <tromey@redhat.com>
4588
4589         * psympriv.h (struct partial_symbol) <unrelocated_address,
4590         address, set_address>: New methods.
4591         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4592         (fixup_psymbol_section, relocate_psymtabs): Update.
4593         (print_partial_symbols): Add 'objfile' parameter.  Update.
4594         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4595         Update.
4596
4597 2018-07-26  Tom Tromey  <tom@tromey.com>
4598
4599         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4600         (debug_names::write_psymbols): Update.
4601         * psympriv.h (struct partial_symbol): Derive from
4602         general_symbol_info.
4603         <obj_section>: New method.
4604         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4605         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4606         (find_pc_sect_psymbol, fixup_psymbol_section)
4607         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4608         (print_partial_symbols, recursively_search_psymtabs)
4609         (compare_psymbols, psymbol_hash, psymbol_compare)
4610         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4611         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4612
4613 2018-07-26  Tom Tromey  <tromey@redhat.com>
4614
4615         * dbxread.c (end_psymtab): Remove dead code.
4616
4617 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4618
4619         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4620         DWARF unwinders are disabled.
4621         * dwarf2-frame.c: Add dwarf2read.h include.
4622         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4623         disabled.
4624         (dwarf2_frame_unwinders_enabled_p): Define.
4625         (show_dwarf_unwinders_enabled_p): New function.
4626         (_initialize_dwarf2_frame): Register switch to control DWARF
4627         unwinder use.
4628         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4629         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4630         (show_dwarf_cmdlist): Remove static keyword.
4631         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4632         (show_dwarf_cmdlist): Declare.
4633         * NEWS: Document new feature.
4634
4635 2018-07-26  Tom de Vries  <tdevries@suse.de>
4636
4637         PR breakpoints/23366
4638         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4639
4640 2018-07-26  Tom de Vries  <tdevries@suse.de>
4641
4642         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4643         DW_AT_count can't be translated to a dynamic prop.
4644
4645 2018-07-25  Tom de Vries  <tdevries@suse.de>
4646
4647         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4648         try/catch.
4649
4650 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4651
4652         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4653
4654 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4655
4656         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4657
4658 2018-07-24  Keith Seitz  <keiths@redhat.comt
4659
4660         PR symtab/23010
4661         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4662         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4663         instead of add_symbol_to_list.
4664         (read_file_scope): Call prepare_one_comp_unit before reading
4665         any other DIEs.
4666
4667 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4668
4669         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4670
4671 2018-07-24  Tom Tromey  <tom@tromey.com>
4672
4673         * utils.c (malloc, realloc, free): Don't declare.
4674         * configure, config.in: Rebuild.
4675         * configure.ac: Don't check for declarations of free, malloc, or
4676         realloc.
4677
4678 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4679
4680         * aarch64-linux-nat.c
4681         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4682         variable.
4683         * arm-linux-nat.c (fetch_regs): Likewise.
4684         (store_regs): Likewise.
4685         (fetch_vfp_regs): Likewise.
4686         (store_vfp_regs): Likewise.
4687         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4688         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4689         (arm_linux_nat_target::insert_watchpoint): Likewise.
4690         (arm_linux_nat_target::remove_watchpoint): Likewise.
4691         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4692         Likewise.
4693         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4694         Likewise.
4695         * ppc-linux-nat.c (fetch_register): Likewise.
4696         (fetch_all_gp_regs): Likewise.
4697         (fetch_ppc_registers): Likewise.
4698         (store_all_gp_regs): Likewise.
4699         (store_ppc_registers): Likewise.
4700         (hwdebug_insert_point): Likewise.
4701         (can_use_watchpoint_cond_accel): Likewise.
4702         * remote-sim.c (gdb_os_write_stdout): Likewise.
4703
4704 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4705             Tom Tromey  <tom@tromey.com>
4706
4707         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4708         test for it.
4709         * configure: Rebuild.
4710
4711 2018-07-22  Tom Tromey  <tom@tromey.com>
4712
4713         * regformats/regdat.sh: Define xmltarget_${name} inside
4714         #ifndef IN_PROCESS_AGENT.
4715
4716 2018-07-22  Tom Tromey  <tom@tromey.com>
4717
4718         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4719
4720 2018-07-22  Tom Tromey  <tom@tromey.com>
4721
4722         * symfile.c (reread_symbols): Notify iter, not objfile.
4723
4724 2018-07-22  Tom Tromey  <tom@tromey.com>
4725
4726         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4727         Use arch_ops.
4728         (ravenscar_thread_target::prepare_to_store): Likewise.
4729
4730 2018-07-22  Tom Tromey  <tom@tromey.com>
4731
4732         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4733         unused variable.  Call value_fetch_lazy when needed.
4734         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4735         Remove unused variable.  Call value_fetch_lazy when needed.
4736
4737 2018-07-22  Tom Tromey  <tom@tromey.com>
4738
4739         * m32c-tdep.c (mark_dma): Return void.
4740         (make_regs): Remove unused declarations.
4741
4742 2018-07-22  Tom Tromey  <tom@tromey.com>
4743
4744         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4745         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4746         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4747         bkscm_get_valid_block_smob_arg_unsafe for effect.
4748
4749 2018-07-22  Tom Tromey  <tom@tromey.com>
4750
4751         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4752         value_type.
4753
4754 2018-07-22  Tom Tromey  <tom@tromey.com>
4755
4756         * windows-nat.c (saved_context): Conditionally define.
4757         * remote.c (remote_target::remote_btrace_maybe_reopen):
4758         Conditionally declare "warned".
4759         * inflow.c (sigquit_ours): Conditionally define.
4760         (new_tty): Move "tty" declaration inside #if.
4761         * guile/guile.c (guile_datadir): Conditionally define.
4762         * charset.c (set_be_le_names): Move some declarations inside #if.
4763         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4764         #if.
4765         (parse_xml_btrace_conf): Likewise.
4766
4767 2018-07-22  Tom Tromey  <tom@tromey.com>
4768
4769         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4770
4771 2018-07-22  Tom Tromey  <tom@tromey.com>
4772
4773         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4774         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4775         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4776         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4777         * stack.c (frame_apply_level_command): Remove unused variable.
4778         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4779         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4780         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4781         unused variable.
4782         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4783         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4784         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4785         variable.
4786         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4787         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4788         variable.
4789         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4790         Remove unused variable.
4791         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4792         variable.
4793         * common/tdesc.c (print_xml_feature::visit): Remove unused
4794         variable.
4795         * compile/compile-object-load.c (store_regs): Remove unused
4796         variables.
4797         * complaints.c (clear_complaints): Remove unused variable.
4798         * corelow.c (core_target_open): Remove unused variable.
4799         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4800         variable.
4801         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4802         variable.
4803         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4804         variable.
4805         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4806         variable.
4807         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4808         variable.
4809         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4810         variable.
4811         * ia64-tdep.c (examine_prologue): Remove unused variable.
4812         * infcall.c (run_inferior_call): Remove unused variable.
4813         * inferior.c (exit_inferior): Remove unused variable.
4814         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4815         * linespec.c (decode_line_2): Remove unused variable.
4816         * linux-nat.c (super_close): Remove.
4817         * linux-tdep.c (linux_info_proc): Remove unused variable.
4818         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4819         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4820         Remove unused variable.
4821         * parse.c (find_minsym_type_and_address): Remove unused variable.
4822         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4823         variable.
4824         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4825         variable.
4826         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4827         variables.
4828         * record-btrace.c (record_btrace_target::store_registers): Remove
4829         unused variable.
4830         (cmd_show_record_btrace_cpu): Remove unused variable.
4831         * riscv-tdep.c (riscv_register_reggroup_p)
4832         (riscv_push_dummy_call, riscv_return_value): Remove unused
4833         variable.
4834         * rust-exp.y (literal): Remove unused variable.
4835         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4836         unused variable.
4837         <STRUCTOP_ANONYMOUS>: Likewise.
4838         * s390-linux-tdep.c (s390_linux_init_abi_31)
4839         (s390_linux_init_abi_64): Remove unused variable.
4840         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4841         (file_select_thread, net_windows_open, _initialize_ser_windows):
4842         Remove unused variables.
4843         * symtab.c (find_pc_sect_line): Remove unused variable.
4844         * target-memory.c (compute_garbled_blocks): Remove unused
4845         variable.
4846         (target_write_memory_blocks): Remove unused variable.
4847         * target.c (target_stack::unpush): Remove unused variables.
4848         * tracepoint.c (start_tracing, all_tracepoint_actions)
4849         (merge_uploaded_trace_state_variables)
4850         (print_one_static_tracepoint_marker): Remove unused variable.
4851         * unittests/basic_string_view/element_access/char/1.cc (test01):
4852         Remove unused variable.
4853         * windows-nat.c (windows_continue, windows_add_all_dlls)
4854         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4855         Remove unused variables.
4856
4857 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4858
4859         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4860         attr_profile in HAVE_ELF.
4861         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4862         HAVE_ELF.
4863
4864 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4865
4866         * frame.c (frame_register_unwind): Change parameter name.
4867         (frame_unwind_register): Likewise.
4868         (frame_unwind_register_value): Likewise.
4869         (frame_unwind_register_signed): Likewise.
4870         (frame_unwind_register_unsigned): Likewise.
4871         * frame.h (frame_register_unwind): Likewise.
4872         (frame_unwind_register): Likewise.
4873         (frame_unwind_register_value): Likewise.
4874         (frame_unwind_register_signed): Likewise.
4875         (frame_unwind_register_unsigned): Likewise.
4876         (frame_unwind_arch): Likewise.
4877
4878 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4879
4880         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4881         ISA maintenance.
4882
4883 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4884
4885         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4886         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4887         hand.
4888
4889 2018-07-20  Keith Seitz  <keiths@redhat.com>
4890
4891         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4892         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4893         m_compunit_symtab, m_language>: Add "m_" prefix.
4894         Update all uses.
4895         * buildsym.c: Update all uses.
4896
4897 2018-07-20  Tom Tromey  <tom@tromey.com>
4898
4899         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4900         * buildsym.h (record_line_ftype): Remove typedef.
4901
4902 2018-07-20  Tom Tromey  <tom@tromey.com>
4903
4904         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4905         (end_expandable_symtab): Likewise.
4906         (end_symtab_get_static_block): Likewise.
4907         (end_symtab_from_static_block): Likewise.
4908         * buildsym-legacy.c (augment_type_symtab): Remove.
4909         (end_expandable_symtab): Remove.
4910         (end_symtab_get_static_block): Remove.
4911         (end_symtab_from_static_block): Remove.
4912
4913 2018-07-20  Tom Tromey  <tom@tromey.com>
4914
4915         * dwarf2read.c: Include buildsym.h.
4916         (struct dwarf2_cu) <builder>: New method.
4917         (fixup_go_packaging): Update.
4918         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4919         use scoped_free_pendings.
4920         (using_directives): Add "cu" parameter, remove "language".
4921         (read_import_statement, setup_type_unit_groups, )
4922         (read_func_scope, read_lexical_block_scope)
4923         (dwarf2_record_block_ranges, read_namespace): Update.
4924         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4925         (lnp_state_machine::handle_end_sequence): Update.
4926         (class lnp_state_machine) <m_cu>: New member.
4927         <m_record_line_callback>: Remove.
4928         <m_currently_recording_lines>: New member.
4929         (lnp_state_machine::handle_set_file): Update.
4930         (noop_record_line): Remove.
4931         (dwarf_record_line_p): Add cu parameter.
4932         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4933         (lnp_state_machine::record_line)
4934         (lnp_state_machine::lnp_state_machine)
4935         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4936         (dwarf_decode_lines): Update.
4937         (dwarf2_start_subfile): Add cu parameter.
4938         (dwarf2_start_symtab, new_symbol): Update.
4939         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4940         Remove dwarf2_per_objfile parameter.
4941         (dwarf_decode_macros): Update.
4942
4943 2018-07-20  Tom Tromey  <tom@tromey.com>
4944
4945         * stabsread.c (define_symbol): Update.
4946         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4947         * dwarf2read.c (new_symbol): Update.
4948         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4949         * cp-namespace.c: Include buildsym.h.
4950         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4951         * buildsym-legacy.c (get_buildsym_compunit): New function.
4952
4953 2018-07-20  Tom Tromey  <tom@tromey.com>
4954
4955         * xcoffread.c: Include buildsym-legacy.h.
4956         * windows-nat.c: Include buildsym-legacy.h.
4957         * stabsread.c: Include buildsym-legacy.h.
4958         * mdebugread.c: Include buildsym-legacy.h.
4959         * buildsym-legacy.h: New file.
4960         * buildsym-legacy.c: New file, from buildsym.c.
4961         * go32-nat.c: Include buildsym-legacy.h.
4962         * dwarf2read.c: Include buildsym-legacy.h.
4963         * dbxread.c: Include buildsym-legacy.h.
4964         * cp-namespace.c: Include buildsym-legacy.h.
4965         * coffread.c: Include buildsym-legacy.h.
4966         * buildsym.h: Move some contents to buildsym-legacy.h.
4967         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4968         buildsym-legacy.c.
4969         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4970
4971 2018-07-20  Tom Tromey  <tom@tromey.com>
4972
4973         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4974         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4975         (buildsym_compunit::buildsym_compunit)
4976         (buildsym_compunit::~buildsym_compunit)
4977         (buildsym_compunit::get_macro_table): Define.
4978
4979 2018-07-20  Tom Tromey  <tom@tromey.com>
4980
4981         * buildsym.c (reset_symtab_globals): Remove.
4982         (buildsym_compunit::end_symtab_from_static_block): Update.
4983         (buildsym_compunit::augment_type_symtab): Update.
4984         (end_symtab_from_static_block): Call free_buildsym_compunit.
4985         (augment_type_symtab, end_symtab, end_expandable_symtab):
4986         Likewise.
4987
4988 2018-07-20  Tom Tromey  <tom@tromey.com>
4989
4990         * arch-utils.c: Do not include buildsym.h.
4991         * mipsread.c: Do not include buildsym.h.
4992         * machoread.c: Do not include buildsym.h.
4993         * elfread.c: Do not include buildsym.h.
4994
4995 2018-07-20  Tom Tromey  <tom@tromey.com>
4996
4997         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4998         initialization.
4999         (buildsym_compunit): Add new constructor.
5000         (struct buildsym_compunit) <get_last_source_file, finish_block,
5001         record_block_range, start_subfile, patch_subfile_names,
5002         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5003         set_last_source_start_addr, get_last_source_start_addr,
5004         get_local_using_directives, set_local_using_directives,
5005         get_global_using_directives, outermost_context_p,
5006         get_current_context_stack, get_context_stack_depth,
5007         get_current_subfile, get_local_symbols, get_file_symbols,
5008         get_global_symbols, record_debugformat, record_producer,
5009         push_context, pop_context, end_symtab_get_static_block,
5010         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5011         New public methods.
5012         <record_pending_block, finish_block_internal, make_blockvector,
5013         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5014         private methods.
5015         Update all users.
5016
5017 2018-05-22  Tom Tromey  <tom@tromey.com>
5018
5019         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5020         parameter.
5021         (finish_block_internal): Update.
5022
5023 2018-07-20  Tom Tromey  <tom@tromey.com>
5024
5025         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5026         parameter.
5027         (finish_block_internal): Update.
5028
5029 2018-07-20  Tom Tromey  <tom@tromey.com>
5030
5031         * buildsym.h (EXTERN): Don't define or undef.
5032         * buildsym.c (EXTERN): Don't define.
5033
5034 2018-07-20  Tom Tromey  <tom@tromey.com>
5035
5036         * buildsym.c: Remove TODO comment.
5037
5038 2018-07-20  Tom Tromey  <tom@tromey.com>
5039
5040         * coffread.c (coff_symtab_read): Update.
5041         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5042         (xcoff_new_init): Update.
5043         * mipsread.c (mipscoff_new_init): Update.
5044         * mdebugread.c (mdebug_build_psymtabs): Update.
5045         * elfread.c (elf_new_init): Update.
5046         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5047         Update.
5048         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5049         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5050         (stabsect_build_psymtabs): Update.
5051         * buildsym.h (buildsym_init): Don't declare.
5052         * buildsym.c: Update comment.
5053         (prepare_for_building): Remove.
5054         (start_symtab, restart_symtab): Update.
5055         (reset_symtab_globals): Update comment.
5056         (buildsym_init): Remove.
5057
5058 2018-07-20  Tom Tromey  <tom@tromey.com>
5059
5060         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5061         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5062         (read_enum_type, common_block_start, common_block_end)
5063         (cleanup_undefined_types_1, finish_global_stabs): Update.
5064         * mdebugread.c (psymtab_to_symtab_1): Update.
5065         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5066         (read_lexical_block_scope, new_symbol): Update.
5067         * dbxread.c (process_one_symbol): Update.
5068         * coffread.c (coff_symtab_read, process_coff_symbol)
5069         (coff_read_enum_type): Update.
5070         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5071         declare.
5072         (get_local_symbols, get_file_symbols, get_global_symbols): New
5073         functions.
5074         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5075         m_global_symbols.
5076         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5077         (~scoped_free_pendings): Update.
5078         (finish_block, prepare_for_building, reset_symtab_globals)
5079         (end_symtab_get_static_block, end_symtab_with_blockvector)
5080         (augment_type_symtab, push_context): Update.
5081         (get_local_symbols, get_file_symbols, get_global_symbols): New
5082         functions.
5083         (buildsym_init): Update.
5084
5085 2018-07-20  Tom Tromey  <tom@tromey.com>
5086
5087         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5088         (process_full_type_unit): Likewise.
5089         (dwarf2_start_symtab): Set list_in_scope.
5090
5091 2018-07-20  Tom Tromey  <tom@tromey.com>
5092
5093         * dwarf2read.c (process_psymtab_comp_unit_reader)
5094         (build_type_psymtabs_reader): Do not set list_in_scope.
5095
5096 2018-07-20  Tom Tromey  <tom@tromey.com>
5097
5098         * buildsym.c (free_pendings): Remove.
5099         (add_symbol_to_list, scoped_free_pendings)
5100         (finish_block_internal, buildsym_init): Update.
5101
5102 2018-07-20  Tom Tromey  <tom@tromey.com>
5103
5104         * xcoffread.c (read_xcoff_symtab): Update.
5105         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5106         Update.
5107         * dbxread.c (process_one_symbol): Update.
5108         * coffread.c (coff_symtab_read): Update.
5109         * buildsym.h (finish_block): Update.
5110         * buildsym.c (finish_block): Remove "listhead" argument.
5111         (end_symtab_get_static_block): Update.
5112
5113 2018-07-20  Tom Tromey  <tom@tromey.com>
5114
5115         * buildsym.h (class scoped_free_pendings): Remove constructor.
5116         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5117         method.
5118         <m_pending_block_obstack, m_pending_blocks>: New members.
5119         (pending_block_obstack, pending_blocks): Remove.
5120         (scoped_free_pendings::scoped_free_pendings): Default.
5121         (~scoped_free_pendings): Update.
5122         (free_pending_blocks): Remove.
5123         (finish_block_internal, record_pending_block, make_blockvector)
5124         (end_symtab_get_static_block, augment_type_symtab, push_context)
5125         (buildsym_init): Update.
5126
5127 2018-07-20  Tom Tromey  <tom@tromey.com>
5128
5129         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5130         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5131         members.
5132         (pending_addrmap, pending_addrmap_obstack)
5133         (pending_addrmap_interesting): Remove.
5134         (scoped_free_pendings, record_block_range, make_blockvector)
5135         (prepare_for_building, reset_symtab_globals, buildsym_init):
5136         Update.
5137
5138 2018-07-20  Tom Tromey  <tom@tromey.com>
5139
5140         * xcoffread.c (process_linenos): Update.
5141         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5142         * mdebugread.c (psymtab_to_symtab_1): Update.
5143         * dwarf2read.c (setup_type_unit_groups)
5144         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5145         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5146         * dbxread.c (process_one_symbol): Update.
5147         * coffread.c (coff_symtab_read, enter_linenos)
5148         (process_coff_symbol): Update.
5149         * buildsym.h (current_subfile): Don't declare.
5150         (get_current_subfile): Declare.
5151         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5152         member.
5153         (start_subfile, free_buildsym_compunit, push_subfile)
5154         (prepare_for_building, start_symtab): Update.
5155         (get_current_subfile): New function.
5156
5157 2018-07-20  Tom Tromey  <tom@tromey.com>
5158
5159         * coffread.c (coff_symtab_read): Update.
5160         * xcoffread.c (read_xcoff_symtab): Update.
5161         * dwarf2read.c (new_symbol): Update.
5162         (read_func_scope, read_lexical_block_scope): Update.
5163         * dbxread.c (process_one_symbol): Update.
5164         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5165         (outermost_context_p): Remove macro.
5166         (outermost_context_p, get_current_context_stack)
5167         (get_context_stack_depth): Declare.
5168         (pop_context): Return struct context_stack.
5169         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5170         member.
5171         (context_stack_size): Remove.
5172         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5173         (prepare_for_building, end_symtab_get_static_block)
5174         (augment_type_symtab, push_context): Update.
5175         (pop_context): Return struct context_stack.
5176         (outermost_context_p, get_current_context_stack)
5177         (get_context_stack_depth): New functions.
5178         (buildsym_init): Update.
5179
5180 2018-07-20  Tom Tromey  <tom@tromey.com>
5181
5182         * rust-exp.y: Now a pure parser.  Update all rules.
5183         (%union): Move earlier.
5184         (current_parser, work_obstack): Remove globals.
5185         (rust_parser, ~rust_parser): Update.
5186         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5187         lex_character, lex_number, lex_string, lex_identifier,
5188         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5189         convert_name, convert_params_to_expression,
5190         convert_ast_to_expression, ast_basic_type, ast_operation,
5191         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5192         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5193         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5194         ast_array_type, ast_slice_type, ast_reference_type,
5195         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5196         (rust_parse): Update.
5197         (rustyyerror, rustyylex): Add parser parameter.
5198         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5199         (rust_lex_stringish_test, rust_lex_test_sequence)
5200         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5201         (rust_lex_test_push_back, rust_lex_tests): Update.
5202
5203 2018-07-19  Pedro Alves  <palves@redhat.com>
5204
5205         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5206         gdb::unique_xmalloc_ptr.
5207         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5208         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5209         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5210         copy-initialization.
5211         * guile/scm-pretty-print.c (ppscm_print_children): Use
5212         gdb::unique_xmalloc_ptr instead of cleanups.
5213         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5214         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5215         gdb::unique_xmalloc_ptr.
5216         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5217         Adjust to use gdb::unique_xmalloc_ptr.
5218         * guile/scm-utils.c (extract_arg): Adjust.
5219         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5220         gdb::unique_xmalloc_ptr instead of a cleanup.
5221
5222 2018-07-19  Tom Tromey  <tom@tromey.com>
5223
5224         * utils.c (do_value_free_to_mark)
5225         (make_cleanup_value_free_to_mark): Remove.
5226         * utils.h (make_cleanup_value_free_to_mark): Remove.
5227
5228 2018-07-19  Pedro Alves  <palves@redhat.com>
5229
5230         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5231         forwarding reference.
5232
5233 2018-07-18  Pedro Alves  <palves@redhat.com>
5234
5235         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5236         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5237         cleanup.
5238
5239 2018-07-18  Pedro Alves  <palves@redhat.com>
5240
5241         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5242         exceptions.
5243         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5244         (gdbscm_wrap): New.
5245         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5246         directly instead of a cleanup.
5247         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5248         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5249         (vlscm_binop_gdbthrow): New, factored out from ...
5250         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5251         (vlscm_rich_compare): Use gdbscm_wrap.
5252         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5253         instead of a cleanup.
5254         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5255         cleanup.
5256         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5257         Use xfree directly instead of a cleanup.
5258         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5259         Adjust to use gdbscm_wrap and scoped_value_mark.
5260         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5261         (gdbscm_value_address, gdbscm_value_dereference)
5262         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5263         scoped_value_mark.
5264         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5265         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5266         scoped_value_mark.
5267         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5268         gdbscm_wrap and scoped_value_mark.
5269         (gdbscm_value_to_string): Use xfree directly instead of a
5270         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5271         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5272         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5273         scoped_value_mark.
5274         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5275         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5276         scoped_value_mark.
5277         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5278         gdbscm_wrap.
5279
5280 2018-07-18  Tom de Vries  <tdevries@suse.de>
5281
5282         * findvar.c (default_read_var_value): Also resolve dynamic type for
5283         LOC_OPTIMIZED_OUT vars.
5284
5285 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5286
5287         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5288         decoding.
5289
5290 2018-07-17  Tom Tromey  <tom@tromey.com>
5291
5292         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5293         (compute_enum_list, pascm_set_param_value_x)
5294         (gdbscm_parameter_value): Update.
5295         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5296         (gdbscm_scm_to_host_string): Update.
5297         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5298         Update.
5299         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5300         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5301         * guile/scm-string.c (gdbscm_scm_to_string): Return
5302         unique_xmalloc_ptr.
5303         (gdbscm_scm_to_host_string): Likewise.
5304
5305 2018-07-17  Tom Tromey  <tom@tromey.com>
5306
5307         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5308         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5309         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5310         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5311         unique_xmalloc_ptr.
5312
5313 2018-07-17  Tom Tromey  <tom@tromey.com>
5314
5315         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5316         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5317         Update.
5318         * guile/scm-cmd.c (cmdscm_function): Update.
5319         * guile/scm-pretty-print.c
5320         (ppscm_print_exception_unless_memory_error): Update.
5321         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5322         Return unique_xmalloc_ptr.
5323
5324 2018-07-17  Tom Tromey  <tom@tromey.com>
5325
5326         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5327         Use string_printf.
5328
5329 2018-07-17  Jim Wilson  <jimw@sifive.com>
5330
5331         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5332         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5333         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5334         unecessary braces after EF_RISCV_RVC test.  Delete call to
5335         set_gdbarch_decr_pc_after_break.
5336
5337         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5338         RISCV_LAST_FP_REGNUM + 1.
5339         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5340
5341 2018-07-17  Tom Tromey  <tom@tromey.com>
5342
5343         * configure.ac: Remove --disable-gdbcli.
5344         * configure: Rebuild.
5345         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5346         (SUBDIR_CLI_CFLAGS): Remove.
5347         (SFILES): Use SUBDIR_CLI_SRCS.
5348         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5349
5350 2018-07-17  Tom Tromey  <tom@tromey.com>
5351
5352         PR gdb/18624:
5353         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5354
5355 2018-07-16  Jim Wilson  <jimw@sifive.com>
5356
5357         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5358
5359 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5360
5361         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5362         variable.
5363         (libunwind_frame_sniffer): Likewise.
5364         (libunwind_frame_prev_register): Likewise.
5365         (libunwind_sigtramp_frame_sniffer): Likewise.
5366         * ia64-tdep.c (ia64_access_reg): Likewise.
5367         (ia64_access_rse_reg): Likewise.
5368         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5369         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5370
5371 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5372
5373         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5374
5375 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5376
5377         * remote-sim.c (gdbsim_target::close,
5378         gdbsim_target::mourn_inferior): Remove unused variables.
5379
5380 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5381
5382         * ia64-tdep.c (ktab_buf): New global.
5383         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5384         (get_kernel_table): Adjust.
5385
5386 2018-07-16  Tom Tromey  <tom@tromey.com>
5387
5388         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5389         * dwarf2read.c (using_directives, new_symbol): Use
5390         outermost_context_p.
5391         * dbxread.c (process_one_symbol): Use outermost_context_p.
5392         * coffread.c (coff_symtab_read): Use outermost_context_p.
5393
5394 2018-07-16  Tom Tromey  <tom@tromey.com>
5395
5396         * dwarf2read.c (using_directives, read_func_scope)
5397         (read_lexical_block_scope): Update.
5398         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5399         * buildsym.h (local_using_directives, global_using_directives):
5400         Don't declare.
5401         (get_local_using_directives, set_local_using_directives)
5402         (get_global_using_directives): Declare.
5403         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5404         m_global_using_directives>: New members.
5405         (finish_block_internal, prepare_for_building)
5406         (reset_symtab_globals, end_symtab_get_static_block)
5407         (push_context): Update.
5408         (get_local_using_directives, set_local_using_directives)
5409         (get_global_using_directives): New functions.
5410         (buildsym_init): Update.
5411
5412 2018-07-16  Tom Tromey  <tom@tromey.com>
5413
5414         * xcoffread.c (xcoff_initial_scan): Don't call
5415         free_pending_blocks.
5416         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5417         * buildsym.h (class scoped_free_pendings): Add constructor.
5418         (free_pending_blocks): Don't declare.
5419         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5420         (free_pending_blocks): Now static.
5421
5422 2018-07-16  Tom Tromey  <tom@tromey.com>
5423
5424         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5425         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5426         member.
5427         (struct subfile_stack): Remove.
5428         (subfile_stack): Remove.
5429         (push_subfile, pop_subfile, buildsym_init): Update.
5430
5431 2018-07-16  Tom Tromey  <tom@tromey.com>
5432
5433         * buildsym.c (push_subfile): Use gdb_assert.
5434         (pop_subfile): Use gdb_assert.
5435
5436 2018-07-16  Tom Tromey  <tom@tromey.com>
5437
5438         * buildsym.h (merge_symbol_lists): Remove.
5439         * buildsym.c (merge_symbol_lists): Remove.
5440
5441 2018-07-16  Tom Tromey  <tom@tromey.com>
5442
5443         * stabsread.c (scan_file_globals): Update comment.
5444         * stabsread.h (scan_file_globals): Move from buildsym.h.
5445         * buildsym.h (scan_file_globals): Move to stabsread.h.
5446
5447 2018-07-16  Tom Tromey  <tom@tromey.com>
5448
5449         * xcoffread.c (xcoff_new_init): Update.
5450         * mipsread.c (mipscoff_new_init): Update.
5451         * mdebugread.c (mdebug_build_psymtabs): Update.
5452         * elfread.c (elf_new_init): Update.
5453         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5454         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5455         * buildsym.h (buildsym_new_init): Don't declare.
5456         * buildsym.c (buildsym_new_init): Remove.
5457
5458 2018-07-16  Tom Tromey  <tom@tromey.com>
5459
5460         * stabsread.h (within_function): Move from buildsym.h.
5461         * stabsread.c (start_stabs): Clear within_function.
5462         * coffread.c (coff_start_symtab): Clear within_function.
5463         * buildsym.h (within_function): Move to stabsread.h.
5464         * buildsym.c (prepare_for_building): Update.
5465
5466 2018-07-16  Tom Tromey  <tom@tromey.com>
5467
5468         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5469         * dwarf2read.c (dwarf2_start_symtab): Don't set
5470         processing_gcc_compilation.
5471         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5472
5473 2018-07-16  Tom Tromey  <tom@tromey.com>
5474
5475         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5476         (next_symbol_text_func): Move from buildsym.h.
5477         * stabsread.c (hashname): Move from buildsym.c.
5478         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5479         (next_symbol_text_func, hashname): Move to stabsread.h.
5480         * buildsym.c: Don't include bcache.h
5481         (hashname): Move to stasbread.c.
5482
5483 2018-07-16  Tom Tromey  <tom@tromey.com>
5484
5485         * buildsym.h (context_stack_size): Don't declare.
5486         * buildsym.c (context_stack_size): New global.
5487
5488 2018-07-16  Tom Tromey  <tom@tromey.com>
5489
5490         * dbxread.c (processing_acc_compilation): New global.
5491         * buildsym.h (processing_acc_compilation): Don't declare.
5492
5493 2018-07-16  Tom Tromey  <tom@tromey.com>
5494
5495         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5496         * dbxread.c (read_ofile_symtab): Update.
5497         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5498         * buildsym.h (last_source_start_addr): Remove.
5499         (set_last_source_start_addr, get_last_source_start_addr):
5500         Declare.
5501         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5502         parameter.
5503         (struct buildsym_compunit) <m_last_source_start_addr>: New
5504         member.
5505         (prepare_for_building): Remove start_addr parameter.
5506         (start_symtab, restart_symtab, end_symtab_get_static_block)
5507         (end_symtab_with_blockvector): Update.
5508         (set_last_source_start_addr, get_last_source_start_addr): New
5509         functions.
5510
5511 2018-07-16  Tom Tromey  <tom@tromey.com>
5512
5513         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5514         member.
5515         (have_line_numbers): Remove.
5516         (record_line, prepare_for_building, end_symtab_get_static_block)
5517         (augment_type_symtab): Update.
5518
5519 2018-07-16  Tom Tromey  <tom@tromey.com>
5520
5521         * buildsym.c (~buildsym_compunit): Free the macro table.
5522         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5523         methods.
5524         <m_pending_macros>: New member.
5525         (pending_macros): Remove.
5526         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5527         (reset_symtab_globals, end_symtab_get_static_block)
5528         (end_symtab_with_blockvector, augment_type_symtab)
5529         (buildsym_init): Update.
5530
5531 2018-07-16  Tom Tromey  <tom@tromey.com>
5532
5533         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5534         parameter.
5535         (buildsym_compunit::set_last_source_file): New method.
5536         <m_last_source_file>: New member.
5537         (prepare_for_building): Remove "name" parameter.
5538         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5539         (last_source_file): Remove.
5540         (set_last_source_file, get_last_source_file): Update.
5541
5542 2018-07-16  Tom Tromey  <tom@tromey.com>
5543
5544         * buildsym.c (prepare_for_building): Add assert.
5545
5546 2018-07-16  Tom Tromey  <tom@tromey.com>
5547
5548         * buildsym.c (~buildsym_compunit): Update.
5549         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5550         (start_subfile, patch_subfile_names)
5551         (end_symtab_with_blockvector): Update.
5552
5553 2018-07-16  Tom Tromey  <tom@tromey.com>
5554
5555         * buildsym.c (struct buildsym_compunit): Add constructor,
5556         destructor, initializers.
5557         (start_buildsym_compunit): Remove.
5558         (free_buildsym_compunit): Use "delete".
5559         (start_symtab, restart_symtab): Use "new".
5560
5561 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5562
5563         * symfile.c (set_objfile_default_section_offset): Remove struct
5564         keyword.
5565
5566 2018-07-14  Stafford Horne  <shorne@gmail.com>
5567
5568         * (Responsible Maintainers): Add myself as or1k maintainer.
5569
5570 2018-07-13  Tom Tromey  <tom@tromey.com>
5571
5572         * symfile.c (set_objfile_default_section_offset): Use extra braces
5573         around initializer.
5574
5575 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5576
5577         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5578         non-branching basr.
5579
5580 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5581
5582         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5583         unittests/cli-utils-selftests.c
5584         * unittests/cli-utils-selftests.c: New file.
5585
5586 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5587
5588         * NEWS: Mention new commands. Mention change to 'thread apply'.
5589
5590 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5591
5592         * thread.c (thr_try_catch_cmd): New function.
5593         (thread_apply_all_command): Handle qcs flags.
5594         (thread_apply_command): Handle qcs flags.
5595         (taas_command): New function.
5596         (tfaas_command): New function.
5597         (_initialize_thread): Update to setup the new commands 'taas
5598         and 'tfaas'. Change doc string for 'thread apply'.
5599
5600 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5601
5602         * stack.c: (trailing_outermost_frame): New function, mostly
5603         extracted from backtrace_command_1.
5604         (leading_innermost_frame): New function.
5605         (backtrace_command_1): Update to call trailing_outermost_frame.
5606         (frame_apply_command_count): New function.
5607         (frame_apply_level_command): New function.
5608         (frame_apply_all_command): New function.
5609         (frame_apply_command): New function.
5610         (faas_command): New function.
5611         (frame_cmd_list): New variable.
5612         (_initialize_stack): Update to setup the new commands 'frame apply'
5613         and 'faas'.
5614
5615 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5616
5617         * cli-utils.c (number_or_range_parser::get_number): Only handle
5618         numbers or convenience var as numbers.
5619         (parse_flags): New function.
5620         (parse_flags_qcs): New function.
5621         (number_or_range_parser::finished): Ensure parsing end is detected
5622         before end of string.
5623         * cli-utils.h (parse_flags): New function.
5624         (parse_flags_qcs): New function.
5625         (number_or_range_parser): Remove m_finished bool.
5626         (number_or_range_parser::skip_range): Set m_in_range to false.
5627
5628 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5629
5630         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5631         on Windows.
5632
5633 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5634             Jan Kratochvil  <jan.kratochvil@redhat.com>
5635             Paul Fertser  <fercerpav@gmail.com>
5636             Tsutomu Seki  <sekiriki@gmail.com>
5637             Pedro Alves  <palves@redhat.com>
5638
5639         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5640         'unittests/parse-connection-spec-selftests.c'.
5641         (COMMON_SFILES): Add 'common/netstuff.c'.
5642         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5643         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5644         * common/netstuff.c: New file.
5645         * common/netstuff.h: New file.
5646         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5647         (wait_for_connect): Update comment.  New parameter
5648         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5649         Use 'sock' directly instead of 'scb->fd'.
5650         (try_connect): New function, with code from 'net_open'.
5651         (net_open): Rewrite main loop to deal with multiple
5652         sockets/addresses.  Handle IPv6-style hostnames; implement
5653         support for IPv6 connections.
5654         * unittests/parse-connection-spec-selftests.c: New file.
5655
5656 2018-07-11  Pedro Alves  <palves@redhat.com>
5657
5658         PR gdb/23377
5659         * remote.c (remote_target::remote_detach_pid): Call
5660         set_current_process.
5661
5662 2018-07-11  Pedro Alves  <palves@redhat.com>
5663
5664         * h8300-tdep.c (h8300_gdbarch_init): Remove
5665         set_gdbarch_ecoff_reg_to_regnum calls.
5666
5667 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5668
5669         PR c++/23373
5670         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5671         offsets/sizes for static members of a class/struct.
5672
5673 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5674
5675         * target-descriptions.c (tdesc_register_bitsize): Rename.
5676         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5677         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5678         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5679
5680 2018-07-10  Tom Tromey  <tom@tromey.com>
5681
5682         * breakpoint.c (moribund_locations): Now static and a
5683         std::vector.
5684         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5685         (build_bpstat_chain, update_global_location_list)
5686         (breakpoint_retire_moribund): Update.
5687         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5688         VEC.
5689
5690 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5691
5692         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5693         (riscv_register_reggroup_p): Use new function, remove unneeded
5694         parenthesis.
5695         (riscv_push_dummy_call): Extend assert to compare against xlen or
5696         flen based on register type.
5697
5698 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5699
5700         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5701
5702 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5703
5704         * remote.c (show_hardware_watchpoint_limit): New function.
5705         (show_hardware_watchpoint_length_limit): New function.
5706         (show_hardware_breakpoint_limit): New function.
5707         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5708         where appropriate, update help text.
5709
5710 2018-07-09  Tom Tromey  <tom@tromey.com>
5711
5712         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5713         (CLIBS): Don't mention NAT_CLIBS.
5714
5715 2018-07-09  Tom Tromey  <tom@tromey.com>
5716
5717         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5718         (LIBGDB_OBS, clean mostlyclean): Update.
5719         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5720
5721 2018-07-09  Tom Tromey  <tom@tromey.com>
5722
5723         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5724         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5725         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5726
5727 2018-07-09  Tom Tromey  <tom@tromey.com>
5728
5729         * Makefile.in (ALLDEPFILES): Remove exec.c.
5730         (COMMON_OBS): Remove exec.o.
5731         (COMMON_SFILES): Add exec.c.
5732
5733 2018-07-09  Tom Tromey  <tom@tromey.com>
5734
5735         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5736
5737 2018-07-09  Tom Tromey  <tom@tromey.com>
5738
5739         * Makefile.in (clean mostlyclean): Remove stamp-version.
5740         (version.c): Depend on stamp-version.
5741         (stamp-version): New rule, from version.c rule.
5742
5743 2018-07-09  Tom Tromey  <tom@tromey.com>
5744
5745         * Makefile.in (init.c): Depend on stamp-init.
5746         (stamp-init): New rule, from init.c rule.
5747         (clean mostlyclean): Remove stamp-init.
5748
5749 2018-07-09  Tom Tromey  <tom@tromey.com>
5750
5751         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5752         SUBDIR_GCC_COMPILE_SRCS.
5753
5754 2018-07-09  Tom Tromey  <tom@tromey.com>
5755
5756         * Makefile.in (init.c): Remove some unused sed rules.
5757
5758 2018-07-09  Tom Tromey  <tom@tromey.com>
5759
5760         * Makefile.in (TSOBS): Remove.
5761         (INIT_FILES): Update.
5762         (LIBGDB_OBS): Update.
5763         (COMMON_SFILES): Add inflow.c.
5764         (SFILES): Remove inflow.c.
5765
5766 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5767
5768         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5769
5770 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5771
5772         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5773         get_saveloc_name, is_signal_frame_name, step_name,
5774         init_remote_name, create_addr_space_name,
5775         destroy_addr_space_name, search_unwind_table_name,
5776         find_dyn_list_name): Constify.
5777
5778 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5779
5780         * darwin-nat.c (darwin_pthread_kill): New function.
5781         (darwin_resume_thread): Use darwin_pthread_kill.
5782
5783 2018-07-05  Tom de Vries  <tdevries@suse.de>
5784
5785         * macroexp.c (macro_buffer) <operator=>: New member function.
5786
5787 2018-07-04  Tom Tromey  <tom@tromey.com>
5788
5789         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5790
5791 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5792
5793         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5794         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5795         * maint.c: Likewise.
5796         * top.c: Likewise.
5797
5798 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5799
5800         * NEWS: Create a new section for the next release branch.
5801         Rename the section of the current branch, now that it has
5802         been cut.
5803
5804 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5805
5806         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5807         * version.in: Bump version to 8.2.50.DATE-git.
5808
5809 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5810             Pedro Alves  <palves@redhat.com>
5811
5812         * linux-nat.c (linux_init_ptrace): Rename to ...
5813         (linux_init_ptrace_procfs): ... this.  Call
5814         linux_proc_init_warnings.
5815         (linux_nat_target::post_attach)
5816         (linux_nat_target::post_startup_inferior): Adjust.
5817         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5818         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5819
5820 2018-07-04  Tom de Vries  <tdevries@suse.de>
5821
5822         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5823         check ...
5824         (read_comp_unit_head): ... here.
5825
5826 2018-07-03  Tom Tromey  <tom@tromey.com>
5827
5828         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5829         (stop_tracing, tstatus_command)
5830         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5831         (print_one_static_tracepoint_marker): Update.
5832         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5833         std::vector.
5834         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5835         VEC.
5836         (all_tracepoints, static_tracepoints_here): Return std::vector.
5837
5838 2018-07-03  Tom Tromey  <tom@tromey.com>
5839
5840         * common/ptid.c (ptid_equal): Remove.
5841         * common/ptid.h (ptid_equal): Don't declare.
5842         * ada-tasks.c: Update.
5843         * breakpoint.c: Update.
5844         * common/agent.c: Update.
5845         * corelow.c: Update.
5846         * darwin-nat-info.c: Update.
5847         * darwin-nat.c: Update.
5848         * dcache.c: Update.
5849         * dtrace-probe.c: Update.
5850         * dummy-frame.c: Update.
5851         * fbsd-nat.c: Update.
5852         * frame.c: Update.
5853         * gdbthread.h: Update.
5854         * gnu-nat.c: Update.
5855         * go32-nat.c: Update.
5856         * inf-loop.c: Update.
5857         * inf-ptrace.c: Update.
5858         * infcall.c: Update.
5859         * infcmd.c: Update.
5860         * inflow.c: Update.
5861         * infrun.c: Update.
5862         * linux-fork.c: Update.
5863         * linux-nat.c: Update.
5864         * linux-thread-db.c: Update.
5865         * mi/mi-cmd-var.c: Update.
5866         * mi/mi-interp.c: Update.
5867         * mi/mi-main.c: Update.
5868         * nto-procfs.c: Update.
5869         * ppc-linux-tdep.c: Update.
5870         * procfs.c: Update.
5871         * python/py-inferior.c: Update.
5872         * python/py-record-btrace.c: Update.
5873         * python/py-record.c: Update.
5874         * ravenscar-thread.c: Update.
5875         * regcache.c: Update.
5876         * remote-sim.c: Update.
5877         * remote.c: Update.
5878         * sol-thread.c: Update.
5879         * solib.c: Update.
5880         * target.c: Update.
5881         * tui/tui-stack.c: Update.
5882         * varobj.c: Update.
5883         * windows-nat.c: Update.
5884         * windows-tdep.c: Update.
5885
5886 2018-07-03  Tom Tromey  <tom@tromey.com>
5887
5888         * common/ptid.c (ptid_match): Remove.
5889         * common/ptid.h (ptid_match): Don't declare.
5890         * fbsd-nat.c: Update.
5891         * infcmd.c: Update.
5892         * infrun.c: Update.
5893         * linux-nat.c: Update.
5894         * record-btrace.c: Update.
5895         * regcache.c: Update.
5896         * remote.c: Update.
5897
5898 2018-07-03  Tom Tromey  <tom@tromey.com>
5899
5900         * common/ptid.c (ptid_tid_p): Remove.
5901         * common/ptid.h (ptid_tid_p): Don't declare.
5902         * sol-thread.c: Update.
5903
5904 2018-07-03  Tom Tromey  <tom@tromey.com>
5905
5906         * common/ptid.c (ptid_lwp_p): Remove.
5907         * common/ptid.h (ptid_lwp_p): Don't declare.
5908         * fbsd-nat.c: Update.
5909         * linux-nat.c: Update.
5910         * nat/linux-procfs.c: Update.
5911         * nat/x86-linux-dregs.c: Update.
5912         * sol-thread.c: Update.
5913
5914 2018-07-03  Tom Tromey  <tom@tromey.com>
5915
5916         * common/ptid.c (ptid_is_pid): Remove.
5917         * common/ptid.h (ptid_is_pid): Don't declare.
5918         * infrun.c: Update.
5919         * linux-nat.c: Update.
5920         * mi/mi-interp.c: Update.
5921         * remote.c: Update.
5922         * thread.c: Update.
5923
5924 2018-07-03  Tom Tromey  <tom@tromey.com>
5925
5926         * common/ptid.c (ptid_get_tid): Remove.
5927         * common/ptid.h (ptid_get_tid): Don't declare.
5928         * ada-tasks.c: Update.
5929         * aix-thread.c: Update.
5930         * bsd-uthread.c: Update.
5931         * darwin-nat.c: Update.
5932         * fbsd-nat.c: Update.
5933         * i386-darwin-nat.c: Update.
5934         * infrun.c: Update.
5935         * linux-tdep.c: Update.
5936         * nto-procfs.c: Update.
5937         * ppc-ravenscar-thread.c: Update.
5938         * python/py-infthread.c: Update.
5939         * ravenscar-thread.c: Update.
5940         * sol-thread.c: Update.
5941         * sparc-ravenscar-thread.c: Update.
5942         * windows-nat.c: Update.
5943
5944 2018-07-03  Tom Tromey  <tom@tromey.com>
5945
5946         * common/ptid.c (ptid_get_lwp): Remove.
5947         * common/ptid.h (ptid_get_lwp): Don't declare.
5948         * aarch64-linux-nat.c: Update.
5949         * ada-tasks.c: Update.
5950         * aix-thread.c: Update.
5951         * amd64-linux-nat.c: Update.
5952         * arm-linux-nat.c: Update.
5953         * corelow.c: Update.
5954         * fbsd-nat.c: Update.
5955         * fbsd-tdep.c: Update.
5956         * gnu-nat.c: Update.
5957         * i386-cygwin-tdep.c: Update.
5958         * i386-gnu-nat.c: Update.
5959         * i386-linux-nat.c: Update.
5960         * ia64-linux-nat.c: Update.
5961         * inf-ptrace.c: Update.
5962         * infrun.c: Update.
5963         * linux-fork.c: Update.
5964         * linux-nat.c: Update.
5965         * linux-tdep.c: Update.
5966         * linux-thread-db.c: Update.
5967         * mips-linux-nat.c: Update.
5968         * nat/aarch64-linux-hw-point.c: Update.
5969         * nat/aarch64-linux.c: Update.
5970         * nat/linux-btrace.c: Update.
5971         * nat/linux-osdata.c: Update.
5972         * nat/linux-procfs.c: Update.
5973         * nat/x86-linux-dregs.c: Update.
5974         * obsd-nat.c: Update.
5975         * ppc-fbsd-nat.c: Update.
5976         * ppc-linux-nat.c: Update.
5977         * procfs.c: Update.
5978         * python/py-infthread.c: Update.
5979         * ravenscar-thread.c: Update.
5980         * remote.c: Update.
5981         * s390-linux-nat.c: Update.
5982         * sol-thread.c: Update.
5983         * sol2-tdep.c: Update.
5984         * spu-linux-nat.c: Update.
5985         * x86-linux-nat.c: Update.
5986         * xtensa-linux-nat.c: Update.
5987
5988 2018-07-03  Tom Tromey  <tom@tromey.com>
5989
5990         * common/ptid.c (ptid_get_pid): Remove.
5991         * common/ptid.h (ptid_get_pid): Don't declare.
5992         * aarch64-linux-nat.c: Update.
5993         * ada-lang.c: Update.
5994         * aix-thread.c: Update.
5995         * alpha-bsd-nat.c: Update.
5996         * amd64-fbsd-nat.c: Update.
5997         * amd64-linux-nat.c: Update.
5998         * arm-linux-nat.c: Update.
5999         * arm-nbsd-nat.c: Update.
6000         * auxv.c: Update.
6001         * break-catch-syscall.c: Update.
6002         * breakpoint.c: Update.
6003         * bsd-uthread.c: Update.
6004         * corelow.c: Update.
6005         * ctf.c: Update.
6006         * darwin-nat.c: Update.
6007         * fbsd-nat.c: Update.
6008         * fbsd-tdep.c: Update.
6009         * gcore.c: Update.
6010         * gnu-nat.c: Update.
6011         * hppa-nbsd-nat.c: Update.
6012         * hppa-obsd-nat.c: Update.
6013         * i386-fbsd-nat.c: Update.
6014         * ia64-linux-nat.c: Update.
6015         * inf-ptrace.c: Update.
6016         * infcmd.c: Update.
6017         * inferior.c: Update.
6018         * inferior.h: Update.
6019         * inflow.c: Update.
6020         * infrun.c: Update.
6021         * linux-fork.c: Update.
6022         * linux-nat.c: Update.
6023         * linux-tdep.c: Update.
6024         * linux-thread-db.c: Update.
6025         * m68k-bsd-nat.c: Update.
6026         * mi/mi-interp.c: Update.
6027         * mi/mi-main.c: Update.
6028         * mips-linux-nat.c: Update.
6029         * mips-nbsd-nat.c: Update.
6030         * mips64-obsd-nat.c: Update.
6031         * nat/aarch64-linux-hw-point.c: Update.
6032         * nat/aarch64-linux.c: Update.
6033         * nat/linux-btrace.c: Update.
6034         * nat/linux-osdata.c: Update.
6035         * nat/linux-procfs.c: Update.
6036         * nat/x86-linux-dregs.c: Update.
6037         * nto-procfs.c: Update.
6038         * obsd-nat.c: Update.
6039         * ppc-linux-nat.c: Update.
6040         * ppc-nbsd-nat.c: Update.
6041         * ppc-obsd-nat.c: Update.
6042         * proc-service.c: Update.
6043         * procfs.c: Update.
6044         * python/py-inferior.c: Update.
6045         * python/py-infthread.c: Update.
6046         * ravenscar-thread.c: Update.
6047         * record.c: Update.
6048         * remote-sim.c: Update.
6049         * remote.c: Update.
6050         * rs6000-nat.c: Update.
6051         * s390-linux-nat.c: Update.
6052         * sh-nbsd-nat.c: Update.
6053         * sol-thread.c: Update.
6054         * sparc-nat.c: Update.
6055         * sparc64-tdep.c: Update.
6056         * spu-linux-nat.c: Update.
6057         * spu-tdep.c: Update.
6058         * target-debug.h: Update.
6059         * target.c: Update.
6060         * thread.c: Update.
6061         * tid-parse.c: Update.
6062         * tracefile-tfile.c: Update.
6063         * vax-bsd-nat.c: Update.
6064         * windows-nat.c: Update.
6065         * x86-linux-nat.c: Update.
6066         * x86-nat.c: Update.
6067
6068 2018-07-03  Tom Tromey  <tom@tromey.com>
6069
6070         * common/ptid.c (pid_to_ptid): Remove.
6071         * common/ptid.h (pid_to_ptid): Don't declare.
6072         * aix-thread.c: Update.
6073         * arm-linux-nat.c: Update.
6074         * common/ptid.c: Update.
6075         * common/ptid.h: Update.
6076         * corelow.c: Update.
6077         * ctf.c: Update.
6078         * darwin-nat.c: Update.
6079         * fbsd-nat.c: Update.
6080         * fork-child.c: Update.
6081         * gnu-nat.c: Update.
6082         * go32-nat.c: Update.
6083         * inf-ptrace.c: Update.
6084         * infcmd.c: Update.
6085         * inferior.c: Update.
6086         * infrun.c: Update.
6087         * linux-fork.c: Update.
6088         * linux-nat.c: Update.
6089         * nat/aarch64-linux-hw-point.c: Update.
6090         * nat/fork-inferior.c: Update.
6091         * nat/x86-linux-dregs.c: Update.
6092         * nto-procfs.c: Update.
6093         * obsd-nat.c: Update.
6094         * procfs.c: Update.
6095         * progspace.c: Update.
6096         * remote.c: Update.
6097         * rs6000-nat.c: Update.
6098         * s390-linux-nat.c: Update.
6099         * sol-thread.c: Update.
6100         * spu-linux-nat.c: Update.
6101         * target.c: Update.
6102         * top.c: Update.
6103         * tracefile-tfile.c: Update.
6104         * windows-nat.c: Update.
6105
6106 2018-07-03  Tom Tromey  <tom@tromey.com>
6107
6108         * common/ptid.h (ptid_build): Don't declare.
6109         * common/ptid.c (ptid_build): Remove.
6110         * aix-thread.c: Update.
6111         * bsd-kvm.c: Update.
6112         * bsd-uthread.c: Update.
6113         * common/agent.c: Update.
6114         * common/ptid.c: Update.
6115         * common/ptid.h: Update.
6116         * corelow.c: Update.
6117         * darwin-nat.c: Update.
6118         * fbsd-nat.c: Update.
6119         * gnu-nat.c: Update.
6120         * linux-fork.c: Update.
6121         * linux-nat.c: Update.
6122         * linux-thread-db.c: Update.
6123         * nat/linux-osdata.c: Update.
6124         * nat/linux-procfs.c: Update.
6125         * nto-procfs.c: Update.
6126         * obsd-nat.c: Update.
6127         * proc-service.c: Update.
6128         * procfs.c: Update.
6129         * ravenscar-thread.c: Update.
6130         * remote-sim.c: Update.
6131         * remote.c: Update.
6132         * sol-thread.c: Update.
6133         * target.c: Update.
6134         * windows-nat.c: Update.
6135
6136 2018-07-03  Tom Tromey  <tom@tromey.com>
6137
6138         * infrun.c (follow_exec): Use exit_inferior_silent.
6139         * inferior.c (exit_inferior_num_silent): Remove.
6140         * inferior.h (exit_inferior_num_silent): Don't declare.
6141
6142 2018-07-03  Tom Tromey  <tom@tromey.com>
6143
6144         PR cli/23340:
6145         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6146         inferior_ptid on error.
6147
6148 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6149             Simon Marchi  <simon.marchi@polymtl.ca>
6150
6151         PR tdep/8282
6152         * disasm.h (gdb_disassembler): Add
6153         `m_disassembler_options_holder'. member
6154         * disasm.c (get_all_disassembler_options): New function.
6155         (gdb_disassembler::gdb_disassembler): Use it.
6156         (gdb_buffered_insn_length_init_dis): Likewise.
6157         (gdb_buffered_insn_length): Adjust accordingly.
6158         (set_disassembler_options): Handle options with arguments.
6159         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6160         line if showing options with descriptions.
6161         (disassembler_options_completer): Adapt to using the
6162         `disasm_options_and_args_t' structure.
6163         * mips-tdep.c (mips_disassembler_options): New variable.
6164         (mips_disassembler_options_o32): Likewise.
6165         (mips_disassembler_options_n32): Likewise.
6166         (mips_disassembler_options_n64): Likewise.
6167         (gdb_print_insn_mips): Don't set `disassembler_options'.
6168         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6169         functions.
6170         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6171         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6172         `gdbarch_disassembler_options_implicit' and
6173         `gdbarch_valid_disassembler_options'.
6174         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6175         `disasm_options_and_args_t' structure.
6176         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6177         method.
6178         (valid_disassembler_options): Switch from `disasm_options_t' to
6179         the `disasm_options_and_args_t' structure.
6180         * NEWS: Document `set disassembler-options' support for the MIPS
6181         target.
6182         * gdbarch.h: Regenerate.
6183         * gdbarch.c: Regenerate.
6184
6185 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6186
6187         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6188
6189 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6190
6191         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6192         parameter in call to amd64_target_description.
6193         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6194         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6195         (amd64fbsd_init_abi): Likewise.
6196         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6197         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6198         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6199         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6200
6201 2018-06-29  Pedro Alves  <palves@redhat.com>
6202
6203         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6204         "segments" parameter.
6205         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6206         (_initialize_amd64_tdep): Update call to
6207         amd64_create_target_description.
6208         (amd64_target_description): Add "segments" parameter.  Adjust
6209         the implementation to use it.
6210         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6211         call to amd64_create_target_description.
6212         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6213         * gdb/arch/amd64.h (amd64_create_target_description): Add
6214         "segments" register.
6215         * gdb/arch/amd64.c (amd64_create_target_description): Add
6216         "segments" parameter.  Call create_feature_i386_64bit_segments
6217         only if SEGMENTS is true.
6218         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6219         call to amd64_create_target_description.
6220
6221 2018-06-29  Pedro Alves  <palves@redhat.com>
6222
6223         * thread.c (thread_target_id_str): New, factored out from ...
6224         (print_thread_info_1): ... here.  Use it to compute the max
6225         "Target Id" column width.
6226
6227 2018-06-29  Pedro Alves  <palves@redhat.com>
6228
6229         * remote.c (remote_target::extra_thread_info): Delete
6230         'display_buf' and 'n' locals.  from the cache, regardless of
6231         packet mechanims is in use.  Use cache for qThreadExtra and qP
6232         methods too.
6233
6234 2018-06-29  Pedro Alves  <palves@redhat.com>
6235
6236         * blockframe.c (find_pc_sect_containing_function): New function.
6237         * breakpoint.c (print_breakpoint_location): Don't call
6238         find_pc_sect_function.
6239         * linespec.c (create_sals_line_offset): Record the location's
6240         symbol in the sal.
6241         * linespec.c (convert_address_location_to_sals): Fill in sal's
6242         symbol with find_pc_sect_containing_function.
6243         * symtab.c (find_function_start_sal): Rename to ...
6244         (find_function_start_sal_1): ... this.
6245         (find_function_start_sal): Reimplement as wrapper around
6246         find_function_start_sal_1, and use
6247         find_pc_sect_containing_function to fill in the sal's symbol.
6248         (find_function_start_sal(symbol*, bool)): Adjust.
6249         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6250         comments.
6251         (find_pc_sect_containing_function): Declare.
6252
6253 2018-06-29  Pedro Alves  <palves@redhat.com>
6254
6255         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6256         true if the the location has no symbol.
6257
6258 2018-06-28  Tom Tromey  <tom@tromey.com>
6259
6260         * NEWS: Mention --enable-codesign.
6261         * silent-rules.mk (ECHO_SIGN): New variable.
6262         * configure.ac: Add --enable-codesign.
6263         * configure: Rebuild.
6264         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6265         (gdb$(EXEEXT)): Optionally invoke codesign.
6266
6267 2018-06-28  Pedro Alves  <palves@redhat.com>
6268
6269         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6270         comments.
6271         (switch_to_thread_no_regs): Adjust comment.
6272         * infcmd.c (stop_pc): Delete.
6273         (post_create_inferior, info_program_command): Replace references
6274         to stop_pc with references to thread_info->suspend.stop_pc.
6275         * inferior.h (stop_pc): Delete declaration.
6276         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6277         (handle_inferior_event_1, handle_signal_stop)
6278         (process_event_stop_test, keep_going_stepped_thread)
6279         (handle_step_into_function, handle_step_into_function_backward)
6280         (print_stop_location): Replace references to stop_pc with
6281         references to thread_info->suspend.stop_pc.
6282         (struct infcall_suspend_state) <stop_pc>: Delete field.
6283         (save_infcall_suspend_state, restore_infcall_suspend_state):
6284         Remove references to inf_stat->stop_pc.
6285         * linux-fork.c (fork_load_infrun_state): Likewise.
6286         * record-btrace.c (record_btrace_set_replay): Likewise.
6287         * record-full.c (record_full_goto_entry): Likewise.
6288         * remote.c (print_one_stopped_thread): Likewise.
6289         * target.c (target_resume): Extend comment.
6290         * thread.c (set_executing_thread): New.
6291         (set_executing): Use it.
6292         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6293         Remove references to stop_pc.
6294
6295 2018-06-28  Pedro Alves  <palves@redhat.com>
6296
6297         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6298         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6299
6300 2018-06-28  Tom Tromey  <tom@tromey.com>
6301
6302         * coffread.c (coff_symfile_finish): Update.
6303         * xcoffread.c (xcoff_symfile_finish): Update.
6304         * elfread.c (elf_symfile_finish): Update.
6305         * symfile.h (dwarf2_free_objfile): Don't declare.
6306         * dwarf2read.c (_initialize_dwarf2_read): Use
6307         register_objfile_data_with_cleanup.
6308         (dwarf2_free_objfile): Now static.  Change signature.
6309
6310 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6311
6312         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6313         option "-o" to add-symbol-file-load to add an offset to each
6314         section's load address.
6315         * symfile.c (set_objfile_default_section_offset): New function.
6316
6317 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6318
6319         * symfile.c (add_symbol_file_command): Make sure that sections
6320         with the same name are sorted in the same order.
6321
6322 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6323
6324         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6325         require the second argument.  If omitted, load sections at the
6326         addresses specified in the file.
6327
6328 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6329
6330         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6331         (_initialize_symfile): Add option "-o" to symbol-file to add an
6332         offset to each section of the symbol file.
6333
6334 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6335
6336         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6337
6338 2018-06-27  Tom Tromey  <tom@tromey.com>
6339
6340         * stack.c (_initialize_stack): Update "func" help text.
6341
6342 2018-06-27  Tom Tromey  <tom@tromey.com>
6343
6344         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6345         std::vector.
6346         (unwind_infopy_str, pyuw_create_unwind_info)
6347         (unwind_infopy_add_saved_register, pyuw_sniffer)
6348         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6349         Update.
6350         (struct saved_reg): Add constructor.
6351         <value>: Now a gdbpy_ref<>.
6352
6353 2018-06-27  Tom Tromey  <tom@tromey.com>
6354
6355         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6356
6357 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6358
6359         * gdb-gdb.py.in: Format using autopep8.
6360
6361 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6362
6363         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6364         (type_lookup_function): Recognize CORE_ADDR values.
6365
6366 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6367
6368         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6369         print tag_name.
6370
6371 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6372
6373         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6374         <__lt__>: Add.
6375
6376 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6377
6378         * gdb-gdb.py: Move to...
6379         * gdb-gdb.py.in: ... here.
6380         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6381         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6382         dependencies.
6383         (distclean): Remove gdb-gdb.py when cleaning.
6384         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6385         * configure: Re-generate.
6386
6387 2018-06-27  Pedro Alves  <palves@redhat.com>
6388
6389         * proc-service.c (get_ps_regcache): New.
6390         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6391         (ps_lsetfpregs): Use it.
6392
6393 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6394
6395         PR gdb/21695
6396         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6397         (dwarf_decode_lines_1): Adjust.
6398
6399 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6400
6401         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6402         override.
6403         <info_proc>: Likewise.
6404
6405 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6406
6407         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6408         to windows_fetch_one_register, and only handle the case of
6409         fetching one register.  Move the code that reloads the context
6410         and iterates over all registers if R is negative to...
6411         (windows_nat_target::fetch_registers): ... here.
6412         (do_windows_store_inferior_registers): Rename to
6413         windows_store_one_register, and only handle the case of storing
6414         one register.  Move the code that handles the case where r is
6415         negative to...
6416         (windows_nat_target::store_registers) ... here.
6417
6418 2018-06-26  Tom Tromey  <tom@tromey.com>
6419
6420         PR rust/22574:
6421         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6422         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6423         Update.
6424         (rust_internal_print_type): Add podata parameter.
6425         (rust_print_type): Update.
6426
6427 2018-06-26  Tom Tromey  <tom@tromey.com>
6428
6429         * typeprint.h (struct print_offset_data) <update, finish,
6430         maybe_print_hole>: New methods.
6431         <indentation>: New constant.
6432         * typeprint.c (print_offset_data::indentation): Define.
6433         (print_offset_data::maybe_print_hole, print_offset_data::update)
6434         (print_offset_data::finish): Move from c-typeprint.c and rename.
6435         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6436         (print_spaces_filtered_with_print_options): Update.
6437         (c_print_type_union_field_offset, maybe_print_hole)
6438         (c_print_type_struct_field_offset): Move to typeprint.c and
6439         rename.
6440         (c_type_print_base_struct_union): Update.
6441
6442 2018-06-25  Pedro Alves  <palves@redhat.com>
6443
6444         * gdbthread.h (thread_info_ref, delete_thread)
6445         (delete_thread_silent, first_thread_of_inferior)
6446         (any_thread_of_inferior, switch_to_thread)
6447         (enable_thread_stack_temporaries)
6448         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6449         (get_last_thread_stack_temporary)
6450         (value_in_thread_stack_temporaries, can_access_registers_thread):
6451         Spell out "struct thread_info" instead of just "thread_info".
6452         * inferior.h (notice_new_inferior): Likewise.
6453
6454 2018-06-25  Pedro Alves  <palves@redhat.com>
6455
6456         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6457         pass thread_info pointer to delete_thread.
6458         (windows_nat_target::detach): Pass inferior pointer to
6459         detach_inferior.
6460         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6461         delete_thread.
6462         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6463         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6464         and pass a thread_info pointer to delete_thread.
6465         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6466         pass thread_info pointer to delete_thread.
6467         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6468         delete_thread_silent call.
6469         * procfs.c (procfs_target::detach): Pass inferior pointer to
6470         detach_inferior.
6471         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6472         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6473         delete_thread_silent call.
6474         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6475         pass thread_info pointer to delete_thread.
6476         (windows_nat_target::detach): Pass inferior pointer to
6477         delete_inferior.
6478
6479 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6480
6481         * regcache.c (readable_regcache::read_part): Fix asserts.
6482         (reg_buffer::raw_collect_part): New function.
6483         (regcache::write_part): Fix asserts.
6484         (reg_buffer::raw_supply_part): New function.
6485         (regcache::transfer_regset_register): New helper function.
6486         (regcache::transfer_regset): Call new functions.
6487         (regcache_supply_regset): Use gdb_byte*.
6488         (regcache::supply_regset): Likewise.
6489         (regcache_collect_regset): Likewise.
6490         (regcache::collect_regset): Likewise.
6491         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6492         (reg_buffer::raw_supply_part): Likewise.
6493         (regcache::transfer_regset_register): Likewise.
6494         (regcache::transfer_regset): Use gdb_byte*.
6495
6496 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6497
6498         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6499
6500 2018-06-21  Pedro Alves  <palves@redhat.com>
6501
6502         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6503         instead of a ptid_t.  All callers adjusted.
6504         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6505         adjusted.
6506         (print_ada_task_info, display_current_task_id, task_command_1):
6507         Adjust.
6508         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6509         inferior_thread.
6510         (breakpoint_kind): Adjust.
6511         (remove_breakpoints_pid): Rename to ...
6512         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6513         pointer.  All callers adjusted.
6514         (bpstat_clear_actions): Use inferior_thread.
6515         (get_bpstat_thread): New.
6516         (bpstat_do_actions): Use it.
6517         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6518         to take a thread_info pointer.  All callers adjusted.
6519         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6520         (breakpoint_re_set_thread): Use inferior_thread.
6521         * breakpoint.h (struct inferior): Forward declare.
6522         (bpstat_stop_status): Update.
6523         (remove_breakpoints_pid): Delete.
6524         (remove_breakpoints_inf): New.
6525         * bsd-uthread.c (bsd_uthread_target::wait)
6526         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6527         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6528         (maint_btrace_packet_history_cmd)
6529         (maint_btrace_clear_packet_history_cmd): Adjust.
6530         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6531         inferior_thread.
6532         * cli/cli-interp.c: Include "inferior.h".
6533         * common/refcounted-object.h (struct
6534         refcounted_object_ref_policy): New.
6535         * compile/compile-object-load.c: Include gdbthread.h.
6536         (store_regs): Use inferior_thread.
6537         * corelow.c (core_target::close): Use current_inferior.
6538         (core_target_open): Adjust to use first_thread_of_inferior and use
6539         the current inferior.
6540         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6541         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6542         <thread>: ... this new field.  All references adjusted.
6543         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6544         Take a thread_info pointer instead of a ptid_t.
6545         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6546         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6547         thread_info pointer instead of a ptid_t.
6548         * elfread.c: Include "inferior.h".
6549         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6550         Use inferior_thread.
6551         * eval.c (evaluate_subexp): Likewise.
6552         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6553         inferior_thread.
6554         * gdb_proc_service.h (struct thread_info): Forward declare.
6555         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6556         <thread>: ... this new field.  All references adjusted.
6557         * gdbarch.h, gdbarch.c: Regenerate.
6558         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6559         'thread' parameter.  All implementations and callers adjusted.
6560         * gdbthread.h (thread_info) <set_running>: New method.
6561         (delete_thread, delete_thread_silent): Take a thread_info pointer
6562         instead of a ptid.
6563         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6564         (first_thread_of_process): Delete, replaced by ...
6565         (first_thread_of_inferior): ... this new function.  All callers
6566         adjusted.
6567         (any_live_thread_of_process): Delete, replaced by ...
6568         (any_live_thread_of_inferior): ... this new function.  All callers
6569         adjusted.
6570         (switch_to_thread, switch_to_no_thread): Declare.
6571         (is_executing): Delete.
6572         (enable_thread_stack_temporaries): Update comment.
6573         <enable_thread_stack_temporaries>: Take a thread_info pointer
6574         instead of a ptid_t.  Incref the thread.
6575         <~enable_thread_stack_temporaries>: Decref the thread.
6576         <m_ptid>: Delete
6577         <m_thr>: New.
6578         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6579         (get_last_thread_stack_temporary)
6580         (value_in_thread_stack_temporaries, can_access_registers_thread):
6581         Take a thread_info pointer instead of a ptid_t.  All callers
6582         adjusted.
6583         * infcall.c (get_call_return_value): Use inferior_thread.
6584         (run_inferior_call): Work with thread pointers instead of ptid_t.
6585         (call_function_by_hand_dummy): Work with thread pointers instead
6586         of ptid_t.  Use thread_info_ref.
6587         * infcmd.c (proceed_thread_callback): Access thread's state
6588         directly.
6589         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6590         access thread's state directly.
6591         (continue_command): Use inferior_thread.
6592         (info_program_command): Use find_thread_ptid and access thread
6593         state directly.
6594         (proceed_after_attach_callback): Use thread state directly.
6595         (notice_new_inferior): Take a thread_info pointer instead of a
6596         ptid_t.  All callers adjusted.
6597         (exit_inferior): Take an inferior pointer instead of a pid.  All
6598         callers adjusted.
6599         (exit_inferior_silent): New.
6600         (detach_inferior): Delete.
6601         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6602         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6603         (detach_inferior_command, kill_inferior_command): Use
6604         find_inferior_id instead of valid_gdb_inferior_id and
6605         gdb_inferior_id_to_pid.
6606         (inferior_command): Use inferior and thread pointers.
6607         * inferior.h (struct thread_info): Forward declare.
6608         (notice_new_inferior): Take a thread_info pointer instead of a
6609         ptid_t.  All callers adjusted.
6610         (detach_inferior): Delete declaration.
6611         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6612         instead of a pid.  All callers adjusted.
6613         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6614         (valid_gdb_inferior_id): Delete.
6615         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6616         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6617         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6618         ...
6619         <inf>: ... this new field.
6620         <step_ptid>: Delete, replaced by ...
6621         <step_thread>: ... this new field.
6622         (get_displaced_stepping_state): Take an inferior pointer instead
6623         of a pid.  All callers adjusted.
6624         (displaced_step_in_progress_any_inferior): Adjust.
6625         (displaced_step_in_progress_thread): Take a thread pointer instead
6626         of a ptid_t.  All callers adjusted.
6627         (displaced_step_in_progress, add_displaced_stepping_state): Take
6628         an inferior pointer instead of a pid.  All callers adjusted.
6629         (get_displaced_step_closure_by_addr): Adjust.
6630         (remove_displaced_stepping_state): Take an inferior pointer
6631         instead of a pid.  All callers adjusted.
6632         (displaced_step_prepare_throw, displaced_step_prepare)
6633         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6634         All callers adjusted.
6635         (start_step_over): Adjust.
6636         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6637         displaced step queue.
6638         (do_target_resume): Adjust.
6639         (fetch_inferior_event): Use inferior_thread.
6640         (context_switch, get_inferior_stop_soon): Take an
6641         execution_control_state pointer instead of a ptid_t.  All callers
6642         adjusted.
6643         (switch_to_thread_cleanup): Delete.
6644         (stop_all_threads): Use scoped_restore_current_thread.
6645         * inline-frame.c: Include "gdbthread.h".
6646         (inline_state) <inline_state>: Take a thread pointer instead of a
6647         ptid_t.  All callers adjusted.
6648         <ptid>: Delete, replaced by ...
6649         <thread>: ... this new field.
6650         (find_inline_frame_state): Take a thread pointer instead of a
6651         ptid_t.  All callers adjusted.
6652         (skip_inline_frames, step_into_inline_frame)
6653         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6654         pointer instead of a ptid_t.  All callers adjusted.
6655         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6656         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6657         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6658         pointers directly.
6659         * linux-nat.c (get_detach_signal): Likewise.
6660         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6661         (thread_db_notice_clone): Adjust.
6662         (thread_db_find_new_threads_silently)
6663         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6664         a thread pointer instead of a ptid_t.  All callers adjusted.
6665         * mi/mi-cmd-var.c: Include "inferior.h".
6666         (mi_cmd_var_update_iter): Update to use thread pointers.
6667         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6668         inferior directly.
6669         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6670         out to ...
6671         (mi_output_running): ... this new function.
6672         (mi_on_resume_1): Adjust to use it.
6673         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6674         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6675         directly.
6676         (interrupt_thread_callback): : Adjust to use thread and inferior
6677         pointers.
6678         * proc-service.c: Include "gdbthread.h".
6679         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6680         * progspace-and-thread.c: Include "inferior.h".
6681         * progspace.c: Include "inferior.h".
6682         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6683         hold a reference to an inferior_object.
6684         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6685         inferior_thread.
6686         * python/py-inferior.c (struct inferior_object): Give the type a
6687         tag name instead of a typedef.
6688         (python_on_normal_stop): No need to check if the current thread is
6689         listed.
6690         (inferior_to_inferior_object): Change return type to
6691         inferior_object.  All callers adjusted.
6692         (find_thread_object): Delete, bits factored out to ...
6693         (thread_to_thread_object): ... this new function.
6694         * python/py-infthread.c (create_thread_object): Use
6695         inferior_to_inferior_object.
6696         (thpy_is_stopped): Use thread pointer directly.
6697         (gdbpy_selected_thread): Use inferior_thread.
6698         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6699         field, replaced with ...
6700         <thread>: ... this new field.  All users adjusted.
6701         (btpy_insn_or_gap_new): Drop const.
6702         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6703         callers adjusted.
6704         * python/py-record.c: Include "gdbthread.h".
6705         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6706         a ptid_t.  All callers adjusted.
6707         (gdbpy_current_recording): Use inferior_thread.
6708         * python/py-record.h (recpy_record_object) <ptid>: Delete
6709         field, replaced with ...
6710         <thread>: ... this new field.  All users adjusted.
6711         (recpy_element_object) <ptid>: Delete
6712         field, replaced with ...
6713         <thread>: ... this new field.  All users adjusted.
6714         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6715         a ptid_t.  All callers adjusted.
6716         * python/py-threadevent.c: Include "gdbthread.h".
6717         (get_event_thread): Use thread_to_thread_object.
6718         * python/python-internal.h (struct inferior_object): Forward
6719         declare.
6720         (find_thread_object, find_inferior_object): Delete declarations.
6721         (thread_to_thread_object, inferior_to_inferior_object): New
6722         declarations.
6723         * record-btrace.c: Include "inferior.h".
6724         (require_btrace_thread): Use inferior_thread.
6725         (record_btrace_frame_sniffer)
6726         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6727         (get_thread_current_frame): Use scoped_restore_current_thread and
6728         switch_to_thread.
6729         (get_thread_current_frame): Use thread pointer directly.
6730         (record_btrace_replay_at_breakpoint): Use thread's inferior
6731         pointer directly.
6732         * record-full.c: Include "inferior.h".
6733         * regcache.c: Include "gdbthread.h".
6734         (get_thread_arch_regcache): Use the inferior's address space
6735         directly.
6736         (get_thread_regcache, registers_changed_thread): New.
6737         * regcache.h (get_thread_regcache(thread_info *thread)): New
6738         overload.
6739         (registers_changed_thread): New.
6740         (remote_target) <remote_detach_1>: Swap order of parameters.
6741         (remote_add_thread): <remote_add_thread>: Return the new thread.
6742         (get_remote_thread_info(ptid_t)): New overload.
6743         (remote_target::remote_notice_new_inferior): Use thread pointers
6744         directly.
6745         (remote_target::process_initial_stop_replies): Use
6746         thread_info::set_running.
6747         (remote_target::remote_detach_1, remote_target::detach)
6748         (extended_remote_target::detach): Adjust.
6749         * stack.c (frame_show_address): Use inferior_thread.
6750         * target-debug.h (target_debug_print_thread_info_pp): New.
6751         * target-delegates.c: Regenerate.
6752         * target.c (default_thread_address_space): Delete.
6753         (memory_xfer_partial_1): Use current_inferior.
6754         (target_detach): Use current_inferior.
6755         (target_thread_address_space): Delete.
6756         (generic_mourn_inferior): Use current_inferior.
6757         * target.h (struct target_ops) <thread_address_space>: Delete.
6758         (target_thread_address_space): Delete.
6759         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6760         pointers directly.
6761         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6762         thread pointer instead of a ptid_t.  Adjust all callers.
6763         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6764         (first_thread_of_process): Delete, replaced by ...
6765         (first_thread_of_inferior): ... this new function.  All callers
6766         adjusted.
6767         (any_thread_of_process): Rename to ...
6768         (any_thread_of_inferior): ... this, and take an inferior pointer.
6769         (any_live_thread_of_process): Rename to ...
6770         (any_live_thread_of_inferior): ... this, and take an inferior
6771         pointer.
6772         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6773         (value_in_thread_stack_temporaries)
6774         (get_last_thread_stack_temporary): Take a thread pointer instead
6775         of a ptid_t.  Adjust all callers.
6776         (thread_info::set_running): New.
6777         (validate_registers_access): Use inferior_thread.
6778         (can_access_registers_ptid): Rename to ...
6779         (can_access_registers_thread): ... this, and take a thread
6780         pointer.
6781         (print_thread_info_1): Adjust to compare thread pointers instead
6782         of ptids.
6783         (switch_to_no_thread, switch_to_thread): Make extern.
6784         (scoped_restore_current_thread::~scoped_restore_current_thread):
6785         Use m_thread pointer directly.
6786         (scoped_restore_current_thread::scoped_restore_current_thread):
6787         Use inferior_thread.
6788         (thread_command): Use thread pointer directly.
6789         (thread_num_make_value_helper): Use inferior_thread.
6790         * top.c (execute_command): Use inferior_thread.
6791         * tui/tui-interp.c: Include "inferior.h".
6792         * varobj.c (varobj_create): Use inferior_thread.
6793         (value_of_root_1): Use find_thread_global_id instead of
6794         global_thread_id_to_ptid.
6795
6796 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6797
6798         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6799         possible.
6800         (regcache::write_part): Likewise.
6801         (readable_regcache::cooked_read_part): Update comment.
6802         (readable_regcache::cooked_write_part): Likewise.
6803         * regcache.h: (readable_regcache::read_part): Likewise.
6804         (regcache::write_part): Likewise.
6805
6806 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6807             Dirk Schubert  <dirk.schubert@arm.com>
6808
6809         * aarch64-linux-nat.c (post_attach): New.
6810         (aarch64_linux_nat_target::post_attach): Override post_attach to
6811         record the number of hardware debug registers.
6812
6813 2018-06-20  Tom Tromey  <tom@tromey.com>
6814
6815         * python/py-param.c (add_setshow_generic): Make parameters const.
6816         (parmpy_init): Update.
6817
6818 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6819
6820         * regcache.h (regcache_cooked_read_ftype): Rename to...
6821         (register_read_ftype): ...this, change type to function_view.
6822         (class reg_buffer) <save>: Remove src parameter.
6823         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6824         parameter non-const in first overload.  Remove src parameter in
6825         second overload.
6826         * regcache.c (do_cooked_read): Remove.
6827         (readonly_detached_regcache::readonly_detached_regcache): Make
6828         parameter non-const, adjust call to other constructor.
6829         (reg_buffer::save): Remove src parameter.
6830         * frame.c (do_frame_register_read): Remove.
6831         (frame_save_as_regcache): Use lambda function.
6832         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6833         parameter to ppu2spu_data *.
6834         (ppu2spu_sniffer): Use lambda function.
6835
6836 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6837
6838         * record-full.c (record_full_target::insert_breakpoint): Remove
6839         "struct" keyword, add const.
6840
6841 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6842
6843         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6844         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6845         * configure.ac: Remove AC_PREREQ, add missing quoting.
6846         * gnulib/configure.ac: Modernize usage of
6847         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6848         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6849         (AUTOMAKE_VERSION): Bump to 1.15.1.
6850         * configure: Re-generate.
6851         * config.in: Re-generate.
6852         * aclocal.m4: Re-generate.
6853         * gnulib/aclocal.m4: Re-generate.
6854         * gnulib/config.in: Re-generate.
6855         * gnulib/configure: Re-generate.
6856         * gnulib/import/Makefile.in: Re-generate.
6857
6858 2018-06-19  Pedro Alves  <palves@redhat.com>
6859
6860         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6861         (lookup_minimal_symbol_by_pc_section): ... here with
6862         gdb_assert_not_reached added.
6863
6864 2018-06-19  Pedro Alves  <palves@redhat.com>
6865
6866         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6867         parameter with a block parameter.  Compare location's block symbol
6868         with the frame's block instead of addresses.
6869         (skip_inline_frames): Pass the current block instead of the
6870         frame's address.  Break out as soon as we determine the frame
6871         should not be skipped.
6872
6873 2018-06-18  Tom Tromey  <tom@tromey.com>
6874
6875         * solib-aix.c (solib_aix_get_section_offsets): Return
6876         unique_xmalloc_ptr.
6877         (solib_aix_solib_create_inferior_hook): Update.
6878
6879 2018-06-18  Tom Tromey  <tom@tromey.com>
6880
6881         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6882
6883 2018-06-18  Tom Tromey  <tom@tromey.com>
6884
6885         * solib-frv.c (frv_relocate_main_executable): Use
6886         unique_xmalloc_ptr.
6887         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6888         unique_xmalloc_ptr.
6889
6890 2018-06-18  Tom Tromey  <tom@tromey.com>
6891
6892         * objfiles.h (inhibit_section_map_updates): Update.
6893         (resume_section_map_updates, resume_section_map_updates_cleanup):
6894         Remove.
6895         * solib-svr4.c (svr4_handle_solib_event): Update.
6896         * objfiles.c (inhibit_section_map_updates): Return
6897         scoped_restore_tmpl<int>.
6898         (resume_section_map_updates, resume_section_map_updates_cleanup):
6899         Remove.
6900
6901 2018-06-18  Tom Tromey  <tom@tromey.com>
6902
6903         * valprint.h (read_string): Update.
6904         * valprint.c (read_string): Change type of "buffer".
6905         (val_print_string): Update.
6906         * python/py-value.c (valpy_string): Update.
6907         * language.h (struct language_defn) <la_get_string>: Change
6908         type of "buffer".
6909         (default_get_string, c_get_string): Update.
6910         * language.c (default_get_string): Change type of "buffer".
6911         * guile/scm-value.c (gdbscm_value_to_string): Update.
6912         * c-lang.c (c_get_string): Change type of "buffer".
6913
6914 2018-06-18  Tom Tromey  <tom@tromey.com>
6915
6916         * ser-mingw.c (struct pipe_state_destroyer): New.
6917         (pipe_state_up): New typedef.
6918         (cleanup_pipe_state): Remove.
6919         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6920
6921 2018-06-18  Tom Tromey  <tom@tromey.com>
6922
6923         * rust-lang.h (rust_yyerror): Don't declare.
6924         * rust-lang.c (rust_language_defn): Update.
6925         * rust-exp.y (yyerror): Now static.
6926         * parse.c (parse_exp_in_context_1): Update.
6927         * p-lang.h (p_yyerror): Don't declare.
6928         * p-lang.c (p_language_defn): Update.
6929         * p-exp.y (yyerror): Now static.
6930         * opencl-lang.c (opencl_language_defn): Update.
6931         * objc-lang.c (objc_language_defn): Update.
6932         * m2-lang.h (m2_yyerror): Don't declare.
6933         * m2-lang.c (m2_language_defn): Update.
6934         * m2-exp.y (yyerror): Now static.
6935         * language.h (struct language_defn) <la_error>: Remove.
6936         * language.c (unk_lang_error): Remove.
6937         (unknown_language_defn, auto_language_defn): Remove.
6938         * go-lang.h (go_yyerror): Don't declare.
6939         * go-lang.c (go_language_defn): Update.
6940         * go-exp.y (yyerror): Now static.
6941         * f-lang.h (f_yyerror): Don't declare.
6942         * f-lang.c (f_language_defn): Update.
6943         * f-exp.y (yyerror): Now static.
6944         * d-lang.h (d_yyerror): Don't declare.
6945         * d-lang.c (d_language_defn): Update.
6946         * d-exp.y (yyerror): Now static.
6947         * c-lang.h (c_yyerror): Don't declare.
6948         * c-lang.c (c_language_defn, cplus_language_defn)
6949         (asm_language_defn, minimal_language_defn): Update.
6950         * c-exp.y (yyerror): Now static.
6951         * ada-lang.h (ada_yyerror): Don't declare.
6952         * ada-lang.c (ada_language_defn): Update.
6953         * ada-exp.y (yyerror): Now static.
6954
6955 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6956
6957         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6958         (store_sveregs_to_thread): Likewise.
6959         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6960         (aarch64_linux_store_inferior_registers): Likewise.
6961         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6962         function.
6963         (aarch64_sve_regs_copy_to_regcache): Likewise.
6964         (aarch64_sve_regs_copy_from_regcache): Likewise.
6965         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6966         declaration.
6967         (aarch64_sve_regs_copy_to_regcache): Likewise.
6968         (aarch64_sve_regs_copy_from_regcache): Likewise.
6969         (sve_context): Structure from Linux headers.
6970         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6971         (SVE_SIG_ZREG_SIZE): Likewise.
6972         (SVE_SIG_PREG_SIZE): Likewise.
6973         (SVE_SIG_FFR_SIZE): Likewise.
6974         (SVE_SIG_REGS_OFFSET): Likewise.
6975         (SVE_SIG_ZREGS_OFFSET): Likewise.
6976         (SVE_SIG_ZREG_OFFSET): Likewise.
6977         (SVE_SIG_ZREGS_SIZE): Likewise.
6978         (SVE_SIG_PREGS_OFFSET): Likewise.
6979         (SVE_SIG_PREG_OFFSET): Likewise.
6980         (SVE_SIG_PREGS_SIZE): Likewise.
6981         (SVE_SIG_FFR_OFFSET): Likewise.
6982         (SVE_SIG_REGS_SIZE): Likewise.
6983         (SVE_SIG_CONTEXT_SIZE): Likewise.
6984         (SVE_PT_REGS_MASK): Likewise.
6985         (SVE_PT_REGS_FPSIMD): Likewise.
6986         (SVE_PT_REGS_SVE): Likewise.
6987         (SVE_PT_VL_INHERIT): Likewise.
6988         (SVE_PT_VL_ONEXEC): Likewise.
6989         (SVE_PT_REGS_OFFSET): Likewise.
6990         (SVE_PT_FPSIMD_OFFSET): Likewise.
6991         (SVE_PT_FPSIMD_SIZE): Likewise.
6992         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6993         (SVE_PT_SVE_PREG_SIZE): Likewise.
6994         (SVE_PT_SVE_FFR_SIZE): Likewise.
6995         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6996         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6997         (__SVE_SIG_TO_PT): Likewise.
6998         (SVE_PT_SVE_OFFSET): Likewise.
6999         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7000         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7001         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7002         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7003         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7004         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7005         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7006         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7007         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7008         (SVE_PT_SVE_SIZE): Likewise.
7009         (SVE_PT_SIZE): Likewise.
7010         (HAS_SVE_STATE): New define.
7011
7012 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7013
7014         * nat/aarch64-sve-linux-sigcontext.h: New file.
7015         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7016         new files.
7017         (SVE_VQ_MIN): Likewise.
7018         (SVE_VQ_MAX): Likewise.
7019         (SVE_VL_MIN): Likewise.
7020         (SVE_VL_MAX): Likewise.
7021         (SVE_NUM_ZREGS): Likewise.
7022         (SVE_NUM_PREGS): Likewise.
7023         (sve_vl_valid): Likewise.
7024         (struct user_sve_header): Likewise.
7025
7026 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7027             Richard Bunt <Richard.Bunt@arm.com>
7028
7029         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7030         was requested by GDB.
7031
7032 2018-06-15  Tom de Vries  <tdevries@suse.de>
7033
7034         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7035
7036 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7037
7038         * gnulib/update-gnulib.sh: Print expected versions of
7039         autoconf/aclocal.
7040
7041 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7042
7043         * arch-utils.c (default_type_align): Use type_length_units.
7044         * gdbtypes.c (type_align): Use type_length_units.
7045
7046 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7047
7048         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7049         of 'define' command.
7050
7051 2018-06-14  Tom de Vries  <tdevries@suse.de>
7052
7053         PR cli/22573
7054         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7055         get_no_prettyformat_print_options.
7056
7057 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7058
7059         * sparc-nat.h: Include target.h.
7060         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7061         <fetch_registers>: Remove this argument in function call.
7062         <store_registers>: Remove this argument in function call, remove
7063         extra semicolon.
7064         <low_forget_process>: Call sparc64_forget_process instead of
7065         sparc_forget_process.
7066
7067 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7068
7069         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7070         (procfs_target::make_corefile_notes): Adjust to new
7071         target_read_alloc return type.
7072
7073 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7074             Stephen Roberts  <stephen.roberts@arm.com>
7075
7076         PR gdb/22882
7077         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7078         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7079         Move should_notify_stop local into more inner scope.
7080
7081 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7082             Stephen Roberts  <stephen.roberts@arm.com>
7083
7084         PR gdb/22882
7085         * infrun.c (resume_1): Add call to mark_async_event_handler.
7086
7087 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7088
7089         * infrun.c (do_target_wait): Change old version of $pc printed.
7090
7091 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7092
7093         * dwarf2read.c (read_index_from_section): Rename to...
7094         (read_gdb_index_from_section): ... this, update all callers.
7095         (dwarf2_read_index): Rename to...
7096         (dwarf2_read_gdb_index): ... this, update all callers.
7097
7098 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7099
7100         * gdb/hppa-linux-nat.c
7101         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7102         hppa_linux_nat_target::fetch_registers.
7103
7104 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7105
7106         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7107         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7108         (AARCH64_DWARF_SVE_FFR): Likewise.
7109         (AARCH64_DWARF_SVE_P0): Likewise.
7110         (AARCH64_DWARF_SVE_Z0): Likewise.
7111
7112 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7113
7114         * common/common-regcache.h (raw_compare): New function.
7115         * regcache.c (regcache::raw_compare): Likewise.
7116         * regcache.h (regcache::raw_compare): New declaration.
7117
7118 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7119
7120         * common/common-regcache.h (reg_buffer_common): New structure.
7121         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7122         (reg_buffer::raw_supply): Likewise.
7123         (reg_buffer::raw_supply_integer): Likewise.
7124         (reg_buffer::raw_supply_zeroed): Likewise.
7125         (reg_buffer::raw_collect): Likewise.
7126         (reg_buffer::raw_collect_integer): Likewise.
7127         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7128         (reg_buffer::raw_supply): Likewise.
7129         (reg_buffer::raw_supply_integer): Likewise.
7130         (reg_buffer::raw_supply_zeroed): Likewise.
7131         (reg_buffer::raw_collect): Likewise.
7132         (reg_buffer::raw_collect_integer): Likewise.
7133
7134 2018-06-10  Tom Tromey  <tom@tromey.com>
7135
7136         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7137         (class remote_state) <stop_reply_queue>: Now std::vector.
7138         (remote_state::~remote_state)
7139         (remote_target::stop_reply_queue_length): Update.
7140         (struct queue_iter_param, remove_child_of_pending_fork)
7141         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7142         (check_pending_event_prevents_wildcard_vcont_callback)
7143         (remove_stop_reply_for_inferior)
7144         (remove_stop_reply_of_remote_state)
7145         (remote_notif_remove_once_on_match)
7146         (stop_reply_match_ptid_and_ws)
7147         (remote_kill_child_of_pending_fork): Remove.
7148         (remote_target::remove_new_fork_children)
7149         (remote_target::check_pending_events_prevent_wildcard_vcont)
7150         (remote_target::discard_pending_stop_replies)
7151         (remote_target::discard_pending_stop_replies_in_queue)
7152         (remote_target::remote_notif_remove_queued_reply)
7153         (remote_target::queued_stop_reply)
7154         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7155         (remote_target::wait, remote_target::kill_new_fork_children)
7156         (remote_target::async): Update.
7157
7158 2018-06-10  Tom Tromey  <tom@tromey.com>
7159
7160         * record-full.c (record_full_arch_list_cleanups): Remove.
7161         (record_full_message): Use try/catch.
7162         (record_full_wait_cleanups): Remove.
7163         (record_full_wait_1): Use try/catch.
7164         (record_full_restore): Likewise.
7165
7166 2018-06-10  Tom Tromey  <tom@tromey.com>
7167
7168         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7169         declare VEC.  Add constructor.
7170         <in_target_beneath>: Now bool.
7171         (record_full_breakpoints): Now a std::vector, static.
7172         (record_full_sync_record_breakpoints)
7173         (record_full_init_record_breakpoints)
7174         (record_full_target::insert_breakpoint)
7175         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7176
7177 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7178
7179         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7180         * serial.c (serial_interface_lookup): Remove struct keyword.
7181
7182 2018-06-10  Tom Tromey  <tom@tromey.com>
7183
7184         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7185         method.
7186         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7187         a method.
7188         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7189         method.
7190         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7191         "beneath" as a method.
7192         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7193         Use "beneath" as a method.
7194
7195 2018-06-10  Tom Tromey  <tom@tromey.com>
7196
7197         * tracefile.c (struct trace_file_writer_deleter): New.
7198         <operator()>: Rename from trace_file_writer_xfree.
7199         (trace_file_writer_up): New typedef.
7200         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7201
7202 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7203
7204         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7205         <m_registers, m_register_status>: Change type to
7206         std::unique_ptr.
7207         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7208         XCNEWVEC.
7209
7210 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7211
7212         * common/common-regcache.h (enum register_status): Add
7213         underlying type "signed char".
7214         * regcache.h (reg_buffer) <m_register_status>: Change type to
7215         register_status *.
7216         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7217         register_status instead of signed char.
7218         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7219         (reg_buffer::get_register_status): Remove cast.
7220         (readable_regcache::raw_read): Remove cast.
7221         (readable_regcache::cooked_read): Remove cast.
7222
7223 2018-06-09  Tom Tromey  <tom@tromey.com>
7224
7225         * source.c (reverse_search_command, forward_search_command): Use
7226         scoped_fd.
7227
7228 2018-06-09  Tom Tromey  <tom@tromey.com>
7229
7230         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7231         (serial_ops_list): Now static, std::vector.
7232         (serial_interface_lookup, serial_add_interface): Update.
7233
7234 2018-06-09  Tom Tromey  <tom@tromey.com>
7235
7236         * dwarf2read.c (process_cu_includes): Update.
7237         (process_full_comp_unit): Update.
7238         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7239         std::vector.
7240
7241 2018-06-08  Paul Koning  <paul_koning@dell.com>
7242
7243         PR gdb/23252
7244
7245         * python/python.c (do_start_initialization):
7246         Avoid call to internal Python API.
7247         (init__gdb_module): New function.
7248
7249 2018-06-08  Gary Benson <gbenson@redhat.com>
7250
7251         * linux-thread-db.c (valprint.h): New include.
7252         (struct check_thread_db_info): New structure.
7253         (check_thread_db_on_load, tdb_testinfo): New static globals.
7254         (check_thread_db, check_thread_db_callback): New functions.
7255         (try_thread_db_load_1): Run integrity checks if requested.
7256         (maintenance_check_libthread_db): New function.
7257         (_initialize_thread_db): Register "maint check libthread-db"
7258         and "maint set/show check-libthread-db".
7259         * NEWS: Mention the above new commands.
7260
7261 2018-06-08  Tom Tromey  <tom@tromey.com>
7262
7263         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7264         now a method.
7265
7266 2018-06-08  Tom Tromey  <tom@tromey.com>
7267
7268         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7269
7270 2018-06-08  Tom Tromey  <tom@tromey.com>
7271
7272         * common/btrace-common.h (struct btrace_data): Add constructor,
7273         destructor, move assignment operator.
7274         <empty, clear, fini>: New methods.
7275         <format>: Initialize.
7276         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7277         (btrace_data_empty): Don't declare.
7278         * common/btrace-common.c (btrace_data_init): Remove.
7279         (btrace_data::fini): Rename from btrace_data_fini.
7280         (btrace_data::empty): Rename from btrace_data_empty.
7281         (btrace_data::clear): Rename from btrace_data_clear.  Return
7282         bool.
7283         * btrace.h (make_cleanup_btrace_data): Don't declare.
7284         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7285         (parse_xml_btrace): Update.
7286         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7287         (maint_btrace_clear_packet_history_cmd): Update.
7288
7289 2018-06-07  Pedro Alves  <palves@redhat.com>
7290
7291         * target.h (target_ops) <beneath>: Now a method.  All references
7292         updated.
7293         (class target_stack): New.
7294         * target.c (g_target_stack): New.
7295         (g_current_top_target): Delete.
7296         (current_top_target): Get the top target out of g_target_stack.
7297         (target_stack::push, target_stack::unpush): New.
7298         (push_target, unpush_target): Reimplement.
7299         (target_is_pushed): Reimplement in terms of g_target_stack.
7300         (target_ops::beneath, target_stack::find_beneath): New.
7301
7302 2018-06-07  Pedro Alves  <palves@redhat.com>
7303
7304         * target.h (find_target_beneath): Delete declaration.
7305         * target.c (find_target_beneath): Delete definition.
7306         * aix-thread.c: All callers of find_target_beneath adjusted to
7307         call target_ops::beneath instead.
7308         * bsd-uthread.c: Likewise.
7309         * linux-thread-db.c: Likewise.
7310         * ravenscar-thread.c: Likewise.
7311         * sol-thread.c: Likewise.
7312         * spu-multiarch.c: Likewise.
7313
7314 2018-06-07  Pedro Alves  <palves@redhat.com>
7315
7316         * target.h (target_ops) <beneath>: Now a method.  All references
7317         updated.
7318         (target_ops) <m_beneath>: New.
7319         * target.c (target_ops::beneath): New.
7320         * corelow.c: Adjust all references to target_ops::beneath.
7321         * linux-thread-db.c: Likewise.
7322         * make-target-delegates: Likewise.
7323         * record-btrace.c: Likewise.
7324         * record-full.c: Likewise.
7325         * remote.c: Likewise.
7326         * target.c: Likewise.
7327         * target-delegates.c: Regenerate.
7328
7329 2018-06-07  Pedro Alves  <palves@redhat.com>
7330
7331         * target.h (target_stack): Delete.
7332         (current_top_target): Declare function.
7333         * target.c (target_stack): Delete.
7334         (g_current_top_target): New.
7335         (current_top_target): New function.
7336         * auxv.c: Use current_top_target instead of target_stack
7337         throughout.
7338         * avr-tdep.c: Likewise.
7339         * breakpoint.c: Likewise.
7340         * corefile.c: Likewise.
7341         * elfread.c: Likewise.
7342         * eval.c: Likewise.
7343         * exceptions.c: Likewise.
7344         * frame.c: Likewise.
7345         * gdbarch-selftests.c: Likewise.
7346         * gnu-v3-abi.c: Likewise.
7347         * ia64-tdep.c: Likewise.
7348         * ia64-vms-tdep.c: Likewise.
7349         * infcall.c: Likewise.
7350         * infcmd.c: Likewise.
7351         * infrun.c: Likewise.
7352         * linespec.c: Likewise.
7353         * linux-tdep.c: Likewise.
7354         * minsyms.c: Likewise.
7355         * ppc-linux-nat.c: Likewise.
7356         * ppc-linux-tdep.c: Likewise.
7357         * procfs.c: Likewise.
7358         * regcache.c: Likewise.
7359         * remote.c: Likewise.
7360         * rs6000-tdep.c: Likewise.
7361         * s390-linux-nat.c: Likewise.
7362         * s390-tdep.c: Likewise.
7363         * solib-aix.c: Likewise.
7364         * solib-darwin.c: Likewise.
7365         * solib-dsbt.c: Likewise.
7366         * solib-spu.c: Likewise.
7367         * solib-svr4.c: Likewise.
7368         * solib-target.c: Likewise.
7369         * sparc-tdep.c: Likewise.
7370         * sparc64-tdep.c: Likewise.
7371         * spu-tdep.c: Likewise.
7372         * symfile.c: Likewise.
7373         * symtab.c: Likewise.
7374         * target-descriptions.c: Likewise.
7375         * target-memory.c: Likewise.
7376         * target.c: Likewise.
7377         * target.h: Likewise.
7378         * tracefile-tfile.c: Likewise.
7379         * tracepoint.c: Likewise.
7380         * valops.c: Likewise.
7381         * valprint.c: Likewise.
7382         * value.c: Likewise.
7383         * windows-tdep.c: Likewise.
7384         * mi/mi-main.c: Likewise.
7385
7386 2018-06-07  Tom Tromey  <tom@tromey.com>
7387
7388         * valprint.h (build_address_symbolic): Declare.
7389         * printcmd.c (print_address_symbolic): Update.
7390         (build_address_symbolic): Change "name" and "filename" to
7391         std::string.
7392         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7393         Update.
7394         * defs.h (build_address_symbolic): Remove declaration.
7395
7396 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7397
7398         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7399         (aarch64_vnv_type): Add function.
7400         (aarch64_pseudo_register_name): Add V regs for SVE.
7401         (aarch64_pseudo_register_type): Likewise.
7402         (aarch64_pseudo_register_reggroup_p): Likewise.
7403         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7404         (aarch64_pseudo_read_value): Add V regs for SVE.
7405         (aarch64_pseudo_write_2): Use V0 offset for SVE
7406         (aarch64_pseudo_write): Add V regs for SVE.
7407         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7408
7409 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7410
7411         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7412         (sve_vl_from_vq): Likewise.
7413
7414 2018-06-05  Tom Tromey  <tom@tromey.com>
7415
7416         * cli/cli-cmds.c (show_version): Update.
7417         * top.c (print_gdb_version): Add "interactive" parameter.
7418         Update.
7419         * main.c (captured_main_1): Update.
7420         * top.h (print_gdb_version): Add "interactive" parameter and a
7421         comment.
7422
7423 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7424
7425         * common/enum-flags.h: Add trailing semicolon to example in
7426         comment.
7427
7428 2018-06-05  Tom Tromey  <tom@tromey.com>
7429
7430         PR cli/12326:
7431         * NEWS: Add entry about pager.
7432         * utils.c (pagination_disabled_for_command): New global.
7433         (prompt_for_continue): Allow "c" response to prompt.
7434         (reinitialize_more_filter): Clear
7435         pagination_disabled_for_command.
7436         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7437
7438 2018-06-04  Tom Tromey  <tom@tromey.com>
7439
7440         * ada-lang.h (ada_lookup_symbol_list): Update.
7441         * ada-lang.c (resolve_subexp): Update.
7442         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7443         parameter.
7444         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7445         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7446         results parameter to std::vector.
7447         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7448         Update.
7449         * ada-exp.y (block_lookup): Update.
7450         (select_possible_type_sym): Change type of syms.  Remove nsyms
7451         parameter.
7452         (write_var_or_type, write_name_assoc): Update.
7453
7454 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7455
7456         * windows-nat.c (windows_nat_target::xfer_partial): Return
7457         TARGET_XFER_E_IO if we need to delegate to the target beneath
7458         but BENEATH is NULL.
7459
7460 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7461
7462         * Makefile.in (config.status): Add configure.nat as a
7463         dependency.
7464
7465 2018-06-04  Tom Tromey  <tom@tromey.com>
7466
7467         * cp-name-parser.y (cpname_state): Add method declarations.
7468         (HANDLE_QUAL): Update.
7469         (cpname_state::d_grab, cpname_state::fill_comp)
7470         (cpname_state::make_operator, cpname_state::make_dtor)
7471         (cpname_state::make_builtin_type, cpname_state::make_name)
7472         (cpname_state::d_qualify, cpname_state::d_int_type)
7473         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7474         (%union): Move earlier.
7475
7476 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7477
7478         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7479
7480 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7481
7482         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7483         (aarch64_pseudo_write_1): Likewise.
7484         (aarch64_pseudo_read_value): Use helper.
7485         (aarch64_pseudo_write): Likewise.
7486
7487 2018-06-04  Pedro Alves  <palves@redhat.com>
7488
7489         * darwin-nat.c (darwin_ops): Delete.
7490         (darwin_attach_pid): Use get_native_target.
7491
7492 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7493
7494         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7495         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7496
7497 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7498
7499         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7500         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7501         (aarch64_gdbarch_init): Check for SVE.
7502         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7503
7504 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7505
7506         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7507         * aarch64-tdep.h (aarch64_read_description): Likewise.
7508         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7509         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7510         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7511         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7512         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7513
7514 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7515
7516         * value.c (value_fetch_lazy_bitfield): New.
7517         (value_fetch_lazy_memory): New.
7518         (value_fetch_lazy_register): New.
7519         (value_fetch_lazy): Factor out to smaller functions.
7520
7521 2018-06-01  Tom Tromey  <tom@tromey.com>
7522
7523         * cp-name-parser.y (backslashable, represented): Now const.
7524
7525 2018-06-01  Tom Tromey  <tom@tromey.com>
7526
7527         * cp-name-parser.y: Include parser-defs.h.
7528         (parser_fprintf): Remove declaration.
7529
7530 2018-06-01  Tom Tromey  <tom@tromey.com>
7531
7532         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7533         %parse-param.
7534         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7535         (global_result): Remove globals.
7536         (struct cpname_state): New.
7537         (yyparse): Don't declare.
7538         (yylex, yyerror): Move declarations after %union.
7539         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7540         (make_name): Add state parameter.
7541         Update all callers.
7542         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7543         parameter.
7544         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7545         Update.
7546         (yylex): Add lvalp, state parameters.
7547         (yyerror): Add state parameter.
7548         (cp_demangled_name_to_comp): Update.
7549
7550 2018-06-01  Tom Tromey  <tom@tromey.com>
7551
7552         * cp-name-parser.y (parser_fprintf): Declare.
7553         (GDB_YY_REMAP_PREFIX): Define.
7554         Include yy-remap.h.  Don't redefine yy* identifiers.
7555
7556 2018-06-01  Tom Tromey  <tom@tromey.com>
7557
7558         * python/py-type.c (typy_legacy_template_argument): Update.
7559         * cp-support.h (cp_demangled_name_to_comp): Update.
7560         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7561         parameter to be a "std::string *".
7562         (main): Update.
7563
7564 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7565
7566         * ada-lex.l: Include "diagnostics.h" instead of
7567         "common/diagnostics.h".
7568         * unittests/environ-selftests.c: Likewise.
7569         * common/diagnostics.h: Moved to ../include.
7570
7571 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7572
7573         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7574         to language_mode_manual while calling breakpoint_re_set_one.
7575
7576 2018-06-01  Tom Tromey  <tom@tromey.com>
7577
7578         * valops.c (value_cast_structs, destructor_name_p): Update.
7579         * symtab.c (gdb_mangle_name): Update.
7580         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7581         Update.
7582         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7583         (pascal_object_print_value_fields, pascal_object_print_value):
7584         Update.
7585         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7586         * linespec.c (find_methods): Update.
7587         * gdbtypes.h (type_name_no_tag): Remove.
7588         (type_name_or_error): Rename from type_name_no_tag_or_error.
7589         * gdbtypes.c (type_name_no_tag): Remove.
7590         (type_name_or_error): Rename from type_name_no_tag_or_error.
7591         (lookup_struct_elt_type, check_typedef): Update.
7592         * expprint.c (print_subexp_standard): Update.
7593         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7594         * d-namespace.c (d_lookup_nested_symbol): Update.
7595         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7596         (cp_print_class_member): Update.
7597         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7598         * completer.c (add_struct_fields): Update.
7599         * c-typeprint.c (cp_type_print_derivation_info)
7600         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7601         Update.
7602         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7603         (ada_prefer_type, ada_is_exception_sym): Update.
7604
7605 2018-06-01  Tom Tromey  <tom@tromey.com>
7606
7607         * valops.c (enum_constant_from_type, value_namespace_elt)
7608         (value_maybe_namespace_elt): Update.
7609         * valarith.c (find_size_for_pointer_math): Update.
7610         * target-descriptions.c (make_gdb_type): Update.
7611         * symmisc.c (print_symbol): Update.
7612         * stabsread.c (define_symbol, read_type)
7613         (complain_about_struct_wipeout, add_undefined_type)
7614         (cleanup_undefined_types_1): Update.
7615         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7616         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7617         (rust_internal_print_type, rust_composite_type)
7618         (rust_evaluate_funcall, rust_evaluate_subexp)
7619         (rust_inclusive_range_type_p): Update.
7620         * python/py-type.c (typy_get_tag): Update.
7621         * p-typeprint.c (pascal_type_print_base): Update.
7622         * mdebugread.c (parse_symbol, parse_type): Update.
7623         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7624         Update.
7625         * guile/scm-type.c (gdbscm_type_tag): Update.
7626         * go-lang.c (sixg_string_p): Update.
7627         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7628         Update.
7629         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7630         (TYPE_TAG_NAME): Remove.
7631         * gdbtypes.c (type_name_no_tag): Simplify.
7632         (check_typedef, check_types_equal, recursive_dump_type)
7633         (copy_type_recursive, arch_composite_type): Update.
7634         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7635         in summary mode when needed.
7636         * eval.c (evaluate_funcall): Update.
7637         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7638         (process_structure_scope, read_enumeration_type)
7639         (read_namespace_type, read_module_type, determine_prefix): Update.
7640         * cp-support.c (inspect_type): Update.
7641         * coffread.c (process_coff_symbol, decode_base_type): Update.
7642         * c-varobj.c (c_is_path_expr_parent): Update.
7643         * c-typeprint.c (c_type_print_base_struct_union): Update.
7644         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7645         summary when using C language.
7646         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7647         (gen_maybe_namespace_elt): Update.
7648         * ada-lang.c (ada_type_name): Simplify.
7649         (empty_record, ada_template_to_fixed_record_type_1)
7650         (template_to_static_fixed_type)
7651         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7652
7653 2018-06-01  Tom Tromey  <tom@tromey.com>
7654
7655         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7656         c_print_type.
7657         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7658         (c_print_type): Update.
7659         (c_print_type): New overload.
7660         (c_type_print_varspec_prefix, c_type_print_args)
7661         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7662         (c_type_print_base_struct_union, c_type_print_base_1)
7663         (cp_type_print_method_args): Add "language" parameter.
7664         (c_type_print_base): Update.
7665         * c-lang.h (c_print_type): Add new overload.
7666
7667 2018-06-01  Tom Tromey  <tom@tromey.com>
7668
7669         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7670         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7671
7672 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7673
7674         * aarch64-tdep.c (aarch64_sve_register_names): New const
7675         var.
7676         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7677         (AARCH64_SVE_Z_REGS_NUM): New define.
7678         (AARCH64_SVE_P_REGS_NUM): Likewise.
7679         (AARCH64_SVE_NUM_REGS): Likewise.
7680
7681 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7682
7683         * nat/linux-ptrace.h [__alpha__]
7684         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7685         definitions.
7686
7687 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7688
7689         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7690         the endianness selected.
7691         * NEWS: Document `set endian auto' mode operation update.
7692
7693 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7694
7695         * Makefile.in: Add new header.
7696         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7697         (sve_vl_from_vg): Likewise.
7698         (sve_vq_from_vl): Likewise.
7699         (sve_vl_from_vq): Likewise.
7700         (sve_vq_from_vg): Likewise.
7701         (sve_vg_from_vq): Likewise.
7702         * configure.nat: Add new c file.
7703         * nat/aarch64-sve-linux-ptrace.c: New file.
7704         * nat/aarch64-sve-linux-ptrace.h: New file.
7705
7706 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7707
7708         * aarch64-linux-nat.c (aarch64_linux_read_description):
7709         Add parmeter zero.
7710         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7711         Likewise.
7712         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7713         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7714         (aarch64_gdbarch_init): Add parmeter zero.
7715         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7716         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7717         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7718         parmeter.
7719         * doc/gdb.texinfo: Describe SVE feature
7720         * features/aarch64-sve.c: New file.
7721
7722 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7723
7724         PR gdb/23210
7725         * gdbarch.sh (significant_addr_bit): Default to zero when
7726         not set by target architecture.
7727         * gdbarch.c: Re-generated.
7728         * utils.c (address_significant): Update.
7729
7730 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7731
7732         * stack.c (func_command): Remove trailing newline in call to error.
7733
7734 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7735
7736         * regcache.h (regcache_raw_collect): Remove, update callers to
7737         use regcache::raw_collect.
7738         * regcache.c (regcache_raw_collect): Remove.
7739
7740 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7741
7742         * regcache.h (regcache_raw_supply): Remove, update callers to
7743         use detached_regcache::raw_supply.
7744         * regcache.c (regcache_raw_supply): Remove.
7745
7746 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7747
7748         * regcache.h (regcache_cooked_write_part): Remove, update
7749         callers to use regcache::cooked_write_part.
7750         * regcache.c (regcache_cooked_write_part): Remove.
7751
7752 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7753
7754         * regcache.h (regcache_cooked_read_part): Remove, update callers
7755         to use readable_regcache::cooked_read_part.
7756         * regcache.c (regcache_cooked_read_part): Remove.
7757
7758 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7759
7760         * regcache.h (regcache_cooked_read_value): Remove, update
7761         callers to use readable_regcache::cooked_read_value.
7762         * regcache.c (regcache_cooked_read_value): Remove.
7763
7764 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7765
7766         * regcache.h (regcache_cooked_write): Remove, update callers to
7767         use regcache::cooked_write.
7768         * regcache.c (regcache_cooked_write): Remove.
7769
7770 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7771
7772         * regcache.h (regcache_invalidate): Remove, update callers to
7773         use detached_regcache::invalidate instead.
7774         * regcache.c (regcache_invalidate): Remove.
7775
7776 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7777
7778         * regcache.h (regcache_raw_write_part): Remove, update callers
7779         to use regcache::raw_write_part instead.
7780         * regcache.c (regcache_raw_write_part): Remove.
7781
7782 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7783
7784         * regcache.h (regcache_raw_read_part): Remove, update callers to
7785         use readable_regcache::raw_read_part instead.
7786         * regcache.c (regcache_raw_read_part): Remove.
7787
7788 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7789
7790         * regcache.h (regcache_cooked_read): Remove, update callers to
7791         use readable_regcache::cooked_read instead.
7792         * regcache.c (regcache_cooked_read): Remove.
7793
7794 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7795
7796         * regcache.h (regcache_raw_write): Remove, update callers to use
7797         regcache::raw_write instead.
7798         * regcache.c (regcache_raw_write): Remove.
7799
7800 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7801
7802         * regcache.h (regcache_raw_read): Remove, update callers to use
7803         readable_regcache::raw_read instead.
7804         * regcache.c (regcache_raw_read): Remove.
7805
7806 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7807
7808         * regcache.h (regcache_raw_update): Remove, update callers to
7809         use readable_regcache::raw_update instead.
7810         * regcache.c (regcache_raw_update): Remove.
7811
7812 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7813
7814         * regcache.h (regcache_register_status): Remove, update callers
7815         to use reg_buffer::get_register_status directly instead.
7816         * regcache.c (regcache_register_status): Remove.
7817
7818 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7819
7820         * regcache.h (regcache_get_ptid): Remove, update all callers to
7821         call regcache::ptid instead.
7822         * regcache.c (regcache_get_ptid): Remove.
7823
7824 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7825
7826         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7827
7828 2018-05-30  Pedro Alves  <palves@redhat.com>
7829
7830         * common/common-exceptions.h (exception_rethrow): Use
7831         ATTRIBUTE_NORETURN.
7832
7833 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7834
7835         * breakpoint.c (print_solib_event, check_status_catch_solib):
7836         Remove struct keyword in range-based for loops.
7837         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7838         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7839         Likewise.
7840         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7841         Likewise.
7842         * symfile.c (addr_info_make_relative): Likewise.
7843         * thread.c (value_in_thread_stack_temporaries): Likewise.
7844
7845 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7846
7847         PR gdb/16841
7848         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7849         aggregate type to get its real type before accessing it.
7850
7851 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7852
7853         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7854         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7855         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7856         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7857         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7858         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7859         * printcmd.c (info_address_command): Likewise.
7860
7861 2018-05-29  Tom Tromey  <tom@tromey.com>
7862
7863         * windows-nat.c (handle_exception): Update fall-through comment.
7864
7865 2018-05-29  Tom Tromey  <tom@tromey.com>
7866
7867         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7868         (struct program_space) <added_solibs>: Now a std::vector.
7869         * breakpoint.c (print_solib_event): Update.
7870         (check_status_catch_solib): Update.
7871         * progspace.c (clear_program_space_solib_cache): Update.
7872         * solib.c (update_solib_list): Update.
7873
7874 2018-05-29  Tom Tromey  <tom@tromey.com>
7875
7876         * python/py-type.c (typy_richcompare): Update.
7877         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7878         * gdbtypes.h (types_deeply_equal): Return bool.
7879         (types_equal): Likewise.
7880         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7881         declare VEC.
7882         (check_types_equal): Change worklist to std::vector.  Return
7883         bool.
7884         (struct type_equality_entry): Add constructor.
7885         (compare_maybe_null_strings): Return bool.
7886         (check_types_worklist): Return bool.  Change worklist to
7887         std::vector.
7888         (types_deeply_equal): Use std::vector.
7889         (types_equal): Return bool.
7890         (compare_maybe_null_strings): Simplify.
7891
7892 2018-05-29  Tom Tromey  <tom@tromey.com>
7893
7894         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7895
7896 2018-05-29  Tom Tromey  <tom@tromey.com>
7897
7898         * objc-lang.h: Don't include cp-support.h.
7899         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7900         declare VEC.
7901
7902 2018-05-27  Tom Tromey  <tom@tromey.com>
7903
7904         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7905
7906 2018-05-25  Tom Tromey  <tom@tromey.com>
7907
7908         * value.c (value::location): Initialize.
7909
7910 2018-05-25  Tom Tromey  <tom@tromey.com>
7911
7912         * dbxread.c (init_bincl_list): Remove.
7913         (bincl_list): Now a std::vector.
7914         (bincls_allocated, next_bincl): Remove.
7915         (free_bincl_list, do_free_bincl_list_cleanup)
7916         (make_cleanup_free_bincl_list): Remove.
7917         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7918         unique_xmalloc_ptr.
7919         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7920         (struct header_file_location): Add constructor.
7921         (add_bincl_to_list): Remove.
7922
7923 2018-05-25  Tom Tromey  <tom@tromey.com>
7924
7925         * tui/tui.c (tui_enable): Update.
7926         * mi/mi-interp.c (mi_interp::init): Update.
7927         * interps.h (class interp) <name>: New method.
7928         <m_name>: Rename from name.
7929         (~scoped_restore_interp): Update.
7930         * interps.c (interp::interp): Update.
7931         (interp_add, interp_set, interp_lookup_existing)
7932         (current_interp_named_p): Update.
7933
7934 2018-05-25  Tom Tromey  <tom@tromey.com>
7935
7936         * interps.c (interp_name): Remove.
7937         * mi/mi-interp.c (mi_interp::init): Update.
7938         * interps.h (interp_name): Remove.
7939         (~scoped_restore_interp): Update.
7940         * tui/tui.c (tui_enable): Update.
7941
7942 2018-05-25  Tom Tromey  <tom@tromey.com>
7943
7944         * utils.c (fputs_maybe_filtered): Update.
7945         * linespec.c (decode_line_full): Update.
7946         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7947         (mi_print_breakpoint_for_event, mi_solib_loaded)
7948         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7949         (mi_user_selected_context_changed): Update.
7950         * mi/mi-main.c (mi_execute_command): Update.
7951         * cli/cli-script.c (execute_control_command): Update.
7952         * python/python.c (execute_gdb_command): Update.
7953         * solib.c (info_sharedlibrary_command): Update.
7954         * interps.c (interp_ui_out): Remove.
7955         * interps.h (interp_ui_out): Remove.
7956
7957 2018-05-25  Tom Tromey  <tom@tromey.com>
7958
7959         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7960         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7961         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7962
7963 2018-05-25  Tom Tromey  <tom@tromey.com>
7964
7965         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7966         * interps.c (interp_exec): Use scoped_restore.
7967
7968 2018-05-25  Tom Tromey  <tom@tromey.com>
7969
7970         * remote.c (remote_target::remote_file_get): Use
7971         gdb::byte_vector.
7972         (remote_target::remote_file_put): Likewise.
7973
7974 2018-05-25  Tom Tromey  <tom@tromey.com>
7975
7976         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7977         a std::string.
7978         (get_pe_section_index, add_pe_exported_sym): Update.
7979         (read_pe_exported_syms): Use gdb::def_vector.
7980
7981 2018-05-25  Tom Tromey  <tom@tromey.com>
7982
7983         * frame.c (remove_prev_frame): Remove.
7984         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7985
7986 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7987
7988         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7989         Remove prototypes.
7990         * mips-linux-nat.c (supply_fpregset): Always call
7991         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7992         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7993         `mips_fill_fpregset'.
7994         * mips-linux-tdep.c (mips_supply_fpregset)
7995         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7996         (mips_fill_fpregset_wrapper): Remove functions.
7997         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7998         (mips_linux_fpregset): Remove variable.
7999         (mips_linux_iterate_over_regset_sections): Use
8000         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8001         (mips_linux_o32_sigframe_init): Remove comment.
8002
8003 2018-05-25  Pedro Alves  <palves@redhat.com>
8004
8005         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8006         (struct readahead_cache, struct packet_reg, struct
8007         remote_arch_state, class remote_state): Move higher up in the
8008         file.
8009         (remote_target::m_remote_state): Now an object instead of a pointer.
8010         (remote_target::get_remote_state): Adjust.
8011
8012 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8013
8014         * stack.c (select_and_print_frame): Delete.
8015         (struct function_bounds): Move struct within function.
8016         (func_command): Most content moved into new function
8017         find_frame_for_function, use new function, print result, add
8018         function comment.
8019         (find_frame_for_function): New function, now returns a result.
8020
8021 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8022
8023         * stack.c (iterate_over_block_arg_vars): Fix comment.
8024         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8025
8026 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8027
8028         PR gdb/23203
8029         * frame.c
8030         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8031         Define.
8032         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8033         Define.
8034         * frame.h (class scoped_restore_selected_frame): New class.
8035         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8036         of any exception, use scoped_restore_selected_frame to restore the
8037         frame instead.
8038
8039 2018-05-24  Pedro Alves  <palves@redhat.com>
8040
8041         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8042         override.
8043
8044 2018-05-23  Tom Tromey  <tom@tromey.com>
8045
8046         * complaints.c (struct complaints): Remove.
8047         (symfile_complaint_book): Remove.
8048         (series): New global.
8049         (complaint_internal): Update.
8050         (clear_complaints): Update.
8051
8052 2018-05-23  Tom Tromey  <tom@tromey.com>
8053
8054         * complaints.c (counters): New global.
8055         (struct complain): Remove.
8056         (struct complaints) <root>: Remove.
8057         (complaint_sentinel): Remove.
8058         (symfile_complaint_book): Update.
8059         (find_complaint) Remove.
8060         (complaint_internal, clear_complaints): Update.
8061
8062 2018-05-23  Tom Tromey  <tom@tromey.com>
8063
8064         * complaints.c (struct complain) <file, line>: Remove.
8065         (find_complaint): Remove file, line parameters.
8066         (complaint_internal): Update.
8067
8068 2018-05-23  Tom Tromey  <tom@tromey.com>
8069
8070         * complaints.c (vcomplaint): Remove.
8071         (complaint_internal) Merge in contents of vcomplaint.
8072
8073 2018-05-23  Tom Tromey  <tom@tromey.com>
8074
8075         * complaints.c (struct complaints) <explanation>: Remove.
8076         (symfile_explanations): Remove.
8077         (symfile_complaint_book): Update.
8078         (vcomplaint): Update.
8079         (struct explanation): Remove.
8080
8081 2018-05-23  Tom Tromey  <tom@tromey.com>
8082
8083         * complaints.c (symfile_complaints): Remove.
8084         (complaint_internal): Remove "complaints" parameter.
8085         (clear_complaints, vcomplaint): Remove "c" parameter.
8086         (get_complaints): Remove.
8087         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8088         (dwarf2_debug_line_missing_file_complaint)
8089         (dwarf2_debug_line_missing_end_sequence_complaint)
8090         (dwarf2_complex_location_expr_complaint)
8091         (dwarf2_const_value_length_mismatch_complaint)
8092         (dwarf2_section_buffer_overflow_complaint)
8093         (dwarf2_macro_malformed_definition_complaint)
8094         (dwarf2_invalid_attrib_class_complaint)
8095         (create_addrmap_from_index, dw2_symtab_iter_next)
8096         (dw2_expand_marked_cus)
8097         (dw2_debug_names_iterator::find_vec_in_debug_names)
8098         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8099         (create_debug_type_hash_table, init_cutu_and_read_dies)
8100         (partial_die_parent_scope, add_partial_enumeration)
8101         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8102         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8103         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8104         (create_cus_hash_table, create_dwp_hash_table)
8105         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8106         (dwarf2_rnglists_process, dwarf2_ranges_process)
8107         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8108         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8109         (handle_struct_member_die, process_structure_scope)
8110         (read_array_type, read_common_block, read_module_type)
8111         (read_tag_pointer_type, read_typedef, read_base_type)
8112         (read_subrange_type, load_partial_dies, partial_die_info::read)
8113         (partial_die_info::read, partial_die_info::read)
8114         (partial_die_info::read, read_checked_initial_length_and_offset)
8115         (dwarf2_string_attr, read_formatted_entries)
8116         (dwarf_decode_line_header)
8117         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8118         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8119         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8120         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8121         (get_signatured_type, get_DW_AT_signature_type)
8122         (decode_locdesc, file_file_name, consume_improper_spaces)
8123         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8124         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8125         (dwarf2_symbol_mark_computed, set_die_type)
8126         (read_attribute_value): Update.
8127         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8128         Update.
8129         * dbxread.c (unknown_symtype_complaint)
8130         (lbrac_mismatch_complaint, repeated_header_complaint)
8131         (set_namestring, function_outside_compilation_unit_complaint)
8132         (read_dbx_symtab, process_one_symbol): Update.
8133         * gdbtypes.c (stub_noname_complaint): Update.
8134         * windows-nat.c (handle_unload_dll): Update.
8135         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8136         (decode_base_type): Update.
8137         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8138         (eb_complaint, record_include_begin, record_include_end)
8139         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8140         (process_xcoff_symbol, read_symbol)
8141         (function_outside_compilation_unit_complaint)
8142         (scan_xcoff_symtab): Update.
8143         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8144         * buildsym.c (finish_block_internal, make_blockvector)
8145         (end_symtab_get_static_block, augment_type_symtab): Update.
8146         * dtrace-probe.c (dtrace_process_dof)
8147         (dtrace_static_probe_ops::get_probes): Update.
8148         * complaints.h (struct complaint): Don't declare.
8149         (symfile_complaints): Remove.
8150         (complaint_internal): Remove "complaints" parameter.
8151         (complaint): Likewise.
8152         (clear_complaints): Likewise.
8153         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8154         (reread_symbols): Update.
8155         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8156         (dwarf2_frame_cache, decode_frame_entry): Update.
8157         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8158         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8159         (info_selectors_command): Update.
8160         * macrotab.c (macro_include, check_for_redefinition)
8161         (macro_undef): Update.
8162         * objfiles.c (filter_overlapping_sections): Update.
8163         * stabsread.c (invalid_cpp_abbrev_complaint)
8164         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8165         (define_symbol, error_type, read_type, rs6000_builtin_type)
8166         (stabs_method_name_from_physname, read_member_functions)
8167         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8168         (attach_fields_to_type, complain_about_struct_wipeout)
8169         (read_range_type, read_args, common_block_start)
8170         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8171         Update.
8172         * mdebugread.c (index_complaint, unknown_ext_complaint)
8173         (basic_type_complaint, bad_tag_guess_complaint)
8174         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8175         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8176         (parse_procedure, parse_lines)
8177         (function_outside_compilation_unit_complaint)
8178         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8179         (bad_tag_guess_complaint, reg_value_complaint): Update.
8180         * cp-support.c (demangled_name_complaint): Update.
8181         * macroscope.c (sal_macro_scope): Update.
8182         * dwarf-index-write.c (class debug_names): Update.
8183
8184 2018-05-23  Tom Tromey  <tom@tromey.com>
8185
8186         * complaints.c (clear_complaints): Remove "noisy" parameter.
8187         * complaints.h (clear_complaints): Update.
8188         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8189         (reread_symbols): Update.
8190
8191 2018-05-23  Tom Tromey  <tom@tromey.com>
8192
8193         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8194         SUBSEQUENT_MESSAGE.
8195         (vcomplaint, clear_complaints): Update.
8196         (symfile_explanations): Remove some messages.
8197
8198 2018-05-23  Tom Tromey  <tom@tromey.com>
8199
8200         * complaints.c (internal_complaint): Remove.
8201         * complaints.h (internal_complaint): Remove.
8202
8203 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8204
8205         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8206
8207 2018-05-22  Pedro Alves  <palves@redhat.com>
8208
8209         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8210         (remote_fileio_badfd, remote_fileio_return_errno)
8211         (remote_fileio_return_success, remote_fileio_func_open)
8212         (remote_fileio_func_open, remote_fileio_func_close)
8213         (remote_fileio_func_read, remote_fileio_func_write)
8214         (remote_fileio_func_lseek, remote_fileio_func_rename)
8215         (remote_fileio_func_unlink, remote_fileio_func_stat)
8216         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8217         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8218         remote_target parameter.
8219         (remote_fio_func_map) <func>: Add remote_target parameter.
8220         (do_remote_fileio_request, remote_fileio_request):
8221         * remote-fileio.h (remote_fileio_request):
8222         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8223         remote_target parameter.
8224         (remote_notif_process, handle_notification): Adjust to pass down
8225         the remote.
8226         (remote_notif_state_allocate): Add remote_target parameter.  Save
8227         it.
8228         * remote-notif.h (struct remote_target): Forward declare.
8229         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8230         remote_target parameter.
8231         (struct remote_notif_state) <remote>: New field.
8232         (remote_notif_ack, remote_notif_parse): Add remote_target
8233         parameter.
8234         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8235         remote_target parameter.
8236         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8237         (threads_listing_context, rmt_thread_action, protocol_feature)
8238         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8239         (packet_result, struct threads_listing_context, remote_state):
8240         Move definitions and declarations higher up.
8241         (remote_target) <~remote_target>: Declare.
8242         (remote_download_command_source, remote_file_put, remote_file_get)
8243         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8244         (remote_hostio_pread_vFile, remote_hostio_send_command)
8245         (remote_hostio_set_filesystem, remote_hostio_open)
8246         (remote_hostio_close, remote_hostio_unlink, remote_state)
8247         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8248         (get_memory_write_packet_size, get_memory_read_packet_size)
8249         (append_pending_thread_resumptions, remote_detach_1)
8250         (append_resumption, remote_resume_with_vcont)
8251         (add_current_inferior_and_thread, wait_ns, wait_as)
8252         (process_stop_reply, remote_notice_new_inferior)
8253         (process_initial_stop_replies, remote_add_thread)
8254         (btrace_sync_conf, remote_btrace_maybe_reopen)
8255         (remove_new_fork_children, kill_new_fork_children)
8256         (discard_pending_stop_replies, stop_reply_queue_length)
8257         (check_pending_events_prevent_wildcard_vcont)
8258         (discard_pending_stop_replies_in_queue, stop_reply)
8259         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8260         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8261         (remote_interrupt_as, remote_interrupt_ns)
8262         (remote_get_noisy_reply, remote_query_attached)
8263         (remote_add_inferior, remote_current_thread, get_current_thread)
8264         (set_thread, set_general_thread, set_continue_thread)
8265         (set_general_process, write_ptid)
8266         (remote_unpack_thread_info_response, remote_get_threadinfo)
8267         (parse_threadlist_response, remote_get_threadlist)
8268         (remote_threadlist_iterator, remote_get_threads_with_ql)
8269         (remote_get_threads_with_qxfer)
8270         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8271         (get_offsets, remote_check_symbols, remote_supported_packet)
8272         (remote_query_supported, remote_packet_size)
8273         (remote_serial_quit_handler, remote_detach_pid)
8274         (remote_vcont_probe, remote_resume_with_hc)
8275         (send_interrupt_sequence, interrupt_query)
8276         (remote_notif_get_pending_events, fetch_register_using_p)
8277         (send_g_packet, process_g_packet, fetch_registers_using_g)
8278         (store_register_using_P, store_registers_using_G)
8279         (set_remote_traceframe, check_binary_download)
8280         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8281         (remote_xfer_live_readonly_partial, remote_read_bytes)
8282         (remote_send_printf, remote_flash_write, readchar)
8283         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8284         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8285         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8286         (extended_remote_disable_randomization, extended_remote_run)
8287         (send_environment_packet, extended_remote_environment_support)
8288         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8289         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8290         (packet_command): Now methods of ...
8291         (remote_target): ... this class.
8292         (m_remote_state) <remote_target>: New field.
8293         (struct remote_state) <stop_reply_queue,
8294         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8295         fields.
8296         (remote_state::remote_state): Allocate stop_reply_queue.
8297         (remote_state): Delete global.
8298         (get_remote_state_raw): Delete.
8299         (remote_target::get_remote_state): Allocate m_remote_state on
8300         demand.
8301         (get_current_remote_target): New.
8302         (remote_ops, extended_remote_ops): Delete.
8303         (wait_forever_enabled_p, remote_async_inferior_event_token):
8304         Delete, moved to struct remote_state.
8305         (remote_target::close): Delete self.  Destruction bits split to
8306         ...
8307         (remote_target::~remote_target): ... this.
8308         (show_memory_packet_size): Adjust to use
8309         get_current_remote_target.
8310         (struct protocol_feature) <func>: Add remote_target parameter.
8311         All callers adjusted.
8312         (curr_quit_handler_target): New.
8313         (remote_serial_quit_handler): Reimplement.
8314         (remote_target::open_1): Adjust to use get_current_remote_target.
8315         Heap-allocate remote_target/extended_remote_target instances.
8316         (vcont_builder::vcont_builder): Add remote_target parameter, and
8317         save it in m_remote.  All callers adjusted.
8318         (vcont_builder::m_remote): New field.
8319         (vcont_builder::restart, vcont_builder::flush)
8320         (vcont_builder::push_action): Use it.
8321         (remote_target::commit_resume): Use it.
8322         (struct queue_iter_param) <remote>: New field.
8323         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8324         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8325         (check_pending_event_prevents_wildcard_vcont_callback)
8326         (remote_target::check_pending_events_prevent_wildcard_vcont)
8327         (remote_target::discard_pending_stop_replies)
8328         (remote_target::discard_pending_stop_replies_in_queue)
8329         (remote_target::remote_notif_remove_queued_reply): Fill in
8330         'remote' field.
8331         (remote_notif_get_pending_events): New.
8332         (remote_target::readchar, remote_target::remote_serial_write):
8333         Save/restore curr_quit_handler_target.
8334         (putpkt): New.
8335         (kill_new_fork_children): Fill in 'remote' field.
8336         (packet_command): Use get_current_remote_target, defer to
8337         remote_target method of same name.
8338         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8339         parameter, and save it in m_remote.  All callers adjusted.
8340         (scoped_remote_fd::release): Use m_remote.
8341         (scoped_remote_fd::m_remote): New field.
8342         (remote_file_put, remote_file_get, remote_file_delete): Use
8343         get_current_remote_target, defer to remote_target method of same
8344         name.
8345         (remote_btrace_reset): Add remote_state paremeter.  Update all
8346         callers.
8347         (remote_async_inferior_event_handler). Pass down 'data'.
8348         (remote_new_objfile): Use get_current_remote_target.
8349         (remote_target::vcont_r_supported): New.
8350         (set_range_stepping): Use get_current_remote_target and
8351         remote_target::vcont_r_supported.
8352         (_initialize_remote): Don't allocate 'remote_state' and
8353         'stop_reply_queue' globals.
8354         * remote.h (struct remote_target): Forward declare.
8355         (getpkt, putpkt, remote_notif_get_pending_events): Add
8356         'remote_target' parameter.
8357
8358 2018-05-22  Pedro Alves  <palves@redhat.com>
8359
8360         * remote.c (vcont_builder): Now a class.  Make all data members
8361         private.
8362         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8363         Declare methods.
8364         (vcont_builder_restart): Rename to ...
8365         (vcont_builder::restart): ... this.
8366         (vcont_builder_flush): Rename to ...
8367         (vcont_builder::flush): ... this.
8368         (vcont_builder_push_action): Rename to ...
8369         (vcont_builder::push_action): ... this.
8370         (remote_target::commit_resume): Adjust.
8371
8372 2018-05-22  Pedro Alves  <palves@redhat.com>
8373
8374         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8375         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8376         (get_fixed_memory_packet_size): New.
8377         (get_memory_packet_size): Use it.
8378         (set_memory_packet_size): Don't override the config size with
8379         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8380         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8381         Don't refer to get_memory_packet_size if not connected to a remote
8382         target.  Show "(default)" if configured size is 0.
8383
8384 2018-05-22  Pedro Alves  <palves@redhat.com>
8385
8386         * remote.c (remote_target::mourn_inferior): Move
8387         discard_pending_stop_replies call here from ...
8388         (_initialize_remote): ... here.
8389
8390 2018-05-22  Pedro Alves  <palves@redhat.com>
8391
8392         * remote.c (compare_section_command): Remove set_general_process
8393         call.
8394
8395 2018-05-22  Pedro Alves  <palves@redhat.com>
8396
8397         * remote.c (struct packet_reg, struct remote_arch_state):
8398         Move higher up in the file.
8399         (remote_state) <m_arch_states>: Store remote_arch_state values
8400         instead of remote_arch_state pointers.
8401         (remote_state::get_remote_arch_state): Adjust.
8402
8403 2018-05-22  Pedro Alves  <palves@redhat.com>
8404
8405         * remote.c: Include <unordered_map>.
8406         (remote_state): Now a class.
8407         (remote_state) <get_remote_arch_state>: Declare method.
8408         <get_remote_arch_state>: New field.
8409         (remote_arch_state) <remote_arch_state>: Declare ctor.
8410         <regs>: Now a unique_ptr.
8411         (remote_gdbarch_data_handle): Delete.
8412         (get_remote_arch_state): Delete.
8413         (remote_state::get_remote_arch_state): New.
8414         (get_remote_state): Adjust to call remote_state's
8415         get_remote_arch_state method.
8416         (init_remote_state): Delete, bits factored out to ...
8417         (remote_arch_state::remote_arch_state): ... this new method.
8418         (get_remote_packet_size, get_memory_packet_size)
8419         (process_g_packet, remote_target::fetch_registers)
8420         (remote_target::prepare_to_store, store_registers_using_G)
8421         (remote_target::store_registers, remote_target::get_trace_status):
8422         Adjust to call remote_state's method.
8423         (_initialize_remote): Remove reference to
8424         remote_gdbarch_data_handle.
8425
8426 2018-05-22  Pedro Alves  <palves@redhat.com>
8427
8428         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8429         pread>: New method declarations.
8430         (remote_target::open_1): Adjust.
8431         (readahead_cache_invalidate): Rename to ...
8432         (readahead_cache::invalidate): ... this, and adjust to be a class
8433         method.
8434         (readahead_cache_invalidate_fd): Rename to ...
8435         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8436         class method.
8437         (remote_hostio_pwrite): Adjust.
8438         (remote_hostio_pread_from_cache): Rename to ...
8439         (readahead_cache::pread): ... this, and adjust to be a class
8440         method.
8441         (remote_hostio_close): Adjust.
8442
8443 2018-05-22  Pedro Alves  <palves@redhat.com>
8444
8445         * remote.c (remote_hostio_close_cleanup): Delete.
8446         (class scoped_remote_fd): New.
8447         (remote_file_put, remote_file_get): Use it.
8448
8449 2018-05-22  Pedro Alves  <palves@redhat.com>
8450
8451         (struct vCont_action_support): Use bool and initialize all fields.
8452         (struct readahead_cache): Initialize all fields.
8453         (remote_state): Use bool and initialize all fields.
8454         (remote_state::remote_state, remote_state::~remote_state): New.
8455         (new_remote_state): Delete.
8456         (_initialize_remote): Use new to allocate remote_state.
8457
8458 2018-05-22  Pedro Alves  <palves@redhat.com>
8459             張俊芝  <zjz@zjz.name>
8460
8461         PR gdb/22973
8462         * c-exp.y: Include "c-support.h".
8463         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8464         of tolower.  Use c_ident_is_alpha to scan names.
8465         * c-lang.c: Include "c-support.h".
8466         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8467         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8468         * c-support.h: New file, with bits factored out from ...
8469         * cp-name-parser.y: ... this file.
8470         Include "c-support.h".
8471         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8472         c-support.h and renamed.
8473         (symbol_end, yylex): Adjust.
8474
8475 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8476
8477         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8478         parameter type to CORE_ADDR.
8479         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8480         parameter type in declaration to CORE_ADDR.
8481         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8482         target_auxv_search to get AT_HWCAP and use the result to get the
8483         target description.
8484         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8485         to CORE_ADDR. Remove the cast of the return value to unsigned
8486         long. Fix error predicate of target_auxv_search.
8487         (ppc_linux_nat_target::read_description): Change the type of the
8488         hwcap variable to CORE_ADDR.
8489
8490 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8491
8492         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8493         if the size of fpscr is larger than 32 bits.
8494
8495 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8496
8497         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8498         (ppc32_linux_vsxregmap): New global.
8499         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8500         regcache_supply_regset, and regcache_collect_regset.
8501         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8502         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8503         (fetch_vsx_register, store_vsx_register): Remove.
8504         (fetch_vsx_registers): Add regno parameter. Get regset using
8505         ppc_linux_vsxregset. Use regset to supply registers.
8506         (store_vsx_registers): Add regno parameter. Get regset using
8507         ppc_linux_vsxregset. Use regset to collect registers.
8508         (fetch_register): Call fetch_vsx_registers instead of
8509         fetch_vsx_register.
8510         (store_register): Call store_vsx_registers instead of
8511         store_vsx_register.
8512         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8513         new regno parameter.
8514         (store_ppc_registers): Call store_vsx_registers with -1 for the
8515         new regno parameter.
8516         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8517         (ppc_collect_vsxregset): Remove.
8518
8519 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8520
8521         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8522         offset fields.
8523         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8524         for vector register offset fields.
8525         (ppc64_fbsd_reg_offsets): Likewise.
8526         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8527         to vector register offset fields.
8528         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8529         to vector register offset fields.
8530         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8531         vector register offset fields.
8532         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8533         initializers for vector register offset fields.
8534         (rs6000_aix64_reg_offsets): Likewise.
8535         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8536         (ppc_supply_vrregset): Remove.
8537         (ppc_collect_vrregset): Remove.
8538         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8539         (ppc_linux_vrregset) : New function.
8540         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8541         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8542         (ppc32_linux_vrregset): Remove.
8543         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8544         and use result instead of ppc32_linux_vrregset.
8545         (ppc32_linux_reg_offsets): Remove initializers for vector register
8546         offset fields.
8547         (ppc64_linux_reg_offsets): Likewise.
8548         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8549         * ppc-linux-nat.c: Include regset.h.
8550         (gdb_vrregset_t): Adjust comment to account for little-endian
8551         mode.
8552         (supply_vrregset, fill_vrregset): Remove.
8553         (fetch_altivec_register, store_altivec_register): Remove.
8554         (fetch_altivec_registers): Add regno parameter. Get regset using
8555         ppc_linux_vrregset. Use regset to supply registers.
8556         (store_altivec_registers): Add regno parameter. Get regset using
8557         ppc_linux_vrregset. Use regset to collect registers.
8558         (fetch_register): Call fetch_altivec_registers instead of
8559         fetch_altivec_register.
8560         (store_register): Call store_altivec_registers instead of
8561         store_altivec_register.
8562         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8563         the new regno parameter.
8564         (store_ppc_registers): Call store_altivec_registers with -1 for
8565         the new regno parameter.
8566
8567 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8568
8569         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8570         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8571         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8572         (gdb_vrregset_t): Change array type size to
8573         PPC_LINUX_SIZEOF_VRREGSET.
8574         (gdb_vsxregset_t): Change array type size to
8575         PPC_LINUX_SIZEOF_VSXREGSET.
8576         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8577         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8578         PPC_LINUX_SIZEOF_VSXREGSET.
8579
8580 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8581
8582         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8583         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8584         nat/ppc-linux.c.
8585         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8586         ppc_linux_target_wordsize with tid.
8587         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8588         wordsize with tid.
8589         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8590         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8591         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8592         tid parameter. Remove static specifier.
8593         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8594         (ppc_linux_target_wordsize): New declaration.
8595
8596 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8597
8598         * arch/ppc-linux-common.c: New file.
8599         * arch/ppc-linux-common.h: New file.
8600         * arch/ppc-linux-tdesc.h: New file.
8601         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8602         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8603         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8604         arch/ppc-linux-tdesc.h.
8605         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8606         arch/ppc-linux-tdesc.h.
8607         (ppc_linux_nat_target::read_description): Remove target
8608         description matching code. Fill a ppc_linux_features struct and
8609         call ppc_linux_match_description with it. Move comment about ISA
8610         2.05 to ppc-linux-common.c.
8611         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8612         arch/ppc-linux-tdesc.h.
8613         (ppc_linux_core_read_description): Remove target description
8614         matching code. Fill a ppc_linux_features struct and call
8615         ppc_linux_match_description with it.
8616         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8617         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8618         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8619         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8620         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8621         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8622         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8623         (tdesc_powerpc_e500l): Remove.
8624
8625 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8626
8627         * ada-lang.c (catch_assert_command): Pass empty string instead
8628         of NULL for excep_string argument.
8629
8630 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8631
8632         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8633         the width of the requested register exceeds the width of the
8634         `ptrace' data type.
8635
8636 2018-05-21  Tom Tromey  <tom@tromey.com>
8637
8638         * printcmd.c (output_command): Remove.
8639         (output_command_const): Rename to output_command.
8640         * valprint.h (output_command): Rename from output_command_const.
8641         * tracepoint.c (trace_dump_actions): Call output_command.
8642
8643 2018-05-21  Tom Tromey  <tom@tromey.com>
8644
8645         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8646         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8647         * ada-lang.h (create_ada_exception_catchpoint): Update.
8648         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8649         std::string.
8650         (create_excep_cond_exprs, ~ada_catchpoint)
8651         (should_stop_exception, print_one_exception)
8652         (print_mention_exception, print_recreate_exception): Update.
8653         (ada_get_next_arg): Remove.
8654         (catch_ada_exception_command_split): Use std::string.  Change type
8655         of "excep_string", "cond_string".
8656         (catch_ada_exception_command): Update.
8657         (create_ada_exception_catchpoint): Change type of excep_string.
8658         (ada_exception_sal): Remove excep_string parameter.
8659         (~ada_catchpoint): Remove.
8660
8661 2018-05-21  Tom Tromey  <tom@tromey.com>
8662
8663         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8664         cleanup.
8665
8666 2018-05-21  Tom Tromey  <tom@tromey.com>
8667
8668         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8669         Return unique_xmalloc_ptr.
8670         (print_it_exception): Update.
8671
8672 2018-05-21  Tom Tromey  <tom@tromey.com>
8673
8674         * tracepoint.c (trace_dump_actions): Use std::string.
8675
8676 2018-05-21  Tom Tromey  <tom@tromey.com>
8677
8678         * symfile.c (reread_symbols): Use std::string for original_name.
8679
8680 2018-05-21  Tom Tromey  <tom@tromey.com>
8681
8682         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8683         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8684         constructor.
8685
8686 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8687
8688         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8689         instance to...
8690         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8691         * objfiles.c (get_objfile_bfd_data): Allocate
8692         objfile_per_bfd_storage with obstack_new when allocating on
8693         obstack.
8694
8695 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8696
8697         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8698         OBSTACK_ZALLOC.
8699         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8700         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8701         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8702         (add_pending): Likewise.
8703         (parse_symbol): Likewise.
8704         (parse_partial_symbols): Likewise.
8705         (psymtab_to_symtab_1): Likewise.
8706         (new_psymtab): Likewise.
8707         (elfmdebug_build_psymtabs): Likewise.
8708         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8709         * objfiles.c (get_objfile_bfd_data): Likewise.
8710         (objfile_register_static_link): Likewise.
8711         * psymtab.c (allocate_psymtab): Likewise.
8712         * stabsread.c (read_member_functions): Likewise.
8713         * xcoffread.c (xcoff_end_psymtab): Likewise.
8714
8715 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8716
8717         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8718         compiler supports std::is_trivially_constructible.
8719         * common/poison.h: Include obstack.h.
8720         (IsMallocable): Define to is_trivially_constructible if the
8721         compiler supports it, define to true_type otherwise.
8722         (xobnew): New.
8723         (XOBNEW): Redefine.
8724         (xobnewvec): New.
8725         (XOBNEWVEC): Redefine.
8726         * gdb_obstack.h (obstack_zalloc): New.
8727         (OBSTACK_ZALLOC): Redefine.
8728         (obstack_calloc): New.
8729         (OBSTACK_CALLOC): Redefine.
8730         (obstack_new): New.
8731         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8732         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8733         gdbarch.c.
8734         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8735         obstack_calloc/obstack_zalloc.
8736         (gdbarch_obstack_zalloc): Remove.
8737         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8738
8739 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8740
8741         * stack.c (backtrace_command_1): Remove useless variable int i.
8742
8743 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8744
8745         * stack.c (print_frame_info): Fix comment.
8746
8747 2018-05-18  Tom Tromey  <tom@tromey.com>
8748
8749         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8750         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8751         (~dwarf2_per_objfile): Update
8752         (dwarf2_get_dwz_file): Use new.
8753         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8754         unique_ptr.
8755
8756 2018-05-18  Tom Tromey  <tom@tromey.com>
8757
8758         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8759         unique_ptr.
8760         * dwarf2read.c (struct dwp_file): Add constructor and
8761         initializers.
8762         (open_and_init_dwp_file): Return a unique_ptr.
8763         (dwarf2_per_objfile, create_dwp_hash_table)
8764         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8765         (lookup_dwo_unit_in_dwp): Update.
8766         (open_and_init_dwp_file, get_dwp_file): Update.
8767
8768 2018-05-18  Tom Tromey  <tom@tromey.com>
8769
8770         * dwarf2read.c (dwarf2_per_objfile): Update.
8771         (struct mapped_index): Add initializers.
8772         (dwarf2_read_index): Use new.
8773         (dw2_symtab_iter_init): Update.
8774         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8775         unique_ptr.
8776
8777 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8778
8779         * dwarf2read.c (mapped_index) <total_size>: Remove.
8780
8781 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8782
8783         * unittests/format_pieces-selftests.c (test_format_specifier):
8784         Add ARI comments.
8785
8786 2018-05-18  Tom Tromey  <tom@tromey.com>
8787
8788         * c-typeprint.c (maybe_print_hole): New function.
8789         (c_print_type_struct_field_offset): Update.
8790         (c_type_print_base_struct_union): Call maybe_print_hole.
8791
8792 2018-05-17  Keith Seitz  <keiths@redhat.com>
8793
8794         * breakpoint.c (build_bpstat_chain): New function, moved from
8795         bpstat_stop_status.
8796         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8797         If no stop chain is passed, call build_bpstat_chain to build it.
8798         * breakpoint.h (build_bpstat_chain): Declare.
8799         (bpstat_stop_status): Move documentation here from breakpoint.c.
8800         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8801         build the stop chain and pass it to skip_inline_frames.
8802         Pass this stop chain to bpstat_stop_status.
8803         * inline-frame.c: Include breakpoint.h.
8804         (stopped_by_user_bp_inline_frame): New function.
8805         (skip_inline_frames): Add parameter `stop_chain'.
8806         Move documention to inline-frame.h.
8807         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8808         whether the frame should be elided.
8809         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8810         Add moved documentation and update for new parameter.
8811
8812 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8813
8814         PR cli/14975
8815         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8816         unittests/format_pieces-selftests.c.
8817         * common/format.h (format_piece) <operator==>: New.
8818         (format_pieces) <operator[]>: Remove.
8819         * common/format.c (format_pieces::format_pieces): Handle \e.
8820         * unittests/format_pieces-selftests.c: New.
8821
8822 2018-05-17  Tom Tromey  <tom@tromey.com>
8823
8824         PR symtab/23010:
8825         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8826         (dw2_instantiate_symtab): Add skip_partial parameter.
8827         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8828         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8829         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8830         (dw2_expand_symtabs_matching_one)
8831         (dw2_find_pc_sect_compunit_symtab)
8832         (dw2_debug_names_lookup_symbol)
8833         (dw2_debug_names_expand_symtabs_for_function): Update.
8834         (init_cutu_and_read_dies): Add skip_partial parameter.
8835         (process_psymtab_comp_unit, build_type_psymtabs_1)
8836         (process_skeletonless_type_unit, load_partial_comp_unit)
8837         (psymtab_to_symtab_1): Update.
8838         (load_full_comp_unit): Add skip_partial parameter.
8839         (process_imported_unit_die, dwarf2_read_addr_index)
8840         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8841         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8842         (read_signatured_type): Update.
8843
8844 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8845
8846         * value.c (release_value): Remove unused variable.
8847         (record_latest_value): Likewise.
8848         (access_value_history): Likewise.
8849         (preserve_values): Likewise.
8850
8851 2018-05-17  Tom Tromey  <tom@tromey.com>
8852
8853         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8854         Initialize.
8855
8856 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8857
8858         PR gdb/22286
8859         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8860         Also handle registers whose width is not a multiple of
8861         PTRACE_TYPE_RET.
8862         (linux_nat_trad_target::store_register): Likewise.
8863
8864 2018-05-16  Tom Tromey  <tom@tromey.com>
8865
8866         * gdbcore.h (core_bfd): Redefine.
8867         * corelow.c (core_target::close): Update.
8868         (core_target_open): Update.
8869         * progspace.h (struct program_space) <cbfd>: Now a
8870         gdb_bfd_ref_ptr.
8871
8872 2018-05-16  Tom Tromey  <tom@tromey.com>
8873
8874         PR cli/19551:
8875         * symfile-add-flags.h (enum symfile_add_flags)
8876         <SYMFILE_NOT_FILENAME>: New constant.
8877         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8878         objfile name from BFD.
8879         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8880         * minidebug.c (find_separate_debug_file_in_section): Put
8881         ".gnu_debugdata" into BFD's file name.
8882
8883 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8884
8885         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8886         Remove.
8887
8888 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8889
8890         PR binutils/21446
8891         * aarch64-tdep.c (aarch64_analyze_prologue,
8892         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8893         Indicate not interested in errors.
8894
8895 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8896
8897         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8898         Supply the MIPS_ZERO_REGNUM register.
8899
8900 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8901
8902         * mips-tdep.c (mask_address_var): Make variable static.
8903
8904 2018-05-14  Tom Tromey  <tom@tromey.com>
8905
8906         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8907
8908 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8909
8910         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8911         FXSAVE_ADDR for the mxcsr register.
8912
8913 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8914
8915         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8916
8917 2018-05-11  Pedro Alves  <palves@redhat.com>
8918
8919         * corelow.c (core_target) <core_target>: No longer inline.
8920         Initialize m_core_gdbarch, m_core_vec and build the section table
8921         here.
8922         <~core_target>: New.
8923         <core_gdbarch, get_core_register_section>: New methods.
8924         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8925         factored out from ...
8926         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8927         (core_ops): Delete.
8928         (sniff_core_bfd): Add gdbarch parameter.
8929         (core_close): Delete, merged into ...
8930         (core_target::close): ... here.  Delete self.
8931         (core_close_cleanup): Delete.
8932         (core_target_open): Allocate a core_target on the heap.  Use a
8933         unique_ptr instead of a cleanup.  Bits moved into the core_target
8934         ctor.  Adjust to use core_target methods instead of globals.
8935         (get_core_register_section): Rename to ...
8936         (core_target::get_core_register_section): ... this and adjust.
8937         (struct get_core_registers_cb_data): New.
8938         (get_core_registers_cb): Use it.  Use bool.
8939         (core_target::fetch_registers, core_target::files_info)
8940         (core_target::xfer_partial, core_target::read_description)
8941         (core_target::pid_to, core_target::thread_name): Adjust to
8942         reference class fields instead of globals.
8943         * target.h (struct target_ops_deleter, target_ops_up): New.
8944
8945 2018-05-11  Pedro Alves  <palves@redhat.com>
8946
8947         * corefile.c (core_file_command): Move to corelow.c.
8948         * corelow.c (the_core_target): Delete.
8949         (core_file_command): Moved from corefile.c.  Check exec_bfd
8950         instead of the_core_target.  Use target_detach instead of calling
8951         into the_core_target directly.
8952         (maybe_say_no_core_file_now): New.
8953         (core_target::detach): Use it.
8954         (_initialize_corelow): Remove references to the_core_target.
8955         * gdbcore.h (the_core_target): Delete.
8956
8957 2018-05-11  Tom Tromey  <tromey@redhat.com>
8958             Pedro Alves  <palves@redhat.com>
8959
8960         * corefile.c (core_bfd): Remove.
8961         * gdbcore.h (core_bfd): Now a macro.
8962         * progspace.h (struct program_space) <cbfd>: New field.
8963
8964 2018-05-11  Tom Tromey  <tom@tromey.com>
8965
8966         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8967         gdb::def_vector.
8968
8969 2018-05-10  Tom Tromey  <tom@tromey.com>
8970
8971         * configure: Rebuild.
8972         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8973
8974 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8975
8976         PR server/23158:
8977         * regformats/regdat.sh: Adjust script, following the addition
8978         of the new expedite_regs parameter to init_target_desc.
8979
8980 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8981     
8982         PR gdb/23127
8983         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8984         set_gdbarch_significant_addr_bit.
8985         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8986         set_gdbarch_significant_addr_bit.
8987         * utils.c (address_significant): Update to sign extend addr.
8988
8989 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8990
8991         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8992         (xtensa_linux_init_abi): Limit tdep->num_regs by
8993         tdep->num_nopriv_regs.
8994         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8995         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8996         not initialized.
8997
8998 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8999
9000         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9001
9002 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9003
9004         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9005         (I387_MXCSR_INIT_VAL): New constant.
9006         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9007         buffer if it was supplied by the inferior.
9008         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9009         (i387_xsave_get_clear_bv): New function.
9010         (i387_supply_xsave): Only read x87 control registers from the
9011         xsave buffer if the feature is enabled, and the state will have
9012         been written, otherwise, provide a suitable default.
9013         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9014         including x87 control registers.  Update control registers if they
9015         have changed from the default value, and mark features as enabled
9016         as required.
9017         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9018
9019 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9020
9021         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9022
9023 2018-05-07  Tom Tromey  <tom@tromey.com>
9024
9025         * configure: Rebuild.
9026         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9027
9028 2018-05-07  Tom Tromey  <tom@tromey.com>
9029
9030         PR tdep/20362:
9031         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9032         bit.  Use correct value for VDIV.
9033
9034 2018-05-04  Tom Tromey  <tom@tromey.com>
9035
9036         * configure: Rebuild.
9037         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9038
9039 2018-05-04  Tom Tromey  <tom@tromey.com>
9040
9041         * linux-record.c (record_linux_system_call) <case
9042         RECORD_SYS_RECVFROM>: Add "break".
9043
9044 2018-05-04  Tom Tromey  <tom@tromey.com>
9045
9046         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9047         Add missing "break".
9048         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9049         Add missing "break".
9050
9051 2018-05-04  Tom Tromey  <tom@tromey.com>
9052
9053         * rs6000-tdep.c (ppc_process_record_op4)
9054         (ppc_process_record_op63): Add fall-through comment.
9055
9056 2018-05-04  Tom Tromey  <tom@tromey.com>
9057
9058         * i386-tdep.c (i386_process_record): Add fall-through comment.
9059
9060 2018-05-04  Tom Tromey  <tom@tromey.com>
9061
9062         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9063         comment.
9064
9065 2018-05-04  Tom Tromey  <tom@tromey.com>
9066
9067         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9068         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9069         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9070         comment.
9071         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9072         comment.
9073         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9074         comment.
9075
9076 2018-05-04  Tom Tromey  <tom@tromey.com>
9077
9078         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9079
9080 2018-05-04  Tom Tromey  <tom@tromey.com>
9081
9082         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9083         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9084         * symfile.c (section_is_mapped): Fix fall-through comment.
9085         * stabsread.c (define_symbol, read_member_functions): Fix
9086         fall-through comment.
9087         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9088         comment.
9089         * remote.c (remote_wait_as): Fix fall-through comment.
9090         * p-exp.y (yylex): Fix fall-through comment.
9091         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9092         comment.
9093         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9094         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9095         * jv-exp.y (yylex): Fix fall-through comment.
9096         * go-exp.y (lex_one_token): Fix fall-through comment.
9097         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9098         fall-through comment.
9099         * f-exp.y (yylex): Fix fall-through comment.
9100         * dwarf2read.c (process_die): Fix fall-through comments.
9101         * dbxread.c (process_one_symbol): Fix fall-through comment.
9102         * d-exp.y (lex_one_token): Fix fall-through comment.
9103         * cp-name-parser.y (yylex): Fix fall-through comment.
9104         * coffread.c (coff_symtab_read): Fix fall-through comment.
9105         * c-exp.y (lex_one_token): Fix fall-through comment.
9106         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9107         comment.
9108         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9109         comment.
9110
9111 2018-05-04  Tom Tromey  <tom@tromey.com>
9112
9113         PR python/22730:
9114         * NEWS: Mention gdb.execute change.
9115         * gdbcmd.h (execute_control_command): Don't declare.
9116         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9117         execute_control_commands, execute_control_commands_to_string.
9118         * cli/cli-script.h (execute_control_commands)
9119         (execute_control_commands_to_string): Declare.
9120         (execute_control_command): Add from_tty parameter.
9121         * cli/cli-script.c (execute_control_commands)
9122         (execute_control_commands_to_string): New functions.
9123         (execute_user_command): Use execute_control_commands.
9124         (execute_control_command_1): Add "from_tty" parameter.  Update.
9125         (execute_control_command): Likewise.
9126
9127 2018-05-04  Tom Tromey  <tom@tromey.com>
9128
9129         PR python/22731:
9130         * NEWS: Mention that breakpoint commands are writable.
9131         * python/py-breakpoint.c (bppy_set_commands): New function.
9132         (breakpoint_object_getset) <"commands">: Use it.
9133
9134 2018-05-04  Tom Tromey  <tom@tromey.com>
9135
9136         * tracepoint.c (actions_command): Update.
9137         * mi/mi-cmd-break.c (mi_command_line_array)
9138         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9139         (mi_read_next_line): Remove.
9140         (mi_cmd_break_commands): Update.
9141         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9142         function_view.
9143         * cli/cli-script.c (get_command_line): Update.
9144         (process_next_line): Use function_view.  Constify.
9145         (recurse_read_control_structure, read_command_lines)
9146         (read_command_lines_1): Change argument types to function_view.
9147         (do_define_command, document_command): Update.
9148         * breakpoint.h (check_tracepoint_command): Don't declare.
9149         * breakpoint.c (check_tracepoint_command): Remove.
9150         (commands_command_1, create_tracepoint_from_upload): Update.
9151
9152 2018-05-04  Tom Tromey  <tom@tromey.com>
9153
9154         PR gdb/11750:
9155         * cli/cli-script.h (enum command_control_type) <define_control>:
9156         New constant.
9157         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9158         (build_command_line, execute_control_command_1)
9159         (process_next_line): Likewise.
9160         (do_define_command): New function, extracted from define_command.
9161         (define_command): Use it.
9162
9163 2018-05-04  Tom Tromey  <tom@tromey.com>
9164
9165         * tracepoint.c (actions_command): Update.
9166         * cli/cli-script.h (read_command_lines): Update.
9167         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9168         (MAX_TMPBUF): Remove define.
9169         (define_command): Use string_printf.
9170         (document_command): Likewise.
9171         * breakpoint.c (commands_command_1): Update.
9172
9173 2018-05-04  Tom Tromey  <tom@tromey.com>
9174
9175         * top.c (execute_command): Update.
9176         * cli/cli-script.h (print_command_lines): Now varargs.
9177         * cli/cli-script.c (print_command_lines): Now varargs.
9178         (execute_control_command_1) <case while_control, case if_control>:
9179         Update.
9180
9181 2018-05-04  Tom Tromey  <tom@tromey.com>
9182
9183         * tracepoint.c (all_tracepoint_actions): Rename from
9184         all_tracepoint_actions_and_cleanup.  Change return type.
9185         (actions_command, encode_actions_1, encode_actions)
9186         (trace_dump_actions, tdump_command): Update.
9187         * remote.c (remote_download_command_source): Update.
9188         * python/python.c (gdbpy_eval_from_control_command)
9189         (python_command, python_interactive_command): Update.
9190         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9191         * guile/guile.c (guile_command)
9192         (gdbscm_eval_from_control_command, guile_command): Update.
9193         * compile/compile.c (compile_code_command)
9194         (compile_print_command, compile_to_object): Update.
9195         * cli/cli-script.h (struct command_lines_deleter): New.
9196         (counted_command_line): New typedef.
9197         (struct command_line): Add constructor, destructor.
9198         <body_list>: Remove.
9199         <body_list_0, body_list_1>: New members.
9200         (command_line_up): Remove typedef.
9201         (read_command_lines, read_command_lines_1, get_command_line):
9202         Update.
9203         (copy_command_lines): Don't declare.
9204         * cli/cli-script.c (build_command_line): Use "new".
9205         (get_command_line): Return counted_command_line.
9206         (print_command_lines, execute_user_command)
9207         (execute_control_command_1, while_command, if_command): Update.
9208         (realloc_body_list): Remove.
9209         (process_next_line, recurse_read_control_structure): Update.
9210         (read_command_lines, read_command_lines_1): Return counted_command_line.
9211         (free_command_lines): Use "delete".
9212         (copy_command_lines): Remove.
9213         (define_command, document_command, show_user_1): Update.
9214         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9215         a counted_command_line.
9216         * breakpoint.h (counted_command_line): Remove typedef.
9217         (breakpoint_set_commands): Update.
9218         * breakpoint.c (check_no_tracepoint_commands)
9219         (validate_commands_for_breakpoint): Update.
9220         (breakpoint_set_commands): Change commands to be a
9221         counted_command_line.
9222         (commands_command_1, update_dprintf_command_list)
9223         (create_tracepoint_from_upload): Update.
9224
9225 2018-05-04  Tom Tromey  <tom@tromey.com>
9226
9227         * cli/cli-decode.h (cmd_list_element): New constructor.
9228         (~cmd_list_element): New destructor.
9229         (struct cmd_list_element): Add initializers.
9230         * cli/cli-decode.c (do_add_cmd): Use "new".
9231         (delete_cmd): Use "delete".
9232
9233 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9234             Pedro Alves <palves@redhat.com>
9235
9236         PR breakpoints/19806 and support for PR external/20207.
9237         * NEWS: Mention Aarch64 watchpoint improvements.
9238         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9239         watchpoints and PR external/20207 watchpoints.
9240         * nat/aarch64-linux-hw-point.c
9241         (kernel_supports_any_contiguous_range): New.
9242         (aarch64_watchpoint_offset): New.
9243         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9244         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9245         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9246         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9247         next_addr_orig_p.  Support PR external/20207 watchpoints.
9248         (aarch64_downgrade_regs): New.
9249         (aarch64_dr_state_insert_one_point): New parameters offset and
9250         addr_orig.
9251         (aarch64_dr_state_remove_one_point): Likewise.
9252         (aarch64_handle_breakpoint): Update caller.
9253         (aarch64_handle_aligned_watchpoint): Likewise.
9254         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9255         aligned_offset.
9256         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9257         aarch64_downgrade_regs.
9258         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9259         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9260         (DR_CONTROL_MASK): ... this.
9261         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9262         (unsigned int aarch64_watchpoint_offset): New prototype.
9263         (aarch64_linux_set_debug_regs): Remove const from state.
9264         * utils.c (align_up, align_down): Move to ...
9265         * common/common-utils.c (align_up, align_down): ... here.
9266         * utils.h (align_up, align_down): Move to ...
9267         * common/common-utils.h (align_up, align_down): ... here.
9268
9269 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9270
9271         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9272         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9273         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9274         Re-implement to match the ABI as summarized in GCC's
9275         gcc/config/sparc/sparc.c.  All callers updated.
9276         (sparc32_store_arguments): Remove assertion.
9277
9278 2018-05-04  Tom Tromey  <tom@tromey.com>
9279
9280         * printcmd.c: Don't include tui.h.
9281         (decode_format): Use skip_spaces.
9282
9283 2018-05-04  Tom Tromey  <tom@tromey.com>
9284
9285         PR gdb/22619:
9286         * printcmd.c (last_count): New global.
9287         (x_command): Use saved count when repeating.
9288
9289 2018-05-04  Tom Tromey  <tom@tromey.com>
9290
9291         * nto-procfs.c (do_closedir_cleanup): Remove.
9292         (procfs_pidlist): Use gdb_dir_up.
9293         * procfs.c (do_closedir_cleanup): Remove.
9294         (proc_update_threads): Use gdb_dir_up.
9295         * common/filestuff.h (struct gdb_dir_deleter): New.
9296         (gdb_dir_up): New typedef.
9297
9298 2018-05-04  Tom Tromey  <tom@tromey.com>
9299
9300         * ada-lang.c (print_mention_exception): Use std::string.
9301
9302 2018-05-04  Tom Tromey  <tom@tromey.com>
9303
9304         * ada-lang.c (create_excep_cond_exprs): Update.
9305         (ada_exception_catchpoint_cond_string): Use std::string.
9306
9307 2018-05-04  Tom Tromey  <tom@tromey.com>
9308
9309         * ada-lang.c (xget_renaming_scope): Return std::string.
9310         (old_renaming_is_invisible): Update.
9311
9312 2018-05-04  Tom Tromey  <tom@tromey.com>
9313
9314         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9315         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9316
9317 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9318
9319         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9320
9321 2018-05-04  Tom Tromey  <tom@tromey.com>
9322
9323         * remote.c (remote_query_supported_append): Change type.
9324         (remote_check_symbols): Update.
9325
9326 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9327
9328         PR gdb/11420
9329         * configure.ac: Prepend libpython.
9330         * python/python-config.py: Likewise.
9331         * configure: Regenerate.
9332
9333 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9334
9335         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9336
9337 2018-05-03  Pedro Alves  <palves@redhat.com>
9338
9339         * s390-linux-nat.c
9340         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9341         override.  Write 'true' instead of '1'.
9342         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9343         declaration.
9344
9345 2018-05-02  Pedro Alves  <palves@redhat.com>
9346
9347         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9348         add_inf_child_target.
9349         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9350         add_inf_child_target.
9351         * aix-thread.c (aix_thread_target_info): New.
9352         (aix_thread_target) <shortname, longname, doc>: Delete.
9353         <info>: New.
9354         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9355         add_inf_child_target.
9356         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9357         add_inf_child_target.
9358         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9359         add_inf_child_target.
9360         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9361         add_inf_child_target.
9362         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9363         add_inf_child_target.
9364         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9365         add_inf_child_target.
9366         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9367         add_inf_child_target.
9368         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9369         add_inf_child_target.
9370         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9371         add_inf_child_target.
9372         * bfd-target.c (target_bfd_target_info): New.
9373         (target_bfd) <shortname, longname, doc>: Delete.
9374         <info>: New.
9375         * bsd-kvm.c (bsd_kvm_target_info): New.
9376         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9377         <info>: New.
9378         (bsd_kvm_target::open): Rename to ...
9379         (bsd_kvm_target_open): ... this.  Adjust.
9380         * bsd-uthread.c (bsd_uthread_target_info): New.
9381         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9382         <info>: New.
9383         * corefile.c (core_file_command): Adjust.
9384         * corelow.c (core_target_info): New.
9385         (core_target) <shortname, longname, doc>: Delete.
9386         <info>: New.
9387         (core_target::open): Rename to ...
9388         (core_target_open): ... this.  Adjust.
9389         * ctf.c (ctf_target_info): New.
9390         (ctf_target) <shortname, longname, doc>: Delete.
9391         <info>: New.
9392         (ctf_target::open): Rename to ...
9393         (ctf_target_open): ... this.
9394         (_initialize_ctf): Adjust.
9395         * exec.c (exec_target_info): New.
9396         (exec_target) <shortname, longname, doc>: Delete.
9397         <info>: New.
9398         (exec_target::open): Rename to ...
9399         (exec_target_open): ... this.
9400         * gdbcore.h (core_target_open): Declare.
9401         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9402         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9403         add_inf_child_target.
9404         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9405         add_inf_child_target.
9406         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9407         add_inf_child_target.
9408         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9409         add_inf_child_target.
9410         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9411         add_inf_child_target.
9412         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9413         add_inf_child_target.
9414         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9415         add_inf_child_target.
9416         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9417         add_inf_child_target.
9418         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9419         add_inf_child_target.
9420         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9421         add_inf_child_target.
9422         * inf-child.c (inf_child_target_info): New.
9423         (inf_child_target::info): New.
9424         (inf_child_open_target): Remove 'target' parameter.  Use
9425         get_native_target instead.
9426         (inf_child_target::open): Delete.
9427         (add_inf_child_target): New.
9428         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9429         Delete.
9430         <info>: New.
9431         (add_inf_child_target): Declare.
9432         (inf_child_open_target): Declare.
9433         * linux-thread-db.c (thread_db_target_info): New.
9434         (thread_db_target) <shortname, longname, doc>: Delete.
9435         <info>: New.
9436         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9437         add_inf_child_target.
9438         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9439         add_inf_child_target.
9440         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9441         add_inf_child_target.
9442         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9443         add_inf_child_target.
9444         * make-target-delegates (print_class): Adjust.
9445         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9446         add_inf_child_target.
9447         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9448         add_inf_child_target.
9449         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9450         add_inf_child_target.
9451         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9452         add_inf_child_target.
9453         * nto-procfs.c (nto_native_target_info): New.
9454         (nto_procfs_target_native) <shortname, longname, doc>:
9455         Delete.
9456         <info>: New.
9457         (nto_procfs_target_info): New.
9458         (nto_procfs_target_procfs) <shortname, longname, doc>:
9459         Delete.
9460         <info>: New.
9461         (init_procfs_targets): Adjust.
9462         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9463         add_inf_child_target.
9464         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9465         add_inf_child_target.
9466         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9467         add_inf_child_target.
9468         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9469         add_inf_child_target.
9470         * ravenscar-thread.c (ravenscar_target_info): New.
9471         (ravenscar_thread_target) <shortname, longname, doc>:
9472         Delete.
9473         <info>: New.
9474         * record-btrace.c (record_btrace_target_info):
9475         (record_btrace_target) <shortname, longname, doc>: Delete.
9476         <info>: New.
9477         (record_btrace_target::open): Rename to ...
9478         (record_btrace_target_open): ... this.  Adjust.
9479         * record-full.c (record_longname, record_doc): New.
9480         (record_full_base_target) <shortname, longname, doc>: Delete.
9481         <info>: New.
9482         (record_full_target_info): New.
9483         (record_full_target): <shortname>: Delete.
9484         <info>: New.
9485         (record_full_core_open_1, record_full_open_1): Update comments.
9486         (record_full_base_target::open): Rename to ...
9487         (record_full_open): ... this.
9488         (cmd_record_full_restore): Update.
9489         (_initialize_record_full): Update.
9490         * remote-sim.c (remote_sim_target_info): New.
9491         (gdbsim_target) <shortname, longname, doc>: Delete.
9492         <info>: New.
9493         (gdbsim_target::open): Rename to ...
9494         (gdbsim_target_open): ... this.
9495         (_initialize_remote_sim): Adjust.
9496         * remote.c (remote_doc): New.
9497         (remote_target_info): New.
9498         (remote_target) <shortname, longname, doc>: Delete.
9499         <info>: New.
9500         (extended_remote_target_info): New.
9501         (extended_remote_target) <shortname, longname, doc>: Delete.
9502         <info>: New.
9503         (remote_target::open_1): Make static.  Adjust.
9504         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9505         * s390-linux-nat.c (_initialize_s390_nat): Use
9506         add_inf_child_target.
9507         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9508         add_inf_child_target.
9509         * sol-thread.c (thread_db_target_info): New.
9510         (sol_thread_target) <shortname, longname, doc>: Delete.
9511         <info>: New.
9512         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9513         add_inf_child_target.
9514         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9515         add_inf_child_target.
9516         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9517         add_inf_child_target.
9518         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9519         add_inf_child_target.
9520         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9521         add_inf_child_target.
9522         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9523         add_inf_child_target.
9524         * spu-linux-nat.c (_initialize_spu_nat): Use
9525         add_inf_child_target.
9526         * spu-multiarch.c (spu_multiarch_target_info): New.
9527         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9528         <info>: New.
9529         * target-delegates.c: Regenerate.
9530         * target.c: Include <unordered_map>.
9531         (target_ops_p): Delete.
9532         (DEF_VEC_P(target_ops_p)): Delete.
9533         (target_factories): New.
9534         (test_target_info): New.
9535         (test_target_ops::info): New.
9536         (open_target): Adjust to use target_factories.
9537         (add_target_with_completer): Rename to ...
9538         (add_target): ... this.  Change prototype.  Register target_info
9539         and open callback in target_factories.  Register target_info in
9540         command context instead of target_ops.
9541         (add_target): Delete old implementation.
9542         (add_deprecated_target_alias): Change prototype.  Adjust.
9543         (the_native_target): New.
9544         (set_native_target, get_native_target): New.
9545         (find_default_run_target): Use the_native_target.
9546         (find_attach_target, find_run_target): Simplify.
9547         (target_ops::open): Delete.
9548         (dummy_target_info): New.
9549         (dummy_target::shortname, dummy_target::longname)
9550         (dummy_target::doc): Delete.
9551         (dummy_target::info): New.
9552         (debug_target::shortname, debug_target::longname)
9553         (debug_target::doc): Delete.
9554         (debug_target::info): New.
9555         * target.h (struct target_info): New.
9556         (target_ops::~target_ops): Add comment.
9557         (target_ops::info): New.
9558         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9559         longer virtual.  Implement in terms of target_info.
9560         (set_native_target, get_native_target): Declare.
9561         (target_open_ftype): New.
9562         (add_target, add_target_with_completer)
9563         (add_deprecated_target_alias): Change prototype.
9564         (test_target) <shortname, longname, doc>: Delete.
9565         <info>: New.
9566         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9567         add_inf_child_target.
9568         * tracefile-tfile.c (tfile_target_info): New.
9569         (tfile_target) <shortname, longname, doc>: Delete.
9570         <info>: New.
9571         (tfile_target::open): Rename to ...
9572         (tfile_target_open): ... this.
9573         (_initialize_tracefile_tfile): Adjust.
9574         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9575         add_inf_child_target.
9576         * windows-nat.c (_initialize_windows_nat): Use
9577         add_inf_child_target.
9578         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9579         add_inf_child_target.
9580
9581 2018-05-02  Pedro Alves  <palves@redhat.com>
9582
9583         * linux-nat.h (linux_nat_target) <low_new_thread,
9584         low_delete_thread, low_new_fork, low_forget_process,
9585         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9586         New virtual methods.
9587         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9588         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9589         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9590         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9591         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9592         Delete.
9593         * linux-fork.c (delete_fork): Adjust to call low method.
9594         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9595         (linux_nat_new_fork, linux_nat_forget_process_hook)
9596         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9597         (linux_nat_status_is_event):
9598         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9599         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9600         to call low method.
9601         (sigtrap_is_event): Rename to ...
9602         (linux_nat_target::low_status_is_event): ... this.
9603         (linux_nat_set_status_is_event): Delete.
9604         (save_stop_reason, linux_nat_wait_1)
9605         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9606         low methods.
9607         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9608         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9609         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9610         (linux_nat_set_prepare_to_resume): Delete.
9611         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9612         low virtual methods.
9613         * amd64-linux-nat.c: Likewise.
9614         * arm-linux-nat.c: Likewise.
9615         * i386-linux-nat.c: Likewise.
9616         * ia64-linux-nat.c: Likewise.
9617         * mips-linux-nat.c: Likewise.
9618         * ppc-linux-nat.c: Likewise.
9619         * s390-linux-nat.c: Likewise.
9620         * sparc64-linux-nat.c: Likewise.
9621         * x86-linux-nat.c: Likewise.
9622         * x86-linux-nat.h: Include "nat/x86-linux.h".
9623         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9624         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9625         Override methods.
9626
9627 2018-05-02  Pedro Alves  <palves@redhat.com>
9628
9629         * target.h (target_ops)
9630         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9631         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9632         stopped_by_watchpoint, have_continuable_watchpoint,
9633         stopped_data_address, watchpoint_addr_within_range,
9634         can_accel_watchpoint_condition, can_run, thread_alive,
9635         has_all_memory, has_memory, has_stack, has_registers,
9636         has_execution, can_async_p, is_async_p, supports_non_stop,
9637         always_non_stop_p, can_execute_reverse, supports_multi_process,
9638         supports_enable_disable_tracepoint,
9639         supports_disable_randomization, supports_string_tracing,
9640         supports_evaluation_of_breakpoint_conditions,
9641         can_run_breakpoint_commands, filesystem_is_local,
9642         can_download_tracepoint, get_trace_state_variable_value,
9643         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9644         record_is_replaying, record_will_replay,
9645         augmented_libraries_svr4_read>: Adjust to return bool.
9646         * aarch64-linux-nat.c: All implementations adjusted.
9647         * aix-thread.c: All implementations adjusted.
9648         * arm-linux-nat.c: All implementations adjusted.
9649         * breakpoint.c: All implementations adjusted.
9650         * bsd-kvm.c: All implementations adjusted.
9651         * bsd-uthread.c: All implementations adjusted.
9652         * corelow.c: All implementations adjusted.
9653         * ctf.c: All implementations adjusted.
9654         * darwin-nat.c: All implementations adjusted.
9655         * darwin-nat.h: All implementations adjusted.
9656         * exec.c: All implementations adjusted.
9657         * fbsd-nat.c: All implementations adjusted.
9658         * fbsd-nat.h: All implementations adjusted.
9659         * gnu-nat.c: All implementations adjusted.
9660         * gnu-nat.h: All implementations adjusted.
9661         * go32-nat.c: All implementations adjusted.
9662         * ia64-linux-nat.c: All implementations adjusted.
9663         * inf-child.c: All implementations adjusted.
9664         * inf-child.h: All implementations adjusted.
9665         * inf-ptrace.c: All implementations adjusted.
9666         * inf-ptrace.h: All implementations adjusted.
9667         * linux-nat.c: All implementations adjusted.
9668         * linux-nat.h: All implementations adjusted.
9669         * mips-linux-nat.c: All implementations adjusted.
9670         * nto-procfs.c: All implementations adjusted.
9671         * ppc-linux-nat.c: All implementations adjusted.
9672         * procfs.c: All implementations adjusted.
9673         * ravenscar-thread.c: All implementations adjusted.
9674         * record-btrace.c: All implementations adjusted.
9675         * record-full.c: All implementations adjusted.
9676         * remote-sim.c: All implementations adjusted.
9677         * remote.c: All implementations adjusted.
9678         * s390-linux-nat.c: All implementations adjusted.
9679         * sol-thread.c: All implementations adjusted.
9680         * spu-multiarch.c: All implementations adjusted.
9681         * target-delegates.c: All implementations adjusted.
9682         * target.c: All implementations adjusted.
9683         * target.h: All implementations adjusted.
9684         * tracefile-tfile.c: All implementations adjusted.
9685         * tracefile.c: All implementations adjusted.
9686         * tracefile.h: All implementations adjusted.
9687         * windows-nat.c: All implementations adjusted.
9688         * x86-linux-nat.h: All implementations adjusted.
9689         * x86-nat.h: All implementations adjusted.
9690
9691 2018-05-02  Pedro Alves  <palves@redhat.com>
9692
9693         * make-target-delegates (scan_target_h): Don't trim lines here.
9694         Replace sequences of tabs and/or whitespace with a single
9695         whitespace.
9696         (top level, parsing methods): Trim each line before processing it
9697         here.
9698
9699 2018-05-02  Pedro Alves  <palves@redhat.com>
9700             John Baldwin  <jhb@freebsd.org>
9701
9702         * target.h (enum strata) <debug_stratum>: New.
9703         (struct target_ops) <all delegation methods>: Replace by C++
9704         virtual methods, and drop "to_" prefix.  All references updated
9705         throughout.
9706         <to_shortname, to_longname, to_doc, to_data,
9707         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9708         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9709         virtual methods.  All references updated throughout.
9710         <can_attach, supports_terminal_ours, can_create_inferior,
9711         get_thread_control_capabilities, attach_no_wait>: New
9712         virtual methods.
9713         <insert_breakpoint, remove_breakpoint>: Now
9714         TARGET_DEFAULT_NORETURN methods.
9715         <info_proc>: Now returns bool.
9716         <to_magic>: Delete.
9717         (OPS_MAGIC): Delete.
9718         (current_target): Delete.  All references replaced by references
9719         to ...
9720         (target_stack): ... this.  New.
9721         (target_shortname, target_longname): Adjust.
9722         (target_can_run): Now a function declaration.
9723         (default_child_has_all_memory, default_child_has_memory)
9724         (default_child_has_stack, default_child_has_registers)
9725         (default_child_has_execution): Remove target_ops parameter.
9726         (complete_target_initialization): Delete.
9727         (memory_breakpoint_target): New template class.
9728         (test_target_ops): Refactor as a C++ class with virtual methods.
9729         * make-target-delegates (NAME_PART): Tighten.
9730         (POINTER_PART, CP_SYMBOL): New.
9731         (SIMPLE_RETURN_PART): Reimplement.
9732         (VEC_RETURN_PART): Expect less.
9733         (RETURN_PART, VIRTUAL_PART): New.
9734         (METHOD): Adjust to C++ virtual methods.
9735         (scan_target_h): Remove reference to C99.
9736         (dname): Output "target_ops::" prefix.
9737         (write_function_header): Adjust to output a C++ class method.
9738         (write_declaration): New.
9739         (write_delegator): Adjust to output a C++ class method.
9740         (tdname): Output "dummy_target::" prefix.
9741         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9742         method.
9743         (tdefault_names, debug_names): Delete.
9744         (return_types, tdefaults, styles, argtypes_array): New.
9745         (top level): All methods are delegators.
9746         (print_class): New.
9747         (top level): Print dummy_target and debug_target classes.
9748         * target-delegates.c: Regenerate.
9749         * target-debug.h (target_debug_print_enum_info_proc_what)
9750         (target_debug_print_thread_control_capabilities)
9751         (target_debug_print_thread_info_p): New.
9752         * target.c (dummy_target): Delete.
9753         (the_dummy_target, the_debug_target): New.
9754         (target_stack): Now extern.
9755         (set_targetdebug): Push/unpush debug target.
9756         (default_child_has_all_memory, default_child_has_memory)
9757         (default_child_has_stack, default_child_has_registers)
9758         (default_child_has_execution): Remove target_ops parameter.
9759         (complete_target_initialization): Delete.
9760         (add_target_with_completer): No longer call
9761         complete_target_initialization.
9762         (target_supports_terminal_ours): Use regular delegation.
9763         (update_current_target): Delete.
9764         (push_target): No longer check magic number.  Don't call
9765         update_current_target.
9766         (unpush_target): Don't call update_current_target.
9767         (target_is_pushed): No longer check magic number.
9768         (target_require_runnable): Skip for all stratums over
9769         process_stratum.
9770         (target_ops::info_proc): New.
9771         (target_info_proc): Use find_target_at and
9772         find_default_run_target.
9773         (target_supports_disable_randomization): Use regular delegation.
9774         (target_get_osdata): Use find_target_at.
9775         (target_ops::open, target_ops::close, target_ops::can_attach)
9776         (target_ops::attach, target_ops::can_create_inferior)
9777         (target_ops::create_inferior, target_ops::can_run)
9778         (target_can_run): New.
9779         (default_fileio_target): Use regular delegation.
9780         (target_ops::fileio_open, target_ops::fileio_pwrite)
9781         (target_ops::fileio_pread, target_ops::fileio_fstat)
9782         (target_ops::fileio_close, target_ops::fileio_unlink)
9783         (target_ops::fileio_readlink): New.
9784         (target_fileio_open_1, target_fileio_unlink)
9785         (target_fileio_readlink): Always call the target method.  Handle
9786         FILEIO_ENOSYS.
9787         (return_zero, return_zero_has_execution): Delete.
9788         (init_dummy_target): Delete.
9789         (dummy_target::dummy_target, dummy_target::shortname)
9790         (dummy_target::longname, dummy_target::doc)
9791         (debug_target::debug_target, debug_target::shortname)
9792         (debug_target::longname, debug_target::doc): New.
9793         (target_supports_delete_record): Use regular delegation.
9794         (setup_target_debug): Delete.
9795         (maintenance_print_target_stack): Skip debug_stratum.
9796         (initialize_targets): Instantiate the_dummy_target and
9797         the_debug_target.
9798         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9799         use target_stack.
9800         (target_auxv_search, fprint_target_auxv): Adjust.
9801         (info_auxv_command): Adjust to use target_stack.
9802         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9803         * exceptions.c (print_flush): Handle a NULL target_stack.
9804         * regcache.c (target_ops_no_register): Refactor as class with
9805         virtual methods.
9806
9807         * exec.c (exec_target): New class.
9808         (exec_ops): Now an exec_target.
9809         (exec_open, exec_close_1, exec_get_section_table)
9810         (exec_xfer_partial, exec_files_info, exec_has_memory)
9811         (exec_make_note_section): Refactor as exec_target methods.
9812         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9813         Delete.
9814         (exec_target::find_memory_regions): New.
9815         (_initialize_exec): Don't call init_exec_ops.
9816         * gdbcore.h (exec_file_clear): Delete.
9817
9818         * corefile.c (core_target): Delete.
9819         (core_file_command): Adjust.
9820         * corelow.c (core_target): New class.
9821         (the_core_target): New.
9822         (core_close): Remove target_ops parameter.
9823         (core_close_cleanup): Adjust.
9824         (core_target::close): New.
9825         (core_open, core_detach, get_core_registers, core_files_info)
9826         (core_xfer_partial, core_thread_alive, core_read_description)
9827         (core_pid_to_str, core_thread_name, core_has_memory)
9828         (core_has_stack, core_has_registers, core_info_proc): Rework as
9829         core_target methods.
9830         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9831         (_initialize_corelow): Initialize the_core_target.
9832         * gdbcore.h (core_target): Delete.
9833         (the_core_target): New.
9834
9835         * ctf.c: (ctf_target): New class.
9836         (ctf_ops): Now a ctf_target.
9837         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9838         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9839         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9840         methods.
9841         (init_ctf_ops): Delete.
9842         (_initialize_ctf): Don't call it.
9843         * tracefile-tfile.c (tfile_target): New class.
9844         (tfile_ops): Now a tfile_target.
9845         (tfile_open, tfile_close, tfile_files_info)
9846         (tfile_get_tracepoint_status, tfile_trace_find)
9847         (tfile_fetch_registers, tfile_xfer_partial)
9848         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9849         Refactor as tfile_target methods.
9850         (tfile_xfer_partial_features): Remove target_ops parameter.
9851         (init_tfile_ops): Delete.
9852         (_initialize_tracefile_tfile): Don't call it.
9853         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9854         (tracefile_has_stack, tracefile_has_registers)
9855         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9856         tracefile_target methods.
9857         (init_tracefile_ops): Delete.
9858         (tracefile_target::tracefile_target): New.
9859         * tracefile.h: Include "target.h".
9860         (tracefile_target): New class.
9861         (init_tracefile_ops): Delete.
9862
9863         * spu-multiarch.c (spu_multiarch_target): New class.
9864         (spu_ops): Now a spu_multiarch_target.
9865         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9866         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9867         (spu_search_memory, spu_mourn_inferior): Refactor as
9868         spu_multiarch_target methods.
9869         (init_spu_ops): Delete.
9870         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9871         complete_target_initialization.
9872
9873         * ravenscar-thread.c (ravenscar_thread_target): New class.
9874         (ravenscar_ops): Now a ravenscar_thread_target.
9875         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9876         (ravenscar_thread_alive, ravenscar_pid_to_str)
9877         (ravenscar_fetch_registers, ravenscar_store_registers)
9878         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9879         (ravenscar_stopped_by_hw_breakpoint)
9880         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9881         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9882         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9883         methods.
9884         (init_ravenscar_thread_ops): Delete.
9885         (_initialize_ravenscar): Remove references to
9886         init_ravenscar_thread_ops and complete_target_initialization.
9887
9888         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9889         (bsd_uthread_target): New class.
9890         (bsd_uthread_ops): Now a bsd_uthread_target.
9891         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9892         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9893         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9894         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9895         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9896         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9897         (bsd_uthread_target): Delete function.
9898         (_initialize_bsd_uthread): Remove reference to
9899         complete_target_initialization.
9900
9901         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9902         (target_bfd): ... this new class.
9903         (target_bfd_xfer_partial, target_bfd_get_section_table)
9904         (target_bfd_close): Refactor as target_bfd methods.
9905         (target_bfd::~target_bfd): New.
9906         (target_bfd_reopen): Adjust.
9907         (target_bfd::close): New.
9908
9909         * record-btrace.c (record_btrace_target): New class.
9910         (record_btrace_ops): Now a record_btrace_target.
9911         (record_btrace_open, record_btrace_stop_recording)
9912         (record_btrace_disconnect, record_btrace_close)
9913         (record_btrace_async, record_btrace_info)
9914         (record_btrace_insn_history, record_btrace_insn_history_range)
9915         (record_btrace_insn_history_from, record_btrace_call_history)
9916         (record_btrace_call_history_range)
9917         (record_btrace_call_history_from, record_btrace_record_method)
9918         (record_btrace_is_replaying, record_btrace_will_replay)
9919         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9920         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9921         (record_btrace_store_registers, record_btrace_prepare_to_store)
9922         (record_btrace_to_get_unwinder)
9923         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9924         (record_btrace_commit_resume, record_btrace_wait)
9925         (record_btrace_stop, record_btrace_can_execute_reverse)
9926         (record_btrace_stopped_by_sw_breakpoint)
9927         (record_btrace_supports_stopped_by_sw_breakpoint)
9928         (record_btrace_stopped_by_hw_breakpoint)
9929         (record_btrace_supports_stopped_by_hw_breakpoint)
9930         (record_btrace_update_thread_list, record_btrace_thread_alive)
9931         (record_btrace_goto_begin, record_btrace_goto_end)
9932         (record_btrace_goto, record_btrace_stop_replaying_all)
9933         (record_btrace_execution_direction)
9934         (record_btrace_prepare_to_generate_core)
9935         (record_btrace_done_generating_core): Refactor as
9936         record_btrace_target methods.
9937         (init_record_btrace_ops): Delete.
9938         (_initialize_record_btrace): Remove reference to
9939         init_record_btrace_ops.
9940         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9941         the execution_direction global.
9942         (record_full_base_target, record_full_target)
9943         (record_full_core_target): New classes.
9944         (record_full_ops): Now a record_full_target.
9945         (record_full_core_ops): Now a record_full_core_target.
9946         (record_full_target::detach, record_full_target::disconnect)
9947         (record_full_core_target::disconnect)
9948         (record_full_target::mourn_inferior, record_full_target::kill):
9949         New.
9950         (record_full_open, record_full_close, record_full_async): Refactor
9951         as methods of the record_full_base_target class.
9952         (record_full_resume, record_full_commit_resume): Refactor
9953         as methods of the record_full_target class.
9954         (record_full_wait, record_full_stopped_by_watchpoint)
9955         (record_full_stopped_data_address)
9956         (record_full_stopped_by_sw_breakpoint)
9957         (record_full_supports_stopped_by_sw_breakpoint)
9958         (record_full_stopped_by_hw_breakpoint)
9959         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9960         methods of the record_full_base_target class.
9961         (record_full_store_registers, record_full_xfer_partial)
9962         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9963         Refactor as methods of the record_full_target class.
9964         (record_full_can_execute_reverse, record_full_get_bookmark)
9965         (record_full_goto_bookmark, record_full_execution_direction)
9966         (record_full_record_method, record_full_info, record_full_delete)
9967         (record_full_is_replaying, record_full_will_replay)
9968         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9969         (record_full_stop_replaying): Refactor as methods of the
9970         record_full_base_target class.
9971         (record_full_core_resume, record_full_core_kill)
9972         (record_full_core_fetch_registers)
9973         (record_full_core_prepare_to_store)
9974         (record_full_core_store_registers, record_full_core_xfer_partial)
9975         (record_full_core_insert_breakpoint)
9976         (record_full_core_remove_breakpoint)
9977         (record_full_core_has_execution): Refactor
9978         as methods of the record_full_core_target class.
9979         (record_full_base_target::supports_delete_record): New.
9980         (init_record_full_ops): Delete.
9981         (init_record_full_core_ops): Delete.
9982         (record_full_save): Refactor as method of the
9983         record_full_base_target class.
9984         (_initialize_record_full): Remove references to
9985         init_record_full_ops and init_record_full_core_ops.
9986
9987         * remote.c (remote_target, extended_remote_target): New classes.
9988         (remote_ops): Now a remote_target.
9989         (extended_remote_ops): Now an extended_remote_target.
9990         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9991         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9992         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9993         (remote_pass_signals, remote_set_syscall_catchpoint)
9994         (remote_program_signals, )
9995         (remote_thread_always_alive): Remove target_ops parameter.
9996         (remote_thread_alive, remote_thread_name)
9997         (remote_update_thread_list, remote_threads_extra_info)
9998         (remote_static_tracepoint_marker_at)
9999         (remote_static_tracepoint_markers_by_strid)
10000         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10001         (remote_open): Refactor as methods of remote_target.
10002         (extended_remote_open, extended_remote_detach)
10003         (extended_remote_attach, extended_remote_post_attach):
10004         (extended_remote_supports_disable_randomization)
10005         (extended_remote_create_inferior): : Refactor as method of
10006         extended_remote_target.
10007         (remote_set_permissions, remote_open_1, remote_detach)
10008         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10009         (remote_resume, remote_commit_resume, remote_stop)
10010         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10011         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10012         (remote_prepare_to_store, remote_store_registers)
10013         (remote_flash_erase, remote_flash_done, remote_files_info)
10014         (remote_kill, remote_mourn, remote_insert_breakpoint)
10015         (remote_remove_breakpoint, remote_insert_watchpoint)
10016         (remote_watchpoint_addr_within_range)
10017         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10018         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10019         (remote_supports_stopped_by_sw_breakpoint)
10020         (remote_stopped_by_hw_breakpoint)
10021         (remote_supports_stopped_by_hw_breakpoint)
10022         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10023         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10024         (remote_verify_memory): Refactor as methods of remote_target.
10025         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10026         parameter.
10027         (remote_xfer_partial, remote_get_memory_xfer_limit)
10028         (remote_search_memory, remote_rcmd, remote_memory_map)
10029         (remote_pid_to_str, remote_get_thread_local_address)
10030         (remote_get_tib_address, remote_read_description): Refactor as
10031         methods of remote_target.
10032         (remote_target::fileio_open, remote_target::fileio_pwrite)
10033         (remote_target::fileio_pread, remote_target::fileio_close): New.
10034         (remote_hostio_readlink, remote_hostio_fstat)
10035         (remote_filesystem_is_local, remote_can_execute_reverse)
10036         (remote_supports_non_stop, remote_supports_disable_randomization)
10037         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10038         (remote_supports_enable_disable_tracepoint)
10039         (remote_supports_string_tracing)
10040         (remote_can_run_breakpoint_commands, remote_trace_init)
10041         (remote_download_tracepoint, remote_can_download_tracepoint)
10042         (remote_download_trace_state_variable, remote_enable_tracepoint)
10043         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10044         (remote_trace_start, remote_get_trace_status)
10045         (remote_get_tracepoint_status, remote_trace_stop)
10046         (remote_trace_find, remote_get_trace_state_variable_value)
10047         (remote_save_trace_data, remote_get_raw_trace_data)
10048         (remote_set_disconnected_tracing, remote_core_of_thread)
10049         (remote_set_circular_trace_buffer, remote_traceframe_info)
10050         (remote_get_min_fast_tracepoint_insn_len)
10051         (remote_set_trace_buffer_size, remote_set_trace_notes)
10052         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10053         (remote_disable_btrace, remote_teardown_btrace)
10054         (remote_read_btrace, remote_btrace_conf)
10055         (remote_augmented_libraries_svr4_read, remote_load)
10056         (remote_pid_to_exec_file, remote_can_do_single_step)
10057         (remote_execution_direction, remote_thread_handle_to_thread_info):
10058         Refactor as methods of remote_target.
10059         (init_remote_ops, init_extended_remote_ops): Delete.
10060         (remote_can_async_p, remote_is_async_p, remote_async)
10061         (remote_thread_events, remote_upload_tracepoints)
10062         (remote_upload_trace_state_variables): Refactor as methods of
10063         remote_target.
10064         (_initialize_remote): Remove references to init_remote_ops and
10065         init_extended_remote_ops.
10066
10067         * remote-sim.c (gdbsim_target): New class.
10068         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10069         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10070         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10071         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10072         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10073         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10074         Refactor as methods of gdbsim_target.
10075         (gdbsim_ops): Now a gdbsim_target.
10076         (init_gdbsim_ops): Delete.
10077         (gdbsim_cntrl_c): Adjust.
10078         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10079
10080         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10081         (the_amd64_linux_nat_target): New.
10082         (amd64_linux_fetch_inferior_registers)
10083         (amd64_linux_store_inferior_registers): Refactor as methods of
10084         amd64_linux_nat_target.
10085         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10086         * i386-linux-nat.c: Don't include "linux-nat.h".
10087         (i386_linux_nat_target): New class.
10088         (the_i386_linux_nat_target): New.
10089         (i386_linux_fetch_inferior_registers)
10090         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10091         as methods of i386_linux_nat_target.
10092         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10093         * inf-child.c (inf_child_ops): Delete.
10094         (inf_child_fetch_inferior_registers)
10095         (inf_child_store_inferior_registers): Delete.
10096         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10097         methods of inf_child_target.
10098         (inf_child_target::supports_terminal_ours)
10099         (inf_child_target::terminal_init)
10100         (inf_child_target::terminal_inferior)
10101         (inf_child_target::terminal_ours_for_output)
10102         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10103         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10104         New.
10105         (inf_child_open, inf_child_disconnect, inf_child_close)
10106         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10107         (inf_child_post_startup_inferior, inf_child_can_run)
10108         (inf_child_pid_to_exec_file): Refactor as methods of
10109         inf_child_target.
10110         (inf_child_follow_fork): Delete.
10111         (inf_child_target::can_create_inferior)
10112         (inf_child_target::can_attach): New.
10113         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10114         (inf_child_target::has_stack, inf_child_target::has_registers)
10115         (inf_child_target::has_execution): New.
10116         (inf_child_fileio_open, inf_child_fileio_pwrite)
10117         (inf_child_fileio_pread, inf_child_fileio_fstat)
10118         (inf_child_fileio_close, inf_child_fileio_unlink)
10119         (inf_child_fileio_readlink, inf_child_use_agent)
10120         (inf_child_can_use_agent): Refactor as methods of
10121         inf_child_target.
10122         (return_zero, inf_child_target): Delete.
10123         (inf_child_target::inf_child_target): New.
10124         * inf-child.h: Include "target.h".
10125         (inf_child_target): Delete function prototype.
10126         (inf_child_target): New class.
10127         (inf_child_open_target, inf_child_mourn_inferior)
10128         (inf_child_maybe_unpush_target): Delete.
10129         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10130         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10131         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10132         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10133         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10134         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10135         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10136         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10137         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10138         methods of inf_ptrace_target.
10139         (inf_ptrace_target): Delete function.
10140         * inf-ptrace.h: Include "inf-child.h".
10141         (inf_ptrace_target): Delete function declaration.
10142         (inf_ptrace_target): New class.
10143         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10144         * linux-nat.c (linux_target): New.
10145         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10146         (linux_nat_target::~linux_nat_target): New.
10147         (linux_child_post_attach, linux_child_post_startup_inferior)
10148         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10149         (linux_child_remove_fork_catchpoint)
10150         (linux_child_insert_vfork_catchpoint)
10151         (linux_child_remove_vfork_catchpoint)
10152         (linux_child_insert_exec_catchpoint)
10153         (linux_child_remove_exec_catchpoint)
10154         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10155         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10156         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10157         (linux_nat_stopped_data_address)
10158         (linux_nat_stopped_by_sw_breakpoint)
10159         (linux_nat_supports_stopped_by_sw_breakpoint)
10160         (linux_nat_stopped_by_hw_breakpoint)
10161         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10162         (linux_nat_kill, linux_nat_mourn_inferior)
10163         (linux_nat_xfer_partial, linux_nat_thread_alive)
10164         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10165         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10166         (linux_child_static_tracepoint_markers_by_strid)
10167         (linux_nat_is_async_p, linux_nat_can_async_p)
10168         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10169         (linux_nat_supports_multi_process)
10170         (linux_nat_supports_disable_randomization, linux_nat_async)
10171         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10172         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10173         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10174         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10175         methods of linux_nat_target.
10176         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10177         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10178         parameter.
10179         (check_stopped_by_watchpoint): Adjust.
10180         (linux_xfer_partial): Delete.
10181         (linux_target_install_ops, linux_target, linux_nat_add_target):
10182         Delete.
10183         (linux_nat_target::linux_nat_target): New.
10184         * linux-nat.h: Include "inf-ptrace.h".
10185         (linux_nat_target): New.
10186         (linux_target, linux_target_install_ops, linux_nat_add_target):
10187         Delete function declarations.
10188         (linux_target): Declare global.
10189         * linux-thread-db.c (thread_db_target): New.
10190         (thread_db_target::thread_db_target): New.
10191         (thread_db_ops): Delete.
10192         (the_thread_db_target): New.
10193         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10194         (thread_db_update_thread_list, thread_db_pid_to_str)
10195         (thread_db_extra_thread_info)
10196         (thread_db_thread_handle_to_thread_info)
10197         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10198         (thread_db_resume): Refactor as methods of thread_db_target.
10199         (init_thread_db_ops): Delete.
10200         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10201         * x86-linux-nat.c: Don't include "linux-nat.h".
10202         (super_post_startup_inferior): Delete.
10203         (x86_linux_nat_target::~x86_linux_nat_target): New.
10204         (x86_linux_child_post_startup_inferior)
10205         (x86_linux_read_description, x86_linux_enable_btrace)
10206         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10207         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10208         methods of x86_linux_nat_target.
10209         (x86_linux_create_target): Delete.  Bits folded ...
10210         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10211         pointer.
10212         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10213         (x86_linux_nat_target): New class.
10214         (x86_linux_create_target): Delete.
10215         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10216         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10217         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10218         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10219         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10220         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10221         make extern.
10222         (x86_use_watchpoints): Delete.
10223         * x86-nat.h: Include "breakpoint.h" and "target.h".
10224         (x86_use_watchpoints): Delete.
10225         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10226         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10227         (x86_insert_watchpoint, x86_remove_watchpoint)
10228         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10229         (x86_stopped_by_hw_breakpoint): New declarations.
10230         (x86_nat_target): New template class.
10231
10232         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10233         (the_ppc_linux_nat_target): New.
10234         (ppc_linux_fetch_inferior_registers)
10235         (ppc_linux_can_use_hw_breakpoint)
10236         (ppc_linux_region_ok_for_hw_watchpoint)
10237         (ppc_linux_ranged_break_num_registers)
10238         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10239         (ppc_linux_insert_mask_watchpoint)
10240         (ppc_linux_remove_mask_watchpoint)
10241         (ppc_linux_can_accel_watchpoint_condition)
10242         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10243         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10244         (ppc_linux_watchpoint_addr_within_range)
10245         (ppc_linux_masked_watch_num_registers)
10246         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10247         (ppc_linux_read_description): Refactor as methods of
10248         ppc_linux_nat_target.
10249         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10250
10251         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10252         (procfs_target): New class.
10253         (the_procfs_target): New.
10254         (procfs_target): Delete function.
10255         (procfs_auxv_parse, procfs_attach, procfs_detach)
10256         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10257         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10258         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10259         (procfs_create_inferior, procfs_update_thread_list)
10260         (procfs_thread_alive, procfs_pid_to_str)
10261         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10262         (procfs_stopped_data_address, procfs_insert_watchpoint)
10263         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10264         (proc_find_memory_regions, procfs_info_proc)
10265         (procfs_make_note_section): Refactor as methods of procfs_target.
10266         (_initialize_procfs): Adjust.
10267         * sol-thread.c (sol_thread_target): New class.
10268         (sol_thread_ops): Now a sol_thread_target.
10269         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10270         (sol_thread_fetch_registers, sol_thread_store_registers)
10271         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10272         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10273         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10274         (init_sol_thread_ops): Delete.
10275         (_initialize_sol_thread): Adjust.  Remove references to
10276         init_sol_thread_ops and complete_target_initialization.
10277
10278         * windows-nat.c (windows_nat_target): New class.
10279         (windows_fetch_inferior_registers)
10280         (windows_store_inferior_registers, windows_resume, windows_wait)
10281         (windows_attach, windows_detach, windows_pid_to_exec_file)
10282         (windows_files_info, windows_create_inferior)
10283         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10284         (windows_close, windows_pid_to_str, windows_xfer_partial)
10285         (windows_get_tib_address, windows_get_ada_task_ptid)
10286         (windows_thread_name, windows_thread_alive): Refactor as
10287         windows_nat_target methods.
10288         (do_initial_windows_stuff): Adjust.
10289         (windows_target): Delete function.
10290         (_initialize_windows_nat): Adjust.
10291
10292         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10293         (darwin_mourn_inferior, darwin_kill_inferior)
10294         (darwin_create_inferior, darwin_attach, darwin_detach)
10295         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10296         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10297         (darwin_supports_multi_process): Refactor as darwin_nat_target
10298         methods.
10299         (darwin_resume_to, darwin_files_info): Delete.
10300         (_initialize_darwin_inferior): Rename to ...
10301         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10302         * darwin-nat.h: Include "inf-child.h".
10303         (darwin_nat_target): New class.
10304         (darwin_complete_target): Delete.
10305         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10306         (darwin_target): New.
10307         (i386_darwin_fetch_inferior_registers)
10308         (i386_darwin_store_inferior_registers): Refactor as methods of
10309         darwin_nat_target.
10310         (darwin_complete_target): Delete, with ...
10311         (_initialize_i386_darwin_nat): ... bits factored out here.
10312
10313         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10314         (the_alpha_linux_nat_target): New.
10315         (alpha_linux_register_u_offset): Refactor as
10316         alpha_linux_nat_target method.
10317         (_initialize_alpha_linux_nat): Adjust.
10318         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10319         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10320         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10321         methods of linux_nat_trad_target.
10322         (linux_trad_target): Delete.
10323         * linux-nat-trad.h (linux_trad_target): Delete function.
10324         (linux_nat_trad_target): New class.
10325         * mips-linux-nat.c (mips_linux_nat_target): New class.
10326         (super_fetch_registers, super_store_registers, super_close):
10327         Delete.
10328         (the_mips_linux_nat_target): New.
10329         (mips64_linux_regsets_fetch_registers)
10330         (mips64_linux_regsets_store_registers)
10331         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10332         (mips_linux_register_u_offset, mips_linux_read_description)
10333         (mips_linux_can_use_hw_breakpoint)
10334         (mips_linux_stopped_by_watchpoint)
10335         (mips_linux_stopped_data_address)
10336         (mips_linux_region_ok_for_hw_watchpoint)
10337         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10338         (mips_linux_close): Refactor as methods of mips_linux_nat.
10339         (_initialize_mips_linux_nat): Adjust to C++ification.
10340
10341         * aix-thread.c (aix_thread_target): New class.
10342         (aix_thread_ops): Now an aix_thread_target.
10343         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10344         (aix_thread_fetch_registers, aix_thread_store_registers)
10345         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10346         (aix_thread_thread_alive, aix_thread_pid_to_str)
10347         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10348         Refactor as methods of aix_thread_target.
10349         (init_aix_thread_ops): Delete.
10350         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10351         and complete_target_initialization.
10352         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10353         (rs6000_nat_target): New class.
10354         (the_rs6000_nat_target): New.
10355         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10356         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10357         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10358         (super_create_inferior): Delete.
10359         (_initialize_rs6000_nat): Adjust to C++ification.
10360
10361         * arm-linux-nat.c (arm_linux_nat_target): New class.
10362         (the_arm_linux_nat_target): New.
10363         (arm_linux_fetch_inferior_registers)
10364         (arm_linux_store_inferior_registers, arm_linux_read_description)
10365         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10366         (arm_linux_remove_hw_breakpoint)
10367         (arm_linux_region_ok_for_hw_watchpoint)
10368         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10369         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10370         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10371         arm_linux_nat_target.
10372         (_initialize_arm_linux_nat): Adjust to C++ification.
10373
10374         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10375         (the_aarch64_linux_nat_target): New.
10376         (aarch64_linux_fetch_inferior_registers)
10377         (aarch64_linux_store_inferior_registers)
10378         (aarch64_linux_child_post_startup_inferior)
10379         (aarch64_linux_read_description)
10380         (aarch64_linux_can_use_hw_breakpoint)
10381         (aarch64_linux_insert_hw_breakpoint)
10382         (aarch64_linux_remove_hw_breakpoint)
10383         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10384         (aarch64_linux_region_ok_for_hw_watchpoint)
10385         (aarch64_linux_stopped_data_address)
10386         (aarch64_linux_stopped_by_watchpoint)
10387         (aarch64_linux_watchpoint_addr_within_range)
10388         (aarch64_linux_can_do_single_step): Refactor as methods of
10389         aarch64_linux_nat_target.
10390         (super_post_startup_inferior): Delete.
10391         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10392
10393         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10394         (the_hppa_linux_nat_target): New.
10395         (hppa_linux_fetch_inferior_registers)
10396         (hppa_linux_store_inferior_registers): Refactor as methods of
10397         hppa_linux_nat_target.
10398         (_initialize_hppa_linux_nat): Adjust to C++ification.
10399
10400         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10401         (the_ia64_linux_nat_target): New.
10402         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10403         (ia64_linux_stopped_data_address)
10404         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10405         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10406         ia64_linux_nat_target methods.
10407         (super_xfer_partial): Delete.
10408         (_initialize_ia64_linux_nat): Adjust to C++ification.
10409
10410         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10411         (the_m32r_linux_nat_target): New.
10412         (m32r_linux_fetch_inferior_registers)
10413         (m32r_linux_store_inferior_registers): Refactor as
10414         m32r_linux_nat_target methods.
10415         (_initialize_m32r_linux_nat): Adjust to C++ification.
10416
10417         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10418         (the_m68k_linux_nat_target): New.
10419         (m68k_linux_fetch_inferior_registers)
10420         (m68k_linux_store_inferior_registers): Refactor as
10421         m68k_linux_nat_target methods.
10422         (_initialize_m68k_linux_nat): Adjust to C++ification.
10423
10424         * s390-linux-nat.c (s390_linux_nat_target): New class.
10425         (the_s390_linux_nat_target): New.
10426         (s390_linux_fetch_inferior_registers)
10427         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10428         (s390_insert_watchpoint, s390_remove_watchpoint)
10429         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10430         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10431         (s390_auxv_parse, s390_read_description): Refactor as methods of
10432         s390_linux_nat_target.
10433         (_initialize_s390_nat): Adjust to C++ification.
10434
10435         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10436         (the_sparc_linux_nat_target): New.
10437         (_initialize_sparc_linux_nat): Adjust to C++ification.
10438         * sparc-nat.c (sparc_fetch_inferior_registers)
10439         (sparc_store_inferior_registers): Remove target_ops parameter.
10440         * sparc-nat.h (sparc_fetch_inferior_registers)
10441         (sparc_store_inferior_registers): Remove target_ops parameter.
10442         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10443         (the_sparc64_linux_nat_target): New.
10444         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10445
10446         * spu-linux-nat.c (spu_linux_nat_target): New class.
10447         (the_spu_linux_nat_target): New.
10448         (spu_child_post_startup_inferior, spu_child_post_attach)
10449         (spu_child_wait, spu_fetch_inferior_registers)
10450         (spu_store_inferior_registers, spu_xfer_partial)
10451         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10452         methods.
10453         (_initialize_spu_nat): Adjust to C++ification.
10454
10455         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10456         (the_tilegx_linux_nat_target): New.
10457         (fetch_inferior_registers, store_inferior_registers):
10458         Refactor as methods.
10459         (_initialize_tile_linux_nat): Adjust to C++ification.
10460
10461         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10462         (the_xtensa_linux_nat_target): New.
10463         (xtensa_linux_fetch_inferior_registers)
10464         (xtensa_linux_store_inferior_registers): Refactor as
10465         xtensa_linux_nat_target methods.
10466         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10467
10468         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10469         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10470         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10471         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10472         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10473         (fbsd_stopped_by_sw_breakpoint)
10474         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10475         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10476         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10477         (fbsd_post_startup_inferior, fbsd_post_attach)
10478         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10479         (fbsd_set_syscall_catchpoint)
10480         (super_xfer_partial, super_resume, super_wait)
10481         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10482         (fbsd_handle_debug_trap): Remove target_ops parameter.
10483         (fbsd_nat_add_target): Delete.
10484         * fbsd-nat.h: Include "inf-ptrace.h".
10485         (fbsd_nat_add_target): Delete.
10486         (USE_SIGTRAP_SIGINFO): Define.
10487         (fbsd_nat_target): New class.
10488
10489         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10490         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10491         (amd64bsd_target): Delete.
10492         * amd64-bsd-nat.h: New file.
10493         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10494         "x86-bsd-nat.h".
10495         (amd64_fbsd_nat_target): New class.
10496         (the_amd64_fbsd_nat_target): New.
10497         (amd64fbsd_read_description): Refactor as method of
10498         amd64_fbsd_nat_target.
10499         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10500         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10501         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10502         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10503         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10504         (i386bsd_target): Delete.
10505         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10506         (i386bsd_fetch_inferior_registers)
10507         (i386bsd_store_inferior_registers): Declare.
10508         (i386_bsd_nat_target): New class.
10509         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10510         (the_i386_fbsd_nat_target): New.
10511         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10512         i386_fbsd_nat_target methods.
10513         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10514         (_initialize_i386fbsd_nat): Adjust to C++ification.
10515         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10516         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10517         (_initialize_x86_bsd_nat): Adjust to C++ification.
10518         * x86-bsd-nat.h: Include "x86-nat.h".
10519         (x86bsd_target): Delete declaration.
10520         (x86bsd_nat_target): New class.
10521
10522         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10523         (the_aarch64_fbsd_nat_target): New.
10524         (aarch64_fbsd_fetch_inferior_registers)
10525         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10526         aarch64_fbsd_nat_target.
10527         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10528         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10529         (the_alpha_bsd_nat_target): New.
10530         (alphabsd_fetch_inferior_registers)
10531         (alphabsd_store_inferior_registers): Refactor as
10532         alpha_bsd_nat_target methods.
10533         (_initialize_alphabsd_nat): Refactor as methods of
10534         alpha_bsd_nat_target.
10535         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10536         (the_amd64_nbsd_nat_target): New.
10537         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10538         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10539         (the_amd64_obsd_nat_target): New.
10540         (_initialize_amd64obsd_nat): Adjust to C++ification.
10541         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10542         (the_arm_fbsd_nat_target): New.
10543         (arm_fbsd_fetch_inferior_registers)
10544         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10545         (_initialize_arm_fbsd_nat): Refactor as methods of
10546         arm_fbsd_nat_target.
10547         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10548         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10549         (the_arm_netbsd_nat_target): New.
10550         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10551         arm_netbsd_nat_target.
10552         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10553         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10554         (the_hppa_nbsd_nat_target): New.
10555         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10556         hppa_nbsd_nat_target methods.
10557         (_initialize_hppanbsd_nat): Adjust to C++ification.
10558         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10559         (the_hppa_obsd_nat_target): New.
10560         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10561         methods of hppa_obsd_nat_target.
10562         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10563         add_target.
10564         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10565         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10566         add_target.
10567         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10568         (_initialize_i386obsd_nat): Use add_target.
10569         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10570         (the_m68k_bsd_nat_target): New.
10571         (m68kbsd_fetch_inferior_registers)
10572         (m68kbsd_store_inferior_registers): Refactor as methods of
10573         m68k_bsd_nat_target.
10574         (_initialize_m68kbsd_nat): Adjust to C++ification.
10575         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10576         (the_mips_fbsd_nat_target): New.
10577         (mips_fbsd_fetch_inferior_registers)
10578         (mips_fbsd_store_inferior_registers): Refactor as methods of
10579         mips_fbsd_nat_target.
10580         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10581         add_target.
10582         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10583         (the_mips_nbsd_nat_target): New.
10584         (mipsnbsd_fetch_inferior_registers)
10585         (mipsnbsd_store_inferior_registers): Refactor as methods of
10586         mips_nbsd_nat_target.
10587         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10588         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10589         (the_mips64_obsd_nat_target): New.
10590         (mips64obsd_fetch_inferior_registers)
10591         (mips64obsd_store_inferior_registers): Refactor as methods of
10592         mips64_obsd_nat_target.
10593         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10594         add_target.
10595         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10596         nbsd_nat_target.
10597         * nbsd-nat.h: Include "inf-ptrace.h".
10598         (nbsd_nat_target): New class.
10599         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10600         (obsd_wait): Refactor as methods of obsd_nat_target.
10601         (obsd_add_target): Delete.
10602         * obsd-nat.h: Include "inf-ptrace.h".
10603         (obsd_nat_target): New class.
10604         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10605         (the_ppc_fbsd_nat_target): New.
10606         (ppcfbsd_fetch_inferior_registers)
10607         (ppcfbsd_store_inferior_registers): Refactor as methods of
10608         ppc_fbsd_nat_target.
10609         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10610         add_target.
10611         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10612         (the_ppc_nbsd_nat_target): New.
10613         (ppcnbsd_fetch_inferior_registers)
10614         (ppcnbsd_store_inferior_registers): Refactor as methods of
10615         ppc_nbsd_nat_target.
10616         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10617         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10618         (the_ppc_obsd_nat_target): New.
10619         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10620         methods of ppc_obsd_nat_target.
10621         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10622         add_target.
10623         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10624         (the_sh_nbsd_nat_target): New.
10625         (shnbsd_fetch_inferior_registers)
10626         (shnbsd_store_inferior_registers): Refactor as methods of
10627         sh_nbsd_nat_target.
10628         (_initialize_shnbsd_nat): Adjust to C++ification.
10629         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10630         (inf_ptrace_xfer_partial): Delete.
10631         (sparc_xfer_partial, sparc_target): Delete.
10632         * sparc-nat.h (sparc_fetch_inferior_registers)
10633         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10634         (sparc_target): Delete function declaration.
10635         (sparc_target): New template class.
10636         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10637         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10638         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10639         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10640         add_target.
10641         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10642         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10643         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10644         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10645         add_target.
10646         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10647         (the_vax_bsd_nat_target): New.
10648         (vaxbsd_fetch_inferior_registers)
10649         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10650         methods.
10651         (_initialize_vaxbsd_nat): Adjust to C++ification.
10652
10653         * bsd-kvm.c (bsd_kvm_target): New class.
10654         (bsd_kvm_ops): Now a bsd_kvm_target.
10655         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10656         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10657         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10658         bsd_kvm_target.
10659         (bsd_kvm_return_one): Delete.
10660         (bsd_kvm_add_target): Adjust to C++ification.
10661
10662         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10663         (nto_procfs_target_procfs): New classes.
10664         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10665         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10666         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10667         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10668         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10669         (procfs_remove_hw_breakpoint, procfs_resume)
10670         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10671         (procfs_kill_inferior, procfs_store_registers)
10672         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10673         as methods of nto_procfs_target.
10674         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10675         (nto_native_ops): Delete.
10676         (procfs_open, procfs_native_open): Delete.
10677         (nto_native_ops): Now an nto_procfs_target_native.
10678         (init_procfs_targets): Adjust to C++ification.
10679         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10680         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10681         Refactor as methods of nto_procfs_target.
10682
10683         * go32-nat.c (go32_nat_target): New class.
10684         (the_go32_nat_target): New.
10685         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10686         (go32_store_registers, go32_xfer_partial, go32_files_info)
10687         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10688         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10689         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10690         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10691         (go32_target): Delete.
10692         (_initialize_go32_nat): Adjust to C++ification.
10693
10694         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10695         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10696         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10697         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10698         gnu_nat_target.
10699         (gnu_target): Delete.
10700         * gnu-nat.h (gnu_target): Delete.
10701         (gnu_nat_target): New class.
10702         * i386-gnu-nat.c (gnu_base_target): New.
10703         (i386_gnu_nat_target): New class.
10704         (the_i386_gnu_nat_target): New.
10705         (_initialize_i386gnu_nat): Adjust to C++ification.
10706
10707 2018-05-02  Pedro Alves  <palves@redhat.com>
10708
10709         * bfd-target.c (target_bfd_xclose): Rename to ...
10710         (target_bfd_close): ... this.
10711         (target_bfd_reopen): Adjust.
10712         * target.c (target_close): Remove references to to_xclose.
10713         * target.h (target_ops::to_xclose): Delete.
10714         (target_ops::to_close): Update comments.
10715
10716 2018-05-02  Pedro Alves  <palves@redhat.com>
10717
10718         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10719         "linux-nat.h".
10720         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10721         * inf-ptrace.c (inf_ptrace_register_u_offset)
10722         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10723         (inf_ptrace_store_register, inf_ptrace_store_registers)
10724         (inf_ptrace_trad_target): Move to ...
10725         * linux-nat-trad.c: ... this new file.
10726         * linux-nat-trad.h: New file.
10727         * linux-nat.c (linux_target_install_ops): Make extern.
10728         (linux_trad_target): Delete.
10729         * linux-nat.h (linux_trad_target): Delete declaration.
10730         (linux_target_install_ops): Declare.
10731         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10732         "linux-nat.h".
10733
10734 2018-05-02  Pedro Alves  <palves@redhat.com>
10735
10736         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10737         procfs_target/add_target here.
10738         * procfs.c (procfs_target): Make static.
10739         (_initialize_procfs): Call add_target here.
10740         * procfs.h (struct target_ops): Remove forward declaration.
10741         (procfs_target): Remove declaration.
10742         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10743
10744 2018-05-02  Pedro Alves  <palves@redhat.com>
10745
10746         * procfs.c (procfs_stopped_by_watchpoint)
10747         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10748         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10749         Forward declare.
10750         (procfs_use_watchpoints): Delete, move contents...
10751         (procfs_target): ... here.
10752         * procfs.h (procfs_use_watchpoints): Delete declaration.
10753         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10754         procfs_use_watchpoints.
10755         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10756         procfs_use_watchpoints.
10757
10758 2018-05-02  Tom Tromey  <tom@tromey.com>
10759
10760         PR python/20084:
10761         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10762         and var_zuinteger_unlimited.
10763         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10764         and PARAM_ZUINTEGER_UNLIMITED.
10765         (set_parameter_value): Handle var_zuinteger and
10766         var_zuinteger_unlimited.
10767         (add_setshow_generic): Likewise.
10768         (parmpy_init): Likewise.
10769
10770 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10771
10772         PR rust/23124
10773         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10774         pointer is not null before dereferencing it.
10775
10776 2018-04-30  Tom Tromey  <tom@tromey.com>
10777
10778         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10779         is_mi_like_p.
10780
10781 2018-04-30  Tom Tromey  <tom@tromey.com>
10782
10783         * breakpoint.c (mention): Remove use of is_mi_like_p.
10784         (print_mention_ranged_breakpoint): Likewise.
10785         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10786         of is_mi_like_p.
10787
10788 2018-04-30  Tom Tromey  <tom@tromey.com>
10789
10790         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10791
10792 2018-04-30  Tom Tromey  <tom@tromey.com>
10793
10794         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10795         (info_spu_event_command): Remove some uses of is_mi_like_p.
10796
10797 2018-04-30  Tom Tromey  <tom@tromey.com>
10798
10799         * python/py-framefilter.c (py_print_single_arg)
10800         (enumerate_locals, py_print_args, py_print_frame): Remove some
10801         uses of is_mi_like_p.
10802
10803 2018-04-30  Tom Tromey  <tom@tromey.com>
10804
10805         * ui-out.c: Update.
10806         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10807         * ui-out.h (ui_out::is_mi_like_p): Now const.
10808         (ui_out::do_is_mi_like_p): Now const.
10809         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10810
10811 2018-04-30  Tom Tromey  <tom@tromey.com>
10812
10813         * varobj.c (varobj_set_visualizer): Use new_reference.
10814         * python/python.c (gdbpy_decode_line): Use new_reference.
10815         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10816         new_reference.
10817
10818 2018-04-30  Tom Tromey  <tom@tromey.com>
10819
10820         * varobj.c (install_new_value): Use new_reference.
10821         * value.h (value_incref): Return void.  Swap intro comment with
10822         value_decref.
10823         * value.c (set_value_parent): Use new_reference.
10824         (value_incref): Return void.  Update intro comment.
10825         (release_value): Use new_reference.
10826         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10827
10828 2018-04-30  Tom Tromey  <tom@tromey.com>
10829
10830         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10831         * gdb_bfd.h (new_bfd_ref): Remove.
10832         (gdb_bfd_open): Update comment.
10833         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10834         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10835         (gdb_bfd_fdopenr): Use new_reference.
10836         * exec.c (exec_file_attach): Use new_reference.
10837
10838 2018-04-30  Tom Tromey  <tom@tromey.com>
10839
10840         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10841         method.
10842
10843 2018-04-30  Tom Tromey  <tom@tromey.com>
10844
10845         * jit.c (jit_read_code_entry): Use type_align.
10846         * i386-tdep.c (i386_gdbarch_init): Don't call
10847         set_gdbarch_long_long_align_bit.
10848         * gdbarch.sh: Remove long_long_align_bit.
10849         * gdbarch.c, gdbarch.h: Rebuild.
10850         * arc-tdep.c (arc_type_align): New function.
10851         (arc_gdbarch_init): Use arc_type_align.  Don't call
10852         set_gdbarch_long_long_align_bit.
10853
10854 2018-04-30  Tom Tromey  <tom@tromey.com>
10855
10856         * rust-lang.c (rust_type_alignment): Remove.
10857         (rust_composite_type): Use type_align.
10858
10859 2018-04-30  Tom Tromey  <tom@tromey.com>
10860
10861         * NEWS: Mention Type.align.
10862         * python/py-type.c (typy_get_alignof): New function.
10863         (type_object_getset): Add "alignof".
10864
10865 2018-04-30  Tom Tromey  <tom@tromey.com>
10866
10867         PR exp/17095:
10868         * NEWS: Update.
10869         * std-operator.def (UNOP_ALIGNOF): New operator.
10870         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10871         New.
10872         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10873         * c-lang.c (c_op_print_tab): Add alignof.
10874         * c-exp.y (ALIGNOF): New token.
10875         (exp): Add "ALIGNOF" production.
10876         (ident_tokens): Add _Alignof and alignof.
10877
10878 2018-04-30  Tom Tromey  <tom@tromey.com>
10879
10880         * i386-tdep.c (i386_type_align): New function.
10881         (i386_gdbarch_init): Update.
10882         * gdbarch.sh (type_align): New method.
10883         * gdbarch.c, gdbarch.h: Rebuild.
10884         * arch-utils.h (default_type_align): Declare.
10885         * arch-utils.c (default_type_align): New function.
10886         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10887         (struct type) <align_log2>: New field.
10888         <instance_flags>: Now a bitfield.
10889         (TYPE_RAW_ALIGN): New macro.
10890         (type_align, type_raw_align, set_type_align): Declare.
10891         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10892         functions.
10893         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10894         (get_alignment, maybe_set_alignment): New functions.
10895         (read_structure_type, read_enumeration_type, read_array_type)
10896         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10897         (read_subrange_type, read_base_type): Set type alignment.
10898
10899 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10900
10901         * dwarf2read.c (read_index_from_section): Use bool.
10902
10903 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10904
10905         PR gdb/22950
10906         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10907         with #ifdef.
10908
10909 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10910
10911         PR build/22873
10912         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10913         last step, and do it atomically.
10914
10915 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10916
10917         * compile/compile-c-types.c (convert_int, convert_float):
10918         Update for C FE v1.
10919
10920 2018-04-27  Tom Tromey  <tom@tromey.com>
10921
10922         PR rust/22545:
10923         * rust-lang.c (rust_inclusive_range_type_p): New function.
10924         (rust_range): Handle inclusive ranges.
10925         (rust_compute_range): Likewise.
10926         * rust-exp.y (struct rust_op) <inclusive>: New field.
10927         (DOTDOTEQ): New constant.
10928         (range_expr): Add "..=" productions.
10929         (operator_tokens): Add "..=" token.
10930         (ast_range): Add "inclusive" parameter.
10931         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10932         ranges.
10933         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10934         bounds values.
10935         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10936         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10937         Update comments.
10938         * expprint.c (print_subexp_standard): Handle new bounds values.
10939         (dump_subexp_body_standard): Likewise.
10940
10941 2018-04-27  Tom Tromey  <tom@tromey.com>
10942
10943         * configure: Rebuild.
10944         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10945         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10946         "OVERRIDE".
10947         (class symbol_needs_eval_context): Likewise.
10948         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10949         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10950         "virtual".
10951         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10952         "override".
10953         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10954         * aarch64-tdep.c (instruction_reader::read): Use "override".
10955         (instruction_reader_test::read): Likewise.
10956         * arm-tdep.c (instruction_reader::read): Use "override".
10957         (instruction_reader_thumb::read): Likewise.
10958
10959 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10960
10961         PR remote/9665
10962         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10963         instead of remote_send.
10964         (remote_send): Remove.
10965
10966 2018-04-26  Pedro Alves  <palves@redhat.com>
10967
10968         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10969         find_function_start_sal instead of find_pc_line.
10970
10971 2018-04-26  Pedro Alves  <palves@redhat.com>
10972
10973         * breakpoint.c (set_breakpoint_location_function): Handle
10974         mst_data_gnu_ifunc.
10975         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10976         * elfread.c (elf_symtab_read): Give data symbols with
10977         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10978         (elf_rel_plt_read): Update comment.
10979         * linespec.c (convert_linespec_to_sals): Handle
10980         mst_data_gnu_ifunc.
10981         (minsym_found): Handle mst_data_gnu_ifunc.
10982         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10983         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10984         * parse.c (find_minsym_type_and_address): Handle
10985         mst_data_gnu_ifunc.
10986         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10987         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10988         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10989         comment.
10990         <mst_data_gnu_ifunc>: New enumerator.
10991
10992 2018-04-26  Pedro Alves  <palves@redhat.com>
10993
10994         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10995         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10996         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10997         Handle it.
10998         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10999         (lookup_minimal_symbol_by_pc): Adjust.
11000         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11001         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11002         * minsyms.h (lookup_msym_prefer): New enum.
11003         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11004         parameter by a lookup_msym_prefer parameter.
11005
11006 2018-04-26  Pedro Alves  <palves@redhat.com>
11007
11008         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11009         ends in "@plt" instead of looking at the symbol's section.
11010
11011 2018-04-26  Pedro Alves  <palves@redhat.com>
11012
11013         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11014         all references.
11015         (find_pc_partial_function_gnu_ifunc): Rename to ...
11016         (find_pc_partial_function): ... this, and remove references to
11017         'is_gnu_ifunc_p'.
11018         (find_pc_partial_function): Delete old implementation.
11019         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11020
11021 2018-04-26  Pedro Alves  <palves@redhat.com>
11022
11023         * linespec.c (struct bound_minimal_symbol_search_key): New.
11024         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11025         skip first line if we found a GNU ifunc minimal symbol by name.
11026         (compare_msymbols): Change parameters to work with a destructured
11027         lhs minsym.
11028         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11029         functions.
11030
11031 2018-04-26  Pedro Alves  <palves@redhat.com>
11032
11033         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11034         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11035         address/name.
11036         (add_location_to_breakpoint): Store the minsym and the objfile in
11037         the breakpoint location.
11038         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11039         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11040         Record the minsym in the sal.
11041         * symtab.h (symtab_and_line) <msymbol>: New field.
11042
11043 2018-04-26  Pedro Alves  <palves@redhat.com>
11044
11045         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11046         unless we actually resolved the ifunc.
11047
11048 2018-04-26  Pedro Alves  <palves@redhat.com>
11049
11050         * c-exp.y (variable production): Prefer ifunc minsyms over
11051         regular function symbols.
11052         * symtab.c (find_gnu_ifunc): New function.
11053         * minsyms.h (lookup_msym_prefer): New enum.
11054         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11055         parameter by a lookup_msym_prefer parameter.
11056         * symtab.h (find_gnu_ifunc): New declaration.
11057
11058 2018-04-26  Pedro Alves  <palves@redhat.com>
11059
11060         * blockframe.c (find_gnu_ifunc_target_type): New function.
11061         (find_function_type): New.
11062         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11063         return a value with a memory address.
11064         (eval_call): For calls to GNU ifunc functions, try to find the
11065         type of the target function from the type that the resolver
11066         returns.
11067         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11068         symbols.
11069         * infcall.c (find_function_return_type): Delete.
11070         (find_function_addr): Add 'function_type' parameter.  For calls to
11071         GNU ifunc functions, try to find the type of the target function
11072         from the type that the resolver returns, and return it via
11073         FUNCTION_TYPE.
11074         (call_function_by_hand_dummy): Adjust to use the function type
11075         returned by find_function_addr.
11076         (find_function_addr): Add 'function_type' parameter and move
11077         description here.
11078         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11079         declarations.
11080
11081 2018-04-26  Pedro Alves  <palves@redhat.com>
11082
11083         * c-exp.y (variable production): Skip finding an alias for ifunc
11084         symbols.
11085
11086 2018-04-26  Pedro Alves  <palves@redhat.com>
11087
11088         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11089
11090 2018-04-25  Pedro Alves  <palves@redhat.com>
11091
11092         * infcmd.c (kill_command): Print the pid as string, not the whole
11093         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11094         message.
11095         * remote.c (remote_detach_1): Print the pid as string, not the
11096         whole thread's ptid.
11097
11098 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11099             Sergio Durigan Junior  <sergiodj@redhat.com>
11100             Pedro Alves  <palves@redhat.com>
11101
11102         * infcmd.c (kill_command): Print message when inferior has
11103         been killed.
11104         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11105         '1'.
11106         (add_inferior): Improve message printed when
11107         'print_inferior_events' is on.
11108         (exit_inferior): Remove message printed when
11109         'print_inferior_events' is on.
11110         (detach_inferior): Improve message printed when
11111         'print_inferior_events' is on.
11112         (initialize_inferiors): Use 'add_inferior_silent' to set
11113         'current_inferior_'.
11114         * inferior.h (print_inferior_events): Declare here as
11115         'extern'.
11116         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11117         '[Detaching...]' messages when 'print_inferior_events' is on.
11118         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11119         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11120         'Detaching after fork from child...', replace it by '... from
11121         parent...'.
11122         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11123         prefix/suffix when printing 'Detaching...' messages.  Print
11124         them when 'print_inferior_events' is on.
11125         * remote.c (remote_detach_1): Print message when detaching
11126         from inferior and '!is_fork_parent'.
11127
11128 2018-04-24  Tom Tromey  <tom@tromey.com>
11129
11130         * cli-out.h: Reindent.
11131
11132 2018-04-24  Tom Tromey  <tom@tromey.com>
11133
11134         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11135         (cli_ui_out::do_field_string): Use fputs_filtered.
11136         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11137
11138 2018-04-23  Tom Tromey  <tom@tromey.com>
11139
11140         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11141         gdb::unique_xmalloc_ptr.
11142
11143 2018-04-23  Tom Tromey  <tom@tromey.com>
11144
11145         * configure: Rebuild.
11146
11147 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11148
11149         PR gdb/23095
11150         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11151         prepare_for_testing.  Set normal_bp to r_debug_state if target
11152         is bsd.
11153
11154 2018-04-21  Pedro Alves  <palves@redhat.com>
11155             Rajendra SY  <rajendra.sy@gmail.com>
11156
11157         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11158         * remote.c (extended_remote_attach): In all-stop mode, mark the
11159         thread as executing.
11160
11161 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11162
11163         * thread.c (thread_apply_all_command): Fix comment.
11164         (thread_command): Fix comment.
11165
11166 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11167
11168         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11169         parameter.
11170         * features/aarch64-core.c (create_feature_aarch64_core):
11171         Regenerate.
11172         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11173         Likewise.
11174         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11175         Likewise.
11176         * features/i386/32bit-avx512.c
11177         (create_feature_i386_32bit_avx512): Likewise.
11178         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11179         Likewise.
11180         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11181         Likewise.
11182         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11183         Likewise.
11184         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11185         Likewise.
11186         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11187         Likewise.
11188         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11189         Likewise.
11190         * features/i386/64bit-avx512.c
11191         (create_feature_i386_64bit_avx512): Likewise.
11192         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11193         Likewise.
11194         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11195         Likewise.
11196         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11197         Likewise.
11198         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11199         Likewise.
11200         * features/i386/64bit-segments.c
11201         (create_feature_i386_64bit_segments): Likewise.
11202         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11203         Likewise.
11204         * features/i386/x32-core.c
11205         (create_feature_i386_x32_core): Likewise.
11206         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11207         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11208         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11209         * target-descriptions.c: In generated code, don't pass xml
11210         filename.
11211
11212 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11213
11214         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11215         (print_xml_feature::visit_post): Likewise.
11216         (print_xml_feature::visit): Likewise.
11217         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11218         (print_xml_feature): Add new class.
11219         * regformats/regdat.sh: Null xmltarget on feature targets.
11220         * target-descriptions.c (struct target_desc): Add xmltarget.
11221         (maintenance_check_tdesc_xml_convert): Add unittest function.
11222         (tdesc_get_features_xml): Add function to get xml.
11223         (maintenance_check_xml_descriptions): Test xml generation.
11224         * xml-tdesc.c (string_read_description_xml): Add function.
11225         * xml-tdesc.h (string_read_description_xml): Add declaration.
11226
11227 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11228
11229         * features/Makefile: Add feature marker to targets with new style
11230         target descriptions.
11231         * regformats/aarch64.dat: Regenerate.
11232         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11233         * regformats/i386/amd64-avx-linux.dat: Likewise.
11234         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11235         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11236         * regformats/i386/amd64-linux.dat: Likewise.
11237         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11238         * regformats/i386/amd64.dat: Likewise.
11239         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11240         * regformats/i386/i386-avx-linux.dat: Likewise.
11241         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11242         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11243         * regformats/i386/i386-linux.dat: Likewise.
11244         * regformats/i386/i386-mmx-linux.dat: Likewise.
11245         * regformats/i386/i386-mpx-linux.dat: Likewise.
11246         * regformats/i386/i386.dat: Likewise.
11247         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11248         * regformats/i386/x32-avx-linux.dat: Likewise.
11249         * regformats/i386/x32-linux.dat: Likewise.
11250         * regformats/tic6x-c62x-linux.dat: Likewise.
11251         * regformats/tic6x-c64x-linux.dat: Likewise.
11252         * regformats/tic6x-c64xp-linux.dat: Likewise.
11253         * regformats/regdat.sh: Parse feature marker.
11254
11255 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11256
11257         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11258         (tdesc_osabi_name): Likewise.
11259         * target-descriptions.c (tdesc_architecture_name): Add new
11260         function.
11261         (tdesc_osabi_name): Likewise.
11262
11263 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11264
11265         * common/tdesc.c (tdesc_predefined_type): Move to here.
11266         (tdesc_named_type): Likewise.
11267         (tdesc_create_vector): Likewise.
11268         (tdesc_create_struct): Likewise.
11269         (tdesc_set_struct_size): Likewise.
11270         (tdesc_create_union): Likewise.
11271         (tdesc_create_flags): Likewise.
11272         (tdesc_create_enum): Likewise.
11273         (tdesc_add_field): Likewise.
11274         (tdesc_add_typed_bitfield): Likewise.
11275         (tdesc_add_bitfield): Likewise.
11276         (tdesc_add_flag): Likewise.
11277         (tdesc_add_enum_value): Likewise.
11278         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11279         (struct tdesc_type_vector): Likewise.
11280         (struct tdesc_type_field): Likewise.
11281         (struct tdesc_type_with_fields): Likewise.
11282         (tdesc_create_enum): Add declaration.
11283         (tdesc_add_typed_bitfield): Likewise.
11284         (tdesc_add_enum_value): Likewise.
11285         * target-descriptions.c (tdesc_type_field): Move from here.
11286         (tdesc_type_builtin): Likewise.
11287         (tdesc_type_vector): Likewise.
11288         (tdesc_type_with_fields): Likewise.
11289         (tdesc_predefined_types): Likewise.
11290         (tdesc_named_type): Likewise.
11291         (tdesc_create_vector): Likewise.
11292         (tdesc_create_struct): Likewise.
11293         (tdesc_set_struct_size): Likewise.
11294         (tdesc_create_union): Likewise.
11295         (tdesc_create_flags): Likewise.
11296         (tdesc_create_enum): Likewise.
11297         (tdesc_add_field): Likewise.
11298         (tdesc_add_typed_bitfield): Likewise.
11299         (tdesc_add_bitfield): Likewise.
11300         (tdesc_add_flag): Likewise.
11301         (tdesc_add_enum_value): Likewise.
11302         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11303         (tdesc_add_typed_bitfield): Likewise.
11304         (tdesc_add_enum_value): Likewise.
11305
11306 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11307
11308         * common/tdesc.c (tdesc_feature::accept): Move to here.
11309         (tdesc_feature::operator==): Likewise.
11310         (tdesc_create_reg): Likewise.
11311         * common/tdesc.h (tdesc_type_kind): Likewise.
11312         (struct tdesc_type): Likewise.
11313         (struct tdesc_feature): Likewise.
11314         * regformats/regdat.sh: Create a feature.
11315         * target-descriptions.c (tdesc_type_kind): Move from here.
11316         (tdesc_type): Likewise.
11317         (tdesc_type_up): Likewise.
11318         (tdesc_feature): Likewise.
11319         (tdesc_create_reg): Likewise.
11320
11321 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11322
11323         * Makefile.in: Add arch/tdesc.c
11324         * common/tdesc.c: New file.
11325         * common/tdesc.h (tdesc_element_visitor): Move to here.
11326         (tdesc_element): Likewise.
11327         (tdesc_reg): Likewise.
11328         (tdesc_reg_up): Likewise.
11329         * regformats/regdef.h (reg): Add offset to constructors.
11330         * target-descriptions.c (tdesc_element_visitor): Move from here.
11331         (tdesc_element): Likewise.
11332         (tdesc_reg): Likewise.
11333         (tdesc_reg_up): Likewise.
11334
11335 2018-04-17  Tom Tromey  <tom@tromey.com>
11336
11337         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11338         discriminant field.
11339
11340 2018-04-17  Tom Tromey  <tom@tromey.com>
11341
11342         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11343
11344 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11345
11346         * symtab.c (print_symbol_info): Skip printing filename and line
11347         number when `last' is NULL.
11348         (symtab_symbol_info): Use empty string instead of NULL for first
11349         invocation of print_symbol_info.
11350         (rbreak_command): Pass NULL to `last' parameter of
11351         print_symbol_info.
11352
11353 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11354
11355         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11356         instead of nullptr.
11357
11358 2018-04-16  Pedro Alves  <palves@redhat.com>
11359
11360         * MAINTAINERS (sh): Remove.
11361         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11362         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11363         (ALLDEPFILES): Remove sh64-tdep.c.
11364         * NEWS: Mentions that support for SH-5/SH64 is removed.
11365         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11366         (sh*-*-openbsd*): Ditto.
11367         (sh64-*-elf*): Remove.
11368         (sh*): Remove.
11369         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11370         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11371         * sh-tdep.c: No longer include "sh64-tdep.h".
11372         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11373         * sh64-tdep.c, sh64-tdep.h: Remove files.
11374
11375 2018-04-16  Pedro Alves  <palves@redhat.com>
11376
11377         * MAINTAINERS: Remove m88k.
11378         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11379         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11380         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11381         * NEWS: Mention that support for m88k was removed.
11382         * configure.host (m88*-*-*): Remove support.
11383         * configure.nat (m88k-*-*): Remove support.
11384         * configure.tgt (m88*-*-openbsd*): Remove.
11385         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11386
11387 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11388
11389         * configure.tgt (x86_tobjs): New variable.
11390         (amd64_tobjs, i386_tobjs): Use it.
11391
11392 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11393
11394         * symtab.c (print_symbol_info): Precede the symbol definition by
11395         the line number when available.
11396         * NEWS: Advertise this enhancement.
11397
11398 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11399
11400         * NEWS (New options): announce set/show record btrace cpu.
11401         * btrace.c: Include record-btrace.h.
11402         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11403         the vendor is unknown.
11404         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11405         Maybe overwrite the btrace configuration's cpu.
11406         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11407         (btrace_fetch): Add cpu parameter.  Update callers.
11408         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11409         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11410         errata workarounds if the vendor is unknown.
11411         * python/py-record-btrace.c: Include record-btrace.h.
11412         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11413         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11414         * record-btrace.c (record_btrace_cpu_state_kind): New.
11415         (record_btrace_cpu): New.
11416         (set_record_btrace_cpu_cmdlist): New.
11417         (record_btrace_get_cpu): New.
11418         (require_btrace_thread, record_btrace_info)
11419         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11420         (cmd_set_record_btrace_cpu_none): New.
11421         (cmd_set_record_btrace_cpu_auto): New.
11422         (cmd_set_record_btrace_cpu): New.
11423         (cmd_show_record_btrace_cpu): New.
11424         (_initialize_record_btrace): Initialize set/show record btrace cpu
11425         commands.
11426         * record-btrace.h (record_btrace_get_cpu): New.
11427
11428 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11429
11430         * record.c (set_record_command): Fix typo in message.
11431
11432 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11433
11434         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11435
11436 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11437
11438         * infrun.c (process_event_stop_test): Call
11439         gdbarch_in_indirect_branch_thunk.
11440         * gdbarch.sh (in_indirect_branch_thunk): New.
11441         * gdbarch.c: Regenerated.
11442         * gdbarch.h: Regenerated.
11443         * x86-tdep.h: New.
11444         * x86-tdep.c: New.
11445         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11446         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11447         (ALLDEPFILES): Add x86-tdep.c.
11448         * arch-utils.h (default_in_indirect_branch_thunk): New.
11449         * arch-utils.c (default_in_indirect_branch_thunk): New.
11450         * i386-tdep: Include x86-tdep.h.
11451         (i386_in_indirect_branch_thunk): New.
11452         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11453         function.
11454         * amd64-tdep: Include x86-tdep.h.
11455         (amd64_in_indirect_branch_thunk): New.
11456         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11457
11458 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11459
11460         PR gdb/23053
11461         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11462         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11463         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11464         regression.
11465
11466 2018-04-12  Tom Tromey  <tom@tromey.com>
11467
11468         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11469         (rust_evaluate_subexp): Likewise.
11470
11471 2018-04-12  Pedro Alves  <palves@redhat.com>
11472
11473         * procfs.c (procfs_detach): Make forward declaration's prototype
11474         match definition's protototype.
11475         (proc_get_LDT_entry): Remove stale do_cleanups call.
11476
11477 2018-04-12  Pedro Alves  <palves@redhat.com>
11478
11479         * target.h (target_ops::to_has_exited): Delete.
11480         (target_has_exited): Delete.
11481         * target-delegates.c: Regenerate.
11482
11483 2018-04-11  Pedro Alves  <palves@redhat.com>
11484
11485         * target.c (fileio_fh_t::t): Add comment.
11486         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11487         (target_fileio_close): Handle a NULL target.
11488         (invalidate_fileio_fh): New.
11489         (target_close): Call it.
11490         * remote.c (remote_hostio_send_command): No longer check whether
11491         remote_desc is open.
11492
11493 2018-04-11  Pedro Alves  <palves@redhat.com>
11494
11495         * target.c (fileio_fh_t): Make it a named struct instead of a
11496         typedef.
11497         (fileio_fh_t::is_closed): New method.
11498         (DEF_VEC_O (fileio_fh_t)): Remove.
11499         (fileio_fhandles): Now a std::vector.
11500         (is_closed_fileio_fh): Delete.
11501         (acquire_fileio_fd): Adjust.  Rename parameters.
11502         (release_fileio_fd): Adjust.
11503         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11504         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11505         (target_fileio_close): Adjust.
11506
11507 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11508
11509         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11510         index.
11511
11512 2018-04-10  Pedro Alves  <palves@redhat.com>
11513
11514         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11515         (scoped_finish_thread_state): New class.
11516         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11517         cleanup.
11518         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11519         (fetch_inferior_event, normal_stop): Likewise.
11520         * thread.c (finish_thread_state_cleanup): Delete.
11521
11522 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11523             Pedro Alves  <palves@redhat.com>
11524
11525         * value.c: Include "selftest.h" and "common/array-view.h".
11526         (struct range) <operator ==>: New.
11527         (test_ranges_contain): New.
11528         (check_ranges_vector): New.
11529         (test_insert_into_bit_range_vector): New.
11530         (_initialize_values): Register selftests.
11531         * common/array-view.h (operator==, operator!=): New.
11532
11533 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11534
11535         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11536         an iterator.
11537         * inline-frame.c: Include <algorithm>.
11538         (struct inline_state): Add constructor.
11539         (inline_state_s): Remove.
11540         (DEF_VEC_O(inline_state_s)): Remove.
11541         (inline_states): Change type to std::vector.
11542         (find_inline_frame_state): Adjust to std::vector.
11543         (allocate_inline_frame_state): Remove.
11544         (clear_inline_frame_state): Adjust to std::vector.
11545         (skip_inline_frames): Adjust to std::vector.
11546
11547 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11548
11549         * tracepoint.h (struct trace_state_variable): Add constructor.
11550         <name>: Change type to std::string.
11551         * tracepoint.c (tsv_s): Remove.
11552         (DEF_VEC_O(tsv_s)): Remove.
11553         (tvariables): Change to std::vector.
11554         (create_trace_state_variable): Adjust to std::vector.
11555         (find_trace_state_variable): Likewise.
11556         (find_trace_state_variable_by_number): Likewise.
11557         (delete_trace_state_variable): Likewise.
11558         (trace_variable_command): Adjust to std::string.
11559         (delete_trace_variable_command): Likewise.
11560         (tvariables_info_1): Adjust to std::vector.
11561         (save_trace_state_variables): Likewise.
11562         (start_tracing): Likewise.
11563         (merge_uploaded_trace_state_variables): Adjust to std::vector
11564         and std::string.
11565         * target.h (struct target_ops)
11566         <to_download_trace_state_variable>: Pass reference to
11567         trace_state_variable.
11568         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11569         * target-delegates.c: Re-generate.
11570         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11571         (mi_tsv_deleted): Likewise.
11572         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11573         * remote.c (remote_download_trace_state_variable): Change
11574         pointer to reference and adjust.
11575         * make-target-delegates (parse_argtypes): Handle references.
11576         (write_function_header): Likewise.
11577         (munge_type): Likewise.
11578
11579 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11580
11581         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11582         string_view-selftests.c.
11583         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11584         testsuite.
11585         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11586         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11587         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11588         * unittests/basic_string_view/element_access/char/1.cc:
11589         Likewise.
11590         * unittests/basic_string_view/element_access/char/empty.cc:
11591         Likewise.
11592         * unittests/basic_string_view/element_access/char/front_back.cc:
11593         Likewise.
11594         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11595         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11596         Likewise.
11597         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11598         Likewise.
11599         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11600         Likewise.
11601         * unittests/basic_string_view/operations/compare/char/1.cc:
11602         Likewise.
11603         * unittests/basic_string_view/operations/compare/char/13650.cc:
11604         Likewise.
11605         * unittests/basic_string_view/operations/copy/char/1.cc:
11606         Likewise.
11607         * unittests/basic_string_view/operations/data/char/1.cc:
11608         Likewise.
11609         * unittests/basic_string_view/operations/find/char/1.cc:
11610         Likewise.
11611         * unittests/basic_string_view/operations/find/char/2.cc:
11612         Likewise.
11613         * unittests/basic_string_view/operations/find/char/3.cc:
11614         Likewise.
11615         * unittests/basic_string_view/operations/find/char/4.cc:
11616         Likewise.
11617         * unittests/basic_string_view/operations/rfind/char/1.cc:
11618         Likewise.
11619         * unittests/basic_string_view/operations/rfind/char/2.cc:
11620         Likewise.
11621         * unittests/basic_string_view/operations/rfind/char/3.cc:
11622         Likewise.
11623         * unittests/basic_string_view/operations/substr/char/1.cc:
11624         Likewise.
11625         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11626         * unittests/string_view-selftests.c: New file.
11627
11628 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11629
11630         * unittests/basic_string_view/capacity/1.cc: New file.
11631         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11632         * unittests/basic_string_view/cons/char/1.cc: New file.
11633         * unittests/basic_string_view/cons/char/2.cc: New file.
11634         * unittests/basic_string_view/cons/char/3.cc: New file.
11635         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11636         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11637         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11638         * unittests/basic_string_view/element_access/char/1.cc: New file.
11639         * unittests/basic_string_view/element_access/char/2.cc: New file.
11640         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11641         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11642         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11643         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11644         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11645         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11646         * unittests/basic_string_view/include.cc: New file.
11647         * unittests/basic_string_view/inserters/char/1.cc: New file.
11648         * unittests/basic_string_view/inserters/char/2.cc: New file.
11649         * unittests/basic_string_view/inserters/char/3.cc: New file.
11650         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11651         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11652         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11653         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11654         * unittests/basic_string_view/literals/types.cc: New file.
11655         * unittests/basic_string_view/literals/values.cc: New file.
11656         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11657         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11658         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11659         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11660         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11661         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11662         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11663         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11664         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11665         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11666         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11667         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11668         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11669         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11670         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11671         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11672         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11673         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11674         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11675         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11676         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11677         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11678         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11679         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11680         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11681         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11682         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11683         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11684         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11685         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11686         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11687         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11688         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11689         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11690         * unittests/basic_string_view/operators/char/2.cc: New file.
11691         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11692         * unittests/basic_string_view/range_access/char/1.cc: New file.
11693         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11694         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11695         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11696         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11697         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11698         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11699         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11700         * unittests/basic_string_view/typedefs.cc: New file.
11701         * unittests/basic_string_view/types/1.cc: New file.
11702
11703 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11704
11705         * common/gdb_string_view.h: Remove libstdc++ implementation
11706         details, adjust to gdb reality.
11707         * common/gdb_string_view.tcc: Likewise.
11708         * cli/cli-script.c (struct string_view): Remove.
11709         (user_args) <m_args>: Change element type to gdb::string_view.
11710         (user_args::insert_args): Adjust.
11711
11712 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11713
11714         * common/gdb_string_view.h: New file.
11715         * common/gdb_string_view.tcc: New file.
11716
11717 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11718
11719         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11720         * configure: Re-generate.
11721
11722 2018-04-09  Pedro Alves  <palves@redhat.com>
11723
11724         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11725         (set_target_gdbarch): Call
11726         gdb::observers::architecture_changed.notify instead of
11727         observer_notify_architecture_changed.
11728
11729 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11730
11731         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11732         (do_restore_current_traceframe_cleanup): Remove.
11733         (restore_current_traceframe_cleanup_dtor): Remove.
11734         (make_cleanup_restore_current_traceframe): Remove.
11735         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11736         New.
11737         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11738         * infrun.c (fetch_inferior_event): Use
11739         scoped_restore_current_traceframe.
11740
11741 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11742
11743         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11744         Remove.
11745         <n_allocated_type_units>: Remove.
11746         <all_type_units>: Change to std::vector.
11747         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11748         to std::vector change.
11749         (dwarf2_per_objfile::get_cutu): Likewise.
11750         (dwarf2_per_objfile::get_tu): Likewise.
11751         (create_signatured_type_table_from_index): Likewise.
11752         (create_signatured_type_table_from_debug_names): Likewise.
11753         (dw2_symtab_iter_next): Likewise.
11754         (dw2_print_stats): Likewise.
11755         (dw2_expand_all_symtabs): Likewise.
11756         (dw2_expand_marked_cus): Likewise.
11757         (dw2_debug_names_iterator::next): Likewise.
11758         (dwarf2_initialize_objfile): Likewise.
11759         (add_signatured_type_cu_to_table): Likewise.
11760         (create_all_type_units): Likewise.
11761         (add_type_unit): Likewise.
11762         (struct tu_abbrev_offset): Add constructor.
11763         (build_type_psymtabs_1): Adjust to std::vector change.
11764         (print_tu_stats): Likewise.
11765         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11766         (write_debug_names): Likewise.
11767
11768 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11769
11770         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11771         Make an std::vector.
11772         <n_comp_units>: Remove.
11773         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11774         to std::vector change.
11775         (dwarf2_per_objfile::get_cutu): Likewise.
11776         (dwarf2_per_objfile::get_cu): Likewise.
11777         (create_cus_from_index): Likewise.
11778         (create_addrmap_from_index): Likewise.
11779         (create_addrmap_from_aranges): Likewise.
11780         (dwarf2_read_index): Likewise.
11781         (dw2_find_last_source_symtab): Likewise.
11782         (dw2_map_symtabs_matching_filename): Likewise.
11783         (dw2_symtab_iter_next): Likewise.
11784         (dw2_print_stats): Likewise.
11785         (dw2_expand_all_symtabs): Likewise.
11786         (dw2_expand_symtabs_with_fullname): Likewise.
11787         (dw2_expand_marked_cus): Likewise.
11788         (dw2_map_symbol_filenames): Likewise.
11789         (create_cus_from_debug_names): Likewise.
11790         (dwarf2_read_debug_names): Likewise.
11791         (dw2_debug_names_iterator::next): Likewise.
11792         (dwarf2_initialize_objfile): Likewise.
11793         (set_partial_user): Likewise.
11794         (dwarf2_build_psymtabs_hard): Likewise.
11795         (read_comp_units_from_section): Remove arguments, adjust to
11796         std::vector change.
11797         (create_all_comp_units): Adjust to std::vector and
11798         read_comp_units_from_section changes.
11799         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11800         change.
11801         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11802         (psyms_seen_size): Likewise.
11803         (write_gdbindex): Likewise.
11804         (write_debug_names): Likewise.
11805
11806 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11807
11808         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11809         with dwarf2_per_objfile.
11810         (create_cus_from_index): Likewise.
11811         (create_signatured_type_table_from_index): Likewise.
11812         (dwarf2_read_index): Likewise.
11813         (dwarf2_initialize_objfile): Likewise.
11814         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11815         per_cu rather than get_dwarf2_per_objfile.
11816
11817 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11818
11819         * dwarf2read.h (struct signatured_type): Forward declare.
11820         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11821         New methods.
11822         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11823         (dw2_get_cutu): ...this.
11824         (dwarf2_per_objfile::get_cu): Rename from...
11825         (dw2_get_cu): ...this.
11826         (dwarf2_per_objfile::get_tu): New.
11827         (create_addrmap_from_index): Adjust.
11828         (create_addrmap_from_aranges): Adjust.
11829         (dw2_find_last_source_symtab): Adjust.
11830         (dw2_map_symtabs_matching_filename): Adjust.
11831         (dw2_symtab_iter_next): Adjust.
11832         (dw2_print_stats): Adjust.
11833         (dw2_expand_all_symtabs): Adjust.
11834         (dw2_expand_symtabs_with_fullname): Adjust.
11835         (dw2_expand_marked_cus): Adjust.
11836         (dw_expand_symtabs_matching_file_matcher): Adjust.
11837         (dw2_map_symbol_filenames): Adjust.
11838         (dw2_debug_names_iterator::next): Adjust.
11839         (dwarf2_initialize_objfile): Adjust.
11840         (set_partial_user): Adjust.
11841         (dwarf2_build_psymtabs_hard): Adjust.
11842
11843 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11844
11845         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11846         Remove unused variables.
11847         (dw2_map_symtabs_matching_filename): Likewise.
11848         (dwarf2_record_block_ranges): Likewise.
11849         (dwarf2_read_addr_index): Likewise.
11850         (follow_die_offset): Likewise.
11851
11852 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11853
11854         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11855         to symbol_file_add_main.
11856
11857 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11858
11859         PR mi/22299
11860         * mi/mi-console.c (do_fputc_async_safe): New.
11861         (mi_console_file::write_async_safe): New.
11862         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11863         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11864         New.
11865         * ui-file.c (ui_file::putstrn): Adjust call to
11866         fputstrn_unfiltered.
11867         * utils.c (printchar): Replace do_fputs and do_fprintf
11868         parameters by do_fputc.
11869         (fputstr_filtered): Adjust call to printchar.
11870         (fputstr_unfiltered): Likewise.
11871         (fputstrn_filtered): Likewise.
11872         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11873         printchar.
11874         * utils.h (do_fputc_ftype): New typedef.
11875         (fputstrn_unfiltered): Add do_fputc parameter.
11876
11877 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11878
11879         * regformats/i386/i386-avx.dat: Remove.
11880
11881 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11882
11883         PR gdb/22979
11884         * amd64-tdep.c (amd64_none_init_abi): New function.
11885         (amd64_x32_none_init_abi): New function.
11886         (_initialize_amd64_tdep): Register handlers for x86-64 and
11887         x64_32 with GDB_OSABI_NONE.
11888         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11889         GDB_OSABI_NONE osabi.
11890
11891 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11892
11893         PR gdb/22980
11894         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11895         GDB_OSABI_NONE.
11896         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11897         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11898
11899 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11900
11901         * common/byte-vector.h (char_vector): New type.
11902         * target.h (target_read_alloc): Return
11903         gdb::optional<byte_vector>.
11904         (target_read_stralloc): Return gdb::optional<char_vector>.
11905         (target_get_osdata): Return gdb::optional<char_vector>.
11906         * target.c (target_read_alloc_1): Templatize.  Replacement
11907         manual memory management with vector.
11908         (target_read_alloc): Change return type, adjust.
11909         (target_read_stralloc): Change return type, adjust.
11910         (target_get_osdata): Change return type, adjust.
11911         * auxv.c (struct auxv_info) <length>: Remove.
11912         <data>: Change type to gdb::optional<byte_vector>.
11913         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11914         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11915         (target_auxv_search): Adjust.
11916         (fprint_target_auxv): Adjust.
11917         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11918         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11919         (linux_make_corefile_notes): Adjust.
11920         * osdata.c (get_osdata): Adjust.
11921         * remote.c (remote_get_threads_with_qxfer): Adjust.
11922         (remote_memory_map): Adjust.
11923         (remote_traceframe_info): Adjust.
11924         (btrace_read_config): Adjust.
11925         (remote_read_btrace): Adjust.
11926         (remote_pid_to_exec_file): Adjust.
11927         * solib-aix.c (solib_aix_get_library_list): Adjust.
11928         * solib-dsbt.c (decode_loadmap): Don't free buf.
11929         (dsbt_get_initial_loadmaps): Adjust.
11930         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11931         * solib-target.c (solib_target_current_sos): Adjust.
11932         * tracepoint.c (sdata_make_value): Adjust.
11933         * xml-support.c (xinclude_start_include): Adjust.
11934         (xml_fetch_content_from_file): Adjust.
11935         * xml-support.h (xml_fetch_another): Change return type.
11936         (xml_fetch_content_from_file): Change return type.
11937         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11938         * xml-tdesc.c (file_read_description_xml): Adjust.
11939         (fetch_available_features_from_target): Change return type.
11940         (target_fetch_description_xml): Adjust.
11941         (target_read_description_xml): Adjust.
11942
11943 2018-04-06  Tom Tromey  <tom@tromey.com>
11944
11945         * value.c (~value): Update.
11946         (struct value) <contents>: Now unique_xmalloc_ptr.
11947         (value_contents_bits_eq, allocate_value_contents)
11948         (value_contents_raw, value_contents_all_raw)
11949         (value_contents_for_printing, value_contents_for_printing_const)
11950         (set_value_enclosing_type): Update.
11951
11952 2018-04-06  Tom Tromey  <tom@tromey.com>
11953
11954         * value.c (range_s): Remove typedef, VEC.
11955         (struct range): Add operator<.
11956         (range_lessthan): Remove.
11957         (ranges_contain): Change type.
11958         (~value): Update.
11959         (struct value) <unavailable, optimized_out>: Now std::vector.
11960         (value_entirely_available)
11961         (value_entirely_covered_by_range_vector)
11962         (value_entirely_unavailable, value_entirely_optimized_out):
11963         Update.
11964         (insert_into_bit_range_vector): Change argument type.
11965         (find_first_range_overlap): Likewise.
11966         (struct ranges_and_idx, value_contents_bits_eq)
11967         (require_not_optimized_out, require_available): Update.
11968         (ranges_copy_adjusted): Change argument types.
11969         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11970
11971 2018-04-06  Tom Tromey  <tom@tromey.com>
11972
11973         * value.c (~value): Update.
11974         (struct value) <parent>: Now a value_ref_ptr.
11975         (value_parent, set_value_parent, value_address, value_copy):
11976         Update.
11977
11978 2018-04-06  Tom Tromey  <tom@tromey.com>
11979
11980         * value.c (struct value): Add constructor, destructor, and member
11981         initializers.
11982         (allocate_value_lazy, value_decref): Update.
11983
11984 2018-04-06  Tom Tromey  <tom@tromey.com>
11985
11986         * value.c (struct value) <released, next>: Remove.
11987         (all_values): Now a std::vector.
11988         (allocate_value_lazy): Update.
11989         (value_next): Remove.
11990         (value_mark, value_free_to_mark, release_value)
11991         (value_release_to_mark): Update.
11992
11993 2018-04-06  Tom Tromey  <tom@tromey.com>
11994
11995         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11996         (free_value_chain): Remove.
11997         * value.c (free_value_chain): Remove.
11998         (value_release_to_mark): Return a std::vector.
11999         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12000         std::vector.
12001         (check_condition): Update.
12002         * eval.c (fetch_subexp_value): Change "val_chain" to a
12003         std::vector.
12004         * breakpoint.c (update_watchpoint): Update.
12005         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12006
12007 2018-04-06  Tom Tromey  <tom@tromey.com>
12008
12009         * value.h (free_all_values): Remove.
12010         * value.c (free_all_values): Remove.
12011
12012 2018-04-06  Tom Tromey  <tom@tromey.com>
12013
12014         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12015         (value_history_chain, value_history_count): Remove.
12016         (value_history): New global.
12017         (record_latest_value, access_value_history, show_values)
12018         (preserve_values): Update.
12019
12020 2018-04-06  Tom Tromey  <tom@tromey.com>
12021
12022         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12023         * varobj.c (varobj_set_display_format, varobj_set_value)
12024         (install_default_visualizer, construct_visualizer)
12025         (install_new_value, ~varobj, varobj_get_value_type)
12026         (my_value_of_variable, varobj_editable_p): Update.
12027         * c-varobj.c (c_describe_child, c_value_of_variable)
12028         (cplus_number_of_children, cplus_describe_child): Update.
12029         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12030         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12031         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12032
12033 2018-04-06  Tom Tromey  <tom@tromey.com>
12034
12035         * printcmd.c (last_examine_address): Change type to
12036         value_ref_ptr.
12037         (do_examine, x_command): Update.
12038
12039 2018-04-06  Tom Tromey  <tom@tromey.com>
12040
12041         * value.c (release_value): Update.
12042         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12043         (struct bpstats) <val>: Now a value_ref_ptr.
12044         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12045         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12046         (~watchpoint, print_it_watchpoint, watch_command_1)
12047         (invalidate_bp_value_on_memory_change): Update.
12048
12049 2018-04-06  Tom Tromey  <tom@tromey.com>
12050
12051         * varobj.c (varobj_clear_saved_item)
12052         (update_dynamic_varobj_children, install_new_value, ~varobj):
12053         Update.
12054         * value.h (value_incref): Move declaration earlier.
12055         (value_decref): Rename from value_free.
12056         (struct value_ref_policy): New.
12057         (value_ref_ptr): New typedef.
12058         (struct value_deleter): Remove.
12059         (gdb_value_up): Remove typedef.
12060         (release_value): Change return type.
12061         (release_value_or_incref): Remove.
12062         * value.c (set_value_parent): Update.
12063         (value_incref): Change return type.
12064         (value_decref): Rename from value_free.
12065         (value_free_to_mark, free_all_values, free_value_chain): Update.
12066         (release_value): Return value_ref_ptr.
12067         (release_value_or_incref): Remove.
12068         (record_latest_value, set_internalvar, clear_internalvar):
12069         Update.
12070         * stack.c (info_frame_command): Don't call value_free.
12071         * python/py-value.c (valpy_dealloc, valpy_new)
12072         (value_to_value_object): Update.
12073         * printcmd.c (do_examine): Update.
12074         * opencl-lang.c (lval_func_free_closure): Update.
12075         * mi/mi-main.c (register_changed_p): Don't call value_free.
12076         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12077         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12078         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12079         value_free.
12080         * guile/scm-value.c (vlscm_free_value_smob)
12081         (vlscm_scm_from_value): Update.
12082         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12083         (frame_unwind_register_unsigned, get_frame_register_bytes)
12084         (put_frame_register_bytes): Don't call value_free.
12085         * findvar.c (address_from_register): Don't call value_free.
12086         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12087         * dwarf2loc.c (entry_data_value_free_closure)
12088         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12089         (dwarf2_evaluate_loc_desc_full): Update.
12090         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12091         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12092         (~watchpoint, watch_command_1)
12093         (invalidate_bp_value_on_memory_change): Update.
12094         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12095
12096 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12097
12098         PR gdb/23022
12099         * warning.m4: Add -Wno-error=deprecated-register.
12100         * configure: Re-generate.
12101
12102 2018-04-05  Tom Tromey  <tom@tromey.com>
12103
12104         * linespec.h: Remove include of "vec.h".
12105
12106 2018-04-05  Tom Tromey  <tom@tromey.com>
12107
12108         * linespec.c (typep): Remove typedef.
12109         (find_methods, find_superclass_methods): Take a std::vector.
12110         (find_method): Use std::vector.
12111
12112 2018-04-05  Tom Tromey  <tom@tromey.com>
12113
12114         * utils.c (compare_strings): Remove.
12115         * utils.h (compare_strings): Remove.
12116         * objc-lang.h (find_imps): Update.
12117         * objc-lang.c (find_methods): Take a std::vector.
12118         (uniquify_strings, find_imps): Likewise.
12119         * linespec.c (find_methods): Take a std::vector.
12120         (decode_objc): Use std::vector.
12121         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12122         a std::vector.
12123         (find_method, find_function_symbols): Use std::vector.
12124
12125 2018-04-05  Tom Tromey  <tom@tromey.com>
12126
12127         * completer.c (completion_tracker::completion_tracker): Remove
12128         cast.
12129         (completion_tracker::discard_completions): Likewise.
12130         * breakpoint.c (ambiguous_names_p): Remove cast.
12131         * ada-lang.c (_initialize_ada_language): Remove cast.
12132         * utils.h (streq): Update.
12133         (streq_hash): Add new declaration.
12134         * utils.c (streq): Return bool.
12135         (streq_hash): New function.
12136
12137 2018-04-05  Tom Tromey  <tom@tromey.com>
12138
12139         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12140         Remove a string copy.
12141
12142 2018-04-05  Tom Tromey  <tom@tromey.com>
12143
12144         * linespec.c (filter_results): Use std::vector.
12145         (decode_line_2, decode_line_full): Update.
12146
12147 2018-04-05  Tom Tromey  <tom@tromey.com>
12148
12149         * linespec.c (canonical_to_fullform): Return std::string.
12150         (filter_results): Update.
12151         (struct decode_line_2_item): Add constructor.
12152         <fullform, displayform>: Now std::string.
12153         (decode_line_2_compare_items): Now a std::sort comparator.
12154         (decode_line_2): Update.
12155
12156 2018-04-05  Tom Tromey  <tom@tromey.com>
12157
12158         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12159         (unexpected_linespec_error): Update.
12160         (linespec_parse_basic, parse_linespec): Update.
12161
12162 2018-04-05  Tom Tromey  <tom@tromey.com>
12163
12164         * linespec.c (linespec_parse_basic): Reindent.
12165
12166 2018-04-05  Tom Tromey  <tom@tromey.com>
12167
12168         * minsyms.h (iterate_over_minimal_symbols): Update.
12169         * minsyms.c (iterate_over_minimal_symbols): Take a
12170         gdb::function_view.
12171         * linespec.c (struct collect_minsyms): Remove.
12172         (compare_msyms): Now a std::sort comparator.
12173         (add_minsym): Add parameters.
12174         (search_minsyms_for_name): Update.  Use std::vector.
12175
12176 2018-04-03  Tom Tromey  <tom@tromey.com>
12177
12178         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12179         gdb::byte_vector.
12180
12181 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12182
12183         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12184
12185 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12186
12187         PR gdb/16959
12188         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12189         printing static type.
12190
12191 2018-04-01  Tom Tromey  <tom@tromey.com>
12192
12193         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12194         (rs6000_xfer_shared_libraries): Update.
12195
12196 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12197
12198         * common/gdb_vecs.h (char_ptr): Remove.
12199         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12200
12201 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12202
12203         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12204         with std::vector.
12205         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12206
12207 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12208
12209         * tracepoint.h (struct uploaded_tp): Initialize fields.
12210         <actions, step_actions, cmd_strings>: Change type to
12211         std::vector<char *>.
12212         * tracepoint.c (get_uploaded_tp): Allocate with new.
12213         (free_uploaded_tps): Free with delete.
12214         (parse_tracepoint_definition): Adjust to std::vector change.
12215         * breakpoint.c (read_uploaded_action): Likewise.
12216         (create_tracepoint_from_upload): Likewise.
12217         * ctf.c (ctf_write_uploaded_tp): Likewise.
12218         (SET_ARRAY_FIELD): Likewise.
12219         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12220
12221 2018-03-30  Tom Tromey  <tom@tromey.com>
12222
12223         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12224         std::unique_ptr.
12225         (svr4_keep_data_in_core): Update.
12226         (svr4_read_so_list): Update.
12227
12228 2018-03-30  Tom Tromey  <tom@tromey.com>
12229
12230         * windows-nat.c (handle_output_debug_string, handle_exception):
12231         Update.
12232         * target.h (target_read_string): Update.
12233         * target.c (target_read_string): Change "string" to
12234         unique_xmalloc_ptr.
12235         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12236         Update.
12237         * solib-frv.c (frv_current_sos): Update.
12238         * solib-dsbt.c (dsbt_current_sos): Update.
12239         * solib-darwin.c (darwin_current_sos): Update.
12240         * linux-thread-db.c (inferior_has_bug): Update.
12241         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12242         Update.  Remove alloca.
12243         * ada-lang.c (ada_main_name): Update.
12244
12245 2018-03-30  Tom Tromey  <tom@tromey.com>
12246
12247         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12248         (struct dwo_file_deleter): New.
12249         (dwo_file_up): New typedef.
12250         (open_and_init_dwo_file): Use dwo_file_up.
12251         (free_dwo_file_cleanup): Remove.
12252
12253 2018-03-30  Tom Tromey  <tom@tromey.com>
12254
12255         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12256         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12257
12258 2018-03-30  Tom Tromey  <tom@tromey.com>
12259
12260         * dwarf2read.c (class free_cached_comp_units): New class.
12261         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12262         (free_cached_comp_units): Remove function.
12263
12264 2018-03-30  Tom Tromey  <tom@tromey.com>
12265
12266         * utils.h (make_cleanup_unpush_target): Remove.
12267         * inf-ptrace.c (struct target_unpusher): New.
12268         (target_unpush_up) New typedef.
12269         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12270         target_unpush_up.
12271         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12272
12273 2018-03-27  Tom Tromey  <tom@tromey.com>
12274
12275         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12276
12277 2018-03-27  Pedro Alves  <palves@redhat.com>
12278             Tom Tromey  <tom@tromey.com>
12279
12280         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12281         destructor.  Now a class.
12282         (gdb_readline_wrapper_cleanup): Remove function.
12283         (gdb_readline_wrapper): Remove cleanups.
12284
12285 2018-03-27  Tom Tromey  <tom@tromey.com>
12286
12287         * typeprint.h (struct type_print_options) <local_typedefs,
12288         global_typedefs>: Remove "struct" keyword.
12289         (class typedef_hash_table): New class.
12290         (recursively_update_typedef_hash, add_template_parameters)
12291         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12292         (find_typedef_in_hash): Don't declare.
12293         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12294         (typedef_hash_table::recursively_update): Rename from
12295         recursively_update_typedef_hash.  Now a member.
12296         (typedef_hash_table::add_template_parameters): Rename from
12297         add_template_parameters.  Now a member.
12298         (typedef_hash_table::typedef_hash_table): Now a constructor;
12299         rename from create_typedef_hash.
12300         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12301         rename from free_typedef_hash.
12302         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12303         (do_free_global_table): Remove.
12304         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12305         from copy_type_recursive.
12306         (create_global_typedef_table): Remove.
12307         (typedef_hash_table::find_global_typedef): Now a member of
12308         typedef_hash_table.
12309         (typedef_hash_table::find_typedef): Rename from
12310         find_typedef_in_hash; now a member.
12311         (whatis_exp): Update.
12312         * extension.h (struct ext_lang_type_printers): Add constructor and
12313         destructor.
12314         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12315         declare.
12316         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12317         Now a constructor; rename from start_ext_lang_type_printers.
12318         (ext_lang_type_printers): Now a destructor; rename from
12319         free_ext_lang_type_printers.
12320         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12321         Update.
12322         (c_type_print_base_struct_union): Update.  Remove cleanups.
12323
12324 2018-03-27  Tom Tromey  <tom@tromey.com>
12325
12326         * dwarf-index-write.c: Include <cmath>.
12327
12328 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12329
12330         * NEWS: Add entry describing new "set|show varsize-limit" command.
12331         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12332         command.
12333         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12334         "set variable".
12335
12336 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12337
12338         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12339         dwarf-index-write.c
12340         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12341         * dwarf-index-common.c: New file.
12342         * dwarf-index-common.h: New file.
12343         * dwarf-index-write.c: New file.
12344         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12345         (struct dwarf2_section_info): Move from here.
12346         (dwarf2_section_info_def): Likewise.
12347         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12348         (offset_type): Likewise.
12349         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12350         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12351         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12352         (byte_swap): Likewise.
12353         (MAYBE_SWAP): Likewise.
12354         (dwarf2_per_cu_ptr): Likewise.
12355         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12356         (struct tu_stats): Likewise.
12357         (struct dwarf2_per_objfile): Likewise.
12358         (struct dwarf2_per_cu_data): Likewise.
12359         (struct signatured_type): Likewise.
12360         (sig_type_ptr): Likewise.
12361         (DEF_VEC_P (sig_type_ptr)): Likewise.
12362         (INDEX4_SUFFIX): Likewise.
12363         (INDEX5_SUFFIX): Likewise.
12364         (DEBUG_STR_SUFFIX): Likewise.
12365         (dwarf2_read_section): Make non-static.
12366         (mapped_index_string_hash): Move from here.
12367         (dwarf5_djb_hash): Likewise.
12368         (file_write): Likewise.
12369         (class data_buf): Likewise.
12370         (struct symtab_index_entry): Likewise.
12371         (struct mapped_symtab): Likewise.
12372         (find_slot): Likewise.
12373         (hash_expand): Likewise.
12374         (add_index_entry): Likewise.
12375         (uniquify_cu_indices): Likewise.
12376         (class c_str_view): Likewise.
12377         (class c_str_view_hasher): Likewise.
12378         (class vector_hasher): Likewise.
12379         (write_hash_table): Likewise.
12380         (psym_index_map): Likewise.
12381         (struct addrmap_index_data): Likewise.
12382         (add_address_entry): Likewise.
12383         (add_address_entry_worker): Likewise.
12384         (write_address_map): Likewise.
12385         (symbol_kind): Likewise.
12386         (write_psymbols): Likewise.
12387         (struct signatured_type_index_data): Likewise.
12388         (write_one_signatured_type): Likewise.
12389         (recursively_count_psymbols): Likewise.
12390         (recursively_write_psymbols): Likewise.
12391         (class debug_names): Likewise.
12392         (check_dwarf64_offsets): Likewise.
12393         (psyms_seen_size): Likewise.
12394         (write_gdbindex): Likewise.
12395         (write_debug_names): Likewise.
12396         (assert_file_size): Likewise.
12397         (write_psymtabs_to_index): Likewise.
12398         (save_gdb_index_command): Likewise.
12399         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12400         command.
12401         * dwarf2read.h: New file.
12402
12403 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12404
12405         PR gdb/22670
12406         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12407         symbol name if the CU's language stores symbol names in linkage
12408         format.
12409         * language.h (struct language_defn)
12410         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12411         all instances of this struct.
12412
12413 2018-03-26  Tom Tromey  <tom@tromey.com>
12414
12415         * stack.c (backtrace_command_1): Remove verbose code.
12416
12417 2018-03-26  Tom Tromey  <tom@tromey.com>
12418
12419         * python/py-framefilter.c (py_print_type): Don't catch
12420         exceptions.  Return void.
12421         (py_print_value): Likewise.
12422         (py_print_single_arg): Likewise.
12423         (enumerate_args): Don't catch exceptions.
12424         (py_print_args): Likewise.
12425         (py_print_frame): Likewise.
12426         (gdbpy_apply_frame_filter): Catch exceptions here.
12427
12428 2018-03-26  Tom Tromey  <tom@tromey.com>
12429
12430         * stack.c (_initialize_stack): Remove trailing newlines from help
12431         text.  Add "Usage" line to "backtrace" help.
12432
12433 2018-03-26  Tom Tromey  <tom@tromey.com>
12434
12435         PR python/16486:
12436         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12437
12438 2018-03-26  Tom Tromey  <tom@tromey.com>
12439
12440         * python/py-framefilter.c (py_print_single_arg): Return
12441         EXT_LANG_BT_ERROR from catch.
12442
12443 2018-03-26  Tom Tromey  <tom@tromey.com>
12444
12445         PR backtrace/15584:
12446         * stack.c (backtrace_command_1): Move some code into no-filters
12447         "if".
12448
12449 2018-03-26  Tom Tromey  <tom@tromey.com>
12450
12451         * python/py-framefilter.c (throw_quit_or_print_exception): New
12452         function.
12453         (gdbpy_apply_frame_filter): Use it.
12454
12455 2018-03-26  Tom Tromey  <tom@tromey.com>
12456
12457         PR cli/17716:
12458         * python/py-framefilter.c (py_print_type, py_print_value)
12459         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12460         RETURN_MASK_ERROR.
12461
12462 2018-03-26  Tom Tromey  <tom@tromey.com>
12463
12464         * python/py-framefilter.c (enumerate_args): Use
12465         gdb::unique_xmalloc_ptr.
12466
12467 2018-03-26  Tom Tromey  <tom@tromey.com>
12468
12469         * python/py-framefilter.c (py_print_frame): Return
12470         EXT_LANG_BT_OK.
12471         (gdbpy_apply_frame_filter): Update comment.
12472         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12473         Remove.
12474         <EXT_LANG_BT_NO_FILTERS>: Change value.
12475
12476 2018-03-26  Tom Tromey  <tom@tromey.com>
12477
12478         PR backtrace/15582:
12479         * stack.c (backtrace_command): Parse "hide" argument.
12480         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12481         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12482         constant.
12483
12484 2018-03-26  Tom Tromey  <tom@tromey.com>
12485
12486         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12487         add "flags".
12488         (backtrace_command): Remove "fulltrace", add "flags".
12489
12490 2018-03-26  Tom Tromey  <tom@tromey.com>
12491
12492         * stack.c (backtrace_command): Rewrite command line parsing.
12493
12494 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12495
12496         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12497
12498 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12499
12500         * filename-seen-cache.h: Add include guard.
12501
12502 2018-03-26  Keith Seitz  <keiths@redhat.com>
12503
12504         * symfile.c (place_section): Remove "struct" from section_addr_info
12505         in comment.
12506         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12507         "struct" keyword from section_addr_info.
12508
12509 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12510
12511         * regformats/regdef.h (reg): Add constructors.
12512
12513 2018-03-25  Pedro Alves  <palves@redhat.com>
12514
12515         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12516         if then/else bodies in var_func_name extraction.
12517
12518 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12519
12520         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12521         lookup_minimal_symbol() to find symbol entry.
12522         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12523
12524 2018-03-23  Keith Seitz  <keiths@redhat.com>
12525
12526         PR c++/22968
12527         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12528         nested type definitions for C++, too.
12529
12530 2018-03-23  Tom Tromey  <tom@tromey.com>
12531
12532         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12533         a typedef.
12534         (macho_register_oso): Remove.
12535         (macho_symtab_read): Take a std::vector.
12536         (oso_el_compare_name): Now a std::sort comparator.
12537         (macho_symfile_read_all_oso): Take a std::vector.
12538         (macho_symfile_read): Use std::vector.  Remove cleanups.
12539
12540 2018-03-22  Tom Tromey  <tom@tromey.com>
12541
12542         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12543         (record_full_goto_bookmark): Use std::string.
12544
12545 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12546
12547         PR tdep/18295
12548         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12549         a single mask.
12550
12551 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12552
12553         * rs6000-tdep.c (store_insn_p): New function.
12554         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12555         and cr_reg to their unshifted values. Use store_insn_p to
12556         match LR saves using either R1 or fdata->alloca_reg. Use
12557         store_insn_p to match CR saves. Set alloca_reg_offset
12558         when alloca_reg and framep are set. Remove lr_reg shift
12559         when assigning to fdata->lr_register.
12560
12561 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12562
12563         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12564         command line args instead of emitting a warning.
12565
12566 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12567
12568         * tracepoint.h (struct static_tracepoint_marker): Initialize
12569         fields, define default constructor, move constructor and move
12570         assignment, disable the rest.
12571         <str_id, extra>: Make std::string.
12572         (release_static_tracepoint_marker): Remove.
12573         (free_current_marker): Remove.
12574         * tracepoint.c (free_current_marker): Remove.
12575         (parse_static_tracepoint_marker_definition): Adjust to
12576         std::string, use new hex2str overload.
12577         (release_static_tracepoint_marker): Remove.
12578         (print_one_static_tracepoint_marker): Get marker by reference
12579         and adjust to std::string.
12580         (info_static_tracepoint_markers_command): Adjust to std::vector
12581         changes
12582         * target.h (static_tracepoint_marker_p): Remove typedef.
12583         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12584         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12585         bool.
12586         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12587         * target-debug.h
12588         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12589         (target_debug_print_std_vector_static_tracepoint_marker): New.
12590         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12591         to...
12592         (target_debug_print_static_tracepoint_marker_p): ... this.
12593         * target-delegates.c: Re-generate.
12594         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12595         Make std::string.
12596         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12597         (decode_static_tracepoint_spec): Adjust to std::vector.
12598         (tracepoint_print_one_detail): Adjust to std::string.
12599         (strace_marker_decode_location): Adjust to std::string.
12600         (update_static_tracepoint): Adjust to std::string, remove call
12601         to release_static_tracepoint_marker.
12602         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12603         Adjust to std::vector.
12604         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12605         (remote_static_tracepoint_markers_by_strid): Adjust to
12606         std::vector.
12607         * common/rsp-low.h (hex2str): New overload with explicit count
12608         of bytes.
12609         * common/rsp-low.c (hex2str): New overload with explicit count
12610         of bytes.
12611         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12612         (_initialize_rsp_low_selftests): Add test_hex2str test.
12613         * unittests/tracepoint-selftests.c
12614         (test_parse_static_tracepoint_marker_definition): Adjust to
12615         std::string.
12616
12617 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12618
12619         * tracepoint.c (parse_static_tracepoint_marker_definition):
12620         Consider case where the definition is followed by more
12621         definitions.
12622         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12623         tracepoint-selftests.c.
12624         * unittests/tracepoint-selftests.c: New.
12625
12626 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12627
12628         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12629         Carvalho.
12630
12631 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12632
12633         * symtab.c (find_pc_sect_line): fixed indentation.
12634
12635 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12636
12637         * symtab.c (find_pc_sect_line): now uses binary search.
12638
12639 2018-03-19  Tom Tromey  <tom@tromey.com>
12640
12641         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12642         "IDENT" production.
12643
12644 2018-03-19  Pedro Alves  <palves@redhat.com>
12645             Tom Tromey  <tom@tromey.com>
12646
12647         * unittests/observable-selftests.c: New file.
12648         * common/observable.h: New file.
12649         * observable.h: New file.
12650         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12651         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12652         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12653         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12654         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12655         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12656         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12657         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12658         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12659         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12660         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12661         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12662         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12663         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12664         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12665         tui/tui-interp.c, valops.c: Update all users.
12666         * tui/tui-hooks.c (tui_bp_created_observer)
12667         (tui_bp_deleted_observer, tui_bp_modified_observer)
12668         (tui_inferior_exit_observer, tui_before_prompt_observer)
12669         (tui_normal_stop_observer, tui_register_changed_observer):
12670         Remove.
12671         (tui_observers_token): New global.
12672         (attach_or_detach, tui_attach_detach_observers): New functions.
12673         (tui_install_hooks, tui_remove_hooks): Use
12674         tui_attach_detach_observers.
12675         * record-btrace.c (record_btrace_thread_observer): Remove.
12676         (record_btrace_thread_observer_token): New global.
12677         * observer.sh: Remove.
12678         * observer.c: Rename to observable.c.
12679         * observable.c (namespace gdb_observers): Define new objects.
12680         (observer_debug): Move into gdb_observers namespace.
12681         (struct observer, struct observer_list, xalloc_observer_list_node)
12682         (xfree_observer_list_node, generic_observer_attach)
12683         (generic_observer_detach, generic_observer_notify): Remove.
12684         (_initialize_observer): Update.
12685         Don't include observer.inc.
12686         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12687         (clean mostlyclean): Likewise.
12688         (observer.h, observer.inc): Remove targets.
12689         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12690         (COMMON_SFILES): Use observable.c, not observer.c.
12691         * .gitignore: Remove observer.h.
12692
12693 2018-03-18  Tom Tromey  <tom@tromey.com>
12694
12695         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12696         gdb::def_vector.
12697         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12698
12699 2018-03-17  Tom Tromey  <tom@tromey.com>
12700
12701         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12702
12703 2018-03-17  Tom Tromey  <tom@tromey.com>
12704
12705         * target.c (class scoped_target_fd): New.
12706         (target_fileio_close_cleanup): Remove.
12707         (target_fileio_read_alloc_1): Use scoped_target_fd.
12708
12709 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12710
12711         * silent-rules.mk: New.
12712         * Makefile.in: Include silent-rules.mk
12713         (srcdir, VPATH, top_srcdir): Move up.
12714         (COMPILE): Add ECHO_CXX.
12715         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12716         (init.c): Add ECHO_INIT_C.
12717         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12718         (version.c): Add ECHO_GEN.
12719         (printcmd.o): Add ECHO_CXX.
12720         (target-float.o): Add ECHO_CXX.
12721         (ada-exp.o): Add ECHO_CXX.
12722         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12723         (insight$(EXEEXT)): Add ECHO_CXXLD.
12724         * gnulib/configure.ac: Add AM_SILENT_RULES.
12725         * gnulib/aclocal.m4: Re-generate.
12726         * gnulib/configure: Re-generate.
12727         * gnulib/import/Makefile.in: Re-generate.
12728
12729 2018-03-16  Tom Tromey  <tom@tromey.com>
12730
12731         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12732         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12733         * utils.c (do_free_section_addr_info)
12734         (make_cleanup_free_section_addr_info): Remove.
12735         * symfile.h (struct other_sections): Add constructor.
12736         (struct section_addr_info): Remove.
12737         (section_addr_info): New typedef.
12738         (struct sym_fns) <sym_offsets>: Change type of parameter.
12739         (build_section_addr_info_from_objfile)
12740         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12741         (default_symfile_offsets, symbol_file_add)
12742         (symbol_file_add_from_bfd)
12743         (build_section_addr_info_from_section_table): Update.
12744         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12745         * symfile.c (alloc_section_addr_info): Remove.
12746         (build_section_addr_info_from_section_table): Change return type.
12747         Update.
12748         (build_section_addr_info_from_bfd)
12749         (build_section_addr_info_from_objfile): Likewise.
12750         (free_section_addr_info): Remove.
12751         (relative_addr_info_to_section_offsets): Change type of "addrs".
12752         (addrs_section_compar): Now a std::sort comparator.
12753         (addrs_section_sort): Change return type.
12754         (addr_info_make_relative): Change type of "addrs".  Update.
12755         (default_symfile_offsets, syms_from_objfile_1)
12756         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12757         (symbol_file_add_separate): Update.
12758         (symbol_file_add): Change type of "addrs".  Update.
12759         (add_symbol_file_command): Update.  Remove cleanups.
12760         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12761         cleanups.
12762         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12763         * solib.c (solib_read_symbols): Update.
12764         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12765         * machoread.c (macho_symfile_offsets): Update.
12766         * jit.c (jit_bfd_try_read_symtab): Update.
12767
12768 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12769
12770         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12771         unittests/utils-selftests.c.
12772         * unittests/utils-selftests.c: New file.
12773
12774 2018-03-14  Tom Tromey  <tom@tromey.com>
12775
12776         PR cli/14977:
12777         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12778         for NULL.
12779
12780 2018-03-14  Tom Tromey  <tom@tromey.com>
12781
12782         PR cli/19918:
12783         * printcmd.c (printf_pointer): Allow "-" in format.
12784
12785 2018-03-14  Tom Tromey  <tom@tromey.com>
12786
12787         * printcmd.c (_initialize_printcmd): Add usage to printf.
12788
12789 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12790
12791         * MAINTAINERS: Update my email address.
12792
12793 2018-03-13  Tom Tromey  <tom@tromey.com>
12794
12795         * machoread.c (macho_check_dsym): Change filenamep to a
12796         std::string*.
12797         (macho_symfile_read): Update.
12798         * symfile.c (load_command): Use std::string.
12799
12800 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12801
12802         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12803         to error message string.
12804         (riscv_register_name): Use xsnprintf instead of sprintf.
12805         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12806         internal_error.
12807         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12808         error.
12809         (riscv_push_dummy_call): Likewise.
12810
12811 2018-03-12  Tom Tromey  <tom@tromey.com>
12812
12813         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12814         Use gdb::byte_vector.
12815         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12816
12817 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12818
12819         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12820         parameter type to readable_regcache.
12821         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12822         the declaration.
12823
12824 2018-03-11  Tom Tromey  <tom@tromey.com>
12825
12826         * dwarf2read.c (struct nextfield): Add initializers.
12827         (struct nextfnfield): Remove.
12828         (struct fnfieldlist): Add initializers.  Remove "length" and
12829         "head", use std::vector.
12830         (struct decl_field_list): Remove.
12831         (struct field_info): Add initializers.
12832         <fields, baseclasses>: Now std::vector.
12833         <nbaseclasses, nfnfields, typedef_field_list_count,
12834         nested_types_list_count>: Remove.
12835         (dwarf2_add_field, dwarf2_add_type_defn)
12836         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12837         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12838         (process_structure_scope): Update.
12839
12840 2018-03-11  Tom Tromey  <tom@tromey.com>
12841
12842         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12843         for use by std::sort.
12844         (build_type_psymtabs_1): Use std::vector.
12845
12846 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12847
12848         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12849         and LIBMPFR in the printed configuration.
12850
12851 2018-03-08  Tom Tromey  <tom@tromey.com>
12852
12853         * source.c (get_filename_and_charpos): Use scoped_fd.
12854         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12855         (procfs_pidlist): Likewise.
12856         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12857         (iterate_over_mappings): Likewise.
12858
12859 2018-03-08  Tom Tromey  <tom@tromey.com>
12860
12861         * infcall.c (struct call_return_meta_info)
12862         <stack_temporaries_enabled>: Remove.
12863         (get_call_return_value, call_function_by_hand_dummy): Update.
12864         * thread.c (disable_thread_stack_temporaries): Remove.
12865         (enable_thread_stack_temporaries): Remove.
12866         (thread_stack_temporaries_enabled_p): Return bool.
12867         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12868         (get_last_thread_stack_temporary): Update.
12869         * eval.c (evaluate_subexp): Update.
12870         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12871         class, not a function.
12872         (value_ptr, value_vec): Remove typedefs.
12873         (class thread_info) <stack_temporaries_enabled>: Now bool.
12874         <stack_temporaries>: Now a std::vector.
12875         (thread_stack_temporaries_enabled_p)
12876         (value_in_thread_stack_temporaries): Return bool.
12877
12878 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12879
12880         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12881         (getpkt_or_notif_sane_1): Likewise.
12882
12883 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12884
12885         * build-id.c (build_id_to_debug_bfd): Use std::string.
12886
12887 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12888
12889         * build-id.c (find_separate_debug_file_by_buildid): Return
12890         std::string.
12891         * build-id.h (find_separate_debug_file_by_buildid): Return
12892         std::string.
12893         * coffread.c (coff_symfile_read): Adjust to std::string.
12894         * elfread.c (elf_symfile_read): Adjust to std::string.
12895         * symfile.c (separate_debug_file_exists): Change parameter to
12896         std::string.
12897         (find_separate_debug_file): Return std::string.
12898         (find_separate_debug_file_by_debuglink): Return std::string.
12899         * symfile.h (find_separate_debug_file_by_debuglink): Return
12900         std::string.
12901
12902 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12903
12904         * common/xml-utils.c (xml_escape_text): Move code to...
12905         (xml_escape_text_append): ... this new function.
12906         * common/xml-utils.h (xml_escape_text_append): New declaration.
12907         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12908         New function.
12909         (_initialize_xml_utils): register test_xml_escape_text_append as
12910         a selftest.
12911
12912 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12913
12914         * defs.h: Remove MAX_REGISTER_SIZE.
12915         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12916         asserts.
12917         * python/py-unwind.c (pyuw_sniffer): Likewise.
12918
12919 2018-03-07  Tom Tromey  <tom@tromey.com>
12920
12921         * linux-tdep.c (linux_info_proc): Update.
12922         * target.h (struct target_ops) <to_fileio_readlink>: Return
12923         optional<string>.
12924         (target_fileio_readlink): Return optional<string>.
12925         * remote.c (remote_hostio_readlink): Return optional<string>.
12926         * inf-child.c (inf_child_fileio_readlink): Return
12927         optional<string>.
12928         * target.c (target_fileio_readlink): Return optional<string>.
12929
12930 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12931
12932         * regcache.c (cooked_read_test): Add riscv to the list of
12933         architectures that have a save_reggroup.
12934
12935 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12936
12937         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12938         value is not a dynamic class object.
12939
12940 2018-03-06  Tom Tromey  <tom@tromey.com>
12941
12942         * rust-exp.y: Formatting fixes.
12943
12944 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12945
12946         * riscv-tdep.c (riscv_register_name): Remove target description
12947         support.
12948         (riscv_gdbarch_init): Remove target description check.
12949
12950 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12951
12952         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12953         comment.
12954         * riscv-tdep.h: Likewise.
12955
12956 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12957
12958         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12959         (riscv_pseudo_register_write): Delete.
12960         (riscv_gdbarch_init): Remove all use of pseudo registers.
12961
12962 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12963
12964         * record-btrace.c (btrace_print_lines): Replace cleanup
12965         parameter with RAII equivalents.
12966         (btrace_insn_history): Replace cleanup with RAII equivalents.
12967         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12968         make_cleanup_ui_out_tuple_begin_end): Remove.
12969         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12970         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12971         make_cleanup_ui_out_list_begin_end): Remove.
12972
12973 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12974
12975         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12976         parameter types to std::vector.  Use bool.
12977         (record_btrace_wait): Replace VEC(tp_t) with
12978         std::vector<thread_info *>.
12979         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12980
12981 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12982
12983         * record-btrace.c (record_btrace_disable_callback): Remove.
12984         (struct scoped_btrace_disable): New.
12985         (record_btrace_open): Use scoped_btrace_disable.
12986
12987 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12988
12989         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12990         reading values from registers.
12991
12992 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12993
12994         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12995         where appropriate.
12996
12997 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12998
12999         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13000         change parameter type.  Use GDB's print functions, and use
13001         core_addr_to_string where appropriate.
13002         (riscv_push_dummy_call): Use core_addr_to_string where
13003         appropriate, update call to riscv_print_arg_location, and reindent
13004         a few lines.
13005         (riscv_return_value): Update call to riscv_print_arg_location.
13006
13007 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13008             Tim Newsome <tim@sifive.com>
13009             Albert Ou <a0u@eecs.berkeley.edu>
13010             Darius Rad <darius@bluespec.com>
13011
13012         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13013         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13014         (ALLDEPFILES): Add riscv-tdep.c
13015         * configure.tgt: Add riscv support.
13016         * riscv-tdep.c: New file.
13017         * riscv-tdep.h: New file.
13018         * NEWS: Mention new target.
13019         * MAINTAINERS: Add entry for riscv.
13020
13021 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13022
13023         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13024         fields within aggregates.
13025
13026 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13027
13028         * record-btrace.c (btrace_print_lines): Change type of flags to
13029         gdb_disassembly_flags.
13030
13031 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13032
13033         * fbsd-nat.c: Include "inf-ptrace.h".
13034         (USE_SIGTRAP_SIGINFO): Conditionally define.
13035         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13036         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13037         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13038         function.
13039         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13040         Likewise.
13041         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13042         Likewise.
13043         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13044         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13045         "supports_stopped_by_hw_breakpoint" target methods.
13046
13047 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13048
13049         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13050         * fbsd-nat.c (debug_fbsd_nat): New variable.
13051         (show_fbsd_nat_debug): New function.
13052         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13053         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13054
13055 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13056
13057         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13058         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13059         prototype.
13060         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13061         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13062         method.
13063
13064 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13065
13066         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13067         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13068
13069 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13070
13071         * charset.c (struct charset_vector): New.
13072         (charsets): Change type to charset_vector.
13073         (find_charset_names): Adjust.
13074         (add_one): Adjust.
13075         (_initialize_charset): Adjust.
13076
13077 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13078
13079         * progspace.h (struct program_space) <deleted_solibs>: Change
13080         type to std::vector<std::string>.
13081         * progspace.c (clear_program_space_solib_cache): Adjust.
13082         * breakpoint.c (print_solib_event): Adjust.
13083         (check_status_catch_solib): Adjust.
13084         * solib.c (update_solib_list): Adjust.
13085         * ui-out.h (class ui_out) <field_string>: New overload.
13086         * ui-out.c (ui_out::field_string): New overload.
13087
13088 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13089
13090         * progspace.h (struct program_space): Add constructor and
13091         destructor, initialize fields.
13092         (add_program_space): Remove.
13093         * progspace.c (add_program_space): Rename to...
13094         (program_space::program_space): ... this.
13095         (release_program_space): Rename to...
13096         (program_space::~program_space): ... this.
13097         (delete_program_space): Use delete to delete program_space.
13098         (initialize_progspace): Use new to allocate program_space.
13099         * inferior.c (add_inferior_with_spaces): Likewise.
13100         (clone_inferior_command): Likewise.
13101         * infrun.c (follow_fork_inferior): Likewise.
13102         (handle_vfork_child_exec_or_exit): Likewise.
13103
13104 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13105
13106         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13107         (delim_string_to_char_ptr_vec): Return std::vector of
13108         gdb::unique_xmalloc_ptr.
13109         (dirnames_to_char_ptr_vec_append): Take std::vector of
13110         gdb::unique_xmalloc_ptr.
13111         (dirnames_to_char_ptr_vec): Return std::vector of
13112         gdb::unique_xmalloc_ptr.
13113         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13114         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13115         (delim_string_to_char_ptr_vec): Return an std::vector of
13116         gdb::unique_xmalloc_ptr, adjust the code.
13117         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13118         gdb::unique_xmalloc_ptr, adjust the code.
13119         (dirnames_to_char_ptr_vec): Return an std::vector of
13120         gdb::unique_xmalloc_ptr, adjust the code.
13121         * auto-load.c (auto_load_safe_path_vec): Change type to
13122         std::vector of gdb::unique_xmalloc_ptr.
13123         (auto_load_expand_dir_vars): Return an std::vector of
13124         gdb::unique_xmalloc_ptr, adjust the code.
13125         (auto_load_safe_path_vec_update): Adjust.
13126         (filename_is_in_auto_load_safe_path_vec): Adjust.
13127         (auto_load_objfile_script_1): Adjust.
13128         * build-id.c (build_id_to_debug_bfd): Adjust.
13129         * linux-thread-db.c (thread_db_load_search): Adjust.
13130         * source.c (add_path): Adjust.
13131         (openp): Adjust.
13132         * symfile.c (find_separate_debug_file): Adjust.
13133         * utils.c (do_free_char_ptr_vec): Remove.
13134         (make_cleanup_free_char_ptr_vec): Remove.
13135
13136 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13137
13138         PR gdb/22907
13139         * common/pathstuff.c: Conditionally include "<windows.h>".
13140
13141 2018-03-01  Georg Sauthoff  <mail@georg.so>
13142
13143         PR gdb/22888
13144         * gcore.in: Quote variables and switch interpreter to bash.
13145
13146 2018-03-01  Tom Tromey  <tom@tromey.com>
13147
13148         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13149         assertion.  Add assertion for discriminant_index.
13150         (quirk_rust_enum): Use correct base type name in univariant case.
13151
13152 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13153
13154         * record.c (get_call_history_modifiers): Return a
13155         record_print_flags.
13156         (cmd_record_call_history): Adjust.
13157         * record-btrace.c (record_btrace_call_history): Adjust.
13158         (record_btrace_call_history_range): Adjust.
13159         (record_btrace_call_history_from): Adjust.
13160         * target-debug.h (target_debug_print_record_print_flags): New.
13161         * target-delegates.c: Re-generate.
13162         * target.c (target_call_history): Change flags type.
13163         (target_call_history_from): Likewise.
13164         (target_call_history_range): Likewise.
13165         * target.h (struct target_ops) <target_call_history>: Likewise.
13166         (target_call_history_from): Likewise.
13167         (target_call_history_range): Likewise.
13168
13169 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13170             Simon Marchi  <simon.marchi@polymtl.ca>
13171
13172         * common/common-utils.c: Include "sys/stat.h".
13173         (is_regular_file): Move here from "source.c"; change return
13174         type to "bool".
13175         * common/common-utils.h (is_regular_file): New prototype.
13176         * common/pathstuff.c (contains_dir_separator): New function.
13177         * common/pathstuff.h (contains_dir_separator): New prototype.
13178         * source.c: Don't include "sys/stat.h".
13179         (is_regular_file): Move to "common/common-utils.c".
13180
13181 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13182
13183         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13184         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13185         * auto-load.c: Include "common/pathstuff.h".
13186         * common/common-def.h (current_directory): Move here.
13187         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13188         function.
13189         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13190         prototype.
13191         * common/pathstuff.c: New file.
13192         * common/pathstuff.h: New file.
13193         * compile/compile.c: Include "common/pathstuff.h".
13194         * defs.h (current_directory): Move to "common/common-defs.h".
13195         * dwarf2read.c: Include "common/pathstuff.h".
13196         * exec.c: Likewise.
13197         * guile/scm-safe-call.c: Likewise.
13198         * linux-thread-db.c: Likewise.
13199         * main.c: Likewise.
13200         * nto-tdep.c: Likewise.
13201         * objfiles.c: Likewise.
13202         * source.c: Likewise.
13203         * symtab.c: Likewise.
13204         * utils.c: Include "common/pathstuff.h".
13205         (gdb_realpath): Move to "common/pathstuff.c".
13206         (gdb_realpath_keepfile): Likewise.
13207         (gdb_abspath): Likewise.
13208         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13209         (gdb_realpath_keepfile): Likewise.
13210         (gdb_abspath): Likewise.
13211
13212 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13213
13214         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13215         wildcard process pid for super_resume for kernels with a
13216         specific bug.
13217
13218 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13219
13220         * compile/compile.c (get_args): Add additional comments
13221         explaining function.
13222
13223 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13224             Tom Tromey  <tom@tromey.com>
13225
13226         * target.h (memory_write_request_s): Remove typedef.  Don't define
13227         VEC.
13228         (target_write_memory_blocks): Change argument to std::vector.
13229         (struct memory_write_request): Add constructor.
13230         * target-memory.c (compare_block_starting_address): Return bool.
13231         Change argument types.
13232         (claim_memory): Change arguments to use std::vector.
13233         (split_regular_and_flash_blocks, blocks_to_erase)
13234         (compute_garbled_blocks): Likewise.
13235         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13236         (target_write_memory_blocks): Change argument to std::vector.
13237         * symfile.c (struct load_section_data): Add constructor and
13238         destructor.  Use std::vector for "requests".
13239         (struct load_progress_data): Add initializers.
13240         (load_section_callback): Update.  Use "new".
13241         (clear_memory_write_data): Remove.
13242         (generic_load): Update.
13243
13244 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13245
13246         * arch/aarch64.h: Use common/tdesc.h.
13247
13248 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13249
13250         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13251         architecture with a 64-bit ABI.
13252
13253 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13254
13255         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13256         ahead of target description loading.
13257
13258 2018-02-26  Tom Tromey  <tom@tromey.com>
13259
13260         * stack.c (backtrace_command_1): Update.
13261         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13262         of "flags".
13263         * python/py-framefilter.c (py_print_frame)
13264         (gdbpy_apply_frame_filter): Change type of "flags".
13265         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13266         of "flags".
13267         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13268         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13269         * extension.h (enum frame_filter_flag): Rename from
13270         frame_filter_flags.
13271         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13272         (apply_ext_lang_frame_filter): Change type of "flags".
13273         * extension.c (apply_ext_lang_frame_filter): Change type of
13274         "flags".
13275         * extension-priv.h (struct extension_language_ops)
13276         <apply_frame_filter>: Change type of "flags".
13277
13278 2018-02-26  Tom Tromey  <tom@tromey.com>
13279
13280         PR python/16497:
13281         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13282         off-by-one in py_end computation.
13283         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13284         PRINT_MORE_FRAMES.
13285         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13286         constant.
13287
13288 2018-02-26  Tom Tromey  <tom@tromey.com>
13289
13290         * dwarf2read.c (struct variant_field): New.
13291         (struct nextfield) <variant>: New field.
13292         (dwarf2_add_field): Handle DW_TAG_variant_part.
13293         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13294         discriminated union.
13295         (read_structure_type): Handle DW_TAG_variant_part.
13296         (handle_struct_member_die): New function, extracted from
13297         process_structure_scope.  Handle DW_TAG_variant.
13298         (process_structure_scope): Handle discriminated unions.  Call
13299         handle_struct_member_die.
13300
13301 2018-02-26  Tom Tromey  <tom@tromey.com>
13302
13303         * rust-lang.h (rust_last_path_segment): Declare.
13304         * rust-lang.c (rust_last_path_segment): Now public.  Change
13305         contract.
13306         (struct disr_info): Remove.
13307         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13308         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13309         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13310         (rust_enum_p, rust_enum_variant): New function.
13311         (rust_underscore_fields): Remove "offset" parameter.
13312         (rust_print_enum): New function.
13313         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13314         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13315         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13316         enums.
13317         (rust_internal_print_type): New function, from rust_print_type.
13318         Remove enum code.
13319         (rust_print_type): Call rust_internal_print_type.
13320         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13321         Update enum handling.
13322         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13323         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13324         (rust_union_quirks): New functions.
13325         (process_full_comp_unit, process_full_type_unit): Call
13326         rust_union_quirks.
13327         (process_structure_scope): Update rust_unions if necessary.
13328
13329 2018-02-26  Tom Tromey  <tom@tromey.com>
13330
13331         * value.h (value_union_variant): Declare.
13332         * valops.c (value_union_variant): New function.
13333         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13334         (struct discriminant_info): New.
13335         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13336         enumerator.
13337         (struct main_type) <flag_discriminated_union>: New field.
13338
13339 2018-02-26  Tom Tromey  <tom@tromey.com>
13340
13341         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13342         unittests/unpack-selftests.c.
13343         * unittests/unpack-selftests.c: New file.
13344         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13345
13346 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13347
13348         * dwarf2read.c (struct partial_die_info) <read>: New method.
13349         (read_partial_die): Remove the declaration.
13350         (load_partial_dies): Update.
13351         (partial_die_info::partial_die_info):
13352         (read_partial_die): Change it to partial_die_info::read.
13353
13354 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13355
13356         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13357         (fixup_partial_die): Remove declaration.
13358         (scan_partial_symbols): Update.
13359         (partial_die_parent_scope): Likewise.
13360         (partial_die_full_name): Likewise.
13361         (fixup_partial_die): Change it to partial_die_info::fixup.
13362
13363 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13364
13365         * dwarf2read.c (read_partial_die): Update the declaration.
13366         (load_partial_dies): Caller update.
13367         (read_partial_die): Remove one argument abbrev_len.
13368
13369 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13370
13371         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13372         assignment operator.
13373         (load_partial_dies): Use ctor and copy ctor.
13374         (read_partial_die): Update.
13375         (dwarf2_cu::find_partial_die): Use ctor.
13376
13377 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13378
13379         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13380         (find_partial_die_in_comp_unit): Change it to
13381         dwarf2_cu::find_partial_die.
13382         (find_partial_die): Update.
13383
13384 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13385
13386         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13387         is NULL.
13388
13389 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13390
13391         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13392
13393 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13394
13395         * arch/amd64.h: Use common/tdesc.h.
13396         * arch/i386.c: Likewise.
13397         * arch/i386.h: Likewise.
13398         * arch/tic6x.c: Likewise.
13399         * arch/tdesc.h: Move file from here...
13400         * common/tdesc.h: ...to here.
13401         * features/aarch64-core.c: Regenerate.
13402         * features/aarch64-fpu.c: Regenerate.
13403         * features/i386/32bit-avx.c: Regenerate.
13404         * features/i386/32bit-avx512.c: Regenerate.
13405         * features/i386/32bit-core.c: Regenerate.
13406         * features/i386/32bit-linux.c: Regenerate.
13407         * features/i386/32bit-mpx.c: Regenerate.
13408         * features/i386/32bit-pkeys.c: Regenerate.
13409         * features/i386/32bit-sse.c: Regenerate.
13410         * features/i386/64bit-avx.c: Regenerate.
13411         * features/i386/64bit-avx512.c: Regenerate.
13412         * features/i386/64bit-core.c: Regenerate.
13413         * features/i386/64bit-linux.c: Regenerate.
13414         * features/i386/64bit-mpx.c: Regenerate.
13415         * features/i386/64bit-pkeys.c: Regenerate.
13416         * features/i386/64bit-segments.c: Regenerate.
13417         * features/i386/64bit-sse.c: Regenerate.
13418         * features/i386/x32-core.c: Regenerate.
13419         * features/tic6x-c6xp.c: Regenerate.
13420         * features/tic6x-core.c: Regenerate.
13421         * features/tic6x-gp.c: Regenerate.
13422         * target-descriptions.c: Use common/tdesc.h.
13423         * target-descriptions.h: Likewise.
13424
13425 2018-02-24  Tom Tromey  <tom@tromey.com>
13426
13427         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13428         (try_thread_db_load_from_dir, thread_db_load_search): Use
13429         std::string.
13430         (info_auto_load_libthread_db_compare): Return bool.  Change
13431         argument types.
13432         (info_auto_load_libthread_db): Use std::vector, std::string.
13433         Remove cleanups.
13434
13435 2018-02-24  Tom Tromey  <tom@tromey.com>
13436
13437         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13438         std::string.
13439         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13440         std::string*.
13441         * gdbarch.c: Rebuild.
13442         * gdbarch.h: Rebuild.
13443         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13444         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13445         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13446         std::string*.
13447
13448 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13449
13450         * gdbtypes.h (sect_offset): Change type to uint64_t.
13451         (sect_offset_str): New function.
13452         * dwarf2read.c (create_addrmap_from_aranges): Use
13453         sect_offset_str.
13454         (error_check_comp_unit_head): Likewise.
13455         (create_debug_type_hash_table): Likewise.
13456         (read_cutu_die_from_dwo): Likewise.
13457         (init_cutu_and_read_dies): Likewise.
13458         (init_cutu_and_read_dies_no_follow): Likewise.
13459         (process_psymtab_comp_unit_reader): Likewise.
13460         (partial_die_parent_scope): Likewise.
13461         (peek_die_abbrev): Likewise.
13462         (process_queue): Likewise.
13463         (dwarf2_physname): Likewise.
13464         (read_namespace_alias): Likewise.
13465         (read_import_statement): Likewise.
13466         (create_dwo_cu_reader): Likewise.
13467         (create_cus_hash_table): Likewise.
13468         (lookup_dwo_cutu): Likewise.
13469         (inherit_abstract_dies): Likewise.
13470         (read_func_scope): Likewise.
13471         (read_call_site_scope): Likewise.
13472         (dwarf2_add_member_fn): Likewise.
13473         (read_common_block): Likewise.
13474         (read_module_type): Likewise.
13475         (read_typedef): Likewise.
13476         (read_subrange_type): Likewise.
13477         (load_partial_dies): Likewise.
13478         (read_partial_die): Likewise.
13479         (find_partial_die): Likewise.
13480         (read_str_index): Likewise.
13481         (dwarf2_string_attr): Likewise.
13482         (build_error_marker_type): Likewise.
13483         (lookup_die_type): Likewise.
13484         (dump_die_shallow): Likewise.
13485         (follow_die_ref): Likewise.
13486         (dwarf2_fetch_die_loc_sect_off): Likewise.
13487         (dwarf2_fetch_constant_bytes): Likewise.
13488         (follow_die_sig): Likewise.
13489         (get_signatured_type): Likewise.
13490         (get_DW_AT_signature_type): Likewise.
13491         (dwarf2_find_containing_comp_unit): Likewise.
13492         (set_die_type): Likewise.
13493
13494 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13495
13496         * arch/aarch64.c: Include "common-defs.h".
13497         * arch/amd64.c: Likewise.
13498         * arch/i386.c: Likewise.
13499
13500 2018-02-21  Tom Tromey  <tom@tromey.com>
13501
13502         * value.h: (extract_field_op): Update.
13503         * eval.c (extract_field_op): Return a const char *.
13504         * expression.h (parse_expression_for_completion): Update.
13505         * completer.c (complete_expression): Update.
13506         (add_struct_fields): Make fieldname const.
13507         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13508         (mark_completion_tag, parse_exp_in_context_1): Update.
13509         (parse_expression_for_completion): Change "name" to
13510         unique_xmalloc_ptr*.
13511
13512 2018-02-21  Tom Tromey  <tom@tromey.com>
13513
13514         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13515
13516 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13517
13518         * avr-tdep.c (avr_read_pc): Change parameter type to
13519         readable_regcache.
13520         * gdbarch.sh (read_pc): Likewise.
13521         * gdbarch.c: Re-generated.
13522         * gdbarch.h: Re-generated.
13523         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13524         readable_regcache.
13525         * ia64-tdep.c (ia64_read_pc): Likewise.
13526         * mips-tdep.c (mips_read_pc): Likewise.
13527         * spu-tdep.c (spu_read_pc): Likewise.
13528
13529 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13530
13531         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13532         * regcache-dump.c: New file.
13533         * regcache.c: Move register_dump to regcache-dump.c.
13534         (maintenance_print_registers): Likewise.
13535         (maintenance_print_raw_registers): Likewise.
13536         (maintenance_print_cooked_registers): Likewise.
13537         (maintenance_print_register_groups): Likewise.
13538         (maintenance_print_remote_registers): Likewise.
13539         (_initialize_regcache): Likewise.
13540         * regcache.h (register_dump): Moved from regcache.c.
13541
13542 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13543
13544         * regcache.c (regcache::regcache): Update.
13545         (regcache::invalidate): Move it to detached_regcache::invalidate.
13546         (get_thread_arch_aspace_regcache): Update.
13547         (regcache::raw_update): Update.
13548         (regcache::cooked_read): Remove some code.
13549         (regcache::cooked_read_value): Likewise.
13550         (regcache::raw_write): Remove assert on m_readonly_p.
13551         (regcache::raw_supply_integer): Move it to
13552         detached_regcache::raw_supply_integer.
13553         (regcache::raw_supply_zeroed): Likewise.
13554         * regcache.h (detached_regcache) <raw_supply_integer>: New
13555         declaration.
13556         <raw_supply_zeroed, invalidate>: Likewise.
13557         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13558         <invalidate>: Likewise.
13559         <m_readonly_p>: Removed.
13560
13561 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13562
13563         * infcmd.c (get_return_value): Let stop_regs point to
13564         get_current_regcache.
13565         * regcache.c (regcache::regcache): Remove.
13566         (register_dump_reg_buffer): New class.
13567         (regcache_print): Adjust.
13568         * regcache.h (regcache): Remove constructors.
13569
13570 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13571
13572         * regcache.c (class register_dump): New class.
13573         (register_dump_regcache, register_dump_none): New class.
13574         (register_dump_remote, register_dump_groups): New class.
13575         (regcache_print): Update.
13576         * regcache.h (regcache_dump_what): Move it to regcache.c.
13577         (regcache) <dump>: Remove.
13578
13579 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13580
13581         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13582          reg_buffer_rw *.
13583         (jit_unwind_reg_set_impl): Call raw_supply.
13584         (jit_frame_sniffer): Use reg_buffer_rw.
13585         * record-full.c (record_full_core_regbuf): Change its type.
13586         (record_full_core_open_1): Use reg_buffer_rw.
13587         (record_full_close): Likewise.
13588         (record_full_core_fetch_registers): Use regcache->raw_supply.
13589         (record_full_core_store_registers): Likewise.
13590         * regcache.c (regcache::get_register_status): Move it to
13591         reg_buffer.
13592         (regcache_raw_set_cached_value): Remove.
13593         (regcache::raw_set_cached_value): Remove.
13594         (regcache::raw_write): Call raw_supply.
13595         (regcache::raw_supply): Move it to reg_buffer_rw.
13596         * regcache.h (regcache_raw_set_cached_value): Remove.
13597         (reg_buffer_rw): New class.
13598
13599 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13600
13601         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13602         readonly_detached_regcache.
13603         (dummy_frame_prev_register): Use regcache->cooked_read.
13604         * frame.c (frame_save_as_regcache): Change return type.
13605         (frame_pop): Update.
13606         * frame.h (frame_save_as_regcache): Update declaration.
13607         * inferior.h (get_infcall_suspend_state_regcache): Update
13608         declaration.
13609         * infrun.c (infcall_suspend_state) <registers>: use
13610         readonly_detached_regcache.
13611         (save_infcall_suspend_state): Don't use regcache_dup.
13612         (get_infcall_suspend_state_regcache): Change return type.
13613         * linux-fork.c (struct fork_info) <savedregs>: Change to
13614         readonly_detached_regcache.
13615         <pc>: New field.
13616         (fork_save_infrun_state): Don't use regcache_dup.
13617         (info_checkpoints_command): Adjust.
13618         * mi/mi-main.c (register_changed_p): Update declaration.
13619         (mi_cmd_data_list_changed_registers): Use
13620         readonly_detached_regcache.
13621         (register_changed_p): Change parameter type to
13622         readonly_detached_regcache.
13623         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13624         readonly_detached_regcache.
13625         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13626         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13627         New.
13628         (regcache::save): Move it to reg_buffer.
13629         (regcache::restore): Change parameter type.
13630         (regcache_dup): Remove.
13631         * regcache.h (reg_buffer) <save>: New method.
13632         (readonly_detached_regcache): New class.
13633         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13634         readonly_detached_regcache.
13635         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13636
13637 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13638
13639         * frame.c (frame_save_as_regcache): Use regcache method save.
13640         (frame_pop): Use regcache method restore.
13641         * infrun.c (restore_infcall_suspend_state): Likewise.
13642         * linux-fork.c (fork_load_infrun_state): Likewise.
13643         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13644         save.
13645         * regcache.c (regcache_save): Remove.
13646         (regcache::restore): More asserts.
13647         (regcache_cpy): Remove.
13648         * regcache.h (regcache_save): Remove the declaration.
13649         (regcache::restore): Move from private to public.
13650         Remove the friend declaration of regcache_cpy.
13651         (regcache_cpy): Remove declaration.
13652
13653 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13654
13655         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13656         parameter type to 'readable_regcache *'.
13657         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13658         * arm-tdep.c (arm_neon_quad_read): Likewise.
13659         (arm_pseudo_read): Likewise.
13660         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13661         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13662         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13663         * gdbarch.c: Re-generated.
13664         * gdbarch.h: Re-generated.
13665         * gdbarch.sh (pseudo_register_read): Change parameter type to
13666         'readable_regcache *'.
13667         (pseudo_register_read_value): Likewise.
13668         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13669         (h8300_pseudo_register_read): Likewise.
13670         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13671         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13672         (i386_pseudo_register_read_into_value): Likewise.
13673         (i386_pseudo_register_read_value): Likewise.
13674         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13675         declaration.
13676         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13677         * m32c-tdep.c (m32c_raw_read): Likewise.
13678         (m32c_read_flg): Likewise.
13679         (m32c_banked_register): Likewise.
13680         (m32c_banked_read): Likewise.
13681         (m32c_sb_read): Likewise.
13682         (m32c_part_read): Likewise.
13683         (m32c_cat_read): Likewise.
13684         (m32c_r3r2r1r0_read): Likewise.
13685         (m32c_pseudo_register_read): Likewise.
13686         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13687         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13688         (mep_pseudo_cr64_read): Likewise.
13689         (mep_pseudo_register_read): Likewise.
13690         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13691         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13692         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13693         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13694         (regcache::cooked_read): Likewise.
13695         (regcache::cooked_read_value): Likewise.
13696         (regcache_cooked_read_signed):
13697         (regcache::cooked_read): Likewise.
13698         * regcache.h (readable_regcache): New class.
13699         (regcache): Inherit readable_regcache.  Move some methods to
13700         readable_regcache.
13701         * rl78-tdep.c (rl78_pseudo_register_read): Change
13702         parameter type to 'readable_regcache *'.
13703         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13704         (e500_pseudo_register_read): Change parameter type to
13705         'readable_regcache *'.
13706         (dfp_pseudo_register_read): Likewise.
13707         (vsx_pseudo_register_read): Likewise.
13708         (efpr_pseudo_register_read): Likewise.
13709         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13710         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13711         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13712         (sh64_pseudo_register_read): Likewise.
13713         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13714         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13715         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13716         (spu_pseudo_register_read): Likewise.
13717         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13718         (xtensa_pseudo_register_read): Likewise.
13719
13720 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13721
13722         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13723         (regcache::arch): Move it to reg_buffer::arch.
13724         (regcache::register_buffer): Likewise.
13725         (regcache::assert_regnum): Likewise.
13726         (regcache::num_raw_registers): Likewise.
13727         * regcache.h (reg_buffer): New class.
13728         (regcache): Inherit reg_buffer.
13729
13730 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13731
13732         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13733         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13734
13735 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13736
13737         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13738
13739 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13740
13741         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13742         (SFILES): Remove common/*.c files.
13743         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13744         * common/common.host: Add common reference.
13745         * configure.ac: Likewise.
13746         * configure: Regenerate.
13747
13748 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13749
13750         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13751         (block_initialize_namespace): Use new.
13752         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13753         (dwarf2_free_objfile): Use delete.
13754         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13755         (copy_type_recursive): Use new.
13756         * gdb_obstack.h (allocate_on_obstack): New.
13757
13758 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13759
13760         PR gdb/22849
13761         * inferior.c (exit_inferior_1): Reset inf->control.
13762
13763 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13764
13765         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13766         declaration.
13767
13768 2018-02-14  Pedro Alves  <palves@redhat.com>
13769
13770         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13771         frame_cleanup_after_sniffer on exception.
13772
13773 2018-02-14  Tom Tromey  <tom@tromey.com>
13774
13775         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13776         const.
13777         (solib_bfd_open): Make pathname const.
13778         * solib.c (solib_bfd_open): Make pathname const.
13779         * solib-spu.c (spu_bfd_fopen): Make name const.
13780         (spu_bfd_open): Make pathname const.
13781         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13782         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13783
13784 2018-02-14  Tom Tromey  <tom@tromey.com>
13785
13786         * symfile.c (symfile_bfd_open): Update.
13787         * source.h (openp, source_full_path_of, find_and_open_source):
13788         Change argument type to unique_xmalloc_ptr.
13789         * source.c (openp): Take a unique_xmalloc_ptr.
13790         (source_full_path_of, find_and_open_source): Likewise.
13791         (open_source_file, symtab_to_fullname): Update.
13792         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13793         unique_xmalloc_ptr.
13794         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13795         (exec_file_find): Update.
13796         * psymtab.c (psymtab_to_fullname): Update.
13797         * nto-tdep.h (nto_find_and_open_solib): Update.
13798         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13799         unique_xmalloc_ptr.
13800         * exec.c (exec_file_attach): Update.
13801         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13802         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13803
13804 2018-02-14  Tom Tromey  <tom@tromey.com>
13805
13806         * solib.c: Include source.h.
13807         * nto-tdep.c: Include source.h.
13808         * mi/mi-cmd-env.c: Include source.h.
13809         * infcmd.c: Include source.h.
13810         * exec.c: Include source.h.
13811         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13812         (add_path, directory_switch, source_path, init_source_path): Move
13813         declarations...
13814         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13815         (add_path, directory_switch, source_path, init_source_path):
13816         ...here.
13817
13818 2018-02-14  Tom Tromey  <tom@tromey.com>
13819
13820         * solist.h (exec_file_find, solib_find): Return
13821         unique_xmalloc_ptr.
13822         (solib_bfd_fopen): Take a const char *.
13823         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13824         (exec_file_find, solib_find): Likewise.
13825         (solib_bfd_fopen): Do not take ownership of "pathname".
13826         (solib_bfd_open): Use unique_xmalloc_ptr.
13827         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13828         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13829         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13830         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13831
13832 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13833
13834         * ada-lang.c (name_match_type_from_name): Remove reference to
13835         ada_name_for_lookup in function's documentation.
13836         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13837
13838 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13839
13840         * defs.h (enum openp_flags): New enum.
13841         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13842         Move to enum openp_flags.
13843         (openp_flags): New enum flags.
13844         (openp): Change parameter type to openp_flags.
13845         * source.c (openp): Change parameter type to openp_flags.
13846         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13847         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13848
13849 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13850
13851         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13852         per-command.
13853
13854 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13855
13856         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13857         into...
13858         (class dwarf2_queue_guard): ...the destructor of this new class.
13859         (dw2_do_instantiate_symtab): Create instance of the new class
13860         dwarf2_queue_guard, remove cleanup.
13861
13862 2018-02-09  Tom Tromey  <tom@tromey.com>
13863
13864         * source.c (find_source_lines): Don't reference past the end of
13865         the vector.
13866
13867 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13868
13869         * remote.c (remote_btrace_maybe_reopen): Change error message.
13870         * btrace.c (btrace_enable): Likewise.
13871         (parse_xml_btrace): Likewise.
13872         (parse_xml_btrace_conf): Likewise.
13873
13874 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13875
13876         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13877         (linux_enable_pt, linux_enable_bts): Call
13878         diagnose_perf_event_open_fail.
13879
13880 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13881
13882         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13883         Remove parameter and change return type.  Update callers.  Move it.
13884         (linux_enable_bts, linux_enable_pt): Improve error message.
13885         (linux_enable_pt): Remove zero buffer size check.
13886         (linux_enable_btrace): Improve error messages.  Remove NULL return
13887         check.
13888
13889 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13890
13891         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13892         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13893         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13894         (linux_supports_pt, linux_supports_btrace): Remove.
13895         (linux_enable_bts): Call cpu_supports_bts.
13896         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13897         * remote.c (remote_supports_btrace): Remove.
13898         (init_remote_ops): Remove remote_supports_btrace.
13899         * target-delegates.c: Regenerated.
13900         * target.c (target_supports_btrace): Remove.
13901         * target.h (target_ops) <to_supports_btrace>: Remove
13902         (target_supports_btrace): Remove.
13903         * x86-linux-nat.c (x86_linux_create_target): Remove
13904         linux_supports_btrace.
13905
13906 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13907
13908         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13909         btrace failed.
13910         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13911         exception and use message in own exception.
13912
13913 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13914
13915         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13916         (perf_event_pt_event_type): Use gdb_file_up.
13917         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13918         scoped_fd, and scoped_mmap.
13919
13920 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13921
13922         * common/scoped_mmap.h: New.
13923         * unittests/scoped_mmap-selftest.c: New.
13924         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13925         unittests/scoped_mmap-selftest.c.
13926
13927 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13928
13929         * common/scoped_fd.h: New.
13930         * unittests/scoped_fd-selftest.c: New.
13931         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13932         unittests/scoped_fd-selftest.c.
13933
13934 2018-02-09  Tom Tromey  <tom@tromey.com>
13935
13936         * auto-load.c (auto_load_section_scripts): Use
13937         gdb::unique_xmalloc_ptr.
13938
13939 2018-02-09  Tom Tromey  <tom@tromey.com>
13940
13941         * auto-load.c (execute_script_contents): Use std::string.
13942
13943 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13944
13945         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13946         Python function, rather than a new command.
13947
13948 2018-02-08  Tom Tromey  <tom@tromey.com>
13949
13950         * solib.c (solib_find_1): Use std::string.
13951         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13952
13953 2018-02-08  Tom Tromey  <tom@tromey.com>
13954
13955         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13956
13957 2018-02-08  Tom Tromey  <tom@tromey.com>
13958
13959         * source.c (find_source_lines): Use gdb::def_vector.
13960
13961 2018-02-08  Tom Tromey  <tom@tromey.com>
13962
13963         * macrocmd.c (struct temporary_macro_definition): New.
13964         (macro_define_command): Use temporary_macro_definition.  Remove
13965         cleanups.
13966         (free_macro_definition_ptr): Remove.
13967
13968 2018-02-08  Tom Tromey  <tom@tromey.com>
13969
13970         * macroexp.c (maybe_expand): Use std::string.
13971
13972 2018-02-08  Tom Tromey  <tom@tromey.com>
13973
13974         * macroexp.c (struct macro_buffer): Add initializers for some
13975         members.
13976         (init_buffer, init_shared_buffer, free_buffer)
13977         (free_buffer_return_text): Remove.
13978         (macro_buffer): New constructors.
13979         (~macro_buffer): New destructor.
13980         (macro_buffer::set_shared): New method.
13981         (macro_buffer::resize_buffer, macro_buffer::appendc)
13982         (macro_buffer::appendmem): Now methods, not free functions.
13983         (set_token, append_tokens_without_splicing, stringify)
13984         (macro_stringify): Update.
13985         (gather_arguments): Change return type.  Remove argc_p argument,
13986         add args_ptr argument.  Use std::vector.
13987         (substitute_args): Remove argc argument.  Accept std::vector.
13988         (expand): Update.  Use std::vector.
13989         (scan, macro_expand, macro_expand_next): Update.
13990
13991 2018-02-08  Tom Tromey  <tom@tromey.com>
13992
13993         * symtab.c (default_collect_symbol_completion_matches_break_on):
13994         Use unique_xmalloc_ptr.
13995         * macroscope.h: (sal_macro_scope, user_macro_scope)
13996         (default_macro_scope): Return unique_xmalloc_ptr.
13997         * macroscope.c (sal_macro_scope, user_macro_scope)
13998         (default_macro_scope): Return unique_xmalloc_ptr.
13999         * macroexp.h (macro_expand, macro_expand_once): Return
14000         unique_xmalloc_ptr.
14001         * macroexp.c (macro_expand, macro_expand_once): Return
14002         unique_xmalloc_ptr.
14003         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14004         (info_macro_command, info_macros_command): Use
14005         unique_xmalloc_ptr.
14006         * compile/compile-c-support.c (write_macro_definitions): Use
14007         unique_xmalloc_ptr.
14008         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14009
14010 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14011
14012         * value.c (value_static_field): Assign field type instead of
14013         containing type when returning an optimized out value.
14014
14015 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14016
14017         * ft32-tdep.c (ft32_read_pc): Remove.
14018         (ft32_write_pc): Remove.
14019         (ft32_gdbarch_init): Update.
14020         * m32r-tdep.c (m32r_read_pc): Remove.
14021         (m32r_gdbarch_init): Update.
14022         * mep-tdep.c (mep_read_pc): Remove.
14023         (mep_gdbarch_init): Update.
14024         * microblaze-tdep.c (microblaze_write_pc): Remove.
14025         (microblaze_gdbarch_init): Update.
14026         * mn10300-tdep.c (mn10300_read_pc): Remove.
14027         (mn10300_write_pc): Remove.
14028         (mn10300_gdbarch_init): Update.
14029         * moxie-tdep.c (moxie_read_pc): Remove.
14030         (moxie_write_pc): Remove.
14031         (moxie_gdbarch_init): Update.
14032
14033 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14034
14035         * expprint.c (print_subexp_standard): Handle
14036         OP_F77_UNDETERMINED_ARGLIST.
14037         (dump_subexp_body_standard): Likewise.
14038
14039 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14040
14041         * target-descriptions.c (tdesc_element_visitor) Add empty
14042         implementations.
14043         (tdesc_type): Move make_gdb_type from here.
14044         (tdesc_type_builtin): Likewise.
14045         (tdesc_type_vector): Likewise.
14046         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14047         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14048         (make_gdb_type_union): Likewise.
14049         (make_gdb_type_flags): Likewise.
14050         (make_gdb_type_enum): Likewise.
14051         (make_gdb_type): New function.
14052         (tdesc_register_type): Use static make_gdb_type.
14053
14054 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14055
14056         * infcmd.c (default_print_one_register_info): Align natural-format
14057         column values consistently one under another.
14058         (pad_to_column): New function.
14059
14060 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14061
14062         * dwarf2read.c (dwarf2_physname): Move commment.
14063
14064 2018-02-01  Leszek Swirski  <leszeks@google.com>
14065
14066         * varobj.c (varobj_formatted_print_options): Allow recursive
14067         pretty printing if pretty printing is enabled.
14068
14069 2018-02-01  Leszek Swirski  <leszeks@google.com>
14070
14071         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14072         names after a structop as a filename.
14073
14074 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14075
14076         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14077         (arm_record_coproc_data_proc): Likewise.
14078
14079 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14080
14081         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14082
14083 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14084
14085         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14086         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14087
14088 2018-01-31  Pedro Alves  <palves@redhat.com>
14089
14090         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14091         * inflow.c (child_terminal_save_inferior): Wrap reference to
14092         tcgetpgrp in HAVE_TERMIOS_H.
14093         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14094         _WIN32.
14095         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14096         always iterate over all inferiors.
14097         (gdbsim_cntrl_c): Adjust.
14098         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14099
14100 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14101
14102         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14103         index type is objfile-owned if the element type is as well.
14104
14105 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14106
14107         GDB 8.1 released.
14108
14109 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14110
14111         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14112         "features/s390x-linux64.c".
14113         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14114         s390_linux32 and s390x_linux64.
14115         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14116         default tdesc.
14117         * s390-tdep.c: Include "features/s390-linux32.c" and
14118         "features/s390x-linux64.c".
14119         (s390_tdesc_valid): Add check for tdesc_has_registers.
14120         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14121         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14122         tdesc_s390x_linux64.
14123         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14124         tdesc_s390x_linux64 to...
14125         * s390-tdep.h: ...here.
14126
14127 2018-01-30  Pedro Alves  <palves@redhat.com>
14128
14129         PR gdb/13211
14130         * config.in, configure: Regenerate.
14131         * configure.ac: Check for getpgid.
14132         * go32-nat.c (go32_pass_ctrlc): New.
14133         (go32_target): Install it.
14134         * inf-child.c (inf_child_target): Install
14135         child_terminal_save_inferior, child_pass_ctrlc and
14136         child_interrupt.
14137         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14138         (inf_ptrace_target): No longer install it.
14139         * infcmd.c (interrupt_target_1): Adjust.
14140         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14141         (child_interrupt): Declare.
14142         (inferior::terminal_state): New.
14143         * inflow.c (struct terminal_info): Update comments.
14144         (inferior_process_group): Delete.
14145         (terminal_is_ours): Delete.
14146         (gdb_tty_state): New.
14147         (child_terminal_init): Adjust.
14148         (is_gdb_terminal, sharing_input_terminal_1)
14149         (sharing_input_terminal): New functions.
14150         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14151         Set the process's actual process group in the foreground if
14152         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14153         mark terminal as the inferior's if not sharing GDB's terminal.
14154         Don't check attach_flag.
14155         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14156         pass down a target_terminal_state.
14157         (child_terminal_save_inferior): New, factored out from ...
14158         (child_terminal_ours_1): ... this.  Handle
14159         target_terminal_state::is_ours_for_output.
14160         (child_interrupt, child_pass_ctrlc): New.
14161         (inflow_inferior_exit): Clear the inferior's terminal_state.
14162         (copy_terminal_info): Copy the inferior's terminal state.
14163         (_initialize_inflow): Remove reference to terminal_is_ours.
14164         * inflow.h (inferior_process_group): Delete.
14165         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14166         * procfs.c (procfs_target): Don't install procfs_interrupt.
14167         (procfs_interrupt): Delete.
14168         * remote.c (remote_serial_quit_handler): Adjust.
14169         (remote_interrupt): Remove ptid parameter.  Adjust.
14170         * target-delegates.c: Regenerate.
14171         * target.c: Include "terminal.h".
14172         (target_terminal::terminal_state): Rename to ...
14173         (target_terminal::m_terminal_state): ... this.
14174         (target_terminal::init): Adjust.
14175         (target_terminal::inferior): Adjust to per-inferior
14176         terminal_state.
14177         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14178         (target_terminal::ours, target_terminal::ours_for_output): Use
14179         target_terminal_is_ours_kind.
14180         (target_interrupt): Remove ptid parameter.  Adjust.
14181         (default_target_pass_ctrlc): Adjust.
14182         * target.h (target_ops::to_terminal_save_inferior): New field.
14183         (target_ops::to_interrupt): Remove ptid_t parameter.
14184         (target_interrupt): Remove ptid_t parameter.  Update comment.
14185         (target_pass_ctrlc): Update comment.
14186         * target/target.h (target_terminal_state): New scoped enum,
14187         factored out of ...
14188         (target_terminal::terminal_state): ... here.
14189         (target_terminal::inferior): Update comments.
14190         (target_terminal::restore_inferior): New.
14191         (target_terminal::is_inferior, target_terminal::is_ours)
14192         (target_terminal::is_ours_for_output): Adjust.
14193         (target_terminal::scoped_restore_terminal_state): Adjust to
14194         rename, and call restore_inferior() instead of inferior().
14195         (target_terminal::scoped_restore_terminal_state::m_state): Change
14196         type.
14197         (target_terminal::terminal_state): Rename to ...
14198         (target_terminal::m_terminal_state): ... this and change type.
14199
14200 2018-01-30  Pedro Alves  <palves@redhat.com>
14201
14202         * linux-nat.c (wait_for_signal): New function.
14203         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14204         directly.
14205         (async_terminal_is_ours)
14206         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14207         (linux_nat_add_target): Don't override
14208         to_terminal_inferior/to_terminal_ours.
14209
14210 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14211
14212         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14213
14214 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14215
14216         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14217         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14218         dwarf2_per_objfile_free here.
14219         (dwarf2_per_objfile_free): Remove.
14220         (_initialize_dwarf2_read): Don't register
14221         dwarf2_per_objfile_free as a registry cleanup.
14222
14223 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14224
14225         Avoid compilation errors in MinGW native builds
14226
14227         The error is triggered by including python-internal.h, and the
14228         error message is:
14229
14230              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14231                       from build-gnulib/import/math.h:27,
14232                       from d:/usr/Python26/include/pyport.h:235,
14233                       from d:/usr/Python26/include/Python.h:58,
14234                       from python/python-internal.h:94,
14235                       from python/py-arch.c:24:
14236              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14237         using ::hypot;
14238                 ^~~~~
14239
14240         This happens because Python headers define 'hypot' to expand t
14241         '_hypot' in the Windows builds.
14242         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14243         'hypoth'.  This avoids a compilation error.
14244
14245 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14246
14247         * MAINTAINERS (Write After Approval): Fix ordering.
14248
14249 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14250
14251         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14252
14253 2018-01-26  Alan Modra  <amodra@gmail.com>
14254
14255         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14256         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14257         Remove nop.  Make const.  Comment.
14258         (powerpc32_plt_stub_so_2): New.
14259         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14260         Correct count.  Update uses.
14261         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14262         Move common code reading PLT entry word.  Correct
14263         powerpc32_plt_stub PLT address calculation.
14264         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14265         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14266         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14267         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14268         (ppc64_standard_linkage8): Likewise.
14269         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14270         Correct insns description.
14271         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14272
14273 2018-01-24  Pedro Alves  <palves@redhat.com>
14274
14275         GCC PR libstdc++/83906
14276         * gdbtypes.c (operator==(const dynamic_prop &,
14277         const dynamic_prop &)): New.
14278         (operator==(const range_bounds &, const range_bounds &)): New.
14279         (check_types_equal): Use them instead of memcmp.
14280         * gdbtypes.h (operator==(const dynamic_prop &,
14281         const dynamic_prop &)): Declare.
14282         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14283         (operator==(const range_bounds &, const range_bounds &)): Declare.
14284         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14285
14286 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14287
14288         * s390-linux-tdep.c (s390_record_address_mask)
14289         (s390_record_calc_disp_common, s390_record_calc_disp)
14290         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14291         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14292         (s390_process_record): Move to s390-tdep.c.
14293         (s390_linux_init_abi_any): Adjust.
14294         * s390-tdep.c (s390_record_address_mask)
14295         (s390_record_calc_disp_common, s390_record_calc_disp)
14296         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14297         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14298         (s390_process_record): Moved from s390-linux-tdep.c
14299         (s390_gdbarch_init): Adjust.
14300
14301 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14302
14303         * s390-linux-nat.c (s390-tdep.h): New include.
14304         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14305         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14306         (ALLDEPFILES): Add s390-tdep.c.
14307         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14308         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14309         * s390-tdep.h: ...this.  New file.
14310         * s390-linux-tdep.c (s390-tdep.h): New include.
14311         (_initialize_s390_tdep): Rename to...
14312         (_initialize_s390_linux_tdep): ...this and adjust.
14313         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14314         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14315         s390-tdep.h.
14316         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14317         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14318         (s390_is_partial_instruction, s390_software_single_step)
14319         (is_non_branch_ril, s390_displaced_step_copy_insn)
14320         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14321         (s390_prologue_data, s390_addr, s390_store, s390_load)
14322         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14323         (s390_register_call_saved, s390_guess_tracepoint_registers)
14324         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14325         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14326         (s390_pseudo_register_name, s390_pseudo_register_type)
14327         (s390_pseudo_register_read, s390_pseudo_register_write)
14328         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14329         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14330         (s390_addr_bits_remove, s390_address_class_type_flags)
14331         (s390_address_class_type_flags_to_name)
14332         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14333         (s390_function_arg_float, s390_function_arg_vector)
14334         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14335         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14336         (s390_frame_align, s390_register_return_value, s390_return_value)
14337         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14338         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14339         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14340         (s390_trad_frame_prev_register, s390_unwind_cache)
14341         (s390_prologue_frame_unwind_cache)
14342         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14343         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14344         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14345         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14346         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14347         (s390_frame_base_address, s390_local_base_address)
14348         (s390_frame_base, s390_gcc_target_options)
14349         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14350         (s390_validate_reg_range, s390_tdesc_valid)
14351         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14352         * s390-tdep.c: ...this.  New file.
14353
14354 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14355
14356         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14357         (s390_process_record, s390_gdbarch_tdep_alloc)
14358         (s390_linux_init_abi_any): Use/set new hook.
14359
14360 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14361
14362         * s390-linux-tdep.c (osabi.h): New include.
14363         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14364         (s390_linux_init_abi_any): New functions.
14365         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14366
14367 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14368
14369         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14370         tdesc_has_registers check
14371
14372 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14373
14374         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14375         (s390_validate_reg_range): New macro.
14376         (s390_gdbarch_init): Adjust.
14377
14378 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14379
14380         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14381         (s390_gdbarch_tdep_alloc): Adjust.
14382         (s390_gdbarch_init): Adjust.
14383
14384 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14385
14386         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14387         <have_tdb>: Change type to bool.
14388         (s390_gdbarch_tdep_alloc): Adjust.
14389         (s390_gdbarch_init): Adjust.
14390
14391 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14392
14393         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14394         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14395         (s390_gdbarch_tdep_alloc): New function.
14396         (s390_gdbarch_init): Allocate tdep at start and use its fields
14397         instead of separate variables.
14398
14399 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14400
14401         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14402         when looking for cached gdbarch and add comment for remaining.
14403
14404 2018-01-22  Pedro Alves  <palves@redhat.com>
14405             Sergio Durigan Junior  <sergiodj@redhat.com>
14406
14407         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14408         case.
14409
14410 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14411
14412         * MAINTAINERS: Update my company e-mail address.
14413
14414 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14415
14416         * regcache.c (cooked_write_test): New function.
14417         (_initialize_regcache): Register the test.
14418
14419 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14420
14421         * ia64-tdep.c (ia64_pseudo_register_read): Call
14422         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14423         * m32c-tdep.c (m32c_cat_read): Likewise.
14424         (m32c_r3r2r1r0_read): Likewise.
14425         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14426         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14427
14428 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14429
14430         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14431         method raw_read instead of regcache_raw_read.
14432         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14433         * arm-tdep.c (arm_neon_quad_read): Likewise.
14434         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14435         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14436         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14437         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14438         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14439         (i386_pseudo_register_read_into_value): Likewise.
14440         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14441         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14442         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14443         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14444         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14445         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14446         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14447         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14448         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14449
14450 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14451
14452         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14453         * configure.tgt: Remove target mt.
14454         * mt-tdep.c: Remove.
14455         * regcache.c (cooked_read_test): Remove the check for mt.
14456
14457 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14458
14459         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14460         instead of gdbarch_pseudo_register_read_value.
14461
14462 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14463
14464         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14465         language is Ada.
14466
14467 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14468
14469         * linespec.c (create_sals_line_offset): Remove code that preserved
14470         the symtab_and_line's line number.
14471
14472 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14473
14474         * varobj.c (varobj_create): Don't set valid_block when creating a
14475         floating varobj.
14476
14477 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14478
14479         * varobj.c (varobj_create): Remove out of date comment.
14480
14481 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14482
14483         PR mi/20395
14484         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14485         updating innermost block.
14486         * parse.c (innermost_block_tracker::update): Take extra type
14487         parameter, and check types match before updating innermost block.
14488         (write_dollar_variable): Update innermost block for registers.
14489         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14490         (innermost_block_tracker::innermost_block_tracker): Initialise
14491         m_types member.
14492         (innermost_block_tracker::reset): Take type parameter.
14493         (innermost_block_tracker::update): Take type parameter, and pass
14494         type through as needed.
14495         (innermost_block_tracker::m_types): New member.
14496         * varobj.c (varobj_create): Pass type when reseting innermost
14497         block.
14498
14499 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14500
14501         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14502         * ada-lang.c (resolve_subexp): Likewise.
14503         * breakpoint.c (set_breakpoint_condition) Likewise.
14504         (watch_command_1) Likewise.
14505         * c-exp.y (variable): Likewise.
14506         * d-exp.y (PrimaryExpression): Likewise.
14507         * f-exp.y (variable): Likewise.
14508         * go-exp.y (variable): Likewise.
14509         * m2-exp.y (variable): Likewise.
14510         * objfiles.c (objfile::~objfile): Likewise.
14511         * p-exp.y (variable): Likewise.
14512         * parse.c (innermost_block): Change type.
14513         * parser-defs.h (class innermost_block_tracker): New.
14514         (innermost_block): Change to innermost_block_tracker.
14515         * printcmd.c (display_command): Switch to innermost_block API.
14516         (do_one_display): Likewise.
14517         * rust-exp.y (do_one_display): Likewise.
14518         * symfile.c (clear_symtab_users): Likewise.
14519         * varobj.c (varobj_create): Switch to innermost_block API, replace
14520         use of innermost_block with block stored on varobj object.
14521
14522 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14523
14524         * expression.h (innermost_block): Remove declaration.
14525         * varobj.c: Add 'parser-defs.h' include.
14526
14527 2018-01-19  Tom Tromey  <tom@tromey.com>
14528
14529         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14530         symbols in the static and global blocks.
14531
14532 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14533
14534         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14535         gdb_ptrace.h, and move including gdb_wait.h ...
14536         * nat/linux-ptrace.h: ... to here.
14537
14538 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14539
14540         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14541         inf_ptrace_detach_success.
14542         (inf_ptrace_detach_success): Add inferior parameter, use it
14543         instead of inferior_ptid, pass it to detach_inferior.
14544         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14545         parameter.
14546         * inferior.c (detach_inferior): Add overload that takes an
14547         inferior object.
14548         * inferior.h (detach_inferior): Likewise.
14549         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14550         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14551         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14552
14553 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14554
14555         * target.h (struct target_ops) <to_detach>: Add inferior
14556         parameter.
14557         (target_detach): Likewise.
14558         * target.c (dispose_inferior): Pass inferior down.
14559         (target_detach): Pass inferior down.  Assert that it is equal to
14560         the current inferior.
14561         * aix-thread.c (aix_thread_detach): Pass inferior down.
14562         * corefile.c (core_file_command): Pass current_inferior() down.
14563         * corelow.c (core_detach): Add inferior parameter.
14564         * darwin-nat.c (darwin_detach): Likewise.
14565         * gnu-nat.c (gnu_detach): Likewise.
14566         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14567         * infcmd.c (detach_command): Pass current_inferior() down to
14568         target_detach.
14569         * infrun.c (follow_fork_inferior): Pass parent_inf to
14570         target_detach.
14571         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14572         target_detach.
14573         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14574         * linux-thread-db.c (thread_db_detach): Likewise.
14575         * nto-procfs.c (procfs_detach): Likewise.
14576         * procfs.c (procfs_detach): Likewise.
14577         * record.c (record_detach): Likewise.
14578         * record.h (struct inferior): Forward-declare.
14579         (record_detach): Add inferior parameter.
14580         * remote-sim.c (gdbsim_detach): Likewise.
14581         * remote.c (remote_detach_1): Likewise.
14582         (remote_detach): Likewise.
14583         (extended_remote_detach): Likewise.
14584         * sol-thread.c (sol_thread_detach): Likewise.
14585         * target-debug.h (target_debug_print_inferior_p): New macro.
14586         * target-delegates.c: Re-generate.
14587         * top.c (kill_or_detach): Pass inferior down to target_detach.
14588         * windows-nat.c (windows_detach): Add inferior parameter.
14589
14590 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14591
14592         * target.h (struct target_ops) <to_detach>: Remove args
14593         parameter.
14594         (target_detach): Likewise.
14595         * target.c (dispose_inferior): Adjust.
14596         (target_detach): Remove args parameter, adjust.
14597         * aix-thread.c (aix_thread_detach): Adjust.
14598         * corefile.c (core_file_command): Adjust.
14599         * corelow.c (core_detach): Adjust.
14600         * darwin-nat.c (darwin_detach): Adjust.
14601         * gnu-nat.c (gnu_detach): Adjust.
14602         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14603         * infcmd.c (detach_command): Adjust
14604         * infrun.c (follow_fork_inferior): Adjust.
14605         (handle_vfork_child_exec_or_exit): Adjust.
14606         * linux-fork.c (linux_fork_detach): Remove args parameter.
14607         * linux-fork.h (linux_fork_detach): Likewise.
14608         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14609         * linux-thread-db.c (thread_db_detach): Likewise.
14610         * nto-procfs.c (procfs_detach): Likewise.
14611         * procfs.c (procfs_detach): Likewise.
14612         (do_detach): Remove signo parameter.
14613         * record.c (record_detach): Remove args parameter.
14614         * record.h (record_detach): Likewise.
14615         * remote-sim.c (gdbsim_detach): Likewise.
14616         * remote.c (remote_detach_1): Likewise.
14617         (remote_detach): Likewise.
14618         (extended_remote_detach): Likewise.
14619         * sol-thread.c (sol_thread_detach): Likewise.
14620         * target-delegates.c: Re-generate.
14621         * top.c (struct qt_args) <args>: Remove field.
14622         (kill_or_detach): Don't pass args.
14623         (quit_force): Don't set args.
14624         * windows-nat.c (windows_detach): Remove args parameter.
14625
14626 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14627
14628         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14629         (arm_linux_init_abi): Install it.
14630
14631 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14632
14633         * osabi.c (gdb_osabi_names): Extend the regexp for
14634         arm-linux-gnueabihf.
14635
14636 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14637
14638         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14639         m_abbrevs.
14640         (abbrev_table::add_abbrev): Update.
14641         (abbrev_table::lookup_abbrev): Update.
14642
14643 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14644
14645         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14646
14647 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14648
14649         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14650         to "std::string".
14651
14652 2018-01-17  Tom Tromey  <tom@tromey.com>
14653
14654         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14655
14656 2018-01-17  Tom Tromey  <tom@tromey.com>
14657
14658         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14659         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14660         (create_array_type_with_stride): Update.
14661         * dwarf2read.c (set_die_type): Update.
14662
14663 2018-01-17  Tom Tromey  <tom@tromey.com>
14664
14665         * dwarf2read.c (delayed_method_info): Remove typedef.
14666         (dwarf2_cu::method_info): Now a std::vector.
14667         (add_to_method_list): Update.
14668         (free_delayed_list): Remove.
14669         (compute_delayed_physnames): Update.
14670         (process_full_comp_unit, process_full_type_unit): Clear the method
14671         list.  Remove cleanups.
14672         (psymtab_include_file_name): Add name_holder parameter.  Use
14673         unique_xmalloc_ptr.
14674         (dwarf_decode_lines): Update.
14675
14676 2018-01-17  Tom Tromey  <tom@tromey.com>
14677             Simon Marchi  <simon.marchi@ericsson.com>
14678
14679         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14680         (dwarf2_per_objfile::free_cached_comp_units)
14681         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14682         (init_cutu_and_read_dies_no_follow): Update.
14683         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14684         (dwarf2_cu::~dwarf2_cu): New.
14685         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14686         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14687
14688 2018-01-17  Tom Tromey  <tom@tromey.com>
14689             Simon Marchi  <simon.marchi@ericsson.com>
14690
14691         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14692         (struct die_reader_specs) <abbrev_table>: New member.
14693         (struct abbrev_table): Add constructor.
14694         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14695         <abbrev_obstack>: Now an auto_obstack.
14696         (abbrev_table_up): New typedef.
14697         (init_cu_die_reader): Add abbrev_table parameter.
14698         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14699         Add result_dwo_abbrev_table.
14700         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14701         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14702         Update.
14703         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14704         parameter.
14705         (skip_children): Update.
14706         (abbrev_table::alloc_abbrev): Rename from
14707         abbrev_table_alloc_abbrev.
14708         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14709         (abbrev_table::lookup_abbrev): Rename from
14710         abbrev_table_lookup_abbrev.
14711         (abbrev_table_read_table): Return abbrev_table_up.
14712         (abbrev_table_free, abbrev_table_free_cleanup)
14713         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14714         (load_partial_dies): Update.
14715
14716 2018-01-17  Tom Tromey  <tom@tromey.com>
14717
14718         * dwarf2read.c (dwarf2_compute_name): Update comment.
14719         (read_func_scope, read_variable): Update.
14720         (new_symbol): Remove.
14721         (new_symbol_full): Rename to new_symbol.
14722
14723 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14724
14725         PR gdb/16577
14726         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14727         a warning instead of throwing an error, set section size to 0 and return
14728         NULL.
14729         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14730
14731 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14732
14733         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14734         std::string.
14735         (linux_ptrace_attach_fail_reason_string): Likewise.
14736         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14737         Likewise.
14738         (linux_ptrace_attach_fail_reason_string): Likewise.
14739         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14740
14741 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14742
14743         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14744
14745 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14746
14747         PR gdb/21559
14748         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14749         checking for fs_base/gs_base fields in struct user_regs_struct.
14750         * configure: Regenerate.
14751
14752 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14753
14754         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14755         function.
14756         (aarch64_linux_init_abi): Install it to gdbarch hook
14757         gcc_target_options.
14758
14759 2018-01-15  Pedro Alves  <palves@redhat.com>
14760
14761         * common/signals-state-save-restore.c
14762         (save_original_signals_state): Fix typos.
14763
14764 2017-01-12  Tom Tromey  <tom@tromey.com>
14765             Sergio Durigan Junior  <sergiodj@redhat.com>
14766
14767         * Makefile.in (install-only): Install gdb-add-index.
14768
14769 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14770
14771         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14772
14773 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14774
14775         * infrun.c (keep_going_pass_signal): Clear step-over info when
14776         insert_breakpoints fails.
14777
14778 2018-01-11  Pedro Alves  <palves@redhat.com>
14779
14780         PR gdb/22583
14781         * infrun.c (resume): Rename to ...
14782         (resume_1): ... this.
14783         (resume): Reimplement as wrapper around resume_1.
14784
14785 2018-01-11  Pedro Alves  <palves@redhat.com>
14786
14787         PR remote/22597
14788         * remote.c (remote_parse_stop_reply): Default to the last-set
14789         general thread instead of to 'magic_null_ptid'.
14790
14791 2018-01-10  Pedro Alves  <palves@redhat.com>
14792
14793         * language.h (language_get_symbol_name_matcher): Rename ...
14794         (get_symbol_name_matcher): ... this.
14795         * language.c (language_get_symbol_name_matcher): Ditto.
14796         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14797         callers adjusted.
14798
14799 2018-01-10  Pedro Alves  <palves@redhat.com>
14800
14801         PR gdb/22670
14802         * dwarf2read.c
14803         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14804         Adjust to use language_get_symbol_name_matcher instead of
14805         language_defn::la_get_symbol_name_matcher.
14806         * language.c (language_get_symbol_name_matcher): If in Ada mode
14807         and the lookup name is a verbatim match, return Ada's matcher.
14808         * language.h (language_get_symbol_name_matcher): Adjust comment.
14809         (ada_lookup_name_info::verbatim_p):: New method.
14810
14811 2018-01-10  Pedro Alves  <palves@redhat.com>
14812
14813         PR gdb/22670
14814         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14815         minsym's language is language_auto or language_cplus, pass down
14816         language_ada instead.
14817         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14818
14819 2018-01-10  Pedro Alves  <palves@redhat.com>
14820
14821         PR gdb/22670
14822         * minsyms.c (linkage_name_str): New function.
14823         (iterate_over_minimal_symbols): Use it.
14824
14825 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14826
14827         * NEWS: Document that 'info proc' now works on FreeBSD.
14828
14829 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14830
14831         * configure.ac: Check for kinfo_getfile in libutil.
14832         * configure: Regenerate.
14833         * config.in: Regenerate.
14834         * fbsd-nat.c: Include "fbsd-tdep.h".
14835         (fbsd_fetch_cmdline): New.
14836         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14837         rather than calling error.
14838         (fbsd_info_proc): New.
14839         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14840         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14841         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14842
14843 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14844
14845         * fbsd-nat.c (struct free_deleter): Remove.
14846         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14847
14848 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14849
14850         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14851         NULL for an empty pathname.
14852
14853 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14854
14855         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14856         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14857         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14858         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14859         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14860         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14861         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14862         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14863         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14864         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14865         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14866         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14867         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14868         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14869         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14870
14871 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14872
14873         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14874         (gnu_xfer_auxv): New function.
14875         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14876         TARGET_OBJECT_AUXV.
14877
14878 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14879             Simon Marchi  <simon.marchi@ericsson.com>
14880
14881         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14882         common/selftest.c.
14883         (COMMON_OBS): Remove selftest.o.
14884         * configure.ac: Append selftest-arch.c and common/selftest.c to
14885         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14886         * configure: Re-generated.
14887         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14888         GDB_SELF_TEST.
14889         (maintenance_info_selftests): Likewise.
14890
14891 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14892
14893         * ada-valprint.c (val_print_packed_array_elements): Use
14894         proper number of elements when printing an array indexed
14895         by an enumeration type.
14896
14897 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14898
14899         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14900         (dw2_get_file_names_reader): Adjust.
14901         (lookup_dwo_signatured_type): Adjust.
14902         (lookup_dwp_signatured_type): Adjust.
14903         (lookup_signatured_type): Adjust.
14904         (create_type_unit_group): Adjust.
14905         (get_type_unit_group): Adjust.
14906         (process_psymtab_comp_unit_reader): Adjust.
14907         (build_type_psymtabs_reader): Adjust.
14908         (scan_partial_symbols): Adjust.
14909         (add_partial_symbol): Adjust.
14910         (add_partial_subprogram): Adjust.
14911         (peek_die_abbrev): Adjust.
14912         (fixup_go_packaging): Adjust.
14913         (process_imported_unit_die): Adjust.
14914         (dwarf2_compute_name): Adjust.
14915         (dwarf2_physname): Adjust.
14916         (read_import_statement): Adjust.
14917         (handle_DW_AT_stmt_list): Adjust.
14918         (read_file_scope): Adjust.
14919         (read_func_scope): Adjust.
14920         (read_lexical_block_scope): Adjust.
14921         (read_call_site_scope): Adjust.
14922         (read_variable): Adjust.
14923         (dwarf2_rnglists_process): Adjust.
14924         (dwarf2_ranges_process): Adjust.
14925         (dwarf2_ranges_read): Adjust.
14926         (dwarf2_get_pc_bounds): Adjust.
14927         (dwarf2_record_block_ranges): Adjust.
14928         (dwarf2_add_field): Adjust.
14929         (dwarf2_add_member_fn): Adjust.
14930         (read_structure_type): Adjust.
14931         (process_structure_scope): Adjust.
14932         (read_enumeration_type): Adjust.
14933         (read_array_type): Adjust.
14934         (mark_common_block_symbol_computed): Adjust.
14935         (read_common_block): Adjust.
14936         (read_namespace_type): Adjust.
14937         (read_namespace): Adjust.
14938         (read_module_type): Adjust.
14939         (read_tag_pointer_type): Adjust.
14940         (read_tag_ptr_to_member_type): Adjust.
14941         (read_tag_string_type): Adjust.
14942         (read_subroutine_type): Adjust.
14943         (read_typedef): Adjust.
14944         (read_base_type): Adjust.
14945         (attr_to_dynamic_prop): Adjust.
14946         (read_subrange_type): Adjust.
14947         (read_unspecified_type): Adjust.
14948         (dwarf2_read_abbrevs): Adjust.
14949         (load_partial_dies): Adjust.
14950         (read_partial_die): Adjust.
14951         (find_partial_die): Adjust.
14952         (guess_partial_die_structure_name): Adjust.
14953         (fixup_partial_die): Adjust.
14954         (read_attribute_value): Adjust.
14955         (read_addr_index): Adjust.
14956         (read_addr_index_from_leb128): Adjust.
14957         (read_str_index): Adjust.
14958         (dwarf2_string_attr): Adjust.
14959         (get_debug_line_section): Adjust.
14960         (dwarf_decode_line_header): Adjust.
14961         (lnp_state_machine::check_line_address): Adjust.
14962         (dwarf_decode_lines_1): Adjust.
14963         (dwarf_decode_lines): Adjust.
14964         (dwarf2_start_symtab): Adjust.
14965         (var_decode_location): Adjust.
14966         (new_symbol_full): Adjust.
14967         (dwarf2_const_value_data): Adjust.
14968         (dwarf2_const_value_attr): Adjust.
14969         (dwarf2_const_value): Adjust.
14970         (die_type): Adjust.
14971         (die_containing_type): Adjust.
14972         (build_error_marker_type): Adjust.
14973         (lookup_die_type): Adjust.
14974         (guess_full_die_structure_name): Adjust.
14975         (anonymous_struct_prefix): Adjust.
14976         (determine_prefix): Adjust.
14977         (dwarf2_name): Adjust.
14978         (follow_die_ref_or_sig): Adjust.
14979         (follow_die_offset): Adjust.
14980         (follow_die_ref): Adjust.
14981         (follow_die_sig_1): Adjust.
14982         (follow_die_sig): Adjust.
14983         (get_signatured_type): Adjust.
14984         (get_DW_AT_signature_type): Adjust.
14985         (decode_locdesc): Adjust.
14986         (dwarf_decode_macros): Adjust.
14987         (cu_debug_loc_section): Adjust.
14988         (fill_in_loclist_baton): Adjust.
14989         (dwarf2_symbol_mark_computed): Adjust.
14990         (init_one_comp_unit): Don't assign
14991         dwarf2_cu::dwarf2_per_objfile.
14992         (set_die_type): Adjust.
14993
14994 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14995
14996         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14997         <dwarf2_per_objfile>: New field.
14998         (dwarf2_per_objfile): Remove global.
14999         (get_dwarf2_per_objfile): New function.
15000         (set_dwarf2_per_objfile): New function.
15001         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15002         dwarf2_per_objfile.
15003         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15004         (read_abbrev_offset): Likewise.
15005         (read_indirect_string): Likewise.
15006         (read_indirect_line_string): Likewise.
15007         (read_indirect_string_at_offset): Likewise.
15008         (read_indirect_string_from_dwz): Likewise.
15009         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15010         dwarf2_per_objfile.
15011         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15012         (create_all_comp_units): Change objfile parameter to
15013         dwarf2_per_objfile.
15014         (create_all_type_units): Likewise.
15015         (process_queue): Add dwarf2_per_objfile parameter.
15016         (read_and_check_comp_unit_head): Likewise.
15017         (lookup_dwo_unit_in_dwp): Likewise.
15018         (get_dwp_file): Likewise.
15019         (process_cu_includes): Likewise.
15020         (struct free_dwo_file_cleanup_data): New struct.
15021         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15022         set_dwarf2_per_objfile.
15023         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15024         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15025         context, adjust calls.
15026         (dw2_instantiate_symtab): Likewise.
15027         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15028         (dw2_get_cu): Likewise.
15029         (create_cu_from_index_list): Change objfile parameter to
15030         dwarf2_per_objfile.
15031         (create_cus_from_index_list): Get dwarf2_per_objfile from
15032         context, adjust calls.
15033         (create_cus_from_index): Likewise.
15034         (create_signatured_type_table_from_index): Change objfile
15035         parameter to dwarf2_per_objfile.
15036         (create_signatured_type_table_from_debug_names): Change objfile
15037         parameter to dwarf2_per_objfile.
15038         (create_addrmap_from_index): Likewise.
15039         (create_addrmap_from_aranges): Likewise.
15040         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15041         (dw2_setup): Remove.
15042         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15043         context.
15044         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15045         get_dwarf2_per_objfile.
15046         (dw2_forget_cached_source_info): Likewise.
15047         (dw2_map_symtabs_matching_filename): Likewise.
15048         (struct dw2_symtab_iterator) <index>: Remove.
15049         <dwarf2_per_objfile>: New field.
15050         (dw2_symtab_iter_init): Replace index parameter with
15051         dwarf2_per_objfile.
15052         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15053         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15054         (dw2_print_stats): Likewise.
15055         (dw2_dump): Likewise.
15056         (dw2_expand_symtabs_for_function): Likewise.
15057         (dw2_expand_all_symtabs): Likewise.
15058         (dw2_expand_symtabs_with_fullname): Likewise.
15059         (dw2_expand_marked_cus): Replace index and objfile parameters
15060         with dwarf2_per_objfile.
15061         (dw_expand_symtabs_matching_file_matcher): Add
15062         dwarf2_per_objfile parameter and adjust calls.
15063         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15064         adjust calls.
15065         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15066         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15067         adjust calls.
15068         (create_cus_from_debug_names_list): Replace objfile parameter
15069         with dwarf2_per_objfile and adjust calls.
15070         (create_cus_from_debug_names): Likewise.
15071         (dwarf2_read_debug_names): Likewise.
15072         (mapped_debug_names::namei_to_name): Adjust call.
15073         (dw2_debug_names_iterator::next): Likewise.
15074         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15075         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15076         (dw2_debug_names_dump): Likewise.
15077         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15078         (dw2_debug_names_expand_symtabs_matching): Likewise.
15079         (dwarf2_initialize_objfile): Likewise.
15080         (dwarf2_build_psymtabs): Likewise.
15081         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15082         this_cu.
15083         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15084         (read_and_check_comp_unit_head): Likewise.
15085         (read_abbrev_offset): Likewise.
15086         (create_debug_type_hash_table): Likewise.
15087         (create_debug_types_hash_table): Likewise.
15088         (create_all_type_units): Replace objfile parameter with
15089         dwarf2_per_objfile.
15090         (add_type_unit): Add dwarf2_per_objfile parameter.
15091         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15092         with dwarf2_per_objfile.
15093         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15094         (lookup_dwp_signatured_type): Likewise.
15095         (lookup_signatured_type): Likewise.
15096         (read_cutu_die_from_dwo): Likewise.
15097         (init_tu_and_read_dwo_dies): Likewise.
15098         (init_cutu_and_read_dies): Likewise.
15099         (init_cutu_and_read_dies_no_follow): Likewise.
15100         (allocate_type_unit_groups_table): Add objfile parameter.
15101         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15102         (get_type_unit_group): Likewise.
15103         (process_psymtab_comp_unit): Update call.
15104         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15105         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15106         (print_tu_stats): Likewise.
15107         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15108         in void* parameter.
15109         (build_type_psymtabs): Change objfile parameter to
15110         dwarf2_per_objfile.
15111         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15112         passed in void* parameter.
15113         (process_skeletonless_type_units): Change objfile parameter to
15114         dwarf2_per_objfile.
15115         (set_partial_user): Likewise.
15116         (dwarf2_build_psymtabs_hard): Likewise.
15117         (read_comp_units_from_section): Likewise.
15118         (create_all_comp_units): Likewise.
15119         (scan_partial_symbols): Update calls.
15120         (add_partial_symbol): Likewise.
15121         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15122         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15123         (process_queue): Add dwarf2_per_objfile parameter.
15124         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15125         (compute_compunit_symtab_includes): Likewise.
15126         (process_cu_includes): Add dwarf2_per_objfile parameter.
15127         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15128         (process_full_type_unit): Likewise.
15129         (process_imported_unit_die): Update call.
15130         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15131         (read_file_scope): Likewise.
15132         (allocate_dwo_file_hash_table): Add objfile parameter.
15133         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15134         (create_cus_hash_table): Likewise.
15135         (create_dwp_hash_table): Likewise.
15136         (create_dwo_unit_in_dwp_v1): Likewise.
15137         (create_dwp_v2_section): Likewise.
15138         (create_dwo_unit_in_dwp_v2): Likewise.
15139         (lookup_dwo_unit_in_dwp): Likewise.
15140         (try_open_dwop_file): Likewise.
15141         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15142         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15143         cleanup to include a reference to dwarf2_per_objfile.
15144         (open_dwp_file): Add dwarf2_per_objfile parameter.
15145         (open_and_init_dwp_file): Likewise.
15146         (get_dwp_file): Likewise.
15147         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15148         (queue_and_load_all_dwo_tus): Update call.
15149         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15150         data.
15151         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15152         (dwarf2_ranges_process): Likewise.
15153         (dwarf2_get_pc_bounds): Likewise.
15154         (mark_common_block_symbol_computed): Likewise.
15155         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15156         (dwarf2_read_abbrevs): Update call.
15157         (read_partial_die): Use dwarf2_per_objfile from cu.
15158         (find_partial_die): Likewise.
15159         (fixup_partial_die): Likewise.
15160         (read_attribute_value): Likewise.
15161         (read_indirect_string_at_offset_from): Add objfile parameter.
15162         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15163         parameter.
15164         (read_indirect_string_from_dwz): Add objfile parameter.
15165         (read_indirect_string): Add objfile parameter.
15166         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15167         (read_addr_index): Use dwarf2_per_objfile from cu.
15168         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15169         call dw2_setup.
15170         (read_str_index): Use dwarf2_per_objfile from cu.
15171         (get_debug_line_section): Likewise.
15172         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15173         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15174         (new_symbol_full): Use dwarf2_per_objfile from cu.
15175         (build_error_marker_type): Likewise.
15176         (lookup_die_type): Likewise.
15177         (determine_prefix): Likewise.
15178         (follow_die_offset): Likewise.
15179         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15180         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15181         (dwarf2_fetch_die_type_sect_off): Likewise.
15182         (dwarf2_get_die_type): Likewise.
15183         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15184         (get_signatured_type): Likewise.
15185         (get_DW_AT_signature_type): Likewise.
15186         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15187         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15188         (cu_debug_loc_section): Likewise.
15189         (fill_in_loclist_baton): Likewise.
15190         (dwarf2_symbol_mark_computed): Likewise.
15191         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15192         dwarf2_per_objfile.
15193         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15194         parameter.
15195         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15196         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15197         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15198         (set_die_type): Use dwarf2_free_objfile from cu.
15199         (get_die_type_at_offset): Likewise.
15200         (dwarf2_per_objfile_free): Don't assign global variable.
15201         (debug_names) <constructor>: Add dwarf2_per_objfile
15202         parameter, update m_debugstrlookup construction.
15203         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15204         parameter.
15205         <m_dwarf2_per_objfile>: New field.
15206         <lookup>: Use m_dwarf2_per_objfile.
15207         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15208         (psyms_seen_size): Likewise.
15209         (write_gdbindex): Replace objfile parameter with
15210         dwarf2_per_objfile.
15211         (write_debug_names): Likewise.
15212         (write_psymtabs_to_index): Likewise.
15213         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15214         calls.
15215
15216 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15217
15218         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15219         <dwarf2_per_objfile>: New field.
15220         (struct dwarf2_per_cu_data) <objfile>: Remove.
15221         <dwarf2_per_objfile>: New field.
15222         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15223         of objfile.
15224         (create_signatured_type_table_from_index): Likewise.
15225         (create_debug_type_hash_table): Likewise.
15226         (fill_in_sig_entry_from_dwo_entry): Likewise.
15227         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15228         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15229         objfile.
15230         (create_partial_symtab): Access objfile through
15231         dwarf2_per_objfile.
15232         (process_psymtab_comp_unit_reader): Likewise.
15233         (read_comp_units_from_section): Likewise.
15234         (scan_partial_symbols): Likewise.
15235         (add_partial_symbol): Likewise.
15236         (add_partial_subprogram): Likewise.
15237         (peek_die_abbrev): Likewise.
15238         (fixup_go_packaging): Likewise.
15239         (process_full_comp_unit): Likewise.
15240         (process_full_type_unit): Likewise.
15241         (process_imported_unit_die): Likewise.
15242         (dwarf2_compute_name): Likewise.
15243         (dwarf2_physname): Likewise.
15244         (read_import_statement): Likewise.
15245         (create_cus_hash_table): Assign dwarf2_physname instead of
15246         objfile.
15247         (read_func_scope): Access objfile through dwarf2_per_objfile.
15248         (read_lexical_block_scope): Likewise.
15249         (read_call_site_scope): Likewise.
15250         (read_variable): Likewise.
15251         (dwarf2_rnglists_process): Likewise.
15252         (dwarf2_ranges_process): Likewise.
15253         (dwarf2_ranges_read): Likewise.
15254         (dwarf2_record_block_ranges): Likewise.
15255         (dwarf2_add_field): Likewise.
15256         (dwarf2_add_member_fn): Likewise.
15257         (read_structure_type): Likewise.
15258         (process_structure_scope): Likewise.
15259         (read_enumeration_type): Likewise.
15260         (read_array_type): Likewise.
15261         (read_common_block): Likewise.
15262         (read_namespace_type): Likewise.
15263         (read_namespace): Likewise.
15264         (read_module_type): Likewise.
15265         (read_tag_pointer_type): Likewise.
15266         (read_tag_ptr_to_member_type): Likewise.
15267         (read_tag_string_type): Likewise.
15268         (read_subroutine_type): Likewise.
15269         (read_typedef): Likewise.
15270         (read_base_type): Likewise.
15271         (attr_to_dynamic_prop): Likewise.
15272         (read_subrange_type): Likewise.
15273         (read_unspecified_type): Likewise.
15274         (load_partial_dies): Likewise.
15275         (read_partial_die): Likewise.
15276         (find_partial_die): Likewise.
15277         (guess_partial_die_structure_name): Likewise.
15278         (fixup_partial_die): Likewise.
15279         (read_attribute_value): Likewise.
15280         (read_addr_index_from_leb128): Likewise.
15281         (dwarf2_read_addr_index): Likewise.
15282         (dwarf2_string_attr): Likewise.
15283         (lnp_state_machine::check_line_address): Likewise.
15284         (dwarf_decode_lines_1): Likewise.
15285         (dwarf_decode_lines): Likewise.
15286         (dwarf2_start_symtab): Likewise.
15287         (var_decode_location): Likewise.
15288         (new_symbol_full): Likewise.
15289         (dwarf2_const_value_data): Likewise.
15290         (dwarf2_const_value_attr): Likewise.
15291         (dwarf2_const_value): Likewise.
15292         (die_type): Likewise.
15293         (die_containing_type): Likewise.
15294         (lookup_die_type): Likewise.
15295         (guess_full_die_structure_name): Likewise.
15296         (anonymous_struct_prefix): Likewise.
15297         (dwarf2_name): Likewise.
15298         (follow_die_ref_or_sig): Likewise.
15299         (follow_die_offset): Likewise.
15300         (follow_die_ref): Likewise.
15301         (dwarf2_fetch_die_loc_sect_off): Likewise.
15302         (dwarf2_fetch_constant_bytes): Likewise.
15303         (dwarf2_fetch_die_type_sect_off): Likewise.
15304         (dwarf2_get_die_type): Likewise.
15305         (follow_die_sig): Likewise.
15306         (decode_locdesc): Likewise.
15307         (dwarf2_per_cu_objfile): Likewise.
15308         (dwarf2_per_cu_text_offset): Likewise.
15309         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15310         objfile.
15311         (set_die_type): Access objfile through
15312         dwarf2_per_objfile.
15313
15314 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15315
15316         * valprint.c (converted_character_d): Remove typedef.
15317         (DEF_VEC_O (converted_character_d)): Remove.
15318         (count_next_character): Use std::vector.
15319         (print_converted_chars_to_obstack): Likewise.
15320         (generic_printstr): Likewise.
15321
15322 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15323
15324         * xml-support.h (struct gdb_xml_value): Add constructor.
15325         <value>: Change type to unique_xmalloc_ptr.
15326         (gdb_xml_value_s): Remove typedef.
15327         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15328         (gdb_xml_element_start_handler): Change parameter type to
15329         std::vector.
15330         (xml_find_attribute): Likewise.
15331         * xml-support.c (xml_find_attribute): Change parameter type to
15332         std::vector and adjust.
15333         (gdb_xml_values_cleanup): Remove.
15334         (gdb_xml_parser::start_element): Adjust to std::vector.
15335         (xinclude_start_include): Change paraeter type to std::vector
15336         and adjust.
15337         * btrace.c (check_xml_btrace_version): Likewise.
15338         (parse_xml_btrace_block): Likewise.
15339         (parse_xml_btrace_pt_config_cpu): Likewise.
15340         (parse_xml_btrace_pt): Likewise.
15341         (parse_xml_btrace_conf_bts): Likewise.
15342         (parse_xml_btrace_conf_pt): Likewise.
15343         * memory-map.c (memory_map_start_memory): Likewise.
15344         (memory_map_start_property): Likewise.
15345         * osdata.c (osdata_start_osdata): Likewise.
15346         (osdata_start_item): Likewise.
15347         (osdata_start_column): Likewise.
15348         * remote.c (start_thread): Likewise.
15349         * solib-aix.c (library_list_start_library): Likewise.
15350         (library_list_start_list): Likewise.
15351         * solib-svr4.c (library_list_start_library): Likewise.
15352         (svr4_library_list_start_list): Likewise.
15353         * solib-target.c (library_list_start_segment): Likewise.
15354         (library_list_start_section): Likewise.
15355         (library_list_start_library): Likewise.
15356         (library_list_start_list): Likewise.
15357         * tracepoint.c (traceframe_info_start_memory): Likewise.
15358         (traceframe_info_start_tvar): Likewise.
15359         * xml-syscall.c (syscall_start_syscall): Likewise.
15360         * xml-tdesc.c (tdesc_start_target): Likewise.
15361         (tdesc_start_feature): Likewise.
15362         (tdesc_start_reg): Likewise.
15363         (tdesc_start_union): Likewise.
15364         (tdesc_start_struct): Likewise.
15365         (tdesc_start_flags): Likewise.
15366         (tdesc_start_enum): Likewise.
15367         (tdesc_start_field): Likewise.
15368         (tdesc_start_enum_value): Likewise.
15369         (tdesc_start_vector): Likewise.
15370
15371 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15372
15373         * extension.h (struct xmethod_worker) <clone>: Remove.
15374         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15375         Remove.
15376         (python_xmethod_worker::clone): Remove.
15377         * valops.c (find_overload_match): Use std::move instead of
15378         clone.
15379
15380 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15381
15382         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15383         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15384         <free_xmethod_worker_data>: Remove.
15385         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15386         <get_xmethod_arg_types>: Remove.
15387         <get_xmethod_result_type>: Remove.
15388         <invoke_xmethod>: Remove.
15389         * extension.c (new_xmethod_worker): Remove.
15390         (clone_xmethod_worker): Remove.
15391         (get_matching_xmethod_workers): Return void, pass std::vector by
15392         pointer.
15393         (get_xmethod_arg_types): Rename to...
15394         (xmethod_worker::get_arg_types): ... this, and adjust.
15395         (get_xmethod_result_type): Rename to...
15396         (xmethod_worker::get_result_type): ... this, and adjust.
15397         (invoke_xmethod): Remove.
15398         (free_xmethod_worker): Remove.
15399         (free_xmethod_worker_vec): Remove.
15400         * extension.h (enum ext_lang_rc): Move here from
15401         extension-priv.h.
15402         (struct xmethod_worker): Add constructor and destructor.
15403         <data>: Remove.
15404         <value>: Remove.
15405         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15406         virtual pure methods.
15407         <get_arg_types, get_result_type>: New methods.
15408         (xmethod_worker_ptr): Remove typedef.
15409         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15410         (xmethod_worker_vec): Remove typedef.
15411         (xmethod_worker_up): New typedef.
15412         (invoke_xmethod): Remove.
15413         (clone_xmethod_worker): Remove.
15414         (free_xmethod_worker): Remove.
15415         (free_xmethod_worker_vec): Remove.
15416         (get_xmethod_arg_types): Remove.
15417         (get_xmethod_result_type): Remove.
15418         * valops.c (find_method_list): Use std::vector, don't use
15419         intermediate vector.
15420         (value_find_oload_method_list): Use std::vector.
15421         (find_overload_match): Use std::vector.
15422         (find_oload_champ): Use std::vector.
15423         * value.c (value_free): Use operator delete.
15424         (value_of_xmethod): Rename to...
15425         (value_from_xmethod): ... this.  Don't assign
15426         xmethod_worker::value, take rvalue-reference.
15427         (result_type_of_xmethod): Adjust.
15428         (call_xmethod): Adjust.
15429         * value.h: Include extension.h.
15430         (struct xmethod_worker): Don't forward-declare.
15431         (value_of_xmethod): Rename to...
15432         (value_from_xmethod): ... this, take rvalue-reference.
15433         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15434         (struct python_xmethod_worker): ... this, add constructor and
15435         destructor.
15436         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15437         (gdbpy_free_xmethod_worker_data): Rename to...
15438         (python_xmethod_worker::~python_xmethod_worker): ... this and
15439         adjust.
15440         (gdbpy_clone_xmethod_worker_data): Rename to...
15441         (python_xmethod_worker::clone): ... this and adjust.
15442         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15443         temporary vector.
15444         (gdbpy_get_xmethod_arg_types): Rename to...
15445         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15446         (gdbpy_get_xmethod_result_type): Rename to...
15447         (python_xmethod_worker::do_get_result_type): ... this and
15448         adjust.
15449         (gdbpy_invoke_xmethod): Rename to...
15450         (python_xmethod_worker::invoke): ... this and adjust.
15451         (new_python_xmethod_worker): Rename to...
15452         (python_xmethod_worker::python_xmethod_worker): ... this and
15453         adjust.
15454         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15455         Remove.
15456         (gdbpy_free_xmethod_worker_data): Remove.
15457         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15458         (gdbpy_get_xmethod_arg_types): Remove.
15459         (gdbpy_get_xmethod_result_type): Remove.
15460         (gdbpy_invoke_xmethod): Remove.
15461         * python/python.c (python_extension_ops): Remove obsolete
15462         callbacks.
15463
15464 2018-01-05  Pedro Alves  <palves@redhat.com>
15465
15466         PR gdb/18653
15467         * common/signals-state-save-restore.c
15468         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15469         find a custom handler preinstalled, instead of internal erroring.
15470         But only warn if !quiet.
15471         * common/signals-state-save-restore.h
15472         (save_original_signals_state): New parameter 'quiet'.
15473         * main.c (captured_main_1): Move save_original_signals_state call
15474         after option handling, and pass QUIET.
15475
15476 2018-01-05  Pedro Alves  <palves@redhat.com>
15477
15478         * spu-tdep.c (spu_catch_start): Pass
15479         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15480
15481 2018-01-05  Pedro Alves  <palves@redhat.com>
15482
15483         PR gdb/22670
15484         * ada-lang.c (literal_symbol_name_matcher): New function.
15485         (ada_get_symbol_name_matcher): Use it for
15486         symbol_name_match_type::SEARCH_NAME.
15487         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15488         it down instead of assuming symbol_name_match_type::FULL.
15489         * block.h (block_lookup_symbol): New parameter 'match_type'.
15490         * c-valprint.c (print_unpacked_pointer): Use
15491         lookup_symbol_search_name instead of lookup_symbol.
15492         * compile/compile-object-load.c (get_out_value_type): Pass down
15493         symbol_name_match_type::SEARCH_NAME.
15494         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15495         symbol_name_match_type::FULL.
15496         * cp-support.c (cp_get_symbol_name_matcher): Handle
15497         symbol_name_match_type::SEARCH_NAME.
15498         * infrun.c (insert_exception_resume_breakpoint): Use
15499         lookup_symbol_search_name.
15500         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15501         * psymtab.c (maintenance_check_psymtabs): Use
15502         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15503         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15504         SYMBOL_SEARCH_NAME.
15505         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15506         if symbol_name_match_type::SEARCH_NAME.
15507         (lookup_symbol_in_language): Pass down
15508         symbol_name_match_type::FULL.
15509         (lookup_symbol_search_name): New.
15510         (lookup_language_this): Pass down
15511         symbol_name_match_type::SEARCH_NAME.
15512         (lookup_symbol_aux, lookup_local_symbol): New parameter
15513         'match_type'.  Pass it down.
15514         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15515         (lookup_symbol_search_name): New declaration.
15516         (lookup_symbol_in_block): New 'match_type' parameter.
15517
15518 2018-01-05  Pedro Alves  <palves@redhat.com>
15519
15520         PR gdb/22670
15521         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15522         ada_lookup_symbol.
15523         (ada_lookup_symbol): Reimplement in terms of
15524         ada_lookup_symbol_list, bits factored out from
15525         ada_lookup_encoded_symbol.
15526
15527 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15528
15529         * ada-exp.y (write_object_renaming): When subscripting an array
15530         using a symbol as the index, pass the block in call to
15531         ada_lookup_encoded_symbol when looking that symbol up.
15532
15533 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15534
15535         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15536         TYPE_INDEX_TYPE.
15537
15538 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15539
15540         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15541         the case where VALUE_LVAL (val0) is not lval_memory.
15542
15543 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15544
15545         * ada-valprint.c (print_optional_low_bound): Handle
15546         character-indexed array printing like boolean-indexed array
15547         printing.
15548
15549 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15550
15551         * NEWS: Create a new section for the next release branch.
15552         Rename the section of the current branch, now that it has
15553         been cut.
15554
15555 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15556
15557         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15558         * version.in: Bump version to 8.1.50.DATE-git.
15559
15560 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15561
15562         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15563         Add field.
15564         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15565         Add field.
15566         (default_exception_support_info) <catch_handlers_sym>: Add field.
15567         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15568         (ada_exception_name_addr_1): Add "catch handlers" handling.
15569         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15570         Update all callers.
15571         (create_excep_cond_exprs) <ex>: Add parameter.
15572         (re_set_exception): Update create_excep_cond_exprs call.
15573         (print_it_exception, print_one_exception, print_mention_exception)
15574         (print_recreate_exception): Add "catch handler" handling.
15575         (allocate_location_catch_handlers, re_set_catch_handlers)
15576         (check_status_catch_handlers, print_it_catch_handlers)
15577         (print_one_catch_handlers, print_mention_catch_handlers)
15578         (print_recreate_catch_handlers): New function.
15579         (catch_handlers_breakpoint_ops): New variable.
15580         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15581         Add parameter.  Add "catch handler" handling.
15582         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15583         Add "catch handler" handling.
15584         (ada_exception_catchpoint_cond_string): Add "catch handler"
15585         handling.
15586         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15587         call.
15588         (catch_ada_handlers_command): New function.
15589         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15590         operations structure.
15591         (_initialize_ada_language): Add "catch handlers" command entry.
15592         * NEWS: Document "catch handlers" feature.
15593
15594 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15595
15596         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15597         account when creating the array type of the slice.
15598         (ada_value_slice): Likewise.
15599
15600 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15601
15602         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15603         New enum value.
15604         (create_array_type_with_stride): Add byte_stride_prop parameter.
15605         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15606         New parameter.  Update all callers in this file.
15607         (array_type_has_dynamic_stride): New function.
15608         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15609         of arrays with dynamic byte strides.
15610         * dwarf2read.c (read_array_type): Add support for dynamic
15611         DW_AT_byte_stride attributes.
15612
15613 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15614
15615         * dwarf2read.c (read_unspecified_type): Treat
15616         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15617
15618 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15619
15620         Update copyright year range in all GDB files.
15621
15622 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15623
15624         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15625         and gdb/testsuite/gdb.base/step-line.c.
15626
15627 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15628
15629         * copyright.py (main): Dump the contents of
15630         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15631         even if BY_HAND is empty.
15632
15633 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15634
15635         * top.c (print_gdb_version): Update Copyright year in version
15636         message.
15637
15638 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15639
15640         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15641
15642 For older changes see ChangeLog-2017.
15643 \f
15644 Local Variables:
15645 mode: change-log
15646 left-margin: 8
15647 fill-column: 74
15648 version-control: never
15649 coding: utf-8
15650 End: