gdb: Use string_printf to format int fields instead of a fixed size buffer
[external/binutils.git] / gdb / ChangeLog
1 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
2
3         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
4         than a fixed size buffer.
5
6 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
7
8         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
9         and remove insertion of extra spaces in GDB's output.
10         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
11         Layout field into a temporary buffer, and then output it as a
12         string field.
13
14 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
15
16         * NEWS: Document the language choice done by
17         'info [types|functions|variables]|rbreak'.
18
19 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
20
21         * symtab.c (treg_matches_sym_type_name): Use
22         scoped_switch_to_sym_language_if_auto instead of local logic.
23         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
24         to switch to SYM language when language mode is auto.
25
26 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
27
28         * language.h (scoped_switch_to_sym_language_if_auto): New class.
29
30 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
31
32         * symtab.c (search_symbols): Properly check absence of type regexp
33         before entering the loop scanning the minimal symbols.
34
35 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
36
37         * s12z-tdep.c (s12z_extract_return_value): New function.
38         (inv_reg_perm) New array.
39         (s12z_return_value): Populate readbuf if non-null.
40
41 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
42
43         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
44         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
45         to MinGW fixed by Gnulib.
46         (O_NOINHERIT): Define if not defined.
47
48 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
49
50         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
51
52 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
53
54         * infrun.c (displaced_step_inferior_state) <next>: Remove.
55
56 2018-11-19  Tom Tromey  <tom@tromey.com>
57
58         * source.c (get_filename_and_charpos): Return void.
59
60 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
61
62         * skip.c (_initialize_step_skip): Fix "info skip" help.
63
64 2018-11-16  Tom Tromey  <tom@tromey.com>
65
66         PR rust/23625:
67         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
68
69 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
70
71         * infrun.c (displaced_step_inferior_states): Change type to
72         std::forward_list.
73         (get_displaced_stepping_state): Adjust.
74         (displaced_step_in_progress_any_inferior): Adjust.
75         (add_displaced_stepping_state): Adjust.
76         (remove_displaced_stepping_state): Adjust.
77
78 2018-11-18  Tom Tromey  <tom@tromey.com>
79
80         PR build/23814:
81         * target-delegates.c: Rebuild.
82         * ia64-linux-nat.c (class ia64_linux_nat_target)
83         <have_steppable_watchpoint>: Use override.  Return true, not 1.
84         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
85         "self" argument.
86         (ia64_linux_nat_target::low_new_thread): Rename.
87         (class ia64_linux_nat_target) <read_description>: Don't declare.
88         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
89         bool.
90
91 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
92
93         PR gdb/22736:
94         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
95         lang_struct_return code.
96
97 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
98
99         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
100         return_method.
101         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
102         * amd64-tdep.c (amd64_push_arguments): Likewise.
103         (amd64_push_dummy_call): Likewise.
104         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
105         * arc-tdep.c (arc_push_dummy_call): Likewise.
106         * arm-tdep.c (arm_push_dummy_call): Likewise.
107         * avr-tdep.c (avr_push_dummy_call): Likewise.
108         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
109         * cris-tdep.c (cris_push_dummy_call): Likewise.
110         * csky-tdep.c (csky_push_dummy_call): Likewise.
111         * frv-tdep.c (frv_push_dummy_call): Likewise.
112         * gdbarch.c: Regenerate.
113         * gdbarch.h: Regenerate.
114         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
115         return_method.
116         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
117         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
118         (hppa64_push_dummy_call): Likewise.
119         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
120         * i386-tdep.c (i386_push_dummy_call): Likewise.
121         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
122         * infcall.c (call_function_by_hand_dummy): Likewise.
123         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
124         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
125         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
126         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
127         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
128         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
129         * mep-tdep.c (mep_push_dummy_call): Likewise.
130         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
131         (mips_n32n64_push_dummy_call): Likewise.
132         (mips_o32_push_dummy_call): Likewise.
133         (mips_o64_push_dummy_call): Likewise.
134         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
135         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
136         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
137         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
138         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
139         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
140         (ppc64_sysv_abi_push_dummy_call): Likewise.
141         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
142         (ppc64_sysv_abi_push_dummy_call): Likewise.
143         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
144         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
145         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
146         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
147         * rx-tdep.c (rx_push_dummy_call): Likewise.
148         * s390-tdep.c (s390_push_dummy_call): Likewise.
149         * score-tdep.c (score_push_dummy_call): Likewise.
150         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
151         (sh_push_dummy_call_nofpu): Likewise.
152         * sparc-tdep.c (sparc32_store_arguments): Likewise.
153         (sparc32_push_dummy_call): Likewise.
154         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
155         (sparc64_push_dummy_call): Likewise.
156         * spu-tdep.c (spu_push_dummy_call): Likewise.
157         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
158         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
159         * v850-tdep.c (v850_push_dummy_call): Likewise.
160         * vax-tdep.c (vax_push_dummy_call): Likewise.
161         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
162         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
163
164 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
165
166         * gdbarch.sh (enum function_call_return_method): Add enum.
167         * gdbarch.h: Regenerate.
168         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
169
170 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
171
172         * unittests/copy_bitwise-selftests.c: New file.
173         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
174         (selftests::copy_bitwise_tests): Delete, moving this code to
175         unittests/copy_bitwise-selftests.c instead.
176         (_initialize_utils): Do not register copy_bitwise tests.
177         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
178         unittests/copy_bitwise-selftests.c.
179
180 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
181
182         * ada-lang.c (move_bits): Delete. Update all callers to use
183         copy_bitwise instead.
184         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
185         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
186         Move from here to utils.c.
187         (_initialize_dwarf2loc): Remove call to register copy_bitwise
188         selftests.
189         * utils.h (copy_bitwise): Add declaration.
190         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
191         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
192         Moved here from dwarf2loc.c.
193         (_initialize_utils): Register copy_bitwise selftests.
194
195 2018-11-14  Jim Wilson  <jimw@sifive.com>
196
197         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
198         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
199         then increment next_regnum if odd.
200         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
201         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
202         function type.  Pass new arg to riscv_arg_location based on function
203         type.
204         (riscv_return_value): Pass new arg to riscv_arg_location.
205
206         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
207         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
208         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
209
210         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
211         setting len.  New local align, set to max of arg align and xlen,
212         and pass to first riscv_assign_stack_location call.
213
214 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
215
216         * skip.c (complete_skip_number): New function.
217         (_initialize_step_skip): Add completers to some skip commands.
218
219 2018-11-09  Tom Tromey  <tom@tromey.com>
220
221         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
222         (struct remote_g_packet_data): Derive from allocate_on_obstack.
223         <guesses>: Now a std::vector.
224         (remote_g_packet_data_init, register_remote_g_packet_guess):
225         Update.
226         (remote_read_description_p): Update.  Return bool.
227         (remote_target::read_description): Update.
228         (struct remote_g_packet_guess): Add constructor.
229
230 2018-11-09  Tom Tromey  <tom@tromey.com>
231
232         * common/scoped_fd.h (class scoped_fd): Add move constructor and
233         move assignment operator.
234         * psymtab.c (psymtab_to_fullname): Update.
235         * source.h (open_source_file): Return scoped_fd.
236         (find_and_open_source): Likewise.
237         * source.c (open_source_file): Return scoped_fd.
238         (get_filename_and_charpos): Update.
239         (print_source_lines_base): Update.  Use scoped_fd::to_file.
240         (forward_search_command): Likewise.
241         (reverse_search_command): Likewise.
242         (find_and_open_source): Return scoped_fd.
243         * tui/tui-source.c (tui_set_source_content): Update.  Use
244         gdb_file_up.
245
246 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
247
248         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
249         overflow.
250
251 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
252
253         * configure: Regenerate.
254
255 2018-11-09  Tom de Vries  <tdevries@suse.de>
256
257         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
258         unconditionally, to set the language of the symbol.  Manage freeing
259         returned pointer using gdb::unique_xmalloc_ptr.
260
261 2018-11-08  Tom Tromey  <tom@tromey.com>
262
263         * record.c (require_record_target): Upper-case "<TAB>".
264
265 2018-11-08  Tom Tromey  <tom@tromey.com>
266
267         * python/lib/gdb/command/pretty_printers.py
268         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
269
270 2018-11-08  Tom Tromey  <tom@tromey.com>
271
272         PR gdb/23555:
273         PR gdb/23838:
274         * target.h (target_supports_terminal_ours): Return bool.
275         * target.c (target_supports_terminal_ours): Handle case where
276         current_top_target returns nullptr.  Return bool.
277
278 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
279
280         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
281         return the correct count for potential HFAs.
282
283 2018-11-08  Jan Beulich  <jbeulich@suse.com>
284
285         * i387-tdep.c (i387_supply_xsave): Split handling of
286         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
287         (i387_collect_xsave): Likewise.
288
289 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
290
291         * riscv-tdep.c (riscv_insn::decode): Update header comment.
292         (riscv_frame_this_id): Catch errors thrown while building the
293         frame cache, leave the frame id as the default, which is the outer
294         frame id.
295
296 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
297
298         * ada-lang.c (read_atcb): Only set task_info->called_task if
299         task_info->state == Entry_Caller_Sleep.
300         (print_ada_task_info): Do not check task_info->state before
301         checking task_info->called_task.
302         (info_task): Likewise.
303
304 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
305
306         * ada-tasks.c (read_atcb): Clear task_info before computing
307         the value of each of its fields.
308
309 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
310
311         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
312         NULL before dereferencing it.
313
314 2018-11-06  Tom de Vries  <tdevries@suse.de>
315
316         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
317         program headers.
318
319 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
320
321         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
322         so that it applies to uclinux as well.
323
324 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
325
326         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
327         when on AAPCS.
328
329 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
330
331         * riscv-fbsd-nat.c (getregs_supplies): Return true for
332         RISCV_CSR_SSTATUS_REGNUM.
333
334 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
335
336         * source.c (open_source_file): Fix leak by transferring the
337         current s->fullname to the unique_xmalloc_ptr fullname given
338         to find_and_open_source.
339
340 2018-11-04  Tom Tromey  <tom@tromey.com>
341
342         * varobj.c (install_default_visualizer): Update.
343         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
344         Return gdbpy_ref.
345         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
346         (find_pretty_printer_from_progspace)
347         (find_pretty_printer_from_gdb, find_pretty_printer)
348         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
349         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
350         Update.
351
352 2018-11-04  Tom Tromey  <tom@tromey.com>
353
354         * python/python.c (gdbpy_parameter_value): Update.
355         * python/python-internal.h (python_string_to_unicode)
356         (python_string_to_target_python_string)
357         (host_string_to_python_string): Return gdbpy_ref.
358         * python/py-utils.c (python_string_to_unicode)
359         (unicode_to_encoded_python_string)
360         (unicode_to_target_python_string)
361         (python_string_to_target_string)
362         (python_string_to_target_python_string): Return gdbpy_ref.
363         (python_string_to_host_string): Update.
364         (host_string_to_python_string): Return gdbpy_ref.
365         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
366         (stpy_fullname): Update.
367         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
368         Update.
369         * python/py-prettyprint.c (print_string_repr): Update.
370         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
371         (objfpy_get_build_id): Update.
372         * python/py-breakpoint.c (bppy_get_location)
373         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
374         Update.
375
376 2018-11-04  Tom Tromey  <tom@tromey.com>
377
378         * python/python-internal.h (gdb_py_object_from_longest)
379         (gdb_py_object_from_ulongest): Return gdbpy_ref.
380         * python/py-value.c (valpy_int): Update.
381         * python/py-utils.c (gdb_py_object_from_longest): Return
382         gdbpy_ref.
383         (gdb_py_object_from_ulongest): Likewise.
384         * python/py-type.c (typy_get_alignof): Update.
385         * python/py-linetable.c (ltpy_get_all_source_lines)
386         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
387         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
388
389 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
390
391         * ada-lang.c (_initialize_ada_language): Fix typo.
392
393 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
394
395         * language.c (type): Remove.
396         (_initialize_language): Remove assignment to type.
397
398 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
399
400         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
401         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
402         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
403         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
404         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
405         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
406         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
407         and aarch64-ravenscar-thread.o.
408         * NEWS: Add entry documenting Ravenscar tasking support
409         on AArch64 ELF.
410
411 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
412
413         * symtab.c (info_functions_command): Initialize quiet flag.
414         * stack.c (info_args_command): Likewise.
415
416 2018-11-01  Jim Wilson  <jimw@sifive.com>
417
418         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
419         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
420         debugging messages.
421
422 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
423
424         * ada-lang.c (ada_watch_location_expression): New function.
425         (ada_language_defn): Set la_watch_location_expression to
426         ada_watch_location_expression.
427
428 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
429
430         * print-utils.c (int_string): Remove unnecessary trailing spaces.
431
432 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
433
434         * rs6000-tdep.c (skip_prologue): Fix potential negative left
435         shifting.
436
437 2018-11-01  Jerome Guitton  <guitton@adacore.com>
438             Joel Brobecker  <brobecker@adacore.com>
439
440         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
441         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
442         * arm-pikeos-tdep.c: New file.
443         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
444         embedded system.
445         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
446
447 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
448
449         * common/pathstuff.c (get_standard_temp_dir): New.
450         * common/pathstuff.h (get_standard_temp_dir): New.
451         * config.in: Re-generate.
452         * configure: Re-generate.
453         * configure.ac: Don't check for mkdtemp.
454         * gnulib/aclocal-m4-deps.mk: Re-generate.
455         * gnulib/aclocal.m4: Re-generate.
456         * gnulib/config.in: Re-generate.
457         * gnulib/configure: Re-generate.
458         * gnulib/import/Makefile.am: Re-generate.
459         * gnulib/import/Makefile.in: Re-generate.
460         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
461         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
462         * gnulib/import/m4/mkdtemp.m4: New file.
463         * gnulib/import/mkdtemp.c: New file.
464         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
465         Add mkdtemp module.
466         * unittests/mkdir-recursive-selftests.c (test): Use
467         get_standard_temp_dir.
468         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
469         ifdef.
470         * compile/compile.c (get_compile_file_tempdir): Likewise.
471
472 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
473
474         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
475         (SIG_FRAME_LR_OFFSET64): New define.
476         (SIG_FRAME_FP_OFFSET64): New define.
477         (aix_sighandle_frame_cache): New Function.
478         (aix_sighandle_frame_this_id): New Function.
479         (aix_sighandle_frame_prev_register): New Function.
480         (aix_sighandle_frame_sniffer): New Function.
481         (aix_sighandle_frame_unwind): New global variable.
482         (rs6000_aix_init_osabi): Install new frame unwinder.
483
484 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
485
486         PR gdb/23835
487         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
488         already defined.
489
490 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
491
492         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
493
494 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
495
496         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
497         (producer_is_icc): New function.
498         (check_producer): Set producer_is_icc field on dwarf2_cu.
499         (dwarf2_init_integer_type): New function.
500         (read_base_type): Call dwarf2_init_integer_type instead of
501         init_integer_type in all cases.
502         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
503         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
504         LEN is greater than 0.
505
506 2018-10-30  Tom Tromey  <tom@tromey.com>
507
508         * main.c (captured_main_1): Check return value of bfd_init.
509
510 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
511
512         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
513         Adjust comments.
514
515 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
516
517         * procfs.c: Include common/pathstuff.h.
518
519 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
520
521         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
522         Add missing braces.  No functional change.
523
524 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
525
526         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
527         to report a bad option and fix indentation.
528         * demangle.c (demangle_command): Use report_unrecognized_option_error
529         to report a bad option and correctly report the bad option.
530
531 2018-10-27  Tom Tromey  <tom@tromey.com>
532
533         PR cli/23364:
534         * darwin-nat.c (copied_shell): New global.
535         (may_have_sip): Rename from should_disable_startup_with_shell.
536         (copy_shell_to_cache, maybe_cache_shell): New functions.
537         (darwin_nat_target::create_inferior): Update.  Use
538         copied_shell.
539
540 2018-10-27  Tom Tromey  <tom@tromey.com>
541
542         * unittests/scoped_fd-selftests.c (test_to_file): New function.
543         (run_tests): Call test_to_file.
544         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
545         temporary files.
546         * common/scoped_fd.h (scoped_fd::to_file): New method.
547
548 2018-10-27  Tom Tromey  <tom@tromey.com>
549
550         * unittests/scoped_mmap-selftests.c (test_normal): Use
551         gdb_mkostemp_cloexec.
552         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
553         Use gdb_mkostemp_cloexec.
554         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
555         gnulib/config.in, gnulib/configure,
556         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
557         gnulib/import/m4/gnulib-cache.m4,
558         gnulib/import/m4/gnulib-comp.m4: Update.
559         * gnulib/import/m4/mkostemp.m4: New file.
560         * gnulib/import/m4/mkstemp.m4: Remove.
561         * gnulib/import/mkostemp.c: New file.
562         * gnulib/import/mkstemp.m4: Remove.
563         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
564         mkstemp, add mkostemp.  Apply new patch.
565         * gnulib/import/stdlib.in.h: Apply patch.
566         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
567         New file.
568         * dwarf-index-write.c (write_psymtabs_to_index): Use
569         gdb_mkostemp_cloexec.
570         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
571
572 2018-10-27  Tom Tromey  <tom@tromey.com>
573
574         * unittests/mkdir-recursive-selftests.c: New file.
575         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
576         unittests/mkdir-recursive-selftests.c.
577         * dwarf-index-cache.c (mkdir_recursive): Move to
578         common/filestuff.c.
579         (index_cache::store): Check return value of mkdir_recursive.
580         (create_dir_and_check, test_mkdir_recursive): Move to new file.
581         (_initialize_index_cache): Don't register test.
582         * common/filestuff.h (mkdir_recursive): Declare.
583         * common/filestuff.c (mkdir_recursive): Move from
584         dwarf-index-cache.c.  Return bool.
585
586 2018-10-27  Tom Tromey  <tom@tromey.com>
587
588         * dwarf-index-write.c (write_psymtabs_to_index): Move
589         make_temp_filename to common/pathstuff.c.
590         * common/pathstuff.h (make_temp_filename): Declare.
591         * common/pathstuff.c (make_temp_filename): New function, moved
592         from dwarf-index-write.c.
593
594 2018-10-27  Tom Tromey  <tom@tromey.com>
595
596         * procfs.c (procfs_target::create_inferior): Use get_shell.
597         * cli/cli-cmds.c (shell_escape): Use get_shell.
598         * windows-nat.c (windows_nat_target::create_inferior): Use
599         get_shell.
600         * common/pathstuff.c (get_shell): New function.
601         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
602         (fork_inferior): Use get_shell.
603         * common/pathstuff.h (get_shell): Declare.
604
605 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
606
607         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
608
609 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
610
611         * stack.c (print_variable_and_value_data): Add preg and treg.
612         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
613         and update callers.
614         (print_frame_arg_vars): Likewise.
615         (prepare_reg): New function.
616         (info_locals_command): Extract info print args and use them.
617         (info_args_command): Likewise.
618         (_initialize_stack): Modify on-line help.
619         * symtab.c (treg_matches_sym_type_name): New function.
620         (search_symbols): New arg t_regexp.
621         (symtab_symbol_info): New args quiet, regexp, t_regexp.
622         (info_variables_command): Extract info print args and use them.
623         (info_functions_command): Likewise.
624         (info_types_command): Update call to symtab_symbol_info.
625         (_initialize_symtab): Modify on-line help.
626         * symtab.h (treg_matches_sym_type_name): New function.
627         (search_symbols): New t_regexp arg.
628
629 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
630
631         * cli-utils.c (extract_arg_maybe_quoted): New function.
632         (extract_info_print_args): New function.
633         (info_print_args_help): New function.
634         (report_unrecognized_option_error): New function.
635         * cli-utils.h (extract_arg_maybe_quoted): New function.
636         (extract_info_print_args): New function.
637         (info_print_args_help): New function.
638         (report_unrecognized_option_error): New function.
639
640 2018-10-26  Tom Tromey  <tom@tromey.com>
641
642         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
643         (compute_compunit_symtab_includes): Update.
644         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
645         (compunit_symtab_ptr): Likewise.
646
647 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
648
649         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
650         default_print_auxv_entry for specific tag values.
651
652 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
653
654         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
655
656 2018-10-26  Jim Wilson  <jimw@sifive.com>
657
658         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
659         (riscv_linux_sigframe_init): Declare.
660         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
661         (riscv_linux_sigframe): New.
662         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
663         (riscv_linux_sigframe_init): Define.
664         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
665
666         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
667         (riscv_isa_flen): Likewise.  Drop static.
668         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
669         (riscv_isa_flen): Likewise.  Declare.
670
671 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
672             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
673
674         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
675         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
676         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
677         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
678         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
679         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
680         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
681         Define.
682         (struct ppc_linux_features) <htm>: New field.
683         (ppc_linux_no_features): Add initializer for htm field.
684         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
685         new tdescs.
686         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
687         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
688         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
689         Define if not already defined.
690         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
691         and rs6000/powerpc-isa207-htm-vsx64l.
692         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
693         rs6000/powerpc-isa207-htm-vsx64l.xml.
694         * features/rs6000/power-htm-spr.xml: New file.
695         * features/rs6000/power-htm-core.xml: New file.
696         * features/rs6000/power64-htm-core.xml: New file.
697         * features/rs6000/power-htm-fpu.xml: New file.
698         * features/rs6000/power-htm-altivec.xml: New file.
699         * features/rs6000/power-htm-vsx.xml: New file.
700         * features/rs6000/power-htm-ppr.xml: New file.
701         * features/rs6000/power-htm-dscr.xml: New file.
702         * features/rs6000/power-htm-tar.xml: New file.
703         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
704         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
705         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
706         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
707         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
708         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
709         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
710         fetch_regset with HTM regsets.
711         (store_register, store_ppc_registers): Call store_regset with HTM
712         regsets.
713         (ppc_linux_nat_target::read_description): Set htm field in the
714         features struct if needed.
715         * ppc-linux-tdep.c: Include
716         features/rs6000/powerpc-isa207-htm-vsx32l.c and
717         features/rs6000/powerpc-isa207-htm-vsx64l.c.
718         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
719         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
720         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
721         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
722         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
723         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
724         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
725         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
726         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
727         (ppc32_linux_ctarregset): New globals.
728         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
729         (ppc_linux_collect_core_cpgrregset): New function.
730         (ppc_linux_iterate_over_regset_sections): Call back with the htm
731         regsets.
732         (ppc_linux_core_read_description): Check if the tm spr section is
733         present and set htm in the features struct.
734         (_initialize_ppc_linux_tdep): Call
735         initialize_tdesc_powerpc_isa207_htm_vsx32l and
736         initialize_tdesc_powerpc_isa207_htm_vsx64l.
737         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
738         Declare.
739         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
740         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
741         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
742         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
743         New fields.
744         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
745         Likewise.
746         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
747         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
748         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
749         New enum fields.
750         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
751         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
752         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
753         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
754         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
755         <PPC_CTAR_REGNUM>: Likewise.
756         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
757         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
758         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
759         (IS_CEFP_PSEUDOREG): Define.
760         (rs6000_register_name): Hide the upper halves of checkpointed VSX
761         registers.  Return names for the checkpointed DFP, VSX, and EFP
762         pseudo registers.
763         (rs6000_pseudo_register_type): Remove initial assert and raise an
764         internal error in the else clause instead.  Return types for the
765         checkpointed DFP, VSX, and EFP pseudo registers.
766         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
767         checkpointed DFP pseudo registers.
768         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
769         checkpointed VSX pseudo registers.
770         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
771         from efpr_pseudo_register_read and
772         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
773         registers.
774         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
775         Handle checkpointed DFP, VSX, and EFP registers.
776         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
777         (efp_ax_pseudo_register_collect): New functions.
778         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
779         register logic to new functions.  Handle checkpointed DFP, VSX,
780         and EFP pseudo registers.
781         (rs6000_gdbarch_init): Look for and validate the htm features.
782         Include checkpointed DFP, VSX and EFP pseudo-registers.
783         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
784         HTM registers.
785
786 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
787
788         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
789         without altivec or fpu.
790
791 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
792             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
793
794         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
795         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
796         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
797         Define if not already defined.
798         * features/rs6000/power-ebb.xml: New file.
799         * features/rs6000/power-linux-pmu.xml: New file.
800         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
801         features.
802         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
803         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
804         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
805         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
806         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
807         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
808         fetch_regset with ebb and pmu regsets.
809         (store_register, store_ppc_registers): Call store_regset with ebb
810         and pmu regsets.
811         (ppc_linux_nat_target::read_description): Set isa207 field in the
812         features struct if ebb and pmu are avaiable.
813         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
814         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
815         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
816         and pmu regsets.
817         (ppc_linux_core_read_description): Check if the pmu section is
818         present and set isa207 in the features struct.
819         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
820         (ppc32_linux_pmuregset): Declare.
821         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
822         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
823         <ppc_sier_regnum>: New field.
824         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
825         New enum values.
826         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
827         values.
828         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
829         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
830         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
831         ebb and pmu features.
832
833 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
834             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
835
836         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
837         (tdesc_powerpc_isa207_vsx64l): Declare.
838         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
839         (struct ppc_linux_features) <isa207>: New field.
840         (ppc_linux_no_features): Add initializer for isa207 field.
841         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
842         new tdescs.
843         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
844         (NT_PPC_TAR): Define if not already defined.
845         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
846         rs6000/powerpc-isa207-vsx64l.
847         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
848         rs6000/powerpc-isa207-vsx64l.xml.
849         * features/rs6000/power-tar.xml: New file.
850         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
851         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
852         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
853         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
854         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
855         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
856         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
857         fetch_regset with the TAR regset.
858         (store_register, store_ppc_registers): Call store_regset with the
859         TAR regset.
860         (ppc_linux_nat_target::read_description): Set isa207 field in the
861         features struct if needed.
862         * ppc-linux-tdep.c: Include
863         features/rs6000/powerpc-isa207-vsx32l.c and
864         features/rs6000/powerpc-isa207-vsx64l.c.
865         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
866         (ppc_linux_iterate_over_regset_sections): Call back with the tar
867         regset.
868         (ppc_linux_core_read_description): Check if the tar section is
869         present and set isa207 in the features struct.
870         (_initialize_ppc_linux_tdep): Call
871         initialize_tdesc_powerpc_isa207_vsx32l and
872         initialize_tdesc_powerpc_isa207_vsx64l.
873         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
874         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
875         (enum) <PPC_TAR_REGNUM>: New enum value.
876         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
877         feature.
878         (ppc_process_record_op31): Record changes to TAR.
879
880 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
881             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
882
883         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
884         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
885         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
886         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
887         (struct ppc_linux_features) <ppr_dscr>: New field.
888         (ppc_linux_no_features): Add initializer for ppr_dscr field.
889         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
890         new tdescs.
891         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
892         Define if not already defined.
893         * features/Makefile (WHICH): Add
894         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
895         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
896         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
897         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
898         * features/rs6000/power-dscr.xml: New file.
899         * features/rs6000/power-ppr.xml: New file.
900         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
901         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
902         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
903         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
904         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
905         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
906         * ppc-linux-nat.c: Include <sys/uio.h>.
907         (fetch_regset, store_regset, check_regset): New functions.
908         (fetch_register, fetch_ppc_registers): Call fetch_regset with
909         DSCR and PPR regsets.
910         (store_register, store_ppc_registers): Call store_regset with
911         DSCR and PPR regsets.
912         (ppc_linux_get_hwcap2): New function.
913         (ppc_linux_nat_target::read_description): Call
914         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
915         features struct if needed.
916         * ppc-linux-tdep.c: Include
917         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
918         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
919         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
920         (ppc32_linux_dscrregset): New globals.
921         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
922         and dscr regsets.
923         (ppc_linux_core_read_description): Check if the ppr and dscr
924         sections are present and set ppr_dscr in the features struct.
925         (_initialize_ppc_linux_tdep): Call
926         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
927         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
928         * ppc-linux-tdep.h (ppc32_linux_pprregset)
929         (ppc32_linux_dscrregset): Declare.
930         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
931         <ppc_dscr_regnum>: New field.
932         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
933         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
934         and dscr features.
935         (ppc_process_record_op31): Record changes to PPR and DSCR.
936
937 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
938
939         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
940         second initializer line for the have_* variables.  Initialize
941         have_fpu to 0 instead of 1.
942
943 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
944
945         * arch/ppc-linux-common.c (ppc_linux_match_description):
946         Parenthesize tdesc assignements and indent them properly.
947
948 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
949
950         * ppc-linux-nat.c (fetch_register): Change if statement to else
951         if.
952         (store_register): Likewise.
953
954 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
955
956         * rs6000-tdep.c: Remove reggroups.h include.
957         (rs6000_pseudo_register_reggroup_p): Remove.
958         (rs6000_gdbarch_init): Remove call to
959         set_tdesc_pseudo_register_reggroup_p.
960
961 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
962
963         * reggroups.c (default_register_reggroup_p): Return true for
964         decfloat registers and float_reggroup.
965
966 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
967
968         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
969         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
970         ppc_linux_collect_vrregset by regcache_collect_regset.
971
972 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
973
974         * linux-tdep.c (linux_collect_regset_section_cb): Use
975         std::vector<gdb_byte> instead of char * and malloc for buf.
976         Remove xfree.
977
978 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
979
980         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
981         symtab_start instead of always using language_unknown.
982
983 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
984
985         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
986         READ_P parameter, catch and ignore register access errors from
987         either the old or new MISA location.
988         (riscv_has_feature): Update call to riscv_read_misa_reg.
989
990 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
991
992         * python/py-function.c (convert_values_to_python): Return
993         gdbpy_ref<>.  Add header comment.
994         (fnpy_call): Adjust.
995
996 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
997
998         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
999         (cmdpy_completer_handle_brkchars): Adjust.
1000         (cmdpy_completer): Adjust.
1001
1002 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1003
1004         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1005         Pass correct regnum to raw_supply_zeroed.
1006
1007 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1008
1009         * regcache.c (cooked_read_test): Add CSKY to the list of
1010         architectures with a save_reggroup
1011
1012 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1013
1014         PR gdb/23368
1015         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1016         transfer terminal state from old new new inferior.
1017         * terminal.h (swap_terminal_info): New function.
1018         * inflow.c (swap_terminal_info): New function.
1019
1020 2018-10-23  Tom Tromey  <tom@tromey.com>
1021
1022         * record-btrace.c (get_thread_current_frame_id): Rename from
1023         get_thread_current_frame.  Return a frame_id.
1024         (record_btrace_start_replaying): Update.
1025
1026 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1027
1028         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1029         for CSRs.
1030
1031 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1032
1033         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1034         have_nonsteppable_watchpoint attribute to 1.
1035
1036 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1037
1038         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1039         register names.
1040         (struct register_alias): Rename to...
1041         (struct riscv_register_alias): ...this, and update comment.
1042         (riscv_register_aliases): Update type, and alias names.  Remove
1043         CSR names from this list.
1044         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1045         register names.  Add an extra assertion.
1046         (riscv_is_regnum_a_named_csr): New function.
1047         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1048
1049 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1050
1051         * configure.tgt: Add configuration for s12z.
1052         * s12z-tdep.c:  New file.
1053         * NEWS: Mention new target.
1054
1055 2018-10-22  Jim Wilson  <jimw@sifive.com>
1056
1057         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1058         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1059
1060         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1061         (riscv_register_type): Use them.
1062         (riscv_print_one_register_info): Handle union of floats same as float.
1063         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1064         riscv_fpreg_q_type fields.
1065
1066 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1067
1068         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1069         * gdbarch.h: Re-generate.
1070         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1071         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1072         * eval.c (evaluate_subexp_standard): Likewise.
1073         * findvar.c (value_of_register): Likewise.
1074         (value_of_register_lazy): Likewise.
1075         (address_from_register): Likewise.
1076         * frame.c (get_frame_register_bytes): Likewise.
1077         * gdbarch-selftests.c (register_to_value_test): Likewise.
1078         * h8300-tdep.c (h8300_register_type): Likewise.
1079         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1080         (i386_svr4_reg_to_regnum): Likewise.
1081         * infcmd.c (default_print_registers_info): Likewise.
1082         (registers_info): Likewise.
1083         (print_vector_info): Likewise.
1084         (default_print_float_info): Likewise.
1085         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1086         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1087         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1088         (mi_cmd_data_list_changed_registers): Likewise.
1089         (mi_cmd_data_list_register_values): Likewise.
1090         (mi_cmd_data_write_register_values): Likewise.
1091         (mi_cmd_trace_frame_collected): Likewise.
1092         * mips-tdep.c (print_gp_register_row): Likewise.
1093         (mips_print_registers_info): Likewise.
1094         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1095         * regcache.c (init_regcache_descr): Likewise.
1096         (register_size): Likewise.
1097         (register_dump::dump): Likewise.
1098         (cooked_read_test): Likewise.
1099         (cooked_write_test): Likewise.
1100         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1101         (rs6000_gdbarch_init): Likewise.
1102         * stabsread.c (stab_reg_to_regnum): Likewise.
1103         * stack.c (info_frame_command): Likewise.
1104         * target-descriptions.c (tdesc_register_name): Likewise.
1105         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1106         * tui/tui-regs.c (tui_show_register_group): Likewise.
1107         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1108         (user_reg_map_regnum_to_name): Likewise.
1109         (value_of_user_reg): Likewise.
1110         (maintenance_print_user_registers): Likewise.
1111         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1112         (xtensa_register_name): Likewise.
1113         (xtensa_register_type): Likewise.
1114         (xtensa_reg_to_regnum): Likewise.
1115         (xtensa_pseudo_register_read): Likewise.
1116         (xtensa_pseudo_register_write): Likewise.
1117
1118 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1119
1120         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1121         correctly-sized buffer with raw_read.
1122         (amd64_pseudo_register_write): Use correctly-sized buffer for
1123         raw_read/raw_write.
1124
1125 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1126
1127         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1128         in add_prefix_cmd of set print type.
1129
1130 2018-10-19  Tom Tromey  <tom@tromey.com>
1131
1132         PR tui/18388:
1133         * NEWS: Mention tabset deprecation.
1134         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1135         (update_tab_width): New function.
1136         (tui_set_tab_width, tui_show_tab_width): New functions.
1137         (tui_set_tab_width_command): Use update_tab_width.
1138         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1139         Add new "set tui tab-width" command.
1140         * tui/tui-source.c (tui_set_source_content): Update.
1141         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1142         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1143         Don't declare.
1144         (tui_tab_width): Declare.
1145         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1146         (tui_set_default_tab_len): Remove.
1147
1148 2018-10-19  Tom Tromey  <tom@tromey.com>
1149
1150         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1151         (key_is_backspace, tui_getc): Don't declare.
1152         * tui/tui-io.c (key_is_start_sequence): Now static.
1153         (key_is_end_sequence, key_is_backspace): Remove.
1154         (tui_getc): Now static.
1155
1156 2018-10-19  Tom Tromey  <tom@tromey.com>
1157
1158         * symfile.c (reread_symbols): Clear "static_links".
1159
1160 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1161
1162         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1163         define.
1164         (aarch64_linux_sigframe_init): Extra boundary checks.
1165
1166 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1167
1168         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1169         the possibly non-existent tdesc type 'vec128', but the type of raw
1170         register v16 instead.
1171
1172 2018-10-19  Gary Benson <gbenson@redhat.com>
1173
1174         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1175
1176 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1177
1178         PR cli/23785
1179         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1180         NULL.
1181
1182 2018-10-17  Paul Koning  <paul_koning@dell.com>
1183
1184         * charset.c (convert_between_encodings): Fix unsigned overflow.
1185
1186 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1187
1188         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1189         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1190         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1191         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1192         New functions.
1193         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1194         and fbsd_info_proc_mappings_header.
1195         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1196         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1197         New.
1198
1199 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1200
1201         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1202         Solaris Maintainer.
1203
1204 2018-10-15  Tom Tromey  <tom@tromey.com>
1205
1206         * tui/tui.c (strcat_to_buf): Remove casts.
1207         * tui/tui-winsource.c (tui_show_source_line)
1208         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1209         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1210         * tui/tui-windata.c (tui_first_data_item_displayed)
1211         (tui_delete_data_content_windows, tui_erase_data_content)
1212         (tui_display_all_data, tui_display_data_from)
1213         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1214         * tui/tui-win.c (tui_set_win_height)
1215         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1216         casts.
1217         * tui/tui-win.c (tui_resize_all): Remove casts.
1218         (tui_scroll_backward_command, tui_set_focus)
1219         (tui_set_tab_width_command): Likewise.
1220         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1221         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1222         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1223         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1224         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1225         Remove casts.
1226
1227 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1228
1229         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1230         AArch64/ARM maintainer.
1231
1232 2018-10-11  Gary Benson <gbenson@redhat.com>
1233
1234         * interps.h (interp::m_name): Make private and mutable.
1235         * interps.c (interp::~interp): Free m_name.
1236
1237 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1238             Simon Marchi <simark@simark.ca>
1239
1240         * README (`configure' options): Add documentation for new
1241         "--enable-unit-tests" option.
1242         * acinclude.m4: Include "selftest.m4".
1243         * configure: Regenerate.
1244         * configure.ac: Use "GDB_AC_SELFTEST".
1245         * maint.c (maintenance_selftest): Update message informing
1246         that selftests have been disabled.
1247         (maintenance_info_selftests): Likewise.
1248         * selftest.m4: New file.
1249
1250 2018-10-10  Gary Benson <gbenson@redhat.com>
1251
1252         * remote.c (remote_target::remote_send_printf): Add
1253         missing va_end found by Coverity.
1254
1255 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1256
1257         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1258
1259 2018-10-09  Tom Tromey  <tom@tromey.com>
1260
1261         * configure: Rebuild.
1262         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1263         * NEWS: Update --enable-ubsan documentation.
1264
1265 2018-10-09  Gary Benson <gbenson@redhat.com>
1266
1267         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1268         found by Coverity.
1269
1270 2018-10-08  Tom Tromey  <tom@tromey.com>
1271
1272         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1273         variable.
1274         (riscv_fbsd_init_abi): Likewise.
1275
1276 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1277         * valops.c (value_struct_elt_for_reference): Rename local variable
1278         to work around the shadowing a previous local warning.
1279
1280 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1281
1282         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1283         * NEWS: Mention new FreeBSD/riscv native configuration.
1284         * configure.host: Add riscv*-*-freebsd*.
1285         * configure.nat: Likewise.
1286         * riscv-fbsd-nat.c: New file.
1287
1288 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1289
1290         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1291         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1292         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1293         * NEWS: Mention new FreeBSD/riscv target.
1294         * configure.tgt: Add riscv*-*-freebsd*.
1295         * riscv-fbsd-tdep.c: New file.
1296         * riscv-fbsd-tdep.h: New file.
1297
1298 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1299
1300         * regcache.h (struct regcache_map_entry): Note that this type can
1301         be used with traditional frame caches.
1302         * trad-frame.c (trad_frame_set_reg_regmap): New.
1303         * trad-frame.h (trad_frame_set_reg_regmap): New.
1304
1305 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1306
1307         PR c++/16841
1308         * valops.c (get_virtual_base_offset): New function.
1309         (value_struct_elt_for_reference): Use it to get virtual base offset
1310         and add it in calculating class member address.
1311
1312 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
1313
1314         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1315         (check_producer): Check if the producer is codewarrior.
1316         (producer_is_codewarrior): New function.
1317         (lnp_state_machine::record_line): Ignore is_stmt flag for records
1318         produced by codewarrior.
1319         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1320
1321 2018-10-06  Tom Tromey  <tom@tromey.com>
1322
1323         PR python/19399:
1324         * python/py-inferior.c: Add "architecture" entry.
1325         (infpy_architecture): New function.
1326
1327 2018-10-06  Tom Tromey  <tom@tromey.com>
1328
1329         PR python/21765:
1330         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1331         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1332         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1333         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1334
1335 2018-10-06  Tom Tromey  <tom@tromey.com>
1336
1337         PR build/17077:
1338         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1339         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1340         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1341         #include.
1342
1343 2018-10-06  Tom Tromey  <tom@tromey.com>
1344
1345         * python/py-breakpoint.c (bppy_get_location): Handle a
1346         bp_breakpoint without a location.
1347
1348 2018-10-06  Tom Tromey  <tom@tromey.com>
1349
1350         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1351         (_RegEx): Reformat help text.
1352         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1353         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1354         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1355         text.
1356         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1357         (EnableXMethod, DisableXMethod): Remove help indentation.
1358         Capitalize meta-syntactic variables.
1359         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1360         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1361         Capitalize meta-syntactic variables.
1362         * python/lib/gdb/command/explore.py (ExploreCommand)
1363         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1364         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1365         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1366         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1367         Remove help indentation.
1368         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1369         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1370         (DisableFrameFilter, SetFrameFilterPriority)
1371         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1372
1373 2018-10-06  Tom Tromey  <tom@tromey.com>
1374
1375         PR tui/28819:
1376         * tui/tui-io.c (gdb_wgetch): New function.
1377         (tui_mld_getc, tui_getc): Use it.
1378
1379 2018-10-05  Tom Tromey  <tom@tromey.com>
1380
1381         * sol-thread.c (sol_thread_target::wait): Rename inner
1382         "save_ptid".
1383
1384 2018-10-04  Tom Tromey  <tom@tromey.com>
1385
1386         * configure: Rebuild.
1387         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1388
1389 2018-10-04  Tom Tromey  <tom@tromey.com>
1390
1391         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1392         declaration of "block".
1393
1394 2018-10-04  Tom Tromey  <tom@tromey.com>
1395
1396         * common/filestuff.c (fdwalk): Remove inner declaration of
1397         "result".
1398
1399 2018-10-04  Tom Tromey  <tom@tromey.com>
1400
1401         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1402         "structs_addr" and hoist declaration.
1403
1404 2018-10-04  Tom Tromey  <tom@tromey.com>
1405
1406         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1407         variable "size".
1408
1409 2018-10-04  Tom Tromey  <tom@tromey.com>
1410
1411         * mdebugread.c (parse_partial_symbols): Use std::string.
1412
1413 2018-10-04  Tom Tromey  <tom@tromey.com>
1414
1415         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1416         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1417         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1418         header.
1419         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1420         more inner scope.
1421         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1422         * varobj.c (varobj_update): Rename inner "newobj",
1423         "type_changed".
1424         * valprint.c (generic_emit_char): Rename inner "buf".
1425         * valops.c (find_overload_match): Rename inner "temp".
1426         (value_struct_elt_for_reference): Declare "v" in more inner
1427         scope.
1428         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1429         * unittests/array-view-selftests.c (run_tests): Rename inner
1430         "vec".
1431         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1432         header.
1433         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1434         "tsv" in more inner scope.
1435         (print_one_static_tracepoint_marker): Rename inner
1436         "tuple_emitter".
1437         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1438         (tic6x_push_dummy_call): Don't redeclare "addr".
1439         * target-float.c: Declare "dto" lower.
1440         * symtab.c (lookup_local_symbol): Rename inner "sym".
1441         (find_pc_sect_line): Rename inner "pc".
1442         * stack.c (print_frame): Don't redeclare "gdbarch".
1443         (return_command): Rename inner "gdbarch".
1444         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1445         "sp".
1446         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1447         header.
1448         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1449         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1450         scope.
1451         * remote.c (remote_target::update_thread_list): Don't redeclare
1452         "tp".
1453         (remote_target::process_initial_stop_replies): Rename inner
1454         "thread".
1455         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1456         (remote_target::wait_as): Don't redeclare "stop_reply".
1457         (remote_target::get_thread_local_address): Rename inner
1458         "result".
1459         (remote_target::get_tib_address): Likewise.
1460
1461         * regcache.c (cooked_read_test): Rename "regnum".
1462         * record-btrace.c (cmd_record_btrace_start): Rename inner
1463         "exception".
1464         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1465         loop header.
1466         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1467         header.
1468         (ppu2spu_sniffer): Rename inner "buf".
1469         * parse.c (operator_check_standard): Rename inner "type",
1470         "objfile".
1471         * p-valprint.c (pascal_val_print): Introduce new scope for
1472         "low_bound", "high_bound".
1473         * p-exp.y (yylex): Declare "i" in loop header.
1474         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1475         Lower declaration of "s".
1476         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1477         header.
1478         (nios2_push_dummy_call): Rename "len".
1479         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1480         "buf".
1481         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1482         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1483         (linux_xfer_osdata_modules): Likewise.
1484         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1485         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1486         (mips_o64_push_dummy_call): Likewise.
1487         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1488         "op".
1489         * mi/mi-main.c (list_available_thread_groups): Rename inner
1490         "tuple_emitter".
1491         (mi_cmd_data_read_memory): Rename inner "opts".
1492         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1493         "tuple_emitter".
1494         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1495         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1496         more inner scope.
1497         (parse_partial_symbols): Rename inner "pst", "p", "name"
1498         * main.c (captured_main_1): Rename inner "i"s.
1499         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1500         "oso2".
1501         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1502         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1503         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1504         (handle_signal_stop): Rename inner "gdbarch".
1505         (handle_command): Declare "signum" in loop header.
1506         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1507         "status".
1508         (examine_prologue): Rename inner "sol" and "sof".
1509         (ia64_extract_return_value): Rename inner "val".  Declare another
1510         "val" in a more inner scope.
1511         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1512         inner scope.
1513         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1514         "except".
1515         * findvar.c (default_read_var_value): Don't redeclare "addr".
1516         * f-exp.y (yylex): Declare "i" in loop header.
1517         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1518         Rename inner "type", "expect_type".
1519         (evaluate_subexp_for_sizeof): Rename inner "pc".
1520         * elfread.c (elf_symfile_read): Rename inner "abfd".
1521         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1522         "bytes_read".
1523         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1524         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1525         (dwarf_decode_line_header): Rename inner "lh".
1526         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1527         "offset".  Declare "i" in loop header.
1528         (disassemble_dwarf_expression): Rename inner "addr_size".
1529         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1530         inner "result".
1531         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1532         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1533         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1534         "inner_list_emitter".
1535         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1536         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1537         declaration in a block.
1538         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1539         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1540         "obstack_final_size".
1541         * cp-support.c (inspect_type): Declare "i" in loop header.
1542         * compile/compile.c (compile_instance::insert_symbol_error):
1543         Rename inner "e".
1544         * common/agent.c (agent_run_command): Remove inner "ret"
1545         declaration.
1546         * coffread.c (coff_symfile_read): Rename inner "name".
1547         (coff_symfile_read): Rename inner "abfd".
1548         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1549         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1550         "high".
1551         * c-exp.y (lex_one_token): Move "len" declaration lower.
1552         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1553         "gdbarch".
1554         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1555         "b".
1556         (watch_command_1): Declare "mark" later.
1557         (clear_command): Don't shadow "a" or "b".
1558         (delete_command): Rename inner "b".
1559         (delete_trace_command): Likewise.
1560         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1561         "op".
1562         (arm_gdbarch_init): Remove inner "e_flags".
1563         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1564         "offset" in inner blocks.
1565
1566 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1567
1568         * dwarf-index-write.c (file_write): Don't write if the vector is
1569         empty.
1570
1571 2018-10-05  Tom de Vries  <tdevries@suse.de>
1572
1573         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1574         PyArg_ParseTuple call.
1575
1576 2018-10-05  Tom de Vries  <tdevries@suse.de>
1577
1578         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1579         PyArg_ParseTuple call.
1580
1581 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1582
1583         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1584         to avoid exceeding 80 characters per line limit.
1585
1586 2018-10-04  Tom Tromey  <tom@tromey.com>
1587
1588         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1589         (reread_symbols): Update.
1590         * complaints.h (clear_complaints): Remove argument.
1591         * complaints.c (enum complaint_series): Remove.
1592         (series): Remove global.
1593         (complaint_internal): Update.
1594         (clear_complaints): Remove argument.
1595
1596 2018-10-04  Tom Tromey  <tom@tromey.com>
1597
1598         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1599         debugging symbols" message if there is a separate debug objfile.
1600
1601 2018-10-04  Tom Tromey  <tom@tromey.com>
1602
1603         PR cli/19551:
1604         * symfile.c (symbol_file_add_with_addrs): Update output.
1605         * psymtab.c (require_partial_symbols): Update output.
1606
1607 2018-10-04  Tom Tromey  <tom@tromey.com>
1608
1609         PR cli/22234:
1610         * complaints.c: Emit \n.
1611
1612 2018-10-04  Tom Tromey  <tom@tromey.com>
1613
1614         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1615         (separate_debug_file_exists, find_separate_debug_file)
1616         (add_symbol_file_command, reread_symbols, allocate_symtab)
1617         (allocate_compunit_symtab): Use filtered printing, not
1618         unfiltered.
1619         * psymtab.c (require_partial_symbols, dump_psymtab)
1620         (allocate_psymtab): Use filtered printing, not unfiltered.
1621
1622 2018-10-04  Tom Tromey  <tom@tromey.com>
1623
1624         * complaints.c (complaint_internal): Correctly check complaint
1625         count.
1626
1627 2018-10-04  Tom Tromey  <tom@tromey.com>
1628
1629         * complaints.h (struct complaints): Remove declaration.
1630         * complaints.c (clear_complaints): Remove an unused variable.
1631
1632 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1633
1634         * MAINTAINERS (Write After Approval): Add self.
1635
1636 2018-10-03  Tom Tromey  <tom@tromey.com>
1637
1638         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1639         "buffer_contents".
1640         * coffread.c (coff_symtab_read): Initialize "newobj".
1641
1642 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1643
1644         * dwarf2read.c (read_func_scope): Remove struct keyword in
1645         range-based for.
1646
1647 2018-10-03  Tom Tromey  <tom@tromey.com>
1648
1649         * README: Mention --enable-ubsan.
1650         * NEWS: Mention --enable-ubsan.
1651         * acinclude.m4: Include sanitize.m4.
1652         * configure: Rebuild.
1653         * configure.ac: Call AM_GDB_UBSAN.
1654         * sanitize.m4: New file.
1655
1656 2018-10-03  Tom Tromey  <tom@tromey.com>
1657
1658         * expression.h (enum exp_opcode): Use uint8_t as base type.
1659         * expprint.c (op_name): Handle invalid opcodes.
1660
1661 2018-10-03  Tom Tromey  <tom@tromey.com>
1662
1663         * parse.c (prefixify_expression): Add assert.
1664         (parse_exp_in_context_1): Throw exception if the expression is
1665         empty.
1666
1667 2018-10-03  Tom Tromey  <tom@tromey.com>
1668
1669         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1670
1671 2018-10-03  Tom Tromey  <tom@tromey.com>
1672
1673         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1674
1675 2018-10-03  Tom Tromey  <tom@tromey.com>
1676
1677         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1678         unsigned.
1679
1680 2018-10-03  Tom Tromey  <tom@tromey.com>
1681
1682         * findvar.c (extract_integer): Do work in an unsigned type.
1683
1684 2018-10-03  Tom Tromey  <tom@tromey.com>
1685
1686         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1687         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1688         base type.
1689         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1690         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1691         type.
1692         * c-lang.h (enum c_string_type_values): Use unsigned as base
1693         type.
1694         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1695
1696 2018-10-03  Tom Tromey  <tom@tromey.com>
1697
1698         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1699         <~dwarf2_frame_state_reg_info>: Update.
1700         <dwarf2_frame_state_reg_info>: Update.
1701         <alloc_regs>: Add assertion.  Update.
1702         <reg>: Now a std::vector.
1703         <num_regs>: Remove.
1704         <swap>: Update.
1705         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1706         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1707
1708 2018-10-03  Tom Tromey  <tom@tromey.com>
1709
1710         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1711
1712 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1713
1714         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1715
1716 2018-10-02  Tom Tromey  <tom@tromey.com>
1717
1718         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1719
1720 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
1721
1722         * NEWS: Mention changed commands.
1723         * ser-uds.c: New file.
1724         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1725         * configure: Regenerate.
1726         * Makefile.in: Add new file.
1727         * serial.c (serial_open): Check if filename is a socket
1728         and lookup the appropriate interface accordingly.
1729
1730 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1731
1732         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1733         define.
1734         (AARCH64_EXTRA_MAGIC): Likewise.
1735         (AARCH64_FPSIMD_MAGIC): Likewise.
1736         (AARCH64_SVE_MAGIC): Likewise.
1737         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1738         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1739         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1740         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1741         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1742         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1743         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1744         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1745         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1746         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1747         (read_aarch64_ctx): Add function.
1748         (aarch64_linux_sigframe_init): Detect FP registers.
1749
1750 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1751
1752         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1753         (AARCH64_D0_REGNUM): Likewise.
1754         (AARCH64_S0_REGNUM): Likewise.
1755         (AARCH64_H0_REGNUM): Likewise.
1756         (AARCH64_B0_REGNUM): Likewise.
1757         (AARCH64_SVE_V0_REGNUM): Likewise.
1758         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1759         (AARCH64_D0_REGNUM): Likewise.
1760         (AARCH64_S0_REGNUM): Likewise.
1761         (AARCH64_H0_REGNUM): Likewise.
1762         (AARCH64_B0_REGNUM): Likewise.
1763         (AARCH64_SVE_V0_REGNUM): Likewise.
1764
1765 2018-10-01  Gary Benson <gbenson@redhat.com>
1766
1767         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1768         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1769         prfpregset_t instead of gdb_prfpregset_t.
1770         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1771         * configure, config.in: Rebuild.
1772
1773 2018-10-01  Gary Benson <gbenson@redhat.com>
1774
1775         * common/gdb_proc_service.h: New file, factored out from...
1776         * gdb_proc_service.h: Moved common code to the above file.
1777         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1778
1779 2018-10-01  Gary Benson <gbenson@redhat.com>
1780
1781         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1782         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1783
1784 2018-10-01  Gary Benson <gbenson@redhat.com>
1785
1786         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1787         (AC_CHECK_HEADERS): Check for linux/elf.h.
1788         * configure, config.in: Rebuild.
1789         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1790         doesn't define elf_fpregset_t.
1791
1792 2018-10-01  Gary Benson <gbenson@redhat.com>
1793
1794         * gdb_proc_service.h: Whitespace change.
1795
1796 2018-10-01  Tom Tromey  <tom@tromey.com>
1797
1798         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1799         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1800         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1801
1802 2018-10-01  Tom Tromey  <tom@tromey.com>
1803
1804         * README: Minor change.
1805
1806 2018-09-30  Pedro Alves  <palves@redhat.com>
1807
1808         * darwin-nat-info.c (darwin_debug_regions_recurse)
1809         (info_mach_exceptions_command): Remove unused local variables.
1810         * darwin-nat.c (darwin_decode_notify_message)
1811         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1812         (darwin_stop_inferior, darwin_setup_exceptions)
1813         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1814         (darwin_nat_target::attach, darwin_nat_target::detach)
1815         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1816         local variables.
1817         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1818         variables.
1819
1820 2018-09-29  Tom Tromey  <tom@tromey.com>
1821
1822         * README: Remove some leftover text.
1823
1824 2018-09-29  Tom Tromey  <tom@tromey.com>
1825
1826         * PROBLEMS: Rewrite.
1827         * README: Update.
1828
1829 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1830
1831         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1832         case with explicit breakpoint kind.
1833         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1834         'additional_info' and related logic.
1835         (riscv_debug_breakpoints): New variable.
1836         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1837         instruction to determine the breakpoint kind.
1838         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1839         flag.  Update description of 'set/show riscv
1840         use-compressed-breakpoints' flag.
1841
1842 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1843
1844         (NEWS): Mention changes to frame related commands.
1845         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1846         (add_prefix_cmd_suppress_notification): New function.
1847         (add_com_suppress_notification): Call
1848         add_cmd_suppress_notification.
1849         * command.h (add_cmd_suppress_notification): Declare.
1850         (add_prefix_cmd_suppress_notification): Declare.
1851         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1852         (parse_frame_specification): Moved from stack.c, with
1853         simplification to handle a single argument.
1854         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1855         switch to the selected frame.  Add a header comment.
1856         * stack.c: Remove 'safe-ctype.h' include.
1857         (find_frame_for_function): Add declaration.
1858         (find_frame_for_address): New function.
1859         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1860         (frame_selection_by_function_completer): New function.
1861         (info_frame_command): Rename to...
1862         (info_frame_command_core): ...this, and update parameter types.
1863         (select_frame_command): Rename to...
1864         (select_frame_command_core): ...this, and update parameter types.
1865         (frame_command): Rename to...
1866         (frame_command_core): ...this, and update parameter types.
1867         (class frame_command_helper): New class to wrap implementations of
1868         frame related sub-commands.
1869         (frame_apply_cmd_list): New static global.
1870         (frame_cmd_list): Make static.
1871         (select_frame_cmd_list): New global for sub-commands.
1872         (info_frame_cmd_list): New global for sub-commands.
1873         (_initialize_stack): Register sub-commands for 'frame',
1874         'select-frame', and 'info frame'.  Update 'frame apply' commands
1875         to use frame_apply_cmd_list.  Move function local static
1876         frame_apply_list to file static frame_apply_cmd_list for
1877         consistency.
1878         * stack.h (select_frame_command): Delete declarationn.
1879         (select_frame_for_mi): Declare new function.
1880
1881 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1882
1883         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1884         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1885         and NOP.
1886
1887 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1888
1889         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1890
1891 2018-09-26  Tom Tromey  <tom@tromey.com>
1892
1893         * valops.c (auto_abandon): Remove dead code.
1894
1895 2018-09-26  Tom Tromey  <tom@tromey.com>
1896
1897         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1898
1899 2018-09-24  Tom Tromey  <tom@tromey.com>
1900
1901         * common/pathstuff.c (get_standard_cache_dir): Make
1902         "xdg_cache_home" and "home" const.
1903         * top.c (init_history): Make "tmpenv" const.
1904         * main.c (get_init_files): Make "homedir" const.
1905
1906 2018-09-23  Tom Tromey  <tom@tromey.com>
1907
1908         PR python/18852:
1909         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1910
1911 2018-09-23  Tom Tromey  <tom@tromey.com>
1912
1913         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1914         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1915         * python/python-internal.h (gdbpy_handle_exception): Declare.
1916         * python/py-utils.c (gdbpy_handle_exception): New function.
1917
1918 2018-09-23  Tom Tromey  <tom@tromey.com>
1919
1920         PR python/17284:
1921         * python/py-type.c (typy_template_argument): Check for negative
1922         argument number.
1923
1924 2018-09-23  Tom Tromey  <tom@tromey.com>
1925
1926         PR python/14062:
1927         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1928
1929 2018-09-23  Tom Tromey  <tom@tromey.com>
1930
1931         PR python/18170:
1932         * python/py-value.c (valpy_int): Allow conversion from pointer
1933         type.
1934
1935 2018-09-23  Tom Tromey  <tom@tromey.com>
1936
1937         PR python/20126:
1938         * python/py-value.c (valpy_int): Respect type sign.
1939
1940 2018-09-23  Tom Tromey  <tom@tromey.com>
1941
1942         PR python/18352;
1943         * python/py-value.c (valpy_float): Allow conversions from int or
1944         char.
1945         (valpy_int, valpy_long): Allow conversions from float.
1946
1947 2018-09-23  Tom Tromey  <tom@tromey.com>
1948
1949         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1950         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1951
1952 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1953
1954         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1955         __sighndlr.
1956         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1957
1958 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1959
1960         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1961         target_terminal::ours().
1962
1963 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1964
1965         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1966         of vl to ULONGEST.
1967
1968 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1969
1970         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1971         redundant condition.
1972
1973 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1974
1975         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1976
1977         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1978         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1979         * sol-thread.c (ps_pdmodel): Don't guard definition.
1980
1981         * procfs.c: Fix formatting.
1982
1983         * procfs.c (sysset_t_alloc): Remove.
1984         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1985         (procfs_debug_inferior): Likewise.
1986         (procfs_set_exec_trap): Likewise.
1987         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1988         (proc_set_traced_sysexit): Likewise.
1989
1990         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1991         (dead_procinfo): Likewise.
1992         (proc_warn): Likewise.
1993         (proc_error): Likewise.
1994         (proc_get_LDT_entry): Likewise.
1995         (do_attach): Likewise.
1996         (procfs_target::pid_to_str): Likewise.
1997         (iterate_over_mappings): Likewise.
1998
1999         * procfs.c (create_procinfo): Fix ARI warning.
2000         (proc_get_status): Likewise.
2001         (proc_stop_process): Likewise.
2002         (proc_run_process): Likewise.
2003         (proc_kill): Likewise.
2004         (proc_get_LDT_entry): Likewise.
2005         (procfs_find_LDT_entry): Likewise.
2006         (proc_update_threads): Likewise.
2007         (proc_iterate_over_threads): Likewise.
2008         (do_attach): Likewise.
2009         (procfs_xfer_memory): Likewise.
2010         (invalidate_cache): Likewise.
2011         (procfs_target::resume): Likewise.
2012         (procfs_init_inferior): Likewise.
2013         (procfs_set_exec_trap): Likewise.
2014         (procfs_target::thread_alive): Likewise.
2015         (procfs_target::pid_to_exec_file): Likewise.
2016         (iterate_over_mappings): Likewise.
2017         (procfs_target::make_corefile_notes): Likewise.
2018         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2019
2020         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2021         (procfs_find_LDT_entry): Likewise.
2022         * sol-thread.c (ps_lgetLDT): Likewise.
2023
2024 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2025
2026         PR tdep/17903
2027         * procfs.c (procfs_target): Declare pid_to_exec_file.
2028         (procfs_target::pid_to_exec_file): New.
2029
2030 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2031
2032         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2033         renaming.
2034         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2035         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2036
2037 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2038
2039         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2040         (supply_fpregset, fill_fpregset): Move ...
2041         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2042         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2043         Remove references to ioctl-based procfs.
2044         Include <sys/reg.h>.
2045         Remove PR_MODEL_NATIVE guards.
2046         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2047         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2048
2049 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2050
2051         PR gdb/20981:
2052         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2053         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2054         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2055
2056 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2057
2058         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2059         (fbsd_print_sockaddr_in6): Likewise.
2060
2061 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2062             Chris January  <chris.january@arm.com>
2063
2064         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2065         (evaluate_subexp_standard): Return a dummy type when
2066         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2067         OP_F77_UNDETERMINED_ARGLIST case.
2068         * expression.h (enum noside): Update comment.
2069
2070 2018-09-19  George Vasick <george.vasick@oracle.com>
2071
2072         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2073
2074 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2075             April Chin <april.chin@oracle.com>
2076             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2077
2078         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2079         uint_t lwpid_t.
2080         (create_procinfo): Print pids in /proc without leading zeros.
2081
2082 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2083
2084         * nios2-tdep.c (nios2_gcc_target_options): New.
2085         (nios2_gdb_arch_init): Install new hook.
2086
2087 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2088
2089         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2090         New file.
2091         * update-gnulib.sh: Apply patch.
2092         * configure: Re-generate.
2093
2094 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2095
2096         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2097         description.  Make "info proc" command descriptions more
2098         consistent.
2099
2100 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2101
2102         * NEWS: Mention 'info proc files' command.
2103
2104 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2105
2106         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2107         descriptors for IP_FILES and IP_ALL.
2108
2109 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2110
2111         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2112         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2113         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2114         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2115         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2116         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2117         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2118         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2119         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2120         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2121         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2122         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2123         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2124         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2125         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2126         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2127         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2128         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2129         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2130         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2131         (struct fbsd_sockaddr_un): New types.
2132         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2133         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2134         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2135         (fbsd_core_info_proc_files): New functions.
2136         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2137         IP_ALL.
2138         * fbsd-tdep.h (fbsd_info_proc_files_header)
2139         (fbsd_info_proc_files_entry): New.
2140
2141 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2142
2143         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2144         * infcmd.c (info_proc_cmd_files): New function.
2145         (_initialize_infcmd): Register 'info proc files' command.
2146
2147 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2148
2149         * gnulib/aclocal-m4-deps.mk: Re-generate.
2150         * gnulib/aclocal.m4: Re-generate.
2151         * gnulib/config.in: Re-generate.
2152         * gnulib/configure: Re-generate.
2153         * gnulib/import/Makefile.am: Re-generate.
2154         * gnulib/import/Makefile.in: Re-generate.
2155         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2156         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2157         * gnulib/import/arpa_inet.in.h: New file.
2158         * gnulib/import/inet_ntop.c: New file.
2159         * gnulib/import/m4/arpa_inet_h.m4: New file.
2160         * gnulib/import/m4/inet_ntop.m4: New file.
2161         * gnulib/import/m4/netinet_in_h.m4: New file.
2162         * gnulib/import/m4/socklen.m4: New file.
2163         * gnulib/import/m4/sockpfaf.m4: New file.
2164         * gnulib/import/m4/stdalign.m4: New file.
2165         * gnulib/import/m4/sys_uio_h.m4: New file.
2166         * gnulib/import/netinet_in.in.h: New file.
2167         * gnulib/import/stdalign.in.h: New file.
2168         * gnulib/import/sys_socket.c: New file.
2169         * gnulib/import/sys_socket.in.h: New file.
2170         * gnulib/import/sys_uio.in.h: New file.
2171         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2172         module.
2173
2174 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2175
2176         * gnulib/aclocal-m4-deps.mk: New file.
2177         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2178         deterministically.
2179
2180 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2181
2182         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2183         KVE_PATH.
2184
2185 2018-09-18  Tom Tromey  <tom@tromey.com>
2186
2187         * compile/compile-object-load.c (struct
2188         link_hash_table_cleanup_data): Add constructor and destructor.
2189         Use DISABLE_COPY_AND_ASSIGN.
2190         (~link_hash_table_cleanup_data): Rename from
2191         link_hash_table_free.  Now a destructor.
2192         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2193
2194 2018-09-18  Tom Tromey  <tom@tromey.com>
2195
2196         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2197         * compile/compile-object-load.c (struct munmap_list): Move to
2198         header file.
2199         (munmap_list::add): Rename from munmap_list_add; rewrite.
2200         (munmap_list::~munmap_list): Rename from munmap_list_free.
2201         (munmap_listp_free_cleanup): Remove.
2202         (compile_object_load): Update.
2203         * compile/compile-object-load.h (struct munmap_list): Move from
2204         compile-object-load.c.  Rewrite.
2205
2206 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2207
2208         * aarch64-tdep.c (pass_in_v): Use register size.
2209         (aarch64_extract_return_value): Likewise.
2210         (aarch64_store_return_value): Likewise.
2211
2212 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2213
2214         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2215         rlim_t.
2216
2217 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2218
2219         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2220         Fix short help line.
2221
2222 2018-09-17  Tom Tromey  <tom@tromey.com>
2223
2224         PR python/20445:
2225         * configure: Rebuild.
2226         * configure.ac: Conditionally use -DNDEBUG for Python.
2227
2228 2018-09-17  Tom Tromey  <tom@tromey.com>
2229
2230         * configure: Rebuild.
2231         * configure.ac: Use gmp as a library dependency when checking for
2232         mpfr.
2233
2234 2018-09-17  Pedro Alves  <palves@redhat.com>
2235
2236         * python/py-inferior.c (find_inferior_object): Delete.
2237
2238 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2239
2240         * compile/compile-cplus-types.c
2241         (compile_cplus_instance::enter_scope): Don't use new_scope after
2242         std::move.
2243
2244 2018-09-17  Tom Tromey  <tom@tromey.com>
2245
2246         * common/pathstuff.c (get_standard_cache_dir): Use
2247         ~/Library/Caches on macOS.
2248         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2249
2250 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2251
2252         PR python/23669
2253         * breakpoint.c (commands_cmd_element): New.
2254         (_initialize_breakpoint): Assign commands_cmd_element.
2255         * breakpoint.h (commands_cmd_element): New.
2256         * cli/cli-script.c (while_cmd_element, if_command,
2257         define_cmd_element): New.
2258         (command_name_equals): Remove.
2259         (process_next_line): Compare commands by pointer, not by name.
2260         (_initialize_cli_script): Assign the various cmd_list_element
2261         variables.
2262         * compile/compile.c (compile_cmd_element): New.
2263         (_initialize_compile): Assign compile_cmd_element.
2264         * compile/compile.h (compile_cmd_element): New.
2265         * guile/guile.c (guile_cmd_element): New.
2266         (install_gdb_commands): Assign guile_cmd_element.
2267         * guile/guile.h (guile_cmd_element): New.
2268         * python/python.c (python_cmd_element): New.
2269         (_initialize_python): Assign python_cmd_element.
2270         * python/python.h (python_cmd_element): New.
2271         * tracepoint.c (while_stepping_cmd_element): New.
2272         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2273         * tracepoint.h (while_stepping_cmd_element): New.
2274
2275 2018-09-17  Tom Tromey  <tom@tromey.com>
2276
2277         * infrun.c (save_infcall_suspend_state): Return
2278         infcall_suspend_state_up.
2279         (save_infcall_control_state): Return infcall_control_state_up.
2280         * inferior.h (save_infcall_suspend_state)
2281         (save_infcall_control_state): Declare later.  Return unique
2282         pointers.
2283
2284 2018-09-17  Tom Tromey  <tom@tromey.com>
2285
2286         * infrun.c (struct stop_context): Declare constructor,
2287         destructor, "changed" method.
2288         (stop_context::stop_context): Rename from save_stop_context.
2289         (stop_context::~stop_context): Rename from
2290         release_stop_context_cleanup.
2291         (normal_stop): Update.
2292         (stop_context::changed): Rename from stop_context_changed.  Return
2293         bool.
2294
2295 2018-09-17  Tom Tromey  <tom@tromey.com>
2296
2297         * inferior.h (struct infcall_suspend_state_deleter): New.
2298         (infcall_suspend_state_up): New typedef.
2299         (struct infcall_control_state_deleter): New.
2300         (infcall_control_state_up): New typedef.
2301         (make_cleanup_restore_infcall_suspend_state)
2302         (make_cleanup_restore_infcall_control_state): Don't declare.
2303         * infcall.c (call_function_by_hand_dummy): Update.
2304         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2305         (make_cleanup_restore_infcall_suspend_state): Remove.
2306         (do_restore_infcall_control_state_cleanup)
2307         (make_cleanup_restore_infcall_control_state): Remove.
2308
2309 2018-09-17  Tom Tromey  <tom@tromey.com>
2310
2311         * gdbthread.h (struct thread_control_state): Add initializer.
2312         (class thread_info) <control>: Remove initializer.
2313         * inferior.h (struct inferior_control_state): Add initializer.
2314         (class inferior) <control>: Remove initializer.
2315         (exit_inferior_1): Update.
2316         * infrun.c (struct infcall_control_state): Add constructors.
2317         (save_infcall_control_state): Use new.
2318         (restore_infcall_control_state, discard_infcall_control_state):
2319         Use delete.
2320
2321 2018-09-17  Tom Tromey  <tom@tromey.com>
2322
2323         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2324         unique_ptr.
2325         <siginfo_data>: Now a unique_xmalloc_ptr.
2326         (save_infcall_suspend_state, restore_infcall_suspend_state)
2327         (discard_infcall_suspend_state)
2328         (get_infcall_suspend_state_regcache): Update.
2329
2330 2018-09-17  Tom Tromey  <tom@tromey.com>
2331
2332         * gdbthread.h (struct thread_suspend_state): Add initializers.
2333         (class thread_info) <suspend>: Remove initializer.
2334         * infrun.c (struct infcall_suspend_state): Add initializers.
2335         (save_infcall_suspend_state): Use new.
2336         (discard_infcall_suspend_state): Use delete.
2337
2338 2018-09-16  Tom Tromey  <tom@tromey.com>
2339
2340         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2341         Remove.
2342         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2343         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2344         (py_varobj_iter_new): Likewise.
2345         (py_varobj_get_iterator): Use gdbpy_ref.
2346
2347 2018-09-16  Tom Tromey  <tom@tromey.com>
2348
2349         * python/py-threadevent.c (py_get_event_thread): Simplify.
2350         * python/py-inferior.c (infpy_thread_from_thread_handle):
2351         Return immediately after calling thread_to_thread_object.  Use
2352         Py_RETURN_NONE.
2353         (thread_to_thread_object): Set the exception on a NULL return.
2354
2355 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2356
2357         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2358
2359 2018-09-16  Tom Tromey  <tom@tromey.com>
2360
2361         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2362         Remove.
2363
2364 2018-09-16  Tom Tromey  <tom@tromey.com>
2365
2366         * python/python-internal.h (thread_to_thread_object): Change
2367         return type.
2368         * python/py-inferior.c (thread_to_thread_object): Return a new
2369         reference.
2370         (infpy_thread_from_thread_handle): Update.
2371         * python/py-infthread.c (gdbpy_selected_thread): Update.
2372         * python/py-stopevent.c (create_stop_event_object): Update.
2373         * python/py-threadevent.c (py_get_event_thread): Return a new
2374         reference.
2375         (py_get_event_thread): Update.
2376         * python/py-event.h (py_get_event_thread): Change return type.
2377         * python/py-continueevent.c (create_continue_event_object):
2378         Update.
2379
2380 2018-09-16  Tom Tromey  <tom@tromey.com>
2381
2382         * python/py-progspace.c (pspy_get_objfiles): Update.
2383         * python/python-internal.h (objfile_to_objfile_object): Change
2384         return type.
2385         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2386         Update.
2387         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2388         Update.
2389         * python/python.c (gdbpy_get_current_objfile): Update.
2390         (gdbpy_objfiles): Update.
2391         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2392         Update.
2393         (objfile_to_objfile_object): Return a new reference.
2394         * python/py-symtab.c (stpy_get_objfile): Update.
2395         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2396         Update.
2397
2398 2018-09-16  Tom Tromey  <tom@tromey.com>
2399
2400         * python/py-inferior.c (infpy_get_progspace): Update.
2401         * python/python-internal.h (pspace_to_pspace_object): Change
2402         return type.
2403         * python/py-newobjfileevent.c
2404         (create_clear_objfiles_event_object): Update.
2405         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2406         Update.
2407         * python/python.c (gdbpy_get_current_progspace): Update.
2408         (gdbpy_progspaces): Update.
2409         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2410         reference.
2411         * python/py-objfile.c (objfpy_get_progspace): Update.
2412         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2413         Update.
2414
2415 2018-09-16  Tom Tromey  <tom@tromey.com>
2416
2417         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2418         (solib_name, block_for_pc, find_pc_line): New functions.
2419         (execute_unwinders): Update.
2420         * python/py-block.c (gdbpy_block_for_pc): Remove.
2421         * python/py-inferior.c (infpy_get_progspace): New function.
2422         (inferior_object_getset) <progspace>: Add.
2423         * python/py-progspace.c (pspy_objfiles): Rewrite.
2424         (pspy_solib_name, pspy_block_for_pc)
2425         (pspy_find_pc_line, pspy_is_valid): New functions.
2426         (progspace_object_methods): Add entries for solib_name,
2427         block_for_pc, find_pc_line, is_valid.
2428         * python/python-internal.h (gdbpy_block_for_pc)
2429         (build_objfiles_list): Don't declare.
2430         * python/python.c: Don't include solib.h.
2431         (gdbpy_solib_name, gdbpy_find_pc_line)
2432         (gdbpy_get_current_progspace, build_objfiles_list)
2433         (gdbpy_objfiles): Remove.
2434         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2435         solib_name, find_pc_line>: Remove entries.
2436
2437 2018-09-16  Tom Tromey  <tom@tromey.com>
2438
2439         * top.c (new_ui_command): Use GNU style for metasyntactic
2440         variables.
2441         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2442         variables.
2443         * maint.c (maintenance_translate_address): Remove "<>" around
2444         text.
2445         * interps.c (interpreter_exec_cmd): Use GNU style for
2446         metasyntactic variables.
2447         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2448         metasyntactic variables.
2449         * tracepoint.c (tfind_range_command): Use GNU style for
2450         metasyntactic variables.
2451         (tfind_outside_command): Likewise.
2452         (_initialize_tracepoint): Likewise.
2453         * remote.c (extended_remote_target::create_inferior): Use GNU
2454         style for metasyntactic variables.
2455         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2456         metasyntactic variables.
2457         (adi_assign_command): Likewise.
2458
2459 2018-09-16  Tom Tromey  <tom@tromey.com>
2460
2461         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2462         metasyntactic variables.  Print message if no disassembler options
2463         are available.
2464
2465 2018-09-15  Tom Tromey  <tom@tromey.com>
2466
2467         * infcmd.c (get_inferior_args): Return const char *.
2468         * inferior.h (get_inferior_args): Return type now const.
2469         * linux-tdep.c (linux_fill_prpsinfo): Update.
2470         * procfs.c (procfs_target::make_corefile_notes): Update.
2471
2472 2018-09-07  Tom Tromey  <tom@tromey.com>
2473
2474         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2475         inside the TRY.
2476
2477 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2478
2479         * nios2-tdep.c (nios2_type_align): New.
2480         (nios2_gdb_arch_init): Install type_align hook.
2481
2482 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2483
2484         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2485         type that is neither object file owned, nor gdbarch owned.
2486         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2487         gdbarch is non-NULL.
2488         (alloc_type_instance): Allocate non-objfile owned types on the
2489         gdbarch obstack.
2490         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2491         using TYPE_ALLOC to ensure memory is allocated on the correct
2492         obstack.
2493         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2494         obstack, or the gdbarch obstack.
2495         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2496
2497 2018-09-14  Tom Tromey  <tom@tromey.com>
2498
2499         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2500         block.
2501
2502 2018-09-14  Tom Tromey  <tom@tromey.com>
2503
2504         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2505
2506 2018-09-13  Tom Tromey  <tom@tromey.com>
2507
2508         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2509         static.
2510
2511 2018-09-13  Tom Tromey  <tom@tromey.com>
2512
2513         * exec.c (try_open_exec_file): Use std::string.
2514
2515 2018-09-13  Tom Tromey  <tom@tromey.com>
2516
2517         * utils.h (gdb_bfd_errmsg): Return std::string.
2518         * exec.c (exec_file_attach): Update.
2519         * compile/compile-object-load.c (compile_object_load): Update.
2520         * utils.c (gdb_bfd_errmsg): Return std::string.
2521
2522 2018-09-13  Tom Tromey  <tom@tromey.com>
2523
2524         * procfs.c (struct procinfo_deleter): New.
2525         (procinfo_up): New typedef.
2526         (do_destroy_procinfo_cleanup): Remove.
2527         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2528
2529 2018-09-13  Tom Tromey  <tom@tromey.com>
2530
2531         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2532
2533 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2534 2018-09-13  Tom Tromey  <tom@tromey.com>
2535
2536         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2537         (pspy_get_objfiles): New function.
2538         (progspace_object_methods): New.
2539         (pspace_object_type): Add tp_methods callback.
2540         * python/python-internal.h (build_objfiles_list): New
2541         declaration.
2542         * python/python.c (build_objfiles_list): New function.
2543         (gdbpy_objfiles): Implement using build_objfiles_list.
2544         * NEWS: Mention the Progspace.objfiles method.
2545
2546 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2547
2548         * python/py-inferior.c (infpy_get_progspace): New function.
2549         (inferior_object_getset): Add progspace property.
2550         * NEWS: Mention the new property.
2551
2552 2018-09-13  Tom Tromey  <tom@tromey.com>
2553
2554         PR rust/23650:
2555         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2556
2557 2018-09-13  Tom Tromey  <tom@tromey.com>
2558
2559         PR rust/23626:
2560         * rust-lang.c (rust_enum_variant): Now static.
2561         (rust_empty_enum_p): New function.
2562         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2563         Handle empty enum.
2564
2565 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2566
2567         * python/py-inferior.c (infpy_repr): New.
2568         (inferior_object_type): Register infpy_repr.
2569         * python/py-objfile.c (objfpy_repr): New.
2570         (objfile_object_type): Register objfpy_repr.
2571
2572 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2573
2574         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2575
2576 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2577
2578         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2579         typo.
2580
2581 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2582
2583         * common/common-utils.c: Don't include '<sys/stat.h>'.
2584         (is_regular_file): Move to...
2585         * common/filestuff.c (is_regular_file): ... here.
2586         * common/common-utils.h (is_regular_file): Move to...
2587         * common/filestuff.h (is_regular_file): ... here.
2588
2589 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2590
2591         * skip.c (debug_skip): New variable.
2592         (skiplist_entry::do_skip_file_p): Add debug output.
2593         (skiplist_entry::do_skip_gfile_p): Likewise.
2594         (skiplist_entry::skip_function_p): Likewise.
2595         (_initialize_step_skip): Create debug command.
2596         * NEWS: Mention set/show debug skip.
2597
2598 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2599
2600         * darwin-nat.c (should_disable_startup_with_shell):
2601         New function.
2602         (darwin_nat_target::create_inferior): Add call.
2603
2604 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2605
2606         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2607         inf_port, msg_state>: Initialize.
2608         (struct darwin_thread_info) <signaled, single_step>: Change
2609         type and initialize.
2610         (struct darwin_thread_info) <event>: Initialize.
2611
2612 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2613
2614         PR gdb/23555
2615         PR gdb/23558
2616         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2617         guesses.
2618
2619 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2620
2621         Revert:
2622         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2623
2624         PR gdb/23555
2625         PR gdb/23558
2626         * gnulib/aclocal.m4: Regenerate.
2627         * gnulib/config.in: Regenerate.
2628         * gnulib/configure: Regenerate.
2629         * gnulib/import/Makefile.am: Update.
2630         * gnulib/import/Makefile.in: Update.
2631         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2632         * gnulib/import/_Noreturn.h: ... this.
2633         * gnulib/import/alloca.in.h: Update.
2634         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2635         * gnulib/import/arg-nonnull.h: ... this.
2636         * gnulib/import/assure.h: Update.
2637         * gnulib/import/at-func.c: Update.
2638         * gnulib/import/basename-lgpl.c: Update.
2639         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2640         * gnulib/import/c++defs.h: ... this.
2641         * gnulib/import/canonicalize-lgpl.c: Update.
2642         * gnulib/import/cdefs.h: Update.
2643         * gnulib/import/chdir-long.c: Update.
2644         * gnulib/import/chdir-long.h: Update.
2645         * gnulib/import/cloexec.c: Update.
2646         * gnulib/import/cloexec.h: Update.
2647         * gnulib/import/close.c: Update.
2648         * gnulib/import/closedir.c: Update.
2649         * gnulib/import/config.charset: Update.
2650         * gnulib/import/dirent-private.h: Update.
2651         * gnulib/import/dirent.in.h: Update.
2652         * gnulib/import/dirfd.c: Update.
2653         * gnulib/import/dirname-lgpl.c: Update.
2654         * gnulib/import/dirname.h: Update.
2655         * gnulib/import/dosname.h: Update.
2656         * gnulib/import/dup-safer-flag.c: Update.
2657         * gnulib/import/dup-safer.c: Update.
2658         * gnulib/import/dup.c: Update.
2659         * gnulib/import/dup2.c: Update.
2660         * gnulib/import/errno.in.h: Update.
2661         * gnulib/import/error.c: Update.
2662         * gnulib/import/error.h: Update.
2663         * gnulib/import/exitfail.c: Update.
2664         * gnulib/import/exitfail.h: Update.
2665         * gnulib/import/extra/update-copyright: Update.
2666         * gnulib/import/fchdir.c: Update.
2667         * gnulib/import/fcntl.c: Update.
2668         * gnulib/import/fcntl.in.h: Update.
2669         * gnulib/import/fd-hook.c: Update.
2670         * gnulib/import/fd-hook.h: Update.
2671         * gnulib/import/fd-safer-flag.c: Update.
2672         * gnulib/import/fd-safer.c: Update.
2673         * gnulib/import/fdopendir.c: Update.
2674         * gnulib/import/filename.h: Update.
2675         * gnulib/import/filenamecat-lgpl.c: Update.
2676         * gnulib/import/filenamecat.h: Update.
2677         * gnulib/import/flexmember.h: Update.
2678         * gnulib/import/float+.h: Update.
2679         * gnulib/import/float.c: Update.
2680         * gnulib/import/float.in.h: Update.
2681         * gnulib/import/fnmatch.c: Update.
2682         * gnulib/import/fnmatch.in.h: Update.
2683         * gnulib/import/fnmatch_loop.c: Update.
2684         * gnulib/import/fpucw.h: Update.
2685         * gnulib/import/frexp.c: Update.
2686         * gnulib/import/frexpl.c: Update.
2687         * gnulib/import/fstat.c: Update.
2688         * gnulib/import/fstatat.c: Update.
2689         * gnulib/import/getcwd-lgpl.c: Update.
2690         * gnulib/import/getcwd.c: Update.
2691         * gnulib/import/getdtablesize.c: Update.
2692         * gnulib/import/getlogin_r.c: Update.
2693         * gnulib/import/getprogname.c: Update.
2694         * gnulib/import/getprogname.h: Update.
2695         * gnulib/import/gettext.h: Update.
2696         * gnulib/import/gettimeofday.c: Update.
2697         * gnulib/import/glob-libc.h: Update.
2698         * gnulib/import/glob.c: Update.
2699         * gnulib/import/glob.in.h: Update.
2700         * gnulib/import/glob_internal.h: Update.
2701         * gnulib/import/glob_pattern_p.c: Update.
2702         * gnulib/import/globfree.c: Update.
2703         * gnulib/import/hard-locale.c: Update.
2704         * gnulib/import/hard-locale.h: Update.
2705         * gnulib/import/intprops.h: Update.
2706         * gnulib/import/inttypes.in.h: Update.
2707         * gnulib/import/isnan.c: Update.
2708         * gnulib/import/isnand-nolibm.h: Update.
2709         * gnulib/import/isnand.c: Update.
2710         * gnulib/import/isnanl-nolibm.h: Update.
2711         * gnulib/import/isnanl.c: Update.
2712         * gnulib/import/itold.c: Update.
2713         * gnulib/import/libc-config.h: Update.
2714         * gnulib/import/limits.in.h: Update.
2715         * gnulib/import/localcharset.c: Update.
2716         * gnulib/import/localcharset.h: Update.
2717         * gnulib/import/localtime-buffer.c: Update.
2718         * gnulib/import/localtime-buffer.h: Update.
2719         * gnulib/import/lstat.c: Update.
2720         * gnulib/import/m4/00gnulib.m4: Update.
2721         * gnulib/import/m4/__inline.m4: Update.
2722         * gnulib/import/m4/absolute-header.m4: Update.
2723         * gnulib/import/m4/alloca.m4: Update.
2724         * gnulib/import/m4/builtin-expect.m4: Update.
2725         * gnulib/import/m4/canonicalize.m4: Update.
2726         * gnulib/import/m4/chdir-long.m4: Update.
2727         * gnulib/import/m4/close.m4: Update.
2728         * gnulib/import/m4/closedir.m4: Update.
2729         * gnulib/import/m4/configmake.m4: Update.
2730         * gnulib/import/m4/d-ino.m4: Update.
2731         * gnulib/import/m4/d-type.m4: Update.
2732         * gnulib/import/m4/dirent_h.m4: Update.
2733         * gnulib/import/m4/dirfd.m4: Update.
2734         * gnulib/import/m4/dirname.m4: Update.
2735         * gnulib/import/m4/double-slash-root.m4: Update.
2736         * gnulib/import/m4/dup.m4: Update.
2737         * gnulib/import/m4/dup2.m4: Update.
2738         * gnulib/import/m4/eealloc.m4: Update.
2739         * gnulib/import/m4/environ.m4: Update.
2740         * gnulib/import/m4/errno_h.m4: Update.
2741         * gnulib/import/m4/error.m4: Update.
2742         * gnulib/import/m4/exponentd.m4: Update.
2743         * gnulib/import/m4/exponentl.m4: Update.
2744         * gnulib/import/m4/extensions.m4: Update.
2745         * gnulib/import/m4/extern-inline.m4: Update.
2746         * gnulib/import/m4/fchdir.m4: Update.
2747         * gnulib/import/m4/fcntl-o.m4: Update.
2748         * gnulib/import/m4/fcntl.m4: Update.
2749         * gnulib/import/m4/fcntl_h.m4: Update.
2750         * gnulib/import/m4/fdopendir.m4: Update.
2751         * gnulib/import/m4/filenamecat.m4: Update.
2752         * gnulib/import/m4/flexmember.m4: Update.
2753         * gnulib/import/m4/float_h.m4: Update.
2754         * gnulib/import/m4/fnmatch.m4: Update.
2755         * gnulib/import/m4/fnmatch_h.m4: Update.
2756         * gnulib/import/m4/fpieee.m4: Update.
2757         * gnulib/import/m4/frexp.m4: Update.
2758         * gnulib/import/m4/frexpl.m4: Update.
2759         * gnulib/import/m4/fstat.m4: Update.
2760         * gnulib/import/m4/fstatat.m4: Update.
2761         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2762         * gnulib/import/m4/getcwd-path-max.m4: Update.
2763         * gnulib/import/m4/getcwd.m4: Update.
2764         * gnulib/import/m4/getdtablesize.m4: Update.
2765         * gnulib/import/m4/getlogin.m4: Update.
2766         * gnulib/import/m4/getlogin_r.m4: Update.
2767         * gnulib/import/m4/getpagesize.m4: Update.
2768         * gnulib/import/m4/getprogname.m4: Update.
2769         * gnulib/import/m4/gettimeofday.m4: Update.
2770         * gnulib/import/m4/glibc21.m4: Update.
2771         * gnulib/import/m4/glob.m4: Update.
2772         * gnulib/import/m4/glob_h.m4: Update.
2773         * gnulib/import/m4/gnulib-cache.m4: Update.
2774         * gnulib/import/m4/gnulib-common.m4: Update.
2775         * gnulib/import/m4/gnulib-comp.m4: Update.
2776         * gnulib/import/m4/gnulib-tool.m4: Update.
2777         * gnulib/import/m4/hard-locale.m4: Update.
2778         * gnulib/import/m4/include_next.m4: Update.
2779         * gnulib/import/m4/inttypes-pri.m4: Update.
2780         * gnulib/import/m4/inttypes.m4: Update.
2781         * gnulib/import/m4/isnand.m4: Update.
2782         * gnulib/import/m4/isnanl.m4: Update.
2783         * gnulib/import/m4/largefile.m4: Update.
2784         * gnulib/import/m4/limits-h.m4: Update.
2785         * gnulib/import/m4/localcharset.m4: Update.
2786         * gnulib/import/m4/locale-fr.m4: Update.
2787         * gnulib/import/m4/locale-ja.m4: Update.
2788         * gnulib/import/m4/locale-zh.m4: Update.
2789         * gnulib/import/m4/localtime-buffer.m4: Update.
2790         * gnulib/import/m4/longlong.m4: Update.
2791         * gnulib/import/m4/lstat.m4: Update.
2792         * gnulib/import/m4/malloc.m4: Update.
2793         * gnulib/import/m4/malloca.m4: Update.
2794         * gnulib/import/m4/math_h.m4: Update.
2795         * gnulib/import/m4/mbrtowc.m4: Update.
2796         * gnulib/import/m4/mbsinit.m4: Update.
2797         * gnulib/import/m4/mbsrtowcs.m4: Update.
2798         * gnulib/import/m4/mbstate_t.m4: Update.
2799         * gnulib/import/m4/memchr.m4: Update.
2800         * gnulib/import/m4/memmem.m4: Update.
2801         * gnulib/import/m4/mempcpy.m4: Update.
2802         * gnulib/import/m4/memrchr.m4: Update.
2803         * gnulib/import/m4/mkdir.m4: Update.
2804         * gnulib/import/m4/mkstemp.m4: Update.
2805         * gnulib/import/m4/mmap-anon.m4: Update.
2806         * gnulib/import/m4/mode_t.m4: Update.
2807         * gnulib/import/m4/msvc-inval.m4: Update.
2808         * gnulib/import/m4/msvc-nothrow.m4: Update.
2809         * gnulib/import/m4/multiarch.m4: Update.
2810         * gnulib/import/m4/nocrash.m4: Update.
2811         * gnulib/import/m4/off_t.m4: Update.
2812         * gnulib/import/m4/onceonly.m4: Update.
2813         * gnulib/import/m4/open-cloexec.m4: Update.
2814         * gnulib/import/m4/open.m4: Update.
2815         * gnulib/import/m4/openat.m4: Update.
2816         * gnulib/import/m4/opendir.m4: Update.
2817         * gnulib/import/m4/pathmax.m4: Update.
2818         * gnulib/import/m4/rawmemchr.m4: Update.
2819         * gnulib/import/m4/readdir.m4: Update.
2820         * gnulib/import/m4/readlink.m4: Update.
2821         * gnulib/import/m4/realloc.m4: Update.
2822         * gnulib/import/m4/rename.m4: Update.
2823         * gnulib/import/m4/rewinddir.m4: Update.
2824         * gnulib/import/m4/rmdir.m4: Update.
2825         * gnulib/import/m4/save-cwd.m4: Update.
2826         * gnulib/import/m4/secure_getenv.m4: Update.
2827         * gnulib/import/m4/setenv.m4: Update.
2828         * gnulib/import/m4/signal_h.m4: Update.
2829         * gnulib/import/m4/ssize_t.m4: Update.
2830         * gnulib/import/m4/stat-time.m4: Update.
2831         * gnulib/import/m4/stat.m4: Update.
2832         * gnulib/import/m4/std-gnu11.m4: Update.
2833         * gnulib/import/m4/stdbool.m4: Update.
2834         * gnulib/import/m4/stddef_h.m4: Update.
2835         * gnulib/import/m4/stdint.m4: Update.
2836         * gnulib/import/m4/stdio_h.m4: Update.
2837         * gnulib/import/m4/stdlib_h.m4: Update.
2838         * gnulib/import/m4/strchrnul.m4: Update.
2839         * gnulib/import/m4/strdup.m4: Update.
2840         * gnulib/import/m4/strerror.m4: Update.
2841         * gnulib/import/m4/string_h.m4: Update.
2842         * gnulib/import/m4/strstr.m4: Update.
2843         * gnulib/import/m4/strtok_r.m4: Update.
2844         * gnulib/import/m4/sys_socket_h.m4: Update.
2845         * gnulib/import/m4/sys_stat_h.m4: Update.
2846         * gnulib/import/m4/sys_time_h.m4: Update.
2847         * gnulib/import/m4/sys_types_h.m4: Update.
2848         * gnulib/import/m4/tempname.m4: Update.
2849         * gnulib/import/m4/time_h.m4: Update.
2850         * gnulib/import/m4/unistd-safer.m4: Update.
2851         * gnulib/import/m4/unistd_h.m4: Update.
2852         * gnulib/import/m4/warn-on-use.m4: Update.
2853         * gnulib/import/m4/wchar_h.m4: Update.
2854         * gnulib/import/m4/wchar_t.m4: Update.
2855         * gnulib/import/m4/wctype_h.m4: Update.
2856         * gnulib/import/m4/wint_t.m4: Update.
2857         * gnulib/import/malloc.c: Update.
2858         * gnulib/import/malloc/scratch_buffer.h: Update.
2859         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2860         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2861         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2862         * gnulib/import/malloca.c: Update.
2863         * gnulib/import/malloca.h: Update.
2864         * gnulib/import/malloca.valgrind: Update.
2865         * gnulib/import/math.in.h: Update.
2866         * gnulib/import/mbrtowc.c: Update.
2867         * gnulib/import/mbsinit.c: Update.
2868         * gnulib/import/mbsrtowcs-impl.h: Update.
2869         * gnulib/import/mbsrtowcs-state.c: Update.
2870         * gnulib/import/mbsrtowcs.c: Update.
2871         * gnulib/import/memchr.c: Update.
2872         * gnulib/import/memmem.c: Update.
2873         * gnulib/import/mempcpy.c: Update.
2874         * gnulib/import/memrchr.c: Update.
2875         * gnulib/import/mkdir.c: Update.
2876         * gnulib/import/mkstemp.c: Update.
2877         * gnulib/import/msvc-inval.c: Update.
2878         * gnulib/import/msvc-inval.h: Update.
2879         * gnulib/import/msvc-nothrow.c: Update.
2880         * gnulib/import/msvc-nothrow.h: Update.
2881         * gnulib/import/open.c: Update.
2882         * gnulib/import/openat-die.c: Update.
2883         * gnulib/import/openat-priv.h: Update.
2884         * gnulib/import/openat-proc.c: Update.
2885         * gnulib/import/openat.c: Update.
2886         * gnulib/import/openat.h: Update.
2887         * gnulib/import/opendir.c: Update.
2888         * gnulib/import/pathmax.h: Update.
2889         * gnulib/import/pipe-safer.c: Update.
2890         * gnulib/import/rawmemchr.c: Update.
2891         * gnulib/import/readdir.c: Update.
2892         * gnulib/import/readlink.c: Update.
2893         * gnulib/import/realloc.c: Update.
2894         * gnulib/import/ref-add.sin: Update.
2895         * gnulib/import/ref-del.sin: Update.
2896         * gnulib/import/rename.c: Update.
2897         * gnulib/import/rewinddir.c: Update.
2898         * gnulib/import/rmdir.c: Update.
2899         * gnulib/import/same-inode.h: Update.
2900         * gnulib/import/save-cwd.c: Update.
2901         * gnulib/import/save-cwd.h: Update.
2902         * gnulib/import/scratch_buffer.h: Update.
2903         * gnulib/import/secure_getenv.c: Update.
2904         * gnulib/import/setenv.c: Update.
2905         * gnulib/import/signal.in.h: Update.
2906         * gnulib/import/stat-time.c: Update.
2907         * gnulib/import/stat-time.h: Update.
2908         * gnulib/import/stat-w32.c: Update.
2909         * gnulib/import/stat-w32.h: Update.
2910         * gnulib/import/stat.c: Update.
2911         * gnulib/import/stdbool.in.h: Update.
2912         * gnulib/import/stddef.in.h: Update.
2913         * gnulib/import/stdint.in.h: Update.
2914         * gnulib/import/stdio.in.h: Update.
2915         * gnulib/import/stdlib.in.h: Update.
2916         * gnulib/import/str-two-way.h: Update.
2917         * gnulib/import/strchrnul.c: Update.
2918         * gnulib/import/strdup.c: Update.
2919         * gnulib/import/streq.h: Update.
2920         * gnulib/import/strerror-override.c: Update.
2921         * gnulib/import/strerror-override.h: Update.
2922         * gnulib/import/strerror.c: Update.
2923         * gnulib/import/string.in.h: Update.
2924         * gnulib/import/stripslash.c: Update.
2925         * gnulib/import/strnlen1.c: Update.
2926         * gnulib/import/strnlen1.h: Update.
2927         * gnulib/import/strstr.c: Update.
2928         * gnulib/import/strtok_r.c: Update.
2929         * gnulib/import/sys_stat.in.h: Update.
2930         * gnulib/import/sys_time.in.h: Update.
2931         * gnulib/import/sys_types.in.h: Update.
2932         * gnulib/import/tempname.c: Update.
2933         * gnulib/import/tempname.h: Update.
2934         * gnulib/import/time.in.h: Update.
2935         * gnulib/import/unistd--.h: Update.
2936         * gnulib/import/unistd-safer.h: Update.
2937         * gnulib/import/unistd.in.h: Update.
2938         * gnulib/import/unsetenv.c: Update.
2939         * gnulib/import/verify.h: Update.
2940         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2941         * gnulib/import/wchar.in.h: Update.
2942         * gnulib/import/wctype.in.h: Update.
2943         * gnulib/import/xalloc-oversized.h: Update.
2944         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2945         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2946
2947 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2948
2949         * record-btrace.c (get_thread_current_frame): Remove
2950         old_inferior_ptid.
2951
2952 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2953
2954         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2955         with check_tag to 1 if and only if the type is tagged and the
2956         component being searched cannot been found in the current
2957         view. Otherwise, always call ada_to_fixed_type with
2958         check_tag to 0.
2959
2960 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2961
2962         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2963         declaration.
2964         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2965         * ada-varobj.c (ada_varobj_get_number_of_children,
2966         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2967
2968 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2969
2970         * ada-valprint.c (ada_value_print): Use type instead of
2971         enclosing type.
2972
2973 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2974
2975         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2976         an array of access to unconstrained array.
2977
2978 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2979
2980         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2981         (ada_check_typedef): Use it.
2982
2983 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2984
2985         * ada-varobj.c (ada_varobj_describe_struct_child)
2986         (ada_varobj_describe_child): Handle union case like struct one.
2987
2988 2018-09-10  Tom Tromey  <tom@tromey.com>
2989
2990         PR python/18380:
2991         * python/python.c (_initialize_python): Make example in "python"
2992         help work in Python 3.
2993
2994 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2995
2996         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2997         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2998         $(EXEEXT) to the script, as it is not a program.
2999
3000 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3001
3002         * python/py-prettyprint.c (pretty_print_one_value): Return
3003         gdbpy_ref<>.
3004         (print_string_repr): Adjust.
3005         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3006         * python/python-internal.h (apply_varobj_pretty_printer): Return
3007         gdbpy_ref<>.
3008         * varobj.c (varobj_value_get_print_value): Adjust.
3009
3010 2018-09-08  Tom Tromey  <tom@tromey.com>
3011
3012         PR python/16047:
3013         * python/py-prettyprint.c (pretty_print_one_value): Check for
3014         to_string method.
3015
3016 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3017
3018         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3019         replace_operator_with_call.
3020
3021 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3022
3023         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3024
3025 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3026
3027         * ada-typeprint.c (print_range): Print the bounds using TYPE
3028         rather than its TYPE_TARGET_TYPE.
3029
3030 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3031
3032         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3033         call to ada_to_fixed_value_create.
3034
3035 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3036
3037         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3038
3039 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3040
3041         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3042         by calls to error.
3043
3044 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3045
3046         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3047         Move update of loop variable "fi".
3048
3049 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3050
3051         * ada-lang.c (value_assign_to_component): In the case of
3052         big-endian targets, extract the bits of the given VAL
3053         using an src_offset of zero if container is not a scalar.
3054
3055 2018-09-06  Simon Ser  <contact@emersion.fr>
3056
3057         PR gdb/23105
3058         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3059         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3060         * fbsd-tdep.c (fbsd_make_note_desc): New.
3061         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3062         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3063         * target.h (enum target_object) Add FreeBSD-specific
3064         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3065
3066 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3067
3068         * compile/compile-c.h (generate_c_for_variable_locations):
3069         Change reference to pointer.
3070         * compile/compile-c-support.c (compile_program) <compute>:
3071         Likewise.
3072         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3073         (generate_c_for_for_one_variable): Likewise
3074         (generate_c_for_variable_locations): Likewise
3075         * compile/compile-c-types.c (compile_c_instance::convert_type):
3076         Likewise
3077         * compile/compile-cplus-symbols.c (convert_one_symbol):
3078         std::move the scope passed to enter_scope.
3079         * compile/compile-cplus-types.c
3080         (compile_cplus_instance::enter_scope): Make parameter
3081         rvalue-reference.
3082         (compile_cplus_instance::new_scope): Change reference to
3083         pointer.
3084         (compile_cplus_instance::convert_type): Likewise
3085         (compile_cplus_convert_typedef): std::move the scope passed to
3086         enter_scope.
3087         (compile_cplus_convert_struct_or_union): Likewise.
3088         (compile_cplus_convert_enum): Likewise.
3089         (compile_cplus_convert_namespace): Likewise.
3090         * compile/compile-cplus.h (compile_cplus_instance)
3091         <enter_scope>: Make parameter rvalue-reference.
3092         * compile/compile-internal.h (compile_instance)
3093         <get_cached_type>: Likewise
3094         * compile/compile-loc2c.c (push): Likewise
3095         (pushf): Likewise
3096         (unary): Likewise
3097         (binary): Likewise
3098         (print_label): Likewise
3099         (pushf_register_address): Likewise
3100         (pushf_register): Likewise
3101         (do_compile_dwarf_expr_to_c): Likewise
3102         (compile_dwarf_expr_to_c): Likewise
3103         (compile_dwarf_bounds_to_c): Likewise
3104         * compile/compile.c (compile_instance::get_cached_type):
3105         Likewise
3106         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3107         (compile_dwarf_bounds_to_c): Likewise
3108         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3109         (dwarf2_compile_property_to_c): Likewise
3110         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3111         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3112         Likewise
3113
3114 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3115
3116         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3117         * tui/tui-data.c (init_content_element): Don't initialize it.
3118
3119 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3120
3121         * tui/tui-data.h (struct tui_win_info)
3122         <detail::opaque>: Remove.
3123         * tui/tui-data.c (init_win_info): Remove assignment.
3124
3125 2018-09-05  Tom Tromey  <tom@tromey.com>
3126
3127         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3128         -Wformat-nonliteral.
3129         * target-float.c (host_float_ops<T>::to_string)
3130         (host_float_ops<T>::from_string): Use
3131         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3132         * configure: Rebuild.
3133
3134 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3135
3136         * printcmd.c (printf_c_string): Use
3137         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3138         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3139
3140 2018-09-05  Tom Tromey  <tom@tromey.com>
3141
3142         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3143
3144 2018-09-05  Tom de Vries  <tdevries@suse.de>
3145
3146         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3147         with resolve_abstract_p == true.
3148         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3149         defaulting to false. Propagate resolve_abstract_p to
3150         dwarf2_fetch_die_loc_sect_off.
3151         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3152         parameter, defaulting to false.
3153         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3154         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3155         parameter.
3156         * dwarf2read.h (struct die_info): Forward-declare.
3157         (die_info_ptr): New typedef.
3158         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3159
3160 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3161
3162         GDB 8.2 released.
3163
3164 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3165             Pedro Alves  <palves@redhat.com>
3166
3167         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3168         "aclocal-m4-deps.mk".  Include file here.
3169         $(srcdir)/aclocal.m4: Add "configure.ac".
3170         * gnulib/aclocal-m4-deps.mk: New file.
3171         * gnulib/update-gnulib.sh: Automatically update
3172         "aclocal-m4-deps.mk".
3173
3174 2018-09-04  Tom Tromey  <tom@tromey.com>
3175
3176         * configure: Rebuild.
3177         * configure.ac: Remove multi-ice code.
3178
3179 2018-09-04  Tom Tromey  <tom@tromey.com>
3180
3181         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3182         (ada-exp.o): Update.
3183
3184 2018-09-04  Tom Tromey  <tom@tromey.com>
3185
3186         * Makefile.in (printcmd.o, target-float.o): Remove.
3187         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3188
3189 2018-09-04  Tom Tromey  <tom@tromey.com>
3190
3191         * gnulib/Makefile.in: Remove obsolete comment.
3192         * Makefile.in: Remove obsolete comment.
3193
3194 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3195
3196         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3197         line with '+'.
3198
3199 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3200
3201         * riscv-tdep.c: Add 'prologue-value.h' include.
3202         (struct riscv_unwind_cache): New struct.
3203         (riscv_debug_unwinder): New global.
3204         (riscv_scan_prologue): Update arguments, capture register details
3205         from prologue scan.
3206         (riscv_skip_prologue): Reformat arguments line, move end of
3207         prologue calculation into riscv_scan_prologue.
3208         (riscv_frame_cache): Update return type, create
3209         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3210         details.
3211         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3212         (riscv_frame_prev_register): Use the trad_frame within the
3213         riscv_unwind_cache.
3214         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3215         flag.
3216
3217 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3218
3219         * trad-frame.h (trad_frame_set_realreg): Declare.
3220         (trad_frame_set_addr): Declare.
3221         * trad-frame.c (trad_frame_set_realreg): Define new function.
3222         (trad_frame_set_addr): Define new function.
3223         (trad_frame_set_reg_realreg): Use new function.
3224         (trad_frame_set_reg_addr): Use new function.
3225
3226 2018-09-01  Keith Seitz  <keiths@redhat.com>
3227
3228         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3229         pulongest instead of "%lld".
3230         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3231         ATTRIBUTE_UNUSED.
3232
3233 2018-08-31  Tom Tromey  <tom@tromey.com>
3234
3235         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3236         variant part type.
3237
3238 2018-08-31  Pedro Alves  <palves@redhat.com>
3239
3240         * gdbarch.h: Regenerate.
3241
3242 2018-08-31  Pedro Alves  <palves@redhat.com>
3243
3244         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3245         * target.h (Hardware watchpoint interfaces): Describe
3246         continuable/steppable/non-steppable watchpoints.
3247         * gdbarch.h, gdbarch.c: Regenerate.
3248
3249 2018-08-31  Pedro Alves  <palves@redhat.com>
3250
3251         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3252         Delete.
3253         * s390-linux-nat.c
3254         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3255         * target.h (target_ops::have_continuable_watchpoint): Delete.
3256         (target_have_continuable_watchpoint): Delete.
3257         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3258         * target-delegates.c: Regenerate.
3259
3260 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3261
3262         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3263         the files present in "gnulib/import/m4/".
3264
3265 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3266
3267         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3268         c.sw, c.swsp, and c.sdsp.
3269
3270 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3271
3272         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3273         (riscv_read_misa_reg): Don't cache value read into inferior data.
3274         (riscv_new_inferior_data): Delete.
3275         (riscv_inferior_data_cleanup): Delete.
3276         (riscv_inferior_data): Delete.
3277         (riscv_invalidate_inferior_data): Delete.
3278         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3279
3280 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3281
3282         * compile/compile-cplus-types.c
3283         (compile_cplus_instance::leave_scope): Take the address of scope
3284         object.
3285         (compile_cplus_instance::convert_qualified_base): Compare quals
3286         to 0.
3287
3288 2018-08-30  Keith Seitz  <keiths@redhat.com>
3289
3290         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3291         Use "%s" and host_address_to_string instead of "%p" in printf.
3292
3293 2018-08-29  Keith Seitz  <keiths@redhat.com>
3294
3295         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3296         and compile-cplus-types.c.
3297         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3298         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3299         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3300         Declare.
3301         * compile/compile-c-support.c: Include compile-cplus.h.
3302         (load_libcompile): Templatize.
3303         (get_compile_context): "New" function.
3304         (c_get_compile_context): Use get_compile_context.
3305         (cplus_get_compile_context): New function.
3306         (cplus_push_user_expression, cplus_pop_user_expression)
3307         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3308         (cplus_compute_program): Define new structs/functions.
3309         * compile/compile-cplus-symmbols.c: New file.
3310         * compile/compile-cplus-types.c: New file.
3311         * compile/compile-cplus.h: New file.
3312         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3313         Declare.
3314         * compile/compile-object-load.c (get_out_value_type): Use
3315         strncmp_iw when comparing symbol names.
3316         (compile_object_load): Add mst_bss and mst_data.
3317         * compile/compile.c (_initialize_compile): Remove
3318         -Wno-implicit-function-declaration from `compile_args'.
3319         * compile/gcc-cp-plugin.h: New file.
3320         * NEWS: Mention C++ compile support and new debug options.
3321
3322 2018-08-29  Keith Seitz  <keiths@redhat.com>
3323
3324         * linespec.c (collect_info::add_symbol): Make virtual.
3325         (struct symbol_searcher_collect_info): New struct.
3326         (symbol_searcher::find_all_symbols): New method.
3327         * symtab.h (class symbol_searcher): New class.
3328
3329 2018-08-29  Keith Seitz  <keiths@redhat.com>
3330
3331         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3332         Change to vector of block_symbol.  Update all users.
3333         (struct collect_info) <symbols>: Likewise.
3334         (collect_info::add_symbol): Take block_symbol as argument.
3335         Update all callers.
3336         (decode_compound_collector) <m_symbols>: Change type to vector
3337         of block_symbol.  Update all users.
3338         (decode_compound_collector::operator ()): Change parameter type
3339         to block_symbol.
3340         (find_method, find_function_symbols, find_linespec_symbols)
3341         (find_label_symbols_in_block, find_label_symbols): Change symbol
3342         vectors to block_symbol vectors.
3343         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3344         block_symbol.
3345
3346 2018-08-29  Keith Seitz  <keiths@redhat.com>
3347
3348         * linespec.c (symbolp): Remove typedef and VEC definitions.
3349         (bound_minimal_symbol_d): Likewise.
3350
3351 2018-08-29  Keith Seitz  <keiths@redhat.com>
3352
3353         * linespec.c (decode_compound_collector::decode_compound_collector):
3354         Remove initialization for `m_symtabs'.
3355         (decode_compound_collector::release_symbols): Change return type
3356         to std::vector.  Update all callers.
3357         (class decode_compound_collector) <m_symbols>: Change type to
3358         std::vector.
3359         (lookup_prefix_sym): Change return type to std::vector.  Update all
3360         callers.
3361         (compare_symbols): Remove.
3362         (std_compare_symbols): Rename to `compare_symbols'.
3363         (find_method): Change `sym_classes' parameter to std::vector.
3364         Update all callers.  Use std::sort to sort sym_classes.
3365         (find_linespec_symbols): Remove cleanup.
3366
3367 2018-08-29  Keith Seitz  <keiths@redhat.com>
3368
3369         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3370         std::vector.  Update all users.
3371         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3372         (struct collect_info) <minimal_symbols>: Likewise.
3373         (compare_msymbols): Return bool.  Change parameters to const
3374         bound_minimal_symbol references.
3375         (find_method, find_function_symbols, find_linespec_symbols): Change
3376         `minsyms' parameter to std::vector.  Update all callers.
3377
3378 2018-08-29  Keith Seitz  <keiths@redhat.com>
3379
3380         * linespec.c (struct linespec) <label_symbols>: Change type to
3381         std::vector.  Update all users.
3382         (find_label_symbols_in_block): Change `result' parameter to
3383         std::vector.  Update all callers.
3384         (find_label_symbols): Return std::vector.  Update all callers.
3385
3386 2018-08-29  Keith Seitz  <keiths@redhat.com>
3387
3388         * linespec.c (struct linespec) <function_symbols>: Change type to
3389         std::vector.  Update all users.
3390         (struct collect_info) <function_symbols>: Likewise.
3391         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3392         (std_compare_symbols): New function.
3393         (find_method, find_function_symbols, find_linespec_symbols)
3394         (find_label_symbols_in_block): Change `symbols' parameter to
3395         std::vector.  Update all callers.
3396         (find_label_symbols): Likewise for `function_symbols' and
3397         `label_funcs_ret'.
3398
3399 2018-08-29  Keith Seitz  <keiths@redhat.com>
3400
3401         * linespec.c (symtab_vector_up): Define.
3402         (struct linespec) <file_symtabs>: Change type to std::vector *.
3403         Update all uses.
3404         (struct collect_info) <file_symtabs>: Likewise.
3405         (collect_symtabs_from_filename): Return symtab_vector_up.
3406         Update all callers.
3407         (decode_objc): Remove cleanup.
3408         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3409         (symtab_collector::release_symtabs): Return symtab_vector_up.
3410         Update all callers.
3411         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3412         Update all users.
3413         (collect_symtabs_from_filename, symtabs_from_filename): Return
3414         symtab_vector_up.  Update all callers.
3415
3416 2018-08-29  Tom Tromey  <tom@tromey.com>
3417
3418         * csky-tdep.c (csky_analyze_prologue): Use
3419         core_addr_to_string_nz.
3420
3421 2018-08-29  Tom Tromey  <tom@tromey.com>
3422
3423         * windows-nat.c (struct xlate_exception) <them>: Change type to
3424         DWORD.
3425         (xlate): Fix formatting.  Remove last entry.
3426         (struct xlate_exception, xlate): Comment out.
3427         (windows_nat_target::resume): Use ranged for.
3428
3429 2018-08-29  Jim Wilson  <jimw@sifive.com>
3430
3431         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3432         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3433         of NT_PRFPREG.
3434         (riscv_linux_nat_target::store_registers): Likewise.
3435
3436 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3437
3438         PR gdb/23555
3439         PR gdb/23558
3440         * gnulib/aclocal.m4: Regenerate.
3441         * gnulib/config.in: Regenerate.
3442         * gnulib/configure: Regenerate.
3443         * gnulib/import/Makefile.am: Update.
3444         * gnulib/import/Makefile.in: Update.
3445         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3446         * gnulib/import/_Noreturn.h: ... this.
3447         * gnulib/import/alloca.in.h: Update.
3448         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3449         * gnulib/import/arg-nonnull.h: ... this.
3450         * gnulib/import/assure.h: Update.
3451         * gnulib/import/at-func.c: Update.
3452         * gnulib/import/basename-lgpl.c: Update.
3453         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3454         * gnulib/import/c++defs.h: ... this.
3455         * gnulib/import/canonicalize-lgpl.c: Update.
3456         * gnulib/import/cdefs.h: Update.
3457         * gnulib/import/chdir-long.c: Update.
3458         * gnulib/import/chdir-long.h: Update.
3459         * gnulib/import/cloexec.c: Update.
3460         * gnulib/import/cloexec.h: Update.
3461         * gnulib/import/close.c: Update.
3462         * gnulib/import/closedir.c: Update.
3463         * gnulib/import/config.charset: Update.
3464         * gnulib/import/dirent-private.h: Update.
3465         * gnulib/import/dirent.in.h: Update.
3466         * gnulib/import/dirfd.c: Update.
3467         * gnulib/import/dirname-lgpl.c: Update.
3468         * gnulib/import/dirname.h: Update.
3469         * gnulib/import/dosname.h: Update.
3470         * gnulib/import/dup-safer-flag.c: Update.
3471         * gnulib/import/dup-safer.c: Update.
3472         * gnulib/import/dup.c: Update.
3473         * gnulib/import/dup2.c: Update.
3474         * gnulib/import/errno.in.h: Update.
3475         * gnulib/import/error.c: Update.
3476         * gnulib/import/error.h: Update.
3477         * gnulib/import/exitfail.c: Update.
3478         * gnulib/import/exitfail.h: Update.
3479         * gnulib/import/extra/update-copyright: Update.
3480         * gnulib/import/fchdir.c: Update.
3481         * gnulib/import/fcntl.c: Update.
3482         * gnulib/import/fcntl.in.h: Update.
3483         * gnulib/import/fd-hook.c: Update.
3484         * gnulib/import/fd-hook.h: Update.
3485         * gnulib/import/fd-safer-flag.c: Update.
3486         * gnulib/import/fd-safer.c: Update.
3487         * gnulib/import/fdopendir.c: Update.
3488         * gnulib/import/filename.h: Update.
3489         * gnulib/import/filenamecat-lgpl.c: Update.
3490         * gnulib/import/filenamecat.h: Update.
3491         * gnulib/import/flexmember.h: Update.
3492         * gnulib/import/float+.h: Update.
3493         * gnulib/import/float.c: Update.
3494         * gnulib/import/float.in.h: Update.
3495         * gnulib/import/fnmatch.c: Update.
3496         * gnulib/import/fnmatch.in.h: Update.
3497         * gnulib/import/fnmatch_loop.c: Update.
3498         * gnulib/import/fpucw.h: Update.
3499         * gnulib/import/frexp.c: Update.
3500         * gnulib/import/frexpl.c: Update.
3501         * gnulib/import/fstat.c: Update.
3502         * gnulib/import/fstatat.c: Update.
3503         * gnulib/import/getcwd-lgpl.c: Update.
3504         * gnulib/import/getcwd.c: Update.
3505         * gnulib/import/getdtablesize.c: Update.
3506         * gnulib/import/getlogin_r.c: Update.
3507         * gnulib/import/getprogname.c: Update.
3508         * gnulib/import/getprogname.h: Update.
3509         * gnulib/import/gettext.h: Update.
3510         * gnulib/import/gettimeofday.c: Update.
3511         * gnulib/import/glob-libc.h: Update.
3512         * gnulib/import/glob.c: Update.
3513         * gnulib/import/glob.in.h: Update.
3514         * gnulib/import/glob_internal.h: Update.
3515         * gnulib/import/glob_pattern_p.c: Update.
3516         * gnulib/import/globfree.c: Update.
3517         * gnulib/import/hard-locale.c: Update.
3518         * gnulib/import/hard-locale.h: Update.
3519         * gnulib/import/intprops.h: Update.
3520         * gnulib/import/inttypes.in.h: Update.
3521         * gnulib/import/isnan.c: Update.
3522         * gnulib/import/isnand-nolibm.h: Update.
3523         * gnulib/import/isnand.c: Update.
3524         * gnulib/import/isnanl-nolibm.h: Update.
3525         * gnulib/import/isnanl.c: Update.
3526         * gnulib/import/itold.c: Update.
3527         * gnulib/import/libc-config.h: Update.
3528         * gnulib/import/limits.in.h: Update.
3529         * gnulib/import/localcharset.c: Update.
3530         * gnulib/import/localcharset.h: Update.
3531         * gnulib/import/localtime-buffer.c: Update.
3532         * gnulib/import/localtime-buffer.h: Update.
3533         * gnulib/import/lstat.c: Update.
3534         * gnulib/import/m4/00gnulib.m4: Update.
3535         * gnulib/import/m4/__inline.m4: Update.
3536         * gnulib/import/m4/absolute-header.m4: Update.
3537         * gnulib/import/m4/alloca.m4: Update.
3538         * gnulib/import/m4/builtin-expect.m4: Update.
3539         * gnulib/import/m4/canonicalize.m4: Update.
3540         * gnulib/import/m4/chdir-long.m4: Update.
3541         * gnulib/import/m4/close.m4: Update.
3542         * gnulib/import/m4/closedir.m4: Update.
3543         * gnulib/import/m4/configmake.m4: Update.
3544         * gnulib/import/m4/d-ino.m4: Update.
3545         * gnulib/import/m4/d-type.m4: Update.
3546         * gnulib/import/m4/dirent_h.m4: Update.
3547         * gnulib/import/m4/dirfd.m4: Update.
3548         * gnulib/import/m4/dirname.m4: Update.
3549         * gnulib/import/m4/double-slash-root.m4: Update.
3550         * gnulib/import/m4/dup.m4: Update.
3551         * gnulib/import/m4/dup2.m4: Update.
3552         * gnulib/import/m4/eealloc.m4: Update.
3553         * gnulib/import/m4/environ.m4: Update.
3554         * gnulib/import/m4/errno_h.m4: Update.
3555         * gnulib/import/m4/error.m4: Update.
3556         * gnulib/import/m4/exponentd.m4: Update.
3557         * gnulib/import/m4/exponentl.m4: Update.
3558         * gnulib/import/m4/extensions.m4: Update.
3559         * gnulib/import/m4/extern-inline.m4: Update.
3560         * gnulib/import/m4/fchdir.m4: Update.
3561         * gnulib/import/m4/fcntl-o.m4: Update.
3562         * gnulib/import/m4/fcntl.m4: Update.
3563         * gnulib/import/m4/fcntl_h.m4: Update.
3564         * gnulib/import/m4/fdopendir.m4: Update.
3565         * gnulib/import/m4/filenamecat.m4: Update.
3566         * gnulib/import/m4/flexmember.m4: Update.
3567         * gnulib/import/m4/float_h.m4: Update.
3568         * gnulib/import/m4/fnmatch.m4: Update.
3569         * gnulib/import/m4/fnmatch_h.m4: Update.
3570         * gnulib/import/m4/fpieee.m4: Update.
3571         * gnulib/import/m4/frexp.m4: Update.
3572         * gnulib/import/m4/frexpl.m4: Update.
3573         * gnulib/import/m4/fstat.m4: Update.
3574         * gnulib/import/m4/fstatat.m4: Update.
3575         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3576         * gnulib/import/m4/getcwd-path-max.m4: Update.
3577         * gnulib/import/m4/getcwd.m4: Update.
3578         * gnulib/import/m4/getdtablesize.m4: Update.
3579         * gnulib/import/m4/getlogin.m4: Update.
3580         * gnulib/import/m4/getlogin_r.m4: Update.
3581         * gnulib/import/m4/getpagesize.m4: Update.
3582         * gnulib/import/m4/getprogname.m4: Update.
3583         * gnulib/import/m4/gettimeofday.m4: Update.
3584         * gnulib/import/m4/glibc21.m4: Update.
3585         * gnulib/import/m4/glob.m4: Update.
3586         * gnulib/import/m4/glob_h.m4: Update.
3587         * gnulib/import/m4/gnulib-cache.m4: Update.
3588         * gnulib/import/m4/gnulib-common.m4: Update.
3589         * gnulib/import/m4/gnulib-comp.m4: Update.
3590         * gnulib/import/m4/gnulib-tool.m4: Update.
3591         * gnulib/import/m4/hard-locale.m4: Update.
3592         * gnulib/import/m4/include_next.m4: Update.
3593         * gnulib/import/m4/inttypes-pri.m4: Update.
3594         * gnulib/import/m4/inttypes.m4: Update.
3595         * gnulib/import/m4/isnand.m4: Update.
3596         * gnulib/import/m4/isnanl.m4: Update.
3597         * gnulib/import/m4/largefile.m4: Update.
3598         * gnulib/import/m4/limits-h.m4: Update.
3599         * gnulib/import/m4/localcharset.m4: Update.
3600         * gnulib/import/m4/locale-fr.m4: Update.
3601         * gnulib/import/m4/locale-ja.m4: Update.
3602         * gnulib/import/m4/locale-zh.m4: Update.
3603         * gnulib/import/m4/localtime-buffer.m4: Update.
3604         * gnulib/import/m4/longlong.m4: Update.
3605         * gnulib/import/m4/lstat.m4: Update.
3606         * gnulib/import/m4/malloc.m4: Update.
3607         * gnulib/import/m4/malloca.m4: Update.
3608         * gnulib/import/m4/math_h.m4: Update.
3609         * gnulib/import/m4/mbrtowc.m4: Update.
3610         * gnulib/import/m4/mbsinit.m4: Update.
3611         * gnulib/import/m4/mbsrtowcs.m4: Update.
3612         * gnulib/import/m4/mbstate_t.m4: Update.
3613         * gnulib/import/m4/memchr.m4: Update.
3614         * gnulib/import/m4/memmem.m4: Update.
3615         * gnulib/import/m4/mempcpy.m4: Update.
3616         * gnulib/import/m4/memrchr.m4: Update.
3617         * gnulib/import/m4/mkdir.m4: Update.
3618         * gnulib/import/m4/mkstemp.m4: Update.
3619         * gnulib/import/m4/mmap-anon.m4: Update.
3620         * gnulib/import/m4/mode_t.m4: Update.
3621         * gnulib/import/m4/msvc-inval.m4: Update.
3622         * gnulib/import/m4/msvc-nothrow.m4: Update.
3623         * gnulib/import/m4/multiarch.m4: Update.
3624         * gnulib/import/m4/nocrash.m4: Update.
3625         * gnulib/import/m4/off_t.m4: Update.
3626         * gnulib/import/m4/onceonly.m4: Update.
3627         * gnulib/import/m4/open-cloexec.m4: Update.
3628         * gnulib/import/m4/open.m4: Update.
3629         * gnulib/import/m4/openat.m4: Update.
3630         * gnulib/import/m4/opendir.m4: Update.
3631         * gnulib/import/m4/pathmax.m4: Update.
3632         * gnulib/import/m4/rawmemchr.m4: Update.
3633         * gnulib/import/m4/readdir.m4: Update.
3634         * gnulib/import/m4/readlink.m4: Update.
3635         * gnulib/import/m4/realloc.m4: Update.
3636         * gnulib/import/m4/rename.m4: Update.
3637         * gnulib/import/m4/rewinddir.m4: Update.
3638         * gnulib/import/m4/rmdir.m4: Update.
3639         * gnulib/import/m4/save-cwd.m4: Update.
3640         * gnulib/import/m4/secure_getenv.m4: Update.
3641         * gnulib/import/m4/setenv.m4: Update.
3642         * gnulib/import/m4/signal_h.m4: Update.
3643         * gnulib/import/m4/ssize_t.m4: Update.
3644         * gnulib/import/m4/stat-time.m4: Update.
3645         * gnulib/import/m4/stat.m4: Update.
3646         * gnulib/import/m4/std-gnu11.m4: Update.
3647         * gnulib/import/m4/stdbool.m4: Update.
3648         * gnulib/import/m4/stddef_h.m4: Update.
3649         * gnulib/import/m4/stdint.m4: Update.
3650         * gnulib/import/m4/stdio_h.m4: Update.
3651         * gnulib/import/m4/stdlib_h.m4: Update.
3652         * gnulib/import/m4/strchrnul.m4: Update.
3653         * gnulib/import/m4/strdup.m4: Update.
3654         * gnulib/import/m4/strerror.m4: Update.
3655         * gnulib/import/m4/string_h.m4: Update.
3656         * gnulib/import/m4/strstr.m4: Update.
3657         * gnulib/import/m4/strtok_r.m4: Update.
3658         * gnulib/import/m4/sys_socket_h.m4: Update.
3659         * gnulib/import/m4/sys_stat_h.m4: Update.
3660         * gnulib/import/m4/sys_time_h.m4: Update.
3661         * gnulib/import/m4/sys_types_h.m4: Update.
3662         * gnulib/import/m4/tempname.m4: Update.
3663         * gnulib/import/m4/time_h.m4: Update.
3664         * gnulib/import/m4/unistd-safer.m4: Update.
3665         * gnulib/import/m4/unistd_h.m4: Update.
3666         * gnulib/import/m4/warn-on-use.m4: Update.
3667         * gnulib/import/m4/wchar_h.m4: Update.
3668         * gnulib/import/m4/wchar_t.m4: Update.
3669         * gnulib/import/m4/wctype_h.m4: Update.
3670         * gnulib/import/m4/wint_t.m4: Update.
3671         * gnulib/import/malloc.c: Update.
3672         * gnulib/import/malloc/scratch_buffer.h: Update.
3673         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3674         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3675         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3676         * gnulib/import/malloca.c: Update.
3677         * gnulib/import/malloca.h: Update.
3678         * gnulib/import/malloca.valgrind: Update.
3679         * gnulib/import/math.in.h: Update.
3680         * gnulib/import/mbrtowc.c: Update.
3681         * gnulib/import/mbsinit.c: Update.
3682         * gnulib/import/mbsrtowcs-impl.h: Update.
3683         * gnulib/import/mbsrtowcs-state.c: Update.
3684         * gnulib/import/mbsrtowcs.c: Update.
3685         * gnulib/import/memchr.c: Update.
3686         * gnulib/import/memmem.c: Update.
3687         * gnulib/import/mempcpy.c: Update.
3688         * gnulib/import/memrchr.c: Update.
3689         * gnulib/import/mkdir.c: Update.
3690         * gnulib/import/mkstemp.c: Update.
3691         * gnulib/import/msvc-inval.c: Update.
3692         * gnulib/import/msvc-inval.h: Update.
3693         * gnulib/import/msvc-nothrow.c: Update.
3694         * gnulib/import/msvc-nothrow.h: Update.
3695         * gnulib/import/open.c: Update.
3696         * gnulib/import/openat-die.c: Update.
3697         * gnulib/import/openat-priv.h: Update.
3698         * gnulib/import/openat-proc.c: Update.
3699         * gnulib/import/openat.c: Update.
3700         * gnulib/import/openat.h: Update.
3701         * gnulib/import/opendir.c: Update.
3702         * gnulib/import/pathmax.h: Update.
3703         * gnulib/import/pipe-safer.c: Update.
3704         * gnulib/import/rawmemchr.c: Update.
3705         * gnulib/import/readdir.c: Update.
3706         * gnulib/import/readlink.c: Update.
3707         * gnulib/import/realloc.c: Update.
3708         * gnulib/import/ref-add.sin: Update.
3709         * gnulib/import/ref-del.sin: Update.
3710         * gnulib/import/rename.c: Update.
3711         * gnulib/import/rewinddir.c: Update.
3712         * gnulib/import/rmdir.c: Update.
3713         * gnulib/import/same-inode.h: Update.
3714         * gnulib/import/save-cwd.c: Update.
3715         * gnulib/import/save-cwd.h: Update.
3716         * gnulib/import/scratch_buffer.h: Update.
3717         * gnulib/import/secure_getenv.c: Update.
3718         * gnulib/import/setenv.c: Update.
3719         * gnulib/import/signal.in.h: Update.
3720         * gnulib/import/stat-time.c: Update.
3721         * gnulib/import/stat-time.h: Update.
3722         * gnulib/import/stat-w32.c: Update.
3723         * gnulib/import/stat-w32.h: Update.
3724         * gnulib/import/stat.c: Update.
3725         * gnulib/import/stdbool.in.h: Update.
3726         * gnulib/import/stddef.in.h: Update.
3727         * gnulib/import/stdint.in.h: Update.
3728         * gnulib/import/stdio.in.h: Update.
3729         * gnulib/import/stdlib.in.h: Update.
3730         * gnulib/import/str-two-way.h: Update.
3731         * gnulib/import/strchrnul.c: Update.
3732         * gnulib/import/strdup.c: Update.
3733         * gnulib/import/streq.h: Update.
3734         * gnulib/import/strerror-override.c: Update.
3735         * gnulib/import/strerror-override.h: Update.
3736         * gnulib/import/strerror.c: Update.
3737         * gnulib/import/string.in.h: Update.
3738         * gnulib/import/stripslash.c: Update.
3739         * gnulib/import/strnlen1.c: Update.
3740         * gnulib/import/strnlen1.h: Update.
3741         * gnulib/import/strstr.c: Update.
3742         * gnulib/import/strtok_r.c: Update.
3743         * gnulib/import/sys_stat.in.h: Update.
3744         * gnulib/import/sys_time.in.h: Update.
3745         * gnulib/import/sys_types.in.h: Update.
3746         * gnulib/import/tempname.c: Update.
3747         * gnulib/import/tempname.h: Update.
3748         * gnulib/import/time.in.h: Update.
3749         * gnulib/import/unistd--.h: Update.
3750         * gnulib/import/unistd-safer.h: Update.
3751         * gnulib/import/unistd.in.h: Update.
3752         * gnulib/import/unsetenv.c: Update.
3753         * gnulib/import/verify.h: Update.
3754         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3755         * gnulib/import/wchar.in.h: Update.
3756         * gnulib/import/wctype.in.h: Update.
3757         * gnulib/import/xalloc-oversized.h: Update.
3758         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3759         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3760
3761 2018-08-16  Gary Benson <gbenson@redhat.com>
3762
3763         PR gdb/13000:
3764         * gdb/main.c (captured_main_1): Exit with nonzero status
3765         in batch mode if the last command to be executed failed.
3766         * NEWS: Mention the above.
3767
3768 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3769
3770         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3771         end of warning message.
3772
3773 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3774
3775         PR gdb/22943:
3776         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3777         (aarch64_extract_return_value): Use
3778         aapcs_is_vfp_call_or_return_candidate.
3779         (aarch64_return_in_memory): Likewise.
3780         (aarch64_store_return_value): Likewise.
3781
3782 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3783
3784         * aarch64-tdep.c
3785         (aapcs_is_vfp_call_or_return_candidate): Make static
3786         (pass_in_v_or_stack): Remove function.
3787         (pass_in_v_vfp_candidate): New function.
3788         (aarch64_push_dummy_call): Check for float register candidates.
3789
3790 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3791
3792         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3793         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3794         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3795
3796 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3797
3798         PR build/23399
3799         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3800         (struct ipa_sym_addresses): Rename to...
3801         (struct ipa_sym_addresses_common): ... this.
3802         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3803
3804 2018-08-28  Tom Tromey  <tom@tromey.com>
3805
3806         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3807         (token_fifo): Now a std::vector.
3808         (yylex, c_parse): Update.
3809         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3810         (token_fifo): Now a std::vector.
3811         (yylex, d_parse): Update.
3812         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3813         (token_fifo): Now a std::vector.
3814         (yylex, go_parse): Update.
3815
3816 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3817
3818         * parser-defs.h (struct type_stack) <elements>: Change type to
3819         std::vector<union type_stack_elt>.
3820         <depth, size>: Remove.
3821         * parse.c (parse_exp_in_context_1): Adjust.
3822         (type_stack_reserve): Remove.
3823         (check_type_stack_depth): Remove.
3824         (insert_into_type_stack): Adjust to std::vector.
3825         (insert_type): Likewise.
3826         (push_type): Likewise.
3827         (push_type_int): Likewise.
3828         (insert_type_address_space): Likewise.
3829         (pop_type): Likewise.
3830         (pop_type_int): Likewise.
3831         (pop_typelist): Likewise.
3832         (pop_type_stack): Likewise.
3833         (append_type_stack): Likewise.
3834         (push_type_stack): Likewise.
3835         (get_type_stack): Likewise.
3836         (type_stack_cleanup): Likewise.
3837         (push_typelist): Likewise.
3838         (follow_types): Likewise.
3839         (_initialize_parse): Likewise.
3840
3841 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3842
3843         * NEWS: Mention csky target.
3844
3845 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3846             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3847             Don Breazeal  <donb@codesourcery.com>
3848
3849         * csky-linux-tdep.c: New file.
3850         * csky-tdep.c: Likewise.
3851         * csky-tdep.h: Likewise.
3852         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3853         csky-tdep.o.
3854         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3855         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3856         * configure.tgt: Add csky support.
3857
3858 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3859
3860         * python/py-framefilter.c (py_print_frame): Print frame architecture
3861         when printing on an MI output.
3862
3863 2018-08-27  Tom Tromey  <tom@tromey.com>
3864
3865         PR build/23087:
3866         * configure: Rebuild.
3867         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3868
3869 2018-08-27  Tom Tromey  <tom@tromey.com>
3870
3871         * aarch64-linux-tdep.c
3872         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3873         casts to int.
3874
3875 2018-08-27  Tom Tromey  <tom@tromey.com>
3876
3877         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3878         unsigned.
3879         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3880         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3881         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3882         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3883         unsigned.
3884
3885 2018-08-27  Tom Tromey  <tom@tromey.com>
3886
3887         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3888         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3889
3890 2018-08-27  Tom Tromey  <tom@tromey.com>
3891
3892         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3893         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3894         ULONGEST_MAX.
3895         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3896         ULONGEST_MAX.
3897         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3898         ULONGEST_MAX.
3899         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3900         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3901         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3902         ULONGEST_MAX.
3903         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3904         (ppc64_linux_sigaction_tramp_frame)
3905         (ppc32_linux_sighandler_tramp_frame)
3906         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3907         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3908         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3909         * mn10300-linux-tdep.c (am33_linux_sigframe)
3910         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3911         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3912         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3913         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3914         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3915         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3916         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3917         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3918         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3919         * microblaze-linux-tdep.c
3920         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3921         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3922         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3923         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3924         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3925         * common/common-types.h (ULONGEST_MAX): New define.
3926         (CORE_ADDR_MAX): Fix formatting.
3927         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3928         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3929         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3930         (arm_linux_rt_sigreturn_tramp_frame)
3931         (arm_eabi_linux_sigreturn_tramp_frame)
3932         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3933         (thumb2_eabi_linux_sigreturn_tramp_frame)
3934         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3935         (arm_linux_restart_syscall_tramp_frame)
3936         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3937         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3938         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3939         ULONGEST_MAX.
3940         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3941
3942 2018-08-27  Tom Tromey  <tom@tromey.com>
3943
3944         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3945         CORE_ADDR_MAX.
3946         * mips-tdep.c (mips_deal_with_atomic_sequence)
3947         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3948         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3949         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3950         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3951         CORE_ADDR_MAX.
3952         * aarch64-tdep.c (aarch64_software_single_step): Use
3953         CORE_ADDR_MAX.
3954
3955 2018-08-27  Tom Tromey  <tom@tromey.com>
3956
3957         * linespec.c (complete_linespec_component): Add cast to "char".
3958         * completer.c (completion_tracker::build_completion_result): Add
3959         cast to "char".
3960
3961 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3962
3963         * solist.h (struct solist, struct target_so_ops): Fix
3964         indentation.
3965
3966 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3967
3968         * ada-tasks.c (ada_task_info_s): Remove typedef.
3969         (DEF_VEC_O(ada_task_info_s)): Remove.
3970         (struct ada_tasks_inferior_data): Initialize fields.
3971         <task_list>: Make an std::vector.
3972         (get_ada_tasks_inferior_data): Allocate with new.
3973         (ada_get_task_number): Adjust.
3974         (get_task_number_from_id): Likewise.
3975         (valid_task_id): Likewise.
3976         (ada_get_task_info_from_ptid): Likewise.
3977         (iterate_over_live_ada_tasks): Likewise.
3978         (add_ada_task): Likewise.
3979         (read_known_tasks): Likewise.
3980         (ada_build_task_list): Likewise.
3981         (print_ada_task_info): Likewise.
3982         (info_task): Likewise.
3983         (task_command_1): Likewise.
3984
3985 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3986
3987         * ada-lang.c (add_angle_brackets): Return std::string.
3988
3989 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3990
3991         * python/py-threadevent.c (py_get_event_thread): Initialize
3992         pythread.
3993
3994 2018-08-24  Pedro Alves  <palves@redhat.com>
3995
3996         * python/py-bpevent.c (create_breakpoint_event_object): Use
3997         copy-initialization.
3998         * python/py-continueevent.c (emit_continue_event): Use
3999         copy-initialization.
4000         * python/py-exitedevent.c (create_exited_event_object): Return a
4001         gdbpy_ref<>.
4002         (emit_exited_event): Use copy-initialization.
4003         * python/py-inferior.c (python_new_inferior)
4004         (python_inferior_deleted, add_thread_object): Use
4005         copy-initialization.
4006         * python/py-infevents.c (create_inferior_call_event_object)
4007         (create_register_changed_event_object)
4008         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4009         (emit_inferior_call_event, emit_memory_changed_event)
4010         (emit_register_changed_event): Use copy-initialization.
4011         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4012         Return a gdbpy_ref<>.
4013         (emit_new_objfile_event): Use copy-initialization.
4014         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4015         (emit_clear_objfiles_event): Use copy-initialization.
4016         * python/py-signalevent.c (create_signal_event_object): Use
4017         copy-initialization.
4018         * python/py-threadevent.c (create_thread_event_object): Use
4019         copy-initialization.
4020
4021 2018-08-24  Pedro Alves  <palves@redhat.com>
4022             Simon Marchi  <simon.marchi@ericsson.com>
4023
4024         PR gdb/23379
4025         * python/py-continueevent.c: Include "gdbthread.h".
4026         (create_continue_event_object): Add intro comment.  Add 'ptid'
4027         parameter.  Use it to find thread to pass to
4028         create_thread_event_object.
4029         (emit_continue_event): Pass PTID down to
4030         create_continue_event_object.
4031         * python/py-event.h (py_get_event_thread): Declare.
4032         (create_thread_event_object): Remove default from 'thread'
4033         parameter.
4034         * python/py-stopevent.c (create_stop_event_object): Use
4035         py_get_event_thread.
4036         * python/py-threadevent.c (get_event_thread): Rename to ...
4037         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4038         and use it to find the thread.
4039         (create_thread_event_object): Assert that THREAD isn't null.
4040         Don't find the event thread here.
4041
4042 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4043
4044         * block.h (blockrange, blockranges): New struct declarations.
4045         (struct block): Add new field named `ranges'.
4046         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4047         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4048         macros for accessing ranges in struct block.
4049         (make_blockranges): New declaration.
4050         block.c (make_blockranges): New function.
4051         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4052         for block.
4053         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4054         * blockframe.c (cache_pc_function_block): New static global.
4055         (clear_pc_function_cache): Clear cache_pc_function_block.
4056         (find_pc_partial_function): Move comment to symtab.h.  Add
4057         support for non-contiguous blocks.
4058         * cli/cli-cmds.c (block.h): Include.
4059         (print_disassembly): Handle printing of non-contiguous blocks.
4060         (disassemble_current_function): Likewise.
4061         (disassemble_command): Likewise.
4062
4063         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4064         BLOCK_START.
4065         * blockframe.c (get_pc_function_start): Likewise.
4066         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4067         (gcc_symbol_address): Likewise.
4068         * compile/compile-object-run.c (compile_object_run): Likewise.
4069         * compile/compile.c (get_expr_block_and_pc): Likewise.
4070         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4071         (func_addr_to_tail_call_list): Likewise.
4072         * findvar.c (default_read_var_value): Likewise.
4073         * inline-frame.c (inline_frame_this_id): Likewise.
4074         (skip-inline_frames): Likewise.
4075         * infcmd.c (until_next_command): Likewise.
4076         * linespec.c (convert_linespec_to_sals): Likewise.
4077         * parse.c (parse_exp_in_context_1): Likewise.
4078         * printcmd.c (build_address_symbolic): likewise.
4079         (info_address_command): Likewise.
4080         symtab.c (find_function_start_sal): Likewise.
4081         (skip_prologue_sal): Likewise.
4082         (find_function_alias_target): Likewise.
4083         (find_gnu_ifunc): Likewise.
4084         * stack.c (find_frame_funname): Likewise.
4085         * symtab.c (fixup_symbol_section): Likewise.
4086         (find_function_start_sal): Likewise.
4087         (skip_prologue_sal): Likewsie.
4088         (find_function_alias_target): Likewise.
4089         (find_gnu_ifunc): Likewise.
4090         * tracepoint.c (info_scope_command): Likewise.
4091         * value.c (value_fn_field): Likewise.
4092
4093         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4094         in place of find_pc_partial_function.
4095         * blockframe.c (find_function_entry_range_from_pc): New function.
4096         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4097         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4098         for each range in a block.
4099
4100
4101 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4102
4103         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4104         incrementation.
4105
4106 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4107
4108         * solib-svr4.c (read_program_headers_from_bfd): Return
4109         gdb::optional<gdb::byte_vector>.
4110         (svr4_exec_displacement): Adjust.
4111
4112 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4113
4114         * solib-svr4.c (read_program_header): Return
4115         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4116         (find_program_interpreter): Return
4117         gdb::optional<gdb::byte_vector>.
4118         (scan_dyntag_auxv): Adjust.
4119         (enable_break): Adjust.
4120         (svr4_exec_displacement): Adjust.
4121
4122 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4123
4124         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4125         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4126
4127 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4128
4129         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4130         string_vprintf.
4131         * guile/scm-utils.c (gdbscm_printf): Likewise.
4132         * serial.c (serial_printf): Likewise.
4133         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4134
4135 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4136
4137         * stack.c (print_frame): Print frame architecture when printing on
4138         an MI output.
4139         * NEWS: Mention new "arch" attribute in frame output.
4140
4141 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4142
4143         * arch/aarch64.h (aarch64_regnum): Update comment.
4144
4145 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4146
4147         * NEWS: Add SVE to 8.2 section.
4148
4149 2018-08-21  Pedro Alves  <palves@redhat.com>
4150
4151         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4152         out from gdbscm_parse_function_args.
4153         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4154         gdbscm_parse_function_args_1.
4155
4156 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4157
4158         PR gdb/17816
4159         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4160         operator.
4161
4162 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4163
4164         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4165
4166 2018-08-19  Michael Spang  <spang@google.com>
4167
4168         PR gdb/11786
4169         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4170         for PT_TLS segments.
4171
4172 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4173
4174         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4175         dwarf_variable_value.
4176         * dwarf2-frame.c (class dwarf_expr_executor):
4177         Add override for dwarf_variable_value.
4178         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4179         (class symbol_needs_eval_context): Likewise.
4180         (indirect_synthetic_pointer): Add forward declaration.
4181         (sect_variable_value): New function.
4182         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4183         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4184         for DW_OP_GNU_variable_value.
4185
4186 2018-08-16  Tom Tromey  <tom@tromey.com>
4187
4188         * top.c (read_command_file): Update.
4189         (command_line_input): Remove "repeat" argument.
4190         * ada-lang.c (get_selections): Update.
4191         * linespec.c (decode_line_2): Update.
4192         * defs.h (command_line_input): Remove argument.
4193         * cli/cli-script.c (read_next_line): Update.
4194         * python/py-gdb-readline.c: Update.
4195
4196 2018-08-17  Tom Tromey  <tom@tromey.com>
4197
4198         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4199         command_line_input.
4200
4201 2018-08-15  Tom Tromey  <tom@tromey.com>
4202
4203         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4204
4205 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4206
4207         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4208         If used, use find_pc_partial_function to find address range
4209         to disassemble.
4210         * mi/mi-main.c (mi_cmd_list_features): Report
4211         "data-disassemble-a-option" feature.
4212         * NEWS: Mention new -data-disassemble option -a.
4213
4214 2018-08-13  Tom Tromey  <tom@tromey.com>
4215
4216         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4217
4218 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4219
4220         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4221         (aarch64_linux_collect_sve_regset): Likewise.
4222         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4223         * regcache.h (regcache_map_entry_size): New function.
4224
4225 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4226
4227         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4228         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4229         (SVE_HEADER_VL_LENGTH): Likewise.
4230         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4231         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4232         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4233         (SVE_HEADER_SIZE_OFFSET): Likewise.
4234         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4235         (SVE_HEADER_VL_OFFSET): Likewise.
4236         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4237         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4238         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4239         (SVE_HEADER_SIZE): Likewise.
4240         (aarch64_linux_core_read_vq): Add function.
4241         (aarch64_linux_core_read_description): Check for SVE section.
4242
4243 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4244
4245         * aarch64-fbsd-tdep.c
4246         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4247         collect_size.
4248         * aarch64-linux-tdep.c
4249         (aarch64_linux_iterate_over_regset_sections): Likewise.
4250         * alpha-linux-tdep.c
4251         (alpha_linux_iterate_over_regset_sections):
4252         * alpha-nbsd-tdep.c
4253         (alphanbsd_iterate_over_regset_sections): Likewise.
4254         * amd64-fbsd-tdep.c
4255         (amd64fbsd_iterate_over_regset_sections): Likewise.
4256         * amd64-linux-tdep.c
4257         (amd64_linux_iterate_over_regset_sections): Likewise.
4258         * arm-bsd-tdep.c
4259         (armbsd_iterate_over_regset_sections): Likewise.
4260         * arm-fbsd-tdep.c
4261         (arm_fbsd_iterate_over_regset_sections): Likewise.
4262         * arm-linux-tdep.c
4263         (arm_linux_iterate_over_regset_sections): Likewise.
4264         * corelow.c (get_core_registers_cb): Likewise.
4265         (core_target::fetch_registers): Likewise.
4266         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4267         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4268         * gdbarch.h (void): Regenerate.
4269         * gdbarch.sh: Add supply_size and collect_size.
4270         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4271         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4272         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4273         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4274         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4275         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4276         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4277         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4278         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4279         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4280         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4281         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4282         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4283         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4284         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4285         Likewise.
4286         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4287         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4288         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4289         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4290         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4291         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4292         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4293         Likewise.
4294         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4295         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4296         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4297         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4298         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4299         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4300         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4301         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4302
4303 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4304
4305         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4306         with string_printf.
4307
4308 2018-08-10  Keith Seitz  <keiths@redhat.com>
4309
4310         * compile/compile-c-support.c (add_code_header, add_code_footer):
4311         Move into policy class.
4312         (c_push_user_expression, pop_user_expression_nop)
4313         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4314         (compile_program): New host class.
4315         (c_compile_program): New typedef.
4316         (c_compute_porgram): Use c_compile_program.
4317
4318 2018-08-10  Keith Seitz  <keiths@redhat.com>
4319
4320         * compile/compile-internal.h (compile_instance::~compile_instance):
4321         Remove calls to htab_delete.
4322         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4323         * compile.c (compile_instance::compile_instance): Initialize
4324         htab unique pointers.
4325         (compile_instance::get_cached_type, compile_instance::insert_type)
4326         (compile_instance::error_symbol_once): Update for unique_ptr.
4327
4328 2018-08-10  Keith Seitz  <keiths@redhat.com>
4329
4330         * compile/compile-c-symbols.c (struct symbol_error)
4331         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4332         (compile_instance::insert_symbol_error)
4333         (compile_instance::error_symbol_once): Move to ...
4334         * compile/compile.c: ... here.
4335
4336 2018-08-10  Keith Seitz  <keiths@redhat.com>
4337
4338         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4339         instead of `new_compile_instance'.
4340         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4341         Update description.
4342         If the symbol error map is not initialized, create it.
4343         (generate_c_for_for_one_symbol): Do not check/initialize
4344         the symbol error map.
4345         * compile/compile-c-types.c (compile_c_instance): Make a class.
4346         Update all callers.
4347         (compile_instance::compile_instance): Initialize the type cache.
4348         (get_cached_type): New function.
4349         (insert_type): Update description.
4350         (compile_c_instance::m_default_cflags): Define.
4351         (convert_type): Update description.  Use get_cached_type.
4352         (delete_instance): Moved to destructor.
4353         (new_compile_instance): Moved to constructor.
4354         * compile/compile-c.h (compile_c_instance): Make class inheriting
4355         from compile_instance.
4356         <base>: Remove field.
4357         <type_map, symbol_err_map>: Move to base class.
4358         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4359         * compile/compile-internal.h (compile_instance): Make class.
4360         <type_map_t, symbol_err_map_t>: Define.
4361         <fe>: Rename to `m_gcc_fe'.
4362         <scope, block, gcc_target_options>: Add `m_' prefix.
4363         <m_type_map, m_symbol_err_map>: New fields, moved from
4364         compile_c_instance.
4365         <destroy>: Remove.
4366         (convert_type, new_compile_instance): Remove.
4367         * compile/compile.c (cleanup_compile_instance): Remove.
4368         (compile_to_object): Use unique_ptr to eliminate cleanups.
4369         (compile_instance::set_print_callback, compile_instance::version)
4370         (compile_instance::set_verbose)
4371         (compile_instance::set_driver_filename)
4372         (compile_instance::set_triplet_regexp)
4373         (compile_instance::set_arguments)
4374         (compile_instance::set_source_file)
4375         (compile_instance::compile): Define.
4376
4377 2018-08-10  Keith Seitz  <keiths@redhat.com>
4378
4379         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4380         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4381         gcc-c-fe.def to define C plugin.
4382         (delete_instance): Delete `c_plugin'.
4383         (new_compile_instance): Initialize `c_plugin'.
4384         * compile/compile-c.h: Include gcc_c_plugin.h.
4385         (struct compile_c_instance) <c_plugin>: New member.
4386         * gcc-c-plugin.h: New file.
4387         Update all callers with API change.
4388
4389 2018-08-10  Keith Seitz  <keiths@redhat.com>
4390
4391         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4392         (HFILES_NO_SRCDIR): ... to here.
4393         Add compile-internal.h and compile-c.h.
4394         * compile/compile-c-support.c: Include compile-c.h.
4395         * compile/compile-c-symbols.c: Include compile-c.h.
4396         (generate_c_for_variable_locations): Update comment.
4397         * compile/compile-c-types.c: Include compile-c.h.
4398         * compile/compile-c.h: New file -- moved C language declarations
4399         from other files here.
4400         * compile/compile-internal.h: Do not include hashtab.h or
4401         common/enum-flags.h.
4402         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4403         (gcc_convert_symbol, gcc_symbol_address)
4404         (generate_c_for_variable_locations, c_get_mode_for_size)
4405         (c_get_range_decl_name): Definitions moved to compile-c.h.
4406         * compile/compile-loc2c.c: Include compile-c.h.
4407
4408 2018-08-10  Keith Seitz  <keiths@redhat.com>
4409
4410         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4411         (c_symbol_substitution_name): ... this.
4412         Update all callers.
4413
4414 2018-08-10  Keith Seitz  <keiths@redhat.com>
4415
4416         * compile/compile-c-support.c (c_compute_program): Use
4417         unique_xmalloc_ptr to eliminate cleanup.
4418         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4419         Return a unique_xmalloc_ptr and eliminate cleanup.
4420         * compile/compile-internal.h (generate_c_for_variable_locations):
4421         Return unique_xmalloc_ptr and update description.
4422
4423 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4424
4425         * corelow.c (core_target::get_core_register_section): Rename
4426         min_size to section_min_size.
4427
4428 2018-08-09  Jim Wilson  <jimw@sifive.com>
4429
4430         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4431         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4432         * NEWS: Mention new GNU/Linux RISC-V target.
4433         * configure.host: Add riscv*-*-linux*.
4434         * configure.nat: Add riscv*.
4435         * configure.tgt: Add riscv*-*-linux*.
4436         * riscv-linux-nat.c: New file.
4437         * riscv-linux-tdep.c: New file.
4438
4439 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4440
4441         * infrun.c (resume): Make static, add forward declaration.
4442         (proceed): Update header comment.
4443         * infrun.h (resume): Delete declaration.
4444
4445 2018-08-09  Tom Tromey  <tom@tromey.com>
4446
4447         * riscv-tdep.h: Minor formatting fixes.
4448
4449 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4450
4451         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4452         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4453         (test_mkdir_recursive): Likewise.
4454         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4455
4456 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4457
4458         * valarith.c (value_subscripted_rvalue): If an array is not in
4459         memory, and we don't know the upper bound, then we can't know that
4460         the requested element exists or not.
4461
4462 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4463
4464         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4465         (target_options_to_string): Add comment.
4466
4467 2018-08-08  Tom Tromey  <tom@tromey.com>
4468
4469         * unittests/scoped_mmap-selftests.c: Check result of "write".
4470
4471 2018-08-08  Jim Wilson  <jimw@sifive.com>
4472
4473         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4474         (decode_register_index_short): New.
4475         (decode_j_type_insn, decode_cj_type_insn): New.
4476         (decode_b_type_insn, decode_cb_type_insn): New.
4477         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4478         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4479         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4480         is_c_sw_insn instead of is_sw_insn.
4481         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4482         (riscv_software_single_step): New.
4483         * riscv-tdep.h (riscv_software_single_step): Declare.
4484
4485         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4486         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4487
4488 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4489
4490         PR gdb/18050:
4491         * target.c (dispose_inferior): Don't dispose of inferiors that are
4492         already killed.
4493
4494 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4495
4496         * remote.c (remote_target::download_tracepoint): Change char* to
4497         const char*.
4498
4499 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4500
4501         * target.h (target_options_to_string): Return an std::string.
4502         * target.c (str_comma_list_concat_elem): Return void, use
4503         std::string.
4504         (do_option): Likewise.
4505         (target_options_to_string): Return an std::string.
4506         * linux-nat.c (linux_nat_target::wait): Adjust.
4507         * target-debug.h (target_debug_print_options): Adjust.
4508
4509 2018-08-07  Tom Tromey  <tom@tromey.com>
4510
4511         * Makefile.in (CPPFLAGS): New variable.
4512         (INTERNAL_CPPFLAGS): Use it.
4513
4514 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4515
4516         * NEWS: Mention the index cache.
4517
4518 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4519
4520         * common/pathstuff.h (get_standard_cache_dir): New.
4521         * common/pathstuff.c (get_standard_cache_dir): New.
4522         * build-id.h (build_id_to_string): New.
4523         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4524         DEBUG_STR_SUFFIX): Move to here.
4525         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4526         DEBUG_STR_SUFFIX): Move from there.
4527         (write_psymtabs_to_index): Make non-static, add basename
4528         parameter.  Write to temporary files, rename when done.
4529         (save_gdb_index_command): Adjust call to
4530         write_psymtabs_to_index.
4531         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4532         field.
4533         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4534         (get_gdb_index_contents_from_cache): New.
4535         (get_gdb_index_contents_from_cache_dwz): New.
4536         (dwarf2_initialize_objfile): Read index from cache.
4537         (dwarf2_build_psymtabs): Save to index.
4538         * dwarf-index-cache.h: New file.
4539         * dwarf-index-cache.c: New file.
4540         * dwarf-index-write.h: New file.
4541
4542 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4543
4544         * gnulib/aclocal.m4: Re-generate.
4545         * gnulib/config.in: Re-generate.
4546         * gnulib/configure: Re-generate.
4547         * gnulib/import/Makefile.am: Re-generate.
4548         * gnulib/import/Makefile.in: Re-generate.
4549         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4550         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4551         * gnulib/import/m4/mkdir.m4: New file.
4552         * gnulib/import/mkdir.c: New file.
4553         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4554         module.
4555
4556 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4557
4558         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4559         * common/scoped_mmap.c: New file.
4560         * common/scoped_mmap.h (destroy): New method.
4561         (~scoped_mmap, reset): Use destroy.
4562         (scoped_mmap): New move constructor.
4563         (mmap_file): New declaration.
4564         * unittests/scoped_mmap-selftests.c (test_normal,
4565         test_invalid_filename, run_tests): New functions.
4566         (_initialize_scoped_mmap_selftests): Register selftest.
4567
4568 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4569
4570         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4571         (read_gdb_index_from_buffer): ... this.  Remove section
4572         parameter, add buffer parameter.
4573         (get_gdb_index_contents_ftype,
4574         get_gdb_index_contents_dwz_ftype): New typedefs.
4575         (dwarf2_read_gdb_index): Add callback parameters to get the
4576         index contents.
4577         (get_gdb_index_contents_from_section): New.
4578         (dwarf2_initialize_objfile): Update call to
4579         dwarf2_read_gdb_index.
4580
4581 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4582
4583         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4584         (gdb_open_cloexec): Likewise.
4585         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4586         (commandline_from_pid): Likewise.
4587         (linux_xfer_osdata_threads): Likewise.
4588         (linux_xfer_osdata_fds): Likewise.
4589         * ada-lang.c (is_package_name): Likewise.
4590         * auxv.c (procfs_xfer_auxv): Likewise.
4591         * breakpoint.c (print_one_breakpoint_location): Use
4592         uiout::field_fmt.
4593         (print_one_catch_solib): Use string_printf.
4594         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4595         (add_pe_forwarded_sym): Likewise.
4596         * dwarf2read.c (create_type_unit_group): Likewise.
4597         (build_error_marker_type): Likewise.
4598         * infcall.c (get_function_name): Likewise.
4599         * valprint.c (print_converted_chars_to_obstack): Likewise.
4600         * xtensa-tdep.c (xtensa_register_type): Likewise.
4601
4602 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4603
4604         * remote.c (remote_target::download_tracepoint): Fix format
4605         string errors.
4606
4607 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4608
4609         * tracefile.c: Include common/byte-vector.h.
4610         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4611         with trace_regblock_size if needed.  Update uses of buf.
4612
4613 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4614
4615         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4616         std::vector<unsigned char>.
4617         * tracepoint.c (collection_list::collection_list): Remove
4618         m_regs_mask initializer from initializer list.  Resize
4619         m_regs_mask using the largest remote register number.
4620         (collection_list::add_remote_register): Remove size check on
4621         m_regs_mask.  Use at to access element.
4622         (collection_list::stringify): Change type of temp_buf to
4623         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4624         stringify the register mask.  Use pack_hex_byte for the register
4625         mask.
4626
4627 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4628
4629         * tracepoint.h (class collection_list) <add_register>: Remove.
4630         <add_remote_register, add_ax_registers, add_local_register>:
4631         Declare.
4632         <add_memrange>: Add scope parameter.
4633         * tracepoint.c (encode_actions_1): Likewise.
4634         (collection_list::add_register): Rename to ...
4635         (collection_list::add_remote_register): ... this.  Update
4636         comment.
4637         (collection_list::add_ax_registers, add_local_register): New
4638         methods.
4639         (collection_list::add_memrange): Add scope parameter.  Call
4640         add_local_register instead of add_register.
4641         (finalize_tracepoint_aexpr): New function.
4642         (collection_list::collect_symbol): Update calls to add_memrange.
4643         Call add_local_register instead of add_register.  Call
4644         add_ax_registers.  Call finalize_tracepoint_aexpr.
4645         (encode_actions_1): Get remote regnos for $reg action.  Call
4646         add_remote_register, add_ax_registers, and add_local_register.
4647         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4648         (validate_actionline): Call finalize_tracepoint_aexpr.
4649
4650 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4651
4652         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4653         Replace array buf with gdb::char_vector buf, of size
4654         get_remote_packet_size ().  Replace references to buf and
4655         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4656         and xsnprintf with snprintf.  Raise errors if the buffer is too
4657         small.
4658
4659 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4660
4661         * remote.c (remote_target::download_tracepoint): Fix the has_more
4662         predicate in the QTDP action list iteration.
4663
4664 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4665
4666         * remote.c (remote_target::download_tracepoint): Fix indentation
4667         in for block.
4668
4669 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4670
4671         * proc-api.c (_initialize_proc_api): Remove c, unused.
4672         * procfs.c (procfs_init_inferior): Remove signals, unused.
4673         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4674         unused.
4675
4676 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4677             Andrew Burgess  <andrew.burgess@embecosm.com>
4678
4679         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4680         'W_STOPCODE (0)' as this could be ambiguous.
4681
4682 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4683
4684         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4685         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4686         "ai_socktype").
4687
4688 2018-08-02  Tom Tromey  <tom@tromey.com>
4689
4690         PR symtab/16842.
4691         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4692         symbols.
4693         (process_structure_scope): Likewise.
4694
4695 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4696
4697         PR gdb/22629:
4698         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4699         kill inferior.
4700
4701 2018-08-02  Tom Tromey  <tom@tromey.com>
4702
4703         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4704         (darwin_suspend_inferior, darwin_resume_inferior)
4705         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4706         (darwin_check_new_threads): Check result of get_darwin_inferior.
4707
4708 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4709
4710         GDB 8.1.1 released.
4711
4712 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4713
4714         * varobj.c (varobj_get_path_expr_parent): Report an error if
4715         parent is a dynamic varobj.
4716
4717 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4718
4719         * gnulib/aclocal.m4: Re-generate.
4720         * gnulib/config.in: Re-generate.
4721         * gnulib/configure: Re-generate.
4722         * gnulib/import/Makefile.in: Re-generate.
4723         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4724         * gnulib/import/m4/onceonly.m4: Re-generate.
4725
4726 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4727
4728         * target-descriptions.c (struct xml_test_tdesc): New.
4729         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4730         (record_xml_tdesc): Update.
4731         (maintenance_check_xml_descriptions): Update.
4732         * target-descriptions.h (record_xml_tdesc): Update comment.
4733
4734 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4735
4736         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4737         checking array bounds are defined.
4738
4739 2018-07-30  Tom Tromey  <tom@tromey.com>
4740
4741         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4742         irreflexivity violation.
4743
4744 2018-07-30  Tom Tromey  <tom@tromey.com>
4745
4746         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4747         * value.c (unpack_long): Remove lint code.
4748         * valops.c (value_ind): Remove lint code.
4749         * valarith.c (value_x_binop, value_x_unop, value_equal)
4750         (value_pos): Remove lint code.
4751
4752 2018-07-28  Tom de Vries  <tdevries@suse.de>
4753
4754         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4755         with undefined upper bound as <optimized out>.
4756
4757 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4758
4759         * gcore.in: Rename variable "name" to "prefix".  Expand
4760         "usage" text.
4761
4762 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4763
4764         * windows-nat.c (windows_nat_target::create_inferior): Update to
4765         call close() in global namespace.
4766
4767 2018-07-26  Tom Tromey  <tom@tromey.com>
4768
4769         * dwarf-index-write.c (add_address_entry): Don't add objfile
4770         offsets.
4771         * dbxread.c (find_stab_function): Rename from
4772         find_stab_function_addr.  Return a bound_minimal_symbol.
4773         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4774         Don't add objfile offsets.
4775         (end_psymtab): Use raw_text_low, raw_text_high,
4776         MSYMBOL_VALUE_RAW_ADDRESS.
4777         (read_ofile_symtab): Update.
4778         (process_one_symbol): Update.
4779         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4780         offsets.
4781         (dw2_relocate): Remove.
4782         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4783         searching addrmap.
4784         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4785         Update.
4786         (process_psymtab_comp_unit_reader, add_partial_symbol)
4787         (add_partial_subprogram, dwarf2_ranges_read): Update.
4788         (load_partial_dies): Update.
4789         (add_address_entry): Don't add objfile offsets.
4790         (dwarf2_build_include_psymtabs): Update.
4791         (create_addrmap_from_aranges): Don't add objfile offsets.
4792         (dw2_find_pc_sect_compunit_symtab): Update.
4793         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4794         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4795         Update.
4796         (parse_partial_symbols): Don't add objfile offsets.  Use
4797         raw_text_low, raw_text_high.  Update.
4798         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4799         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4800         or call 'relocate' quick function.  Clear psymbol_map.
4801         * psympriv.h (struct partial_symbol) <address>: Add section
4802         offset.
4803         <set_unrelocated_address>: Rename from set_address.
4804         <raw_text_low, raw_text_high>: New methods.
4805         <text_low, text_high>: Add objfile parameter.
4806         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4807         set_unrelocated_address.
4808         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4809         (find_pc_psymbol): Update.
4810         (fixup_psymbol_section, relocate_psymtabs): Remove.
4811         (dump_psymtab, psym_functions): Update.
4812         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4813         parameter.
4814         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4815         (start_psymtab_common): Update.
4816         * symfile-debug.c (debug_qf_relocate): Remove.
4817         (debug_sym_quick_functions): Update.
4818         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4819         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4820         Update.
4821
4822 2018-07-26  Tom Tromey  <tromey@redhat.com>
4823
4824         * dbxread.c (end_psymtab): Use text_high_valid and
4825         text_low_valid.
4826         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4827         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4828         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4829         Update comment.
4830         <text_low_valid, text_high_valid>: New fields.
4831         <set_text_low, set_text_high>: Update.
4832         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4833
4834 2018-07-26  Tom Tromey  <tom@tromey.com>
4835
4836         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4837         Update.
4838         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4839         textlow and texthigh fields.
4840         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4841         Update.
4842         * mdebugread.c (parse_lines, parse_partial_symbols)
4843         (psymtab_to_symtab_1): Update.
4844         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4845         Rename fields.  Update comment.  Now private.
4846         <text_low, text_high, set_text_low, set_text_high>: New methods.
4847         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4848         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4849         (start_psymtab_common, maintenance_info_psymtabs)
4850         (maintenance_check_psymtabs): Update.
4851         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4852         texthigh fields.
4853         (scan_xcoff_symtab): Update.
4854
4855 2018-07-26  Tom Tromey  <tromey@redhat.com>
4856
4857         * psympriv.h (struct partial_symbol) <unrelocated_address,
4858         address, set_address>: New methods.
4859         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4860         (fixup_psymbol_section, relocate_psymtabs): Update.
4861         (print_partial_symbols): Add 'objfile' parameter.  Update.
4862         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4863         Update.
4864
4865 2018-07-26  Tom Tromey  <tom@tromey.com>
4866
4867         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4868         (debug_names::write_psymbols): Update.
4869         * psympriv.h (struct partial_symbol): Derive from
4870         general_symbol_info.
4871         <obj_section>: New method.
4872         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4873         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4874         (find_pc_sect_psymbol, fixup_psymbol_section)
4875         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4876         (print_partial_symbols, recursively_search_psymtabs)
4877         (compare_psymbols, psymbol_hash, psymbol_compare)
4878         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4879         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4880
4881 2018-07-26  Tom Tromey  <tromey@redhat.com>
4882
4883         * dbxread.c (end_psymtab): Remove dead code.
4884
4885 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4886
4887         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4888         DWARF unwinders are disabled.
4889         * dwarf2-frame.c: Add dwarf2read.h include.
4890         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4891         disabled.
4892         (dwarf2_frame_unwinders_enabled_p): Define.
4893         (show_dwarf_unwinders_enabled_p): New function.
4894         (_initialize_dwarf2_frame): Register switch to control DWARF
4895         unwinder use.
4896         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4897         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4898         (show_dwarf_cmdlist): Remove static keyword.
4899         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4900         (show_dwarf_cmdlist): Declare.
4901         * NEWS: Document new feature.
4902
4903 2018-07-26  Tom de Vries  <tdevries@suse.de>
4904
4905         PR breakpoints/23366
4906         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4907
4908 2018-07-26  Tom de Vries  <tdevries@suse.de>
4909
4910         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4911         DW_AT_count can't be translated to a dynamic prop.
4912
4913 2018-07-25  Tom de Vries  <tdevries@suse.de>
4914
4915         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4916         try/catch.
4917
4918 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4919
4920         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4921
4922 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4923
4924         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4925
4926 2018-07-24  Keith Seitz  <keiths@redhat.comt
4927
4928         PR symtab/23010
4929         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4930         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4931         instead of add_symbol_to_list.
4932         (read_file_scope): Call prepare_one_comp_unit before reading
4933         any other DIEs.
4934
4935 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4936
4937         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4938
4939 2018-07-24  Tom Tromey  <tom@tromey.com>
4940
4941         * utils.c (malloc, realloc, free): Don't declare.
4942         * configure, config.in: Rebuild.
4943         * configure.ac: Don't check for declarations of free, malloc, or
4944         realloc.
4945
4946 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4947
4948         * aarch64-linux-nat.c
4949         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4950         variable.
4951         * arm-linux-nat.c (fetch_regs): Likewise.
4952         (store_regs): Likewise.
4953         (fetch_vfp_regs): Likewise.
4954         (store_vfp_regs): Likewise.
4955         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4956         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4957         (arm_linux_nat_target::insert_watchpoint): Likewise.
4958         (arm_linux_nat_target::remove_watchpoint): Likewise.
4959         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4960         Likewise.
4961         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4962         Likewise.
4963         * ppc-linux-nat.c (fetch_register): Likewise.
4964         (fetch_all_gp_regs): Likewise.
4965         (fetch_ppc_registers): Likewise.
4966         (store_all_gp_regs): Likewise.
4967         (store_ppc_registers): Likewise.
4968         (hwdebug_insert_point): Likewise.
4969         (can_use_watchpoint_cond_accel): Likewise.
4970         * remote-sim.c (gdb_os_write_stdout): Likewise.
4971
4972 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4973             Tom Tromey  <tom@tromey.com>
4974
4975         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4976         test for it.
4977         * configure: Rebuild.
4978
4979 2018-07-22  Tom Tromey  <tom@tromey.com>
4980
4981         * regformats/regdat.sh: Define xmltarget_${name} inside
4982         #ifndef IN_PROCESS_AGENT.
4983
4984 2018-07-22  Tom Tromey  <tom@tromey.com>
4985
4986         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4987
4988 2018-07-22  Tom Tromey  <tom@tromey.com>
4989
4990         * symfile.c (reread_symbols): Notify iter, not objfile.
4991
4992 2018-07-22  Tom Tromey  <tom@tromey.com>
4993
4994         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4995         Use arch_ops.
4996         (ravenscar_thread_target::prepare_to_store): Likewise.
4997
4998 2018-07-22  Tom Tromey  <tom@tromey.com>
4999
5000         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5001         unused variable.  Call value_fetch_lazy when needed.
5002         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5003         Remove unused variable.  Call value_fetch_lazy when needed.
5004
5005 2018-07-22  Tom Tromey  <tom@tromey.com>
5006
5007         * m32c-tdep.c (mark_dma): Return void.
5008         (make_regs): Remove unused declarations.
5009
5010 2018-07-22  Tom Tromey  <tom@tromey.com>
5011
5012         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5013         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5014         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5015         bkscm_get_valid_block_smob_arg_unsafe for effect.
5016
5017 2018-07-22  Tom Tromey  <tom@tromey.com>
5018
5019         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5020         value_type.
5021
5022 2018-07-22  Tom Tromey  <tom@tromey.com>
5023
5024         * windows-nat.c (saved_context): Conditionally define.
5025         * remote.c (remote_target::remote_btrace_maybe_reopen):
5026         Conditionally declare "warned".
5027         * inflow.c (sigquit_ours): Conditionally define.
5028         (new_tty): Move "tty" declaration inside #if.
5029         * guile/guile.c (guile_datadir): Conditionally define.
5030         * charset.c (set_be_le_names): Move some declarations inside #if.
5031         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5032         #if.
5033         (parse_xml_btrace_conf): Likewise.
5034
5035 2018-07-22  Tom Tromey  <tom@tromey.com>
5036
5037         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5038
5039 2018-07-22  Tom Tromey  <tom@tromey.com>
5040
5041         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5042         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5043         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5044         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5045         * stack.c (frame_apply_level_command): Remove unused variable.
5046         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5047         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5048         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5049         unused variable.
5050         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5051         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5052         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5053         variable.
5054         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5055         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5056         variable.
5057         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5058         Remove unused variable.
5059         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5060         variable.
5061         * common/tdesc.c (print_xml_feature::visit): Remove unused
5062         variable.
5063         * compile/compile-object-load.c (store_regs): Remove unused
5064         variables.
5065         * complaints.c (clear_complaints): Remove unused variable.
5066         * corelow.c (core_target_open): Remove unused variable.
5067         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5068         variable.
5069         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5070         variable.
5071         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5072         variable.
5073         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5074         variable.
5075         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5076         variable.
5077         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5078         variable.
5079         * ia64-tdep.c (examine_prologue): Remove unused variable.
5080         * infcall.c (run_inferior_call): Remove unused variable.
5081         * inferior.c (exit_inferior): Remove unused variable.
5082         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5083         * linespec.c (decode_line_2): Remove unused variable.
5084         * linux-nat.c (super_close): Remove.
5085         * linux-tdep.c (linux_info_proc): Remove unused variable.
5086         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5087         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5088         Remove unused variable.
5089         * parse.c (find_minsym_type_and_address): Remove unused variable.
5090         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5091         variable.
5092         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5093         variable.
5094         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5095         variables.
5096         * record-btrace.c (record_btrace_target::store_registers): Remove
5097         unused variable.
5098         (cmd_show_record_btrace_cpu): Remove unused variable.
5099         * riscv-tdep.c (riscv_register_reggroup_p)
5100         (riscv_push_dummy_call, riscv_return_value): Remove unused
5101         variable.
5102         * rust-exp.y (literal): Remove unused variable.
5103         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5104         unused variable.
5105         <STRUCTOP_ANONYMOUS>: Likewise.
5106         * s390-linux-tdep.c (s390_linux_init_abi_31)
5107         (s390_linux_init_abi_64): Remove unused variable.
5108         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5109         (file_select_thread, net_windows_open, _initialize_ser_windows):
5110         Remove unused variables.
5111         * symtab.c (find_pc_sect_line): Remove unused variable.
5112         * target-memory.c (compute_garbled_blocks): Remove unused
5113         variable.
5114         (target_write_memory_blocks): Remove unused variable.
5115         * target.c (target_stack::unpush): Remove unused variables.
5116         * tracepoint.c (start_tracing, all_tracepoint_actions)
5117         (merge_uploaded_trace_state_variables)
5118         (print_one_static_tracepoint_marker): Remove unused variable.
5119         * unittests/basic_string_view/element_access/char/1.cc (test01):
5120         Remove unused variable.
5121         * windows-nat.c (windows_continue, windows_add_all_dlls)
5122         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5123         Remove unused variables.
5124
5125 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5126
5127         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5128         attr_profile in HAVE_ELF.
5129         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5130         HAVE_ELF.
5131
5132 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5133
5134         * frame.c (frame_register_unwind): Change parameter name.
5135         (frame_unwind_register): Likewise.
5136         (frame_unwind_register_value): Likewise.
5137         (frame_unwind_register_signed): Likewise.
5138         (frame_unwind_register_unsigned): Likewise.
5139         * frame.h (frame_register_unwind): Likewise.
5140         (frame_unwind_register): Likewise.
5141         (frame_unwind_register_value): Likewise.
5142         (frame_unwind_register_signed): Likewise.
5143         (frame_unwind_register_unsigned): Likewise.
5144         (frame_unwind_arch): Likewise.
5145
5146 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5147
5148         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5149         ISA maintenance.
5150
5151 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5152
5153         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5154         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5155         hand.
5156
5157 2018-07-20  Keith Seitz  <keiths@redhat.com>
5158
5159         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5160         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5161         m_compunit_symtab, m_language>: Add "m_" prefix.
5162         Update all uses.
5163         * buildsym.c: Update all uses.
5164
5165 2018-07-20  Tom Tromey  <tom@tromey.com>
5166
5167         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5168         * buildsym.h (record_line_ftype): Remove typedef.
5169
5170 2018-07-20  Tom Tromey  <tom@tromey.com>
5171
5172         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5173         (end_expandable_symtab): Likewise.
5174         (end_symtab_get_static_block): Likewise.
5175         (end_symtab_from_static_block): Likewise.
5176         * buildsym-legacy.c (augment_type_symtab): Remove.
5177         (end_expandable_symtab): Remove.
5178         (end_symtab_get_static_block): Remove.
5179         (end_symtab_from_static_block): Remove.
5180
5181 2018-07-20  Tom Tromey  <tom@tromey.com>
5182
5183         * dwarf2read.c: Include buildsym.h.
5184         (struct dwarf2_cu) <builder>: New method.
5185         (fixup_go_packaging): Update.
5186         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5187         use scoped_free_pendings.
5188         (using_directives): Add "cu" parameter, remove "language".
5189         (read_import_statement, setup_type_unit_groups, )
5190         (read_func_scope, read_lexical_block_scope)
5191         (dwarf2_record_block_ranges, read_namespace): Update.
5192         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5193         (lnp_state_machine::handle_end_sequence): Update.
5194         (class lnp_state_machine) <m_cu>: New member.
5195         <m_record_line_callback>: Remove.
5196         <m_currently_recording_lines>: New member.
5197         (lnp_state_machine::handle_set_file): Update.
5198         (noop_record_line): Remove.
5199         (dwarf_record_line_p): Add cu parameter.
5200         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5201         (lnp_state_machine::record_line)
5202         (lnp_state_machine::lnp_state_machine)
5203         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5204         (dwarf_decode_lines): Update.
5205         (dwarf2_start_subfile): Add cu parameter.
5206         (dwarf2_start_symtab, new_symbol): Update.
5207         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5208         Remove dwarf2_per_objfile parameter.
5209         (dwarf_decode_macros): Update.
5210
5211 2018-07-20  Tom Tromey  <tom@tromey.com>
5212
5213         * stabsread.c (define_symbol): Update.
5214         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5215         * dwarf2read.c (new_symbol): Update.
5216         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5217         * cp-namespace.c: Include buildsym.h.
5218         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5219         * buildsym-legacy.c (get_buildsym_compunit): New function.
5220
5221 2018-07-20  Tom Tromey  <tom@tromey.com>
5222
5223         * xcoffread.c: Include buildsym-legacy.h.
5224         * windows-nat.c: Include buildsym-legacy.h.
5225         * stabsread.c: Include buildsym-legacy.h.
5226         * mdebugread.c: Include buildsym-legacy.h.
5227         * buildsym-legacy.h: New file.
5228         * buildsym-legacy.c: New file, from buildsym.c.
5229         * go32-nat.c: Include buildsym-legacy.h.
5230         * dwarf2read.c: Include buildsym-legacy.h.
5231         * dbxread.c: Include buildsym-legacy.h.
5232         * cp-namespace.c: Include buildsym-legacy.h.
5233         * coffread.c: Include buildsym-legacy.h.
5234         * buildsym.h: Move some contents to buildsym-legacy.h.
5235         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5236         buildsym-legacy.c.
5237         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5238
5239 2018-07-20  Tom Tromey  <tom@tromey.com>
5240
5241         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5242         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5243         (buildsym_compunit::buildsym_compunit)
5244         (buildsym_compunit::~buildsym_compunit)
5245         (buildsym_compunit::get_macro_table): Define.
5246
5247 2018-07-20  Tom Tromey  <tom@tromey.com>
5248
5249         * buildsym.c (reset_symtab_globals): Remove.
5250         (buildsym_compunit::end_symtab_from_static_block): Update.
5251         (buildsym_compunit::augment_type_symtab): Update.
5252         (end_symtab_from_static_block): Call free_buildsym_compunit.
5253         (augment_type_symtab, end_symtab, end_expandable_symtab):
5254         Likewise.
5255
5256 2018-07-20  Tom Tromey  <tom@tromey.com>
5257
5258         * arch-utils.c: Do not include buildsym.h.
5259         * mipsread.c: Do not include buildsym.h.
5260         * machoread.c: Do not include buildsym.h.
5261         * elfread.c: Do not include buildsym.h.
5262
5263 2018-07-20  Tom Tromey  <tom@tromey.com>
5264
5265         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5266         initialization.
5267         (buildsym_compunit): Add new constructor.
5268         (struct buildsym_compunit) <get_last_source_file, finish_block,
5269         record_block_range, start_subfile, patch_subfile_names,
5270         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5271         set_last_source_start_addr, get_last_source_start_addr,
5272         get_local_using_directives, set_local_using_directives,
5273         get_global_using_directives, outermost_context_p,
5274         get_current_context_stack, get_context_stack_depth,
5275         get_current_subfile, get_local_symbols, get_file_symbols,
5276         get_global_symbols, record_debugformat, record_producer,
5277         push_context, pop_context, end_symtab_get_static_block,
5278         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5279         New public methods.
5280         <record_pending_block, finish_block_internal, make_blockvector,
5281         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5282         private methods.
5283         Update all users.
5284
5285 2018-05-22  Tom Tromey  <tom@tromey.com>
5286
5287         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5288         parameter.
5289         (finish_block_internal): Update.
5290
5291 2018-07-20  Tom Tromey  <tom@tromey.com>
5292
5293         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5294         parameter.
5295         (finish_block_internal): Update.
5296
5297 2018-07-20  Tom Tromey  <tom@tromey.com>
5298
5299         * buildsym.h (EXTERN): Don't define or undef.
5300         * buildsym.c (EXTERN): Don't define.
5301
5302 2018-07-20  Tom Tromey  <tom@tromey.com>
5303
5304         * buildsym.c: Remove TODO comment.
5305
5306 2018-07-20  Tom Tromey  <tom@tromey.com>
5307
5308         * coffread.c (coff_symtab_read): Update.
5309         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5310         (xcoff_new_init): Update.
5311         * mipsread.c (mipscoff_new_init): Update.
5312         * mdebugread.c (mdebug_build_psymtabs): Update.
5313         * elfread.c (elf_new_init): Update.
5314         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5315         Update.
5316         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5317         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5318         (stabsect_build_psymtabs): Update.
5319         * buildsym.h (buildsym_init): Don't declare.
5320         * buildsym.c: Update comment.
5321         (prepare_for_building): Remove.
5322         (start_symtab, restart_symtab): Update.
5323         (reset_symtab_globals): Update comment.
5324         (buildsym_init): Remove.
5325
5326 2018-07-20  Tom Tromey  <tom@tromey.com>
5327
5328         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5329         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5330         (read_enum_type, common_block_start, common_block_end)
5331         (cleanup_undefined_types_1, finish_global_stabs): Update.
5332         * mdebugread.c (psymtab_to_symtab_1): Update.
5333         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5334         (read_lexical_block_scope, new_symbol): Update.
5335         * dbxread.c (process_one_symbol): Update.
5336         * coffread.c (coff_symtab_read, process_coff_symbol)
5337         (coff_read_enum_type): Update.
5338         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5339         declare.
5340         (get_local_symbols, get_file_symbols, get_global_symbols): New
5341         functions.
5342         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5343         m_global_symbols.
5344         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5345         (~scoped_free_pendings): Update.
5346         (finish_block, prepare_for_building, reset_symtab_globals)
5347         (end_symtab_get_static_block, end_symtab_with_blockvector)
5348         (augment_type_symtab, push_context): Update.
5349         (get_local_symbols, get_file_symbols, get_global_symbols): New
5350         functions.
5351         (buildsym_init): Update.
5352
5353 2018-07-20  Tom Tromey  <tom@tromey.com>
5354
5355         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5356         (process_full_type_unit): Likewise.
5357         (dwarf2_start_symtab): Set list_in_scope.
5358
5359 2018-07-20  Tom Tromey  <tom@tromey.com>
5360
5361         * dwarf2read.c (process_psymtab_comp_unit_reader)
5362         (build_type_psymtabs_reader): Do not set list_in_scope.
5363
5364 2018-07-20  Tom Tromey  <tom@tromey.com>
5365
5366         * buildsym.c (free_pendings): Remove.
5367         (add_symbol_to_list, scoped_free_pendings)
5368         (finish_block_internal, buildsym_init): Update.
5369
5370 2018-07-20  Tom Tromey  <tom@tromey.com>
5371
5372         * xcoffread.c (read_xcoff_symtab): Update.
5373         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5374         Update.
5375         * dbxread.c (process_one_symbol): Update.
5376         * coffread.c (coff_symtab_read): Update.
5377         * buildsym.h (finish_block): Update.
5378         * buildsym.c (finish_block): Remove "listhead" argument.
5379         (end_symtab_get_static_block): Update.
5380
5381 2018-07-20  Tom Tromey  <tom@tromey.com>
5382
5383         * buildsym.h (class scoped_free_pendings): Remove constructor.
5384         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5385         method.
5386         <m_pending_block_obstack, m_pending_blocks>: New members.
5387         (pending_block_obstack, pending_blocks): Remove.
5388         (scoped_free_pendings::scoped_free_pendings): Default.
5389         (~scoped_free_pendings): Update.
5390         (free_pending_blocks): Remove.
5391         (finish_block_internal, record_pending_block, make_blockvector)
5392         (end_symtab_get_static_block, augment_type_symtab, push_context)
5393         (buildsym_init): Update.
5394
5395 2018-07-20  Tom Tromey  <tom@tromey.com>
5396
5397         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5398         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5399         members.
5400         (pending_addrmap, pending_addrmap_obstack)
5401         (pending_addrmap_interesting): Remove.
5402         (scoped_free_pendings, record_block_range, make_blockvector)
5403         (prepare_for_building, reset_symtab_globals, buildsym_init):
5404         Update.
5405
5406 2018-07-20  Tom Tromey  <tom@tromey.com>
5407
5408         * xcoffread.c (process_linenos): Update.
5409         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5410         * mdebugread.c (psymtab_to_symtab_1): Update.
5411         * dwarf2read.c (setup_type_unit_groups)
5412         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5413         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5414         * dbxread.c (process_one_symbol): Update.
5415         * coffread.c (coff_symtab_read, enter_linenos)
5416         (process_coff_symbol): Update.
5417         * buildsym.h (current_subfile): Don't declare.
5418         (get_current_subfile): Declare.
5419         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5420         member.
5421         (start_subfile, free_buildsym_compunit, push_subfile)
5422         (prepare_for_building, start_symtab): Update.
5423         (get_current_subfile): New function.
5424
5425 2018-07-20  Tom Tromey  <tom@tromey.com>
5426
5427         * coffread.c (coff_symtab_read): Update.
5428         * xcoffread.c (read_xcoff_symtab): Update.
5429         * dwarf2read.c (new_symbol): Update.
5430         (read_func_scope, read_lexical_block_scope): Update.
5431         * dbxread.c (process_one_symbol): Update.
5432         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5433         (outermost_context_p): Remove macro.
5434         (outermost_context_p, get_current_context_stack)
5435         (get_context_stack_depth): Declare.
5436         (pop_context): Return struct context_stack.
5437         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5438         member.
5439         (context_stack_size): Remove.
5440         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5441         (prepare_for_building, end_symtab_get_static_block)
5442         (augment_type_symtab, push_context): Update.
5443         (pop_context): Return struct context_stack.
5444         (outermost_context_p, get_current_context_stack)
5445         (get_context_stack_depth): New functions.
5446         (buildsym_init): Update.
5447
5448 2018-07-20  Tom Tromey  <tom@tromey.com>
5449
5450         * rust-exp.y: Now a pure parser.  Update all rules.
5451         (%union): Move earlier.
5452         (current_parser, work_obstack): Remove globals.
5453         (rust_parser, ~rust_parser): Update.
5454         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5455         lex_character, lex_number, lex_string, lex_identifier,
5456         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5457         convert_name, convert_params_to_expression,
5458         convert_ast_to_expression, ast_basic_type, ast_operation,
5459         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5460         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5461         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5462         ast_array_type, ast_slice_type, ast_reference_type,
5463         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5464         (rust_parse): Update.
5465         (rustyyerror, rustyylex): Add parser parameter.
5466         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5467         (rust_lex_stringish_test, rust_lex_test_sequence)
5468         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5469         (rust_lex_test_push_back, rust_lex_tests): Update.
5470
5471 2018-07-19  Pedro Alves  <palves@redhat.com>
5472
5473         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5474         gdb::unique_xmalloc_ptr.
5475         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5476         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5477         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5478         copy-initialization.
5479         * guile/scm-pretty-print.c (ppscm_print_children): Use
5480         gdb::unique_xmalloc_ptr instead of cleanups.
5481         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5482         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5483         gdb::unique_xmalloc_ptr.
5484         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5485         Adjust to use gdb::unique_xmalloc_ptr.
5486         * guile/scm-utils.c (extract_arg): Adjust.
5487         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5488         gdb::unique_xmalloc_ptr instead of a cleanup.
5489
5490 2018-07-19  Tom Tromey  <tom@tromey.com>
5491
5492         * utils.c (do_value_free_to_mark)
5493         (make_cleanup_value_free_to_mark): Remove.
5494         * utils.h (make_cleanup_value_free_to_mark): Remove.
5495
5496 2018-07-19  Pedro Alves  <palves@redhat.com>
5497
5498         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5499         forwarding reference.
5500
5501 2018-07-18  Pedro Alves  <palves@redhat.com>
5502
5503         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5504         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5505         cleanup.
5506
5507 2018-07-18  Pedro Alves  <palves@redhat.com>
5508
5509         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5510         exceptions.
5511         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5512         (gdbscm_wrap): New.
5513         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5514         directly instead of a cleanup.
5515         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5516         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5517         (vlscm_binop_gdbthrow): New, factored out from ...
5518         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5519         (vlscm_rich_compare): Use gdbscm_wrap.
5520         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5521         instead of a cleanup.
5522         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5523         cleanup.
5524         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5525         Use xfree directly instead of a cleanup.
5526         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5527         Adjust to use gdbscm_wrap and scoped_value_mark.
5528         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5529         (gdbscm_value_address, gdbscm_value_dereference)
5530         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5531         scoped_value_mark.
5532         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5533         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5534         scoped_value_mark.
5535         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5536         gdbscm_wrap and scoped_value_mark.
5537         (gdbscm_value_to_string): Use xfree directly instead of a
5538         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5539         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5540         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5541         scoped_value_mark.
5542         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5543         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5544         scoped_value_mark.
5545         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5546         gdbscm_wrap.
5547
5548 2018-07-18  Tom de Vries  <tdevries@suse.de>
5549
5550         * findvar.c (default_read_var_value): Also resolve dynamic type for
5551         LOC_OPTIMIZED_OUT vars.
5552
5553 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5554
5555         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5556         decoding.
5557
5558 2018-07-17  Tom Tromey  <tom@tromey.com>
5559
5560         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5561         (compute_enum_list, pascm_set_param_value_x)
5562         (gdbscm_parameter_value): Update.
5563         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5564         (gdbscm_scm_to_host_string): Update.
5565         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5566         Update.
5567         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5568         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5569         * guile/scm-string.c (gdbscm_scm_to_string): Return
5570         unique_xmalloc_ptr.
5571         (gdbscm_scm_to_host_string): Likewise.
5572
5573 2018-07-17  Tom Tromey  <tom@tromey.com>
5574
5575         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5576         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5577         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5578         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5579         unique_xmalloc_ptr.
5580
5581 2018-07-17  Tom Tromey  <tom@tromey.com>
5582
5583         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5584         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5585         Update.
5586         * guile/scm-cmd.c (cmdscm_function): Update.
5587         * guile/scm-pretty-print.c
5588         (ppscm_print_exception_unless_memory_error): Update.
5589         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5590         Return unique_xmalloc_ptr.
5591
5592 2018-07-17  Tom Tromey  <tom@tromey.com>
5593
5594         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5595         Use string_printf.
5596
5597 2018-07-17  Jim Wilson  <jimw@sifive.com>
5598
5599         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5600         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5601         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5602         unecessary braces after EF_RISCV_RVC test.  Delete call to
5603         set_gdbarch_decr_pc_after_break.
5604
5605         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5606         RISCV_LAST_FP_REGNUM + 1.
5607         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5608
5609 2018-07-17  Tom Tromey  <tom@tromey.com>
5610
5611         * configure.ac: Remove --disable-gdbcli.
5612         * configure: Rebuild.
5613         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5614         (SUBDIR_CLI_CFLAGS): Remove.
5615         (SFILES): Use SUBDIR_CLI_SRCS.
5616         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5617
5618 2018-07-17  Tom Tromey  <tom@tromey.com>
5619
5620         PR gdb/18624:
5621         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5622
5623 2018-07-16  Jim Wilson  <jimw@sifive.com>
5624
5625         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5626
5627 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5628
5629         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5630         variable.
5631         (libunwind_frame_sniffer): Likewise.
5632         (libunwind_frame_prev_register): Likewise.
5633         (libunwind_sigtramp_frame_sniffer): Likewise.
5634         * ia64-tdep.c (ia64_access_reg): Likewise.
5635         (ia64_access_rse_reg): Likewise.
5636         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5637         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5638
5639 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5640
5641         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5642
5643 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5644
5645         * remote-sim.c (gdbsim_target::close,
5646         gdbsim_target::mourn_inferior): Remove unused variables.
5647
5648 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5649
5650         * ia64-tdep.c (ktab_buf): New global.
5651         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5652         (get_kernel_table): Adjust.
5653
5654 2018-07-16  Tom Tromey  <tom@tromey.com>
5655
5656         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5657         * dwarf2read.c (using_directives, new_symbol): Use
5658         outermost_context_p.
5659         * dbxread.c (process_one_symbol): Use outermost_context_p.
5660         * coffread.c (coff_symtab_read): Use outermost_context_p.
5661
5662 2018-07-16  Tom Tromey  <tom@tromey.com>
5663
5664         * dwarf2read.c (using_directives, read_func_scope)
5665         (read_lexical_block_scope): Update.
5666         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5667         * buildsym.h (local_using_directives, global_using_directives):
5668         Don't declare.
5669         (get_local_using_directives, set_local_using_directives)
5670         (get_global_using_directives): Declare.
5671         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5672         m_global_using_directives>: New members.
5673         (finish_block_internal, prepare_for_building)
5674         (reset_symtab_globals, end_symtab_get_static_block)
5675         (push_context): Update.
5676         (get_local_using_directives, set_local_using_directives)
5677         (get_global_using_directives): New functions.
5678         (buildsym_init): Update.
5679
5680 2018-07-16  Tom Tromey  <tom@tromey.com>
5681
5682         * xcoffread.c (xcoff_initial_scan): Don't call
5683         free_pending_blocks.
5684         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5685         * buildsym.h (class scoped_free_pendings): Add constructor.
5686         (free_pending_blocks): Don't declare.
5687         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5688         (free_pending_blocks): Now static.
5689
5690 2018-07-16  Tom Tromey  <tom@tromey.com>
5691
5692         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5693         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5694         member.
5695         (struct subfile_stack): Remove.
5696         (subfile_stack): Remove.
5697         (push_subfile, pop_subfile, buildsym_init): Update.
5698
5699 2018-07-16  Tom Tromey  <tom@tromey.com>
5700
5701         * buildsym.c (push_subfile): Use gdb_assert.
5702         (pop_subfile): Use gdb_assert.
5703
5704 2018-07-16  Tom Tromey  <tom@tromey.com>
5705
5706         * buildsym.h (merge_symbol_lists): Remove.
5707         * buildsym.c (merge_symbol_lists): Remove.
5708
5709 2018-07-16  Tom Tromey  <tom@tromey.com>
5710
5711         * stabsread.c (scan_file_globals): Update comment.
5712         * stabsread.h (scan_file_globals): Move from buildsym.h.
5713         * buildsym.h (scan_file_globals): Move to stabsread.h.
5714
5715 2018-07-16  Tom Tromey  <tom@tromey.com>
5716
5717         * xcoffread.c (xcoff_new_init): Update.
5718         * mipsread.c (mipscoff_new_init): Update.
5719         * mdebugread.c (mdebug_build_psymtabs): Update.
5720         * elfread.c (elf_new_init): Update.
5721         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5722         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5723         * buildsym.h (buildsym_new_init): Don't declare.
5724         * buildsym.c (buildsym_new_init): Remove.
5725
5726 2018-07-16  Tom Tromey  <tom@tromey.com>
5727
5728         * stabsread.h (within_function): Move from buildsym.h.
5729         * stabsread.c (start_stabs): Clear within_function.
5730         * coffread.c (coff_start_symtab): Clear within_function.
5731         * buildsym.h (within_function): Move to stabsread.h.
5732         * buildsym.c (prepare_for_building): Update.
5733
5734 2018-07-16  Tom Tromey  <tom@tromey.com>
5735
5736         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5737         * dwarf2read.c (dwarf2_start_symtab): Don't set
5738         processing_gcc_compilation.
5739         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5740
5741 2018-07-16  Tom Tromey  <tom@tromey.com>
5742
5743         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5744         (next_symbol_text_func): Move from buildsym.h.
5745         * stabsread.c (hashname): Move from buildsym.c.
5746         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5747         (next_symbol_text_func, hashname): Move to stabsread.h.
5748         * buildsym.c: Don't include bcache.h
5749         (hashname): Move to stasbread.c.
5750
5751 2018-07-16  Tom Tromey  <tom@tromey.com>
5752
5753         * buildsym.h (context_stack_size): Don't declare.
5754         * buildsym.c (context_stack_size): New global.
5755
5756 2018-07-16  Tom Tromey  <tom@tromey.com>
5757
5758         * dbxread.c (processing_acc_compilation): New global.
5759         * buildsym.h (processing_acc_compilation): Don't declare.
5760
5761 2018-07-16  Tom Tromey  <tom@tromey.com>
5762
5763         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5764         * dbxread.c (read_ofile_symtab): Update.
5765         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5766         * buildsym.h (last_source_start_addr): Remove.
5767         (set_last_source_start_addr, get_last_source_start_addr):
5768         Declare.
5769         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5770         parameter.
5771         (struct buildsym_compunit) <m_last_source_start_addr>: New
5772         member.
5773         (prepare_for_building): Remove start_addr parameter.
5774         (start_symtab, restart_symtab, end_symtab_get_static_block)
5775         (end_symtab_with_blockvector): Update.
5776         (set_last_source_start_addr, get_last_source_start_addr): New
5777         functions.
5778
5779 2018-07-16  Tom Tromey  <tom@tromey.com>
5780
5781         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5782         member.
5783         (have_line_numbers): Remove.
5784         (record_line, prepare_for_building, end_symtab_get_static_block)
5785         (augment_type_symtab): Update.
5786
5787 2018-07-16  Tom Tromey  <tom@tromey.com>
5788
5789         * buildsym.c (~buildsym_compunit): Free the macro table.
5790         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5791         methods.
5792         <m_pending_macros>: New member.
5793         (pending_macros): Remove.
5794         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5795         (reset_symtab_globals, end_symtab_get_static_block)
5796         (end_symtab_with_blockvector, augment_type_symtab)
5797         (buildsym_init): Update.
5798
5799 2018-07-16  Tom Tromey  <tom@tromey.com>
5800
5801         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5802         parameter.
5803         (buildsym_compunit::set_last_source_file): New method.
5804         <m_last_source_file>: New member.
5805         (prepare_for_building): Remove "name" parameter.
5806         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5807         (last_source_file): Remove.
5808         (set_last_source_file, get_last_source_file): Update.
5809
5810 2018-07-16  Tom Tromey  <tom@tromey.com>
5811
5812         * buildsym.c (prepare_for_building): Add assert.
5813
5814 2018-07-16  Tom Tromey  <tom@tromey.com>
5815
5816         * buildsym.c (~buildsym_compunit): Update.
5817         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5818         (start_subfile, patch_subfile_names)
5819         (end_symtab_with_blockvector): Update.
5820
5821 2018-07-16  Tom Tromey  <tom@tromey.com>
5822
5823         * buildsym.c (struct buildsym_compunit): Add constructor,
5824         destructor, initializers.
5825         (start_buildsym_compunit): Remove.
5826         (free_buildsym_compunit): Use "delete".
5827         (start_symtab, restart_symtab): Use "new".
5828
5829 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5830
5831         * symfile.c (set_objfile_default_section_offset): Remove struct
5832         keyword.
5833
5834 2018-07-14  Stafford Horne  <shorne@gmail.com>
5835
5836         * (Responsible Maintainers): Add myself as or1k maintainer.
5837
5838 2018-07-13  Tom Tromey  <tom@tromey.com>
5839
5840         * symfile.c (set_objfile_default_section_offset): Use extra braces
5841         around initializer.
5842
5843 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5844
5845         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5846         non-branching basr.
5847
5848 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5849
5850         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5851         unittests/cli-utils-selftests.c
5852         * unittests/cli-utils-selftests.c: New file.
5853
5854 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5855
5856         * NEWS: Mention new commands. Mention change to 'thread apply'.
5857
5858 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5859
5860         * thread.c (thr_try_catch_cmd): New function.
5861         (thread_apply_all_command): Handle qcs flags.
5862         (thread_apply_command): Handle qcs flags.
5863         (taas_command): New function.
5864         (tfaas_command): New function.
5865         (_initialize_thread): Update to setup the new commands 'taas
5866         and 'tfaas'. Change doc string for 'thread apply'.
5867
5868 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5869
5870         * stack.c: (trailing_outermost_frame): New function, mostly
5871         extracted from backtrace_command_1.
5872         (leading_innermost_frame): New function.
5873         (backtrace_command_1): Update to call trailing_outermost_frame.
5874         (frame_apply_command_count): New function.
5875         (frame_apply_level_command): New function.
5876         (frame_apply_all_command): New function.
5877         (frame_apply_command): New function.
5878         (faas_command): New function.
5879         (frame_cmd_list): New variable.
5880         (_initialize_stack): Update to setup the new commands 'frame apply'
5881         and 'faas'.
5882
5883 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5884
5885         * cli-utils.c (number_or_range_parser::get_number): Only handle
5886         numbers or convenience var as numbers.
5887         (parse_flags): New function.
5888         (parse_flags_qcs): New function.
5889         (number_or_range_parser::finished): Ensure parsing end is detected
5890         before end of string.
5891         * cli-utils.h (parse_flags): New function.
5892         (parse_flags_qcs): New function.
5893         (number_or_range_parser): Remove m_finished bool.
5894         (number_or_range_parser::skip_range): Set m_in_range to false.
5895
5896 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5897
5898         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5899         on Windows.
5900
5901 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5902             Jan Kratochvil  <jan.kratochvil@redhat.com>
5903             Paul Fertser  <fercerpav@gmail.com>
5904             Tsutomu Seki  <sekiriki@gmail.com>
5905             Pedro Alves  <palves@redhat.com>
5906
5907         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5908         'unittests/parse-connection-spec-selftests.c'.
5909         (COMMON_SFILES): Add 'common/netstuff.c'.
5910         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5911         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5912         * common/netstuff.c: New file.
5913         * common/netstuff.h: New file.
5914         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5915         (wait_for_connect): Update comment.  New parameter
5916         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5917         Use 'sock' directly instead of 'scb->fd'.
5918         (try_connect): New function, with code from 'net_open'.
5919         (net_open): Rewrite main loop to deal with multiple
5920         sockets/addresses.  Handle IPv6-style hostnames; implement
5921         support for IPv6 connections.
5922         * unittests/parse-connection-spec-selftests.c: New file.
5923
5924 2018-07-11  Pedro Alves  <palves@redhat.com>
5925
5926         PR gdb/23377
5927         * remote.c (remote_target::remote_detach_pid): Call
5928         set_current_process.
5929
5930 2018-07-11  Pedro Alves  <palves@redhat.com>
5931
5932         * h8300-tdep.c (h8300_gdbarch_init): Remove
5933         set_gdbarch_ecoff_reg_to_regnum calls.
5934
5935 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5936
5937         PR c++/23373
5938         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5939         offsets/sizes for static members of a class/struct.
5940
5941 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5942
5943         * target-descriptions.c (tdesc_register_bitsize): Rename.
5944         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5945         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5946         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5947
5948 2018-07-10  Tom Tromey  <tom@tromey.com>
5949
5950         * breakpoint.c (moribund_locations): Now static and a
5951         std::vector.
5952         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5953         (build_bpstat_chain, update_global_location_list)
5954         (breakpoint_retire_moribund): Update.
5955         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5956         VEC.
5957
5958 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5959
5960         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5961         (riscv_register_reggroup_p): Use new function, remove unneeded
5962         parenthesis.
5963         (riscv_push_dummy_call): Extend assert to compare against xlen or
5964         flen based on register type.
5965
5966 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5967
5968         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5969
5970 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5971
5972         * remote.c (show_hardware_watchpoint_limit): New function.
5973         (show_hardware_watchpoint_length_limit): New function.
5974         (show_hardware_breakpoint_limit): New function.
5975         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5976         where appropriate, update help text.
5977
5978 2018-07-09  Tom Tromey  <tom@tromey.com>
5979
5980         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5981         (CLIBS): Don't mention NAT_CLIBS.
5982
5983 2018-07-09  Tom Tromey  <tom@tromey.com>
5984
5985         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5986         (LIBGDB_OBS, clean mostlyclean): Update.
5987         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5988
5989 2018-07-09  Tom Tromey  <tom@tromey.com>
5990
5991         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5992         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5993         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5994
5995 2018-07-09  Tom Tromey  <tom@tromey.com>
5996
5997         * Makefile.in (ALLDEPFILES): Remove exec.c.
5998         (COMMON_OBS): Remove exec.o.
5999         (COMMON_SFILES): Add exec.c.
6000
6001 2018-07-09  Tom Tromey  <tom@tromey.com>
6002
6003         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6004
6005 2018-07-09  Tom Tromey  <tom@tromey.com>
6006
6007         * Makefile.in (clean mostlyclean): Remove stamp-version.
6008         (version.c): Depend on stamp-version.
6009         (stamp-version): New rule, from version.c rule.
6010
6011 2018-07-09  Tom Tromey  <tom@tromey.com>
6012
6013         * Makefile.in (init.c): Depend on stamp-init.
6014         (stamp-init): New rule, from init.c rule.
6015         (clean mostlyclean): Remove stamp-init.
6016
6017 2018-07-09  Tom Tromey  <tom@tromey.com>
6018
6019         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6020         SUBDIR_GCC_COMPILE_SRCS.
6021
6022 2018-07-09  Tom Tromey  <tom@tromey.com>
6023
6024         * Makefile.in (init.c): Remove some unused sed rules.
6025
6026 2018-07-09  Tom Tromey  <tom@tromey.com>
6027
6028         * Makefile.in (TSOBS): Remove.
6029         (INIT_FILES): Update.
6030         (LIBGDB_OBS): Update.
6031         (COMMON_SFILES): Add inflow.c.
6032         (SFILES): Remove inflow.c.
6033
6034 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6035
6036         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6037
6038 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6039
6040         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6041         get_saveloc_name, is_signal_frame_name, step_name,
6042         init_remote_name, create_addr_space_name,
6043         destroy_addr_space_name, search_unwind_table_name,
6044         find_dyn_list_name): Constify.
6045
6046 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6047
6048         * darwin-nat.c (darwin_pthread_kill): New function.
6049         (darwin_resume_thread): Use darwin_pthread_kill.
6050
6051 2018-07-05  Tom de Vries  <tdevries@suse.de>
6052
6053         * macroexp.c (macro_buffer) <operator=>: New member function.
6054
6055 2018-07-04  Tom Tromey  <tom@tromey.com>
6056
6057         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6058
6059 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6060
6061         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6062         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6063         * maint.c: Likewise.
6064         * top.c: Likewise.
6065
6066 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6067
6068         * NEWS: Create a new section for the next release branch.
6069         Rename the section of the current branch, now that it has
6070         been cut.
6071
6072 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6073
6074         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6075         * version.in: Bump version to 8.2.50.DATE-git.
6076
6077 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6078             Pedro Alves  <palves@redhat.com>
6079
6080         * linux-nat.c (linux_init_ptrace): Rename to ...
6081         (linux_init_ptrace_procfs): ... this.  Call
6082         linux_proc_init_warnings.
6083         (linux_nat_target::post_attach)
6084         (linux_nat_target::post_startup_inferior): Adjust.
6085         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6086         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6087
6088 2018-07-04  Tom de Vries  <tdevries@suse.de>
6089
6090         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6091         check ...
6092         (read_comp_unit_head): ... here.
6093
6094 2018-07-03  Tom Tromey  <tom@tromey.com>
6095
6096         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6097         (stop_tracing, tstatus_command)
6098         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6099         (print_one_static_tracepoint_marker): Update.
6100         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6101         std::vector.
6102         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6103         VEC.
6104         (all_tracepoints, static_tracepoints_here): Return std::vector.
6105
6106 2018-07-03  Tom Tromey  <tom@tromey.com>
6107
6108         * common/ptid.c (ptid_equal): Remove.
6109         * common/ptid.h (ptid_equal): Don't declare.
6110         * ada-tasks.c: Update.
6111         * breakpoint.c: Update.
6112         * common/agent.c: Update.
6113         * corelow.c: Update.
6114         * darwin-nat-info.c: Update.
6115         * darwin-nat.c: Update.
6116         * dcache.c: Update.
6117         * dtrace-probe.c: Update.
6118         * dummy-frame.c: Update.
6119         * fbsd-nat.c: Update.
6120         * frame.c: Update.
6121         * gdbthread.h: Update.
6122         * gnu-nat.c: Update.
6123         * go32-nat.c: Update.
6124         * inf-loop.c: Update.
6125         * inf-ptrace.c: Update.
6126         * infcall.c: Update.
6127         * infcmd.c: Update.
6128         * inflow.c: Update.
6129         * infrun.c: Update.
6130         * linux-fork.c: Update.
6131         * linux-nat.c: Update.
6132         * linux-thread-db.c: Update.
6133         * mi/mi-cmd-var.c: Update.
6134         * mi/mi-interp.c: Update.
6135         * mi/mi-main.c: Update.
6136         * nto-procfs.c: Update.
6137         * ppc-linux-tdep.c: Update.
6138         * procfs.c: Update.
6139         * python/py-inferior.c: Update.
6140         * python/py-record-btrace.c: Update.
6141         * python/py-record.c: Update.
6142         * ravenscar-thread.c: Update.
6143         * regcache.c: Update.
6144         * remote-sim.c: Update.
6145         * remote.c: Update.
6146         * sol-thread.c: Update.
6147         * solib.c: Update.
6148         * target.c: Update.
6149         * tui/tui-stack.c: Update.
6150         * varobj.c: Update.
6151         * windows-nat.c: Update.
6152         * windows-tdep.c: Update.
6153
6154 2018-07-03  Tom Tromey  <tom@tromey.com>
6155
6156         * common/ptid.c (ptid_match): Remove.
6157         * common/ptid.h (ptid_match): Don't declare.
6158         * fbsd-nat.c: Update.
6159         * infcmd.c: Update.
6160         * infrun.c: Update.
6161         * linux-nat.c: Update.
6162         * record-btrace.c: Update.
6163         * regcache.c: Update.
6164         * remote.c: Update.
6165
6166 2018-07-03  Tom Tromey  <tom@tromey.com>
6167
6168         * common/ptid.c (ptid_tid_p): Remove.
6169         * common/ptid.h (ptid_tid_p): Don't declare.
6170         * sol-thread.c: Update.
6171
6172 2018-07-03  Tom Tromey  <tom@tromey.com>
6173
6174         * common/ptid.c (ptid_lwp_p): Remove.
6175         * common/ptid.h (ptid_lwp_p): Don't declare.
6176         * fbsd-nat.c: Update.
6177         * linux-nat.c: Update.
6178         * nat/linux-procfs.c: Update.
6179         * nat/x86-linux-dregs.c: Update.
6180         * sol-thread.c: Update.
6181
6182 2018-07-03  Tom Tromey  <tom@tromey.com>
6183
6184         * common/ptid.c (ptid_is_pid): Remove.
6185         * common/ptid.h (ptid_is_pid): Don't declare.
6186         * infrun.c: Update.
6187         * linux-nat.c: Update.
6188         * mi/mi-interp.c: Update.
6189         * remote.c: Update.
6190         * thread.c: Update.
6191
6192 2018-07-03  Tom Tromey  <tom@tromey.com>
6193
6194         * common/ptid.c (ptid_get_tid): Remove.
6195         * common/ptid.h (ptid_get_tid): Don't declare.
6196         * ada-tasks.c: Update.
6197         * aix-thread.c: Update.
6198         * bsd-uthread.c: Update.
6199         * darwin-nat.c: Update.
6200         * fbsd-nat.c: Update.
6201         * i386-darwin-nat.c: Update.
6202         * infrun.c: Update.
6203         * linux-tdep.c: Update.
6204         * nto-procfs.c: Update.
6205         * ppc-ravenscar-thread.c: Update.
6206         * python/py-infthread.c: Update.
6207         * ravenscar-thread.c: Update.
6208         * sol-thread.c: Update.
6209         * sparc-ravenscar-thread.c: Update.
6210         * windows-nat.c: Update.
6211
6212 2018-07-03  Tom Tromey  <tom@tromey.com>
6213
6214         * common/ptid.c (ptid_get_lwp): Remove.
6215         * common/ptid.h (ptid_get_lwp): Don't declare.
6216         * aarch64-linux-nat.c: Update.
6217         * ada-tasks.c: Update.
6218         * aix-thread.c: Update.
6219         * amd64-linux-nat.c: Update.
6220         * arm-linux-nat.c: Update.
6221         * corelow.c: Update.
6222         * fbsd-nat.c: Update.
6223         * fbsd-tdep.c: Update.
6224         * gnu-nat.c: Update.
6225         * i386-cygwin-tdep.c: Update.
6226         * i386-gnu-nat.c: Update.
6227         * i386-linux-nat.c: Update.
6228         * ia64-linux-nat.c: Update.
6229         * inf-ptrace.c: Update.
6230         * infrun.c: Update.
6231         * linux-fork.c: Update.
6232         * linux-nat.c: Update.
6233         * linux-tdep.c: Update.
6234         * linux-thread-db.c: Update.
6235         * mips-linux-nat.c: Update.
6236         * nat/aarch64-linux-hw-point.c: Update.
6237         * nat/aarch64-linux.c: Update.
6238         * nat/linux-btrace.c: Update.
6239         * nat/linux-osdata.c: Update.
6240         * nat/linux-procfs.c: Update.
6241         * nat/x86-linux-dregs.c: Update.
6242         * obsd-nat.c: Update.
6243         * ppc-fbsd-nat.c: Update.
6244         * ppc-linux-nat.c: Update.
6245         * procfs.c: Update.
6246         * python/py-infthread.c: Update.
6247         * ravenscar-thread.c: Update.
6248         * remote.c: Update.
6249         * s390-linux-nat.c: Update.
6250         * sol-thread.c: Update.
6251         * sol2-tdep.c: Update.
6252         * spu-linux-nat.c: Update.
6253         * x86-linux-nat.c: Update.
6254         * xtensa-linux-nat.c: Update.
6255
6256 2018-07-03  Tom Tromey  <tom@tromey.com>
6257
6258         * common/ptid.c (ptid_get_pid): Remove.
6259         * common/ptid.h (ptid_get_pid): Don't declare.
6260         * aarch64-linux-nat.c: Update.
6261         * ada-lang.c: Update.
6262         * aix-thread.c: Update.
6263         * alpha-bsd-nat.c: Update.
6264         * amd64-fbsd-nat.c: Update.
6265         * amd64-linux-nat.c: Update.
6266         * arm-linux-nat.c: Update.
6267         * arm-nbsd-nat.c: Update.
6268         * auxv.c: Update.
6269         * break-catch-syscall.c: Update.
6270         * breakpoint.c: Update.
6271         * bsd-uthread.c: Update.
6272         * corelow.c: Update.
6273         * ctf.c: Update.
6274         * darwin-nat.c: Update.
6275         * fbsd-nat.c: Update.
6276         * fbsd-tdep.c: Update.
6277         * gcore.c: Update.
6278         * gnu-nat.c: Update.
6279         * hppa-nbsd-nat.c: Update.
6280         * hppa-obsd-nat.c: Update.
6281         * i386-fbsd-nat.c: Update.
6282         * ia64-linux-nat.c: Update.
6283         * inf-ptrace.c: Update.
6284         * infcmd.c: Update.
6285         * inferior.c: Update.
6286         * inferior.h: Update.
6287         * inflow.c: Update.
6288         * infrun.c: Update.
6289         * linux-fork.c: Update.
6290         * linux-nat.c: Update.
6291         * linux-tdep.c: Update.
6292         * linux-thread-db.c: Update.
6293         * m68k-bsd-nat.c: Update.
6294         * mi/mi-interp.c: Update.
6295         * mi/mi-main.c: Update.
6296         * mips-linux-nat.c: Update.
6297         * mips-nbsd-nat.c: Update.
6298         * mips64-obsd-nat.c: Update.
6299         * nat/aarch64-linux-hw-point.c: Update.
6300         * nat/aarch64-linux.c: Update.
6301         * nat/linux-btrace.c: Update.
6302         * nat/linux-osdata.c: Update.
6303         * nat/linux-procfs.c: Update.
6304         * nat/x86-linux-dregs.c: Update.
6305         * nto-procfs.c: Update.
6306         * obsd-nat.c: Update.
6307         * ppc-linux-nat.c: Update.
6308         * ppc-nbsd-nat.c: Update.
6309         * ppc-obsd-nat.c: Update.
6310         * proc-service.c: Update.
6311         * procfs.c: Update.
6312         * python/py-inferior.c: Update.
6313         * python/py-infthread.c: Update.
6314         * ravenscar-thread.c: Update.
6315         * record.c: Update.
6316         * remote-sim.c: Update.
6317         * remote.c: Update.
6318         * rs6000-nat.c: Update.
6319         * s390-linux-nat.c: Update.
6320         * sh-nbsd-nat.c: Update.
6321         * sol-thread.c: Update.
6322         * sparc-nat.c: Update.
6323         * sparc64-tdep.c: Update.
6324         * spu-linux-nat.c: Update.
6325         * spu-tdep.c: Update.
6326         * target-debug.h: Update.
6327         * target.c: Update.
6328         * thread.c: Update.
6329         * tid-parse.c: Update.
6330         * tracefile-tfile.c: Update.
6331         * vax-bsd-nat.c: Update.
6332         * windows-nat.c: Update.
6333         * x86-linux-nat.c: Update.
6334         * x86-nat.c: Update.
6335
6336 2018-07-03  Tom Tromey  <tom@tromey.com>
6337
6338         * common/ptid.c (pid_to_ptid): Remove.
6339         * common/ptid.h (pid_to_ptid): Don't declare.
6340         * aix-thread.c: Update.
6341         * arm-linux-nat.c: Update.
6342         * common/ptid.c: Update.
6343         * common/ptid.h: Update.
6344         * corelow.c: Update.
6345         * ctf.c: Update.
6346         * darwin-nat.c: Update.
6347         * fbsd-nat.c: Update.
6348         * fork-child.c: Update.
6349         * gnu-nat.c: Update.
6350         * go32-nat.c: Update.
6351         * inf-ptrace.c: Update.
6352         * infcmd.c: Update.
6353         * inferior.c: Update.
6354         * infrun.c: Update.
6355         * linux-fork.c: Update.
6356         * linux-nat.c: Update.
6357         * nat/aarch64-linux-hw-point.c: Update.
6358         * nat/fork-inferior.c: Update.
6359         * nat/x86-linux-dregs.c: Update.
6360         * nto-procfs.c: Update.
6361         * obsd-nat.c: Update.
6362         * procfs.c: Update.
6363         * progspace.c: Update.
6364         * remote.c: Update.
6365         * rs6000-nat.c: Update.
6366         * s390-linux-nat.c: Update.
6367         * sol-thread.c: Update.
6368         * spu-linux-nat.c: Update.
6369         * target.c: Update.
6370         * top.c: Update.
6371         * tracefile-tfile.c: Update.
6372         * windows-nat.c: Update.
6373
6374 2018-07-03  Tom Tromey  <tom@tromey.com>
6375
6376         * common/ptid.h (ptid_build): Don't declare.
6377         * common/ptid.c (ptid_build): Remove.
6378         * aix-thread.c: Update.
6379         * bsd-kvm.c: Update.
6380         * bsd-uthread.c: Update.
6381         * common/agent.c: Update.
6382         * common/ptid.c: Update.
6383         * common/ptid.h: Update.
6384         * corelow.c: Update.
6385         * darwin-nat.c: Update.
6386         * fbsd-nat.c: Update.
6387         * gnu-nat.c: Update.
6388         * linux-fork.c: Update.
6389         * linux-nat.c: Update.
6390         * linux-thread-db.c: Update.
6391         * nat/linux-osdata.c: Update.
6392         * nat/linux-procfs.c: Update.
6393         * nto-procfs.c: Update.
6394         * obsd-nat.c: Update.
6395         * proc-service.c: Update.
6396         * procfs.c: Update.
6397         * ravenscar-thread.c: Update.
6398         * remote-sim.c: Update.
6399         * remote.c: Update.
6400         * sol-thread.c: Update.
6401         * target.c: Update.
6402         * windows-nat.c: Update.
6403
6404 2018-07-03  Tom Tromey  <tom@tromey.com>
6405
6406         * infrun.c (follow_exec): Use exit_inferior_silent.
6407         * inferior.c (exit_inferior_num_silent): Remove.
6408         * inferior.h (exit_inferior_num_silent): Don't declare.
6409
6410 2018-07-03  Tom Tromey  <tom@tromey.com>
6411
6412         PR cli/23340:
6413         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6414         inferior_ptid on error.
6415
6416 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6417             Simon Marchi  <simon.marchi@polymtl.ca>
6418
6419         PR tdep/8282
6420         * disasm.h (gdb_disassembler): Add
6421         `m_disassembler_options_holder'. member
6422         * disasm.c (get_all_disassembler_options): New function.
6423         (gdb_disassembler::gdb_disassembler): Use it.
6424         (gdb_buffered_insn_length_init_dis): Likewise.
6425         (gdb_buffered_insn_length): Adjust accordingly.
6426         (set_disassembler_options): Handle options with arguments.
6427         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6428         line if showing options with descriptions.
6429         (disassembler_options_completer): Adapt to using the
6430         `disasm_options_and_args_t' structure.
6431         * mips-tdep.c (mips_disassembler_options): New variable.
6432         (mips_disassembler_options_o32): Likewise.
6433         (mips_disassembler_options_n32): Likewise.
6434         (mips_disassembler_options_n64): Likewise.
6435         (gdb_print_insn_mips): Don't set `disassembler_options'.
6436         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6437         functions.
6438         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6439         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6440         `gdbarch_disassembler_options_implicit' and
6441         `gdbarch_valid_disassembler_options'.
6442         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6443         `disasm_options_and_args_t' structure.
6444         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6445         method.
6446         (valid_disassembler_options): Switch from `disasm_options_t' to
6447         the `disasm_options_and_args_t' structure.
6448         * NEWS: Document `set disassembler-options' support for the MIPS
6449         target.
6450         * gdbarch.h: Regenerate.
6451         * gdbarch.c: Regenerate.
6452
6453 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6454
6455         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6456
6457 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6458
6459         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6460         parameter in call to amd64_target_description.
6461         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6462         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6463         (amd64fbsd_init_abi): Likewise.
6464         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6465         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6466         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6467         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6468
6469 2018-06-29  Pedro Alves  <palves@redhat.com>
6470
6471         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6472         "segments" parameter.
6473         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6474         (_initialize_amd64_tdep): Update call to
6475         amd64_create_target_description.
6476         (amd64_target_description): Add "segments" parameter.  Adjust
6477         the implementation to use it.
6478         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6479         call to amd64_create_target_description.
6480         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6481         * gdb/arch/amd64.h (amd64_create_target_description): Add
6482         "segments" register.
6483         * gdb/arch/amd64.c (amd64_create_target_description): Add
6484         "segments" parameter.  Call create_feature_i386_64bit_segments
6485         only if SEGMENTS is true.
6486         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6487         call to amd64_create_target_description.
6488
6489 2018-06-29  Pedro Alves  <palves@redhat.com>
6490
6491         * thread.c (thread_target_id_str): New, factored out from ...
6492         (print_thread_info_1): ... here.  Use it to compute the max
6493         "Target Id" column width.
6494
6495 2018-06-29  Pedro Alves  <palves@redhat.com>
6496
6497         * remote.c (remote_target::extra_thread_info): Delete
6498         'display_buf' and 'n' locals.  from the cache, regardless of
6499         packet mechanims is in use.  Use cache for qThreadExtra and qP
6500         methods too.
6501
6502 2018-06-29  Pedro Alves  <palves@redhat.com>
6503
6504         * blockframe.c (find_pc_sect_containing_function): New function.
6505         * breakpoint.c (print_breakpoint_location): Don't call
6506         find_pc_sect_function.
6507         * linespec.c (create_sals_line_offset): Record the location's
6508         symbol in the sal.
6509         * linespec.c (convert_address_location_to_sals): Fill in sal's
6510         symbol with find_pc_sect_containing_function.
6511         * symtab.c (find_function_start_sal): Rename to ...
6512         (find_function_start_sal_1): ... this.
6513         (find_function_start_sal): Reimplement as wrapper around
6514         find_function_start_sal_1, and use
6515         find_pc_sect_containing_function to fill in the sal's symbol.
6516         (find_function_start_sal(symbol*, bool)): Adjust.
6517         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6518         comments.
6519         (find_pc_sect_containing_function): Declare.
6520
6521 2018-06-29  Pedro Alves  <palves@redhat.com>
6522
6523         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6524         true if the the location has no symbol.
6525
6526 2018-06-28  Tom Tromey  <tom@tromey.com>
6527
6528         * NEWS: Mention --enable-codesign.
6529         * silent-rules.mk (ECHO_SIGN): New variable.
6530         * configure.ac: Add --enable-codesign.
6531         * configure: Rebuild.
6532         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6533         (gdb$(EXEEXT)): Optionally invoke codesign.
6534
6535 2018-06-28  Pedro Alves  <palves@redhat.com>
6536
6537         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6538         comments.
6539         (switch_to_thread_no_regs): Adjust comment.
6540         * infcmd.c (stop_pc): Delete.
6541         (post_create_inferior, info_program_command): Replace references
6542         to stop_pc with references to thread_info->suspend.stop_pc.
6543         * inferior.h (stop_pc): Delete declaration.
6544         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6545         (handle_inferior_event_1, handle_signal_stop)
6546         (process_event_stop_test, keep_going_stepped_thread)
6547         (handle_step_into_function, handle_step_into_function_backward)
6548         (print_stop_location): Replace references to stop_pc with
6549         references to thread_info->suspend.stop_pc.
6550         (struct infcall_suspend_state) <stop_pc>: Delete field.
6551         (save_infcall_suspend_state, restore_infcall_suspend_state):
6552         Remove references to inf_stat->stop_pc.
6553         * linux-fork.c (fork_load_infrun_state): Likewise.
6554         * record-btrace.c (record_btrace_set_replay): Likewise.
6555         * record-full.c (record_full_goto_entry): Likewise.
6556         * remote.c (print_one_stopped_thread): Likewise.
6557         * target.c (target_resume): Extend comment.
6558         * thread.c (set_executing_thread): New.
6559         (set_executing): Use it.
6560         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6561         Remove references to stop_pc.
6562
6563 2018-06-28  Pedro Alves  <palves@redhat.com>
6564
6565         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6566         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6567
6568 2018-06-28  Tom Tromey  <tom@tromey.com>
6569
6570         * coffread.c (coff_symfile_finish): Update.
6571         * xcoffread.c (xcoff_symfile_finish): Update.
6572         * elfread.c (elf_symfile_finish): Update.
6573         * symfile.h (dwarf2_free_objfile): Don't declare.
6574         * dwarf2read.c (_initialize_dwarf2_read): Use
6575         register_objfile_data_with_cleanup.
6576         (dwarf2_free_objfile): Now static.  Change signature.
6577
6578 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6579
6580         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6581         option "-o" to add-symbol-file-load to add an offset to each
6582         section's load address.
6583         * symfile.c (set_objfile_default_section_offset): New function.
6584
6585 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6586
6587         * symfile.c (add_symbol_file_command): Make sure that sections
6588         with the same name are sorted in the same order.
6589
6590 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6591
6592         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6593         require the second argument.  If omitted, load sections at the
6594         addresses specified in the file.
6595
6596 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6597
6598         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6599         (_initialize_symfile): Add option "-o" to symbol-file to add an
6600         offset to each section of the symbol file.
6601
6602 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6603
6604         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6605
6606 2018-06-27  Tom Tromey  <tom@tromey.com>
6607
6608         * stack.c (_initialize_stack): Update "func" help text.
6609
6610 2018-06-27  Tom Tromey  <tom@tromey.com>
6611
6612         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6613         std::vector.
6614         (unwind_infopy_str, pyuw_create_unwind_info)
6615         (unwind_infopy_add_saved_register, pyuw_sniffer)
6616         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6617         Update.
6618         (struct saved_reg): Add constructor.
6619         <value>: Now a gdbpy_ref<>.
6620
6621 2018-06-27  Tom Tromey  <tom@tromey.com>
6622
6623         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6624
6625 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6626
6627         * gdb-gdb.py.in: Format using autopep8.
6628
6629 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6630
6631         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6632         (type_lookup_function): Recognize CORE_ADDR values.
6633
6634 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6635
6636         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6637         print tag_name.
6638
6639 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6640
6641         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6642         <__lt__>: Add.
6643
6644 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6645
6646         * gdb-gdb.py: Move to...
6647         * gdb-gdb.py.in: ... here.
6648         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6649         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6650         dependencies.
6651         (distclean): Remove gdb-gdb.py when cleaning.
6652         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6653         * configure: Re-generate.
6654
6655 2018-06-27  Pedro Alves  <palves@redhat.com>
6656
6657         * proc-service.c (get_ps_regcache): New.
6658         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6659         (ps_lsetfpregs): Use it.
6660
6661 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6662
6663         PR gdb/21695
6664         * dwarf2read.c (lnp_state_machine::check_line_address): Update
6665         declaration.
6666         (dwarf_decode_lines_1): Adjust.
6667
6668 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6669
6670         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6671         override.
6672         <info_proc>: Likewise.
6673
6674 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6675
6676         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6677         to windows_fetch_one_register, and only handle the case of
6678         fetching one register.  Move the code that reloads the context
6679         and iterates over all registers if R is negative to...
6680         (windows_nat_target::fetch_registers): ... here.
6681         (do_windows_store_inferior_registers): Rename to
6682         windows_store_one_register, and only handle the case of storing
6683         one register.  Move the code that handles the case where r is
6684         negative to...
6685         (windows_nat_target::store_registers) ... here.
6686
6687 2018-06-26  Tom Tromey  <tom@tromey.com>
6688
6689         PR rust/22574:
6690         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6691         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6692         Update.
6693         (rust_internal_print_type): Add podata parameter.
6694         (rust_print_type): Update.
6695
6696 2018-06-26  Tom Tromey  <tom@tromey.com>
6697
6698         * typeprint.h (struct print_offset_data) <update, finish,
6699         maybe_print_hole>: New methods.
6700         <indentation>: New constant.
6701         * typeprint.c (print_offset_data::indentation): Define.
6702         (print_offset_data::maybe_print_hole, print_offset_data::update)
6703         (print_offset_data::finish): Move from c-typeprint.c and rename.
6704         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6705         (print_spaces_filtered_with_print_options): Update.
6706         (c_print_type_union_field_offset, maybe_print_hole)
6707         (c_print_type_struct_field_offset): Move to typeprint.c and
6708         rename.
6709         (c_type_print_base_struct_union): Update.
6710
6711 2018-06-25  Pedro Alves  <palves@redhat.com>
6712
6713         * gdbthread.h (thread_info_ref, delete_thread)
6714         (delete_thread_silent, first_thread_of_inferior)
6715         (any_thread_of_inferior, switch_to_thread)
6716         (enable_thread_stack_temporaries)
6717         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6718         (get_last_thread_stack_temporary)
6719         (value_in_thread_stack_temporaries, can_access_registers_thread):
6720         Spell out "struct thread_info" instead of just "thread_info".
6721         * inferior.h (notice_new_inferior): Likewise.
6722
6723 2018-06-25  Pedro Alves  <palves@redhat.com>
6724
6725         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6726         pass thread_info pointer to delete_thread.
6727         (windows_nat_target::detach): Pass inferior pointer to
6728         detach_inferior.
6729         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6730         delete_thread.
6731         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6732         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6733         and pass a thread_info pointer to delete_thread.
6734         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6735         pass thread_info pointer to delete_thread.
6736         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6737         delete_thread_silent call.
6738         * procfs.c (procfs_target::detach): Pass inferior pointer to
6739         detach_inferior.
6740         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6741         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6742         delete_thread_silent call.
6743         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6744         pass thread_info pointer to delete_thread.
6745         (windows_nat_target::detach): Pass inferior pointer to
6746         delete_inferior.
6747
6748 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6749
6750         * regcache.c (readable_regcache::read_part): Fix asserts.
6751         (reg_buffer::raw_collect_part): New function.
6752         (regcache::write_part): Fix asserts.
6753         (reg_buffer::raw_supply_part): New function.
6754         (regcache::transfer_regset_register): New helper function.
6755         (regcache::transfer_regset): Call new functions.
6756         (regcache_supply_regset): Use gdb_byte*.
6757         (regcache::supply_regset): Likewise.
6758         (regcache_collect_regset): Likewise.
6759         (regcache::collect_regset): Likewise.
6760         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6761         (reg_buffer::raw_supply_part): Likewise.
6762         (regcache::transfer_regset_register): Likewise.
6763         (regcache::transfer_regset): Use gdb_byte*.
6764
6765 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6766
6767         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6768
6769 2018-06-21  Pedro Alves  <palves@redhat.com>
6770
6771         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6772         instead of a ptid_t.  All callers adjusted.
6773         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6774         adjusted.
6775         (print_ada_task_info, display_current_task_id, task_command_1):
6776         Adjust.
6777         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6778         inferior_thread.
6779         (breakpoint_kind): Adjust.
6780         (remove_breakpoints_pid): Rename to ...
6781         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6782         pointer.  All callers adjusted.
6783         (bpstat_clear_actions): Use inferior_thread.
6784         (get_bpstat_thread): New.
6785         (bpstat_do_actions): Use it.
6786         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6787         to take a thread_info pointer.  All callers adjusted.
6788         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6789         (breakpoint_re_set_thread): Use inferior_thread.
6790         * breakpoint.h (struct inferior): Forward declare.
6791         (bpstat_stop_status): Update.
6792         (remove_breakpoints_pid): Delete.
6793         (remove_breakpoints_inf): New.
6794         * bsd-uthread.c (bsd_uthread_target::wait)
6795         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6796         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6797         (maint_btrace_packet_history_cmd)
6798         (maint_btrace_clear_packet_history_cmd): Adjust.
6799         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6800         inferior_thread.
6801         * cli/cli-interp.c: Include "inferior.h".
6802         * common/refcounted-object.h (struct
6803         refcounted_object_ref_policy): New.
6804         * compile/compile-object-load.c: Include gdbthread.h.
6805         (store_regs): Use inferior_thread.
6806         * corelow.c (core_target::close): Use current_inferior.
6807         (core_target_open): Adjust to use first_thread_of_inferior and use
6808         the current inferior.
6809         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6810         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6811         <thread>: ... this new field.  All references adjusted.
6812         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6813         Take a thread_info pointer instead of a ptid_t.
6814         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6815         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6816         thread_info pointer instead of a ptid_t.
6817         * elfread.c: Include "inferior.h".
6818         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6819         Use inferior_thread.
6820         * eval.c (evaluate_subexp): Likewise.
6821         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6822         inferior_thread.
6823         * gdb_proc_service.h (struct thread_info): Forward declare.
6824         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6825         <thread>: ... this new field.  All references adjusted.
6826         * gdbarch.h, gdbarch.c: Regenerate.
6827         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6828         'thread' parameter.  All implementations and callers adjusted.
6829         * gdbthread.h (thread_info) <set_running>: New method.
6830         (delete_thread, delete_thread_silent): Take a thread_info pointer
6831         instead of a ptid.
6832         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6833         (first_thread_of_process): Delete, replaced by ...
6834         (first_thread_of_inferior): ... this new function.  All callers
6835         adjusted.
6836         (any_live_thread_of_process): Delete, replaced by ...
6837         (any_live_thread_of_inferior): ... this new function.  All callers
6838         adjusted.
6839         (switch_to_thread, switch_to_no_thread): Declare.
6840         (is_executing): Delete.
6841         (enable_thread_stack_temporaries): Update comment.
6842         <enable_thread_stack_temporaries>: Take a thread_info pointer
6843         instead of a ptid_t.  Incref the thread.
6844         <~enable_thread_stack_temporaries>: Decref the thread.
6845         <m_ptid>: Delete
6846         <m_thr>: New.
6847         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6848         (get_last_thread_stack_temporary)
6849         (value_in_thread_stack_temporaries, can_access_registers_thread):
6850         Take a thread_info pointer instead of a ptid_t.  All callers
6851         adjusted.
6852         * infcall.c (get_call_return_value): Use inferior_thread.
6853         (run_inferior_call): Work with thread pointers instead of ptid_t.
6854         (call_function_by_hand_dummy): Work with thread pointers instead
6855         of ptid_t.  Use thread_info_ref.
6856         * infcmd.c (proceed_thread_callback): Access thread's state
6857         directly.
6858         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6859         access thread's state directly.
6860         (continue_command): Use inferior_thread.
6861         (info_program_command): Use find_thread_ptid and access thread
6862         state directly.
6863         (proceed_after_attach_callback): Use thread state directly.
6864         (notice_new_inferior): Take a thread_info pointer instead of a
6865         ptid_t.  All callers adjusted.
6866         (exit_inferior): Take an inferior pointer instead of a pid.  All
6867         callers adjusted.
6868         (exit_inferior_silent): New.
6869         (detach_inferior): Delete.
6870         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6871         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6872         (detach_inferior_command, kill_inferior_command): Use
6873         find_inferior_id instead of valid_gdb_inferior_id and
6874         gdb_inferior_id_to_pid.
6875         (inferior_command): Use inferior and thread pointers.
6876         * inferior.h (struct thread_info): Forward declare.
6877         (notice_new_inferior): Take a thread_info pointer instead of a
6878         ptid_t.  All callers adjusted.
6879         (detach_inferior): Delete declaration.
6880         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6881         instead of a pid.  All callers adjusted.
6882         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6883         (valid_gdb_inferior_id): Delete.
6884         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6885         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6886         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6887         ...
6888         <inf>: ... this new field.
6889         <step_ptid>: Delete, replaced by ...
6890         <step_thread>: ... this new field.
6891         (get_displaced_stepping_state): Take an inferior pointer instead
6892         of a pid.  All callers adjusted.
6893         (displaced_step_in_progress_any_inferior): Adjust.
6894         (displaced_step_in_progress_thread): Take a thread pointer instead
6895         of a ptid_t.  All callers adjusted.
6896         (displaced_step_in_progress, add_displaced_stepping_state): Take
6897         an inferior pointer instead of a pid.  All callers adjusted.
6898         (get_displaced_step_closure_by_addr): Adjust.
6899         (remove_displaced_stepping_state): Take an inferior pointer
6900         instead of a pid.  All callers adjusted.
6901         (displaced_step_prepare_throw, displaced_step_prepare)
6902         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6903         All callers adjusted.
6904         (start_step_over): Adjust.
6905         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6906         displaced step queue.
6907         (do_target_resume): Adjust.
6908         (fetch_inferior_event): Use inferior_thread.
6909         (context_switch, get_inferior_stop_soon): Take an
6910         execution_control_state pointer instead of a ptid_t.  All callers
6911         adjusted.
6912         (switch_to_thread_cleanup): Delete.
6913         (stop_all_threads): Use scoped_restore_current_thread.
6914         * inline-frame.c: Include "gdbthread.h".
6915         (inline_state) <inline_state>: Take a thread pointer instead of a
6916         ptid_t.  All callers adjusted.
6917         <ptid>: Delete, replaced by ...
6918         <thread>: ... this new field.
6919         (find_inline_frame_state): Take a thread pointer instead of a
6920         ptid_t.  All callers adjusted.
6921         (skip_inline_frames, step_into_inline_frame)
6922         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6923         pointer instead of a ptid_t.  All callers adjusted.
6924         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6925         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6926         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6927         pointers directly.
6928         * linux-nat.c (get_detach_signal): Likewise.
6929         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6930         (thread_db_notice_clone): Adjust.
6931         (thread_db_find_new_threads_silently)
6932         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6933         a thread pointer instead of a ptid_t.  All callers adjusted.
6934         * mi/mi-cmd-var.c: Include "inferior.h".
6935         (mi_cmd_var_update_iter): Update to use thread pointers.
6936         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6937         inferior directly.
6938         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6939         out to ...
6940         (mi_output_running): ... this new function.
6941         (mi_on_resume_1): Adjust to use it.
6942         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6943         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6944         directly.
6945         (interrupt_thread_callback): : Adjust to use thread and inferior
6946         pointers.
6947         * proc-service.c: Include "gdbthread.h".
6948         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6949         * progspace-and-thread.c: Include "inferior.h".
6950         * progspace.c: Include "inferior.h".
6951         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6952         hold a reference to an inferior_object.
6953         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6954         inferior_thread.
6955         * python/py-inferior.c (struct inferior_object): Give the type a
6956         tag name instead of a typedef.
6957         (python_on_normal_stop): No need to check if the current thread is
6958         listed.
6959         (inferior_to_inferior_object): Change return type to
6960         inferior_object.  All callers adjusted.
6961         (find_thread_object): Delete, bits factored out to ...
6962         (thread_to_thread_object): ... this new function.
6963         * python/py-infthread.c (create_thread_object): Use
6964         inferior_to_inferior_object.
6965         (thpy_is_stopped): Use thread pointer directly.
6966         (gdbpy_selected_thread): Use inferior_thread.
6967         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6968         field, replaced with ...
6969         <thread>: ... this new field.  All users adjusted.
6970         (btpy_insn_or_gap_new): Drop const.
6971         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6972         callers adjusted.
6973         * python/py-record.c: Include "gdbthread.h".
6974         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6975         a ptid_t.  All callers adjusted.
6976         (gdbpy_current_recording): Use inferior_thread.
6977         * python/py-record.h (recpy_record_object) <ptid>: Delete
6978         field, replaced with ...
6979         <thread>: ... this new field.  All users adjusted.
6980         (recpy_element_object) <ptid>: Delete
6981         field, replaced with ...
6982         <thread>: ... this new field.  All users adjusted.
6983         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6984         a ptid_t.  All callers adjusted.
6985         * python/py-threadevent.c: Include "gdbthread.h".
6986         (get_event_thread): Use thread_to_thread_object.
6987         * python/python-internal.h (struct inferior_object): Forward
6988         declare.
6989         (find_thread_object, find_inferior_object): Delete declarations.
6990         (thread_to_thread_object, inferior_to_inferior_object): New
6991         declarations.
6992         * record-btrace.c: Include "inferior.h".
6993         (require_btrace_thread): Use inferior_thread.
6994         (record_btrace_frame_sniffer)
6995         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6996         (get_thread_current_frame): Use scoped_restore_current_thread and
6997         switch_to_thread.
6998         (get_thread_current_frame): Use thread pointer directly.
6999         (record_btrace_replay_at_breakpoint): Use thread's inferior
7000         pointer directly.
7001         * record-full.c: Include "inferior.h".
7002         * regcache.c: Include "gdbthread.h".
7003         (get_thread_arch_regcache): Use the inferior's address space
7004         directly.
7005         (get_thread_regcache, registers_changed_thread): New.
7006         * regcache.h (get_thread_regcache(thread_info *thread)): New
7007         overload.
7008         (registers_changed_thread): New.
7009         (remote_target) <remote_detach_1>: Swap order of parameters.
7010         (remote_add_thread): <remote_add_thread>: Return the new thread.
7011         (get_remote_thread_info(ptid_t)): New overload.
7012         (remote_target::remote_notice_new_inferior): Use thread pointers
7013         directly.
7014         (remote_target::process_initial_stop_replies): Use
7015         thread_info::set_running.
7016         (remote_target::remote_detach_1, remote_target::detach)
7017         (extended_remote_target::detach): Adjust.
7018         * stack.c (frame_show_address): Use inferior_thread.
7019         * target-debug.h (target_debug_print_thread_info_pp): New.
7020         * target-delegates.c: Regenerate.
7021         * target.c (default_thread_address_space): Delete.
7022         (memory_xfer_partial_1): Use current_inferior.
7023         (target_detach): Use current_inferior.
7024         (target_thread_address_space): Delete.
7025         (generic_mourn_inferior): Use current_inferior.
7026         * target.h (struct target_ops) <thread_address_space>: Delete.
7027         (target_thread_address_space): Delete.
7028         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7029         pointers directly.
7030         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7031         thread pointer instead of a ptid_t.  Adjust all callers.
7032         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7033         (first_thread_of_process): Delete, replaced by ...
7034         (first_thread_of_inferior): ... this new function.  All callers
7035         adjusted.
7036         (any_thread_of_process): Rename to ...
7037         (any_thread_of_inferior): ... this, and take an inferior pointer.
7038         (any_live_thread_of_process): Rename to ...
7039         (any_live_thread_of_inferior): ... this, and take an inferior
7040         pointer.
7041         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7042         (value_in_thread_stack_temporaries)
7043         (get_last_thread_stack_temporary): Take a thread pointer instead
7044         of a ptid_t.  Adjust all callers.
7045         (thread_info::set_running): New.
7046         (validate_registers_access): Use inferior_thread.
7047         (can_access_registers_ptid): Rename to ...
7048         (can_access_registers_thread): ... this, and take a thread
7049         pointer.
7050         (print_thread_info_1): Adjust to compare thread pointers instead
7051         of ptids.
7052         (switch_to_no_thread, switch_to_thread): Make extern.
7053         (scoped_restore_current_thread::~scoped_restore_current_thread):
7054         Use m_thread pointer directly.
7055         (scoped_restore_current_thread::scoped_restore_current_thread):
7056         Use inferior_thread.
7057         (thread_command): Use thread pointer directly.
7058         (thread_num_make_value_helper): Use inferior_thread.
7059         * top.c (execute_command): Use inferior_thread.
7060         * tui/tui-interp.c: Include "inferior.h".
7061         * varobj.c (varobj_create): Use inferior_thread.
7062         (value_of_root_1): Use find_thread_global_id instead of
7063         global_thread_id_to_ptid.
7064
7065 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7066
7067         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7068         possible.
7069         (regcache::write_part): Likewise.
7070         (readable_regcache::cooked_read_part): Update comment.
7071         (readable_regcache::cooked_write_part): Likewise.
7072         * regcache.h: (readable_regcache::read_part): Likewise.
7073         (regcache::write_part): Likewise.
7074
7075 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7076             Dirk Schubert  <dirk.schubert@arm.com>
7077
7078         * aarch64-linux-nat.c (post_attach): New.
7079         (aarch64_linux_nat_target::post_attach): Override post_attach to
7080         record the number of hardware debug registers.
7081
7082 2018-06-20  Tom Tromey  <tom@tromey.com>
7083
7084         * python/py-param.c (add_setshow_generic): Make parameters const.
7085         (parmpy_init): Update.
7086
7087 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7088
7089         * regcache.h (regcache_cooked_read_ftype): Rename to...
7090         (register_read_ftype): ...this, change type to function_view.
7091         (class reg_buffer) <save>: Remove src parameter.
7092         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7093         parameter non-const in first overload.  Remove src parameter in
7094         second overload.
7095         * regcache.c (do_cooked_read): Remove.
7096         (readonly_detached_regcache::readonly_detached_regcache): Make
7097         parameter non-const, adjust call to other constructor.
7098         (reg_buffer::save): Remove src parameter.
7099         * frame.c (do_frame_register_read): Remove.
7100         (frame_save_as_regcache): Use lambda function.
7101         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7102         parameter to ppu2spu_data *.
7103         (ppu2spu_sniffer): Use lambda function.
7104
7105 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7106
7107         * record-full.c (record_full_target::insert_breakpoint): Remove
7108         "struct" keyword, add const.
7109
7110 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7111
7112         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7113         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7114         * configure.ac: Remove AC_PREREQ, add missing quoting.
7115         * gnulib/configure.ac: Modernize usage of
7116         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7117         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7118         (AUTOMAKE_VERSION): Bump to 1.15.1.
7119         * configure: Re-generate.
7120         * config.in: Re-generate.
7121         * aclocal.m4: Re-generate.
7122         * gnulib/aclocal.m4: Re-generate.
7123         * gnulib/config.in: Re-generate.
7124         * gnulib/configure: Re-generate.
7125         * gnulib/import/Makefile.in: Re-generate.
7126
7127 2018-06-19  Pedro Alves  <palves@redhat.com>
7128
7129         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7130         (lookup_minimal_symbol_by_pc_section): ... here with
7131         gdb_assert_not_reached added.
7132
7133 2018-06-19  Pedro Alves  <palves@redhat.com>
7134
7135         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7136         parameter with a block parameter.  Compare location's block symbol
7137         with the frame's block instead of addresses.
7138         (skip_inline_frames): Pass the current block instead of the
7139         frame's address.  Break out as soon as we determine the frame
7140         should not be skipped.
7141
7142 2018-06-18  Tom Tromey  <tom@tromey.com>
7143
7144         * solib-aix.c (solib_aix_get_section_offsets): Return
7145         unique_xmalloc_ptr.
7146         (solib_aix_solib_create_inferior_hook): Update.
7147
7148 2018-06-18  Tom Tromey  <tom@tromey.com>
7149
7150         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7151
7152 2018-06-18  Tom Tromey  <tom@tromey.com>
7153
7154         * solib-frv.c (frv_relocate_main_executable): Use
7155         unique_xmalloc_ptr.
7156         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7157         unique_xmalloc_ptr.
7158
7159 2018-06-18  Tom Tromey  <tom@tromey.com>
7160
7161         * objfiles.h (inhibit_section_map_updates): Update.
7162         (resume_section_map_updates, resume_section_map_updates_cleanup):
7163         Remove.
7164         * solib-svr4.c (svr4_handle_solib_event): Update.
7165         * objfiles.c (inhibit_section_map_updates): Return
7166         scoped_restore_tmpl<int>.
7167         (resume_section_map_updates, resume_section_map_updates_cleanup):
7168         Remove.
7169
7170 2018-06-18  Tom Tromey  <tom@tromey.com>
7171
7172         * valprint.h (read_string): Update.
7173         * valprint.c (read_string): Change type of "buffer".
7174         (val_print_string): Update.
7175         * python/py-value.c (valpy_string): Update.
7176         * language.h (struct language_defn) <la_get_string>: Change
7177         type of "buffer".
7178         (default_get_string, c_get_string): Update.
7179         * language.c (default_get_string): Change type of "buffer".
7180         * guile/scm-value.c (gdbscm_value_to_string): Update.
7181         * c-lang.c (c_get_string): Change type of "buffer".
7182
7183 2018-06-18  Tom Tromey  <tom@tromey.com>
7184
7185         * ser-mingw.c (struct pipe_state_destroyer): New.
7186         (pipe_state_up): New typedef.
7187         (cleanup_pipe_state): Remove.
7188         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7189
7190 2018-06-18  Tom Tromey  <tom@tromey.com>
7191
7192         * rust-lang.h (rust_yyerror): Don't declare.
7193         * rust-lang.c (rust_language_defn): Update.
7194         * rust-exp.y (yyerror): Now static.
7195         * parse.c (parse_exp_in_context_1): Update.
7196         * p-lang.h (p_yyerror): Don't declare.
7197         * p-lang.c (p_language_defn): Update.
7198         * p-exp.y (yyerror): Now static.
7199         * opencl-lang.c (opencl_language_defn): Update.
7200         * objc-lang.c (objc_language_defn): Update.
7201         * m2-lang.h (m2_yyerror): Don't declare.
7202         * m2-lang.c (m2_language_defn): Update.
7203         * m2-exp.y (yyerror): Now static.
7204         * language.h (struct language_defn) <la_error>: Remove.
7205         * language.c (unk_lang_error): Remove.
7206         (unknown_language_defn, auto_language_defn): Remove.
7207         * go-lang.h (go_yyerror): Don't declare.
7208         * go-lang.c (go_language_defn): Update.
7209         * go-exp.y (yyerror): Now static.
7210         * f-lang.h (f_yyerror): Don't declare.
7211         * f-lang.c (f_language_defn): Update.
7212         * f-exp.y (yyerror): Now static.
7213         * d-lang.h (d_yyerror): Don't declare.
7214         * d-lang.c (d_language_defn): Update.
7215         * d-exp.y (yyerror): Now static.
7216         * c-lang.h (c_yyerror): Don't declare.
7217         * c-lang.c (c_language_defn, cplus_language_defn)
7218         (asm_language_defn, minimal_language_defn): Update.
7219         * c-exp.y (yyerror): Now static.
7220         * ada-lang.h (ada_yyerror): Don't declare.
7221         * ada-lang.c (ada_language_defn): Update.
7222         * ada-exp.y (yyerror): Now static.
7223
7224 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7225
7226         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7227         (store_sveregs_to_thread): Likewise.
7228         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7229         (aarch64_linux_store_inferior_registers): Likewise.
7230         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7231         function.
7232         (aarch64_sve_regs_copy_to_regcache): Likewise.
7233         (aarch64_sve_regs_copy_from_regcache): Likewise.
7234         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7235         declaration.
7236         (aarch64_sve_regs_copy_to_regcache): Likewise.
7237         (aarch64_sve_regs_copy_from_regcache): Likewise.
7238         (sve_context): Structure from Linux headers.
7239         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7240         (SVE_SIG_ZREG_SIZE): Likewise.
7241         (SVE_SIG_PREG_SIZE): Likewise.
7242         (SVE_SIG_FFR_SIZE): Likewise.
7243         (SVE_SIG_REGS_OFFSET): Likewise.
7244         (SVE_SIG_ZREGS_OFFSET): Likewise.
7245         (SVE_SIG_ZREG_OFFSET): Likewise.
7246         (SVE_SIG_ZREGS_SIZE): Likewise.
7247         (SVE_SIG_PREGS_OFFSET): Likewise.
7248         (SVE_SIG_PREG_OFFSET): Likewise.
7249         (SVE_SIG_PREGS_SIZE): Likewise.
7250         (SVE_SIG_FFR_OFFSET): Likewise.
7251         (SVE_SIG_REGS_SIZE): Likewise.
7252         (SVE_SIG_CONTEXT_SIZE): Likewise.
7253         (SVE_PT_REGS_MASK): Likewise.
7254         (SVE_PT_REGS_FPSIMD): Likewise.
7255         (SVE_PT_REGS_SVE): Likewise.
7256         (SVE_PT_VL_INHERIT): Likewise.
7257         (SVE_PT_VL_ONEXEC): Likewise.
7258         (SVE_PT_REGS_OFFSET): Likewise.
7259         (SVE_PT_FPSIMD_OFFSET): Likewise.
7260         (SVE_PT_FPSIMD_SIZE): Likewise.
7261         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7262         (SVE_PT_SVE_PREG_SIZE): Likewise.
7263         (SVE_PT_SVE_FFR_SIZE): Likewise.
7264         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7265         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7266         (__SVE_SIG_TO_PT): Likewise.
7267         (SVE_PT_SVE_OFFSET): Likewise.
7268         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7269         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7270         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7271         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7272         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7273         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7274         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7275         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7276         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7277         (SVE_PT_SVE_SIZE): Likewise.
7278         (SVE_PT_SIZE): Likewise.
7279         (HAS_SVE_STATE): New define.
7280
7281 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7282
7283         * nat/aarch64-sve-linux-sigcontext.h: New file.
7284         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7285         new files.
7286         (SVE_VQ_MIN): Likewise.
7287         (SVE_VQ_MAX): Likewise.
7288         (SVE_VL_MIN): Likewise.
7289         (SVE_VL_MAX): Likewise.
7290         (SVE_NUM_ZREGS): Likewise.
7291         (SVE_NUM_PREGS): Likewise.
7292         (sve_vl_valid): Likewise.
7293         (struct user_sve_header): Likewise.
7294
7295 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7296             Richard Bunt <Richard.Bunt@arm.com>
7297
7298         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7299         was requested by GDB.
7300
7301 2018-06-15  Tom de Vries  <tdevries@suse.de>
7302
7303         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7304
7305 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7306
7307         * gnulib/update-gnulib.sh: Print expected versions of
7308         autoconf/aclocal.
7309
7310 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7311
7312         * arch-utils.c (default_type_align): Use type_length_units.
7313         * gdbtypes.c (type_align): Use type_length_units.
7314
7315 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7316
7317         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7318         of 'define' command.
7319
7320 2018-06-14  Tom de Vries  <tdevries@suse.de>
7321
7322         PR cli/22573
7323         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7324         get_no_prettyformat_print_options.
7325
7326 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7327
7328         * sparc-nat.h: Include target.h.
7329         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7330         <fetch_registers>: Remove this argument in function call.
7331         <store_registers>: Remove this argument in function call, remove
7332         extra semicolon.
7333         <low_forget_process>: Call sparc64_forget_process instead of
7334         sparc_forget_process.
7335
7336 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7337
7338         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7339         (procfs_target::make_corefile_notes): Adjust to new
7340         target_read_alloc return type.
7341
7342 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7343             Stephen Roberts  <stephen.roberts@arm.com>
7344
7345         PR gdb/22882
7346         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7347         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7348         Move should_notify_stop local into more inner scope.
7349
7350 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7351             Stephen Roberts  <stephen.roberts@arm.com>
7352
7353         PR gdb/22882
7354         * infrun.c (resume_1): Add call to mark_async_event_handler.
7355
7356 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7357
7358         * infrun.c (do_target_wait): Change old version of $pc printed.
7359
7360 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7361
7362         * dwarf2read.c (read_index_from_section): Rename to...
7363         (read_gdb_index_from_section): ... this, update all callers.
7364         (dwarf2_read_index): Rename to...
7365         (dwarf2_read_gdb_index): ... this, update all callers.
7366
7367 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7368
7369         * hppa-linux-nat.c
7370         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7371         hppa_linux_nat_target::fetch_registers.
7372
7373 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7374
7375         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7376         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7377         (AARCH64_DWARF_SVE_FFR): Likewise.
7378         (AARCH64_DWARF_SVE_P0): Likewise.
7379         (AARCH64_DWARF_SVE_Z0): Likewise.
7380
7381 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7382
7383         * common/common-regcache.h (raw_compare): New function.
7384         * regcache.c (regcache::raw_compare): Likewise.
7385         * regcache.h (regcache::raw_compare): New declaration.
7386
7387 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7388
7389         * common/common-regcache.h (reg_buffer_common): New structure.
7390         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7391         (reg_buffer::raw_supply): Likewise.
7392         (reg_buffer::raw_supply_integer): Likewise.
7393         (reg_buffer::raw_supply_zeroed): Likewise.
7394         (reg_buffer::raw_collect): Likewise.
7395         (reg_buffer::raw_collect_integer): Likewise.
7396         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7397         (reg_buffer::raw_supply): Likewise.
7398         (reg_buffer::raw_supply_integer): Likewise.
7399         (reg_buffer::raw_supply_zeroed): Likewise.
7400         (reg_buffer::raw_collect): Likewise.
7401         (reg_buffer::raw_collect_integer): Likewise.
7402
7403 2018-06-10  Tom Tromey  <tom@tromey.com>
7404
7405         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7406         (class remote_state) <stop_reply_queue>: Now std::vector.
7407         (remote_state::~remote_state)
7408         (remote_target::stop_reply_queue_length): Update.
7409         (struct queue_iter_param, remove_child_of_pending_fork)
7410         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7411         (check_pending_event_prevents_wildcard_vcont_callback)
7412         (remove_stop_reply_for_inferior)
7413         (remove_stop_reply_of_remote_state)
7414         (remote_notif_remove_once_on_match)
7415         (stop_reply_match_ptid_and_ws)
7416         (remote_kill_child_of_pending_fork): Remove.
7417         (remote_target::remove_new_fork_children)
7418         (remote_target::check_pending_events_prevent_wildcard_vcont)
7419         (remote_target::discard_pending_stop_replies)
7420         (remote_target::discard_pending_stop_replies_in_queue)
7421         (remote_target::remote_notif_remove_queued_reply)
7422         (remote_target::queued_stop_reply)
7423         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7424         (remote_target::wait, remote_target::kill_new_fork_children)
7425         (remote_target::async): Update.
7426
7427 2018-06-10  Tom Tromey  <tom@tromey.com>
7428
7429         * record-full.c (record_full_arch_list_cleanups): Remove.
7430         (record_full_message): Use try/catch.
7431         (record_full_wait_cleanups): Remove.
7432         (record_full_wait_1): Use try/catch.
7433         (record_full_restore): Likewise.
7434
7435 2018-06-10  Tom Tromey  <tom@tromey.com>
7436
7437         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7438         declare VEC.  Add constructor.
7439         <in_target_beneath>: Now bool.
7440         (record_full_breakpoints): Now a std::vector, static.
7441         (record_full_sync_record_breakpoints)
7442         (record_full_init_record_breakpoints)
7443         (record_full_target::insert_breakpoint)
7444         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7445
7446 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7447
7448         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7449         * serial.c (serial_interface_lookup): Remove struct keyword.
7450
7451 2018-06-10  Tom Tromey  <tom@tromey.com>
7452
7453         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7454         method.
7455         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7456         a method.
7457         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7458         method.
7459         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7460         "beneath" as a method.
7461         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7462         Use "beneath" as a method.
7463
7464 2018-06-10  Tom Tromey  <tom@tromey.com>
7465
7466         * tracefile.c (struct trace_file_writer_deleter): New.
7467         <operator()>: Rename from trace_file_writer_xfree.
7468         (trace_file_writer_up): New typedef.
7469         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7470
7471 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7472
7473         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7474         <m_registers, m_register_status>: Change type to
7475         std::unique_ptr.
7476         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7477         XCNEWVEC.
7478
7479 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7480
7481         * common/common-regcache.h (enum register_status): Add
7482         underlying type "signed char".
7483         * regcache.h (reg_buffer) <m_register_status>: Change type to
7484         register_status *.
7485         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7486         register_status instead of signed char.
7487         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7488         (reg_buffer::get_register_status): Remove cast.
7489         (readable_regcache::raw_read): Remove cast.
7490         (readable_regcache::cooked_read): Remove cast.
7491
7492 2018-06-09  Tom Tromey  <tom@tromey.com>
7493
7494         * source.c (reverse_search_command, forward_search_command): Use
7495         scoped_fd.
7496
7497 2018-06-09  Tom Tromey  <tom@tromey.com>
7498
7499         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7500         (serial_ops_list): Now static, std::vector.
7501         (serial_interface_lookup, serial_add_interface): Update.
7502
7503 2018-06-09  Tom Tromey  <tom@tromey.com>
7504
7505         * dwarf2read.c (process_cu_includes): Update.
7506         (process_full_comp_unit): Update.
7507         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7508         std::vector.
7509
7510 2018-06-08  Paul Koning  <paul_koning@dell.com>
7511
7512         PR gdb/23252
7513
7514         * python/python.c (do_start_initialization):
7515         Avoid call to internal Python API.
7516         (init__gdb_module): New function.
7517
7518 2018-06-08  Gary Benson <gbenson@redhat.com>
7519
7520         * linux-thread-db.c (valprint.h): New include.
7521         (struct check_thread_db_info): New structure.
7522         (check_thread_db_on_load, tdb_testinfo): New static globals.
7523         (check_thread_db, check_thread_db_callback): New functions.
7524         (try_thread_db_load_1): Run integrity checks if requested.
7525         (maintenance_check_libthread_db): New function.
7526         (_initialize_thread_db): Register "maint check libthread-db"
7527         and "maint set/show check-libthread-db".
7528         * NEWS: Mention the above new commands.
7529
7530 2018-06-08  Tom Tromey  <tom@tromey.com>
7531
7532         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7533         now a method.
7534
7535 2018-06-08  Tom Tromey  <tom@tromey.com>
7536
7537         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7538
7539 2018-06-08  Tom Tromey  <tom@tromey.com>
7540
7541         * common/btrace-common.h (struct btrace_data): Add constructor,
7542         destructor, move assignment operator.
7543         <empty, clear, fini>: New methods.
7544         <format>: Initialize.
7545         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7546         (btrace_data_empty): Don't declare.
7547         * common/btrace-common.c (btrace_data_init): Remove.
7548         (btrace_data::fini): Rename from btrace_data_fini.
7549         (btrace_data::empty): Rename from btrace_data_empty.
7550         (btrace_data::clear): Rename from btrace_data_clear.  Return
7551         bool.
7552         * btrace.h (make_cleanup_btrace_data): Don't declare.
7553         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7554         (parse_xml_btrace): Update.
7555         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7556         (maint_btrace_clear_packet_history_cmd): Update.
7557
7558 2018-06-07  Pedro Alves  <palves@redhat.com>
7559
7560         * target.h (target_ops) <beneath>: Now a method.  All references
7561         updated.
7562         (class target_stack): New.
7563         * target.c (g_target_stack): New.
7564         (g_current_top_target): Delete.
7565         (current_top_target): Get the top target out of g_target_stack.
7566         (target_stack::push, target_stack::unpush): New.
7567         (push_target, unpush_target): Reimplement.
7568         (target_is_pushed): Reimplement in terms of g_target_stack.
7569         (target_ops::beneath, target_stack::find_beneath): New.
7570
7571 2018-06-07  Pedro Alves  <palves@redhat.com>
7572
7573         * target.h (find_target_beneath): Delete declaration.
7574         * target.c (find_target_beneath): Delete definition.
7575         * aix-thread.c: All callers of find_target_beneath adjusted to
7576         call target_ops::beneath instead.
7577         * bsd-uthread.c: Likewise.
7578         * linux-thread-db.c: Likewise.
7579         * ravenscar-thread.c: Likewise.
7580         * sol-thread.c: Likewise.
7581         * spu-multiarch.c: Likewise.
7582
7583 2018-06-07  Pedro Alves  <palves@redhat.com>
7584
7585         * target.h (target_ops) <beneath>: Now a method.  All references
7586         updated.
7587         (target_ops) <m_beneath>: New.
7588         * target.c (target_ops::beneath): New.
7589         * corelow.c: Adjust all references to target_ops::beneath.
7590         * linux-thread-db.c: Likewise.
7591         * make-target-delegates: Likewise.
7592         * record-btrace.c: Likewise.
7593         * record-full.c: Likewise.
7594         * remote.c: Likewise.
7595         * target.c: Likewise.
7596         * target-delegates.c: Regenerate.
7597
7598 2018-06-07  Pedro Alves  <palves@redhat.com>
7599
7600         * target.h (target_stack): Delete.
7601         (current_top_target): Declare function.
7602         * target.c (target_stack): Delete.
7603         (g_current_top_target): New.
7604         (current_top_target): New function.
7605         * auxv.c: Use current_top_target instead of target_stack
7606         throughout.
7607         * avr-tdep.c: Likewise.
7608         * breakpoint.c: Likewise.
7609         * corefile.c: Likewise.
7610         * elfread.c: Likewise.
7611         * eval.c: Likewise.
7612         * exceptions.c: Likewise.
7613         * frame.c: Likewise.
7614         * gdbarch-selftests.c: Likewise.
7615         * gnu-v3-abi.c: Likewise.
7616         * ia64-tdep.c: Likewise.
7617         * ia64-vms-tdep.c: Likewise.
7618         * infcall.c: Likewise.
7619         * infcmd.c: Likewise.
7620         * infrun.c: Likewise.
7621         * linespec.c: Likewise.
7622         * linux-tdep.c: Likewise.
7623         * minsyms.c: Likewise.
7624         * ppc-linux-nat.c: Likewise.
7625         * ppc-linux-tdep.c: Likewise.
7626         * procfs.c: Likewise.
7627         * regcache.c: Likewise.
7628         * remote.c: Likewise.
7629         * rs6000-tdep.c: Likewise.
7630         * s390-linux-nat.c: Likewise.
7631         * s390-tdep.c: Likewise.
7632         * solib-aix.c: Likewise.
7633         * solib-darwin.c: Likewise.
7634         * solib-dsbt.c: Likewise.
7635         * solib-spu.c: Likewise.
7636         * solib-svr4.c: Likewise.
7637         * solib-target.c: Likewise.
7638         * sparc-tdep.c: Likewise.
7639         * sparc64-tdep.c: Likewise.
7640         * spu-tdep.c: Likewise.
7641         * symfile.c: Likewise.
7642         * symtab.c: Likewise.
7643         * target-descriptions.c: Likewise.
7644         * target-memory.c: Likewise.
7645         * target.c: Likewise.
7646         * target.h: Likewise.
7647         * tracefile-tfile.c: Likewise.
7648         * tracepoint.c: Likewise.
7649         * valops.c: Likewise.
7650         * valprint.c: Likewise.
7651         * value.c: Likewise.
7652         * windows-tdep.c: Likewise.
7653         * mi/mi-main.c: Likewise.
7654
7655 2018-06-07  Tom Tromey  <tom@tromey.com>
7656
7657         * valprint.h (build_address_symbolic): Declare.
7658         * printcmd.c (print_address_symbolic): Update.
7659         (build_address_symbolic): Change "name" and "filename" to
7660         std::string.
7661         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7662         Update.
7663         * defs.h (build_address_symbolic): Remove declaration.
7664
7665 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7666
7667         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7668         (aarch64_vnv_type): Add function.
7669         (aarch64_pseudo_register_name): Add V regs for SVE.
7670         (aarch64_pseudo_register_type): Likewise.
7671         (aarch64_pseudo_register_reggroup_p): Likewise.
7672         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7673         (aarch64_pseudo_read_value): Add V regs for SVE.
7674         (aarch64_pseudo_write_2): Use V0 offset for SVE
7675         (aarch64_pseudo_write): Add V regs for SVE.
7676         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7677
7678 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7679
7680         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7681         (sve_vl_from_vq): Likewise.
7682
7683 2018-06-05  Tom Tromey  <tom@tromey.com>
7684
7685         * cli/cli-cmds.c (show_version): Update.
7686         * top.c (print_gdb_version): Add "interactive" parameter.
7687         Update.
7688         * main.c (captured_main_1): Update.
7689         * top.h (print_gdb_version): Add "interactive" parameter and a
7690         comment.
7691
7692 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7693
7694         * common/enum-flags.h: Add trailing semicolon to example in
7695         comment.
7696
7697 2018-06-05  Tom Tromey  <tom@tromey.com>
7698
7699         PR cli/12326:
7700         * NEWS: Add entry about pager.
7701         * utils.c (pagination_disabled_for_command): New global.
7702         (prompt_for_continue): Allow "c" response to prompt.
7703         (reinitialize_more_filter): Clear
7704         pagination_disabled_for_command.
7705         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7706
7707 2018-06-04  Tom Tromey  <tom@tromey.com>
7708
7709         * ada-lang.h (ada_lookup_symbol_list): Update.
7710         * ada-lang.c (resolve_subexp): Update.
7711         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7712         parameter.
7713         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7714         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7715         results parameter to std::vector.
7716         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7717         Update.
7718         * ada-exp.y (block_lookup): Update.
7719         (select_possible_type_sym): Change type of syms.  Remove nsyms
7720         parameter.
7721         (write_var_or_type, write_name_assoc): Update.
7722
7723 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7724
7725         * windows-nat.c (windows_nat_target::xfer_partial): Return
7726         TARGET_XFER_E_IO if we need to delegate to the target beneath
7727         but BENEATH is NULL.
7728
7729 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7730
7731         * Makefile.in (config.status): Add configure.nat as a
7732         dependency.
7733
7734 2018-06-04  Tom Tromey  <tom@tromey.com>
7735
7736         * cp-name-parser.y (cpname_state): Add method declarations.
7737         (HANDLE_QUAL): Update.
7738         (cpname_state::d_grab, cpname_state::fill_comp)
7739         (cpname_state::make_operator, cpname_state::make_dtor)
7740         (cpname_state::make_builtin_type, cpname_state::make_name)
7741         (cpname_state::d_qualify, cpname_state::d_int_type)
7742         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7743         (%union): Move earlier.
7744
7745 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7746
7747         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7748
7749 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7750
7751         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7752         (aarch64_pseudo_write_1): Likewise.
7753         (aarch64_pseudo_read_value): Use helper.
7754         (aarch64_pseudo_write): Likewise.
7755
7756 2018-06-04  Pedro Alves  <palves@redhat.com>
7757
7758         * darwin-nat.c (darwin_ops): Delete.
7759         (darwin_attach_pid): Use get_native_target.
7760
7761 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7762
7763         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7764         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7765
7766 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7767
7768         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7769         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7770         (aarch64_gdbarch_init): Check for SVE.
7771         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7772
7773 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7774
7775         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7776         * aarch64-tdep.h (aarch64_read_description): Likewise.
7777         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7778         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7779         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7780         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7781         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7782
7783 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7784
7785         * value.c (value_fetch_lazy_bitfield): New.
7786         (value_fetch_lazy_memory): New.
7787         (value_fetch_lazy_register): New.
7788         (value_fetch_lazy): Factor out to smaller functions.
7789
7790 2018-06-01  Tom Tromey  <tom@tromey.com>
7791
7792         * cp-name-parser.y (backslashable, represented): Now const.
7793
7794 2018-06-01  Tom Tromey  <tom@tromey.com>
7795
7796         * cp-name-parser.y: Include parser-defs.h.
7797         (parser_fprintf): Remove declaration.
7798
7799 2018-06-01  Tom Tromey  <tom@tromey.com>
7800
7801         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7802         %parse-param.
7803         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7804         (global_result): Remove globals.
7805         (struct cpname_state): New.
7806         (yyparse): Don't declare.
7807         (yylex, yyerror): Move declarations after %union.
7808         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7809         (make_name): Add state parameter.
7810         Update all callers.
7811         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7812         parameter.
7813         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7814         Update.
7815         (yylex): Add lvalp, state parameters.
7816         (yyerror): Add state parameter.
7817         (cp_demangled_name_to_comp): Update.
7818
7819 2018-06-01  Tom Tromey  <tom@tromey.com>
7820
7821         * cp-name-parser.y (parser_fprintf): Declare.
7822         (GDB_YY_REMAP_PREFIX): Define.
7823         Include yy-remap.h.  Don't redefine yy* identifiers.
7824
7825 2018-06-01  Tom Tromey  <tom@tromey.com>
7826
7827         * python/py-type.c (typy_legacy_template_argument): Update.
7828         * cp-support.h (cp_demangled_name_to_comp): Update.
7829         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7830         parameter to be a "std::string *".
7831         (main): Update.
7832
7833 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7834
7835         * ada-lex.l: Include "diagnostics.h" instead of
7836         "common/diagnostics.h".
7837         * unittests/environ-selftests.c: Likewise.
7838         * common/diagnostics.h: Moved to ../include.
7839
7840 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7841
7842         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7843         to language_mode_manual while calling breakpoint_re_set_one.
7844
7845 2018-06-01  Tom Tromey  <tom@tromey.com>
7846
7847         * valops.c (value_cast_structs, destructor_name_p): Update.
7848         * symtab.c (gdb_mangle_name): Update.
7849         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7850         Update.
7851         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7852         (pascal_object_print_value_fields, pascal_object_print_value):
7853         Update.
7854         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7855         * linespec.c (find_methods): Update.
7856         * gdbtypes.h (type_name_no_tag): Remove.
7857         (type_name_or_error): Rename from type_name_no_tag_or_error.
7858         * gdbtypes.c (type_name_no_tag): Remove.
7859         (type_name_or_error): Rename from type_name_no_tag_or_error.
7860         (lookup_struct_elt_type, check_typedef): Update.
7861         * expprint.c (print_subexp_standard): Update.
7862         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7863         * d-namespace.c (d_lookup_nested_symbol): Update.
7864         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7865         (cp_print_class_member): Update.
7866         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7867         * completer.c (add_struct_fields): Update.
7868         * c-typeprint.c (cp_type_print_derivation_info)
7869         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7870         Update.
7871         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7872         (ada_prefer_type, ada_is_exception_sym): Update.
7873
7874 2018-06-01  Tom Tromey  <tom@tromey.com>
7875
7876         * valops.c (enum_constant_from_type, value_namespace_elt)
7877         (value_maybe_namespace_elt): Update.
7878         * valarith.c (find_size_for_pointer_math): Update.
7879         * target-descriptions.c (make_gdb_type): Update.
7880         * symmisc.c (print_symbol): Update.
7881         * stabsread.c (define_symbol, read_type)
7882         (complain_about_struct_wipeout, add_undefined_type)
7883         (cleanup_undefined_types_1): Update.
7884         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7885         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7886         (rust_internal_print_type, rust_composite_type)
7887         (rust_evaluate_funcall, rust_evaluate_subexp)
7888         (rust_inclusive_range_type_p): Update.
7889         * python/py-type.c (typy_get_tag): Update.
7890         * p-typeprint.c (pascal_type_print_base): Update.
7891         * mdebugread.c (parse_symbol, parse_type): Update.
7892         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7893         Update.
7894         * guile/scm-type.c (gdbscm_type_tag): Update.
7895         * go-lang.c (sixg_string_p): Update.
7896         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7897         Update.
7898         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7899         (TYPE_TAG_NAME): Remove.
7900         * gdbtypes.c (type_name_no_tag): Simplify.
7901         (check_typedef, check_types_equal, recursive_dump_type)
7902         (copy_type_recursive, arch_composite_type): Update.
7903         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7904         in summary mode when needed.
7905         * eval.c (evaluate_funcall): Update.
7906         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7907         (process_structure_scope, read_enumeration_type)
7908         (read_namespace_type, read_module_type, determine_prefix): Update.
7909         * cp-support.c (inspect_type): Update.
7910         * coffread.c (process_coff_symbol, decode_base_type): Update.
7911         * c-varobj.c (c_is_path_expr_parent): Update.
7912         * c-typeprint.c (c_type_print_base_struct_union): Update.
7913         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7914         summary when using C language.
7915         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7916         (gen_maybe_namespace_elt): Update.
7917         * ada-lang.c (ada_type_name): Simplify.
7918         (empty_record, ada_template_to_fixed_record_type_1)
7919         (template_to_static_fixed_type)
7920         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7921
7922 2018-06-01  Tom Tromey  <tom@tromey.com>
7923
7924         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7925         c_print_type.
7926         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7927         (c_print_type): Update.
7928         (c_print_type): New overload.
7929         (c_type_print_varspec_prefix, c_type_print_args)
7930         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7931         (c_type_print_base_struct_union, c_type_print_base_1)
7932         (cp_type_print_method_args): Add "language" parameter.
7933         (c_type_print_base): Update.
7934         * c-lang.h (c_print_type): Add new overload.
7935
7936 2018-06-01  Tom Tromey  <tom@tromey.com>
7937
7938         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7939         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7940
7941 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7942
7943         * aarch64-tdep.c (aarch64_sve_register_names): New const
7944         var.
7945         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7946         (AARCH64_SVE_Z_REGS_NUM): New define.
7947         (AARCH64_SVE_P_REGS_NUM): Likewise.
7948         (AARCH64_SVE_NUM_REGS): Likewise.
7949
7950 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7951
7952         * nat/linux-ptrace.h [__alpha__]
7953         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7954         definitions.
7955
7956 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7957
7958         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7959         the endianness selected.
7960         * NEWS: Document `set endian auto' mode operation update.
7961
7962 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7963
7964         * Makefile.in: Add new header.
7965         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7966         (sve_vl_from_vg): Likewise.
7967         (sve_vq_from_vl): Likewise.
7968         (sve_vl_from_vq): Likewise.
7969         (sve_vq_from_vg): Likewise.
7970         (sve_vg_from_vq): Likewise.
7971         * configure.nat: Add new c file.
7972         * nat/aarch64-sve-linux-ptrace.c: New file.
7973         * nat/aarch64-sve-linux-ptrace.h: New file.
7974
7975 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7976
7977         * aarch64-linux-nat.c (aarch64_linux_read_description):
7978         Add parmeter zero.
7979         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7980         Likewise.
7981         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7982         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7983         (aarch64_gdbarch_init): Add parmeter zero.
7984         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7985         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7986         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7987         parmeter.
7988         * doc/gdb.texinfo: Describe SVE feature
7989         * features/aarch64-sve.c: New file.
7990
7991 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7992
7993         PR gdb/23210
7994         * gdbarch.sh (significant_addr_bit): Default to zero when
7995         not set by target architecture.
7996         * gdbarch.c: Re-generated.
7997         * utils.c (address_significant): Update.
7998
7999 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8000
8001         * stack.c (func_command): Remove trailing newline in call to error.
8002
8003 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8004
8005         * regcache.h (regcache_raw_collect): Remove, update callers to
8006         use regcache::raw_collect.
8007         * regcache.c (regcache_raw_collect): Remove.
8008
8009 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8010
8011         * regcache.h (regcache_raw_supply): Remove, update callers to
8012         use detached_regcache::raw_supply.
8013         * regcache.c (regcache_raw_supply): Remove.
8014
8015 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8016
8017         * regcache.h (regcache_cooked_write_part): Remove, update
8018         callers to use regcache::cooked_write_part.
8019         * regcache.c (regcache_cooked_write_part): Remove.
8020
8021 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8022
8023         * regcache.h (regcache_cooked_read_part): Remove, update callers
8024         to use readable_regcache::cooked_read_part.
8025         * regcache.c (regcache_cooked_read_part): Remove.
8026
8027 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8028
8029         * regcache.h (regcache_cooked_read_value): Remove, update
8030         callers to use readable_regcache::cooked_read_value.
8031         * regcache.c (regcache_cooked_read_value): Remove.
8032
8033 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8034
8035         * regcache.h (regcache_cooked_write): Remove, update callers to
8036         use regcache::cooked_write.
8037         * regcache.c (regcache_cooked_write): Remove.
8038
8039 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8040
8041         * regcache.h (regcache_invalidate): Remove, update callers to
8042         use detached_regcache::invalidate instead.
8043         * regcache.c (regcache_invalidate): Remove.
8044
8045 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8046
8047         * regcache.h (regcache_raw_write_part): Remove, update callers
8048         to use regcache::raw_write_part instead.
8049         * regcache.c (regcache_raw_write_part): Remove.
8050
8051 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8052
8053         * regcache.h (regcache_raw_read_part): Remove, update callers to
8054         use readable_regcache::raw_read_part instead.
8055         * regcache.c (regcache_raw_read_part): Remove.
8056
8057 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8058
8059         * regcache.h (regcache_cooked_read): Remove, update callers to
8060         use readable_regcache::cooked_read instead.
8061         * regcache.c (regcache_cooked_read): Remove.
8062
8063 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8064
8065         * regcache.h (regcache_raw_write): Remove, update callers to use
8066         regcache::raw_write instead.
8067         * regcache.c (regcache_raw_write): Remove.
8068
8069 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8070
8071         * regcache.h (regcache_raw_read): Remove, update callers to use
8072         readable_regcache::raw_read instead.
8073         * regcache.c (regcache_raw_read): Remove.
8074
8075 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8076
8077         * regcache.h (regcache_raw_update): Remove, update callers to
8078         use readable_regcache::raw_update instead.
8079         * regcache.c (regcache_raw_update): Remove.
8080
8081 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8082
8083         * regcache.h (regcache_register_status): Remove, update callers
8084         to use reg_buffer::get_register_status directly instead.
8085         * regcache.c (regcache_register_status): Remove.
8086
8087 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8088
8089         * regcache.h (regcache_get_ptid): Remove, update all callers to
8090         call regcache::ptid instead.
8091         * regcache.c (regcache_get_ptid): Remove.
8092
8093 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8094
8095         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8096
8097 2018-05-30  Pedro Alves  <palves@redhat.com>
8098
8099         * common/common-exceptions.h (exception_rethrow): Use
8100         ATTRIBUTE_NORETURN.
8101
8102 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8103
8104         * breakpoint.c (print_solib_event, check_status_catch_solib):
8105         Remove struct keyword in range-based for loops.
8106         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8107         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8108         Likewise.
8109         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8110         Likewise.
8111         * symfile.c (addr_info_make_relative): Likewise.
8112         * thread.c (value_in_thread_stack_temporaries): Likewise.
8113
8114 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8115
8116         PR gdb/16841
8117         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8118         aggregate type to get its real type before accessing it.
8119
8120 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8121
8122         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8123         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8124         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8125         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8126         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8127         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8128         * printcmd.c (info_address_command): Likewise.
8129
8130 2018-05-29  Tom Tromey  <tom@tromey.com>
8131
8132         * windows-nat.c (handle_exception): Update fall-through comment.
8133
8134 2018-05-29  Tom Tromey  <tom@tromey.com>
8135
8136         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8137         (struct program_space) <added_solibs>: Now a std::vector.
8138         * breakpoint.c (print_solib_event): Update.
8139         (check_status_catch_solib): Update.
8140         * progspace.c (clear_program_space_solib_cache): Update.
8141         * solib.c (update_solib_list): Update.
8142
8143 2018-05-29  Tom Tromey  <tom@tromey.com>
8144
8145         * python/py-type.c (typy_richcompare): Update.
8146         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8147         * gdbtypes.h (types_deeply_equal): Return bool.
8148         (types_equal): Likewise.
8149         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8150         declare VEC.
8151         (check_types_equal): Change worklist to std::vector.  Return
8152         bool.
8153         (struct type_equality_entry): Add constructor.
8154         (compare_maybe_null_strings): Return bool.
8155         (check_types_worklist): Return bool.  Change worklist to
8156         std::vector.
8157         (types_deeply_equal): Use std::vector.
8158         (types_equal): Return bool.
8159         (compare_maybe_null_strings): Simplify.
8160
8161 2018-05-29  Tom Tromey  <tom@tromey.com>
8162
8163         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8164
8165 2018-05-29  Tom Tromey  <tom@tromey.com>
8166
8167         * objc-lang.h: Don't include cp-support.h.
8168         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8169         declare VEC.
8170
8171 2018-05-27  Tom Tromey  <tom@tromey.com>
8172
8173         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8174
8175 2018-05-25  Tom Tromey  <tom@tromey.com>
8176
8177         * value.c (value::location): Initialize.
8178
8179 2018-05-25  Tom Tromey  <tom@tromey.com>
8180
8181         * dbxread.c (init_bincl_list): Remove.
8182         (bincl_list): Now a std::vector.
8183         (bincls_allocated, next_bincl): Remove.
8184         (free_bincl_list, do_free_bincl_list_cleanup)
8185         (make_cleanup_free_bincl_list): Remove.
8186         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8187         unique_xmalloc_ptr.
8188         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8189         (struct header_file_location): Add constructor.
8190         (add_bincl_to_list): Remove.
8191
8192 2018-05-25  Tom Tromey  <tom@tromey.com>
8193
8194         * tui/tui.c (tui_enable): Update.
8195         * mi/mi-interp.c (mi_interp::init): Update.
8196         * interps.h (class interp) <name>: New method.
8197         <m_name>: Rename from name.
8198         (~scoped_restore_interp): Update.
8199         * interps.c (interp::interp): Update.
8200         (interp_add, interp_set, interp_lookup_existing)
8201         (current_interp_named_p): Update.
8202
8203 2018-05-25  Tom Tromey  <tom@tromey.com>
8204
8205         * interps.c (interp_name): Remove.
8206         * mi/mi-interp.c (mi_interp::init): Update.
8207         * interps.h (interp_name): Remove.
8208         (~scoped_restore_interp): Update.
8209         * tui/tui.c (tui_enable): Update.
8210
8211 2018-05-25  Tom Tromey  <tom@tromey.com>
8212
8213         * utils.c (fputs_maybe_filtered): Update.
8214         * linespec.c (decode_line_full): Update.
8215         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8216         (mi_print_breakpoint_for_event, mi_solib_loaded)
8217         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8218         (mi_user_selected_context_changed): Update.
8219         * mi/mi-main.c (mi_execute_command): Update.
8220         * cli/cli-script.c (execute_control_command): Update.
8221         * python/python.c (execute_gdb_command): Update.
8222         * solib.c (info_sharedlibrary_command): Update.
8223         * interps.c (interp_ui_out): Remove.
8224         * interps.h (interp_ui_out): Remove.
8225
8226 2018-05-25  Tom Tromey  <tom@tromey.com>
8227
8228         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8229         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8230         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8231
8232 2018-05-25  Tom Tromey  <tom@tromey.com>
8233
8234         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8235         * interps.c (interp_exec): Use scoped_restore.
8236
8237 2018-05-25  Tom Tromey  <tom@tromey.com>
8238
8239         * remote.c (remote_target::remote_file_get): Use
8240         gdb::byte_vector.
8241         (remote_target::remote_file_put): Likewise.
8242
8243 2018-05-25  Tom Tromey  <tom@tromey.com>
8244
8245         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8246         a std::string.
8247         (get_pe_section_index, add_pe_exported_sym): Update.
8248         (read_pe_exported_syms): Use gdb::def_vector.
8249
8250 2018-05-25  Tom Tromey  <tom@tromey.com>
8251
8252         * frame.c (remove_prev_frame): Remove.
8253         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8254
8255 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8256
8257         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8258         Remove prototypes.
8259         * mips-linux-nat.c (supply_fpregset): Always call
8260         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8261         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8262         `mips_fill_fpregset'.
8263         * mips-linux-tdep.c (mips_supply_fpregset)
8264         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8265         (mips_fill_fpregset_wrapper): Remove functions.
8266         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8267         (mips_linux_fpregset): Remove variable.
8268         (mips_linux_iterate_over_regset_sections): Use
8269         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8270         (mips_linux_o32_sigframe_init): Remove comment.
8271
8272 2018-05-25  Pedro Alves  <palves@redhat.com>
8273
8274         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8275         (struct readahead_cache, struct packet_reg, struct
8276         remote_arch_state, class remote_state): Move higher up in the
8277         file.
8278         (remote_target::m_remote_state): Now an object instead of a pointer.
8279         (remote_target::get_remote_state): Adjust.
8280
8281 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8282
8283         * stack.c (select_and_print_frame): Delete.
8284         (struct function_bounds): Move struct within function.
8285         (func_command): Most content moved into new function
8286         find_frame_for_function, use new function, print result, add
8287         function comment.
8288         (find_frame_for_function): New function, now returns a result.
8289
8290 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8291
8292         * stack.c (iterate_over_block_arg_vars): Fix comment.
8293         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8294
8295 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8296
8297         PR gdb/23203
8298         * frame.c
8299         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8300         Define.
8301         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8302         Define.
8303         * frame.h (class scoped_restore_selected_frame): New class.
8304         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8305         of any exception, use scoped_restore_selected_frame to restore the
8306         frame instead.
8307
8308 2018-05-24  Pedro Alves  <palves@redhat.com>
8309
8310         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8311         override.
8312
8313 2018-05-23  Tom Tromey  <tom@tromey.com>
8314
8315         * complaints.c (struct complaints): Remove.
8316         (symfile_complaint_book): Remove.
8317         (series): New global.
8318         (complaint_internal): Update.
8319         (clear_complaints): Update.
8320
8321 2018-05-23  Tom Tromey  <tom@tromey.com>
8322
8323         * complaints.c (counters): New global.
8324         (struct complain): Remove.
8325         (struct complaints) <root>: Remove.
8326         (complaint_sentinel): Remove.
8327         (symfile_complaint_book): Update.
8328         (find_complaint) Remove.
8329         (complaint_internal, clear_complaints): Update.
8330
8331 2018-05-23  Tom Tromey  <tom@tromey.com>
8332
8333         * complaints.c (struct complain) <file, line>: Remove.
8334         (find_complaint): Remove file, line parameters.
8335         (complaint_internal): Update.
8336
8337 2018-05-23  Tom Tromey  <tom@tromey.com>
8338
8339         * complaints.c (vcomplaint): Remove.
8340         (complaint_internal) Merge in contents of vcomplaint.
8341
8342 2018-05-23  Tom Tromey  <tom@tromey.com>
8343
8344         * complaints.c (struct complaints) <explanation>: Remove.
8345         (symfile_explanations): Remove.
8346         (symfile_complaint_book): Update.
8347         (vcomplaint): Update.
8348         (struct explanation): Remove.
8349
8350 2018-05-23  Tom Tromey  <tom@tromey.com>
8351
8352         * complaints.c (symfile_complaints): Remove.
8353         (complaint_internal): Remove "complaints" parameter.
8354         (clear_complaints, vcomplaint): Remove "c" parameter.
8355         (get_complaints): Remove.
8356         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8357         (dwarf2_debug_line_missing_file_complaint)
8358         (dwarf2_debug_line_missing_end_sequence_complaint)
8359         (dwarf2_complex_location_expr_complaint)
8360         (dwarf2_const_value_length_mismatch_complaint)
8361         (dwarf2_section_buffer_overflow_complaint)
8362         (dwarf2_macro_malformed_definition_complaint)
8363         (dwarf2_invalid_attrib_class_complaint)
8364         (create_addrmap_from_index, dw2_symtab_iter_next)
8365         (dw2_expand_marked_cus)
8366         (dw2_debug_names_iterator::find_vec_in_debug_names)
8367         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8368         (create_debug_type_hash_table, init_cutu_and_read_dies)
8369         (partial_die_parent_scope, add_partial_enumeration)
8370         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8371         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8372         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8373         (create_cus_hash_table, create_dwp_hash_table)
8374         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8375         (dwarf2_rnglists_process, dwarf2_ranges_process)
8376         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8377         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8378         (handle_struct_member_die, process_structure_scope)
8379         (read_array_type, read_common_block, read_module_type)
8380         (read_tag_pointer_type, read_typedef, read_base_type)
8381         (read_subrange_type, load_partial_dies, partial_die_info::read)
8382         (partial_die_info::read, partial_die_info::read)
8383         (partial_die_info::read, read_checked_initial_length_and_offset)
8384         (dwarf2_string_attr, read_formatted_entries)
8385         (dwarf_decode_line_header)
8386         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8387         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8388         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8389         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8390         (get_signatured_type, get_DW_AT_signature_type)
8391         (decode_locdesc, file_file_name, consume_improper_spaces)
8392         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8393         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8394         (dwarf2_symbol_mark_computed, set_die_type)
8395         (read_attribute_value): Update.
8396         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8397         Update.
8398         * dbxread.c (unknown_symtype_complaint)
8399         (lbrac_mismatch_complaint, repeated_header_complaint)
8400         (set_namestring, function_outside_compilation_unit_complaint)
8401         (read_dbx_symtab, process_one_symbol): Update.
8402         * gdbtypes.c (stub_noname_complaint): Update.
8403         * windows-nat.c (handle_unload_dll): Update.
8404         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8405         (decode_base_type): Update.
8406         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8407         (eb_complaint, record_include_begin, record_include_end)
8408         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8409         (process_xcoff_symbol, read_symbol)
8410         (function_outside_compilation_unit_complaint)
8411         (scan_xcoff_symtab): Update.
8412         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8413         * buildsym.c (finish_block_internal, make_blockvector)
8414         (end_symtab_get_static_block, augment_type_symtab): Update.
8415         * dtrace-probe.c (dtrace_process_dof)
8416         (dtrace_static_probe_ops::get_probes): Update.
8417         * complaints.h (struct complaint): Don't declare.
8418         (symfile_complaints): Remove.
8419         (complaint_internal): Remove "complaints" parameter.
8420         (complaint): Likewise.
8421         (clear_complaints): Likewise.
8422         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8423         (reread_symbols): Update.
8424         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8425         (dwarf2_frame_cache, decode_frame_entry): Update.
8426         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8427         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8428         (info_selectors_command): Update.
8429         * macrotab.c (macro_include, check_for_redefinition)
8430         (macro_undef): Update.
8431         * objfiles.c (filter_overlapping_sections): Update.
8432         * stabsread.c (invalid_cpp_abbrev_complaint)
8433         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8434         (define_symbol, error_type, read_type, rs6000_builtin_type)
8435         (stabs_method_name_from_physname, read_member_functions)
8436         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8437         (attach_fields_to_type, complain_about_struct_wipeout)
8438         (read_range_type, read_args, common_block_start)
8439         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8440         Update.
8441         * mdebugread.c (index_complaint, unknown_ext_complaint)
8442         (basic_type_complaint, bad_tag_guess_complaint)
8443         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8444         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8445         (parse_procedure, parse_lines)
8446         (function_outside_compilation_unit_complaint)
8447         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8448         (bad_tag_guess_complaint, reg_value_complaint): Update.
8449         * cp-support.c (demangled_name_complaint): Update.
8450         * macroscope.c (sal_macro_scope): Update.
8451         * dwarf-index-write.c (class debug_names): Update.
8452
8453 2018-05-23  Tom Tromey  <tom@tromey.com>
8454
8455         * complaints.c (clear_complaints): Remove "noisy" parameter.
8456         * complaints.h (clear_complaints): Update.
8457         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8458         (reread_symbols): Update.
8459
8460 2018-05-23  Tom Tromey  <tom@tromey.com>
8461
8462         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8463         SUBSEQUENT_MESSAGE.
8464         (vcomplaint, clear_complaints): Update.
8465         (symfile_explanations): Remove some messages.
8466
8467 2018-05-23  Tom Tromey  <tom@tromey.com>
8468
8469         * complaints.c (internal_complaint): Remove.
8470         * complaints.h (internal_complaint): Remove.
8471
8472 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8473
8474         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8475
8476 2018-05-22  Pedro Alves  <palves@redhat.com>
8477
8478         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8479         (remote_fileio_badfd, remote_fileio_return_errno)
8480         (remote_fileio_return_success, remote_fileio_func_open)
8481         (remote_fileio_func_open, remote_fileio_func_close)
8482         (remote_fileio_func_read, remote_fileio_func_write)
8483         (remote_fileio_func_lseek, remote_fileio_func_rename)
8484         (remote_fileio_func_unlink, remote_fileio_func_stat)
8485         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8486         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8487         remote_target parameter.
8488         (remote_fio_func_map) <func>: Add remote_target parameter.
8489         (do_remote_fileio_request, remote_fileio_request):
8490         * remote-fileio.h (remote_fileio_request):
8491         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8492         remote_target parameter.
8493         (remote_notif_process, handle_notification): Adjust to pass down
8494         the remote.
8495         (remote_notif_state_allocate): Add remote_target parameter.  Save
8496         it.
8497         * remote-notif.h (struct remote_target): Forward declare.
8498         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8499         remote_target parameter.
8500         (struct remote_notif_state) <remote>: New field.
8501         (remote_notif_ack, remote_notif_parse): Add remote_target
8502         parameter.
8503         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8504         remote_target parameter.
8505         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8506         (threads_listing_context, rmt_thread_action, protocol_feature)
8507         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8508         (packet_result, struct threads_listing_context, remote_state):
8509         Move definitions and declarations higher up.
8510         (remote_target) <~remote_target>: Declare.
8511         (remote_download_command_source, remote_file_put, remote_file_get)
8512         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8513         (remote_hostio_pread_vFile, remote_hostio_send_command)
8514         (remote_hostio_set_filesystem, remote_hostio_open)
8515         (remote_hostio_close, remote_hostio_unlink, remote_state)
8516         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8517         (get_memory_write_packet_size, get_memory_read_packet_size)
8518         (append_pending_thread_resumptions, remote_detach_1)
8519         (append_resumption, remote_resume_with_vcont)
8520         (add_current_inferior_and_thread, wait_ns, wait_as)
8521         (process_stop_reply, remote_notice_new_inferior)
8522         (process_initial_stop_replies, remote_add_thread)
8523         (btrace_sync_conf, remote_btrace_maybe_reopen)
8524         (remove_new_fork_children, kill_new_fork_children)
8525         (discard_pending_stop_replies, stop_reply_queue_length)
8526         (check_pending_events_prevent_wildcard_vcont)
8527         (discard_pending_stop_replies_in_queue, stop_reply)
8528         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8529         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8530         (remote_interrupt_as, remote_interrupt_ns)
8531         (remote_get_noisy_reply, remote_query_attached)
8532         (remote_add_inferior, remote_current_thread, get_current_thread)
8533         (set_thread, set_general_thread, set_continue_thread)
8534         (set_general_process, write_ptid)
8535         (remote_unpack_thread_info_response, remote_get_threadinfo)
8536         (parse_threadlist_response, remote_get_threadlist)
8537         (remote_threadlist_iterator, remote_get_threads_with_ql)
8538         (remote_get_threads_with_qxfer)
8539         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8540         (get_offsets, remote_check_symbols, remote_supported_packet)
8541         (remote_query_supported, remote_packet_size)
8542         (remote_serial_quit_handler, remote_detach_pid)
8543         (remote_vcont_probe, remote_resume_with_hc)
8544         (send_interrupt_sequence, interrupt_query)
8545         (remote_notif_get_pending_events, fetch_register_using_p)
8546         (send_g_packet, process_g_packet, fetch_registers_using_g)
8547         (store_register_using_P, store_registers_using_G)
8548         (set_remote_traceframe, check_binary_download)
8549         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8550         (remote_xfer_live_readonly_partial, remote_read_bytes)
8551         (remote_send_printf, remote_flash_write, readchar)
8552         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8553         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8554         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8555         (extended_remote_disable_randomization, extended_remote_run)
8556         (send_environment_packet, extended_remote_environment_support)
8557         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8558         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8559         (packet_command): Now methods of ...
8560         (remote_target): ... this class.
8561         (m_remote_state) <remote_target>: New field.
8562         (struct remote_state) <stop_reply_queue,
8563         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8564         fields.
8565         (remote_state::remote_state): Allocate stop_reply_queue.
8566         (remote_state): Delete global.
8567         (get_remote_state_raw): Delete.
8568         (remote_target::get_remote_state): Allocate m_remote_state on
8569         demand.
8570         (get_current_remote_target): New.
8571         (remote_ops, extended_remote_ops): Delete.
8572         (wait_forever_enabled_p, remote_async_inferior_event_token):
8573         Delete, moved to struct remote_state.
8574         (remote_target::close): Delete self.  Destruction bits split to
8575         ...
8576         (remote_target::~remote_target): ... this.
8577         (show_memory_packet_size): Adjust to use
8578         get_current_remote_target.
8579         (struct protocol_feature) <func>: Add remote_target parameter.
8580         All callers adjusted.
8581         (curr_quit_handler_target): New.
8582         (remote_serial_quit_handler): Reimplement.
8583         (remote_target::open_1): Adjust to use get_current_remote_target.
8584         Heap-allocate remote_target/extended_remote_target instances.
8585         (vcont_builder::vcont_builder): Add remote_target parameter, and
8586         save it in m_remote.  All callers adjusted.
8587         (vcont_builder::m_remote): New field.
8588         (vcont_builder::restart, vcont_builder::flush)
8589         (vcont_builder::push_action): Use it.
8590         (remote_target::commit_resume): Use it.
8591         (struct queue_iter_param) <remote>: New field.
8592         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8593         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8594         (check_pending_event_prevents_wildcard_vcont_callback)
8595         (remote_target::check_pending_events_prevent_wildcard_vcont)
8596         (remote_target::discard_pending_stop_replies)
8597         (remote_target::discard_pending_stop_replies_in_queue)
8598         (remote_target::remote_notif_remove_queued_reply): Fill in
8599         'remote' field.
8600         (remote_notif_get_pending_events): New.
8601         (remote_target::readchar, remote_target::remote_serial_write):
8602         Save/restore curr_quit_handler_target.
8603         (putpkt): New.
8604         (kill_new_fork_children): Fill in 'remote' field.
8605         (packet_command): Use get_current_remote_target, defer to
8606         remote_target method of same name.
8607         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8608         parameter, and save it in m_remote.  All callers adjusted.
8609         (scoped_remote_fd::release): Use m_remote.
8610         (scoped_remote_fd::m_remote): New field.
8611         (remote_file_put, remote_file_get, remote_file_delete): Use
8612         get_current_remote_target, defer to remote_target method of same
8613         name.
8614         (remote_btrace_reset): Add remote_state paremeter.  Update all
8615         callers.
8616         (remote_async_inferior_event_handler). Pass down 'data'.
8617         (remote_new_objfile): Use get_current_remote_target.
8618         (remote_target::vcont_r_supported): New.
8619         (set_range_stepping): Use get_current_remote_target and
8620         remote_target::vcont_r_supported.
8621         (_initialize_remote): Don't allocate 'remote_state' and
8622         'stop_reply_queue' globals.
8623         * remote.h (struct remote_target): Forward declare.
8624         (getpkt, putpkt, remote_notif_get_pending_events): Add
8625         'remote_target' parameter.
8626
8627 2018-05-22  Pedro Alves  <palves@redhat.com>
8628
8629         * remote.c (vcont_builder): Now a class.  Make all data members
8630         private.
8631         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8632         Declare methods.
8633         (vcont_builder_restart): Rename to ...
8634         (vcont_builder::restart): ... this.
8635         (vcont_builder_flush): Rename to ...
8636         (vcont_builder::flush): ... this.
8637         (vcont_builder_push_action): Rename to ...
8638         (vcont_builder::push_action): ... this.
8639         (remote_target::commit_resume): Adjust.
8640
8641 2018-05-22  Pedro Alves  <palves@redhat.com>
8642
8643         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8644         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8645         (get_fixed_memory_packet_size): New.
8646         (get_memory_packet_size): Use it.
8647         (set_memory_packet_size): Don't override the config size with
8648         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8649         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8650         Don't refer to get_memory_packet_size if not connected to a remote
8651         target.  Show "(default)" if configured size is 0.
8652
8653 2018-05-22  Pedro Alves  <palves@redhat.com>
8654
8655         * remote.c (remote_target::mourn_inferior): Move
8656         discard_pending_stop_replies call here from ...
8657         (_initialize_remote): ... here.
8658
8659 2018-05-22  Pedro Alves  <palves@redhat.com>
8660
8661         * remote.c (compare_section_command): Remove set_general_process
8662         call.
8663
8664 2018-05-22  Pedro Alves  <palves@redhat.com>
8665
8666         * remote.c (struct packet_reg, struct remote_arch_state):
8667         Move higher up in the file.
8668         (remote_state) <m_arch_states>: Store remote_arch_state values
8669         instead of remote_arch_state pointers.
8670         (remote_state::get_remote_arch_state): Adjust.
8671
8672 2018-05-22  Pedro Alves  <palves@redhat.com>
8673
8674         * remote.c: Include <unordered_map>.
8675         (remote_state): Now a class.
8676         (remote_state) <get_remote_arch_state>: Declare method.
8677         <get_remote_arch_state>: New field.
8678         (remote_arch_state) <remote_arch_state>: Declare ctor.
8679         <regs>: Now a unique_ptr.
8680         (remote_gdbarch_data_handle): Delete.
8681         (get_remote_arch_state): Delete.
8682         (remote_state::get_remote_arch_state): New.
8683         (get_remote_state): Adjust to call remote_state's
8684         get_remote_arch_state method.
8685         (init_remote_state): Delete, bits factored out to ...
8686         (remote_arch_state::remote_arch_state): ... this new method.
8687         (get_remote_packet_size, get_memory_packet_size)
8688         (process_g_packet, remote_target::fetch_registers)
8689         (remote_target::prepare_to_store, store_registers_using_G)
8690         (remote_target::store_registers, remote_target::get_trace_status):
8691         Adjust to call remote_state's method.
8692         (_initialize_remote): Remove reference to
8693         remote_gdbarch_data_handle.
8694
8695 2018-05-22  Pedro Alves  <palves@redhat.com>
8696
8697         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8698         pread>: New method declarations.
8699         (remote_target::open_1): Adjust.
8700         (readahead_cache_invalidate): Rename to ...
8701         (readahead_cache::invalidate): ... this, and adjust to be a class
8702         method.
8703         (readahead_cache_invalidate_fd): Rename to ...
8704         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8705         class method.
8706         (remote_hostio_pwrite): Adjust.
8707         (remote_hostio_pread_from_cache): Rename to ...
8708         (readahead_cache::pread): ... this, and adjust to be a class
8709         method.
8710         (remote_hostio_close): Adjust.
8711
8712 2018-05-22  Pedro Alves  <palves@redhat.com>
8713
8714         * remote.c (remote_hostio_close_cleanup): Delete.
8715         (class scoped_remote_fd): New.
8716         (remote_file_put, remote_file_get): Use it.
8717
8718 2018-05-22  Pedro Alves  <palves@redhat.com>
8719
8720         (struct vCont_action_support): Use bool and initialize all fields.
8721         (struct readahead_cache): Initialize all fields.
8722         (remote_state): Use bool and initialize all fields.
8723         (remote_state::remote_state, remote_state::~remote_state): New.
8724         (new_remote_state): Delete.
8725         (_initialize_remote): Use new to allocate remote_state.
8726
8727 2018-05-22  Pedro Alves  <palves@redhat.com>
8728             張俊芝  <zjz@zjz.name>
8729
8730         PR gdb/22973
8731         * c-exp.y: Include "c-support.h".
8732         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8733         of tolower.  Use c_ident_is_alpha to scan names.
8734         * c-lang.c: Include "c-support.h".
8735         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8736         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8737         * c-support.h: New file, with bits factored out from ...
8738         * cp-name-parser.y: ... this file.
8739         Include "c-support.h".
8740         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8741         c-support.h and renamed.
8742         (symbol_end, yylex): Adjust.
8743
8744 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8745
8746         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8747         parameter type to CORE_ADDR.
8748         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8749         parameter type in declaration to CORE_ADDR.
8750         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8751         target_auxv_search to get AT_HWCAP and use the result to get the
8752         target description.
8753         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8754         to CORE_ADDR. Remove the cast of the return value to unsigned
8755         long. Fix error predicate of target_auxv_search.
8756         (ppc_linux_nat_target::read_description): Change the type of the
8757         hwcap variable to CORE_ADDR.
8758
8759 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8760
8761         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8762         if the size of fpscr is larger than 32 bits.
8763
8764 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8765
8766         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8767         (ppc32_linux_vsxregmap): New global.
8768         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8769         regcache_supply_regset, and regcache_collect_regset.
8770         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8771         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8772         (fetch_vsx_register, store_vsx_register): Remove.
8773         (fetch_vsx_registers): Add regno parameter. Get regset using
8774         ppc_linux_vsxregset. Use regset to supply registers.
8775         (store_vsx_registers): Add regno parameter. Get regset using
8776         ppc_linux_vsxregset. Use regset to collect registers.
8777         (fetch_register): Call fetch_vsx_registers instead of
8778         fetch_vsx_register.
8779         (store_register): Call store_vsx_registers instead of
8780         store_vsx_register.
8781         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8782         new regno parameter.
8783         (store_ppc_registers): Call store_vsx_registers with -1 for the
8784         new regno parameter.
8785         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8786         (ppc_collect_vsxregset): Remove.
8787
8788 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8789
8790         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8791         offset fields.
8792         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8793         for vector register offset fields.
8794         (ppc64_fbsd_reg_offsets): Likewise.
8795         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8796         to vector register offset fields.
8797         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8798         to vector register offset fields.
8799         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8800         vector register offset fields.
8801         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8802         initializers for vector register offset fields.
8803         (rs6000_aix64_reg_offsets): Likewise.
8804         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8805         (ppc_supply_vrregset): Remove.
8806         (ppc_collect_vrregset): Remove.
8807         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8808         (ppc_linux_vrregset) : New function.
8809         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8810         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8811         (ppc32_linux_vrregset): Remove.
8812         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8813         and use result instead of ppc32_linux_vrregset.
8814         (ppc32_linux_reg_offsets): Remove initializers for vector register
8815         offset fields.
8816         (ppc64_linux_reg_offsets): Likewise.
8817         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8818         * ppc-linux-nat.c: Include regset.h.
8819         (gdb_vrregset_t): Adjust comment to account for little-endian
8820         mode.
8821         (supply_vrregset, fill_vrregset): Remove.
8822         (fetch_altivec_register, store_altivec_register): Remove.
8823         (fetch_altivec_registers): Add regno parameter. Get regset using
8824         ppc_linux_vrregset. Use regset to supply registers.
8825         (store_altivec_registers): Add regno parameter. Get regset using
8826         ppc_linux_vrregset. Use regset to collect registers.
8827         (fetch_register): Call fetch_altivec_registers instead of
8828         fetch_altivec_register.
8829         (store_register): Call store_altivec_registers instead of
8830         store_altivec_register.
8831         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8832         the new regno parameter.
8833         (store_ppc_registers): Call store_altivec_registers with -1 for
8834         the new regno parameter.
8835
8836 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8837
8838         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8839         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8840         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8841         (gdb_vrregset_t): Change array type size to
8842         PPC_LINUX_SIZEOF_VRREGSET.
8843         (gdb_vsxregset_t): Change array type size to
8844         PPC_LINUX_SIZEOF_VSXREGSET.
8845         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8846         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8847         PPC_LINUX_SIZEOF_VSXREGSET.
8848
8849 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8850
8851         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8852         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8853         nat/ppc-linux.c.
8854         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8855         ppc_linux_target_wordsize with tid.
8856         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8857         wordsize with tid.
8858         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8859         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8860         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8861         tid parameter. Remove static specifier.
8862         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8863         (ppc_linux_target_wordsize): New declaration.
8864
8865 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8866
8867         * arch/ppc-linux-common.c: New file.
8868         * arch/ppc-linux-common.h: New file.
8869         * arch/ppc-linux-tdesc.h: New file.
8870         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8871         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8872         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8873         arch/ppc-linux-tdesc.h.
8874         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8875         arch/ppc-linux-tdesc.h.
8876         (ppc_linux_nat_target::read_description): Remove target
8877         description matching code. Fill a ppc_linux_features struct and
8878         call ppc_linux_match_description with it. Move comment about ISA
8879         2.05 to ppc-linux-common.c.
8880         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8881         arch/ppc-linux-tdesc.h.
8882         (ppc_linux_core_read_description): Remove target description
8883         matching code. Fill a ppc_linux_features struct and call
8884         ppc_linux_match_description with it.
8885         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8886         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8887         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8888         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8889         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8890         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8891         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8892         (tdesc_powerpc_e500l): Remove.
8893
8894 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8895
8896         * ada-lang.c (catch_assert_command): Pass empty string instead
8897         of NULL for excep_string argument.
8898
8899 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8900
8901         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8902         the width of the requested register exceeds the width of the
8903         `ptrace' data type.
8904
8905 2018-05-21  Tom Tromey  <tom@tromey.com>
8906
8907         * printcmd.c (output_command): Remove.
8908         (output_command_const): Rename to output_command.
8909         * valprint.h (output_command): Rename from output_command_const.
8910         * tracepoint.c (trace_dump_actions): Call output_command.
8911
8912 2018-05-21  Tom Tromey  <tom@tromey.com>
8913
8914         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8915         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8916         * ada-lang.h (create_ada_exception_catchpoint): Update.
8917         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8918         std::string.
8919         (create_excep_cond_exprs, ~ada_catchpoint)
8920         (should_stop_exception, print_one_exception)
8921         (print_mention_exception, print_recreate_exception): Update.
8922         (ada_get_next_arg): Remove.
8923         (catch_ada_exception_command_split): Use std::string.  Change type
8924         of "excep_string", "cond_string".
8925         (catch_ada_exception_command): Update.
8926         (create_ada_exception_catchpoint): Change type of excep_string.
8927         (ada_exception_sal): Remove excep_string parameter.
8928         (~ada_catchpoint): Remove.
8929
8930 2018-05-21  Tom Tromey  <tom@tromey.com>
8931
8932         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8933         cleanup.
8934
8935 2018-05-21  Tom Tromey  <tom@tromey.com>
8936
8937         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8938         Return unique_xmalloc_ptr.
8939         (print_it_exception): Update.
8940
8941 2018-05-21  Tom Tromey  <tom@tromey.com>
8942
8943         * tracepoint.c (trace_dump_actions): Use std::string.
8944
8945 2018-05-21  Tom Tromey  <tom@tromey.com>
8946
8947         * symfile.c (reread_symbols): Use std::string for original_name.
8948
8949 2018-05-21  Tom Tromey  <tom@tromey.com>
8950
8951         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8952         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8953         constructor.
8954
8955 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8956
8957         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8958         instance to...
8959         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8960         * objfiles.c (get_objfile_bfd_data): Allocate
8961         objfile_per_bfd_storage with obstack_new when allocating on
8962         obstack.
8963
8964 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8965
8966         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8967         OBSTACK_ZALLOC.
8968         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8969         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8970         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8971         (add_pending): Likewise.
8972         (parse_symbol): Likewise.
8973         (parse_partial_symbols): Likewise.
8974         (psymtab_to_symtab_1): Likewise.
8975         (new_psymtab): Likewise.
8976         (elfmdebug_build_psymtabs): Likewise.
8977         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8978         * objfiles.c (get_objfile_bfd_data): Likewise.
8979         (objfile_register_static_link): Likewise.
8980         * psymtab.c (allocate_psymtab): Likewise.
8981         * stabsread.c (read_member_functions): Likewise.
8982         * xcoffread.c (xcoff_end_psymtab): Likewise.
8983
8984 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8985
8986         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8987         compiler supports std::is_trivially_constructible.
8988         * common/poison.h: Include obstack.h.
8989         (IsMallocable): Define to is_trivially_constructible if the
8990         compiler supports it, define to true_type otherwise.
8991         (xobnew): New.
8992         (XOBNEW): Redefine.
8993         (xobnewvec): New.
8994         (XOBNEWVEC): Redefine.
8995         * gdb_obstack.h (obstack_zalloc): New.
8996         (OBSTACK_ZALLOC): Redefine.
8997         (obstack_calloc): New.
8998         (OBSTACK_CALLOC): Redefine.
8999         (obstack_new): New.
9000         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9001         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9002         gdbarch.c.
9003         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9004         obstack_calloc/obstack_zalloc.
9005         (gdbarch_obstack_zalloc): Remove.
9006         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9007
9008 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9009
9010         * stack.c (backtrace_command_1): Remove useless variable int i.
9011
9012 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9013
9014         * stack.c (print_frame_info): Fix comment.
9015
9016 2018-05-18  Tom Tromey  <tom@tromey.com>
9017
9018         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9019         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9020         (~dwarf2_per_objfile): Update
9021         (dwarf2_get_dwz_file): Use new.
9022         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9023         unique_ptr.
9024
9025 2018-05-18  Tom Tromey  <tom@tromey.com>
9026
9027         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9028         unique_ptr.
9029         * dwarf2read.c (struct dwp_file): Add constructor and
9030         initializers.
9031         (open_and_init_dwp_file): Return a unique_ptr.
9032         (dwarf2_per_objfile, create_dwp_hash_table)
9033         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9034         (lookup_dwo_unit_in_dwp): Update.
9035         (open_and_init_dwp_file, get_dwp_file): Update.
9036
9037 2018-05-18  Tom Tromey  <tom@tromey.com>
9038
9039         * dwarf2read.c (dwarf2_per_objfile): Update.
9040         (struct mapped_index): Add initializers.
9041         (dwarf2_read_index): Use new.
9042         (dw2_symtab_iter_init): Update.
9043         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9044         unique_ptr.
9045
9046 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9047
9048         * dwarf2read.c (mapped_index) <total_size>: Remove.
9049
9050 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9051
9052         * unittests/format_pieces-selftests.c (test_format_specifier):
9053         Add ARI comments.
9054
9055 2018-05-18  Tom Tromey  <tom@tromey.com>
9056
9057         * c-typeprint.c (maybe_print_hole): New function.
9058         (c_print_type_struct_field_offset): Update.
9059         (c_type_print_base_struct_union): Call maybe_print_hole.
9060
9061 2018-05-17  Keith Seitz  <keiths@redhat.com>
9062
9063         * breakpoint.c (build_bpstat_chain): New function, moved from
9064         bpstat_stop_status.
9065         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9066         If no stop chain is passed, call build_bpstat_chain to build it.
9067         * breakpoint.h (build_bpstat_chain): Declare.
9068         (bpstat_stop_status): Move documentation here from breakpoint.c.
9069         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9070         build the stop chain and pass it to skip_inline_frames.
9071         Pass this stop chain to bpstat_stop_status.
9072         * inline-frame.c: Include breakpoint.h.
9073         (stopped_by_user_bp_inline_frame): New function.
9074         (skip_inline_frames): Add parameter `stop_chain'.
9075         Move documention to inline-frame.h.
9076         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9077         whether the frame should be elided.
9078         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9079         Add moved documentation and update for new parameter.
9080
9081 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9082
9083         PR cli/14975
9084         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9085         unittests/format_pieces-selftests.c.
9086         * common/format.h (format_piece) <operator==>: New.
9087         (format_pieces) <operator[]>: Remove.
9088         * common/format.c (format_pieces::format_pieces): Handle \e.
9089         * unittests/format_pieces-selftests.c: New.
9090
9091 2018-05-17  Tom Tromey  <tom@tromey.com>
9092
9093         PR symtab/23010:
9094         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9095         (dw2_instantiate_symtab): Add skip_partial parameter.
9096         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9097         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9098         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9099         (dw2_expand_symtabs_matching_one)
9100         (dw2_find_pc_sect_compunit_symtab)
9101         (dw2_debug_names_lookup_symbol)
9102         (dw2_debug_names_expand_symtabs_for_function): Update.
9103         (init_cutu_and_read_dies): Add skip_partial parameter.
9104         (process_psymtab_comp_unit, build_type_psymtabs_1)
9105         (process_skeletonless_type_unit, load_partial_comp_unit)
9106         (psymtab_to_symtab_1): Update.
9107         (load_full_comp_unit): Add skip_partial parameter.
9108         (process_imported_unit_die, dwarf2_read_addr_index)
9109         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9110         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9111         (read_signatured_type): Update.
9112
9113 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9114
9115         * value.c (release_value): Remove unused variable.
9116         (record_latest_value): Likewise.
9117         (access_value_history): Likewise.
9118         (preserve_values): Likewise.
9119
9120 2018-05-17  Tom Tromey  <tom@tromey.com>
9121
9122         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9123         Initialize.
9124
9125 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9126
9127         PR gdb/22286
9128         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9129         Also handle registers whose width is not a multiple of
9130         PTRACE_TYPE_RET.
9131         (linux_nat_trad_target::store_register): Likewise.
9132
9133 2018-05-16  Tom Tromey  <tom@tromey.com>
9134
9135         * gdbcore.h (core_bfd): Redefine.
9136         * corelow.c (core_target::close): Update.
9137         (core_target_open): Update.
9138         * progspace.h (struct program_space) <cbfd>: Now a
9139         gdb_bfd_ref_ptr.
9140
9141 2018-05-16  Tom Tromey  <tom@tromey.com>
9142
9143         PR cli/19551:
9144         * symfile-add-flags.h (enum symfile_add_flags)
9145         <SYMFILE_NOT_FILENAME>: New constant.
9146         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9147         objfile name from BFD.
9148         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9149         * minidebug.c (find_separate_debug_file_in_section): Put
9150         ".gnu_debugdata" into BFD's file name.
9151
9152 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9153
9154         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9155         Remove.
9156
9157 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9158
9159         PR binutils/21446
9160         * aarch64-tdep.c (aarch64_analyze_prologue,
9161         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9162         Indicate not interested in errors.
9163
9164 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9165
9166         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9167         Supply the MIPS_ZERO_REGNUM register.
9168
9169 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9170
9171         * mips-tdep.c (mask_address_var): Make variable static.
9172
9173 2018-05-14  Tom Tromey  <tom@tromey.com>
9174
9175         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9176
9177 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9178
9179         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9180         FXSAVE_ADDR for the mxcsr register.
9181
9182 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9183
9184         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9185
9186 2018-05-11  Pedro Alves  <palves@redhat.com>
9187
9188         * corelow.c (core_target) <core_target>: No longer inline.
9189         Initialize m_core_gdbarch, m_core_vec and build the section table
9190         here.
9191         <~core_target>: New.
9192         <core_gdbarch, get_core_register_section>: New methods.
9193         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9194         factored out from ...
9195         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9196         (core_ops): Delete.
9197         (sniff_core_bfd): Add gdbarch parameter.
9198         (core_close): Delete, merged into ...
9199         (core_target::close): ... here.  Delete self.
9200         (core_close_cleanup): Delete.
9201         (core_target_open): Allocate a core_target on the heap.  Use a
9202         unique_ptr instead of a cleanup.  Bits moved into the core_target
9203         ctor.  Adjust to use core_target methods instead of globals.
9204         (get_core_register_section): Rename to ...
9205         (core_target::get_core_register_section): ... this and adjust.
9206         (struct get_core_registers_cb_data): New.
9207         (get_core_registers_cb): Use it.  Use bool.
9208         (core_target::fetch_registers, core_target::files_info)
9209         (core_target::xfer_partial, core_target::read_description)
9210         (core_target::pid_to, core_target::thread_name): Adjust to
9211         reference class fields instead of globals.
9212         * target.h (struct target_ops_deleter, target_ops_up): New.
9213
9214 2018-05-11  Pedro Alves  <palves@redhat.com>
9215
9216         * corefile.c (core_file_command): Move to corelow.c.
9217         * corelow.c (the_core_target): Delete.
9218         (core_file_command): Moved from corefile.c.  Check exec_bfd
9219         instead of the_core_target.  Use target_detach instead of calling
9220         into the_core_target directly.
9221         (maybe_say_no_core_file_now): New.
9222         (core_target::detach): Use it.
9223         (_initialize_corelow): Remove references to the_core_target.
9224         * gdbcore.h (the_core_target): Delete.
9225
9226 2018-05-11  Tom Tromey  <tromey@redhat.com>
9227             Pedro Alves  <palves@redhat.com>
9228
9229         * corefile.c (core_bfd): Remove.
9230         * gdbcore.h (core_bfd): Now a macro.
9231         * progspace.h (struct program_space) <cbfd>: New field.
9232
9233 2018-05-11  Tom Tromey  <tom@tromey.com>
9234
9235         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9236         gdb::def_vector.
9237
9238 2018-05-10  Tom Tromey  <tom@tromey.com>
9239
9240         * configure: Rebuild.
9241         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9242
9243 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9244
9245         PR server/23158:
9246         * regformats/regdat.sh: Adjust script, following the addition
9247         of the new expedite_regs parameter to init_target_desc.
9248
9249 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9250     
9251         PR gdb/23127
9252         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9253         set_gdbarch_significant_addr_bit.
9254         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9255         set_gdbarch_significant_addr_bit.
9256         * utils.c (address_significant): Update to sign extend addr.
9257
9258 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9259
9260         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9261         (xtensa_linux_init_abi): Limit tdep->num_regs by
9262         tdep->num_nopriv_regs.
9263         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9264         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9265         not initialized.
9266
9267 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9268
9269         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9270
9271 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9272
9273         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9274         (I387_MXCSR_INIT_VAL): New constant.
9275         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9276         buffer if it was supplied by the inferior.
9277         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9278         (i387_xsave_get_clear_bv): New function.
9279         (i387_supply_xsave): Only read x87 control registers from the
9280         xsave buffer if the feature is enabled, and the state will have
9281         been written, otherwise, provide a suitable default.
9282         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9283         including x87 control registers.  Update control registers if they
9284         have changed from the default value, and mark features as enabled
9285         as required.
9286         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9287
9288 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9289
9290         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9291
9292 2018-05-07  Tom Tromey  <tom@tromey.com>
9293
9294         * configure: Rebuild.
9295         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9296
9297 2018-05-07  Tom Tromey  <tom@tromey.com>
9298
9299         PR tdep/20362:
9300         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9301         bit.  Use correct value for VDIV.
9302
9303 2018-05-04  Tom Tromey  <tom@tromey.com>
9304
9305         * configure: Rebuild.
9306         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9307
9308 2018-05-04  Tom Tromey  <tom@tromey.com>
9309
9310         * linux-record.c (record_linux_system_call) <case
9311         RECORD_SYS_RECVFROM>: Add "break".
9312
9313 2018-05-04  Tom Tromey  <tom@tromey.com>
9314
9315         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9316         Add missing "break".
9317         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9318         Add missing "break".
9319
9320 2018-05-04  Tom Tromey  <tom@tromey.com>
9321
9322         * rs6000-tdep.c (ppc_process_record_op4)
9323         (ppc_process_record_op63): Add fall-through comment.
9324
9325 2018-05-04  Tom Tromey  <tom@tromey.com>
9326
9327         * i386-tdep.c (i386_process_record): Add fall-through comment.
9328
9329 2018-05-04  Tom Tromey  <tom@tromey.com>
9330
9331         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9332         comment.
9333
9334 2018-05-04  Tom Tromey  <tom@tromey.com>
9335
9336         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9337         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9338         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9339         comment.
9340         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9341         comment.
9342         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9343         comment.
9344
9345 2018-05-04  Tom Tromey  <tom@tromey.com>
9346
9347         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9348
9349 2018-05-04  Tom Tromey  <tom@tromey.com>
9350
9351         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9352         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9353         * symfile.c (section_is_mapped): Fix fall-through comment.
9354         * stabsread.c (define_symbol, read_member_functions): Fix
9355         fall-through comment.
9356         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9357         comment.
9358         * remote.c (remote_wait_as): Fix fall-through comment.
9359         * p-exp.y (yylex): Fix fall-through comment.
9360         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9361         comment.
9362         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9363         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9364         * jv-exp.y (yylex): Fix fall-through comment.
9365         * go-exp.y (lex_one_token): Fix fall-through comment.
9366         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9367         fall-through comment.
9368         * f-exp.y (yylex): Fix fall-through comment.
9369         * dwarf2read.c (process_die): Fix fall-through comments.
9370         * dbxread.c (process_one_symbol): Fix fall-through comment.
9371         * d-exp.y (lex_one_token): Fix fall-through comment.
9372         * cp-name-parser.y (yylex): Fix fall-through comment.
9373         * coffread.c (coff_symtab_read): Fix fall-through comment.
9374         * c-exp.y (lex_one_token): Fix fall-through comment.
9375         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9376         comment.
9377         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9378         comment.
9379
9380 2018-05-04  Tom Tromey  <tom@tromey.com>
9381
9382         PR python/22730:
9383         * NEWS: Mention gdb.execute change.
9384         * gdbcmd.h (execute_control_command): Don't declare.
9385         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9386         execute_control_commands, execute_control_commands_to_string.
9387         * cli/cli-script.h (execute_control_commands)
9388         (execute_control_commands_to_string): Declare.
9389         (execute_control_command): Add from_tty parameter.
9390         * cli/cli-script.c (execute_control_commands)
9391         (execute_control_commands_to_string): New functions.
9392         (execute_user_command): Use execute_control_commands.
9393         (execute_control_command_1): Add "from_tty" parameter.  Update.
9394         (execute_control_command): Likewise.
9395
9396 2018-05-04  Tom Tromey  <tom@tromey.com>
9397
9398         PR python/22731:
9399         * NEWS: Mention that breakpoint commands are writable.
9400         * python/py-breakpoint.c (bppy_set_commands): New function.
9401         (breakpoint_object_getset) <"commands">: Use it.
9402
9403 2018-05-04  Tom Tromey  <tom@tromey.com>
9404
9405         * tracepoint.c (actions_command): Update.
9406         * mi/mi-cmd-break.c (mi_command_line_array)
9407         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9408         (mi_read_next_line): Remove.
9409         (mi_cmd_break_commands): Update.
9410         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9411         function_view.
9412         * cli/cli-script.c (get_command_line): Update.
9413         (process_next_line): Use function_view.  Constify.
9414         (recurse_read_control_structure, read_command_lines)
9415         (read_command_lines_1): Change argument types to function_view.
9416         (do_define_command, document_command): Update.
9417         * breakpoint.h (check_tracepoint_command): Don't declare.
9418         * breakpoint.c (check_tracepoint_command): Remove.
9419         (commands_command_1, create_tracepoint_from_upload): Update.
9420
9421 2018-05-04  Tom Tromey  <tom@tromey.com>
9422
9423         PR gdb/11750:
9424         * cli/cli-script.h (enum command_control_type) <define_control>:
9425         New constant.
9426         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9427         (build_command_line, execute_control_command_1)
9428         (process_next_line): Likewise.
9429         (do_define_command): New function, extracted from define_command.
9430         (define_command): Use it.
9431
9432 2018-05-04  Tom Tromey  <tom@tromey.com>
9433
9434         * tracepoint.c (actions_command): Update.
9435         * cli/cli-script.h (read_command_lines): Update.
9436         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9437         (MAX_TMPBUF): Remove define.
9438         (define_command): Use string_printf.
9439         (document_command): Likewise.
9440         * breakpoint.c (commands_command_1): Update.
9441
9442 2018-05-04  Tom Tromey  <tom@tromey.com>
9443
9444         * top.c (execute_command): Update.
9445         * cli/cli-script.h (print_command_lines): Now varargs.
9446         * cli/cli-script.c (print_command_lines): Now varargs.
9447         (execute_control_command_1) <case while_control, case if_control>:
9448         Update.
9449
9450 2018-05-04  Tom Tromey  <tom@tromey.com>
9451
9452         * tracepoint.c (all_tracepoint_actions): Rename from
9453         all_tracepoint_actions_and_cleanup.  Change return type.
9454         (actions_command, encode_actions_1, encode_actions)
9455         (trace_dump_actions, tdump_command): Update.
9456         * remote.c (remote_download_command_source): Update.
9457         * python/python.c (gdbpy_eval_from_control_command)
9458         (python_command, python_interactive_command): Update.
9459         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9460         * guile/guile.c (guile_command)
9461         (gdbscm_eval_from_control_command, guile_command): Update.
9462         * compile/compile.c (compile_code_command)
9463         (compile_print_command, compile_to_object): Update.
9464         * cli/cli-script.h (struct command_lines_deleter): New.
9465         (counted_command_line): New typedef.
9466         (struct command_line): Add constructor, destructor.
9467         <body_list>: Remove.
9468         <body_list_0, body_list_1>: New members.
9469         (command_line_up): Remove typedef.
9470         (read_command_lines, read_command_lines_1, get_command_line):
9471         Update.
9472         (copy_command_lines): Don't declare.
9473         * cli/cli-script.c (build_command_line): Use "new".
9474         (get_command_line): Return counted_command_line.
9475         (print_command_lines, execute_user_command)
9476         (execute_control_command_1, while_command, if_command): Update.
9477         (realloc_body_list): Remove.
9478         (process_next_line, recurse_read_control_structure): Update.
9479         (read_command_lines, read_command_lines_1): Return counted_command_line.
9480         (free_command_lines): Use "delete".
9481         (copy_command_lines): Remove.
9482         (define_command, document_command, show_user_1): Update.
9483         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9484         a counted_command_line.
9485         * breakpoint.h (counted_command_line): Remove typedef.
9486         (breakpoint_set_commands): Update.
9487         * breakpoint.c (check_no_tracepoint_commands)
9488         (validate_commands_for_breakpoint): Update.
9489         (breakpoint_set_commands): Change commands to be a
9490         counted_command_line.
9491         (commands_command_1, update_dprintf_command_list)
9492         (create_tracepoint_from_upload): Update.
9493
9494 2018-05-04  Tom Tromey  <tom@tromey.com>
9495
9496         * cli/cli-decode.h (cmd_list_element): New constructor.
9497         (~cmd_list_element): New destructor.
9498         (struct cmd_list_element): Add initializers.
9499         * cli/cli-decode.c (do_add_cmd): Use "new".
9500         (delete_cmd): Use "delete".
9501
9502 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9503             Pedro Alves <palves@redhat.com>
9504
9505         PR breakpoints/19806 and support for PR external/20207.
9506         * NEWS: Mention Aarch64 watchpoint improvements.
9507         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9508         watchpoints and PR external/20207 watchpoints.
9509         * nat/aarch64-linux-hw-point.c
9510         (kernel_supports_any_contiguous_range): New.
9511         (aarch64_watchpoint_offset): New.
9512         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9513         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9514         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9515         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9516         next_addr_orig_p.  Support PR external/20207 watchpoints.
9517         (aarch64_downgrade_regs): New.
9518         (aarch64_dr_state_insert_one_point): New parameters offset and
9519         addr_orig.
9520         (aarch64_dr_state_remove_one_point): Likewise.
9521         (aarch64_handle_breakpoint): Update caller.
9522         (aarch64_handle_aligned_watchpoint): Likewise.
9523         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9524         aligned_offset.
9525         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9526         aarch64_downgrade_regs.
9527         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9528         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9529         (DR_CONTROL_MASK): ... this.
9530         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9531         (unsigned int aarch64_watchpoint_offset): New prototype.
9532         (aarch64_linux_set_debug_regs): Remove const from state.
9533         * utils.c (align_up, align_down): Move to ...
9534         * common/common-utils.c (align_up, align_down): ... here.
9535         * utils.h (align_up, align_down): Move to ...
9536         * common/common-utils.h (align_up, align_down): ... here.
9537
9538 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9539
9540         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9541         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9542         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9543         Re-implement to match the ABI as summarized in GCC's
9544         gcc/config/sparc/sparc.c.  All callers updated.
9545         (sparc32_store_arguments): Remove assertion.
9546
9547 2018-05-04  Tom Tromey  <tom@tromey.com>
9548
9549         * printcmd.c: Don't include tui.h.
9550         (decode_format): Use skip_spaces.
9551
9552 2018-05-04  Tom Tromey  <tom@tromey.com>
9553
9554         PR gdb/22619:
9555         * printcmd.c (last_count): New global.
9556         (x_command): Use saved count when repeating.
9557
9558 2018-05-04  Tom Tromey  <tom@tromey.com>
9559
9560         * nto-procfs.c (do_closedir_cleanup): Remove.
9561         (procfs_pidlist): Use gdb_dir_up.
9562         * procfs.c (do_closedir_cleanup): Remove.
9563         (proc_update_threads): Use gdb_dir_up.
9564         * common/filestuff.h (struct gdb_dir_deleter): New.
9565         (gdb_dir_up): New typedef.
9566
9567 2018-05-04  Tom Tromey  <tom@tromey.com>
9568
9569         * ada-lang.c (print_mention_exception): Use std::string.
9570
9571 2018-05-04  Tom Tromey  <tom@tromey.com>
9572
9573         * ada-lang.c (create_excep_cond_exprs): Update.
9574         (ada_exception_catchpoint_cond_string): Use std::string.
9575
9576 2018-05-04  Tom Tromey  <tom@tromey.com>
9577
9578         * ada-lang.c (xget_renaming_scope): Return std::string.
9579         (old_renaming_is_invisible): Update.
9580
9581 2018-05-04  Tom Tromey  <tom@tromey.com>
9582
9583         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9584         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9585
9586 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9587
9588         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9589
9590 2018-05-04  Tom Tromey  <tom@tromey.com>
9591
9592         * remote.c (remote_query_supported_append): Change type.
9593         (remote_check_symbols): Update.
9594
9595 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9596
9597         PR gdb/11420
9598         * configure.ac: Prepend libpython.
9599         * python/python-config.py: Likewise.
9600         * configure: Regenerate.
9601
9602 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9603
9604         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9605
9606 2018-05-03  Pedro Alves  <palves@redhat.com>
9607
9608         * s390-linux-nat.c
9609         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9610         override.  Write 'true' instead of '1'.
9611         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9612         declaration.
9613
9614 2018-05-02  Pedro Alves  <palves@redhat.com>
9615
9616         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9617         add_inf_child_target.
9618         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9619         add_inf_child_target.
9620         * aix-thread.c (aix_thread_target_info): New.
9621         (aix_thread_target) <shortname, longname, doc>: Delete.
9622         <info>: New.
9623         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9624         add_inf_child_target.
9625         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9626         add_inf_child_target.
9627         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9628         add_inf_child_target.
9629         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9630         add_inf_child_target.
9631         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9632         add_inf_child_target.
9633         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9634         add_inf_child_target.
9635         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9636         add_inf_child_target.
9637         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9638         add_inf_child_target.
9639         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9640         add_inf_child_target.
9641         * bfd-target.c (target_bfd_target_info): New.
9642         (target_bfd) <shortname, longname, doc>: Delete.
9643         <info>: New.
9644         * bsd-kvm.c (bsd_kvm_target_info): New.
9645         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9646         <info>: New.
9647         (bsd_kvm_target::open): Rename to ...
9648         (bsd_kvm_target_open): ... this.  Adjust.
9649         * bsd-uthread.c (bsd_uthread_target_info): New.
9650         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9651         <info>: New.
9652         * corefile.c (core_file_command): Adjust.
9653         * corelow.c (core_target_info): New.
9654         (core_target) <shortname, longname, doc>: Delete.
9655         <info>: New.
9656         (core_target::open): Rename to ...
9657         (core_target_open): ... this.  Adjust.
9658         * ctf.c (ctf_target_info): New.
9659         (ctf_target) <shortname, longname, doc>: Delete.
9660         <info>: New.
9661         (ctf_target::open): Rename to ...
9662         (ctf_target_open): ... this.
9663         (_initialize_ctf): Adjust.
9664         * exec.c (exec_target_info): New.
9665         (exec_target) <shortname, longname, doc>: Delete.
9666         <info>: New.
9667         (exec_target::open): Rename to ...
9668         (exec_target_open): ... this.
9669         * gdbcore.h (core_target_open): Declare.
9670         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9671         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9672         add_inf_child_target.
9673         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9674         add_inf_child_target.
9675         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9676         add_inf_child_target.
9677         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9678         add_inf_child_target.
9679         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9680         add_inf_child_target.
9681         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9682         add_inf_child_target.
9683         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9684         add_inf_child_target.
9685         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9686         add_inf_child_target.
9687         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9688         add_inf_child_target.
9689         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9690         add_inf_child_target.
9691         * inf-child.c (inf_child_target_info): New.
9692         (inf_child_target::info): New.
9693         (inf_child_open_target): Remove 'target' parameter.  Use
9694         get_native_target instead.
9695         (inf_child_target::open): Delete.
9696         (add_inf_child_target): New.
9697         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9698         Delete.
9699         <info>: New.
9700         (add_inf_child_target): Declare.
9701         (inf_child_open_target): Declare.
9702         * linux-thread-db.c (thread_db_target_info): New.
9703         (thread_db_target) <shortname, longname, doc>: Delete.
9704         <info>: New.
9705         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9706         add_inf_child_target.
9707         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9708         add_inf_child_target.
9709         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9710         add_inf_child_target.
9711         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9712         add_inf_child_target.
9713         * make-target-delegates (print_class): Adjust.
9714         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9715         add_inf_child_target.
9716         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9717         add_inf_child_target.
9718         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9719         add_inf_child_target.
9720         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9721         add_inf_child_target.
9722         * nto-procfs.c (nto_native_target_info): New.
9723         (nto_procfs_target_native) <shortname, longname, doc>:
9724         Delete.
9725         <info>: New.
9726         (nto_procfs_target_info): New.
9727         (nto_procfs_target_procfs) <shortname, longname, doc>:
9728         Delete.
9729         <info>: New.
9730         (init_procfs_targets): Adjust.
9731         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9732         add_inf_child_target.
9733         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9734         add_inf_child_target.
9735         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9736         add_inf_child_target.
9737         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9738         add_inf_child_target.
9739         * ravenscar-thread.c (ravenscar_target_info): New.
9740         (ravenscar_thread_target) <shortname, longname, doc>:
9741         Delete.
9742         <info>: New.
9743         * record-btrace.c (record_btrace_target_info):
9744         (record_btrace_target) <shortname, longname, doc>: Delete.
9745         <info>: New.
9746         (record_btrace_target::open): Rename to ...
9747         (record_btrace_target_open): ... this.  Adjust.
9748         * record-full.c (record_longname, record_doc): New.
9749         (record_full_base_target) <shortname, longname, doc>: Delete.
9750         <info>: New.
9751         (record_full_target_info): New.
9752         (record_full_target): <shortname>: Delete.
9753         <info>: New.
9754         (record_full_core_open_1, record_full_open_1): Update comments.
9755         (record_full_base_target::open): Rename to ...
9756         (record_full_open): ... this.
9757         (cmd_record_full_restore): Update.
9758         (_initialize_record_full): Update.
9759         * remote-sim.c (remote_sim_target_info): New.
9760         (gdbsim_target) <shortname, longname, doc>: Delete.
9761         <info>: New.
9762         (gdbsim_target::open): Rename to ...
9763         (gdbsim_target_open): ... this.
9764         (_initialize_remote_sim): Adjust.
9765         * remote.c (remote_doc): New.
9766         (remote_target_info): New.
9767         (remote_target) <shortname, longname, doc>: Delete.
9768         <info>: New.
9769         (extended_remote_target_info): New.
9770         (extended_remote_target) <shortname, longname, doc>: Delete.
9771         <info>: New.
9772         (remote_target::open_1): Make static.  Adjust.
9773         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9774         * s390-linux-nat.c (_initialize_s390_nat): Use
9775         add_inf_child_target.
9776         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9777         add_inf_child_target.
9778         * sol-thread.c (thread_db_target_info): New.
9779         (sol_thread_target) <shortname, longname, doc>: Delete.
9780         <info>: New.
9781         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9782         add_inf_child_target.
9783         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9784         add_inf_child_target.
9785         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9786         add_inf_child_target.
9787         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9788         add_inf_child_target.
9789         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9790         add_inf_child_target.
9791         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9792         add_inf_child_target.
9793         * spu-linux-nat.c (_initialize_spu_nat): Use
9794         add_inf_child_target.
9795         * spu-multiarch.c (spu_multiarch_target_info): New.
9796         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9797         <info>: New.
9798         * target-delegates.c: Regenerate.
9799         * target.c: Include <unordered_map>.
9800         (target_ops_p): Delete.
9801         (DEF_VEC_P(target_ops_p)): Delete.
9802         (target_factories): New.
9803         (test_target_info): New.
9804         (test_target_ops::info): New.
9805         (open_target): Adjust to use target_factories.
9806         (add_target_with_completer): Rename to ...
9807         (add_target): ... this.  Change prototype.  Register target_info
9808         and open callback in target_factories.  Register target_info in
9809         command context instead of target_ops.
9810         (add_target): Delete old implementation.
9811         (add_deprecated_target_alias): Change prototype.  Adjust.
9812         (the_native_target): New.
9813         (set_native_target, get_native_target): New.
9814         (find_default_run_target): Use the_native_target.
9815         (find_attach_target, find_run_target): Simplify.
9816         (target_ops::open): Delete.
9817         (dummy_target_info): New.
9818         (dummy_target::shortname, dummy_target::longname)
9819         (dummy_target::doc): Delete.
9820         (dummy_target::info): New.
9821         (debug_target::shortname, debug_target::longname)
9822         (debug_target::doc): Delete.
9823         (debug_target::info): New.
9824         * target.h (struct target_info): New.
9825         (target_ops::~target_ops): Add comment.
9826         (target_ops::info): New.
9827         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9828         longer virtual.  Implement in terms of target_info.
9829         (set_native_target, get_native_target): Declare.
9830         (target_open_ftype): New.
9831         (add_target, add_target_with_completer)
9832         (add_deprecated_target_alias): Change prototype.
9833         (test_target) <shortname, longname, doc>: Delete.
9834         <info>: New.
9835         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9836         add_inf_child_target.
9837         * tracefile-tfile.c (tfile_target_info): New.
9838         (tfile_target) <shortname, longname, doc>: Delete.
9839         <info>: New.
9840         (tfile_target::open): Rename to ...
9841         (tfile_target_open): ... this.
9842         (_initialize_tracefile_tfile): Adjust.
9843         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9844         add_inf_child_target.
9845         * windows-nat.c (_initialize_windows_nat): Use
9846         add_inf_child_target.
9847         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9848         add_inf_child_target.
9849
9850 2018-05-02  Pedro Alves  <palves@redhat.com>
9851
9852         * linux-nat.h (linux_nat_target) <low_new_thread,
9853         low_delete_thread, low_new_fork, low_forget_process,
9854         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9855         New virtual methods.
9856         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9857         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9858         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9859         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9860         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9861         Delete.
9862         * linux-fork.c (delete_fork): Adjust to call low method.
9863         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9864         (linux_nat_new_fork, linux_nat_forget_process_hook)
9865         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9866         (linux_nat_status_is_event):
9867         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9868         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9869         to call low method.
9870         (sigtrap_is_event): Rename to ...
9871         (linux_nat_target::low_status_is_event): ... this.
9872         (linux_nat_set_status_is_event): Delete.
9873         (save_stop_reason, linux_nat_wait_1)
9874         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9875         low methods.
9876         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9877         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9878         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9879         (linux_nat_set_prepare_to_resume): Delete.
9880         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9881         low virtual methods.
9882         * amd64-linux-nat.c: Likewise.
9883         * arm-linux-nat.c: Likewise.
9884         * i386-linux-nat.c: Likewise.
9885         * ia64-linux-nat.c: Likewise.
9886         * mips-linux-nat.c: Likewise.
9887         * ppc-linux-nat.c: Likewise.
9888         * s390-linux-nat.c: Likewise.
9889         * sparc64-linux-nat.c: Likewise.
9890         * x86-linux-nat.c: Likewise.
9891         * x86-linux-nat.h: Include "nat/x86-linux.h".
9892         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9893         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9894         Override methods.
9895
9896 2018-05-02  Pedro Alves  <palves@redhat.com>
9897
9898         * target.h (target_ops)
9899         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9900         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9901         stopped_by_watchpoint, have_continuable_watchpoint,
9902         stopped_data_address, watchpoint_addr_within_range,
9903         can_accel_watchpoint_condition, can_run, thread_alive,
9904         has_all_memory, has_memory, has_stack, has_registers,
9905         has_execution, can_async_p, is_async_p, supports_non_stop,
9906         always_non_stop_p, can_execute_reverse, supports_multi_process,
9907         supports_enable_disable_tracepoint,
9908         supports_disable_randomization, supports_string_tracing,
9909         supports_evaluation_of_breakpoint_conditions,
9910         can_run_breakpoint_commands, filesystem_is_local,
9911         can_download_tracepoint, get_trace_state_variable_value,
9912         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9913         record_is_replaying, record_will_replay,
9914         augmented_libraries_svr4_read>: Adjust to return bool.
9915         * aarch64-linux-nat.c: All implementations adjusted.
9916         * aix-thread.c: All implementations adjusted.
9917         * arm-linux-nat.c: All implementations adjusted.
9918         * breakpoint.c: All implementations adjusted.
9919         * bsd-kvm.c: All implementations adjusted.
9920         * bsd-uthread.c: All implementations adjusted.
9921         * corelow.c: All implementations adjusted.
9922         * ctf.c: All implementations adjusted.
9923         * darwin-nat.c: All implementations adjusted.
9924         * darwin-nat.h: All implementations adjusted.
9925         * exec.c: All implementations adjusted.
9926         * fbsd-nat.c: All implementations adjusted.
9927         * fbsd-nat.h: All implementations adjusted.
9928         * gnu-nat.c: All implementations adjusted.
9929         * gnu-nat.h: All implementations adjusted.
9930         * go32-nat.c: All implementations adjusted.
9931         * ia64-linux-nat.c: All implementations adjusted.
9932         * inf-child.c: All implementations adjusted.
9933         * inf-child.h: All implementations adjusted.
9934         * inf-ptrace.c: All implementations adjusted.
9935         * inf-ptrace.h: All implementations adjusted.
9936         * linux-nat.c: All implementations adjusted.
9937         * linux-nat.h: All implementations adjusted.
9938         * mips-linux-nat.c: All implementations adjusted.
9939         * nto-procfs.c: All implementations adjusted.
9940         * ppc-linux-nat.c: All implementations adjusted.
9941         * procfs.c: All implementations adjusted.
9942         * ravenscar-thread.c: All implementations adjusted.
9943         * record-btrace.c: All implementations adjusted.
9944         * record-full.c: All implementations adjusted.
9945         * remote-sim.c: All implementations adjusted.
9946         * remote.c: All implementations adjusted.
9947         * s390-linux-nat.c: All implementations adjusted.
9948         * sol-thread.c: All implementations adjusted.
9949         * spu-multiarch.c: All implementations adjusted.
9950         * target-delegates.c: All implementations adjusted.
9951         * target.c: All implementations adjusted.
9952         * target.h: All implementations adjusted.
9953         * tracefile-tfile.c: All implementations adjusted.
9954         * tracefile.c: All implementations adjusted.
9955         * tracefile.h: All implementations adjusted.
9956         * windows-nat.c: All implementations adjusted.
9957         * x86-linux-nat.h: All implementations adjusted.
9958         * x86-nat.h: All implementations adjusted.
9959
9960 2018-05-02  Pedro Alves  <palves@redhat.com>
9961
9962         * make-target-delegates (scan_target_h): Don't trim lines here.
9963         Replace sequences of tabs and/or whitespace with a single
9964         whitespace.
9965         (top level, parsing methods): Trim each line before processing it
9966         here.
9967
9968 2018-05-02  Pedro Alves  <palves@redhat.com>
9969             John Baldwin  <jhb@freebsd.org>
9970
9971         * target.h (enum strata) <debug_stratum>: New.
9972         (struct target_ops) <all delegation methods>: Replace by C++
9973         virtual methods, and drop "to_" prefix.  All references updated
9974         throughout.
9975         <to_shortname, to_longname, to_doc, to_data,
9976         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9977         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9978         virtual methods.  All references updated throughout.
9979         <can_attach, supports_terminal_ours, can_create_inferior,
9980         get_thread_control_capabilities, attach_no_wait>: New
9981         virtual methods.
9982         <insert_breakpoint, remove_breakpoint>: Now
9983         TARGET_DEFAULT_NORETURN methods.
9984         <info_proc>: Now returns bool.
9985         <to_magic>: Delete.
9986         (OPS_MAGIC): Delete.
9987         (current_target): Delete.  All references replaced by references
9988         to ...
9989         (target_stack): ... this.  New.
9990         (target_shortname, target_longname): Adjust.
9991         (target_can_run): Now a function declaration.
9992         (default_child_has_all_memory, default_child_has_memory)
9993         (default_child_has_stack, default_child_has_registers)
9994         (default_child_has_execution): Remove target_ops parameter.
9995         (complete_target_initialization): Delete.
9996         (memory_breakpoint_target): New template class.
9997         (test_target_ops): Refactor as a C++ class with virtual methods.
9998         * make-target-delegates (NAME_PART): Tighten.
9999         (POINTER_PART, CP_SYMBOL): New.
10000         (SIMPLE_RETURN_PART): Reimplement.
10001         (VEC_RETURN_PART): Expect less.
10002         (RETURN_PART, VIRTUAL_PART): New.
10003         (METHOD): Adjust to C++ virtual methods.
10004         (scan_target_h): Remove reference to C99.
10005         (dname): Output "target_ops::" prefix.
10006         (write_function_header): Adjust to output a C++ class method.
10007         (write_declaration): New.
10008         (write_delegator): Adjust to output a C++ class method.
10009         (tdname): Output "dummy_target::" prefix.
10010         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10011         method.
10012         (tdefault_names, debug_names): Delete.
10013         (return_types, tdefaults, styles, argtypes_array): New.
10014         (top level): All methods are delegators.
10015         (print_class): New.
10016         (top level): Print dummy_target and debug_target classes.
10017         * target-delegates.c: Regenerate.
10018         * target-debug.h (target_debug_print_enum_info_proc_what)
10019         (target_debug_print_thread_control_capabilities)
10020         (target_debug_print_thread_info_p): New.
10021         * target.c (dummy_target): Delete.
10022         (the_dummy_target, the_debug_target): New.
10023         (target_stack): Now extern.
10024         (set_targetdebug): Push/unpush debug target.
10025         (default_child_has_all_memory, default_child_has_memory)
10026         (default_child_has_stack, default_child_has_registers)
10027         (default_child_has_execution): Remove target_ops parameter.
10028         (complete_target_initialization): Delete.
10029         (add_target_with_completer): No longer call
10030         complete_target_initialization.
10031         (target_supports_terminal_ours): Use regular delegation.
10032         (update_current_target): Delete.
10033         (push_target): No longer check magic number.  Don't call
10034         update_current_target.
10035         (unpush_target): Don't call update_current_target.
10036         (target_is_pushed): No longer check magic number.
10037         (target_require_runnable): Skip for all stratums over
10038         process_stratum.
10039         (target_ops::info_proc): New.
10040         (target_info_proc): Use find_target_at and
10041         find_default_run_target.
10042         (target_supports_disable_randomization): Use regular delegation.
10043         (target_get_osdata): Use find_target_at.
10044         (target_ops::open, target_ops::close, target_ops::can_attach)
10045         (target_ops::attach, target_ops::can_create_inferior)
10046         (target_ops::create_inferior, target_ops::can_run)
10047         (target_can_run): New.
10048         (default_fileio_target): Use regular delegation.
10049         (target_ops::fileio_open, target_ops::fileio_pwrite)
10050         (target_ops::fileio_pread, target_ops::fileio_fstat)
10051         (target_ops::fileio_close, target_ops::fileio_unlink)
10052         (target_ops::fileio_readlink): New.
10053         (target_fileio_open_1, target_fileio_unlink)
10054         (target_fileio_readlink): Always call the target method.  Handle
10055         FILEIO_ENOSYS.
10056         (return_zero, return_zero_has_execution): Delete.
10057         (init_dummy_target): Delete.
10058         (dummy_target::dummy_target, dummy_target::shortname)
10059         (dummy_target::longname, dummy_target::doc)
10060         (debug_target::debug_target, debug_target::shortname)
10061         (debug_target::longname, debug_target::doc): New.
10062         (target_supports_delete_record): Use regular delegation.
10063         (setup_target_debug): Delete.
10064         (maintenance_print_target_stack): Skip debug_stratum.
10065         (initialize_targets): Instantiate the_dummy_target and
10066         the_debug_target.
10067         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10068         use target_stack.
10069         (target_auxv_search, fprint_target_auxv): Adjust.
10070         (info_auxv_command): Adjust to use target_stack.
10071         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10072         * exceptions.c (print_flush): Handle a NULL target_stack.
10073         * regcache.c (target_ops_no_register): Refactor as class with
10074         virtual methods.
10075
10076         * exec.c (exec_target): New class.
10077         (exec_ops): Now an exec_target.
10078         (exec_open, exec_close_1, exec_get_section_table)
10079         (exec_xfer_partial, exec_files_info, exec_has_memory)
10080         (exec_make_note_section): Refactor as exec_target methods.
10081         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10082         Delete.
10083         (exec_target::find_memory_regions): New.
10084         (_initialize_exec): Don't call init_exec_ops.
10085         * gdbcore.h (exec_file_clear): Delete.
10086
10087         * corefile.c (core_target): Delete.
10088         (core_file_command): Adjust.
10089         * corelow.c (core_target): New class.
10090         (the_core_target): New.
10091         (core_close): Remove target_ops parameter.
10092         (core_close_cleanup): Adjust.
10093         (core_target::close): New.
10094         (core_open, core_detach, get_core_registers, core_files_info)
10095         (core_xfer_partial, core_thread_alive, core_read_description)
10096         (core_pid_to_str, core_thread_name, core_has_memory)
10097         (core_has_stack, core_has_registers, core_info_proc): Rework as
10098         core_target methods.
10099         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10100         (_initialize_corelow): Initialize the_core_target.
10101         * gdbcore.h (core_target): Delete.
10102         (the_core_target): New.
10103
10104         * ctf.c: (ctf_target): New class.
10105         (ctf_ops): Now a ctf_target.
10106         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10107         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10108         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10109         methods.
10110         (init_ctf_ops): Delete.
10111         (_initialize_ctf): Don't call it.
10112         * tracefile-tfile.c (tfile_target): New class.
10113         (tfile_ops): Now a tfile_target.
10114         (tfile_open, tfile_close, tfile_files_info)
10115         (tfile_get_tracepoint_status, tfile_trace_find)
10116         (tfile_fetch_registers, tfile_xfer_partial)
10117         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10118         Refactor as tfile_target methods.
10119         (tfile_xfer_partial_features): Remove target_ops parameter.
10120         (init_tfile_ops): Delete.
10121         (_initialize_tracefile_tfile): Don't call it.
10122         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10123         (tracefile_has_stack, tracefile_has_registers)
10124         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10125         tracefile_target methods.
10126         (init_tracefile_ops): Delete.
10127         (tracefile_target::tracefile_target): New.
10128         * tracefile.h: Include "target.h".
10129         (tracefile_target): New class.
10130         (init_tracefile_ops): Delete.
10131
10132         * spu-multiarch.c (spu_multiarch_target): New class.
10133         (spu_ops): Now a spu_multiarch_target.
10134         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10135         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10136         (spu_search_memory, spu_mourn_inferior): Refactor as
10137         spu_multiarch_target methods.
10138         (init_spu_ops): Delete.
10139         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10140         complete_target_initialization.
10141
10142         * ravenscar-thread.c (ravenscar_thread_target): New class.
10143         (ravenscar_ops): Now a ravenscar_thread_target.
10144         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10145         (ravenscar_thread_alive, ravenscar_pid_to_str)
10146         (ravenscar_fetch_registers, ravenscar_store_registers)
10147         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10148         (ravenscar_stopped_by_hw_breakpoint)
10149         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10150         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10151         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10152         methods.
10153         (init_ravenscar_thread_ops): Delete.
10154         (_initialize_ravenscar): Remove references to
10155         init_ravenscar_thread_ops and complete_target_initialization.
10156
10157         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10158         (bsd_uthread_target): New class.
10159         (bsd_uthread_ops): Now a bsd_uthread_target.
10160         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10161         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10162         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10163         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10164         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10165         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10166         (bsd_uthread_target): Delete function.
10167         (_initialize_bsd_uthread): Remove reference to
10168         complete_target_initialization.
10169
10170         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10171         (target_bfd): ... this new class.
10172         (target_bfd_xfer_partial, target_bfd_get_section_table)
10173         (target_bfd_close): Refactor as target_bfd methods.
10174         (target_bfd::~target_bfd): New.
10175         (target_bfd_reopen): Adjust.
10176         (target_bfd::close): New.
10177
10178         * record-btrace.c (record_btrace_target): New class.
10179         (record_btrace_ops): Now a record_btrace_target.
10180         (record_btrace_open, record_btrace_stop_recording)
10181         (record_btrace_disconnect, record_btrace_close)
10182         (record_btrace_async, record_btrace_info)
10183         (record_btrace_insn_history, record_btrace_insn_history_range)
10184         (record_btrace_insn_history_from, record_btrace_call_history)
10185         (record_btrace_call_history_range)
10186         (record_btrace_call_history_from, record_btrace_record_method)
10187         (record_btrace_is_replaying, record_btrace_will_replay)
10188         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10189         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10190         (record_btrace_store_registers, record_btrace_prepare_to_store)
10191         (record_btrace_to_get_unwinder)
10192         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10193         (record_btrace_commit_resume, record_btrace_wait)
10194         (record_btrace_stop, record_btrace_can_execute_reverse)
10195         (record_btrace_stopped_by_sw_breakpoint)
10196         (record_btrace_supports_stopped_by_sw_breakpoint)
10197         (record_btrace_stopped_by_hw_breakpoint)
10198         (record_btrace_supports_stopped_by_hw_breakpoint)
10199         (record_btrace_update_thread_list, record_btrace_thread_alive)
10200         (record_btrace_goto_begin, record_btrace_goto_end)
10201         (record_btrace_goto, record_btrace_stop_replaying_all)
10202         (record_btrace_execution_direction)
10203         (record_btrace_prepare_to_generate_core)
10204         (record_btrace_done_generating_core): Refactor as
10205         record_btrace_target methods.
10206         (init_record_btrace_ops): Delete.
10207         (_initialize_record_btrace): Remove reference to
10208         init_record_btrace_ops.
10209         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10210         the execution_direction global.
10211         (record_full_base_target, record_full_target)
10212         (record_full_core_target): New classes.
10213         (record_full_ops): Now a record_full_target.
10214         (record_full_core_ops): Now a record_full_core_target.
10215         (record_full_target::detach, record_full_target::disconnect)
10216         (record_full_core_target::disconnect)
10217         (record_full_target::mourn_inferior, record_full_target::kill):
10218         New.
10219         (record_full_open, record_full_close, record_full_async): Refactor
10220         as methods of the record_full_base_target class.
10221         (record_full_resume, record_full_commit_resume): Refactor
10222         as methods of the record_full_target class.
10223         (record_full_wait, record_full_stopped_by_watchpoint)
10224         (record_full_stopped_data_address)
10225         (record_full_stopped_by_sw_breakpoint)
10226         (record_full_supports_stopped_by_sw_breakpoint)
10227         (record_full_stopped_by_hw_breakpoint)
10228         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10229         methods of the record_full_base_target class.
10230         (record_full_store_registers, record_full_xfer_partial)
10231         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10232         Refactor as methods of the record_full_target class.
10233         (record_full_can_execute_reverse, record_full_get_bookmark)
10234         (record_full_goto_bookmark, record_full_execution_direction)
10235         (record_full_record_method, record_full_info, record_full_delete)
10236         (record_full_is_replaying, record_full_will_replay)
10237         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10238         (record_full_stop_replaying): Refactor as methods of the
10239         record_full_base_target class.
10240         (record_full_core_resume, record_full_core_kill)
10241         (record_full_core_fetch_registers)
10242         (record_full_core_prepare_to_store)
10243         (record_full_core_store_registers, record_full_core_xfer_partial)
10244         (record_full_core_insert_breakpoint)
10245         (record_full_core_remove_breakpoint)
10246         (record_full_core_has_execution): Refactor
10247         as methods of the record_full_core_target class.
10248         (record_full_base_target::supports_delete_record): New.
10249         (init_record_full_ops): Delete.
10250         (init_record_full_core_ops): Delete.
10251         (record_full_save): Refactor as method of the
10252         record_full_base_target class.
10253         (_initialize_record_full): Remove references to
10254         init_record_full_ops and init_record_full_core_ops.
10255
10256         * remote.c (remote_target, extended_remote_target): New classes.
10257         (remote_ops): Now a remote_target.
10258         (extended_remote_ops): Now an extended_remote_target.
10259         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10260         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10261         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10262         (remote_pass_signals, remote_set_syscall_catchpoint)
10263         (remote_program_signals, )
10264         (remote_thread_always_alive): Remove target_ops parameter.
10265         (remote_thread_alive, remote_thread_name)
10266         (remote_update_thread_list, remote_threads_extra_info)
10267         (remote_static_tracepoint_marker_at)
10268         (remote_static_tracepoint_markers_by_strid)
10269         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10270         (remote_open): Refactor as methods of remote_target.
10271         (extended_remote_open, extended_remote_detach)
10272         (extended_remote_attach, extended_remote_post_attach):
10273         (extended_remote_supports_disable_randomization)
10274         (extended_remote_create_inferior): : Refactor as method of
10275         extended_remote_target.
10276         (remote_set_permissions, remote_open_1, remote_detach)
10277         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10278         (remote_resume, remote_commit_resume, remote_stop)
10279         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10280         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10281         (remote_prepare_to_store, remote_store_registers)
10282         (remote_flash_erase, remote_flash_done, remote_files_info)
10283         (remote_kill, remote_mourn, remote_insert_breakpoint)
10284         (remote_remove_breakpoint, remote_insert_watchpoint)
10285         (remote_watchpoint_addr_within_range)
10286         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10287         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10288         (remote_supports_stopped_by_sw_breakpoint)
10289         (remote_stopped_by_hw_breakpoint)
10290         (remote_supports_stopped_by_hw_breakpoint)
10291         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10292         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10293         (remote_verify_memory): Refactor as methods of remote_target.
10294         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10295         parameter.
10296         (remote_xfer_partial, remote_get_memory_xfer_limit)
10297         (remote_search_memory, remote_rcmd, remote_memory_map)
10298         (remote_pid_to_str, remote_get_thread_local_address)
10299         (remote_get_tib_address, remote_read_description): Refactor as
10300         methods of remote_target.
10301         (remote_target::fileio_open, remote_target::fileio_pwrite)
10302         (remote_target::fileio_pread, remote_target::fileio_close): New.
10303         (remote_hostio_readlink, remote_hostio_fstat)
10304         (remote_filesystem_is_local, remote_can_execute_reverse)
10305         (remote_supports_non_stop, remote_supports_disable_randomization)
10306         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10307         (remote_supports_enable_disable_tracepoint)
10308         (remote_supports_string_tracing)
10309         (remote_can_run_breakpoint_commands, remote_trace_init)
10310         (remote_download_tracepoint, remote_can_download_tracepoint)
10311         (remote_download_trace_state_variable, remote_enable_tracepoint)
10312         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10313         (remote_trace_start, remote_get_trace_status)
10314         (remote_get_tracepoint_status, remote_trace_stop)
10315         (remote_trace_find, remote_get_trace_state_variable_value)
10316         (remote_save_trace_data, remote_get_raw_trace_data)
10317         (remote_set_disconnected_tracing, remote_core_of_thread)
10318         (remote_set_circular_trace_buffer, remote_traceframe_info)
10319         (remote_get_min_fast_tracepoint_insn_len)
10320         (remote_set_trace_buffer_size, remote_set_trace_notes)
10321         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10322         (remote_disable_btrace, remote_teardown_btrace)
10323         (remote_read_btrace, remote_btrace_conf)
10324         (remote_augmented_libraries_svr4_read, remote_load)
10325         (remote_pid_to_exec_file, remote_can_do_single_step)
10326         (remote_execution_direction, remote_thread_handle_to_thread_info):
10327         Refactor as methods of remote_target.
10328         (init_remote_ops, init_extended_remote_ops): Delete.
10329         (remote_can_async_p, remote_is_async_p, remote_async)
10330         (remote_thread_events, remote_upload_tracepoints)
10331         (remote_upload_trace_state_variables): Refactor as methods of
10332         remote_target.
10333         (_initialize_remote): Remove references to init_remote_ops and
10334         init_extended_remote_ops.
10335
10336         * remote-sim.c (gdbsim_target): New class.
10337         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10338         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10339         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10340         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10341         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10342         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10343         Refactor as methods of gdbsim_target.
10344         (gdbsim_ops): Now a gdbsim_target.
10345         (init_gdbsim_ops): Delete.
10346         (gdbsim_cntrl_c): Adjust.
10347         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10348
10349         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10350         (the_amd64_linux_nat_target): New.
10351         (amd64_linux_fetch_inferior_registers)
10352         (amd64_linux_store_inferior_registers): Refactor as methods of
10353         amd64_linux_nat_target.
10354         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10355         * i386-linux-nat.c: Don't include "linux-nat.h".
10356         (i386_linux_nat_target): New class.
10357         (the_i386_linux_nat_target): New.
10358         (i386_linux_fetch_inferior_registers)
10359         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10360         as methods of i386_linux_nat_target.
10361         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10362         * inf-child.c (inf_child_ops): Delete.
10363         (inf_child_fetch_inferior_registers)
10364         (inf_child_store_inferior_registers): Delete.
10365         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10366         methods of inf_child_target.
10367         (inf_child_target::supports_terminal_ours)
10368         (inf_child_target::terminal_init)
10369         (inf_child_target::terminal_inferior)
10370         (inf_child_target::terminal_ours_for_output)
10371         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10372         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10373         New.
10374         (inf_child_open, inf_child_disconnect, inf_child_close)
10375         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10376         (inf_child_post_startup_inferior, inf_child_can_run)
10377         (inf_child_pid_to_exec_file): Refactor as methods of
10378         inf_child_target.
10379         (inf_child_follow_fork): Delete.
10380         (inf_child_target::can_create_inferior)
10381         (inf_child_target::can_attach): New.
10382         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10383         (inf_child_target::has_stack, inf_child_target::has_registers)
10384         (inf_child_target::has_execution): New.
10385         (inf_child_fileio_open, inf_child_fileio_pwrite)
10386         (inf_child_fileio_pread, inf_child_fileio_fstat)
10387         (inf_child_fileio_close, inf_child_fileio_unlink)
10388         (inf_child_fileio_readlink, inf_child_use_agent)
10389         (inf_child_can_use_agent): Refactor as methods of
10390         inf_child_target.
10391         (return_zero, inf_child_target): Delete.
10392         (inf_child_target::inf_child_target): New.
10393         * inf-child.h: Include "target.h".
10394         (inf_child_target): Delete function prototype.
10395         (inf_child_target): New class.
10396         (inf_child_open_target, inf_child_mourn_inferior)
10397         (inf_child_maybe_unpush_target): Delete.
10398         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10399         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10400         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10401         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10402         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10403         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10404         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10405         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10406         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10407         methods of inf_ptrace_target.
10408         (inf_ptrace_target): Delete function.
10409         * inf-ptrace.h: Include "inf-child.h".
10410         (inf_ptrace_target): Delete function declaration.
10411         (inf_ptrace_target): New class.
10412         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10413         * linux-nat.c (linux_target): New.
10414         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10415         (linux_nat_target::~linux_nat_target): New.
10416         (linux_child_post_attach, linux_child_post_startup_inferior)
10417         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10418         (linux_child_remove_fork_catchpoint)
10419         (linux_child_insert_vfork_catchpoint)
10420         (linux_child_remove_vfork_catchpoint)
10421         (linux_child_insert_exec_catchpoint)
10422         (linux_child_remove_exec_catchpoint)
10423         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10424         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10425         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10426         (linux_nat_stopped_data_address)
10427         (linux_nat_stopped_by_sw_breakpoint)
10428         (linux_nat_supports_stopped_by_sw_breakpoint)
10429         (linux_nat_stopped_by_hw_breakpoint)
10430         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10431         (linux_nat_kill, linux_nat_mourn_inferior)
10432         (linux_nat_xfer_partial, linux_nat_thread_alive)
10433         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10434         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10435         (linux_child_static_tracepoint_markers_by_strid)
10436         (linux_nat_is_async_p, linux_nat_can_async_p)
10437         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10438         (linux_nat_supports_multi_process)
10439         (linux_nat_supports_disable_randomization, linux_nat_async)
10440         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10441         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10442         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10443         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10444         methods of linux_nat_target.
10445         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10446         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10447         parameter.
10448         (check_stopped_by_watchpoint): Adjust.
10449         (linux_xfer_partial): Delete.
10450         (linux_target_install_ops, linux_target, linux_nat_add_target):
10451         Delete.
10452         (linux_nat_target::linux_nat_target): New.
10453         * linux-nat.h: Include "inf-ptrace.h".
10454         (linux_nat_target): New.
10455         (linux_target, linux_target_install_ops, linux_nat_add_target):
10456         Delete function declarations.
10457         (linux_target): Declare global.
10458         * linux-thread-db.c (thread_db_target): New.
10459         (thread_db_target::thread_db_target): New.
10460         (thread_db_ops): Delete.
10461         (the_thread_db_target): New.
10462         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10463         (thread_db_update_thread_list, thread_db_pid_to_str)
10464         (thread_db_extra_thread_info)
10465         (thread_db_thread_handle_to_thread_info)
10466         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10467         (thread_db_resume): Refactor as methods of thread_db_target.
10468         (init_thread_db_ops): Delete.
10469         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10470         * x86-linux-nat.c: Don't include "linux-nat.h".
10471         (super_post_startup_inferior): Delete.
10472         (x86_linux_nat_target::~x86_linux_nat_target): New.
10473         (x86_linux_child_post_startup_inferior)
10474         (x86_linux_read_description, x86_linux_enable_btrace)
10475         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10476         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10477         methods of x86_linux_nat_target.
10478         (x86_linux_create_target): Delete.  Bits folded ...
10479         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10480         pointer.
10481         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10482         (x86_linux_nat_target): New class.
10483         (x86_linux_create_target): Delete.
10484         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10485         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10486         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10487         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10488         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10489         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10490         make extern.
10491         (x86_use_watchpoints): Delete.
10492         * x86-nat.h: Include "breakpoint.h" and "target.h".
10493         (x86_use_watchpoints): Delete.
10494         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10495         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10496         (x86_insert_watchpoint, x86_remove_watchpoint)
10497         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10498         (x86_stopped_by_hw_breakpoint): New declarations.
10499         (x86_nat_target): New template class.
10500
10501         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10502         (the_ppc_linux_nat_target): New.
10503         (ppc_linux_fetch_inferior_registers)
10504         (ppc_linux_can_use_hw_breakpoint)
10505         (ppc_linux_region_ok_for_hw_watchpoint)
10506         (ppc_linux_ranged_break_num_registers)
10507         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10508         (ppc_linux_insert_mask_watchpoint)
10509         (ppc_linux_remove_mask_watchpoint)
10510         (ppc_linux_can_accel_watchpoint_condition)
10511         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10512         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10513         (ppc_linux_watchpoint_addr_within_range)
10514         (ppc_linux_masked_watch_num_registers)
10515         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10516         (ppc_linux_read_description): Refactor as methods of
10517         ppc_linux_nat_target.
10518         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10519
10520         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10521         (procfs_target): New class.
10522         (the_procfs_target): New.
10523         (procfs_target): Delete function.
10524         (procfs_auxv_parse, procfs_attach, procfs_detach)
10525         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10526         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10527         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10528         (procfs_create_inferior, procfs_update_thread_list)
10529         (procfs_thread_alive, procfs_pid_to_str)
10530         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10531         (procfs_stopped_data_address, procfs_insert_watchpoint)
10532         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10533         (proc_find_memory_regions, procfs_info_proc)
10534         (procfs_make_note_section): Refactor as methods of procfs_target.
10535         (_initialize_procfs): Adjust.
10536         * sol-thread.c (sol_thread_target): New class.
10537         (sol_thread_ops): Now a sol_thread_target.
10538         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10539         (sol_thread_fetch_registers, sol_thread_store_registers)
10540         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10541         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10542         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10543         (init_sol_thread_ops): Delete.
10544         (_initialize_sol_thread): Adjust.  Remove references to
10545         init_sol_thread_ops and complete_target_initialization.
10546
10547         * windows-nat.c (windows_nat_target): New class.
10548         (windows_fetch_inferior_registers)
10549         (windows_store_inferior_registers, windows_resume, windows_wait)
10550         (windows_attach, windows_detach, windows_pid_to_exec_file)
10551         (windows_files_info, windows_create_inferior)
10552         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10553         (windows_close, windows_pid_to_str, windows_xfer_partial)
10554         (windows_get_tib_address, windows_get_ada_task_ptid)
10555         (windows_thread_name, windows_thread_alive): Refactor as
10556         windows_nat_target methods.
10557         (do_initial_windows_stuff): Adjust.
10558         (windows_target): Delete function.
10559         (_initialize_windows_nat): Adjust.
10560
10561         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10562         (darwin_mourn_inferior, darwin_kill_inferior)
10563         (darwin_create_inferior, darwin_attach, darwin_detach)
10564         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10565         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10566         (darwin_supports_multi_process): Refactor as darwin_nat_target
10567         methods.
10568         (darwin_resume_to, darwin_files_info): Delete.
10569         (_initialize_darwin_inferior): Rename to ...
10570         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10571         * darwin-nat.h: Include "inf-child.h".
10572         (darwin_nat_target): New class.
10573         (darwin_complete_target): Delete.
10574         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10575         (darwin_target): New.
10576         (i386_darwin_fetch_inferior_registers)
10577         (i386_darwin_store_inferior_registers): Refactor as methods of
10578         darwin_nat_target.
10579         (darwin_complete_target): Delete, with ...
10580         (_initialize_i386_darwin_nat): ... bits factored out here.
10581
10582         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10583         (the_alpha_linux_nat_target): New.
10584         (alpha_linux_register_u_offset): Refactor as
10585         alpha_linux_nat_target method.
10586         (_initialize_alpha_linux_nat): Adjust.
10587         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10588         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10589         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10590         methods of linux_nat_trad_target.
10591         (linux_trad_target): Delete.
10592         * linux-nat-trad.h (linux_trad_target): Delete function.
10593         (linux_nat_trad_target): New class.
10594         * mips-linux-nat.c (mips_linux_nat_target): New class.
10595         (super_fetch_registers, super_store_registers, super_close):
10596         Delete.
10597         (the_mips_linux_nat_target): New.
10598         (mips64_linux_regsets_fetch_registers)
10599         (mips64_linux_regsets_store_registers)
10600         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10601         (mips_linux_register_u_offset, mips_linux_read_description)
10602         (mips_linux_can_use_hw_breakpoint)
10603         (mips_linux_stopped_by_watchpoint)
10604         (mips_linux_stopped_data_address)
10605         (mips_linux_region_ok_for_hw_watchpoint)
10606         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10607         (mips_linux_close): Refactor as methods of mips_linux_nat.
10608         (_initialize_mips_linux_nat): Adjust to C++ification.
10609
10610         * aix-thread.c (aix_thread_target): New class.
10611         (aix_thread_ops): Now an aix_thread_target.
10612         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10613         (aix_thread_fetch_registers, aix_thread_store_registers)
10614         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10615         (aix_thread_thread_alive, aix_thread_pid_to_str)
10616         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10617         Refactor as methods of aix_thread_target.
10618         (init_aix_thread_ops): Delete.
10619         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10620         and complete_target_initialization.
10621         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10622         (rs6000_nat_target): New class.
10623         (the_rs6000_nat_target): New.
10624         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10625         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10626         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10627         (super_create_inferior): Delete.
10628         (_initialize_rs6000_nat): Adjust to C++ification.
10629
10630         * arm-linux-nat.c (arm_linux_nat_target): New class.
10631         (the_arm_linux_nat_target): New.
10632         (arm_linux_fetch_inferior_registers)
10633         (arm_linux_store_inferior_registers, arm_linux_read_description)
10634         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10635         (arm_linux_remove_hw_breakpoint)
10636         (arm_linux_region_ok_for_hw_watchpoint)
10637         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10638         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10639         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10640         arm_linux_nat_target.
10641         (_initialize_arm_linux_nat): Adjust to C++ification.
10642
10643         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10644         (the_aarch64_linux_nat_target): New.
10645         (aarch64_linux_fetch_inferior_registers)
10646         (aarch64_linux_store_inferior_registers)
10647         (aarch64_linux_child_post_startup_inferior)
10648         (aarch64_linux_read_description)
10649         (aarch64_linux_can_use_hw_breakpoint)
10650         (aarch64_linux_insert_hw_breakpoint)
10651         (aarch64_linux_remove_hw_breakpoint)
10652         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10653         (aarch64_linux_region_ok_for_hw_watchpoint)
10654         (aarch64_linux_stopped_data_address)
10655         (aarch64_linux_stopped_by_watchpoint)
10656         (aarch64_linux_watchpoint_addr_within_range)
10657         (aarch64_linux_can_do_single_step): Refactor as methods of
10658         aarch64_linux_nat_target.
10659         (super_post_startup_inferior): Delete.
10660         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10661
10662         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10663         (the_hppa_linux_nat_target): New.
10664         (hppa_linux_fetch_inferior_registers)
10665         (hppa_linux_store_inferior_registers): Refactor as methods of
10666         hppa_linux_nat_target.
10667         (_initialize_hppa_linux_nat): Adjust to C++ification.
10668
10669         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10670         (the_ia64_linux_nat_target): New.
10671         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10672         (ia64_linux_stopped_data_address)
10673         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10674         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10675         ia64_linux_nat_target methods.
10676         (super_xfer_partial): Delete.
10677         (_initialize_ia64_linux_nat): Adjust to C++ification.
10678
10679         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10680         (the_m32r_linux_nat_target): New.
10681         (m32r_linux_fetch_inferior_registers)
10682         (m32r_linux_store_inferior_registers): Refactor as
10683         m32r_linux_nat_target methods.
10684         (_initialize_m32r_linux_nat): Adjust to C++ification.
10685
10686         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10687         (the_m68k_linux_nat_target): New.
10688         (m68k_linux_fetch_inferior_registers)
10689         (m68k_linux_store_inferior_registers): Refactor as
10690         m68k_linux_nat_target methods.
10691         (_initialize_m68k_linux_nat): Adjust to C++ification.
10692
10693         * s390-linux-nat.c (s390_linux_nat_target): New class.
10694         (the_s390_linux_nat_target): New.
10695         (s390_linux_fetch_inferior_registers)
10696         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10697         (s390_insert_watchpoint, s390_remove_watchpoint)
10698         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10699         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10700         (s390_auxv_parse, s390_read_description): Refactor as methods of
10701         s390_linux_nat_target.
10702         (_initialize_s390_nat): Adjust to C++ification.
10703
10704         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10705         (the_sparc_linux_nat_target): New.
10706         (_initialize_sparc_linux_nat): Adjust to C++ification.
10707         * sparc-nat.c (sparc_fetch_inferior_registers)
10708         (sparc_store_inferior_registers): Remove target_ops parameter.
10709         * sparc-nat.h (sparc_fetch_inferior_registers)
10710         (sparc_store_inferior_registers): Remove target_ops parameter.
10711         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10712         (the_sparc64_linux_nat_target): New.
10713         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10714
10715         * spu-linux-nat.c (spu_linux_nat_target): New class.
10716         (the_spu_linux_nat_target): New.
10717         (spu_child_post_startup_inferior, spu_child_post_attach)
10718         (spu_child_wait, spu_fetch_inferior_registers)
10719         (spu_store_inferior_registers, spu_xfer_partial)
10720         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10721         methods.
10722         (_initialize_spu_nat): Adjust to C++ification.
10723
10724         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10725         (the_tilegx_linux_nat_target): New.
10726         (fetch_inferior_registers, store_inferior_registers):
10727         Refactor as methods.
10728         (_initialize_tile_linux_nat): Adjust to C++ification.
10729
10730         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10731         (the_xtensa_linux_nat_target): New.
10732         (xtensa_linux_fetch_inferior_registers)
10733         (xtensa_linux_store_inferior_registers): Refactor as
10734         xtensa_linux_nat_target methods.
10735         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10736
10737         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10738         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10739         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10740         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10741         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10742         (fbsd_stopped_by_sw_breakpoint)
10743         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10744         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10745         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10746         (fbsd_post_startup_inferior, fbsd_post_attach)
10747         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10748         (fbsd_set_syscall_catchpoint)
10749         (super_xfer_partial, super_resume, super_wait)
10750         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10751         (fbsd_handle_debug_trap): Remove target_ops parameter.
10752         (fbsd_nat_add_target): Delete.
10753         * fbsd-nat.h: Include "inf-ptrace.h".
10754         (fbsd_nat_add_target): Delete.
10755         (USE_SIGTRAP_SIGINFO): Define.
10756         (fbsd_nat_target): New class.
10757
10758         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10759         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10760         (amd64bsd_target): Delete.
10761         * amd64-bsd-nat.h: New file.
10762         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10763         "x86-bsd-nat.h".
10764         (amd64_fbsd_nat_target): New class.
10765         (the_amd64_fbsd_nat_target): New.
10766         (amd64fbsd_read_description): Refactor as method of
10767         amd64_fbsd_nat_target.
10768         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10769         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10770         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10771         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10772         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10773         (i386bsd_target): Delete.
10774         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10775         (i386bsd_fetch_inferior_registers)
10776         (i386bsd_store_inferior_registers): Declare.
10777         (i386_bsd_nat_target): New class.
10778         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10779         (the_i386_fbsd_nat_target): New.
10780         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10781         i386_fbsd_nat_target methods.
10782         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10783         (_initialize_i386fbsd_nat): Adjust to C++ification.
10784         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10785         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10786         (_initialize_x86_bsd_nat): Adjust to C++ification.
10787         * x86-bsd-nat.h: Include "x86-nat.h".
10788         (x86bsd_target): Delete declaration.
10789         (x86bsd_nat_target): New class.
10790
10791         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10792         (the_aarch64_fbsd_nat_target): New.
10793         (aarch64_fbsd_fetch_inferior_registers)
10794         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10795         aarch64_fbsd_nat_target.
10796         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10797         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10798         (the_alpha_bsd_nat_target): New.
10799         (alphabsd_fetch_inferior_registers)
10800         (alphabsd_store_inferior_registers): Refactor as
10801         alpha_bsd_nat_target methods.
10802         (_initialize_alphabsd_nat): Refactor as methods of
10803         alpha_bsd_nat_target.
10804         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10805         (the_amd64_nbsd_nat_target): New.
10806         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10807         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10808         (the_amd64_obsd_nat_target): New.
10809         (_initialize_amd64obsd_nat): Adjust to C++ification.
10810         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10811         (the_arm_fbsd_nat_target): New.
10812         (arm_fbsd_fetch_inferior_registers)
10813         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10814         (_initialize_arm_fbsd_nat): Refactor as methods of
10815         arm_fbsd_nat_target.
10816         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10817         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10818         (the_arm_netbsd_nat_target): New.
10819         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10820         arm_netbsd_nat_target.
10821         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10822         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10823         (the_hppa_nbsd_nat_target): New.
10824         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10825         hppa_nbsd_nat_target methods.
10826         (_initialize_hppanbsd_nat): Adjust to C++ification.
10827         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10828         (the_hppa_obsd_nat_target): New.
10829         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10830         methods of hppa_obsd_nat_target.
10831         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10832         add_target.
10833         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10834         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10835         add_target.
10836         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10837         (_initialize_i386obsd_nat): Use add_target.
10838         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10839         (the_m68k_bsd_nat_target): New.
10840         (m68kbsd_fetch_inferior_registers)
10841         (m68kbsd_store_inferior_registers): Refactor as methods of
10842         m68k_bsd_nat_target.
10843         (_initialize_m68kbsd_nat): Adjust to C++ification.
10844         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10845         (the_mips_fbsd_nat_target): New.
10846         (mips_fbsd_fetch_inferior_registers)
10847         (mips_fbsd_store_inferior_registers): Refactor as methods of
10848         mips_fbsd_nat_target.
10849         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10850         add_target.
10851         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10852         (the_mips_nbsd_nat_target): New.
10853         (mipsnbsd_fetch_inferior_registers)
10854         (mipsnbsd_store_inferior_registers): Refactor as methods of
10855         mips_nbsd_nat_target.
10856         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10857         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10858         (the_mips64_obsd_nat_target): New.
10859         (mips64obsd_fetch_inferior_registers)
10860         (mips64obsd_store_inferior_registers): Refactor as methods of
10861         mips64_obsd_nat_target.
10862         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10863         add_target.
10864         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10865         nbsd_nat_target.
10866         * nbsd-nat.h: Include "inf-ptrace.h".
10867         (nbsd_nat_target): New class.
10868         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10869         (obsd_wait): Refactor as methods of obsd_nat_target.
10870         (obsd_add_target): Delete.
10871         * obsd-nat.h: Include "inf-ptrace.h".
10872         (obsd_nat_target): New class.
10873         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10874         (the_ppc_fbsd_nat_target): New.
10875         (ppcfbsd_fetch_inferior_registers)
10876         (ppcfbsd_store_inferior_registers): Refactor as methods of
10877         ppc_fbsd_nat_target.
10878         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10879         add_target.
10880         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10881         (the_ppc_nbsd_nat_target): New.
10882         (ppcnbsd_fetch_inferior_registers)
10883         (ppcnbsd_store_inferior_registers): Refactor as methods of
10884         ppc_nbsd_nat_target.
10885         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10886         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10887         (the_ppc_obsd_nat_target): New.
10888         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10889         methods of ppc_obsd_nat_target.
10890         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10891         add_target.
10892         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10893         (the_sh_nbsd_nat_target): New.
10894         (shnbsd_fetch_inferior_registers)
10895         (shnbsd_store_inferior_registers): Refactor as methods of
10896         sh_nbsd_nat_target.
10897         (_initialize_shnbsd_nat): Adjust to C++ification.
10898         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10899         (inf_ptrace_xfer_partial): Delete.
10900         (sparc_xfer_partial, sparc_target): Delete.
10901         * sparc-nat.h (sparc_fetch_inferior_registers)
10902         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10903         (sparc_target): Delete function declaration.
10904         (sparc_target): New template class.
10905         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10906         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10907         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10908         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10909         add_target.
10910         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10911         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10912         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10913         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10914         add_target.
10915         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10916         (the_vax_bsd_nat_target): New.
10917         (vaxbsd_fetch_inferior_registers)
10918         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10919         methods.
10920         (_initialize_vaxbsd_nat): Adjust to C++ification.
10921
10922         * bsd-kvm.c (bsd_kvm_target): New class.
10923         (bsd_kvm_ops): Now a bsd_kvm_target.
10924         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10925         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10926         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10927         bsd_kvm_target.
10928         (bsd_kvm_return_one): Delete.
10929         (bsd_kvm_add_target): Adjust to C++ification.
10930
10931         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10932         (nto_procfs_target_procfs): New classes.
10933         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10934         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10935         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10936         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10937         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10938         (procfs_remove_hw_breakpoint, procfs_resume)
10939         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10940         (procfs_kill_inferior, procfs_store_registers)
10941         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10942         as methods of nto_procfs_target.
10943         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10944         (nto_native_ops): Delete.
10945         (procfs_open, procfs_native_open): Delete.
10946         (nto_native_ops): Now an nto_procfs_target_native.
10947         (init_procfs_targets): Adjust to C++ification.
10948         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10949         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10950         Refactor as methods of nto_procfs_target.
10951
10952         * go32-nat.c (go32_nat_target): New class.
10953         (the_go32_nat_target): New.
10954         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10955         (go32_store_registers, go32_xfer_partial, go32_files_info)
10956         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10957         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10958         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10959         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10960         (go32_target): Delete.
10961         (_initialize_go32_nat): Adjust to C++ification.
10962
10963         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10964         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10965         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10966         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10967         gnu_nat_target.
10968         (gnu_target): Delete.
10969         * gnu-nat.h (gnu_target): Delete.
10970         (gnu_nat_target): New class.
10971         * i386-gnu-nat.c (gnu_base_target): New.
10972         (i386_gnu_nat_target): New class.
10973         (the_i386_gnu_nat_target): New.
10974         (_initialize_i386gnu_nat): Adjust to C++ification.
10975
10976 2018-05-02  Pedro Alves  <palves@redhat.com>
10977
10978         * bfd-target.c (target_bfd_xclose): Rename to ...
10979         (target_bfd_close): ... this.
10980         (target_bfd_reopen): Adjust.
10981         * target.c (target_close): Remove references to to_xclose.
10982         * target.h (target_ops::to_xclose): Delete.
10983         (target_ops::to_close): Update comments.
10984
10985 2018-05-02  Pedro Alves  <palves@redhat.com>
10986
10987         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10988         "linux-nat.h".
10989         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10990         * inf-ptrace.c (inf_ptrace_register_u_offset)
10991         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10992         (inf_ptrace_store_register, inf_ptrace_store_registers)
10993         (inf_ptrace_trad_target): Move to ...
10994         * linux-nat-trad.c: ... this new file.
10995         * linux-nat-trad.h: New file.
10996         * linux-nat.c (linux_target_install_ops): Make extern.
10997         (linux_trad_target): Delete.
10998         * linux-nat.h (linux_trad_target): Delete declaration.
10999         (linux_target_install_ops): Declare.
11000         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11001         "linux-nat.h".
11002
11003 2018-05-02  Pedro Alves  <palves@redhat.com>
11004
11005         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11006         procfs_target/add_target here.
11007         * procfs.c (procfs_target): Make static.
11008         (_initialize_procfs): Call add_target here.
11009         * procfs.h (struct target_ops): Remove forward declaration.
11010         (procfs_target): Remove declaration.
11011         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11012
11013 2018-05-02  Pedro Alves  <palves@redhat.com>
11014
11015         * procfs.c (procfs_stopped_by_watchpoint)
11016         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11017         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11018         Forward declare.
11019         (procfs_use_watchpoints): Delete, move contents...
11020         (procfs_target): ... here.
11021         * procfs.h (procfs_use_watchpoints): Delete declaration.
11022         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11023         procfs_use_watchpoints.
11024         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11025         procfs_use_watchpoints.
11026
11027 2018-05-02  Tom Tromey  <tom@tromey.com>
11028
11029         PR python/20084:
11030         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11031         and var_zuinteger_unlimited.
11032         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11033         and PARAM_ZUINTEGER_UNLIMITED.
11034         (set_parameter_value): Handle var_zuinteger and
11035         var_zuinteger_unlimited.
11036         (add_setshow_generic): Likewise.
11037         (parmpy_init): Likewise.
11038
11039 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11040
11041         PR rust/23124
11042         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11043         pointer is not null before dereferencing it.
11044
11045 2018-04-30  Tom Tromey  <tom@tromey.com>
11046
11047         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11048         is_mi_like_p.
11049
11050 2018-04-30  Tom Tromey  <tom@tromey.com>
11051
11052         * breakpoint.c (mention): Remove use of is_mi_like_p.
11053         (print_mention_ranged_breakpoint): Likewise.
11054         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11055         of is_mi_like_p.
11056
11057 2018-04-30  Tom Tromey  <tom@tromey.com>
11058
11059         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11060
11061 2018-04-30  Tom Tromey  <tom@tromey.com>
11062
11063         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11064         (info_spu_event_command): Remove some uses of is_mi_like_p.
11065
11066 2018-04-30  Tom Tromey  <tom@tromey.com>
11067
11068         * python/py-framefilter.c (py_print_single_arg)
11069         (enumerate_locals, py_print_args, py_print_frame): Remove some
11070         uses of is_mi_like_p.
11071
11072 2018-04-30  Tom Tromey  <tom@tromey.com>
11073
11074         * ui-out.c: Update.
11075         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11076         * ui-out.h (ui_out::is_mi_like_p): Now const.
11077         (ui_out::do_is_mi_like_p): Now const.
11078         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11079
11080 2018-04-30  Tom Tromey  <tom@tromey.com>
11081
11082         * varobj.c (varobj_set_visualizer): Use new_reference.
11083         * python/python.c (gdbpy_decode_line): Use new_reference.
11084         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11085         new_reference.
11086
11087 2018-04-30  Tom Tromey  <tom@tromey.com>
11088
11089         * varobj.c (install_new_value): Use new_reference.
11090         * value.h (value_incref): Return void.  Swap intro comment with
11091         value_decref.
11092         * value.c (set_value_parent): Use new_reference.
11093         (value_incref): Return void.  Update intro comment.
11094         (release_value): Use new_reference.
11095         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11096
11097 2018-04-30  Tom Tromey  <tom@tromey.com>
11098
11099         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11100         * gdb_bfd.h (new_bfd_ref): Remove.
11101         (gdb_bfd_open): Update comment.
11102         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11103         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11104         (gdb_bfd_fdopenr): Use new_reference.
11105         * exec.c (exec_file_attach): Use new_reference.
11106
11107 2018-04-30  Tom Tromey  <tom@tromey.com>
11108
11109         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11110         method.
11111
11112 2018-04-30  Tom Tromey  <tom@tromey.com>
11113
11114         * jit.c (jit_read_code_entry): Use type_align.
11115         * i386-tdep.c (i386_gdbarch_init): Don't call
11116         set_gdbarch_long_long_align_bit.
11117         * gdbarch.sh: Remove long_long_align_bit.
11118         * gdbarch.c, gdbarch.h: Rebuild.
11119         * arc-tdep.c (arc_type_align): New function.
11120         (arc_gdbarch_init): Use arc_type_align.  Don't call
11121         set_gdbarch_long_long_align_bit.
11122
11123 2018-04-30  Tom Tromey  <tom@tromey.com>
11124
11125         * rust-lang.c (rust_type_alignment): Remove.
11126         (rust_composite_type): Use type_align.
11127
11128 2018-04-30  Tom Tromey  <tom@tromey.com>
11129
11130         * NEWS: Mention Type.align.
11131         * python/py-type.c (typy_get_alignof): New function.
11132         (type_object_getset): Add "alignof".
11133
11134 2018-04-30  Tom Tromey  <tom@tromey.com>
11135
11136         PR exp/17095:
11137         * NEWS: Update.
11138         * std-operator.def (UNOP_ALIGNOF): New operator.
11139         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11140         New.
11141         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11142         * c-lang.c (c_op_print_tab): Add alignof.
11143         * c-exp.y (ALIGNOF): New token.
11144         (exp): Add "ALIGNOF" production.
11145         (ident_tokens): Add _Alignof and alignof.
11146
11147 2018-04-30  Tom Tromey  <tom@tromey.com>
11148
11149         * i386-tdep.c (i386_type_align): New function.
11150         (i386_gdbarch_init): Update.
11151         * gdbarch.sh (type_align): New method.
11152         * gdbarch.c, gdbarch.h: Rebuild.
11153         * arch-utils.h (default_type_align): Declare.
11154         * arch-utils.c (default_type_align): New function.
11155         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11156         (struct type) <align_log2>: New field.
11157         <instance_flags>: Now a bitfield.
11158         (TYPE_RAW_ALIGN): New macro.
11159         (type_align, type_raw_align, set_type_align): Declare.
11160         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11161         functions.
11162         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11163         (get_alignment, maybe_set_alignment): New functions.
11164         (read_structure_type, read_enumeration_type, read_array_type)
11165         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11166         (read_subrange_type, read_base_type): Set type alignment.
11167
11168 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11169
11170         * dwarf2read.c (read_index_from_section): Use bool.
11171
11172 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11173
11174         PR gdb/22950
11175         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11176         with #ifdef.
11177
11178 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11179
11180         PR build/22873
11181         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11182         last step, and do it atomically.
11183
11184 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11185
11186         * compile/compile-c-types.c (convert_int, convert_float):
11187         Update for C FE v1.
11188
11189 2018-04-27  Tom Tromey  <tom@tromey.com>
11190
11191         PR rust/22545:
11192         * rust-lang.c (rust_inclusive_range_type_p): New function.
11193         (rust_range): Handle inclusive ranges.
11194         (rust_compute_range): Likewise.
11195         * rust-exp.y (struct rust_op) <inclusive>: New field.
11196         (DOTDOTEQ): New constant.
11197         (range_expr): Add "..=" productions.
11198         (operator_tokens): Add "..=" token.
11199         (ast_range): Add "inclusive" parameter.
11200         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11201         ranges.
11202         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11203         bounds values.
11204         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11205         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11206         Update comments.
11207         * expprint.c (print_subexp_standard): Handle new bounds values.
11208         (dump_subexp_body_standard): Likewise.
11209
11210 2018-04-27  Tom Tromey  <tom@tromey.com>
11211
11212         * configure: Rebuild.
11213         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11214         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11215         "OVERRIDE".
11216         (class symbol_needs_eval_context): Likewise.
11217         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11218         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11219         "virtual".
11220         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11221         "override".
11222         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11223         * aarch64-tdep.c (instruction_reader::read): Use "override".
11224         (instruction_reader_test::read): Likewise.
11225         * arm-tdep.c (instruction_reader::read): Use "override".
11226         (instruction_reader_thumb::read): Likewise.
11227
11228 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11229
11230         PR remote/9665
11231         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11232         instead of remote_send.
11233         (remote_send): Remove.
11234
11235 2018-04-26  Pedro Alves  <palves@redhat.com>
11236
11237         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11238         find_function_start_sal instead of find_pc_line.
11239
11240 2018-04-26  Pedro Alves  <palves@redhat.com>
11241
11242         * breakpoint.c (set_breakpoint_location_function): Handle
11243         mst_data_gnu_ifunc.
11244         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11245         * elfread.c (elf_symtab_read): Give data symbols with
11246         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11247         (elf_rel_plt_read): Update comment.
11248         * linespec.c (convert_linespec_to_sals): Handle
11249         mst_data_gnu_ifunc.
11250         (minsym_found): Handle mst_data_gnu_ifunc.
11251         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11252         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11253         * parse.c (find_minsym_type_and_address): Handle
11254         mst_data_gnu_ifunc.
11255         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11256         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11257         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11258         comment.
11259         <mst_data_gnu_ifunc>: New enumerator.
11260
11261 2018-04-26  Pedro Alves  <palves@redhat.com>
11262
11263         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11264         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11265         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11266         Handle it.
11267         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11268         (lookup_minimal_symbol_by_pc): Adjust.
11269         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11270         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11271         * minsyms.h (lookup_msym_prefer): New enum.
11272         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11273         parameter by a lookup_msym_prefer parameter.
11274
11275 2018-04-26  Pedro Alves  <palves@redhat.com>
11276
11277         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11278         ends in "@plt" instead of looking at the symbol's section.
11279
11280 2018-04-26  Pedro Alves  <palves@redhat.com>
11281
11282         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11283         all references.
11284         (find_pc_partial_function_gnu_ifunc): Rename to ...
11285         (find_pc_partial_function): ... this, and remove references to
11286         'is_gnu_ifunc_p'.
11287         (find_pc_partial_function): Delete old implementation.
11288         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11289
11290 2018-04-26  Pedro Alves  <palves@redhat.com>
11291
11292         * linespec.c (struct bound_minimal_symbol_search_key): New.
11293         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11294         skip first line if we found a GNU ifunc minimal symbol by name.
11295         (compare_msymbols): Change parameters to work with a destructured
11296         lhs minsym.
11297         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11298         functions.
11299
11300 2018-04-26  Pedro Alves  <palves@redhat.com>
11301
11302         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11303         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11304         address/name.
11305         (add_location_to_breakpoint): Store the minsym and the objfile in
11306         the breakpoint location.
11307         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11308         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11309         Record the minsym in the sal.
11310         * symtab.h (symtab_and_line) <msymbol>: New field.
11311
11312 2018-04-26  Pedro Alves  <palves@redhat.com>
11313
11314         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11315         unless we actually resolved the ifunc.
11316
11317 2018-04-26  Pedro Alves  <palves@redhat.com>
11318
11319         * c-exp.y (variable production): Prefer ifunc minsyms over
11320         regular function symbols.
11321         * symtab.c (find_gnu_ifunc): New function.
11322         * minsyms.h (lookup_msym_prefer): New enum.
11323         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11324         parameter by a lookup_msym_prefer parameter.
11325         * symtab.h (find_gnu_ifunc): New declaration.
11326
11327 2018-04-26  Pedro Alves  <palves@redhat.com>
11328
11329         * blockframe.c (find_gnu_ifunc_target_type): New function.
11330         (find_function_type): New.
11331         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11332         return a value with a memory address.
11333         (eval_call): For calls to GNU ifunc functions, try to find the
11334         type of the target function from the type that the resolver
11335         returns.
11336         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11337         symbols.
11338         * infcall.c (find_function_return_type): Delete.
11339         (find_function_addr): Add 'function_type' parameter.  For calls to
11340         GNU ifunc functions, try to find the type of the target function
11341         from the type that the resolver returns, and return it via
11342         FUNCTION_TYPE.
11343         (call_function_by_hand_dummy): Adjust to use the function type
11344         returned by find_function_addr.
11345         (find_function_addr): Add 'function_type' parameter and move
11346         description here.
11347         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11348         declarations.
11349
11350 2018-04-26  Pedro Alves  <palves@redhat.com>
11351
11352         * c-exp.y (variable production): Skip finding an alias for ifunc
11353         symbols.
11354
11355 2018-04-26  Pedro Alves  <palves@redhat.com>
11356
11357         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11358
11359 2018-04-25  Pedro Alves  <palves@redhat.com>
11360
11361         * infcmd.c (kill_command): Print the pid as string, not the whole
11362         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11363         message.
11364         * remote.c (remote_detach_1): Print the pid as string, not the
11365         whole thread's ptid.
11366
11367 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11368             Sergio Durigan Junior  <sergiodj@redhat.com>
11369             Pedro Alves  <palves@redhat.com>
11370
11371         * infcmd.c (kill_command): Print message when inferior has
11372         been killed.
11373         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11374         '1'.
11375         (add_inferior): Improve message printed when
11376         'print_inferior_events' is on.
11377         (exit_inferior): Remove message printed when
11378         'print_inferior_events' is on.
11379         (detach_inferior): Improve message printed when
11380         'print_inferior_events' is on.
11381         (initialize_inferiors): Use 'add_inferior_silent' to set
11382         'current_inferior_'.
11383         * inferior.h (print_inferior_events): Declare here as
11384         'extern'.
11385         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11386         '[Detaching...]' messages when 'print_inferior_events' is on.
11387         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11388         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11389         'Detaching after fork from child...', replace it by '... from
11390         parent...'.
11391         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11392         prefix/suffix when printing 'Detaching...' messages.  Print
11393         them when 'print_inferior_events' is on.
11394         * remote.c (remote_detach_1): Print message when detaching
11395         from inferior and '!is_fork_parent'.
11396
11397 2018-04-24  Tom Tromey  <tom@tromey.com>
11398
11399         * cli-out.h: Reindent.
11400
11401 2018-04-24  Tom Tromey  <tom@tromey.com>
11402
11403         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11404         (cli_ui_out::do_field_string): Use fputs_filtered.
11405         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11406
11407 2018-04-23  Tom Tromey  <tom@tromey.com>
11408
11409         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11410         gdb::unique_xmalloc_ptr.
11411
11412 2018-04-23  Tom Tromey  <tom@tromey.com>
11413
11414         * configure: Rebuild.
11415
11416 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11417
11418         PR gdb/23095
11419         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11420         prepare_for_testing.  Set normal_bp to r_debug_state if target
11421         is bsd.
11422
11423 2018-04-21  Pedro Alves  <palves@redhat.com>
11424             Rajendra SY  <rajendra.sy@gmail.com>
11425
11426         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11427         * remote.c (extended_remote_attach): In all-stop mode, mark the
11428         thread as executing.
11429
11430 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11431
11432         * thread.c (thread_apply_all_command): Fix comment.
11433         (thread_command): Fix comment.
11434
11435 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11436
11437         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11438         parameter.
11439         * features/aarch64-core.c (create_feature_aarch64_core):
11440         Regenerate.
11441         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11442         Likewise.
11443         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11444         Likewise.
11445         * features/i386/32bit-avx512.c
11446         (create_feature_i386_32bit_avx512): Likewise.
11447         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11448         Likewise.
11449         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11450         Likewise.
11451         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11452         Likewise.
11453         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11454         Likewise.
11455         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11456         Likewise.
11457         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11458         Likewise.
11459         * features/i386/64bit-avx512.c
11460         (create_feature_i386_64bit_avx512): Likewise.
11461         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11462         Likewise.
11463         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11464         Likewise.
11465         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11466         Likewise.
11467         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11468         Likewise.
11469         * features/i386/64bit-segments.c
11470         (create_feature_i386_64bit_segments): Likewise.
11471         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11472         Likewise.
11473         * features/i386/x32-core.c
11474         (create_feature_i386_x32_core): Likewise.
11475         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11476         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11477         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11478         * target-descriptions.c: In generated code, don't pass xml
11479         filename.
11480
11481 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11482
11483         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11484         (print_xml_feature::visit_post): Likewise.
11485         (print_xml_feature::visit): Likewise.
11486         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11487         (print_xml_feature): Add new class.
11488         * regformats/regdat.sh: Null xmltarget on feature targets.
11489         * target-descriptions.c (struct target_desc): Add xmltarget.
11490         (maintenance_check_tdesc_xml_convert): Add unittest function.
11491         (tdesc_get_features_xml): Add function to get xml.
11492         (maintenance_check_xml_descriptions): Test xml generation.
11493         * xml-tdesc.c (string_read_description_xml): Add function.
11494         * xml-tdesc.h (string_read_description_xml): Add declaration.
11495
11496 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11497
11498         * features/Makefile: Add feature marker to targets with new style
11499         target descriptions.
11500         * regformats/aarch64.dat: Regenerate.
11501         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11502         * regformats/i386/amd64-avx-linux.dat: Likewise.
11503         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11504         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11505         * regformats/i386/amd64-linux.dat: Likewise.
11506         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11507         * regformats/i386/amd64.dat: Likewise.
11508         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11509         * regformats/i386/i386-avx-linux.dat: Likewise.
11510         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11511         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11512         * regformats/i386/i386-linux.dat: Likewise.
11513         * regformats/i386/i386-mmx-linux.dat: Likewise.
11514         * regformats/i386/i386-mpx-linux.dat: Likewise.
11515         * regformats/i386/i386.dat: Likewise.
11516         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11517         * regformats/i386/x32-avx-linux.dat: Likewise.
11518         * regformats/i386/x32-linux.dat: Likewise.
11519         * regformats/tic6x-c62x-linux.dat: Likewise.
11520         * regformats/tic6x-c64x-linux.dat: Likewise.
11521         * regformats/tic6x-c64xp-linux.dat: Likewise.
11522         * regformats/regdat.sh: Parse feature marker.
11523
11524 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11525
11526         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11527         (tdesc_osabi_name): Likewise.
11528         * target-descriptions.c (tdesc_architecture_name): Add new
11529         function.
11530         (tdesc_osabi_name): Likewise.
11531
11532 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11533
11534         * common/tdesc.c (tdesc_predefined_type): Move to here.
11535         (tdesc_named_type): Likewise.
11536         (tdesc_create_vector): Likewise.
11537         (tdesc_create_struct): Likewise.
11538         (tdesc_set_struct_size): Likewise.
11539         (tdesc_create_union): Likewise.
11540         (tdesc_create_flags): Likewise.
11541         (tdesc_create_enum): Likewise.
11542         (tdesc_add_field): Likewise.
11543         (tdesc_add_typed_bitfield): Likewise.
11544         (tdesc_add_bitfield): Likewise.
11545         (tdesc_add_flag): Likewise.
11546         (tdesc_add_enum_value): Likewise.
11547         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11548         (struct tdesc_type_vector): Likewise.
11549         (struct tdesc_type_field): Likewise.
11550         (struct tdesc_type_with_fields): Likewise.
11551         (tdesc_create_enum): Add declaration.
11552         (tdesc_add_typed_bitfield): Likewise.
11553         (tdesc_add_enum_value): Likewise.
11554         * target-descriptions.c (tdesc_type_field): Move from here.
11555         (tdesc_type_builtin): Likewise.
11556         (tdesc_type_vector): Likewise.
11557         (tdesc_type_with_fields): Likewise.
11558         (tdesc_predefined_types): Likewise.
11559         (tdesc_named_type): Likewise.
11560         (tdesc_create_vector): Likewise.
11561         (tdesc_create_struct): Likewise.
11562         (tdesc_set_struct_size): Likewise.
11563         (tdesc_create_union): Likewise.
11564         (tdesc_create_flags): Likewise.
11565         (tdesc_create_enum): Likewise.
11566         (tdesc_add_field): Likewise.
11567         (tdesc_add_typed_bitfield): Likewise.
11568         (tdesc_add_bitfield): Likewise.
11569         (tdesc_add_flag): Likewise.
11570         (tdesc_add_enum_value): Likewise.
11571         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11572         (tdesc_add_typed_bitfield): Likewise.
11573         (tdesc_add_enum_value): Likewise.
11574
11575 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11576
11577         * common/tdesc.c (tdesc_feature::accept): Move to here.
11578         (tdesc_feature::operator==): Likewise.
11579         (tdesc_create_reg): Likewise.
11580         * common/tdesc.h (tdesc_type_kind): Likewise.
11581         (struct tdesc_type): Likewise.
11582         (struct tdesc_feature): Likewise.
11583         * regformats/regdat.sh: Create a feature.
11584         * target-descriptions.c (tdesc_type_kind): Move from here.
11585         (tdesc_type): Likewise.
11586         (tdesc_type_up): Likewise.
11587         (tdesc_feature): Likewise.
11588         (tdesc_create_reg): Likewise.
11589
11590 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11591
11592         * Makefile.in: Add arch/tdesc.c
11593         * common/tdesc.c: New file.
11594         * common/tdesc.h (tdesc_element_visitor): Move to here.
11595         (tdesc_element): Likewise.
11596         (tdesc_reg): Likewise.
11597         (tdesc_reg_up): Likewise.
11598         * regformats/regdef.h (reg): Add offset to constructors.
11599         * target-descriptions.c (tdesc_element_visitor): Move from here.
11600         (tdesc_element): Likewise.
11601         (tdesc_reg): Likewise.
11602         (tdesc_reg_up): Likewise.
11603
11604 2018-04-17  Tom Tromey  <tom@tromey.com>
11605
11606         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11607         discriminant field.
11608
11609 2018-04-17  Tom Tromey  <tom@tromey.com>
11610
11611         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11612
11613 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11614
11615         * symtab.c (print_symbol_info): Skip printing filename and line
11616         number when `last' is NULL.
11617         (symtab_symbol_info): Use empty string instead of NULL for first
11618         invocation of print_symbol_info.
11619         (rbreak_command): Pass NULL to `last' parameter of
11620         print_symbol_info.
11621
11622 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11623
11624         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11625         instead of nullptr.
11626
11627 2018-04-16  Pedro Alves  <palves@redhat.com>
11628
11629         * MAINTAINERS (sh): Remove.
11630         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11631         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11632         (ALLDEPFILES): Remove sh64-tdep.c.
11633         * NEWS: Mentions that support for SH-5/SH64 is removed.
11634         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11635         (sh*-*-openbsd*): Ditto.
11636         (sh64-*-elf*): Remove.
11637         (sh*): Remove.
11638         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11639         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11640         * sh-tdep.c: No longer include "sh64-tdep.h".
11641         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11642         * sh64-tdep.c, sh64-tdep.h: Remove files.
11643
11644 2018-04-16  Pedro Alves  <palves@redhat.com>
11645
11646         * MAINTAINERS: Remove m88k.
11647         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11648         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11649         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11650         * NEWS: Mention that support for m88k was removed.
11651         * configure.host (m88*-*-*): Remove support.
11652         * configure.nat (m88k-*-*): Remove support.
11653         * configure.tgt (m88*-*-openbsd*): Remove.
11654         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11655
11656 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11657
11658         * configure.tgt (x86_tobjs): New variable.
11659         (amd64_tobjs, i386_tobjs): Use it.
11660
11661 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11662
11663         * symtab.c (print_symbol_info): Precede the symbol definition by
11664         the line number when available.
11665         * NEWS: Advertise this enhancement.
11666
11667 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11668
11669         * NEWS (New options): announce set/show record btrace cpu.
11670         * btrace.c: Include record-btrace.h.
11671         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11672         the vendor is unknown.
11673         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11674         Maybe overwrite the btrace configuration's cpu.
11675         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11676         (btrace_fetch): Add cpu parameter.  Update callers.
11677         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11678         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11679         errata workarounds if the vendor is unknown.
11680         * python/py-record-btrace.c: Include record-btrace.h.
11681         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11682         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11683         * record-btrace.c (record_btrace_cpu_state_kind): New.
11684         (record_btrace_cpu): New.
11685         (set_record_btrace_cpu_cmdlist): New.
11686         (record_btrace_get_cpu): New.
11687         (require_btrace_thread, record_btrace_info)
11688         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11689         (cmd_set_record_btrace_cpu_none): New.
11690         (cmd_set_record_btrace_cpu_auto): New.
11691         (cmd_set_record_btrace_cpu): New.
11692         (cmd_show_record_btrace_cpu): New.
11693         (_initialize_record_btrace): Initialize set/show record btrace cpu
11694         commands.
11695         * record-btrace.h (record_btrace_get_cpu): New.
11696
11697 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11698
11699         * record.c (set_record_command): Fix typo in message.
11700
11701 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11702
11703         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11704
11705 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11706
11707         * infrun.c (process_event_stop_test): Call
11708         gdbarch_in_indirect_branch_thunk.
11709         * gdbarch.sh (in_indirect_branch_thunk): New.
11710         * gdbarch.c: Regenerated.
11711         * gdbarch.h: Regenerated.
11712         * x86-tdep.h: New.
11713         * x86-tdep.c: New.
11714         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11715         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11716         (ALLDEPFILES): Add x86-tdep.c.
11717         * arch-utils.h (default_in_indirect_branch_thunk): New.
11718         * arch-utils.c (default_in_indirect_branch_thunk): New.
11719         * i386-tdep: Include x86-tdep.h.
11720         (i386_in_indirect_branch_thunk): New.
11721         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11722         function.
11723         * amd64-tdep: Include x86-tdep.h.
11724         (amd64_in_indirect_branch_thunk): New.
11725         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11726
11727 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11728
11729         PR gdb/23053
11730         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11731         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11732         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11733         regression.
11734
11735 2018-04-12  Tom Tromey  <tom@tromey.com>
11736
11737         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11738         (rust_evaluate_subexp): Likewise.
11739
11740 2018-04-12  Pedro Alves  <palves@redhat.com>
11741
11742         * procfs.c (procfs_detach): Make forward declaration's prototype
11743         match definition's protototype.
11744         (proc_get_LDT_entry): Remove stale do_cleanups call.
11745
11746 2018-04-12  Pedro Alves  <palves@redhat.com>
11747
11748         * target.h (target_ops::to_has_exited): Delete.
11749         (target_has_exited): Delete.
11750         * target-delegates.c: Regenerate.
11751
11752 2018-04-11  Pedro Alves  <palves@redhat.com>
11753
11754         * target.c (fileio_fh_t::t): Add comment.
11755         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11756         (target_fileio_close): Handle a NULL target.
11757         (invalidate_fileio_fh): New.
11758         (target_close): Call it.
11759         * remote.c (remote_hostio_send_command): No longer check whether
11760         remote_desc is open.
11761
11762 2018-04-11  Pedro Alves  <palves@redhat.com>
11763
11764         * target.c (fileio_fh_t): Make it a named struct instead of a
11765         typedef.
11766         (fileio_fh_t::is_closed): New method.
11767         (DEF_VEC_O (fileio_fh_t)): Remove.
11768         (fileio_fhandles): Now a std::vector.
11769         (is_closed_fileio_fh): Delete.
11770         (acquire_fileio_fd): Adjust.  Rename parameters.
11771         (release_fileio_fd): Adjust.
11772         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11773         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11774         (target_fileio_close): Adjust.
11775
11776 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11777
11778         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11779         index.
11780
11781 2018-04-10  Pedro Alves  <palves@redhat.com>
11782
11783         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11784         (scoped_finish_thread_state): New class.
11785         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11786         cleanup.
11787         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11788         (fetch_inferior_event, normal_stop): Likewise.
11789         * thread.c (finish_thread_state_cleanup): Delete.
11790
11791 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11792             Pedro Alves  <palves@redhat.com>
11793
11794         * value.c: Include "selftest.h" and "common/array-view.h".
11795         (struct range) <operator ==>: New.
11796         (test_ranges_contain): New.
11797         (check_ranges_vector): New.
11798         (test_insert_into_bit_range_vector): New.
11799         (_initialize_values): Register selftests.
11800         * common/array-view.h (operator==, operator!=): New.
11801
11802 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11803
11804         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11805         an iterator.
11806         * inline-frame.c: Include <algorithm>.
11807         (struct inline_state): Add constructor.
11808         (inline_state_s): Remove.
11809         (DEF_VEC_O(inline_state_s)): Remove.
11810         (inline_states): Change type to std::vector.
11811         (find_inline_frame_state): Adjust to std::vector.
11812         (allocate_inline_frame_state): Remove.
11813         (clear_inline_frame_state): Adjust to std::vector.
11814         (skip_inline_frames): Adjust to std::vector.
11815
11816 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11817
11818         * tracepoint.h (struct trace_state_variable): Add constructor.
11819         <name>: Change type to std::string.
11820         * tracepoint.c (tsv_s): Remove.
11821         (DEF_VEC_O(tsv_s)): Remove.
11822         (tvariables): Change to std::vector.
11823         (create_trace_state_variable): Adjust to std::vector.
11824         (find_trace_state_variable): Likewise.
11825         (find_trace_state_variable_by_number): Likewise.
11826         (delete_trace_state_variable): Likewise.
11827         (trace_variable_command): Adjust to std::string.
11828         (delete_trace_variable_command): Likewise.
11829         (tvariables_info_1): Adjust to std::vector.
11830         (save_trace_state_variables): Likewise.
11831         (start_tracing): Likewise.
11832         (merge_uploaded_trace_state_variables): Adjust to std::vector
11833         and std::string.
11834         * target.h (struct target_ops)
11835         <to_download_trace_state_variable>: Pass reference to
11836         trace_state_variable.
11837         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11838         * target-delegates.c: Re-generate.
11839         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11840         (mi_tsv_deleted): Likewise.
11841         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11842         * remote.c (remote_download_trace_state_variable): Change
11843         pointer to reference and adjust.
11844         * make-target-delegates (parse_argtypes): Handle references.
11845         (write_function_header): Likewise.
11846         (munge_type): Likewise.
11847
11848 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11849
11850         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11851         string_view-selftests.c.
11852         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11853         testsuite.
11854         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11855         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11856         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11857         * unittests/basic_string_view/element_access/char/1.cc:
11858         Likewise.
11859         * unittests/basic_string_view/element_access/char/empty.cc:
11860         Likewise.
11861         * unittests/basic_string_view/element_access/char/front_back.cc:
11862         Likewise.
11863         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11864         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11865         Likewise.
11866         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11867         Likewise.
11868         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11869         Likewise.
11870         * unittests/basic_string_view/operations/compare/char/1.cc:
11871         Likewise.
11872         * unittests/basic_string_view/operations/compare/char/13650.cc:
11873         Likewise.
11874         * unittests/basic_string_view/operations/copy/char/1.cc:
11875         Likewise.
11876         * unittests/basic_string_view/operations/data/char/1.cc:
11877         Likewise.
11878         * unittests/basic_string_view/operations/find/char/1.cc:
11879         Likewise.
11880         * unittests/basic_string_view/operations/find/char/2.cc:
11881         Likewise.
11882         * unittests/basic_string_view/operations/find/char/3.cc:
11883         Likewise.
11884         * unittests/basic_string_view/operations/find/char/4.cc:
11885         Likewise.
11886         * unittests/basic_string_view/operations/rfind/char/1.cc:
11887         Likewise.
11888         * unittests/basic_string_view/operations/rfind/char/2.cc:
11889         Likewise.
11890         * unittests/basic_string_view/operations/rfind/char/3.cc:
11891         Likewise.
11892         * unittests/basic_string_view/operations/substr/char/1.cc:
11893         Likewise.
11894         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11895         * unittests/string_view-selftests.c: New file.
11896
11897 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11898
11899         * unittests/basic_string_view/capacity/1.cc: New file.
11900         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11901         * unittests/basic_string_view/cons/char/1.cc: New file.
11902         * unittests/basic_string_view/cons/char/2.cc: New file.
11903         * unittests/basic_string_view/cons/char/3.cc: New file.
11904         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11905         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11906         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11907         * unittests/basic_string_view/element_access/char/1.cc: New file.
11908         * unittests/basic_string_view/element_access/char/2.cc: New file.
11909         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11910         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11911         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11912         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11913         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11914         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11915         * unittests/basic_string_view/include.cc: New file.
11916         * unittests/basic_string_view/inserters/char/1.cc: New file.
11917         * unittests/basic_string_view/inserters/char/2.cc: New file.
11918         * unittests/basic_string_view/inserters/char/3.cc: New file.
11919         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11920         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11921         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11922         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11923         * unittests/basic_string_view/literals/types.cc: New file.
11924         * unittests/basic_string_view/literals/values.cc: New file.
11925         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11926         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11927         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11928         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11929         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11930         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11931         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11932         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11933         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11934         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11935         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11936         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11937         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11938         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11939         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11940         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11941         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11942         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11943         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11944         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11945         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11946         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11947         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11948         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11949         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11950         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11951         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11952         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11953         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11954         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11955         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11956         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11957         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11958         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11959         * unittests/basic_string_view/operators/char/2.cc: New file.
11960         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11961         * unittests/basic_string_view/range_access/char/1.cc: New file.
11962         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11963         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11964         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11965         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11966         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11967         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11968         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11969         * unittests/basic_string_view/typedefs.cc: New file.
11970         * unittests/basic_string_view/types/1.cc: New file.
11971
11972 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11973
11974         * common/gdb_string_view.h: Remove libstdc++ implementation
11975         details, adjust to gdb reality.
11976         * common/gdb_string_view.tcc: Likewise.
11977         * cli/cli-script.c (struct string_view): Remove.
11978         (user_args) <m_args>: Change element type to gdb::string_view.
11979         (user_args::insert_args): Adjust.
11980
11981 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11982
11983         * common/gdb_string_view.h: New file.
11984         * common/gdb_string_view.tcc: New file.
11985
11986 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11987
11988         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11989         * configure: Re-generate.
11990
11991 2018-04-09  Pedro Alves  <palves@redhat.com>
11992
11993         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11994         (set_target_gdbarch): Call
11995         gdb::observers::architecture_changed.notify instead of
11996         observer_notify_architecture_changed.
11997
11998 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11999
12000         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12001         (do_restore_current_traceframe_cleanup): Remove.
12002         (restore_current_traceframe_cleanup_dtor): Remove.
12003         (make_cleanup_restore_current_traceframe): Remove.
12004         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12005         New.
12006         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12007         * infrun.c (fetch_inferior_event): Use
12008         scoped_restore_current_traceframe.
12009
12010 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12011
12012         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12013         Remove.
12014         <n_allocated_type_units>: Remove.
12015         <all_type_units>: Change to std::vector.
12016         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12017         to std::vector change.
12018         (dwarf2_per_objfile::get_cutu): Likewise.
12019         (dwarf2_per_objfile::get_tu): Likewise.
12020         (create_signatured_type_table_from_index): Likewise.
12021         (create_signatured_type_table_from_debug_names): Likewise.
12022         (dw2_symtab_iter_next): Likewise.
12023         (dw2_print_stats): Likewise.
12024         (dw2_expand_all_symtabs): Likewise.
12025         (dw2_expand_marked_cus): Likewise.
12026         (dw2_debug_names_iterator::next): Likewise.
12027         (dwarf2_initialize_objfile): Likewise.
12028         (add_signatured_type_cu_to_table): Likewise.
12029         (create_all_type_units): Likewise.
12030         (add_type_unit): Likewise.
12031         (struct tu_abbrev_offset): Add constructor.
12032         (build_type_psymtabs_1): Adjust to std::vector change.
12033         (print_tu_stats): Likewise.
12034         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12035         (write_debug_names): Likewise.
12036
12037 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12038
12039         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12040         Make an std::vector.
12041         <n_comp_units>: Remove.
12042         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12043         to std::vector change.
12044         (dwarf2_per_objfile::get_cutu): Likewise.
12045         (dwarf2_per_objfile::get_cu): Likewise.
12046         (create_cus_from_index): Likewise.
12047         (create_addrmap_from_index): Likewise.
12048         (create_addrmap_from_aranges): Likewise.
12049         (dwarf2_read_index): Likewise.
12050         (dw2_find_last_source_symtab): Likewise.
12051         (dw2_map_symtabs_matching_filename): Likewise.
12052         (dw2_symtab_iter_next): Likewise.
12053         (dw2_print_stats): Likewise.
12054         (dw2_expand_all_symtabs): Likewise.
12055         (dw2_expand_symtabs_with_fullname): Likewise.
12056         (dw2_expand_marked_cus): Likewise.
12057         (dw2_map_symbol_filenames): Likewise.
12058         (create_cus_from_debug_names): Likewise.
12059         (dwarf2_read_debug_names): Likewise.
12060         (dw2_debug_names_iterator::next): Likewise.
12061         (dwarf2_initialize_objfile): Likewise.
12062         (set_partial_user): Likewise.
12063         (dwarf2_build_psymtabs_hard): Likewise.
12064         (read_comp_units_from_section): Remove arguments, adjust to
12065         std::vector change.
12066         (create_all_comp_units): Adjust to std::vector and
12067         read_comp_units_from_section changes.
12068         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12069         change.
12070         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12071         (psyms_seen_size): Likewise.
12072         (write_gdbindex): Likewise.
12073         (write_debug_names): Likewise.
12074
12075 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12076
12077         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12078         with dwarf2_per_objfile.
12079         (create_cus_from_index): Likewise.
12080         (create_signatured_type_table_from_index): Likewise.
12081         (dwarf2_read_index): Likewise.
12082         (dwarf2_initialize_objfile): Likewise.
12083         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12084         per_cu rather than get_dwarf2_per_objfile.
12085
12086 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12087
12088         * dwarf2read.h (struct signatured_type): Forward declare.
12089         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12090         New methods.
12091         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12092         (dw2_get_cutu): ...this.
12093         (dwarf2_per_objfile::get_cu): Rename from...
12094         (dw2_get_cu): ...this.
12095         (dwarf2_per_objfile::get_tu): New.
12096         (create_addrmap_from_index): Adjust.
12097         (create_addrmap_from_aranges): Adjust.
12098         (dw2_find_last_source_symtab): Adjust.
12099         (dw2_map_symtabs_matching_filename): Adjust.
12100         (dw2_symtab_iter_next): Adjust.
12101         (dw2_print_stats): Adjust.
12102         (dw2_expand_all_symtabs): Adjust.
12103         (dw2_expand_symtabs_with_fullname): Adjust.
12104         (dw2_expand_marked_cus): Adjust.
12105         (dw_expand_symtabs_matching_file_matcher): Adjust.
12106         (dw2_map_symbol_filenames): Adjust.
12107         (dw2_debug_names_iterator::next): Adjust.
12108         (dwarf2_initialize_objfile): Adjust.
12109         (set_partial_user): Adjust.
12110         (dwarf2_build_psymtabs_hard): Adjust.
12111
12112 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12113
12114         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12115         Remove unused variables.
12116         (dw2_map_symtabs_matching_filename): Likewise.
12117         (dwarf2_record_block_ranges): Likewise.
12118         (dwarf2_read_addr_index): Likewise.
12119         (follow_die_offset): Likewise.
12120
12121 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12122
12123         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12124         to symbol_file_add_main.
12125
12126 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12127
12128         PR mi/22299
12129         * mi/mi-console.c (do_fputc_async_safe): New.
12130         (mi_console_file::write_async_safe): New.
12131         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12132         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12133         New.
12134         * ui-file.c (ui_file::putstrn): Adjust call to
12135         fputstrn_unfiltered.
12136         * utils.c (printchar): Replace do_fputs and do_fprintf
12137         parameters by do_fputc.
12138         (fputstr_filtered): Adjust call to printchar.
12139         (fputstr_unfiltered): Likewise.
12140         (fputstrn_filtered): Likewise.
12141         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12142         printchar.
12143         * utils.h (do_fputc_ftype): New typedef.
12144         (fputstrn_unfiltered): Add do_fputc parameter.
12145
12146 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12147
12148         * regformats/i386/i386-avx.dat: Remove.
12149
12150 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12151
12152         PR gdb/22979
12153         * amd64-tdep.c (amd64_none_init_abi): New function.
12154         (amd64_x32_none_init_abi): New function.
12155         (_initialize_amd64_tdep): Register handlers for x86-64 and
12156         x64_32 with GDB_OSABI_NONE.
12157         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12158         GDB_OSABI_NONE osabi.
12159
12160 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12161
12162         PR gdb/22980
12163         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12164         GDB_OSABI_NONE.
12165         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12166         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12167
12168 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12169
12170         * common/byte-vector.h (char_vector): New type.
12171         * target.h (target_read_alloc): Return
12172         gdb::optional<byte_vector>.
12173         (target_read_stralloc): Return gdb::optional<char_vector>.
12174         (target_get_osdata): Return gdb::optional<char_vector>.
12175         * target.c (target_read_alloc_1): Templatize.  Replacement
12176         manual memory management with vector.
12177         (target_read_alloc): Change return type, adjust.
12178         (target_read_stralloc): Change return type, adjust.
12179         (target_get_osdata): Change return type, adjust.
12180         * auxv.c (struct auxv_info) <length>: Remove.
12181         <data>: Change type to gdb::optional<byte_vector>.
12182         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12183         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12184         (target_auxv_search): Adjust.
12185         (fprint_target_auxv): Adjust.
12186         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12187         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12188         (linux_make_corefile_notes): Adjust.
12189         * osdata.c (get_osdata): Adjust.
12190         * remote.c (remote_get_threads_with_qxfer): Adjust.
12191         (remote_memory_map): Adjust.
12192         (remote_traceframe_info): Adjust.
12193         (btrace_read_config): Adjust.
12194         (remote_read_btrace): Adjust.
12195         (remote_pid_to_exec_file): Adjust.
12196         * solib-aix.c (solib_aix_get_library_list): Adjust.
12197         * solib-dsbt.c (decode_loadmap): Don't free buf.
12198         (dsbt_get_initial_loadmaps): Adjust.
12199         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12200         * solib-target.c (solib_target_current_sos): Adjust.
12201         * tracepoint.c (sdata_make_value): Adjust.
12202         * xml-support.c (xinclude_start_include): Adjust.
12203         (xml_fetch_content_from_file): Adjust.
12204         * xml-support.h (xml_fetch_another): Change return type.
12205         (xml_fetch_content_from_file): Change return type.
12206         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12207         * xml-tdesc.c (file_read_description_xml): Adjust.
12208         (fetch_available_features_from_target): Change return type.
12209         (target_fetch_description_xml): Adjust.
12210         (target_read_description_xml): Adjust.
12211
12212 2018-04-06  Tom Tromey  <tom@tromey.com>
12213
12214         * value.c (~value): Update.
12215         (struct value) <contents>: Now unique_xmalloc_ptr.
12216         (value_contents_bits_eq, allocate_value_contents)
12217         (value_contents_raw, value_contents_all_raw)
12218         (value_contents_for_printing, value_contents_for_printing_const)
12219         (set_value_enclosing_type): Update.
12220
12221 2018-04-06  Tom Tromey  <tom@tromey.com>
12222
12223         * value.c (range_s): Remove typedef, VEC.
12224         (struct range): Add operator<.
12225         (range_lessthan): Remove.
12226         (ranges_contain): Change type.
12227         (~value): Update.
12228         (struct value) <unavailable, optimized_out>: Now std::vector.
12229         (value_entirely_available)
12230         (value_entirely_covered_by_range_vector)
12231         (value_entirely_unavailable, value_entirely_optimized_out):
12232         Update.
12233         (insert_into_bit_range_vector): Change argument type.
12234         (find_first_range_overlap): Likewise.
12235         (struct ranges_and_idx, value_contents_bits_eq)
12236         (require_not_optimized_out, require_available): Update.
12237         (ranges_copy_adjusted): Change argument types.
12238         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12239
12240 2018-04-06  Tom Tromey  <tom@tromey.com>
12241
12242         * value.c (~value): Update.
12243         (struct value) <parent>: Now a value_ref_ptr.
12244         (value_parent, set_value_parent, value_address, value_copy):
12245         Update.
12246
12247 2018-04-06  Tom Tromey  <tom@tromey.com>
12248
12249         * value.c (struct value): Add constructor, destructor, and member
12250         initializers.
12251         (allocate_value_lazy, value_decref): Update.
12252
12253 2018-04-06  Tom Tromey  <tom@tromey.com>
12254
12255         * value.c (struct value) <released, next>: Remove.
12256         (all_values): Now a std::vector.
12257         (allocate_value_lazy): Update.
12258         (value_next): Remove.
12259         (value_mark, value_free_to_mark, release_value)
12260         (value_release_to_mark): Update.
12261
12262 2018-04-06  Tom Tromey  <tom@tromey.com>
12263
12264         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12265         (free_value_chain): Remove.
12266         * value.c (free_value_chain): Remove.
12267         (value_release_to_mark): Return a std::vector.
12268         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12269         std::vector.
12270         (check_condition): Update.
12271         * eval.c (fetch_subexp_value): Change "val_chain" to a
12272         std::vector.
12273         * breakpoint.c (update_watchpoint): Update.
12274         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12275
12276 2018-04-06  Tom Tromey  <tom@tromey.com>
12277
12278         * value.h (free_all_values): Remove.
12279         * value.c (free_all_values): Remove.
12280
12281 2018-04-06  Tom Tromey  <tom@tromey.com>
12282
12283         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12284         (value_history_chain, value_history_count): Remove.
12285         (value_history): New global.
12286         (record_latest_value, access_value_history, show_values)
12287         (preserve_values): Update.
12288
12289 2018-04-06  Tom Tromey  <tom@tromey.com>
12290
12291         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12292         * varobj.c (varobj_set_display_format, varobj_set_value)
12293         (install_default_visualizer, construct_visualizer)
12294         (install_new_value, ~varobj, varobj_get_value_type)
12295         (my_value_of_variable, varobj_editable_p): Update.
12296         * c-varobj.c (c_describe_child, c_value_of_variable)
12297         (cplus_number_of_children, cplus_describe_child): Update.
12298         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12299         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12300         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12301
12302 2018-04-06  Tom Tromey  <tom@tromey.com>
12303
12304         * printcmd.c (last_examine_address): Change type to
12305         value_ref_ptr.
12306         (do_examine, x_command): Update.
12307
12308 2018-04-06  Tom Tromey  <tom@tromey.com>
12309
12310         * value.c (release_value): Update.
12311         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12312         (struct bpstats) <val>: Now a value_ref_ptr.
12313         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12314         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12315         (~watchpoint, print_it_watchpoint, watch_command_1)
12316         (invalidate_bp_value_on_memory_change): Update.
12317
12318 2018-04-06  Tom Tromey  <tom@tromey.com>
12319
12320         * varobj.c (varobj_clear_saved_item)
12321         (update_dynamic_varobj_children, install_new_value, ~varobj):
12322         Update.
12323         * value.h (value_incref): Move declaration earlier.
12324         (value_decref): Rename from value_free.
12325         (struct value_ref_policy): New.
12326         (value_ref_ptr): New typedef.
12327         (struct value_deleter): Remove.
12328         (gdb_value_up): Remove typedef.
12329         (release_value): Change return type.
12330         (release_value_or_incref): Remove.
12331         * value.c (set_value_parent): Update.
12332         (value_incref): Change return type.
12333         (value_decref): Rename from value_free.
12334         (value_free_to_mark, free_all_values, free_value_chain): Update.
12335         (release_value): Return value_ref_ptr.
12336         (release_value_or_incref): Remove.
12337         (record_latest_value, set_internalvar, clear_internalvar):
12338         Update.
12339         * stack.c (info_frame_command): Don't call value_free.
12340         * python/py-value.c (valpy_dealloc, valpy_new)
12341         (value_to_value_object): Update.
12342         * printcmd.c (do_examine): Update.
12343         * opencl-lang.c (lval_func_free_closure): Update.
12344         * mi/mi-main.c (register_changed_p): Don't call value_free.
12345         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12346         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12347         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12348         value_free.
12349         * guile/scm-value.c (vlscm_free_value_smob)
12350         (vlscm_scm_from_value): Update.
12351         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12352         (frame_unwind_register_unsigned, get_frame_register_bytes)
12353         (put_frame_register_bytes): Don't call value_free.
12354         * findvar.c (address_from_register): Don't call value_free.
12355         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12356         * dwarf2loc.c (entry_data_value_free_closure)
12357         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12358         (dwarf2_evaluate_loc_desc_full): Update.
12359         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12360         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12361         (~watchpoint, watch_command_1)
12362         (invalidate_bp_value_on_memory_change): Update.
12363         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12364
12365 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12366
12367         PR gdb/23022
12368         * warning.m4: Add -Wno-error=deprecated-register.
12369         * configure: Re-generate.
12370
12371 2018-04-05  Tom Tromey  <tom@tromey.com>
12372
12373         * linespec.h: Remove include of "vec.h".
12374
12375 2018-04-05  Tom Tromey  <tom@tromey.com>
12376
12377         * linespec.c (typep): Remove typedef.
12378         (find_methods, find_superclass_methods): Take a std::vector.
12379         (find_method): Use std::vector.
12380
12381 2018-04-05  Tom Tromey  <tom@tromey.com>
12382
12383         * utils.c (compare_strings): Remove.
12384         * utils.h (compare_strings): Remove.
12385         * objc-lang.h (find_imps): Update.
12386         * objc-lang.c (find_methods): Take a std::vector.
12387         (uniquify_strings, find_imps): Likewise.
12388         * linespec.c (find_methods): Take a std::vector.
12389         (decode_objc): Use std::vector.
12390         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12391         a std::vector.
12392         (find_method, find_function_symbols): Use std::vector.
12393
12394 2018-04-05  Tom Tromey  <tom@tromey.com>
12395
12396         * completer.c (completion_tracker::completion_tracker): Remove
12397         cast.
12398         (completion_tracker::discard_completions): Likewise.
12399         * breakpoint.c (ambiguous_names_p): Remove cast.
12400         * ada-lang.c (_initialize_ada_language): Remove cast.
12401         * utils.h (streq): Update.
12402         (streq_hash): Add new declaration.
12403         * utils.c (streq): Return bool.
12404         (streq_hash): New function.
12405
12406 2018-04-05  Tom Tromey  <tom@tromey.com>
12407
12408         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12409         Remove a string copy.
12410
12411 2018-04-05  Tom Tromey  <tom@tromey.com>
12412
12413         * linespec.c (filter_results): Use std::vector.
12414         (decode_line_2, decode_line_full): Update.
12415
12416 2018-04-05  Tom Tromey  <tom@tromey.com>
12417
12418         * linespec.c (canonical_to_fullform): Return std::string.
12419         (filter_results): Update.
12420         (struct decode_line_2_item): Add constructor.
12421         <fullform, displayform>: Now std::string.
12422         (decode_line_2_compare_items): Now a std::sort comparator.
12423         (decode_line_2): Update.
12424
12425 2018-04-05  Tom Tromey  <tom@tromey.com>
12426
12427         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12428         (unexpected_linespec_error): Update.
12429         (linespec_parse_basic, parse_linespec): Update.
12430
12431 2018-04-05  Tom Tromey  <tom@tromey.com>
12432
12433         * linespec.c (linespec_parse_basic): Reindent.
12434
12435 2018-04-05  Tom Tromey  <tom@tromey.com>
12436
12437         * minsyms.h (iterate_over_minimal_symbols): Update.
12438         * minsyms.c (iterate_over_minimal_symbols): Take a
12439         gdb::function_view.
12440         * linespec.c (struct collect_minsyms): Remove.
12441         (compare_msyms): Now a std::sort comparator.
12442         (add_minsym): Add parameters.
12443         (search_minsyms_for_name): Update.  Use std::vector.
12444
12445 2018-04-03  Tom Tromey  <tom@tromey.com>
12446
12447         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12448         gdb::byte_vector.
12449
12450 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12451
12452         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12453
12454 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12455
12456         PR gdb/16959
12457         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12458         printing static type.
12459
12460 2018-04-01  Tom Tromey  <tom@tromey.com>
12461
12462         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12463         (rs6000_xfer_shared_libraries): Update.
12464
12465 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12466
12467         * common/gdb_vecs.h (char_ptr): Remove.
12468         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12469
12470 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12471
12472         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12473         with std::vector.
12474         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12475
12476 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12477
12478         * tracepoint.h (struct uploaded_tp): Initialize fields.
12479         <actions, step_actions, cmd_strings>: Change type to
12480         std::vector<char *>.
12481         * tracepoint.c (get_uploaded_tp): Allocate with new.
12482         (free_uploaded_tps): Free with delete.
12483         (parse_tracepoint_definition): Adjust to std::vector change.
12484         * breakpoint.c (read_uploaded_action): Likewise.
12485         (create_tracepoint_from_upload): Likewise.
12486         * ctf.c (ctf_write_uploaded_tp): Likewise.
12487         (SET_ARRAY_FIELD): Likewise.
12488         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12489
12490 2018-03-30  Tom Tromey  <tom@tromey.com>
12491
12492         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12493         std::unique_ptr.
12494         (svr4_keep_data_in_core): Update.
12495         (svr4_read_so_list): Update.
12496
12497 2018-03-30  Tom Tromey  <tom@tromey.com>
12498
12499         * windows-nat.c (handle_output_debug_string, handle_exception):
12500         Update.
12501         * target.h (target_read_string): Update.
12502         * target.c (target_read_string): Change "string" to
12503         unique_xmalloc_ptr.
12504         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12505         Update.
12506         * solib-frv.c (frv_current_sos): Update.
12507         * solib-dsbt.c (dsbt_current_sos): Update.
12508         * solib-darwin.c (darwin_current_sos): Update.
12509         * linux-thread-db.c (inferior_has_bug): Update.
12510         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12511         Update.  Remove alloca.
12512         * ada-lang.c (ada_main_name): Update.
12513
12514 2018-03-30  Tom Tromey  <tom@tromey.com>
12515
12516         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12517         (struct dwo_file_deleter): New.
12518         (dwo_file_up): New typedef.
12519         (open_and_init_dwo_file): Use dwo_file_up.
12520         (free_dwo_file_cleanup): Remove.
12521
12522 2018-03-30  Tom Tromey  <tom@tromey.com>
12523
12524         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12525         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12526
12527 2018-03-30  Tom Tromey  <tom@tromey.com>
12528
12529         * dwarf2read.c (class free_cached_comp_units): New class.
12530         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12531         (free_cached_comp_units): Remove function.
12532
12533 2018-03-30  Tom Tromey  <tom@tromey.com>
12534
12535         * utils.h (make_cleanup_unpush_target): Remove.
12536         * inf-ptrace.c (struct target_unpusher): New.
12537         (target_unpush_up) New typedef.
12538         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12539         target_unpush_up.
12540         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12541
12542 2018-03-27  Tom Tromey  <tom@tromey.com>
12543
12544         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12545
12546 2018-03-27  Pedro Alves  <palves@redhat.com>
12547             Tom Tromey  <tom@tromey.com>
12548
12549         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12550         destructor.  Now a class.
12551         (gdb_readline_wrapper_cleanup): Remove function.
12552         (gdb_readline_wrapper): Remove cleanups.
12553
12554 2018-03-27  Tom Tromey  <tom@tromey.com>
12555
12556         * typeprint.h (struct type_print_options) <local_typedefs,
12557         global_typedefs>: Remove "struct" keyword.
12558         (class typedef_hash_table): New class.
12559         (recursively_update_typedef_hash, add_template_parameters)
12560         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12561         (find_typedef_in_hash): Don't declare.
12562         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12563         (typedef_hash_table::recursively_update): Rename from
12564         recursively_update_typedef_hash.  Now a member.
12565         (typedef_hash_table::add_template_parameters): Rename from
12566         add_template_parameters.  Now a member.
12567         (typedef_hash_table::typedef_hash_table): Now a constructor;
12568         rename from create_typedef_hash.
12569         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12570         rename from free_typedef_hash.
12571         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12572         (do_free_global_table): Remove.
12573         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12574         from copy_type_recursive.
12575         (create_global_typedef_table): Remove.
12576         (typedef_hash_table::find_global_typedef): Now a member of
12577         typedef_hash_table.
12578         (typedef_hash_table::find_typedef): Rename from
12579         find_typedef_in_hash; now a member.
12580         (whatis_exp): Update.
12581         * extension.h (struct ext_lang_type_printers): Add constructor and
12582         destructor.
12583         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12584         declare.
12585         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12586         Now a constructor; rename from start_ext_lang_type_printers.
12587         (ext_lang_type_printers): Now a destructor; rename from
12588         free_ext_lang_type_printers.
12589         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12590         Update.
12591         (c_type_print_base_struct_union): Update.  Remove cleanups.
12592
12593 2018-03-27  Tom Tromey  <tom@tromey.com>
12594
12595         * dwarf-index-write.c: Include <cmath>.
12596
12597 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12598
12599         * NEWS: Add entry describing new "set|show varsize-limit" command.
12600         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12601         command.
12602         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12603         "set variable".
12604
12605 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12606
12607         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12608         dwarf-index-write.c
12609         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12610         * dwarf-index-common.c: New file.
12611         * dwarf-index-common.h: New file.
12612         * dwarf-index-write.c: New file.
12613         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12614         (struct dwarf2_section_info): Move from here.
12615         (dwarf2_section_info_def): Likewise.
12616         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12617         (offset_type): Likewise.
12618         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12619         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12620         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12621         (byte_swap): Likewise.
12622         (MAYBE_SWAP): Likewise.
12623         (dwarf2_per_cu_ptr): Likewise.
12624         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12625         (struct tu_stats): Likewise.
12626         (struct dwarf2_per_objfile): Likewise.
12627         (struct dwarf2_per_cu_data): Likewise.
12628         (struct signatured_type): Likewise.
12629         (sig_type_ptr): Likewise.
12630         (DEF_VEC_P (sig_type_ptr)): Likewise.
12631         (INDEX4_SUFFIX): Likewise.
12632         (INDEX5_SUFFIX): Likewise.
12633         (DEBUG_STR_SUFFIX): Likewise.
12634         (dwarf2_read_section): Make non-static.
12635         (mapped_index_string_hash): Move from here.
12636         (dwarf5_djb_hash): Likewise.
12637         (file_write): Likewise.
12638         (class data_buf): Likewise.
12639         (struct symtab_index_entry): Likewise.
12640         (struct mapped_symtab): Likewise.
12641         (find_slot): Likewise.
12642         (hash_expand): Likewise.
12643         (add_index_entry): Likewise.
12644         (uniquify_cu_indices): Likewise.
12645         (class c_str_view): Likewise.
12646         (class c_str_view_hasher): Likewise.
12647         (class vector_hasher): Likewise.
12648         (write_hash_table): Likewise.
12649         (psym_index_map): Likewise.
12650         (struct addrmap_index_data): Likewise.
12651         (add_address_entry): Likewise.
12652         (add_address_entry_worker): Likewise.
12653         (write_address_map): Likewise.
12654         (symbol_kind): Likewise.
12655         (write_psymbols): Likewise.
12656         (struct signatured_type_index_data): Likewise.
12657         (write_one_signatured_type): Likewise.
12658         (recursively_count_psymbols): Likewise.
12659         (recursively_write_psymbols): Likewise.
12660         (class debug_names): Likewise.
12661         (check_dwarf64_offsets): Likewise.
12662         (psyms_seen_size): Likewise.
12663         (write_gdbindex): Likewise.
12664         (write_debug_names): Likewise.
12665         (assert_file_size): Likewise.
12666         (write_psymtabs_to_index): Likewise.
12667         (save_gdb_index_command): Likewise.
12668         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12669         command.
12670         * dwarf2read.h: New file.
12671
12672 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12673
12674         PR gdb/22670
12675         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12676         symbol name if the CU's language stores symbol names in linkage
12677         format.
12678         * language.h (struct language_defn)
12679         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12680         all instances of this struct.
12681
12682 2018-03-26  Tom Tromey  <tom@tromey.com>
12683
12684         * stack.c (backtrace_command_1): Remove verbose code.
12685
12686 2018-03-26  Tom Tromey  <tom@tromey.com>
12687
12688         * python/py-framefilter.c (py_print_type): Don't catch
12689         exceptions.  Return void.
12690         (py_print_value): Likewise.
12691         (py_print_single_arg): Likewise.
12692         (enumerate_args): Don't catch exceptions.
12693         (py_print_args): Likewise.
12694         (py_print_frame): Likewise.
12695         (gdbpy_apply_frame_filter): Catch exceptions here.
12696
12697 2018-03-26  Tom Tromey  <tom@tromey.com>
12698
12699         * stack.c (_initialize_stack): Remove trailing newlines from help
12700         text.  Add "Usage" line to "backtrace" help.
12701
12702 2018-03-26  Tom Tromey  <tom@tromey.com>
12703
12704         PR python/16486:
12705         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12706
12707 2018-03-26  Tom Tromey  <tom@tromey.com>
12708
12709         * python/py-framefilter.c (py_print_single_arg): Return
12710         EXT_LANG_BT_ERROR from catch.
12711
12712 2018-03-26  Tom Tromey  <tom@tromey.com>
12713
12714         PR backtrace/15584:
12715         * stack.c (backtrace_command_1): Move some code into no-filters
12716         "if".
12717
12718 2018-03-26  Tom Tromey  <tom@tromey.com>
12719
12720         * python/py-framefilter.c (throw_quit_or_print_exception): New
12721         function.
12722         (gdbpy_apply_frame_filter): Use it.
12723
12724 2018-03-26  Tom Tromey  <tom@tromey.com>
12725
12726         PR cli/17716:
12727         * python/py-framefilter.c (py_print_type, py_print_value)
12728         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12729         RETURN_MASK_ERROR.
12730
12731 2018-03-26  Tom Tromey  <tom@tromey.com>
12732
12733         * python/py-framefilter.c (enumerate_args): Use
12734         gdb::unique_xmalloc_ptr.
12735
12736 2018-03-26  Tom Tromey  <tom@tromey.com>
12737
12738         * python/py-framefilter.c (py_print_frame): Return
12739         EXT_LANG_BT_OK.
12740         (gdbpy_apply_frame_filter): Update comment.
12741         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12742         Remove.
12743         <EXT_LANG_BT_NO_FILTERS>: Change value.
12744
12745 2018-03-26  Tom Tromey  <tom@tromey.com>
12746
12747         PR backtrace/15582:
12748         * stack.c (backtrace_command): Parse "hide" argument.
12749         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12750         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12751         constant.
12752
12753 2018-03-26  Tom Tromey  <tom@tromey.com>
12754
12755         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12756         add "flags".
12757         (backtrace_command): Remove "fulltrace", add "flags".
12758
12759 2018-03-26  Tom Tromey  <tom@tromey.com>
12760
12761         * stack.c (backtrace_command): Rewrite command line parsing.
12762
12763 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12764
12765         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12766
12767 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12768
12769         * filename-seen-cache.h: Add include guard.
12770
12771 2018-03-26  Keith Seitz  <keiths@redhat.com>
12772
12773         * symfile.c (place_section): Remove "struct" from section_addr_info
12774         in comment.
12775         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12776         "struct" keyword from section_addr_info.
12777
12778 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12779
12780         * regformats/regdef.h (reg): Add constructors.
12781
12782 2018-03-25  Pedro Alves  <palves@redhat.com>
12783
12784         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12785         if then/else bodies in var_func_name extraction.
12786
12787 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12788
12789         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12790         lookup_minimal_symbol() to find symbol entry.
12791         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12792
12793 2018-03-23  Keith Seitz  <keiths@redhat.com>
12794
12795         PR c++/22968
12796         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12797         nested type definitions for C++, too.
12798
12799 2018-03-23  Tom Tromey  <tom@tromey.com>
12800
12801         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12802         a typedef.
12803         (macho_register_oso): Remove.
12804         (macho_symtab_read): Take a std::vector.
12805         (oso_el_compare_name): Now a std::sort comparator.
12806         (macho_symfile_read_all_oso): Take a std::vector.
12807         (macho_symfile_read): Use std::vector.  Remove cleanups.
12808
12809 2018-03-22  Tom Tromey  <tom@tromey.com>
12810
12811         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12812         (record_full_goto_bookmark): Use std::string.
12813
12814 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12815
12816         PR tdep/18295
12817         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12818         a single mask.
12819
12820 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12821
12822         * rs6000-tdep.c (store_insn_p): New function.
12823         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12824         and cr_reg to their unshifted values. Use store_insn_p to
12825         match LR saves using either R1 or fdata->alloca_reg. Use
12826         store_insn_p to match CR saves. Set alloca_reg_offset
12827         when alloca_reg and framep are set. Remove lr_reg shift
12828         when assigning to fdata->lr_register.
12829
12830 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12831
12832         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12833         command line args instead of emitting a warning.
12834
12835 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12836
12837         * tracepoint.h (struct static_tracepoint_marker): Initialize
12838         fields, define default constructor, move constructor and move
12839         assignment, disable the rest.
12840         <str_id, extra>: Make std::string.
12841         (release_static_tracepoint_marker): Remove.
12842         (free_current_marker): Remove.
12843         * tracepoint.c (free_current_marker): Remove.
12844         (parse_static_tracepoint_marker_definition): Adjust to
12845         std::string, use new hex2str overload.
12846         (release_static_tracepoint_marker): Remove.
12847         (print_one_static_tracepoint_marker): Get marker by reference
12848         and adjust to std::string.
12849         (info_static_tracepoint_markers_command): Adjust to std::vector
12850         changes
12851         * target.h (static_tracepoint_marker_p): Remove typedef.
12852         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12853         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12854         bool.
12855         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12856         * target-debug.h
12857         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12858         (target_debug_print_std_vector_static_tracepoint_marker): New.
12859         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12860         to...
12861         (target_debug_print_static_tracepoint_marker_p): ... this.
12862         * target-delegates.c: Re-generate.
12863         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12864         Make std::string.
12865         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12866         (decode_static_tracepoint_spec): Adjust to std::vector.
12867         (tracepoint_print_one_detail): Adjust to std::string.
12868         (strace_marker_decode_location): Adjust to std::string.
12869         (update_static_tracepoint): Adjust to std::string, remove call
12870         to release_static_tracepoint_marker.
12871         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12872         Adjust to std::vector.
12873         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12874         (remote_static_tracepoint_markers_by_strid): Adjust to
12875         std::vector.
12876         * common/rsp-low.h (hex2str): New overload with explicit count
12877         of bytes.
12878         * common/rsp-low.c (hex2str): New overload with explicit count
12879         of bytes.
12880         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12881         (_initialize_rsp_low_selftests): Add test_hex2str test.
12882         * unittests/tracepoint-selftests.c
12883         (test_parse_static_tracepoint_marker_definition): Adjust to
12884         std::string.
12885
12886 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12887
12888         * tracepoint.c (parse_static_tracepoint_marker_definition):
12889         Consider case where the definition is followed by more
12890         definitions.
12891         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12892         tracepoint-selftests.c.
12893         * unittests/tracepoint-selftests.c: New.
12894
12895 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12896
12897         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12898         Carvalho.
12899
12900 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12901
12902         * symtab.c (find_pc_sect_line): fixed indentation.
12903
12904 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12905
12906         * symtab.c (find_pc_sect_line): now uses binary search.
12907
12908 2018-03-19  Tom Tromey  <tom@tromey.com>
12909
12910         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12911         "IDENT" production.
12912
12913 2018-03-19  Pedro Alves  <palves@redhat.com>
12914             Tom Tromey  <tom@tromey.com>
12915
12916         * unittests/observable-selftests.c: New file.
12917         * common/observable.h: New file.
12918         * observable.h: New file.
12919         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12920         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12921         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12922         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12923         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12924         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12925         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12926         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12927         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12928         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12929         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12930         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12931         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12932         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12933         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12934         tui/tui-interp.c, valops.c: Update all users.
12935         * tui/tui-hooks.c (tui_bp_created_observer)
12936         (tui_bp_deleted_observer, tui_bp_modified_observer)
12937         (tui_inferior_exit_observer, tui_before_prompt_observer)
12938         (tui_normal_stop_observer, tui_register_changed_observer):
12939         Remove.
12940         (tui_observers_token): New global.
12941         (attach_or_detach, tui_attach_detach_observers): New functions.
12942         (tui_install_hooks, tui_remove_hooks): Use
12943         tui_attach_detach_observers.
12944         * record-btrace.c (record_btrace_thread_observer): Remove.
12945         (record_btrace_thread_observer_token): New global.
12946         * observer.sh: Remove.
12947         * observer.c: Rename to observable.c.
12948         * observable.c (namespace gdb_observers): Define new objects.
12949         (observer_debug): Move into gdb_observers namespace.
12950         (struct observer, struct observer_list, xalloc_observer_list_node)
12951         (xfree_observer_list_node, generic_observer_attach)
12952         (generic_observer_detach, generic_observer_notify): Remove.
12953         (_initialize_observer): Update.
12954         Don't include observer.inc.
12955         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12956         (clean mostlyclean): Likewise.
12957         (observer.h, observer.inc): Remove targets.
12958         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12959         (COMMON_SFILES): Use observable.c, not observer.c.
12960         * .gitignore: Remove observer.h.
12961
12962 2018-03-18  Tom Tromey  <tom@tromey.com>
12963
12964         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12965         gdb::def_vector.
12966         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12967
12968 2018-03-17  Tom Tromey  <tom@tromey.com>
12969
12970         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12971
12972 2018-03-17  Tom Tromey  <tom@tromey.com>
12973
12974         * target.c (class scoped_target_fd): New.
12975         (target_fileio_close_cleanup): Remove.
12976         (target_fileio_read_alloc_1): Use scoped_target_fd.
12977
12978 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12979
12980         * silent-rules.mk: New.
12981         * Makefile.in: Include silent-rules.mk
12982         (srcdir, VPATH, top_srcdir): Move up.
12983         (COMPILE): Add ECHO_CXX.
12984         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12985         (init.c): Add ECHO_INIT_C.
12986         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12987         (version.c): Add ECHO_GEN.
12988         (printcmd.o): Add ECHO_CXX.
12989         (target-float.o): Add ECHO_CXX.
12990         (ada-exp.o): Add ECHO_CXX.
12991         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12992         (insight$(EXEEXT)): Add ECHO_CXXLD.
12993         * gnulib/configure.ac: Add AM_SILENT_RULES.
12994         * gnulib/aclocal.m4: Re-generate.
12995         * gnulib/configure: Re-generate.
12996         * gnulib/import/Makefile.in: Re-generate.
12997
12998 2018-03-16  Tom Tromey  <tom@tromey.com>
12999
13000         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13001         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13002         * utils.c (do_free_section_addr_info)
13003         (make_cleanup_free_section_addr_info): Remove.
13004         * symfile.h (struct other_sections): Add constructor.
13005         (struct section_addr_info): Remove.
13006         (section_addr_info): New typedef.
13007         (struct sym_fns) <sym_offsets>: Change type of parameter.
13008         (build_section_addr_info_from_objfile)
13009         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13010         (default_symfile_offsets, symbol_file_add)
13011         (symbol_file_add_from_bfd)
13012         (build_section_addr_info_from_section_table): Update.
13013         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13014         * symfile.c (alloc_section_addr_info): Remove.
13015         (build_section_addr_info_from_section_table): Change return type.
13016         Update.
13017         (build_section_addr_info_from_bfd)
13018         (build_section_addr_info_from_objfile): Likewise.
13019         (free_section_addr_info): Remove.
13020         (relative_addr_info_to_section_offsets): Change type of "addrs".
13021         (addrs_section_compar): Now a std::sort comparator.
13022         (addrs_section_sort): Change return type.
13023         (addr_info_make_relative): Change type of "addrs".  Update.
13024         (default_symfile_offsets, syms_from_objfile_1)
13025         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13026         (symbol_file_add_separate): Update.
13027         (symbol_file_add): Change type of "addrs".  Update.
13028         (add_symbol_file_command): Update.  Remove cleanups.
13029         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13030         cleanups.
13031         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13032         * solib.c (solib_read_symbols): Update.
13033         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13034         * machoread.c (macho_symfile_offsets): Update.
13035         * jit.c (jit_bfd_try_read_symtab): Update.
13036
13037 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13038
13039         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13040         unittests/utils-selftests.c.
13041         * unittests/utils-selftests.c: New file.
13042
13043 2018-03-14  Tom Tromey  <tom@tromey.com>
13044
13045         PR cli/14977:
13046         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13047         for NULL.
13048
13049 2018-03-14  Tom Tromey  <tom@tromey.com>
13050
13051         PR cli/19918:
13052         * printcmd.c (printf_pointer): Allow "-" in format.
13053
13054 2018-03-14  Tom Tromey  <tom@tromey.com>
13055
13056         * printcmd.c (_initialize_printcmd): Add usage to printf.
13057
13058 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13059
13060         * MAINTAINERS: Update my email address.
13061
13062 2018-03-13  Tom Tromey  <tom@tromey.com>
13063
13064         * machoread.c (macho_check_dsym): Change filenamep to a
13065         std::string*.
13066         (macho_symfile_read): Update.
13067         * symfile.c (load_command): Use std::string.
13068
13069 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13070
13071         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13072         to error message string.
13073         (riscv_register_name): Use xsnprintf instead of sprintf.
13074         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13075         internal_error.
13076         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13077         error.
13078         (riscv_push_dummy_call): Likewise.
13079
13080 2018-03-12  Tom Tromey  <tom@tromey.com>
13081
13082         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13083         Use gdb::byte_vector.
13084         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13085
13086 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13087
13088         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13089         parameter type to readable_regcache.
13090         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13091         the declaration.
13092
13093 2018-03-11  Tom Tromey  <tom@tromey.com>
13094
13095         * dwarf2read.c (struct nextfield): Add initializers.
13096         (struct nextfnfield): Remove.
13097         (struct fnfieldlist): Add initializers.  Remove "length" and
13098         "head", use std::vector.
13099         (struct decl_field_list): Remove.
13100         (struct field_info): Add initializers.
13101         <fields, baseclasses>: Now std::vector.
13102         <nbaseclasses, nfnfields, typedef_field_list_count,
13103         nested_types_list_count>: Remove.
13104         (dwarf2_add_field, dwarf2_add_type_defn)
13105         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13106         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13107         (process_structure_scope): Update.
13108
13109 2018-03-11  Tom Tromey  <tom@tromey.com>
13110
13111         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13112         for use by std::sort.
13113         (build_type_psymtabs_1): Use std::vector.
13114
13115 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13116
13117         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13118         and LIBMPFR in the printed configuration.
13119
13120 2018-03-08  Tom Tromey  <tom@tromey.com>
13121
13122         * source.c (get_filename_and_charpos): Use scoped_fd.
13123         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13124         (procfs_pidlist): Likewise.
13125         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13126         (iterate_over_mappings): Likewise.
13127
13128 2018-03-08  Tom Tromey  <tom@tromey.com>
13129
13130         * infcall.c (struct call_return_meta_info)
13131         <stack_temporaries_enabled>: Remove.
13132         (get_call_return_value, call_function_by_hand_dummy): Update.
13133         * thread.c (disable_thread_stack_temporaries): Remove.
13134         (enable_thread_stack_temporaries): Remove.
13135         (thread_stack_temporaries_enabled_p): Return bool.
13136         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13137         (get_last_thread_stack_temporary): Update.
13138         * eval.c (evaluate_subexp): Update.
13139         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13140         class, not a function.
13141         (value_ptr, value_vec): Remove typedefs.
13142         (class thread_info) <stack_temporaries_enabled>: Now bool.
13143         <stack_temporaries>: Now a std::vector.
13144         (thread_stack_temporaries_enabled_p)
13145         (value_in_thread_stack_temporaries): Return bool.
13146
13147 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13148
13149         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13150         (getpkt_or_notif_sane_1): Likewise.
13151
13152 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13153
13154         * build-id.c (build_id_to_debug_bfd): Use std::string.
13155
13156 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13157
13158         * build-id.c (find_separate_debug_file_by_buildid): Return
13159         std::string.
13160         * build-id.h (find_separate_debug_file_by_buildid): Return
13161         std::string.
13162         * coffread.c (coff_symfile_read): Adjust to std::string.
13163         * elfread.c (elf_symfile_read): Adjust to std::string.
13164         * symfile.c (separate_debug_file_exists): Change parameter to
13165         std::string.
13166         (find_separate_debug_file): Return std::string.
13167         (find_separate_debug_file_by_debuglink): Return std::string.
13168         * symfile.h (find_separate_debug_file_by_debuglink): Return
13169         std::string.
13170
13171 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13172
13173         * common/xml-utils.c (xml_escape_text): Move code to...
13174         (xml_escape_text_append): ... this new function.
13175         * common/xml-utils.h (xml_escape_text_append): New declaration.
13176         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13177         New function.
13178         (_initialize_xml_utils): register test_xml_escape_text_append as
13179         a selftest.
13180
13181 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13182
13183         * defs.h: Remove MAX_REGISTER_SIZE.
13184         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13185         asserts.
13186         * python/py-unwind.c (pyuw_sniffer): Likewise.
13187
13188 2018-03-07  Tom Tromey  <tom@tromey.com>
13189
13190         * linux-tdep.c (linux_info_proc): Update.
13191         * target.h (struct target_ops) <to_fileio_readlink>: Return
13192         optional<string>.
13193         (target_fileio_readlink): Return optional<string>.
13194         * remote.c (remote_hostio_readlink): Return optional<string>.
13195         * inf-child.c (inf_child_fileio_readlink): Return
13196         optional<string>.
13197         * target.c (target_fileio_readlink): Return optional<string>.
13198
13199 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13200
13201         * regcache.c (cooked_read_test): Add riscv to the list of
13202         architectures that have a save_reggroup.
13203
13204 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13205
13206         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13207         value is not a dynamic class object.
13208
13209 2018-03-06  Tom Tromey  <tom@tromey.com>
13210
13211         * rust-exp.y: Formatting fixes.
13212
13213 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13214
13215         * riscv-tdep.c (riscv_register_name): Remove target description
13216         support.
13217         (riscv_gdbarch_init): Remove target description check.
13218
13219 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13220
13221         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13222         comment.
13223         * riscv-tdep.h: Likewise.
13224
13225 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13226
13227         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13228         (riscv_pseudo_register_write): Delete.
13229         (riscv_gdbarch_init): Remove all use of pseudo registers.
13230
13231 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13232
13233         * record-btrace.c (btrace_print_lines): Replace cleanup
13234         parameter with RAII equivalents.
13235         (btrace_insn_history): Replace cleanup with RAII equivalents.
13236         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13237         make_cleanup_ui_out_tuple_begin_end): Remove.
13238         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13239         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13240         make_cleanup_ui_out_list_begin_end): Remove.
13241
13242 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13243
13244         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13245         parameter types to std::vector.  Use bool.
13246         (record_btrace_wait): Replace VEC(tp_t) with
13247         std::vector<thread_info *>.
13248         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13249
13250 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13251
13252         * record-btrace.c (record_btrace_disable_callback): Remove.
13253         (struct scoped_btrace_disable): New.
13254         (record_btrace_open): Use scoped_btrace_disable.
13255
13256 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13257
13258         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13259         reading values from registers.
13260
13261 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13262
13263         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13264         where appropriate.
13265
13266 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13267
13268         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13269         change parameter type.  Use GDB's print functions, and use
13270         core_addr_to_string where appropriate.
13271         (riscv_push_dummy_call): Use core_addr_to_string where
13272         appropriate, update call to riscv_print_arg_location, and reindent
13273         a few lines.
13274         (riscv_return_value): Update call to riscv_print_arg_location.
13275
13276 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13277             Tim Newsome <tim@sifive.com>
13278             Albert Ou <a0u@eecs.berkeley.edu>
13279             Darius Rad <darius@bluespec.com>
13280
13281         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13282         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13283         (ALLDEPFILES): Add riscv-tdep.c
13284         * configure.tgt: Add riscv support.
13285         * riscv-tdep.c: New file.
13286         * riscv-tdep.h: New file.
13287         * NEWS: Mention new target.
13288         * MAINTAINERS: Add entry for riscv.
13289
13290 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13291
13292         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13293         fields within aggregates.
13294
13295 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13296
13297         * record-btrace.c (btrace_print_lines): Change type of flags to
13298         gdb_disassembly_flags.
13299
13300 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13301
13302         * fbsd-nat.c: Include "inf-ptrace.h".
13303         (USE_SIGTRAP_SIGINFO): Conditionally define.
13304         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13305         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13306         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13307         function.
13308         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13309         Likewise.
13310         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13311         Likewise.
13312         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13313         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13314         "supports_stopped_by_hw_breakpoint" target methods.
13315
13316 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13317
13318         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13319         * fbsd-nat.c (debug_fbsd_nat): New variable.
13320         (show_fbsd_nat_debug): New function.
13321         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13322         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13323
13324 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13325
13326         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13327         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13328         prototype.
13329         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13330         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13331         method.
13332
13333 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13334
13335         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13336         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13337
13338 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13339
13340         * charset.c (struct charset_vector): New.
13341         (charsets): Change type to charset_vector.
13342         (find_charset_names): Adjust.
13343         (add_one): Adjust.
13344         (_initialize_charset): Adjust.
13345
13346 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13347
13348         * progspace.h (struct program_space) <deleted_solibs>: Change
13349         type to std::vector<std::string>.
13350         * progspace.c (clear_program_space_solib_cache): Adjust.
13351         * breakpoint.c (print_solib_event): Adjust.
13352         (check_status_catch_solib): Adjust.
13353         * solib.c (update_solib_list): Adjust.
13354         * ui-out.h (class ui_out) <field_string>: New overload.
13355         * ui-out.c (ui_out::field_string): New overload.
13356
13357 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13358
13359         * progspace.h (struct program_space): Add constructor and
13360         destructor, initialize fields.
13361         (add_program_space): Remove.
13362         * progspace.c (add_program_space): Rename to...
13363         (program_space::program_space): ... this.
13364         (release_program_space): Rename to...
13365         (program_space::~program_space): ... this.
13366         (delete_program_space): Use delete to delete program_space.
13367         (initialize_progspace): Use new to allocate program_space.
13368         * inferior.c (add_inferior_with_spaces): Likewise.
13369         (clone_inferior_command): Likewise.
13370         * infrun.c (follow_fork_inferior): Likewise.
13371         (handle_vfork_child_exec_or_exit): Likewise.
13372
13373 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13374
13375         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13376         (delim_string_to_char_ptr_vec): Return std::vector of
13377         gdb::unique_xmalloc_ptr.
13378         (dirnames_to_char_ptr_vec_append): Take std::vector of
13379         gdb::unique_xmalloc_ptr.
13380         (dirnames_to_char_ptr_vec): Return std::vector of
13381         gdb::unique_xmalloc_ptr.
13382         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13383         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13384         (delim_string_to_char_ptr_vec): Return an std::vector of
13385         gdb::unique_xmalloc_ptr, adjust the code.
13386         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13387         gdb::unique_xmalloc_ptr, adjust the code.
13388         (dirnames_to_char_ptr_vec): Return an std::vector of
13389         gdb::unique_xmalloc_ptr, adjust the code.
13390         * auto-load.c (auto_load_safe_path_vec): Change type to
13391         std::vector of gdb::unique_xmalloc_ptr.
13392         (auto_load_expand_dir_vars): Return an std::vector of
13393         gdb::unique_xmalloc_ptr, adjust the code.
13394         (auto_load_safe_path_vec_update): Adjust.
13395         (filename_is_in_auto_load_safe_path_vec): Adjust.
13396         (auto_load_objfile_script_1): Adjust.
13397         * build-id.c (build_id_to_debug_bfd): Adjust.
13398         * linux-thread-db.c (thread_db_load_search): Adjust.
13399         * source.c (add_path): Adjust.
13400         (openp): Adjust.
13401         * symfile.c (find_separate_debug_file): Adjust.
13402         * utils.c (do_free_char_ptr_vec): Remove.
13403         (make_cleanup_free_char_ptr_vec): Remove.
13404
13405 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13406
13407         PR gdb/22907
13408         * common/pathstuff.c: Conditionally include "<windows.h>".
13409
13410 2018-03-01  Georg Sauthoff  <mail@georg.so>
13411
13412         PR gdb/22888
13413         * gcore.in: Quote variables and switch interpreter to bash.
13414
13415 2018-03-01  Tom Tromey  <tom@tromey.com>
13416
13417         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13418         assertion.  Add assertion for discriminant_index.
13419         (quirk_rust_enum): Use correct base type name in univariant case.
13420
13421 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13422
13423         * record.c (get_call_history_modifiers): Return a
13424         record_print_flags.
13425         (cmd_record_call_history): Adjust.
13426         * record-btrace.c (record_btrace_call_history): Adjust.
13427         (record_btrace_call_history_range): Adjust.
13428         (record_btrace_call_history_from): Adjust.
13429         * target-debug.h (target_debug_print_record_print_flags): New.
13430         * target-delegates.c: Re-generate.
13431         * target.c (target_call_history): Change flags type.
13432         (target_call_history_from): Likewise.
13433         (target_call_history_range): Likewise.
13434         * target.h (struct target_ops) <target_call_history>: Likewise.
13435         (target_call_history_from): Likewise.
13436         (target_call_history_range): Likewise.
13437
13438 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13439             Simon Marchi  <simon.marchi@polymtl.ca>
13440
13441         * common/common-utils.c: Include "sys/stat.h".
13442         (is_regular_file): Move here from "source.c"; change return
13443         type to "bool".
13444         * common/common-utils.h (is_regular_file): New prototype.
13445         * common/pathstuff.c (contains_dir_separator): New function.
13446         * common/pathstuff.h (contains_dir_separator): New prototype.
13447         * source.c: Don't include "sys/stat.h".
13448         (is_regular_file): Move to "common/common-utils.c".
13449
13450 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13451
13452         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13453         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13454         * auto-load.c: Include "common/pathstuff.h".
13455         * common/common-def.h (current_directory): Move here.
13456         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13457         function.
13458         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13459         prototype.
13460         * common/pathstuff.c: New file.
13461         * common/pathstuff.h: New file.
13462         * compile/compile.c: Include "common/pathstuff.h".
13463         * defs.h (current_directory): Move to "common/common-defs.h".
13464         * dwarf2read.c: Include "common/pathstuff.h".
13465         * exec.c: Likewise.
13466         * guile/scm-safe-call.c: Likewise.
13467         * linux-thread-db.c: Likewise.
13468         * main.c: Likewise.
13469         * nto-tdep.c: Likewise.
13470         * objfiles.c: Likewise.
13471         * source.c: Likewise.
13472         * symtab.c: Likewise.
13473         * utils.c: Include "common/pathstuff.h".
13474         (gdb_realpath): Move to "common/pathstuff.c".
13475         (gdb_realpath_keepfile): Likewise.
13476         (gdb_abspath): Likewise.
13477         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13478         (gdb_realpath_keepfile): Likewise.
13479         (gdb_abspath): Likewise.
13480
13481 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13482
13483         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13484         wildcard process pid for super_resume for kernels with a
13485         specific bug.
13486
13487 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13488
13489         * compile/compile.c (get_args): Add additional comments
13490         explaining function.
13491
13492 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13493             Tom Tromey  <tom@tromey.com>
13494
13495         * target.h (memory_write_request_s): Remove typedef.  Don't define
13496         VEC.
13497         (target_write_memory_blocks): Change argument to std::vector.
13498         (struct memory_write_request): Add constructor.
13499         * target-memory.c (compare_block_starting_address): Return bool.
13500         Change argument types.
13501         (claim_memory): Change arguments to use std::vector.
13502         (split_regular_and_flash_blocks, blocks_to_erase)
13503         (compute_garbled_blocks): Likewise.
13504         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13505         (target_write_memory_blocks): Change argument to std::vector.
13506         * symfile.c (struct load_section_data): Add constructor and
13507         destructor.  Use std::vector for "requests".
13508         (struct load_progress_data): Add initializers.
13509         (load_section_callback): Update.  Use "new".
13510         (clear_memory_write_data): Remove.
13511         (generic_load): Update.
13512
13513 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13514
13515         * arch/aarch64.h: Use common/tdesc.h.
13516
13517 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13518
13519         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13520         architecture with a 64-bit ABI.
13521
13522 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13523
13524         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13525         ahead of target description loading.
13526
13527 2018-02-26  Tom Tromey  <tom@tromey.com>
13528
13529         * stack.c (backtrace_command_1): Update.
13530         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13531         of "flags".
13532         * python/py-framefilter.c (py_print_frame)
13533         (gdbpy_apply_frame_filter): Change type of "flags".
13534         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13535         of "flags".
13536         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13537         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13538         * extension.h (enum frame_filter_flag): Rename from
13539         frame_filter_flags.
13540         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13541         (apply_ext_lang_frame_filter): Change type of "flags".
13542         * extension.c (apply_ext_lang_frame_filter): Change type of
13543         "flags".
13544         * extension-priv.h (struct extension_language_ops)
13545         <apply_frame_filter>: Change type of "flags".
13546
13547 2018-02-26  Tom Tromey  <tom@tromey.com>
13548
13549         PR python/16497:
13550         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13551         off-by-one in py_end computation.
13552         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13553         PRINT_MORE_FRAMES.
13554         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13555         constant.
13556
13557 2018-02-26  Tom Tromey  <tom@tromey.com>
13558
13559         * dwarf2read.c (struct variant_field): New.
13560         (struct nextfield) <variant>: New field.
13561         (dwarf2_add_field): Handle DW_TAG_variant_part.
13562         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13563         discriminated union.
13564         (read_structure_type): Handle DW_TAG_variant_part.
13565         (handle_struct_member_die): New function, extracted from
13566         process_structure_scope.  Handle DW_TAG_variant.
13567         (process_structure_scope): Handle discriminated unions.  Call
13568         handle_struct_member_die.
13569
13570 2018-02-26  Tom Tromey  <tom@tromey.com>
13571
13572         * rust-lang.h (rust_last_path_segment): Declare.
13573         * rust-lang.c (rust_last_path_segment): Now public.  Change
13574         contract.
13575         (struct disr_info): Remove.
13576         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13577         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13578         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13579         (rust_enum_p, rust_enum_variant): New function.
13580         (rust_underscore_fields): Remove "offset" parameter.
13581         (rust_print_enum): New function.
13582         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13583         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13584         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13585         enums.
13586         (rust_internal_print_type): New function, from rust_print_type.
13587         Remove enum code.
13588         (rust_print_type): Call rust_internal_print_type.
13589         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13590         Update enum handling.
13591         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13592         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13593         (rust_union_quirks): New functions.
13594         (process_full_comp_unit, process_full_type_unit): Call
13595         rust_union_quirks.
13596         (process_structure_scope): Update rust_unions if necessary.
13597
13598 2018-02-26  Tom Tromey  <tom@tromey.com>
13599
13600         * value.h (value_union_variant): Declare.
13601         * valops.c (value_union_variant): New function.
13602         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13603         (struct discriminant_info): New.
13604         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13605         enumerator.
13606         (struct main_type) <flag_discriminated_union>: New field.
13607
13608 2018-02-26  Tom Tromey  <tom@tromey.com>
13609
13610         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13611         unittests/unpack-selftests.c.
13612         * unittests/unpack-selftests.c: New file.
13613         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13614
13615 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13616
13617         * dwarf2read.c (struct partial_die_info) <read>: New method.
13618         (read_partial_die): Remove the declaration.
13619         (load_partial_dies): Update.
13620         (partial_die_info::partial_die_info):
13621         (read_partial_die): Change it to partial_die_info::read.
13622
13623 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13624
13625         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13626         (fixup_partial_die): Remove declaration.
13627         (scan_partial_symbols): Update.
13628         (partial_die_parent_scope): Likewise.
13629         (partial_die_full_name): Likewise.
13630         (fixup_partial_die): Change it to partial_die_info::fixup.
13631
13632 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13633
13634         * dwarf2read.c (read_partial_die): Update the declaration.
13635         (load_partial_dies): Caller update.
13636         (read_partial_die): Remove one argument abbrev_len.
13637
13638 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13639
13640         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13641         assignment operator.
13642         (load_partial_dies): Use ctor and copy ctor.
13643         (read_partial_die): Update.
13644         (dwarf2_cu::find_partial_die): Use ctor.
13645
13646 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13647
13648         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13649         (find_partial_die_in_comp_unit): Change it to
13650         dwarf2_cu::find_partial_die.
13651         (find_partial_die): Update.
13652
13653 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13654
13655         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13656         is NULL.
13657
13658 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13659
13660         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13661
13662 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13663
13664         * arch/amd64.h: Use common/tdesc.h.
13665         * arch/i386.c: Likewise.
13666         * arch/i386.h: Likewise.
13667         * arch/tic6x.c: Likewise.
13668         * arch/tdesc.h: Move file from here...
13669         * common/tdesc.h: ...to here.
13670         * features/aarch64-core.c: Regenerate.
13671         * features/aarch64-fpu.c: Regenerate.
13672         * features/i386/32bit-avx.c: Regenerate.
13673         * features/i386/32bit-avx512.c: Regenerate.
13674         * features/i386/32bit-core.c: Regenerate.
13675         * features/i386/32bit-linux.c: Regenerate.
13676         * features/i386/32bit-mpx.c: Regenerate.
13677         * features/i386/32bit-pkeys.c: Regenerate.
13678         * features/i386/32bit-sse.c: Regenerate.
13679         * features/i386/64bit-avx.c: Regenerate.
13680         * features/i386/64bit-avx512.c: Regenerate.
13681         * features/i386/64bit-core.c: Regenerate.
13682         * features/i386/64bit-linux.c: Regenerate.
13683         * features/i386/64bit-mpx.c: Regenerate.
13684         * features/i386/64bit-pkeys.c: Regenerate.
13685         * features/i386/64bit-segments.c: Regenerate.
13686         * features/i386/64bit-sse.c: Regenerate.
13687         * features/i386/x32-core.c: Regenerate.
13688         * features/tic6x-c6xp.c: Regenerate.
13689         * features/tic6x-core.c: Regenerate.
13690         * features/tic6x-gp.c: Regenerate.
13691         * target-descriptions.c: Use common/tdesc.h.
13692         * target-descriptions.h: Likewise.
13693
13694 2018-02-24  Tom Tromey  <tom@tromey.com>
13695
13696         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13697         (try_thread_db_load_from_dir, thread_db_load_search): Use
13698         std::string.
13699         (info_auto_load_libthread_db_compare): Return bool.  Change
13700         argument types.
13701         (info_auto_load_libthread_db): Use std::vector, std::string.
13702         Remove cleanups.
13703
13704 2018-02-24  Tom Tromey  <tom@tromey.com>
13705
13706         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13707         std::string.
13708         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13709         std::string*.
13710         * gdbarch.c: Rebuild.
13711         * gdbarch.h: Rebuild.
13712         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13713         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13714         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13715         std::string*.
13716
13717 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13718
13719         * gdbtypes.h (sect_offset): Change type to uint64_t.
13720         (sect_offset_str): New function.
13721         * dwarf2read.c (create_addrmap_from_aranges): Use
13722         sect_offset_str.
13723         (error_check_comp_unit_head): Likewise.
13724         (create_debug_type_hash_table): Likewise.
13725         (read_cutu_die_from_dwo): Likewise.
13726         (init_cutu_and_read_dies): Likewise.
13727         (init_cutu_and_read_dies_no_follow): Likewise.
13728         (process_psymtab_comp_unit_reader): Likewise.
13729         (partial_die_parent_scope): Likewise.
13730         (peek_die_abbrev): Likewise.
13731         (process_queue): Likewise.
13732         (dwarf2_physname): Likewise.
13733         (read_namespace_alias): Likewise.
13734         (read_import_statement): Likewise.
13735         (create_dwo_cu_reader): Likewise.
13736         (create_cus_hash_table): Likewise.
13737         (lookup_dwo_cutu): Likewise.
13738         (inherit_abstract_dies): Likewise.
13739         (read_func_scope): Likewise.
13740         (read_call_site_scope): Likewise.
13741         (dwarf2_add_member_fn): Likewise.
13742         (read_common_block): Likewise.
13743         (read_module_type): Likewise.
13744         (read_typedef): Likewise.
13745         (read_subrange_type): Likewise.
13746         (load_partial_dies): Likewise.
13747         (read_partial_die): Likewise.
13748         (find_partial_die): Likewise.
13749         (read_str_index): Likewise.
13750         (dwarf2_string_attr): Likewise.
13751         (build_error_marker_type): Likewise.
13752         (lookup_die_type): Likewise.
13753         (dump_die_shallow): Likewise.
13754         (follow_die_ref): Likewise.
13755         (dwarf2_fetch_die_loc_sect_off): Likewise.
13756         (dwarf2_fetch_constant_bytes): Likewise.
13757         (follow_die_sig): Likewise.
13758         (get_signatured_type): Likewise.
13759         (get_DW_AT_signature_type): Likewise.
13760         (dwarf2_find_containing_comp_unit): Likewise.
13761         (set_die_type): Likewise.
13762
13763 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13764
13765         * arch/aarch64.c: Include "common-defs.h".
13766         * arch/amd64.c: Likewise.
13767         * arch/i386.c: Likewise.
13768
13769 2018-02-21  Tom Tromey  <tom@tromey.com>
13770
13771         * value.h: (extract_field_op): Update.
13772         * eval.c (extract_field_op): Return a const char *.
13773         * expression.h (parse_expression_for_completion): Update.
13774         * completer.c (complete_expression): Update.
13775         (add_struct_fields): Make fieldname const.
13776         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13777         (mark_completion_tag, parse_exp_in_context_1): Update.
13778         (parse_expression_for_completion): Change "name" to
13779         unique_xmalloc_ptr*.
13780
13781 2018-02-21  Tom Tromey  <tom@tromey.com>
13782
13783         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13784
13785 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13786
13787         * avr-tdep.c (avr_read_pc): Change parameter type to
13788         readable_regcache.
13789         * gdbarch.sh (read_pc): Likewise.
13790         * gdbarch.c: Re-generated.
13791         * gdbarch.h: Re-generated.
13792         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13793         readable_regcache.
13794         * ia64-tdep.c (ia64_read_pc): Likewise.
13795         * mips-tdep.c (mips_read_pc): Likewise.
13796         * spu-tdep.c (spu_read_pc): Likewise.
13797
13798 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13799
13800         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13801         * regcache-dump.c: New file.
13802         * regcache.c: Move register_dump to regcache-dump.c.
13803         (maintenance_print_registers): Likewise.
13804         (maintenance_print_raw_registers): Likewise.
13805         (maintenance_print_cooked_registers): Likewise.
13806         (maintenance_print_register_groups): Likewise.
13807         (maintenance_print_remote_registers): Likewise.
13808         (_initialize_regcache): Likewise.
13809         * regcache.h (register_dump): Moved from regcache.c.
13810
13811 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13812
13813         * regcache.c (regcache::regcache): Update.
13814         (regcache::invalidate): Move it to detached_regcache::invalidate.
13815         (get_thread_arch_aspace_regcache): Update.
13816         (regcache::raw_update): Update.
13817         (regcache::cooked_read): Remove some code.
13818         (regcache::cooked_read_value): Likewise.
13819         (regcache::raw_write): Remove assert on m_readonly_p.
13820         (regcache::raw_supply_integer): Move it to
13821         detached_regcache::raw_supply_integer.
13822         (regcache::raw_supply_zeroed): Likewise.
13823         * regcache.h (detached_regcache) <raw_supply_integer>: New
13824         declaration.
13825         <raw_supply_zeroed, invalidate>: Likewise.
13826         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13827         <invalidate>: Likewise.
13828         <m_readonly_p>: Removed.
13829
13830 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13831
13832         * infcmd.c (get_return_value): Let stop_regs point to
13833         get_current_regcache.
13834         * regcache.c (regcache::regcache): Remove.
13835         (register_dump_reg_buffer): New class.
13836         (regcache_print): Adjust.
13837         * regcache.h (regcache): Remove constructors.
13838
13839 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13840
13841         * regcache.c (class register_dump): New class.
13842         (register_dump_regcache, register_dump_none): New class.
13843         (register_dump_remote, register_dump_groups): New class.
13844         (regcache_print): Update.
13845         * regcache.h (regcache_dump_what): Move it to regcache.c.
13846         (regcache) <dump>: Remove.
13847
13848 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13849
13850         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13851          reg_buffer_rw *.
13852         (jit_unwind_reg_set_impl): Call raw_supply.
13853         (jit_frame_sniffer): Use reg_buffer_rw.
13854         * record-full.c (record_full_core_regbuf): Change its type.
13855         (record_full_core_open_1): Use reg_buffer_rw.
13856         (record_full_close): Likewise.
13857         (record_full_core_fetch_registers): Use regcache->raw_supply.
13858         (record_full_core_store_registers): Likewise.
13859         * regcache.c (regcache::get_register_status): Move it to
13860         reg_buffer.
13861         (regcache_raw_set_cached_value): Remove.
13862         (regcache::raw_set_cached_value): Remove.
13863         (regcache::raw_write): Call raw_supply.
13864         (regcache::raw_supply): Move it to reg_buffer_rw.
13865         * regcache.h (regcache_raw_set_cached_value): Remove.
13866         (reg_buffer_rw): New class.
13867
13868 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13869
13870         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13871         readonly_detached_regcache.
13872         (dummy_frame_prev_register): Use regcache->cooked_read.
13873         * frame.c (frame_save_as_regcache): Change return type.
13874         (frame_pop): Update.
13875         * frame.h (frame_save_as_regcache): Update declaration.
13876         * inferior.h (get_infcall_suspend_state_regcache): Update
13877         declaration.
13878         * infrun.c (infcall_suspend_state) <registers>: use
13879         readonly_detached_regcache.
13880         (save_infcall_suspend_state): Don't use regcache_dup.
13881         (get_infcall_suspend_state_regcache): Change return type.
13882         * linux-fork.c (struct fork_info) <savedregs>: Change to
13883         readonly_detached_regcache.
13884         <pc>: New field.
13885         (fork_save_infrun_state): Don't use regcache_dup.
13886         (info_checkpoints_command): Adjust.
13887         * mi/mi-main.c (register_changed_p): Update declaration.
13888         (mi_cmd_data_list_changed_registers): Use
13889         readonly_detached_regcache.
13890         (register_changed_p): Change parameter type to
13891         readonly_detached_regcache.
13892         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13893         readonly_detached_regcache.
13894         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13895         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13896         New.
13897         (regcache::save): Move it to reg_buffer.
13898         (regcache::restore): Change parameter type.
13899         (regcache_dup): Remove.
13900         * regcache.h (reg_buffer) <save>: New method.
13901         (readonly_detached_regcache): New class.
13902         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13903         readonly_detached_regcache.
13904         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13905
13906 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13907
13908         * frame.c (frame_save_as_regcache): Use regcache method save.
13909         (frame_pop): Use regcache method restore.
13910         * infrun.c (restore_infcall_suspend_state): Likewise.
13911         * linux-fork.c (fork_load_infrun_state): Likewise.
13912         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13913         save.
13914         * regcache.c (regcache_save): Remove.
13915         (regcache::restore): More asserts.
13916         (regcache_cpy): Remove.
13917         * regcache.h (regcache_save): Remove the declaration.
13918         (regcache::restore): Move from private to public.
13919         Remove the friend declaration of regcache_cpy.
13920         (regcache_cpy): Remove declaration.
13921
13922 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13923
13924         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13925         parameter type to 'readable_regcache *'.
13926         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13927         * arm-tdep.c (arm_neon_quad_read): Likewise.
13928         (arm_pseudo_read): Likewise.
13929         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13930         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13931         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13932         * gdbarch.c: Re-generated.
13933         * gdbarch.h: Re-generated.
13934         * gdbarch.sh (pseudo_register_read): Change parameter type to
13935         'readable_regcache *'.
13936         (pseudo_register_read_value): Likewise.
13937         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13938         (h8300_pseudo_register_read): Likewise.
13939         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13940         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13941         (i386_pseudo_register_read_into_value): Likewise.
13942         (i386_pseudo_register_read_value): Likewise.
13943         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13944         declaration.
13945         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13946         * m32c-tdep.c (m32c_raw_read): Likewise.
13947         (m32c_read_flg): Likewise.
13948         (m32c_banked_register): Likewise.
13949         (m32c_banked_read): Likewise.
13950         (m32c_sb_read): Likewise.
13951         (m32c_part_read): Likewise.
13952         (m32c_cat_read): Likewise.
13953         (m32c_r3r2r1r0_read): Likewise.
13954         (m32c_pseudo_register_read): Likewise.
13955         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13956         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13957         (mep_pseudo_cr64_read): Likewise.
13958         (mep_pseudo_register_read): Likewise.
13959         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13960         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13961         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13962         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13963         (regcache::cooked_read): Likewise.
13964         (regcache::cooked_read_value): Likewise.
13965         (regcache_cooked_read_signed):
13966         (regcache::cooked_read): Likewise.
13967         * regcache.h (readable_regcache): New class.
13968         (regcache): Inherit readable_regcache.  Move some methods to
13969         readable_regcache.
13970         * rl78-tdep.c (rl78_pseudo_register_read): Change
13971         parameter type to 'readable_regcache *'.
13972         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13973         (e500_pseudo_register_read): Change parameter type to
13974         'readable_regcache *'.
13975         (dfp_pseudo_register_read): Likewise.
13976         (vsx_pseudo_register_read): Likewise.
13977         (efpr_pseudo_register_read): Likewise.
13978         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13979         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13980         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13981         (sh64_pseudo_register_read): Likewise.
13982         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13983         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13984         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13985         (spu_pseudo_register_read): Likewise.
13986         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13987         (xtensa_pseudo_register_read): Likewise.
13988
13989 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13990
13991         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13992         (regcache::arch): Move it to reg_buffer::arch.
13993         (regcache::register_buffer): Likewise.
13994         (regcache::assert_regnum): Likewise.
13995         (regcache::num_raw_registers): Likewise.
13996         * regcache.h (reg_buffer): New class.
13997         (regcache): Inherit reg_buffer.
13998
13999 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14000
14001         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14002         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14003
14004 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14005
14006         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14007
14008 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14009
14010         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14011         (SFILES): Remove common/*.c files.
14012         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14013         * common/common.host: Add common reference.
14014         * configure.ac: Likewise.
14015         * configure: Regenerate.
14016
14017 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14018
14019         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14020         (block_initialize_namespace): Use new.
14021         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14022         (dwarf2_free_objfile): Use delete.
14023         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14024         (copy_type_recursive): Use new.
14025         * gdb_obstack.h (allocate_on_obstack): New.
14026
14027 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14028
14029         PR gdb/22849
14030         * inferior.c (exit_inferior_1): Reset inf->control.
14031
14032 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14033
14034         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14035         declaration.
14036
14037 2018-02-14  Pedro Alves  <palves@redhat.com>
14038
14039         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14040         frame_cleanup_after_sniffer on exception.
14041
14042 2018-02-14  Tom Tromey  <tom@tromey.com>
14043
14044         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14045         const.
14046         (solib_bfd_open): Make pathname const.
14047         * solib.c (solib_bfd_open): Make pathname const.
14048         * solib-spu.c (spu_bfd_fopen): Make name const.
14049         (spu_bfd_open): Make pathname const.
14050         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14051         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14052
14053 2018-02-14  Tom Tromey  <tom@tromey.com>
14054
14055         * symfile.c (symfile_bfd_open): Update.
14056         * source.h (openp, source_full_path_of, find_and_open_source):
14057         Change argument type to unique_xmalloc_ptr.
14058         * source.c (openp): Take a unique_xmalloc_ptr.
14059         (source_full_path_of, find_and_open_source): Likewise.
14060         (open_source_file, symtab_to_fullname): Update.
14061         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14062         unique_xmalloc_ptr.
14063         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14064         (exec_file_find): Update.
14065         * psymtab.c (psymtab_to_fullname): Update.
14066         * nto-tdep.h (nto_find_and_open_solib): Update.
14067         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14068         unique_xmalloc_ptr.
14069         * exec.c (exec_file_attach): Update.
14070         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14071         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14072
14073 2018-02-14  Tom Tromey  <tom@tromey.com>
14074
14075         * solib.c: Include source.h.
14076         * nto-tdep.c: Include source.h.
14077         * mi/mi-cmd-env.c: Include source.h.
14078         * infcmd.c: Include source.h.
14079         * exec.c: Include source.h.
14080         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14081         (add_path, directory_switch, source_path, init_source_path): Move
14082         declarations...
14083         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14084         (add_path, directory_switch, source_path, init_source_path):
14085         ...here.
14086
14087 2018-02-14  Tom Tromey  <tom@tromey.com>
14088
14089         * solist.h (exec_file_find, solib_find): Return
14090         unique_xmalloc_ptr.
14091         (solib_bfd_fopen): Take a const char *.
14092         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14093         (exec_file_find, solib_find): Likewise.
14094         (solib_bfd_fopen): Do not take ownership of "pathname".
14095         (solib_bfd_open): Use unique_xmalloc_ptr.
14096         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14097         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14098         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14099         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14100
14101 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14102
14103         * ada-lang.c (name_match_type_from_name): Remove reference to
14104         ada_name_for_lookup in function's documentation.
14105         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14106
14107 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14108
14109         * defs.h (enum openp_flags): New enum.
14110         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14111         Move to enum openp_flags.
14112         (openp_flags): New enum flags.
14113         (openp): Change parameter type to openp_flags.
14114         * source.c (openp): Change parameter type to openp_flags.
14115         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14116         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14117
14118 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14119
14120         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14121         per-command.
14122
14123 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14124
14125         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14126         into...
14127         (class dwarf2_queue_guard): ...the destructor of this new class.
14128         (dw2_do_instantiate_symtab): Create instance of the new class
14129         dwarf2_queue_guard, remove cleanup.
14130
14131 2018-02-09  Tom Tromey  <tom@tromey.com>
14132
14133         * source.c (find_source_lines): Don't reference past the end of
14134         the vector.
14135
14136 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14137
14138         * remote.c (remote_btrace_maybe_reopen): Change error message.
14139         * btrace.c (btrace_enable): Likewise.
14140         (parse_xml_btrace): Likewise.
14141         (parse_xml_btrace_conf): Likewise.
14142
14143 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14144
14145         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14146         (linux_enable_pt, linux_enable_bts): Call
14147         diagnose_perf_event_open_fail.
14148
14149 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14150
14151         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14152         Remove parameter and change return type.  Update callers.  Move it.
14153         (linux_enable_bts, linux_enable_pt): Improve error message.
14154         (linux_enable_pt): Remove zero buffer size check.
14155         (linux_enable_btrace): Improve error messages.  Remove NULL return
14156         check.
14157
14158 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14159
14160         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14161         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14162         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14163         (linux_supports_pt, linux_supports_btrace): Remove.
14164         (linux_enable_bts): Call cpu_supports_bts.
14165         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14166         * remote.c (remote_supports_btrace): Remove.
14167         (init_remote_ops): Remove remote_supports_btrace.
14168         * target-delegates.c: Regenerated.
14169         * target.c (target_supports_btrace): Remove.
14170         * target.h (target_ops) <to_supports_btrace>: Remove
14171         (target_supports_btrace): Remove.
14172         * x86-linux-nat.c (x86_linux_create_target): Remove
14173         linux_supports_btrace.
14174
14175 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14176
14177         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14178         btrace failed.
14179         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14180         exception and use message in own exception.
14181
14182 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14183
14184         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14185         (perf_event_pt_event_type): Use gdb_file_up.
14186         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14187         scoped_fd, and scoped_mmap.
14188
14189 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14190
14191         * common/scoped_mmap.h: New.
14192         * unittests/scoped_mmap-selftest.c: New.
14193         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14194         unittests/scoped_mmap-selftest.c.
14195
14196 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14197
14198         * common/scoped_fd.h: New.
14199         * unittests/scoped_fd-selftest.c: New.
14200         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14201         unittests/scoped_fd-selftest.c.
14202
14203 2018-02-09  Tom Tromey  <tom@tromey.com>
14204
14205         * auto-load.c (auto_load_section_scripts): Use
14206         gdb::unique_xmalloc_ptr.
14207
14208 2018-02-09  Tom Tromey  <tom@tromey.com>
14209
14210         * auto-load.c (execute_script_contents): Use std::string.
14211
14212 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14213
14214         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14215         Python function, rather than a new command.
14216
14217 2018-02-08  Tom Tromey  <tom@tromey.com>
14218
14219         * solib.c (solib_find_1): Use std::string.
14220         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14221
14222 2018-02-08  Tom Tromey  <tom@tromey.com>
14223
14224         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14225
14226 2018-02-08  Tom Tromey  <tom@tromey.com>
14227
14228         * source.c (find_source_lines): Use gdb::def_vector.
14229
14230 2018-02-08  Tom Tromey  <tom@tromey.com>
14231
14232         * macrocmd.c (struct temporary_macro_definition): New.
14233         (macro_define_command): Use temporary_macro_definition.  Remove
14234         cleanups.
14235         (free_macro_definition_ptr): Remove.
14236
14237 2018-02-08  Tom Tromey  <tom@tromey.com>
14238
14239         * macroexp.c (maybe_expand): Use std::string.
14240
14241 2018-02-08  Tom Tromey  <tom@tromey.com>
14242
14243         * macroexp.c (struct macro_buffer): Add initializers for some
14244         members.
14245         (init_buffer, init_shared_buffer, free_buffer)
14246         (free_buffer_return_text): Remove.
14247         (macro_buffer): New constructors.
14248         (~macro_buffer): New destructor.
14249         (macro_buffer::set_shared): New method.
14250         (macro_buffer::resize_buffer, macro_buffer::appendc)
14251         (macro_buffer::appendmem): Now methods, not free functions.
14252         (set_token, append_tokens_without_splicing, stringify)
14253         (macro_stringify): Update.
14254         (gather_arguments): Change return type.  Remove argc_p argument,
14255         add args_ptr argument.  Use std::vector.
14256         (substitute_args): Remove argc argument.  Accept std::vector.
14257         (expand): Update.  Use std::vector.
14258         (scan, macro_expand, macro_expand_next): Update.
14259
14260 2018-02-08  Tom Tromey  <tom@tromey.com>
14261
14262         * symtab.c (default_collect_symbol_completion_matches_break_on):
14263         Use unique_xmalloc_ptr.
14264         * macroscope.h: (sal_macro_scope, user_macro_scope)
14265         (default_macro_scope): Return unique_xmalloc_ptr.
14266         * macroscope.c (sal_macro_scope, user_macro_scope)
14267         (default_macro_scope): Return unique_xmalloc_ptr.
14268         * macroexp.h (macro_expand, macro_expand_once): Return
14269         unique_xmalloc_ptr.
14270         * macroexp.c (macro_expand, macro_expand_once): Return
14271         unique_xmalloc_ptr.
14272         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14273         (info_macro_command, info_macros_command): Use
14274         unique_xmalloc_ptr.
14275         * compile/compile-c-support.c (write_macro_definitions): Use
14276         unique_xmalloc_ptr.
14277         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14278
14279 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14280
14281         * value.c (value_static_field): Assign field type instead of
14282         containing type when returning an optimized out value.
14283
14284 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14285
14286         * ft32-tdep.c (ft32_read_pc): Remove.
14287         (ft32_write_pc): Remove.
14288         (ft32_gdbarch_init): Update.
14289         * m32r-tdep.c (m32r_read_pc): Remove.
14290         (m32r_gdbarch_init): Update.
14291         * mep-tdep.c (mep_read_pc): Remove.
14292         (mep_gdbarch_init): Update.
14293         * microblaze-tdep.c (microblaze_write_pc): Remove.
14294         (microblaze_gdbarch_init): Update.
14295         * mn10300-tdep.c (mn10300_read_pc): Remove.
14296         (mn10300_write_pc): Remove.
14297         (mn10300_gdbarch_init): Update.
14298         * moxie-tdep.c (moxie_read_pc): Remove.
14299         (moxie_write_pc): Remove.
14300         (moxie_gdbarch_init): Update.
14301
14302 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14303
14304         * expprint.c (print_subexp_standard): Handle
14305         OP_F77_UNDETERMINED_ARGLIST.
14306         (dump_subexp_body_standard): Likewise.
14307
14308 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14309
14310         * target-descriptions.c (tdesc_element_visitor) Add empty
14311         implementations.
14312         (tdesc_type): Move make_gdb_type from here.
14313         (tdesc_type_builtin): Likewise.
14314         (tdesc_type_vector): Likewise.
14315         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14316         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14317         (make_gdb_type_union): Likewise.
14318         (make_gdb_type_flags): Likewise.
14319         (make_gdb_type_enum): Likewise.
14320         (make_gdb_type): New function.
14321         (tdesc_register_type): Use static make_gdb_type.
14322
14323 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14324
14325         * infcmd.c (default_print_one_register_info): Align natural-format
14326         column values consistently one under another.
14327         (pad_to_column): New function.
14328
14329 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14330
14331         * dwarf2read.c (dwarf2_physname): Move commment.
14332
14333 2018-02-01  Leszek Swirski  <leszeks@google.com>
14334
14335         * varobj.c (varobj_formatted_print_options): Allow recursive
14336         pretty printing if pretty printing is enabled.
14337
14338 2018-02-01  Leszek Swirski  <leszeks@google.com>
14339
14340         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14341         names after a structop as a filename.
14342
14343 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14344
14345         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14346         (arm_record_coproc_data_proc): Likewise.
14347
14348 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14349
14350         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14351
14352 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14353
14354         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14355         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14356
14357 2018-01-31  Pedro Alves  <palves@redhat.com>
14358
14359         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14360         * inflow.c (child_terminal_save_inferior): Wrap reference to
14361         tcgetpgrp in HAVE_TERMIOS_H.
14362         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14363         _WIN32.
14364         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14365         always iterate over all inferiors.
14366         (gdbsim_cntrl_c): Adjust.
14367         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14368
14369 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14370
14371         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14372         index type is objfile-owned if the element type is as well.
14373
14374 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14375
14376         GDB 8.1 released.
14377
14378 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14379
14380         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14381         "features/s390x-linux64.c".
14382         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14383         s390_linux32 and s390x_linux64.
14384         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14385         default tdesc.
14386         * s390-tdep.c: Include "features/s390-linux32.c" and
14387         "features/s390x-linux64.c".
14388         (s390_tdesc_valid): Add check for tdesc_has_registers.
14389         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14390         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14391         tdesc_s390x_linux64.
14392         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14393         tdesc_s390x_linux64 to...
14394         * s390-tdep.h: ...here.
14395
14396 2018-01-30  Pedro Alves  <palves@redhat.com>
14397
14398         PR gdb/13211
14399         * config.in, configure: Regenerate.
14400         * configure.ac: Check for getpgid.
14401         * go32-nat.c (go32_pass_ctrlc): New.
14402         (go32_target): Install it.
14403         * inf-child.c (inf_child_target): Install
14404         child_terminal_save_inferior, child_pass_ctrlc and
14405         child_interrupt.
14406         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14407         (inf_ptrace_target): No longer install it.
14408         * infcmd.c (interrupt_target_1): Adjust.
14409         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14410         (child_interrupt): Declare.
14411         (inferior::terminal_state): New.
14412         * inflow.c (struct terminal_info): Update comments.
14413         (inferior_process_group): Delete.
14414         (terminal_is_ours): Delete.
14415         (gdb_tty_state): New.
14416         (child_terminal_init): Adjust.
14417         (is_gdb_terminal, sharing_input_terminal_1)
14418         (sharing_input_terminal): New functions.
14419         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14420         Set the process's actual process group in the foreground if
14421         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14422         mark terminal as the inferior's if not sharing GDB's terminal.
14423         Don't check attach_flag.
14424         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14425         pass down a target_terminal_state.
14426         (child_terminal_save_inferior): New, factored out from ...
14427         (child_terminal_ours_1): ... this.  Handle
14428         target_terminal_state::is_ours_for_output.
14429         (child_interrupt, child_pass_ctrlc): New.
14430         (inflow_inferior_exit): Clear the inferior's terminal_state.
14431         (copy_terminal_info): Copy the inferior's terminal state.
14432         (_initialize_inflow): Remove reference to terminal_is_ours.
14433         * inflow.h (inferior_process_group): Delete.
14434         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14435         * procfs.c (procfs_target): Don't install procfs_interrupt.
14436         (procfs_interrupt): Delete.
14437         * remote.c (remote_serial_quit_handler): Adjust.
14438         (remote_interrupt): Remove ptid parameter.  Adjust.
14439         * target-delegates.c: Regenerate.
14440         * target.c: Include "terminal.h".
14441         (target_terminal::terminal_state): Rename to ...
14442         (target_terminal::m_terminal_state): ... this.
14443         (target_terminal::init): Adjust.
14444         (target_terminal::inferior): Adjust to per-inferior
14445         terminal_state.
14446         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14447         (target_terminal::ours, target_terminal::ours_for_output): Use
14448         target_terminal_is_ours_kind.
14449         (target_interrupt): Remove ptid parameter.  Adjust.
14450         (default_target_pass_ctrlc): Adjust.
14451         * target.h (target_ops::to_terminal_save_inferior): New field.
14452         (target_ops::to_interrupt): Remove ptid_t parameter.
14453         (target_interrupt): Remove ptid_t parameter.  Update comment.
14454         (target_pass_ctrlc): Update comment.
14455         * target/target.h (target_terminal_state): New scoped enum,
14456         factored out of ...
14457         (target_terminal::terminal_state): ... here.
14458         (target_terminal::inferior): Update comments.
14459         (target_terminal::restore_inferior): New.
14460         (target_terminal::is_inferior, target_terminal::is_ours)
14461         (target_terminal::is_ours_for_output): Adjust.
14462         (target_terminal::scoped_restore_terminal_state): Adjust to
14463         rename, and call restore_inferior() instead of inferior().
14464         (target_terminal::scoped_restore_terminal_state::m_state): Change
14465         type.
14466         (target_terminal::terminal_state): Rename to ...
14467         (target_terminal::m_terminal_state): ... this and change type.
14468
14469 2018-01-30  Pedro Alves  <palves@redhat.com>
14470
14471         * linux-nat.c (wait_for_signal): New function.
14472         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14473         directly.
14474         (async_terminal_is_ours)
14475         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14476         (linux_nat_add_target): Don't override
14477         to_terminal_inferior/to_terminal_ours.
14478
14479 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14480
14481         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14482
14483 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14484
14485         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14486         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14487         dwarf2_per_objfile_free here.
14488         (dwarf2_per_objfile_free): Remove.
14489         (_initialize_dwarf2_read): Don't register
14490         dwarf2_per_objfile_free as a registry cleanup.
14491
14492 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14493
14494         Avoid compilation errors in MinGW native builds
14495
14496         The error is triggered by including python-internal.h, and the
14497         error message is:
14498
14499              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14500                       from build-gnulib/import/math.h:27,
14501                       from d:/usr/Python26/include/pyport.h:235,
14502                       from d:/usr/Python26/include/Python.h:58,
14503                       from python/python-internal.h:94,
14504                       from python/py-arch.c:24:
14505              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14506         using ::hypot;
14507                 ^~~~~
14508
14509         This happens because Python headers define 'hypot' to expand t
14510         '_hypot' in the Windows builds.
14511         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14512         'hypoth'.  This avoids a compilation error.
14513
14514 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14515
14516         * MAINTAINERS (Write After Approval): Fix ordering.
14517
14518 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14519
14520         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14521
14522 2018-01-26  Alan Modra  <amodra@gmail.com>
14523
14524         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14525         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14526         Remove nop.  Make const.  Comment.
14527         (powerpc32_plt_stub_so_2): New.
14528         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14529         Correct count.  Update uses.
14530         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14531         Move common code reading PLT entry word.  Correct
14532         powerpc32_plt_stub PLT address calculation.
14533         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14534         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14535         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14536         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14537         (ppc64_standard_linkage8): Likewise.
14538         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14539         Correct insns description.
14540         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14541
14542 2018-01-24  Pedro Alves  <palves@redhat.com>
14543
14544         GCC PR libstdc++/83906
14545         * gdbtypes.c (operator==(const dynamic_prop &,
14546         const dynamic_prop &)): New.
14547         (operator==(const range_bounds &, const range_bounds &)): New.
14548         (check_types_equal): Use them instead of memcmp.
14549         * gdbtypes.h (operator==(const dynamic_prop &,
14550         const dynamic_prop &)): Declare.
14551         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14552         (operator==(const range_bounds &, const range_bounds &)): Declare.
14553         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14554
14555 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14556
14557         * s390-linux-tdep.c (s390_record_address_mask)
14558         (s390_record_calc_disp_common, s390_record_calc_disp)
14559         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14560         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14561         (s390_process_record): Move to s390-tdep.c.
14562         (s390_linux_init_abi_any): Adjust.
14563         * s390-tdep.c (s390_record_address_mask)
14564         (s390_record_calc_disp_common, s390_record_calc_disp)
14565         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14566         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14567         (s390_process_record): Moved from s390-linux-tdep.c
14568         (s390_gdbarch_init): Adjust.
14569
14570 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14571
14572         * s390-linux-nat.c (s390-tdep.h): New include.
14573         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14574         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14575         (ALLDEPFILES): Add s390-tdep.c.
14576         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14577         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14578         * s390-tdep.h: ...this.  New file.
14579         * s390-linux-tdep.c (s390-tdep.h): New include.
14580         (_initialize_s390_tdep): Rename to...
14581         (_initialize_s390_linux_tdep): ...this and adjust.
14582         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14583         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14584         s390-tdep.h.
14585         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14586         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14587         (s390_is_partial_instruction, s390_software_single_step)
14588         (is_non_branch_ril, s390_displaced_step_copy_insn)
14589         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14590         (s390_prologue_data, s390_addr, s390_store, s390_load)
14591         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14592         (s390_register_call_saved, s390_guess_tracepoint_registers)
14593         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14594         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14595         (s390_pseudo_register_name, s390_pseudo_register_type)
14596         (s390_pseudo_register_read, s390_pseudo_register_write)
14597         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14598         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14599         (s390_addr_bits_remove, s390_address_class_type_flags)
14600         (s390_address_class_type_flags_to_name)
14601         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14602         (s390_function_arg_float, s390_function_arg_vector)
14603         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14604         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14605         (s390_frame_align, s390_register_return_value, s390_return_value)
14606         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14607         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14608         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14609         (s390_trad_frame_prev_register, s390_unwind_cache)
14610         (s390_prologue_frame_unwind_cache)
14611         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14612         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14613         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14614         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14615         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14616         (s390_frame_base_address, s390_local_base_address)
14617         (s390_frame_base, s390_gcc_target_options)
14618         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14619         (s390_validate_reg_range, s390_tdesc_valid)
14620         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14621         * s390-tdep.c: ...this.  New file.
14622
14623 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14624
14625         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14626         (s390_process_record, s390_gdbarch_tdep_alloc)
14627         (s390_linux_init_abi_any): Use/set new hook.
14628
14629 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14630
14631         * s390-linux-tdep.c (osabi.h): New include.
14632         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14633         (s390_linux_init_abi_any): New functions.
14634         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14635
14636 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14637
14638         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14639         tdesc_has_registers check
14640
14641 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14642
14643         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14644         (s390_validate_reg_range): New macro.
14645         (s390_gdbarch_init): Adjust.
14646
14647 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14648
14649         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14650         (s390_gdbarch_tdep_alloc): Adjust.
14651         (s390_gdbarch_init): Adjust.
14652
14653 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14654
14655         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14656         <have_tdb>: Change type to bool.
14657         (s390_gdbarch_tdep_alloc): Adjust.
14658         (s390_gdbarch_init): Adjust.
14659
14660 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14661
14662         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14663         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14664         (s390_gdbarch_tdep_alloc): New function.
14665         (s390_gdbarch_init): Allocate tdep at start and use its fields
14666         instead of separate variables.
14667
14668 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14669
14670         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14671         when looking for cached gdbarch and add comment for remaining.
14672
14673 2018-01-22  Pedro Alves  <palves@redhat.com>
14674             Sergio Durigan Junior  <sergiodj@redhat.com>
14675
14676         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14677         case.
14678
14679 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14680
14681         * MAINTAINERS: Update my company e-mail address.
14682
14683 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14684
14685         * regcache.c (cooked_write_test): New function.
14686         (_initialize_regcache): Register the test.
14687
14688 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14689
14690         * ia64-tdep.c (ia64_pseudo_register_read): Call
14691         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14692         * m32c-tdep.c (m32c_cat_read): Likewise.
14693         (m32c_r3r2r1r0_read): Likewise.
14694         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14695         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14696
14697 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14698
14699         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14700         method raw_read instead of regcache_raw_read.
14701         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14702         * arm-tdep.c (arm_neon_quad_read): Likewise.
14703         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14704         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14705         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14706         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14707         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14708         (i386_pseudo_register_read_into_value): Likewise.
14709         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14710         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14711         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14712         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14713         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14714         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14715         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14716         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14717         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14718
14719 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14720
14721         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14722         * configure.tgt: Remove target mt.
14723         * mt-tdep.c: Remove.
14724         * regcache.c (cooked_read_test): Remove the check for mt.
14725
14726 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14727
14728         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14729         instead of gdbarch_pseudo_register_read_value.
14730
14731 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14732
14733         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14734         language is Ada.
14735
14736 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14737
14738         * linespec.c (create_sals_line_offset): Remove code that preserved
14739         the symtab_and_line's line number.
14740
14741 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14742
14743         * varobj.c (varobj_create): Don't set valid_block when creating a
14744         floating varobj.
14745
14746 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14747
14748         * varobj.c (varobj_create): Remove out of date comment.
14749
14750 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14751
14752         PR mi/20395
14753         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14754         updating innermost block.
14755         * parse.c (innermost_block_tracker::update): Take extra type
14756         parameter, and check types match before updating innermost block.
14757         (write_dollar_variable): Update innermost block for registers.
14758         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14759         (innermost_block_tracker::innermost_block_tracker): Initialise
14760         m_types member.
14761         (innermost_block_tracker::reset): Take type parameter.
14762         (innermost_block_tracker::update): Take type parameter, and pass
14763         type through as needed.
14764         (innermost_block_tracker::m_types): New member.
14765         * varobj.c (varobj_create): Pass type when reseting innermost
14766         block.
14767
14768 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14769
14770         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14771         * ada-lang.c (resolve_subexp): Likewise.
14772         * breakpoint.c (set_breakpoint_condition) Likewise.
14773         (watch_command_1) Likewise.
14774         * c-exp.y (variable): Likewise.
14775         * d-exp.y (PrimaryExpression): Likewise.
14776         * f-exp.y (variable): Likewise.
14777         * go-exp.y (variable): Likewise.
14778         * m2-exp.y (variable): Likewise.
14779         * objfiles.c (objfile::~objfile): Likewise.
14780         * p-exp.y (variable): Likewise.
14781         * parse.c (innermost_block): Change type.
14782         * parser-defs.h (class innermost_block_tracker): New.
14783         (innermost_block): Change to innermost_block_tracker.
14784         * printcmd.c (display_command): Switch to innermost_block API.
14785         (do_one_display): Likewise.
14786         * rust-exp.y (do_one_display): Likewise.
14787         * symfile.c (clear_symtab_users): Likewise.
14788         * varobj.c (varobj_create): Switch to innermost_block API, replace
14789         use of innermost_block with block stored on varobj object.
14790
14791 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14792
14793         * expression.h (innermost_block): Remove declaration.
14794         * varobj.c: Add 'parser-defs.h' include.
14795
14796 2018-01-19  Tom Tromey  <tom@tromey.com>
14797
14798         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14799         symbols in the static and global blocks.
14800
14801 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14802
14803         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14804         gdb_ptrace.h, and move including gdb_wait.h ...
14805         * nat/linux-ptrace.h: ... to here.
14806
14807 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14808
14809         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14810         inf_ptrace_detach_success.
14811         (inf_ptrace_detach_success): Add inferior parameter, use it
14812         instead of inferior_ptid, pass it to detach_inferior.
14813         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14814         parameter.
14815         * inferior.c (detach_inferior): Add overload that takes an
14816         inferior object.
14817         * inferior.h (detach_inferior): Likewise.
14818         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14819         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14820         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14821
14822 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14823
14824         * target.h (struct target_ops) <to_detach>: Add inferior
14825         parameter.
14826         (target_detach): Likewise.
14827         * target.c (dispose_inferior): Pass inferior down.
14828         (target_detach): Pass inferior down.  Assert that it is equal to
14829         the current inferior.
14830         * aix-thread.c (aix_thread_detach): Pass inferior down.
14831         * corefile.c (core_file_command): Pass current_inferior() down.
14832         * corelow.c (core_detach): Add inferior parameter.
14833         * darwin-nat.c (darwin_detach): Likewise.
14834         * gnu-nat.c (gnu_detach): Likewise.
14835         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14836         * infcmd.c (detach_command): Pass current_inferior() down to
14837         target_detach.
14838         * infrun.c (follow_fork_inferior): Pass parent_inf to
14839         target_detach.
14840         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14841         target_detach.
14842         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14843         * linux-thread-db.c (thread_db_detach): Likewise.
14844         * nto-procfs.c (procfs_detach): Likewise.
14845         * procfs.c (procfs_detach): Likewise.
14846         * record.c (record_detach): Likewise.
14847         * record.h (struct inferior): Forward-declare.
14848         (record_detach): Add inferior parameter.
14849         * remote-sim.c (gdbsim_detach): Likewise.
14850         * remote.c (remote_detach_1): Likewise.
14851         (remote_detach): Likewise.
14852         (extended_remote_detach): Likewise.
14853         * sol-thread.c (sol_thread_detach): Likewise.
14854         * target-debug.h (target_debug_print_inferior_p): New macro.
14855         * target-delegates.c: Re-generate.
14856         * top.c (kill_or_detach): Pass inferior down to target_detach.
14857         * windows-nat.c (windows_detach): Add inferior parameter.
14858
14859 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14860
14861         * target.h (struct target_ops) <to_detach>: Remove args
14862         parameter.
14863         (target_detach): Likewise.
14864         * target.c (dispose_inferior): Adjust.
14865         (target_detach): Remove args parameter, adjust.
14866         * aix-thread.c (aix_thread_detach): Adjust.
14867         * corefile.c (core_file_command): Adjust.
14868         * corelow.c (core_detach): Adjust.
14869         * darwin-nat.c (darwin_detach): Adjust.
14870         * gnu-nat.c (gnu_detach): Adjust.
14871         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14872         * infcmd.c (detach_command): Adjust
14873         * infrun.c (follow_fork_inferior): Adjust.
14874         (handle_vfork_child_exec_or_exit): Adjust.
14875         * linux-fork.c (linux_fork_detach): Remove args parameter.
14876         * linux-fork.h (linux_fork_detach): Likewise.
14877         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14878         * linux-thread-db.c (thread_db_detach): Likewise.
14879         * nto-procfs.c (procfs_detach): Likewise.
14880         * procfs.c (procfs_detach): Likewise.
14881         (do_detach): Remove signo parameter.
14882         * record.c (record_detach): Remove args parameter.
14883         * record.h (record_detach): Likewise.
14884         * remote-sim.c (gdbsim_detach): Likewise.
14885         * remote.c (remote_detach_1): Likewise.
14886         (remote_detach): Likewise.
14887         (extended_remote_detach): Likewise.
14888         * sol-thread.c (sol_thread_detach): Likewise.
14889         * target-delegates.c: Re-generate.
14890         * top.c (struct qt_args) <args>: Remove field.
14891         (kill_or_detach): Don't pass args.
14892         (quit_force): Don't set args.
14893         * windows-nat.c (windows_detach): Remove args parameter.
14894
14895 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14896
14897         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14898         (arm_linux_init_abi): Install it.
14899
14900 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14901
14902         * osabi.c (gdb_osabi_names): Extend the regexp for
14903         arm-linux-gnueabihf.
14904
14905 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14906
14907         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14908         m_abbrevs.
14909         (abbrev_table::add_abbrev): Update.
14910         (abbrev_table::lookup_abbrev): Update.
14911
14912 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14913
14914         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14915
14916 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14917
14918         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14919         to "std::string".
14920
14921 2018-01-17  Tom Tromey  <tom@tromey.com>
14922
14923         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14924
14925 2018-01-17  Tom Tromey  <tom@tromey.com>
14926
14927         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14928         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14929         (create_array_type_with_stride): Update.
14930         * dwarf2read.c (set_die_type): Update.
14931
14932 2018-01-17  Tom Tromey  <tom@tromey.com>
14933
14934         * dwarf2read.c (delayed_method_info): Remove typedef.
14935         (dwarf2_cu::method_info): Now a std::vector.
14936         (add_to_method_list): Update.
14937         (free_delayed_list): Remove.
14938         (compute_delayed_physnames): Update.
14939         (process_full_comp_unit, process_full_type_unit): Clear the method
14940         list.  Remove cleanups.
14941         (psymtab_include_file_name): Add name_holder parameter.  Use
14942         unique_xmalloc_ptr.
14943         (dwarf_decode_lines): Update.
14944
14945 2018-01-17  Tom Tromey  <tom@tromey.com>
14946             Simon Marchi  <simon.marchi@ericsson.com>
14947
14948         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14949         (dwarf2_per_objfile::free_cached_comp_units)
14950         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14951         (init_cutu_and_read_dies_no_follow): Update.
14952         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14953         (dwarf2_cu::~dwarf2_cu): New.
14954         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14955         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14956
14957 2018-01-17  Tom Tromey  <tom@tromey.com>
14958             Simon Marchi  <simon.marchi@ericsson.com>
14959
14960         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14961         (struct die_reader_specs) <abbrev_table>: New member.
14962         (struct abbrev_table): Add constructor.
14963         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14964         <abbrev_obstack>: Now an auto_obstack.
14965         (abbrev_table_up): New typedef.
14966         (init_cu_die_reader): Add abbrev_table parameter.
14967         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14968         Add result_dwo_abbrev_table.
14969         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14970         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14971         Update.
14972         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14973         parameter.
14974         (skip_children): Update.
14975         (abbrev_table::alloc_abbrev): Rename from
14976         abbrev_table_alloc_abbrev.
14977         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14978         (abbrev_table::lookup_abbrev): Rename from
14979         abbrev_table_lookup_abbrev.
14980         (abbrev_table_read_table): Return abbrev_table_up.
14981         (abbrev_table_free, abbrev_table_free_cleanup)
14982         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14983         (load_partial_dies): Update.
14984
14985 2018-01-17  Tom Tromey  <tom@tromey.com>
14986
14987         * dwarf2read.c (dwarf2_compute_name): Update comment.
14988         (read_func_scope, read_variable): Update.
14989         (new_symbol): Remove.
14990         (new_symbol_full): Rename to new_symbol.
14991
14992 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14993
14994         PR gdb/16577
14995         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14996         a warning instead of throwing an error, set section size to 0 and return
14997         NULL.
14998         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14999
15000 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15001
15002         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15003         std::string.
15004         (linux_ptrace_attach_fail_reason_string): Likewise.
15005         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15006         Likewise.
15007         (linux_ptrace_attach_fail_reason_string): Likewise.
15008         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15009
15010 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15011
15012         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15013
15014 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15015
15016         PR gdb/21559
15017         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15018         checking for fs_base/gs_base fields in struct user_regs_struct.
15019         * configure: Regenerate.
15020
15021 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15022
15023         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15024         function.
15025         (aarch64_linux_init_abi): Install it to gdbarch hook
15026         gcc_target_options.
15027
15028 2018-01-15  Pedro Alves  <palves@redhat.com>
15029
15030         * common/signals-state-save-restore.c
15031         (save_original_signals_state): Fix typos.
15032
15033 2017-01-12  Tom Tromey  <tom@tromey.com>
15034             Sergio Durigan Junior  <sergiodj@redhat.com>
15035
15036         * Makefile.in (install-only): Install gdb-add-index.
15037
15038 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15039
15040         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15041
15042 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15043
15044         * infrun.c (keep_going_pass_signal): Clear step-over info when
15045         insert_breakpoints fails.
15046
15047 2018-01-11  Pedro Alves  <palves@redhat.com>
15048
15049         PR gdb/22583
15050         * infrun.c (resume): Rename to ...
15051         (resume_1): ... this.
15052         (resume): Reimplement as wrapper around resume_1.
15053
15054 2018-01-11  Pedro Alves  <palves@redhat.com>
15055
15056         PR remote/22597
15057         * remote.c (remote_parse_stop_reply): Default to the last-set
15058         general thread instead of to 'magic_null_ptid'.
15059
15060 2018-01-10  Pedro Alves  <palves@redhat.com>
15061
15062         * language.h (language_get_symbol_name_matcher): Rename ...
15063         (get_symbol_name_matcher): ... this.
15064         * language.c (language_get_symbol_name_matcher): Ditto.
15065         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15066         callers adjusted.
15067
15068 2018-01-10  Pedro Alves  <palves@redhat.com>
15069
15070         PR gdb/22670
15071         * dwarf2read.c
15072         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15073         Adjust to use language_get_symbol_name_matcher instead of
15074         language_defn::la_get_symbol_name_matcher.
15075         * language.c (language_get_symbol_name_matcher): If in Ada mode
15076         and the lookup name is a verbatim match, return Ada's matcher.
15077         * language.h (language_get_symbol_name_matcher): Adjust comment.
15078         (ada_lookup_name_info::verbatim_p):: New method.
15079
15080 2018-01-10  Pedro Alves  <palves@redhat.com>
15081
15082         PR gdb/22670
15083         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15084         minsym's language is language_auto or language_cplus, pass down
15085         language_ada instead.
15086         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15087
15088 2018-01-10  Pedro Alves  <palves@redhat.com>
15089
15090         PR gdb/22670
15091         * minsyms.c (linkage_name_str): New function.
15092         (iterate_over_minimal_symbols): Use it.
15093
15094 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15095
15096         * NEWS: Document that 'info proc' now works on FreeBSD.
15097
15098 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15099
15100         * configure.ac: Check for kinfo_getfile in libutil.
15101         * configure: Regenerate.
15102         * config.in: Regenerate.
15103         * fbsd-nat.c: Include "fbsd-tdep.h".
15104         (fbsd_fetch_cmdline): New.
15105         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15106         rather than calling error.
15107         (fbsd_info_proc): New.
15108         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15109         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15110         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15111
15112 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15113
15114         * fbsd-nat.c (struct free_deleter): Remove.
15115         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15116
15117 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15118
15119         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15120         NULL for an empty pathname.
15121
15122 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15123
15124         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15125         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15126         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15127         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15128         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15129         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15130         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15131         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15132         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15133         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15134         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15135         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15136         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15137         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15138         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15139
15140 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15141
15142         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15143         (gnu_xfer_auxv): New function.
15144         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15145         TARGET_OBJECT_AUXV.
15146
15147 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15148             Simon Marchi  <simon.marchi@ericsson.com>
15149
15150         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15151         common/selftest.c.
15152         (COMMON_OBS): Remove selftest.o.
15153         * configure.ac: Append selftest-arch.c and common/selftest.c to
15154         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15155         * configure: Re-generated.
15156         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15157         GDB_SELF_TEST.
15158         (maintenance_info_selftests): Likewise.
15159
15160 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15161
15162         * ada-valprint.c (val_print_packed_array_elements): Use
15163         proper number of elements when printing an array indexed
15164         by an enumeration type.
15165
15166 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15167
15168         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15169         (dw2_get_file_names_reader): Adjust.
15170         (lookup_dwo_signatured_type): Adjust.
15171         (lookup_dwp_signatured_type): Adjust.
15172         (lookup_signatured_type): Adjust.
15173         (create_type_unit_group): Adjust.
15174         (get_type_unit_group): Adjust.
15175         (process_psymtab_comp_unit_reader): Adjust.
15176         (build_type_psymtabs_reader): Adjust.
15177         (scan_partial_symbols): Adjust.
15178         (add_partial_symbol): Adjust.
15179         (add_partial_subprogram): Adjust.
15180         (peek_die_abbrev): Adjust.
15181         (fixup_go_packaging): Adjust.
15182         (process_imported_unit_die): Adjust.
15183         (dwarf2_compute_name): Adjust.
15184         (dwarf2_physname): Adjust.
15185         (read_import_statement): Adjust.
15186         (handle_DW_AT_stmt_list): Adjust.
15187         (read_file_scope): Adjust.
15188         (read_func_scope): Adjust.
15189         (read_lexical_block_scope): Adjust.
15190         (read_call_site_scope): Adjust.
15191         (read_variable): Adjust.
15192         (dwarf2_rnglists_process): Adjust.
15193         (dwarf2_ranges_process): Adjust.
15194         (dwarf2_ranges_read): Adjust.
15195         (dwarf2_get_pc_bounds): Adjust.
15196         (dwarf2_record_block_ranges): Adjust.
15197         (dwarf2_add_field): Adjust.
15198         (dwarf2_add_member_fn): Adjust.
15199         (read_structure_type): Adjust.
15200         (process_structure_scope): Adjust.
15201         (read_enumeration_type): Adjust.
15202         (read_array_type): Adjust.
15203         (mark_common_block_symbol_computed): Adjust.
15204         (read_common_block): Adjust.
15205         (read_namespace_type): Adjust.
15206         (read_namespace): Adjust.
15207         (read_module_type): Adjust.
15208         (read_tag_pointer_type): Adjust.
15209         (read_tag_ptr_to_member_type): Adjust.
15210         (read_tag_string_type): Adjust.
15211         (read_subroutine_type): Adjust.
15212         (read_typedef): Adjust.
15213         (read_base_type): Adjust.
15214         (attr_to_dynamic_prop): Adjust.
15215         (read_subrange_type): Adjust.
15216         (read_unspecified_type): Adjust.
15217         (dwarf2_read_abbrevs): Adjust.
15218         (load_partial_dies): Adjust.
15219         (read_partial_die): Adjust.
15220         (find_partial_die): Adjust.
15221         (guess_partial_die_structure_name): Adjust.
15222         (fixup_partial_die): Adjust.
15223         (read_attribute_value): Adjust.
15224         (read_addr_index): Adjust.
15225         (read_addr_index_from_leb128): Adjust.
15226         (read_str_index): Adjust.
15227         (dwarf2_string_attr): Adjust.
15228         (get_debug_line_section): Adjust.
15229         (dwarf_decode_line_header): Adjust.
15230         (lnp_state_machine::check_line_address): Adjust.
15231         (dwarf_decode_lines_1): Adjust.
15232         (dwarf_decode_lines): Adjust.
15233         (dwarf2_start_symtab): Adjust.
15234         (var_decode_location): Adjust.
15235         (new_symbol_full): Adjust.
15236         (dwarf2_const_value_data): Adjust.
15237         (dwarf2_const_value_attr): Adjust.
15238         (dwarf2_const_value): Adjust.
15239         (die_type): Adjust.
15240         (die_containing_type): Adjust.
15241         (build_error_marker_type): Adjust.
15242         (lookup_die_type): Adjust.
15243         (guess_full_die_structure_name): Adjust.
15244         (anonymous_struct_prefix): Adjust.
15245         (determine_prefix): Adjust.
15246         (dwarf2_name): Adjust.
15247         (follow_die_ref_or_sig): Adjust.
15248         (follow_die_offset): Adjust.
15249         (follow_die_ref): Adjust.
15250         (follow_die_sig_1): Adjust.
15251         (follow_die_sig): Adjust.
15252         (get_signatured_type): Adjust.
15253         (get_DW_AT_signature_type): Adjust.
15254         (decode_locdesc): Adjust.
15255         (dwarf_decode_macros): Adjust.
15256         (cu_debug_loc_section): Adjust.
15257         (fill_in_loclist_baton): Adjust.
15258         (dwarf2_symbol_mark_computed): Adjust.
15259         (init_one_comp_unit): Don't assign
15260         dwarf2_cu::dwarf2_per_objfile.
15261         (set_die_type): Adjust.
15262
15263 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15264
15265         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15266         <dwarf2_per_objfile>: New field.
15267         (dwarf2_per_objfile): Remove global.
15268         (get_dwarf2_per_objfile): New function.
15269         (set_dwarf2_per_objfile): New function.
15270         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15271         dwarf2_per_objfile.
15272         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15273         (read_abbrev_offset): Likewise.
15274         (read_indirect_string): Likewise.
15275         (read_indirect_line_string): Likewise.
15276         (read_indirect_string_at_offset): Likewise.
15277         (read_indirect_string_from_dwz): Likewise.
15278         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15279         dwarf2_per_objfile.
15280         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15281         (create_all_comp_units): Change objfile parameter to
15282         dwarf2_per_objfile.
15283         (create_all_type_units): Likewise.
15284         (process_queue): Add dwarf2_per_objfile parameter.
15285         (read_and_check_comp_unit_head): Likewise.
15286         (lookup_dwo_unit_in_dwp): Likewise.
15287         (get_dwp_file): Likewise.
15288         (process_cu_includes): Likewise.
15289         (struct free_dwo_file_cleanup_data): New struct.
15290         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15291         set_dwarf2_per_objfile.
15292         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15293         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15294         context, adjust calls.
15295         (dw2_instantiate_symtab): Likewise.
15296         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15297         (dw2_get_cu): Likewise.
15298         (create_cu_from_index_list): Change objfile parameter to
15299         dwarf2_per_objfile.
15300         (create_cus_from_index_list): Get dwarf2_per_objfile from
15301         context, adjust calls.
15302         (create_cus_from_index): Likewise.
15303         (create_signatured_type_table_from_index): Change objfile
15304         parameter to dwarf2_per_objfile.
15305         (create_signatured_type_table_from_debug_names): Change objfile
15306         parameter to dwarf2_per_objfile.
15307         (create_addrmap_from_index): Likewise.
15308         (create_addrmap_from_aranges): Likewise.
15309         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15310         (dw2_setup): Remove.
15311         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15312         context.
15313         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15314         get_dwarf2_per_objfile.
15315         (dw2_forget_cached_source_info): Likewise.
15316         (dw2_map_symtabs_matching_filename): Likewise.
15317         (struct dw2_symtab_iterator) <index>: Remove.
15318         <dwarf2_per_objfile>: New field.
15319         (dw2_symtab_iter_init): Replace index parameter with
15320         dwarf2_per_objfile.
15321         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15322         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15323         (dw2_print_stats): Likewise.
15324         (dw2_dump): Likewise.
15325         (dw2_expand_symtabs_for_function): Likewise.
15326         (dw2_expand_all_symtabs): Likewise.
15327         (dw2_expand_symtabs_with_fullname): Likewise.
15328         (dw2_expand_marked_cus): Replace index and objfile parameters
15329         with dwarf2_per_objfile.
15330         (dw_expand_symtabs_matching_file_matcher): Add
15331         dwarf2_per_objfile parameter and adjust calls.
15332         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15333         adjust calls.
15334         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15335         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15336         adjust calls.
15337         (create_cus_from_debug_names_list): Replace objfile parameter
15338         with dwarf2_per_objfile and adjust calls.
15339         (create_cus_from_debug_names): Likewise.
15340         (dwarf2_read_debug_names): Likewise.
15341         (mapped_debug_names::namei_to_name): Adjust call.
15342         (dw2_debug_names_iterator::next): Likewise.
15343         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15344         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15345         (dw2_debug_names_dump): Likewise.
15346         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15347         (dw2_debug_names_expand_symtabs_matching): Likewise.
15348         (dwarf2_initialize_objfile): Likewise.
15349         (dwarf2_build_psymtabs): Likewise.
15350         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15351         this_cu.
15352         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15353         (read_and_check_comp_unit_head): Likewise.
15354         (read_abbrev_offset): Likewise.
15355         (create_debug_type_hash_table): Likewise.
15356         (create_debug_types_hash_table): Likewise.
15357         (create_all_type_units): Replace objfile parameter with
15358         dwarf2_per_objfile.
15359         (add_type_unit): Add dwarf2_per_objfile parameter.
15360         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15361         with dwarf2_per_objfile.
15362         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15363         (lookup_dwp_signatured_type): Likewise.
15364         (lookup_signatured_type): Likewise.
15365         (read_cutu_die_from_dwo): Likewise.
15366         (init_tu_and_read_dwo_dies): Likewise.
15367         (init_cutu_and_read_dies): Likewise.
15368         (init_cutu_and_read_dies_no_follow): Likewise.
15369         (allocate_type_unit_groups_table): Add objfile parameter.
15370         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15371         (get_type_unit_group): Likewise.
15372         (process_psymtab_comp_unit): Update call.
15373         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15374         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15375         (print_tu_stats): Likewise.
15376         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15377         in void* parameter.
15378         (build_type_psymtabs): Change objfile parameter to
15379         dwarf2_per_objfile.
15380         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15381         passed in void* parameter.
15382         (process_skeletonless_type_units): Change objfile parameter to
15383         dwarf2_per_objfile.
15384         (set_partial_user): Likewise.
15385         (dwarf2_build_psymtabs_hard): Likewise.
15386         (read_comp_units_from_section): Likewise.
15387         (create_all_comp_units): Likewise.
15388         (scan_partial_symbols): Update calls.
15389         (add_partial_symbol): Likewise.
15390         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15391         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15392         (process_queue): Add dwarf2_per_objfile parameter.
15393         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15394         (compute_compunit_symtab_includes): Likewise.
15395         (process_cu_includes): Add dwarf2_per_objfile parameter.
15396         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15397         (process_full_type_unit): Likewise.
15398         (process_imported_unit_die): Update call.
15399         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15400         (read_file_scope): Likewise.
15401         (allocate_dwo_file_hash_table): Add objfile parameter.
15402         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15403         (create_cus_hash_table): Likewise.
15404         (create_dwp_hash_table): Likewise.
15405         (create_dwo_unit_in_dwp_v1): Likewise.
15406         (create_dwp_v2_section): Likewise.
15407         (create_dwo_unit_in_dwp_v2): Likewise.
15408         (lookup_dwo_unit_in_dwp): Likewise.
15409         (try_open_dwop_file): Likewise.
15410         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15411         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15412         cleanup to include a reference to dwarf2_per_objfile.
15413         (open_dwp_file): Add dwarf2_per_objfile parameter.
15414         (open_and_init_dwp_file): Likewise.
15415         (get_dwp_file): Likewise.
15416         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15417         (queue_and_load_all_dwo_tus): Update call.
15418         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15419         data.
15420         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15421         (dwarf2_ranges_process): Likewise.
15422         (dwarf2_get_pc_bounds): Likewise.
15423         (mark_common_block_symbol_computed): Likewise.
15424         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15425         (dwarf2_read_abbrevs): Update call.
15426         (read_partial_die): Use dwarf2_per_objfile from cu.
15427         (find_partial_die): Likewise.
15428         (fixup_partial_die): Likewise.
15429         (read_attribute_value): Likewise.
15430         (read_indirect_string_at_offset_from): Add objfile parameter.
15431         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15432         parameter.
15433         (read_indirect_string_from_dwz): Add objfile parameter.
15434         (read_indirect_string): Add objfile parameter.
15435         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15436         (read_addr_index): Use dwarf2_per_objfile from cu.
15437         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15438         call dw2_setup.
15439         (read_str_index): Use dwarf2_per_objfile from cu.
15440         (get_debug_line_section): Likewise.
15441         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15442         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15443         (new_symbol_full): Use dwarf2_per_objfile from cu.
15444         (build_error_marker_type): Likewise.
15445         (lookup_die_type): Likewise.
15446         (determine_prefix): Likewise.
15447         (follow_die_offset): Likewise.
15448         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15449         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15450         (dwarf2_fetch_die_type_sect_off): Likewise.
15451         (dwarf2_get_die_type): Likewise.
15452         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15453         (get_signatured_type): Likewise.
15454         (get_DW_AT_signature_type): Likewise.
15455         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15456         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15457         (cu_debug_loc_section): Likewise.
15458         (fill_in_loclist_baton): Likewise.
15459         (dwarf2_symbol_mark_computed): Likewise.
15460         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15461         dwarf2_per_objfile.
15462         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15463         parameter.
15464         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15465         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15466         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15467         (set_die_type): Use dwarf2_free_objfile from cu.
15468         (get_die_type_at_offset): Likewise.
15469         (dwarf2_per_objfile_free): Don't assign global variable.
15470         (debug_names) <constructor>: Add dwarf2_per_objfile
15471         parameter, update m_debugstrlookup construction.
15472         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15473         parameter.
15474         <m_dwarf2_per_objfile>: New field.
15475         <lookup>: Use m_dwarf2_per_objfile.
15476         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15477         (psyms_seen_size): Likewise.
15478         (write_gdbindex): Replace objfile parameter with
15479         dwarf2_per_objfile.
15480         (write_debug_names): Likewise.
15481         (write_psymtabs_to_index): Likewise.
15482         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15483         calls.
15484
15485 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15486
15487         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15488         <dwarf2_per_objfile>: New field.
15489         (struct dwarf2_per_cu_data) <objfile>: Remove.
15490         <dwarf2_per_objfile>: New field.
15491         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15492         of objfile.
15493         (create_signatured_type_table_from_index): Likewise.
15494         (create_debug_type_hash_table): Likewise.
15495         (fill_in_sig_entry_from_dwo_entry): Likewise.
15496         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15497         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15498         objfile.
15499         (create_partial_symtab): Access objfile through
15500         dwarf2_per_objfile.
15501         (process_psymtab_comp_unit_reader): Likewise.
15502         (read_comp_units_from_section): Likewise.
15503         (scan_partial_symbols): Likewise.
15504         (add_partial_symbol): Likewise.
15505         (add_partial_subprogram): Likewise.
15506         (peek_die_abbrev): Likewise.
15507         (fixup_go_packaging): Likewise.
15508         (process_full_comp_unit): Likewise.
15509         (process_full_type_unit): Likewise.
15510         (process_imported_unit_die): Likewise.
15511         (dwarf2_compute_name): Likewise.
15512         (dwarf2_physname): Likewise.
15513         (read_import_statement): Likewise.
15514         (create_cus_hash_table): Assign dwarf2_physname instead of
15515         objfile.
15516         (read_func_scope): Access objfile through dwarf2_per_objfile.
15517         (read_lexical_block_scope): Likewise.
15518         (read_call_site_scope): Likewise.
15519         (read_variable): Likewise.
15520         (dwarf2_rnglists_process): Likewise.
15521         (dwarf2_ranges_process): Likewise.
15522         (dwarf2_ranges_read): Likewise.
15523         (dwarf2_record_block_ranges): Likewise.
15524         (dwarf2_add_field): Likewise.
15525         (dwarf2_add_member_fn): Likewise.
15526         (read_structure_type): Likewise.
15527         (process_structure_scope): Likewise.
15528         (read_enumeration_type): Likewise.
15529         (read_array_type): Likewise.
15530         (read_common_block): Likewise.
15531         (read_namespace_type): Likewise.
15532         (read_namespace): Likewise.
15533         (read_module_type): Likewise.
15534         (read_tag_pointer_type): Likewise.
15535         (read_tag_ptr_to_member_type): Likewise.
15536         (read_tag_string_type): Likewise.
15537         (read_subroutine_type): Likewise.
15538         (read_typedef): Likewise.
15539         (read_base_type): Likewise.
15540         (attr_to_dynamic_prop): Likewise.
15541         (read_subrange_type): Likewise.
15542         (read_unspecified_type): Likewise.
15543         (load_partial_dies): Likewise.
15544         (read_partial_die): Likewise.
15545         (find_partial_die): Likewise.
15546         (guess_partial_die_structure_name): Likewise.
15547         (fixup_partial_die): Likewise.
15548         (read_attribute_value): Likewise.
15549         (read_addr_index_from_leb128): Likewise.
15550         (dwarf2_read_addr_index): Likewise.
15551         (dwarf2_string_attr): Likewise.
15552         (lnp_state_machine::check_line_address): Likewise.
15553         (dwarf_decode_lines_1): Likewise.
15554         (dwarf_decode_lines): Likewise.
15555         (dwarf2_start_symtab): Likewise.
15556         (var_decode_location): Likewise.
15557         (new_symbol_full): Likewise.
15558         (dwarf2_const_value_data): Likewise.
15559         (dwarf2_const_value_attr): Likewise.
15560         (dwarf2_const_value): Likewise.
15561         (die_type): Likewise.
15562         (die_containing_type): Likewise.
15563         (lookup_die_type): Likewise.
15564         (guess_full_die_structure_name): Likewise.
15565         (anonymous_struct_prefix): Likewise.
15566         (dwarf2_name): Likewise.
15567         (follow_die_ref_or_sig): Likewise.
15568         (follow_die_offset): Likewise.
15569         (follow_die_ref): Likewise.
15570         (dwarf2_fetch_die_loc_sect_off): Likewise.
15571         (dwarf2_fetch_constant_bytes): Likewise.
15572         (dwarf2_fetch_die_type_sect_off): Likewise.
15573         (dwarf2_get_die_type): Likewise.
15574         (follow_die_sig): Likewise.
15575         (decode_locdesc): Likewise.
15576         (dwarf2_per_cu_objfile): Likewise.
15577         (dwarf2_per_cu_text_offset): Likewise.
15578         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15579         objfile.
15580         (set_die_type): Access objfile through
15581         dwarf2_per_objfile.
15582
15583 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15584
15585         * valprint.c (converted_character_d): Remove typedef.
15586         (DEF_VEC_O (converted_character_d)): Remove.
15587         (count_next_character): Use std::vector.
15588         (print_converted_chars_to_obstack): Likewise.
15589         (generic_printstr): Likewise.
15590
15591 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15592
15593         * xml-support.h (struct gdb_xml_value): Add constructor.
15594         <value>: Change type to unique_xmalloc_ptr.
15595         (gdb_xml_value_s): Remove typedef.
15596         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15597         (gdb_xml_element_start_handler): Change parameter type to
15598         std::vector.
15599         (xml_find_attribute): Likewise.
15600         * xml-support.c (xml_find_attribute): Change parameter type to
15601         std::vector and adjust.
15602         (gdb_xml_values_cleanup): Remove.
15603         (gdb_xml_parser::start_element): Adjust to std::vector.
15604         (xinclude_start_include): Change paraeter type to std::vector
15605         and adjust.
15606         * btrace.c (check_xml_btrace_version): Likewise.
15607         (parse_xml_btrace_block): Likewise.
15608         (parse_xml_btrace_pt_config_cpu): Likewise.
15609         (parse_xml_btrace_pt): Likewise.
15610         (parse_xml_btrace_conf_bts): Likewise.
15611         (parse_xml_btrace_conf_pt): Likewise.
15612         * memory-map.c (memory_map_start_memory): Likewise.
15613         (memory_map_start_property): Likewise.
15614         * osdata.c (osdata_start_osdata): Likewise.
15615         (osdata_start_item): Likewise.
15616         (osdata_start_column): Likewise.
15617         * remote.c (start_thread): Likewise.
15618         * solib-aix.c (library_list_start_library): Likewise.
15619         (library_list_start_list): Likewise.
15620         * solib-svr4.c (library_list_start_library): Likewise.
15621         (svr4_library_list_start_list): Likewise.
15622         * solib-target.c (library_list_start_segment): Likewise.
15623         (library_list_start_section): Likewise.
15624         (library_list_start_library): Likewise.
15625         (library_list_start_list): Likewise.
15626         * tracepoint.c (traceframe_info_start_memory): Likewise.
15627         (traceframe_info_start_tvar): Likewise.
15628         * xml-syscall.c (syscall_start_syscall): Likewise.
15629         * xml-tdesc.c (tdesc_start_target): Likewise.
15630         (tdesc_start_feature): Likewise.
15631         (tdesc_start_reg): Likewise.
15632         (tdesc_start_union): Likewise.
15633         (tdesc_start_struct): Likewise.
15634         (tdesc_start_flags): Likewise.
15635         (tdesc_start_enum): Likewise.
15636         (tdesc_start_field): Likewise.
15637         (tdesc_start_enum_value): Likewise.
15638         (tdesc_start_vector): Likewise.
15639
15640 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15641
15642         * extension.h (struct xmethod_worker) <clone>: Remove.
15643         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15644         Remove.
15645         (python_xmethod_worker::clone): Remove.
15646         * valops.c (find_overload_match): Use std::move instead of
15647         clone.
15648
15649 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15650
15651         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15652         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15653         <free_xmethod_worker_data>: Remove.
15654         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15655         <get_xmethod_arg_types>: Remove.
15656         <get_xmethod_result_type>: Remove.
15657         <invoke_xmethod>: Remove.
15658         * extension.c (new_xmethod_worker): Remove.
15659         (clone_xmethod_worker): Remove.
15660         (get_matching_xmethod_workers): Return void, pass std::vector by
15661         pointer.
15662         (get_xmethod_arg_types): Rename to...
15663         (xmethod_worker::get_arg_types): ... this, and adjust.
15664         (get_xmethod_result_type): Rename to...
15665         (xmethod_worker::get_result_type): ... this, and adjust.
15666         (invoke_xmethod): Remove.
15667         (free_xmethod_worker): Remove.
15668         (free_xmethod_worker_vec): Remove.
15669         * extension.h (enum ext_lang_rc): Move here from
15670         extension-priv.h.
15671         (struct xmethod_worker): Add constructor and destructor.
15672         <data>: Remove.
15673         <value>: Remove.
15674         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15675         virtual pure methods.
15676         <get_arg_types, get_result_type>: New methods.
15677         (xmethod_worker_ptr): Remove typedef.
15678         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15679         (xmethod_worker_vec): Remove typedef.
15680         (xmethod_worker_up): New typedef.
15681         (invoke_xmethod): Remove.
15682         (clone_xmethod_worker): Remove.
15683         (free_xmethod_worker): Remove.
15684         (free_xmethod_worker_vec): Remove.
15685         (get_xmethod_arg_types): Remove.
15686         (get_xmethod_result_type): Remove.
15687         * valops.c (find_method_list): Use std::vector, don't use
15688         intermediate vector.
15689         (value_find_oload_method_list): Use std::vector.
15690         (find_overload_match): Use std::vector.
15691         (find_oload_champ): Use std::vector.
15692         * value.c (value_free): Use operator delete.
15693         (value_of_xmethod): Rename to...
15694         (value_from_xmethod): ... this.  Don't assign
15695         xmethod_worker::value, take rvalue-reference.
15696         (result_type_of_xmethod): Adjust.
15697         (call_xmethod): Adjust.
15698         * value.h: Include extension.h.
15699         (struct xmethod_worker): Don't forward-declare.
15700         (value_of_xmethod): Rename to...
15701         (value_from_xmethod): ... this, take rvalue-reference.
15702         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15703         (struct python_xmethod_worker): ... this, add constructor and
15704         destructor.
15705         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15706         (gdbpy_free_xmethod_worker_data): Rename to...
15707         (python_xmethod_worker::~python_xmethod_worker): ... this and
15708         adjust.
15709         (gdbpy_clone_xmethod_worker_data): Rename to...
15710         (python_xmethod_worker::clone): ... this and adjust.
15711         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15712         temporary vector.
15713         (gdbpy_get_xmethod_arg_types): Rename to...
15714         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15715         (gdbpy_get_xmethod_result_type): Rename to...
15716         (python_xmethod_worker::do_get_result_type): ... this and
15717         adjust.
15718         (gdbpy_invoke_xmethod): Rename to...
15719         (python_xmethod_worker::invoke): ... this and adjust.
15720         (new_python_xmethod_worker): Rename to...
15721         (python_xmethod_worker::python_xmethod_worker): ... this and
15722         adjust.
15723         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15724         Remove.
15725         (gdbpy_free_xmethod_worker_data): Remove.
15726         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15727         (gdbpy_get_xmethod_arg_types): Remove.
15728         (gdbpy_get_xmethod_result_type): Remove.
15729         (gdbpy_invoke_xmethod): Remove.
15730         * python/python.c (python_extension_ops): Remove obsolete
15731         callbacks.
15732
15733 2018-01-05  Pedro Alves  <palves@redhat.com>
15734
15735         PR gdb/18653
15736         * common/signals-state-save-restore.c
15737         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15738         find a custom handler preinstalled, instead of internal erroring.
15739         But only warn if !quiet.
15740         * common/signals-state-save-restore.h
15741         (save_original_signals_state): New parameter 'quiet'.
15742         * main.c (captured_main_1): Move save_original_signals_state call
15743         after option handling, and pass QUIET.
15744
15745 2018-01-05  Pedro Alves  <palves@redhat.com>
15746
15747         * spu-tdep.c (spu_catch_start): Pass
15748         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15749
15750 2018-01-05  Pedro Alves  <palves@redhat.com>
15751
15752         PR gdb/22670
15753         * ada-lang.c (literal_symbol_name_matcher): New function.
15754         (ada_get_symbol_name_matcher): Use it for
15755         symbol_name_match_type::SEARCH_NAME.
15756         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15757         it down instead of assuming symbol_name_match_type::FULL.
15758         * block.h (block_lookup_symbol): New parameter 'match_type'.
15759         * c-valprint.c (print_unpacked_pointer): Use
15760         lookup_symbol_search_name instead of lookup_symbol.
15761         * compile/compile-object-load.c (get_out_value_type): Pass down
15762         symbol_name_match_type::SEARCH_NAME.
15763         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15764         symbol_name_match_type::FULL.
15765         * cp-support.c (cp_get_symbol_name_matcher): Handle
15766         symbol_name_match_type::SEARCH_NAME.
15767         * infrun.c (insert_exception_resume_breakpoint): Use
15768         lookup_symbol_search_name.
15769         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15770         * psymtab.c (maintenance_check_psymtabs): Use
15771         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15772         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15773         SYMBOL_SEARCH_NAME.
15774         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15775         if symbol_name_match_type::SEARCH_NAME.
15776         (lookup_symbol_in_language): Pass down
15777         symbol_name_match_type::FULL.
15778         (lookup_symbol_search_name): New.
15779         (lookup_language_this): Pass down
15780         symbol_name_match_type::SEARCH_NAME.
15781         (lookup_symbol_aux, lookup_local_symbol): New parameter
15782         'match_type'.  Pass it down.
15783         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15784         (lookup_symbol_search_name): New declaration.
15785         (lookup_symbol_in_block): New 'match_type' parameter.
15786
15787 2018-01-05  Pedro Alves  <palves@redhat.com>
15788
15789         PR gdb/22670
15790         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15791         ada_lookup_symbol.
15792         (ada_lookup_symbol): Reimplement in terms of
15793         ada_lookup_symbol_list, bits factored out from
15794         ada_lookup_encoded_symbol.
15795
15796 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15797
15798         * ada-exp.y (write_object_renaming): When subscripting an array
15799         using a symbol as the index, pass the block in call to
15800         ada_lookup_encoded_symbol when looking that symbol up.
15801
15802 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15803
15804         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15805         TYPE_INDEX_TYPE.
15806
15807 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15808
15809         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15810         the case where VALUE_LVAL (val0) is not lval_memory.
15811
15812 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15813
15814         * ada-valprint.c (print_optional_low_bound): Handle
15815         character-indexed array printing like boolean-indexed array
15816         printing.
15817
15818 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15819
15820         * NEWS: Create a new section for the next release branch.
15821         Rename the section of the current branch, now that it has
15822         been cut.
15823
15824 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15825
15826         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15827         * version.in: Bump version to 8.1.50.DATE-git.
15828
15829 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15830
15831         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15832         Add field.
15833         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15834         Add field.
15835         (default_exception_support_info) <catch_handlers_sym>: Add field.
15836         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15837         (ada_exception_name_addr_1): Add "catch handlers" handling.
15838         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15839         Update all callers.
15840         (create_excep_cond_exprs) <ex>: Add parameter.
15841         (re_set_exception): Update create_excep_cond_exprs call.
15842         (print_it_exception, print_one_exception, print_mention_exception)
15843         (print_recreate_exception): Add "catch handler" handling.
15844         (allocate_location_catch_handlers, re_set_catch_handlers)
15845         (check_status_catch_handlers, print_it_catch_handlers)
15846         (print_one_catch_handlers, print_mention_catch_handlers)
15847         (print_recreate_catch_handlers): New function.
15848         (catch_handlers_breakpoint_ops): New variable.
15849         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15850         Add parameter.  Add "catch handler" handling.
15851         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15852         Add "catch handler" handling.
15853         (ada_exception_catchpoint_cond_string): Add "catch handler"
15854         handling.
15855         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15856         call.
15857         (catch_ada_handlers_command): New function.
15858         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15859         operations structure.
15860         (_initialize_ada_language): Add "catch handlers" command entry.
15861         * NEWS: Document "catch handlers" feature.
15862
15863 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15864
15865         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15866         account when creating the array type of the slice.
15867         (ada_value_slice): Likewise.
15868
15869 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15870
15871         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15872         New enum value.
15873         (create_array_type_with_stride): Add byte_stride_prop parameter.
15874         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15875         New parameter.  Update all callers in this file.
15876         (array_type_has_dynamic_stride): New function.
15877         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15878         of arrays with dynamic byte strides.
15879         * dwarf2read.c (read_array_type): Add support for dynamic
15880         DW_AT_byte_stride attributes.
15881
15882 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15883
15884         * dwarf2read.c (read_unspecified_type): Treat
15885         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15886
15887 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15888
15889         Update copyright year range in all GDB files.
15890
15891 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15892
15893         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15894         and gdb/testsuite/gdb.base/step-line.c.
15895
15896 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15897
15898         * copyright.py (main): Dump the contents of
15899         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15900         even if BY_HAND is empty.
15901
15902 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15903
15904         * top.c (print_gdb_version): Update Copyright year in version
15905         message.
15906
15907 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15908
15909         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15910
15911 For older changes see ChangeLog-2017.
15912 \f
15913 Local Variables:
15914 mode: change-log
15915 left-margin: 8
15916 fill-column: 74
15917 version-control: never
15918 coding: utf-8
15919 End: