C++ify badness_vector, fix leaks
[external/binutils.git] / gdb / ChangeLog
1 2018-11-21  Pedro Alves  <palves@redhat.com>
2
3         * gdbtypes.c (compare_badness): Change type of parameters to const
4         reference.  Adjust to badness_vector being a std::vector now.
5         (rank_function): Adjust to badness_vector being a std::vector now.
6         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
7         (LENGTH_MATCH): Delete.
8         (compare_badness): Change type of parameters to const reference.
9         (rank_function): Return a badness_vector by value now.
10         (find_overload_match): Adjust to badness_vector being a
11         std::vector now.  Remove cleanups.
12         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
13         badness_vector pointer.
14         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
15         a badness_vector pointer.  Adjust to badness_vector being a
16         std::vector now.  Remove cleanups.
17         (find_oload_champ): 'oload_champ_bv' parameter now
18         a badness_vector pointer.  Adjust to badness_vector being a
19         std::vector now.  Remove cleanups.
20
21 2018-11-21  Pedro Alves  <palves@redhat.com>
22
23         * cp-support.c (sym_return_val_size, sym_return_val_index)
24         (sym_return_val): Delete.
25         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
26         add to the vector.
27         (make_symbol_overload_list): Adjust to return a std::vector
28         instead of maintaining a global open coded vector.
29         (make_symbol_overload_list_block): Add std::vector parameter.
30         (make_symbol_overload_list_block): Rename to ...
31         (add_symbol_overload_list_block): ... this and add std::vector
32         parameter.
33         (make_symbol_overload_list_namespace): Rename to ...
34         (add_symbol_overload_list_namespace): ... this and add std::vector
35         parameter.
36         (make_symbol_overload_list_adl_namespace): Rename to ...
37         (add_symbol_overload_list_adl_namespace): ... this and add
38         std::vector parameter.
39         (make_symbol_overload_list_adl): Delete.
40         (add_symbol_overload_list_adl): New.
41         (make_symbol_overload_list_using): Rename to ...
42         (add_symbol_overload_list_using): ... this and add std::vector
43         parameter.
44         (make_symbol_overload_list_qualified): Rename to ...
45         (add_symbol_overload_list_qualified): ... this and add std::vector
46         parameter.
47         * cp-support.h: Include "common/array-view.h" and <vector>.
48         (make_symbol_overload_list): Change return type to std::vector.
49         (make_symbol_overload_list_adl): Delete declaration.
50         (add_symbol_overload_list_adl): New declaration.
51         * valops.c (find_overload_match): Local 'oload_syms' now a
52         std::vector.
53         (find_oload_champ_namespace): 'oload_syms' parameter now a
54         std::vector pointer.
55         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
56         std::vector pointer.  Adjust to new make_symbol_overload_list
57         interface.
58
59 2018-11-21  Pedro Alves  <palves@redhat.com>
60
61         * common/array-view.h (array_view::splice(size_type, size_t)): New.
62         (array_view::splice(size_type)): New.
63         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
64         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
65         std::vector.
66         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
67         * extension.h: Include "common/array-view.h".
68         (xmethod_worker::invoke): Adjust to use gdb::array_view.
69         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
70         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
71         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
72         (xmethod_worker::do_get_result_type): Adjust to use
73         gdb::array_view.
74         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
75         * gdbtypes.h: Include "common/array-view.h".
76         (rank_function): Adjust to use gdb::array_view.
77         * python/py-xmethods.c (python_xmethod_worker::invoke)
78         (python_xmethod_worker::do_get_arg_types)
79         (python_xmethod_worker::do_get_result_type)
80         (python_xmethod_worker::invoke): Adjust to new interfaces.
81         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
82         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
83         * valops.c (find_overload_match, find_oload_champ_namespace)
84         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
85         gdb:array_view and the new xmethod_worker interfaces.
86         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
87         gdb::array_view.
88         * value.h (find_overload_match, result_type_of_xmethod)
89         (call_xmethod): Adjust to use gdb::array_view.
90         * unittests/array-view-selftests.c: Add slicing tests.
91
92 2018-11-21  Pedro Alves  <palves@redhat.com>
93
94         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
95         * common/array-view.h (make_array_view): New.
96         * compile/compile-object-run.c (compile_object_run): Adjust to
97         pass an array_view.
98         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
99         * eval.c (eval_call): Adjust to pass an array_view.
100         (evaluate_subexp_standard): Adjust to pass an array_view.
101         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
102         * guile/scm-value.c (gdbscm_value_call): Likewise.
103         * infcall.c (push_dummy_code): Replace pointer + size parameters
104         with an array_view parameter.
105         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
106         adjust.
107         * infcall.h: Include "common/array-view.h".
108         (call_function_by_hand, call_function_by_hand_dummy): Replace
109         pointer + size parameters with an array_view parameter.
110         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
111         * linux-tdep.c (linux_infcall_mmap): Likewise.
112         * objc-lang.c (lookup_objc_class, lookup_child_selector)
113         (value_nsstring, print_object_command): Likewise.
114         * python/py-value.c (valpy_call): Likewise.
115         * rust-lang.c (rust_evaluate_funcall): Likewise.
116         * spu-tdep.c (flush_ea_cache): Likewise.
117         * valarith.c (value_x_binop, value_x_unop): Likewise.
118         * valops.c (value_allocate_space_in_inferior): Likewise.
119         * unittests/array-view-selftests.c (run_tests): Add
120         gdb::make_array_view test.
121
122 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
123
124         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
125         than a fixed size buffer.
126
127 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
128
129         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
130         and remove insertion of extra spaces in GDB's output.
131         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
132         Layout field into a temporary buffer, and then output it as a
133         string field.
134
135 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
136
137         * NEWS: Document the language choice done by
138         'info [types|functions|variables]|rbreak'.
139
140 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
141
142         * symtab.c (treg_matches_sym_type_name): Use
143         scoped_switch_to_sym_language_if_auto instead of local logic.
144         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
145         to switch to SYM language when language mode is auto.
146
147 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
148
149         * language.h (scoped_switch_to_sym_language_if_auto): New class.
150
151 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
152
153         * symtab.c (search_symbols): Properly check absence of type regexp
154         before entering the loop scanning the minimal symbols.
155
156 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
157
158         * s12z-tdep.c (s12z_extract_return_value): New function.
159         (inv_reg_perm) New array.
160         (s12z_return_value): Populate readbuf if non-null.
161
162 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
163
164         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
165         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
166         to MinGW fixed by Gnulib.
167         (O_NOINHERIT): Define if not defined.
168
169 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
170
171         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
172
173 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
174
175         * infrun.c (displaced_step_inferior_state) <next>: Remove.
176
177 2018-11-19  Tom Tromey  <tom@tromey.com>
178
179         * source.c (get_filename_and_charpos): Return void.
180
181 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
182
183         * skip.c (_initialize_step_skip): Fix "info skip" help.
184
185 2018-11-16  Tom Tromey  <tom@tromey.com>
186
187         PR rust/23625:
188         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
189
190 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
191
192         * infrun.c (displaced_step_inferior_states): Change type to
193         std::forward_list.
194         (get_displaced_stepping_state): Adjust.
195         (displaced_step_in_progress_any_inferior): Adjust.
196         (add_displaced_stepping_state): Adjust.
197         (remove_displaced_stepping_state): Adjust.
198
199 2018-11-18  Tom Tromey  <tom@tromey.com>
200
201         PR build/23814:
202         * target-delegates.c: Rebuild.
203         * ia64-linux-nat.c (class ia64_linux_nat_target)
204         <have_steppable_watchpoint>: Use override.  Return true, not 1.
205         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
206         "self" argument.
207         (ia64_linux_nat_target::low_new_thread): Rename.
208         (class ia64_linux_nat_target) <read_description>: Don't declare.
209         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
210         bool.
211
212 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
213
214         PR gdb/22736:
215         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
216         lang_struct_return code.
217
218 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
219
220         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
221         return_method.
222         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
223         * amd64-tdep.c (amd64_push_arguments): Likewise.
224         (amd64_push_dummy_call): Likewise.
225         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
226         * arc-tdep.c (arc_push_dummy_call): Likewise.
227         * arm-tdep.c (arm_push_dummy_call): Likewise.
228         * avr-tdep.c (avr_push_dummy_call): Likewise.
229         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
230         * cris-tdep.c (cris_push_dummy_call): Likewise.
231         * csky-tdep.c (csky_push_dummy_call): Likewise.
232         * frv-tdep.c (frv_push_dummy_call): Likewise.
233         * gdbarch.c: Regenerate.
234         * gdbarch.h: Regenerate.
235         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
236         return_method.
237         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
238         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
239         (hppa64_push_dummy_call): Likewise.
240         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
241         * i386-tdep.c (i386_push_dummy_call): Likewise.
242         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
243         * infcall.c (call_function_by_hand_dummy): Likewise.
244         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
245         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
246         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
247         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
248         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
249         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
250         * mep-tdep.c (mep_push_dummy_call): Likewise.
251         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
252         (mips_n32n64_push_dummy_call): Likewise.
253         (mips_o32_push_dummy_call): Likewise.
254         (mips_o64_push_dummy_call): Likewise.
255         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
256         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
257         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
258         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
259         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
260         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
261         (ppc64_sysv_abi_push_dummy_call): Likewise.
262         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
263         (ppc64_sysv_abi_push_dummy_call): Likewise.
264         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
265         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
266         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
267         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
268         * rx-tdep.c (rx_push_dummy_call): Likewise.
269         * s390-tdep.c (s390_push_dummy_call): Likewise.
270         * score-tdep.c (score_push_dummy_call): Likewise.
271         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
272         (sh_push_dummy_call_nofpu): Likewise.
273         * sparc-tdep.c (sparc32_store_arguments): Likewise.
274         (sparc32_push_dummy_call): Likewise.
275         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
276         (sparc64_push_dummy_call): Likewise.
277         * spu-tdep.c (spu_push_dummy_call): Likewise.
278         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
279         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
280         * v850-tdep.c (v850_push_dummy_call): Likewise.
281         * vax-tdep.c (vax_push_dummy_call): Likewise.
282         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
283         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
284
285 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
286
287         * gdbarch.sh (enum function_call_return_method): Add enum.
288         * gdbarch.h: Regenerate.
289         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
290
291 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
292
293         * unittests/copy_bitwise-selftests.c: New file.
294         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
295         (selftests::copy_bitwise_tests): Delete, moving this code to
296         unittests/copy_bitwise-selftests.c instead.
297         (_initialize_utils): Do not register copy_bitwise tests.
298         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
299         unittests/copy_bitwise-selftests.c.
300
301 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
302
303         * ada-lang.c (move_bits): Delete. Update all callers to use
304         copy_bitwise instead.
305         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
306         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
307         Move from here to utils.c.
308         (_initialize_dwarf2loc): Remove call to register copy_bitwise
309         selftests.
310         * utils.h (copy_bitwise): Add declaration.
311         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
312         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
313         Moved here from dwarf2loc.c.
314         (_initialize_utils): Register copy_bitwise selftests.
315
316 2018-11-14  Jim Wilson  <jimw@sifive.com>
317
318         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
319         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
320         then increment next_regnum if odd.
321         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
322         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
323         function type.  Pass new arg to riscv_arg_location based on function
324         type.
325         (riscv_return_value): Pass new arg to riscv_arg_location.
326
327         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
328         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
329         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
330
331         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
332         setting len.  New local align, set to max of arg align and xlen,
333         and pass to first riscv_assign_stack_location call.
334
335 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
336
337         * skip.c (complete_skip_number): New function.
338         (_initialize_step_skip): Add completers to some skip commands.
339
340 2018-11-09  Tom Tromey  <tom@tromey.com>
341
342         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
343         (struct remote_g_packet_data): Derive from allocate_on_obstack.
344         <guesses>: Now a std::vector.
345         (remote_g_packet_data_init, register_remote_g_packet_guess):
346         Update.
347         (remote_read_description_p): Update.  Return bool.
348         (remote_target::read_description): Update.
349         (struct remote_g_packet_guess): Add constructor.
350
351 2018-11-09  Tom Tromey  <tom@tromey.com>
352
353         * common/scoped_fd.h (class scoped_fd): Add move constructor and
354         move assignment operator.
355         * psymtab.c (psymtab_to_fullname): Update.
356         * source.h (open_source_file): Return scoped_fd.
357         (find_and_open_source): Likewise.
358         * source.c (open_source_file): Return scoped_fd.
359         (get_filename_and_charpos): Update.
360         (print_source_lines_base): Update.  Use scoped_fd::to_file.
361         (forward_search_command): Likewise.
362         (reverse_search_command): Likewise.
363         (find_and_open_source): Return scoped_fd.
364         * tui/tui-source.c (tui_set_source_content): Update.  Use
365         gdb_file_up.
366
367 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
368
369         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
370         overflow.
371
372 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
373
374         * configure: Regenerate.
375
376 2018-11-09  Tom de Vries  <tdevries@suse.de>
377
378         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
379         unconditionally, to set the language of the symbol.  Manage freeing
380         returned pointer using gdb::unique_xmalloc_ptr.
381
382 2018-11-08  Tom Tromey  <tom@tromey.com>
383
384         * record.c (require_record_target): Upper-case "<TAB>".
385
386 2018-11-08  Tom Tromey  <tom@tromey.com>
387
388         * python/lib/gdb/command/pretty_printers.py
389         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
390
391 2018-11-08  Tom Tromey  <tom@tromey.com>
392
393         PR gdb/23555:
394         PR gdb/23838:
395         * target.h (target_supports_terminal_ours): Return bool.
396         * target.c (target_supports_terminal_ours): Handle case where
397         current_top_target returns nullptr.  Return bool.
398
399 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
400
401         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
402         return the correct count for potential HFAs.
403
404 2018-11-08  Jan Beulich  <jbeulich@suse.com>
405
406         * i387-tdep.c (i387_supply_xsave): Split handling of
407         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
408         (i387_collect_xsave): Likewise.
409
410 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
411
412         * riscv-tdep.c (riscv_insn::decode): Update header comment.
413         (riscv_frame_this_id): Catch errors thrown while building the
414         frame cache, leave the frame id as the default, which is the outer
415         frame id.
416
417 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
418
419         * ada-lang.c (read_atcb): Only set task_info->called_task if
420         task_info->state == Entry_Caller_Sleep.
421         (print_ada_task_info): Do not check task_info->state before
422         checking task_info->called_task.
423         (info_task): Likewise.
424
425 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
426
427         * ada-tasks.c (read_atcb): Clear task_info before computing
428         the value of each of its fields.
429
430 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
431
432         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
433         NULL before dereferencing it.
434
435 2018-11-06  Tom de Vries  <tdevries@suse.de>
436
437         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
438         program headers.
439
440 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
441
442         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
443         so that it applies to uclinux as well.
444
445 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
446
447         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
448         when on AAPCS.
449
450 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
451
452         * riscv-fbsd-nat.c (getregs_supplies): Return true for
453         RISCV_CSR_SSTATUS_REGNUM.
454
455 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
456
457         * source.c (open_source_file): Fix leak by transferring the
458         current s->fullname to the unique_xmalloc_ptr fullname given
459         to find_and_open_source.
460
461 2018-11-04  Tom Tromey  <tom@tromey.com>
462
463         * varobj.c (install_default_visualizer): Update.
464         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
465         Return gdbpy_ref.
466         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
467         (find_pretty_printer_from_progspace)
468         (find_pretty_printer_from_gdb, find_pretty_printer)
469         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
470         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
471         Update.
472
473 2018-11-04  Tom Tromey  <tom@tromey.com>
474
475         * python/python.c (gdbpy_parameter_value): Update.
476         * python/python-internal.h (python_string_to_unicode)
477         (python_string_to_target_python_string)
478         (host_string_to_python_string): Return gdbpy_ref.
479         * python/py-utils.c (python_string_to_unicode)
480         (unicode_to_encoded_python_string)
481         (unicode_to_target_python_string)
482         (python_string_to_target_string)
483         (python_string_to_target_python_string): Return gdbpy_ref.
484         (python_string_to_host_string): Update.
485         (host_string_to_python_string): Return gdbpy_ref.
486         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
487         (stpy_fullname): Update.
488         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
489         Update.
490         * python/py-prettyprint.c (print_string_repr): Update.
491         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
492         (objfpy_get_build_id): Update.
493         * python/py-breakpoint.c (bppy_get_location)
494         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
495         Update.
496
497 2018-11-04  Tom Tromey  <tom@tromey.com>
498
499         * python/python-internal.h (gdb_py_object_from_longest)
500         (gdb_py_object_from_ulongest): Return gdbpy_ref.
501         * python/py-value.c (valpy_int): Update.
502         * python/py-utils.c (gdb_py_object_from_longest): Return
503         gdbpy_ref.
504         (gdb_py_object_from_ulongest): Likewise.
505         * python/py-type.c (typy_get_alignof): Update.
506         * python/py-linetable.c (ltpy_get_all_source_lines)
507         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
508         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
509
510 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
511
512         * ada-lang.c (_initialize_ada_language): Fix typo.
513
514 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
515
516         * language.c (type): Remove.
517         (_initialize_language): Remove assignment to type.
518
519 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
520
521         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
522         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
523         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
524         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
525         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
526         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
527         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
528         and aarch64-ravenscar-thread.o.
529         * NEWS: Add entry documenting Ravenscar tasking support
530         on AArch64 ELF.
531
532 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
533
534         * symtab.c (info_functions_command): Initialize quiet flag.
535         * stack.c (info_args_command): Likewise.
536
537 2018-11-01  Jim Wilson  <jimw@sifive.com>
538
539         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
540         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
541         debugging messages.
542
543 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
544
545         * ada-lang.c (ada_watch_location_expression): New function.
546         (ada_language_defn): Set la_watch_location_expression to
547         ada_watch_location_expression.
548
549 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
550
551         * print-utils.c (int_string): Remove unnecessary trailing spaces.
552
553 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
554
555         * rs6000-tdep.c (skip_prologue): Fix potential negative left
556         shifting.
557
558 2018-11-01  Jerome Guitton  <guitton@adacore.com>
559             Joel Brobecker  <brobecker@adacore.com>
560
561         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
562         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
563         * arm-pikeos-tdep.c: New file.
564         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
565         embedded system.
566         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
567
568 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
569
570         * common/pathstuff.c (get_standard_temp_dir): New.
571         * common/pathstuff.h (get_standard_temp_dir): New.
572         * config.in: Re-generate.
573         * configure: Re-generate.
574         * configure.ac: Don't check for mkdtemp.
575         * gnulib/aclocal-m4-deps.mk: Re-generate.
576         * gnulib/aclocal.m4: Re-generate.
577         * gnulib/config.in: Re-generate.
578         * gnulib/configure: Re-generate.
579         * gnulib/import/Makefile.am: Re-generate.
580         * gnulib/import/Makefile.in: Re-generate.
581         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
582         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
583         * gnulib/import/m4/mkdtemp.m4: New file.
584         * gnulib/import/mkdtemp.c: New file.
585         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
586         Add mkdtemp module.
587         * unittests/mkdir-recursive-selftests.c (test): Use
588         get_standard_temp_dir.
589         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
590         ifdef.
591         * compile/compile.c (get_compile_file_tempdir): Likewise.
592
593 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
594
595         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
596         (SIG_FRAME_LR_OFFSET64): New define.
597         (SIG_FRAME_FP_OFFSET64): New define.
598         (aix_sighandle_frame_cache): New Function.
599         (aix_sighandle_frame_this_id): New Function.
600         (aix_sighandle_frame_prev_register): New Function.
601         (aix_sighandle_frame_sniffer): New Function.
602         (aix_sighandle_frame_unwind): New global variable.
603         (rs6000_aix_init_osabi): Install new frame unwinder.
604
605 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
606
607         PR gdb/23835
608         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
609         already defined.
610
611 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
612
613         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
614
615 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
616
617         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
618         (producer_is_icc): New function.
619         (check_producer): Set producer_is_icc field on dwarf2_cu.
620         (dwarf2_init_integer_type): New function.
621         (read_base_type): Call dwarf2_init_integer_type instead of
622         init_integer_type in all cases.
623         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
624         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
625         LEN is greater than 0.
626
627 2018-10-30  Tom Tromey  <tom@tromey.com>
628
629         * main.c (captured_main_1): Check return value of bfd_init.
630
631 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
632
633         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
634         Adjust comments.
635
636 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
637
638         * procfs.c: Include common/pathstuff.h.
639
640 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
641
642         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
643         Add missing braces.  No functional change.
644
645 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
646
647         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
648         to report a bad option and fix indentation.
649         * demangle.c (demangle_command): Use report_unrecognized_option_error
650         to report a bad option and correctly report the bad option.
651
652 2018-10-27  Tom Tromey  <tom@tromey.com>
653
654         PR cli/23364:
655         * darwin-nat.c (copied_shell): New global.
656         (may_have_sip): Rename from should_disable_startup_with_shell.
657         (copy_shell_to_cache, maybe_cache_shell): New functions.
658         (darwin_nat_target::create_inferior): Update.  Use
659         copied_shell.
660
661 2018-10-27  Tom Tromey  <tom@tromey.com>
662
663         * unittests/scoped_fd-selftests.c (test_to_file): New function.
664         (run_tests): Call test_to_file.
665         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
666         temporary files.
667         * common/scoped_fd.h (scoped_fd::to_file): New method.
668
669 2018-10-27  Tom Tromey  <tom@tromey.com>
670
671         * unittests/scoped_mmap-selftests.c (test_normal): Use
672         gdb_mkostemp_cloexec.
673         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
674         Use gdb_mkostemp_cloexec.
675         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
676         gnulib/config.in, gnulib/configure,
677         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
678         gnulib/import/m4/gnulib-cache.m4,
679         gnulib/import/m4/gnulib-comp.m4: Update.
680         * gnulib/import/m4/mkostemp.m4: New file.
681         * gnulib/import/m4/mkstemp.m4: Remove.
682         * gnulib/import/mkostemp.c: New file.
683         * gnulib/import/mkstemp.m4: Remove.
684         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
685         mkstemp, add mkostemp.  Apply new patch.
686         * gnulib/import/stdlib.in.h: Apply patch.
687         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
688         New file.
689         * dwarf-index-write.c (write_psymtabs_to_index): Use
690         gdb_mkostemp_cloexec.
691         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
692
693 2018-10-27  Tom Tromey  <tom@tromey.com>
694
695         * unittests/mkdir-recursive-selftests.c: New file.
696         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
697         unittests/mkdir-recursive-selftests.c.
698         * dwarf-index-cache.c (mkdir_recursive): Move to
699         common/filestuff.c.
700         (index_cache::store): Check return value of mkdir_recursive.
701         (create_dir_and_check, test_mkdir_recursive): Move to new file.
702         (_initialize_index_cache): Don't register test.
703         * common/filestuff.h (mkdir_recursive): Declare.
704         * common/filestuff.c (mkdir_recursive): Move from
705         dwarf-index-cache.c.  Return bool.
706
707 2018-10-27  Tom Tromey  <tom@tromey.com>
708
709         * dwarf-index-write.c (write_psymtabs_to_index): Move
710         make_temp_filename to common/pathstuff.c.
711         * common/pathstuff.h (make_temp_filename): Declare.
712         * common/pathstuff.c (make_temp_filename): New function, moved
713         from dwarf-index-write.c.
714
715 2018-10-27  Tom Tromey  <tom@tromey.com>
716
717         * procfs.c (procfs_target::create_inferior): Use get_shell.
718         * cli/cli-cmds.c (shell_escape): Use get_shell.
719         * windows-nat.c (windows_nat_target::create_inferior): Use
720         get_shell.
721         * common/pathstuff.c (get_shell): New function.
722         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
723         (fork_inferior): Use get_shell.
724         * common/pathstuff.h (get_shell): Declare.
725
726 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
727
728         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
729
730 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
731
732         * stack.c (print_variable_and_value_data): Add preg and treg.
733         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
734         and update callers.
735         (print_frame_arg_vars): Likewise.
736         (prepare_reg): New function.
737         (info_locals_command): Extract info print args and use them.
738         (info_args_command): Likewise.
739         (_initialize_stack): Modify on-line help.
740         * symtab.c (treg_matches_sym_type_name): New function.
741         (search_symbols): New arg t_regexp.
742         (symtab_symbol_info): New args quiet, regexp, t_regexp.
743         (info_variables_command): Extract info print args and use them.
744         (info_functions_command): Likewise.
745         (info_types_command): Update call to symtab_symbol_info.
746         (_initialize_symtab): Modify on-line help.
747         * symtab.h (treg_matches_sym_type_name): New function.
748         (search_symbols): New t_regexp arg.
749
750 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
751
752         * cli-utils.c (extract_arg_maybe_quoted): New function.
753         (extract_info_print_args): New function.
754         (info_print_args_help): New function.
755         (report_unrecognized_option_error): New function.
756         * cli-utils.h (extract_arg_maybe_quoted): New function.
757         (extract_info_print_args): New function.
758         (info_print_args_help): New function.
759         (report_unrecognized_option_error): New function.
760
761 2018-10-26  Tom Tromey  <tom@tromey.com>
762
763         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
764         (compute_compunit_symtab_includes): Update.
765         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
766         (compunit_symtab_ptr): Likewise.
767
768 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
769
770         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
771         default_print_auxv_entry for specific tag values.
772
773 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
774
775         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
776
777 2018-10-26  Jim Wilson  <jimw@sifive.com>
778
779         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
780         (riscv_linux_sigframe_init): Declare.
781         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
782         (riscv_linux_sigframe): New.
783         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
784         (riscv_linux_sigframe_init): Define.
785         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
786
787         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
788         (riscv_isa_flen): Likewise.  Drop static.
789         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
790         (riscv_isa_flen): Likewise.  Declare.
791
792 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
793             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
794
795         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
796         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
797         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
798         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
799         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
800         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
801         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
802         Define.
803         (struct ppc_linux_features) <htm>: New field.
804         (ppc_linux_no_features): Add initializer for htm field.
805         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
806         new tdescs.
807         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
808         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
809         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
810         Define if not already defined.
811         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
812         and rs6000/powerpc-isa207-htm-vsx64l.
813         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
814         rs6000/powerpc-isa207-htm-vsx64l.xml.
815         * features/rs6000/power-htm-spr.xml: New file.
816         * features/rs6000/power-htm-core.xml: New file.
817         * features/rs6000/power64-htm-core.xml: New file.
818         * features/rs6000/power-htm-fpu.xml: New file.
819         * features/rs6000/power-htm-altivec.xml: New file.
820         * features/rs6000/power-htm-vsx.xml: New file.
821         * features/rs6000/power-htm-ppr.xml: New file.
822         * features/rs6000/power-htm-dscr.xml: New file.
823         * features/rs6000/power-htm-tar.xml: New file.
824         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
825         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
826         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
827         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
828         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
829         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
830         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
831         fetch_regset with HTM regsets.
832         (store_register, store_ppc_registers): Call store_regset with HTM
833         regsets.
834         (ppc_linux_nat_target::read_description): Set htm field in the
835         features struct if needed.
836         * ppc-linux-tdep.c: Include
837         features/rs6000/powerpc-isa207-htm-vsx32l.c and
838         features/rs6000/powerpc-isa207-htm-vsx64l.c.
839         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
840         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
841         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
842         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
843         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
844         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
845         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
846         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
847         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
848         (ppc32_linux_ctarregset): New globals.
849         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
850         (ppc_linux_collect_core_cpgrregset): New function.
851         (ppc_linux_iterate_over_regset_sections): Call back with the htm
852         regsets.
853         (ppc_linux_core_read_description): Check if the tm spr section is
854         present and set htm in the features struct.
855         (_initialize_ppc_linux_tdep): Call
856         initialize_tdesc_powerpc_isa207_htm_vsx32l and
857         initialize_tdesc_powerpc_isa207_htm_vsx64l.
858         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
859         Declare.
860         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
861         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
862         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
863         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
864         New fields.
865         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
866         Likewise.
867         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
868         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
869         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
870         New enum fields.
871         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
872         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
873         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
874         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
875         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
876         <PPC_CTAR_REGNUM>: Likewise.
877         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
878         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
879         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
880         (IS_CEFP_PSEUDOREG): Define.
881         (rs6000_register_name): Hide the upper halves of checkpointed VSX
882         registers.  Return names for the checkpointed DFP, VSX, and EFP
883         pseudo registers.
884         (rs6000_pseudo_register_type): Remove initial assert and raise an
885         internal error in the else clause instead.  Return types for the
886         checkpointed DFP, VSX, and EFP pseudo registers.
887         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
888         checkpointed DFP pseudo registers.
889         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
890         checkpointed VSX pseudo registers.
891         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
892         from efpr_pseudo_register_read and
893         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
894         registers.
895         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
896         Handle checkpointed DFP, VSX, and EFP registers.
897         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
898         (efp_ax_pseudo_register_collect): New functions.
899         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
900         register logic to new functions.  Handle checkpointed DFP, VSX,
901         and EFP pseudo registers.
902         (rs6000_gdbarch_init): Look for and validate the htm features.
903         Include checkpointed DFP, VSX and EFP pseudo-registers.
904         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
905         HTM registers.
906
907 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
908
909         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
910         without altivec or fpu.
911
912 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
913             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
914
915         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
916         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
917         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
918         Define if not already defined.
919         * features/rs6000/power-ebb.xml: New file.
920         * features/rs6000/power-linux-pmu.xml: New file.
921         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
922         features.
923         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
924         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
925         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
926         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
927         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
928         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
929         fetch_regset with ebb and pmu regsets.
930         (store_register, store_ppc_registers): Call store_regset with ebb
931         and pmu regsets.
932         (ppc_linux_nat_target::read_description): Set isa207 field in the
933         features struct if ebb and pmu are avaiable.
934         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
935         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
936         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
937         and pmu regsets.
938         (ppc_linux_core_read_description): Check if the pmu section is
939         present and set isa207 in the features struct.
940         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
941         (ppc32_linux_pmuregset): Declare.
942         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
943         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
944         <ppc_sier_regnum>: New field.
945         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
946         New enum values.
947         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
948         values.
949         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
950         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
951         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
952         ebb and pmu features.
953
954 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
955             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
956
957         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
958         (tdesc_powerpc_isa207_vsx64l): Declare.
959         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
960         (struct ppc_linux_features) <isa207>: New field.
961         (ppc_linux_no_features): Add initializer for isa207 field.
962         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
963         new tdescs.
964         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
965         (NT_PPC_TAR): Define if not already defined.
966         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
967         rs6000/powerpc-isa207-vsx64l.
968         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
969         rs6000/powerpc-isa207-vsx64l.xml.
970         * features/rs6000/power-tar.xml: New file.
971         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
972         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
973         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
974         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
975         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
976         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
977         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
978         fetch_regset with the TAR regset.
979         (store_register, store_ppc_registers): Call store_regset with the
980         TAR regset.
981         (ppc_linux_nat_target::read_description): Set isa207 field in the
982         features struct if needed.
983         * ppc-linux-tdep.c: Include
984         features/rs6000/powerpc-isa207-vsx32l.c and
985         features/rs6000/powerpc-isa207-vsx64l.c.
986         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
987         (ppc_linux_iterate_over_regset_sections): Call back with the tar
988         regset.
989         (ppc_linux_core_read_description): Check if the tar section is
990         present and set isa207 in the features struct.
991         (_initialize_ppc_linux_tdep): Call
992         initialize_tdesc_powerpc_isa207_vsx32l and
993         initialize_tdesc_powerpc_isa207_vsx64l.
994         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
995         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
996         (enum) <PPC_TAR_REGNUM>: New enum value.
997         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
998         feature.
999         (ppc_process_record_op31): Record changes to TAR.
1000
1001 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1002             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1003
1004         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
1005         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1006         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
1007         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
1008         (struct ppc_linux_features) <ppr_dscr>: New field.
1009         (ppc_linux_no_features): Add initializer for ppr_dscr field.
1010         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1011         new tdescs.
1012         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
1013         Define if not already defined.
1014         * features/Makefile (WHICH): Add
1015         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
1016         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
1017         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1018         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
1019         * features/rs6000/power-dscr.xml: New file.
1020         * features/rs6000/power-ppr.xml: New file.
1021         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
1022         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
1023         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
1024         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
1025         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
1026         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
1027         * ppc-linux-nat.c: Include <sys/uio.h>.
1028         (fetch_regset, store_regset, check_regset): New functions.
1029         (fetch_register, fetch_ppc_registers): Call fetch_regset with
1030         DSCR and PPR regsets.
1031         (store_register, store_ppc_registers): Call store_regset with
1032         DSCR and PPR regsets.
1033         (ppc_linux_get_hwcap2): New function.
1034         (ppc_linux_nat_target::read_description): Call
1035         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
1036         features struct if needed.
1037         * ppc-linux-tdep.c: Include
1038         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
1039         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
1040         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
1041         (ppc32_linux_dscrregset): New globals.
1042         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
1043         and dscr regsets.
1044         (ppc_linux_core_read_description): Check if the ppr and dscr
1045         sections are present and set ppr_dscr in the features struct.
1046         (_initialize_ppc_linux_tdep): Call
1047         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
1048         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
1049         * ppc-linux-tdep.h (ppc32_linux_pprregset)
1050         (ppc32_linux_dscrregset): Declare.
1051         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
1052         <ppc_dscr_regnum>: New field.
1053         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
1054         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
1055         and dscr features.
1056         (ppc_process_record_op31): Record changes to PPR and DSCR.
1057
1058 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1059
1060         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
1061         second initializer line for the have_* variables.  Initialize
1062         have_fpu to 0 instead of 1.
1063
1064 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1065
1066         * arch/ppc-linux-common.c (ppc_linux_match_description):
1067         Parenthesize tdesc assignements and indent them properly.
1068
1069 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1070
1071         * ppc-linux-nat.c (fetch_register): Change if statement to else
1072         if.
1073         (store_register): Likewise.
1074
1075 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1076
1077         * rs6000-tdep.c: Remove reggroups.h include.
1078         (rs6000_pseudo_register_reggroup_p): Remove.
1079         (rs6000_gdbarch_init): Remove call to
1080         set_tdesc_pseudo_register_reggroup_p.
1081
1082 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1083
1084         * reggroups.c (default_register_reggroup_p): Return true for
1085         decfloat registers and float_reggroup.
1086
1087 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1088
1089         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
1090         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
1091         ppc_linux_collect_vrregset by regcache_collect_regset.
1092
1093 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1094
1095         * linux-tdep.c (linux_collect_regset_section_cb): Use
1096         std::vector<gdb_byte> instead of char * and malloc for buf.
1097         Remove xfree.
1098
1099 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1100
1101         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
1102         symtab_start instead of always using language_unknown.
1103
1104 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1105
1106         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
1107         READ_P parameter, catch and ignore register access errors from
1108         either the old or new MISA location.
1109         (riscv_has_feature): Update call to riscv_read_misa_reg.
1110
1111 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1112
1113         * python/py-function.c (convert_values_to_python): Return
1114         gdbpy_ref<>.  Add header comment.
1115         (fnpy_call): Adjust.
1116
1117 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1118
1119         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
1120         (cmdpy_completer_handle_brkchars): Adjust.
1121         (cmdpy_completer): Adjust.
1122
1123 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1124
1125         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1126         Pass correct regnum to raw_supply_zeroed.
1127
1128 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1129
1130         * regcache.c (cooked_read_test): Add CSKY to the list of
1131         architectures with a save_reggroup
1132
1133 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
1134
1135         PR gdb/23368
1136         * infrun.c (follow_exec): In the follow_exec_mode_new case,
1137         transfer terminal state from old new new inferior.
1138         * terminal.h (swap_terminal_info): New function.
1139         * inflow.c (swap_terminal_info): New function.
1140
1141 2018-10-23  Tom Tromey  <tom@tromey.com>
1142
1143         * record-btrace.c (get_thread_current_frame_id): Rename from
1144         get_thread_current_frame.  Return a frame_id.
1145         (record_btrace_start_replaying): Update.
1146
1147 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1148
1149         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
1150         for CSRs.
1151
1152 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
1153
1154         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
1155         have_nonsteppable_watchpoint attribute to 1.
1156
1157 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
1158
1159         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
1160         register names.
1161         (struct register_alias): Rename to...
1162         (struct riscv_register_alias): ...this, and update comment.
1163         (riscv_register_aliases): Update type, and alias names.  Remove
1164         CSR names from this list.
1165         (riscv_register_name): Use riscv_gdb_reg_names for int and float
1166         register names.  Add an extra assertion.
1167         (riscv_is_regnum_a_named_csr): New function.
1168         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
1169
1170 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
1171
1172         * configure.tgt: Add configuration for s12z.
1173         * s12z-tdep.c:  New file.
1174         * NEWS: Mention new target.
1175
1176 2018-10-22  Jim Wilson  <jimw@sifive.com>
1177
1178         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
1179         FP reg smaller than FP reg size, and fill with -1 instead of 0.
1180
1181         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
1182         (riscv_register_type): Use them.
1183         (riscv_print_one_register_info): Handle union of floats same as float.
1184         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
1185         riscv_fpreg_q_type fields.
1186
1187 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1188
1189         * gdbarch.sh (gdbarch_num_cooked_regs): New.
1190         * gdbarch.h: Re-generate.
1191         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
1192         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
1193         * eval.c (evaluate_subexp_standard): Likewise.
1194         * findvar.c (value_of_register): Likewise.
1195         (value_of_register_lazy): Likewise.
1196         (address_from_register): Likewise.
1197         * frame.c (get_frame_register_bytes): Likewise.
1198         * gdbarch-selftests.c (register_to_value_test): Likewise.
1199         * h8300-tdep.c (h8300_register_type): Likewise.
1200         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
1201         (i386_svr4_reg_to_regnum): Likewise.
1202         * infcmd.c (default_print_registers_info): Likewise.
1203         (registers_info): Likewise.
1204         (print_vector_info): Likewise.
1205         (default_print_float_info): Likewise.
1206         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1207         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1208         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1209         (mi_cmd_data_list_changed_registers): Likewise.
1210         (mi_cmd_data_list_register_values): Likewise.
1211         (mi_cmd_data_write_register_values): Likewise.
1212         (mi_cmd_trace_frame_collected): Likewise.
1213         * mips-tdep.c (print_gp_register_row): Likewise.
1214         (mips_print_registers_info): Likewise.
1215         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1216         * regcache.c (init_regcache_descr): Likewise.
1217         (register_size): Likewise.
1218         (register_dump::dump): Likewise.
1219         (cooked_read_test): Likewise.
1220         (cooked_write_test): Likewise.
1221         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1222         (rs6000_gdbarch_init): Likewise.
1223         * stabsread.c (stab_reg_to_regnum): Likewise.
1224         * stack.c (info_frame_command): Likewise.
1225         * target-descriptions.c (tdesc_register_name): Likewise.
1226         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1227         * tui/tui-regs.c (tui_show_register_group): Likewise.
1228         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1229         (user_reg_map_regnum_to_name): Likewise.
1230         (value_of_user_reg): Likewise.
1231         (maintenance_print_user_registers): Likewise.
1232         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1233         (xtensa_register_name): Likewise.
1234         (xtensa_register_type): Likewise.
1235         (xtensa_reg_to_regnum): Likewise.
1236         (xtensa_pseudo_register_read): Likewise.
1237         (xtensa_pseudo_register_write): Likewise.
1238
1239 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1240
1241         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1242         correctly-sized buffer with raw_read.
1243         (amd64_pseudo_register_write): Use correctly-sized buffer for
1244         raw_read/raw_write.
1245
1246 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1247
1248         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1249         in add_prefix_cmd of set print type.
1250
1251 2018-10-19  Tom Tromey  <tom@tromey.com>
1252
1253         PR tui/18388:
1254         * NEWS: Mention tabset deprecation.
1255         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1256         (update_tab_width): New function.
1257         (tui_set_tab_width, tui_show_tab_width): New functions.
1258         (tui_set_tab_width_command): Use update_tab_width.
1259         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1260         Add new "set tui tab-width" command.
1261         * tui/tui-source.c (tui_set_source_content): Update.
1262         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1263         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1264         Don't declare.
1265         (tui_tab_width): Declare.
1266         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1267         (tui_set_default_tab_len): Remove.
1268
1269 2018-10-19  Tom Tromey  <tom@tromey.com>
1270
1271         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1272         (key_is_backspace, tui_getc): Don't declare.
1273         * tui/tui-io.c (key_is_start_sequence): Now static.
1274         (key_is_end_sequence, key_is_backspace): Remove.
1275         (tui_getc): Now static.
1276
1277 2018-10-19  Tom Tromey  <tom@tromey.com>
1278
1279         * symfile.c (reread_symbols): Clear "static_links".
1280
1281 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1282
1283         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1284         define.
1285         (aarch64_linux_sigframe_init): Extra boundary checks.
1286
1287 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1288
1289         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1290         the possibly non-existent tdesc type 'vec128', but the type of raw
1291         register v16 instead.
1292
1293 2018-10-19  Gary Benson <gbenson@redhat.com>
1294
1295         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1296
1297 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1298
1299         PR cli/23785
1300         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1301         NULL.
1302
1303 2018-10-17  Paul Koning  <paul_koning@dell.com>
1304
1305         * charset.c (convert_between_encodings): Fix unsigned overflow.
1306
1307 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1308
1309         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1310         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1311         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1312         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1313         New functions.
1314         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1315         and fbsd_info_proc_mappings_header.
1316         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1317         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1318         New.
1319
1320 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1321
1322         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1323         Solaris Maintainer.
1324
1325 2018-10-15  Tom Tromey  <tom@tromey.com>
1326
1327         * tui/tui.c (strcat_to_buf): Remove casts.
1328         * tui/tui-winsource.c (tui_show_source_line)
1329         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1330         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1331         * tui/tui-windata.c (tui_first_data_item_displayed)
1332         (tui_delete_data_content_windows, tui_erase_data_content)
1333         (tui_display_all_data, tui_display_data_from)
1334         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1335         * tui/tui-win.c (tui_set_win_height)
1336         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1337         casts.
1338         * tui/tui-win.c (tui_resize_all): Remove casts.
1339         (tui_scroll_backward_command, tui_set_focus)
1340         (tui_set_tab_width_command): Likewise.
1341         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1342         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1343         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1344         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1345         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1346         Remove casts.
1347
1348 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1349
1350         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1351         AArch64/ARM maintainer.
1352
1353 2018-10-11  Gary Benson <gbenson@redhat.com>
1354
1355         * interps.h (interp::m_name): Make private and mutable.
1356         * interps.c (interp::~interp): Free m_name.
1357
1358 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1359             Simon Marchi <simark@simark.ca>
1360
1361         * README (`configure' options): Add documentation for new
1362         "--enable-unit-tests" option.
1363         * acinclude.m4: Include "selftest.m4".
1364         * configure: Regenerate.
1365         * configure.ac: Use "GDB_AC_SELFTEST".
1366         * maint.c (maintenance_selftest): Update message informing
1367         that selftests have been disabled.
1368         (maintenance_info_selftests): Likewise.
1369         * selftest.m4: New file.
1370
1371 2018-10-10  Gary Benson <gbenson@redhat.com>
1372
1373         * remote.c (remote_target::remote_send_printf): Add
1374         missing va_end found by Coverity.
1375
1376 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1377
1378         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1379
1380 2018-10-09  Tom Tromey  <tom@tromey.com>
1381
1382         * configure: Rebuild.
1383         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1384         * NEWS: Update --enable-ubsan documentation.
1385
1386 2018-10-09  Gary Benson <gbenson@redhat.com>
1387
1388         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1389         found by Coverity.
1390
1391 2018-10-08  Tom Tromey  <tom@tromey.com>
1392
1393         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1394         variable.
1395         (riscv_fbsd_init_abi): Likewise.
1396
1397 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1398         * valops.c (value_struct_elt_for_reference): Rename local variable
1399         to work around the shadowing a previous local warning.
1400
1401 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1402
1403         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1404         * NEWS: Mention new FreeBSD/riscv native configuration.
1405         * configure.host: Add riscv*-*-freebsd*.
1406         * configure.nat: Likewise.
1407         * riscv-fbsd-nat.c: New file.
1408
1409 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1410
1411         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1412         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1413         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1414         * NEWS: Mention new FreeBSD/riscv target.
1415         * configure.tgt: Add riscv*-*-freebsd*.
1416         * riscv-fbsd-tdep.c: New file.
1417         * riscv-fbsd-tdep.h: New file.
1418
1419 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1420
1421         * regcache.h (struct regcache_map_entry): Note that this type can
1422         be used with traditional frame caches.
1423         * trad-frame.c (trad_frame_set_reg_regmap): New.
1424         * trad-frame.h (trad_frame_set_reg_regmap): New.
1425
1426 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1427
1428         PR c++/16841
1429         * valops.c (get_virtual_base_offset): New function.
1430         (value_struct_elt_for_reference): Use it to get virtual base offset
1431         and add it in calculating class member address.
1432
1433 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
1434
1435         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1436         (check_producer): Check if the producer is codewarrior.
1437         (producer_is_codewarrior): New function.
1438         (lnp_state_machine::record_line): Ignore is_stmt flag for records
1439         produced by codewarrior.
1440         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1441
1442 2018-10-06  Tom Tromey  <tom@tromey.com>
1443
1444         PR python/19399:
1445         * python/py-inferior.c: Add "architecture" entry.
1446         (infpy_architecture): New function.
1447
1448 2018-10-06  Tom Tromey  <tom@tromey.com>
1449
1450         PR python/21765:
1451         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1452         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1453         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1454         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1455
1456 2018-10-06  Tom Tromey  <tom@tromey.com>
1457
1458         PR build/17077:
1459         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1460         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1461         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1462         #include.
1463
1464 2018-10-06  Tom Tromey  <tom@tromey.com>
1465
1466         * python/py-breakpoint.c (bppy_get_location): Handle a
1467         bp_breakpoint without a location.
1468
1469 2018-10-06  Tom Tromey  <tom@tromey.com>
1470
1471         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1472         (_RegEx): Reformat help text.
1473         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1474         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1475         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1476         text.
1477         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1478         (EnableXMethod, DisableXMethod): Remove help indentation.
1479         Capitalize meta-syntactic variables.
1480         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1481         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1482         Capitalize meta-syntactic variables.
1483         * python/lib/gdb/command/explore.py (ExploreCommand)
1484         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1485         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1486         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1487         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1488         Remove help indentation.
1489         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1490         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1491         (DisableFrameFilter, SetFrameFilterPriority)
1492         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1493
1494 2018-10-06  Tom Tromey  <tom@tromey.com>
1495
1496         PR tui/28819:
1497         * tui/tui-io.c (gdb_wgetch): New function.
1498         (tui_mld_getc, tui_getc): Use it.
1499
1500 2018-10-05  Tom Tromey  <tom@tromey.com>
1501
1502         * sol-thread.c (sol_thread_target::wait): Rename inner
1503         "save_ptid".
1504
1505 2018-10-04  Tom Tromey  <tom@tromey.com>
1506
1507         * configure: Rebuild.
1508         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1509
1510 2018-10-04  Tom Tromey  <tom@tromey.com>
1511
1512         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1513         declaration of "block".
1514
1515 2018-10-04  Tom Tromey  <tom@tromey.com>
1516
1517         * common/filestuff.c (fdwalk): Remove inner declaration of
1518         "result".
1519
1520 2018-10-04  Tom Tromey  <tom@tromey.com>
1521
1522         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1523         "structs_addr" and hoist declaration.
1524
1525 2018-10-04  Tom Tromey  <tom@tromey.com>
1526
1527         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1528         variable "size".
1529
1530 2018-10-04  Tom Tromey  <tom@tromey.com>
1531
1532         * mdebugread.c (parse_partial_symbols): Use std::string.
1533
1534 2018-10-04  Tom Tromey  <tom@tromey.com>
1535
1536         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1537         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1538         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1539         header.
1540         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1541         more inner scope.
1542         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1543         * varobj.c (varobj_update): Rename inner "newobj",
1544         "type_changed".
1545         * valprint.c (generic_emit_char): Rename inner "buf".
1546         * valops.c (find_overload_match): Rename inner "temp".
1547         (value_struct_elt_for_reference): Declare "v" in more inner
1548         scope.
1549         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1550         * unittests/array-view-selftests.c (run_tests): Rename inner
1551         "vec".
1552         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1553         header.
1554         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1555         "tsv" in more inner scope.
1556         (print_one_static_tracepoint_marker): Rename inner
1557         "tuple_emitter".
1558         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1559         (tic6x_push_dummy_call): Don't redeclare "addr".
1560         * target-float.c: Declare "dto" lower.
1561         * symtab.c (lookup_local_symbol): Rename inner "sym".
1562         (find_pc_sect_line): Rename inner "pc".
1563         * stack.c (print_frame): Don't redeclare "gdbarch".
1564         (return_command): Rename inner "gdbarch".
1565         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1566         "sp".
1567         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1568         header.
1569         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1570         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1571         scope.
1572         * remote.c (remote_target::update_thread_list): Don't redeclare
1573         "tp".
1574         (remote_target::process_initial_stop_replies): Rename inner
1575         "thread".
1576         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1577         (remote_target::wait_as): Don't redeclare "stop_reply".
1578         (remote_target::get_thread_local_address): Rename inner
1579         "result".
1580         (remote_target::get_tib_address): Likewise.
1581
1582         * regcache.c (cooked_read_test): Rename "regnum".
1583         * record-btrace.c (cmd_record_btrace_start): Rename inner
1584         "exception".
1585         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1586         loop header.
1587         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1588         header.
1589         (ppu2spu_sniffer): Rename inner "buf".
1590         * parse.c (operator_check_standard): Rename inner "type",
1591         "objfile".
1592         * p-valprint.c (pascal_val_print): Introduce new scope for
1593         "low_bound", "high_bound".
1594         * p-exp.y (yylex): Declare "i" in loop header.
1595         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1596         Lower declaration of "s".
1597         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1598         header.
1599         (nios2_push_dummy_call): Rename "len".
1600         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1601         "buf".
1602         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1603         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1604         (linux_xfer_osdata_modules): Likewise.
1605         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1606         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1607         (mips_o64_push_dummy_call): Likewise.
1608         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1609         "op".
1610         * mi/mi-main.c (list_available_thread_groups): Rename inner
1611         "tuple_emitter".
1612         (mi_cmd_data_read_memory): Rename inner "opts".
1613         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1614         "tuple_emitter".
1615         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1616         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1617         more inner scope.
1618         (parse_partial_symbols): Rename inner "pst", "p", "name"
1619         * main.c (captured_main_1): Rename inner "i"s.
1620         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1621         "oso2".
1622         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1623         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1624         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1625         (handle_signal_stop): Rename inner "gdbarch".
1626         (handle_command): Declare "signum" in loop header.
1627         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1628         "status".
1629         (examine_prologue): Rename inner "sol" and "sof".
1630         (ia64_extract_return_value): Rename inner "val".  Declare another
1631         "val" in a more inner scope.
1632         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1633         inner scope.
1634         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1635         "except".
1636         * findvar.c (default_read_var_value): Don't redeclare "addr".
1637         * f-exp.y (yylex): Declare "i" in loop header.
1638         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1639         Rename inner "type", "expect_type".
1640         (evaluate_subexp_for_sizeof): Rename inner "pc".
1641         * elfread.c (elf_symfile_read): Rename inner "abfd".
1642         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1643         "bytes_read".
1644         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1645         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1646         (dwarf_decode_line_header): Rename inner "lh".
1647         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1648         "offset".  Declare "i" in loop header.
1649         (disassemble_dwarf_expression): Rename inner "addr_size".
1650         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1651         inner "result".
1652         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1653         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1654         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1655         "inner_list_emitter".
1656         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1657         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1658         declaration in a block.
1659         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1660         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1661         "obstack_final_size".
1662         * cp-support.c (inspect_type): Declare "i" in loop header.
1663         * compile/compile.c (compile_instance::insert_symbol_error):
1664         Rename inner "e".
1665         * common/agent.c (agent_run_command): Remove inner "ret"
1666         declaration.
1667         * coffread.c (coff_symfile_read): Rename inner "name".
1668         (coff_symfile_read): Rename inner "abfd".
1669         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1670         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1671         "high".
1672         * c-exp.y (lex_one_token): Move "len" declaration lower.
1673         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1674         "gdbarch".
1675         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1676         "b".
1677         (watch_command_1): Declare "mark" later.
1678         (clear_command): Don't shadow "a" or "b".
1679         (delete_command): Rename inner "b".
1680         (delete_trace_command): Likewise.
1681         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1682         "op".
1683         (arm_gdbarch_init): Remove inner "e_flags".
1684         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1685         "offset" in inner blocks.
1686
1687 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1688
1689         * dwarf-index-write.c (file_write): Don't write if the vector is
1690         empty.
1691
1692 2018-10-05  Tom de Vries  <tdevries@suse.de>
1693
1694         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1695         PyArg_ParseTuple call.
1696
1697 2018-10-05  Tom de Vries  <tdevries@suse.de>
1698
1699         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1700         PyArg_ParseTuple call.
1701
1702 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1703
1704         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1705         to avoid exceeding 80 characters per line limit.
1706
1707 2018-10-04  Tom Tromey  <tom@tromey.com>
1708
1709         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1710         (reread_symbols): Update.
1711         * complaints.h (clear_complaints): Remove argument.
1712         * complaints.c (enum complaint_series): Remove.
1713         (series): Remove global.
1714         (complaint_internal): Update.
1715         (clear_complaints): Remove argument.
1716
1717 2018-10-04  Tom Tromey  <tom@tromey.com>
1718
1719         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1720         debugging symbols" message if there is a separate debug objfile.
1721
1722 2018-10-04  Tom Tromey  <tom@tromey.com>
1723
1724         PR cli/19551:
1725         * symfile.c (symbol_file_add_with_addrs): Update output.
1726         * psymtab.c (require_partial_symbols): Update output.
1727
1728 2018-10-04  Tom Tromey  <tom@tromey.com>
1729
1730         PR cli/22234:
1731         * complaints.c: Emit \n.
1732
1733 2018-10-04  Tom Tromey  <tom@tromey.com>
1734
1735         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1736         (separate_debug_file_exists, find_separate_debug_file)
1737         (add_symbol_file_command, reread_symbols, allocate_symtab)
1738         (allocate_compunit_symtab): Use filtered printing, not
1739         unfiltered.
1740         * psymtab.c (require_partial_symbols, dump_psymtab)
1741         (allocate_psymtab): Use filtered printing, not unfiltered.
1742
1743 2018-10-04  Tom Tromey  <tom@tromey.com>
1744
1745         * complaints.c (complaint_internal): Correctly check complaint
1746         count.
1747
1748 2018-10-04  Tom Tromey  <tom@tromey.com>
1749
1750         * complaints.h (struct complaints): Remove declaration.
1751         * complaints.c (clear_complaints): Remove an unused variable.
1752
1753 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1754
1755         * MAINTAINERS (Write After Approval): Add self.
1756
1757 2018-10-03  Tom Tromey  <tom@tromey.com>
1758
1759         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1760         "buffer_contents".
1761         * coffread.c (coff_symtab_read): Initialize "newobj".
1762
1763 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1764
1765         * dwarf2read.c (read_func_scope): Remove struct keyword in
1766         range-based for.
1767
1768 2018-10-03  Tom Tromey  <tom@tromey.com>
1769
1770         * README: Mention --enable-ubsan.
1771         * NEWS: Mention --enable-ubsan.
1772         * acinclude.m4: Include sanitize.m4.
1773         * configure: Rebuild.
1774         * configure.ac: Call AM_GDB_UBSAN.
1775         * sanitize.m4: New file.
1776
1777 2018-10-03  Tom Tromey  <tom@tromey.com>
1778
1779         * expression.h (enum exp_opcode): Use uint8_t as base type.
1780         * expprint.c (op_name): Handle invalid opcodes.
1781
1782 2018-10-03  Tom Tromey  <tom@tromey.com>
1783
1784         * parse.c (prefixify_expression): Add assert.
1785         (parse_exp_in_context_1): Throw exception if the expression is
1786         empty.
1787
1788 2018-10-03  Tom Tromey  <tom@tromey.com>
1789
1790         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1791
1792 2018-10-03  Tom Tromey  <tom@tromey.com>
1793
1794         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1795
1796 2018-10-03  Tom Tromey  <tom@tromey.com>
1797
1798         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1799         unsigned.
1800
1801 2018-10-03  Tom Tromey  <tom@tromey.com>
1802
1803         * findvar.c (extract_integer): Do work in an unsigned type.
1804
1805 2018-10-03  Tom Tromey  <tom@tromey.com>
1806
1807         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1808         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1809         base type.
1810         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1811         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1812         type.
1813         * c-lang.h (enum c_string_type_values): Use unsigned as base
1814         type.
1815         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1816
1817 2018-10-03  Tom Tromey  <tom@tromey.com>
1818
1819         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1820         <~dwarf2_frame_state_reg_info>: Update.
1821         <dwarf2_frame_state_reg_info>: Update.
1822         <alloc_regs>: Add assertion.  Update.
1823         <reg>: Now a std::vector.
1824         <num_regs>: Remove.
1825         <swap>: Update.
1826         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1827         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1828
1829 2018-10-03  Tom Tromey  <tom@tromey.com>
1830
1831         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1832
1833 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1834
1835         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1836
1837 2018-10-02  Tom Tromey  <tom@tromey.com>
1838
1839         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1840
1841 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
1842
1843         * NEWS: Mention changed commands.
1844         * ser-uds.c: New file.
1845         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1846         * configure: Regenerate.
1847         * Makefile.in: Add new file.
1848         * serial.c (serial_open): Check if filename is a socket
1849         and lookup the appropriate interface accordingly.
1850
1851 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1852
1853         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1854         define.
1855         (AARCH64_EXTRA_MAGIC): Likewise.
1856         (AARCH64_FPSIMD_MAGIC): Likewise.
1857         (AARCH64_SVE_MAGIC): Likewise.
1858         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1859         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1860         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1861         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1862         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1863         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1864         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1865         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1866         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1867         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1868         (read_aarch64_ctx): Add function.
1869         (aarch64_linux_sigframe_init): Detect FP registers.
1870
1871 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1872
1873         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1874         (AARCH64_D0_REGNUM): Likewise.
1875         (AARCH64_S0_REGNUM): Likewise.
1876         (AARCH64_H0_REGNUM): Likewise.
1877         (AARCH64_B0_REGNUM): Likewise.
1878         (AARCH64_SVE_V0_REGNUM): Likewise.
1879         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1880         (AARCH64_D0_REGNUM): Likewise.
1881         (AARCH64_S0_REGNUM): Likewise.
1882         (AARCH64_H0_REGNUM): Likewise.
1883         (AARCH64_B0_REGNUM): Likewise.
1884         (AARCH64_SVE_V0_REGNUM): Likewise.
1885
1886 2018-10-01  Gary Benson <gbenson@redhat.com>
1887
1888         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1889         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1890         prfpregset_t instead of gdb_prfpregset_t.
1891         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1892         * configure, config.in: Rebuild.
1893
1894 2018-10-01  Gary Benson <gbenson@redhat.com>
1895
1896         * common/gdb_proc_service.h: New file, factored out from...
1897         * gdb_proc_service.h: Moved common code to the above file.
1898         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1899
1900 2018-10-01  Gary Benson <gbenson@redhat.com>
1901
1902         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1903         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1904
1905 2018-10-01  Gary Benson <gbenson@redhat.com>
1906
1907         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1908         (AC_CHECK_HEADERS): Check for linux/elf.h.
1909         * configure, config.in: Rebuild.
1910         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1911         doesn't define elf_fpregset_t.
1912
1913 2018-10-01  Gary Benson <gbenson@redhat.com>
1914
1915         * gdb_proc_service.h: Whitespace change.
1916
1917 2018-10-01  Tom Tromey  <tom@tromey.com>
1918
1919         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1920         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1921         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1922
1923 2018-10-01  Tom Tromey  <tom@tromey.com>
1924
1925         * README: Minor change.
1926
1927 2018-09-30  Pedro Alves  <palves@redhat.com>
1928
1929         * darwin-nat-info.c (darwin_debug_regions_recurse)
1930         (info_mach_exceptions_command): Remove unused local variables.
1931         * darwin-nat.c (darwin_decode_notify_message)
1932         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1933         (darwin_stop_inferior, darwin_setup_exceptions)
1934         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1935         (darwin_nat_target::attach, darwin_nat_target::detach)
1936         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1937         local variables.
1938         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1939         variables.
1940
1941 2018-09-29  Tom Tromey  <tom@tromey.com>
1942
1943         * README: Remove some leftover text.
1944
1945 2018-09-29  Tom Tromey  <tom@tromey.com>
1946
1947         * PROBLEMS: Rewrite.
1948         * README: Update.
1949
1950 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1951
1952         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1953         case with explicit breakpoint kind.
1954         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1955         'additional_info' and related logic.
1956         (riscv_debug_breakpoints): New variable.
1957         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1958         instruction to determine the breakpoint kind.
1959         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1960         flag.  Update description of 'set/show riscv
1961         use-compressed-breakpoints' flag.
1962
1963 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1964
1965         (NEWS): Mention changes to frame related commands.
1966         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1967         (add_prefix_cmd_suppress_notification): New function.
1968         (add_com_suppress_notification): Call
1969         add_cmd_suppress_notification.
1970         * command.h (add_cmd_suppress_notification): Declare.
1971         (add_prefix_cmd_suppress_notification): Declare.
1972         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1973         (parse_frame_specification): Moved from stack.c, with
1974         simplification to handle a single argument.
1975         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1976         switch to the selected frame.  Add a header comment.
1977         * stack.c: Remove 'safe-ctype.h' include.
1978         (find_frame_for_function): Add declaration.
1979         (find_frame_for_address): New function.
1980         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1981         (frame_selection_by_function_completer): New function.
1982         (info_frame_command): Rename to...
1983         (info_frame_command_core): ...this, and update parameter types.
1984         (select_frame_command): Rename to...
1985         (select_frame_command_core): ...this, and update parameter types.
1986         (frame_command): Rename to...
1987         (frame_command_core): ...this, and update parameter types.
1988         (class frame_command_helper): New class to wrap implementations of
1989         frame related sub-commands.
1990         (frame_apply_cmd_list): New static global.
1991         (frame_cmd_list): Make static.
1992         (select_frame_cmd_list): New global for sub-commands.
1993         (info_frame_cmd_list): New global for sub-commands.
1994         (_initialize_stack): Register sub-commands for 'frame',
1995         'select-frame', and 'info frame'.  Update 'frame apply' commands
1996         to use frame_apply_cmd_list.  Move function local static
1997         frame_apply_list to file static frame_apply_cmd_list for
1998         consistency.
1999         * stack.h (select_frame_command): Delete declarationn.
2000         (select_frame_for_mi): Declare new function.
2001
2002 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2003
2004         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
2005         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
2006         and NOP.
2007
2008 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
2009
2010         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
2011
2012 2018-09-26  Tom Tromey  <tom@tromey.com>
2013
2014         * valops.c (auto_abandon): Remove dead code.
2015
2016 2018-09-26  Tom Tromey  <tom@tromey.com>
2017
2018         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
2019
2020 2018-09-24  Tom Tromey  <tom@tromey.com>
2021
2022         * common/pathstuff.c (get_standard_cache_dir): Make
2023         "xdg_cache_home" and "home" const.
2024         * top.c (init_history): Make "tmpenv" const.
2025         * main.c (get_init_files): Make "homedir" const.
2026
2027 2018-09-23  Tom Tromey  <tom@tromey.com>
2028
2029         PR python/18852:
2030         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
2031
2032 2018-09-23  Tom Tromey  <tom@tromey.com>
2033
2034         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
2035         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
2036         * python/python-internal.h (gdbpy_handle_exception): Declare.
2037         * python/py-utils.c (gdbpy_handle_exception): New function.
2038
2039 2018-09-23  Tom Tromey  <tom@tromey.com>
2040
2041         PR python/17284:
2042         * python/py-type.c (typy_template_argument): Check for negative
2043         argument number.
2044
2045 2018-09-23  Tom Tromey  <tom@tromey.com>
2046
2047         PR python/14062:
2048         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
2049
2050 2018-09-23  Tom Tromey  <tom@tromey.com>
2051
2052         PR python/18170:
2053         * python/py-value.c (valpy_int): Allow conversion from pointer
2054         type.
2055
2056 2018-09-23  Tom Tromey  <tom@tromey.com>
2057
2058         PR python/20126:
2059         * python/py-value.c (valpy_int): Respect type sign.
2060
2061 2018-09-23  Tom Tromey  <tom@tromey.com>
2062
2063         PR python/18352;
2064         * python/py-value.c (valpy_float): Allow conversions from int or
2065         char.
2066         (valpy_int, valpy_long): Allow conversions from float.
2067
2068 2018-09-23  Tom Tromey  <tom@tromey.com>
2069
2070         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
2071         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
2072
2073 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2074
2075         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
2076         __sighndlr.
2077         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
2078
2079 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
2080
2081         * windows-nat.c (windows_nat_target::wait): Remove a spurious
2082         target_terminal::ours().
2083
2084 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
2085
2086         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
2087         of vl to ULONGEST.
2088
2089 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2090
2091         * breakpoint.c (update_inserted_breakpoint_locations): Remove
2092         redundant condition.
2093
2094 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2095
2096         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
2097
2098         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
2099         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
2100         * sol-thread.c (ps_pdmodel): Don't guard definition.
2101
2102         * procfs.c: Fix formatting.
2103
2104         * procfs.c (sysset_t_alloc): Remove.
2105         (create_procinfo): Use XNEW instead of sysset_t_alloc.
2106         (procfs_debug_inferior): Likewise.
2107         (procfs_set_exec_trap): Likewise.
2108         (proc_set_traced_sysentry): Don't allocate argp dynamically.
2109         (proc_set_traced_sysexit): Likewise.
2110
2111         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
2112         (dead_procinfo): Likewise.
2113         (proc_warn): Likewise.
2114         (proc_error): Likewise.
2115         (proc_get_LDT_entry): Likewise.
2116         (do_attach): Likewise.
2117         (procfs_target::pid_to_str): Likewise.
2118         (iterate_over_mappings): Likewise.
2119
2120         * procfs.c (create_procinfo): Fix ARI warning.
2121         (proc_get_status): Likewise.
2122         (proc_stop_process): Likewise.
2123         (proc_run_process): Likewise.
2124         (proc_kill): Likewise.
2125         (proc_get_LDT_entry): Likewise.
2126         (procfs_find_LDT_entry): Likewise.
2127         (proc_update_threads): Likewise.
2128         (proc_iterate_over_threads): Likewise.
2129         (do_attach): Likewise.
2130         (procfs_xfer_memory): Likewise.
2131         (invalidate_cache): Likewise.
2132         (procfs_target::resume): Likewise.
2133         (procfs_init_inferior): Likewise.
2134         (procfs_set_exec_trap): Likewise.
2135         (procfs_target::thread_alive): Likewise.
2136         (procfs_target::pid_to_exec_file): Likewise.
2137         (iterate_over_mappings): Likewise.
2138         (procfs_target::make_corefile_notes): Likewise.
2139         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
2140
2141         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
2142         (procfs_find_LDT_entry): Likewise.
2143         * sol-thread.c (ps_lgetLDT): Likewise.
2144
2145 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2146
2147         PR tdep/17903
2148         * procfs.c (procfs_target): Declare pid_to_exec_file.
2149         (procfs_target::pid_to_exec_file): New.
2150
2151 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2152
2153         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
2154         renaming.
2155         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
2156         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
2157
2158 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2159
2160         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
2161         (supply_fpregset, fill_fpregset): Move ...
2162         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
2163         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
2164         Remove references to ioctl-based procfs.
2165         Include <sys/reg.h>.
2166         Remove PR_MODEL_NATIVE guards.
2167         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
2168         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
2169
2170 2018-09-19  Xavier Roirand  <roirand@adacore.com>
2171
2172         PR gdb/20981:
2173         * solib-darwin.c (darwin_get_dyld_bfd): New function.
2174         (darwin_solib_get_all_image_info_addr_at_init): Update call.
2175         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
2176
2177 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
2178
2179         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
2180         (fbsd_print_sockaddr_in6): Likewise.
2181
2182 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
2183             Chris January  <chris.january@arm.com>
2184
2185         * eval.c (skip_undetermined_arglist): Skip argument list helper.
2186         (evaluate_subexp_standard): Return a dummy type when
2187         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
2188         OP_F77_UNDETERMINED_ARGLIST case.
2189         * expression.h (enum noside): Update comment.
2190
2191 2018-09-19  George Vasick <george.vasick@oracle.com>
2192
2193         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
2194
2195 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
2196             April Chin <april.chin@oracle.com>
2197             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2198
2199         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
2200         uint_t lwpid_t.
2201         (create_procinfo): Print pids in /proc without leading zeros.
2202
2203 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2204
2205         * nios2-tdep.c (nios2_gcc_target_options): New.
2206         (nios2_gdb_arch_init): Install new hook.
2207
2208 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2209
2210         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2211         New file.
2212         * update-gnulib.sh: Apply patch.
2213         * configure: Re-generate.
2214
2215 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2216
2217         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2218         description.  Make "info proc" command descriptions more
2219         consistent.
2220
2221 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2222
2223         * NEWS: Mention 'info proc files' command.
2224
2225 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2226
2227         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2228         descriptors for IP_FILES and IP_ALL.
2229
2230 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2231
2232         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2233         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2234         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2235         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2236         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2237         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2238         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2239         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2240         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2241         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2242         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2243         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2244         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2245         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2246         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2247         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2248         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2249         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2250         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2251         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2252         (struct fbsd_sockaddr_un): New types.
2253         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2254         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2255         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2256         (fbsd_core_info_proc_files): New functions.
2257         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2258         IP_ALL.
2259         * fbsd-tdep.h (fbsd_info_proc_files_header)
2260         (fbsd_info_proc_files_entry): New.
2261
2262 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2263
2264         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2265         * infcmd.c (info_proc_cmd_files): New function.
2266         (_initialize_infcmd): Register 'info proc files' command.
2267
2268 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2269
2270         * gnulib/aclocal-m4-deps.mk: Re-generate.
2271         * gnulib/aclocal.m4: Re-generate.
2272         * gnulib/config.in: Re-generate.
2273         * gnulib/configure: Re-generate.
2274         * gnulib/import/Makefile.am: Re-generate.
2275         * gnulib/import/Makefile.in: Re-generate.
2276         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2277         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2278         * gnulib/import/arpa_inet.in.h: New file.
2279         * gnulib/import/inet_ntop.c: New file.
2280         * gnulib/import/m4/arpa_inet_h.m4: New file.
2281         * gnulib/import/m4/inet_ntop.m4: New file.
2282         * gnulib/import/m4/netinet_in_h.m4: New file.
2283         * gnulib/import/m4/socklen.m4: New file.
2284         * gnulib/import/m4/sockpfaf.m4: New file.
2285         * gnulib/import/m4/stdalign.m4: New file.
2286         * gnulib/import/m4/sys_uio_h.m4: New file.
2287         * gnulib/import/netinet_in.in.h: New file.
2288         * gnulib/import/stdalign.in.h: New file.
2289         * gnulib/import/sys_socket.c: New file.
2290         * gnulib/import/sys_socket.in.h: New file.
2291         * gnulib/import/sys_uio.in.h: New file.
2292         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2293         module.
2294
2295 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2296
2297         * gnulib/aclocal-m4-deps.mk: New file.
2298         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2299         deterministically.
2300
2301 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2302
2303         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2304         KVE_PATH.
2305
2306 2018-09-18  Tom Tromey  <tom@tromey.com>
2307
2308         * compile/compile-object-load.c (struct
2309         link_hash_table_cleanup_data): Add constructor and destructor.
2310         Use DISABLE_COPY_AND_ASSIGN.
2311         (~link_hash_table_cleanup_data): Rename from
2312         link_hash_table_free.  Now a destructor.
2313         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2314
2315 2018-09-18  Tom Tromey  <tom@tromey.com>
2316
2317         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2318         * compile/compile-object-load.c (struct munmap_list): Move to
2319         header file.
2320         (munmap_list::add): Rename from munmap_list_add; rewrite.
2321         (munmap_list::~munmap_list): Rename from munmap_list_free.
2322         (munmap_listp_free_cleanup): Remove.
2323         (compile_object_load): Update.
2324         * compile/compile-object-load.h (struct munmap_list): Move from
2325         compile-object-load.c.  Rewrite.
2326
2327 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2328
2329         * aarch64-tdep.c (pass_in_v): Use register size.
2330         (aarch64_extract_return_value): Likewise.
2331         (aarch64_store_return_value): Likewise.
2332
2333 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2334
2335         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2336         rlim_t.
2337
2338 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2339
2340         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2341         Fix short help line.
2342
2343 2018-09-17  Tom Tromey  <tom@tromey.com>
2344
2345         PR python/20445:
2346         * configure: Rebuild.
2347         * configure.ac: Conditionally use -DNDEBUG for Python.
2348
2349 2018-09-17  Tom Tromey  <tom@tromey.com>
2350
2351         * configure: Rebuild.
2352         * configure.ac: Use gmp as a library dependency when checking for
2353         mpfr.
2354
2355 2018-09-17  Pedro Alves  <palves@redhat.com>
2356
2357         * python/py-inferior.c (find_inferior_object): Delete.
2358
2359 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2360
2361         * compile/compile-cplus-types.c
2362         (compile_cplus_instance::enter_scope): Don't use new_scope after
2363         std::move.
2364
2365 2018-09-17  Tom Tromey  <tom@tromey.com>
2366
2367         * common/pathstuff.c (get_standard_cache_dir): Use
2368         ~/Library/Caches on macOS.
2369         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2370
2371 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2372
2373         PR python/23669
2374         * breakpoint.c (commands_cmd_element): New.
2375         (_initialize_breakpoint): Assign commands_cmd_element.
2376         * breakpoint.h (commands_cmd_element): New.
2377         * cli/cli-script.c (while_cmd_element, if_command,
2378         define_cmd_element): New.
2379         (command_name_equals): Remove.
2380         (process_next_line): Compare commands by pointer, not by name.
2381         (_initialize_cli_script): Assign the various cmd_list_element
2382         variables.
2383         * compile/compile.c (compile_cmd_element): New.
2384         (_initialize_compile): Assign compile_cmd_element.
2385         * compile/compile.h (compile_cmd_element): New.
2386         * guile/guile.c (guile_cmd_element): New.
2387         (install_gdb_commands): Assign guile_cmd_element.
2388         * guile/guile.h (guile_cmd_element): New.
2389         * python/python.c (python_cmd_element): New.
2390         (_initialize_python): Assign python_cmd_element.
2391         * python/python.h (python_cmd_element): New.
2392         * tracepoint.c (while_stepping_cmd_element): New.
2393         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2394         * tracepoint.h (while_stepping_cmd_element): New.
2395
2396 2018-09-17  Tom Tromey  <tom@tromey.com>
2397
2398         * infrun.c (save_infcall_suspend_state): Return
2399         infcall_suspend_state_up.
2400         (save_infcall_control_state): Return infcall_control_state_up.
2401         * inferior.h (save_infcall_suspend_state)
2402         (save_infcall_control_state): Declare later.  Return unique
2403         pointers.
2404
2405 2018-09-17  Tom Tromey  <tom@tromey.com>
2406
2407         * infrun.c (struct stop_context): Declare constructor,
2408         destructor, "changed" method.
2409         (stop_context::stop_context): Rename from save_stop_context.
2410         (stop_context::~stop_context): Rename from
2411         release_stop_context_cleanup.
2412         (normal_stop): Update.
2413         (stop_context::changed): Rename from stop_context_changed.  Return
2414         bool.
2415
2416 2018-09-17  Tom Tromey  <tom@tromey.com>
2417
2418         * inferior.h (struct infcall_suspend_state_deleter): New.
2419         (infcall_suspend_state_up): New typedef.
2420         (struct infcall_control_state_deleter): New.
2421         (infcall_control_state_up): New typedef.
2422         (make_cleanup_restore_infcall_suspend_state)
2423         (make_cleanup_restore_infcall_control_state): Don't declare.
2424         * infcall.c (call_function_by_hand_dummy): Update.
2425         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2426         (make_cleanup_restore_infcall_suspend_state): Remove.
2427         (do_restore_infcall_control_state_cleanup)
2428         (make_cleanup_restore_infcall_control_state): Remove.
2429
2430 2018-09-17  Tom Tromey  <tom@tromey.com>
2431
2432         * gdbthread.h (struct thread_control_state): Add initializer.
2433         (class thread_info) <control>: Remove initializer.
2434         * inferior.h (struct inferior_control_state): Add initializer.
2435         (class inferior) <control>: Remove initializer.
2436         (exit_inferior_1): Update.
2437         * infrun.c (struct infcall_control_state): Add constructors.
2438         (save_infcall_control_state): Use new.
2439         (restore_infcall_control_state, discard_infcall_control_state):
2440         Use delete.
2441
2442 2018-09-17  Tom Tromey  <tom@tromey.com>
2443
2444         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2445         unique_ptr.
2446         <siginfo_data>: Now a unique_xmalloc_ptr.
2447         (save_infcall_suspend_state, restore_infcall_suspend_state)
2448         (discard_infcall_suspend_state)
2449         (get_infcall_suspend_state_regcache): Update.
2450
2451 2018-09-17  Tom Tromey  <tom@tromey.com>
2452
2453         * gdbthread.h (struct thread_suspend_state): Add initializers.
2454         (class thread_info) <suspend>: Remove initializer.
2455         * infrun.c (struct infcall_suspend_state): Add initializers.
2456         (save_infcall_suspend_state): Use new.
2457         (discard_infcall_suspend_state): Use delete.
2458
2459 2018-09-16  Tom Tromey  <tom@tromey.com>
2460
2461         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2462         Remove.
2463         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2464         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2465         (py_varobj_iter_new): Likewise.
2466         (py_varobj_get_iterator): Use gdbpy_ref.
2467
2468 2018-09-16  Tom Tromey  <tom@tromey.com>
2469
2470         * python/py-threadevent.c (py_get_event_thread): Simplify.
2471         * python/py-inferior.c (infpy_thread_from_thread_handle):
2472         Return immediately after calling thread_to_thread_object.  Use
2473         Py_RETURN_NONE.
2474         (thread_to_thread_object): Set the exception on a NULL return.
2475
2476 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2477
2478         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2479
2480 2018-09-16  Tom Tromey  <tom@tromey.com>
2481
2482         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2483         Remove.
2484
2485 2018-09-16  Tom Tromey  <tom@tromey.com>
2486
2487         * python/python-internal.h (thread_to_thread_object): Change
2488         return type.
2489         * python/py-inferior.c (thread_to_thread_object): Return a new
2490         reference.
2491         (infpy_thread_from_thread_handle): Update.
2492         * python/py-infthread.c (gdbpy_selected_thread): Update.
2493         * python/py-stopevent.c (create_stop_event_object): Update.
2494         * python/py-threadevent.c (py_get_event_thread): Return a new
2495         reference.
2496         (py_get_event_thread): Update.
2497         * python/py-event.h (py_get_event_thread): Change return type.
2498         * python/py-continueevent.c (create_continue_event_object):
2499         Update.
2500
2501 2018-09-16  Tom Tromey  <tom@tromey.com>
2502
2503         * python/py-progspace.c (pspy_get_objfiles): Update.
2504         * python/python-internal.h (objfile_to_objfile_object): Change
2505         return type.
2506         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2507         Update.
2508         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2509         Update.
2510         * python/python.c (gdbpy_get_current_objfile): Update.
2511         (gdbpy_objfiles): Update.
2512         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2513         Update.
2514         (objfile_to_objfile_object): Return a new reference.
2515         * python/py-symtab.c (stpy_get_objfile): Update.
2516         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2517         Update.
2518
2519 2018-09-16  Tom Tromey  <tom@tromey.com>
2520
2521         * python/py-inferior.c (infpy_get_progspace): Update.
2522         * python/python-internal.h (pspace_to_pspace_object): Change
2523         return type.
2524         * python/py-newobjfileevent.c
2525         (create_clear_objfiles_event_object): Update.
2526         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2527         Update.
2528         * python/python.c (gdbpy_get_current_progspace): Update.
2529         (gdbpy_progspaces): Update.
2530         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2531         reference.
2532         * python/py-objfile.c (objfpy_get_progspace): Update.
2533         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2534         Update.
2535
2536 2018-09-16  Tom Tromey  <tom@tromey.com>
2537
2538         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2539         (solib_name, block_for_pc, find_pc_line): New functions.
2540         (execute_unwinders): Update.
2541         * python/py-block.c (gdbpy_block_for_pc): Remove.
2542         * python/py-inferior.c (infpy_get_progspace): New function.
2543         (inferior_object_getset) <progspace>: Add.
2544         * python/py-progspace.c (pspy_objfiles): Rewrite.
2545         (pspy_solib_name, pspy_block_for_pc)
2546         (pspy_find_pc_line, pspy_is_valid): New functions.
2547         (progspace_object_methods): Add entries for solib_name,
2548         block_for_pc, find_pc_line, is_valid.
2549         * python/python-internal.h (gdbpy_block_for_pc)
2550         (build_objfiles_list): Don't declare.
2551         * python/python.c: Don't include solib.h.
2552         (gdbpy_solib_name, gdbpy_find_pc_line)
2553         (gdbpy_get_current_progspace, build_objfiles_list)
2554         (gdbpy_objfiles): Remove.
2555         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2556         solib_name, find_pc_line>: Remove entries.
2557
2558 2018-09-16  Tom Tromey  <tom@tromey.com>
2559
2560         * top.c (new_ui_command): Use GNU style for metasyntactic
2561         variables.
2562         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2563         variables.
2564         * maint.c (maintenance_translate_address): Remove "<>" around
2565         text.
2566         * interps.c (interpreter_exec_cmd): Use GNU style for
2567         metasyntactic variables.
2568         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2569         metasyntactic variables.
2570         * tracepoint.c (tfind_range_command): Use GNU style for
2571         metasyntactic variables.
2572         (tfind_outside_command): Likewise.
2573         (_initialize_tracepoint): Likewise.
2574         * remote.c (extended_remote_target::create_inferior): Use GNU
2575         style for metasyntactic variables.
2576         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2577         metasyntactic variables.
2578         (adi_assign_command): Likewise.
2579
2580 2018-09-16  Tom Tromey  <tom@tromey.com>
2581
2582         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2583         metasyntactic variables.  Print message if no disassembler options
2584         are available.
2585
2586 2018-09-15  Tom Tromey  <tom@tromey.com>
2587
2588         * infcmd.c (get_inferior_args): Return const char *.
2589         * inferior.h (get_inferior_args): Return type now const.
2590         * linux-tdep.c (linux_fill_prpsinfo): Update.
2591         * procfs.c (procfs_target::make_corefile_notes): Update.
2592
2593 2018-09-07  Tom Tromey  <tom@tromey.com>
2594
2595         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2596         inside the TRY.
2597
2598 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2599
2600         * nios2-tdep.c (nios2_type_align): New.
2601         (nios2_gdb_arch_init): Install type_align hook.
2602
2603 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2604
2605         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2606         type that is neither object file owned, nor gdbarch owned.
2607         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2608         gdbarch is non-NULL.
2609         (alloc_type_instance): Allocate non-objfile owned types on the
2610         gdbarch obstack.
2611         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2612         using TYPE_ALLOC to ensure memory is allocated on the correct
2613         obstack.
2614         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2615         obstack, or the gdbarch obstack.
2616         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2617
2618 2018-09-14  Tom Tromey  <tom@tromey.com>
2619
2620         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2621         block.
2622
2623 2018-09-14  Tom Tromey  <tom@tromey.com>
2624
2625         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2626
2627 2018-09-13  Tom Tromey  <tom@tromey.com>
2628
2629         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2630         static.
2631
2632 2018-09-13  Tom Tromey  <tom@tromey.com>
2633
2634         * exec.c (try_open_exec_file): Use std::string.
2635
2636 2018-09-13  Tom Tromey  <tom@tromey.com>
2637
2638         * utils.h (gdb_bfd_errmsg): Return std::string.
2639         * exec.c (exec_file_attach): Update.
2640         * compile/compile-object-load.c (compile_object_load): Update.
2641         * utils.c (gdb_bfd_errmsg): Return std::string.
2642
2643 2018-09-13  Tom Tromey  <tom@tromey.com>
2644
2645         * procfs.c (struct procinfo_deleter): New.
2646         (procinfo_up): New typedef.
2647         (do_destroy_procinfo_cleanup): Remove.
2648         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2649
2650 2018-09-13  Tom Tromey  <tom@tromey.com>
2651
2652         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2653
2654 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2655 2018-09-13  Tom Tromey  <tom@tromey.com>
2656
2657         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2658         (pspy_get_objfiles): New function.
2659         (progspace_object_methods): New.
2660         (pspace_object_type): Add tp_methods callback.
2661         * python/python-internal.h (build_objfiles_list): New
2662         declaration.
2663         * python/python.c (build_objfiles_list): New function.
2664         (gdbpy_objfiles): Implement using build_objfiles_list.
2665         * NEWS: Mention the Progspace.objfiles method.
2666
2667 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2668
2669         * python/py-inferior.c (infpy_get_progspace): New function.
2670         (inferior_object_getset): Add progspace property.
2671         * NEWS: Mention the new property.
2672
2673 2018-09-13  Tom Tromey  <tom@tromey.com>
2674
2675         PR rust/23650:
2676         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2677
2678 2018-09-13  Tom Tromey  <tom@tromey.com>
2679
2680         PR rust/23626:
2681         * rust-lang.c (rust_enum_variant): Now static.
2682         (rust_empty_enum_p): New function.
2683         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2684         Handle empty enum.
2685
2686 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2687
2688         * python/py-inferior.c (infpy_repr): New.
2689         (inferior_object_type): Register infpy_repr.
2690         * python/py-objfile.c (objfpy_repr): New.
2691         (objfile_object_type): Register objfpy_repr.
2692
2693 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2694
2695         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2696
2697 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2698
2699         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2700         typo.
2701
2702 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2703
2704         * common/common-utils.c: Don't include '<sys/stat.h>'.
2705         (is_regular_file): Move to...
2706         * common/filestuff.c (is_regular_file): ... here.
2707         * common/common-utils.h (is_regular_file): Move to...
2708         * common/filestuff.h (is_regular_file): ... here.
2709
2710 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2711
2712         * skip.c (debug_skip): New variable.
2713         (skiplist_entry::do_skip_file_p): Add debug output.
2714         (skiplist_entry::do_skip_gfile_p): Likewise.
2715         (skiplist_entry::skip_function_p): Likewise.
2716         (_initialize_step_skip): Create debug command.
2717         * NEWS: Mention set/show debug skip.
2718
2719 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2720
2721         * darwin-nat.c (should_disable_startup_with_shell):
2722         New function.
2723         (darwin_nat_target::create_inferior): Add call.
2724
2725 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2726
2727         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2728         inf_port, msg_state>: Initialize.
2729         (struct darwin_thread_info) <signaled, single_step>: Change
2730         type and initialize.
2731         (struct darwin_thread_info) <event>: Initialize.
2732
2733 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2734
2735         PR gdb/23555
2736         PR gdb/23558
2737         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2738         guesses.
2739
2740 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2741
2742         Revert:
2743         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2744
2745         PR gdb/23555
2746         PR gdb/23558
2747         * gnulib/aclocal.m4: Regenerate.
2748         * gnulib/config.in: Regenerate.
2749         * gnulib/configure: Regenerate.
2750         * gnulib/import/Makefile.am: Update.
2751         * gnulib/import/Makefile.in: Update.
2752         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2753         * gnulib/import/_Noreturn.h: ... this.
2754         * gnulib/import/alloca.in.h: Update.
2755         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2756         * gnulib/import/arg-nonnull.h: ... this.
2757         * gnulib/import/assure.h: Update.
2758         * gnulib/import/at-func.c: Update.
2759         * gnulib/import/basename-lgpl.c: Update.
2760         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2761         * gnulib/import/c++defs.h: ... this.
2762         * gnulib/import/canonicalize-lgpl.c: Update.
2763         * gnulib/import/cdefs.h: Update.
2764         * gnulib/import/chdir-long.c: Update.
2765         * gnulib/import/chdir-long.h: Update.
2766         * gnulib/import/cloexec.c: Update.
2767         * gnulib/import/cloexec.h: Update.
2768         * gnulib/import/close.c: Update.
2769         * gnulib/import/closedir.c: Update.
2770         * gnulib/import/config.charset: Update.
2771         * gnulib/import/dirent-private.h: Update.
2772         * gnulib/import/dirent.in.h: Update.
2773         * gnulib/import/dirfd.c: Update.
2774         * gnulib/import/dirname-lgpl.c: Update.
2775         * gnulib/import/dirname.h: Update.
2776         * gnulib/import/dosname.h: Update.
2777         * gnulib/import/dup-safer-flag.c: Update.
2778         * gnulib/import/dup-safer.c: Update.
2779         * gnulib/import/dup.c: Update.
2780         * gnulib/import/dup2.c: Update.
2781         * gnulib/import/errno.in.h: Update.
2782         * gnulib/import/error.c: Update.
2783         * gnulib/import/error.h: Update.
2784         * gnulib/import/exitfail.c: Update.
2785         * gnulib/import/exitfail.h: Update.
2786         * gnulib/import/extra/update-copyright: Update.
2787         * gnulib/import/fchdir.c: Update.
2788         * gnulib/import/fcntl.c: Update.
2789         * gnulib/import/fcntl.in.h: Update.
2790         * gnulib/import/fd-hook.c: Update.
2791         * gnulib/import/fd-hook.h: Update.
2792         * gnulib/import/fd-safer-flag.c: Update.
2793         * gnulib/import/fd-safer.c: Update.
2794         * gnulib/import/fdopendir.c: Update.
2795         * gnulib/import/filename.h: Update.
2796         * gnulib/import/filenamecat-lgpl.c: Update.
2797         * gnulib/import/filenamecat.h: Update.
2798         * gnulib/import/flexmember.h: Update.
2799         * gnulib/import/float+.h: Update.
2800         * gnulib/import/float.c: Update.
2801         * gnulib/import/float.in.h: Update.
2802         * gnulib/import/fnmatch.c: Update.
2803         * gnulib/import/fnmatch.in.h: Update.
2804         * gnulib/import/fnmatch_loop.c: Update.
2805         * gnulib/import/fpucw.h: Update.
2806         * gnulib/import/frexp.c: Update.
2807         * gnulib/import/frexpl.c: Update.
2808         * gnulib/import/fstat.c: Update.
2809         * gnulib/import/fstatat.c: Update.
2810         * gnulib/import/getcwd-lgpl.c: Update.
2811         * gnulib/import/getcwd.c: Update.
2812         * gnulib/import/getdtablesize.c: Update.
2813         * gnulib/import/getlogin_r.c: Update.
2814         * gnulib/import/getprogname.c: Update.
2815         * gnulib/import/getprogname.h: Update.
2816         * gnulib/import/gettext.h: Update.
2817         * gnulib/import/gettimeofday.c: Update.
2818         * gnulib/import/glob-libc.h: Update.
2819         * gnulib/import/glob.c: Update.
2820         * gnulib/import/glob.in.h: Update.
2821         * gnulib/import/glob_internal.h: Update.
2822         * gnulib/import/glob_pattern_p.c: Update.
2823         * gnulib/import/globfree.c: Update.
2824         * gnulib/import/hard-locale.c: Update.
2825         * gnulib/import/hard-locale.h: Update.
2826         * gnulib/import/intprops.h: Update.
2827         * gnulib/import/inttypes.in.h: Update.
2828         * gnulib/import/isnan.c: Update.
2829         * gnulib/import/isnand-nolibm.h: Update.
2830         * gnulib/import/isnand.c: Update.
2831         * gnulib/import/isnanl-nolibm.h: Update.
2832         * gnulib/import/isnanl.c: Update.
2833         * gnulib/import/itold.c: Update.
2834         * gnulib/import/libc-config.h: Update.
2835         * gnulib/import/limits.in.h: Update.
2836         * gnulib/import/localcharset.c: Update.
2837         * gnulib/import/localcharset.h: Update.
2838         * gnulib/import/localtime-buffer.c: Update.
2839         * gnulib/import/localtime-buffer.h: Update.
2840         * gnulib/import/lstat.c: Update.
2841         * gnulib/import/m4/00gnulib.m4: Update.
2842         * gnulib/import/m4/__inline.m4: Update.
2843         * gnulib/import/m4/absolute-header.m4: Update.
2844         * gnulib/import/m4/alloca.m4: Update.
2845         * gnulib/import/m4/builtin-expect.m4: Update.
2846         * gnulib/import/m4/canonicalize.m4: Update.
2847         * gnulib/import/m4/chdir-long.m4: Update.
2848         * gnulib/import/m4/close.m4: Update.
2849         * gnulib/import/m4/closedir.m4: Update.
2850         * gnulib/import/m4/configmake.m4: Update.
2851         * gnulib/import/m4/d-ino.m4: Update.
2852         * gnulib/import/m4/d-type.m4: Update.
2853         * gnulib/import/m4/dirent_h.m4: Update.
2854         * gnulib/import/m4/dirfd.m4: Update.
2855         * gnulib/import/m4/dirname.m4: Update.
2856         * gnulib/import/m4/double-slash-root.m4: Update.
2857         * gnulib/import/m4/dup.m4: Update.
2858         * gnulib/import/m4/dup2.m4: Update.
2859         * gnulib/import/m4/eealloc.m4: Update.
2860         * gnulib/import/m4/environ.m4: Update.
2861         * gnulib/import/m4/errno_h.m4: Update.
2862         * gnulib/import/m4/error.m4: Update.
2863         * gnulib/import/m4/exponentd.m4: Update.
2864         * gnulib/import/m4/exponentl.m4: Update.
2865         * gnulib/import/m4/extensions.m4: Update.
2866         * gnulib/import/m4/extern-inline.m4: Update.
2867         * gnulib/import/m4/fchdir.m4: Update.
2868         * gnulib/import/m4/fcntl-o.m4: Update.
2869         * gnulib/import/m4/fcntl.m4: Update.
2870         * gnulib/import/m4/fcntl_h.m4: Update.
2871         * gnulib/import/m4/fdopendir.m4: Update.
2872         * gnulib/import/m4/filenamecat.m4: Update.
2873         * gnulib/import/m4/flexmember.m4: Update.
2874         * gnulib/import/m4/float_h.m4: Update.
2875         * gnulib/import/m4/fnmatch.m4: Update.
2876         * gnulib/import/m4/fnmatch_h.m4: Update.
2877         * gnulib/import/m4/fpieee.m4: Update.
2878         * gnulib/import/m4/frexp.m4: Update.
2879         * gnulib/import/m4/frexpl.m4: Update.
2880         * gnulib/import/m4/fstat.m4: Update.
2881         * gnulib/import/m4/fstatat.m4: Update.
2882         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2883         * gnulib/import/m4/getcwd-path-max.m4: Update.
2884         * gnulib/import/m4/getcwd.m4: Update.
2885         * gnulib/import/m4/getdtablesize.m4: Update.
2886         * gnulib/import/m4/getlogin.m4: Update.
2887         * gnulib/import/m4/getlogin_r.m4: Update.
2888         * gnulib/import/m4/getpagesize.m4: Update.
2889         * gnulib/import/m4/getprogname.m4: Update.
2890         * gnulib/import/m4/gettimeofday.m4: Update.
2891         * gnulib/import/m4/glibc21.m4: Update.
2892         * gnulib/import/m4/glob.m4: Update.
2893         * gnulib/import/m4/glob_h.m4: Update.
2894         * gnulib/import/m4/gnulib-cache.m4: Update.
2895         * gnulib/import/m4/gnulib-common.m4: Update.
2896         * gnulib/import/m4/gnulib-comp.m4: Update.
2897         * gnulib/import/m4/gnulib-tool.m4: Update.
2898         * gnulib/import/m4/hard-locale.m4: Update.
2899         * gnulib/import/m4/include_next.m4: Update.
2900         * gnulib/import/m4/inttypes-pri.m4: Update.
2901         * gnulib/import/m4/inttypes.m4: Update.
2902         * gnulib/import/m4/isnand.m4: Update.
2903         * gnulib/import/m4/isnanl.m4: Update.
2904         * gnulib/import/m4/largefile.m4: Update.
2905         * gnulib/import/m4/limits-h.m4: Update.
2906         * gnulib/import/m4/localcharset.m4: Update.
2907         * gnulib/import/m4/locale-fr.m4: Update.
2908         * gnulib/import/m4/locale-ja.m4: Update.
2909         * gnulib/import/m4/locale-zh.m4: Update.
2910         * gnulib/import/m4/localtime-buffer.m4: Update.
2911         * gnulib/import/m4/longlong.m4: Update.
2912         * gnulib/import/m4/lstat.m4: Update.
2913         * gnulib/import/m4/malloc.m4: Update.
2914         * gnulib/import/m4/malloca.m4: Update.
2915         * gnulib/import/m4/math_h.m4: Update.
2916         * gnulib/import/m4/mbrtowc.m4: Update.
2917         * gnulib/import/m4/mbsinit.m4: Update.
2918         * gnulib/import/m4/mbsrtowcs.m4: Update.
2919         * gnulib/import/m4/mbstate_t.m4: Update.
2920         * gnulib/import/m4/memchr.m4: Update.
2921         * gnulib/import/m4/memmem.m4: Update.
2922         * gnulib/import/m4/mempcpy.m4: Update.
2923         * gnulib/import/m4/memrchr.m4: Update.
2924         * gnulib/import/m4/mkdir.m4: Update.
2925         * gnulib/import/m4/mkstemp.m4: Update.
2926         * gnulib/import/m4/mmap-anon.m4: Update.
2927         * gnulib/import/m4/mode_t.m4: Update.
2928         * gnulib/import/m4/msvc-inval.m4: Update.
2929         * gnulib/import/m4/msvc-nothrow.m4: Update.
2930         * gnulib/import/m4/multiarch.m4: Update.
2931         * gnulib/import/m4/nocrash.m4: Update.
2932         * gnulib/import/m4/off_t.m4: Update.
2933         * gnulib/import/m4/onceonly.m4: Update.
2934         * gnulib/import/m4/open-cloexec.m4: Update.
2935         * gnulib/import/m4/open.m4: Update.
2936         * gnulib/import/m4/openat.m4: Update.
2937         * gnulib/import/m4/opendir.m4: Update.
2938         * gnulib/import/m4/pathmax.m4: Update.
2939         * gnulib/import/m4/rawmemchr.m4: Update.
2940         * gnulib/import/m4/readdir.m4: Update.
2941         * gnulib/import/m4/readlink.m4: Update.
2942         * gnulib/import/m4/realloc.m4: Update.
2943         * gnulib/import/m4/rename.m4: Update.
2944         * gnulib/import/m4/rewinddir.m4: Update.
2945         * gnulib/import/m4/rmdir.m4: Update.
2946         * gnulib/import/m4/save-cwd.m4: Update.
2947         * gnulib/import/m4/secure_getenv.m4: Update.
2948         * gnulib/import/m4/setenv.m4: Update.
2949         * gnulib/import/m4/signal_h.m4: Update.
2950         * gnulib/import/m4/ssize_t.m4: Update.
2951         * gnulib/import/m4/stat-time.m4: Update.
2952         * gnulib/import/m4/stat.m4: Update.
2953         * gnulib/import/m4/std-gnu11.m4: Update.
2954         * gnulib/import/m4/stdbool.m4: Update.
2955         * gnulib/import/m4/stddef_h.m4: Update.
2956         * gnulib/import/m4/stdint.m4: Update.
2957         * gnulib/import/m4/stdio_h.m4: Update.
2958         * gnulib/import/m4/stdlib_h.m4: Update.
2959         * gnulib/import/m4/strchrnul.m4: Update.
2960         * gnulib/import/m4/strdup.m4: Update.
2961         * gnulib/import/m4/strerror.m4: Update.
2962         * gnulib/import/m4/string_h.m4: Update.
2963         * gnulib/import/m4/strstr.m4: Update.
2964         * gnulib/import/m4/strtok_r.m4: Update.
2965         * gnulib/import/m4/sys_socket_h.m4: Update.
2966         * gnulib/import/m4/sys_stat_h.m4: Update.
2967         * gnulib/import/m4/sys_time_h.m4: Update.
2968         * gnulib/import/m4/sys_types_h.m4: Update.
2969         * gnulib/import/m4/tempname.m4: Update.
2970         * gnulib/import/m4/time_h.m4: Update.
2971         * gnulib/import/m4/unistd-safer.m4: Update.
2972         * gnulib/import/m4/unistd_h.m4: Update.
2973         * gnulib/import/m4/warn-on-use.m4: Update.
2974         * gnulib/import/m4/wchar_h.m4: Update.
2975         * gnulib/import/m4/wchar_t.m4: Update.
2976         * gnulib/import/m4/wctype_h.m4: Update.
2977         * gnulib/import/m4/wint_t.m4: Update.
2978         * gnulib/import/malloc.c: Update.
2979         * gnulib/import/malloc/scratch_buffer.h: Update.
2980         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2981         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2982         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2983         * gnulib/import/malloca.c: Update.
2984         * gnulib/import/malloca.h: Update.
2985         * gnulib/import/malloca.valgrind: Update.
2986         * gnulib/import/math.in.h: Update.
2987         * gnulib/import/mbrtowc.c: Update.
2988         * gnulib/import/mbsinit.c: Update.
2989         * gnulib/import/mbsrtowcs-impl.h: Update.
2990         * gnulib/import/mbsrtowcs-state.c: Update.
2991         * gnulib/import/mbsrtowcs.c: Update.
2992         * gnulib/import/memchr.c: Update.
2993         * gnulib/import/memmem.c: Update.
2994         * gnulib/import/mempcpy.c: Update.
2995         * gnulib/import/memrchr.c: Update.
2996         * gnulib/import/mkdir.c: Update.
2997         * gnulib/import/mkstemp.c: Update.
2998         * gnulib/import/msvc-inval.c: Update.
2999         * gnulib/import/msvc-inval.h: Update.
3000         * gnulib/import/msvc-nothrow.c: Update.
3001         * gnulib/import/msvc-nothrow.h: Update.
3002         * gnulib/import/open.c: Update.
3003         * gnulib/import/openat-die.c: Update.
3004         * gnulib/import/openat-priv.h: Update.
3005         * gnulib/import/openat-proc.c: Update.
3006         * gnulib/import/openat.c: Update.
3007         * gnulib/import/openat.h: Update.
3008         * gnulib/import/opendir.c: Update.
3009         * gnulib/import/pathmax.h: Update.
3010         * gnulib/import/pipe-safer.c: Update.
3011         * gnulib/import/rawmemchr.c: Update.
3012         * gnulib/import/readdir.c: Update.
3013         * gnulib/import/readlink.c: Update.
3014         * gnulib/import/realloc.c: Update.
3015         * gnulib/import/ref-add.sin: Update.
3016         * gnulib/import/ref-del.sin: Update.
3017         * gnulib/import/rename.c: Update.
3018         * gnulib/import/rewinddir.c: Update.
3019         * gnulib/import/rmdir.c: Update.
3020         * gnulib/import/same-inode.h: Update.
3021         * gnulib/import/save-cwd.c: Update.
3022         * gnulib/import/save-cwd.h: Update.
3023         * gnulib/import/scratch_buffer.h: Update.
3024         * gnulib/import/secure_getenv.c: Update.
3025         * gnulib/import/setenv.c: Update.
3026         * gnulib/import/signal.in.h: Update.
3027         * gnulib/import/stat-time.c: Update.
3028         * gnulib/import/stat-time.h: Update.
3029         * gnulib/import/stat-w32.c: Update.
3030         * gnulib/import/stat-w32.h: Update.
3031         * gnulib/import/stat.c: Update.
3032         * gnulib/import/stdbool.in.h: Update.
3033         * gnulib/import/stddef.in.h: Update.
3034         * gnulib/import/stdint.in.h: Update.
3035         * gnulib/import/stdio.in.h: Update.
3036         * gnulib/import/stdlib.in.h: Update.
3037         * gnulib/import/str-two-way.h: Update.
3038         * gnulib/import/strchrnul.c: Update.
3039         * gnulib/import/strdup.c: Update.
3040         * gnulib/import/streq.h: Update.
3041         * gnulib/import/strerror-override.c: Update.
3042         * gnulib/import/strerror-override.h: Update.
3043         * gnulib/import/strerror.c: Update.
3044         * gnulib/import/string.in.h: Update.
3045         * gnulib/import/stripslash.c: Update.
3046         * gnulib/import/strnlen1.c: Update.
3047         * gnulib/import/strnlen1.h: Update.
3048         * gnulib/import/strstr.c: Update.
3049         * gnulib/import/strtok_r.c: Update.
3050         * gnulib/import/sys_stat.in.h: Update.
3051         * gnulib/import/sys_time.in.h: Update.
3052         * gnulib/import/sys_types.in.h: Update.
3053         * gnulib/import/tempname.c: Update.
3054         * gnulib/import/tempname.h: Update.
3055         * gnulib/import/time.in.h: Update.
3056         * gnulib/import/unistd--.h: Update.
3057         * gnulib/import/unistd-safer.h: Update.
3058         * gnulib/import/unistd.in.h: Update.
3059         * gnulib/import/unsetenv.c: Update.
3060         * gnulib/import/verify.h: Update.
3061         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3062         * gnulib/import/wchar.in.h: Update.
3063         * gnulib/import/wctype.in.h: Update.
3064         * gnulib/import/xalloc-oversized.h: Update.
3065         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3066         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3067
3068 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
3069
3070         * record-btrace.c (get_thread_current_frame): Remove
3071         old_inferior_ptid.
3072
3073 2018-09-10  Jerome Guitton  <guitton@adacore.com>
3074
3075         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
3076         with check_tag to 1 if and only if the type is tagged and the
3077         component being searched cannot been found in the current
3078         view. Otherwise, always call ada_to_fixed_type with
3079         check_tag to 0.
3080
3081 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3082
3083         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
3084         declaration.
3085         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
3086         * ada-varobj.c (ada_varobj_get_number_of_children,
3087         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
3088
3089 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3090
3091         * ada-valprint.c (ada_value_print): Use type instead of
3092         enclosing type.
3093
3094 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3095
3096         * ada-lang.c (ada_value_subscript): Handle case when parameter is
3097         an array of access to unconstrained array.
3098
3099 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3100
3101         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
3102         (ada_check_typedef): Use it.
3103
3104 2018-09-10  Xavier Roirand  <roirand@adacore.com>
3105
3106         * ada-varobj.c (ada_varobj_describe_struct_child)
3107         (ada_varobj_describe_child): Handle union case like struct one.
3108
3109 2018-09-10  Tom Tromey  <tom@tromey.com>
3110
3111         PR python/18380:
3112         * python/python.c (_initialize_python): Make example in "python"
3113         help work in Python 3.
3114
3115 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
3116
3117         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
3118         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
3119         $(EXEEXT) to the script, as it is not a program.
3120
3121 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
3122
3123         * python/py-prettyprint.c (pretty_print_one_value): Return
3124         gdbpy_ref<>.
3125         (print_string_repr): Adjust.
3126         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
3127         * python/python-internal.h (apply_varobj_pretty_printer): Return
3128         gdbpy_ref<>.
3129         * varobj.c (varobj_value_get_print_value): Adjust.
3130
3131 2018-09-08  Tom Tromey  <tom@tromey.com>
3132
3133         PR python/16047:
3134         * python/py-prettyprint.c (pretty_print_one_value): Check for
3135         to_string method.
3136
3137 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3138
3139         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
3140         replace_operator_with_call.
3141
3142 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3143
3144         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
3145
3146 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3147
3148         * ada-typeprint.c (print_range): Print the bounds using TYPE
3149         rather than its TYPE_TARGET_TYPE.
3150
3151 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3152
3153         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
3154         call to ada_to_fixed_value_create.
3155
3156 2018-09-08  Jerome Guitton  <guitton@adacore.com>
3157
3158         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
3159
3160 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3161
3162         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
3163         by calls to error.
3164
3165 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3166
3167         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
3168         Move update of loop variable "fi".
3169
3170 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
3171
3172         * ada-lang.c (value_assign_to_component): In the case of
3173         big-endian targets, extract the bits of the given VAL
3174         using an src_offset of zero if container is not a scalar.
3175
3176 2018-09-06  Simon Ser  <contact@emersion.fr>
3177
3178         PR gdb/23105
3179         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
3180         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3181         * fbsd-tdep.c (fbsd_make_note_desc): New.
3182         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
3183         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
3184         * target.h (enum target_object) Add FreeBSD-specific
3185         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
3186
3187 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3188
3189         * compile/compile-c.h (generate_c_for_variable_locations):
3190         Change reference to pointer.
3191         * compile/compile-c-support.c (compile_program) <compute>:
3192         Likewise.
3193         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
3194         (generate_c_for_for_one_variable): Likewise
3195         (generate_c_for_variable_locations): Likewise
3196         * compile/compile-c-types.c (compile_c_instance::convert_type):
3197         Likewise
3198         * compile/compile-cplus-symbols.c (convert_one_symbol):
3199         std::move the scope passed to enter_scope.
3200         * compile/compile-cplus-types.c
3201         (compile_cplus_instance::enter_scope): Make parameter
3202         rvalue-reference.
3203         (compile_cplus_instance::new_scope): Change reference to
3204         pointer.
3205         (compile_cplus_instance::convert_type): Likewise
3206         (compile_cplus_convert_typedef): std::move the scope passed to
3207         enter_scope.
3208         (compile_cplus_convert_struct_or_union): Likewise.
3209         (compile_cplus_convert_enum): Likewise.
3210         (compile_cplus_convert_namespace): Likewise.
3211         * compile/compile-cplus.h (compile_cplus_instance)
3212         <enter_scope>: Make parameter rvalue-reference.
3213         * compile/compile-internal.h (compile_instance)
3214         <get_cached_type>: Likewise
3215         * compile/compile-loc2c.c (push): Likewise
3216         (pushf): Likewise
3217         (unary): Likewise
3218         (binary): Likewise
3219         (print_label): Likewise
3220         (pushf_register_address): Likewise
3221         (pushf_register): Likewise
3222         (do_compile_dwarf_expr_to_c): Likewise
3223         (compile_dwarf_expr_to_c): Likewise
3224         (compile_dwarf_bounds_to_c): Likewise
3225         * compile/compile.c (compile_instance::get_cached_type):
3226         Likewise
3227         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3228         (compile_dwarf_bounds_to_c): Likewise
3229         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3230         (dwarf2_compile_property_to_c): Likewise
3231         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3232         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3233         Likewise
3234
3235 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3236
3237         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3238         * tui/tui-data.c (init_content_element): Don't initialize it.
3239
3240 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3241
3242         * tui/tui-data.h (struct tui_win_info)
3243         <detail::opaque>: Remove.
3244         * tui/tui-data.c (init_win_info): Remove assignment.
3245
3246 2018-09-05  Tom Tromey  <tom@tromey.com>
3247
3248         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3249         -Wformat-nonliteral.
3250         * target-float.c (host_float_ops<T>::to_string)
3251         (host_float_ops<T>::from_string): Use
3252         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3253         * configure: Rebuild.
3254
3255 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3256
3257         * printcmd.c (printf_c_string): Use
3258         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3259         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3260
3261 2018-09-05  Tom Tromey  <tom@tromey.com>
3262
3263         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3264
3265 2018-09-05  Tom de Vries  <tdevries@suse.de>
3266
3267         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3268         with resolve_abstract_p == true.
3269         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3270         defaulting to false. Propagate resolve_abstract_p to
3271         dwarf2_fetch_die_loc_sect_off.
3272         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3273         parameter, defaulting to false.
3274         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3275         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3276         parameter.
3277         * dwarf2read.h (struct die_info): Forward-declare.
3278         (die_info_ptr): New typedef.
3279         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3280
3281 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3282
3283         GDB 8.2 released.
3284
3285 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3286             Pedro Alves  <palves@redhat.com>
3287
3288         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3289         "aclocal-m4-deps.mk".  Include file here.
3290         $(srcdir)/aclocal.m4: Add "configure.ac".
3291         * gnulib/aclocal-m4-deps.mk: New file.
3292         * gnulib/update-gnulib.sh: Automatically update
3293         "aclocal-m4-deps.mk".
3294
3295 2018-09-04  Tom Tromey  <tom@tromey.com>
3296
3297         * configure: Rebuild.
3298         * configure.ac: Remove multi-ice code.
3299
3300 2018-09-04  Tom Tromey  <tom@tromey.com>
3301
3302         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3303         (ada-exp.o): Update.
3304
3305 2018-09-04  Tom Tromey  <tom@tromey.com>
3306
3307         * Makefile.in (printcmd.o, target-float.o): Remove.
3308         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3309
3310 2018-09-04  Tom Tromey  <tom@tromey.com>
3311
3312         * gnulib/Makefile.in: Remove obsolete comment.
3313         * Makefile.in: Remove obsolete comment.
3314
3315 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3316
3317         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3318         line with '+'.
3319
3320 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3321
3322         * riscv-tdep.c: Add 'prologue-value.h' include.
3323         (struct riscv_unwind_cache): New struct.
3324         (riscv_debug_unwinder): New global.
3325         (riscv_scan_prologue): Update arguments, capture register details
3326         from prologue scan.
3327         (riscv_skip_prologue): Reformat arguments line, move end of
3328         prologue calculation into riscv_scan_prologue.
3329         (riscv_frame_cache): Update return type, create
3330         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3331         details.
3332         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3333         (riscv_frame_prev_register): Use the trad_frame within the
3334         riscv_unwind_cache.
3335         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3336         flag.
3337
3338 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3339
3340         * trad-frame.h (trad_frame_set_realreg): Declare.
3341         (trad_frame_set_addr): Declare.
3342         * trad-frame.c (trad_frame_set_realreg): Define new function.
3343         (trad_frame_set_addr): Define new function.
3344         (trad_frame_set_reg_realreg): Use new function.
3345         (trad_frame_set_reg_addr): Use new function.
3346
3347 2018-09-01  Keith Seitz  <keiths@redhat.com>
3348
3349         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3350         pulongest instead of "%lld".
3351         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3352         ATTRIBUTE_UNUSED.
3353
3354 2018-08-31  Tom Tromey  <tom@tromey.com>
3355
3356         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3357         variant part type.
3358
3359 2018-08-31  Pedro Alves  <palves@redhat.com>
3360
3361         * gdbarch.h: Regenerate.
3362
3363 2018-08-31  Pedro Alves  <palves@redhat.com>
3364
3365         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3366         * target.h (Hardware watchpoint interfaces): Describe
3367         continuable/steppable/non-steppable watchpoints.
3368         * gdbarch.h, gdbarch.c: Regenerate.
3369
3370 2018-08-31  Pedro Alves  <palves@redhat.com>
3371
3372         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3373         Delete.
3374         * s390-linux-nat.c
3375         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3376         * target.h (target_ops::have_continuable_watchpoint): Delete.
3377         (target_have_continuable_watchpoint): Delete.
3378         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3379         * target-delegates.c: Regenerate.
3380
3381 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3382
3383         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3384         the files present in "gnulib/import/m4/".
3385
3386 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3387
3388         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3389         c.sw, c.swsp, and c.sdsp.
3390
3391 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3392
3393         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3394         (riscv_read_misa_reg): Don't cache value read into inferior data.
3395         (riscv_new_inferior_data): Delete.
3396         (riscv_inferior_data_cleanup): Delete.
3397         (riscv_inferior_data): Delete.
3398         (riscv_invalidate_inferior_data): Delete.
3399         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3400
3401 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3402
3403         * compile/compile-cplus-types.c
3404         (compile_cplus_instance::leave_scope): Take the address of scope
3405         object.
3406         (compile_cplus_instance::convert_qualified_base): Compare quals
3407         to 0.
3408
3409 2018-08-30  Keith Seitz  <keiths@redhat.com>
3410
3411         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3412         Use "%s" and host_address_to_string instead of "%p" in printf.
3413
3414 2018-08-29  Keith Seitz  <keiths@redhat.com>
3415
3416         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3417         and compile-cplus-types.c.
3418         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3419         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3420         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3421         Declare.
3422         * compile/compile-c-support.c: Include compile-cplus.h.
3423         (load_libcompile): Templatize.
3424         (get_compile_context): "New" function.
3425         (c_get_compile_context): Use get_compile_context.
3426         (cplus_get_compile_context): New function.
3427         (cplus_push_user_expression, cplus_pop_user_expression)
3428         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3429         (cplus_compute_program): Define new structs/functions.
3430         * compile/compile-cplus-symmbols.c: New file.
3431         * compile/compile-cplus-types.c: New file.
3432         * compile/compile-cplus.h: New file.
3433         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3434         Declare.
3435         * compile/compile-object-load.c (get_out_value_type): Use
3436         strncmp_iw when comparing symbol names.
3437         (compile_object_load): Add mst_bss and mst_data.
3438         * compile/compile.c (_initialize_compile): Remove
3439         -Wno-implicit-function-declaration from `compile_args'.
3440         * compile/gcc-cp-plugin.h: New file.
3441         * NEWS: Mention C++ compile support and new debug options.
3442
3443 2018-08-29  Keith Seitz  <keiths@redhat.com>
3444
3445         * linespec.c (collect_info::add_symbol): Make virtual.
3446         (struct symbol_searcher_collect_info): New struct.
3447         (symbol_searcher::find_all_symbols): New method.
3448         * symtab.h (class symbol_searcher): New class.
3449
3450 2018-08-29  Keith Seitz  <keiths@redhat.com>
3451
3452         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3453         Change to vector of block_symbol.  Update all users.
3454         (struct collect_info) <symbols>: Likewise.
3455         (collect_info::add_symbol): Take block_symbol as argument.
3456         Update all callers.
3457         (decode_compound_collector) <m_symbols>: Change type to vector
3458         of block_symbol.  Update all users.
3459         (decode_compound_collector::operator ()): Change parameter type
3460         to block_symbol.
3461         (find_method, find_function_symbols, find_linespec_symbols)
3462         (find_label_symbols_in_block, find_label_symbols): Change symbol
3463         vectors to block_symbol vectors.
3464         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3465         block_symbol.
3466
3467 2018-08-29  Keith Seitz  <keiths@redhat.com>
3468
3469         * linespec.c (symbolp): Remove typedef and VEC definitions.
3470         (bound_minimal_symbol_d): Likewise.
3471
3472 2018-08-29  Keith Seitz  <keiths@redhat.com>
3473
3474         * linespec.c (decode_compound_collector::decode_compound_collector):
3475         Remove initialization for `m_symtabs'.
3476         (decode_compound_collector::release_symbols): Change return type
3477         to std::vector.  Update all callers.
3478         (class decode_compound_collector) <m_symbols>: Change type to
3479         std::vector.
3480         (lookup_prefix_sym): Change return type to std::vector.  Update all
3481         callers.
3482         (compare_symbols): Remove.
3483         (std_compare_symbols): Rename to `compare_symbols'.
3484         (find_method): Change `sym_classes' parameter to std::vector.
3485         Update all callers.  Use std::sort to sort sym_classes.
3486         (find_linespec_symbols): Remove cleanup.
3487
3488 2018-08-29  Keith Seitz  <keiths@redhat.com>
3489
3490         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3491         std::vector.  Update all users.
3492         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3493         (struct collect_info) <minimal_symbols>: Likewise.
3494         (compare_msymbols): Return bool.  Change parameters to const
3495         bound_minimal_symbol references.
3496         (find_method, find_function_symbols, find_linespec_symbols): Change
3497         `minsyms' parameter to std::vector.  Update all callers.
3498
3499 2018-08-29  Keith Seitz  <keiths@redhat.com>
3500
3501         * linespec.c (struct linespec) <label_symbols>: Change type to
3502         std::vector.  Update all users.
3503         (find_label_symbols_in_block): Change `result' parameter to
3504         std::vector.  Update all callers.
3505         (find_label_symbols): Return std::vector.  Update all callers.
3506
3507 2018-08-29  Keith Seitz  <keiths@redhat.com>
3508
3509         * linespec.c (struct linespec) <function_symbols>: Change type to
3510         std::vector.  Update all users.
3511         (struct collect_info) <function_symbols>: Likewise.
3512         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3513         (std_compare_symbols): New function.
3514         (find_method, find_function_symbols, find_linespec_symbols)
3515         (find_label_symbols_in_block): Change `symbols' parameter to
3516         std::vector.  Update all callers.
3517         (find_label_symbols): Likewise for `function_symbols' and
3518         `label_funcs_ret'.
3519
3520 2018-08-29  Keith Seitz  <keiths@redhat.com>
3521
3522         * linespec.c (symtab_vector_up): Define.
3523         (struct linespec) <file_symtabs>: Change type to std::vector *.
3524         Update all uses.
3525         (struct collect_info) <file_symtabs>: Likewise.
3526         (collect_symtabs_from_filename): Return symtab_vector_up.
3527         Update all callers.
3528         (decode_objc): Remove cleanup.
3529         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3530         (symtab_collector::release_symtabs): Return symtab_vector_up.
3531         Update all callers.
3532         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3533         Update all users.
3534         (collect_symtabs_from_filename, symtabs_from_filename): Return
3535         symtab_vector_up.  Update all callers.
3536
3537 2018-08-29  Tom Tromey  <tom@tromey.com>
3538
3539         * csky-tdep.c (csky_analyze_prologue): Use
3540         core_addr_to_string_nz.
3541
3542 2018-08-29  Tom Tromey  <tom@tromey.com>
3543
3544         * windows-nat.c (struct xlate_exception) <them>: Change type to
3545         DWORD.
3546         (xlate): Fix formatting.  Remove last entry.
3547         (struct xlate_exception, xlate): Comment out.
3548         (windows_nat_target::resume): Use ranged for.
3549
3550 2018-08-29  Jim Wilson  <jimw@sifive.com>
3551
3552         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3553         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3554         of NT_PRFPREG.
3555         (riscv_linux_nat_target::store_registers): Likewise.
3556
3557 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3558
3559         PR gdb/23555
3560         PR gdb/23558
3561         * gnulib/aclocal.m4: Regenerate.
3562         * gnulib/config.in: Regenerate.
3563         * gnulib/configure: Regenerate.
3564         * gnulib/import/Makefile.am: Update.
3565         * gnulib/import/Makefile.in: Update.
3566         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3567         * gnulib/import/_Noreturn.h: ... this.
3568         * gnulib/import/alloca.in.h: Update.
3569         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3570         * gnulib/import/arg-nonnull.h: ... this.
3571         * gnulib/import/assure.h: Update.
3572         * gnulib/import/at-func.c: Update.
3573         * gnulib/import/basename-lgpl.c: Update.
3574         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3575         * gnulib/import/c++defs.h: ... this.
3576         * gnulib/import/canonicalize-lgpl.c: Update.
3577         * gnulib/import/cdefs.h: Update.
3578         * gnulib/import/chdir-long.c: Update.
3579         * gnulib/import/chdir-long.h: Update.
3580         * gnulib/import/cloexec.c: Update.
3581         * gnulib/import/cloexec.h: Update.
3582         * gnulib/import/close.c: Update.
3583         * gnulib/import/closedir.c: Update.
3584         * gnulib/import/config.charset: Update.
3585         * gnulib/import/dirent-private.h: Update.
3586         * gnulib/import/dirent.in.h: Update.
3587         * gnulib/import/dirfd.c: Update.
3588         * gnulib/import/dirname-lgpl.c: Update.
3589         * gnulib/import/dirname.h: Update.
3590         * gnulib/import/dosname.h: Update.
3591         * gnulib/import/dup-safer-flag.c: Update.
3592         * gnulib/import/dup-safer.c: Update.
3593         * gnulib/import/dup.c: Update.
3594         * gnulib/import/dup2.c: Update.
3595         * gnulib/import/errno.in.h: Update.
3596         * gnulib/import/error.c: Update.
3597         * gnulib/import/error.h: Update.
3598         * gnulib/import/exitfail.c: Update.
3599         * gnulib/import/exitfail.h: Update.
3600         * gnulib/import/extra/update-copyright: Update.
3601         * gnulib/import/fchdir.c: Update.
3602         * gnulib/import/fcntl.c: Update.
3603         * gnulib/import/fcntl.in.h: Update.
3604         * gnulib/import/fd-hook.c: Update.
3605         * gnulib/import/fd-hook.h: Update.
3606         * gnulib/import/fd-safer-flag.c: Update.
3607         * gnulib/import/fd-safer.c: Update.
3608         * gnulib/import/fdopendir.c: Update.
3609         * gnulib/import/filename.h: Update.
3610         * gnulib/import/filenamecat-lgpl.c: Update.
3611         * gnulib/import/filenamecat.h: Update.
3612         * gnulib/import/flexmember.h: Update.
3613         * gnulib/import/float+.h: Update.
3614         * gnulib/import/float.c: Update.
3615         * gnulib/import/float.in.h: Update.
3616         * gnulib/import/fnmatch.c: Update.
3617         * gnulib/import/fnmatch.in.h: Update.
3618         * gnulib/import/fnmatch_loop.c: Update.
3619         * gnulib/import/fpucw.h: Update.
3620         * gnulib/import/frexp.c: Update.
3621         * gnulib/import/frexpl.c: Update.
3622         * gnulib/import/fstat.c: Update.
3623         * gnulib/import/fstatat.c: Update.
3624         * gnulib/import/getcwd-lgpl.c: Update.
3625         * gnulib/import/getcwd.c: Update.
3626         * gnulib/import/getdtablesize.c: Update.
3627         * gnulib/import/getlogin_r.c: Update.
3628         * gnulib/import/getprogname.c: Update.
3629         * gnulib/import/getprogname.h: Update.
3630         * gnulib/import/gettext.h: Update.
3631         * gnulib/import/gettimeofday.c: Update.
3632         * gnulib/import/glob-libc.h: Update.
3633         * gnulib/import/glob.c: Update.
3634         * gnulib/import/glob.in.h: Update.
3635         * gnulib/import/glob_internal.h: Update.
3636         * gnulib/import/glob_pattern_p.c: Update.
3637         * gnulib/import/globfree.c: Update.
3638         * gnulib/import/hard-locale.c: Update.
3639         * gnulib/import/hard-locale.h: Update.
3640         * gnulib/import/intprops.h: Update.
3641         * gnulib/import/inttypes.in.h: Update.
3642         * gnulib/import/isnan.c: Update.
3643         * gnulib/import/isnand-nolibm.h: Update.
3644         * gnulib/import/isnand.c: Update.
3645         * gnulib/import/isnanl-nolibm.h: Update.
3646         * gnulib/import/isnanl.c: Update.
3647         * gnulib/import/itold.c: Update.
3648         * gnulib/import/libc-config.h: Update.
3649         * gnulib/import/limits.in.h: Update.
3650         * gnulib/import/localcharset.c: Update.
3651         * gnulib/import/localcharset.h: Update.
3652         * gnulib/import/localtime-buffer.c: Update.
3653         * gnulib/import/localtime-buffer.h: Update.
3654         * gnulib/import/lstat.c: Update.
3655         * gnulib/import/m4/00gnulib.m4: Update.
3656         * gnulib/import/m4/__inline.m4: Update.
3657         * gnulib/import/m4/absolute-header.m4: Update.
3658         * gnulib/import/m4/alloca.m4: Update.
3659         * gnulib/import/m4/builtin-expect.m4: Update.
3660         * gnulib/import/m4/canonicalize.m4: Update.
3661         * gnulib/import/m4/chdir-long.m4: Update.
3662         * gnulib/import/m4/close.m4: Update.
3663         * gnulib/import/m4/closedir.m4: Update.
3664         * gnulib/import/m4/configmake.m4: Update.
3665         * gnulib/import/m4/d-ino.m4: Update.
3666         * gnulib/import/m4/d-type.m4: Update.
3667         * gnulib/import/m4/dirent_h.m4: Update.
3668         * gnulib/import/m4/dirfd.m4: Update.
3669         * gnulib/import/m4/dirname.m4: Update.
3670         * gnulib/import/m4/double-slash-root.m4: Update.
3671         * gnulib/import/m4/dup.m4: Update.
3672         * gnulib/import/m4/dup2.m4: Update.
3673         * gnulib/import/m4/eealloc.m4: Update.
3674         * gnulib/import/m4/environ.m4: Update.
3675         * gnulib/import/m4/errno_h.m4: Update.
3676         * gnulib/import/m4/error.m4: Update.
3677         * gnulib/import/m4/exponentd.m4: Update.
3678         * gnulib/import/m4/exponentl.m4: Update.
3679         * gnulib/import/m4/extensions.m4: Update.
3680         * gnulib/import/m4/extern-inline.m4: Update.
3681         * gnulib/import/m4/fchdir.m4: Update.
3682         * gnulib/import/m4/fcntl-o.m4: Update.
3683         * gnulib/import/m4/fcntl.m4: Update.
3684         * gnulib/import/m4/fcntl_h.m4: Update.
3685         * gnulib/import/m4/fdopendir.m4: Update.
3686         * gnulib/import/m4/filenamecat.m4: Update.
3687         * gnulib/import/m4/flexmember.m4: Update.
3688         * gnulib/import/m4/float_h.m4: Update.
3689         * gnulib/import/m4/fnmatch.m4: Update.
3690         * gnulib/import/m4/fnmatch_h.m4: Update.
3691         * gnulib/import/m4/fpieee.m4: Update.
3692         * gnulib/import/m4/frexp.m4: Update.
3693         * gnulib/import/m4/frexpl.m4: Update.
3694         * gnulib/import/m4/fstat.m4: Update.
3695         * gnulib/import/m4/fstatat.m4: Update.
3696         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3697         * gnulib/import/m4/getcwd-path-max.m4: Update.
3698         * gnulib/import/m4/getcwd.m4: Update.
3699         * gnulib/import/m4/getdtablesize.m4: Update.
3700         * gnulib/import/m4/getlogin.m4: Update.
3701         * gnulib/import/m4/getlogin_r.m4: Update.
3702         * gnulib/import/m4/getpagesize.m4: Update.
3703         * gnulib/import/m4/getprogname.m4: Update.
3704         * gnulib/import/m4/gettimeofday.m4: Update.
3705         * gnulib/import/m4/glibc21.m4: Update.
3706         * gnulib/import/m4/glob.m4: Update.
3707         * gnulib/import/m4/glob_h.m4: Update.
3708         * gnulib/import/m4/gnulib-cache.m4: Update.
3709         * gnulib/import/m4/gnulib-common.m4: Update.
3710         * gnulib/import/m4/gnulib-comp.m4: Update.
3711         * gnulib/import/m4/gnulib-tool.m4: Update.
3712         * gnulib/import/m4/hard-locale.m4: Update.
3713         * gnulib/import/m4/include_next.m4: Update.
3714         * gnulib/import/m4/inttypes-pri.m4: Update.
3715         * gnulib/import/m4/inttypes.m4: Update.
3716         * gnulib/import/m4/isnand.m4: Update.
3717         * gnulib/import/m4/isnanl.m4: Update.
3718         * gnulib/import/m4/largefile.m4: Update.
3719         * gnulib/import/m4/limits-h.m4: Update.
3720         * gnulib/import/m4/localcharset.m4: Update.
3721         * gnulib/import/m4/locale-fr.m4: Update.
3722         * gnulib/import/m4/locale-ja.m4: Update.
3723         * gnulib/import/m4/locale-zh.m4: Update.
3724         * gnulib/import/m4/localtime-buffer.m4: Update.
3725         * gnulib/import/m4/longlong.m4: Update.
3726         * gnulib/import/m4/lstat.m4: Update.
3727         * gnulib/import/m4/malloc.m4: Update.
3728         * gnulib/import/m4/malloca.m4: Update.
3729         * gnulib/import/m4/math_h.m4: Update.
3730         * gnulib/import/m4/mbrtowc.m4: Update.
3731         * gnulib/import/m4/mbsinit.m4: Update.
3732         * gnulib/import/m4/mbsrtowcs.m4: Update.
3733         * gnulib/import/m4/mbstate_t.m4: Update.
3734         * gnulib/import/m4/memchr.m4: Update.
3735         * gnulib/import/m4/memmem.m4: Update.
3736         * gnulib/import/m4/mempcpy.m4: Update.
3737         * gnulib/import/m4/memrchr.m4: Update.
3738         * gnulib/import/m4/mkdir.m4: Update.
3739         * gnulib/import/m4/mkstemp.m4: Update.
3740         * gnulib/import/m4/mmap-anon.m4: Update.
3741         * gnulib/import/m4/mode_t.m4: Update.
3742         * gnulib/import/m4/msvc-inval.m4: Update.
3743         * gnulib/import/m4/msvc-nothrow.m4: Update.
3744         * gnulib/import/m4/multiarch.m4: Update.
3745         * gnulib/import/m4/nocrash.m4: Update.
3746         * gnulib/import/m4/off_t.m4: Update.
3747         * gnulib/import/m4/onceonly.m4: Update.
3748         * gnulib/import/m4/open-cloexec.m4: Update.
3749         * gnulib/import/m4/open.m4: Update.
3750         * gnulib/import/m4/openat.m4: Update.
3751         * gnulib/import/m4/opendir.m4: Update.
3752         * gnulib/import/m4/pathmax.m4: Update.
3753         * gnulib/import/m4/rawmemchr.m4: Update.
3754         * gnulib/import/m4/readdir.m4: Update.
3755         * gnulib/import/m4/readlink.m4: Update.
3756         * gnulib/import/m4/realloc.m4: Update.
3757         * gnulib/import/m4/rename.m4: Update.
3758         * gnulib/import/m4/rewinddir.m4: Update.
3759         * gnulib/import/m4/rmdir.m4: Update.
3760         * gnulib/import/m4/save-cwd.m4: Update.
3761         * gnulib/import/m4/secure_getenv.m4: Update.
3762         * gnulib/import/m4/setenv.m4: Update.
3763         * gnulib/import/m4/signal_h.m4: Update.
3764         * gnulib/import/m4/ssize_t.m4: Update.
3765         * gnulib/import/m4/stat-time.m4: Update.
3766         * gnulib/import/m4/stat.m4: Update.
3767         * gnulib/import/m4/std-gnu11.m4: Update.
3768         * gnulib/import/m4/stdbool.m4: Update.
3769         * gnulib/import/m4/stddef_h.m4: Update.
3770         * gnulib/import/m4/stdint.m4: Update.
3771         * gnulib/import/m4/stdio_h.m4: Update.
3772         * gnulib/import/m4/stdlib_h.m4: Update.
3773         * gnulib/import/m4/strchrnul.m4: Update.
3774         * gnulib/import/m4/strdup.m4: Update.
3775         * gnulib/import/m4/strerror.m4: Update.
3776         * gnulib/import/m4/string_h.m4: Update.
3777         * gnulib/import/m4/strstr.m4: Update.
3778         * gnulib/import/m4/strtok_r.m4: Update.
3779         * gnulib/import/m4/sys_socket_h.m4: Update.
3780         * gnulib/import/m4/sys_stat_h.m4: Update.
3781         * gnulib/import/m4/sys_time_h.m4: Update.
3782         * gnulib/import/m4/sys_types_h.m4: Update.
3783         * gnulib/import/m4/tempname.m4: Update.
3784         * gnulib/import/m4/time_h.m4: Update.
3785         * gnulib/import/m4/unistd-safer.m4: Update.
3786         * gnulib/import/m4/unistd_h.m4: Update.
3787         * gnulib/import/m4/warn-on-use.m4: Update.
3788         * gnulib/import/m4/wchar_h.m4: Update.
3789         * gnulib/import/m4/wchar_t.m4: Update.
3790         * gnulib/import/m4/wctype_h.m4: Update.
3791         * gnulib/import/m4/wint_t.m4: Update.
3792         * gnulib/import/malloc.c: Update.
3793         * gnulib/import/malloc/scratch_buffer.h: Update.
3794         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3795         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3796         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3797         * gnulib/import/malloca.c: Update.
3798         * gnulib/import/malloca.h: Update.
3799         * gnulib/import/malloca.valgrind: Update.
3800         * gnulib/import/math.in.h: Update.
3801         * gnulib/import/mbrtowc.c: Update.
3802         * gnulib/import/mbsinit.c: Update.
3803         * gnulib/import/mbsrtowcs-impl.h: Update.
3804         * gnulib/import/mbsrtowcs-state.c: Update.
3805         * gnulib/import/mbsrtowcs.c: Update.
3806         * gnulib/import/memchr.c: Update.
3807         * gnulib/import/memmem.c: Update.
3808         * gnulib/import/mempcpy.c: Update.
3809         * gnulib/import/memrchr.c: Update.
3810         * gnulib/import/mkdir.c: Update.
3811         * gnulib/import/mkstemp.c: Update.
3812         * gnulib/import/msvc-inval.c: Update.
3813         * gnulib/import/msvc-inval.h: Update.
3814         * gnulib/import/msvc-nothrow.c: Update.
3815         * gnulib/import/msvc-nothrow.h: Update.
3816         * gnulib/import/open.c: Update.
3817         * gnulib/import/openat-die.c: Update.
3818         * gnulib/import/openat-priv.h: Update.
3819         * gnulib/import/openat-proc.c: Update.
3820         * gnulib/import/openat.c: Update.
3821         * gnulib/import/openat.h: Update.
3822         * gnulib/import/opendir.c: Update.
3823         * gnulib/import/pathmax.h: Update.
3824         * gnulib/import/pipe-safer.c: Update.
3825         * gnulib/import/rawmemchr.c: Update.
3826         * gnulib/import/readdir.c: Update.
3827         * gnulib/import/readlink.c: Update.
3828         * gnulib/import/realloc.c: Update.
3829         * gnulib/import/ref-add.sin: Update.
3830         * gnulib/import/ref-del.sin: Update.
3831         * gnulib/import/rename.c: Update.
3832         * gnulib/import/rewinddir.c: Update.
3833         * gnulib/import/rmdir.c: Update.
3834         * gnulib/import/same-inode.h: Update.
3835         * gnulib/import/save-cwd.c: Update.
3836         * gnulib/import/save-cwd.h: Update.
3837         * gnulib/import/scratch_buffer.h: Update.
3838         * gnulib/import/secure_getenv.c: Update.
3839         * gnulib/import/setenv.c: Update.
3840         * gnulib/import/signal.in.h: Update.
3841         * gnulib/import/stat-time.c: Update.
3842         * gnulib/import/stat-time.h: Update.
3843         * gnulib/import/stat-w32.c: Update.
3844         * gnulib/import/stat-w32.h: Update.
3845         * gnulib/import/stat.c: Update.
3846         * gnulib/import/stdbool.in.h: Update.
3847         * gnulib/import/stddef.in.h: Update.
3848         * gnulib/import/stdint.in.h: Update.
3849         * gnulib/import/stdio.in.h: Update.
3850         * gnulib/import/stdlib.in.h: Update.
3851         * gnulib/import/str-two-way.h: Update.
3852         * gnulib/import/strchrnul.c: Update.
3853         * gnulib/import/strdup.c: Update.
3854         * gnulib/import/streq.h: Update.
3855         * gnulib/import/strerror-override.c: Update.
3856         * gnulib/import/strerror-override.h: Update.
3857         * gnulib/import/strerror.c: Update.
3858         * gnulib/import/string.in.h: Update.
3859         * gnulib/import/stripslash.c: Update.
3860         * gnulib/import/strnlen1.c: Update.
3861         * gnulib/import/strnlen1.h: Update.
3862         * gnulib/import/strstr.c: Update.
3863         * gnulib/import/strtok_r.c: Update.
3864         * gnulib/import/sys_stat.in.h: Update.
3865         * gnulib/import/sys_time.in.h: Update.
3866         * gnulib/import/sys_types.in.h: Update.
3867         * gnulib/import/tempname.c: Update.
3868         * gnulib/import/tempname.h: Update.
3869         * gnulib/import/time.in.h: Update.
3870         * gnulib/import/unistd--.h: Update.
3871         * gnulib/import/unistd-safer.h: Update.
3872         * gnulib/import/unistd.in.h: Update.
3873         * gnulib/import/unsetenv.c: Update.
3874         * gnulib/import/verify.h: Update.
3875         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3876         * gnulib/import/wchar.in.h: Update.
3877         * gnulib/import/wctype.in.h: Update.
3878         * gnulib/import/xalloc-oversized.h: Update.
3879         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3880         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3881
3882 2018-08-16  Gary Benson <gbenson@redhat.com>
3883
3884         PR gdb/13000:
3885         * gdb/main.c (captured_main_1): Exit with nonzero status
3886         in batch mode if the last command to be executed failed.
3887         * NEWS: Mention the above.
3888
3889 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3890
3891         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3892         end of warning message.
3893
3894 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3895
3896         PR gdb/22943:
3897         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3898         (aarch64_extract_return_value): Use
3899         aapcs_is_vfp_call_or_return_candidate.
3900         (aarch64_return_in_memory): Likewise.
3901         (aarch64_store_return_value): Likewise.
3902
3903 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3904
3905         * aarch64-tdep.c
3906         (aapcs_is_vfp_call_or_return_candidate): Make static
3907         (pass_in_v_or_stack): Remove function.
3908         (pass_in_v_vfp_candidate): New function.
3909         (aarch64_push_dummy_call): Check for float register candidates.
3910
3911 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3912
3913         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3914         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3915         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3916
3917 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3918
3919         PR build/23399
3920         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3921         (struct ipa_sym_addresses): Rename to...
3922         (struct ipa_sym_addresses_common): ... this.
3923         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3924
3925 2018-08-28  Tom Tromey  <tom@tromey.com>
3926
3927         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3928         (token_fifo): Now a std::vector.
3929         (yylex, c_parse): Update.
3930         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3931         (token_fifo): Now a std::vector.
3932         (yylex, d_parse): Update.
3933         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3934         (token_fifo): Now a std::vector.
3935         (yylex, go_parse): Update.
3936
3937 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3938
3939         * parser-defs.h (struct type_stack) <elements>: Change type to
3940         std::vector<union type_stack_elt>.
3941         <depth, size>: Remove.
3942         * parse.c (parse_exp_in_context_1): Adjust.
3943         (type_stack_reserve): Remove.
3944         (check_type_stack_depth): Remove.
3945         (insert_into_type_stack): Adjust to std::vector.
3946         (insert_type): Likewise.
3947         (push_type): Likewise.
3948         (push_type_int): Likewise.
3949         (insert_type_address_space): Likewise.
3950         (pop_type): Likewise.
3951         (pop_type_int): Likewise.
3952         (pop_typelist): Likewise.
3953         (pop_type_stack): Likewise.
3954         (append_type_stack): Likewise.
3955         (push_type_stack): Likewise.
3956         (get_type_stack): Likewise.
3957         (type_stack_cleanup): Likewise.
3958         (push_typelist): Likewise.
3959         (follow_types): Likewise.
3960         (_initialize_parse): Likewise.
3961
3962 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3963
3964         * NEWS: Mention csky target.
3965
3966 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3967             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3968             Don Breazeal  <donb@codesourcery.com>
3969
3970         * csky-linux-tdep.c: New file.
3971         * csky-tdep.c: Likewise.
3972         * csky-tdep.h: Likewise.
3973         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3974         csky-tdep.o.
3975         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3976         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3977         * configure.tgt: Add csky support.
3978
3979 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3980
3981         * python/py-framefilter.c (py_print_frame): Print frame architecture
3982         when printing on an MI output.
3983
3984 2018-08-27  Tom Tromey  <tom@tromey.com>
3985
3986         PR build/23087:
3987         * configure: Rebuild.
3988         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3989
3990 2018-08-27  Tom Tromey  <tom@tromey.com>
3991
3992         * aarch64-linux-tdep.c
3993         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3994         casts to int.
3995
3996 2018-08-27  Tom Tromey  <tom@tromey.com>
3997
3998         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3999         unsigned.
4000         (ppc64_standard_linkage1, ppc64_standard_linkage2)
4001         (ppc64_standard_linkage3, ppc64_standard_linkage4)
4002         (ppc64_standard_linkage5, ppc64_standard_linkage6)
4003         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
4004         unsigned.
4005
4006 2018-08-27  Tom Tromey  <tom@tromey.com>
4007
4008         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
4009         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
4010
4011 2018-08-27  Tom Tromey  <tom@tromey.com>
4012
4013         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
4014         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
4015         ULONGEST_MAX.
4016         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
4017         ULONGEST_MAX.
4018         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
4019         ULONGEST_MAX.
4020         * sparc-linux-tdep.c (sparc32_linux_sigframe)
4021         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
4022         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
4023         ULONGEST_MAX.
4024         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
4025         (ppc64_linux_sigaction_tramp_frame)
4026         (ppc32_linux_sighandler_tramp_frame)
4027         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4028         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
4029         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
4030         * mn10300-linux-tdep.c (am33_linux_sigframe)
4031         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
4032         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
4033         * mips-linux-tdep.c (mips_linux_o32_sigframe)
4034         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
4035         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
4036         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
4037         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
4038         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
4039         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
4040         * microblaze-linux-tdep.c
4041         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
4042         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
4043         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
4044         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
4045         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
4046         * common/common-types.h (ULONGEST_MAX): New define.
4047         (CORE_ADDR_MAX): Fix formatting.
4048         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
4049         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
4050         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
4051         (arm_linux_rt_sigreturn_tramp_frame)
4052         (arm_eabi_linux_sigreturn_tramp_frame)
4053         (arm_eabi_linux_rt_sigreturn_tramp_frame)
4054         (thumb2_eabi_linux_sigreturn_tramp_frame)
4055         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
4056         (arm_linux_restart_syscall_tramp_frame)
4057         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
4058         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
4059         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
4060         ULONGEST_MAX.
4061         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
4062
4063 2018-08-27  Tom Tromey  <tom@tromey.com>
4064
4065         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
4066         CORE_ADDR_MAX.
4067         * mips-tdep.c (mips_deal_with_atomic_sequence)
4068         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
4069         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
4070         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
4071         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
4072         CORE_ADDR_MAX.
4073         * aarch64-tdep.c (aarch64_software_single_step): Use
4074         CORE_ADDR_MAX.
4075
4076 2018-08-27  Tom Tromey  <tom@tromey.com>
4077
4078         * linespec.c (complete_linespec_component): Add cast to "char".
4079         * completer.c (completion_tracker::build_completion_result): Add
4080         cast to "char".
4081
4082 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4083
4084         * solist.h (struct solist, struct target_so_ops): Fix
4085         indentation.
4086
4087 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4088
4089         * ada-tasks.c (ada_task_info_s): Remove typedef.
4090         (DEF_VEC_O(ada_task_info_s)): Remove.
4091         (struct ada_tasks_inferior_data): Initialize fields.
4092         <task_list>: Make an std::vector.
4093         (get_ada_tasks_inferior_data): Allocate with new.
4094         (ada_get_task_number): Adjust.
4095         (get_task_number_from_id): Likewise.
4096         (valid_task_id): Likewise.
4097         (ada_get_task_info_from_ptid): Likewise.
4098         (iterate_over_live_ada_tasks): Likewise.
4099         (add_ada_task): Likewise.
4100         (read_known_tasks): Likewise.
4101         (ada_build_task_list): Likewise.
4102         (print_ada_task_info): Likewise.
4103         (info_task): Likewise.
4104         (task_command_1): Likewise.
4105
4106 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
4107
4108         * ada-lang.c (add_angle_brackets): Return std::string.
4109
4110 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
4111
4112         * python/py-threadevent.c (py_get_event_thread): Initialize
4113         pythread.
4114
4115 2018-08-24  Pedro Alves  <palves@redhat.com>
4116
4117         * python/py-bpevent.c (create_breakpoint_event_object): Use
4118         copy-initialization.
4119         * python/py-continueevent.c (emit_continue_event): Use
4120         copy-initialization.
4121         * python/py-exitedevent.c (create_exited_event_object): Return a
4122         gdbpy_ref<>.
4123         (emit_exited_event): Use copy-initialization.
4124         * python/py-inferior.c (python_new_inferior)
4125         (python_inferior_deleted, add_thread_object): Use
4126         copy-initialization.
4127         * python/py-infevents.c (create_inferior_call_event_object)
4128         (create_register_changed_event_object)
4129         (create_memory_changed_event_object): Return a gdbpy_ref<>.
4130         (emit_inferior_call_event, emit_memory_changed_event)
4131         (emit_register_changed_event): Use copy-initialization.
4132         * python/py-newobjfileevent.c (create_new_objfile_event_object):
4133         Return a gdbpy_ref<>.
4134         (emit_new_objfile_event): Use copy-initialization.
4135         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
4136         (emit_clear_objfiles_event): Use copy-initialization.
4137         * python/py-signalevent.c (create_signal_event_object): Use
4138         copy-initialization.
4139         * python/py-threadevent.c (create_thread_event_object): Use
4140         copy-initialization.
4141
4142 2018-08-24  Pedro Alves  <palves@redhat.com>
4143             Simon Marchi  <simon.marchi@ericsson.com>
4144
4145         PR gdb/23379
4146         * python/py-continueevent.c: Include "gdbthread.h".
4147         (create_continue_event_object): Add intro comment.  Add 'ptid'
4148         parameter.  Use it to find thread to pass to
4149         create_thread_event_object.
4150         (emit_continue_event): Pass PTID down to
4151         create_continue_event_object.
4152         * python/py-event.h (py_get_event_thread): Declare.
4153         (create_thread_event_object): Remove default from 'thread'
4154         parameter.
4155         * python/py-stopevent.c (create_stop_event_object): Use
4156         py_get_event_thread.
4157         * python/py-threadevent.c (get_event_thread): Rename to ...
4158         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
4159         and use it to find the thread.
4160         (create_thread_event_object): Assert that THREAD isn't null.
4161         Don't find the event thread here.
4162
4163 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
4164
4165         * block.h (blockrange, blockranges): New struct declarations.
4166         (struct block): Add new field named `ranges'.
4167         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
4168         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
4169         macros for accessing ranges in struct block.
4170         (make_blockranges): New declaration.
4171         block.c (make_blockranges): New function.
4172         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
4173         for block.
4174         * symtab.h (find_pc_partial_function): Add new parameter `block'.
4175         * blockframe.c (cache_pc_function_block): New static global.
4176         (clear_pc_function_cache): Clear cache_pc_function_block.
4177         (find_pc_partial_function): Move comment to symtab.h.  Add
4178         support for non-contiguous blocks.
4179         * cli/cli-cmds.c (block.h): Include.
4180         (print_disassembly): Handle printing of non-contiguous blocks.
4181         (disassemble_current_function): Likewise.
4182         (disassemble_command): Likewise.
4183
4184         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
4185         BLOCK_START.
4186         * blockframe.c (get_pc_function_start): Likewise.
4187         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
4188         (gcc_symbol_address): Likewise.
4189         * compile/compile-object-run.c (compile_object_run): Likewise.
4190         * compile/compile.c (get_expr_block_and_pc): Likewise.
4191         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
4192         (func_addr_to_tail_call_list): Likewise.
4193         * findvar.c (default_read_var_value): Likewise.
4194         * inline-frame.c (inline_frame_this_id): Likewise.
4195         (skip-inline_frames): Likewise.
4196         * infcmd.c (until_next_command): Likewise.
4197         * linespec.c (convert_linespec_to_sals): Likewise.
4198         * parse.c (parse_exp_in_context_1): Likewise.
4199         * printcmd.c (build_address_symbolic): likewise.
4200         (info_address_command): Likewise.
4201         symtab.c (find_function_start_sal): Likewise.
4202         (skip_prologue_sal): Likewise.
4203         (find_function_alias_target): Likewise.
4204         (find_gnu_ifunc): Likewise.
4205         * stack.c (find_frame_funname): Likewise.
4206         * symtab.c (fixup_symbol_section): Likewise.
4207         (find_function_start_sal): Likewise.
4208         (skip_prologue_sal): Likewsie.
4209         (find_function_alias_target): Likewise.
4210         (find_gnu_ifunc): Likewise.
4211         * tracepoint.c (info_scope_command): Likewise.
4212         * value.c (value_fn_field): Likewise.
4213
4214         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4215         in place of find_pc_partial_function.
4216         * blockframe.c (find_function_entry_range_from_pc): New function.
4217         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4218         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4219         for each range in a block.
4220
4221
4222 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4223
4224         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4225         incrementation.
4226
4227 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4228
4229         * solib-svr4.c (read_program_headers_from_bfd): Return
4230         gdb::optional<gdb::byte_vector>.
4231         (svr4_exec_displacement): Adjust.
4232
4233 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4234
4235         * solib-svr4.c (read_program_header): Return
4236         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4237         (find_program_interpreter): Return
4238         gdb::optional<gdb::byte_vector>.
4239         (scan_dyntag_auxv): Adjust.
4240         (enable_break): Adjust.
4241         (svr4_exec_displacement): Adjust.
4242
4243 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4244
4245         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4246         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4247
4248 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4249
4250         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4251         string_vprintf.
4252         * guile/scm-utils.c (gdbscm_printf): Likewise.
4253         * serial.c (serial_printf): Likewise.
4254         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4255
4256 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4257
4258         * stack.c (print_frame): Print frame architecture when printing on
4259         an MI output.
4260         * NEWS: Mention new "arch" attribute in frame output.
4261
4262 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4263
4264         * arch/aarch64.h (aarch64_regnum): Update comment.
4265
4266 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4267
4268         * NEWS: Add SVE to 8.2 section.
4269
4270 2018-08-21  Pedro Alves  <palves@redhat.com>
4271
4272         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4273         out from gdbscm_parse_function_args.
4274         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4275         gdbscm_parse_function_args_1.
4276
4277 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4278
4279         PR gdb/17816
4280         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4281         operator.
4282
4283 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4284
4285         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4286
4287 2018-08-19  Michael Spang  <spang@google.com>
4288
4289         PR gdb/11786
4290         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4291         for PT_TLS segments.
4292
4293 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4294
4295         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4296         dwarf_variable_value.
4297         * dwarf2-frame.c (class dwarf_expr_executor):
4298         Add override for dwarf_variable_value.
4299         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4300         (class symbol_needs_eval_context): Likewise.
4301         (indirect_synthetic_pointer): Add forward declaration.
4302         (sect_variable_value): New function.
4303         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4304         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4305         for DW_OP_GNU_variable_value.
4306
4307 2018-08-16  Tom Tromey  <tom@tromey.com>
4308
4309         * top.c (read_command_file): Update.
4310         (command_line_input): Remove "repeat" argument.
4311         * ada-lang.c (get_selections): Update.
4312         * linespec.c (decode_line_2): Update.
4313         * defs.h (command_line_input): Remove argument.
4314         * cli/cli-script.c (read_next_line): Update.
4315         * python/py-gdb-readline.c: Update.
4316
4317 2018-08-17  Tom Tromey  <tom@tromey.com>
4318
4319         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4320         command_line_input.
4321
4322 2018-08-15  Tom Tromey  <tom@tromey.com>
4323
4324         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4325
4326 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4327
4328         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4329         If used, use find_pc_partial_function to find address range
4330         to disassemble.
4331         * mi/mi-main.c (mi_cmd_list_features): Report
4332         "data-disassemble-a-option" feature.
4333         * NEWS: Mention new -data-disassemble option -a.
4334
4335 2018-08-13  Tom Tromey  <tom@tromey.com>
4336
4337         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4338
4339 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4340
4341         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4342         (aarch64_linux_collect_sve_regset): Likewise.
4343         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4344         * regcache.h (regcache_map_entry_size): New function.
4345
4346 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4347
4348         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4349         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4350         (SVE_HEADER_VL_LENGTH): Likewise.
4351         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4352         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4353         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4354         (SVE_HEADER_SIZE_OFFSET): Likewise.
4355         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4356         (SVE_HEADER_VL_OFFSET): Likewise.
4357         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4358         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4359         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4360         (SVE_HEADER_SIZE): Likewise.
4361         (aarch64_linux_core_read_vq): Add function.
4362         (aarch64_linux_core_read_description): Check for SVE section.
4363
4364 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4365
4366         * aarch64-fbsd-tdep.c
4367         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4368         collect_size.
4369         * aarch64-linux-tdep.c
4370         (aarch64_linux_iterate_over_regset_sections): Likewise.
4371         * alpha-linux-tdep.c
4372         (alpha_linux_iterate_over_regset_sections):
4373         * alpha-nbsd-tdep.c
4374         (alphanbsd_iterate_over_regset_sections): Likewise.
4375         * amd64-fbsd-tdep.c
4376         (amd64fbsd_iterate_over_regset_sections): Likewise.
4377         * amd64-linux-tdep.c
4378         (amd64_linux_iterate_over_regset_sections): Likewise.
4379         * arm-bsd-tdep.c
4380         (armbsd_iterate_over_regset_sections): Likewise.
4381         * arm-fbsd-tdep.c
4382         (arm_fbsd_iterate_over_regset_sections): Likewise.
4383         * arm-linux-tdep.c
4384         (arm_linux_iterate_over_regset_sections): Likewise.
4385         * corelow.c (get_core_registers_cb): Likewise.
4386         (core_target::fetch_registers): Likewise.
4387         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4388         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4389         * gdbarch.h (void): Regenerate.
4390         * gdbarch.sh: Add supply_size and collect_size.
4391         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4392         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4393         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4394         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4395         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4396         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4397         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4398         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4399         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4400         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4401         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4402         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4403         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4404         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4405         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
4406         Likewise.
4407         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4408         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4409         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4410         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4411         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4412         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4413         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
4414         Likewise.
4415         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4416         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4417         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4418         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4419         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4420         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4421         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4422         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4423
4424 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4425
4426         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4427         with string_printf.
4428
4429 2018-08-10  Keith Seitz  <keiths@redhat.com>
4430
4431         * compile/compile-c-support.c (add_code_header, add_code_footer):
4432         Move into policy class.
4433         (c_push_user_expression, pop_user_expression_nop)
4434         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4435         (compile_program): New host class.
4436         (c_compile_program): New typedef.
4437         (c_compute_porgram): Use c_compile_program.
4438
4439 2018-08-10  Keith Seitz  <keiths@redhat.com>
4440
4441         * compile/compile-internal.h (compile_instance::~compile_instance):
4442         Remove calls to htab_delete.
4443         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4444         * compile.c (compile_instance::compile_instance): Initialize
4445         htab unique pointers.
4446         (compile_instance::get_cached_type, compile_instance::insert_type)
4447         (compile_instance::error_symbol_once): Update for unique_ptr.
4448
4449 2018-08-10  Keith Seitz  <keiths@redhat.com>
4450
4451         * compile/compile-c-symbols.c (struct symbol_error)
4452         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4453         (compile_instance::insert_symbol_error)
4454         (compile_instance::error_symbol_once): Move to ...
4455         * compile/compile.c: ... here.
4456
4457 2018-08-10  Keith Seitz  <keiths@redhat.com>
4458
4459         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4460         instead of `new_compile_instance'.
4461         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4462         Update description.
4463         If the symbol error map is not initialized, create it.
4464         (generate_c_for_for_one_symbol): Do not check/initialize
4465         the symbol error map.
4466         * compile/compile-c-types.c (compile_c_instance): Make a class.
4467         Update all callers.
4468         (compile_instance::compile_instance): Initialize the type cache.
4469         (get_cached_type): New function.
4470         (insert_type): Update description.
4471         (compile_c_instance::m_default_cflags): Define.
4472         (convert_type): Update description.  Use get_cached_type.
4473         (delete_instance): Moved to destructor.
4474         (new_compile_instance): Moved to constructor.
4475         * compile/compile-c.h (compile_c_instance): Make class inheriting
4476         from compile_instance.
4477         <base>: Remove field.
4478         <type_map, symbol_err_map>: Move to base class.
4479         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4480         * compile/compile-internal.h (compile_instance): Make class.
4481         <type_map_t, symbol_err_map_t>: Define.
4482         <fe>: Rename to `m_gcc_fe'.
4483         <scope, block, gcc_target_options>: Add `m_' prefix.
4484         <m_type_map, m_symbol_err_map>: New fields, moved from
4485         compile_c_instance.
4486         <destroy>: Remove.
4487         (convert_type, new_compile_instance): Remove.
4488         * compile/compile.c (cleanup_compile_instance): Remove.
4489         (compile_to_object): Use unique_ptr to eliminate cleanups.
4490         (compile_instance::set_print_callback, compile_instance::version)
4491         (compile_instance::set_verbose)
4492         (compile_instance::set_driver_filename)
4493         (compile_instance::set_triplet_regexp)
4494         (compile_instance::set_arguments)
4495         (compile_instance::set_source_file)
4496         (compile_instance::compile): Define.
4497
4498 2018-08-10  Keith Seitz  <keiths@redhat.com>
4499
4500         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4501         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4502         gcc-c-fe.def to define C plugin.
4503         (delete_instance): Delete `c_plugin'.
4504         (new_compile_instance): Initialize `c_plugin'.
4505         * compile/compile-c.h: Include gcc_c_plugin.h.
4506         (struct compile_c_instance) <c_plugin>: New member.
4507         * gcc-c-plugin.h: New file.
4508         Update all callers with API change.
4509
4510 2018-08-10  Keith Seitz  <keiths@redhat.com>
4511
4512         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4513         (HFILES_NO_SRCDIR): ... to here.
4514         Add compile-internal.h and compile-c.h.
4515         * compile/compile-c-support.c: Include compile-c.h.
4516         * compile/compile-c-symbols.c: Include compile-c.h.
4517         (generate_c_for_variable_locations): Update comment.
4518         * compile/compile-c-types.c: Include compile-c.h.
4519         * compile/compile-c.h: New file -- moved C language declarations
4520         from other files here.
4521         * compile/compile-internal.h: Do not include hashtab.h or
4522         common/enum-flags.h.
4523         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4524         (gcc_convert_symbol, gcc_symbol_address)
4525         (generate_c_for_variable_locations, c_get_mode_for_size)
4526         (c_get_range_decl_name): Definitions moved to compile-c.h.
4527         * compile/compile-loc2c.c: Include compile-c.h.
4528
4529 2018-08-10  Keith Seitz  <keiths@redhat.com>
4530
4531         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4532         (c_symbol_substitution_name): ... this.
4533         Update all callers.
4534
4535 2018-08-10  Keith Seitz  <keiths@redhat.com>
4536
4537         * compile/compile-c-support.c (c_compute_program): Use
4538         unique_xmalloc_ptr to eliminate cleanup.
4539         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4540         Return a unique_xmalloc_ptr and eliminate cleanup.
4541         * compile/compile-internal.h (generate_c_for_variable_locations):
4542         Return unique_xmalloc_ptr and update description.
4543
4544 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4545
4546         * corelow.c (core_target::get_core_register_section): Rename
4547         min_size to section_min_size.
4548
4549 2018-08-09  Jim Wilson  <jimw@sifive.com>
4550
4551         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4552         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4553         * NEWS: Mention new GNU/Linux RISC-V target.
4554         * configure.host: Add riscv*-*-linux*.
4555         * configure.nat: Add riscv*.
4556         * configure.tgt: Add riscv*-*-linux*.
4557         * riscv-linux-nat.c: New file.
4558         * riscv-linux-tdep.c: New file.
4559
4560 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4561
4562         * infrun.c (resume): Make static, add forward declaration.
4563         (proceed): Update header comment.
4564         * infrun.h (resume): Delete declaration.
4565
4566 2018-08-09  Tom Tromey  <tom@tromey.com>
4567
4568         * riscv-tdep.h: Minor formatting fixes.
4569
4570 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4571
4572         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4573         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4574         (test_mkdir_recursive): Likewise.
4575         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4576
4577 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4578
4579         * valarith.c (value_subscripted_rvalue): If an array is not in
4580         memory, and we don't know the upper bound, then we can't know that
4581         the requested element exists or not.
4582
4583 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4584
4585         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4586         (target_options_to_string): Add comment.
4587
4588 2018-08-08  Tom Tromey  <tom@tromey.com>
4589
4590         * unittests/scoped_mmap-selftests.c: Check result of "write".
4591
4592 2018-08-08  Jim Wilson  <jimw@sifive.com>
4593
4594         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4595         (decode_register_index_short): New.
4596         (decode_j_type_insn, decode_cj_type_insn): New.
4597         (decode_b_type_insn, decode_cb_type_insn): New.
4598         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4599         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4600         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4601         is_c_sw_insn instead of is_sw_insn.
4602         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4603         (riscv_software_single_step): New.
4604         * riscv-tdep.h (riscv_software_single_step): Declare.
4605
4606         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4607         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4608
4609 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4610
4611         PR gdb/18050:
4612         * target.c (dispose_inferior): Don't dispose of inferiors that are
4613         already killed.
4614
4615 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4616
4617         * remote.c (remote_target::download_tracepoint): Change char* to
4618         const char*.
4619
4620 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4621
4622         * target.h (target_options_to_string): Return an std::string.
4623         * target.c (str_comma_list_concat_elem): Return void, use
4624         std::string.
4625         (do_option): Likewise.
4626         (target_options_to_string): Return an std::string.
4627         * linux-nat.c (linux_nat_target::wait): Adjust.
4628         * target-debug.h (target_debug_print_options): Adjust.
4629
4630 2018-08-07  Tom Tromey  <tom@tromey.com>
4631
4632         * Makefile.in (CPPFLAGS): New variable.
4633         (INTERNAL_CPPFLAGS): Use it.
4634
4635 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4636
4637         * NEWS: Mention the index cache.
4638
4639 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4640
4641         * common/pathstuff.h (get_standard_cache_dir): New.
4642         * common/pathstuff.c (get_standard_cache_dir): New.
4643         * build-id.h (build_id_to_string): New.
4644         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4645         DEBUG_STR_SUFFIX): Move to here.
4646         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4647         DEBUG_STR_SUFFIX): Move from there.
4648         (write_psymtabs_to_index): Make non-static, add basename
4649         parameter.  Write to temporary files, rename when done.
4650         (save_gdb_index_command): Adjust call to
4651         write_psymtabs_to_index.
4652         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4653         field.
4654         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4655         (get_gdb_index_contents_from_cache): New.
4656         (get_gdb_index_contents_from_cache_dwz): New.
4657         (dwarf2_initialize_objfile): Read index from cache.
4658         (dwarf2_build_psymtabs): Save to index.
4659         * dwarf-index-cache.h: New file.
4660         * dwarf-index-cache.c: New file.
4661         * dwarf-index-write.h: New file.
4662
4663 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4664
4665         * gnulib/aclocal.m4: Re-generate.
4666         * gnulib/config.in: Re-generate.
4667         * gnulib/configure: Re-generate.
4668         * gnulib/import/Makefile.am: Re-generate.
4669         * gnulib/import/Makefile.in: Re-generate.
4670         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4671         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4672         * gnulib/import/m4/mkdir.m4: New file.
4673         * gnulib/import/mkdir.c: New file.
4674         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4675         module.
4676
4677 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4678
4679         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4680         * common/scoped_mmap.c: New file.
4681         * common/scoped_mmap.h (destroy): New method.
4682         (~scoped_mmap, reset): Use destroy.
4683         (scoped_mmap): New move constructor.
4684         (mmap_file): New declaration.
4685         * unittests/scoped_mmap-selftests.c (test_normal,
4686         test_invalid_filename, run_tests): New functions.
4687         (_initialize_scoped_mmap_selftests): Register selftest.
4688
4689 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4690
4691         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4692         (read_gdb_index_from_buffer): ... this.  Remove section
4693         parameter, add buffer parameter.
4694         (get_gdb_index_contents_ftype,
4695         get_gdb_index_contents_dwz_ftype): New typedefs.
4696         (dwarf2_read_gdb_index): Add callback parameters to get the
4697         index contents.
4698         (get_gdb_index_contents_from_section): New.
4699         (dwarf2_initialize_objfile): Update call to
4700         dwarf2_read_gdb_index.
4701
4702 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4703
4704         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4705         (gdb_open_cloexec): Likewise.
4706         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4707         (commandline_from_pid): Likewise.
4708         (linux_xfer_osdata_threads): Likewise.
4709         (linux_xfer_osdata_fds): Likewise.
4710         * ada-lang.c (is_package_name): Likewise.
4711         * auxv.c (procfs_xfer_auxv): Likewise.
4712         * breakpoint.c (print_one_breakpoint_location): Use
4713         uiout::field_fmt.
4714         (print_one_catch_solib): Use string_printf.
4715         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4716         (add_pe_forwarded_sym): Likewise.
4717         * dwarf2read.c (create_type_unit_group): Likewise.
4718         (build_error_marker_type): Likewise.
4719         * infcall.c (get_function_name): Likewise.
4720         * valprint.c (print_converted_chars_to_obstack): Likewise.
4721         * xtensa-tdep.c (xtensa_register_type): Likewise.
4722
4723 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4724
4725         * remote.c (remote_target::download_tracepoint): Fix format
4726         string errors.
4727
4728 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4729
4730         * tracefile.c: Include common/byte-vector.h.
4731         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4732         with trace_regblock_size if needed.  Update uses of buf.
4733
4734 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4735
4736         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4737         std::vector<unsigned char>.
4738         * tracepoint.c (collection_list::collection_list): Remove
4739         m_regs_mask initializer from initializer list.  Resize
4740         m_regs_mask using the largest remote register number.
4741         (collection_list::add_remote_register): Remove size check on
4742         m_regs_mask.  Use at to access element.
4743         (collection_list::stringify): Change type of temp_buf to
4744         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4745         stringify the register mask.  Use pack_hex_byte for the register
4746         mask.
4747
4748 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4749
4750         * tracepoint.h (class collection_list) <add_register>: Remove.
4751         <add_remote_register, add_ax_registers, add_local_register>:
4752         Declare.
4753         <add_memrange>: Add scope parameter.
4754         * tracepoint.c (encode_actions_1): Likewise.
4755         (collection_list::add_register): Rename to ...
4756         (collection_list::add_remote_register): ... this.  Update
4757         comment.
4758         (collection_list::add_ax_registers, add_local_register): New
4759         methods.
4760         (collection_list::add_memrange): Add scope parameter.  Call
4761         add_local_register instead of add_register.
4762         (finalize_tracepoint_aexpr): New function.
4763         (collection_list::collect_symbol): Update calls to add_memrange.
4764         Call add_local_register instead of add_register.  Call
4765         add_ax_registers.  Call finalize_tracepoint_aexpr.
4766         (encode_actions_1): Get remote regnos for $reg action.  Call
4767         add_remote_register, add_ax_registers, and add_local_register.
4768         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4769         (validate_actionline): Call finalize_tracepoint_aexpr.
4770
4771 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4772
4773         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4774         Replace array buf with gdb::char_vector buf, of size
4775         get_remote_packet_size ().  Replace references to buf and
4776         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4777         and xsnprintf with snprintf.  Raise errors if the buffer is too
4778         small.
4779
4780 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4781
4782         * remote.c (remote_target::download_tracepoint): Fix the has_more
4783         predicate in the QTDP action list iteration.
4784
4785 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4786
4787         * remote.c (remote_target::download_tracepoint): Fix indentation
4788         in for block.
4789
4790 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4791
4792         * proc-api.c (_initialize_proc_api): Remove c, unused.
4793         * procfs.c (procfs_init_inferior): Remove signals, unused.
4794         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4795         unused.
4796
4797 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4798             Andrew Burgess  <andrew.burgess@embecosm.com>
4799
4800         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4801         'W_STOPCODE (0)' as this could be ambiguous.
4802
4803 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4804
4805         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4806         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4807         "ai_socktype").
4808
4809 2018-08-02  Tom Tromey  <tom@tromey.com>
4810
4811         PR symtab/16842.
4812         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4813         symbols.
4814         (process_structure_scope): Likewise.
4815
4816 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4817
4818         PR gdb/22629:
4819         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4820         kill inferior.
4821
4822 2018-08-02  Tom Tromey  <tom@tromey.com>
4823
4824         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4825         (darwin_suspend_inferior, darwin_resume_inferior)
4826         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4827         (darwin_check_new_threads): Check result of get_darwin_inferior.
4828
4829 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4830
4831         GDB 8.1.1 released.
4832
4833 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4834
4835         * varobj.c (varobj_get_path_expr_parent): Report an error if
4836         parent is a dynamic varobj.
4837
4838 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4839
4840         * gnulib/aclocal.m4: Re-generate.
4841         * gnulib/config.in: Re-generate.
4842         * gnulib/configure: Re-generate.
4843         * gnulib/import/Makefile.in: Re-generate.
4844         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4845         * gnulib/import/m4/onceonly.m4: Re-generate.
4846
4847 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4848
4849         * target-descriptions.c (struct xml_test_tdesc): New.
4850         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4851         (record_xml_tdesc): Update.
4852         (maintenance_check_xml_descriptions): Update.
4853         * target-descriptions.h (record_xml_tdesc): Update comment.
4854
4855 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4856
4857         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4858         checking array bounds are defined.
4859
4860 2018-07-30  Tom Tromey  <tom@tromey.com>
4861
4862         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4863         irreflexivity violation.
4864
4865 2018-07-30  Tom Tromey  <tom@tromey.com>
4866
4867         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4868         * value.c (unpack_long): Remove lint code.
4869         * valops.c (value_ind): Remove lint code.
4870         * valarith.c (value_x_binop, value_x_unop, value_equal)
4871         (value_pos): Remove lint code.
4872
4873 2018-07-28  Tom de Vries  <tdevries@suse.de>
4874
4875         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4876         with undefined upper bound as <optimized out>.
4877
4878 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4879
4880         * gcore.in: Rename variable "name" to "prefix".  Expand
4881         "usage" text.
4882
4883 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4884
4885         * windows-nat.c (windows_nat_target::create_inferior): Update to
4886         call close() in global namespace.
4887
4888 2018-07-26  Tom Tromey  <tom@tromey.com>
4889
4890         * dwarf-index-write.c (add_address_entry): Don't add objfile
4891         offsets.
4892         * dbxread.c (find_stab_function): Rename from
4893         find_stab_function_addr.  Return a bound_minimal_symbol.
4894         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4895         Don't add objfile offsets.
4896         (end_psymtab): Use raw_text_low, raw_text_high,
4897         MSYMBOL_VALUE_RAW_ADDRESS.
4898         (read_ofile_symtab): Update.
4899         (process_one_symbol): Update.
4900         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4901         offsets.
4902         (dw2_relocate): Remove.
4903         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4904         searching addrmap.
4905         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4906         Update.
4907         (process_psymtab_comp_unit_reader, add_partial_symbol)
4908         (add_partial_subprogram, dwarf2_ranges_read): Update.
4909         (load_partial_dies): Update.
4910         (add_address_entry): Don't add objfile offsets.
4911         (dwarf2_build_include_psymtabs): Update.
4912         (create_addrmap_from_aranges): Don't add objfile offsets.
4913         (dw2_find_pc_sect_compunit_symtab): Update.
4914         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4915         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4916         Update.
4917         (parse_partial_symbols): Don't add objfile offsets.  Use
4918         raw_text_low, raw_text_high.  Update.
4919         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4920         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4921         or call 'relocate' quick function.  Clear psymbol_map.
4922         * psympriv.h (struct partial_symbol) <address>: Add section
4923         offset.
4924         <set_unrelocated_address>: Rename from set_address.
4925         <raw_text_low, raw_text_high>: New methods.
4926         <text_low, text_high>: Add objfile parameter.
4927         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4928         set_unrelocated_address.
4929         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4930         (find_pc_psymbol): Update.
4931         (fixup_psymbol_section, relocate_psymtabs): Remove.
4932         (dump_psymtab, psym_functions): Update.
4933         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4934         parameter.
4935         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4936         (start_psymtab_common): Update.
4937         * symfile-debug.c (debug_qf_relocate): Remove.
4938         (debug_sym_quick_functions): Update.
4939         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4940         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4941         Update.
4942
4943 2018-07-26  Tom Tromey  <tromey@redhat.com>
4944
4945         * dbxread.c (end_psymtab): Use text_high_valid and
4946         text_low_valid.
4947         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4948         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4949         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4950         Update comment.
4951         <text_low_valid, text_high_valid>: New fields.
4952         <set_text_low, set_text_high>: Update.
4953         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4954
4955 2018-07-26  Tom Tromey  <tom@tromey.com>
4956
4957         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4958         Update.
4959         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4960         textlow and texthigh fields.
4961         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4962         Update.
4963         * mdebugread.c (parse_lines, parse_partial_symbols)
4964         (psymtab_to_symtab_1): Update.
4965         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4966         Rename fields.  Update comment.  Now private.
4967         <text_low, text_high, set_text_low, set_text_high>: New methods.
4968         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4969         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4970         (start_psymtab_common, maintenance_info_psymtabs)
4971         (maintenance_check_psymtabs): Update.
4972         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4973         texthigh fields.
4974         (scan_xcoff_symtab): Update.
4975
4976 2018-07-26  Tom Tromey  <tromey@redhat.com>
4977
4978         * psympriv.h (struct partial_symbol) <unrelocated_address,
4979         address, set_address>: New methods.
4980         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4981         (fixup_psymbol_section, relocate_psymtabs): Update.
4982         (print_partial_symbols): Add 'objfile' parameter.  Update.
4983         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4984         Update.
4985
4986 2018-07-26  Tom Tromey  <tom@tromey.com>
4987
4988         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4989         (debug_names::write_psymbols): Update.
4990         * psympriv.h (struct partial_symbol): Derive from
4991         general_symbol_info.
4992         <obj_section>: New method.
4993         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4994         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4995         (find_pc_sect_psymbol, fixup_psymbol_section)
4996         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4997         (print_partial_symbols, recursively_search_psymtabs)
4998         (compare_psymbols, psymbol_hash, psymbol_compare)
4999         (add_psymbol_to_bcache, maintenance_check_psymtabs)
5000         (psymbol_name_matches, psym_fill_psymbol_map): Update.
5001
5002 2018-07-26  Tom Tromey  <tromey@redhat.com>
5003
5004         * dbxread.c (end_psymtab): Remove dead code.
5005
5006 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
5007
5008         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
5009         DWARF unwinders are disabled.
5010         * dwarf2-frame.c: Add dwarf2read.h include.
5011         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
5012         disabled.
5013         (dwarf2_frame_unwinders_enabled_p): Define.
5014         (show_dwarf_unwinders_enabled_p): New function.
5015         (_initialize_dwarf2_frame): Register switch to control DWARF
5016         unwinder use.
5017         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
5018         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
5019         (show_dwarf_cmdlist): Remove static keyword.
5020         * dwarf2read.h (set_dwarf_cmdlist): Declare.
5021         (show_dwarf_cmdlist): Declare.
5022         * NEWS: Document new feature.
5023
5024 2018-07-26  Tom de Vries  <tdevries@suse.de>
5025
5026         PR breakpoints/23366
5027         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
5028
5029 2018-07-26  Tom de Vries  <tdevries@suse.de>
5030
5031         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
5032         DW_AT_count can't be translated to a dynamic prop.
5033
5034 2018-07-25  Tom de Vries  <tdevries@suse.de>
5035
5036         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
5037         try/catch.
5038
5039 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
5040
5041         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
5042
5043 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
5044
5045         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
5046
5047 2018-07-24  Keith Seitz  <keiths@redhat.comt
5048
5049         PR symtab/23010
5050         * dwarf2read.c (dw2_add_symbol_to_list): New function.
5051         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
5052         instead of add_symbol_to_list.
5053         (read_file_scope): Call prepare_one_comp_unit before reading
5054         any other DIEs.
5055
5056 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
5057
5058         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
5059
5060 2018-07-24  Tom Tromey  <tom@tromey.com>
5061
5062         * utils.c (malloc, realloc, free): Don't declare.
5063         * configure, config.in: Rebuild.
5064         * configure.ac: Don't check for declarations of free, malloc, or
5065         realloc.
5066
5067 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5068
5069         * aarch64-linux-nat.c
5070         (aarch64_linux_nat_target::stopped_data_address): Remove unused
5071         variable.
5072         * arm-linux-nat.c (fetch_regs): Likewise.
5073         (store_regs): Likewise.
5074         (fetch_vfp_regs): Likewise.
5075         (store_vfp_regs): Likewise.
5076         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
5077         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
5078         (arm_linux_nat_target::insert_watchpoint): Likewise.
5079         (arm_linux_nat_target::remove_watchpoint): Likewise.
5080         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
5081         Likewise.
5082         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
5083         Likewise.
5084         * ppc-linux-nat.c (fetch_register): Likewise.
5085         (fetch_all_gp_regs): Likewise.
5086         (fetch_ppc_registers): Likewise.
5087         (store_all_gp_regs): Likewise.
5088         (store_ppc_registers): Likewise.
5089         (hwdebug_insert_point): Likewise.
5090         (can_use_watchpoint_cond_accel): Likewise.
5091         * remote-sim.c (gdb_os_write_stdout): Likewise.
5092
5093 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
5094             Tom Tromey  <tom@tromey.com>
5095
5096         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
5097         test for it.
5098         * configure: Rebuild.
5099
5100 2018-07-22  Tom Tromey  <tom@tromey.com>
5101
5102         * regformats/regdat.sh: Define xmltarget_${name} inside
5103         #ifndef IN_PROCESS_AGENT.
5104
5105 2018-07-22  Tom Tromey  <tom@tromey.com>
5106
5107         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
5108
5109 2018-07-22  Tom Tromey  <tom@tromey.com>
5110
5111         * symfile.c (reread_symbols): Notify iter, not objfile.
5112
5113 2018-07-22  Tom Tromey  <tom@tromey.com>
5114
5115         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
5116         Use arch_ops.
5117         (ravenscar_thread_target::prepare_to_store): Likewise.
5118
5119 2018-07-22  Tom Tromey  <tom@tromey.com>
5120
5121         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
5122         unused variable.  Call value_fetch_lazy when needed.
5123         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
5124         Remove unused variable.  Call value_fetch_lazy when needed.
5125
5126 2018-07-22  Tom Tromey  <tom@tromey.com>
5127
5128         * m32c-tdep.c (mark_dma): Return void.
5129         (make_regs): Remove unused declarations.
5130
5131 2018-07-22  Tom Tromey  <tom@tromey.com>
5132
5133         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
5134         cmdscm_get_valid_command_smob_arg_unsafe for effect.
5135         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
5136         bkscm_get_valid_block_smob_arg_unsafe for effect.
5137
5138 2018-07-22  Tom Tromey  <tom@tromey.com>
5139
5140         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
5141         value_type.
5142
5143 2018-07-22  Tom Tromey  <tom@tromey.com>
5144
5145         * windows-nat.c (saved_context): Conditionally define.
5146         * remote.c (remote_target::remote_btrace_maybe_reopen):
5147         Conditionally declare "warned".
5148         * inflow.c (sigquit_ours): Conditionally define.
5149         (new_tty): Move "tty" declaration inside #if.
5150         * guile/guile.c (guile_datadir): Conditionally define.
5151         * charset.c (set_be_le_names): Move some declarations inside #if.
5152         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
5153         #if.
5154         (parse_xml_btrace_conf): Likewise.
5155
5156 2018-07-22  Tom Tromey  <tom@tromey.com>
5157
5158         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
5159
5160 2018-07-22  Tom Tromey  <tom@tromey.com>
5161
5162         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
5163         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
5164         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
5165         * buildsym-legacy.c (get_macro_table): Remove unused variable.
5166         * stack.c (frame_apply_level_command): Remove unused variable.
5167         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
5168         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
5169         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
5170         unused variable.
5171         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
5172         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
5173         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
5174         variable.
5175         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
5176         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
5177         variable.
5178         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
5179         Remove unused variable.
5180         * cli/cli-script.c (recurse_read_control_structure): Remove unused
5181         variable.
5182         * common/tdesc.c (print_xml_feature::visit): Remove unused
5183         variable.
5184         * compile/compile-object-load.c (store_regs): Remove unused
5185         variables.
5186         * complaints.c (clear_complaints): Remove unused variable.
5187         * corelow.c (core_target_open): Remove unused variable.
5188         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
5189         variable.
5190         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
5191         variable.
5192         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
5193         variable.
5194         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
5195         variable.
5196         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
5197         variable.
5198         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
5199         variable.
5200         * ia64-tdep.c (examine_prologue): Remove unused variable.
5201         * infcall.c (run_inferior_call): Remove unused variable.
5202         * inferior.c (exit_inferior): Remove unused variable.
5203         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
5204         * linespec.c (decode_line_2): Remove unused variable.
5205         * linux-nat.c (super_close): Remove.
5206         * linux-tdep.c (linux_info_proc): Remove unused variable.
5207         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5208         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5209         Remove unused variable.
5210         * parse.c (find_minsym_type_and_address): Remove unused variable.
5211         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5212         variable.
5213         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5214         variable.
5215         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5216         variables.
5217         * record-btrace.c (record_btrace_target::store_registers): Remove
5218         unused variable.
5219         (cmd_show_record_btrace_cpu): Remove unused variable.
5220         * riscv-tdep.c (riscv_register_reggroup_p)
5221         (riscv_push_dummy_call, riscv_return_value): Remove unused
5222         variable.
5223         * rust-exp.y (literal): Remove unused variable.
5224         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5225         unused variable.
5226         <STRUCTOP_ANONYMOUS>: Likewise.
5227         * s390-linux-tdep.c (s390_linux_init_abi_31)
5228         (s390_linux_init_abi_64): Remove unused variable.
5229         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5230         (file_select_thread, net_windows_open, _initialize_ser_windows):
5231         Remove unused variables.
5232         * symtab.c (find_pc_sect_line): Remove unused variable.
5233         * target-memory.c (compute_garbled_blocks): Remove unused
5234         variable.
5235         (target_write_memory_blocks): Remove unused variable.
5236         * target.c (target_stack::unpush): Remove unused variables.
5237         * tracepoint.c (start_tracing, all_tracepoint_actions)
5238         (merge_uploaded_trace_state_variables)
5239         (print_one_static_tracepoint_marker): Remove unused variable.
5240         * unittests/basic_string_view/element_access/char/1.cc (test01):
5241         Remove unused variable.
5242         * windows-nat.c (windows_continue, windows_add_all_dlls)
5243         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5244         Remove unused variables.
5245
5246 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5247
5248         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5249         attr_profile in HAVE_ELF.
5250         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5251         HAVE_ELF.
5252
5253 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5254
5255         * frame.c (frame_register_unwind): Change parameter name.
5256         (frame_unwind_register): Likewise.
5257         (frame_unwind_register_value): Likewise.
5258         (frame_unwind_register_signed): Likewise.
5259         (frame_unwind_register_unsigned): Likewise.
5260         * frame.h (frame_register_unwind): Likewise.
5261         (frame_unwind_register): Likewise.
5262         (frame_unwind_register_value): Likewise.
5263         (frame_unwind_register_signed): Likewise.
5264         (frame_unwind_register_unsigned): Likewise.
5265         (frame_unwind_arch): Likewise.
5266
5267 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5268
5269         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5270         ISA maintenance.
5271
5272 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5273
5274         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5275         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5276         hand.
5277
5278 2018-07-20  Keith Seitz  <keiths@redhat.com>
5279
5280         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5281         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5282         m_compunit_symtab, m_language>: Add "m_" prefix.
5283         Update all uses.
5284         * buildsym.c: Update all uses.
5285
5286 2018-07-20  Tom Tromey  <tom@tromey.com>
5287
5288         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5289         * buildsym.h (record_line_ftype): Remove typedef.
5290
5291 2018-07-20  Tom Tromey  <tom@tromey.com>
5292
5293         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5294         (end_expandable_symtab): Likewise.
5295         (end_symtab_get_static_block): Likewise.
5296         (end_symtab_from_static_block): Likewise.
5297         * buildsym-legacy.c (augment_type_symtab): Remove.
5298         (end_expandable_symtab): Remove.
5299         (end_symtab_get_static_block): Remove.
5300         (end_symtab_from_static_block): Remove.
5301
5302 2018-07-20  Tom Tromey  <tom@tromey.com>
5303
5304         * dwarf2read.c: Include buildsym.h.
5305         (struct dwarf2_cu) <builder>: New method.
5306         (fixup_go_packaging): Update.
5307         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5308         use scoped_free_pendings.
5309         (using_directives): Add "cu" parameter, remove "language".
5310         (read_import_statement, setup_type_unit_groups, )
5311         (read_func_scope, read_lexical_block_scope)
5312         (dwarf2_record_block_ranges, read_namespace): Update.
5313         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5314         (lnp_state_machine::handle_end_sequence): Update.
5315         (class lnp_state_machine) <m_cu>: New member.
5316         <m_record_line_callback>: Remove.
5317         <m_currently_recording_lines>: New member.
5318         (lnp_state_machine::handle_set_file): Update.
5319         (noop_record_line): Remove.
5320         (dwarf_record_line_p): Add cu parameter.
5321         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5322         (lnp_state_machine::record_line)
5323         (lnp_state_machine::lnp_state_machine)
5324         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5325         (dwarf_decode_lines): Update.
5326         (dwarf2_start_subfile): Add cu parameter.
5327         (dwarf2_start_symtab, new_symbol): Update.
5328         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5329         Remove dwarf2_per_objfile parameter.
5330         (dwarf_decode_macros): Update.
5331
5332 2018-07-20  Tom Tromey  <tom@tromey.com>
5333
5334         * stabsread.c (define_symbol): Update.
5335         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5336         * dwarf2read.c (new_symbol): Update.
5337         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5338         * cp-namespace.c: Include buildsym.h.
5339         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5340         * buildsym-legacy.c (get_buildsym_compunit): New function.
5341
5342 2018-07-20  Tom Tromey  <tom@tromey.com>
5343
5344         * xcoffread.c: Include buildsym-legacy.h.
5345         * windows-nat.c: Include buildsym-legacy.h.
5346         * stabsread.c: Include buildsym-legacy.h.
5347         * mdebugread.c: Include buildsym-legacy.h.
5348         * buildsym-legacy.h: New file.
5349         * buildsym-legacy.c: New file, from buildsym.c.
5350         * go32-nat.c: Include buildsym-legacy.h.
5351         * dwarf2read.c: Include buildsym-legacy.h.
5352         * dbxread.c: Include buildsym-legacy.h.
5353         * cp-namespace.c: Include buildsym-legacy.h.
5354         * coffread.c: Include buildsym-legacy.h.
5355         * buildsym.h: Move some contents to buildsym-legacy.h.
5356         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5357         buildsym-legacy.c.
5358         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5359
5360 2018-07-20  Tom Tromey  <tom@tromey.com>
5361
5362         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5363         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5364         (buildsym_compunit::buildsym_compunit)
5365         (buildsym_compunit::~buildsym_compunit)
5366         (buildsym_compunit::get_macro_table): Define.
5367
5368 2018-07-20  Tom Tromey  <tom@tromey.com>
5369
5370         * buildsym.c (reset_symtab_globals): Remove.
5371         (buildsym_compunit::end_symtab_from_static_block): Update.
5372         (buildsym_compunit::augment_type_symtab): Update.
5373         (end_symtab_from_static_block): Call free_buildsym_compunit.
5374         (augment_type_symtab, end_symtab, end_expandable_symtab):
5375         Likewise.
5376
5377 2018-07-20  Tom Tromey  <tom@tromey.com>
5378
5379         * arch-utils.c: Do not include buildsym.h.
5380         * mipsread.c: Do not include buildsym.h.
5381         * machoread.c: Do not include buildsym.h.
5382         * elfread.c: Do not include buildsym.h.
5383
5384 2018-07-20  Tom Tromey  <tom@tromey.com>
5385
5386         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5387         initialization.
5388         (buildsym_compunit): Add new constructor.
5389         (struct buildsym_compunit) <get_last_source_file, finish_block,
5390         record_block_range, start_subfile, patch_subfile_names,
5391         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5392         set_last_source_start_addr, get_last_source_start_addr,
5393         get_local_using_directives, set_local_using_directives,
5394         get_global_using_directives, outermost_context_p,
5395         get_current_context_stack, get_context_stack_depth,
5396         get_current_subfile, get_local_symbols, get_file_symbols,
5397         get_global_symbols, record_debugformat, record_producer,
5398         push_context, pop_context, end_symtab_get_static_block,
5399         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5400         New public methods.
5401         <record_pending_block, finish_block_internal, make_blockvector,
5402         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5403         private methods.
5404         Update all users.
5405
5406 2018-05-22  Tom Tromey  <tom@tromey.com>
5407
5408         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5409         parameter.
5410         (finish_block_internal): Update.
5411
5412 2018-07-20  Tom Tromey  <tom@tromey.com>
5413
5414         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5415         parameter.
5416         (finish_block_internal): Update.
5417
5418 2018-07-20  Tom Tromey  <tom@tromey.com>
5419
5420         * buildsym.h (EXTERN): Don't define or undef.
5421         * buildsym.c (EXTERN): Don't define.
5422
5423 2018-07-20  Tom Tromey  <tom@tromey.com>
5424
5425         * buildsym.c: Remove TODO comment.
5426
5427 2018-07-20  Tom Tromey  <tom@tromey.com>
5428
5429         * coffread.c (coff_symtab_read): Update.
5430         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5431         (xcoff_new_init): Update.
5432         * mipsread.c (mipscoff_new_init): Update.
5433         * mdebugread.c (mdebug_build_psymtabs): Update.
5434         * elfread.c (elf_new_init): Update.
5435         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5436         Update.
5437         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5438         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5439         (stabsect_build_psymtabs): Update.
5440         * buildsym.h (buildsym_init): Don't declare.
5441         * buildsym.c: Update comment.
5442         (prepare_for_building): Remove.
5443         (start_symtab, restart_symtab): Update.
5444         (reset_symtab_globals): Update comment.
5445         (buildsym_init): Remove.
5446
5447 2018-07-20  Tom Tromey  <tom@tromey.com>
5448
5449         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5450         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5451         (read_enum_type, common_block_start, common_block_end)
5452         (cleanup_undefined_types_1, finish_global_stabs): Update.
5453         * mdebugread.c (psymtab_to_symtab_1): Update.
5454         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5455         (read_lexical_block_scope, new_symbol): Update.
5456         * dbxread.c (process_one_symbol): Update.
5457         * coffread.c (coff_symtab_read, process_coff_symbol)
5458         (coff_read_enum_type): Update.
5459         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5460         declare.
5461         (get_local_symbols, get_file_symbols, get_global_symbols): New
5462         functions.
5463         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5464         m_global_symbols.
5465         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5466         (~scoped_free_pendings): Update.
5467         (finish_block, prepare_for_building, reset_symtab_globals)
5468         (end_symtab_get_static_block, end_symtab_with_blockvector)
5469         (augment_type_symtab, push_context): Update.
5470         (get_local_symbols, get_file_symbols, get_global_symbols): New
5471         functions.
5472         (buildsym_init): Update.
5473
5474 2018-07-20  Tom Tromey  <tom@tromey.com>
5475
5476         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5477         (process_full_type_unit): Likewise.
5478         (dwarf2_start_symtab): Set list_in_scope.
5479
5480 2018-07-20  Tom Tromey  <tom@tromey.com>
5481
5482         * dwarf2read.c (process_psymtab_comp_unit_reader)
5483         (build_type_psymtabs_reader): Do not set list_in_scope.
5484
5485 2018-07-20  Tom Tromey  <tom@tromey.com>
5486
5487         * buildsym.c (free_pendings): Remove.
5488         (add_symbol_to_list, scoped_free_pendings)
5489         (finish_block_internal, buildsym_init): Update.
5490
5491 2018-07-20  Tom Tromey  <tom@tromey.com>
5492
5493         * xcoffread.c (read_xcoff_symtab): Update.
5494         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5495         Update.
5496         * dbxread.c (process_one_symbol): Update.
5497         * coffread.c (coff_symtab_read): Update.
5498         * buildsym.h (finish_block): Update.
5499         * buildsym.c (finish_block): Remove "listhead" argument.
5500         (end_symtab_get_static_block): Update.
5501
5502 2018-07-20  Tom Tromey  <tom@tromey.com>
5503
5504         * buildsym.h (class scoped_free_pendings): Remove constructor.
5505         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5506         method.
5507         <m_pending_block_obstack, m_pending_blocks>: New members.
5508         (pending_block_obstack, pending_blocks): Remove.
5509         (scoped_free_pendings::scoped_free_pendings): Default.
5510         (~scoped_free_pendings): Update.
5511         (free_pending_blocks): Remove.
5512         (finish_block_internal, record_pending_block, make_blockvector)
5513         (end_symtab_get_static_block, augment_type_symtab, push_context)
5514         (buildsym_init): Update.
5515
5516 2018-07-20  Tom Tromey  <tom@tromey.com>
5517
5518         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5519         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5520         members.
5521         (pending_addrmap, pending_addrmap_obstack)
5522         (pending_addrmap_interesting): Remove.
5523         (scoped_free_pendings, record_block_range, make_blockvector)
5524         (prepare_for_building, reset_symtab_globals, buildsym_init):
5525         Update.
5526
5527 2018-07-20  Tom Tromey  <tom@tromey.com>
5528
5529         * xcoffread.c (process_linenos): Update.
5530         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5531         * mdebugread.c (psymtab_to_symtab_1): Update.
5532         * dwarf2read.c (setup_type_unit_groups)
5533         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5534         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5535         * dbxread.c (process_one_symbol): Update.
5536         * coffread.c (coff_symtab_read, enter_linenos)
5537         (process_coff_symbol): Update.
5538         * buildsym.h (current_subfile): Don't declare.
5539         (get_current_subfile): Declare.
5540         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5541         member.
5542         (start_subfile, free_buildsym_compunit, push_subfile)
5543         (prepare_for_building, start_symtab): Update.
5544         (get_current_subfile): New function.
5545
5546 2018-07-20  Tom Tromey  <tom@tromey.com>
5547
5548         * coffread.c (coff_symtab_read): Update.
5549         * xcoffread.c (read_xcoff_symtab): Update.
5550         * dwarf2read.c (new_symbol): Update.
5551         (read_func_scope, read_lexical_block_scope): Update.
5552         * dbxread.c (process_one_symbol): Update.
5553         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5554         (outermost_context_p): Remove macro.
5555         (outermost_context_p, get_current_context_stack)
5556         (get_context_stack_depth): Declare.
5557         (pop_context): Return struct context_stack.
5558         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5559         member.
5560         (context_stack_size): Remove.
5561         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5562         (prepare_for_building, end_symtab_get_static_block)
5563         (augment_type_symtab, push_context): Update.
5564         (pop_context): Return struct context_stack.
5565         (outermost_context_p, get_current_context_stack)
5566         (get_context_stack_depth): New functions.
5567         (buildsym_init): Update.
5568
5569 2018-07-20  Tom Tromey  <tom@tromey.com>
5570
5571         * rust-exp.y: Now a pure parser.  Update all rules.
5572         (%union): Move earlier.
5573         (current_parser, work_obstack): Remove globals.
5574         (rust_parser, ~rust_parser): Update.
5575         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5576         lex_character, lex_number, lex_string, lex_identifier,
5577         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5578         convert_name, convert_params_to_expression,
5579         convert_ast_to_expression, ast_basic_type, ast_operation,
5580         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5581         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5582         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5583         ast_array_type, ast_slice_type, ast_reference_type,
5584         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5585         (rust_parse): Update.
5586         (rustyyerror, rustyylex): Add parser parameter.
5587         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5588         (rust_lex_stringish_test, rust_lex_test_sequence)
5589         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5590         (rust_lex_test_push_back, rust_lex_tests): Update.
5591
5592 2018-07-19  Pedro Alves  <palves@redhat.com>
5593
5594         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5595         gdb::unique_xmalloc_ptr.
5596         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5597         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5598         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5599         copy-initialization.
5600         * guile/scm-pretty-print.c (ppscm_print_children): Use
5601         gdb::unique_xmalloc_ptr instead of cleanups.
5602         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5603         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5604         gdb::unique_xmalloc_ptr.
5605         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5606         Adjust to use gdb::unique_xmalloc_ptr.
5607         * guile/scm-utils.c (extract_arg): Adjust.
5608         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5609         gdb::unique_xmalloc_ptr instead of a cleanup.
5610
5611 2018-07-19  Tom Tromey  <tom@tromey.com>
5612
5613         * utils.c (do_value_free_to_mark)
5614         (make_cleanup_value_free_to_mark): Remove.
5615         * utils.h (make_cleanup_value_free_to_mark): Remove.
5616
5617 2018-07-19  Pedro Alves  <palves@redhat.com>
5618
5619         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5620         forwarding reference.
5621
5622 2018-07-18  Pedro Alves  <palves@redhat.com>
5623
5624         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5625         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5626         cleanup.
5627
5628 2018-07-18  Pedro Alves  <palves@redhat.com>
5629
5630         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5631         exceptions.
5632         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5633         (gdbscm_wrap): New.
5634         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5635         directly instead of a cleanup.
5636         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5637         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5638         (vlscm_binop_gdbthrow): New, factored out from ...
5639         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5640         (vlscm_rich_compare): Use gdbscm_wrap.
5641         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5642         instead of a cleanup.
5643         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5644         cleanup.
5645         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5646         Use xfree directly instead of a cleanup.
5647         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5648         Adjust to use gdbscm_wrap and scoped_value_mark.
5649         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5650         (gdbscm_value_address, gdbscm_value_dereference)
5651         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5652         scoped_value_mark.
5653         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5654         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5655         scoped_value_mark.
5656         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5657         gdbscm_wrap and scoped_value_mark.
5658         (gdbscm_value_to_string): Use xfree directly instead of a
5659         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5660         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5661         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5662         scoped_value_mark.
5663         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5664         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5665         scoped_value_mark.
5666         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5667         gdbscm_wrap.
5668
5669 2018-07-18  Tom de Vries  <tdevries@suse.de>
5670
5671         * findvar.c (default_read_var_value): Also resolve dynamic type for
5672         LOC_OPTIMIZED_OUT vars.
5673
5674 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5675
5676         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5677         decoding.
5678
5679 2018-07-17  Tom Tromey  <tom@tromey.com>
5680
5681         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5682         (compute_enum_list, pascm_set_param_value_x)
5683         (gdbscm_parameter_value): Update.
5684         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5685         (gdbscm_scm_to_host_string): Update.
5686         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5687         Update.
5688         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5689         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5690         * guile/scm-string.c (gdbscm_scm_to_string): Return
5691         unique_xmalloc_ptr.
5692         (gdbscm_scm_to_host_string): Likewise.
5693
5694 2018-07-17  Tom Tromey  <tom@tromey.com>
5695
5696         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5697         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5698         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5699         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5700         unique_xmalloc_ptr.
5701
5702 2018-07-17  Tom Tromey  <tom@tromey.com>
5703
5704         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5705         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5706         Update.
5707         * guile/scm-cmd.c (cmdscm_function): Update.
5708         * guile/scm-pretty-print.c
5709         (ppscm_print_exception_unless_memory_error): Update.
5710         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5711         Return unique_xmalloc_ptr.
5712
5713 2018-07-17  Tom Tromey  <tom@tromey.com>
5714
5715         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5716         Use string_printf.
5717
5718 2018-07-17  Jim Wilson  <jimw@sifive.com>
5719
5720         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5721         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5722         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5723         unecessary braces after EF_RISCV_RVC test.  Delete call to
5724         set_gdbarch_decr_pc_after_break.
5725
5726         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5727         RISCV_LAST_FP_REGNUM + 1.
5728         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5729
5730 2018-07-17  Tom Tromey  <tom@tromey.com>
5731
5732         * configure.ac: Remove --disable-gdbcli.
5733         * configure: Rebuild.
5734         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5735         (SUBDIR_CLI_CFLAGS): Remove.
5736         (SFILES): Use SUBDIR_CLI_SRCS.
5737         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5738
5739 2018-07-17  Tom Tromey  <tom@tromey.com>
5740
5741         PR gdb/18624:
5742         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5743
5744 2018-07-16  Jim Wilson  <jimw@sifive.com>
5745
5746         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5747
5748 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5749
5750         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5751         variable.
5752         (libunwind_frame_sniffer): Likewise.
5753         (libunwind_frame_prev_register): Likewise.
5754         (libunwind_sigtramp_frame_sniffer): Likewise.
5755         * ia64-tdep.c (ia64_access_reg): Likewise.
5756         (ia64_access_rse_reg): Likewise.
5757         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5758         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5759
5760 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5761
5762         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5763
5764 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5765
5766         * remote-sim.c (gdbsim_target::close,
5767         gdbsim_target::mourn_inferior): Remove unused variables.
5768
5769 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5770
5771         * ia64-tdep.c (ktab_buf): New global.
5772         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5773         (get_kernel_table): Adjust.
5774
5775 2018-07-16  Tom Tromey  <tom@tromey.com>
5776
5777         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5778         * dwarf2read.c (using_directives, new_symbol): Use
5779         outermost_context_p.
5780         * dbxread.c (process_one_symbol): Use outermost_context_p.
5781         * coffread.c (coff_symtab_read): Use outermost_context_p.
5782
5783 2018-07-16  Tom Tromey  <tom@tromey.com>
5784
5785         * dwarf2read.c (using_directives, read_func_scope)
5786         (read_lexical_block_scope): Update.
5787         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5788         * buildsym.h (local_using_directives, global_using_directives):
5789         Don't declare.
5790         (get_local_using_directives, set_local_using_directives)
5791         (get_global_using_directives): Declare.
5792         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5793         m_global_using_directives>: New members.
5794         (finish_block_internal, prepare_for_building)
5795         (reset_symtab_globals, end_symtab_get_static_block)
5796         (push_context): Update.
5797         (get_local_using_directives, set_local_using_directives)
5798         (get_global_using_directives): New functions.
5799         (buildsym_init): Update.
5800
5801 2018-07-16  Tom Tromey  <tom@tromey.com>
5802
5803         * xcoffread.c (xcoff_initial_scan): Don't call
5804         free_pending_blocks.
5805         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5806         * buildsym.h (class scoped_free_pendings): Add constructor.
5807         (free_pending_blocks): Don't declare.
5808         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5809         (free_pending_blocks): Now static.
5810
5811 2018-07-16  Tom Tromey  <tom@tromey.com>
5812
5813         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5814         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5815         member.
5816         (struct subfile_stack): Remove.
5817         (subfile_stack): Remove.
5818         (push_subfile, pop_subfile, buildsym_init): Update.
5819
5820 2018-07-16  Tom Tromey  <tom@tromey.com>
5821
5822         * buildsym.c (push_subfile): Use gdb_assert.
5823         (pop_subfile): Use gdb_assert.
5824
5825 2018-07-16  Tom Tromey  <tom@tromey.com>
5826
5827         * buildsym.h (merge_symbol_lists): Remove.
5828         * buildsym.c (merge_symbol_lists): Remove.
5829
5830 2018-07-16  Tom Tromey  <tom@tromey.com>
5831
5832         * stabsread.c (scan_file_globals): Update comment.
5833         * stabsread.h (scan_file_globals): Move from buildsym.h.
5834         * buildsym.h (scan_file_globals): Move to stabsread.h.
5835
5836 2018-07-16  Tom Tromey  <tom@tromey.com>
5837
5838         * xcoffread.c (xcoff_new_init): Update.
5839         * mipsread.c (mipscoff_new_init): Update.
5840         * mdebugread.c (mdebug_build_psymtabs): Update.
5841         * elfread.c (elf_new_init): Update.
5842         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5843         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5844         * buildsym.h (buildsym_new_init): Don't declare.
5845         * buildsym.c (buildsym_new_init): Remove.
5846
5847 2018-07-16  Tom Tromey  <tom@tromey.com>
5848
5849         * stabsread.h (within_function): Move from buildsym.h.
5850         * stabsread.c (start_stabs): Clear within_function.
5851         * coffread.c (coff_start_symtab): Clear within_function.
5852         * buildsym.h (within_function): Move to stabsread.h.
5853         * buildsym.c (prepare_for_building): Update.
5854
5855 2018-07-16  Tom Tromey  <tom@tromey.com>
5856
5857         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5858         * dwarf2read.c (dwarf2_start_symtab): Don't set
5859         processing_gcc_compilation.
5860         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5861
5862 2018-07-16  Tom Tromey  <tom@tromey.com>
5863
5864         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5865         (next_symbol_text_func): Move from buildsym.h.
5866         * stabsread.c (hashname): Move from buildsym.c.
5867         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5868         (next_symbol_text_func, hashname): Move to stabsread.h.
5869         * buildsym.c: Don't include bcache.h
5870         (hashname): Move to stasbread.c.
5871
5872 2018-07-16  Tom Tromey  <tom@tromey.com>
5873
5874         * buildsym.h (context_stack_size): Don't declare.
5875         * buildsym.c (context_stack_size): New global.
5876
5877 2018-07-16  Tom Tromey  <tom@tromey.com>
5878
5879         * dbxread.c (processing_acc_compilation): New global.
5880         * buildsym.h (processing_acc_compilation): Don't declare.
5881
5882 2018-07-16  Tom Tromey  <tom@tromey.com>
5883
5884         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5885         * dbxread.c (read_ofile_symtab): Update.
5886         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5887         * buildsym.h (last_source_start_addr): Remove.
5888         (set_last_source_start_addr, get_last_source_start_addr):
5889         Declare.
5890         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5891         parameter.
5892         (struct buildsym_compunit) <m_last_source_start_addr>: New
5893         member.
5894         (prepare_for_building): Remove start_addr parameter.
5895         (start_symtab, restart_symtab, end_symtab_get_static_block)
5896         (end_symtab_with_blockvector): Update.
5897         (set_last_source_start_addr, get_last_source_start_addr): New
5898         functions.
5899
5900 2018-07-16  Tom Tromey  <tom@tromey.com>
5901
5902         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5903         member.
5904         (have_line_numbers): Remove.
5905         (record_line, prepare_for_building, end_symtab_get_static_block)
5906         (augment_type_symtab): Update.
5907
5908 2018-07-16  Tom Tromey  <tom@tromey.com>
5909
5910         * buildsym.c (~buildsym_compunit): Free the macro table.
5911         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5912         methods.
5913         <m_pending_macros>: New member.
5914         (pending_macros): Remove.
5915         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5916         (reset_symtab_globals, end_symtab_get_static_block)
5917         (end_symtab_with_blockvector, augment_type_symtab)
5918         (buildsym_init): Update.
5919
5920 2018-07-16  Tom Tromey  <tom@tromey.com>
5921
5922         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5923         parameter.
5924         (buildsym_compunit::set_last_source_file): New method.
5925         <m_last_source_file>: New member.
5926         (prepare_for_building): Remove "name" parameter.
5927         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5928         (last_source_file): Remove.
5929         (set_last_source_file, get_last_source_file): Update.
5930
5931 2018-07-16  Tom Tromey  <tom@tromey.com>
5932
5933         * buildsym.c (prepare_for_building): Add assert.
5934
5935 2018-07-16  Tom Tromey  <tom@tromey.com>
5936
5937         * buildsym.c (~buildsym_compunit): Update.
5938         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5939         (start_subfile, patch_subfile_names)
5940         (end_symtab_with_blockvector): Update.
5941
5942 2018-07-16  Tom Tromey  <tom@tromey.com>
5943
5944         * buildsym.c (struct buildsym_compunit): Add constructor,
5945         destructor, initializers.
5946         (start_buildsym_compunit): Remove.
5947         (free_buildsym_compunit): Use "delete".
5948         (start_symtab, restart_symtab): Use "new".
5949
5950 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5951
5952         * symfile.c (set_objfile_default_section_offset): Remove struct
5953         keyword.
5954
5955 2018-07-14  Stafford Horne  <shorne@gmail.com>
5956
5957         * (Responsible Maintainers): Add myself as or1k maintainer.
5958
5959 2018-07-13  Tom Tromey  <tom@tromey.com>
5960
5961         * symfile.c (set_objfile_default_section_offset): Use extra braces
5962         around initializer.
5963
5964 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5965
5966         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5967         non-branching basr.
5968
5969 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5970
5971         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5972         unittests/cli-utils-selftests.c
5973         * unittests/cli-utils-selftests.c: New file.
5974
5975 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5976
5977         * NEWS: Mention new commands. Mention change to 'thread apply'.
5978
5979 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5980
5981         * thread.c (thr_try_catch_cmd): New function.
5982         (thread_apply_all_command): Handle qcs flags.
5983         (thread_apply_command): Handle qcs flags.
5984         (taas_command): New function.
5985         (tfaas_command): New function.
5986         (_initialize_thread): Update to setup the new commands 'taas
5987         and 'tfaas'. Change doc string for 'thread apply'.
5988
5989 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5990
5991         * stack.c: (trailing_outermost_frame): New function, mostly
5992         extracted from backtrace_command_1.
5993         (leading_innermost_frame): New function.
5994         (backtrace_command_1): Update to call trailing_outermost_frame.
5995         (frame_apply_command_count): New function.
5996         (frame_apply_level_command): New function.
5997         (frame_apply_all_command): New function.
5998         (frame_apply_command): New function.
5999         (faas_command): New function.
6000         (frame_cmd_list): New variable.
6001         (_initialize_stack): Update to setup the new commands 'frame apply'
6002         and 'faas'.
6003
6004 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6005
6006         * cli-utils.c (number_or_range_parser::get_number): Only handle
6007         numbers or convenience var as numbers.
6008         (parse_flags): New function.
6009         (parse_flags_qcs): New function.
6010         (number_or_range_parser::finished): Ensure parsing end is detected
6011         before end of string.
6012         * cli-utils.h (parse_flags): New function.
6013         (parse_flags_qcs): New function.
6014         (number_or_range_parser): Remove m_finished bool.
6015         (number_or_range_parser::skip_range): Set m_in_range to false.
6016
6017 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6018
6019         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
6020         on Windows.
6021
6022 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6023             Jan Kratochvil  <jan.kratochvil@redhat.com>
6024             Paul Fertser  <fercerpav@gmail.com>
6025             Tsutomu Seki  <sekiriki@gmail.com>
6026             Pedro Alves  <palves@redhat.com>
6027
6028         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6029         'unittests/parse-connection-spec-selftests.c'.
6030         (COMMON_SFILES): Add 'common/netstuff.c'.
6031         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
6032         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
6033         * common/netstuff.c: New file.
6034         * common/netstuff.h: New file.
6035         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
6036         (wait_for_connect): Update comment.  New parameter
6037         'gdb::optional<int> sock' instead of 'struct serial *scb'.
6038         Use 'sock' directly instead of 'scb->fd'.
6039         (try_connect): New function, with code from 'net_open'.
6040         (net_open): Rewrite main loop to deal with multiple
6041         sockets/addresses.  Handle IPv6-style hostnames; implement
6042         support for IPv6 connections.
6043         * unittests/parse-connection-spec-selftests.c: New file.
6044
6045 2018-07-11  Pedro Alves  <palves@redhat.com>
6046
6047         PR gdb/23377
6048         * remote.c (remote_target::remote_detach_pid): Call
6049         set_current_process.
6050
6051 2018-07-11  Pedro Alves  <palves@redhat.com>
6052
6053         * h8300-tdep.c (h8300_gdbarch_init): Remove
6054         set_gdbarch_ecoff_reg_to_regnum calls.
6055
6056 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
6057
6058         PR c++/23373
6059         * c-typeprint.c (c_type_print_base_struct_union): Don't print
6060         offsets/sizes for static members of a class/struct.
6061
6062 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
6063
6064         * target-descriptions.c (tdesc_register_bitsize): Rename.
6065         * target-descriptions.h (tdesc_register_bitsize): Likewise.
6066         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
6067         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
6068
6069 2018-07-10  Tom Tromey  <tom@tromey.com>
6070
6071         * breakpoint.c (moribund_locations): Now static and a
6072         std::vector.
6073         (breakpoint_init_inferior, moribund_breakpoint_here_p)
6074         (build_bpstat_chain, update_global_location_list)
6075         (breakpoint_retire_moribund): Update.
6076         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
6077         VEC.
6078
6079 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6080
6081         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
6082         (riscv_register_reggroup_p): Use new function, remove unneeded
6083         parenthesis.
6084         (riscv_push_dummy_call): Extend assert to compare against xlen or
6085         flen based on register type.
6086
6087 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
6088
6089         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
6090
6091 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
6092
6093         * remote.c (show_hardware_watchpoint_limit): New function.
6094         (show_hardware_watchpoint_length_limit): New function.
6095         (show_hardware_breakpoint_limit): New function.
6096         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
6097         where appropriate, update help text.
6098
6099 2018-07-09  Tom Tromey  <tom@tromey.com>
6100
6101         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
6102         (CLIBS): Don't mention NAT_CLIBS.
6103
6104 2018-07-09  Tom Tromey  <tom@tromey.com>
6105
6106         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
6107         (LIBGDB_OBS, clean mostlyclean): Update.
6108         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
6109
6110 2018-07-09  Tom Tromey  <tom@tromey.com>
6111
6112         * Makefile.in (%.c: %.y): Use ECHO_YACC.
6113         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
6114         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
6115
6116 2018-07-09  Tom Tromey  <tom@tromey.com>
6117
6118         * Makefile.in (ALLDEPFILES): Remove exec.c.
6119         (COMMON_OBS): Remove exec.o.
6120         (COMMON_SFILES): Add exec.c.
6121
6122 2018-07-09  Tom Tromey  <tom@tromey.com>
6123
6124         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
6125
6126 2018-07-09  Tom Tromey  <tom@tromey.com>
6127
6128         * Makefile.in (clean mostlyclean): Remove stamp-version.
6129         (version.c): Depend on stamp-version.
6130         (stamp-version): New rule, from version.c rule.
6131
6132 2018-07-09  Tom Tromey  <tom@tromey.com>
6133
6134         * Makefile.in (init.c): Depend on stamp-init.
6135         (stamp-init): New rule, from init.c rule.
6136         (clean mostlyclean): Remove stamp-init.
6137
6138 2018-07-09  Tom Tromey  <tom@tromey.com>
6139
6140         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
6141         SUBDIR_GCC_COMPILE_SRCS.
6142
6143 2018-07-09  Tom Tromey  <tom@tromey.com>
6144
6145         * Makefile.in (init.c): Remove some unused sed rules.
6146
6147 2018-07-09  Tom Tromey  <tom@tromey.com>
6148
6149         * Makefile.in (TSOBS): Remove.
6150         (INIT_FILES): Update.
6151         (LIBGDB_OBS): Update.
6152         (COMMON_SFILES): Add inflow.c.
6153         (SFILES): Remove inflow.c.
6154
6155 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6156
6157         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
6158
6159 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
6160
6161         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
6162         get_saveloc_name, is_signal_frame_name, step_name,
6163         init_remote_name, create_addr_space_name,
6164         destroy_addr_space_name, search_unwind_table_name,
6165         find_dyn_list_name): Constify.
6166
6167 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
6168
6169         * darwin-nat.c (darwin_pthread_kill): New function.
6170         (darwin_resume_thread): Use darwin_pthread_kill.
6171
6172 2018-07-05  Tom de Vries  <tdevries@suse.de>
6173
6174         * macroexp.c (macro_buffer) <operator=>: New member function.
6175
6176 2018-07-04  Tom Tromey  <tom@tromey.com>
6177
6178         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
6179
6180 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
6181
6182         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
6183         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
6184         * maint.c: Likewise.
6185         * top.c: Likewise.
6186
6187 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6188
6189         * NEWS: Create a new section for the next release branch.
6190         Rename the section of the current branch, now that it has
6191         been cut.
6192
6193 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
6194
6195         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
6196         * version.in: Bump version to 8.2.50.DATE-git.
6197
6198 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
6199             Pedro Alves  <palves@redhat.com>
6200
6201         * linux-nat.c (linux_init_ptrace): Rename to ...
6202         (linux_init_ptrace_procfs): ... this.  Call
6203         linux_proc_init_warnings.
6204         (linux_nat_target::post_attach)
6205         (linux_nat_target::post_startup_inferior): Adjust.
6206         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6207         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6208
6209 2018-07-04  Tom de Vries  <tdevries@suse.de>
6210
6211         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6212         check ...
6213         (read_comp_unit_head): ... here.
6214
6215 2018-07-03  Tom Tromey  <tom@tromey.com>
6216
6217         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6218         (stop_tracing, tstatus_command)
6219         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6220         (print_one_static_tracepoint_marker): Update.
6221         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6222         std::vector.
6223         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6224         VEC.
6225         (all_tracepoints, static_tracepoints_here): Return std::vector.
6226
6227 2018-07-03  Tom Tromey  <tom@tromey.com>
6228
6229         * common/ptid.c (ptid_equal): Remove.
6230         * common/ptid.h (ptid_equal): Don't declare.
6231         * ada-tasks.c: Update.
6232         * breakpoint.c: Update.
6233         * common/agent.c: Update.
6234         * corelow.c: Update.
6235         * darwin-nat-info.c: Update.
6236         * darwin-nat.c: Update.
6237         * dcache.c: Update.
6238         * dtrace-probe.c: Update.
6239         * dummy-frame.c: Update.
6240         * fbsd-nat.c: Update.
6241         * frame.c: Update.
6242         * gdbthread.h: Update.
6243         * gnu-nat.c: Update.
6244         * go32-nat.c: Update.
6245         * inf-loop.c: Update.
6246         * inf-ptrace.c: Update.
6247         * infcall.c: Update.
6248         * infcmd.c: Update.
6249         * inflow.c: Update.
6250         * infrun.c: Update.
6251         * linux-fork.c: Update.
6252         * linux-nat.c: Update.
6253         * linux-thread-db.c: Update.
6254         * mi/mi-cmd-var.c: Update.
6255         * mi/mi-interp.c: Update.
6256         * mi/mi-main.c: Update.
6257         * nto-procfs.c: Update.
6258         * ppc-linux-tdep.c: Update.
6259         * procfs.c: Update.
6260         * python/py-inferior.c: Update.
6261         * python/py-record-btrace.c: Update.
6262         * python/py-record.c: Update.
6263         * ravenscar-thread.c: Update.
6264         * regcache.c: Update.
6265         * remote-sim.c: Update.
6266         * remote.c: Update.
6267         * sol-thread.c: Update.
6268         * solib.c: Update.
6269         * target.c: Update.
6270         * tui/tui-stack.c: Update.
6271         * varobj.c: Update.
6272         * windows-nat.c: Update.
6273         * windows-tdep.c: Update.
6274
6275 2018-07-03  Tom Tromey  <tom@tromey.com>
6276
6277         * common/ptid.c (ptid_match): Remove.
6278         * common/ptid.h (ptid_match): Don't declare.
6279         * fbsd-nat.c: Update.
6280         * infcmd.c: Update.
6281         * infrun.c: Update.
6282         * linux-nat.c: Update.
6283         * record-btrace.c: Update.
6284         * regcache.c: Update.
6285         * remote.c: Update.
6286
6287 2018-07-03  Tom Tromey  <tom@tromey.com>
6288
6289         * common/ptid.c (ptid_tid_p): Remove.
6290         * common/ptid.h (ptid_tid_p): Don't declare.
6291         * sol-thread.c: Update.
6292
6293 2018-07-03  Tom Tromey  <tom@tromey.com>
6294
6295         * common/ptid.c (ptid_lwp_p): Remove.
6296         * common/ptid.h (ptid_lwp_p): Don't declare.
6297         * fbsd-nat.c: Update.
6298         * linux-nat.c: Update.
6299         * nat/linux-procfs.c: Update.
6300         * nat/x86-linux-dregs.c: Update.
6301         * sol-thread.c: Update.
6302
6303 2018-07-03  Tom Tromey  <tom@tromey.com>
6304
6305         * common/ptid.c (ptid_is_pid): Remove.
6306         * common/ptid.h (ptid_is_pid): Don't declare.
6307         * infrun.c: Update.
6308         * linux-nat.c: Update.
6309         * mi/mi-interp.c: Update.
6310         * remote.c: Update.
6311         * thread.c: Update.
6312
6313 2018-07-03  Tom Tromey  <tom@tromey.com>
6314
6315         * common/ptid.c (ptid_get_tid): Remove.
6316         * common/ptid.h (ptid_get_tid): Don't declare.
6317         * ada-tasks.c: Update.
6318         * aix-thread.c: Update.
6319         * bsd-uthread.c: Update.
6320         * darwin-nat.c: Update.
6321         * fbsd-nat.c: Update.
6322         * i386-darwin-nat.c: Update.
6323         * infrun.c: Update.
6324         * linux-tdep.c: Update.
6325         * nto-procfs.c: Update.
6326         * ppc-ravenscar-thread.c: Update.
6327         * python/py-infthread.c: Update.
6328         * ravenscar-thread.c: Update.
6329         * sol-thread.c: Update.
6330         * sparc-ravenscar-thread.c: Update.
6331         * windows-nat.c: Update.
6332
6333 2018-07-03  Tom Tromey  <tom@tromey.com>
6334
6335         * common/ptid.c (ptid_get_lwp): Remove.
6336         * common/ptid.h (ptid_get_lwp): Don't declare.
6337         * aarch64-linux-nat.c: Update.
6338         * ada-tasks.c: Update.
6339         * aix-thread.c: Update.
6340         * amd64-linux-nat.c: Update.
6341         * arm-linux-nat.c: Update.
6342         * corelow.c: Update.
6343         * fbsd-nat.c: Update.
6344         * fbsd-tdep.c: Update.
6345         * gnu-nat.c: Update.
6346         * i386-cygwin-tdep.c: Update.
6347         * i386-gnu-nat.c: Update.
6348         * i386-linux-nat.c: Update.
6349         * ia64-linux-nat.c: Update.
6350         * inf-ptrace.c: Update.
6351         * infrun.c: Update.
6352         * linux-fork.c: Update.
6353         * linux-nat.c: Update.
6354         * linux-tdep.c: Update.
6355         * linux-thread-db.c: Update.
6356         * mips-linux-nat.c: Update.
6357         * nat/aarch64-linux-hw-point.c: Update.
6358         * nat/aarch64-linux.c: Update.
6359         * nat/linux-btrace.c: Update.
6360         * nat/linux-osdata.c: Update.
6361         * nat/linux-procfs.c: Update.
6362         * nat/x86-linux-dregs.c: Update.
6363         * obsd-nat.c: Update.
6364         * ppc-fbsd-nat.c: Update.
6365         * ppc-linux-nat.c: Update.
6366         * procfs.c: Update.
6367         * python/py-infthread.c: Update.
6368         * ravenscar-thread.c: Update.
6369         * remote.c: Update.
6370         * s390-linux-nat.c: Update.
6371         * sol-thread.c: Update.
6372         * sol2-tdep.c: Update.
6373         * spu-linux-nat.c: Update.
6374         * x86-linux-nat.c: Update.
6375         * xtensa-linux-nat.c: Update.
6376
6377 2018-07-03  Tom Tromey  <tom@tromey.com>
6378
6379         * common/ptid.c (ptid_get_pid): Remove.
6380         * common/ptid.h (ptid_get_pid): Don't declare.
6381         * aarch64-linux-nat.c: Update.
6382         * ada-lang.c: Update.
6383         * aix-thread.c: Update.
6384         * alpha-bsd-nat.c: Update.
6385         * amd64-fbsd-nat.c: Update.
6386         * amd64-linux-nat.c: Update.
6387         * arm-linux-nat.c: Update.
6388         * arm-nbsd-nat.c: Update.
6389         * auxv.c: Update.
6390         * break-catch-syscall.c: Update.
6391         * breakpoint.c: Update.
6392         * bsd-uthread.c: Update.
6393         * corelow.c: Update.
6394         * ctf.c: Update.
6395         * darwin-nat.c: Update.
6396         * fbsd-nat.c: Update.
6397         * fbsd-tdep.c: Update.
6398         * gcore.c: Update.
6399         * gnu-nat.c: Update.
6400         * hppa-nbsd-nat.c: Update.
6401         * hppa-obsd-nat.c: Update.
6402         * i386-fbsd-nat.c: Update.
6403         * ia64-linux-nat.c: Update.
6404         * inf-ptrace.c: Update.
6405         * infcmd.c: Update.
6406         * inferior.c: Update.
6407         * inferior.h: Update.
6408         * inflow.c: Update.
6409         * infrun.c: Update.
6410         * linux-fork.c: Update.
6411         * linux-nat.c: Update.
6412         * linux-tdep.c: Update.
6413         * linux-thread-db.c: Update.
6414         * m68k-bsd-nat.c: Update.
6415         * mi/mi-interp.c: Update.
6416         * mi/mi-main.c: Update.
6417         * mips-linux-nat.c: Update.
6418         * mips-nbsd-nat.c: Update.
6419         * mips64-obsd-nat.c: Update.
6420         * nat/aarch64-linux-hw-point.c: Update.
6421         * nat/aarch64-linux.c: Update.
6422         * nat/linux-btrace.c: Update.
6423         * nat/linux-osdata.c: Update.
6424         * nat/linux-procfs.c: Update.
6425         * nat/x86-linux-dregs.c: Update.
6426         * nto-procfs.c: Update.
6427         * obsd-nat.c: Update.
6428         * ppc-linux-nat.c: Update.
6429         * ppc-nbsd-nat.c: Update.
6430         * ppc-obsd-nat.c: Update.
6431         * proc-service.c: Update.
6432         * procfs.c: Update.
6433         * python/py-inferior.c: Update.
6434         * python/py-infthread.c: Update.
6435         * ravenscar-thread.c: Update.
6436         * record.c: Update.
6437         * remote-sim.c: Update.
6438         * remote.c: Update.
6439         * rs6000-nat.c: Update.
6440         * s390-linux-nat.c: Update.
6441         * sh-nbsd-nat.c: Update.
6442         * sol-thread.c: Update.
6443         * sparc-nat.c: Update.
6444         * sparc64-tdep.c: Update.
6445         * spu-linux-nat.c: Update.
6446         * spu-tdep.c: Update.
6447         * target-debug.h: Update.
6448         * target.c: Update.
6449         * thread.c: Update.
6450         * tid-parse.c: Update.
6451         * tracefile-tfile.c: Update.
6452         * vax-bsd-nat.c: Update.
6453         * windows-nat.c: Update.
6454         * x86-linux-nat.c: Update.
6455         * x86-nat.c: Update.
6456
6457 2018-07-03  Tom Tromey  <tom@tromey.com>
6458
6459         * common/ptid.c (pid_to_ptid): Remove.
6460         * common/ptid.h (pid_to_ptid): Don't declare.
6461         * aix-thread.c: Update.
6462         * arm-linux-nat.c: Update.
6463         * common/ptid.c: Update.
6464         * common/ptid.h: Update.
6465         * corelow.c: Update.
6466         * ctf.c: Update.
6467         * darwin-nat.c: Update.
6468         * fbsd-nat.c: Update.
6469         * fork-child.c: Update.
6470         * gnu-nat.c: Update.
6471         * go32-nat.c: Update.
6472         * inf-ptrace.c: Update.
6473         * infcmd.c: Update.
6474         * inferior.c: Update.
6475         * infrun.c: Update.
6476         * linux-fork.c: Update.
6477         * linux-nat.c: Update.
6478         * nat/aarch64-linux-hw-point.c: Update.
6479         * nat/fork-inferior.c: Update.
6480         * nat/x86-linux-dregs.c: Update.
6481         * nto-procfs.c: Update.
6482         * obsd-nat.c: Update.
6483         * procfs.c: Update.
6484         * progspace.c: Update.
6485         * remote.c: Update.
6486         * rs6000-nat.c: Update.
6487         * s390-linux-nat.c: Update.
6488         * sol-thread.c: Update.
6489         * spu-linux-nat.c: Update.
6490         * target.c: Update.
6491         * top.c: Update.
6492         * tracefile-tfile.c: Update.
6493         * windows-nat.c: Update.
6494
6495 2018-07-03  Tom Tromey  <tom@tromey.com>
6496
6497         * common/ptid.h (ptid_build): Don't declare.
6498         * common/ptid.c (ptid_build): Remove.
6499         * aix-thread.c: Update.
6500         * bsd-kvm.c: Update.
6501         * bsd-uthread.c: Update.
6502         * common/agent.c: Update.
6503         * common/ptid.c: Update.
6504         * common/ptid.h: Update.
6505         * corelow.c: Update.
6506         * darwin-nat.c: Update.
6507         * fbsd-nat.c: Update.
6508         * gnu-nat.c: Update.
6509         * linux-fork.c: Update.
6510         * linux-nat.c: Update.
6511         * linux-thread-db.c: Update.
6512         * nat/linux-osdata.c: Update.
6513         * nat/linux-procfs.c: Update.
6514         * nto-procfs.c: Update.
6515         * obsd-nat.c: Update.
6516         * proc-service.c: Update.
6517         * procfs.c: Update.
6518         * ravenscar-thread.c: Update.
6519         * remote-sim.c: Update.
6520         * remote.c: Update.
6521         * sol-thread.c: Update.
6522         * target.c: Update.
6523         * windows-nat.c: Update.
6524
6525 2018-07-03  Tom Tromey  <tom@tromey.com>
6526
6527         * infrun.c (follow_exec): Use exit_inferior_silent.
6528         * inferior.c (exit_inferior_num_silent): Remove.
6529         * inferior.h (exit_inferior_num_silent): Don't declare.
6530
6531 2018-07-03  Tom Tromey  <tom@tromey.com>
6532
6533         PR cli/23340:
6534         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6535         inferior_ptid on error.
6536
6537 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6538             Simon Marchi  <simon.marchi@polymtl.ca>
6539
6540         PR tdep/8282
6541         * disasm.h (gdb_disassembler): Add
6542         `m_disassembler_options_holder'. member
6543         * disasm.c (get_all_disassembler_options): New function.
6544         (gdb_disassembler::gdb_disassembler): Use it.
6545         (gdb_buffered_insn_length_init_dis): Likewise.
6546         (gdb_buffered_insn_length): Adjust accordingly.
6547         (set_disassembler_options): Handle options with arguments.
6548         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6549         line if showing options with descriptions.
6550         (disassembler_options_completer): Adapt to using the
6551         `disasm_options_and_args_t' structure.
6552         * mips-tdep.c (mips_disassembler_options): New variable.
6553         (mips_disassembler_options_o32): Likewise.
6554         (mips_disassembler_options_n32): Likewise.
6555         (mips_disassembler_options_n64): Likewise.
6556         (gdb_print_insn_mips): Don't set `disassembler_options'.
6557         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6558         functions.
6559         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6560         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6561         `gdbarch_disassembler_options_implicit' and
6562         `gdbarch_valid_disassembler_options'.
6563         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6564         `disasm_options_and_args_t' structure.
6565         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6566         method.
6567         (valid_disassembler_options): Switch from `disasm_options_t' to
6568         the `disasm_options_and_args_t' structure.
6569         * NEWS: Document `set disassembler-options' support for the MIPS
6570         target.
6571         * gdbarch.h: Regenerate.
6572         * gdbarch.c: Regenerate.
6573
6574 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6575
6576         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6577
6578 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6579
6580         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6581         parameter in call to amd64_target_description.
6582         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6583         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6584         (amd64fbsd_init_abi): Likewise.
6585         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6586         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6587         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6588         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6589
6590 2018-06-29  Pedro Alves  <palves@redhat.com>
6591
6592         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6593         "segments" parameter.
6594         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6595         (_initialize_amd64_tdep): Update call to
6596         amd64_create_target_description.
6597         (amd64_target_description): Add "segments" parameter.  Adjust
6598         the implementation to use it.
6599         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6600         call to amd64_create_target_description.
6601         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6602         * gdb/arch/amd64.h (amd64_create_target_description): Add
6603         "segments" register.
6604         * gdb/arch/amd64.c (amd64_create_target_description): Add
6605         "segments" parameter.  Call create_feature_i386_64bit_segments
6606         only if SEGMENTS is true.
6607         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6608         call to amd64_create_target_description.
6609
6610 2018-06-29  Pedro Alves  <palves@redhat.com>
6611
6612         * thread.c (thread_target_id_str): New, factored out from ...
6613         (print_thread_info_1): ... here.  Use it to compute the max
6614         "Target Id" column width.
6615
6616 2018-06-29  Pedro Alves  <palves@redhat.com>
6617
6618         * remote.c (remote_target::extra_thread_info): Delete
6619         'display_buf' and 'n' locals.  from the cache, regardless of
6620         packet mechanims is in use.  Use cache for qThreadExtra and qP
6621         methods too.
6622
6623 2018-06-29  Pedro Alves  <palves@redhat.com>
6624
6625         * blockframe.c (find_pc_sect_containing_function): New function.
6626         * breakpoint.c (print_breakpoint_location): Don't call
6627         find_pc_sect_function.
6628         * linespec.c (create_sals_line_offset): Record the location's
6629         symbol in the sal.
6630         * linespec.c (convert_address_location_to_sals): Fill in sal's
6631         symbol with find_pc_sect_containing_function.
6632         * symtab.c (find_function_start_sal): Rename to ...
6633         (find_function_start_sal_1): ... this.
6634         (find_function_start_sal): Reimplement as wrapper around
6635         find_function_start_sal_1, and use
6636         find_pc_sect_containing_function to fill in the sal's symbol.
6637         (find_function_start_sal(symbol*, bool)): Adjust.
6638         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6639         comments.
6640         (find_pc_sect_containing_function): Declare.
6641
6642 2018-06-29  Pedro Alves  <palves@redhat.com>
6643
6644         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6645         true if the the location has no symbol.
6646
6647 2018-06-28  Tom Tromey  <tom@tromey.com>
6648
6649         * NEWS: Mention --enable-codesign.
6650         * silent-rules.mk (ECHO_SIGN): New variable.
6651         * configure.ac: Add --enable-codesign.
6652         * configure: Rebuild.
6653         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6654         (gdb$(EXEEXT)): Optionally invoke codesign.
6655
6656 2018-06-28  Pedro Alves  <palves@redhat.com>
6657
6658         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6659         comments.
6660         (switch_to_thread_no_regs): Adjust comment.
6661         * infcmd.c (stop_pc): Delete.
6662         (post_create_inferior, info_program_command): Replace references
6663         to stop_pc with references to thread_info->suspend.stop_pc.
6664         * inferior.h (stop_pc): Delete declaration.
6665         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6666         (handle_inferior_event_1, handle_signal_stop)
6667         (process_event_stop_test, keep_going_stepped_thread)
6668         (handle_step_into_function, handle_step_into_function_backward)
6669         (print_stop_location): Replace references to stop_pc with
6670         references to thread_info->suspend.stop_pc.
6671         (struct infcall_suspend_state) <stop_pc>: Delete field.
6672         (save_infcall_suspend_state, restore_infcall_suspend_state):
6673         Remove references to inf_stat->stop_pc.
6674         * linux-fork.c (fork_load_infrun_state): Likewise.
6675         * record-btrace.c (record_btrace_set_replay): Likewise.
6676         * record-full.c (record_full_goto_entry): Likewise.
6677         * remote.c (print_one_stopped_thread): Likewise.
6678         * target.c (target_resume): Extend comment.
6679         * thread.c (set_executing_thread): New.
6680         (set_executing): Use it.
6681         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6682         Remove references to stop_pc.
6683
6684 2018-06-28  Pedro Alves  <palves@redhat.com>
6685
6686         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6687         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6688
6689 2018-06-28  Tom Tromey  <tom@tromey.com>
6690
6691         * coffread.c (coff_symfile_finish): Update.
6692         * xcoffread.c (xcoff_symfile_finish): Update.
6693         * elfread.c (elf_symfile_finish): Update.
6694         * symfile.h (dwarf2_free_objfile): Don't declare.
6695         * dwarf2read.c (_initialize_dwarf2_read): Use
6696         register_objfile_data_with_cleanup.
6697         (dwarf2_free_objfile): Now static.  Change signature.
6698
6699 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6700
6701         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6702         option "-o" to add-symbol-file-load to add an offset to each
6703         section's load address.
6704         * symfile.c (set_objfile_default_section_offset): New function.
6705
6706 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6707
6708         * symfile.c (add_symbol_file_command): Make sure that sections
6709         with the same name are sorted in the same order.
6710
6711 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6712
6713         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6714         require the second argument.  If omitted, load sections at the
6715         addresses specified in the file.
6716
6717 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6718
6719         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6720         (_initialize_symfile): Add option "-o" to symbol-file to add an
6721         offset to each section of the symbol file.
6722
6723 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6724
6725         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6726
6727 2018-06-27  Tom Tromey  <tom@tromey.com>
6728
6729         * stack.c (_initialize_stack): Update "func" help text.
6730
6731 2018-06-27  Tom Tromey  <tom@tromey.com>
6732
6733         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6734         std::vector.
6735         (unwind_infopy_str, pyuw_create_unwind_info)
6736         (unwind_infopy_add_saved_register, pyuw_sniffer)
6737         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6738         Update.
6739         (struct saved_reg): Add constructor.
6740         <value>: Now a gdbpy_ref<>.
6741
6742 2018-06-27  Tom Tromey  <tom@tromey.com>
6743
6744         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6745
6746 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6747
6748         * gdb-gdb.py.in: Format using autopep8.
6749
6750 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6751
6752         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6753         (type_lookup_function): Recognize CORE_ADDR values.
6754
6755 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6756
6757         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6758         print tag_name.
6759
6760 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6761
6762         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6763         <__lt__>: Add.
6764
6765 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6766
6767         * gdb-gdb.py: Move to...
6768         * gdb-gdb.py.in: ... here.
6769         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6770         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6771         dependencies.
6772         (distclean): Remove gdb-gdb.py when cleaning.
6773         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6774         * configure: Re-generate.
6775
6776 2018-06-27  Pedro Alves  <palves@redhat.com>
6777
6778         * proc-service.c (get_ps_regcache): New.
6779         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6780         (ps_lsetfpregs): Use it.
6781
6782 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6783
6784         PR gdb/21695
6785         * dwarf2read.c (lnp_state_machine::check_line_address): Update
6786         declaration.
6787         (dwarf_decode_lines_1): Adjust.
6788
6789 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6790
6791         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6792         override.
6793         <info_proc>: Likewise.
6794
6795 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6796
6797         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6798         to windows_fetch_one_register, and only handle the case of
6799         fetching one register.  Move the code that reloads the context
6800         and iterates over all registers if R is negative to...
6801         (windows_nat_target::fetch_registers): ... here.
6802         (do_windows_store_inferior_registers): Rename to
6803         windows_store_one_register, and only handle the case of storing
6804         one register.  Move the code that handles the case where r is
6805         negative to...
6806         (windows_nat_target::store_registers) ... here.
6807
6808 2018-06-26  Tom Tromey  <tom@tromey.com>
6809
6810         PR rust/22574:
6811         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6812         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6813         Update.
6814         (rust_internal_print_type): Add podata parameter.
6815         (rust_print_type): Update.
6816
6817 2018-06-26  Tom Tromey  <tom@tromey.com>
6818
6819         * typeprint.h (struct print_offset_data) <update, finish,
6820         maybe_print_hole>: New methods.
6821         <indentation>: New constant.
6822         * typeprint.c (print_offset_data::indentation): Define.
6823         (print_offset_data::maybe_print_hole, print_offset_data::update)
6824         (print_offset_data::finish): Move from c-typeprint.c and rename.
6825         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6826         (print_spaces_filtered_with_print_options): Update.
6827         (c_print_type_union_field_offset, maybe_print_hole)
6828         (c_print_type_struct_field_offset): Move to typeprint.c and
6829         rename.
6830         (c_type_print_base_struct_union): Update.
6831
6832 2018-06-25  Pedro Alves  <palves@redhat.com>
6833
6834         * gdbthread.h (thread_info_ref, delete_thread)
6835         (delete_thread_silent, first_thread_of_inferior)
6836         (any_thread_of_inferior, switch_to_thread)
6837         (enable_thread_stack_temporaries)
6838         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6839         (get_last_thread_stack_temporary)
6840         (value_in_thread_stack_temporaries, can_access_registers_thread):
6841         Spell out "struct thread_info" instead of just "thread_info".
6842         * inferior.h (notice_new_inferior): Likewise.
6843
6844 2018-06-25  Pedro Alves  <palves@redhat.com>
6845
6846         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6847         pass thread_info pointer to delete_thread.
6848         (windows_nat_target::detach): Pass inferior pointer to
6849         detach_inferior.
6850         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6851         delete_thread.
6852         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6853         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6854         and pass a thread_info pointer to delete_thread.
6855         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6856         pass thread_info pointer to delete_thread.
6857         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6858         delete_thread_silent call.
6859         * procfs.c (procfs_target::detach): Pass inferior pointer to
6860         detach_inferior.
6861         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6862         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6863         delete_thread_silent call.
6864         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6865         pass thread_info pointer to delete_thread.
6866         (windows_nat_target::detach): Pass inferior pointer to
6867         delete_inferior.
6868
6869 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6870
6871         * regcache.c (readable_regcache::read_part): Fix asserts.
6872         (reg_buffer::raw_collect_part): New function.
6873         (regcache::write_part): Fix asserts.
6874         (reg_buffer::raw_supply_part): New function.
6875         (regcache::transfer_regset_register): New helper function.
6876         (regcache::transfer_regset): Call new functions.
6877         (regcache_supply_regset): Use gdb_byte*.
6878         (regcache::supply_regset): Likewise.
6879         (regcache_collect_regset): Likewise.
6880         (regcache::collect_regset): Likewise.
6881         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6882         (reg_buffer::raw_supply_part): Likewise.
6883         (regcache::transfer_regset_register): Likewise.
6884         (regcache::transfer_regset): Use gdb_byte*.
6885
6886 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6887
6888         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6889
6890 2018-06-21  Pedro Alves  <palves@redhat.com>
6891
6892         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6893         instead of a ptid_t.  All callers adjusted.
6894         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6895         adjusted.
6896         (print_ada_task_info, display_current_task_id, task_command_1):
6897         Adjust.
6898         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6899         inferior_thread.
6900         (breakpoint_kind): Adjust.
6901         (remove_breakpoints_pid): Rename to ...
6902         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6903         pointer.  All callers adjusted.
6904         (bpstat_clear_actions): Use inferior_thread.
6905         (get_bpstat_thread): New.
6906         (bpstat_do_actions): Use it.
6907         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6908         to take a thread_info pointer.  All callers adjusted.
6909         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6910         (breakpoint_re_set_thread): Use inferior_thread.
6911         * breakpoint.h (struct inferior): Forward declare.
6912         (bpstat_stop_status): Update.
6913         (remove_breakpoints_pid): Delete.
6914         (remove_breakpoints_inf): New.
6915         * bsd-uthread.c (bsd_uthread_target::wait)
6916         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6917         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6918         (maint_btrace_packet_history_cmd)
6919         (maint_btrace_clear_packet_history_cmd): Adjust.
6920         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6921         inferior_thread.
6922         * cli/cli-interp.c: Include "inferior.h".
6923         * common/refcounted-object.h (struct
6924         refcounted_object_ref_policy): New.
6925         * compile/compile-object-load.c: Include gdbthread.h.
6926         (store_regs): Use inferior_thread.
6927         * corelow.c (core_target::close): Use current_inferior.
6928         (core_target_open): Adjust to use first_thread_of_inferior and use
6929         the current inferior.
6930         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6931         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6932         <thread>: ... this new field.  All references adjusted.
6933         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6934         Take a thread_info pointer instead of a ptid_t.
6935         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6936         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6937         thread_info pointer instead of a ptid_t.
6938         * elfread.c: Include "inferior.h".
6939         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6940         Use inferior_thread.
6941         * eval.c (evaluate_subexp): Likewise.
6942         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6943         inferior_thread.
6944         * gdb_proc_service.h (struct thread_info): Forward declare.
6945         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6946         <thread>: ... this new field.  All references adjusted.
6947         * gdbarch.h, gdbarch.c: Regenerate.
6948         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6949         'thread' parameter.  All implementations and callers adjusted.
6950         * gdbthread.h (thread_info) <set_running>: New method.
6951         (delete_thread, delete_thread_silent): Take a thread_info pointer
6952         instead of a ptid.
6953         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6954         (first_thread_of_process): Delete, replaced by ...
6955         (first_thread_of_inferior): ... this new function.  All callers
6956         adjusted.
6957         (any_live_thread_of_process): Delete, replaced by ...
6958         (any_live_thread_of_inferior): ... this new function.  All callers
6959         adjusted.
6960         (switch_to_thread, switch_to_no_thread): Declare.
6961         (is_executing): Delete.
6962         (enable_thread_stack_temporaries): Update comment.
6963         <enable_thread_stack_temporaries>: Take a thread_info pointer
6964         instead of a ptid_t.  Incref the thread.
6965         <~enable_thread_stack_temporaries>: Decref the thread.
6966         <m_ptid>: Delete
6967         <m_thr>: New.
6968         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6969         (get_last_thread_stack_temporary)
6970         (value_in_thread_stack_temporaries, can_access_registers_thread):
6971         Take a thread_info pointer instead of a ptid_t.  All callers
6972         adjusted.
6973         * infcall.c (get_call_return_value): Use inferior_thread.
6974         (run_inferior_call): Work with thread pointers instead of ptid_t.
6975         (call_function_by_hand_dummy): Work with thread pointers instead
6976         of ptid_t.  Use thread_info_ref.
6977         * infcmd.c (proceed_thread_callback): Access thread's state
6978         directly.
6979         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6980         access thread's state directly.
6981         (continue_command): Use inferior_thread.
6982         (info_program_command): Use find_thread_ptid and access thread
6983         state directly.
6984         (proceed_after_attach_callback): Use thread state directly.
6985         (notice_new_inferior): Take a thread_info pointer instead of a
6986         ptid_t.  All callers adjusted.
6987         (exit_inferior): Take an inferior pointer instead of a pid.  All
6988         callers adjusted.
6989         (exit_inferior_silent): New.
6990         (detach_inferior): Delete.
6991         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6992         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6993         (detach_inferior_command, kill_inferior_command): Use
6994         find_inferior_id instead of valid_gdb_inferior_id and
6995         gdb_inferior_id_to_pid.
6996         (inferior_command): Use inferior and thread pointers.
6997         * inferior.h (struct thread_info): Forward declare.
6998         (notice_new_inferior): Take a thread_info pointer instead of a
6999         ptid_t.  All callers adjusted.
7000         (detach_inferior): Delete declaration.
7001         (exit_inferior, exit_inferior_silent): Take an inferior pointer
7002         instead of a pid.  All callers adjusted.
7003         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
7004         (valid_gdb_inferior_id): Delete.
7005         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
7006         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
7007         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
7008         ...
7009         <inf>: ... this new field.
7010         <step_ptid>: Delete, replaced by ...
7011         <step_thread>: ... this new field.
7012         (get_displaced_stepping_state): Take an inferior pointer instead
7013         of a pid.  All callers adjusted.
7014         (displaced_step_in_progress_any_inferior): Adjust.
7015         (displaced_step_in_progress_thread): Take a thread pointer instead
7016         of a ptid_t.  All callers adjusted.
7017         (displaced_step_in_progress, add_displaced_stepping_state): Take
7018         an inferior pointer instead of a pid.  All callers adjusted.
7019         (get_displaced_step_closure_by_addr): Adjust.
7020         (remove_displaced_stepping_state): Take an inferior pointer
7021         instead of a pid.  All callers adjusted.
7022         (displaced_step_prepare_throw, displaced_step_prepare)
7023         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
7024         All callers adjusted.
7025         (start_step_over): Adjust.
7026         (infrun_thread_ptid_changed): Remove bit updating ptids in the
7027         displaced step queue.
7028         (do_target_resume): Adjust.
7029         (fetch_inferior_event): Use inferior_thread.
7030         (context_switch, get_inferior_stop_soon): Take an
7031         execution_control_state pointer instead of a ptid_t.  All callers
7032         adjusted.
7033         (switch_to_thread_cleanup): Delete.
7034         (stop_all_threads): Use scoped_restore_current_thread.
7035         * inline-frame.c: Include "gdbthread.h".
7036         (inline_state) <inline_state>: Take a thread pointer instead of a
7037         ptid_t.  All callers adjusted.
7038         <ptid>: Delete, replaced by ...
7039         <thread>: ... this new field.
7040         (find_inline_frame_state): Take a thread pointer instead of a
7041         ptid_t.  All callers adjusted.
7042         (skip_inline_frames, step_into_inline_frame)
7043         (inline_skipped_frames, inline_skipped_symbol): Take a thread
7044         pointer instead of a ptid_t.  All callers adjusted.
7045         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
7046         (inline_skipped_frames, inline_skipped_symbol): Likewise.
7047         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
7048         pointers directly.
7049         * linux-nat.c (get_detach_signal): Likewise.
7050         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
7051         (thread_db_notice_clone): Adjust.
7052         (thread_db_find_new_threads_silently)
7053         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
7054         a thread pointer instead of a ptid_t.  All callers adjusted.
7055         * mi/mi-cmd-var.c: Include "inferior.h".
7056         (mi_cmd_var_update_iter): Update to use thread pointers.
7057         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
7058         inferior directly.
7059         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
7060         out to ...
7061         (mi_output_running): ... this new function.
7062         (mi_on_resume_1): Adjust to use it.
7063         (mi_user_selected_context_changed): Adjust to use inferior_thread.
7064         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
7065         directly.
7066         (interrupt_thread_callback): : Adjust to use thread and inferior
7067         pointers.
7068         * proc-service.c: Include "gdbthread.h".
7069         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
7070         * progspace-and-thread.c: Include "inferior.h".
7071         * progspace.c: Include "inferior.h".
7072         * python/py-exitedevent.c (create_exited_event_object): Adjust to
7073         hold a reference to an inferior_object.
7074         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
7075         inferior_thread.
7076         * python/py-inferior.c (struct inferior_object): Give the type a
7077         tag name instead of a typedef.
7078         (python_on_normal_stop): No need to check if the current thread is
7079         listed.
7080         (inferior_to_inferior_object): Change return type to
7081         inferior_object.  All callers adjusted.
7082         (find_thread_object): Delete, bits factored out to ...
7083         (thread_to_thread_object): ... this new function.
7084         * python/py-infthread.c (create_thread_object): Use
7085         inferior_to_inferior_object.
7086         (thpy_is_stopped): Use thread pointer directly.
7087         (gdbpy_selected_thread): Use inferior_thread.
7088         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
7089         field, replaced with ...
7090         <thread>: ... this new field.  All users adjusted.
7091         (btpy_insn_or_gap_new): Drop const.
7092         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
7093         callers adjusted.
7094         * python/py-record.c: Include "gdbthread.h".
7095         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7096         a ptid_t.  All callers adjusted.
7097         (gdbpy_current_recording): Use inferior_thread.
7098         * python/py-record.h (recpy_record_object) <ptid>: Delete
7099         field, replaced with ...
7100         <thread>: ... this new field.  All users adjusted.
7101         (recpy_element_object) <ptid>: Delete
7102         field, replaced with ...
7103         <thread>: ... this new field.  All users adjusted.
7104         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
7105         a ptid_t.  All callers adjusted.
7106         * python/py-threadevent.c: Include "gdbthread.h".
7107         (get_event_thread): Use thread_to_thread_object.
7108         * python/python-internal.h (struct inferior_object): Forward
7109         declare.
7110         (find_thread_object, find_inferior_object): Delete declarations.
7111         (thread_to_thread_object, inferior_to_inferior_object): New
7112         declarations.
7113         * record-btrace.c: Include "inferior.h".
7114         (require_btrace_thread): Use inferior_thread.
7115         (record_btrace_frame_sniffer)
7116         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
7117         (get_thread_current_frame): Use scoped_restore_current_thread and
7118         switch_to_thread.
7119         (get_thread_current_frame): Use thread pointer directly.
7120         (record_btrace_replay_at_breakpoint): Use thread's inferior
7121         pointer directly.
7122         * record-full.c: Include "inferior.h".
7123         * regcache.c: Include "gdbthread.h".
7124         (get_thread_arch_regcache): Use the inferior's address space
7125         directly.
7126         (get_thread_regcache, registers_changed_thread): New.
7127         * regcache.h (get_thread_regcache(thread_info *thread)): New
7128         overload.
7129         (registers_changed_thread): New.
7130         (remote_target) <remote_detach_1>: Swap order of parameters.
7131         (remote_add_thread): <remote_add_thread>: Return the new thread.
7132         (get_remote_thread_info(ptid_t)): New overload.
7133         (remote_target::remote_notice_new_inferior): Use thread pointers
7134         directly.
7135         (remote_target::process_initial_stop_replies): Use
7136         thread_info::set_running.
7137         (remote_target::remote_detach_1, remote_target::detach)
7138         (extended_remote_target::detach): Adjust.
7139         * stack.c (frame_show_address): Use inferior_thread.
7140         * target-debug.h (target_debug_print_thread_info_pp): New.
7141         * target-delegates.c: Regenerate.
7142         * target.c (default_thread_address_space): Delete.
7143         (memory_xfer_partial_1): Use current_inferior.
7144         (target_detach): Use current_inferior.
7145         (target_thread_address_space): Delete.
7146         (generic_mourn_inferior): Use current_inferior.
7147         * target.h (struct target_ops) <thread_address_space>: Delete.
7148         (target_thread_address_space): Delete.
7149         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
7150         pointers directly.
7151         (delete_thread_1, delete_thread, delete_thread_silent): Take a
7152         thread pointer instead of a ptid_t.  Adjust all callers.
7153         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
7154         (first_thread_of_process): Delete, replaced by ...
7155         (first_thread_of_inferior): ... this new function.  All callers
7156         adjusted.
7157         (any_thread_of_process): Rename to ...
7158         (any_thread_of_inferior): ... this, and take an inferior pointer.
7159         (any_live_thread_of_process): Rename to ...
7160         (any_live_thread_of_inferior): ... this, and take an inferior
7161         pointer.
7162         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7163         (value_in_thread_stack_temporaries)
7164         (get_last_thread_stack_temporary): Take a thread pointer instead
7165         of a ptid_t.  Adjust all callers.
7166         (thread_info::set_running): New.
7167         (validate_registers_access): Use inferior_thread.
7168         (can_access_registers_ptid): Rename to ...
7169         (can_access_registers_thread): ... this, and take a thread
7170         pointer.
7171         (print_thread_info_1): Adjust to compare thread pointers instead
7172         of ptids.
7173         (switch_to_no_thread, switch_to_thread): Make extern.
7174         (scoped_restore_current_thread::~scoped_restore_current_thread):
7175         Use m_thread pointer directly.
7176         (scoped_restore_current_thread::scoped_restore_current_thread):
7177         Use inferior_thread.
7178         (thread_command): Use thread pointer directly.
7179         (thread_num_make_value_helper): Use inferior_thread.
7180         * top.c (execute_command): Use inferior_thread.
7181         * tui/tui-interp.c: Include "inferior.h".
7182         * varobj.c (varobj_create): Use inferior_thread.
7183         (value_of_root_1): Use find_thread_global_id instead of
7184         global_thread_id_to_ptid.
7185
7186 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
7187
7188         * regcache.c (readable_regcache::read_part): Avoid memcpy when
7189         possible.
7190         (regcache::write_part): Likewise.
7191         (readable_regcache::cooked_read_part): Update comment.
7192         (readable_regcache::cooked_write_part): Likewise.
7193         * regcache.h: (readable_regcache::read_part): Likewise.
7194         (regcache::write_part): Likewise.
7195
7196 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
7197             Dirk Schubert  <dirk.schubert@arm.com>
7198
7199         * aarch64-linux-nat.c (post_attach): New.
7200         (aarch64_linux_nat_target::post_attach): Override post_attach to
7201         record the number of hardware debug registers.
7202
7203 2018-06-20  Tom Tromey  <tom@tromey.com>
7204
7205         * python/py-param.c (add_setshow_generic): Make parameters const.
7206         (parmpy_init): Update.
7207
7208 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7209
7210         * regcache.h (regcache_cooked_read_ftype): Rename to...
7211         (register_read_ftype): ...this, change type to function_view.
7212         (class reg_buffer) <save>: Remove src parameter.
7213         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7214         parameter non-const in first overload.  Remove src parameter in
7215         second overload.
7216         * regcache.c (do_cooked_read): Remove.
7217         (readonly_detached_regcache::readonly_detached_regcache): Make
7218         parameter non-const, adjust call to other constructor.
7219         (reg_buffer::save): Remove src parameter.
7220         * frame.c (do_frame_register_read): Remove.
7221         (frame_save_as_regcache): Use lambda function.
7222         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7223         parameter to ppu2spu_data *.
7224         (ppu2spu_sniffer): Use lambda function.
7225
7226 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7227
7228         * record-full.c (record_full_target::insert_breakpoint): Remove
7229         "struct" keyword, add const.
7230
7231 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7232
7233         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7234         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7235         * configure.ac: Remove AC_PREREQ, add missing quoting.
7236         * gnulib/configure.ac: Modernize usage of
7237         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7238         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7239         (AUTOMAKE_VERSION): Bump to 1.15.1.
7240         * configure: Re-generate.
7241         * config.in: Re-generate.
7242         * aclocal.m4: Re-generate.
7243         * gnulib/aclocal.m4: Re-generate.
7244         * gnulib/config.in: Re-generate.
7245         * gnulib/configure: Re-generate.
7246         * gnulib/import/Makefile.in: Re-generate.
7247
7248 2018-06-19  Pedro Alves  <palves@redhat.com>
7249
7250         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7251         (lookup_minimal_symbol_by_pc_section): ... here with
7252         gdb_assert_not_reached added.
7253
7254 2018-06-19  Pedro Alves  <palves@redhat.com>
7255
7256         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7257         parameter with a block parameter.  Compare location's block symbol
7258         with the frame's block instead of addresses.
7259         (skip_inline_frames): Pass the current block instead of the
7260         frame's address.  Break out as soon as we determine the frame
7261         should not be skipped.
7262
7263 2018-06-18  Tom Tromey  <tom@tromey.com>
7264
7265         * solib-aix.c (solib_aix_get_section_offsets): Return
7266         unique_xmalloc_ptr.
7267         (solib_aix_solib_create_inferior_hook): Update.
7268
7269 2018-06-18  Tom Tromey  <tom@tromey.com>
7270
7271         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7272
7273 2018-06-18  Tom Tromey  <tom@tromey.com>
7274
7275         * solib-frv.c (frv_relocate_main_executable): Use
7276         unique_xmalloc_ptr.
7277         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7278         unique_xmalloc_ptr.
7279
7280 2018-06-18  Tom Tromey  <tom@tromey.com>
7281
7282         * objfiles.h (inhibit_section_map_updates): Update.
7283         (resume_section_map_updates, resume_section_map_updates_cleanup):
7284         Remove.
7285         * solib-svr4.c (svr4_handle_solib_event): Update.
7286         * objfiles.c (inhibit_section_map_updates): Return
7287         scoped_restore_tmpl<int>.
7288         (resume_section_map_updates, resume_section_map_updates_cleanup):
7289         Remove.
7290
7291 2018-06-18  Tom Tromey  <tom@tromey.com>
7292
7293         * valprint.h (read_string): Update.
7294         * valprint.c (read_string): Change type of "buffer".
7295         (val_print_string): Update.
7296         * python/py-value.c (valpy_string): Update.
7297         * language.h (struct language_defn) <la_get_string>: Change
7298         type of "buffer".
7299         (default_get_string, c_get_string): Update.
7300         * language.c (default_get_string): Change type of "buffer".
7301         * guile/scm-value.c (gdbscm_value_to_string): Update.
7302         * c-lang.c (c_get_string): Change type of "buffer".
7303
7304 2018-06-18  Tom Tromey  <tom@tromey.com>
7305
7306         * ser-mingw.c (struct pipe_state_destroyer): New.
7307         (pipe_state_up): New typedef.
7308         (cleanup_pipe_state): Remove.
7309         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7310
7311 2018-06-18  Tom Tromey  <tom@tromey.com>
7312
7313         * rust-lang.h (rust_yyerror): Don't declare.
7314         * rust-lang.c (rust_language_defn): Update.
7315         * rust-exp.y (yyerror): Now static.
7316         * parse.c (parse_exp_in_context_1): Update.
7317         * p-lang.h (p_yyerror): Don't declare.
7318         * p-lang.c (p_language_defn): Update.
7319         * p-exp.y (yyerror): Now static.
7320         * opencl-lang.c (opencl_language_defn): Update.
7321         * objc-lang.c (objc_language_defn): Update.
7322         * m2-lang.h (m2_yyerror): Don't declare.
7323         * m2-lang.c (m2_language_defn): Update.
7324         * m2-exp.y (yyerror): Now static.
7325         * language.h (struct language_defn) <la_error>: Remove.
7326         * language.c (unk_lang_error): Remove.
7327         (unknown_language_defn, auto_language_defn): Remove.
7328         * go-lang.h (go_yyerror): Don't declare.
7329         * go-lang.c (go_language_defn): Update.
7330         * go-exp.y (yyerror): Now static.
7331         * f-lang.h (f_yyerror): Don't declare.
7332         * f-lang.c (f_language_defn): Update.
7333         * f-exp.y (yyerror): Now static.
7334         * d-lang.h (d_yyerror): Don't declare.
7335         * d-lang.c (d_language_defn): Update.
7336         * d-exp.y (yyerror): Now static.
7337         * c-lang.h (c_yyerror): Don't declare.
7338         * c-lang.c (c_language_defn, cplus_language_defn)
7339         (asm_language_defn, minimal_language_defn): Update.
7340         * c-exp.y (yyerror): Now static.
7341         * ada-lang.h (ada_yyerror): Don't declare.
7342         * ada-lang.c (ada_language_defn): Update.
7343         * ada-exp.y (yyerror): Now static.
7344
7345 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7346
7347         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7348         (store_sveregs_to_thread): Likewise.
7349         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7350         (aarch64_linux_store_inferior_registers): Likewise.
7351         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7352         function.
7353         (aarch64_sve_regs_copy_to_regcache): Likewise.
7354         (aarch64_sve_regs_copy_from_regcache): Likewise.
7355         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7356         declaration.
7357         (aarch64_sve_regs_copy_to_regcache): Likewise.
7358         (aarch64_sve_regs_copy_from_regcache): Likewise.
7359         (sve_context): Structure from Linux headers.
7360         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7361         (SVE_SIG_ZREG_SIZE): Likewise.
7362         (SVE_SIG_PREG_SIZE): Likewise.
7363         (SVE_SIG_FFR_SIZE): Likewise.
7364         (SVE_SIG_REGS_OFFSET): Likewise.
7365         (SVE_SIG_ZREGS_OFFSET): Likewise.
7366         (SVE_SIG_ZREG_OFFSET): Likewise.
7367         (SVE_SIG_ZREGS_SIZE): Likewise.
7368         (SVE_SIG_PREGS_OFFSET): Likewise.
7369         (SVE_SIG_PREG_OFFSET): Likewise.
7370         (SVE_SIG_PREGS_SIZE): Likewise.
7371         (SVE_SIG_FFR_OFFSET): Likewise.
7372         (SVE_SIG_REGS_SIZE): Likewise.
7373         (SVE_SIG_CONTEXT_SIZE): Likewise.
7374         (SVE_PT_REGS_MASK): Likewise.
7375         (SVE_PT_REGS_FPSIMD): Likewise.
7376         (SVE_PT_REGS_SVE): Likewise.
7377         (SVE_PT_VL_INHERIT): Likewise.
7378         (SVE_PT_VL_ONEXEC): Likewise.
7379         (SVE_PT_REGS_OFFSET): Likewise.
7380         (SVE_PT_FPSIMD_OFFSET): Likewise.
7381         (SVE_PT_FPSIMD_SIZE): Likewise.
7382         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7383         (SVE_PT_SVE_PREG_SIZE): Likewise.
7384         (SVE_PT_SVE_FFR_SIZE): Likewise.
7385         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7386         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7387         (__SVE_SIG_TO_PT): Likewise.
7388         (SVE_PT_SVE_OFFSET): Likewise.
7389         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7390         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7391         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7392         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7393         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7394         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7395         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7396         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7397         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7398         (SVE_PT_SVE_SIZE): Likewise.
7399         (SVE_PT_SIZE): Likewise.
7400         (HAS_SVE_STATE): New define.
7401
7402 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7403
7404         * nat/aarch64-sve-linux-sigcontext.h: New file.
7405         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7406         new files.
7407         (SVE_VQ_MIN): Likewise.
7408         (SVE_VQ_MAX): Likewise.
7409         (SVE_VL_MIN): Likewise.
7410         (SVE_VL_MAX): Likewise.
7411         (SVE_NUM_ZREGS): Likewise.
7412         (SVE_NUM_PREGS): Likewise.
7413         (sve_vl_valid): Likewise.
7414         (struct user_sve_header): Likewise.
7415
7416 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7417             Richard Bunt <Richard.Bunt@arm.com>
7418
7419         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7420         was requested by GDB.
7421
7422 2018-06-15  Tom de Vries  <tdevries@suse.de>
7423
7424         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7425
7426 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7427
7428         * gnulib/update-gnulib.sh: Print expected versions of
7429         autoconf/aclocal.
7430
7431 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7432
7433         * arch-utils.c (default_type_align): Use type_length_units.
7434         * gdbtypes.c (type_align): Use type_length_units.
7435
7436 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7437
7438         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7439         of 'define' command.
7440
7441 2018-06-14  Tom de Vries  <tdevries@suse.de>
7442
7443         PR cli/22573
7444         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7445         get_no_prettyformat_print_options.
7446
7447 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7448
7449         * sparc-nat.h: Include target.h.
7450         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7451         <fetch_registers>: Remove this argument in function call.
7452         <store_registers>: Remove this argument in function call, remove
7453         extra semicolon.
7454         <low_forget_process>: Call sparc64_forget_process instead of
7455         sparc_forget_process.
7456
7457 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7458
7459         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7460         (procfs_target::make_corefile_notes): Adjust to new
7461         target_read_alloc return type.
7462
7463 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7464             Stephen Roberts  <stephen.roberts@arm.com>
7465
7466         PR gdb/22882
7467         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7468         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7469         Move should_notify_stop local into more inner scope.
7470
7471 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7472             Stephen Roberts  <stephen.roberts@arm.com>
7473
7474         PR gdb/22882
7475         * infrun.c (resume_1): Add call to mark_async_event_handler.
7476
7477 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7478
7479         * infrun.c (do_target_wait): Change old version of $pc printed.
7480
7481 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7482
7483         * dwarf2read.c (read_index_from_section): Rename to...
7484         (read_gdb_index_from_section): ... this, update all callers.
7485         (dwarf2_read_index): Rename to...
7486         (dwarf2_read_gdb_index): ... this, update all callers.
7487
7488 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7489
7490         * hppa-linux-nat.c
7491         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7492         hppa_linux_nat_target::fetch_registers.
7493
7494 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7495
7496         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7497         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7498         (AARCH64_DWARF_SVE_FFR): Likewise.
7499         (AARCH64_DWARF_SVE_P0): Likewise.
7500         (AARCH64_DWARF_SVE_Z0): Likewise.
7501
7502 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7503
7504         * common/common-regcache.h (raw_compare): New function.
7505         * regcache.c (regcache::raw_compare): Likewise.
7506         * regcache.h (regcache::raw_compare): New declaration.
7507
7508 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7509
7510         * common/common-regcache.h (reg_buffer_common): New structure.
7511         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7512         (reg_buffer::raw_supply): Likewise.
7513         (reg_buffer::raw_supply_integer): Likewise.
7514         (reg_buffer::raw_supply_zeroed): Likewise.
7515         (reg_buffer::raw_collect): Likewise.
7516         (reg_buffer::raw_collect_integer): Likewise.
7517         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7518         (reg_buffer::raw_supply): Likewise.
7519         (reg_buffer::raw_supply_integer): Likewise.
7520         (reg_buffer::raw_supply_zeroed): Likewise.
7521         (reg_buffer::raw_collect): Likewise.
7522         (reg_buffer::raw_collect_integer): Likewise.
7523
7524 2018-06-10  Tom Tromey  <tom@tromey.com>
7525
7526         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7527         (class remote_state) <stop_reply_queue>: Now std::vector.
7528         (remote_state::~remote_state)
7529         (remote_target::stop_reply_queue_length): Update.
7530         (struct queue_iter_param, remove_child_of_pending_fork)
7531         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7532         (check_pending_event_prevents_wildcard_vcont_callback)
7533         (remove_stop_reply_for_inferior)
7534         (remove_stop_reply_of_remote_state)
7535         (remote_notif_remove_once_on_match)
7536         (stop_reply_match_ptid_and_ws)
7537         (remote_kill_child_of_pending_fork): Remove.
7538         (remote_target::remove_new_fork_children)
7539         (remote_target::check_pending_events_prevent_wildcard_vcont)
7540         (remote_target::discard_pending_stop_replies)
7541         (remote_target::discard_pending_stop_replies_in_queue)
7542         (remote_target::remote_notif_remove_queued_reply)
7543         (remote_target::queued_stop_reply)
7544         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7545         (remote_target::wait, remote_target::kill_new_fork_children)
7546         (remote_target::async): Update.
7547
7548 2018-06-10  Tom Tromey  <tom@tromey.com>
7549
7550         * record-full.c (record_full_arch_list_cleanups): Remove.
7551         (record_full_message): Use try/catch.
7552         (record_full_wait_cleanups): Remove.
7553         (record_full_wait_1): Use try/catch.
7554         (record_full_restore): Likewise.
7555
7556 2018-06-10  Tom Tromey  <tom@tromey.com>
7557
7558         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7559         declare VEC.  Add constructor.
7560         <in_target_beneath>: Now bool.
7561         (record_full_breakpoints): Now a std::vector, static.
7562         (record_full_sync_record_breakpoints)
7563         (record_full_init_record_breakpoints)
7564         (record_full_target::insert_breakpoint)
7565         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7566
7567 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7568
7569         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7570         * serial.c (serial_interface_lookup): Remove struct keyword.
7571
7572 2018-06-10  Tom Tromey  <tom@tromey.com>
7573
7574         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7575         method.
7576         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7577         a method.
7578         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7579         method.
7580         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7581         "beneath" as a method.
7582         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7583         Use "beneath" as a method.
7584
7585 2018-06-10  Tom Tromey  <tom@tromey.com>
7586
7587         * tracefile.c (struct trace_file_writer_deleter): New.
7588         <operator()>: Rename from trace_file_writer_xfree.
7589         (trace_file_writer_up): New typedef.
7590         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7591
7592 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7593
7594         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7595         <m_registers, m_register_status>: Change type to
7596         std::unique_ptr.
7597         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7598         XCNEWVEC.
7599
7600 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7601
7602         * common/common-regcache.h (enum register_status): Add
7603         underlying type "signed char".
7604         * regcache.h (reg_buffer) <m_register_status>: Change type to
7605         register_status *.
7606         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7607         register_status instead of signed char.
7608         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7609         (reg_buffer::get_register_status): Remove cast.
7610         (readable_regcache::raw_read): Remove cast.
7611         (readable_regcache::cooked_read): Remove cast.
7612
7613 2018-06-09  Tom Tromey  <tom@tromey.com>
7614
7615         * source.c (reverse_search_command, forward_search_command): Use
7616         scoped_fd.
7617
7618 2018-06-09  Tom Tromey  <tom@tromey.com>
7619
7620         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7621         (serial_ops_list): Now static, std::vector.
7622         (serial_interface_lookup, serial_add_interface): Update.
7623
7624 2018-06-09  Tom Tromey  <tom@tromey.com>
7625
7626         * dwarf2read.c (process_cu_includes): Update.
7627         (process_full_comp_unit): Update.
7628         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7629         std::vector.
7630
7631 2018-06-08  Paul Koning  <paul_koning@dell.com>
7632
7633         PR gdb/23252
7634
7635         * python/python.c (do_start_initialization):
7636         Avoid call to internal Python API.
7637         (init__gdb_module): New function.
7638
7639 2018-06-08  Gary Benson <gbenson@redhat.com>
7640
7641         * linux-thread-db.c (valprint.h): New include.
7642         (struct check_thread_db_info): New structure.
7643         (check_thread_db_on_load, tdb_testinfo): New static globals.
7644         (check_thread_db, check_thread_db_callback): New functions.
7645         (try_thread_db_load_1): Run integrity checks if requested.
7646         (maintenance_check_libthread_db): New function.
7647         (_initialize_thread_db): Register "maint check libthread-db"
7648         and "maint set/show check-libthread-db".
7649         * NEWS: Mention the above new commands.
7650
7651 2018-06-08  Tom Tromey  <tom@tromey.com>
7652
7653         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7654         now a method.
7655
7656 2018-06-08  Tom Tromey  <tom@tromey.com>
7657
7658         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7659
7660 2018-06-08  Tom Tromey  <tom@tromey.com>
7661
7662         * common/btrace-common.h (struct btrace_data): Add constructor,
7663         destructor, move assignment operator.
7664         <empty, clear, fini>: New methods.
7665         <format>: Initialize.
7666         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7667         (btrace_data_empty): Don't declare.
7668         * common/btrace-common.c (btrace_data_init): Remove.
7669         (btrace_data::fini): Rename from btrace_data_fini.
7670         (btrace_data::empty): Rename from btrace_data_empty.
7671         (btrace_data::clear): Rename from btrace_data_clear.  Return
7672         bool.
7673         * btrace.h (make_cleanup_btrace_data): Don't declare.
7674         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7675         (parse_xml_btrace): Update.
7676         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7677         (maint_btrace_clear_packet_history_cmd): Update.
7678
7679 2018-06-07  Pedro Alves  <palves@redhat.com>
7680
7681         * target.h (target_ops) <beneath>: Now a method.  All references
7682         updated.
7683         (class target_stack): New.
7684         * target.c (g_target_stack): New.
7685         (g_current_top_target): Delete.
7686         (current_top_target): Get the top target out of g_target_stack.
7687         (target_stack::push, target_stack::unpush): New.
7688         (push_target, unpush_target): Reimplement.
7689         (target_is_pushed): Reimplement in terms of g_target_stack.
7690         (target_ops::beneath, target_stack::find_beneath): New.
7691
7692 2018-06-07  Pedro Alves  <palves@redhat.com>
7693
7694         * target.h (find_target_beneath): Delete declaration.
7695         * target.c (find_target_beneath): Delete definition.
7696         * aix-thread.c: All callers of find_target_beneath adjusted to
7697         call target_ops::beneath instead.
7698         * bsd-uthread.c: Likewise.
7699         * linux-thread-db.c: Likewise.
7700         * ravenscar-thread.c: Likewise.
7701         * sol-thread.c: Likewise.
7702         * spu-multiarch.c: Likewise.
7703
7704 2018-06-07  Pedro Alves  <palves@redhat.com>
7705
7706         * target.h (target_ops) <beneath>: Now a method.  All references
7707         updated.
7708         (target_ops) <m_beneath>: New.
7709         * target.c (target_ops::beneath): New.
7710         * corelow.c: Adjust all references to target_ops::beneath.
7711         * linux-thread-db.c: Likewise.
7712         * make-target-delegates: Likewise.
7713         * record-btrace.c: Likewise.
7714         * record-full.c: Likewise.
7715         * remote.c: Likewise.
7716         * target.c: Likewise.
7717         * target-delegates.c: Regenerate.
7718
7719 2018-06-07  Pedro Alves  <palves@redhat.com>
7720
7721         * target.h (target_stack): Delete.
7722         (current_top_target): Declare function.
7723         * target.c (target_stack): Delete.
7724         (g_current_top_target): New.
7725         (current_top_target): New function.
7726         * auxv.c: Use current_top_target instead of target_stack
7727         throughout.
7728         * avr-tdep.c: Likewise.
7729         * breakpoint.c: Likewise.
7730         * corefile.c: Likewise.
7731         * elfread.c: Likewise.
7732         * eval.c: Likewise.
7733         * exceptions.c: Likewise.
7734         * frame.c: Likewise.
7735         * gdbarch-selftests.c: Likewise.
7736         * gnu-v3-abi.c: Likewise.
7737         * ia64-tdep.c: Likewise.
7738         * ia64-vms-tdep.c: Likewise.
7739         * infcall.c: Likewise.
7740         * infcmd.c: Likewise.
7741         * infrun.c: Likewise.
7742         * linespec.c: Likewise.
7743         * linux-tdep.c: Likewise.
7744         * minsyms.c: Likewise.
7745         * ppc-linux-nat.c: Likewise.
7746         * ppc-linux-tdep.c: Likewise.
7747         * procfs.c: Likewise.
7748         * regcache.c: Likewise.
7749         * remote.c: Likewise.
7750         * rs6000-tdep.c: Likewise.
7751         * s390-linux-nat.c: Likewise.
7752         * s390-tdep.c: Likewise.
7753         * solib-aix.c: Likewise.
7754         * solib-darwin.c: Likewise.
7755         * solib-dsbt.c: Likewise.
7756         * solib-spu.c: Likewise.
7757         * solib-svr4.c: Likewise.
7758         * solib-target.c: Likewise.
7759         * sparc-tdep.c: Likewise.
7760         * sparc64-tdep.c: Likewise.
7761         * spu-tdep.c: Likewise.
7762         * symfile.c: Likewise.
7763         * symtab.c: Likewise.
7764         * target-descriptions.c: Likewise.
7765         * target-memory.c: Likewise.
7766         * target.c: Likewise.
7767         * target.h: Likewise.
7768         * tracefile-tfile.c: Likewise.
7769         * tracepoint.c: Likewise.
7770         * valops.c: Likewise.
7771         * valprint.c: Likewise.
7772         * value.c: Likewise.
7773         * windows-tdep.c: Likewise.
7774         * mi/mi-main.c: Likewise.
7775
7776 2018-06-07  Tom Tromey  <tom@tromey.com>
7777
7778         * valprint.h (build_address_symbolic): Declare.
7779         * printcmd.c (print_address_symbolic): Update.
7780         (build_address_symbolic): Change "name" and "filename" to
7781         std::string.
7782         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7783         Update.
7784         * defs.h (build_address_symbolic): Remove declaration.
7785
7786 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7787
7788         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7789         (aarch64_vnv_type): Add function.
7790         (aarch64_pseudo_register_name): Add V regs for SVE.
7791         (aarch64_pseudo_register_type): Likewise.
7792         (aarch64_pseudo_register_reggroup_p): Likewise.
7793         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7794         (aarch64_pseudo_read_value): Add V regs for SVE.
7795         (aarch64_pseudo_write_2): Use V0 offset for SVE
7796         (aarch64_pseudo_write): Add V regs for SVE.
7797         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7798
7799 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7800
7801         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7802         (sve_vl_from_vq): Likewise.
7803
7804 2018-06-05  Tom Tromey  <tom@tromey.com>
7805
7806         * cli/cli-cmds.c (show_version): Update.
7807         * top.c (print_gdb_version): Add "interactive" parameter.
7808         Update.
7809         * main.c (captured_main_1): Update.
7810         * top.h (print_gdb_version): Add "interactive" parameter and a
7811         comment.
7812
7813 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7814
7815         * common/enum-flags.h: Add trailing semicolon to example in
7816         comment.
7817
7818 2018-06-05  Tom Tromey  <tom@tromey.com>
7819
7820         PR cli/12326:
7821         * NEWS: Add entry about pager.
7822         * utils.c (pagination_disabled_for_command): New global.
7823         (prompt_for_continue): Allow "c" response to prompt.
7824         (reinitialize_more_filter): Clear
7825         pagination_disabled_for_command.
7826         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7827
7828 2018-06-04  Tom Tromey  <tom@tromey.com>
7829
7830         * ada-lang.h (ada_lookup_symbol_list): Update.
7831         * ada-lang.c (resolve_subexp): Update.
7832         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7833         parameter.
7834         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7835         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7836         results parameter to std::vector.
7837         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7838         Update.
7839         * ada-exp.y (block_lookup): Update.
7840         (select_possible_type_sym): Change type of syms.  Remove nsyms
7841         parameter.
7842         (write_var_or_type, write_name_assoc): Update.
7843
7844 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7845
7846         * windows-nat.c (windows_nat_target::xfer_partial): Return
7847         TARGET_XFER_E_IO if we need to delegate to the target beneath
7848         but BENEATH is NULL.
7849
7850 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7851
7852         * Makefile.in (config.status): Add configure.nat as a
7853         dependency.
7854
7855 2018-06-04  Tom Tromey  <tom@tromey.com>
7856
7857         * cp-name-parser.y (cpname_state): Add method declarations.
7858         (HANDLE_QUAL): Update.
7859         (cpname_state::d_grab, cpname_state::fill_comp)
7860         (cpname_state::make_operator, cpname_state::make_dtor)
7861         (cpname_state::make_builtin_type, cpname_state::make_name)
7862         (cpname_state::d_qualify, cpname_state::d_int_type)
7863         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7864         (%union): Move earlier.
7865
7866 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7867
7868         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7869
7870 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7871
7872         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7873         (aarch64_pseudo_write_1): Likewise.
7874         (aarch64_pseudo_read_value): Use helper.
7875         (aarch64_pseudo_write): Likewise.
7876
7877 2018-06-04  Pedro Alves  <palves@redhat.com>
7878
7879         * darwin-nat.c (darwin_ops): Delete.
7880         (darwin_attach_pid): Use get_native_target.
7881
7882 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7883
7884         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7885         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7886
7887 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7888
7889         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7890         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7891         (aarch64_gdbarch_init): Check for SVE.
7892         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7893
7894 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7895
7896         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7897         * aarch64-tdep.h (aarch64_read_description): Likewise.
7898         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7899         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7900         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7901         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7902         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7903
7904 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7905
7906         * value.c (value_fetch_lazy_bitfield): New.
7907         (value_fetch_lazy_memory): New.
7908         (value_fetch_lazy_register): New.
7909         (value_fetch_lazy): Factor out to smaller functions.
7910
7911 2018-06-01  Tom Tromey  <tom@tromey.com>
7912
7913         * cp-name-parser.y (backslashable, represented): Now const.
7914
7915 2018-06-01  Tom Tromey  <tom@tromey.com>
7916
7917         * cp-name-parser.y: Include parser-defs.h.
7918         (parser_fprintf): Remove declaration.
7919
7920 2018-06-01  Tom Tromey  <tom@tromey.com>
7921
7922         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7923         %parse-param.
7924         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7925         (global_result): Remove globals.
7926         (struct cpname_state): New.
7927         (yyparse): Don't declare.
7928         (yylex, yyerror): Move declarations after %union.
7929         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7930         (make_name): Add state parameter.
7931         Update all callers.
7932         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7933         parameter.
7934         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7935         Update.
7936         (yylex): Add lvalp, state parameters.
7937         (yyerror): Add state parameter.
7938         (cp_demangled_name_to_comp): Update.
7939
7940 2018-06-01  Tom Tromey  <tom@tromey.com>
7941
7942         * cp-name-parser.y (parser_fprintf): Declare.
7943         (GDB_YY_REMAP_PREFIX): Define.
7944         Include yy-remap.h.  Don't redefine yy* identifiers.
7945
7946 2018-06-01  Tom Tromey  <tom@tromey.com>
7947
7948         * python/py-type.c (typy_legacy_template_argument): Update.
7949         * cp-support.h (cp_demangled_name_to_comp): Update.
7950         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7951         parameter to be a "std::string *".
7952         (main): Update.
7953
7954 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7955
7956         * ada-lex.l: Include "diagnostics.h" instead of
7957         "common/diagnostics.h".
7958         * unittests/environ-selftests.c: Likewise.
7959         * common/diagnostics.h: Moved to ../include.
7960
7961 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7962
7963         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7964         to language_mode_manual while calling breakpoint_re_set_one.
7965
7966 2018-06-01  Tom Tromey  <tom@tromey.com>
7967
7968         * valops.c (value_cast_structs, destructor_name_p): Update.
7969         * symtab.c (gdb_mangle_name): Update.
7970         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7971         Update.
7972         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7973         (pascal_object_print_value_fields, pascal_object_print_value):
7974         Update.
7975         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7976         * linespec.c (find_methods): Update.
7977         * gdbtypes.h (type_name_no_tag): Remove.
7978         (type_name_or_error): Rename from type_name_no_tag_or_error.
7979         * gdbtypes.c (type_name_no_tag): Remove.
7980         (type_name_or_error): Rename from type_name_no_tag_or_error.
7981         (lookup_struct_elt_type, check_typedef): Update.
7982         * expprint.c (print_subexp_standard): Update.
7983         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7984         * d-namespace.c (d_lookup_nested_symbol): Update.
7985         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7986         (cp_print_class_member): Update.
7987         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7988         * completer.c (add_struct_fields): Update.
7989         * c-typeprint.c (cp_type_print_derivation_info)
7990         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7991         Update.
7992         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7993         (ada_prefer_type, ada_is_exception_sym): Update.
7994
7995 2018-06-01  Tom Tromey  <tom@tromey.com>
7996
7997         * valops.c (enum_constant_from_type, value_namespace_elt)
7998         (value_maybe_namespace_elt): Update.
7999         * valarith.c (find_size_for_pointer_math): Update.
8000         * target-descriptions.c (make_gdb_type): Update.
8001         * symmisc.c (print_symbol): Update.
8002         * stabsread.c (define_symbol, read_type)
8003         (complain_about_struct_wipeout, add_undefined_type)
8004         (cleanup_undefined_types_1): Update.
8005         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
8006         (rust_range_type_p, val_print_struct, rust_print_struct_def)
8007         (rust_internal_print_type, rust_composite_type)
8008         (rust_evaluate_funcall, rust_evaluate_subexp)
8009         (rust_inclusive_range_type_p): Update.
8010         * python/py-type.c (typy_get_tag): Update.
8011         * p-typeprint.c (pascal_type_print_base): Update.
8012         * mdebugread.c (parse_symbol, parse_type): Update.
8013         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
8014         Update.
8015         * guile/scm-type.c (gdbscm_type_tag): Update.
8016         * go-lang.c (sixg_string_p): Update.
8017         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
8018         Update.
8019         * gdbtypes.h (struct main_type) <tag_name>: Remove.
8020         (TYPE_TAG_NAME): Remove.
8021         * gdbtypes.c (type_name_no_tag): Simplify.
8022         (check_typedef, check_types_equal, recursive_dump_type)
8023         (copy_type_recursive, arch_composite_type): Update.
8024         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
8025         in summary mode when needed.
8026         * eval.c (evaluate_funcall): Update.
8027         * dwarf2read.c (fixup_go_packaging, read_structure_type)
8028         (process_structure_scope, read_enumeration_type)
8029         (read_namespace_type, read_module_type, determine_prefix): Update.
8030         * cp-support.c (inspect_type): Update.
8031         * coffread.c (process_coff_symbol, decode_base_type): Update.
8032         * c-varobj.c (c_is_path_expr_parent): Update.
8033         * c-typeprint.c (c_type_print_base_struct_union): Update.
8034         (c_type_print_base_1): Update.  Print struct/class/union/enum in
8035         summary when using C language.
8036         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
8037         (gen_maybe_namespace_elt): Update.
8038         * ada-lang.c (ada_type_name): Simplify.
8039         (empty_record, ada_template_to_fixed_record_type_1)
8040         (template_to_static_fixed_type)
8041         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
8042
8043 2018-06-01  Tom Tromey  <tom@tromey.com>
8044
8045         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
8046         c_print_type.
8047         * c-typeprint.c (c_print_type_1): Add "language" parameter.
8048         (c_print_type): Update.
8049         (c_print_type): New overload.
8050         (c_type_print_varspec_prefix, c_type_print_args)
8051         (c_type_print_varspec_suffix, c_print_type_no_offsets)
8052         (c_type_print_base_struct_union, c_type_print_base_1)
8053         (cp_type_print_method_args): Add "language" parameter.
8054         (c_type_print_base): Update.
8055         * c-lang.h (c_print_type): Add new overload.
8056
8057 2018-06-01  Tom Tromey  <tom@tromey.com>
8058
8059         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
8060         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
8061
8062 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
8063
8064         * aarch64-tdep.c (aarch64_sve_register_names): New const
8065         var.
8066         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
8067         (AARCH64_SVE_Z_REGS_NUM): New define.
8068         (AARCH64_SVE_P_REGS_NUM): Likewise.
8069         (AARCH64_SVE_NUM_REGS): Likewise.
8070
8071 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8072
8073         * nat/linux-ptrace.h [__alpha__]
8074         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
8075         definitions.
8076
8077 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
8078
8079         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
8080         the endianness selected.
8081         * NEWS: Document `set endian auto' mode operation update.
8082
8083 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8084
8085         * Makefile.in: Add new header.
8086         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
8087         (sve_vl_from_vg): Likewise.
8088         (sve_vq_from_vl): Likewise.
8089         (sve_vl_from_vq): Likewise.
8090         (sve_vq_from_vg): Likewise.
8091         (sve_vg_from_vq): Likewise.
8092         * configure.nat: Add new c file.
8093         * nat/aarch64-sve-linux-ptrace.c: New file.
8094         * nat/aarch64-sve-linux-ptrace.h: New file.
8095
8096 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
8097
8098         * aarch64-linux-nat.c (aarch64_linux_read_description):
8099         Add parmeter zero.
8100         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
8101         Likewise.
8102         * aarch64-tdep.c (tdesc_aarch64_list): Add.
8103         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
8104         (aarch64_gdbarch_init): Add parmeter zero.
8105         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
8106         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
8107         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
8108         parmeter.
8109         * doc/gdb.texinfo: Describe SVE feature
8110         * features/aarch64-sve.c: New file.
8111
8112 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
8113
8114         PR gdb/23210
8115         * gdbarch.sh (significant_addr_bit): Default to zero when
8116         not set by target architecture.
8117         * gdbarch.c: Re-generated.
8118         * utils.c (address_significant): Update.
8119
8120 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
8121
8122         * stack.c (func_command): Remove trailing newline in call to error.
8123
8124 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8125
8126         * regcache.h (regcache_raw_collect): Remove, update callers to
8127         use regcache::raw_collect.
8128         * regcache.c (regcache_raw_collect): Remove.
8129
8130 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8131
8132         * regcache.h (regcache_raw_supply): Remove, update callers to
8133         use detached_regcache::raw_supply.
8134         * regcache.c (regcache_raw_supply): Remove.
8135
8136 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8137
8138         * regcache.h (regcache_cooked_write_part): Remove, update
8139         callers to use regcache::cooked_write_part.
8140         * regcache.c (regcache_cooked_write_part): Remove.
8141
8142 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8143
8144         * regcache.h (regcache_cooked_read_part): Remove, update callers
8145         to use readable_regcache::cooked_read_part.
8146         * regcache.c (regcache_cooked_read_part): Remove.
8147
8148 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8149
8150         * regcache.h (regcache_cooked_read_value): Remove, update
8151         callers to use readable_regcache::cooked_read_value.
8152         * regcache.c (regcache_cooked_read_value): Remove.
8153
8154 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8155
8156         * regcache.h (regcache_cooked_write): Remove, update callers to
8157         use regcache::cooked_write.
8158         * regcache.c (regcache_cooked_write): Remove.
8159
8160 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8161
8162         * regcache.h (regcache_invalidate): Remove, update callers to
8163         use detached_regcache::invalidate instead.
8164         * regcache.c (regcache_invalidate): Remove.
8165
8166 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8167
8168         * regcache.h (regcache_raw_write_part): Remove, update callers
8169         to use regcache::raw_write_part instead.
8170         * regcache.c (regcache_raw_write_part): Remove.
8171
8172 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8173
8174         * regcache.h (regcache_raw_read_part): Remove, update callers to
8175         use readable_regcache::raw_read_part instead.
8176         * regcache.c (regcache_raw_read_part): Remove.
8177
8178 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8179
8180         * regcache.h (regcache_cooked_read): Remove, update callers to
8181         use readable_regcache::cooked_read instead.
8182         * regcache.c (regcache_cooked_read): Remove.
8183
8184 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8185
8186         * regcache.h (regcache_raw_write): Remove, update callers to use
8187         regcache::raw_write instead.
8188         * regcache.c (regcache_raw_write): Remove.
8189
8190 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8191
8192         * regcache.h (regcache_raw_read): Remove, update callers to use
8193         readable_regcache::raw_read instead.
8194         * regcache.c (regcache_raw_read): Remove.
8195
8196 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8197
8198         * regcache.h (regcache_raw_update): Remove, update callers to
8199         use readable_regcache::raw_update instead.
8200         * regcache.c (regcache_raw_update): Remove.
8201
8202 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8203
8204         * regcache.h (regcache_register_status): Remove, update callers
8205         to use reg_buffer::get_register_status directly instead.
8206         * regcache.c (regcache_register_status): Remove.
8207
8208 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8209
8210         * regcache.h (regcache_get_ptid): Remove, update all callers to
8211         call regcache::ptid instead.
8212         * regcache.c (regcache_get_ptid): Remove.
8213
8214 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8215
8216         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8217
8218 2018-05-30  Pedro Alves  <palves@redhat.com>
8219
8220         * common/common-exceptions.h (exception_rethrow): Use
8221         ATTRIBUTE_NORETURN.
8222
8223 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8224
8225         * breakpoint.c (print_solib_event, check_status_catch_solib):
8226         Remove struct keyword in range-based for loops.
8227         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8228         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8229         Likewise.
8230         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8231         Likewise.
8232         * symfile.c (addr_info_make_relative): Likewise.
8233         * thread.c (value_in_thread_stack_temporaries): Likewise.
8234
8235 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8236
8237         PR gdb/16841
8238         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8239         aggregate type to get its real type before accessing it.
8240
8241 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8242
8243         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8244         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8245         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8246         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8247         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8248         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8249         * printcmd.c (info_address_command): Likewise.
8250
8251 2018-05-29  Tom Tromey  <tom@tromey.com>
8252
8253         * windows-nat.c (handle_exception): Update fall-through comment.
8254
8255 2018-05-29  Tom Tromey  <tom@tromey.com>
8256
8257         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8258         (struct program_space) <added_solibs>: Now a std::vector.
8259         * breakpoint.c (print_solib_event): Update.
8260         (check_status_catch_solib): Update.
8261         * progspace.c (clear_program_space_solib_cache): Update.
8262         * solib.c (update_solib_list): Update.
8263
8264 2018-05-29  Tom Tromey  <tom@tromey.com>
8265
8266         * python/py-type.c (typy_richcompare): Update.
8267         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8268         * gdbtypes.h (types_deeply_equal): Return bool.
8269         (types_equal): Likewise.
8270         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8271         declare VEC.
8272         (check_types_equal): Change worklist to std::vector.  Return
8273         bool.
8274         (struct type_equality_entry): Add constructor.
8275         (compare_maybe_null_strings): Return bool.
8276         (check_types_worklist): Return bool.  Change worklist to
8277         std::vector.
8278         (types_deeply_equal): Use std::vector.
8279         (types_equal): Return bool.
8280         (compare_maybe_null_strings): Simplify.
8281
8282 2018-05-29  Tom Tromey  <tom@tromey.com>
8283
8284         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8285
8286 2018-05-29  Tom Tromey  <tom@tromey.com>
8287
8288         * objc-lang.h: Don't include cp-support.h.
8289         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8290         declare VEC.
8291
8292 2018-05-27  Tom Tromey  <tom@tromey.com>
8293
8294         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8295
8296 2018-05-25  Tom Tromey  <tom@tromey.com>
8297
8298         * value.c (value::location): Initialize.
8299
8300 2018-05-25  Tom Tromey  <tom@tromey.com>
8301
8302         * dbxread.c (init_bincl_list): Remove.
8303         (bincl_list): Now a std::vector.
8304         (bincls_allocated, next_bincl): Remove.
8305         (free_bincl_list, do_free_bincl_list_cleanup)
8306         (make_cleanup_free_bincl_list): Remove.
8307         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8308         unique_xmalloc_ptr.
8309         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8310         (struct header_file_location): Add constructor.
8311         (add_bincl_to_list): Remove.
8312
8313 2018-05-25  Tom Tromey  <tom@tromey.com>
8314
8315         * tui/tui.c (tui_enable): Update.
8316         * mi/mi-interp.c (mi_interp::init): Update.
8317         * interps.h (class interp) <name>: New method.
8318         <m_name>: Rename from name.
8319         (~scoped_restore_interp): Update.
8320         * interps.c (interp::interp): Update.
8321         (interp_add, interp_set, interp_lookup_existing)
8322         (current_interp_named_p): Update.
8323
8324 2018-05-25  Tom Tromey  <tom@tromey.com>
8325
8326         * interps.c (interp_name): Remove.
8327         * mi/mi-interp.c (mi_interp::init): Update.
8328         * interps.h (interp_name): Remove.
8329         (~scoped_restore_interp): Update.
8330         * tui/tui.c (tui_enable): Update.
8331
8332 2018-05-25  Tom Tromey  <tom@tromey.com>
8333
8334         * utils.c (fputs_maybe_filtered): Update.
8335         * linespec.c (decode_line_full): Update.
8336         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8337         (mi_print_breakpoint_for_event, mi_solib_loaded)
8338         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8339         (mi_user_selected_context_changed): Update.
8340         * mi/mi-main.c (mi_execute_command): Update.
8341         * cli/cli-script.c (execute_control_command): Update.
8342         * python/python.c (execute_gdb_command): Update.
8343         * solib.c (info_sharedlibrary_command): Update.
8344         * interps.c (interp_ui_out): Remove.
8345         * interps.h (interp_ui_out): Remove.
8346
8347 2018-05-25  Tom Tromey  <tom@tromey.com>
8348
8349         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8350         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8351         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8352
8353 2018-05-25  Tom Tromey  <tom@tromey.com>
8354
8355         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8356         * interps.c (interp_exec): Use scoped_restore.
8357
8358 2018-05-25  Tom Tromey  <tom@tromey.com>
8359
8360         * remote.c (remote_target::remote_file_get): Use
8361         gdb::byte_vector.
8362         (remote_target::remote_file_put): Likewise.
8363
8364 2018-05-25  Tom Tromey  <tom@tromey.com>
8365
8366         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8367         a std::string.
8368         (get_pe_section_index, add_pe_exported_sym): Update.
8369         (read_pe_exported_syms): Use gdb::def_vector.
8370
8371 2018-05-25  Tom Tromey  <tom@tromey.com>
8372
8373         * frame.c (remove_prev_frame): Remove.
8374         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8375
8376 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8377
8378         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8379         Remove prototypes.
8380         * mips-linux-nat.c (supply_fpregset): Always call
8381         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8382         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8383         `mips_fill_fpregset'.
8384         * mips-linux-tdep.c (mips_supply_fpregset)
8385         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8386         (mips_fill_fpregset_wrapper): Remove functions.
8387         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8388         (mips_linux_fpregset): Remove variable.
8389         (mips_linux_iterate_over_regset_sections): Use
8390         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8391         (mips_linux_o32_sigframe_init): Remove comment.
8392
8393 2018-05-25  Pedro Alves  <palves@redhat.com>
8394
8395         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8396         (struct readahead_cache, struct packet_reg, struct
8397         remote_arch_state, class remote_state): Move higher up in the
8398         file.
8399         (remote_target::m_remote_state): Now an object instead of a pointer.
8400         (remote_target::get_remote_state): Adjust.
8401
8402 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8403
8404         * stack.c (select_and_print_frame): Delete.
8405         (struct function_bounds): Move struct within function.
8406         (func_command): Most content moved into new function
8407         find_frame_for_function, use new function, print result, add
8408         function comment.
8409         (find_frame_for_function): New function, now returns a result.
8410
8411 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8412
8413         * stack.c (iterate_over_block_arg_vars): Fix comment.
8414         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8415
8416 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8417
8418         PR gdb/23203
8419         * frame.c
8420         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8421         Define.
8422         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8423         Define.
8424         * frame.h (class scoped_restore_selected_frame): New class.
8425         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8426         of any exception, use scoped_restore_selected_frame to restore the
8427         frame instead.
8428
8429 2018-05-24  Pedro Alves  <palves@redhat.com>
8430
8431         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8432         override.
8433
8434 2018-05-23  Tom Tromey  <tom@tromey.com>
8435
8436         * complaints.c (struct complaints): Remove.
8437         (symfile_complaint_book): Remove.
8438         (series): New global.
8439         (complaint_internal): Update.
8440         (clear_complaints): Update.
8441
8442 2018-05-23  Tom Tromey  <tom@tromey.com>
8443
8444         * complaints.c (counters): New global.
8445         (struct complain): Remove.
8446         (struct complaints) <root>: Remove.
8447         (complaint_sentinel): Remove.
8448         (symfile_complaint_book): Update.
8449         (find_complaint) Remove.
8450         (complaint_internal, clear_complaints): Update.
8451
8452 2018-05-23  Tom Tromey  <tom@tromey.com>
8453
8454         * complaints.c (struct complain) <file, line>: Remove.
8455         (find_complaint): Remove file, line parameters.
8456         (complaint_internal): Update.
8457
8458 2018-05-23  Tom Tromey  <tom@tromey.com>
8459
8460         * complaints.c (vcomplaint): Remove.
8461         (complaint_internal) Merge in contents of vcomplaint.
8462
8463 2018-05-23  Tom Tromey  <tom@tromey.com>
8464
8465         * complaints.c (struct complaints) <explanation>: Remove.
8466         (symfile_explanations): Remove.
8467         (symfile_complaint_book): Update.
8468         (vcomplaint): Update.
8469         (struct explanation): Remove.
8470
8471 2018-05-23  Tom Tromey  <tom@tromey.com>
8472
8473         * complaints.c (symfile_complaints): Remove.
8474         (complaint_internal): Remove "complaints" parameter.
8475         (clear_complaints, vcomplaint): Remove "c" parameter.
8476         (get_complaints): Remove.
8477         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8478         (dwarf2_debug_line_missing_file_complaint)
8479         (dwarf2_debug_line_missing_end_sequence_complaint)
8480         (dwarf2_complex_location_expr_complaint)
8481         (dwarf2_const_value_length_mismatch_complaint)
8482         (dwarf2_section_buffer_overflow_complaint)
8483         (dwarf2_macro_malformed_definition_complaint)
8484         (dwarf2_invalid_attrib_class_complaint)
8485         (create_addrmap_from_index, dw2_symtab_iter_next)
8486         (dw2_expand_marked_cus)
8487         (dw2_debug_names_iterator::find_vec_in_debug_names)
8488         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8489         (create_debug_type_hash_table, init_cutu_and_read_dies)
8490         (partial_die_parent_scope, add_partial_enumeration)
8491         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8492         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8493         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8494         (create_cus_hash_table, create_dwp_hash_table)
8495         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8496         (dwarf2_rnglists_process, dwarf2_ranges_process)
8497         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8498         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8499         (handle_struct_member_die, process_structure_scope)
8500         (read_array_type, read_common_block, read_module_type)
8501         (read_tag_pointer_type, read_typedef, read_base_type)
8502         (read_subrange_type, load_partial_dies, partial_die_info::read)
8503         (partial_die_info::read, partial_die_info::read)
8504         (partial_die_info::read, read_checked_initial_length_and_offset)
8505         (dwarf2_string_attr, read_formatted_entries)
8506         (dwarf_decode_line_header)
8507         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8508         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8509         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8510         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8511         (get_signatured_type, get_DW_AT_signature_type)
8512         (decode_locdesc, file_file_name, consume_improper_spaces)
8513         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8514         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8515         (dwarf2_symbol_mark_computed, set_die_type)
8516         (read_attribute_value): Update.
8517         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8518         Update.
8519         * dbxread.c (unknown_symtype_complaint)
8520         (lbrac_mismatch_complaint, repeated_header_complaint)
8521         (set_namestring, function_outside_compilation_unit_complaint)
8522         (read_dbx_symtab, process_one_symbol): Update.
8523         * gdbtypes.c (stub_noname_complaint): Update.
8524         * windows-nat.c (handle_unload_dll): Update.
8525         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8526         (decode_base_type): Update.
8527         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8528         (eb_complaint, record_include_begin, record_include_end)
8529         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8530         (process_xcoff_symbol, read_symbol)
8531         (function_outside_compilation_unit_complaint)
8532         (scan_xcoff_symtab): Update.
8533         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8534         * buildsym.c (finish_block_internal, make_blockvector)
8535         (end_symtab_get_static_block, augment_type_symtab): Update.
8536         * dtrace-probe.c (dtrace_process_dof)
8537         (dtrace_static_probe_ops::get_probes): Update.
8538         * complaints.h (struct complaint): Don't declare.
8539         (symfile_complaints): Remove.
8540         (complaint_internal): Remove "complaints" parameter.
8541         (complaint): Likewise.
8542         (clear_complaints): Likewise.
8543         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8544         (reread_symbols): Update.
8545         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8546         (dwarf2_frame_cache, decode_frame_entry): Update.
8547         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8548         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8549         (info_selectors_command): Update.
8550         * macrotab.c (macro_include, check_for_redefinition)
8551         (macro_undef): Update.
8552         * objfiles.c (filter_overlapping_sections): Update.
8553         * stabsread.c (invalid_cpp_abbrev_complaint)
8554         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8555         (define_symbol, error_type, read_type, rs6000_builtin_type)
8556         (stabs_method_name_from_physname, read_member_functions)
8557         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8558         (attach_fields_to_type, complain_about_struct_wipeout)
8559         (read_range_type, read_args, common_block_start)
8560         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8561         Update.
8562         * mdebugread.c (index_complaint, unknown_ext_complaint)
8563         (basic_type_complaint, bad_tag_guess_complaint)
8564         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8565         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8566         (parse_procedure, parse_lines)
8567         (function_outside_compilation_unit_complaint)
8568         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8569         (bad_tag_guess_complaint, reg_value_complaint): Update.
8570         * cp-support.c (demangled_name_complaint): Update.
8571         * macroscope.c (sal_macro_scope): Update.
8572         * dwarf-index-write.c (class debug_names): Update.
8573
8574 2018-05-23  Tom Tromey  <tom@tromey.com>
8575
8576         * complaints.c (clear_complaints): Remove "noisy" parameter.
8577         * complaints.h (clear_complaints): Update.
8578         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8579         (reread_symbols): Update.
8580
8581 2018-05-23  Tom Tromey  <tom@tromey.com>
8582
8583         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8584         SUBSEQUENT_MESSAGE.
8585         (vcomplaint, clear_complaints): Update.
8586         (symfile_explanations): Remove some messages.
8587
8588 2018-05-23  Tom Tromey  <tom@tromey.com>
8589
8590         * complaints.c (internal_complaint): Remove.
8591         * complaints.h (internal_complaint): Remove.
8592
8593 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8594
8595         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8596
8597 2018-05-22  Pedro Alves  <palves@redhat.com>
8598
8599         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8600         (remote_fileio_badfd, remote_fileio_return_errno)
8601         (remote_fileio_return_success, remote_fileio_func_open)
8602         (remote_fileio_func_open, remote_fileio_func_close)
8603         (remote_fileio_func_read, remote_fileio_func_write)
8604         (remote_fileio_func_lseek, remote_fileio_func_rename)
8605         (remote_fileio_func_unlink, remote_fileio_func_stat)
8606         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8607         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8608         remote_target parameter.
8609         (remote_fio_func_map) <func>: Add remote_target parameter.
8610         (do_remote_fileio_request, remote_fileio_request):
8611         * remote-fileio.h (remote_fileio_request):
8612         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8613         remote_target parameter.
8614         (remote_notif_process, handle_notification): Adjust to pass down
8615         the remote.
8616         (remote_notif_state_allocate): Add remote_target parameter.  Save
8617         it.
8618         * remote-notif.h (struct remote_target): Forward declare.
8619         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8620         remote_target parameter.
8621         (struct remote_notif_state) <remote>: New field.
8622         (remote_notif_ack, remote_notif_parse): Add remote_target
8623         parameter.
8624         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8625         remote_target parameter.
8626         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8627         (threads_listing_context, rmt_thread_action, protocol_feature)
8628         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8629         (packet_result, struct threads_listing_context, remote_state):
8630         Move definitions and declarations higher up.
8631         (remote_target) <~remote_target>: Declare.
8632         (remote_download_command_source, remote_file_put, remote_file_get)
8633         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8634         (remote_hostio_pread_vFile, remote_hostio_send_command)
8635         (remote_hostio_set_filesystem, remote_hostio_open)
8636         (remote_hostio_close, remote_hostio_unlink, remote_state)
8637         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8638         (get_memory_write_packet_size, get_memory_read_packet_size)
8639         (append_pending_thread_resumptions, remote_detach_1)
8640         (append_resumption, remote_resume_with_vcont)
8641         (add_current_inferior_and_thread, wait_ns, wait_as)
8642         (process_stop_reply, remote_notice_new_inferior)
8643         (process_initial_stop_replies, remote_add_thread)
8644         (btrace_sync_conf, remote_btrace_maybe_reopen)
8645         (remove_new_fork_children, kill_new_fork_children)
8646         (discard_pending_stop_replies, stop_reply_queue_length)
8647         (check_pending_events_prevent_wildcard_vcont)
8648         (discard_pending_stop_replies_in_queue, stop_reply)
8649         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8650         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8651         (remote_interrupt_as, remote_interrupt_ns)
8652         (remote_get_noisy_reply, remote_query_attached)
8653         (remote_add_inferior, remote_current_thread, get_current_thread)
8654         (set_thread, set_general_thread, set_continue_thread)
8655         (set_general_process, write_ptid)
8656         (remote_unpack_thread_info_response, remote_get_threadinfo)
8657         (parse_threadlist_response, remote_get_threadlist)
8658         (remote_threadlist_iterator, remote_get_threads_with_ql)
8659         (remote_get_threads_with_qxfer)
8660         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8661         (get_offsets, remote_check_symbols, remote_supported_packet)
8662         (remote_query_supported, remote_packet_size)
8663         (remote_serial_quit_handler, remote_detach_pid)
8664         (remote_vcont_probe, remote_resume_with_hc)
8665         (send_interrupt_sequence, interrupt_query)
8666         (remote_notif_get_pending_events, fetch_register_using_p)
8667         (send_g_packet, process_g_packet, fetch_registers_using_g)
8668         (store_register_using_P, store_registers_using_G)
8669         (set_remote_traceframe, check_binary_download)
8670         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8671         (remote_xfer_live_readonly_partial, remote_read_bytes)
8672         (remote_send_printf, remote_flash_write, readchar)
8673         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8674         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8675         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8676         (extended_remote_disable_randomization, extended_remote_run)
8677         (send_environment_packet, extended_remote_environment_support)
8678         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8679         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8680         (packet_command): Now methods of ...
8681         (remote_target): ... this class.
8682         (m_remote_state) <remote_target>: New field.
8683         (struct remote_state) <stop_reply_queue,
8684         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8685         fields.
8686         (remote_state::remote_state): Allocate stop_reply_queue.
8687         (remote_state): Delete global.
8688         (get_remote_state_raw): Delete.
8689         (remote_target::get_remote_state): Allocate m_remote_state on
8690         demand.
8691         (get_current_remote_target): New.
8692         (remote_ops, extended_remote_ops): Delete.
8693         (wait_forever_enabled_p, remote_async_inferior_event_token):
8694         Delete, moved to struct remote_state.
8695         (remote_target::close): Delete self.  Destruction bits split to
8696         ...
8697         (remote_target::~remote_target): ... this.
8698         (show_memory_packet_size): Adjust to use
8699         get_current_remote_target.
8700         (struct protocol_feature) <func>: Add remote_target parameter.
8701         All callers adjusted.
8702         (curr_quit_handler_target): New.
8703         (remote_serial_quit_handler): Reimplement.
8704         (remote_target::open_1): Adjust to use get_current_remote_target.
8705         Heap-allocate remote_target/extended_remote_target instances.
8706         (vcont_builder::vcont_builder): Add remote_target parameter, and
8707         save it in m_remote.  All callers adjusted.
8708         (vcont_builder::m_remote): New field.
8709         (vcont_builder::restart, vcont_builder::flush)
8710         (vcont_builder::push_action): Use it.
8711         (remote_target::commit_resume): Use it.
8712         (struct queue_iter_param) <remote>: New field.
8713         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8714         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8715         (check_pending_event_prevents_wildcard_vcont_callback)
8716         (remote_target::check_pending_events_prevent_wildcard_vcont)
8717         (remote_target::discard_pending_stop_replies)
8718         (remote_target::discard_pending_stop_replies_in_queue)
8719         (remote_target::remote_notif_remove_queued_reply): Fill in
8720         'remote' field.
8721         (remote_notif_get_pending_events): New.
8722         (remote_target::readchar, remote_target::remote_serial_write):
8723         Save/restore curr_quit_handler_target.
8724         (putpkt): New.
8725         (kill_new_fork_children): Fill in 'remote' field.
8726         (packet_command): Use get_current_remote_target, defer to
8727         remote_target method of same name.
8728         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8729         parameter, and save it in m_remote.  All callers adjusted.
8730         (scoped_remote_fd::release): Use m_remote.
8731         (scoped_remote_fd::m_remote): New field.
8732         (remote_file_put, remote_file_get, remote_file_delete): Use
8733         get_current_remote_target, defer to remote_target method of same
8734         name.
8735         (remote_btrace_reset): Add remote_state paremeter.  Update all
8736         callers.
8737         (remote_async_inferior_event_handler). Pass down 'data'.
8738         (remote_new_objfile): Use get_current_remote_target.
8739         (remote_target::vcont_r_supported): New.
8740         (set_range_stepping): Use get_current_remote_target and
8741         remote_target::vcont_r_supported.
8742         (_initialize_remote): Don't allocate 'remote_state' and
8743         'stop_reply_queue' globals.
8744         * remote.h (struct remote_target): Forward declare.
8745         (getpkt, putpkt, remote_notif_get_pending_events): Add
8746         'remote_target' parameter.
8747
8748 2018-05-22  Pedro Alves  <palves@redhat.com>
8749
8750         * remote.c (vcont_builder): Now a class.  Make all data members
8751         private.
8752         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8753         Declare methods.
8754         (vcont_builder_restart): Rename to ...
8755         (vcont_builder::restart): ... this.
8756         (vcont_builder_flush): Rename to ...
8757         (vcont_builder::flush): ... this.
8758         (vcont_builder_push_action): Rename to ...
8759         (vcont_builder::push_action): ... this.
8760         (remote_target::commit_resume): Adjust.
8761
8762 2018-05-22  Pedro Alves  <palves@redhat.com>
8763
8764         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8765         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8766         (get_fixed_memory_packet_size): New.
8767         (get_memory_packet_size): Use it.
8768         (set_memory_packet_size): Don't override the config size with
8769         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8770         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8771         Don't refer to get_memory_packet_size if not connected to a remote
8772         target.  Show "(default)" if configured size is 0.
8773
8774 2018-05-22  Pedro Alves  <palves@redhat.com>
8775
8776         * remote.c (remote_target::mourn_inferior): Move
8777         discard_pending_stop_replies call here from ...
8778         (_initialize_remote): ... here.
8779
8780 2018-05-22  Pedro Alves  <palves@redhat.com>
8781
8782         * remote.c (compare_section_command): Remove set_general_process
8783         call.
8784
8785 2018-05-22  Pedro Alves  <palves@redhat.com>
8786
8787         * remote.c (struct packet_reg, struct remote_arch_state):
8788         Move higher up in the file.
8789         (remote_state) <m_arch_states>: Store remote_arch_state values
8790         instead of remote_arch_state pointers.
8791         (remote_state::get_remote_arch_state): Adjust.
8792
8793 2018-05-22  Pedro Alves  <palves@redhat.com>
8794
8795         * remote.c: Include <unordered_map>.
8796         (remote_state): Now a class.
8797         (remote_state) <get_remote_arch_state>: Declare method.
8798         <get_remote_arch_state>: New field.
8799         (remote_arch_state) <remote_arch_state>: Declare ctor.
8800         <regs>: Now a unique_ptr.
8801         (remote_gdbarch_data_handle): Delete.
8802         (get_remote_arch_state): Delete.
8803         (remote_state::get_remote_arch_state): New.
8804         (get_remote_state): Adjust to call remote_state's
8805         get_remote_arch_state method.
8806         (init_remote_state): Delete, bits factored out to ...
8807         (remote_arch_state::remote_arch_state): ... this new method.
8808         (get_remote_packet_size, get_memory_packet_size)
8809         (process_g_packet, remote_target::fetch_registers)
8810         (remote_target::prepare_to_store, store_registers_using_G)
8811         (remote_target::store_registers, remote_target::get_trace_status):
8812         Adjust to call remote_state's method.
8813         (_initialize_remote): Remove reference to
8814         remote_gdbarch_data_handle.
8815
8816 2018-05-22  Pedro Alves  <palves@redhat.com>
8817
8818         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8819         pread>: New method declarations.
8820         (remote_target::open_1): Adjust.
8821         (readahead_cache_invalidate): Rename to ...
8822         (readahead_cache::invalidate): ... this, and adjust to be a class
8823         method.
8824         (readahead_cache_invalidate_fd): Rename to ...
8825         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8826         class method.
8827         (remote_hostio_pwrite): Adjust.
8828         (remote_hostio_pread_from_cache): Rename to ...
8829         (readahead_cache::pread): ... this, and adjust to be a class
8830         method.
8831         (remote_hostio_close): Adjust.
8832
8833 2018-05-22  Pedro Alves  <palves@redhat.com>
8834
8835         * remote.c (remote_hostio_close_cleanup): Delete.
8836         (class scoped_remote_fd): New.
8837         (remote_file_put, remote_file_get): Use it.
8838
8839 2018-05-22  Pedro Alves  <palves@redhat.com>
8840
8841         (struct vCont_action_support): Use bool and initialize all fields.
8842         (struct readahead_cache): Initialize all fields.
8843         (remote_state): Use bool and initialize all fields.
8844         (remote_state::remote_state, remote_state::~remote_state): New.
8845         (new_remote_state): Delete.
8846         (_initialize_remote): Use new to allocate remote_state.
8847
8848 2018-05-22  Pedro Alves  <palves@redhat.com>
8849             張俊芝  <zjz@zjz.name>
8850
8851         PR gdb/22973
8852         * c-exp.y: Include "c-support.h".
8853         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8854         of tolower.  Use c_ident_is_alpha to scan names.
8855         * c-lang.c: Include "c-support.h".
8856         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8857         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8858         * c-support.h: New file, with bits factored out from ...
8859         * cp-name-parser.y: ... this file.
8860         Include "c-support.h".
8861         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8862         c-support.h and renamed.
8863         (symbol_end, yylex): Adjust.
8864
8865 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8866
8867         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8868         parameter type to CORE_ADDR.
8869         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8870         parameter type in declaration to CORE_ADDR.
8871         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8872         target_auxv_search to get AT_HWCAP and use the result to get the
8873         target description.
8874         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8875         to CORE_ADDR. Remove the cast of the return value to unsigned
8876         long. Fix error predicate of target_auxv_search.
8877         (ppc_linux_nat_target::read_description): Change the type of the
8878         hwcap variable to CORE_ADDR.
8879
8880 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8881
8882         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8883         if the size of fpscr is larger than 32 bits.
8884
8885 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8886
8887         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8888         (ppc32_linux_vsxregmap): New global.
8889         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8890         regcache_supply_regset, and regcache_collect_regset.
8891         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8892         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8893         (fetch_vsx_register, store_vsx_register): Remove.
8894         (fetch_vsx_registers): Add regno parameter. Get regset using
8895         ppc_linux_vsxregset. Use regset to supply registers.
8896         (store_vsx_registers): Add regno parameter. Get regset using
8897         ppc_linux_vsxregset. Use regset to collect registers.
8898         (fetch_register): Call fetch_vsx_registers instead of
8899         fetch_vsx_register.
8900         (store_register): Call store_vsx_registers instead of
8901         store_vsx_register.
8902         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8903         new regno parameter.
8904         (store_ppc_registers): Call store_vsx_registers with -1 for the
8905         new regno parameter.
8906         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8907         (ppc_collect_vsxregset): Remove.
8908
8909 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8910
8911         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8912         offset fields.
8913         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8914         for vector register offset fields.
8915         (ppc64_fbsd_reg_offsets): Likewise.
8916         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8917         to vector register offset fields.
8918         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8919         to vector register offset fields.
8920         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8921         vector register offset fields.
8922         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8923         initializers for vector register offset fields.
8924         (rs6000_aix64_reg_offsets): Likewise.
8925         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8926         (ppc_supply_vrregset): Remove.
8927         (ppc_collect_vrregset): Remove.
8928         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8929         (ppc_linux_vrregset) : New function.
8930         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8931         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8932         (ppc32_linux_vrregset): Remove.
8933         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8934         and use result instead of ppc32_linux_vrregset.
8935         (ppc32_linux_reg_offsets): Remove initializers for vector register
8936         offset fields.
8937         (ppc64_linux_reg_offsets): Likewise.
8938         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8939         * ppc-linux-nat.c: Include regset.h.
8940         (gdb_vrregset_t): Adjust comment to account for little-endian
8941         mode.
8942         (supply_vrregset, fill_vrregset): Remove.
8943         (fetch_altivec_register, store_altivec_register): Remove.
8944         (fetch_altivec_registers): Add regno parameter. Get regset using
8945         ppc_linux_vrregset. Use regset to supply registers.
8946         (store_altivec_registers): Add regno parameter. Get regset using
8947         ppc_linux_vrregset. Use regset to collect registers.
8948         (fetch_register): Call fetch_altivec_registers instead of
8949         fetch_altivec_register.
8950         (store_register): Call store_altivec_registers instead of
8951         store_altivec_register.
8952         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8953         the new regno parameter.
8954         (store_ppc_registers): Call store_altivec_registers with -1 for
8955         the new regno parameter.
8956
8957 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8958
8959         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8960         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8961         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8962         (gdb_vrregset_t): Change array type size to
8963         PPC_LINUX_SIZEOF_VRREGSET.
8964         (gdb_vsxregset_t): Change array type size to
8965         PPC_LINUX_SIZEOF_VSXREGSET.
8966         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8967         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8968         PPC_LINUX_SIZEOF_VSXREGSET.
8969
8970 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8971
8972         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8973         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8974         nat/ppc-linux.c.
8975         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8976         ppc_linux_target_wordsize with tid.
8977         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8978         wordsize with tid.
8979         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8980         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8981         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8982         tid parameter. Remove static specifier.
8983         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8984         (ppc_linux_target_wordsize): New declaration.
8985
8986 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8987
8988         * arch/ppc-linux-common.c: New file.
8989         * arch/ppc-linux-common.h: New file.
8990         * arch/ppc-linux-tdesc.h: New file.
8991         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8992         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8993         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8994         arch/ppc-linux-tdesc.h.
8995         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8996         arch/ppc-linux-tdesc.h.
8997         (ppc_linux_nat_target::read_description): Remove target
8998         description matching code. Fill a ppc_linux_features struct and
8999         call ppc_linux_match_description with it. Move comment about ISA
9000         2.05 to ppc-linux-common.c.
9001         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
9002         arch/ppc-linux-tdesc.h.
9003         (ppc_linux_core_read_description): Remove target description
9004         matching code. Fill a ppc_linux_features struct and call
9005         ppc_linux_match_description with it.
9006         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
9007         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
9008         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
9009         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
9010         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
9011         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
9012         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
9013         (tdesc_powerpc_e500l): Remove.
9014
9015 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
9016
9017         * ada-lang.c (catch_assert_command): Pass empty string instead
9018         of NULL for excep_string argument.
9019
9020 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9021
9022         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
9023         the width of the requested register exceeds the width of the
9024         `ptrace' data type.
9025
9026 2018-05-21  Tom Tromey  <tom@tromey.com>
9027
9028         * printcmd.c (output_command): Remove.
9029         (output_command_const): Rename to output_command.
9030         * valprint.h (output_command): Rename from output_command_const.
9031         * tracepoint.c (trace_dump_actions): Call output_command.
9032
9033 2018-05-21  Tom Tromey  <tom@tromey.com>
9034
9035         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
9036         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
9037         * ada-lang.h (create_ada_exception_catchpoint): Update.
9038         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
9039         std::string.
9040         (create_excep_cond_exprs, ~ada_catchpoint)
9041         (should_stop_exception, print_one_exception)
9042         (print_mention_exception, print_recreate_exception): Update.
9043         (ada_get_next_arg): Remove.
9044         (catch_ada_exception_command_split): Use std::string.  Change type
9045         of "excep_string", "cond_string".
9046         (catch_ada_exception_command): Update.
9047         (create_ada_exception_catchpoint): Change type of excep_string.
9048         (ada_exception_sal): Remove excep_string parameter.
9049         (~ada_catchpoint): Remove.
9050
9051 2018-05-21  Tom Tromey  <tom@tromey.com>
9052
9053         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
9054         cleanup.
9055
9056 2018-05-21  Tom Tromey  <tom@tromey.com>
9057
9058         * ada-lang.c (ada_exception_message_1, ada_exception_message):
9059         Return unique_xmalloc_ptr.
9060         (print_it_exception): Update.
9061
9062 2018-05-21  Tom Tromey  <tom@tromey.com>
9063
9064         * tracepoint.c (trace_dump_actions): Use std::string.
9065
9066 2018-05-21  Tom Tromey  <tom@tromey.com>
9067
9068         * symfile.c (reread_symbols): Use std::string for original_name.
9069
9070 2018-05-21  Tom Tromey  <tom@tromey.com>
9071
9072         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
9073         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
9074         constructor.
9075
9076 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
9077
9078         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
9079         instance to...
9080         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
9081         * objfiles.c (get_objfile_bfd_data): Allocate
9082         objfile_per_bfd_storage with obstack_new when allocating on
9083         obstack.
9084
9085 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9086
9087         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
9088         OBSTACK_ZALLOC.
9089         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
9090         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
9091         * mdebugread.c (mdebug_build_psymtabs): Likewise.
9092         (add_pending): Likewise.
9093         (parse_symbol): Likewise.
9094         (parse_partial_symbols): Likewise.
9095         (psymtab_to_symtab_1): Likewise.
9096         (new_psymtab): Likewise.
9097         (elfmdebug_build_psymtabs): Likewise.
9098         * minsyms.c (terminate_minimal_symbol_table): Likewise.
9099         * objfiles.c (get_objfile_bfd_data): Likewise.
9100         (objfile_register_static_link): Likewise.
9101         * psymtab.c (allocate_psymtab): Likewise.
9102         * stabsread.c (read_member_functions): Likewise.
9103         * xcoffread.c (xcoff_end_psymtab): Likewise.
9104
9105 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
9106
9107         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
9108         compiler supports std::is_trivially_constructible.
9109         * common/poison.h: Include obstack.h.
9110         (IsMallocable): Define to is_trivially_constructible if the
9111         compiler supports it, define to true_type otherwise.
9112         (xobnew): New.
9113         (XOBNEW): Redefine.
9114         (xobnewvec): New.
9115         (XOBNEWVEC): Redefine.
9116         * gdb_obstack.h (obstack_zalloc): New.
9117         (OBSTACK_ZALLOC): Redefine.
9118         (obstack_calloc): New.
9119         (OBSTACK_CALLOC): Redefine.
9120         (obstack_new): New.
9121         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
9122         (gdbarch_obstack): New declaration in gdbarch.h, definition in
9123         gdbarch.c.
9124         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
9125         obstack_calloc/obstack_zalloc.
9126         (gdbarch_obstack_zalloc): Remove.
9127         * target-descriptions.c (tdesc_data_init): Use obstack_new.
9128
9129 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9130
9131         * stack.c (backtrace_command_1): Remove useless variable int i.
9132
9133 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9134
9135         * stack.c (print_frame_info): Fix comment.
9136
9137 2018-05-18  Tom Tromey  <tom@tromey.com>
9138
9139         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
9140         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
9141         (~dwarf2_per_objfile): Update
9142         (dwarf2_get_dwz_file): Use new.
9143         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
9144         unique_ptr.
9145
9146 2018-05-18  Tom Tromey  <tom@tromey.com>
9147
9148         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
9149         unique_ptr.
9150         * dwarf2read.c (struct dwp_file): Add constructor and
9151         initializers.
9152         (open_and_init_dwp_file): Return a unique_ptr.
9153         (dwarf2_per_objfile, create_dwp_hash_table)
9154         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
9155         (lookup_dwo_unit_in_dwp): Update.
9156         (open_and_init_dwp_file, get_dwp_file): Update.
9157
9158 2018-05-18  Tom Tromey  <tom@tromey.com>
9159
9160         * dwarf2read.c (dwarf2_per_objfile): Update.
9161         (struct mapped_index): Add initializers.
9162         (dwarf2_read_index): Use new.
9163         (dw2_symtab_iter_init): Update.
9164         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
9165         unique_ptr.
9166
9167 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9168
9169         * dwarf2read.c (mapped_index) <total_size>: Remove.
9170
9171 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
9172
9173         * unittests/format_pieces-selftests.c (test_format_specifier):
9174         Add ARI comments.
9175
9176 2018-05-18  Tom Tromey  <tom@tromey.com>
9177
9178         * c-typeprint.c (maybe_print_hole): New function.
9179         (c_print_type_struct_field_offset): Update.
9180         (c_type_print_base_struct_union): Call maybe_print_hole.
9181
9182 2018-05-17  Keith Seitz  <keiths@redhat.com>
9183
9184         * breakpoint.c (build_bpstat_chain): New function, moved from
9185         bpstat_stop_status.
9186         (bpstat_stop_status): Add optional parameter, `stop_chain'.
9187         If no stop chain is passed, call build_bpstat_chain to build it.
9188         * breakpoint.h (build_bpstat_chain): Declare.
9189         (bpstat_stop_status): Move documentation here from breakpoint.c.
9190         * infrun.c (handle_signal_stop): Before eliding inlined frames,
9191         build the stop chain and pass it to skip_inline_frames.
9192         Pass this stop chain to bpstat_stop_status.
9193         * inline-frame.c: Include breakpoint.h.
9194         (stopped_by_user_bp_inline_frame): New function.
9195         (skip_inline_frames): Add parameter `stop_chain'.
9196         Move documention to inline-frame.h.
9197         If non-NULL, use stopped_by_user_bp_inline_frame to determine
9198         whether the frame should be elided.
9199         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
9200         Add moved documentation and update for new parameter.
9201
9202 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9203
9204         PR cli/14975
9205         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9206         unittests/format_pieces-selftests.c.
9207         * common/format.h (format_piece) <operator==>: New.
9208         (format_pieces) <operator[]>: Remove.
9209         * common/format.c (format_pieces::format_pieces): Handle \e.
9210         * unittests/format_pieces-selftests.c: New.
9211
9212 2018-05-17  Tom Tromey  <tom@tromey.com>
9213
9214         PR symtab/23010:
9215         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9216         (dw2_instantiate_symtab): Add skip_partial parameter.
9217         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9218         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9219         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9220         (dw2_expand_symtabs_matching_one)
9221         (dw2_find_pc_sect_compunit_symtab)
9222         (dw2_debug_names_lookup_symbol)
9223         (dw2_debug_names_expand_symtabs_for_function): Update.
9224         (init_cutu_and_read_dies): Add skip_partial parameter.
9225         (process_psymtab_comp_unit, build_type_psymtabs_1)
9226         (process_skeletonless_type_unit, load_partial_comp_unit)
9227         (psymtab_to_symtab_1): Update.
9228         (load_full_comp_unit): Add skip_partial parameter.
9229         (process_imported_unit_die, dwarf2_read_addr_index)
9230         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9231         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9232         (read_signatured_type): Update.
9233
9234 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9235
9236         * value.c (release_value): Remove unused variable.
9237         (record_latest_value): Likewise.
9238         (access_value_history): Likewise.
9239         (preserve_values): Likewise.
9240
9241 2018-05-17  Tom Tromey  <tom@tromey.com>
9242
9243         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9244         Initialize.
9245
9246 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9247
9248         PR gdb/22286
9249         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9250         Also handle registers whose width is not a multiple of
9251         PTRACE_TYPE_RET.
9252         (linux_nat_trad_target::store_register): Likewise.
9253
9254 2018-05-16  Tom Tromey  <tom@tromey.com>
9255
9256         * gdbcore.h (core_bfd): Redefine.
9257         * corelow.c (core_target::close): Update.
9258         (core_target_open): Update.
9259         * progspace.h (struct program_space) <cbfd>: Now a
9260         gdb_bfd_ref_ptr.
9261
9262 2018-05-16  Tom Tromey  <tom@tromey.com>
9263
9264         PR cli/19551:
9265         * symfile-add-flags.h (enum symfile_add_flags)
9266         <SYMFILE_NOT_FILENAME>: New constant.
9267         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9268         objfile name from BFD.
9269         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9270         * minidebug.c (find_separate_debug_file_in_section): Put
9271         ".gnu_debugdata" into BFD's file name.
9272
9273 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9274
9275         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9276         Remove.
9277
9278 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9279
9280         PR binutils/21446
9281         * aarch64-tdep.c (aarch64_analyze_prologue,
9282         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9283         Indicate not interested in errors.
9284
9285 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9286
9287         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9288         Supply the MIPS_ZERO_REGNUM register.
9289
9290 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9291
9292         * mips-tdep.c (mask_address_var): Make variable static.
9293
9294 2018-05-14  Tom Tromey  <tom@tromey.com>
9295
9296         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9297
9298 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9299
9300         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9301         FXSAVE_ADDR for the mxcsr register.
9302
9303 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9304
9305         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9306
9307 2018-05-11  Pedro Alves  <palves@redhat.com>
9308
9309         * corelow.c (core_target) <core_target>: No longer inline.
9310         Initialize m_core_gdbarch, m_core_vec and build the section table
9311         here.
9312         <~core_target>: New.
9313         <core_gdbarch, get_core_register_section>: New methods.
9314         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9315         factored out from ...
9316         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9317         (core_ops): Delete.
9318         (sniff_core_bfd): Add gdbarch parameter.
9319         (core_close): Delete, merged into ...
9320         (core_target::close): ... here.  Delete self.
9321         (core_close_cleanup): Delete.
9322         (core_target_open): Allocate a core_target on the heap.  Use a
9323         unique_ptr instead of a cleanup.  Bits moved into the core_target
9324         ctor.  Adjust to use core_target methods instead of globals.
9325         (get_core_register_section): Rename to ...
9326         (core_target::get_core_register_section): ... this and adjust.
9327         (struct get_core_registers_cb_data): New.
9328         (get_core_registers_cb): Use it.  Use bool.
9329         (core_target::fetch_registers, core_target::files_info)
9330         (core_target::xfer_partial, core_target::read_description)
9331         (core_target::pid_to, core_target::thread_name): Adjust to
9332         reference class fields instead of globals.
9333         * target.h (struct target_ops_deleter, target_ops_up): New.
9334
9335 2018-05-11  Pedro Alves  <palves@redhat.com>
9336
9337         * corefile.c (core_file_command): Move to corelow.c.
9338         * corelow.c (the_core_target): Delete.
9339         (core_file_command): Moved from corefile.c.  Check exec_bfd
9340         instead of the_core_target.  Use target_detach instead of calling
9341         into the_core_target directly.
9342         (maybe_say_no_core_file_now): New.
9343         (core_target::detach): Use it.
9344         (_initialize_corelow): Remove references to the_core_target.
9345         * gdbcore.h (the_core_target): Delete.
9346
9347 2018-05-11  Tom Tromey  <tromey@redhat.com>
9348             Pedro Alves  <palves@redhat.com>
9349
9350         * corefile.c (core_bfd): Remove.
9351         * gdbcore.h (core_bfd): Now a macro.
9352         * progspace.h (struct program_space) <cbfd>: New field.
9353
9354 2018-05-11  Tom Tromey  <tom@tromey.com>
9355
9356         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9357         gdb::def_vector.
9358
9359 2018-05-10  Tom Tromey  <tom@tromey.com>
9360
9361         * configure: Rebuild.
9362         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9363
9364 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9365
9366         PR server/23158:
9367         * regformats/regdat.sh: Adjust script, following the addition
9368         of the new expedite_regs parameter to init_target_desc.
9369
9370 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9371     
9372         PR gdb/23127
9373         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9374         set_gdbarch_significant_addr_bit.
9375         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9376         set_gdbarch_significant_addr_bit.
9377         * utils.c (address_significant): Update to sign extend addr.
9378
9379 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9380
9381         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9382         (xtensa_linux_init_abi): Limit tdep->num_regs by
9383         tdep->num_nopriv_regs.
9384         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9385         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9386         not initialized.
9387
9388 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9389
9390         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9391
9392 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9393
9394         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9395         (I387_MXCSR_INIT_VAL): New constant.
9396         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9397         buffer if it was supplied by the inferior.
9398         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9399         (i387_xsave_get_clear_bv): New function.
9400         (i387_supply_xsave): Only read x87 control registers from the
9401         xsave buffer if the feature is enabled, and the state will have
9402         been written, otherwise, provide a suitable default.
9403         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9404         including x87 control registers.  Update control registers if they
9405         have changed from the default value, and mark features as enabled
9406         as required.
9407         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9408
9409 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9410
9411         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9412
9413 2018-05-07  Tom Tromey  <tom@tromey.com>
9414
9415         * configure: Rebuild.
9416         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9417
9418 2018-05-07  Tom Tromey  <tom@tromey.com>
9419
9420         PR tdep/20362:
9421         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9422         bit.  Use correct value for VDIV.
9423
9424 2018-05-04  Tom Tromey  <tom@tromey.com>
9425
9426         * configure: Rebuild.
9427         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9428
9429 2018-05-04  Tom Tromey  <tom@tromey.com>
9430
9431         * linux-record.c (record_linux_system_call) <case
9432         RECORD_SYS_RECVFROM>: Add "break".
9433
9434 2018-05-04  Tom Tromey  <tom@tromey.com>
9435
9436         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9437         Add missing "break".
9438         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9439         Add missing "break".
9440
9441 2018-05-04  Tom Tromey  <tom@tromey.com>
9442
9443         * rs6000-tdep.c (ppc_process_record_op4)
9444         (ppc_process_record_op63): Add fall-through comment.
9445
9446 2018-05-04  Tom Tromey  <tom@tromey.com>
9447
9448         * i386-tdep.c (i386_process_record): Add fall-through comment.
9449
9450 2018-05-04  Tom Tromey  <tom@tromey.com>
9451
9452         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9453         comment.
9454
9455 2018-05-04  Tom Tromey  <tom@tromey.com>
9456
9457         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9458         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9459         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9460         comment.
9461         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9462         comment.
9463         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9464         comment.
9465
9466 2018-05-04  Tom Tromey  <tom@tromey.com>
9467
9468         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9469
9470 2018-05-04  Tom Tromey  <tom@tromey.com>
9471
9472         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9473         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9474         * symfile.c (section_is_mapped): Fix fall-through comment.
9475         * stabsread.c (define_symbol, read_member_functions): Fix
9476         fall-through comment.
9477         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9478         comment.
9479         * remote.c (remote_wait_as): Fix fall-through comment.
9480         * p-exp.y (yylex): Fix fall-through comment.
9481         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9482         comment.
9483         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9484         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9485         * jv-exp.y (yylex): Fix fall-through comment.
9486         * go-exp.y (lex_one_token): Fix fall-through comment.
9487         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9488         fall-through comment.
9489         * f-exp.y (yylex): Fix fall-through comment.
9490         * dwarf2read.c (process_die): Fix fall-through comments.
9491         * dbxread.c (process_one_symbol): Fix fall-through comment.
9492         * d-exp.y (lex_one_token): Fix fall-through comment.
9493         * cp-name-parser.y (yylex): Fix fall-through comment.
9494         * coffread.c (coff_symtab_read): Fix fall-through comment.
9495         * c-exp.y (lex_one_token): Fix fall-through comment.
9496         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9497         comment.
9498         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9499         comment.
9500
9501 2018-05-04  Tom Tromey  <tom@tromey.com>
9502
9503         PR python/22730:
9504         * NEWS: Mention gdb.execute change.
9505         * gdbcmd.h (execute_control_command): Don't declare.
9506         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9507         execute_control_commands, execute_control_commands_to_string.
9508         * cli/cli-script.h (execute_control_commands)
9509         (execute_control_commands_to_string): Declare.
9510         (execute_control_command): Add from_tty parameter.
9511         * cli/cli-script.c (execute_control_commands)
9512         (execute_control_commands_to_string): New functions.
9513         (execute_user_command): Use execute_control_commands.
9514         (execute_control_command_1): Add "from_tty" parameter.  Update.
9515         (execute_control_command): Likewise.
9516
9517 2018-05-04  Tom Tromey  <tom@tromey.com>
9518
9519         PR python/22731:
9520         * NEWS: Mention that breakpoint commands are writable.
9521         * python/py-breakpoint.c (bppy_set_commands): New function.
9522         (breakpoint_object_getset) <"commands">: Use it.
9523
9524 2018-05-04  Tom Tromey  <tom@tromey.com>
9525
9526         * tracepoint.c (actions_command): Update.
9527         * mi/mi-cmd-break.c (mi_command_line_array)
9528         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9529         (mi_read_next_line): Remove.
9530         (mi_cmd_break_commands): Update.
9531         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9532         function_view.
9533         * cli/cli-script.c (get_command_line): Update.
9534         (process_next_line): Use function_view.  Constify.
9535         (recurse_read_control_structure, read_command_lines)
9536         (read_command_lines_1): Change argument types to function_view.
9537         (do_define_command, document_command): Update.
9538         * breakpoint.h (check_tracepoint_command): Don't declare.
9539         * breakpoint.c (check_tracepoint_command): Remove.
9540         (commands_command_1, create_tracepoint_from_upload): Update.
9541
9542 2018-05-04  Tom Tromey  <tom@tromey.com>
9543
9544         PR gdb/11750:
9545         * cli/cli-script.h (enum command_control_type) <define_control>:
9546         New constant.
9547         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9548         (build_command_line, execute_control_command_1)
9549         (process_next_line): Likewise.
9550         (do_define_command): New function, extracted from define_command.
9551         (define_command): Use it.
9552
9553 2018-05-04  Tom Tromey  <tom@tromey.com>
9554
9555         * tracepoint.c (actions_command): Update.
9556         * cli/cli-script.h (read_command_lines): Update.
9557         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9558         (MAX_TMPBUF): Remove define.
9559         (define_command): Use string_printf.
9560         (document_command): Likewise.
9561         * breakpoint.c (commands_command_1): Update.
9562
9563 2018-05-04  Tom Tromey  <tom@tromey.com>
9564
9565         * top.c (execute_command): Update.
9566         * cli/cli-script.h (print_command_lines): Now varargs.
9567         * cli/cli-script.c (print_command_lines): Now varargs.
9568         (execute_control_command_1) <case while_control, case if_control>:
9569         Update.
9570
9571 2018-05-04  Tom Tromey  <tom@tromey.com>
9572
9573         * tracepoint.c (all_tracepoint_actions): Rename from
9574         all_tracepoint_actions_and_cleanup.  Change return type.
9575         (actions_command, encode_actions_1, encode_actions)
9576         (trace_dump_actions, tdump_command): Update.
9577         * remote.c (remote_download_command_source): Update.
9578         * python/python.c (gdbpy_eval_from_control_command)
9579         (python_command, python_interactive_command): Update.
9580         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9581         * guile/guile.c (guile_command)
9582         (gdbscm_eval_from_control_command, guile_command): Update.
9583         * compile/compile.c (compile_code_command)
9584         (compile_print_command, compile_to_object): Update.
9585         * cli/cli-script.h (struct command_lines_deleter): New.
9586         (counted_command_line): New typedef.
9587         (struct command_line): Add constructor, destructor.
9588         <body_list>: Remove.
9589         <body_list_0, body_list_1>: New members.
9590         (command_line_up): Remove typedef.
9591         (read_command_lines, read_command_lines_1, get_command_line):
9592         Update.
9593         (copy_command_lines): Don't declare.
9594         * cli/cli-script.c (build_command_line): Use "new".
9595         (get_command_line): Return counted_command_line.
9596         (print_command_lines, execute_user_command)
9597         (execute_control_command_1, while_command, if_command): Update.
9598         (realloc_body_list): Remove.
9599         (process_next_line, recurse_read_control_structure): Update.
9600         (read_command_lines, read_command_lines_1): Return counted_command_line.
9601         (free_command_lines): Use "delete".
9602         (copy_command_lines): Remove.
9603         (define_command, document_command, show_user_1): Update.
9604         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9605         a counted_command_line.
9606         * breakpoint.h (counted_command_line): Remove typedef.
9607         (breakpoint_set_commands): Update.
9608         * breakpoint.c (check_no_tracepoint_commands)
9609         (validate_commands_for_breakpoint): Update.
9610         (breakpoint_set_commands): Change commands to be a
9611         counted_command_line.
9612         (commands_command_1, update_dprintf_command_list)
9613         (create_tracepoint_from_upload): Update.
9614
9615 2018-05-04  Tom Tromey  <tom@tromey.com>
9616
9617         * cli/cli-decode.h (cmd_list_element): New constructor.
9618         (~cmd_list_element): New destructor.
9619         (struct cmd_list_element): Add initializers.
9620         * cli/cli-decode.c (do_add_cmd): Use "new".
9621         (delete_cmd): Use "delete".
9622
9623 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9624             Pedro Alves <palves@redhat.com>
9625
9626         PR breakpoints/19806 and support for PR external/20207.
9627         * NEWS: Mention Aarch64 watchpoint improvements.
9628         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9629         watchpoints and PR external/20207 watchpoints.
9630         * nat/aarch64-linux-hw-point.c
9631         (kernel_supports_any_contiguous_range): New.
9632         (aarch64_watchpoint_offset): New.
9633         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9634         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9635         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9636         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9637         next_addr_orig_p.  Support PR external/20207 watchpoints.
9638         (aarch64_downgrade_regs): New.
9639         (aarch64_dr_state_insert_one_point): New parameters offset and
9640         addr_orig.
9641         (aarch64_dr_state_remove_one_point): Likewise.
9642         (aarch64_handle_breakpoint): Update caller.
9643         (aarch64_handle_aligned_watchpoint): Likewise.
9644         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9645         aligned_offset.
9646         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9647         aarch64_downgrade_regs.
9648         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9649         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9650         (DR_CONTROL_MASK): ... this.
9651         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9652         (unsigned int aarch64_watchpoint_offset): New prototype.
9653         (aarch64_linux_set_debug_regs): Remove const from state.
9654         * utils.c (align_up, align_down): Move to ...
9655         * common/common-utils.c (align_up, align_down): ... here.
9656         * utils.h (align_up, align_down): Move to ...
9657         * common/common-utils.h (align_up, align_down): ... here.
9658
9659 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9660
9661         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9662         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9663         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9664         Re-implement to match the ABI as summarized in GCC's
9665         gcc/config/sparc/sparc.c.  All callers updated.
9666         (sparc32_store_arguments): Remove assertion.
9667
9668 2018-05-04  Tom Tromey  <tom@tromey.com>
9669
9670         * printcmd.c: Don't include tui.h.
9671         (decode_format): Use skip_spaces.
9672
9673 2018-05-04  Tom Tromey  <tom@tromey.com>
9674
9675         PR gdb/22619:
9676         * printcmd.c (last_count): New global.
9677         (x_command): Use saved count when repeating.
9678
9679 2018-05-04  Tom Tromey  <tom@tromey.com>
9680
9681         * nto-procfs.c (do_closedir_cleanup): Remove.
9682         (procfs_pidlist): Use gdb_dir_up.
9683         * procfs.c (do_closedir_cleanup): Remove.
9684         (proc_update_threads): Use gdb_dir_up.
9685         * common/filestuff.h (struct gdb_dir_deleter): New.
9686         (gdb_dir_up): New typedef.
9687
9688 2018-05-04  Tom Tromey  <tom@tromey.com>
9689
9690         * ada-lang.c (print_mention_exception): Use std::string.
9691
9692 2018-05-04  Tom Tromey  <tom@tromey.com>
9693
9694         * ada-lang.c (create_excep_cond_exprs): Update.
9695         (ada_exception_catchpoint_cond_string): Use std::string.
9696
9697 2018-05-04  Tom Tromey  <tom@tromey.com>
9698
9699         * ada-lang.c (xget_renaming_scope): Return std::string.
9700         (old_renaming_is_invisible): Update.
9701
9702 2018-05-04  Tom Tromey  <tom@tromey.com>
9703
9704         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9705         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9706
9707 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9708
9709         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9710
9711 2018-05-04  Tom Tromey  <tom@tromey.com>
9712
9713         * remote.c (remote_query_supported_append): Change type.
9714         (remote_check_symbols): Update.
9715
9716 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9717
9718         PR gdb/11420
9719         * configure.ac: Prepend libpython.
9720         * python/python-config.py: Likewise.
9721         * configure: Regenerate.
9722
9723 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9724
9725         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9726
9727 2018-05-03  Pedro Alves  <palves@redhat.com>
9728
9729         * s390-linux-nat.c
9730         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9731         override.  Write 'true' instead of '1'.
9732         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9733         declaration.
9734
9735 2018-05-02  Pedro Alves  <palves@redhat.com>
9736
9737         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9738         add_inf_child_target.
9739         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9740         add_inf_child_target.
9741         * aix-thread.c (aix_thread_target_info): New.
9742         (aix_thread_target) <shortname, longname, doc>: Delete.
9743         <info>: New.
9744         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9745         add_inf_child_target.
9746         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9747         add_inf_child_target.
9748         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9749         add_inf_child_target.
9750         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9751         add_inf_child_target.
9752         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9753         add_inf_child_target.
9754         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9755         add_inf_child_target.
9756         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9757         add_inf_child_target.
9758         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9759         add_inf_child_target.
9760         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9761         add_inf_child_target.
9762         * bfd-target.c (target_bfd_target_info): New.
9763         (target_bfd) <shortname, longname, doc>: Delete.
9764         <info>: New.
9765         * bsd-kvm.c (bsd_kvm_target_info): New.
9766         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9767         <info>: New.
9768         (bsd_kvm_target::open): Rename to ...
9769         (bsd_kvm_target_open): ... this.  Adjust.
9770         * bsd-uthread.c (bsd_uthread_target_info): New.
9771         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9772         <info>: New.
9773         * corefile.c (core_file_command): Adjust.
9774         * corelow.c (core_target_info): New.
9775         (core_target) <shortname, longname, doc>: Delete.
9776         <info>: New.
9777         (core_target::open): Rename to ...
9778         (core_target_open): ... this.  Adjust.
9779         * ctf.c (ctf_target_info): New.
9780         (ctf_target) <shortname, longname, doc>: Delete.
9781         <info>: New.
9782         (ctf_target::open): Rename to ...
9783         (ctf_target_open): ... this.
9784         (_initialize_ctf): Adjust.
9785         * exec.c (exec_target_info): New.
9786         (exec_target) <shortname, longname, doc>: Delete.
9787         <info>: New.
9788         (exec_target::open): Rename to ...
9789         (exec_target_open): ... this.
9790         * gdbcore.h (core_target_open): Declare.
9791         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9792         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9793         add_inf_child_target.
9794         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9795         add_inf_child_target.
9796         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9797         add_inf_child_target.
9798         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9799         add_inf_child_target.
9800         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9801         add_inf_child_target.
9802         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9803         add_inf_child_target.
9804         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9805         add_inf_child_target.
9806         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9807         add_inf_child_target.
9808         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9809         add_inf_child_target.
9810         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9811         add_inf_child_target.
9812         * inf-child.c (inf_child_target_info): New.
9813         (inf_child_target::info): New.
9814         (inf_child_open_target): Remove 'target' parameter.  Use
9815         get_native_target instead.
9816         (inf_child_target::open): Delete.
9817         (add_inf_child_target): New.
9818         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9819         Delete.
9820         <info>: New.
9821         (add_inf_child_target): Declare.
9822         (inf_child_open_target): Declare.
9823         * linux-thread-db.c (thread_db_target_info): New.
9824         (thread_db_target) <shortname, longname, doc>: Delete.
9825         <info>: New.
9826         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9827         add_inf_child_target.
9828         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9829         add_inf_child_target.
9830         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9831         add_inf_child_target.
9832         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9833         add_inf_child_target.
9834         * make-target-delegates (print_class): Adjust.
9835         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9836         add_inf_child_target.
9837         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9838         add_inf_child_target.
9839         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9840         add_inf_child_target.
9841         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9842         add_inf_child_target.
9843         * nto-procfs.c (nto_native_target_info): New.
9844         (nto_procfs_target_native) <shortname, longname, doc>:
9845         Delete.
9846         <info>: New.
9847         (nto_procfs_target_info): New.
9848         (nto_procfs_target_procfs) <shortname, longname, doc>:
9849         Delete.
9850         <info>: New.
9851         (init_procfs_targets): Adjust.
9852         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9853         add_inf_child_target.
9854         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9855         add_inf_child_target.
9856         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9857         add_inf_child_target.
9858         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9859         add_inf_child_target.
9860         * ravenscar-thread.c (ravenscar_target_info): New.
9861         (ravenscar_thread_target) <shortname, longname, doc>:
9862         Delete.
9863         <info>: New.
9864         * record-btrace.c (record_btrace_target_info):
9865         (record_btrace_target) <shortname, longname, doc>: Delete.
9866         <info>: New.
9867         (record_btrace_target::open): Rename to ...
9868         (record_btrace_target_open): ... this.  Adjust.
9869         * record-full.c (record_longname, record_doc): New.
9870         (record_full_base_target) <shortname, longname, doc>: Delete.
9871         <info>: New.
9872         (record_full_target_info): New.
9873         (record_full_target): <shortname>: Delete.
9874         <info>: New.
9875         (record_full_core_open_1, record_full_open_1): Update comments.
9876         (record_full_base_target::open): Rename to ...
9877         (record_full_open): ... this.
9878         (cmd_record_full_restore): Update.
9879         (_initialize_record_full): Update.
9880         * remote-sim.c (remote_sim_target_info): New.
9881         (gdbsim_target) <shortname, longname, doc>: Delete.
9882         <info>: New.
9883         (gdbsim_target::open): Rename to ...
9884         (gdbsim_target_open): ... this.
9885         (_initialize_remote_sim): Adjust.
9886         * remote.c (remote_doc): New.
9887         (remote_target_info): New.
9888         (remote_target) <shortname, longname, doc>: Delete.
9889         <info>: New.
9890         (extended_remote_target_info): New.
9891         (extended_remote_target) <shortname, longname, doc>: Delete.
9892         <info>: New.
9893         (remote_target::open_1): Make static.  Adjust.
9894         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9895         * s390-linux-nat.c (_initialize_s390_nat): Use
9896         add_inf_child_target.
9897         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9898         add_inf_child_target.
9899         * sol-thread.c (thread_db_target_info): New.
9900         (sol_thread_target) <shortname, longname, doc>: Delete.
9901         <info>: New.
9902         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9903         add_inf_child_target.
9904         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9905         add_inf_child_target.
9906         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9907         add_inf_child_target.
9908         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9909         add_inf_child_target.
9910         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9911         add_inf_child_target.
9912         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9913         add_inf_child_target.
9914         * spu-linux-nat.c (_initialize_spu_nat): Use
9915         add_inf_child_target.
9916         * spu-multiarch.c (spu_multiarch_target_info): New.
9917         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9918         <info>: New.
9919         * target-delegates.c: Regenerate.
9920         * target.c: Include <unordered_map>.
9921         (target_ops_p): Delete.
9922         (DEF_VEC_P(target_ops_p)): Delete.
9923         (target_factories): New.
9924         (test_target_info): New.
9925         (test_target_ops::info): New.
9926         (open_target): Adjust to use target_factories.
9927         (add_target_with_completer): Rename to ...
9928         (add_target): ... this.  Change prototype.  Register target_info
9929         and open callback in target_factories.  Register target_info in
9930         command context instead of target_ops.
9931         (add_target): Delete old implementation.
9932         (add_deprecated_target_alias): Change prototype.  Adjust.
9933         (the_native_target): New.
9934         (set_native_target, get_native_target): New.
9935         (find_default_run_target): Use the_native_target.
9936         (find_attach_target, find_run_target): Simplify.
9937         (target_ops::open): Delete.
9938         (dummy_target_info): New.
9939         (dummy_target::shortname, dummy_target::longname)
9940         (dummy_target::doc): Delete.
9941         (dummy_target::info): New.
9942         (debug_target::shortname, debug_target::longname)
9943         (debug_target::doc): Delete.
9944         (debug_target::info): New.
9945         * target.h (struct target_info): New.
9946         (target_ops::~target_ops): Add comment.
9947         (target_ops::info): New.
9948         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9949         longer virtual.  Implement in terms of target_info.
9950         (set_native_target, get_native_target): Declare.
9951         (target_open_ftype): New.
9952         (add_target, add_target_with_completer)
9953         (add_deprecated_target_alias): Change prototype.
9954         (test_target) <shortname, longname, doc>: Delete.
9955         <info>: New.
9956         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9957         add_inf_child_target.
9958         * tracefile-tfile.c (tfile_target_info): New.
9959         (tfile_target) <shortname, longname, doc>: Delete.
9960         <info>: New.
9961         (tfile_target::open): Rename to ...
9962         (tfile_target_open): ... this.
9963         (_initialize_tracefile_tfile): Adjust.
9964         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9965         add_inf_child_target.
9966         * windows-nat.c (_initialize_windows_nat): Use
9967         add_inf_child_target.
9968         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9969         add_inf_child_target.
9970
9971 2018-05-02  Pedro Alves  <palves@redhat.com>
9972
9973         * linux-nat.h (linux_nat_target) <low_new_thread,
9974         low_delete_thread, low_new_fork, low_forget_process,
9975         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9976         New virtual methods.
9977         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9978         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9979         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9980         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9981         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9982         Delete.
9983         * linux-fork.c (delete_fork): Adjust to call low method.
9984         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9985         (linux_nat_new_fork, linux_nat_forget_process_hook)
9986         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9987         (linux_nat_status_is_event):
9988         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9989         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9990         to call low method.
9991         (sigtrap_is_event): Rename to ...
9992         (linux_nat_target::low_status_is_event): ... this.
9993         (linux_nat_set_status_is_event): Delete.
9994         (save_stop_reason, linux_nat_wait_1)
9995         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9996         low methods.
9997         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9998         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9999         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
10000         (linux_nat_set_prepare_to_resume): Delete.
10001         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
10002         low virtual methods.
10003         * amd64-linux-nat.c: Likewise.
10004         * arm-linux-nat.c: Likewise.
10005         * i386-linux-nat.c: Likewise.
10006         * ia64-linux-nat.c: Likewise.
10007         * mips-linux-nat.c: Likewise.
10008         * ppc-linux-nat.c: Likewise.
10009         * s390-linux-nat.c: Likewise.
10010         * sparc64-linux-nat.c: Likewise.
10011         * x86-linux-nat.c: Likewise.
10012         * x86-linux-nat.h: Include "nat/x86-linux.h".
10013         (x86_linux_nat_target) <low_new_fork, low_forget_process,
10014         low_prepare_to_resume, low_new_thread, low_delete_thread>:
10015         Override methods.
10016
10017 2018-05-02  Pedro Alves  <palves@redhat.com>
10018
10019         * target.h (target_ops)
10020         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
10021         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
10022         stopped_by_watchpoint, have_continuable_watchpoint,
10023         stopped_data_address, watchpoint_addr_within_range,
10024         can_accel_watchpoint_condition, can_run, thread_alive,
10025         has_all_memory, has_memory, has_stack, has_registers,
10026         has_execution, can_async_p, is_async_p, supports_non_stop,
10027         always_non_stop_p, can_execute_reverse, supports_multi_process,
10028         supports_enable_disable_tracepoint,
10029         supports_disable_randomization, supports_string_tracing,
10030         supports_evaluation_of_breakpoint_conditions,
10031         can_run_breakpoint_commands, filesystem_is_local,
10032         can_download_tracepoint, get_trace_state_variable_value,
10033         set_trace_notes, get_tib_address, use_agent, can_use_agent,
10034         record_is_replaying, record_will_replay,
10035         augmented_libraries_svr4_read>: Adjust to return bool.
10036         * aarch64-linux-nat.c: All implementations adjusted.
10037         * aix-thread.c: All implementations adjusted.
10038         * arm-linux-nat.c: All implementations adjusted.
10039         * breakpoint.c: All implementations adjusted.
10040         * bsd-kvm.c: All implementations adjusted.
10041         * bsd-uthread.c: All implementations adjusted.
10042         * corelow.c: All implementations adjusted.
10043         * ctf.c: All implementations adjusted.
10044         * darwin-nat.c: All implementations adjusted.
10045         * darwin-nat.h: All implementations adjusted.
10046         * exec.c: All implementations adjusted.
10047         * fbsd-nat.c: All implementations adjusted.
10048         * fbsd-nat.h: All implementations adjusted.
10049         * gnu-nat.c: All implementations adjusted.
10050         * gnu-nat.h: All implementations adjusted.
10051         * go32-nat.c: All implementations adjusted.
10052         * ia64-linux-nat.c: All implementations adjusted.
10053         * inf-child.c: All implementations adjusted.
10054         * inf-child.h: All implementations adjusted.
10055         * inf-ptrace.c: All implementations adjusted.
10056         * inf-ptrace.h: All implementations adjusted.
10057         * linux-nat.c: All implementations adjusted.
10058         * linux-nat.h: All implementations adjusted.
10059         * mips-linux-nat.c: All implementations adjusted.
10060         * nto-procfs.c: All implementations adjusted.
10061         * ppc-linux-nat.c: All implementations adjusted.
10062         * procfs.c: All implementations adjusted.
10063         * ravenscar-thread.c: All implementations adjusted.
10064         * record-btrace.c: All implementations adjusted.
10065         * record-full.c: All implementations adjusted.
10066         * remote-sim.c: All implementations adjusted.
10067         * remote.c: All implementations adjusted.
10068         * s390-linux-nat.c: All implementations adjusted.
10069         * sol-thread.c: All implementations adjusted.
10070         * spu-multiarch.c: All implementations adjusted.
10071         * target-delegates.c: All implementations adjusted.
10072         * target.c: All implementations adjusted.
10073         * target.h: All implementations adjusted.
10074         * tracefile-tfile.c: All implementations adjusted.
10075         * tracefile.c: All implementations adjusted.
10076         * tracefile.h: All implementations adjusted.
10077         * windows-nat.c: All implementations adjusted.
10078         * x86-linux-nat.h: All implementations adjusted.
10079         * x86-nat.h: All implementations adjusted.
10080
10081 2018-05-02  Pedro Alves  <palves@redhat.com>
10082
10083         * make-target-delegates (scan_target_h): Don't trim lines here.
10084         Replace sequences of tabs and/or whitespace with a single
10085         whitespace.
10086         (top level, parsing methods): Trim each line before processing it
10087         here.
10088
10089 2018-05-02  Pedro Alves  <palves@redhat.com>
10090             John Baldwin  <jhb@freebsd.org>
10091
10092         * target.h (enum strata) <debug_stratum>: New.
10093         (struct target_ops) <all delegation methods>: Replace by C++
10094         virtual methods, and drop "to_" prefix.  All references updated
10095         throughout.
10096         <to_shortname, to_longname, to_doc, to_data,
10097         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
10098         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
10099         virtual methods.  All references updated throughout.
10100         <can_attach, supports_terminal_ours, can_create_inferior,
10101         get_thread_control_capabilities, attach_no_wait>: New
10102         virtual methods.
10103         <insert_breakpoint, remove_breakpoint>: Now
10104         TARGET_DEFAULT_NORETURN methods.
10105         <info_proc>: Now returns bool.
10106         <to_magic>: Delete.
10107         (OPS_MAGIC): Delete.
10108         (current_target): Delete.  All references replaced by references
10109         to ...
10110         (target_stack): ... this.  New.
10111         (target_shortname, target_longname): Adjust.
10112         (target_can_run): Now a function declaration.
10113         (default_child_has_all_memory, default_child_has_memory)
10114         (default_child_has_stack, default_child_has_registers)
10115         (default_child_has_execution): Remove target_ops parameter.
10116         (complete_target_initialization): Delete.
10117         (memory_breakpoint_target): New template class.
10118         (test_target_ops): Refactor as a C++ class with virtual methods.
10119         * make-target-delegates (NAME_PART): Tighten.
10120         (POINTER_PART, CP_SYMBOL): New.
10121         (SIMPLE_RETURN_PART): Reimplement.
10122         (VEC_RETURN_PART): Expect less.
10123         (RETURN_PART, VIRTUAL_PART): New.
10124         (METHOD): Adjust to C++ virtual methods.
10125         (scan_target_h): Remove reference to C99.
10126         (dname): Output "target_ops::" prefix.
10127         (write_function_header): Adjust to output a C++ class method.
10128         (write_declaration): New.
10129         (write_delegator): Adjust to output a C++ class method.
10130         (tdname): Output "dummy_target::" prefix.
10131         (write_tdefault, write_debugmethod): Adjust to output a C++ class
10132         method.
10133         (tdefault_names, debug_names): Delete.
10134         (return_types, tdefaults, styles, argtypes_array): New.
10135         (top level): All methods are delegators.
10136         (print_class): New.
10137         (top level): Print dummy_target and debug_target classes.
10138         * target-delegates.c: Regenerate.
10139         * target-debug.h (target_debug_print_enum_info_proc_what)
10140         (target_debug_print_thread_control_capabilities)
10141         (target_debug_print_thread_info_p): New.
10142         * target.c (dummy_target): Delete.
10143         (the_dummy_target, the_debug_target): New.
10144         (target_stack): Now extern.
10145         (set_targetdebug): Push/unpush debug target.
10146         (default_child_has_all_memory, default_child_has_memory)
10147         (default_child_has_stack, default_child_has_registers)
10148         (default_child_has_execution): Remove target_ops parameter.
10149         (complete_target_initialization): Delete.
10150         (add_target_with_completer): No longer call
10151         complete_target_initialization.
10152         (target_supports_terminal_ours): Use regular delegation.
10153         (update_current_target): Delete.
10154         (push_target): No longer check magic number.  Don't call
10155         update_current_target.
10156         (unpush_target): Don't call update_current_target.
10157         (target_is_pushed): No longer check magic number.
10158         (target_require_runnable): Skip for all stratums over
10159         process_stratum.
10160         (target_ops::info_proc): New.
10161         (target_info_proc): Use find_target_at and
10162         find_default_run_target.
10163         (target_supports_disable_randomization): Use regular delegation.
10164         (target_get_osdata): Use find_target_at.
10165         (target_ops::open, target_ops::close, target_ops::can_attach)
10166         (target_ops::attach, target_ops::can_create_inferior)
10167         (target_ops::create_inferior, target_ops::can_run)
10168         (target_can_run): New.
10169         (default_fileio_target): Use regular delegation.
10170         (target_ops::fileio_open, target_ops::fileio_pwrite)
10171         (target_ops::fileio_pread, target_ops::fileio_fstat)
10172         (target_ops::fileio_close, target_ops::fileio_unlink)
10173         (target_ops::fileio_readlink): New.
10174         (target_fileio_open_1, target_fileio_unlink)
10175         (target_fileio_readlink): Always call the target method.  Handle
10176         FILEIO_ENOSYS.
10177         (return_zero, return_zero_has_execution): Delete.
10178         (init_dummy_target): Delete.
10179         (dummy_target::dummy_target, dummy_target::shortname)
10180         (dummy_target::longname, dummy_target::doc)
10181         (debug_target::debug_target, debug_target::shortname)
10182         (debug_target::longname, debug_target::doc): New.
10183         (target_supports_delete_record): Use regular delegation.
10184         (setup_target_debug): Delete.
10185         (maintenance_print_target_stack): Skip debug_stratum.
10186         (initialize_targets): Instantiate the_dummy_target and
10187         the_debug_target.
10188         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
10189         use target_stack.
10190         (target_auxv_search, fprint_target_auxv): Adjust.
10191         (info_auxv_command): Adjust to use target_stack.
10192         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
10193         * exceptions.c (print_flush): Handle a NULL target_stack.
10194         * regcache.c (target_ops_no_register): Refactor as class with
10195         virtual methods.
10196
10197         * exec.c (exec_target): New class.
10198         (exec_ops): Now an exec_target.
10199         (exec_open, exec_close_1, exec_get_section_table)
10200         (exec_xfer_partial, exec_files_info, exec_has_memory)
10201         (exec_make_note_section): Refactor as exec_target methods.
10202         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
10203         Delete.
10204         (exec_target::find_memory_regions): New.
10205         (_initialize_exec): Don't call init_exec_ops.
10206         * gdbcore.h (exec_file_clear): Delete.
10207
10208         * corefile.c (core_target): Delete.
10209         (core_file_command): Adjust.
10210         * corelow.c (core_target): New class.
10211         (the_core_target): New.
10212         (core_close): Remove target_ops parameter.
10213         (core_close_cleanup): Adjust.
10214         (core_target::close): New.
10215         (core_open, core_detach, get_core_registers, core_files_info)
10216         (core_xfer_partial, core_thread_alive, core_read_description)
10217         (core_pid_to_str, core_thread_name, core_has_memory)
10218         (core_has_stack, core_has_registers, core_info_proc): Rework as
10219         core_target methods.
10220         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10221         (_initialize_corelow): Initialize the_core_target.
10222         * gdbcore.h (core_target): Delete.
10223         (the_core_target): New.
10224
10225         * ctf.c: (ctf_target): New class.
10226         (ctf_ops): Now a ctf_target.
10227         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10228         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10229         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10230         methods.
10231         (init_ctf_ops): Delete.
10232         (_initialize_ctf): Don't call it.
10233         * tracefile-tfile.c (tfile_target): New class.
10234         (tfile_ops): Now a tfile_target.
10235         (tfile_open, tfile_close, tfile_files_info)
10236         (tfile_get_tracepoint_status, tfile_trace_find)
10237         (tfile_fetch_registers, tfile_xfer_partial)
10238         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10239         Refactor as tfile_target methods.
10240         (tfile_xfer_partial_features): Remove target_ops parameter.
10241         (init_tfile_ops): Delete.
10242         (_initialize_tracefile_tfile): Don't call it.
10243         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10244         (tracefile_has_stack, tracefile_has_registers)
10245         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10246         tracefile_target methods.
10247         (init_tracefile_ops): Delete.
10248         (tracefile_target::tracefile_target): New.
10249         * tracefile.h: Include "target.h".
10250         (tracefile_target): New class.
10251         (init_tracefile_ops): Delete.
10252
10253         * spu-multiarch.c (spu_multiarch_target): New class.
10254         (spu_ops): Now a spu_multiarch_target.
10255         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10256         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10257         (spu_search_memory, spu_mourn_inferior): Refactor as
10258         spu_multiarch_target methods.
10259         (init_spu_ops): Delete.
10260         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10261         complete_target_initialization.
10262
10263         * ravenscar-thread.c (ravenscar_thread_target): New class.
10264         (ravenscar_ops): Now a ravenscar_thread_target.
10265         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10266         (ravenscar_thread_alive, ravenscar_pid_to_str)
10267         (ravenscar_fetch_registers, ravenscar_store_registers)
10268         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10269         (ravenscar_stopped_by_hw_breakpoint)
10270         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10271         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10272         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10273         methods.
10274         (init_ravenscar_thread_ops): Delete.
10275         (_initialize_ravenscar): Remove references to
10276         init_ravenscar_thread_ops and complete_target_initialization.
10277
10278         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10279         (bsd_uthread_target): New class.
10280         (bsd_uthread_ops): Now a bsd_uthread_target.
10281         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10282         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10283         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10284         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10285         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10286         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10287         (bsd_uthread_target): Delete function.
10288         (_initialize_bsd_uthread): Remove reference to
10289         complete_target_initialization.
10290
10291         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10292         (target_bfd): ... this new class.
10293         (target_bfd_xfer_partial, target_bfd_get_section_table)
10294         (target_bfd_close): Refactor as target_bfd methods.
10295         (target_bfd::~target_bfd): New.
10296         (target_bfd_reopen): Adjust.
10297         (target_bfd::close): New.
10298
10299         * record-btrace.c (record_btrace_target): New class.
10300         (record_btrace_ops): Now a record_btrace_target.
10301         (record_btrace_open, record_btrace_stop_recording)
10302         (record_btrace_disconnect, record_btrace_close)
10303         (record_btrace_async, record_btrace_info)
10304         (record_btrace_insn_history, record_btrace_insn_history_range)
10305         (record_btrace_insn_history_from, record_btrace_call_history)
10306         (record_btrace_call_history_range)
10307         (record_btrace_call_history_from, record_btrace_record_method)
10308         (record_btrace_is_replaying, record_btrace_will_replay)
10309         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10310         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10311         (record_btrace_store_registers, record_btrace_prepare_to_store)
10312         (record_btrace_to_get_unwinder)
10313         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10314         (record_btrace_commit_resume, record_btrace_wait)
10315         (record_btrace_stop, record_btrace_can_execute_reverse)
10316         (record_btrace_stopped_by_sw_breakpoint)
10317         (record_btrace_supports_stopped_by_sw_breakpoint)
10318         (record_btrace_stopped_by_hw_breakpoint)
10319         (record_btrace_supports_stopped_by_hw_breakpoint)
10320         (record_btrace_update_thread_list, record_btrace_thread_alive)
10321         (record_btrace_goto_begin, record_btrace_goto_end)
10322         (record_btrace_goto, record_btrace_stop_replaying_all)
10323         (record_btrace_execution_direction)
10324         (record_btrace_prepare_to_generate_core)
10325         (record_btrace_done_generating_core): Refactor as
10326         record_btrace_target methods.
10327         (init_record_btrace_ops): Delete.
10328         (_initialize_record_btrace): Remove reference to
10329         init_record_btrace_ops.
10330         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10331         the execution_direction global.
10332         (record_full_base_target, record_full_target)
10333         (record_full_core_target): New classes.
10334         (record_full_ops): Now a record_full_target.
10335         (record_full_core_ops): Now a record_full_core_target.
10336         (record_full_target::detach, record_full_target::disconnect)
10337         (record_full_core_target::disconnect)
10338         (record_full_target::mourn_inferior, record_full_target::kill):
10339         New.
10340         (record_full_open, record_full_close, record_full_async): Refactor
10341         as methods of the record_full_base_target class.
10342         (record_full_resume, record_full_commit_resume): Refactor
10343         as methods of the record_full_target class.
10344         (record_full_wait, record_full_stopped_by_watchpoint)
10345         (record_full_stopped_data_address)
10346         (record_full_stopped_by_sw_breakpoint)
10347         (record_full_supports_stopped_by_sw_breakpoint)
10348         (record_full_stopped_by_hw_breakpoint)
10349         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10350         methods of the record_full_base_target class.
10351         (record_full_store_registers, record_full_xfer_partial)
10352         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10353         Refactor as methods of the record_full_target class.
10354         (record_full_can_execute_reverse, record_full_get_bookmark)
10355         (record_full_goto_bookmark, record_full_execution_direction)
10356         (record_full_record_method, record_full_info, record_full_delete)
10357         (record_full_is_replaying, record_full_will_replay)
10358         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10359         (record_full_stop_replaying): Refactor as methods of the
10360         record_full_base_target class.
10361         (record_full_core_resume, record_full_core_kill)
10362         (record_full_core_fetch_registers)
10363         (record_full_core_prepare_to_store)
10364         (record_full_core_store_registers, record_full_core_xfer_partial)
10365         (record_full_core_insert_breakpoint)
10366         (record_full_core_remove_breakpoint)
10367         (record_full_core_has_execution): Refactor
10368         as methods of the record_full_core_target class.
10369         (record_full_base_target::supports_delete_record): New.
10370         (init_record_full_ops): Delete.
10371         (init_record_full_core_ops): Delete.
10372         (record_full_save): Refactor as method of the
10373         record_full_base_target class.
10374         (_initialize_record_full): Remove references to
10375         init_record_full_ops and init_record_full_core_ops.
10376
10377         * remote.c (remote_target, extended_remote_target): New classes.
10378         (remote_ops): Now a remote_target.
10379         (extended_remote_ops): Now an extended_remote_target.
10380         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10381         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10382         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10383         (remote_pass_signals, remote_set_syscall_catchpoint)
10384         (remote_program_signals, )
10385         (remote_thread_always_alive): Remove target_ops parameter.
10386         (remote_thread_alive, remote_thread_name)
10387         (remote_update_thread_list, remote_threads_extra_info)
10388         (remote_static_tracepoint_marker_at)
10389         (remote_static_tracepoint_markers_by_strid)
10390         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10391         (remote_open): Refactor as methods of remote_target.
10392         (extended_remote_open, extended_remote_detach)
10393         (extended_remote_attach, extended_remote_post_attach):
10394         (extended_remote_supports_disable_randomization)
10395         (extended_remote_create_inferior): : Refactor as method of
10396         extended_remote_target.
10397         (remote_set_permissions, remote_open_1, remote_detach)
10398         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10399         (remote_resume, remote_commit_resume, remote_stop)
10400         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10401         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10402         (remote_prepare_to_store, remote_store_registers)
10403         (remote_flash_erase, remote_flash_done, remote_files_info)
10404         (remote_kill, remote_mourn, remote_insert_breakpoint)
10405         (remote_remove_breakpoint, remote_insert_watchpoint)
10406         (remote_watchpoint_addr_within_range)
10407         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10408         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10409         (remote_supports_stopped_by_sw_breakpoint)
10410         (remote_stopped_by_hw_breakpoint)
10411         (remote_supports_stopped_by_hw_breakpoint)
10412         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10413         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10414         (remote_verify_memory): Refactor as methods of remote_target.
10415         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10416         parameter.
10417         (remote_xfer_partial, remote_get_memory_xfer_limit)
10418         (remote_search_memory, remote_rcmd, remote_memory_map)
10419         (remote_pid_to_str, remote_get_thread_local_address)
10420         (remote_get_tib_address, remote_read_description): Refactor as
10421         methods of remote_target.
10422         (remote_target::fileio_open, remote_target::fileio_pwrite)
10423         (remote_target::fileio_pread, remote_target::fileio_close): New.
10424         (remote_hostio_readlink, remote_hostio_fstat)
10425         (remote_filesystem_is_local, remote_can_execute_reverse)
10426         (remote_supports_non_stop, remote_supports_disable_randomization)
10427         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10428         (remote_supports_enable_disable_tracepoint)
10429         (remote_supports_string_tracing)
10430         (remote_can_run_breakpoint_commands, remote_trace_init)
10431         (remote_download_tracepoint, remote_can_download_tracepoint)
10432         (remote_download_trace_state_variable, remote_enable_tracepoint)
10433         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10434         (remote_trace_start, remote_get_trace_status)
10435         (remote_get_tracepoint_status, remote_trace_stop)
10436         (remote_trace_find, remote_get_trace_state_variable_value)
10437         (remote_save_trace_data, remote_get_raw_trace_data)
10438         (remote_set_disconnected_tracing, remote_core_of_thread)
10439         (remote_set_circular_trace_buffer, remote_traceframe_info)
10440         (remote_get_min_fast_tracepoint_insn_len)
10441         (remote_set_trace_buffer_size, remote_set_trace_notes)
10442         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10443         (remote_disable_btrace, remote_teardown_btrace)
10444         (remote_read_btrace, remote_btrace_conf)
10445         (remote_augmented_libraries_svr4_read, remote_load)
10446         (remote_pid_to_exec_file, remote_can_do_single_step)
10447         (remote_execution_direction, remote_thread_handle_to_thread_info):
10448         Refactor as methods of remote_target.
10449         (init_remote_ops, init_extended_remote_ops): Delete.
10450         (remote_can_async_p, remote_is_async_p, remote_async)
10451         (remote_thread_events, remote_upload_tracepoints)
10452         (remote_upload_trace_state_variables): Refactor as methods of
10453         remote_target.
10454         (_initialize_remote): Remove references to init_remote_ops and
10455         init_extended_remote_ops.
10456
10457         * remote-sim.c (gdbsim_target): New class.
10458         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10459         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10460         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10461         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10462         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10463         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10464         Refactor as methods of gdbsim_target.
10465         (gdbsim_ops): Now a gdbsim_target.
10466         (init_gdbsim_ops): Delete.
10467         (gdbsim_cntrl_c): Adjust.
10468         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10469
10470         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10471         (the_amd64_linux_nat_target): New.
10472         (amd64_linux_fetch_inferior_registers)
10473         (amd64_linux_store_inferior_registers): Refactor as methods of
10474         amd64_linux_nat_target.
10475         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10476         * i386-linux-nat.c: Don't include "linux-nat.h".
10477         (i386_linux_nat_target): New class.
10478         (the_i386_linux_nat_target): New.
10479         (i386_linux_fetch_inferior_registers)
10480         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10481         as methods of i386_linux_nat_target.
10482         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10483         * inf-child.c (inf_child_ops): Delete.
10484         (inf_child_fetch_inferior_registers)
10485         (inf_child_store_inferior_registers): Delete.
10486         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10487         methods of inf_child_target.
10488         (inf_child_target::supports_terminal_ours)
10489         (inf_child_target::terminal_init)
10490         (inf_child_target::terminal_inferior)
10491         (inf_child_target::terminal_ours_for_output)
10492         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10493         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10494         New.
10495         (inf_child_open, inf_child_disconnect, inf_child_close)
10496         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10497         (inf_child_post_startup_inferior, inf_child_can_run)
10498         (inf_child_pid_to_exec_file): Refactor as methods of
10499         inf_child_target.
10500         (inf_child_follow_fork): Delete.
10501         (inf_child_target::can_create_inferior)
10502         (inf_child_target::can_attach): New.
10503         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10504         (inf_child_target::has_stack, inf_child_target::has_registers)
10505         (inf_child_target::has_execution): New.
10506         (inf_child_fileio_open, inf_child_fileio_pwrite)
10507         (inf_child_fileio_pread, inf_child_fileio_fstat)
10508         (inf_child_fileio_close, inf_child_fileio_unlink)
10509         (inf_child_fileio_readlink, inf_child_use_agent)
10510         (inf_child_can_use_agent): Refactor as methods of
10511         inf_child_target.
10512         (return_zero, inf_child_target): Delete.
10513         (inf_child_target::inf_child_target): New.
10514         * inf-child.h: Include "target.h".
10515         (inf_child_target): Delete function prototype.
10516         (inf_child_target): New class.
10517         (inf_child_open_target, inf_child_mourn_inferior)
10518         (inf_child_maybe_unpush_target): Delete.
10519         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10520         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10521         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10522         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10523         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10524         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10525         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10526         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10527         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10528         methods of inf_ptrace_target.
10529         (inf_ptrace_target): Delete function.
10530         * inf-ptrace.h: Include "inf-child.h".
10531         (inf_ptrace_target): Delete function declaration.
10532         (inf_ptrace_target): New class.
10533         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10534         * linux-nat.c (linux_target): New.
10535         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10536         (linux_nat_target::~linux_nat_target): New.
10537         (linux_child_post_attach, linux_child_post_startup_inferior)
10538         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10539         (linux_child_remove_fork_catchpoint)
10540         (linux_child_insert_vfork_catchpoint)
10541         (linux_child_remove_vfork_catchpoint)
10542         (linux_child_insert_exec_catchpoint)
10543         (linux_child_remove_exec_catchpoint)
10544         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10545         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10546         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10547         (linux_nat_stopped_data_address)
10548         (linux_nat_stopped_by_sw_breakpoint)
10549         (linux_nat_supports_stopped_by_sw_breakpoint)
10550         (linux_nat_stopped_by_hw_breakpoint)
10551         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10552         (linux_nat_kill, linux_nat_mourn_inferior)
10553         (linux_nat_xfer_partial, linux_nat_thread_alive)
10554         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10555         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10556         (linux_child_static_tracepoint_markers_by_strid)
10557         (linux_nat_is_async_p, linux_nat_can_async_p)
10558         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10559         (linux_nat_supports_multi_process)
10560         (linux_nat_supports_disable_randomization, linux_nat_async)
10561         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10562         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10563         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10564         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10565         methods of linux_nat_target.
10566         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10567         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10568         parameter.
10569         (check_stopped_by_watchpoint): Adjust.
10570         (linux_xfer_partial): Delete.
10571         (linux_target_install_ops, linux_target, linux_nat_add_target):
10572         Delete.
10573         (linux_nat_target::linux_nat_target): New.
10574         * linux-nat.h: Include "inf-ptrace.h".
10575         (linux_nat_target): New.
10576         (linux_target, linux_target_install_ops, linux_nat_add_target):
10577         Delete function declarations.
10578         (linux_target): Declare global.
10579         * linux-thread-db.c (thread_db_target): New.
10580         (thread_db_target::thread_db_target): New.
10581         (thread_db_ops): Delete.
10582         (the_thread_db_target): New.
10583         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10584         (thread_db_update_thread_list, thread_db_pid_to_str)
10585         (thread_db_extra_thread_info)
10586         (thread_db_thread_handle_to_thread_info)
10587         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10588         (thread_db_resume): Refactor as methods of thread_db_target.
10589         (init_thread_db_ops): Delete.
10590         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10591         * x86-linux-nat.c: Don't include "linux-nat.h".
10592         (super_post_startup_inferior): Delete.
10593         (x86_linux_nat_target::~x86_linux_nat_target): New.
10594         (x86_linux_child_post_startup_inferior)
10595         (x86_linux_read_description, x86_linux_enable_btrace)
10596         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10597         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10598         methods of x86_linux_nat_target.
10599         (x86_linux_create_target): Delete.  Bits folded ...
10600         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10601         pointer.
10602         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10603         (x86_linux_nat_target): New class.
10604         (x86_linux_create_target): Delete.
10605         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10606         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10607         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10608         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10609         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10610         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10611         make extern.
10612         (x86_use_watchpoints): Delete.
10613         * x86-nat.h: Include "breakpoint.h" and "target.h".
10614         (x86_use_watchpoints): Delete.
10615         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10616         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10617         (x86_insert_watchpoint, x86_remove_watchpoint)
10618         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10619         (x86_stopped_by_hw_breakpoint): New declarations.
10620         (x86_nat_target): New template class.
10621
10622         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10623         (the_ppc_linux_nat_target): New.
10624         (ppc_linux_fetch_inferior_registers)
10625         (ppc_linux_can_use_hw_breakpoint)
10626         (ppc_linux_region_ok_for_hw_watchpoint)
10627         (ppc_linux_ranged_break_num_registers)
10628         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10629         (ppc_linux_insert_mask_watchpoint)
10630         (ppc_linux_remove_mask_watchpoint)
10631         (ppc_linux_can_accel_watchpoint_condition)
10632         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10633         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10634         (ppc_linux_watchpoint_addr_within_range)
10635         (ppc_linux_masked_watch_num_registers)
10636         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10637         (ppc_linux_read_description): Refactor as methods of
10638         ppc_linux_nat_target.
10639         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10640
10641         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10642         (procfs_target): New class.
10643         (the_procfs_target): New.
10644         (procfs_target): Delete function.
10645         (procfs_auxv_parse, procfs_attach, procfs_detach)
10646         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10647         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10648         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10649         (procfs_create_inferior, procfs_update_thread_list)
10650         (procfs_thread_alive, procfs_pid_to_str)
10651         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10652         (procfs_stopped_data_address, procfs_insert_watchpoint)
10653         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10654         (proc_find_memory_regions, procfs_info_proc)
10655         (procfs_make_note_section): Refactor as methods of procfs_target.
10656         (_initialize_procfs): Adjust.
10657         * sol-thread.c (sol_thread_target): New class.
10658         (sol_thread_ops): Now a sol_thread_target.
10659         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10660         (sol_thread_fetch_registers, sol_thread_store_registers)
10661         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10662         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10663         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10664         (init_sol_thread_ops): Delete.
10665         (_initialize_sol_thread): Adjust.  Remove references to
10666         init_sol_thread_ops and complete_target_initialization.
10667
10668         * windows-nat.c (windows_nat_target): New class.
10669         (windows_fetch_inferior_registers)
10670         (windows_store_inferior_registers, windows_resume, windows_wait)
10671         (windows_attach, windows_detach, windows_pid_to_exec_file)
10672         (windows_files_info, windows_create_inferior)
10673         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10674         (windows_close, windows_pid_to_str, windows_xfer_partial)
10675         (windows_get_tib_address, windows_get_ada_task_ptid)
10676         (windows_thread_name, windows_thread_alive): Refactor as
10677         windows_nat_target methods.
10678         (do_initial_windows_stuff): Adjust.
10679         (windows_target): Delete function.
10680         (_initialize_windows_nat): Adjust.
10681
10682         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10683         (darwin_mourn_inferior, darwin_kill_inferior)
10684         (darwin_create_inferior, darwin_attach, darwin_detach)
10685         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10686         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10687         (darwin_supports_multi_process): Refactor as darwin_nat_target
10688         methods.
10689         (darwin_resume_to, darwin_files_info): Delete.
10690         (_initialize_darwin_inferior): Rename to ...
10691         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10692         * darwin-nat.h: Include "inf-child.h".
10693         (darwin_nat_target): New class.
10694         (darwin_complete_target): Delete.
10695         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10696         (darwin_target): New.
10697         (i386_darwin_fetch_inferior_registers)
10698         (i386_darwin_store_inferior_registers): Refactor as methods of
10699         darwin_nat_target.
10700         (darwin_complete_target): Delete, with ...
10701         (_initialize_i386_darwin_nat): ... bits factored out here.
10702
10703         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10704         (the_alpha_linux_nat_target): New.
10705         (alpha_linux_register_u_offset): Refactor as
10706         alpha_linux_nat_target method.
10707         (_initialize_alpha_linux_nat): Adjust.
10708         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10709         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10710         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10711         methods of linux_nat_trad_target.
10712         (linux_trad_target): Delete.
10713         * linux-nat-trad.h (linux_trad_target): Delete function.
10714         (linux_nat_trad_target): New class.
10715         * mips-linux-nat.c (mips_linux_nat_target): New class.
10716         (super_fetch_registers, super_store_registers, super_close):
10717         Delete.
10718         (the_mips_linux_nat_target): New.
10719         (mips64_linux_regsets_fetch_registers)
10720         (mips64_linux_regsets_store_registers)
10721         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10722         (mips_linux_register_u_offset, mips_linux_read_description)
10723         (mips_linux_can_use_hw_breakpoint)
10724         (mips_linux_stopped_by_watchpoint)
10725         (mips_linux_stopped_data_address)
10726         (mips_linux_region_ok_for_hw_watchpoint)
10727         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10728         (mips_linux_close): Refactor as methods of mips_linux_nat.
10729         (_initialize_mips_linux_nat): Adjust to C++ification.
10730
10731         * aix-thread.c (aix_thread_target): New class.
10732         (aix_thread_ops): Now an aix_thread_target.
10733         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10734         (aix_thread_fetch_registers, aix_thread_store_registers)
10735         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10736         (aix_thread_thread_alive, aix_thread_pid_to_str)
10737         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10738         Refactor as methods of aix_thread_target.
10739         (init_aix_thread_ops): Delete.
10740         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10741         and complete_target_initialization.
10742         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10743         (rs6000_nat_target): New class.
10744         (the_rs6000_nat_target): New.
10745         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10746         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10747         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10748         (super_create_inferior): Delete.
10749         (_initialize_rs6000_nat): Adjust to C++ification.
10750
10751         * arm-linux-nat.c (arm_linux_nat_target): New class.
10752         (the_arm_linux_nat_target): New.
10753         (arm_linux_fetch_inferior_registers)
10754         (arm_linux_store_inferior_registers, arm_linux_read_description)
10755         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10756         (arm_linux_remove_hw_breakpoint)
10757         (arm_linux_region_ok_for_hw_watchpoint)
10758         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10759         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10760         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10761         arm_linux_nat_target.
10762         (_initialize_arm_linux_nat): Adjust to C++ification.
10763
10764         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10765         (the_aarch64_linux_nat_target): New.
10766         (aarch64_linux_fetch_inferior_registers)
10767         (aarch64_linux_store_inferior_registers)
10768         (aarch64_linux_child_post_startup_inferior)
10769         (aarch64_linux_read_description)
10770         (aarch64_linux_can_use_hw_breakpoint)
10771         (aarch64_linux_insert_hw_breakpoint)
10772         (aarch64_linux_remove_hw_breakpoint)
10773         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10774         (aarch64_linux_region_ok_for_hw_watchpoint)
10775         (aarch64_linux_stopped_data_address)
10776         (aarch64_linux_stopped_by_watchpoint)
10777         (aarch64_linux_watchpoint_addr_within_range)
10778         (aarch64_linux_can_do_single_step): Refactor as methods of
10779         aarch64_linux_nat_target.
10780         (super_post_startup_inferior): Delete.
10781         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10782
10783         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10784         (the_hppa_linux_nat_target): New.
10785         (hppa_linux_fetch_inferior_registers)
10786         (hppa_linux_store_inferior_registers): Refactor as methods of
10787         hppa_linux_nat_target.
10788         (_initialize_hppa_linux_nat): Adjust to C++ification.
10789
10790         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10791         (the_ia64_linux_nat_target): New.
10792         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10793         (ia64_linux_stopped_data_address)
10794         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10795         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10796         ia64_linux_nat_target methods.
10797         (super_xfer_partial): Delete.
10798         (_initialize_ia64_linux_nat): Adjust to C++ification.
10799
10800         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10801         (the_m32r_linux_nat_target): New.
10802         (m32r_linux_fetch_inferior_registers)
10803         (m32r_linux_store_inferior_registers): Refactor as
10804         m32r_linux_nat_target methods.
10805         (_initialize_m32r_linux_nat): Adjust to C++ification.
10806
10807         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10808         (the_m68k_linux_nat_target): New.
10809         (m68k_linux_fetch_inferior_registers)
10810         (m68k_linux_store_inferior_registers): Refactor as
10811         m68k_linux_nat_target methods.
10812         (_initialize_m68k_linux_nat): Adjust to C++ification.
10813
10814         * s390-linux-nat.c (s390_linux_nat_target): New class.
10815         (the_s390_linux_nat_target): New.
10816         (s390_linux_fetch_inferior_registers)
10817         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10818         (s390_insert_watchpoint, s390_remove_watchpoint)
10819         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10820         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10821         (s390_auxv_parse, s390_read_description): Refactor as methods of
10822         s390_linux_nat_target.
10823         (_initialize_s390_nat): Adjust to C++ification.
10824
10825         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10826         (the_sparc_linux_nat_target): New.
10827         (_initialize_sparc_linux_nat): Adjust to C++ification.
10828         * sparc-nat.c (sparc_fetch_inferior_registers)
10829         (sparc_store_inferior_registers): Remove target_ops parameter.
10830         * sparc-nat.h (sparc_fetch_inferior_registers)
10831         (sparc_store_inferior_registers): Remove target_ops parameter.
10832         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10833         (the_sparc64_linux_nat_target): New.
10834         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10835
10836         * spu-linux-nat.c (spu_linux_nat_target): New class.
10837         (the_spu_linux_nat_target): New.
10838         (spu_child_post_startup_inferior, spu_child_post_attach)
10839         (spu_child_wait, spu_fetch_inferior_registers)
10840         (spu_store_inferior_registers, spu_xfer_partial)
10841         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10842         methods.
10843         (_initialize_spu_nat): Adjust to C++ification.
10844
10845         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10846         (the_tilegx_linux_nat_target): New.
10847         (fetch_inferior_registers, store_inferior_registers):
10848         Refactor as methods.
10849         (_initialize_tile_linux_nat): Adjust to C++ification.
10850
10851         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10852         (the_xtensa_linux_nat_target): New.
10853         (xtensa_linux_fetch_inferior_registers)
10854         (xtensa_linux_store_inferior_registers): Refactor as
10855         xtensa_linux_nat_target methods.
10856         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10857
10858         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10859         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10860         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10861         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10862         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10863         (fbsd_stopped_by_sw_breakpoint)
10864         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10865         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10866         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10867         (fbsd_post_startup_inferior, fbsd_post_attach)
10868         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10869         (fbsd_set_syscall_catchpoint)
10870         (super_xfer_partial, super_resume, super_wait)
10871         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10872         (fbsd_handle_debug_trap): Remove target_ops parameter.
10873         (fbsd_nat_add_target): Delete.
10874         * fbsd-nat.h: Include "inf-ptrace.h".
10875         (fbsd_nat_add_target): Delete.
10876         (USE_SIGTRAP_SIGINFO): Define.
10877         (fbsd_nat_target): New class.
10878
10879         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10880         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10881         (amd64bsd_target): Delete.
10882         * amd64-bsd-nat.h: New file.
10883         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10884         "x86-bsd-nat.h".
10885         (amd64_fbsd_nat_target): New class.
10886         (the_amd64_fbsd_nat_target): New.
10887         (amd64fbsd_read_description): Refactor as method of
10888         amd64_fbsd_nat_target.
10889         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10890         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10891         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10892         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10893         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10894         (i386bsd_target): Delete.
10895         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10896         (i386bsd_fetch_inferior_registers)
10897         (i386bsd_store_inferior_registers): Declare.
10898         (i386_bsd_nat_target): New class.
10899         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10900         (the_i386_fbsd_nat_target): New.
10901         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10902         i386_fbsd_nat_target methods.
10903         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10904         (_initialize_i386fbsd_nat): Adjust to C++ification.
10905         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10906         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10907         (_initialize_x86_bsd_nat): Adjust to C++ification.
10908         * x86-bsd-nat.h: Include "x86-nat.h".
10909         (x86bsd_target): Delete declaration.
10910         (x86bsd_nat_target): New class.
10911
10912         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10913         (the_aarch64_fbsd_nat_target): New.
10914         (aarch64_fbsd_fetch_inferior_registers)
10915         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10916         aarch64_fbsd_nat_target.
10917         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10918         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10919         (the_alpha_bsd_nat_target): New.
10920         (alphabsd_fetch_inferior_registers)
10921         (alphabsd_store_inferior_registers): Refactor as
10922         alpha_bsd_nat_target methods.
10923         (_initialize_alphabsd_nat): Refactor as methods of
10924         alpha_bsd_nat_target.
10925         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10926         (the_amd64_nbsd_nat_target): New.
10927         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10928         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10929         (the_amd64_obsd_nat_target): New.
10930         (_initialize_amd64obsd_nat): Adjust to C++ification.
10931         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10932         (the_arm_fbsd_nat_target): New.
10933         (arm_fbsd_fetch_inferior_registers)
10934         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10935         (_initialize_arm_fbsd_nat): Refactor as methods of
10936         arm_fbsd_nat_target.
10937         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10938         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10939         (the_arm_netbsd_nat_target): New.
10940         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10941         arm_netbsd_nat_target.
10942         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10943         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10944         (the_hppa_nbsd_nat_target): New.
10945         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10946         hppa_nbsd_nat_target methods.
10947         (_initialize_hppanbsd_nat): Adjust to C++ification.
10948         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10949         (the_hppa_obsd_nat_target): New.
10950         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10951         methods of hppa_obsd_nat_target.
10952         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10953         add_target.
10954         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10955         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10956         add_target.
10957         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10958         (_initialize_i386obsd_nat): Use add_target.
10959         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10960         (the_m68k_bsd_nat_target): New.
10961         (m68kbsd_fetch_inferior_registers)
10962         (m68kbsd_store_inferior_registers): Refactor as methods of
10963         m68k_bsd_nat_target.
10964         (_initialize_m68kbsd_nat): Adjust to C++ification.
10965         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10966         (the_mips_fbsd_nat_target): New.
10967         (mips_fbsd_fetch_inferior_registers)
10968         (mips_fbsd_store_inferior_registers): Refactor as methods of
10969         mips_fbsd_nat_target.
10970         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10971         add_target.
10972         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10973         (the_mips_nbsd_nat_target): New.
10974         (mipsnbsd_fetch_inferior_registers)
10975         (mipsnbsd_store_inferior_registers): Refactor as methods of
10976         mips_nbsd_nat_target.
10977         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10978         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10979         (the_mips64_obsd_nat_target): New.
10980         (mips64obsd_fetch_inferior_registers)
10981         (mips64obsd_store_inferior_registers): Refactor as methods of
10982         mips64_obsd_nat_target.
10983         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10984         add_target.
10985         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10986         nbsd_nat_target.
10987         * nbsd-nat.h: Include "inf-ptrace.h".
10988         (nbsd_nat_target): New class.
10989         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10990         (obsd_wait): Refactor as methods of obsd_nat_target.
10991         (obsd_add_target): Delete.
10992         * obsd-nat.h: Include "inf-ptrace.h".
10993         (obsd_nat_target): New class.
10994         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10995         (the_ppc_fbsd_nat_target): New.
10996         (ppcfbsd_fetch_inferior_registers)
10997         (ppcfbsd_store_inferior_registers): Refactor as methods of
10998         ppc_fbsd_nat_target.
10999         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
11000         add_target.
11001         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
11002         (the_ppc_nbsd_nat_target): New.
11003         (ppcnbsd_fetch_inferior_registers)
11004         (ppcnbsd_store_inferior_registers): Refactor as methods of
11005         ppc_nbsd_nat_target.
11006         (_initialize_ppcnbsd_nat): Adjust to C++ification.
11007         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
11008         (the_ppc_obsd_nat_target): New.
11009         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
11010         methods of ppc_obsd_nat_target.
11011         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
11012         add_target.
11013         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
11014         (the_sh_nbsd_nat_target): New.
11015         (shnbsd_fetch_inferior_registers)
11016         (shnbsd_store_inferior_registers): Refactor as methods of
11017         sh_nbsd_nat_target.
11018         (_initialize_shnbsd_nat): Adjust to C++ification.
11019         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
11020         (inf_ptrace_xfer_partial): Delete.
11021         (sparc_xfer_partial, sparc_target): Delete.
11022         * sparc-nat.h (sparc_fetch_inferior_registers)
11023         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
11024         (sparc_target): Delete function declaration.
11025         (sparc_target): New template class.
11026         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
11027         (_initialize_sparcnbsd_nat): Adjust to C++ification.
11028         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
11029         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
11030         add_target.
11031         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
11032         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
11033         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
11034         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
11035         add_target.
11036         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
11037         (the_vax_bsd_nat_target): New.
11038         (vaxbsd_fetch_inferior_registers)
11039         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
11040         methods.
11041         (_initialize_vaxbsd_nat): Adjust to C++ification.
11042
11043         * bsd-kvm.c (bsd_kvm_target): New class.
11044         (bsd_kvm_ops): Now a bsd_kvm_target.
11045         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
11046         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
11047         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
11048         bsd_kvm_target.
11049         (bsd_kvm_return_one): Delete.
11050         (bsd_kvm_add_target): Adjust to C++ification.
11051
11052         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
11053         (nto_procfs_target_procfs): New classes.
11054         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
11055         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
11056         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
11057         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
11058         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
11059         (procfs_remove_hw_breakpoint, procfs_resume)
11060         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
11061         (procfs_kill_inferior, procfs_store_registers)
11062         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
11063         as methods of nto_procfs_target.
11064         (nto_procfs_ops): Now an nto_procfs_target_procfs.
11065         (nto_native_ops): Delete.
11066         (procfs_open, procfs_native_open): Delete.
11067         (nto_native_ops): Now an nto_procfs_target_native.
11068         (init_procfs_targets): Adjust to C++ification.
11069         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
11070         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
11071         Refactor as methods of nto_procfs_target.
11072
11073         * go32-nat.c (go32_nat_target): New class.
11074         (the_go32_nat_target): New.
11075         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
11076         (go32_store_registers, go32_xfer_partial, go32_files_info)
11077         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
11078         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
11079         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
11080         (go32_pid_to_str): Refactor as methods of go32_nat_target.
11081         (go32_target): Delete.
11082         (_initialize_go32_nat): Adjust to C++ification.
11083
11084         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
11085         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
11086         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
11087         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
11088         gnu_nat_target.
11089         (gnu_target): Delete.
11090         * gnu-nat.h (gnu_target): Delete.
11091         (gnu_nat_target): New class.
11092         * i386-gnu-nat.c (gnu_base_target): New.
11093         (i386_gnu_nat_target): New class.
11094         (the_i386_gnu_nat_target): New.
11095         (_initialize_i386gnu_nat): Adjust to C++ification.
11096
11097 2018-05-02  Pedro Alves  <palves@redhat.com>
11098
11099         * bfd-target.c (target_bfd_xclose): Rename to ...
11100         (target_bfd_close): ... this.
11101         (target_bfd_reopen): Adjust.
11102         * target.c (target_close): Remove references to to_xclose.
11103         * target.h (target_ops::to_xclose): Delete.
11104         (target_ops::to_close): Update comments.
11105
11106 2018-05-02  Pedro Alves  <palves@redhat.com>
11107
11108         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
11109         "linux-nat.h".
11110         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
11111         * inf-ptrace.c (inf_ptrace_register_u_offset)
11112         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11113         (inf_ptrace_store_register, inf_ptrace_store_registers)
11114         (inf_ptrace_trad_target): Move to ...
11115         * linux-nat-trad.c: ... this new file.
11116         * linux-nat-trad.h: New file.
11117         * linux-nat.c (linux_target_install_ops): Make extern.
11118         (linux_trad_target): Delete.
11119         * linux-nat.h (linux_trad_target): Delete declaration.
11120         (linux_target_install_ops): Declare.
11121         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
11122         "linux-nat.h".
11123
11124 2018-05-02  Pedro Alves  <palves@redhat.com>
11125
11126         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11127         procfs_target/add_target here.
11128         * procfs.c (procfs_target): Make static.
11129         (_initialize_procfs): Call add_target here.
11130         * procfs.h (struct target_ops): Remove forward declaration.
11131         (procfs_target): Remove declaration.
11132         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
11133
11134 2018-05-02  Pedro Alves  <palves@redhat.com>
11135
11136         * procfs.c (procfs_stopped_by_watchpoint)
11137         (procfs_insert_watchpoint, procfs_remove_watchpoint)
11138         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
11139         Forward declare.
11140         (procfs_use_watchpoints): Delete, move contents...
11141         (procfs_target): ... here.
11142         * procfs.h (procfs_use_watchpoints): Delete declaration.
11143         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
11144         procfs_use_watchpoints.
11145         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
11146         procfs_use_watchpoints.
11147
11148 2018-05-02  Tom Tromey  <tom@tromey.com>
11149
11150         PR python/20084:
11151         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
11152         and var_zuinteger_unlimited.
11153         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
11154         and PARAM_ZUINTEGER_UNLIMITED.
11155         (set_parameter_value): Handle var_zuinteger and
11156         var_zuinteger_unlimited.
11157         (add_setshow_generic): Likewise.
11158         (parmpy_init): Likewise.
11159
11160 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
11161
11162         PR rust/23124
11163         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
11164         pointer is not null before dereferencing it.
11165
11166 2018-04-30  Tom Tromey  <tom@tromey.com>
11167
11168         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
11169         is_mi_like_p.
11170
11171 2018-04-30  Tom Tromey  <tom@tromey.com>
11172
11173         * breakpoint.c (mention): Remove use of is_mi_like_p.
11174         (print_mention_ranged_breakpoint): Likewise.
11175         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
11176         of is_mi_like_p.
11177
11178 2018-04-30  Tom Tromey  <tom@tromey.com>
11179
11180         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
11181
11182 2018-04-30  Tom Tromey  <tom@tromey.com>
11183
11184         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
11185         (info_spu_event_command): Remove some uses of is_mi_like_p.
11186
11187 2018-04-30  Tom Tromey  <tom@tromey.com>
11188
11189         * python/py-framefilter.c (py_print_single_arg)
11190         (enumerate_locals, py_print_args, py_print_frame): Remove some
11191         uses of is_mi_like_p.
11192
11193 2018-04-30  Tom Tromey  <tom@tromey.com>
11194
11195         * ui-out.c: Update.
11196         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
11197         * ui-out.h (ui_out::is_mi_like_p): Now const.
11198         (ui_out::do_is_mi_like_p): Now const.
11199         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
11200
11201 2018-04-30  Tom Tromey  <tom@tromey.com>
11202
11203         * varobj.c (varobj_set_visualizer): Use new_reference.
11204         * python/python.c (gdbpy_decode_line): Use new_reference.
11205         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
11206         new_reference.
11207
11208 2018-04-30  Tom Tromey  <tom@tromey.com>
11209
11210         * varobj.c (install_new_value): Use new_reference.
11211         * value.h (value_incref): Return void.  Swap intro comment with
11212         value_decref.
11213         * value.c (set_value_parent): Use new_reference.
11214         (value_incref): Return void.  Update intro comment.
11215         (release_value): Use new_reference.
11216         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11217
11218 2018-04-30  Tom Tromey  <tom@tromey.com>
11219
11220         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11221         * gdb_bfd.h (new_bfd_ref): Remove.
11222         (gdb_bfd_open): Update comment.
11223         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11224         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11225         (gdb_bfd_fdopenr): Use new_reference.
11226         * exec.c (exec_file_attach): Use new_reference.
11227
11228 2018-04-30  Tom Tromey  <tom@tromey.com>
11229
11230         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11231         method.
11232
11233 2018-04-30  Tom Tromey  <tom@tromey.com>
11234
11235         * jit.c (jit_read_code_entry): Use type_align.
11236         * i386-tdep.c (i386_gdbarch_init): Don't call
11237         set_gdbarch_long_long_align_bit.
11238         * gdbarch.sh: Remove long_long_align_bit.
11239         * gdbarch.c, gdbarch.h: Rebuild.
11240         * arc-tdep.c (arc_type_align): New function.
11241         (arc_gdbarch_init): Use arc_type_align.  Don't call
11242         set_gdbarch_long_long_align_bit.
11243
11244 2018-04-30  Tom Tromey  <tom@tromey.com>
11245
11246         * rust-lang.c (rust_type_alignment): Remove.
11247         (rust_composite_type): Use type_align.
11248
11249 2018-04-30  Tom Tromey  <tom@tromey.com>
11250
11251         * NEWS: Mention Type.align.
11252         * python/py-type.c (typy_get_alignof): New function.
11253         (type_object_getset): Add "alignof".
11254
11255 2018-04-30  Tom Tromey  <tom@tromey.com>
11256
11257         PR exp/17095:
11258         * NEWS: Update.
11259         * std-operator.def (UNOP_ALIGNOF): New operator.
11260         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11261         New.
11262         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11263         * c-lang.c (c_op_print_tab): Add alignof.
11264         * c-exp.y (ALIGNOF): New token.
11265         (exp): Add "ALIGNOF" production.
11266         (ident_tokens): Add _Alignof and alignof.
11267
11268 2018-04-30  Tom Tromey  <tom@tromey.com>
11269
11270         * i386-tdep.c (i386_type_align): New function.
11271         (i386_gdbarch_init): Update.
11272         * gdbarch.sh (type_align): New method.
11273         * gdbarch.c, gdbarch.h: Rebuild.
11274         * arch-utils.h (default_type_align): Declare.
11275         * arch-utils.c (default_type_align): New function.
11276         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11277         (struct type) <align_log2>: New field.
11278         <instance_flags>: Now a bitfield.
11279         (TYPE_RAW_ALIGN): New macro.
11280         (type_align, type_raw_align, set_type_align): Declare.
11281         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11282         functions.
11283         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11284         (get_alignment, maybe_set_alignment): New functions.
11285         (read_structure_type, read_enumeration_type, read_array_type)
11286         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11287         (read_subrange_type, read_base_type): Set type alignment.
11288
11289 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11290
11291         * dwarf2read.c (read_index_from_section): Use bool.
11292
11293 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11294
11295         PR gdb/22950
11296         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11297         with #ifdef.
11298
11299 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11300
11301         PR build/22873
11302         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11303         last step, and do it atomically.
11304
11305 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11306
11307         * compile/compile-c-types.c (convert_int, convert_float):
11308         Update for C FE v1.
11309
11310 2018-04-27  Tom Tromey  <tom@tromey.com>
11311
11312         PR rust/22545:
11313         * rust-lang.c (rust_inclusive_range_type_p): New function.
11314         (rust_range): Handle inclusive ranges.
11315         (rust_compute_range): Likewise.
11316         * rust-exp.y (struct rust_op) <inclusive>: New field.
11317         (DOTDOTEQ): New constant.
11318         (range_expr): Add "..=" productions.
11319         (operator_tokens): Add "..=" token.
11320         (ast_range): Add "inclusive" parameter.
11321         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11322         ranges.
11323         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11324         bounds values.
11325         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11326         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11327         Update comments.
11328         * expprint.c (print_subexp_standard): Handle new bounds values.
11329         (dump_subexp_body_standard): Likewise.
11330
11331 2018-04-27  Tom Tromey  <tom@tromey.com>
11332
11333         * configure: Rebuild.
11334         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11335         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11336         "OVERRIDE".
11337         (class symbol_needs_eval_context): Likewise.
11338         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11339         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11340         "virtual".
11341         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11342         "override".
11343         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11344         * aarch64-tdep.c (instruction_reader::read): Use "override".
11345         (instruction_reader_test::read): Likewise.
11346         * arm-tdep.c (instruction_reader::read): Use "override".
11347         (instruction_reader_thumb::read): Likewise.
11348
11349 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11350
11351         PR remote/9665
11352         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11353         instead of remote_send.
11354         (remote_send): Remove.
11355
11356 2018-04-26  Pedro Alves  <palves@redhat.com>
11357
11358         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11359         find_function_start_sal instead of find_pc_line.
11360
11361 2018-04-26  Pedro Alves  <palves@redhat.com>
11362
11363         * breakpoint.c (set_breakpoint_location_function): Handle
11364         mst_data_gnu_ifunc.
11365         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11366         * elfread.c (elf_symtab_read): Give data symbols with
11367         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11368         (elf_rel_plt_read): Update comment.
11369         * linespec.c (convert_linespec_to_sals): Handle
11370         mst_data_gnu_ifunc.
11371         (minsym_found): Handle mst_data_gnu_ifunc.
11372         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11373         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11374         * parse.c (find_minsym_type_and_address): Handle
11375         mst_data_gnu_ifunc.
11376         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11377         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11378         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11379         comment.
11380         <mst_data_gnu_ifunc>: New enumerator.
11381
11382 2018-04-26  Pedro Alves  <palves@redhat.com>
11383
11384         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11385         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11386         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11387         Handle it.
11388         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11389         (lookup_minimal_symbol_by_pc): Adjust.
11390         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11391         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11392         * minsyms.h (lookup_msym_prefer): New enum.
11393         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11394         parameter by a lookup_msym_prefer parameter.
11395
11396 2018-04-26  Pedro Alves  <palves@redhat.com>
11397
11398         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11399         ends in "@plt" instead of looking at the symbol's section.
11400
11401 2018-04-26  Pedro Alves  <palves@redhat.com>
11402
11403         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11404         all references.
11405         (find_pc_partial_function_gnu_ifunc): Rename to ...
11406         (find_pc_partial_function): ... this, and remove references to
11407         'is_gnu_ifunc_p'.
11408         (find_pc_partial_function): Delete old implementation.
11409         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11410
11411 2018-04-26  Pedro Alves  <palves@redhat.com>
11412
11413         * linespec.c (struct bound_minimal_symbol_search_key): New.
11414         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11415         skip first line if we found a GNU ifunc minimal symbol by name.
11416         (compare_msymbols): Change parameters to work with a destructured
11417         lhs minsym.
11418         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11419         functions.
11420
11421 2018-04-26  Pedro Alves  <palves@redhat.com>
11422
11423         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11424         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11425         address/name.
11426         (add_location_to_breakpoint): Store the minsym and the objfile in
11427         the breakpoint location.
11428         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11429         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11430         Record the minsym in the sal.
11431         * symtab.h (symtab_and_line) <msymbol>: New field.
11432
11433 2018-04-26  Pedro Alves  <palves@redhat.com>
11434
11435         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11436         unless we actually resolved the ifunc.
11437
11438 2018-04-26  Pedro Alves  <palves@redhat.com>
11439
11440         * c-exp.y (variable production): Prefer ifunc minsyms over
11441         regular function symbols.
11442         * symtab.c (find_gnu_ifunc): New function.
11443         * minsyms.h (lookup_msym_prefer): New enum.
11444         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11445         parameter by a lookup_msym_prefer parameter.
11446         * symtab.h (find_gnu_ifunc): New declaration.
11447
11448 2018-04-26  Pedro Alves  <palves@redhat.com>
11449
11450         * blockframe.c (find_gnu_ifunc_target_type): New function.
11451         (find_function_type): New.
11452         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11453         return a value with a memory address.
11454         (eval_call): For calls to GNU ifunc functions, try to find the
11455         type of the target function from the type that the resolver
11456         returns.
11457         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11458         symbols.
11459         * infcall.c (find_function_return_type): Delete.
11460         (find_function_addr): Add 'function_type' parameter.  For calls to
11461         GNU ifunc functions, try to find the type of the target function
11462         from the type that the resolver returns, and return it via
11463         FUNCTION_TYPE.
11464         (call_function_by_hand_dummy): Adjust to use the function type
11465         returned by find_function_addr.
11466         (find_function_addr): Add 'function_type' parameter and move
11467         description here.
11468         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11469         declarations.
11470
11471 2018-04-26  Pedro Alves  <palves@redhat.com>
11472
11473         * c-exp.y (variable production): Skip finding an alias for ifunc
11474         symbols.
11475
11476 2018-04-26  Pedro Alves  <palves@redhat.com>
11477
11478         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11479
11480 2018-04-25  Pedro Alves  <palves@redhat.com>
11481
11482         * infcmd.c (kill_command): Print the pid as string, not the whole
11483         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11484         message.
11485         * remote.c (remote_detach_1): Print the pid as string, not the
11486         whole thread's ptid.
11487
11488 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11489             Sergio Durigan Junior  <sergiodj@redhat.com>
11490             Pedro Alves  <palves@redhat.com>
11491
11492         * infcmd.c (kill_command): Print message when inferior has
11493         been killed.
11494         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11495         '1'.
11496         (add_inferior): Improve message printed when
11497         'print_inferior_events' is on.
11498         (exit_inferior): Remove message printed when
11499         'print_inferior_events' is on.
11500         (detach_inferior): Improve message printed when
11501         'print_inferior_events' is on.
11502         (initialize_inferiors): Use 'add_inferior_silent' to set
11503         'current_inferior_'.
11504         * inferior.h (print_inferior_events): Declare here as
11505         'extern'.
11506         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11507         '[Detaching...]' messages when 'print_inferior_events' is on.
11508         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11509         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11510         'Detaching after fork from child...', replace it by '... from
11511         parent...'.
11512         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11513         prefix/suffix when printing 'Detaching...' messages.  Print
11514         them when 'print_inferior_events' is on.
11515         * remote.c (remote_detach_1): Print message when detaching
11516         from inferior and '!is_fork_parent'.
11517
11518 2018-04-24  Tom Tromey  <tom@tromey.com>
11519
11520         * cli-out.h: Reindent.
11521
11522 2018-04-24  Tom Tromey  <tom@tromey.com>
11523
11524         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11525         (cli_ui_out::do_field_string): Use fputs_filtered.
11526         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11527
11528 2018-04-23  Tom Tromey  <tom@tromey.com>
11529
11530         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11531         gdb::unique_xmalloc_ptr.
11532
11533 2018-04-23  Tom Tromey  <tom@tromey.com>
11534
11535         * configure: Rebuild.
11536
11537 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11538
11539         PR gdb/23095
11540         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11541         prepare_for_testing.  Set normal_bp to r_debug_state if target
11542         is bsd.
11543
11544 2018-04-21  Pedro Alves  <palves@redhat.com>
11545             Rajendra SY  <rajendra.sy@gmail.com>
11546
11547         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11548         * remote.c (extended_remote_attach): In all-stop mode, mark the
11549         thread as executing.
11550
11551 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11552
11553         * thread.c (thread_apply_all_command): Fix comment.
11554         (thread_command): Fix comment.
11555
11556 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11557
11558         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11559         parameter.
11560         * features/aarch64-core.c (create_feature_aarch64_core):
11561         Regenerate.
11562         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11563         Likewise.
11564         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11565         Likewise.
11566         * features/i386/32bit-avx512.c
11567         (create_feature_i386_32bit_avx512): Likewise.
11568         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11569         Likewise.
11570         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11571         Likewise.
11572         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11573         Likewise.
11574         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11575         Likewise.
11576         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11577         Likewise.
11578         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11579         Likewise.
11580         * features/i386/64bit-avx512.c
11581         (create_feature_i386_64bit_avx512): Likewise.
11582         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11583         Likewise.
11584         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11585         Likewise.
11586         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11587         Likewise.
11588         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11589         Likewise.
11590         * features/i386/64bit-segments.c
11591         (create_feature_i386_64bit_segments): Likewise.
11592         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11593         Likewise.
11594         * features/i386/x32-core.c
11595         (create_feature_i386_x32_core): Likewise.
11596         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11597         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11598         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11599         * target-descriptions.c: In generated code, don't pass xml
11600         filename.
11601
11602 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11603
11604         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11605         (print_xml_feature::visit_post): Likewise.
11606         (print_xml_feature::visit): Likewise.
11607         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11608         (print_xml_feature): Add new class.
11609         * regformats/regdat.sh: Null xmltarget on feature targets.
11610         * target-descriptions.c (struct target_desc): Add xmltarget.
11611         (maintenance_check_tdesc_xml_convert): Add unittest function.
11612         (tdesc_get_features_xml): Add function to get xml.
11613         (maintenance_check_xml_descriptions): Test xml generation.
11614         * xml-tdesc.c (string_read_description_xml): Add function.
11615         * xml-tdesc.h (string_read_description_xml): Add declaration.
11616
11617 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11618
11619         * features/Makefile: Add feature marker to targets with new style
11620         target descriptions.
11621         * regformats/aarch64.dat: Regenerate.
11622         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11623         * regformats/i386/amd64-avx-linux.dat: Likewise.
11624         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11625         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11626         * regformats/i386/amd64-linux.dat: Likewise.
11627         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11628         * regformats/i386/amd64.dat: Likewise.
11629         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11630         * regformats/i386/i386-avx-linux.dat: Likewise.
11631         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11632         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11633         * regformats/i386/i386-linux.dat: Likewise.
11634         * regformats/i386/i386-mmx-linux.dat: Likewise.
11635         * regformats/i386/i386-mpx-linux.dat: Likewise.
11636         * regformats/i386/i386.dat: Likewise.
11637         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11638         * regformats/i386/x32-avx-linux.dat: Likewise.
11639         * regformats/i386/x32-linux.dat: Likewise.
11640         * regformats/tic6x-c62x-linux.dat: Likewise.
11641         * regformats/tic6x-c64x-linux.dat: Likewise.
11642         * regformats/tic6x-c64xp-linux.dat: Likewise.
11643         * regformats/regdat.sh: Parse feature marker.
11644
11645 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11646
11647         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11648         (tdesc_osabi_name): Likewise.
11649         * target-descriptions.c (tdesc_architecture_name): Add new
11650         function.
11651         (tdesc_osabi_name): Likewise.
11652
11653 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11654
11655         * common/tdesc.c (tdesc_predefined_type): Move to here.
11656         (tdesc_named_type): Likewise.
11657         (tdesc_create_vector): Likewise.
11658         (tdesc_create_struct): Likewise.
11659         (tdesc_set_struct_size): Likewise.
11660         (tdesc_create_union): Likewise.
11661         (tdesc_create_flags): Likewise.
11662         (tdesc_create_enum): Likewise.
11663         (tdesc_add_field): Likewise.
11664         (tdesc_add_typed_bitfield): Likewise.
11665         (tdesc_add_bitfield): Likewise.
11666         (tdesc_add_flag): Likewise.
11667         (tdesc_add_enum_value): Likewise.
11668         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11669         (struct tdesc_type_vector): Likewise.
11670         (struct tdesc_type_field): Likewise.
11671         (struct tdesc_type_with_fields): Likewise.
11672         (tdesc_create_enum): Add declaration.
11673         (tdesc_add_typed_bitfield): Likewise.
11674         (tdesc_add_enum_value): Likewise.
11675         * target-descriptions.c (tdesc_type_field): Move from here.
11676         (tdesc_type_builtin): Likewise.
11677         (tdesc_type_vector): Likewise.
11678         (tdesc_type_with_fields): Likewise.
11679         (tdesc_predefined_types): Likewise.
11680         (tdesc_named_type): Likewise.
11681         (tdesc_create_vector): Likewise.
11682         (tdesc_create_struct): Likewise.
11683         (tdesc_set_struct_size): Likewise.
11684         (tdesc_create_union): Likewise.
11685         (tdesc_create_flags): Likewise.
11686         (tdesc_create_enum): Likewise.
11687         (tdesc_add_field): Likewise.
11688         (tdesc_add_typed_bitfield): Likewise.
11689         (tdesc_add_bitfield): Likewise.
11690         (tdesc_add_flag): Likewise.
11691         (tdesc_add_enum_value): Likewise.
11692         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11693         (tdesc_add_typed_bitfield): Likewise.
11694         (tdesc_add_enum_value): Likewise.
11695
11696 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11697
11698         * common/tdesc.c (tdesc_feature::accept): Move to here.
11699         (tdesc_feature::operator==): Likewise.
11700         (tdesc_create_reg): Likewise.
11701         * common/tdesc.h (tdesc_type_kind): Likewise.
11702         (struct tdesc_type): Likewise.
11703         (struct tdesc_feature): Likewise.
11704         * regformats/regdat.sh: Create a feature.
11705         * target-descriptions.c (tdesc_type_kind): Move from here.
11706         (tdesc_type): Likewise.
11707         (tdesc_type_up): Likewise.
11708         (tdesc_feature): Likewise.
11709         (tdesc_create_reg): Likewise.
11710
11711 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11712
11713         * Makefile.in: Add arch/tdesc.c
11714         * common/tdesc.c: New file.
11715         * common/tdesc.h (tdesc_element_visitor): Move to here.
11716         (tdesc_element): Likewise.
11717         (tdesc_reg): Likewise.
11718         (tdesc_reg_up): Likewise.
11719         * regformats/regdef.h (reg): Add offset to constructors.
11720         * target-descriptions.c (tdesc_element_visitor): Move from here.
11721         (tdesc_element): Likewise.
11722         (tdesc_reg): Likewise.
11723         (tdesc_reg_up): Likewise.
11724
11725 2018-04-17  Tom Tromey  <tom@tromey.com>
11726
11727         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11728         discriminant field.
11729
11730 2018-04-17  Tom Tromey  <tom@tromey.com>
11731
11732         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11733
11734 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11735
11736         * symtab.c (print_symbol_info): Skip printing filename and line
11737         number when `last' is NULL.
11738         (symtab_symbol_info): Use empty string instead of NULL for first
11739         invocation of print_symbol_info.
11740         (rbreak_command): Pass NULL to `last' parameter of
11741         print_symbol_info.
11742
11743 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11744
11745         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11746         instead of nullptr.
11747
11748 2018-04-16  Pedro Alves  <palves@redhat.com>
11749
11750         * MAINTAINERS (sh): Remove.
11751         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11752         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11753         (ALLDEPFILES): Remove sh64-tdep.c.
11754         * NEWS: Mentions that support for SH-5/SH64 is removed.
11755         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11756         (sh*-*-openbsd*): Ditto.
11757         (sh64-*-elf*): Remove.
11758         (sh*): Remove.
11759         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11760         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11761         * sh-tdep.c: No longer include "sh64-tdep.h".
11762         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11763         * sh64-tdep.c, sh64-tdep.h: Remove files.
11764
11765 2018-04-16  Pedro Alves  <palves@redhat.com>
11766
11767         * MAINTAINERS: Remove m88k.
11768         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11769         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11770         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11771         * NEWS: Mention that support for m88k was removed.
11772         * configure.host (m88*-*-*): Remove support.
11773         * configure.nat (m88k-*-*): Remove support.
11774         * configure.tgt (m88*-*-openbsd*): Remove.
11775         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11776
11777 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11778
11779         * configure.tgt (x86_tobjs): New variable.
11780         (amd64_tobjs, i386_tobjs): Use it.
11781
11782 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11783
11784         * symtab.c (print_symbol_info): Precede the symbol definition by
11785         the line number when available.
11786         * NEWS: Advertise this enhancement.
11787
11788 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11789
11790         * NEWS (New options): announce set/show record btrace cpu.
11791         * btrace.c: Include record-btrace.h.
11792         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11793         the vendor is unknown.
11794         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11795         Maybe overwrite the btrace configuration's cpu.
11796         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11797         (btrace_fetch): Add cpu parameter.  Update callers.
11798         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11799         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11800         errata workarounds if the vendor is unknown.
11801         * python/py-record-btrace.c: Include record-btrace.h.
11802         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11803         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11804         * record-btrace.c (record_btrace_cpu_state_kind): New.
11805         (record_btrace_cpu): New.
11806         (set_record_btrace_cpu_cmdlist): New.
11807         (record_btrace_get_cpu): New.
11808         (require_btrace_thread, record_btrace_info)
11809         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11810         (cmd_set_record_btrace_cpu_none): New.
11811         (cmd_set_record_btrace_cpu_auto): New.
11812         (cmd_set_record_btrace_cpu): New.
11813         (cmd_show_record_btrace_cpu): New.
11814         (_initialize_record_btrace): Initialize set/show record btrace cpu
11815         commands.
11816         * record-btrace.h (record_btrace_get_cpu): New.
11817
11818 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11819
11820         * record.c (set_record_command): Fix typo in message.
11821
11822 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11823
11824         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11825
11826 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11827
11828         * infrun.c (process_event_stop_test): Call
11829         gdbarch_in_indirect_branch_thunk.
11830         * gdbarch.sh (in_indirect_branch_thunk): New.
11831         * gdbarch.c: Regenerated.
11832         * gdbarch.h: Regenerated.
11833         * x86-tdep.h: New.
11834         * x86-tdep.c: New.
11835         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11836         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11837         (ALLDEPFILES): Add x86-tdep.c.
11838         * arch-utils.h (default_in_indirect_branch_thunk): New.
11839         * arch-utils.c (default_in_indirect_branch_thunk): New.
11840         * i386-tdep: Include x86-tdep.h.
11841         (i386_in_indirect_branch_thunk): New.
11842         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11843         function.
11844         * amd64-tdep: Include x86-tdep.h.
11845         (amd64_in_indirect_branch_thunk): New.
11846         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11847
11848 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11849
11850         PR gdb/23053
11851         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11852         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11853         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11854         regression.
11855
11856 2018-04-12  Tom Tromey  <tom@tromey.com>
11857
11858         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11859         (rust_evaluate_subexp): Likewise.
11860
11861 2018-04-12  Pedro Alves  <palves@redhat.com>
11862
11863         * procfs.c (procfs_detach): Make forward declaration's prototype
11864         match definition's protototype.
11865         (proc_get_LDT_entry): Remove stale do_cleanups call.
11866
11867 2018-04-12  Pedro Alves  <palves@redhat.com>
11868
11869         * target.h (target_ops::to_has_exited): Delete.
11870         (target_has_exited): Delete.
11871         * target-delegates.c: Regenerate.
11872
11873 2018-04-11  Pedro Alves  <palves@redhat.com>
11874
11875         * target.c (fileio_fh_t::t): Add comment.
11876         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11877         (target_fileio_close): Handle a NULL target.
11878         (invalidate_fileio_fh): New.
11879         (target_close): Call it.
11880         * remote.c (remote_hostio_send_command): No longer check whether
11881         remote_desc is open.
11882
11883 2018-04-11  Pedro Alves  <palves@redhat.com>
11884
11885         * target.c (fileio_fh_t): Make it a named struct instead of a
11886         typedef.
11887         (fileio_fh_t::is_closed): New method.
11888         (DEF_VEC_O (fileio_fh_t)): Remove.
11889         (fileio_fhandles): Now a std::vector.
11890         (is_closed_fileio_fh): Delete.
11891         (acquire_fileio_fd): Adjust.  Rename parameters.
11892         (release_fileio_fd): Adjust.
11893         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11894         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11895         (target_fileio_close): Adjust.
11896
11897 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11898
11899         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11900         index.
11901
11902 2018-04-10  Pedro Alves  <palves@redhat.com>
11903
11904         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11905         (scoped_finish_thread_state): New class.
11906         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11907         cleanup.
11908         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11909         (fetch_inferior_event, normal_stop): Likewise.
11910         * thread.c (finish_thread_state_cleanup): Delete.
11911
11912 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11913             Pedro Alves  <palves@redhat.com>
11914
11915         * value.c: Include "selftest.h" and "common/array-view.h".
11916         (struct range) <operator ==>: New.
11917         (test_ranges_contain): New.
11918         (check_ranges_vector): New.
11919         (test_insert_into_bit_range_vector): New.
11920         (_initialize_values): Register selftests.
11921         * common/array-view.h (operator==, operator!=): New.
11922
11923 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11924
11925         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11926         an iterator.
11927         * inline-frame.c: Include <algorithm>.
11928         (struct inline_state): Add constructor.
11929         (inline_state_s): Remove.
11930         (DEF_VEC_O(inline_state_s)): Remove.
11931         (inline_states): Change type to std::vector.
11932         (find_inline_frame_state): Adjust to std::vector.
11933         (allocate_inline_frame_state): Remove.
11934         (clear_inline_frame_state): Adjust to std::vector.
11935         (skip_inline_frames): Adjust to std::vector.
11936
11937 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11938
11939         * tracepoint.h (struct trace_state_variable): Add constructor.
11940         <name>: Change type to std::string.
11941         * tracepoint.c (tsv_s): Remove.
11942         (DEF_VEC_O(tsv_s)): Remove.
11943         (tvariables): Change to std::vector.
11944         (create_trace_state_variable): Adjust to std::vector.
11945         (find_trace_state_variable): Likewise.
11946         (find_trace_state_variable_by_number): Likewise.
11947         (delete_trace_state_variable): Likewise.
11948         (trace_variable_command): Adjust to std::string.
11949         (delete_trace_variable_command): Likewise.
11950         (tvariables_info_1): Adjust to std::vector.
11951         (save_trace_state_variables): Likewise.
11952         (start_tracing): Likewise.
11953         (merge_uploaded_trace_state_variables): Adjust to std::vector
11954         and std::string.
11955         * target.h (struct target_ops)
11956         <to_download_trace_state_variable>: Pass reference to
11957         trace_state_variable.
11958         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11959         * target-delegates.c: Re-generate.
11960         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11961         (mi_tsv_deleted): Likewise.
11962         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11963         * remote.c (remote_download_trace_state_variable): Change
11964         pointer to reference and adjust.
11965         * make-target-delegates (parse_argtypes): Handle references.
11966         (write_function_header): Likewise.
11967         (munge_type): Likewise.
11968
11969 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11970
11971         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11972         string_view-selftests.c.
11973         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11974         testsuite.
11975         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11976         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11977         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11978         * unittests/basic_string_view/element_access/char/1.cc:
11979         Likewise.
11980         * unittests/basic_string_view/element_access/char/empty.cc:
11981         Likewise.
11982         * unittests/basic_string_view/element_access/char/front_back.cc:
11983         Likewise.
11984         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11985         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11986         Likewise.
11987         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11988         Likewise.
11989         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11990         Likewise.
11991         * unittests/basic_string_view/operations/compare/char/1.cc:
11992         Likewise.
11993         * unittests/basic_string_view/operations/compare/char/13650.cc:
11994         Likewise.
11995         * unittests/basic_string_view/operations/copy/char/1.cc:
11996         Likewise.
11997         * unittests/basic_string_view/operations/data/char/1.cc:
11998         Likewise.
11999         * unittests/basic_string_view/operations/find/char/1.cc:
12000         Likewise.
12001         * unittests/basic_string_view/operations/find/char/2.cc:
12002         Likewise.
12003         * unittests/basic_string_view/operations/find/char/3.cc:
12004         Likewise.
12005         * unittests/basic_string_view/operations/find/char/4.cc:
12006         Likewise.
12007         * unittests/basic_string_view/operations/rfind/char/1.cc:
12008         Likewise.
12009         * unittests/basic_string_view/operations/rfind/char/2.cc:
12010         Likewise.
12011         * unittests/basic_string_view/operations/rfind/char/3.cc:
12012         Likewise.
12013         * unittests/basic_string_view/operations/substr/char/1.cc:
12014         Likewise.
12015         * unittests/basic_string_view/operators/char/2.cc: Likewise.
12016         * unittests/string_view-selftests.c: New file.
12017
12018 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12019
12020         * unittests/basic_string_view/capacity/1.cc: New file.
12021         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
12022         * unittests/basic_string_view/cons/char/1.cc: New file.
12023         * unittests/basic_string_view/cons/char/2.cc: New file.
12024         * unittests/basic_string_view/cons/char/3.cc: New file.
12025         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
12026         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
12027         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
12028         * unittests/basic_string_view/element_access/char/1.cc: New file.
12029         * unittests/basic_string_view/element_access/char/2.cc: New file.
12030         * unittests/basic_string_view/element_access/char/empty.cc: New file.
12031         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
12032         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
12033         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
12034         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
12035         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
12036         * unittests/basic_string_view/include.cc: New file.
12037         * unittests/basic_string_view/inserters/char/1.cc: New file.
12038         * unittests/basic_string_view/inserters/char/2.cc: New file.
12039         * unittests/basic_string_view/inserters/char/3.cc: New file.
12040         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
12041         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
12042         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
12043         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
12044         * unittests/basic_string_view/literals/types.cc: New file.
12045         * unittests/basic_string_view/literals/values.cc: New file.
12046         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
12047         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
12048         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
12049         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
12050         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
12051         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
12052         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
12053         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
12054         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
12055         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
12056         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
12057         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
12058         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
12059         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
12060         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
12061         * unittests/basic_string_view/operations/data/char/1.cc: New file.
12062         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
12063         * unittests/basic_string_view/operations/find/char/1.cc: New file.
12064         * unittests/basic_string_view/operations/find/char/2.cc: New file.
12065         * unittests/basic_string_view/operations/find/char/3.cc: New file.
12066         * unittests/basic_string_view/operations/find/char/4.cc: New file.
12067         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
12068         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
12069         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
12070         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
12071         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
12072         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
12073         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
12074         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
12075         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
12076         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
12077         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
12078         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
12079         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
12080         * unittests/basic_string_view/operators/char/2.cc: New file.
12081         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
12082         * unittests/basic_string_view/range_access/char/1.cc: New file.
12083         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
12084         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
12085         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
12086         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
12087         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
12088         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
12089         * unittests/basic_string_view/requirements/typedefs.cc: New file.
12090         * unittests/basic_string_view/typedefs.cc: New file.
12091         * unittests/basic_string_view/types/1.cc: New file.
12092
12093 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12094
12095         * common/gdb_string_view.h: Remove libstdc++ implementation
12096         details, adjust to gdb reality.
12097         * common/gdb_string_view.tcc: Likewise.
12098         * cli/cli-script.c (struct string_view): Remove.
12099         (user_args) <m_args>: Change element type to gdb::string_view.
12100         (user_args::insert_args): Adjust.
12101
12102 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12103
12104         * common/gdb_string_view.h: New file.
12105         * common/gdb_string_view.tcc: New file.
12106
12107 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12108
12109         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
12110         * configure: Re-generate.
12111
12112 2018-04-09  Pedro Alves  <palves@redhat.com>
12113
12114         * gdbarch.sh: Include "observable.h" instead of "observer.h".
12115         (set_target_gdbarch): Call
12116         gdb::observers::architecture_changed.notify instead of
12117         observer_notify_architecture_changed.
12118
12119 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12120
12121         * tracepoint.c (struct current_traceframe_cleanup): Remove.
12122         (do_restore_current_traceframe_cleanup): Remove.
12123         (restore_current_traceframe_cleanup_dtor): Remove.
12124         (make_cleanup_restore_current_traceframe): Remove.
12125         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
12126         New.
12127         * tracepoint.h (struct scoped_restore_current_traceframe): New.
12128         * infrun.c (fetch_inferior_event): Use
12129         scoped_restore_current_traceframe.
12130
12131 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12132
12133         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
12134         Remove.
12135         <n_allocated_type_units>: Remove.
12136         <all_type_units>: Change to std::vector.
12137         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12138         to std::vector change.
12139         (dwarf2_per_objfile::get_cutu): Likewise.
12140         (dwarf2_per_objfile::get_tu): Likewise.
12141         (create_signatured_type_table_from_index): Likewise.
12142         (create_signatured_type_table_from_debug_names): Likewise.
12143         (dw2_symtab_iter_next): Likewise.
12144         (dw2_print_stats): Likewise.
12145         (dw2_expand_all_symtabs): Likewise.
12146         (dw2_expand_marked_cus): Likewise.
12147         (dw2_debug_names_iterator::next): Likewise.
12148         (dwarf2_initialize_objfile): Likewise.
12149         (add_signatured_type_cu_to_table): Likewise.
12150         (create_all_type_units): Likewise.
12151         (add_type_unit): Likewise.
12152         (struct tu_abbrev_offset): Add constructor.
12153         (build_type_psymtabs_1): Adjust to std::vector change.
12154         (print_tu_stats): Likewise.
12155         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12156         (write_debug_names): Likewise.
12157
12158 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12159
12160         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
12161         Make an std::vector.
12162         <n_comp_units>: Remove.
12163         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
12164         to std::vector change.
12165         (dwarf2_per_objfile::get_cutu): Likewise.
12166         (dwarf2_per_objfile::get_cu): Likewise.
12167         (create_cus_from_index): Likewise.
12168         (create_addrmap_from_index): Likewise.
12169         (create_addrmap_from_aranges): Likewise.
12170         (dwarf2_read_index): Likewise.
12171         (dw2_find_last_source_symtab): Likewise.
12172         (dw2_map_symtabs_matching_filename): Likewise.
12173         (dw2_symtab_iter_next): Likewise.
12174         (dw2_print_stats): Likewise.
12175         (dw2_expand_all_symtabs): Likewise.
12176         (dw2_expand_symtabs_with_fullname): Likewise.
12177         (dw2_expand_marked_cus): Likewise.
12178         (dw2_map_symbol_filenames): Likewise.
12179         (create_cus_from_debug_names): Likewise.
12180         (dwarf2_read_debug_names): Likewise.
12181         (dw2_debug_names_iterator::next): Likewise.
12182         (dwarf2_initialize_objfile): Likewise.
12183         (set_partial_user): Likewise.
12184         (dwarf2_build_psymtabs_hard): Likewise.
12185         (read_comp_units_from_section): Remove arguments, adjust to
12186         std::vector change.
12187         (create_all_comp_units): Adjust to std::vector and
12188         read_comp_units_from_section changes.
12189         (dwarf2_find_containing_comp_unit): Adjust to std::vector
12190         change.
12191         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
12192         (psyms_seen_size): Likewise.
12193         (write_gdbindex): Likewise.
12194         (write_debug_names): Likewise.
12195
12196 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12197
12198         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
12199         with dwarf2_per_objfile.
12200         (create_cus_from_index): Likewise.
12201         (create_signatured_type_table_from_index): Likewise.
12202         (dwarf2_read_index): Likewise.
12203         (dwarf2_initialize_objfile): Likewise.
12204         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
12205         per_cu rather than get_dwarf2_per_objfile.
12206
12207 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12208
12209         * dwarf2read.h (struct signatured_type): Forward declare.
12210         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12211         New methods.
12212         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12213         (dw2_get_cutu): ...this.
12214         (dwarf2_per_objfile::get_cu): Rename from...
12215         (dw2_get_cu): ...this.
12216         (dwarf2_per_objfile::get_tu): New.
12217         (create_addrmap_from_index): Adjust.
12218         (create_addrmap_from_aranges): Adjust.
12219         (dw2_find_last_source_symtab): Adjust.
12220         (dw2_map_symtabs_matching_filename): Adjust.
12221         (dw2_symtab_iter_next): Adjust.
12222         (dw2_print_stats): Adjust.
12223         (dw2_expand_all_symtabs): Adjust.
12224         (dw2_expand_symtabs_with_fullname): Adjust.
12225         (dw2_expand_marked_cus): Adjust.
12226         (dw_expand_symtabs_matching_file_matcher): Adjust.
12227         (dw2_map_symbol_filenames): Adjust.
12228         (dw2_debug_names_iterator::next): Adjust.
12229         (dwarf2_initialize_objfile): Adjust.
12230         (set_partial_user): Adjust.
12231         (dwarf2_build_psymtabs_hard): Adjust.
12232
12233 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12234
12235         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12236         Remove unused variables.
12237         (dw2_map_symtabs_matching_filename): Likewise.
12238         (dwarf2_record_block_ranges): Likewise.
12239         (dwarf2_read_addr_index): Likewise.
12240         (follow_die_offset): Likewise.
12241
12242 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12243
12244         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12245         to symbol_file_add_main.
12246
12247 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12248
12249         PR mi/22299
12250         * mi/mi-console.c (do_fputc_async_safe): New.
12251         (mi_console_file::write_async_safe): New.
12252         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12253         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12254         New.
12255         * ui-file.c (ui_file::putstrn): Adjust call to
12256         fputstrn_unfiltered.
12257         * utils.c (printchar): Replace do_fputs and do_fprintf
12258         parameters by do_fputc.
12259         (fputstr_filtered): Adjust call to printchar.
12260         (fputstr_unfiltered): Likewise.
12261         (fputstrn_filtered): Likewise.
12262         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12263         printchar.
12264         * utils.h (do_fputc_ftype): New typedef.
12265         (fputstrn_unfiltered): Add do_fputc parameter.
12266
12267 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12268
12269         * regformats/i386/i386-avx.dat: Remove.
12270
12271 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12272
12273         PR gdb/22979
12274         * amd64-tdep.c (amd64_none_init_abi): New function.
12275         (amd64_x32_none_init_abi): New function.
12276         (_initialize_amd64_tdep): Register handlers for x86-64 and
12277         x64_32 with GDB_OSABI_NONE.
12278         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12279         GDB_OSABI_NONE osabi.
12280
12281 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12282
12283         PR gdb/22980
12284         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12285         GDB_OSABI_NONE.
12286         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12287         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12288
12289 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12290
12291         * common/byte-vector.h (char_vector): New type.
12292         * target.h (target_read_alloc): Return
12293         gdb::optional<byte_vector>.
12294         (target_read_stralloc): Return gdb::optional<char_vector>.
12295         (target_get_osdata): Return gdb::optional<char_vector>.
12296         * target.c (target_read_alloc_1): Templatize.  Replacement
12297         manual memory management with vector.
12298         (target_read_alloc): Change return type, adjust.
12299         (target_read_stralloc): Change return type, adjust.
12300         (target_get_osdata): Change return type, adjust.
12301         * auxv.c (struct auxv_info) <length>: Remove.
12302         <data>: Change type to gdb::optional<byte_vector>.
12303         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12304         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12305         (target_auxv_search): Adjust.
12306         (fprint_target_auxv): Adjust.
12307         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12308         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12309         (linux_make_corefile_notes): Adjust.
12310         * osdata.c (get_osdata): Adjust.
12311         * remote.c (remote_get_threads_with_qxfer): Adjust.
12312         (remote_memory_map): Adjust.
12313         (remote_traceframe_info): Adjust.
12314         (btrace_read_config): Adjust.
12315         (remote_read_btrace): Adjust.
12316         (remote_pid_to_exec_file): Adjust.
12317         * solib-aix.c (solib_aix_get_library_list): Adjust.
12318         * solib-dsbt.c (decode_loadmap): Don't free buf.
12319         (dsbt_get_initial_loadmaps): Adjust.
12320         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12321         * solib-target.c (solib_target_current_sos): Adjust.
12322         * tracepoint.c (sdata_make_value): Adjust.
12323         * xml-support.c (xinclude_start_include): Adjust.
12324         (xml_fetch_content_from_file): Adjust.
12325         * xml-support.h (xml_fetch_another): Change return type.
12326         (xml_fetch_content_from_file): Change return type.
12327         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12328         * xml-tdesc.c (file_read_description_xml): Adjust.
12329         (fetch_available_features_from_target): Change return type.
12330         (target_fetch_description_xml): Adjust.
12331         (target_read_description_xml): Adjust.
12332
12333 2018-04-06  Tom Tromey  <tom@tromey.com>
12334
12335         * value.c (~value): Update.
12336         (struct value) <contents>: Now unique_xmalloc_ptr.
12337         (value_contents_bits_eq, allocate_value_contents)
12338         (value_contents_raw, value_contents_all_raw)
12339         (value_contents_for_printing, value_contents_for_printing_const)
12340         (set_value_enclosing_type): Update.
12341
12342 2018-04-06  Tom Tromey  <tom@tromey.com>
12343
12344         * value.c (range_s): Remove typedef, VEC.
12345         (struct range): Add operator<.
12346         (range_lessthan): Remove.
12347         (ranges_contain): Change type.
12348         (~value): Update.
12349         (struct value) <unavailable, optimized_out>: Now std::vector.
12350         (value_entirely_available)
12351         (value_entirely_covered_by_range_vector)
12352         (value_entirely_unavailable, value_entirely_optimized_out):
12353         Update.
12354         (insert_into_bit_range_vector): Change argument type.
12355         (find_first_range_overlap): Likewise.
12356         (struct ranges_and_idx, value_contents_bits_eq)
12357         (require_not_optimized_out, require_available): Update.
12358         (ranges_copy_adjusted): Change argument types.
12359         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12360
12361 2018-04-06  Tom Tromey  <tom@tromey.com>
12362
12363         * value.c (~value): Update.
12364         (struct value) <parent>: Now a value_ref_ptr.
12365         (value_parent, set_value_parent, value_address, value_copy):
12366         Update.
12367
12368 2018-04-06  Tom Tromey  <tom@tromey.com>
12369
12370         * value.c (struct value): Add constructor, destructor, and member
12371         initializers.
12372         (allocate_value_lazy, value_decref): Update.
12373
12374 2018-04-06  Tom Tromey  <tom@tromey.com>
12375
12376         * value.c (struct value) <released, next>: Remove.
12377         (all_values): Now a std::vector.
12378         (allocate_value_lazy): Update.
12379         (value_next): Remove.
12380         (value_mark, value_free_to_mark, release_value)
12381         (value_release_to_mark): Update.
12382
12383 2018-04-06  Tom Tromey  <tom@tromey.com>
12384
12385         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12386         (free_value_chain): Remove.
12387         * value.c (free_value_chain): Remove.
12388         (value_release_to_mark): Return a std::vector.
12389         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12390         std::vector.
12391         (check_condition): Update.
12392         * eval.c (fetch_subexp_value): Change "val_chain" to a
12393         std::vector.
12394         * breakpoint.c (update_watchpoint): Update.
12395         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12396
12397 2018-04-06  Tom Tromey  <tom@tromey.com>
12398
12399         * value.h (free_all_values): Remove.
12400         * value.c (free_all_values): Remove.
12401
12402 2018-04-06  Tom Tromey  <tom@tromey.com>
12403
12404         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12405         (value_history_chain, value_history_count): Remove.
12406         (value_history): New global.
12407         (record_latest_value, access_value_history, show_values)
12408         (preserve_values): Update.
12409
12410 2018-04-06  Tom Tromey  <tom@tromey.com>
12411
12412         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12413         * varobj.c (varobj_set_display_format, varobj_set_value)
12414         (install_default_visualizer, construct_visualizer)
12415         (install_new_value, ~varobj, varobj_get_value_type)
12416         (my_value_of_variable, varobj_editable_p): Update.
12417         * c-varobj.c (c_describe_child, c_value_of_variable)
12418         (cplus_number_of_children, cplus_describe_child): Update.
12419         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12420         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12421         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12422
12423 2018-04-06  Tom Tromey  <tom@tromey.com>
12424
12425         * printcmd.c (last_examine_address): Change type to
12426         value_ref_ptr.
12427         (do_examine, x_command): Update.
12428
12429 2018-04-06  Tom Tromey  <tom@tromey.com>
12430
12431         * value.c (release_value): Update.
12432         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12433         (struct bpstats) <val>: Now a value_ref_ptr.
12434         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12435         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12436         (~watchpoint, print_it_watchpoint, watch_command_1)
12437         (invalidate_bp_value_on_memory_change): Update.
12438
12439 2018-04-06  Tom Tromey  <tom@tromey.com>
12440
12441         * varobj.c (varobj_clear_saved_item)
12442         (update_dynamic_varobj_children, install_new_value, ~varobj):
12443         Update.
12444         * value.h (value_incref): Move declaration earlier.
12445         (value_decref): Rename from value_free.
12446         (struct value_ref_policy): New.
12447         (value_ref_ptr): New typedef.
12448         (struct value_deleter): Remove.
12449         (gdb_value_up): Remove typedef.
12450         (release_value): Change return type.
12451         (release_value_or_incref): Remove.
12452         * value.c (set_value_parent): Update.
12453         (value_incref): Change return type.
12454         (value_decref): Rename from value_free.
12455         (value_free_to_mark, free_all_values, free_value_chain): Update.
12456         (release_value): Return value_ref_ptr.
12457         (release_value_or_incref): Remove.
12458         (record_latest_value, set_internalvar, clear_internalvar):
12459         Update.
12460         * stack.c (info_frame_command): Don't call value_free.
12461         * python/py-value.c (valpy_dealloc, valpy_new)
12462         (value_to_value_object): Update.
12463         * printcmd.c (do_examine): Update.
12464         * opencl-lang.c (lval_func_free_closure): Update.
12465         * mi/mi-main.c (register_changed_p): Don't call value_free.
12466         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12467         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12468         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12469         value_free.
12470         * guile/scm-value.c (vlscm_free_value_smob)
12471         (vlscm_scm_from_value): Update.
12472         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12473         (frame_unwind_register_unsigned, get_frame_register_bytes)
12474         (put_frame_register_bytes): Don't call value_free.
12475         * findvar.c (address_from_register): Don't call value_free.
12476         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12477         * dwarf2loc.c (entry_data_value_free_closure)
12478         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12479         (dwarf2_evaluate_loc_desc_full): Update.
12480         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12481         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12482         (~watchpoint, watch_command_1)
12483         (invalidate_bp_value_on_memory_change): Update.
12484         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12485
12486 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12487
12488         PR gdb/23022
12489         * warning.m4: Add -Wno-error=deprecated-register.
12490         * configure: Re-generate.
12491
12492 2018-04-05  Tom Tromey  <tom@tromey.com>
12493
12494         * linespec.h: Remove include of "vec.h".
12495
12496 2018-04-05  Tom Tromey  <tom@tromey.com>
12497
12498         * linespec.c (typep): Remove typedef.
12499         (find_methods, find_superclass_methods): Take a std::vector.
12500         (find_method): Use std::vector.
12501
12502 2018-04-05  Tom Tromey  <tom@tromey.com>
12503
12504         * utils.c (compare_strings): Remove.
12505         * utils.h (compare_strings): Remove.
12506         * objc-lang.h (find_imps): Update.
12507         * objc-lang.c (find_methods): Take a std::vector.
12508         (uniquify_strings, find_imps): Likewise.
12509         * linespec.c (find_methods): Take a std::vector.
12510         (decode_objc): Use std::vector.
12511         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12512         a std::vector.
12513         (find_method, find_function_symbols): Use std::vector.
12514
12515 2018-04-05  Tom Tromey  <tom@tromey.com>
12516
12517         * completer.c (completion_tracker::completion_tracker): Remove
12518         cast.
12519         (completion_tracker::discard_completions): Likewise.
12520         * breakpoint.c (ambiguous_names_p): Remove cast.
12521         * ada-lang.c (_initialize_ada_language): Remove cast.
12522         * utils.h (streq): Update.
12523         (streq_hash): Add new declaration.
12524         * utils.c (streq): Return bool.
12525         (streq_hash): New function.
12526
12527 2018-04-05  Tom Tromey  <tom@tromey.com>
12528
12529         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12530         Remove a string copy.
12531
12532 2018-04-05  Tom Tromey  <tom@tromey.com>
12533
12534         * linespec.c (filter_results): Use std::vector.
12535         (decode_line_2, decode_line_full): Update.
12536
12537 2018-04-05  Tom Tromey  <tom@tromey.com>
12538
12539         * linespec.c (canonical_to_fullform): Return std::string.
12540         (filter_results): Update.
12541         (struct decode_line_2_item): Add constructor.
12542         <fullform, displayform>: Now std::string.
12543         (decode_line_2_compare_items): Now a std::sort comparator.
12544         (decode_line_2): Update.
12545
12546 2018-04-05  Tom Tromey  <tom@tromey.com>
12547
12548         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12549         (unexpected_linespec_error): Update.
12550         (linespec_parse_basic, parse_linespec): Update.
12551
12552 2018-04-05  Tom Tromey  <tom@tromey.com>
12553
12554         * linespec.c (linespec_parse_basic): Reindent.
12555
12556 2018-04-05  Tom Tromey  <tom@tromey.com>
12557
12558         * minsyms.h (iterate_over_minimal_symbols): Update.
12559         * minsyms.c (iterate_over_minimal_symbols): Take a
12560         gdb::function_view.
12561         * linespec.c (struct collect_minsyms): Remove.
12562         (compare_msyms): Now a std::sort comparator.
12563         (add_minsym): Add parameters.
12564         (search_minsyms_for_name): Update.  Use std::vector.
12565
12566 2018-04-03  Tom Tromey  <tom@tromey.com>
12567
12568         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12569         gdb::byte_vector.
12570
12571 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12572
12573         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12574
12575 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12576
12577         PR gdb/16959
12578         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12579         printing static type.
12580
12581 2018-04-01  Tom Tromey  <tom@tromey.com>
12582
12583         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12584         (rs6000_xfer_shared_libraries): Update.
12585
12586 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12587
12588         * common/gdb_vecs.h (char_ptr): Remove.
12589         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12590
12591 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12592
12593         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12594         with std::vector.
12595         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12596
12597 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12598
12599         * tracepoint.h (struct uploaded_tp): Initialize fields.
12600         <actions, step_actions, cmd_strings>: Change type to
12601         std::vector<char *>.
12602         * tracepoint.c (get_uploaded_tp): Allocate with new.
12603         (free_uploaded_tps): Free with delete.
12604         (parse_tracepoint_definition): Adjust to std::vector change.
12605         * breakpoint.c (read_uploaded_action): Likewise.
12606         (create_tracepoint_from_upload): Likewise.
12607         * ctf.c (ctf_write_uploaded_tp): Likewise.
12608         (SET_ARRAY_FIELD): Likewise.
12609         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12610
12611 2018-03-30  Tom Tromey  <tom@tromey.com>
12612
12613         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12614         std::unique_ptr.
12615         (svr4_keep_data_in_core): Update.
12616         (svr4_read_so_list): Update.
12617
12618 2018-03-30  Tom Tromey  <tom@tromey.com>
12619
12620         * windows-nat.c (handle_output_debug_string, handle_exception):
12621         Update.
12622         * target.h (target_read_string): Update.
12623         * target.c (target_read_string): Change "string" to
12624         unique_xmalloc_ptr.
12625         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12626         Update.
12627         * solib-frv.c (frv_current_sos): Update.
12628         * solib-dsbt.c (dsbt_current_sos): Update.
12629         * solib-darwin.c (darwin_current_sos): Update.
12630         * linux-thread-db.c (inferior_has_bug): Update.
12631         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12632         Update.  Remove alloca.
12633         * ada-lang.c (ada_main_name): Update.
12634
12635 2018-03-30  Tom Tromey  <tom@tromey.com>
12636
12637         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12638         (struct dwo_file_deleter): New.
12639         (dwo_file_up): New typedef.
12640         (open_and_init_dwo_file): Use dwo_file_up.
12641         (free_dwo_file_cleanup): Remove.
12642
12643 2018-03-30  Tom Tromey  <tom@tromey.com>
12644
12645         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12646         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12647
12648 2018-03-30  Tom Tromey  <tom@tromey.com>
12649
12650         * dwarf2read.c (class free_cached_comp_units): New class.
12651         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12652         (free_cached_comp_units): Remove function.
12653
12654 2018-03-30  Tom Tromey  <tom@tromey.com>
12655
12656         * utils.h (make_cleanup_unpush_target): Remove.
12657         * inf-ptrace.c (struct target_unpusher): New.
12658         (target_unpush_up) New typedef.
12659         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12660         target_unpush_up.
12661         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12662
12663 2018-03-27  Tom Tromey  <tom@tromey.com>
12664
12665         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12666
12667 2018-03-27  Pedro Alves  <palves@redhat.com>
12668             Tom Tromey  <tom@tromey.com>
12669
12670         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12671         destructor.  Now a class.
12672         (gdb_readline_wrapper_cleanup): Remove function.
12673         (gdb_readline_wrapper): Remove cleanups.
12674
12675 2018-03-27  Tom Tromey  <tom@tromey.com>
12676
12677         * typeprint.h (struct type_print_options) <local_typedefs,
12678         global_typedefs>: Remove "struct" keyword.
12679         (class typedef_hash_table): New class.
12680         (recursively_update_typedef_hash, add_template_parameters)
12681         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12682         (find_typedef_in_hash): Don't declare.
12683         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12684         (typedef_hash_table::recursively_update): Rename from
12685         recursively_update_typedef_hash.  Now a member.
12686         (typedef_hash_table::add_template_parameters): Rename from
12687         add_template_parameters.  Now a member.
12688         (typedef_hash_table::typedef_hash_table): Now a constructor;
12689         rename from create_typedef_hash.
12690         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12691         rename from free_typedef_hash.
12692         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12693         (do_free_global_table): Remove.
12694         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12695         from copy_type_recursive.
12696         (create_global_typedef_table): Remove.
12697         (typedef_hash_table::find_global_typedef): Now a member of
12698         typedef_hash_table.
12699         (typedef_hash_table::find_typedef): Rename from
12700         find_typedef_in_hash; now a member.
12701         (whatis_exp): Update.
12702         * extension.h (struct ext_lang_type_printers): Add constructor and
12703         destructor.
12704         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12705         declare.
12706         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12707         Now a constructor; rename from start_ext_lang_type_printers.
12708         (ext_lang_type_printers): Now a destructor; rename from
12709         free_ext_lang_type_printers.
12710         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12711         Update.
12712         (c_type_print_base_struct_union): Update.  Remove cleanups.
12713
12714 2018-03-27  Tom Tromey  <tom@tromey.com>
12715
12716         * dwarf-index-write.c: Include <cmath>.
12717
12718 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12719
12720         * NEWS: Add entry describing new "set|show varsize-limit" command.
12721         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12722         command.
12723         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12724         "set variable".
12725
12726 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12727
12728         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12729         dwarf-index-write.c
12730         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12731         * dwarf-index-common.c: New file.
12732         * dwarf-index-common.h: New file.
12733         * dwarf-index-write.c: New file.
12734         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12735         (struct dwarf2_section_info): Move from here.
12736         (dwarf2_section_info_def): Likewise.
12737         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12738         (offset_type): Likewise.
12739         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12740         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12741         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12742         (byte_swap): Likewise.
12743         (MAYBE_SWAP): Likewise.
12744         (dwarf2_per_cu_ptr): Likewise.
12745         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12746         (struct tu_stats): Likewise.
12747         (struct dwarf2_per_objfile): Likewise.
12748         (struct dwarf2_per_cu_data): Likewise.
12749         (struct signatured_type): Likewise.
12750         (sig_type_ptr): Likewise.
12751         (DEF_VEC_P (sig_type_ptr)): Likewise.
12752         (INDEX4_SUFFIX): Likewise.
12753         (INDEX5_SUFFIX): Likewise.
12754         (DEBUG_STR_SUFFIX): Likewise.
12755         (dwarf2_read_section): Make non-static.
12756         (mapped_index_string_hash): Move from here.
12757         (dwarf5_djb_hash): Likewise.
12758         (file_write): Likewise.
12759         (class data_buf): Likewise.
12760         (struct symtab_index_entry): Likewise.
12761         (struct mapped_symtab): Likewise.
12762         (find_slot): Likewise.
12763         (hash_expand): Likewise.
12764         (add_index_entry): Likewise.
12765         (uniquify_cu_indices): Likewise.
12766         (class c_str_view): Likewise.
12767         (class c_str_view_hasher): Likewise.
12768         (class vector_hasher): Likewise.
12769         (write_hash_table): Likewise.
12770         (psym_index_map): Likewise.
12771         (struct addrmap_index_data): Likewise.
12772         (add_address_entry): Likewise.
12773         (add_address_entry_worker): Likewise.
12774         (write_address_map): Likewise.
12775         (symbol_kind): Likewise.
12776         (write_psymbols): Likewise.
12777         (struct signatured_type_index_data): Likewise.
12778         (write_one_signatured_type): Likewise.
12779         (recursively_count_psymbols): Likewise.
12780         (recursively_write_psymbols): Likewise.
12781         (class debug_names): Likewise.
12782         (check_dwarf64_offsets): Likewise.
12783         (psyms_seen_size): Likewise.
12784         (write_gdbindex): Likewise.
12785         (write_debug_names): Likewise.
12786         (assert_file_size): Likewise.
12787         (write_psymtabs_to_index): Likewise.
12788         (save_gdb_index_command): Likewise.
12789         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12790         command.
12791         * dwarf2read.h: New file.
12792
12793 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12794
12795         PR gdb/22670
12796         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12797         symbol name if the CU's language stores symbol names in linkage
12798         format.
12799         * language.h (struct language_defn)
12800         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12801         all instances of this struct.
12802
12803 2018-03-26  Tom Tromey  <tom@tromey.com>
12804
12805         * stack.c (backtrace_command_1): Remove verbose code.
12806
12807 2018-03-26  Tom Tromey  <tom@tromey.com>
12808
12809         * python/py-framefilter.c (py_print_type): Don't catch
12810         exceptions.  Return void.
12811         (py_print_value): Likewise.
12812         (py_print_single_arg): Likewise.
12813         (enumerate_args): Don't catch exceptions.
12814         (py_print_args): Likewise.
12815         (py_print_frame): Likewise.
12816         (gdbpy_apply_frame_filter): Catch exceptions here.
12817
12818 2018-03-26  Tom Tromey  <tom@tromey.com>
12819
12820         * stack.c (_initialize_stack): Remove trailing newlines from help
12821         text.  Add "Usage" line to "backtrace" help.
12822
12823 2018-03-26  Tom Tromey  <tom@tromey.com>
12824
12825         PR python/16486:
12826         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12827
12828 2018-03-26  Tom Tromey  <tom@tromey.com>
12829
12830         * python/py-framefilter.c (py_print_single_arg): Return
12831         EXT_LANG_BT_ERROR from catch.
12832
12833 2018-03-26  Tom Tromey  <tom@tromey.com>
12834
12835         PR backtrace/15584:
12836         * stack.c (backtrace_command_1): Move some code into no-filters
12837         "if".
12838
12839 2018-03-26  Tom Tromey  <tom@tromey.com>
12840
12841         * python/py-framefilter.c (throw_quit_or_print_exception): New
12842         function.
12843         (gdbpy_apply_frame_filter): Use it.
12844
12845 2018-03-26  Tom Tromey  <tom@tromey.com>
12846
12847         PR cli/17716:
12848         * python/py-framefilter.c (py_print_type, py_print_value)
12849         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12850         RETURN_MASK_ERROR.
12851
12852 2018-03-26  Tom Tromey  <tom@tromey.com>
12853
12854         * python/py-framefilter.c (enumerate_args): Use
12855         gdb::unique_xmalloc_ptr.
12856
12857 2018-03-26  Tom Tromey  <tom@tromey.com>
12858
12859         * python/py-framefilter.c (py_print_frame): Return
12860         EXT_LANG_BT_OK.
12861         (gdbpy_apply_frame_filter): Update comment.
12862         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12863         Remove.
12864         <EXT_LANG_BT_NO_FILTERS>: Change value.
12865
12866 2018-03-26  Tom Tromey  <tom@tromey.com>
12867
12868         PR backtrace/15582:
12869         * stack.c (backtrace_command): Parse "hide" argument.
12870         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12871         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12872         constant.
12873
12874 2018-03-26  Tom Tromey  <tom@tromey.com>
12875
12876         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12877         add "flags".
12878         (backtrace_command): Remove "fulltrace", add "flags".
12879
12880 2018-03-26  Tom Tromey  <tom@tromey.com>
12881
12882         * stack.c (backtrace_command): Rewrite command line parsing.
12883
12884 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12885
12886         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12887
12888 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12889
12890         * filename-seen-cache.h: Add include guard.
12891
12892 2018-03-26  Keith Seitz  <keiths@redhat.com>
12893
12894         * symfile.c (place_section): Remove "struct" from section_addr_info
12895         in comment.
12896         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12897         "struct" keyword from section_addr_info.
12898
12899 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12900
12901         * regformats/regdef.h (reg): Add constructors.
12902
12903 2018-03-25  Pedro Alves  <palves@redhat.com>
12904
12905         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12906         if then/else bodies in var_func_name extraction.
12907
12908 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12909
12910         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12911         lookup_minimal_symbol() to find symbol entry.
12912         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12913
12914 2018-03-23  Keith Seitz  <keiths@redhat.com>
12915
12916         PR c++/22968
12917         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12918         nested type definitions for C++, too.
12919
12920 2018-03-23  Tom Tromey  <tom@tromey.com>
12921
12922         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12923         a typedef.
12924         (macho_register_oso): Remove.
12925         (macho_symtab_read): Take a std::vector.
12926         (oso_el_compare_name): Now a std::sort comparator.
12927         (macho_symfile_read_all_oso): Take a std::vector.
12928         (macho_symfile_read): Use std::vector.  Remove cleanups.
12929
12930 2018-03-22  Tom Tromey  <tom@tromey.com>
12931
12932         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12933         (record_full_goto_bookmark): Use std::string.
12934
12935 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12936
12937         PR tdep/18295
12938         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12939         a single mask.
12940
12941 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12942
12943         * rs6000-tdep.c (store_insn_p): New function.
12944         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12945         and cr_reg to their unshifted values. Use store_insn_p to
12946         match LR saves using either R1 or fdata->alloca_reg. Use
12947         store_insn_p to match CR saves. Set alloca_reg_offset
12948         when alloca_reg and framep are set. Remove lr_reg shift
12949         when assigning to fdata->lr_register.
12950
12951 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12952
12953         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12954         command line args instead of emitting a warning.
12955
12956 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12957
12958         * tracepoint.h (struct static_tracepoint_marker): Initialize
12959         fields, define default constructor, move constructor and move
12960         assignment, disable the rest.
12961         <str_id, extra>: Make std::string.
12962         (release_static_tracepoint_marker): Remove.
12963         (free_current_marker): Remove.
12964         * tracepoint.c (free_current_marker): Remove.
12965         (parse_static_tracepoint_marker_definition): Adjust to
12966         std::string, use new hex2str overload.
12967         (release_static_tracepoint_marker): Remove.
12968         (print_one_static_tracepoint_marker): Get marker by reference
12969         and adjust to std::string.
12970         (info_static_tracepoint_markers_command): Adjust to std::vector
12971         changes
12972         * target.h (static_tracepoint_marker_p): Remove typedef.
12973         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12974         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12975         bool.
12976         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12977         * target-debug.h
12978         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12979         (target_debug_print_std_vector_static_tracepoint_marker): New.
12980         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12981         to...
12982         (target_debug_print_static_tracepoint_marker_p): ... this.
12983         * target-delegates.c: Re-generate.
12984         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12985         Make std::string.
12986         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12987         (decode_static_tracepoint_spec): Adjust to std::vector.
12988         (tracepoint_print_one_detail): Adjust to std::string.
12989         (strace_marker_decode_location): Adjust to std::string.
12990         (update_static_tracepoint): Adjust to std::string, remove call
12991         to release_static_tracepoint_marker.
12992         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12993         Adjust to std::vector.
12994         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12995         (remote_static_tracepoint_markers_by_strid): Adjust to
12996         std::vector.
12997         * common/rsp-low.h (hex2str): New overload with explicit count
12998         of bytes.
12999         * common/rsp-low.c (hex2str): New overload with explicit count
13000         of bytes.
13001         * unittests/rsp-low-selftests.c (test_hex2str): New function.
13002         (_initialize_rsp_low_selftests): Add test_hex2str test.
13003         * unittests/tracepoint-selftests.c
13004         (test_parse_static_tracepoint_marker_definition): Adjust to
13005         std::string.
13006
13007 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13008
13009         * tracepoint.c (parse_static_tracepoint_marker_definition):
13010         Consider case where the definition is followed by more
13011         definitions.
13012         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13013         tracepoint-selftests.c.
13014         * unittests/tracepoint-selftests.c: New.
13015
13016 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
13017
13018         * MAINTAINERS (Write After Approval): Add Pedro Franco de
13019         Carvalho.
13020
13021 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13022
13023         * symtab.c (find_pc_sect_line): fixed indentation.
13024
13025 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
13026
13027         * symtab.c (find_pc_sect_line): now uses binary search.
13028
13029 2018-03-19  Tom Tromey  <tom@tromey.com>
13030
13031         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
13032         "IDENT" production.
13033
13034 2018-03-19  Pedro Alves  <palves@redhat.com>
13035             Tom Tromey  <tom@tromey.com>
13036
13037         * unittests/observable-selftests.c: New file.
13038         * common/observable.h: New file.
13039         * observable.h: New file.
13040         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
13041         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
13042         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
13043         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
13044         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
13045         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
13046         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
13047         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
13048         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
13049         python/py-breakpoint.c, python/py-finishbreakpoint.c,
13050         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
13051         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
13052         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
13053         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
13054         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
13055         tui/tui-interp.c, valops.c: Update all users.
13056         * tui/tui-hooks.c (tui_bp_created_observer)
13057         (tui_bp_deleted_observer, tui_bp_modified_observer)
13058         (tui_inferior_exit_observer, tui_before_prompt_observer)
13059         (tui_normal_stop_observer, tui_register_changed_observer):
13060         Remove.
13061         (tui_observers_token): New global.
13062         (attach_or_detach, tui_attach_detach_observers): New functions.
13063         (tui_install_hooks, tui_remove_hooks): Use
13064         tui_attach_detach_observers.
13065         * record-btrace.c (record_btrace_thread_observer): Remove.
13066         (record_btrace_thread_observer_token): New global.
13067         * observer.sh: Remove.
13068         * observer.c: Rename to observable.c.
13069         * observable.c (namespace gdb_observers): Define new objects.
13070         (observer_debug): Move into gdb_observers namespace.
13071         (struct observer, struct observer_list, xalloc_observer_list_node)
13072         (xfree_observer_list_node, generic_observer_attach)
13073         (generic_observer_detach, generic_observer_notify): Remove.
13074         (_initialize_observer): Update.
13075         Don't include observer.inc.
13076         * Makefile.in (generated_files): Remove observer.h, observer.inc.
13077         (clean mostlyclean): Likewise.
13078         (observer.h, observer.inc): Remove targets.
13079         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
13080         (COMMON_SFILES): Use observable.c, not observer.c.
13081         * .gitignore: Remove observer.h.
13082
13083 2018-03-18  Tom Tromey  <tom@tromey.com>
13084
13085         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
13086         gdb::def_vector.
13087         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
13088
13089 2018-03-17  Tom Tromey  <tom@tromey.com>
13090
13091         * auto-load.c (auto_load_objfile_script_1): Use std::string.
13092
13093 2018-03-17  Tom Tromey  <tom@tromey.com>
13094
13095         * target.c (class scoped_target_fd): New.
13096         (target_fileio_close_cleanup): Remove.
13097         (target_fileio_read_alloc_1): Use scoped_target_fd.
13098
13099 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
13100
13101         * silent-rules.mk: New.
13102         * Makefile.in: Include silent-rules.mk
13103         (srcdir, VPATH, top_srcdir): Move up.
13104         (COMPILE): Add ECHO_CXX.
13105         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
13106         (init.c): Add ECHO_INIT_C.
13107         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
13108         (version.c): Add ECHO_GEN.
13109         (printcmd.o): Add ECHO_CXX.
13110         (target-float.o): Add ECHO_CXX.
13111         (ada-exp.o): Add ECHO_CXX.
13112         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
13113         (insight$(EXEEXT)): Add ECHO_CXXLD.
13114         * gnulib/configure.ac: Add AM_SILENT_RULES.
13115         * gnulib/aclocal.m4: Re-generate.
13116         * gnulib/configure: Re-generate.
13117         * gnulib/import/Makefile.in: Re-generate.
13118
13119 2018-03-16  Tom Tromey  <tom@tromey.com>
13120
13121         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
13122         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
13123         * utils.c (do_free_section_addr_info)
13124         (make_cleanup_free_section_addr_info): Remove.
13125         * symfile.h (struct other_sections): Add constructor.
13126         (struct section_addr_info): Remove.
13127         (section_addr_info): New typedef.
13128         (struct sym_fns) <sym_offsets>: Change type of parameter.
13129         (build_section_addr_info_from_objfile)
13130         (relative_addr_info_to_section_offsets, addr_info_make_relative)
13131         (default_symfile_offsets, symbol_file_add)
13132         (symbol_file_add_from_bfd)
13133         (build_section_addr_info_from_section_table): Update.
13134         (alloc_section_addr_info, free_section_addr_info): Don't declare.
13135         * symfile.c (alloc_section_addr_info): Remove.
13136         (build_section_addr_info_from_section_table): Change return type.
13137         Update.
13138         (build_section_addr_info_from_bfd)
13139         (build_section_addr_info_from_objfile): Likewise.
13140         (free_section_addr_info): Remove.
13141         (relative_addr_info_to_section_offsets): Change type of "addrs".
13142         (addrs_section_compar): Now a std::sort comparator.
13143         (addrs_section_sort): Change return type.
13144         (addr_info_make_relative): Change type of "addrs".  Update.
13145         (default_symfile_offsets, syms_from_objfile_1)
13146         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
13147         (symbol_file_add_separate): Update.
13148         (symbol_file_add): Change type of "addrs".  Update.
13149         (add_symbol_file_command): Update.  Remove cleanups.
13150         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
13151         cleanups.
13152         * symfile-debug.c (debug_sym_offsets): Change type of "info".
13153         * solib.c (solib_read_symbols): Update.
13154         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
13155         * machoread.c (macho_symfile_offsets): Update.
13156         * jit.c (jit_bfd_try_read_symtab): Update.
13157
13158 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
13159
13160         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13161         unittests/utils-selftests.c.
13162         * unittests/utils-selftests.c: New file.
13163
13164 2018-03-14  Tom Tromey  <tom@tromey.com>
13165
13166         PR cli/14977:
13167         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
13168         for NULL.
13169
13170 2018-03-14  Tom Tromey  <tom@tromey.com>
13171
13172         PR cli/19918:
13173         * printcmd.c (printf_pointer): Allow "-" in format.
13174
13175 2018-03-14  Tom Tromey  <tom@tromey.com>
13176
13177         * printcmd.c (_initialize_printcmd): Add usage to printf.
13178
13179 2018-03-14  Yao Qi  <qiyao@sourceware.org>
13180
13181         * MAINTAINERS: Update my email address.
13182
13183 2018-03-13  Tom Tromey  <tom@tromey.com>
13184
13185         * machoread.c (macho_check_dsym): Change filenamep to a
13186         std::string*.
13187         (macho_symfile_read): Update.
13188         * symfile.c (load_command): Use std::string.
13189
13190 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13191
13192         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
13193         to error message string.
13194         (riscv_register_name): Use xsnprintf instead of sprintf.
13195         (riscv_insn::fetch_instruction): Use gdb_assert instead of
13196         internal_error.
13197         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
13198         error.
13199         (riscv_push_dummy_call): Likewise.
13200
13201 2018-03-12  Tom Tromey  <tom@tromey.com>
13202
13203         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
13204         Use gdb::byte_vector.
13205         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
13206
13207 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13208
13209         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13210         parameter type to readable_regcache.
13211         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13212         the declaration.
13213
13214 2018-03-11  Tom Tromey  <tom@tromey.com>
13215
13216         * dwarf2read.c (struct nextfield): Add initializers.
13217         (struct nextfnfield): Remove.
13218         (struct fnfieldlist): Add initializers.  Remove "length" and
13219         "head", use std::vector.
13220         (struct decl_field_list): Remove.
13221         (struct field_info): Add initializers.
13222         <fields, baseclasses>: Now std::vector.
13223         <nbaseclasses, nfnfields, typedef_field_list_count,
13224         nested_types_list_count>: Remove.
13225         (dwarf2_add_field, dwarf2_add_type_defn)
13226         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13227         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13228         (process_structure_scope): Update.
13229
13230 2018-03-11  Tom Tromey  <tom@tromey.com>
13231
13232         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13233         for use by std::sort.
13234         (build_type_psymtabs_1): Use std::vector.
13235
13236 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13237
13238         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13239         and LIBMPFR in the printed configuration.
13240
13241 2018-03-08  Tom Tromey  <tom@tromey.com>
13242
13243         * source.c (get_filename_and_charpos): Use scoped_fd.
13244         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13245         (procfs_pidlist): Likewise.
13246         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13247         (iterate_over_mappings): Likewise.
13248
13249 2018-03-08  Tom Tromey  <tom@tromey.com>
13250
13251         * infcall.c (struct call_return_meta_info)
13252         <stack_temporaries_enabled>: Remove.
13253         (get_call_return_value, call_function_by_hand_dummy): Update.
13254         * thread.c (disable_thread_stack_temporaries): Remove.
13255         (enable_thread_stack_temporaries): Remove.
13256         (thread_stack_temporaries_enabled_p): Return bool.
13257         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13258         (get_last_thread_stack_temporary): Update.
13259         * eval.c (evaluate_subexp): Update.
13260         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13261         class, not a function.
13262         (value_ptr, value_vec): Remove typedefs.
13263         (class thread_info) <stack_temporaries_enabled>: Now bool.
13264         <stack_temporaries>: Now a std::vector.
13265         (thread_stack_temporaries_enabled_p)
13266         (value_in_thread_stack_temporaries): Return bool.
13267
13268 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13269
13270         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13271         (getpkt_or_notif_sane_1): Likewise.
13272
13273 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13274
13275         * build-id.c (build_id_to_debug_bfd): Use std::string.
13276
13277 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13278
13279         * build-id.c (find_separate_debug_file_by_buildid): Return
13280         std::string.
13281         * build-id.h (find_separate_debug_file_by_buildid): Return
13282         std::string.
13283         * coffread.c (coff_symfile_read): Adjust to std::string.
13284         * elfread.c (elf_symfile_read): Adjust to std::string.
13285         * symfile.c (separate_debug_file_exists): Change parameter to
13286         std::string.
13287         (find_separate_debug_file): Return std::string.
13288         (find_separate_debug_file_by_debuglink): Return std::string.
13289         * symfile.h (find_separate_debug_file_by_debuglink): Return
13290         std::string.
13291
13292 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13293
13294         * common/xml-utils.c (xml_escape_text): Move code to...
13295         (xml_escape_text_append): ... this new function.
13296         * common/xml-utils.h (xml_escape_text_append): New declaration.
13297         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13298         New function.
13299         (_initialize_xml_utils): register test_xml_escape_text_append as
13300         a selftest.
13301
13302 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13303
13304         * defs.h: Remove MAX_REGISTER_SIZE.
13305         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13306         asserts.
13307         * python/py-unwind.c (pyuw_sniffer): Likewise.
13308
13309 2018-03-07  Tom Tromey  <tom@tromey.com>
13310
13311         * linux-tdep.c (linux_info_proc): Update.
13312         * target.h (struct target_ops) <to_fileio_readlink>: Return
13313         optional<string>.
13314         (target_fileio_readlink): Return optional<string>.
13315         * remote.c (remote_hostio_readlink): Return optional<string>.
13316         * inf-child.c (inf_child_fileio_readlink): Return
13317         optional<string>.
13318         * target.c (target_fileio_readlink): Return optional<string>.
13319
13320 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13321
13322         * regcache.c (cooked_read_test): Add riscv to the list of
13323         architectures that have a save_reggroup.
13324
13325 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13326
13327         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13328         value is not a dynamic class object.
13329
13330 2018-03-06  Tom Tromey  <tom@tromey.com>
13331
13332         * rust-exp.y: Formatting fixes.
13333
13334 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13335
13336         * riscv-tdep.c (riscv_register_name): Remove target description
13337         support.
13338         (riscv_gdbarch_init): Remove target description check.
13339
13340 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13341
13342         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13343         comment.
13344         * riscv-tdep.h: Likewise.
13345
13346 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13347
13348         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13349         (riscv_pseudo_register_write): Delete.
13350         (riscv_gdbarch_init): Remove all use of pseudo registers.
13351
13352 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13353
13354         * record-btrace.c (btrace_print_lines): Replace cleanup
13355         parameter with RAII equivalents.
13356         (btrace_insn_history): Replace cleanup with RAII equivalents.
13357         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13358         make_cleanup_ui_out_tuple_begin_end): Remove.
13359         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13360         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13361         make_cleanup_ui_out_list_begin_end): Remove.
13362
13363 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13364
13365         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13366         parameter types to std::vector.  Use bool.
13367         (record_btrace_wait): Replace VEC(tp_t) with
13368         std::vector<thread_info *>.
13369         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13370
13371 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13372
13373         * record-btrace.c (record_btrace_disable_callback): Remove.
13374         (struct scoped_btrace_disable): New.
13375         (record_btrace_open): Use scoped_btrace_disable.
13376
13377 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13378
13379         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13380         reading values from registers.
13381
13382 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13383
13384         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13385         where appropriate.
13386
13387 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13388
13389         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13390         change parameter type.  Use GDB's print functions, and use
13391         core_addr_to_string where appropriate.
13392         (riscv_push_dummy_call): Use core_addr_to_string where
13393         appropriate, update call to riscv_print_arg_location, and reindent
13394         a few lines.
13395         (riscv_return_value): Update call to riscv_print_arg_location.
13396
13397 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13398             Tim Newsome <tim@sifive.com>
13399             Albert Ou <a0u@eecs.berkeley.edu>
13400             Darius Rad <darius@bluespec.com>
13401
13402         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13403         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13404         (ALLDEPFILES): Add riscv-tdep.c
13405         * configure.tgt: Add riscv support.
13406         * riscv-tdep.c: New file.
13407         * riscv-tdep.h: New file.
13408         * NEWS: Mention new target.
13409         * MAINTAINERS: Add entry for riscv.
13410
13411 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13412
13413         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13414         fields within aggregates.
13415
13416 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13417
13418         * record-btrace.c (btrace_print_lines): Change type of flags to
13419         gdb_disassembly_flags.
13420
13421 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13422
13423         * fbsd-nat.c: Include "inf-ptrace.h".
13424         (USE_SIGTRAP_SIGINFO): Conditionally define.
13425         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13426         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13427         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13428         function.
13429         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13430         Likewise.
13431         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13432         Likewise.
13433         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13434         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13435         "supports_stopped_by_hw_breakpoint" target methods.
13436
13437 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13438
13439         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13440         * fbsd-nat.c (debug_fbsd_nat): New variable.
13441         (show_fbsd_nat_debug): New function.
13442         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13443         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13444
13445 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13446
13447         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13448         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13449         prototype.
13450         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13451         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13452         method.
13453
13454 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13455
13456         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13457         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13458
13459 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13460
13461         * charset.c (struct charset_vector): New.
13462         (charsets): Change type to charset_vector.
13463         (find_charset_names): Adjust.
13464         (add_one): Adjust.
13465         (_initialize_charset): Adjust.
13466
13467 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13468
13469         * progspace.h (struct program_space) <deleted_solibs>: Change
13470         type to std::vector<std::string>.
13471         * progspace.c (clear_program_space_solib_cache): Adjust.
13472         * breakpoint.c (print_solib_event): Adjust.
13473         (check_status_catch_solib): Adjust.
13474         * solib.c (update_solib_list): Adjust.
13475         * ui-out.h (class ui_out) <field_string>: New overload.
13476         * ui-out.c (ui_out::field_string): New overload.
13477
13478 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13479
13480         * progspace.h (struct program_space): Add constructor and
13481         destructor, initialize fields.
13482         (add_program_space): Remove.
13483         * progspace.c (add_program_space): Rename to...
13484         (program_space::program_space): ... this.
13485         (release_program_space): Rename to...
13486         (program_space::~program_space): ... this.
13487         (delete_program_space): Use delete to delete program_space.
13488         (initialize_progspace): Use new to allocate program_space.
13489         * inferior.c (add_inferior_with_spaces): Likewise.
13490         (clone_inferior_command): Likewise.
13491         * infrun.c (follow_fork_inferior): Likewise.
13492         (handle_vfork_child_exec_or_exit): Likewise.
13493
13494 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13495
13496         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13497         (delim_string_to_char_ptr_vec): Return std::vector of
13498         gdb::unique_xmalloc_ptr.
13499         (dirnames_to_char_ptr_vec_append): Take std::vector of
13500         gdb::unique_xmalloc_ptr.
13501         (dirnames_to_char_ptr_vec): Return std::vector of
13502         gdb::unique_xmalloc_ptr.
13503         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13504         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13505         (delim_string_to_char_ptr_vec): Return an std::vector of
13506         gdb::unique_xmalloc_ptr, adjust the code.
13507         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13508         gdb::unique_xmalloc_ptr, adjust the code.
13509         (dirnames_to_char_ptr_vec): Return an std::vector of
13510         gdb::unique_xmalloc_ptr, adjust the code.
13511         * auto-load.c (auto_load_safe_path_vec): Change type to
13512         std::vector of gdb::unique_xmalloc_ptr.
13513         (auto_load_expand_dir_vars): Return an std::vector of
13514         gdb::unique_xmalloc_ptr, adjust the code.
13515         (auto_load_safe_path_vec_update): Adjust.
13516         (filename_is_in_auto_load_safe_path_vec): Adjust.
13517         (auto_load_objfile_script_1): Adjust.
13518         * build-id.c (build_id_to_debug_bfd): Adjust.
13519         * linux-thread-db.c (thread_db_load_search): Adjust.
13520         * source.c (add_path): Adjust.
13521         (openp): Adjust.
13522         * symfile.c (find_separate_debug_file): Adjust.
13523         * utils.c (do_free_char_ptr_vec): Remove.
13524         (make_cleanup_free_char_ptr_vec): Remove.
13525
13526 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13527
13528         PR gdb/22907
13529         * common/pathstuff.c: Conditionally include "<windows.h>".
13530
13531 2018-03-01  Georg Sauthoff  <mail@georg.so>
13532
13533         PR gdb/22888
13534         * gcore.in: Quote variables and switch interpreter to bash.
13535
13536 2018-03-01  Tom Tromey  <tom@tromey.com>
13537
13538         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13539         assertion.  Add assertion for discriminant_index.
13540         (quirk_rust_enum): Use correct base type name in univariant case.
13541
13542 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13543
13544         * record.c (get_call_history_modifiers): Return a
13545         record_print_flags.
13546         (cmd_record_call_history): Adjust.
13547         * record-btrace.c (record_btrace_call_history): Adjust.
13548         (record_btrace_call_history_range): Adjust.
13549         (record_btrace_call_history_from): Adjust.
13550         * target-debug.h (target_debug_print_record_print_flags): New.
13551         * target-delegates.c: Re-generate.
13552         * target.c (target_call_history): Change flags type.
13553         (target_call_history_from): Likewise.
13554         (target_call_history_range): Likewise.
13555         * target.h (struct target_ops) <target_call_history>: Likewise.
13556         (target_call_history_from): Likewise.
13557         (target_call_history_range): Likewise.
13558
13559 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13560             Simon Marchi  <simon.marchi@polymtl.ca>
13561
13562         * common/common-utils.c: Include "sys/stat.h".
13563         (is_regular_file): Move here from "source.c"; change return
13564         type to "bool".
13565         * common/common-utils.h (is_regular_file): New prototype.
13566         * common/pathstuff.c (contains_dir_separator): New function.
13567         * common/pathstuff.h (contains_dir_separator): New prototype.
13568         * source.c: Don't include "sys/stat.h".
13569         (is_regular_file): Move to "common/common-utils.c".
13570
13571 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13572
13573         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13574         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13575         * auto-load.c: Include "common/pathstuff.h".
13576         * common/common-def.h (current_directory): Move here.
13577         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13578         function.
13579         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13580         prototype.
13581         * common/pathstuff.c: New file.
13582         * common/pathstuff.h: New file.
13583         * compile/compile.c: Include "common/pathstuff.h".
13584         * defs.h (current_directory): Move to "common/common-defs.h".
13585         * dwarf2read.c: Include "common/pathstuff.h".
13586         * exec.c: Likewise.
13587         * guile/scm-safe-call.c: Likewise.
13588         * linux-thread-db.c: Likewise.
13589         * main.c: Likewise.
13590         * nto-tdep.c: Likewise.
13591         * objfiles.c: Likewise.
13592         * source.c: Likewise.
13593         * symtab.c: Likewise.
13594         * utils.c: Include "common/pathstuff.h".
13595         (gdb_realpath): Move to "common/pathstuff.c".
13596         (gdb_realpath_keepfile): Likewise.
13597         (gdb_abspath): Likewise.
13598         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13599         (gdb_realpath_keepfile): Likewise.
13600         (gdb_abspath): Likewise.
13601
13602 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13603
13604         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13605         wildcard process pid for super_resume for kernels with a
13606         specific bug.
13607
13608 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13609
13610         * compile/compile.c (get_args): Add additional comments
13611         explaining function.
13612
13613 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13614             Tom Tromey  <tom@tromey.com>
13615
13616         * target.h (memory_write_request_s): Remove typedef.  Don't define
13617         VEC.
13618         (target_write_memory_blocks): Change argument to std::vector.
13619         (struct memory_write_request): Add constructor.
13620         * target-memory.c (compare_block_starting_address): Return bool.
13621         Change argument types.
13622         (claim_memory): Change arguments to use std::vector.
13623         (split_regular_and_flash_blocks, blocks_to_erase)
13624         (compute_garbled_blocks): Likewise.
13625         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13626         (target_write_memory_blocks): Change argument to std::vector.
13627         * symfile.c (struct load_section_data): Add constructor and
13628         destructor.  Use std::vector for "requests".
13629         (struct load_progress_data): Add initializers.
13630         (load_section_callback): Update.  Use "new".
13631         (clear_memory_write_data): Remove.
13632         (generic_load): Update.
13633
13634 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13635
13636         * arch/aarch64.h: Use common/tdesc.h.
13637
13638 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13639
13640         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13641         architecture with a 64-bit ABI.
13642
13643 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13644
13645         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13646         ahead of target description loading.
13647
13648 2018-02-26  Tom Tromey  <tom@tromey.com>
13649
13650         * stack.c (backtrace_command_1): Update.
13651         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13652         of "flags".
13653         * python/py-framefilter.c (py_print_frame)
13654         (gdbpy_apply_frame_filter): Change type of "flags".
13655         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13656         of "flags".
13657         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13658         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13659         * extension.h (enum frame_filter_flag): Rename from
13660         frame_filter_flags.
13661         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13662         (apply_ext_lang_frame_filter): Change type of "flags".
13663         * extension.c (apply_ext_lang_frame_filter): Change type of
13664         "flags".
13665         * extension-priv.h (struct extension_language_ops)
13666         <apply_frame_filter>: Change type of "flags".
13667
13668 2018-02-26  Tom Tromey  <tom@tromey.com>
13669
13670         PR python/16497:
13671         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13672         off-by-one in py_end computation.
13673         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13674         PRINT_MORE_FRAMES.
13675         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13676         constant.
13677
13678 2018-02-26  Tom Tromey  <tom@tromey.com>
13679
13680         * dwarf2read.c (struct variant_field): New.
13681         (struct nextfield) <variant>: New field.
13682         (dwarf2_add_field): Handle DW_TAG_variant_part.
13683         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13684         discriminated union.
13685         (read_structure_type): Handle DW_TAG_variant_part.
13686         (handle_struct_member_die): New function, extracted from
13687         process_structure_scope.  Handle DW_TAG_variant.
13688         (process_structure_scope): Handle discriminated unions.  Call
13689         handle_struct_member_die.
13690
13691 2018-02-26  Tom Tromey  <tom@tromey.com>
13692
13693         * rust-lang.h (rust_last_path_segment): Declare.
13694         * rust-lang.c (rust_last_path_segment): Now public.  Change
13695         contract.
13696         (struct disr_info): Remove.
13697         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13698         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13699         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13700         (rust_enum_p, rust_enum_variant): New function.
13701         (rust_underscore_fields): Remove "offset" parameter.
13702         (rust_print_enum): New function.
13703         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13704         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13705         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13706         enums.
13707         (rust_internal_print_type): New function, from rust_print_type.
13708         Remove enum code.
13709         (rust_print_type): Call rust_internal_print_type.
13710         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13711         Update enum handling.
13712         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13713         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13714         (rust_union_quirks): New functions.
13715         (process_full_comp_unit, process_full_type_unit): Call
13716         rust_union_quirks.
13717         (process_structure_scope): Update rust_unions if necessary.
13718
13719 2018-02-26  Tom Tromey  <tom@tromey.com>
13720
13721         * value.h (value_union_variant): Declare.
13722         * valops.c (value_union_variant): New function.
13723         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13724         (struct discriminant_info): New.
13725         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13726         enumerator.
13727         (struct main_type) <flag_discriminated_union>: New field.
13728
13729 2018-02-26  Tom Tromey  <tom@tromey.com>
13730
13731         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13732         unittests/unpack-selftests.c.
13733         * unittests/unpack-selftests.c: New file.
13734         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13735
13736 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13737
13738         * dwarf2read.c (struct partial_die_info) <read>: New method.
13739         (read_partial_die): Remove the declaration.
13740         (load_partial_dies): Update.
13741         (partial_die_info::partial_die_info):
13742         (read_partial_die): Change it to partial_die_info::read.
13743
13744 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13745
13746         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13747         (fixup_partial_die): Remove declaration.
13748         (scan_partial_symbols): Update.
13749         (partial_die_parent_scope): Likewise.
13750         (partial_die_full_name): Likewise.
13751         (fixup_partial_die): Change it to partial_die_info::fixup.
13752
13753 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13754
13755         * dwarf2read.c (read_partial_die): Update the declaration.
13756         (load_partial_dies): Caller update.
13757         (read_partial_die): Remove one argument abbrev_len.
13758
13759 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13760
13761         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13762         assignment operator.
13763         (load_partial_dies): Use ctor and copy ctor.
13764         (read_partial_die): Update.
13765         (dwarf2_cu::find_partial_die): Use ctor.
13766
13767 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13768
13769         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13770         (find_partial_die_in_comp_unit): Change it to
13771         dwarf2_cu::find_partial_die.
13772         (find_partial_die): Update.
13773
13774 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13775
13776         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13777         is NULL.
13778
13779 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13780
13781         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13782
13783 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13784
13785         * arch/amd64.h: Use common/tdesc.h.
13786         * arch/i386.c: Likewise.
13787         * arch/i386.h: Likewise.
13788         * arch/tic6x.c: Likewise.
13789         * arch/tdesc.h: Move file from here...
13790         * common/tdesc.h: ...to here.
13791         * features/aarch64-core.c: Regenerate.
13792         * features/aarch64-fpu.c: Regenerate.
13793         * features/i386/32bit-avx.c: Regenerate.
13794         * features/i386/32bit-avx512.c: Regenerate.
13795         * features/i386/32bit-core.c: Regenerate.
13796         * features/i386/32bit-linux.c: Regenerate.
13797         * features/i386/32bit-mpx.c: Regenerate.
13798         * features/i386/32bit-pkeys.c: Regenerate.
13799         * features/i386/32bit-sse.c: Regenerate.
13800         * features/i386/64bit-avx.c: Regenerate.
13801         * features/i386/64bit-avx512.c: Regenerate.
13802         * features/i386/64bit-core.c: Regenerate.
13803         * features/i386/64bit-linux.c: Regenerate.
13804         * features/i386/64bit-mpx.c: Regenerate.
13805         * features/i386/64bit-pkeys.c: Regenerate.
13806         * features/i386/64bit-segments.c: Regenerate.
13807         * features/i386/64bit-sse.c: Regenerate.
13808         * features/i386/x32-core.c: Regenerate.
13809         * features/tic6x-c6xp.c: Regenerate.
13810         * features/tic6x-core.c: Regenerate.
13811         * features/tic6x-gp.c: Regenerate.
13812         * target-descriptions.c: Use common/tdesc.h.
13813         * target-descriptions.h: Likewise.
13814
13815 2018-02-24  Tom Tromey  <tom@tromey.com>
13816
13817         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13818         (try_thread_db_load_from_dir, thread_db_load_search): Use
13819         std::string.
13820         (info_auto_load_libthread_db_compare): Return bool.  Change
13821         argument types.
13822         (info_auto_load_libthread_db): Use std::vector, std::string.
13823         Remove cleanups.
13824
13825 2018-02-24  Tom Tromey  <tom@tromey.com>
13826
13827         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13828         std::string.
13829         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13830         std::string*.
13831         * gdbarch.c: Rebuild.
13832         * gdbarch.h: Rebuild.
13833         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13834         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13835         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13836         std::string*.
13837
13838 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13839
13840         * gdbtypes.h (sect_offset): Change type to uint64_t.
13841         (sect_offset_str): New function.
13842         * dwarf2read.c (create_addrmap_from_aranges): Use
13843         sect_offset_str.
13844         (error_check_comp_unit_head): Likewise.
13845         (create_debug_type_hash_table): Likewise.
13846         (read_cutu_die_from_dwo): Likewise.
13847         (init_cutu_and_read_dies): Likewise.
13848         (init_cutu_and_read_dies_no_follow): Likewise.
13849         (process_psymtab_comp_unit_reader): Likewise.
13850         (partial_die_parent_scope): Likewise.
13851         (peek_die_abbrev): Likewise.
13852         (process_queue): Likewise.
13853         (dwarf2_physname): Likewise.
13854         (read_namespace_alias): Likewise.
13855         (read_import_statement): Likewise.
13856         (create_dwo_cu_reader): Likewise.
13857         (create_cus_hash_table): Likewise.
13858         (lookup_dwo_cutu): Likewise.
13859         (inherit_abstract_dies): Likewise.
13860         (read_func_scope): Likewise.
13861         (read_call_site_scope): Likewise.
13862         (dwarf2_add_member_fn): Likewise.
13863         (read_common_block): Likewise.
13864         (read_module_type): Likewise.
13865         (read_typedef): Likewise.
13866         (read_subrange_type): Likewise.
13867         (load_partial_dies): Likewise.
13868         (read_partial_die): Likewise.
13869         (find_partial_die): Likewise.
13870         (read_str_index): Likewise.
13871         (dwarf2_string_attr): Likewise.
13872         (build_error_marker_type): Likewise.
13873         (lookup_die_type): Likewise.
13874         (dump_die_shallow): Likewise.
13875         (follow_die_ref): Likewise.
13876         (dwarf2_fetch_die_loc_sect_off): Likewise.
13877         (dwarf2_fetch_constant_bytes): Likewise.
13878         (follow_die_sig): Likewise.
13879         (get_signatured_type): Likewise.
13880         (get_DW_AT_signature_type): Likewise.
13881         (dwarf2_find_containing_comp_unit): Likewise.
13882         (set_die_type): Likewise.
13883
13884 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13885
13886         * arch/aarch64.c: Include "common-defs.h".
13887         * arch/amd64.c: Likewise.
13888         * arch/i386.c: Likewise.
13889
13890 2018-02-21  Tom Tromey  <tom@tromey.com>
13891
13892         * value.h: (extract_field_op): Update.
13893         * eval.c (extract_field_op): Return a const char *.
13894         * expression.h (parse_expression_for_completion): Update.
13895         * completer.c (complete_expression): Update.
13896         (add_struct_fields): Make fieldname const.
13897         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13898         (mark_completion_tag, parse_exp_in_context_1): Update.
13899         (parse_expression_for_completion): Change "name" to
13900         unique_xmalloc_ptr*.
13901
13902 2018-02-21  Tom Tromey  <tom@tromey.com>
13903
13904         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13905
13906 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13907
13908         * avr-tdep.c (avr_read_pc): Change parameter type to
13909         readable_regcache.
13910         * gdbarch.sh (read_pc): Likewise.
13911         * gdbarch.c: Re-generated.
13912         * gdbarch.h: Re-generated.
13913         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13914         readable_regcache.
13915         * ia64-tdep.c (ia64_read_pc): Likewise.
13916         * mips-tdep.c (mips_read_pc): Likewise.
13917         * spu-tdep.c (spu_read_pc): Likewise.
13918
13919 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13920
13921         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13922         * regcache-dump.c: New file.
13923         * regcache.c: Move register_dump to regcache-dump.c.
13924         (maintenance_print_registers): Likewise.
13925         (maintenance_print_raw_registers): Likewise.
13926         (maintenance_print_cooked_registers): Likewise.
13927         (maintenance_print_register_groups): Likewise.
13928         (maintenance_print_remote_registers): Likewise.
13929         (_initialize_regcache): Likewise.
13930         * regcache.h (register_dump): Moved from regcache.c.
13931
13932 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13933
13934         * regcache.c (regcache::regcache): Update.
13935         (regcache::invalidate): Move it to detached_regcache::invalidate.
13936         (get_thread_arch_aspace_regcache): Update.
13937         (regcache::raw_update): Update.
13938         (regcache::cooked_read): Remove some code.
13939         (regcache::cooked_read_value): Likewise.
13940         (regcache::raw_write): Remove assert on m_readonly_p.
13941         (regcache::raw_supply_integer): Move it to
13942         detached_regcache::raw_supply_integer.
13943         (regcache::raw_supply_zeroed): Likewise.
13944         * regcache.h (detached_regcache) <raw_supply_integer>: New
13945         declaration.
13946         <raw_supply_zeroed, invalidate>: Likewise.
13947         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13948         <invalidate>: Likewise.
13949         <m_readonly_p>: Removed.
13950
13951 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13952
13953         * infcmd.c (get_return_value): Let stop_regs point to
13954         get_current_regcache.
13955         * regcache.c (regcache::regcache): Remove.
13956         (register_dump_reg_buffer): New class.
13957         (regcache_print): Adjust.
13958         * regcache.h (regcache): Remove constructors.
13959
13960 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13961
13962         * regcache.c (class register_dump): New class.
13963         (register_dump_regcache, register_dump_none): New class.
13964         (register_dump_remote, register_dump_groups): New class.
13965         (regcache_print): Update.
13966         * regcache.h (regcache_dump_what): Move it to regcache.c.
13967         (regcache) <dump>: Remove.
13968
13969 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13970
13971         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13972          reg_buffer_rw *.
13973         (jit_unwind_reg_set_impl): Call raw_supply.
13974         (jit_frame_sniffer): Use reg_buffer_rw.
13975         * record-full.c (record_full_core_regbuf): Change its type.
13976         (record_full_core_open_1): Use reg_buffer_rw.
13977         (record_full_close): Likewise.
13978         (record_full_core_fetch_registers): Use regcache->raw_supply.
13979         (record_full_core_store_registers): Likewise.
13980         * regcache.c (regcache::get_register_status): Move it to
13981         reg_buffer.
13982         (regcache_raw_set_cached_value): Remove.
13983         (regcache::raw_set_cached_value): Remove.
13984         (regcache::raw_write): Call raw_supply.
13985         (regcache::raw_supply): Move it to reg_buffer_rw.
13986         * regcache.h (regcache_raw_set_cached_value): Remove.
13987         (reg_buffer_rw): New class.
13988
13989 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13990
13991         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13992         readonly_detached_regcache.
13993         (dummy_frame_prev_register): Use regcache->cooked_read.
13994         * frame.c (frame_save_as_regcache): Change return type.
13995         (frame_pop): Update.
13996         * frame.h (frame_save_as_regcache): Update declaration.
13997         * inferior.h (get_infcall_suspend_state_regcache): Update
13998         declaration.
13999         * infrun.c (infcall_suspend_state) <registers>: use
14000         readonly_detached_regcache.
14001         (save_infcall_suspend_state): Don't use regcache_dup.
14002         (get_infcall_suspend_state_regcache): Change return type.
14003         * linux-fork.c (struct fork_info) <savedregs>: Change to
14004         readonly_detached_regcache.
14005         <pc>: New field.
14006         (fork_save_infrun_state): Don't use regcache_dup.
14007         (info_checkpoints_command): Adjust.
14008         * mi/mi-main.c (register_changed_p): Update declaration.
14009         (mi_cmd_data_list_changed_registers): Use
14010         readonly_detached_regcache.
14011         (register_changed_p): Change parameter type to
14012         readonly_detached_regcache.
14013         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
14014         readonly_detached_regcache.
14015         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
14016         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
14017         New.
14018         (regcache::save): Move it to reg_buffer.
14019         (regcache::restore): Change parameter type.
14020         (regcache_dup): Remove.
14021         * regcache.h (reg_buffer) <save>: New method.
14022         (readonly_detached_regcache): New class.
14023         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
14024         readonly_detached_regcache.
14025         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
14026
14027 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14028
14029         * frame.c (frame_save_as_regcache): Use regcache method save.
14030         (frame_pop): Use regcache method restore.
14031         * infrun.c (restore_infcall_suspend_state): Likewise.
14032         * linux-fork.c (fork_load_infrun_state): Likewise.
14033         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
14034         save.
14035         * regcache.c (regcache_save): Remove.
14036         (regcache::restore): More asserts.
14037         (regcache_cpy): Remove.
14038         * regcache.h (regcache_save): Remove the declaration.
14039         (regcache::restore): Move from private to public.
14040         Remove the friend declaration of regcache_cpy.
14041         (regcache_cpy): Remove declaration.
14042
14043 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14044
14045         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
14046         parameter type to 'readable_regcache *'.
14047         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14048         * arm-tdep.c (arm_neon_quad_read): Likewise.
14049         (arm_pseudo_read): Likewise.
14050         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14051         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14052         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14053         * gdbarch.c: Re-generated.
14054         * gdbarch.h: Re-generated.
14055         * gdbarch.sh (pseudo_register_read): Change parameter type to
14056         'readable_regcache *'.
14057         (pseudo_register_read_value): Likewise.
14058         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
14059         (h8300_pseudo_register_read): Likewise.
14060         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
14061         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14062         (i386_pseudo_register_read_into_value): Likewise.
14063         (i386_pseudo_register_read_value): Likewise.
14064         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
14065         declaration.
14066         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
14067         * m32c-tdep.c (m32c_raw_read): Likewise.
14068         (m32c_read_flg): Likewise.
14069         (m32c_banked_register): Likewise.
14070         (m32c_banked_read): Likewise.
14071         (m32c_sb_read): Likewise.
14072         (m32c_part_read): Likewise.
14073         (m32c_cat_read): Likewise.
14074         (m32c_r3r2r1r0_read): Likewise.
14075         (m32c_pseudo_register_read): Likewise.
14076         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14077         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14078         (mep_pseudo_cr64_read): Likewise.
14079         (mep_pseudo_register_read): Likewise.
14080         * mips-tdep.c (mips_pseudo_register_read): Likewise.
14081         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14082         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14083         * regcache.c (regcache::raw_read): Move it to readable_regcache.
14084         (regcache::cooked_read): Likewise.
14085         (regcache::cooked_read_value): Likewise.
14086         (regcache_cooked_read_signed):
14087         (regcache::cooked_read): Likewise.
14088         * regcache.h (readable_regcache): New class.
14089         (regcache): Inherit readable_regcache.  Move some methods to
14090         readable_regcache.
14091         * rl78-tdep.c (rl78_pseudo_register_read): Change
14092         parameter type to 'readable_regcache *'.
14093         * rs6000-tdep.c (do_regcache_raw_read): Remove.
14094         (e500_pseudo_register_read): Change parameter type to
14095         'readable_regcache *'.
14096         (dfp_pseudo_register_read): Likewise.
14097         (vsx_pseudo_register_read): Likewise.
14098         (efpr_pseudo_register_read): Likewise.
14099         * s390-tdep.c (s390_pseudo_register_read): Likewise.
14100         * sh-tdep.c (sh_pseudo_register_read): Likewise.
14101         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
14102         (sh64_pseudo_register_read): Likewise.
14103         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
14104         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14105         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
14106         (spu_pseudo_register_read): Likewise.
14107         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14108         (xtensa_pseudo_register_read): Likewise.
14109
14110 2018-02-21  Yao Qi  <yao.qi@linaro.org>
14111
14112         * regcache.c (regcache::regcache): Call reg_buffer ctor.
14113         (regcache::arch): Move it to reg_buffer::arch.
14114         (regcache::register_buffer): Likewise.
14115         (regcache::assert_regnum): Likewise.
14116         (regcache::num_raw_registers): Likewise.
14117         * regcache.h (reg_buffer): New class.
14118         (regcache): Inherit reg_buffer.
14119
14120 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
14121
14122         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
14123         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
14124
14125 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
14126
14127         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
14128
14129 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
14130
14131         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
14132         (SFILES): Remove common/*.c files.
14133         (COMMON_OBS): Remove some *.o files built from common/*.c files.
14134         * common/common.host: Add common reference.
14135         * configure.ac: Likewise.
14136         * configure: Regenerate.
14137
14138 2018-02-16  Yao Qi  <yao.qi@linaro.org>
14139
14140         * block.c (block_namespace_info): Inherit allocate_on_obstack.
14141         (block_initialize_namespace): Use new.
14142         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
14143         (dwarf2_free_objfile): Use delete.
14144         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
14145         (copy_type_recursive): Use new.
14146         * gdb_obstack.h (allocate_on_obstack): New.
14147
14148 2018-02-15  Yao Qi  <yao.qi@linaro.org>
14149
14150         PR gdb/22849
14151         * inferior.c (exit_inferior_1): Reset inf->control.
14152
14153 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
14154
14155         * ada-lang.c (ada_to_fixed_value_create): Delete advance
14156         declaration.
14157
14158 2018-02-14  Pedro Alves  <palves@redhat.com>
14159
14160         * frame-unwind.c (frame_unwind_try_unwinder): Always call
14161         frame_cleanup_after_sniffer on exception.
14162
14163 2018-02-14  Tom Tromey  <tom@tromey.com>
14164
14165         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
14166         const.
14167         (solib_bfd_open): Make pathname const.
14168         * solib.c (solib_bfd_open): Make pathname const.
14169         * solib-spu.c (spu_bfd_fopen): Make name const.
14170         (spu_bfd_open): Make pathname const.
14171         * solib-darwin.c (darwin_bfd_open): Make pathname const.
14172         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
14173
14174 2018-02-14  Tom Tromey  <tom@tromey.com>
14175
14176         * symfile.c (symfile_bfd_open): Update.
14177         * source.h (openp, source_full_path_of, find_and_open_source):
14178         Change argument type to unique_xmalloc_ptr.
14179         * source.c (openp): Take a unique_xmalloc_ptr.
14180         (source_full_path_of, find_and_open_source): Likewise.
14181         (open_source_file, symtab_to_fullname): Update.
14182         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
14183         unique_xmalloc_ptr.
14184         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
14185         (exec_file_find): Update.
14186         * psymtab.c (psymtab_to_fullname): Update.
14187         * nto-tdep.h (nto_find_and_open_solib): Update.
14188         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
14189         unique_xmalloc_ptr.
14190         * exec.c (exec_file_attach): Update.
14191         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
14192         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
14193
14194 2018-02-14  Tom Tromey  <tom@tromey.com>
14195
14196         * solib.c: Include source.h.
14197         * nto-tdep.c: Include source.h.
14198         * mi/mi-cmd-env.c: Include source.h.
14199         * infcmd.c: Include source.h.
14200         * exec.c: Include source.h.
14201         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
14202         (add_path, directory_switch, source_path, init_source_path): Move
14203         declarations...
14204         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
14205         (add_path, directory_switch, source_path, init_source_path):
14206         ...here.
14207
14208 2018-02-14  Tom Tromey  <tom@tromey.com>
14209
14210         * solist.h (exec_file_find, solib_find): Return
14211         unique_xmalloc_ptr.
14212         (solib_bfd_fopen): Take a const char *.
14213         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14214         (exec_file_find, solib_find): Likewise.
14215         (solib_bfd_fopen): Do not take ownership of "pathname".
14216         (solib_bfd_open): Use unique_xmalloc_ptr.
14217         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14218         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14219         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14220         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14221
14222 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14223
14224         * ada-lang.c (name_match_type_from_name): Remove reference to
14225         ada_name_for_lookup in function's documentation.
14226         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14227
14228 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14229
14230         * defs.h (enum openp_flags): New enum.
14231         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14232         Move to enum openp_flags.
14233         (openp_flags): New enum flags.
14234         (openp): Change parameter type to openp_flags.
14235         * source.c (openp): Change parameter type to openp_flags.
14236         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14237         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14238
14239 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14240
14241         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14242         per-command.
14243
14244 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14245
14246         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14247         into...
14248         (class dwarf2_queue_guard): ...the destructor of this new class.
14249         (dw2_do_instantiate_symtab): Create instance of the new class
14250         dwarf2_queue_guard, remove cleanup.
14251
14252 2018-02-09  Tom Tromey  <tom@tromey.com>
14253
14254         * source.c (find_source_lines): Don't reference past the end of
14255         the vector.
14256
14257 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14258
14259         * remote.c (remote_btrace_maybe_reopen): Change error message.
14260         * btrace.c (btrace_enable): Likewise.
14261         (parse_xml_btrace): Likewise.
14262         (parse_xml_btrace_conf): Likewise.
14263
14264 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14265
14266         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14267         (linux_enable_pt, linux_enable_bts): Call
14268         diagnose_perf_event_open_fail.
14269
14270 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14271
14272         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14273         Remove parameter and change return type.  Update callers.  Move it.
14274         (linux_enable_bts, linux_enable_pt): Improve error message.
14275         (linux_enable_pt): Remove zero buffer size check.
14276         (linux_enable_btrace): Improve error messages.  Remove NULL return
14277         check.
14278
14279 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14280
14281         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14282         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14283         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14284         (linux_supports_pt, linux_supports_btrace): Remove.
14285         (linux_enable_bts): Call cpu_supports_bts.
14286         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14287         * remote.c (remote_supports_btrace): Remove.
14288         (init_remote_ops): Remove remote_supports_btrace.
14289         * target-delegates.c: Regenerated.
14290         * target.c (target_supports_btrace): Remove.
14291         * target.h (target_ops) <to_supports_btrace>: Remove
14292         (target_supports_btrace): Remove.
14293         * x86-linux-nat.c (x86_linux_create_target): Remove
14294         linux_supports_btrace.
14295
14296 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14297
14298         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14299         btrace failed.
14300         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14301         exception and use message in own exception.
14302
14303 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14304
14305         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14306         (perf_event_pt_event_type): Use gdb_file_up.
14307         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14308         scoped_fd, and scoped_mmap.
14309
14310 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14311
14312         * common/scoped_mmap.h: New.
14313         * unittests/scoped_mmap-selftest.c: New.
14314         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14315         unittests/scoped_mmap-selftest.c.
14316
14317 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14318
14319         * common/scoped_fd.h: New.
14320         * unittests/scoped_fd-selftest.c: New.
14321         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14322         unittests/scoped_fd-selftest.c.
14323
14324 2018-02-09  Tom Tromey  <tom@tromey.com>
14325
14326         * auto-load.c (auto_load_section_scripts): Use
14327         gdb::unique_xmalloc_ptr.
14328
14329 2018-02-09  Tom Tromey  <tom@tromey.com>
14330
14331         * auto-load.c (execute_script_contents): Use std::string.
14332
14333 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14334
14335         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14336         Python function, rather than a new command.
14337
14338 2018-02-08  Tom Tromey  <tom@tromey.com>
14339
14340         * solib.c (solib_find_1): Use std::string.
14341         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14342
14343 2018-02-08  Tom Tromey  <tom@tromey.com>
14344
14345         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14346
14347 2018-02-08  Tom Tromey  <tom@tromey.com>
14348
14349         * source.c (find_source_lines): Use gdb::def_vector.
14350
14351 2018-02-08  Tom Tromey  <tom@tromey.com>
14352
14353         * macrocmd.c (struct temporary_macro_definition): New.
14354         (macro_define_command): Use temporary_macro_definition.  Remove
14355         cleanups.
14356         (free_macro_definition_ptr): Remove.
14357
14358 2018-02-08  Tom Tromey  <tom@tromey.com>
14359
14360         * macroexp.c (maybe_expand): Use std::string.
14361
14362 2018-02-08  Tom Tromey  <tom@tromey.com>
14363
14364         * macroexp.c (struct macro_buffer): Add initializers for some
14365         members.
14366         (init_buffer, init_shared_buffer, free_buffer)
14367         (free_buffer_return_text): Remove.
14368         (macro_buffer): New constructors.
14369         (~macro_buffer): New destructor.
14370         (macro_buffer::set_shared): New method.
14371         (macro_buffer::resize_buffer, macro_buffer::appendc)
14372         (macro_buffer::appendmem): Now methods, not free functions.
14373         (set_token, append_tokens_without_splicing, stringify)
14374         (macro_stringify): Update.
14375         (gather_arguments): Change return type.  Remove argc_p argument,
14376         add args_ptr argument.  Use std::vector.
14377         (substitute_args): Remove argc argument.  Accept std::vector.
14378         (expand): Update.  Use std::vector.
14379         (scan, macro_expand, macro_expand_next): Update.
14380
14381 2018-02-08  Tom Tromey  <tom@tromey.com>
14382
14383         * symtab.c (default_collect_symbol_completion_matches_break_on):
14384         Use unique_xmalloc_ptr.
14385         * macroscope.h: (sal_macro_scope, user_macro_scope)
14386         (default_macro_scope): Return unique_xmalloc_ptr.
14387         * macroscope.c (sal_macro_scope, user_macro_scope)
14388         (default_macro_scope): Return unique_xmalloc_ptr.
14389         * macroexp.h (macro_expand, macro_expand_once): Return
14390         unique_xmalloc_ptr.
14391         * macroexp.c (macro_expand, macro_expand_once): Return
14392         unique_xmalloc_ptr.
14393         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14394         (info_macro_command, info_macros_command): Use
14395         unique_xmalloc_ptr.
14396         * compile/compile-c-support.c (write_macro_definitions): Use
14397         unique_xmalloc_ptr.
14398         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14399
14400 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14401
14402         * value.c (value_static_field): Assign field type instead of
14403         containing type when returning an optimized out value.
14404
14405 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14406
14407         * ft32-tdep.c (ft32_read_pc): Remove.
14408         (ft32_write_pc): Remove.
14409         (ft32_gdbarch_init): Update.
14410         * m32r-tdep.c (m32r_read_pc): Remove.
14411         (m32r_gdbarch_init): Update.
14412         * mep-tdep.c (mep_read_pc): Remove.
14413         (mep_gdbarch_init): Update.
14414         * microblaze-tdep.c (microblaze_write_pc): Remove.
14415         (microblaze_gdbarch_init): Update.
14416         * mn10300-tdep.c (mn10300_read_pc): Remove.
14417         (mn10300_write_pc): Remove.
14418         (mn10300_gdbarch_init): Update.
14419         * moxie-tdep.c (moxie_read_pc): Remove.
14420         (moxie_write_pc): Remove.
14421         (moxie_gdbarch_init): Update.
14422
14423 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14424
14425         * expprint.c (print_subexp_standard): Handle
14426         OP_F77_UNDETERMINED_ARGLIST.
14427         (dump_subexp_body_standard): Likewise.
14428
14429 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14430
14431         * target-descriptions.c (tdesc_element_visitor) Add empty
14432         implementations.
14433         (tdesc_type): Move make_gdb_type from here.
14434         (tdesc_type_builtin): Likewise.
14435         (tdesc_type_vector): Likewise.
14436         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14437         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14438         (make_gdb_type_union): Likewise.
14439         (make_gdb_type_flags): Likewise.
14440         (make_gdb_type_enum): Likewise.
14441         (make_gdb_type): New function.
14442         (tdesc_register_type): Use static make_gdb_type.
14443
14444 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14445
14446         * infcmd.c (default_print_one_register_info): Align natural-format
14447         column values consistently one under another.
14448         (pad_to_column): New function.
14449
14450 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14451
14452         * dwarf2read.c (dwarf2_physname): Move commment.
14453
14454 2018-02-01  Leszek Swirski  <leszeks@google.com>
14455
14456         * varobj.c (varobj_formatted_print_options): Allow recursive
14457         pretty printing if pretty printing is enabled.
14458
14459 2018-02-01  Leszek Swirski  <leszeks@google.com>
14460
14461         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14462         names after a structop as a filename.
14463
14464 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14465
14466         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14467         (arm_record_coproc_data_proc): Likewise.
14468
14469 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14470
14471         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14472
14473 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14474
14475         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14476         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14477
14478 2018-01-31  Pedro Alves  <palves@redhat.com>
14479
14480         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14481         * inflow.c (child_terminal_save_inferior): Wrap reference to
14482         tcgetpgrp in HAVE_TERMIOS_H.
14483         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14484         _WIN32.
14485         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14486         always iterate over all inferiors.
14487         (gdbsim_cntrl_c): Adjust.
14488         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14489
14490 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14491
14492         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14493         index type is objfile-owned if the element type is as well.
14494
14495 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14496
14497         GDB 8.1 released.
14498
14499 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14500
14501         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14502         "features/s390x-linux64.c".
14503         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14504         s390_linux32 and s390x_linux64.
14505         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14506         default tdesc.
14507         * s390-tdep.c: Include "features/s390-linux32.c" and
14508         "features/s390x-linux64.c".
14509         (s390_tdesc_valid): Add check for tdesc_has_registers.
14510         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14511         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14512         tdesc_s390x_linux64.
14513         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14514         tdesc_s390x_linux64 to...
14515         * s390-tdep.h: ...here.
14516
14517 2018-01-30  Pedro Alves  <palves@redhat.com>
14518
14519         PR gdb/13211
14520         * config.in, configure: Regenerate.
14521         * configure.ac: Check for getpgid.
14522         * go32-nat.c (go32_pass_ctrlc): New.
14523         (go32_target): Install it.
14524         * inf-child.c (inf_child_target): Install
14525         child_terminal_save_inferior, child_pass_ctrlc and
14526         child_interrupt.
14527         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14528         (inf_ptrace_target): No longer install it.
14529         * infcmd.c (interrupt_target_1): Adjust.
14530         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14531         (child_interrupt): Declare.
14532         (inferior::terminal_state): New.
14533         * inflow.c (struct terminal_info): Update comments.
14534         (inferior_process_group): Delete.
14535         (terminal_is_ours): Delete.
14536         (gdb_tty_state): New.
14537         (child_terminal_init): Adjust.
14538         (is_gdb_terminal, sharing_input_terminal_1)
14539         (sharing_input_terminal): New functions.
14540         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14541         Set the process's actual process group in the foreground if
14542         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14543         mark terminal as the inferior's if not sharing GDB's terminal.
14544         Don't check attach_flag.
14545         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14546         pass down a target_terminal_state.
14547         (child_terminal_save_inferior): New, factored out from ...
14548         (child_terminal_ours_1): ... this.  Handle
14549         target_terminal_state::is_ours_for_output.
14550         (child_interrupt, child_pass_ctrlc): New.
14551         (inflow_inferior_exit): Clear the inferior's terminal_state.
14552         (copy_terminal_info): Copy the inferior's terminal state.
14553         (_initialize_inflow): Remove reference to terminal_is_ours.
14554         * inflow.h (inferior_process_group): Delete.
14555         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14556         * procfs.c (procfs_target): Don't install procfs_interrupt.
14557         (procfs_interrupt): Delete.
14558         * remote.c (remote_serial_quit_handler): Adjust.
14559         (remote_interrupt): Remove ptid parameter.  Adjust.
14560         * target-delegates.c: Regenerate.
14561         * target.c: Include "terminal.h".
14562         (target_terminal::terminal_state): Rename to ...
14563         (target_terminal::m_terminal_state): ... this.
14564         (target_terminal::init): Adjust.
14565         (target_terminal::inferior): Adjust to per-inferior
14566         terminal_state.
14567         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14568         (target_terminal::ours, target_terminal::ours_for_output): Use
14569         target_terminal_is_ours_kind.
14570         (target_interrupt): Remove ptid parameter.  Adjust.
14571         (default_target_pass_ctrlc): Adjust.
14572         * target.h (target_ops::to_terminal_save_inferior): New field.
14573         (target_ops::to_interrupt): Remove ptid_t parameter.
14574         (target_interrupt): Remove ptid_t parameter.  Update comment.
14575         (target_pass_ctrlc): Update comment.
14576         * target/target.h (target_terminal_state): New scoped enum,
14577         factored out of ...
14578         (target_terminal::terminal_state): ... here.
14579         (target_terminal::inferior): Update comments.
14580         (target_terminal::restore_inferior): New.
14581         (target_terminal::is_inferior, target_terminal::is_ours)
14582         (target_terminal::is_ours_for_output): Adjust.
14583         (target_terminal::scoped_restore_terminal_state): Adjust to
14584         rename, and call restore_inferior() instead of inferior().
14585         (target_terminal::scoped_restore_terminal_state::m_state): Change
14586         type.
14587         (target_terminal::terminal_state): Rename to ...
14588         (target_terminal::m_terminal_state): ... this and change type.
14589
14590 2018-01-30  Pedro Alves  <palves@redhat.com>
14591
14592         * linux-nat.c (wait_for_signal): New function.
14593         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14594         directly.
14595         (async_terminal_is_ours)
14596         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14597         (linux_nat_add_target): Don't override
14598         to_terminal_inferior/to_terminal_ours.
14599
14600 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14601
14602         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14603
14604 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14605
14606         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14607         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14608         dwarf2_per_objfile_free here.
14609         (dwarf2_per_objfile_free): Remove.
14610         (_initialize_dwarf2_read): Don't register
14611         dwarf2_per_objfile_free as a registry cleanup.
14612
14613 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14614
14615         Avoid compilation errors in MinGW native builds
14616
14617         The error is triggered by including python-internal.h, and the
14618         error message is:
14619
14620              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14621                       from build-gnulib/import/math.h:27,
14622                       from d:/usr/Python26/include/pyport.h:235,
14623                       from d:/usr/Python26/include/Python.h:58,
14624                       from python/python-internal.h:94,
14625                       from python/py-arch.c:24:
14626              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14627         using ::hypot;
14628                 ^~~~~
14629
14630         This happens because Python headers define 'hypot' to expand t
14631         '_hypot' in the Windows builds.
14632         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14633         'hypoth'.  This avoids a compilation error.
14634
14635 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14636
14637         * MAINTAINERS (Write After Approval): Fix ordering.
14638
14639 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14640
14641         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14642
14643 2018-01-26  Alan Modra  <amodra@gmail.com>
14644
14645         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14646         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14647         Remove nop.  Make const.  Comment.
14648         (powerpc32_plt_stub_so_2): New.
14649         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14650         Correct count.  Update uses.
14651         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14652         Move common code reading PLT entry word.  Correct
14653         powerpc32_plt_stub PLT address calculation.
14654         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14655         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14656         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14657         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14658         (ppc64_standard_linkage8): Likewise.
14659         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14660         Correct insns description.
14661         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14662
14663 2018-01-24  Pedro Alves  <palves@redhat.com>
14664
14665         GCC PR libstdc++/83906
14666         * gdbtypes.c (operator==(const dynamic_prop &,
14667         const dynamic_prop &)): New.
14668         (operator==(const range_bounds &, const range_bounds &)): New.
14669         (check_types_equal): Use them instead of memcmp.
14670         * gdbtypes.h (operator==(const dynamic_prop &,
14671         const dynamic_prop &)): Declare.
14672         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14673         (operator==(const range_bounds &, const range_bounds &)): Declare.
14674         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14675
14676 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14677
14678         * s390-linux-tdep.c (s390_record_address_mask)
14679         (s390_record_calc_disp_common, s390_record_calc_disp)
14680         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14681         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14682         (s390_process_record): Move to s390-tdep.c.
14683         (s390_linux_init_abi_any): Adjust.
14684         * s390-tdep.c (s390_record_address_mask)
14685         (s390_record_calc_disp_common, s390_record_calc_disp)
14686         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14687         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14688         (s390_process_record): Moved from s390-linux-tdep.c
14689         (s390_gdbarch_init): Adjust.
14690
14691 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14692
14693         * s390-linux-nat.c (s390-tdep.h): New include.
14694         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14695         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14696         (ALLDEPFILES): Add s390-tdep.c.
14697         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14698         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14699         * s390-tdep.h: ...this.  New file.
14700         * s390-linux-tdep.c (s390-tdep.h): New include.
14701         (_initialize_s390_tdep): Rename to...
14702         (_initialize_s390_linux_tdep): ...this and adjust.
14703         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14704         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14705         s390-tdep.h.
14706         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14707         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14708         (s390_is_partial_instruction, s390_software_single_step)
14709         (is_non_branch_ril, s390_displaced_step_copy_insn)
14710         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14711         (s390_prologue_data, s390_addr, s390_store, s390_load)
14712         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14713         (s390_register_call_saved, s390_guess_tracepoint_registers)
14714         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14715         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14716         (s390_pseudo_register_name, s390_pseudo_register_type)
14717         (s390_pseudo_register_read, s390_pseudo_register_write)
14718         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14719         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14720         (s390_addr_bits_remove, s390_address_class_type_flags)
14721         (s390_address_class_type_flags_to_name)
14722         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14723         (s390_function_arg_float, s390_function_arg_vector)
14724         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14725         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14726         (s390_frame_align, s390_register_return_value, s390_return_value)
14727         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14728         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14729         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14730         (s390_trad_frame_prev_register, s390_unwind_cache)
14731         (s390_prologue_frame_unwind_cache)
14732         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14733         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14734         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14735         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14736         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14737         (s390_frame_base_address, s390_local_base_address)
14738         (s390_frame_base, s390_gcc_target_options)
14739         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14740         (s390_validate_reg_range, s390_tdesc_valid)
14741         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14742         * s390-tdep.c: ...this.  New file.
14743
14744 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14745
14746         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14747         (s390_process_record, s390_gdbarch_tdep_alloc)
14748         (s390_linux_init_abi_any): Use/set new hook.
14749
14750 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14751
14752         * s390-linux-tdep.c (osabi.h): New include.
14753         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14754         (s390_linux_init_abi_any): New functions.
14755         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14756
14757 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14758
14759         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14760         tdesc_has_registers check
14761
14762 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14763
14764         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14765         (s390_validate_reg_range): New macro.
14766         (s390_gdbarch_init): Adjust.
14767
14768 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14769
14770         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14771         (s390_gdbarch_tdep_alloc): Adjust.
14772         (s390_gdbarch_init): Adjust.
14773
14774 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14775
14776         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14777         <have_tdb>: Change type to bool.
14778         (s390_gdbarch_tdep_alloc): Adjust.
14779         (s390_gdbarch_init): Adjust.
14780
14781 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14782
14783         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14784         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14785         (s390_gdbarch_tdep_alloc): New function.
14786         (s390_gdbarch_init): Allocate tdep at start and use its fields
14787         instead of separate variables.
14788
14789 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14790
14791         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14792         when looking for cached gdbarch and add comment for remaining.
14793
14794 2018-01-22  Pedro Alves  <palves@redhat.com>
14795             Sergio Durigan Junior  <sergiodj@redhat.com>
14796
14797         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14798         case.
14799
14800 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14801
14802         * MAINTAINERS: Update my company e-mail address.
14803
14804 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14805
14806         * regcache.c (cooked_write_test): New function.
14807         (_initialize_regcache): Register the test.
14808
14809 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14810
14811         * ia64-tdep.c (ia64_pseudo_register_read): Call
14812         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14813         * m32c-tdep.c (m32c_cat_read): Likewise.
14814         (m32c_r3r2r1r0_read): Likewise.
14815         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14816         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14817
14818 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14819
14820         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14821         method raw_read instead of regcache_raw_read.
14822         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14823         * arm-tdep.c (arm_neon_quad_read): Likewise.
14824         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14825         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14826         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14827         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14828         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14829         (i386_pseudo_register_read_into_value): Likewise.
14830         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14831         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14832         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14833         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14834         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14835         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14836         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14837         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14838         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14839
14840 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14841
14842         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14843         * configure.tgt: Remove target mt.
14844         * mt-tdep.c: Remove.
14845         * regcache.c (cooked_read_test): Remove the check for mt.
14846
14847 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14848
14849         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14850         instead of gdbarch_pseudo_register_read_value.
14851
14852 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14853
14854         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14855         language is Ada.
14856
14857 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14858
14859         * linespec.c (create_sals_line_offset): Remove code that preserved
14860         the symtab_and_line's line number.
14861
14862 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14863
14864         * varobj.c (varobj_create): Don't set valid_block when creating a
14865         floating varobj.
14866
14867 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14868
14869         * varobj.c (varobj_create): Remove out of date comment.
14870
14871 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14872
14873         PR mi/20395
14874         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14875         updating innermost block.
14876         * parse.c (innermost_block_tracker::update): Take extra type
14877         parameter, and check types match before updating innermost block.
14878         (write_dollar_variable): Update innermost block for registers.
14879         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14880         (innermost_block_tracker::innermost_block_tracker): Initialise
14881         m_types member.
14882         (innermost_block_tracker::reset): Take type parameter.
14883         (innermost_block_tracker::update): Take type parameter, and pass
14884         type through as needed.
14885         (innermost_block_tracker::m_types): New member.
14886         * varobj.c (varobj_create): Pass type when reseting innermost
14887         block.
14888
14889 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14890
14891         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14892         * ada-lang.c (resolve_subexp): Likewise.
14893         * breakpoint.c (set_breakpoint_condition) Likewise.
14894         (watch_command_1) Likewise.
14895         * c-exp.y (variable): Likewise.
14896         * d-exp.y (PrimaryExpression): Likewise.
14897         * f-exp.y (variable): Likewise.
14898         * go-exp.y (variable): Likewise.
14899         * m2-exp.y (variable): Likewise.
14900         * objfiles.c (objfile::~objfile): Likewise.
14901         * p-exp.y (variable): Likewise.
14902         * parse.c (innermost_block): Change type.
14903         * parser-defs.h (class innermost_block_tracker): New.
14904         (innermost_block): Change to innermost_block_tracker.
14905         * printcmd.c (display_command): Switch to innermost_block API.
14906         (do_one_display): Likewise.
14907         * rust-exp.y (do_one_display): Likewise.
14908         * symfile.c (clear_symtab_users): Likewise.
14909         * varobj.c (varobj_create): Switch to innermost_block API, replace
14910         use of innermost_block with block stored on varobj object.
14911
14912 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14913
14914         * expression.h (innermost_block): Remove declaration.
14915         * varobj.c: Add 'parser-defs.h' include.
14916
14917 2018-01-19  Tom Tromey  <tom@tromey.com>
14918
14919         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14920         symbols in the static and global blocks.
14921
14922 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14923
14924         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14925         gdb_ptrace.h, and move including gdb_wait.h ...
14926         * nat/linux-ptrace.h: ... to here.
14927
14928 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14929
14930         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14931         inf_ptrace_detach_success.
14932         (inf_ptrace_detach_success): Add inferior parameter, use it
14933         instead of inferior_ptid, pass it to detach_inferior.
14934         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14935         parameter.
14936         * inferior.c (detach_inferior): Add overload that takes an
14937         inferior object.
14938         * inferior.h (detach_inferior): Likewise.
14939         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14940         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14941         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14942
14943 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14944
14945         * target.h (struct target_ops) <to_detach>: Add inferior
14946         parameter.
14947         (target_detach): Likewise.
14948         * target.c (dispose_inferior): Pass inferior down.
14949         (target_detach): Pass inferior down.  Assert that it is equal to
14950         the current inferior.
14951         * aix-thread.c (aix_thread_detach): Pass inferior down.
14952         * corefile.c (core_file_command): Pass current_inferior() down.
14953         * corelow.c (core_detach): Add inferior parameter.
14954         * darwin-nat.c (darwin_detach): Likewise.
14955         * gnu-nat.c (gnu_detach): Likewise.
14956         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14957         * infcmd.c (detach_command): Pass current_inferior() down to
14958         target_detach.
14959         * infrun.c (follow_fork_inferior): Pass parent_inf to
14960         target_detach.
14961         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14962         target_detach.
14963         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14964         * linux-thread-db.c (thread_db_detach): Likewise.
14965         * nto-procfs.c (procfs_detach): Likewise.
14966         * procfs.c (procfs_detach): Likewise.
14967         * record.c (record_detach): Likewise.
14968         * record.h (struct inferior): Forward-declare.
14969         (record_detach): Add inferior parameter.
14970         * remote-sim.c (gdbsim_detach): Likewise.
14971         * remote.c (remote_detach_1): Likewise.
14972         (remote_detach): Likewise.
14973         (extended_remote_detach): Likewise.
14974         * sol-thread.c (sol_thread_detach): Likewise.
14975         * target-debug.h (target_debug_print_inferior_p): New macro.
14976         * target-delegates.c: Re-generate.
14977         * top.c (kill_or_detach): Pass inferior down to target_detach.
14978         * windows-nat.c (windows_detach): Add inferior parameter.
14979
14980 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14981
14982         * target.h (struct target_ops) <to_detach>: Remove args
14983         parameter.
14984         (target_detach): Likewise.
14985         * target.c (dispose_inferior): Adjust.
14986         (target_detach): Remove args parameter, adjust.
14987         * aix-thread.c (aix_thread_detach): Adjust.
14988         * corefile.c (core_file_command): Adjust.
14989         * corelow.c (core_detach): Adjust.
14990         * darwin-nat.c (darwin_detach): Adjust.
14991         * gnu-nat.c (gnu_detach): Adjust.
14992         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14993         * infcmd.c (detach_command): Adjust
14994         * infrun.c (follow_fork_inferior): Adjust.
14995         (handle_vfork_child_exec_or_exit): Adjust.
14996         * linux-fork.c (linux_fork_detach): Remove args parameter.
14997         * linux-fork.h (linux_fork_detach): Likewise.
14998         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14999         * linux-thread-db.c (thread_db_detach): Likewise.
15000         * nto-procfs.c (procfs_detach): Likewise.
15001         * procfs.c (procfs_detach): Likewise.
15002         (do_detach): Remove signo parameter.
15003         * record.c (record_detach): Remove args parameter.
15004         * record.h (record_detach): Likewise.
15005         * remote-sim.c (gdbsim_detach): Likewise.
15006         * remote.c (remote_detach_1): Likewise.
15007         (remote_detach): Likewise.
15008         (extended_remote_detach): Likewise.
15009         * sol-thread.c (sol_thread_detach): Likewise.
15010         * target-delegates.c: Re-generate.
15011         * top.c (struct qt_args) <args>: Remove field.
15012         (kill_or_detach): Don't pass args.
15013         (quit_force): Don't set args.
15014         * windows-nat.c (windows_detach): Remove args parameter.
15015
15016 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15017
15018         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
15019         (arm_linux_init_abi): Install it.
15020
15021 2018-01-19  Yao Qi  <yao.qi@linaro.org>
15022
15023         * osabi.c (gdb_osabi_names): Extend the regexp for
15024         arm-linux-gnueabihf.
15025
15026 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15027
15028         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
15029         m_abbrevs.
15030         (abbrev_table::add_abbrev): Update.
15031         (abbrev_table::lookup_abbrev): Update.
15032
15033 2018-01-18  Yao Qi  <yao.qi@linaro.org>
15034
15035         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
15036
15037 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
15038
15039         * compile/compile.c (compile_to_object): Convert "triplet_rx"
15040         to "std::string".
15041
15042 2018-01-17  Tom Tromey  <tom@tromey.com>
15043
15044         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
15045
15046 2018-01-17  Tom Tromey  <tom@tromey.com>
15047
15048         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
15049         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
15050         (create_array_type_with_stride): Update.
15051         * dwarf2read.c (set_die_type): Update.
15052
15053 2018-01-17  Tom Tromey  <tom@tromey.com>
15054
15055         * dwarf2read.c (delayed_method_info): Remove typedef.
15056         (dwarf2_cu::method_info): Now a std::vector.
15057         (add_to_method_list): Update.
15058         (free_delayed_list): Remove.
15059         (compute_delayed_physnames): Update.
15060         (process_full_comp_unit, process_full_type_unit): Clear the method
15061         list.  Remove cleanups.
15062         (psymtab_include_file_name): Add name_holder parameter.  Use
15063         unique_xmalloc_ptr.
15064         (dwarf_decode_lines): Update.
15065
15066 2018-01-17  Tom Tromey  <tom@tromey.com>
15067             Simon Marchi  <simon.marchi@ericsson.com>
15068
15069         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
15070         (dwarf2_per_objfile::free_cached_comp_units)
15071         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15072         (init_cutu_and_read_dies_no_follow): Update.
15073         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
15074         (dwarf2_cu::~dwarf2_cu): New.
15075         (free_heap_comp_unit, free_stack_comp_unit): Remove.
15076         (age_cached_comp_units, free_one_cached_comp_unit): Update.
15077
15078 2018-01-17  Tom Tromey  <tom@tromey.com>
15079             Simon Marchi  <simon.marchi@ericsson.com>
15080
15081         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
15082         (struct die_reader_specs) <abbrev_table>: New member.
15083         (struct abbrev_table): Add constructor.
15084         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
15085         <abbrev_obstack>: Now an auto_obstack.
15086         (abbrev_table_up): New typedef.
15087         (init_cu_die_reader): Add abbrev_table parameter.
15088         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
15089         Add result_dwo_abbrev_table.
15090         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
15091         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
15092         Update.
15093         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
15094         parameter.
15095         (skip_children): Update.
15096         (abbrev_table::alloc_abbrev): Rename from
15097         abbrev_table_alloc_abbrev.
15098         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
15099         (abbrev_table::lookup_abbrev): Rename from
15100         abbrev_table_lookup_abbrev.
15101         (abbrev_table_read_table): Return abbrev_table_up.
15102         (abbrev_table_free, abbrev_table_free_cleanup)
15103         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
15104         (load_partial_dies): Update.
15105
15106 2018-01-17  Tom Tromey  <tom@tromey.com>
15107
15108         * dwarf2read.c (dwarf2_compute_name): Update comment.
15109         (read_func_scope, read_variable): Update.
15110         (new_symbol): Remove.
15111         (new_symbol_full): Rename to new_symbol.
15112
15113 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
15114
15115         PR gdb/16577
15116         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
15117         a warning instead of throwing an error, set section size to 0 and return
15118         NULL.
15119         * gdb_bfd.h (gdb_bfd_map_section): Update description.
15120
15121 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15122
15123         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
15124         std::string.
15125         (linux_ptrace_attach_fail_reason_string): Likewise.
15126         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
15127         Likewise.
15128         (linux_ptrace_attach_fail_reason_string): Likewise.
15129         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
15130
15131 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
15132
15133         * linux-nat.c (linux_nat_attach): Remove xstrdup.
15134
15135 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
15136
15137         PR gdb/21559
15138         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
15139         checking for fs_base/gs_base fields in struct user_regs_struct.
15140         * configure: Regenerate.
15141
15142 2018-01-17  Yao Qi  <yao.qi@linaro.org>
15143
15144         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
15145         function.
15146         (aarch64_linux_init_abi): Install it to gdbarch hook
15147         gcc_target_options.
15148
15149 2018-01-15  Pedro Alves  <palves@redhat.com>
15150
15151         * common/signals-state-save-restore.c
15152         (save_original_signals_state): Fix typos.
15153
15154 2017-01-12  Tom Tromey  <tom@tromey.com>
15155             Sergio Durigan Junior  <sergiodj@redhat.com>
15156
15157         * Makefile.in (install-only): Install gdb-add-index.
15158
15159 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
15160
15161         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
15162
15163 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15164
15165         * infrun.c (keep_going_pass_signal): Clear step-over info when
15166         insert_breakpoints fails.
15167
15168 2018-01-11  Pedro Alves  <palves@redhat.com>
15169
15170         PR gdb/22583
15171         * infrun.c (resume): Rename to ...
15172         (resume_1): ... this.
15173         (resume): Reimplement as wrapper around resume_1.
15174
15175 2018-01-11  Pedro Alves  <palves@redhat.com>
15176
15177         PR remote/22597
15178         * remote.c (remote_parse_stop_reply): Default to the last-set
15179         general thread instead of to 'magic_null_ptid'.
15180
15181 2018-01-10  Pedro Alves  <palves@redhat.com>
15182
15183         * language.h (language_get_symbol_name_matcher): Rename ...
15184         (get_symbol_name_matcher): ... this.
15185         * language.c (language_get_symbol_name_matcher): Ditto.
15186         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
15187         callers adjusted.
15188
15189 2018-01-10  Pedro Alves  <palves@redhat.com>
15190
15191         PR gdb/22670
15192         * dwarf2read.c
15193         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
15194         Adjust to use language_get_symbol_name_matcher instead of
15195         language_defn::la_get_symbol_name_matcher.
15196         * language.c (language_get_symbol_name_matcher): If in Ada mode
15197         and the lookup name is a verbatim match, return Ada's matcher.
15198         * language.h (language_get_symbol_name_matcher): Adjust comment.
15199         (ada_lookup_name_info::verbatim_p):: New method.
15200
15201 2018-01-10  Pedro Alves  <palves@redhat.com>
15202
15203         PR gdb/22670
15204         * ada-lang.c (ada_collect_symbol_completion_matches): If the
15205         minsym's language is language_auto or language_cplus, pass down
15206         language_ada instead.
15207         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15208
15209 2018-01-10  Pedro Alves  <palves@redhat.com>
15210
15211         PR gdb/22670
15212         * minsyms.c (linkage_name_str): New function.
15213         (iterate_over_minimal_symbols): Use it.
15214
15215 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15216
15217         * NEWS: Document that 'info proc' now works on FreeBSD.
15218
15219 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15220
15221         * configure.ac: Check for kinfo_getfile in libutil.
15222         * configure: Regenerate.
15223         * config.in: Regenerate.
15224         * fbsd-nat.c: Include "fbsd-tdep.h".
15225         (fbsd_fetch_cmdline): New.
15226         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15227         rather than calling error.
15228         (fbsd_info_proc): New.
15229         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15230         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15231         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15232
15233 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15234
15235         * fbsd-nat.c (struct free_deleter): Remove.
15236         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15237
15238 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15239
15240         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15241         NULL for an empty pathname.
15242
15243 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15244
15245         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15246         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15247         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15248         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15249         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15250         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15251         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15252         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15253         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15254         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15255         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15256         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15257         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15258         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15259         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15260
15261 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15262
15263         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15264         (gnu_xfer_auxv): New function.
15265         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15266         TARGET_OBJECT_AUXV.
15267
15268 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15269             Simon Marchi  <simon.marchi@ericsson.com>
15270
15271         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15272         common/selftest.c.
15273         (COMMON_OBS): Remove selftest.o.
15274         * configure.ac: Append selftest-arch.c and common/selftest.c to
15275         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15276         * configure: Re-generated.
15277         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15278         GDB_SELF_TEST.
15279         (maintenance_info_selftests): Likewise.
15280
15281 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15282
15283         * ada-valprint.c (val_print_packed_array_elements): Use
15284         proper number of elements when printing an array indexed
15285         by an enumeration type.
15286
15287 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15288
15289         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15290         (dw2_get_file_names_reader): Adjust.
15291         (lookup_dwo_signatured_type): Adjust.
15292         (lookup_dwp_signatured_type): Adjust.
15293         (lookup_signatured_type): Adjust.
15294         (create_type_unit_group): Adjust.
15295         (get_type_unit_group): Adjust.
15296         (process_psymtab_comp_unit_reader): Adjust.
15297         (build_type_psymtabs_reader): Adjust.
15298         (scan_partial_symbols): Adjust.
15299         (add_partial_symbol): Adjust.
15300         (add_partial_subprogram): Adjust.
15301         (peek_die_abbrev): Adjust.
15302         (fixup_go_packaging): Adjust.
15303         (process_imported_unit_die): Adjust.
15304         (dwarf2_compute_name): Adjust.
15305         (dwarf2_physname): Adjust.
15306         (read_import_statement): Adjust.
15307         (handle_DW_AT_stmt_list): Adjust.
15308         (read_file_scope): Adjust.
15309         (read_func_scope): Adjust.
15310         (read_lexical_block_scope): Adjust.
15311         (read_call_site_scope): Adjust.
15312         (read_variable): Adjust.
15313         (dwarf2_rnglists_process): Adjust.
15314         (dwarf2_ranges_process): Adjust.
15315         (dwarf2_ranges_read): Adjust.
15316         (dwarf2_get_pc_bounds): Adjust.
15317         (dwarf2_record_block_ranges): Adjust.
15318         (dwarf2_add_field): Adjust.
15319         (dwarf2_add_member_fn): Adjust.
15320         (read_structure_type): Adjust.
15321         (process_structure_scope): Adjust.
15322         (read_enumeration_type): Adjust.
15323         (read_array_type): Adjust.
15324         (mark_common_block_symbol_computed): Adjust.
15325         (read_common_block): Adjust.
15326         (read_namespace_type): Adjust.
15327         (read_namespace): Adjust.
15328         (read_module_type): Adjust.
15329         (read_tag_pointer_type): Adjust.
15330         (read_tag_ptr_to_member_type): Adjust.
15331         (read_tag_string_type): Adjust.
15332         (read_subroutine_type): Adjust.
15333         (read_typedef): Adjust.
15334         (read_base_type): Adjust.
15335         (attr_to_dynamic_prop): Adjust.
15336         (read_subrange_type): Adjust.
15337         (read_unspecified_type): Adjust.
15338         (dwarf2_read_abbrevs): Adjust.
15339         (load_partial_dies): Adjust.
15340         (read_partial_die): Adjust.
15341         (find_partial_die): Adjust.
15342         (guess_partial_die_structure_name): Adjust.
15343         (fixup_partial_die): Adjust.
15344         (read_attribute_value): Adjust.
15345         (read_addr_index): Adjust.
15346         (read_addr_index_from_leb128): Adjust.
15347         (read_str_index): Adjust.
15348         (dwarf2_string_attr): Adjust.
15349         (get_debug_line_section): Adjust.
15350         (dwarf_decode_line_header): Adjust.
15351         (lnp_state_machine::check_line_address): Adjust.
15352         (dwarf_decode_lines_1): Adjust.
15353         (dwarf_decode_lines): Adjust.
15354         (dwarf2_start_symtab): Adjust.
15355         (var_decode_location): Adjust.
15356         (new_symbol_full): Adjust.
15357         (dwarf2_const_value_data): Adjust.
15358         (dwarf2_const_value_attr): Adjust.
15359         (dwarf2_const_value): Adjust.
15360         (die_type): Adjust.
15361         (die_containing_type): Adjust.
15362         (build_error_marker_type): Adjust.
15363         (lookup_die_type): Adjust.
15364         (guess_full_die_structure_name): Adjust.
15365         (anonymous_struct_prefix): Adjust.
15366         (determine_prefix): Adjust.
15367         (dwarf2_name): Adjust.
15368         (follow_die_ref_or_sig): Adjust.
15369         (follow_die_offset): Adjust.
15370         (follow_die_ref): Adjust.
15371         (follow_die_sig_1): Adjust.
15372         (follow_die_sig): Adjust.
15373         (get_signatured_type): Adjust.
15374         (get_DW_AT_signature_type): Adjust.
15375         (decode_locdesc): Adjust.
15376         (dwarf_decode_macros): Adjust.
15377         (cu_debug_loc_section): Adjust.
15378         (fill_in_loclist_baton): Adjust.
15379         (dwarf2_symbol_mark_computed): Adjust.
15380         (init_one_comp_unit): Don't assign
15381         dwarf2_cu::dwarf2_per_objfile.
15382         (set_die_type): Adjust.
15383
15384 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15385
15386         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15387         <dwarf2_per_objfile>: New field.
15388         (dwarf2_per_objfile): Remove global.
15389         (get_dwarf2_per_objfile): New function.
15390         (set_dwarf2_per_objfile): New function.
15391         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15392         dwarf2_per_objfile.
15393         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15394         (read_abbrev_offset): Likewise.
15395         (read_indirect_string): Likewise.
15396         (read_indirect_line_string): Likewise.
15397         (read_indirect_string_at_offset): Likewise.
15398         (read_indirect_string_from_dwz): Likewise.
15399         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15400         dwarf2_per_objfile.
15401         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15402         (create_all_comp_units): Change objfile parameter to
15403         dwarf2_per_objfile.
15404         (create_all_type_units): Likewise.
15405         (process_queue): Add dwarf2_per_objfile parameter.
15406         (read_and_check_comp_unit_head): Likewise.
15407         (lookup_dwo_unit_in_dwp): Likewise.
15408         (get_dwp_file): Likewise.
15409         (process_cu_includes): Likewise.
15410         (struct free_dwo_file_cleanup_data): New struct.
15411         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15412         set_dwarf2_per_objfile.
15413         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15414         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15415         context, adjust calls.
15416         (dw2_instantiate_symtab): Likewise.
15417         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15418         (dw2_get_cu): Likewise.
15419         (create_cu_from_index_list): Change objfile parameter to
15420         dwarf2_per_objfile.
15421         (create_cus_from_index_list): Get dwarf2_per_objfile from
15422         context, adjust calls.
15423         (create_cus_from_index): Likewise.
15424         (create_signatured_type_table_from_index): Change objfile
15425         parameter to dwarf2_per_objfile.
15426         (create_signatured_type_table_from_debug_names): Change objfile
15427         parameter to dwarf2_per_objfile.
15428         (create_addrmap_from_index): Likewise.
15429         (create_addrmap_from_aranges): Likewise.
15430         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15431         (dw2_setup): Remove.
15432         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15433         context.
15434         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15435         get_dwarf2_per_objfile.
15436         (dw2_forget_cached_source_info): Likewise.
15437         (dw2_map_symtabs_matching_filename): Likewise.
15438         (struct dw2_symtab_iterator) <index>: Remove.
15439         <dwarf2_per_objfile>: New field.
15440         (dw2_symtab_iter_init): Replace index parameter with
15441         dwarf2_per_objfile.
15442         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15443         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15444         (dw2_print_stats): Likewise.
15445         (dw2_dump): Likewise.
15446         (dw2_expand_symtabs_for_function): Likewise.
15447         (dw2_expand_all_symtabs): Likewise.
15448         (dw2_expand_symtabs_with_fullname): Likewise.
15449         (dw2_expand_marked_cus): Replace index and objfile parameters
15450         with dwarf2_per_objfile.
15451         (dw_expand_symtabs_matching_file_matcher): Add
15452         dwarf2_per_objfile parameter and adjust calls.
15453         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15454         adjust calls.
15455         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15456         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15457         adjust calls.
15458         (create_cus_from_debug_names_list): Replace objfile parameter
15459         with dwarf2_per_objfile and adjust calls.
15460         (create_cus_from_debug_names): Likewise.
15461         (dwarf2_read_debug_names): Likewise.
15462         (mapped_debug_names::namei_to_name): Adjust call.
15463         (dw2_debug_names_iterator::next): Likewise.
15464         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15465         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15466         (dw2_debug_names_dump): Likewise.
15467         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15468         (dw2_debug_names_expand_symtabs_matching): Likewise.
15469         (dwarf2_initialize_objfile): Likewise.
15470         (dwarf2_build_psymtabs): Likewise.
15471         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15472         this_cu.
15473         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15474         (read_and_check_comp_unit_head): Likewise.
15475         (read_abbrev_offset): Likewise.
15476         (create_debug_type_hash_table): Likewise.
15477         (create_debug_types_hash_table): Likewise.
15478         (create_all_type_units): Replace objfile parameter with
15479         dwarf2_per_objfile.
15480         (add_type_unit): Add dwarf2_per_objfile parameter.
15481         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15482         with dwarf2_per_objfile.
15483         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15484         (lookup_dwp_signatured_type): Likewise.
15485         (lookup_signatured_type): Likewise.
15486         (read_cutu_die_from_dwo): Likewise.
15487         (init_tu_and_read_dwo_dies): Likewise.
15488         (init_cutu_and_read_dies): Likewise.
15489         (init_cutu_and_read_dies_no_follow): Likewise.
15490         (allocate_type_unit_groups_table): Add objfile parameter.
15491         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15492         (get_type_unit_group): Likewise.
15493         (process_psymtab_comp_unit): Update call.
15494         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15495         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15496         (print_tu_stats): Likewise.
15497         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15498         in void* parameter.
15499         (build_type_psymtabs): Change objfile parameter to
15500         dwarf2_per_objfile.
15501         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15502         passed in void* parameter.
15503         (process_skeletonless_type_units): Change objfile parameter to
15504         dwarf2_per_objfile.
15505         (set_partial_user): Likewise.
15506         (dwarf2_build_psymtabs_hard): Likewise.
15507         (read_comp_units_from_section): Likewise.
15508         (create_all_comp_units): Likewise.
15509         (scan_partial_symbols): Update calls.
15510         (add_partial_symbol): Likewise.
15511         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15512         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15513         (process_queue): Add dwarf2_per_objfile parameter.
15514         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15515         (compute_compunit_symtab_includes): Likewise.
15516         (process_cu_includes): Add dwarf2_per_objfile parameter.
15517         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15518         (process_full_type_unit): Likewise.
15519         (process_imported_unit_die): Update call.
15520         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15521         (read_file_scope): Likewise.
15522         (allocate_dwo_file_hash_table): Add objfile parameter.
15523         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15524         (create_cus_hash_table): Likewise.
15525         (create_dwp_hash_table): Likewise.
15526         (create_dwo_unit_in_dwp_v1): Likewise.
15527         (create_dwp_v2_section): Likewise.
15528         (create_dwo_unit_in_dwp_v2): Likewise.
15529         (lookup_dwo_unit_in_dwp): Likewise.
15530         (try_open_dwop_file): Likewise.
15531         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15532         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15533         cleanup to include a reference to dwarf2_per_objfile.
15534         (open_dwp_file): Add dwarf2_per_objfile parameter.
15535         (open_and_init_dwp_file): Likewise.
15536         (get_dwp_file): Likewise.
15537         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15538         (queue_and_load_all_dwo_tus): Update call.
15539         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15540         data.
15541         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15542         (dwarf2_ranges_process): Likewise.
15543         (dwarf2_get_pc_bounds): Likewise.
15544         (mark_common_block_symbol_computed): Likewise.
15545         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15546         (dwarf2_read_abbrevs): Update call.
15547         (read_partial_die): Use dwarf2_per_objfile from cu.
15548         (find_partial_die): Likewise.
15549         (fixup_partial_die): Likewise.
15550         (read_attribute_value): Likewise.
15551         (read_indirect_string_at_offset_from): Add objfile parameter.
15552         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15553         parameter.
15554         (read_indirect_string_from_dwz): Add objfile parameter.
15555         (read_indirect_string): Add objfile parameter.
15556         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15557         (read_addr_index): Use dwarf2_per_objfile from cu.
15558         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15559         call dw2_setup.
15560         (read_str_index): Use dwarf2_per_objfile from cu.
15561         (get_debug_line_section): Likewise.
15562         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15563         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15564         (new_symbol_full): Use dwarf2_per_objfile from cu.
15565         (build_error_marker_type): Likewise.
15566         (lookup_die_type): Likewise.
15567         (determine_prefix): Likewise.
15568         (follow_die_offset): Likewise.
15569         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15570         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15571         (dwarf2_fetch_die_type_sect_off): Likewise.
15572         (dwarf2_get_die_type): Likewise.
15573         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15574         (get_signatured_type): Likewise.
15575         (get_DW_AT_signature_type): Likewise.
15576         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15577         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15578         (cu_debug_loc_section): Likewise.
15579         (fill_in_loclist_baton): Likewise.
15580         (dwarf2_symbol_mark_computed): Likewise.
15581         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15582         dwarf2_per_objfile.
15583         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15584         parameter.
15585         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15586         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15587         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15588         (set_die_type): Use dwarf2_free_objfile from cu.
15589         (get_die_type_at_offset): Likewise.
15590         (dwarf2_per_objfile_free): Don't assign global variable.
15591         (debug_names) <constructor>: Add dwarf2_per_objfile
15592         parameter, update m_debugstrlookup construction.
15593         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15594         parameter.
15595         <m_dwarf2_per_objfile>: New field.
15596         <lookup>: Use m_dwarf2_per_objfile.
15597         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15598         (psyms_seen_size): Likewise.
15599         (write_gdbindex): Replace objfile parameter with
15600         dwarf2_per_objfile.
15601         (write_debug_names): Likewise.
15602         (write_psymtabs_to_index): Likewise.
15603         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15604         calls.
15605
15606 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15607
15608         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15609         <dwarf2_per_objfile>: New field.
15610         (struct dwarf2_per_cu_data) <objfile>: Remove.
15611         <dwarf2_per_objfile>: New field.
15612         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15613         of objfile.
15614         (create_signatured_type_table_from_index): Likewise.
15615         (create_debug_type_hash_table): Likewise.
15616         (fill_in_sig_entry_from_dwo_entry): Likewise.
15617         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15618         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15619         objfile.
15620         (create_partial_symtab): Access objfile through
15621         dwarf2_per_objfile.
15622         (process_psymtab_comp_unit_reader): Likewise.
15623         (read_comp_units_from_section): Likewise.
15624         (scan_partial_symbols): Likewise.
15625         (add_partial_symbol): Likewise.
15626         (add_partial_subprogram): Likewise.
15627         (peek_die_abbrev): Likewise.
15628         (fixup_go_packaging): Likewise.
15629         (process_full_comp_unit): Likewise.
15630         (process_full_type_unit): Likewise.
15631         (process_imported_unit_die): Likewise.
15632         (dwarf2_compute_name): Likewise.
15633         (dwarf2_physname): Likewise.
15634         (read_import_statement): Likewise.
15635         (create_cus_hash_table): Assign dwarf2_physname instead of
15636         objfile.
15637         (read_func_scope): Access objfile through dwarf2_per_objfile.
15638         (read_lexical_block_scope): Likewise.
15639         (read_call_site_scope): Likewise.
15640         (read_variable): Likewise.
15641         (dwarf2_rnglists_process): Likewise.
15642         (dwarf2_ranges_process): Likewise.
15643         (dwarf2_ranges_read): Likewise.
15644         (dwarf2_record_block_ranges): Likewise.
15645         (dwarf2_add_field): Likewise.
15646         (dwarf2_add_member_fn): Likewise.
15647         (read_structure_type): Likewise.
15648         (process_structure_scope): Likewise.
15649         (read_enumeration_type): Likewise.
15650         (read_array_type): Likewise.
15651         (read_common_block): Likewise.
15652         (read_namespace_type): Likewise.
15653         (read_namespace): Likewise.
15654         (read_module_type): Likewise.
15655         (read_tag_pointer_type): Likewise.
15656         (read_tag_ptr_to_member_type): Likewise.
15657         (read_tag_string_type): Likewise.
15658         (read_subroutine_type): Likewise.
15659         (read_typedef): Likewise.
15660         (read_base_type): Likewise.
15661         (attr_to_dynamic_prop): Likewise.
15662         (read_subrange_type): Likewise.
15663         (read_unspecified_type): Likewise.
15664         (load_partial_dies): Likewise.
15665         (read_partial_die): Likewise.
15666         (find_partial_die): Likewise.
15667         (guess_partial_die_structure_name): Likewise.
15668         (fixup_partial_die): Likewise.
15669         (read_attribute_value): Likewise.
15670         (read_addr_index_from_leb128): Likewise.
15671         (dwarf2_read_addr_index): Likewise.
15672         (dwarf2_string_attr): Likewise.
15673         (lnp_state_machine::check_line_address): Likewise.
15674         (dwarf_decode_lines_1): Likewise.
15675         (dwarf_decode_lines): Likewise.
15676         (dwarf2_start_symtab): Likewise.
15677         (var_decode_location): Likewise.
15678         (new_symbol_full): Likewise.
15679         (dwarf2_const_value_data): Likewise.
15680         (dwarf2_const_value_attr): Likewise.
15681         (dwarf2_const_value): Likewise.
15682         (die_type): Likewise.
15683         (die_containing_type): Likewise.
15684         (lookup_die_type): Likewise.
15685         (guess_full_die_structure_name): Likewise.
15686         (anonymous_struct_prefix): Likewise.
15687         (dwarf2_name): Likewise.
15688         (follow_die_ref_or_sig): Likewise.
15689         (follow_die_offset): Likewise.
15690         (follow_die_ref): Likewise.
15691         (dwarf2_fetch_die_loc_sect_off): Likewise.
15692         (dwarf2_fetch_constant_bytes): Likewise.
15693         (dwarf2_fetch_die_type_sect_off): Likewise.
15694         (dwarf2_get_die_type): Likewise.
15695         (follow_die_sig): Likewise.
15696         (decode_locdesc): Likewise.
15697         (dwarf2_per_cu_objfile): Likewise.
15698         (dwarf2_per_cu_text_offset): Likewise.
15699         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15700         objfile.
15701         (set_die_type): Access objfile through
15702         dwarf2_per_objfile.
15703
15704 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15705
15706         * valprint.c (converted_character_d): Remove typedef.
15707         (DEF_VEC_O (converted_character_d)): Remove.
15708         (count_next_character): Use std::vector.
15709         (print_converted_chars_to_obstack): Likewise.
15710         (generic_printstr): Likewise.
15711
15712 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15713
15714         * xml-support.h (struct gdb_xml_value): Add constructor.
15715         <value>: Change type to unique_xmalloc_ptr.
15716         (gdb_xml_value_s): Remove typedef.
15717         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15718         (gdb_xml_element_start_handler): Change parameter type to
15719         std::vector.
15720         (xml_find_attribute): Likewise.
15721         * xml-support.c (xml_find_attribute): Change parameter type to
15722         std::vector and adjust.
15723         (gdb_xml_values_cleanup): Remove.
15724         (gdb_xml_parser::start_element): Adjust to std::vector.
15725         (xinclude_start_include): Change paraeter type to std::vector
15726         and adjust.
15727         * btrace.c (check_xml_btrace_version): Likewise.
15728         (parse_xml_btrace_block): Likewise.
15729         (parse_xml_btrace_pt_config_cpu): Likewise.
15730         (parse_xml_btrace_pt): Likewise.
15731         (parse_xml_btrace_conf_bts): Likewise.
15732         (parse_xml_btrace_conf_pt): Likewise.
15733         * memory-map.c (memory_map_start_memory): Likewise.
15734         (memory_map_start_property): Likewise.
15735         * osdata.c (osdata_start_osdata): Likewise.
15736         (osdata_start_item): Likewise.
15737         (osdata_start_column): Likewise.
15738         * remote.c (start_thread): Likewise.
15739         * solib-aix.c (library_list_start_library): Likewise.
15740         (library_list_start_list): Likewise.
15741         * solib-svr4.c (library_list_start_library): Likewise.
15742         (svr4_library_list_start_list): Likewise.
15743         * solib-target.c (library_list_start_segment): Likewise.
15744         (library_list_start_section): Likewise.
15745         (library_list_start_library): Likewise.
15746         (library_list_start_list): Likewise.
15747         * tracepoint.c (traceframe_info_start_memory): Likewise.
15748         (traceframe_info_start_tvar): Likewise.
15749         * xml-syscall.c (syscall_start_syscall): Likewise.
15750         * xml-tdesc.c (tdesc_start_target): Likewise.
15751         (tdesc_start_feature): Likewise.
15752         (tdesc_start_reg): Likewise.
15753         (tdesc_start_union): Likewise.
15754         (tdesc_start_struct): Likewise.
15755         (tdesc_start_flags): Likewise.
15756         (tdesc_start_enum): Likewise.
15757         (tdesc_start_field): Likewise.
15758         (tdesc_start_enum_value): Likewise.
15759         (tdesc_start_vector): Likewise.
15760
15761 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15762
15763         * extension.h (struct xmethod_worker) <clone>: Remove.
15764         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15765         Remove.
15766         (python_xmethod_worker::clone): Remove.
15767         * valops.c (find_overload_match): Use std::move instead of
15768         clone.
15769
15770 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15771
15772         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15773         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15774         <free_xmethod_worker_data>: Remove.
15775         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15776         <get_xmethod_arg_types>: Remove.
15777         <get_xmethod_result_type>: Remove.
15778         <invoke_xmethod>: Remove.
15779         * extension.c (new_xmethod_worker): Remove.
15780         (clone_xmethod_worker): Remove.
15781         (get_matching_xmethod_workers): Return void, pass std::vector by
15782         pointer.
15783         (get_xmethod_arg_types): Rename to...
15784         (xmethod_worker::get_arg_types): ... this, and adjust.
15785         (get_xmethod_result_type): Rename to...
15786         (xmethod_worker::get_result_type): ... this, and adjust.
15787         (invoke_xmethod): Remove.
15788         (free_xmethod_worker): Remove.
15789         (free_xmethod_worker_vec): Remove.
15790         * extension.h (enum ext_lang_rc): Move here from
15791         extension-priv.h.
15792         (struct xmethod_worker): Add constructor and destructor.
15793         <data>: Remove.
15794         <value>: Remove.
15795         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15796         virtual pure methods.
15797         <get_arg_types, get_result_type>: New methods.
15798         (xmethod_worker_ptr): Remove typedef.
15799         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15800         (xmethod_worker_vec): Remove typedef.
15801         (xmethod_worker_up): New typedef.
15802         (invoke_xmethod): Remove.
15803         (clone_xmethod_worker): Remove.
15804         (free_xmethod_worker): Remove.
15805         (free_xmethod_worker_vec): Remove.
15806         (get_xmethod_arg_types): Remove.
15807         (get_xmethod_result_type): Remove.
15808         * valops.c (find_method_list): Use std::vector, don't use
15809         intermediate vector.
15810         (value_find_oload_method_list): Use std::vector.
15811         (find_overload_match): Use std::vector.
15812         (find_oload_champ): Use std::vector.
15813         * value.c (value_free): Use operator delete.
15814         (value_of_xmethod): Rename to...
15815         (value_from_xmethod): ... this.  Don't assign
15816         xmethod_worker::value, take rvalue-reference.
15817         (result_type_of_xmethod): Adjust.
15818         (call_xmethod): Adjust.
15819         * value.h: Include extension.h.
15820         (struct xmethod_worker): Don't forward-declare.
15821         (value_of_xmethod): Rename to...
15822         (value_from_xmethod): ... this, take rvalue-reference.
15823         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15824         (struct python_xmethod_worker): ... this, add constructor and
15825         destructor.
15826         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15827         (gdbpy_free_xmethod_worker_data): Rename to...
15828         (python_xmethod_worker::~python_xmethod_worker): ... this and
15829         adjust.
15830         (gdbpy_clone_xmethod_worker_data): Rename to...
15831         (python_xmethod_worker::clone): ... this and adjust.
15832         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15833         temporary vector.
15834         (gdbpy_get_xmethod_arg_types): Rename to...
15835         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15836         (gdbpy_get_xmethod_result_type): Rename to...
15837         (python_xmethod_worker::do_get_result_type): ... this and
15838         adjust.
15839         (gdbpy_invoke_xmethod): Rename to...
15840         (python_xmethod_worker::invoke): ... this and adjust.
15841         (new_python_xmethod_worker): Rename to...
15842         (python_xmethod_worker::python_xmethod_worker): ... this and
15843         adjust.
15844         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15845         Remove.
15846         (gdbpy_free_xmethod_worker_data): Remove.
15847         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15848         (gdbpy_get_xmethod_arg_types): Remove.
15849         (gdbpy_get_xmethod_result_type): Remove.
15850         (gdbpy_invoke_xmethod): Remove.
15851         * python/python.c (python_extension_ops): Remove obsolete
15852         callbacks.
15853
15854 2018-01-05  Pedro Alves  <palves@redhat.com>
15855
15856         PR gdb/18653
15857         * common/signals-state-save-restore.c
15858         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15859         find a custom handler preinstalled, instead of internal erroring.
15860         But only warn if !quiet.
15861         * common/signals-state-save-restore.h
15862         (save_original_signals_state): New parameter 'quiet'.
15863         * main.c (captured_main_1): Move save_original_signals_state call
15864         after option handling, and pass QUIET.
15865
15866 2018-01-05  Pedro Alves  <palves@redhat.com>
15867
15868         * spu-tdep.c (spu_catch_start): Pass
15869         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15870
15871 2018-01-05  Pedro Alves  <palves@redhat.com>
15872
15873         PR gdb/22670
15874         * ada-lang.c (literal_symbol_name_matcher): New function.
15875         (ada_get_symbol_name_matcher): Use it for
15876         symbol_name_match_type::SEARCH_NAME.
15877         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15878         it down instead of assuming symbol_name_match_type::FULL.
15879         * block.h (block_lookup_symbol): New parameter 'match_type'.
15880         * c-valprint.c (print_unpacked_pointer): Use
15881         lookup_symbol_search_name instead of lookup_symbol.
15882         * compile/compile-object-load.c (get_out_value_type): Pass down
15883         symbol_name_match_type::SEARCH_NAME.
15884         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15885         symbol_name_match_type::FULL.
15886         * cp-support.c (cp_get_symbol_name_matcher): Handle
15887         symbol_name_match_type::SEARCH_NAME.
15888         * infrun.c (insert_exception_resume_breakpoint): Use
15889         lookup_symbol_search_name.
15890         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15891         * psymtab.c (maintenance_check_psymtabs): Use
15892         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15893         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15894         SYMBOL_SEARCH_NAME.
15895         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15896         if symbol_name_match_type::SEARCH_NAME.
15897         (lookup_symbol_in_language): Pass down
15898         symbol_name_match_type::FULL.
15899         (lookup_symbol_search_name): New.
15900         (lookup_language_this): Pass down
15901         symbol_name_match_type::SEARCH_NAME.
15902         (lookup_symbol_aux, lookup_local_symbol): New parameter
15903         'match_type'.  Pass it down.
15904         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15905         (lookup_symbol_search_name): New declaration.
15906         (lookup_symbol_in_block): New 'match_type' parameter.
15907
15908 2018-01-05  Pedro Alves  <palves@redhat.com>
15909
15910         PR gdb/22670
15911         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15912         ada_lookup_symbol.
15913         (ada_lookup_symbol): Reimplement in terms of
15914         ada_lookup_symbol_list, bits factored out from
15915         ada_lookup_encoded_symbol.
15916
15917 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15918
15919         * ada-exp.y (write_object_renaming): When subscripting an array
15920         using a symbol as the index, pass the block in call to
15921         ada_lookup_encoded_symbol when looking that symbol up.
15922
15923 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15924
15925         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15926         TYPE_INDEX_TYPE.
15927
15928 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15929
15930         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15931         the case where VALUE_LVAL (val0) is not lval_memory.
15932
15933 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15934
15935         * ada-valprint.c (print_optional_low_bound): Handle
15936         character-indexed array printing like boolean-indexed array
15937         printing.
15938
15939 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15940
15941         * NEWS: Create a new section for the next release branch.
15942         Rename the section of the current branch, now that it has
15943         been cut.
15944
15945 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15946
15947         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15948         * version.in: Bump version to 8.1.50.DATE-git.
15949
15950 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15951
15952         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15953         Add field.
15954         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15955         Add field.
15956         (default_exception_support_info) <catch_handlers_sym>: Add field.
15957         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15958         (ada_exception_name_addr_1): Add "catch handlers" handling.
15959         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15960         Update all callers.
15961         (create_excep_cond_exprs) <ex>: Add parameter.
15962         (re_set_exception): Update create_excep_cond_exprs call.
15963         (print_it_exception, print_one_exception, print_mention_exception)
15964         (print_recreate_exception): Add "catch handler" handling.
15965         (allocate_location_catch_handlers, re_set_catch_handlers)
15966         (check_status_catch_handlers, print_it_catch_handlers)
15967         (print_one_catch_handlers, print_mention_catch_handlers)
15968         (print_recreate_catch_handlers): New function.
15969         (catch_handlers_breakpoint_ops): New variable.
15970         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15971         Add parameter.  Add "catch handler" handling.
15972         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15973         Add "catch handler" handling.
15974         (ada_exception_catchpoint_cond_string): Add "catch handler"
15975         handling.
15976         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15977         call.
15978         (catch_ada_handlers_command): New function.
15979         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15980         operations structure.
15981         (_initialize_ada_language): Add "catch handlers" command entry.
15982         * NEWS: Document "catch handlers" feature.
15983
15984 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15985
15986         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15987         account when creating the array type of the slice.
15988         (ada_value_slice): Likewise.
15989
15990 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15991
15992         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15993         New enum value.
15994         (create_array_type_with_stride): Add byte_stride_prop parameter.
15995         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15996         New parameter.  Update all callers in this file.
15997         (array_type_has_dynamic_stride): New function.
15998         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15999         of arrays with dynamic byte strides.
16000         * dwarf2read.c (read_array_type): Add support for dynamic
16001         DW_AT_byte_stride attributes.
16002
16003 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
16004
16005         * dwarf2read.c (read_unspecified_type): Treat
16006         DW_TAG_enumeration_type DIEs from Ada units as stubs.
16007
16008 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16009
16010         Update copyright year range in all GDB files.
16011
16012 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
16013
16014         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
16015         and gdb/testsuite/gdb.base/step-line.c.
16016
16017 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16018
16019         * copyright.py (main): Dump the contents of
16020         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
16021         even if BY_HAND is empty.
16022
16023 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16024
16025         * top.c (print_gdb_version): Update Copyright year in version
16026         message.
16027
16028 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
16029
16030         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
16031
16032 For older changes see ChangeLog-2017.
16033 \f
16034 Local Variables:
16035 mode: change-log
16036 left-margin: 8
16037 fill-column: 74
16038 version-control: never
16039 coding: utf-8
16040 End: