Fix ia64-linux-nat.c
[external/binutils.git] / gdb / ChangeLog
1 2018-11-18  Tom Tromey  <tom@tromey.com>
2
3         PR build/23814:
4         * target-delegates.c: Rebuild.
5         * ia64-linux-nat.c (class ia64_linux_nat_target)
6         <have_steppable_watchpoint>: Use override.  Return true, not 1.
7         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
8         "self" argument.
9         (ia64_linux_nat_target::low_new_thread): Rename.
10         (class ia64_linux_nat_target) <read_description>: Don't declare.
11         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
12         bool.
13
14 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
15
16         PR gdb/22736:
17         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
18         lang_struct_return code.
19
20 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
21
22         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
23         return_method.
24         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
25         * amd64-tdep.c (amd64_push_arguments): Likewise.
26         (amd64_push_dummy_call): Likewise.
27         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
28         * arc-tdep.c (arc_push_dummy_call): Likewise.
29         * arm-tdep.c (arm_push_dummy_call): Likewise.
30         * avr-tdep.c (avr_push_dummy_call): Likewise.
31         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
32         * cris-tdep.c (cris_push_dummy_call): Likewise.
33         * csky-tdep.c (csky_push_dummy_call): Likewise.
34         * frv-tdep.c (frv_push_dummy_call): Likewise.
35         * gdbarch.c: Regenerate.
36         * gdbarch.h: Regenerate.
37         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
38         return_method.
39         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
40         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
41         (hppa64_push_dummy_call): Likewise.
42         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
43         * i386-tdep.c (i386_push_dummy_call): Likewise.
44         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
45         * infcall.c (call_function_by_hand_dummy): Likewise.
46         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
47         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
48         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
49         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
50         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
51         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
52         * mep-tdep.c (mep_push_dummy_call): Likewise.
53         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
54         (mips_n32n64_push_dummy_call): Likewise.
55         (mips_o32_push_dummy_call): Likewise.
56         (mips_o64_push_dummy_call): Likewise.
57         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
58         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
59         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
60         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
61         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
62         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
63         (ppc64_sysv_abi_push_dummy_call): Likewise.
64         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
65         (ppc64_sysv_abi_push_dummy_call): Likewise.
66         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
67         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
68         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
69         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
70         * rx-tdep.c (rx_push_dummy_call): Likewise.
71         * s390-tdep.c (s390_push_dummy_call): Likewise.
72         * score-tdep.c (score_push_dummy_call): Likewise.
73         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
74         (sh_push_dummy_call_nofpu): Likewise.
75         * sparc-tdep.c (sparc32_store_arguments): Likewise.
76         (sparc32_push_dummy_call): Likewise.
77         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
78         (sparc64_push_dummy_call): Likewise.
79         * spu-tdep.c (spu_push_dummy_call): Likewise.
80         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
81         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
82         * v850-tdep.c (v850_push_dummy_call): Likewise.
83         * vax-tdep.c (vax_push_dummy_call): Likewise.
84         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
85         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
86
87 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
88
89         * gdbarch.sh (enum function_call_return_method): Add enum.
90         * gdbarch.h: Regenerate.
91         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
92
93 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
94
95         * unittests/copy_bitwise-selftests.c: New file.
96         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
97         (selftests::copy_bitwise_tests): Delete, moving this code to
98         unittests/copy_bitwise-selftests.c instead.
99         (_initialize_utils): Do not register copy_bitwise tests.
100         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
101         unittests/copy_bitwise-selftests.c.
102
103 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
104
105         * ada-lang.c (move_bits): Delete. Update all callers to use
106         copy_bitwise instead.
107         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
108         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
109         Move from here to utils.c.
110         (_initialize_dwarf2loc): Remove call to register copy_bitwise
111         selftests.
112         * utils.h (copy_bitwise): Add declaration.
113         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
114         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
115         Moved here from dwarf2loc.c.
116         (_initialize_utils): Register copy_bitwise selftests.
117
118 2018-11-14  Jim Wilson  <jimw@sifive.com>
119
120         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
121         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
122         then increment next_regnum if odd.
123         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
124         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
125         function type.  Pass new arg to riscv_arg_location based on function
126         type.
127         (riscv_return_value): Pass new arg to riscv_arg_location.
128
129         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
130         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
131         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
132
133         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
134         setting len.  New local align, set to max of arg align and xlen,
135         and pass to first riscv_assign_stack_location call.
136
137 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
138
139         * skip.c (complete_skip_number): New function.
140         (_initialize_step_skip): Add completers to some skip commands.
141
142 2018-11-09  Tom Tromey  <tom@tromey.com>
143
144         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
145         (struct remote_g_packet_data): Derive from allocate_on_obstack.
146         <guesses>: Now a std::vector.
147         (remote_g_packet_data_init, register_remote_g_packet_guess):
148         Update.
149         (remote_read_description_p): Update.  Return bool.
150         (remote_target::read_description): Update.
151         (struct remote_g_packet_guess): Add constructor.
152
153 2018-11-09  Tom Tromey  <tom@tromey.com>
154
155         * common/scoped_fd.h (class scoped_fd): Add move constructor and
156         move assignment operator.
157         * psymtab.c (psymtab_to_fullname): Update.
158         * source.h (open_source_file): Return scoped_fd.
159         (find_and_open_source): Likewise.
160         * source.c (open_source_file): Return scoped_fd.
161         (get_filename_and_charpos): Update.
162         (print_source_lines_base): Update.  Use scoped_fd::to_file.
163         (forward_search_command): Likewise.
164         (reverse_search_command): Likewise.
165         (find_and_open_source): Return scoped_fd.
166         * tui/tui-source.c (tui_set_source_content): Update.  Use
167         gdb_file_up.
168
169 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
170
171         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
172         overflow.
173
174 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
175
176         * configure: Regenerate.
177
178 2018-11-09  Tom de Vries  <tdevries@suse.de>
179
180         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
181         unconditionally, to set the language of the symbol.  Manage freeing
182         returned pointer using gdb::unique_xmalloc_ptr.
183
184 2018-11-08  Tom Tromey  <tom@tromey.com>
185
186         * record.c (require_record_target): Upper-case "<TAB>".
187
188 2018-11-08  Tom Tromey  <tom@tromey.com>
189
190         * python/lib/gdb/command/pretty_printers.py
191         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
192
193 2018-11-08  Tom Tromey  <tom@tromey.com>
194
195         PR gdb/23555:
196         PR gdb/23838:
197         * target.h (target_supports_terminal_ours): Return bool.
198         * target.c (target_supports_terminal_ours): Handle case where
199         current_top_target returns nullptr.  Return bool.
200
201 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
202
203         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
204         return the correct count for potential HFAs.
205
206 2018-11-08  Jan Beulich  <jbeulich@suse.com>
207
208         * i387-tdep.c (i387_supply_xsave): Split handling of
209         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
210         (i387_collect_xsave): Likewise.
211
212 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
213
214         * riscv-tdep.c (riscv_insn::decode): Update header comment.
215         (riscv_frame_this_id): Catch errors thrown while building the
216         frame cache, leave the frame id as the default, which is the outer
217         frame id.
218
219 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
220
221         * ada-lang.c (read_atcb): Only set task_info->called_task if
222         task_info->state == Entry_Caller_Sleep.
223         (print_ada_task_info): Do not check task_info->state before
224         checking task_info->called_task.
225         (info_task): Likewise.
226
227 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
228
229         * ada-tasks.c (read_atcb): Clear task_info before computing
230         the value of each of its fields.
231
232 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
233
234         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
235         NULL before dereferencing it.
236
237 2018-11-06  Tom de Vries  <tdevries@suse.de>
238
239         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
240         program headers.
241
242 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
243
244         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
245         so that it applies to uclinux as well.
246
247 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
248
249         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
250         when on AAPCS.
251
252 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
253
254         * riscv-fbsd-nat.c (getregs_supplies): Return true for
255         RISCV_CSR_SSTATUS_REGNUM.
256
257 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
258
259         * source.c (open_source_file): Fix leak by transferring the
260         current s->fullname to the unique_xmalloc_ptr fullname given
261         to find_and_open_source.
262
263 2018-11-04  Tom Tromey  <tom@tromey.com>
264
265         * varobj.c (install_default_visualizer): Update.
266         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
267         Return gdbpy_ref.
268         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
269         (find_pretty_printer_from_progspace)
270         (find_pretty_printer_from_gdb, find_pretty_printer)
271         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
272         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
273         Update.
274
275 2018-11-04  Tom Tromey  <tom@tromey.com>
276
277         * python/python.c (gdbpy_parameter_value): Update.
278         * python/python-internal.h (python_string_to_unicode)
279         (python_string_to_target_python_string)
280         (host_string_to_python_string): Return gdbpy_ref.
281         * python/py-utils.c (python_string_to_unicode)
282         (unicode_to_encoded_python_string)
283         (unicode_to_target_python_string)
284         (python_string_to_target_string)
285         (python_string_to_target_python_string): Return gdbpy_ref.
286         (python_string_to_host_string): Update.
287         (host_string_to_python_string): Return gdbpy_ref.
288         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
289         (stpy_fullname): Update.
290         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
291         Update.
292         * python/py-prettyprint.c (print_string_repr): Update.
293         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
294         (objfpy_get_build_id): Update.
295         * python/py-breakpoint.c (bppy_get_location)
296         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
297         Update.
298
299 2018-11-04  Tom Tromey  <tom@tromey.com>
300
301         * python/python-internal.h (gdb_py_object_from_longest)
302         (gdb_py_object_from_ulongest): Return gdbpy_ref.
303         * python/py-value.c (valpy_int): Update.
304         * python/py-utils.c (gdb_py_object_from_longest): Return
305         gdbpy_ref.
306         (gdb_py_object_from_ulongest): Likewise.
307         * python/py-type.c (typy_get_alignof): Update.
308         * python/py-linetable.c (ltpy_get_all_source_lines)
309         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
310         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
311
312 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
313
314         * ada-lang.c (_initialize_ada_language): Fix typo.
315
316 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
317
318         * language.c (type): Remove.
319         (_initialize_language): Remove assignment to type.
320
321 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
322
323         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
324         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
325         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
326         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
327         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
328         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
329         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
330         and aarch64-ravenscar-thread.o.
331         * NEWS: Add entry documenting Ravenscar tasking support
332         on AArch64 ELF.
333
334 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
335
336         * symtab.c (info_functions_command): Initialize quiet flag.
337         * stack.c (info_args_command): Likewise.
338
339 2018-11-01  Jim Wilson  <jimw@sifive.com>
340
341         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
342         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
343         debugging messages.
344
345 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
346
347         * ada-lang.c (ada_watch_location_expression): New function.
348         (ada_language_defn): Set la_watch_location_expression to
349         ada_watch_location_expression.
350
351 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
352
353         * print-utils.c (int_string): Remove unnecessary trailing spaces.
354
355 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
356
357         * rs6000-tdep.c (skip_prologue): Fix potential negative left
358         shifting.
359
360 2018-11-01  Jerome Guitton  <guitton@adacore.com>
361             Joel Brobecker  <brobecker@adacore.com>
362
363         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
364         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
365         * arm-pikeos-tdep.c: New file.
366         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
367         embedded system.
368         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
369
370 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
371
372         * common/pathstuff.c (get_standard_temp_dir): New.
373         * common/pathstuff.h (get_standard_temp_dir): New.
374         * config.in: Re-generate.
375         * configure: Re-generate.
376         * configure.ac: Don't check for mkdtemp.
377         * gnulib/aclocal-m4-deps.mk: Re-generate.
378         * gnulib/aclocal.m4: Re-generate.
379         * gnulib/config.in: Re-generate.
380         * gnulib/configure: Re-generate.
381         * gnulib/import/Makefile.am: Re-generate.
382         * gnulib/import/Makefile.in: Re-generate.
383         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
384         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
385         * gnulib/import/m4/mkdtemp.m4: New file.
386         * gnulib/import/mkdtemp.c: New file.
387         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
388         Add mkdtemp module.
389         * unittests/mkdir-recursive-selftests.c (test): Use
390         get_standard_temp_dir.
391         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
392         ifdef.
393         * compile/compile.c (get_compile_file_tempdir): Likewise.
394
395 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
396
397         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
398         (SIG_FRAME_LR_OFFSET64): New define.
399         (SIG_FRAME_FP_OFFSET64): New define.
400         (aix_sighandle_frame_cache): New Function.
401         (aix_sighandle_frame_this_id): New Function.
402         (aix_sighandle_frame_prev_register): New Function.
403         (aix_sighandle_frame_sniffer): New Function.
404         (aix_sighandle_frame_unwind): New global variable.
405         (rs6000_aix_init_osabi): Install new frame unwinder.
406
407 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
408
409         PR gdb/23835
410         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
411         already defined.
412
413 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
414
415         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
416
417 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
418
419         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
420         (producer_is_icc): New function.
421         (check_producer): Set producer_is_icc field on dwarf2_cu.
422         (dwarf2_init_integer_type): New function.
423         (read_base_type): Call dwarf2_init_integer_type instead of
424         init_integer_type in all cases.
425         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
426         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
427         LEN is greater than 0.
428
429 2018-10-30  Tom Tromey  <tom@tromey.com>
430
431         * main.c (captured_main_1): Check return value of bfd_init.
432
433 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
434
435         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
436         Adjust comments.
437
438 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
439
440         * procfs.c: Include common/pathstuff.h.
441
442 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
443
444         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
445         Add missing braces.  No functional change.
446
447 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
448
449         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
450         to report a bad option and fix indentation.
451         * demangle.c (demangle_command): Use report_unrecognized_option_error
452         to report a bad option and correctly report the bad option.
453
454 2018-10-27  Tom Tromey  <tom@tromey.com>
455
456         PR cli/23364:
457         * darwin-nat.c (copied_shell): New global.
458         (may_have_sip): Rename from should_disable_startup_with_shell.
459         (copy_shell_to_cache, maybe_cache_shell): New functions.
460         (darwin_nat_target::create_inferior): Update.  Use
461         copied_shell.
462
463 2018-10-27  Tom Tromey  <tom@tromey.com>
464
465         * unittests/scoped_fd-selftests.c (test_to_file): New function.
466         (run_tests): Call test_to_file.
467         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
468         temporary files.
469         * common/scoped_fd.h (scoped_fd::to_file): New method.
470
471 2018-10-27  Tom Tromey  <tom@tromey.com>
472
473         * unittests/scoped_mmap-selftests.c (test_normal): Use
474         gdb_mkostemp_cloexec.
475         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
476         Use gdb_mkostemp_cloexec.
477         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
478         gnulib/config.in, gnulib/configure,
479         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
480         gnulib/import/m4/gnulib-cache.m4,
481         gnulib/import/m4/gnulib-comp.m4: Update.
482         * gnulib/import/m4/mkostemp.m4: New file.
483         * gnulib/import/m4/mkstemp.m4: Remove.
484         * gnulib/import/mkostemp.c: New file.
485         * gnulib/import/mkstemp.m4: Remove.
486         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
487         mkstemp, add mkostemp.  Apply new patch.
488         * gnulib/import/stdlib.in.h: Apply patch.
489         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
490         New file.
491         * dwarf-index-write.c (write_psymtabs_to_index): Use
492         gdb_mkostemp_cloexec.
493         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
494
495 2018-10-27  Tom Tromey  <tom@tromey.com>
496
497         * unittests/mkdir-recursive-selftests.c: New file.
498         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
499         unittests/mkdir-recursive-selftests.c.
500         * dwarf-index-cache.c (mkdir_recursive): Move to
501         common/filestuff.c.
502         (index_cache::store): Check return value of mkdir_recursive.
503         (create_dir_and_check, test_mkdir_recursive): Move to new file.
504         (_initialize_index_cache): Don't register test.
505         * common/filestuff.h (mkdir_recursive): Declare.
506         * common/filestuff.c (mkdir_recursive): Move from
507         dwarf-index-cache.c.  Return bool.
508
509 2018-10-27  Tom Tromey  <tom@tromey.com>
510
511         * dwarf-index-write.c (write_psymtabs_to_index): Move
512         make_temp_filename to common/pathstuff.c.
513         * common/pathstuff.h (make_temp_filename): Declare.
514         * common/pathstuff.c (make_temp_filename): New function, moved
515         from dwarf-index-write.c.
516
517 2018-10-27  Tom Tromey  <tom@tromey.com>
518
519         * procfs.c (procfs_target::create_inferior): Use get_shell.
520         * cli/cli-cmds.c (shell_escape): Use get_shell.
521         * windows-nat.c (windows_nat_target::create_inferior): Use
522         get_shell.
523         * common/pathstuff.c (get_shell): New function.
524         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
525         (fork_inferior): Use get_shell.
526         * common/pathstuff.h (get_shell): Declare.
527
528 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
529
530         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
531
532 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
533
534         * stack.c (print_variable_and_value_data): Add preg and treg.
535         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
536         and update callers.
537         (print_frame_arg_vars): Likewise.
538         (prepare_reg): New function.
539         (info_locals_command): Extract info print args and use them.
540         (info_args_command): Likewise.
541         (_initialize_stack): Modify on-line help.
542         * symtab.c (treg_matches_sym_type_name): New function.
543         (search_symbols): New arg t_regexp.
544         (symtab_symbol_info): New args quiet, regexp, t_regexp.
545         (info_variables_command): Extract info print args and use them.
546         (info_functions_command): Likewise.
547         (info_types_command): Update call to symtab_symbol_info.
548         (_initialize_symtab): Modify on-line help.
549         * symtab.h (treg_matches_sym_type_name): New function.
550         (search_symbols): New t_regexp arg.
551
552 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
553
554         * cli-utils.c (extract_arg_maybe_quoted): New function.
555         (extract_info_print_args): New function.
556         (info_print_args_help): New function.
557         (report_unrecognized_option_error): New function.
558         * cli-utils.h (extract_arg_maybe_quoted): New function.
559         (extract_info_print_args): New function.
560         (info_print_args_help): New function.
561         (report_unrecognized_option_error): New function.
562
563 2018-10-26  Tom Tromey  <tom@tromey.com>
564
565         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
566         (compute_compunit_symtab_includes): Update.
567         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
568         (compunit_symtab_ptr): Likewise.
569
570 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
571
572         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
573         default_print_auxv_entry for specific tag values.
574
575 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
576
577         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
578
579 2018-10-26  Jim Wilson  <jimw@sifive.com>
580
581         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
582         (riscv_linux_sigframe_init): Declare.
583         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
584         (riscv_linux_sigframe): New.
585         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
586         (riscv_linux_sigframe_init): Define.
587         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
588
589         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
590         (riscv_isa_flen): Likewise.  Drop static.
591         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
592         (riscv_isa_flen): Likewise.  Declare.
593
594 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
595             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
596
597         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
598         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
599         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
600         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
601         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
602         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
603         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
604         Define.
605         (struct ppc_linux_features) <htm>: New field.
606         (ppc_linux_no_features): Add initializer for htm field.
607         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
608         new tdescs.
609         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
610         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
611         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
612         Define if not already defined.
613         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
614         and rs6000/powerpc-isa207-htm-vsx64l.
615         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
616         rs6000/powerpc-isa207-htm-vsx64l.xml.
617         * features/rs6000/power-htm-spr.xml: New file.
618         * features/rs6000/power-htm-core.xml: New file.
619         * features/rs6000/power64-htm-core.xml: New file.
620         * features/rs6000/power-htm-fpu.xml: New file.
621         * features/rs6000/power-htm-altivec.xml: New file.
622         * features/rs6000/power-htm-vsx.xml: New file.
623         * features/rs6000/power-htm-ppr.xml: New file.
624         * features/rs6000/power-htm-dscr.xml: New file.
625         * features/rs6000/power-htm-tar.xml: New file.
626         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
627         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
628         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
629         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
630         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
631         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
632         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
633         fetch_regset with HTM regsets.
634         (store_register, store_ppc_registers): Call store_regset with HTM
635         regsets.
636         (ppc_linux_nat_target::read_description): Set htm field in the
637         features struct if needed.
638         * ppc-linux-tdep.c: Include
639         features/rs6000/powerpc-isa207-htm-vsx32l.c and
640         features/rs6000/powerpc-isa207-htm-vsx64l.c.
641         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
642         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
643         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
644         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
645         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
646         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
647         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
648         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
649         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
650         (ppc32_linux_ctarregset): New globals.
651         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
652         (ppc_linux_collect_core_cpgrregset): New function.
653         (ppc_linux_iterate_over_regset_sections): Call back with the htm
654         regsets.
655         (ppc_linux_core_read_description): Check if the tm spr section is
656         present and set htm in the features struct.
657         (_initialize_ppc_linux_tdep): Call
658         initialize_tdesc_powerpc_isa207_htm_vsx32l and
659         initialize_tdesc_powerpc_isa207_htm_vsx64l.
660         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
661         Declare.
662         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
663         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
664         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
665         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
666         New fields.
667         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
668         Likewise.
669         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
670         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
671         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
672         New enum fields.
673         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
674         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
675         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
676         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
677         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
678         <PPC_CTAR_REGNUM>: Likewise.
679         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
680         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
681         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
682         (IS_CEFP_PSEUDOREG): Define.
683         (rs6000_register_name): Hide the upper halves of checkpointed VSX
684         registers.  Return names for the checkpointed DFP, VSX, and EFP
685         pseudo registers.
686         (rs6000_pseudo_register_type): Remove initial assert and raise an
687         internal error in the else clause instead.  Return types for the
688         checkpointed DFP, VSX, and EFP pseudo registers.
689         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
690         checkpointed DFP pseudo registers.
691         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
692         checkpointed VSX pseudo registers.
693         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
694         from efpr_pseudo_register_read and
695         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
696         registers.
697         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
698         Handle checkpointed DFP, VSX, and EFP registers.
699         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
700         (efp_ax_pseudo_register_collect): New functions.
701         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
702         register logic to new functions.  Handle checkpointed DFP, VSX,
703         and EFP pseudo registers.
704         (rs6000_gdbarch_init): Look for and validate the htm features.
705         Include checkpointed DFP, VSX and EFP pseudo-registers.
706         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
707         HTM registers.
708
709 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
710
711         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
712         without altivec or fpu.
713
714 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
715             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
716
717         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
718         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
719         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
720         Define if not already defined.
721         * features/rs6000/power-ebb.xml: New file.
722         * features/rs6000/power-linux-pmu.xml: New file.
723         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
724         features.
725         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
726         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
727         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
728         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
729         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
730         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
731         fetch_regset with ebb and pmu regsets.
732         (store_register, store_ppc_registers): Call store_regset with ebb
733         and pmu regsets.
734         (ppc_linux_nat_target::read_description): Set isa207 field in the
735         features struct if ebb and pmu are avaiable.
736         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
737         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
738         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
739         and pmu regsets.
740         (ppc_linux_core_read_description): Check if the pmu section is
741         present and set isa207 in the features struct.
742         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
743         (ppc32_linux_pmuregset): Declare.
744         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
745         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
746         <ppc_sier_regnum>: New field.
747         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
748         New enum values.
749         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
750         values.
751         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
752         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
753         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
754         ebb and pmu features.
755
756 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
757             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
758
759         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
760         (tdesc_powerpc_isa207_vsx64l): Declare.
761         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
762         (struct ppc_linux_features) <isa207>: New field.
763         (ppc_linux_no_features): Add initializer for isa207 field.
764         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
765         new tdescs.
766         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
767         (NT_PPC_TAR): Define if not already defined.
768         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
769         rs6000/powerpc-isa207-vsx64l.
770         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
771         rs6000/powerpc-isa207-vsx64l.xml.
772         * features/rs6000/power-tar.xml: New file.
773         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
774         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
775         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
776         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
777         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
778         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
779         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
780         fetch_regset with the TAR regset.
781         (store_register, store_ppc_registers): Call store_regset with the
782         TAR regset.
783         (ppc_linux_nat_target::read_description): Set isa207 field in the
784         features struct if needed.
785         * ppc-linux-tdep.c: Include
786         features/rs6000/powerpc-isa207-vsx32l.c and
787         features/rs6000/powerpc-isa207-vsx64l.c.
788         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
789         (ppc_linux_iterate_over_regset_sections): Call back with the tar
790         regset.
791         (ppc_linux_core_read_description): Check if the tar section is
792         present and set isa207 in the features struct.
793         (_initialize_ppc_linux_tdep): Call
794         initialize_tdesc_powerpc_isa207_vsx32l and
795         initialize_tdesc_powerpc_isa207_vsx64l.
796         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
797         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
798         (enum) <PPC_TAR_REGNUM>: New enum value.
799         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
800         feature.
801         (ppc_process_record_op31): Record changes to TAR.
802
803 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
804             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
805
806         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
807         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
808         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
809         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
810         (struct ppc_linux_features) <ppr_dscr>: New field.
811         (ppc_linux_no_features): Add initializer for ppr_dscr field.
812         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
813         new tdescs.
814         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
815         Define if not already defined.
816         * features/Makefile (WHICH): Add
817         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
818         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
819         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
820         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
821         * features/rs6000/power-dscr.xml: New file.
822         * features/rs6000/power-ppr.xml: New file.
823         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
824         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
825         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
826         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
827         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
828         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
829         * ppc-linux-nat.c: Include <sys/uio.h>.
830         (fetch_regset, store_regset, check_regset): New functions.
831         (fetch_register, fetch_ppc_registers): Call fetch_regset with
832         DSCR and PPR regsets.
833         (store_register, store_ppc_registers): Call store_regset with
834         DSCR and PPR regsets.
835         (ppc_linux_get_hwcap2): New function.
836         (ppc_linux_nat_target::read_description): Call
837         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
838         features struct if needed.
839         * ppc-linux-tdep.c: Include
840         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
841         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
842         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
843         (ppc32_linux_dscrregset): New globals.
844         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
845         and dscr regsets.
846         (ppc_linux_core_read_description): Check if the ppr and dscr
847         sections are present and set ppr_dscr in the features struct.
848         (_initialize_ppc_linux_tdep): Call
849         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
850         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
851         * ppc-linux-tdep.h (ppc32_linux_pprregset)
852         (ppc32_linux_dscrregset): Declare.
853         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
854         <ppc_dscr_regnum>: New field.
855         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
856         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
857         and dscr features.
858         (ppc_process_record_op31): Record changes to PPR and DSCR.
859
860 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
861
862         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
863         second initializer line for the have_* variables.  Initialize
864         have_fpu to 0 instead of 1.
865
866 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
867
868         * arch/ppc-linux-common.c (ppc_linux_match_description):
869         Parenthesize tdesc assignements and indent them properly.
870
871 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
872
873         * ppc-linux-nat.c (fetch_register): Change if statement to else
874         if.
875         (store_register): Likewise.
876
877 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
878
879         * rs6000-tdep.c: Remove reggroups.h include.
880         (rs6000_pseudo_register_reggroup_p): Remove.
881         (rs6000_gdbarch_init): Remove call to
882         set_tdesc_pseudo_register_reggroup_p.
883
884 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
885
886         * reggroups.c (default_register_reggroup_p): Return true for
887         decfloat registers and float_reggroup.
888
889 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
890
891         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
892         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
893         ppc_linux_collect_vrregset by regcache_collect_regset.
894
895 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
896
897         * linux-tdep.c (linux_collect_regset_section_cb): Use
898         std::vector<gdb_byte> instead of char * and malloc for buf.
899         Remove xfree.
900
901 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
902
903         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
904         symtab_start instead of always using language_unknown.
905
906 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
907
908         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
909         READ_P parameter, catch and ignore register access errors from
910         either the old or new MISA location.
911         (riscv_has_feature): Update call to riscv_read_misa_reg.
912
913 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
914
915         * python/py-function.c (convert_values_to_python): Return
916         gdbpy_ref<>.  Add header comment.
917         (fnpy_call): Adjust.
918
919 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
920
921         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
922         (cmdpy_completer_handle_brkchars): Adjust.
923         (cmdpy_completer): Adjust.
924
925 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
926
927         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
928         Pass correct regnum to raw_supply_zeroed.
929
930 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
931
932         * regcache.c (cooked_read_test): Add CSKY to the list of
933         architectures with a save_reggroup
934
935 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
936
937         PR gdb/23368
938         * infrun.c (follow_exec): In the follow_exec_mode_new case,
939         transfer terminal state from old new new inferior.
940         * terminal.h (swap_terminal_info): New function.
941         * inflow.c (swap_terminal_info): New function.
942
943 2018-10-23  Tom Tromey  <tom@tromey.com>
944
945         * record-btrace.c (get_thread_current_frame_id): Rename from
946         get_thread_current_frame.  Return a frame_id.
947         (record_btrace_start_replaying): Update.
948
949 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
950
951         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
952         for CSRs.
953
954 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
955
956         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
957         have_nonsteppable_watchpoint attribute to 1.
958
959 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
960
961         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
962         register names.
963         (struct register_alias): Rename to...
964         (struct riscv_register_alias): ...this, and update comment.
965         (riscv_register_aliases): Update type, and alias names.  Remove
966         CSR names from this list.
967         (riscv_register_name): Use riscv_gdb_reg_names for int and float
968         register names.  Add an extra assertion.
969         (riscv_is_regnum_a_named_csr): New function.
970         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
971
972 2018-10-22  Jim Wilson  <jimw@sifive.com>
973
974         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
975         FP reg smaller than FP reg size, and fill with -1 instead of 0.
976
977         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
978         (riscv_register_type): Use them.
979         (riscv_print_one_register_info): Handle union of floats same as float.
980         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
981         riscv_fpreg_q_type fields.
982
983 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
984
985         * gdbarch.sh (gdbarch_num_cooked_regs): New.
986         * gdbarch.h: Re-generate.
987         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
988         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
989         * eval.c (evaluate_subexp_standard): Likewise.
990         * findvar.c (value_of_register): Likewise.
991         (value_of_register_lazy): Likewise.
992         (address_from_register): Likewise.
993         * frame.c (get_frame_register_bytes): Likewise.
994         * gdbarch-selftests.c (register_to_value_test): Likewise.
995         * h8300-tdep.c (h8300_register_type): Likewise.
996         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
997         (i386_svr4_reg_to_regnum): Likewise.
998         * infcmd.c (default_print_registers_info): Likewise.
999         (registers_info): Likewise.
1000         (print_vector_info): Likewise.
1001         (default_print_float_info): Likewise.
1002         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
1003         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
1004         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
1005         (mi_cmd_data_list_changed_registers): Likewise.
1006         (mi_cmd_data_list_register_values): Likewise.
1007         (mi_cmd_data_write_register_values): Likewise.
1008         (mi_cmd_trace_frame_collected): Likewise.
1009         * mips-tdep.c (print_gp_register_row): Likewise.
1010         (mips_print_registers_info): Likewise.
1011         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1012         * regcache.c (init_regcache_descr): Likewise.
1013         (register_size): Likewise.
1014         (register_dump::dump): Likewise.
1015         (cooked_read_test): Likewise.
1016         (cooked_write_test): Likewise.
1017         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
1018         (rs6000_gdbarch_init): Likewise.
1019         * stabsread.c (stab_reg_to_regnum): Likewise.
1020         * stack.c (info_frame_command): Likewise.
1021         * target-descriptions.c (tdesc_register_name): Likewise.
1022         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
1023         * tui/tui-regs.c (tui_show_register_group): Likewise.
1024         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
1025         (user_reg_map_regnum_to_name): Likewise.
1026         (value_of_user_reg): Likewise.
1027         (maintenance_print_user_registers): Likewise.
1028         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
1029         (xtensa_register_name): Likewise.
1030         (xtensa_register_type): Likewise.
1031         (xtensa_reg_to_regnum): Likewise.
1032         (xtensa_pseudo_register_read): Likewise.
1033         (xtensa_pseudo_register_write): Likewise.
1034
1035 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1036
1037         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
1038         correctly-sized buffer with raw_read.
1039         (amd64_pseudo_register_write): Use correctly-sized buffer for
1040         raw_read/raw_write.
1041
1042 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1043
1044         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
1045         in add_prefix_cmd of set print type.
1046
1047 2018-10-19  Tom Tromey  <tom@tromey.com>
1048
1049         PR tui/18388:
1050         * NEWS: Mention tabset deprecation.
1051         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
1052         (update_tab_width): New function.
1053         (tui_set_tab_width, tui_show_tab_width): New functions.
1054         (tui_set_tab_width_command): Use update_tab_width.
1055         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
1056         Add new "set tui tab-width" command.
1057         * tui/tui-source.c (tui_set_source_content): Update.
1058         * tui/tui-disasm.c (tui_set_disassem_content): Update.
1059         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
1060         Don't declare.
1061         (tui_tab_width): Declare.
1062         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
1063         (tui_set_default_tab_len): Remove.
1064
1065 2018-10-19  Tom Tromey  <tom@tromey.com>
1066
1067         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
1068         (key_is_backspace, tui_getc): Don't declare.
1069         * tui/tui-io.c (key_is_start_sequence): Now static.
1070         (key_is_end_sequence, key_is_backspace): Remove.
1071         (tui_getc): Now static.
1072
1073 2018-10-19  Tom Tromey  <tom@tromey.com>
1074
1075         * symfile.c (reread_symbols): Clear "static_links".
1076
1077 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
1078
1079         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
1080         define.
1081         (aarch64_linux_sigframe_init): Extra boundary checks.
1082
1083 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
1084
1085         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
1086         the possibly non-existent tdesc type 'vec128', but the type of raw
1087         register v16 instead.
1088
1089 2018-10-19  Gary Benson <gbenson@redhat.com>
1090
1091         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
1092
1093 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
1094
1095         PR cli/23785
1096         * cli/cli-dump.c (restore_binary_file): Check if "file" is
1097         NULL.
1098
1099 2018-10-17  Paul Koning  <paul_koning@dell.com>
1100
1101         * charset.c (convert_between_encodings): Fix unsigned overflow.
1102
1103 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
1104
1105         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
1106         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
1107         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
1108         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1109         New functions.
1110         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
1111         and fbsd_info_proc_mappings_header.
1112         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
1113         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
1114         New.
1115
1116 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
1117
1118         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
1119         Solaris Maintainer.
1120
1121 2018-10-15  Tom Tromey  <tom@tromey.com>
1122
1123         * tui/tui.c (strcat_to_buf): Remove casts.
1124         * tui/tui-winsource.c (tui_show_source_line)
1125         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
1126         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
1127         * tui/tui-windata.c (tui_first_data_item_displayed)
1128         (tui_delete_data_content_windows, tui_erase_data_content)
1129         (tui_display_all_data, tui_display_data_from)
1130         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
1131         * tui/tui-win.c (tui_set_win_height)
1132         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
1133         casts.
1134         * tui/tui-win.c (tui_resize_all): Remove casts.
1135         (tui_scroll_backward_command, tui_set_focus)
1136         (tui_set_tab_width_command): Likewise.
1137         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
1138         * tui/tui-regs.c (tui_show_register_group): Remove cast.
1139         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
1140         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
1141         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
1142         Remove casts.
1143
1144 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1145
1146         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
1147         AArch64/ARM maintainer.
1148
1149 2018-10-11  Gary Benson <gbenson@redhat.com>
1150
1151         * interps.h (interp::m_name): Make private and mutable.
1152         * interps.c (interp::~interp): Free m_name.
1153
1154 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1155             Simon Marchi <simark@simark.ca>
1156
1157         * README (`configure' options): Add documentation for new
1158         "--enable-unit-tests" option.
1159         * acinclude.m4: Include "selftest.m4".
1160         * configure: Regenerate.
1161         * configure.ac: Use "GDB_AC_SELFTEST".
1162         * maint.c (maintenance_selftest): Update message informing
1163         that selftests have been disabled.
1164         (maintenance_info_selftests): Likewise.
1165         * selftest.m4: New file.
1166
1167 2018-10-10  Gary Benson <gbenson@redhat.com>
1168
1169         * remote.c (remote_target::remote_send_printf): Add
1170         missing va_end found by Coverity.
1171
1172 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
1173
1174         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
1175
1176 2018-10-09  Tom Tromey  <tom@tromey.com>
1177
1178         * configure: Rebuild.
1179         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
1180         * NEWS: Update --enable-ubsan documentation.
1181
1182 2018-10-09  Gary Benson <gbenson@redhat.com>
1183
1184         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
1185         found by Coverity.
1186
1187 2018-10-08  Tom Tromey  <tom@tromey.com>
1188
1189         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
1190         variable.
1191         (riscv_fbsd_init_abi): Likewise.
1192
1193 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1194         * valops.c (value_struct_elt_for_reference): Rename local variable
1195         to work around the shadowing a previous local warning.
1196
1197 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1198
1199         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
1200         * NEWS: Mention new FreeBSD/riscv native configuration.
1201         * configure.host: Add riscv*-*-freebsd*.
1202         * configure.nat: Likewise.
1203         * riscv-fbsd-nat.c: New file.
1204
1205 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1206
1207         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
1208         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
1209         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
1210         * NEWS: Mention new FreeBSD/riscv target.
1211         * configure.tgt: Add riscv*-*-freebsd*.
1212         * riscv-fbsd-tdep.c: New file.
1213         * riscv-fbsd-tdep.h: New file.
1214
1215 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
1216
1217         * regcache.h (struct regcache_map_entry): Note that this type can
1218         be used with traditional frame caches.
1219         * trad-frame.c (trad_frame_set_reg_regmap): New.
1220         * trad-frame.h (trad_frame_set_reg_regmap): New.
1221
1222 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
1223
1224         PR c++/16841
1225         * valops.c (get_virtual_base_offset): New function.
1226         (value_struct_elt_for_reference): Use it to get virtual base offset
1227         and add it in calculating class member address.
1228
1229 2018-10-08   John Darrington <john@darrington.wattle.id.au>
1230
1231     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
1232       (check_producer): Check if the producer is codewarrior.
1233       (producer_is_codewarrior): New function.
1234       (lnp_state_machine::record_line): Ignore is_stmt flag for records
1235        produced by codewarrior.
1236       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1237
1238 2018-10-06  Tom Tromey  <tom@tromey.com>
1239
1240         PR python/19399:
1241         * python/py-inferior.c: Add "architecture" entry.
1242         (infpy_architecture): New function.
1243
1244 2018-10-06  Tom Tromey  <tom@tromey.com>
1245
1246         PR python/21765:
1247         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1248         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1249         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1250         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1251
1252 2018-10-06  Tom Tromey  <tom@tromey.com>
1253
1254         PR build/17077:
1255         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1256         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1257         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1258         #include.
1259
1260 2018-10-06  Tom Tromey  <tom@tromey.com>
1261
1262         * python/py-breakpoint.c (bppy_get_location): Handle a
1263         bp_breakpoint without a location.
1264
1265 2018-10-06  Tom Tromey  <tom@tromey.com>
1266
1267         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1268         (_RegEx): Reformat help text.
1269         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1270         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1271         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1272         text.
1273         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1274         (EnableXMethod, DisableXMethod): Remove help indentation.
1275         Capitalize meta-syntactic variables.
1276         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1277         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1278         Capitalize meta-syntactic variables.
1279         * python/lib/gdb/command/explore.py (ExploreCommand)
1280         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1281         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1282         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1283         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1284         Remove help indentation.
1285         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1286         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1287         (DisableFrameFilter, SetFrameFilterPriority)
1288         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1289
1290 2018-10-06  Tom Tromey  <tom@tromey.com>
1291
1292         PR tui/28819:
1293         * tui/tui-io.c (gdb_wgetch): New function.
1294         (tui_mld_getc, tui_getc): Use it.
1295
1296 2018-10-05  Tom Tromey  <tom@tromey.com>
1297
1298         * sol-thread.c (sol_thread_target::wait): Rename inner
1299         "save_ptid".
1300
1301 2018-10-04  Tom Tromey  <tom@tromey.com>
1302
1303         * configure: Rebuild.
1304         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1305
1306 2018-10-04  Tom Tromey  <tom@tromey.com>
1307
1308         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1309         declaration of "block".
1310
1311 2018-10-04  Tom Tromey  <tom@tromey.com>
1312
1313         * common/filestuff.c (fdwalk): Remove inner declaration of
1314         "result".
1315
1316 2018-10-04  Tom Tromey  <tom@tromey.com>
1317
1318         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1319         "structs_addr" and hoist declaration.
1320
1321 2018-10-04  Tom Tromey  <tom@tromey.com>
1322
1323         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1324         variable "size".
1325
1326 2018-10-04  Tom Tromey  <tom@tromey.com>
1327
1328         * mdebugread.c (parse_partial_symbols): Use std::string.
1329
1330 2018-10-04  Tom Tromey  <tom@tromey.com>
1331
1332         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1333         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1334         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1335         header.
1336         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1337         more inner scope.
1338         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1339         * varobj.c (varobj_update): Rename inner "newobj",
1340         "type_changed".
1341         * valprint.c (generic_emit_char): Rename inner "buf".
1342         * valops.c (find_overload_match): Rename inner "temp".
1343         (value_struct_elt_for_reference): Declare "v" in more inner
1344         scope.
1345         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1346         * unittests/array-view-selftests.c (run_tests): Rename inner
1347         "vec".
1348         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1349         header.
1350         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1351         "tsv" in more inner scope.
1352         (print_one_static_tracepoint_marker): Rename inner
1353         "tuple_emitter".
1354         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1355         (tic6x_push_dummy_call): Don't redeclare "addr".
1356         * target-float.c: Declare "dto" lower.
1357         * symtab.c (lookup_local_symbol): Rename inner "sym".
1358         (find_pc_sect_line): Rename inner "pc".
1359         * stack.c (print_frame): Don't redeclare "gdbarch".
1360         (return_command): Rename inner "gdbarch".
1361         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1362         "sp".
1363         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1364         header.
1365         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1366         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1367         scope.
1368         * remote.c (remote_target::update_thread_list): Don't redeclare
1369         "tp".
1370         (remote_target::process_initial_stop_replies): Rename inner
1371         "thread".
1372         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1373         (remote_target::wait_as): Don't redeclare "stop_reply".
1374         (remote_target::get_thread_local_address): Rename inner
1375         "result".
1376         (remote_target::get_tib_address): Likewise.
1377
1378         * regcache.c (cooked_read_test): Rename "regnum".
1379         * record-btrace.c (cmd_record_btrace_start): Rename inner
1380         "exception".
1381         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1382         loop header.
1383         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1384         header.
1385         (ppu2spu_sniffer): Rename inner "buf".
1386         * parse.c (operator_check_standard): Rename inner "type",
1387         "objfile".
1388         * p-valprint.c (pascal_val_print): Introduce new scope for
1389         "low_bound", "high_bound".
1390         * p-exp.y (yylex): Declare "i" in loop header.
1391         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1392         Lower declaration of "s".
1393         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1394         header.
1395         (nios2_push_dummy_call): Rename "len".
1396         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1397         "buf".
1398         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1399         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1400         (linux_xfer_osdata_modules): Likewise.
1401         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1402         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1403         (mips_o64_push_dummy_call): Likewise.
1404         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1405         "op".
1406         * mi/mi-main.c (list_available_thread_groups): Rename inner
1407         "tuple_emitter".
1408         (mi_cmd_data_read_memory): Rename inner "opts".
1409         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1410         "tuple_emitter".
1411         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1412         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1413         more inner scope.
1414         (parse_partial_symbols): Rename inner "pst", "p", "name"
1415         * main.c (captured_main_1): Rename inner "i"s.
1416         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1417         "oso2".
1418         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1419         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1420         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1421         (handle_signal_stop): Rename inner "gdbarch".
1422         (handle_command): Declare "signum" in loop header.
1423         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1424         "status".
1425         (examine_prologue): Rename inner "sol" and "sof".
1426         (ia64_extract_return_value): Rename inner "val".  Declare another
1427         "val" in a more inner scope.
1428         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1429         inner scope.
1430         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1431         "except".
1432         * findvar.c (default_read_var_value): Don't redeclare "addr".
1433         * f-exp.y (yylex): Declare "i" in loop header.
1434         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1435         Rename inner "type", "expect_type".
1436         (evaluate_subexp_for_sizeof): Rename inner "pc".
1437         * elfread.c (elf_symfile_read): Rename inner "abfd".
1438         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1439         "bytes_read".
1440         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1441         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1442         (dwarf_decode_line_header): Rename inner "lh".
1443         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1444         "offset".  Declare "i" in loop header.
1445         (disassemble_dwarf_expression): Rename inner "addr_size".
1446         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1447         inner "result".
1448         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1449         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1450         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1451         "inner_list_emitter".
1452         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1453         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1454         declaration in a block.
1455         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1456         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1457         "obstack_final_size".
1458         * cp-support.c (inspect_type): Declare "i" in loop header.
1459         * compile/compile.c (compile_instance::insert_symbol_error):
1460         Rename inner "e".
1461         * common/agent.c (agent_run_command): Remove inner "ret"
1462         declaration.
1463         * coffread.c (coff_symfile_read): Rename inner "name".
1464         (coff_symfile_read): Rename inner "abfd".
1465         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1466         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1467         "high".
1468         * c-exp.y (lex_one_token): Move "len" declaration lower.
1469         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1470         "gdbarch".
1471         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1472         "b".
1473         (watch_command_1): Declare "mark" later.
1474         (clear_command): Don't shadow "a" or "b".
1475         (delete_command): Rename inner "b".
1476         (delete_trace_command): Likewise.
1477         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1478         "op".
1479         (arm_gdbarch_init): Remove inner "e_flags".
1480         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1481         "offset" in inner blocks.
1482
1483 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1484
1485         * dwarf-index-write.c (file_write): Don't write if the vector is
1486         empty.
1487
1488 2018-10-05  Tom de Vries  <tdevries@suse.de>
1489
1490         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1491         PyArg_ParseTuple call.
1492
1493 2018-10-05  Tom de Vries  <tdevries@suse.de>
1494
1495         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1496         PyArg_ParseTuple call.
1497
1498 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1499
1500         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1501         to avoid exceeding 80 characters per line limit.
1502
1503 2018-10-04  Tom Tromey  <tom@tromey.com>
1504
1505         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1506         (reread_symbols): Update.
1507         * complaints.h (clear_complaints): Remove argument.
1508         * complaints.c (enum complaint_series): Remove.
1509         (series): Remove global.
1510         (complaint_internal): Update.
1511         (clear_complaints): Remove argument.
1512
1513 2018-10-04  Tom Tromey  <tom@tromey.com>
1514
1515         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1516         debugging symbols" message if there is a separate debug objfile.
1517
1518 2018-10-04  Tom Tromey  <tom@tromey.com>
1519
1520         PR cli/19551:
1521         * symfile.c (symbol_file_add_with_addrs): Update output.
1522         * psymtab.c (require_partial_symbols): Update output.
1523
1524 2018-10-04  Tom Tromey  <tom@tromey.com>
1525
1526         PR cli/22234:
1527         * complaints.c: Emit \n.
1528
1529 2018-10-04  Tom Tromey  <tom@tromey.com>
1530
1531         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1532         (separate_debug_file_exists, find_separate_debug_file)
1533         (add_symbol_file_command, reread_symbols, allocate_symtab)
1534         (allocate_compunit_symtab): Use filtered printing, not
1535         unfiltered.
1536         * psymtab.c (require_partial_symbols, dump_psymtab)
1537         (allocate_psymtab): Use filtered printing, not unfiltered.
1538
1539 2018-10-04  Tom Tromey  <tom@tromey.com>
1540
1541         * complaints.c (complaint_internal): Correctly check complaint
1542         count.
1543
1544 2018-10-04  Tom Tromey  <tom@tromey.com>
1545
1546         * complaints.h (struct complaints): Remove declaration.
1547         * complaints.c (clear_complaints): Remove an unused variable.
1548
1549 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1550
1551         * MAINTAINERS (Write After Approval): Add self.
1552
1553 2018-10-03  Tom Tromey  <tom@tromey.com>
1554
1555         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1556         "buffer_contents".
1557         * coffread.c (coff_symtab_read): Initialize "newobj".
1558
1559 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1560
1561         * dwarf2read.c (read_func_scope): Remove struct keyword in
1562         range-based for.
1563
1564 2018-10-03  Tom Tromey  <tom@tromey.com>
1565
1566         * README: Mention --enable-ubsan.
1567         * NEWS: Mention --enable-ubsan.
1568         * acinclude.m4: Include sanitize.m4.
1569         * configure: Rebuild.
1570         * configure.ac: Call AM_GDB_UBSAN.
1571         * sanitize.m4: New file.
1572
1573 2018-10-03  Tom Tromey  <tom@tromey.com>
1574
1575         * expression.h (enum exp_opcode): Use uint8_t as base type.
1576         * expprint.c (op_name): Handle invalid opcodes.
1577
1578 2018-10-03  Tom Tromey  <tom@tromey.com>
1579
1580         * parse.c (prefixify_expression): Add assert.
1581         (parse_exp_in_context_1): Throw exception if the expression is
1582         empty.
1583
1584 2018-10-03  Tom Tromey  <tom@tromey.com>
1585
1586         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1587
1588 2018-10-03  Tom Tromey  <tom@tromey.com>
1589
1590         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1591
1592 2018-10-03  Tom Tromey  <tom@tromey.com>
1593
1594         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1595         unsigned.
1596
1597 2018-10-03  Tom Tromey  <tom@tromey.com>
1598
1599         * findvar.c (extract_integer): Do work in an unsigned type.
1600
1601 2018-10-03  Tom Tromey  <tom@tromey.com>
1602
1603         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1604         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1605         base type.
1606         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1607         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1608         type.
1609         * c-lang.h (enum c_string_type_values): Use unsigned as base
1610         type.
1611         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1612
1613 2018-10-03  Tom Tromey  <tom@tromey.com>
1614
1615         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1616         <~dwarf2_frame_state_reg_info>: Update.
1617         <dwarf2_frame_state_reg_info>: Update.
1618         <alloc_regs>: Add assertion.  Update.
1619         <reg>: Now a std::vector.
1620         <num_regs>: Remove.
1621         <swap>: Update.
1622         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1623         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1624
1625 2018-10-03  Tom Tromey  <tom@tromey.com>
1626
1627         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1628
1629 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1630
1631         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1632
1633 2018-10-02  Tom Tromey  <tom@tromey.com>
1634
1635         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1636
1637 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1638
1639         * NEWS: Mention changed commands.
1640         * ser-uds.c: New file.
1641         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1642         * configure: Regenerate.
1643         * Makefile.in: Add new file.
1644         * serial.c (serial_open): Check if filename is a socket
1645           and lookup the appropriate interface accordingly.
1646
1647 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1648
1649         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1650         define.
1651         (AARCH64_EXTRA_MAGIC): Likewise.
1652         (AARCH64_FPSIMD_MAGIC): Likewise.
1653         (AARCH64_SVE_MAGIC): Likewise.
1654         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1655         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1656         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1657         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1658         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1659         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1660         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1661         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1662         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1663         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1664         (read_aarch64_ctx): Add function.
1665         (aarch64_linux_sigframe_init): Detect FP registers.
1666
1667 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1668
1669         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1670         (AARCH64_D0_REGNUM): Likewise.
1671         (AARCH64_S0_REGNUM): Likewise.
1672         (AARCH64_H0_REGNUM): Likewise.
1673         (AARCH64_B0_REGNUM): Likewise.
1674         (AARCH64_SVE_V0_REGNUM): Likewise.
1675         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1676         (AARCH64_D0_REGNUM): Likewise.
1677         (AARCH64_S0_REGNUM): Likewise.
1678         (AARCH64_H0_REGNUM): Likewise.
1679         (AARCH64_B0_REGNUM): Likewise.
1680         (AARCH64_SVE_V0_REGNUM): Likewise.
1681
1682 2018-10-01  Gary Benson <gbenson@redhat.com>
1683
1684         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1685         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1686         prfpregset_t instead of gdb_prfpregset_t.
1687         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1688         * configure, config.in: Rebuild.
1689
1690 2018-10-01  Gary Benson <gbenson@redhat.com>
1691
1692         * common/gdb_proc_service.h: New file, factored out from...
1693         * gdb_proc_service.h: Moved common code to the above file.
1694         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1695
1696 2018-10-01  Gary Benson <gbenson@redhat.com>
1697
1698         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1699         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1700
1701 2018-10-01  Gary Benson <gbenson@redhat.com>
1702
1703         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1704         (AC_CHECK_HEADERS): Check for linux/elf.h.
1705         * configure, config.in: Rebuild.
1706         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1707         doesn't define elf_fpregset_t.
1708
1709 2018-10-01  Gary Benson <gbenson@redhat.com>
1710
1711         * gdb_proc_service.h: Whitespace change.
1712
1713 2018-10-01  Tom Tromey  <tom@tromey.com>
1714
1715         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1716         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1717         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1718
1719 2018-10-01  Tom Tromey  <tom@tromey.com>
1720
1721         * README: Minor change.
1722
1723 2018-09-30  Pedro Alves  <palves@redhat.com>
1724
1725         * darwin-nat-info.c (darwin_debug_regions_recurse)
1726         (info_mach_exceptions_command): Remove unused local variables.
1727         * darwin-nat.c (darwin_decode_notify_message)
1728         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1729         (darwin_stop_inferior, darwin_setup_exceptions)
1730         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1731         (darwin_nat_target::attach, darwin_nat_target::detach)
1732         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1733         local variables.
1734         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1735         variables.
1736
1737 2018-09-29  Tom Tromey  <tom@tromey.com>
1738
1739         * README: Remove some leftover text.
1740
1741 2018-09-29  Tom Tromey  <tom@tromey.com>
1742
1743         * PROBLEMS: Rewrite.
1744         * README: Update.
1745
1746 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1747
1748         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1749         case with explicit breakpoint kind.
1750         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1751         'additional_info' and related logic.
1752         (riscv_debug_breakpoints): New variable.
1753         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1754         instruction to determine the breakpoint kind.
1755         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1756         flag.  Update description of 'set/show riscv
1757         use-compressed-breakpoints' flag.
1758
1759 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1760
1761         (NEWS): Mention changes to frame related commands.
1762         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1763         (add_prefix_cmd_suppress_notification): New function.
1764         (add_com_suppress_notification): Call
1765         add_cmd_suppress_notification.
1766         * command.h (add_cmd_suppress_notification): Declare.
1767         (add_prefix_cmd_suppress_notification): Declare.
1768         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1769         (parse_frame_specification): Moved from stack.c, with
1770         simplification to handle a single argument.
1771         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1772         switch to the selected frame.  Add a header comment.
1773         * stack.c: Remove 'safe-ctype.h' include.
1774         (find_frame_for_function): Add declaration.
1775         (find_frame_for_address): New function.
1776         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1777         (frame_selection_by_function_completer): New function.
1778         (info_frame_command): Rename to...
1779         (info_frame_command_core): ...this, and update parameter types.
1780         (select_frame_command): Rename to...
1781         (select_frame_command_core): ...this, and update parameter types.
1782         (frame_command): Rename to...
1783         (frame_command_core): ...this, and update parameter types.
1784         (class frame_command_helper): New class to wrap implementations of
1785         frame related sub-commands.
1786         (frame_apply_cmd_list): New static global.
1787         (frame_cmd_list): Make static.
1788         (select_frame_cmd_list): New global for sub-commands.
1789         (info_frame_cmd_list): New global for sub-commands.
1790         (_initialize_stack): Register sub-commands for 'frame',
1791         'select-frame', and 'info frame'.  Update 'frame apply' commands
1792         to use frame_apply_cmd_list.  Move function local static
1793         frame_apply_list to file static frame_apply_cmd_list for
1794         consistency.
1795         * stack.h (select_frame_command): Delete declarationn.
1796         (select_frame_for_mi): Declare new function.
1797
1798 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1799
1800         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1801         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1802         and NOP.
1803
1804 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1805
1806         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1807
1808 2018-09-26  Tom Tromey  <tom@tromey.com>
1809
1810         * valops.c (auto_abandon): Remove dead code.
1811
1812 2018-09-26  Tom Tromey  <tom@tromey.com>
1813
1814         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1815
1816 2018-09-24  Tom Tromey  <tom@tromey.com>
1817
1818         * common/pathstuff.c (get_standard_cache_dir): Make
1819         "xdg_cache_home" and "home" const.
1820         * top.c (init_history): Make "tmpenv" const.
1821         * main.c (get_init_files): Make "homedir" const.
1822
1823 2018-09-23  Tom Tromey  <tom@tromey.com>
1824
1825         PR python/18852:
1826         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1827
1828 2018-09-23  Tom Tromey  <tom@tromey.com>
1829
1830         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1831         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1832         * python/python-internal.h (gdbpy_handle_exception): Declare.
1833         * python/py-utils.c (gdbpy_handle_exception): New function.
1834
1835 2018-09-23  Tom Tromey  <tom@tromey.com>
1836
1837         PR python/17284:
1838         * python/py-type.c (typy_template_argument): Check for negative
1839         argument number.
1840
1841 2018-09-23  Tom Tromey  <tom@tromey.com>
1842
1843         PR python/14062:
1844         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1845
1846 2018-09-23  Tom Tromey  <tom@tromey.com>
1847
1848         PR python/18170:
1849         * python/py-value.c (valpy_int): Allow conversion from pointer
1850         type.
1851
1852 2018-09-23  Tom Tromey  <tom@tromey.com>
1853
1854         PR python/20126:
1855         * python/py-value.c (valpy_int): Respect type sign.
1856
1857 2018-09-23  Tom Tromey  <tom@tromey.com>
1858
1859         PR python/18352;
1860         * python/py-value.c (valpy_float): Allow conversions from int or
1861         char.
1862         (valpy_int, valpy_long): Allow conversions from float.
1863
1864 2018-09-23  Tom Tromey  <tom@tromey.com>
1865
1866         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1867         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1868
1869 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1870
1871         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1872         __sighndlr.
1873         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1874
1875 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1876
1877         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1878         target_terminal::ours().
1879
1880 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1881
1882         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1883         of vl to ULONGEST.
1884
1885 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1886
1887         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1888         redundant condition.
1889
1890 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1891
1892         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1893
1894         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1895         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1896         * sol-thread.c (ps_pdmodel): Don't guard definition.
1897
1898         * procfs.c: Fix formatting.
1899
1900         * procfs.c (sysset_t_alloc): Remove.
1901         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1902         (procfs_debug_inferior): Likewise.
1903         (procfs_set_exec_trap): Likewise.
1904         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1905         (proc_set_traced_sysexit): Likewise.
1906
1907         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1908         (dead_procinfo): Likewise.
1909         (proc_warn): Likewise.
1910         (proc_error): Likewise.
1911         (proc_get_LDT_entry): Likewise.
1912         (do_attach): Likewise.
1913         (procfs_target::pid_to_str): Likewise.
1914         (iterate_over_mappings): Likewise.
1915
1916         * procfs.c (create_procinfo): Fix ARI warning.
1917         (proc_get_status): Likewise.
1918         (proc_stop_process): Likewise.
1919         (proc_run_process): Likewise.
1920         (proc_kill): Likewise.
1921         (proc_get_LDT_entry): Likewise.
1922         (procfs_find_LDT_entry): Likewise.
1923         (proc_update_threads): Likewise.
1924         (proc_iterate_over_threads): Likewise.
1925         (do_attach): Likewise.
1926         (procfs_xfer_memory): Likewise.
1927         (invalidate_cache): Likewise.
1928         (procfs_target::resume): Likewise.
1929         (procfs_init_inferior): Likewise.
1930         (procfs_set_exec_trap): Likewise.
1931         (procfs_target::thread_alive): Likewise.
1932         (procfs_target::pid_to_exec_file): Likewise.
1933         (iterate_over_mappings): Likewise.
1934         (procfs_target::make_corefile_notes): Likewise.
1935         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1936
1937         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1938         (procfs_find_LDT_entry): Likewise.
1939         * sol-thread.c (ps_lgetLDT): Likewise.
1940
1941 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1942
1943         PR tdep/17903
1944         * procfs.c (procfs_target): Declare pid_to_exec_file.
1945         (procfs_target::pid_to_exec_file): New.
1946
1947 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1948
1949         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1950         renaming.
1951         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1952         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1953
1954 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1955
1956         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1957         (supply_fpregset, fill_fpregset): Move ...
1958         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1959         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1960         Remove references to ioctl-based procfs.
1961         Include <sys/reg.h>.
1962         Remove PR_MODEL_NATIVE guards.
1963         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1964         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1965
1966 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1967
1968         PR gdb/20981:
1969         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1970         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1971         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1972
1973 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1974
1975         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1976         (fbsd_print_sockaddr_in6): Likewise.
1977
1978 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1979             Chris January  <chris.january@arm.com>
1980
1981         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1982         (evaluate_subexp_standard): Return a dummy type when
1983         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1984         OP_F77_UNDETERMINED_ARGLIST case.
1985         * expression.h (enum noside): Update comment.
1986
1987 2018-09-19  George Vasick <george.vasick@oracle.com>
1988
1989         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1990
1991 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1992             April Chin <april.chin@oracle.com>
1993             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1994
1995         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1996         uint_t lwpid_t.
1997         (create_procinfo): Print pids in /proc without leading zeros.
1998
1999 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
2000
2001         * nios2-tdep.c (nios2_gcc_target_options): New.
2002         (nios2_gdb_arch_init): Install new hook.
2003
2004 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2005
2006         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
2007         New file.
2008         * update-gnulib.sh: Apply patch.
2009         * configure: Re-generate.
2010
2011 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2012
2013         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
2014         description.  Make "info proc" command descriptions more
2015         consistent.
2016
2017 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2018
2019         * NEWS: Mention 'info proc files' command.
2020
2021 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2022
2023         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
2024         descriptors for IP_FILES and IP_ALL.
2025
2026 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2027
2028         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
2029         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
2030         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
2031         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
2032         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
2033         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
2034         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
2035         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
2036         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
2037         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
2038         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
2039         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
2040         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
2041         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
2042         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
2043         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
2044         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
2045         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
2046         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
2047         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
2048         (struct fbsd_sockaddr_un): New types.
2049         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
2050         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
2051         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
2052         (fbsd_core_info_proc_files): New functions.
2053         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
2054         IP_ALL.
2055         * fbsd-tdep.h (fbsd_info_proc_files_header)
2056         (fbsd_info_proc_files_entry): New.
2057
2058 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2059
2060         * defs.h (enum info_proc_what) [IP_FILES]: New value.
2061         * infcmd.c (info_proc_cmd_files): New function.
2062         (_initialize_infcmd): Register 'info proc files' command.
2063
2064 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2065
2066         * gnulib/aclocal-m4-deps.mk: Re-generate.
2067         * gnulib/aclocal.m4: Re-generate.
2068         * gnulib/config.in: Re-generate.
2069         * gnulib/configure: Re-generate.
2070         * gnulib/import/Makefile.am: Re-generate.
2071         * gnulib/import/Makefile.in: Re-generate.
2072         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2073         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2074         * gnulib/import/arpa_inet.in.h: New file.
2075         * gnulib/import/inet_ntop.c: New file.
2076         * gnulib/import/m4/arpa_inet_h.m4: New file.
2077         * gnulib/import/m4/inet_ntop.m4: New file.
2078         * gnulib/import/m4/netinet_in_h.m4: New file.
2079         * gnulib/import/m4/socklen.m4: New file.
2080         * gnulib/import/m4/sockpfaf.m4: New file.
2081         * gnulib/import/m4/stdalign.m4: New file.
2082         * gnulib/import/m4/sys_uio_h.m4: New file.
2083         * gnulib/import/netinet_in.in.h: New file.
2084         * gnulib/import/stdalign.in.h: New file.
2085         * gnulib/import/sys_socket.c: New file.
2086         * gnulib/import/sys_socket.in.h: New file.
2087         * gnulib/import/sys_uio.in.h: New file.
2088         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
2089         module.
2090
2091 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2092
2093         * gnulib/aclocal-m4-deps.mk: New file.
2094         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
2095         deterministically.
2096
2097 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2098
2099         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
2100         KVE_PATH.
2101
2102 2018-09-18  Tom Tromey  <tom@tromey.com>
2103
2104         * compile/compile-object-load.c (struct
2105         link_hash_table_cleanup_data): Add constructor and destructor.
2106         Use DISABLE_COPY_AND_ASSIGN.
2107         (~link_hash_table_cleanup_data): Rename from
2108         link_hash_table_free.  Now a destructor.
2109         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
2110
2111 2018-09-18  Tom Tromey  <tom@tromey.com>
2112
2113         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2114         * compile/compile-object-load.c (struct munmap_list): Move to
2115         header file.
2116         (munmap_list::add): Rename from munmap_list_add; rewrite.
2117         (munmap_list::~munmap_list): Rename from munmap_list_free.
2118         (munmap_listp_free_cleanup): Remove.
2119         (compile_object_load): Update.
2120         * compile/compile-object-load.h (struct munmap_list): Move from
2121         compile-object-load.c.  Rewrite.
2122
2123 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
2124
2125         * aarch64-tdep.c (pass_in_v): Use register size.
2126         (aarch64_extract_return_value): Likewise.
2127         (aarch64_store_return_value): Likewise.
2128
2129 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2130
2131         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
2132         rlim_t.
2133
2134 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2135
2136         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
2137         Fix short help line.
2138
2139 2018-09-17  Tom Tromey  <tom@tromey.com>
2140
2141         PR python/20445:
2142         * configure: Rebuild.
2143         * configure.ac: Conditionally use -DNDEBUG for Python.
2144
2145 2018-09-17  Tom Tromey  <tom@tromey.com>
2146
2147         * configure: Rebuild.
2148         * configure.ac: Use gmp as a library dependency when checking for
2149         mpfr.
2150
2151 2018-09-17  Pedro Alves  <palves@redhat.com>
2152
2153         * python/py-inferior.c (find_inferior_object): Delete.
2154
2155 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
2156
2157         * compile/compile-cplus-types.c
2158         (compile_cplus_instance::enter_scope): Don't use new_scope after
2159         std::move.
2160
2161 2018-09-17  Tom Tromey  <tom@tromey.com>
2162
2163         * common/pathstuff.c (get_standard_cache_dir): Use
2164         ~/Library/Caches on macOS.
2165         * common/pathstuff.h (get_standard_cache_dir): Update comment.
2166
2167 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
2168
2169         PR python/23669
2170         * breakpoint.c (commands_cmd_element): New.
2171         (_initialize_breakpoint): Assign commands_cmd_element.
2172         * breakpoint.h (commands_cmd_element): New.
2173         * cli/cli-script.c (while_cmd_element, if_command,
2174         define_cmd_element): New.
2175         (command_name_equals): Remove.
2176         (process_next_line): Compare commands by pointer, not by name.
2177         (_initialize_cli_script): Assign the various cmd_list_element
2178         variables.
2179         * compile/compile.c (compile_cmd_element): New.
2180         (_initialize_compile): Assign compile_cmd_element.
2181         * compile/compile.h (compile_cmd_element): New.
2182         * guile/guile.c (guile_cmd_element): New.
2183         (install_gdb_commands): Assign guile_cmd_element.
2184         * guile/guile.h (guile_cmd_element): New.
2185         * python/python.c (python_cmd_element): New.
2186         (_initialize_python): Assign python_cmd_element.
2187         * python/python.h (python_cmd_element): New.
2188         * tracepoint.c (while_stepping_cmd_element): New.
2189         (_initialize_tracepoint): Assign while_stepping_cmd_element.
2190         * tracepoint.h (while_stepping_cmd_element): New.
2191
2192 2018-09-17  Tom Tromey  <tom@tromey.com>
2193
2194         * infrun.c (save_infcall_suspend_state): Return
2195         infcall_suspend_state_up.
2196         (save_infcall_control_state): Return infcall_control_state_up.
2197         * inferior.h (save_infcall_suspend_state)
2198         (save_infcall_control_state): Declare later.  Return unique
2199         pointers.
2200
2201 2018-09-17  Tom Tromey  <tom@tromey.com>
2202
2203         * infrun.c (struct stop_context): Declare constructor,
2204         destructor, "changed" method.
2205         (stop_context::stop_context): Rename from save_stop_context.
2206         (stop_context::~stop_context): Rename from
2207         release_stop_context_cleanup.
2208         (normal_stop): Update.
2209         (stop_context::changed): Rename from stop_context_changed.  Return
2210         bool.
2211
2212 2018-09-17  Tom Tromey  <tom@tromey.com>
2213
2214         * inferior.h (struct infcall_suspend_state_deleter): New.
2215         (infcall_suspend_state_up): New typedef.
2216         (struct infcall_control_state_deleter): New.
2217         (infcall_control_state_up): New typedef.
2218         (make_cleanup_restore_infcall_suspend_state)
2219         (make_cleanup_restore_infcall_control_state): Don't declare.
2220         * infcall.c (call_function_by_hand_dummy): Update.
2221         * infrun.c (do_restore_infcall_suspend_state_cleanup)
2222         (make_cleanup_restore_infcall_suspend_state): Remove.
2223         (do_restore_infcall_control_state_cleanup)
2224         (make_cleanup_restore_infcall_control_state): Remove.
2225
2226 2018-09-17  Tom Tromey  <tom@tromey.com>
2227
2228         * gdbthread.h (struct thread_control_state): Add initializer.
2229         (class thread_info) <control>: Remove initializer.
2230         * inferior.h (struct inferior_control_state): Add initializer.
2231         (class inferior) <control>: Remove initializer.
2232         (exit_inferior_1): Update.
2233         * infrun.c (struct infcall_control_state): Add constructors.
2234         (save_infcall_control_state): Use new.
2235         (restore_infcall_control_state, discard_infcall_control_state):
2236         Use delete.
2237
2238 2018-09-17  Tom Tromey  <tom@tromey.com>
2239
2240         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2241         unique_ptr.
2242         <siginfo_data>: Now a unique_xmalloc_ptr.
2243         (save_infcall_suspend_state, restore_infcall_suspend_state)
2244         (discard_infcall_suspend_state)
2245         (get_infcall_suspend_state_regcache): Update.
2246
2247 2018-09-17  Tom Tromey  <tom@tromey.com>
2248
2249         * gdbthread.h (struct thread_suspend_state): Add initializers.
2250         (class thread_info) <suspend>: Remove initializer.
2251         * infrun.c (struct infcall_suspend_state): Add initializers.
2252         (save_infcall_suspend_state): Use new.
2253         (discard_infcall_suspend_state): Use delete.
2254
2255 2018-09-16  Tom Tromey  <tom@tromey.com>
2256
2257         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2258         Remove.
2259         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2260         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2261         (py_varobj_iter_new): Likewise.
2262         (py_varobj_get_iterator): Use gdbpy_ref.
2263
2264 2018-09-16  Tom Tromey  <tom@tromey.com>
2265
2266         * python/py-threadevent.c (py_get_event_thread): Simplify.
2267         * python/py-inferior.c (infpy_thread_from_thread_handle):
2268         Return immediately after calling thread_to_thread_object.  Use
2269         Py_RETURN_NONE.
2270         (thread_to_thread_object): Set the exception on a NULL return.
2271
2272 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2273
2274         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2275
2276 2018-09-16  Tom Tromey  <tom@tromey.com>
2277
2278         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2279         Remove.
2280
2281 2018-09-16  Tom Tromey  <tom@tromey.com>
2282
2283         * python/python-internal.h (thread_to_thread_object): Change
2284         return type.
2285         * python/py-inferior.c (thread_to_thread_object): Return a new
2286         reference.
2287         (infpy_thread_from_thread_handle): Update.
2288         * python/py-infthread.c (gdbpy_selected_thread): Update.
2289         * python/py-stopevent.c (create_stop_event_object): Update.
2290         * python/py-threadevent.c (py_get_event_thread): Return a new
2291         reference.
2292         (py_get_event_thread): Update.
2293         * python/py-event.h (py_get_event_thread): Change return type.
2294         * python/py-continueevent.c (create_continue_event_object):
2295         Update.
2296
2297 2018-09-16  Tom Tromey  <tom@tromey.com>
2298
2299         * python/py-progspace.c (pspy_get_objfiles): Update.
2300         * python/python-internal.h (objfile_to_objfile_object): Change
2301         return type.
2302         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2303         Update.
2304         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2305         Update.
2306         * python/python.c (gdbpy_get_current_objfile): Update.
2307         (gdbpy_objfiles): Update.
2308         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2309         Update.
2310         (objfile_to_objfile_object): Return a new reference.
2311         * python/py-symtab.c (stpy_get_objfile): Update.
2312         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2313         Update.
2314
2315 2018-09-16  Tom Tromey  <tom@tromey.com>
2316
2317         * python/py-inferior.c (infpy_get_progspace): Update.
2318         * python/python-internal.h (pspace_to_pspace_object): Change
2319         return type.
2320         * python/py-newobjfileevent.c
2321         (create_clear_objfiles_event_object): Update.
2322         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2323         Update.
2324         * python/python.c (gdbpy_get_current_progspace): Update.
2325         (gdbpy_progspaces): Update.
2326         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2327         reference.
2328         * python/py-objfile.c (objfpy_get_progspace): Update.
2329         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2330         Update.
2331
2332 2018-09-16  Tom Tromey  <tom@tromey.com>
2333
2334         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2335         (solib_name, block_for_pc, find_pc_line): New functions.
2336         (execute_unwinders): Update.
2337         * python/py-block.c (gdbpy_block_for_pc): Remove.
2338         * python/py-inferior.c (infpy_get_progspace): New function.
2339         (inferior_object_getset) <progspace>: Add.
2340         * python/py-progspace.c (pspy_objfiles): Rewrite.
2341         (pspy_solib_name, pspy_block_for_pc)
2342         (pspy_find_pc_line, pspy_is_valid): New functions.
2343         (progspace_object_methods): Add entries for solib_name,
2344         block_for_pc, find_pc_line, is_valid.
2345         * python/python-internal.h (gdbpy_block_for_pc)
2346         (build_objfiles_list): Don't declare.
2347         * python/python.c: Don't include solib.h.
2348         (gdbpy_solib_name, gdbpy_find_pc_line)
2349         (gdbpy_get_current_progspace, build_objfiles_list)
2350         (gdbpy_objfiles): Remove.
2351         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2352         solib_name, find_pc_line>: Remove entries.
2353
2354 2018-09-16  Tom Tromey  <tom@tromey.com>
2355
2356         * top.c (new_ui_command): Use GNU style for metasyntactic
2357         variables.
2358         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2359         variables.
2360         * maint.c (maintenance_translate_address): Remove "<>" around
2361         text.
2362         * interps.c (interpreter_exec_cmd): Use GNU style for
2363         metasyntactic variables.
2364         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2365         metasyntactic variables.
2366         * tracepoint.c (tfind_range_command): Use GNU style for
2367         metasyntactic variables.
2368         (tfind_outside_command): Likewise.
2369         (_initialize_tracepoint): Likewise.
2370         * remote.c (extended_remote_target::create_inferior): Use GNU
2371         style for metasyntactic variables.
2372         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2373         metasyntactic variables.
2374         (adi_assign_command): Likewise.
2375
2376 2018-09-16  Tom Tromey  <tom@tromey.com>
2377
2378         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2379         metasyntactic variables.  Print message if no disassembler options
2380         are available.
2381
2382 2018-09-15  Tom Tromey  <tom@tromey.com>
2383
2384         * infcmd.c (get_inferior_args): Return const char *.
2385         * inferior.h (get_inferior_args): Return type now const.
2386         * linux-tdep.c (linux_fill_prpsinfo): Update.
2387         * procfs.c (procfs_target::make_corefile_notes): Update.
2388
2389 2018-09-07  Tom Tromey  <tom@tromey.com>
2390
2391         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2392         inside the TRY.
2393
2394 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2395
2396         * nios2-tdep.c (nios2_type_align): New.
2397         (nios2_gdb_arch_init): Install type_align hook.
2398
2399 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2400
2401         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2402         type that is neither object file owned, nor gdbarch owned.
2403         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2404         gdbarch is non-NULL.
2405         (alloc_type_instance): Allocate non-objfile owned types on the
2406         gdbarch obstack.
2407         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2408         using TYPE_ALLOC to ensure memory is allocated on the correct
2409         obstack.
2410         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2411         obstack, or the gdbarch obstack.
2412         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2413
2414 2018-09-14  Tom Tromey  <tom@tromey.com>
2415
2416         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2417         block.
2418
2419 2018-09-14  Tom Tromey  <tom@tromey.com>
2420
2421         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2422
2423 2018-09-13  Tom Tromey  <tom@tromey.com>
2424
2425         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2426         static.
2427
2428 2018-09-13  Tom Tromey  <tom@tromey.com>
2429
2430         * exec.c (try_open_exec_file): Use std::string.
2431
2432 2018-09-13  Tom Tromey  <tom@tromey.com>
2433
2434         * utils.h (gdb_bfd_errmsg): Return std::string.
2435         * exec.c (exec_file_attach): Update.
2436         * compile/compile-object-load.c (compile_object_load): Update.
2437         * utils.c (gdb_bfd_errmsg): Return std::string.
2438
2439 2018-09-13  Tom Tromey  <tom@tromey.com>
2440
2441         * procfs.c (struct procinfo_deleter): New.
2442         (procinfo_up): New typedef.
2443         (do_destroy_procinfo_cleanup): Remove.
2444         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2445
2446 2018-09-13  Tom Tromey  <tom@tromey.com>
2447
2448         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2449
2450 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2451 2018-09-13  Tom Tromey  <tom@tromey.com>
2452
2453         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2454         (pspy_get_objfiles): New function.
2455         (progspace_object_methods): New.
2456         (pspace_object_type): Add tp_methods callback.
2457         * python/python-internal.h (build_objfiles_list): New
2458         declaration.
2459         * python/python.c (build_objfiles_list): New function.
2460         (gdbpy_objfiles): Implement using build_objfiles_list.
2461         * NEWS: Mention the Progspace.objfiles method.
2462
2463 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2464
2465         * python/py-inferior.c (infpy_get_progspace): New function.
2466         (inferior_object_getset): Add progspace property.
2467         * NEWS: Mention the new property.
2468
2469 2018-09-13  Tom Tromey  <tom@tromey.com>
2470
2471         PR rust/23650:
2472         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2473
2474 2018-09-13  Tom Tromey  <tom@tromey.com>
2475
2476         PR rust/23626:
2477         * rust-lang.c (rust_enum_variant): Now static.
2478         (rust_empty_enum_p): New function.
2479         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2480         Handle empty enum.
2481
2482 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2483
2484         * python/py-inferior.c (infpy_repr): New.
2485         (inferior_object_type): Register infpy_repr.
2486         * python/py-objfile.c (objfpy_repr): New.
2487         (objfile_object_type): Register objfpy_repr.
2488
2489 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2490
2491         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2492
2493 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2494
2495         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2496         typo.
2497
2498 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2499
2500         * common/common-utils.c: Don't include '<sys/stat.h>'.
2501         (is_regular_file): Move to...
2502         * common/filestuff.c (is_regular_file): ... here.
2503         * common/common-utils.h (is_regular_file): Move to...
2504         * common/filestuff.h (is_regular_file): ... here.
2505
2506 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2507
2508         * skip.c (debug_skip): New variable.
2509         (skiplist_entry::do_skip_file_p): Add debug output.
2510         (skiplist_entry::do_skip_gfile_p): Likewise.
2511         (skiplist_entry::skip_function_p): Likewise.
2512         (_initialize_step_skip): Create debug command.
2513         * NEWS: Mention set/show debug skip.
2514
2515 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2516
2517         * darwin-nat.c (should_disable_startup_with_shell):
2518         New function.
2519         (darwin_nat_target::create_inferior): Add call.
2520
2521 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2522
2523         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2524         inf_port, msg_state>: Initialize.
2525         (struct darwin_thread_info) <signaled, single_step>: Change
2526         type and initialize.
2527         (struct darwin_thread_info) <event>: Initialize.
2528
2529 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2530
2531         PR gdb/23555
2532         PR gdb/23558
2533         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2534         guesses.
2535
2536 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2537
2538         Revert:
2539         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2540
2541         PR gdb/23555
2542         PR gdb/23558
2543         * gnulib/aclocal.m4: Regenerate.
2544         * gnulib/config.in: Regenerate.
2545         * gnulib/configure: Regenerate.
2546         * gnulib/import/Makefile.am: Update.
2547         * gnulib/import/Makefile.in: Update.
2548         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2549         * gnulib/import/_Noreturn.h: ... this.
2550         * gnulib/import/alloca.in.h: Update.
2551         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2552         * gnulib/import/arg-nonnull.h: ... this.
2553         * gnulib/import/assure.h: Update.
2554         * gnulib/import/at-func.c: Update.
2555         * gnulib/import/basename-lgpl.c: Update.
2556         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2557         * gnulib/import/c++defs.h: ... this.
2558         * gnulib/import/canonicalize-lgpl.c: Update.
2559         * gnulib/import/cdefs.h: Update.
2560         * gnulib/import/chdir-long.c: Update.
2561         * gnulib/import/chdir-long.h: Update.
2562         * gnulib/import/cloexec.c: Update.
2563         * gnulib/import/cloexec.h: Update.
2564         * gnulib/import/close.c: Update.
2565         * gnulib/import/closedir.c: Update.
2566         * gnulib/import/config.charset: Update.
2567         * gnulib/import/dirent-private.h: Update.
2568         * gnulib/import/dirent.in.h: Update.
2569         * gnulib/import/dirfd.c: Update.
2570         * gnulib/import/dirname-lgpl.c: Update.
2571         * gnulib/import/dirname.h: Update.
2572         * gnulib/import/dosname.h: Update.
2573         * gnulib/import/dup-safer-flag.c: Update.
2574         * gnulib/import/dup-safer.c: Update.
2575         * gnulib/import/dup.c: Update.
2576         * gnulib/import/dup2.c: Update.
2577         * gnulib/import/errno.in.h: Update.
2578         * gnulib/import/error.c: Update.
2579         * gnulib/import/error.h: Update.
2580         * gnulib/import/exitfail.c: Update.
2581         * gnulib/import/exitfail.h: Update.
2582         * gnulib/import/extra/update-copyright: Update.
2583         * gnulib/import/fchdir.c: Update.
2584         * gnulib/import/fcntl.c: Update.
2585         * gnulib/import/fcntl.in.h: Update.
2586         * gnulib/import/fd-hook.c: Update.
2587         * gnulib/import/fd-hook.h: Update.
2588         * gnulib/import/fd-safer-flag.c: Update.
2589         * gnulib/import/fd-safer.c: Update.
2590         * gnulib/import/fdopendir.c: Update.
2591         * gnulib/import/filename.h: Update.
2592         * gnulib/import/filenamecat-lgpl.c: Update.
2593         * gnulib/import/filenamecat.h: Update.
2594         * gnulib/import/flexmember.h: Update.
2595         * gnulib/import/float+.h: Update.
2596         * gnulib/import/float.c: Update.
2597         * gnulib/import/float.in.h: Update.
2598         * gnulib/import/fnmatch.c: Update.
2599         * gnulib/import/fnmatch.in.h: Update.
2600         * gnulib/import/fnmatch_loop.c: Update.
2601         * gnulib/import/fpucw.h: Update.
2602         * gnulib/import/frexp.c: Update.
2603         * gnulib/import/frexpl.c: Update.
2604         * gnulib/import/fstat.c: Update.
2605         * gnulib/import/fstatat.c: Update.
2606         * gnulib/import/getcwd-lgpl.c: Update.
2607         * gnulib/import/getcwd.c: Update.
2608         * gnulib/import/getdtablesize.c: Update.
2609         * gnulib/import/getlogin_r.c: Update.
2610         * gnulib/import/getprogname.c: Update.
2611         * gnulib/import/getprogname.h: Update.
2612         * gnulib/import/gettext.h: Update.
2613         * gnulib/import/gettimeofday.c: Update.
2614         * gnulib/import/glob-libc.h: Update.
2615         * gnulib/import/glob.c: Update.
2616         * gnulib/import/glob.in.h: Update.
2617         * gnulib/import/glob_internal.h: Update.
2618         * gnulib/import/glob_pattern_p.c: Update.
2619         * gnulib/import/globfree.c: Update.
2620         * gnulib/import/hard-locale.c: Update.
2621         * gnulib/import/hard-locale.h: Update.
2622         * gnulib/import/intprops.h: Update.
2623         * gnulib/import/inttypes.in.h: Update.
2624         * gnulib/import/isnan.c: Update.
2625         * gnulib/import/isnand-nolibm.h: Update.
2626         * gnulib/import/isnand.c: Update.
2627         * gnulib/import/isnanl-nolibm.h: Update.
2628         * gnulib/import/isnanl.c: Update.
2629         * gnulib/import/itold.c: Update.
2630         * gnulib/import/libc-config.h: Update.
2631         * gnulib/import/limits.in.h: Update.
2632         * gnulib/import/localcharset.c: Update.
2633         * gnulib/import/localcharset.h: Update.
2634         * gnulib/import/localtime-buffer.c: Update.
2635         * gnulib/import/localtime-buffer.h: Update.
2636         * gnulib/import/lstat.c: Update.
2637         * gnulib/import/m4/00gnulib.m4: Update.
2638         * gnulib/import/m4/__inline.m4: Update.
2639         * gnulib/import/m4/absolute-header.m4: Update.
2640         * gnulib/import/m4/alloca.m4: Update.
2641         * gnulib/import/m4/builtin-expect.m4: Update.
2642         * gnulib/import/m4/canonicalize.m4: Update.
2643         * gnulib/import/m4/chdir-long.m4: Update.
2644         * gnulib/import/m4/close.m4: Update.
2645         * gnulib/import/m4/closedir.m4: Update.
2646         * gnulib/import/m4/configmake.m4: Update.
2647         * gnulib/import/m4/d-ino.m4: Update.
2648         * gnulib/import/m4/d-type.m4: Update.
2649         * gnulib/import/m4/dirent_h.m4: Update.
2650         * gnulib/import/m4/dirfd.m4: Update.
2651         * gnulib/import/m4/dirname.m4: Update.
2652         * gnulib/import/m4/double-slash-root.m4: Update.
2653         * gnulib/import/m4/dup.m4: Update.
2654         * gnulib/import/m4/dup2.m4: Update.
2655         * gnulib/import/m4/eealloc.m4: Update.
2656         * gnulib/import/m4/environ.m4: Update.
2657         * gnulib/import/m4/errno_h.m4: Update.
2658         * gnulib/import/m4/error.m4: Update.
2659         * gnulib/import/m4/exponentd.m4: Update.
2660         * gnulib/import/m4/exponentl.m4: Update.
2661         * gnulib/import/m4/extensions.m4: Update.
2662         * gnulib/import/m4/extern-inline.m4: Update.
2663         * gnulib/import/m4/fchdir.m4: Update.
2664         * gnulib/import/m4/fcntl-o.m4: Update.
2665         * gnulib/import/m4/fcntl.m4: Update.
2666         * gnulib/import/m4/fcntl_h.m4: Update.
2667         * gnulib/import/m4/fdopendir.m4: Update.
2668         * gnulib/import/m4/filenamecat.m4: Update.
2669         * gnulib/import/m4/flexmember.m4: Update.
2670         * gnulib/import/m4/float_h.m4: Update.
2671         * gnulib/import/m4/fnmatch.m4: Update.
2672         * gnulib/import/m4/fnmatch_h.m4: Update.
2673         * gnulib/import/m4/fpieee.m4: Update.
2674         * gnulib/import/m4/frexp.m4: Update.
2675         * gnulib/import/m4/frexpl.m4: Update.
2676         * gnulib/import/m4/fstat.m4: Update.
2677         * gnulib/import/m4/fstatat.m4: Update.
2678         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2679         * gnulib/import/m4/getcwd-path-max.m4: Update.
2680         * gnulib/import/m4/getcwd.m4: Update.
2681         * gnulib/import/m4/getdtablesize.m4: Update.
2682         * gnulib/import/m4/getlogin.m4: Update.
2683         * gnulib/import/m4/getlogin_r.m4: Update.
2684         * gnulib/import/m4/getpagesize.m4: Update.
2685         * gnulib/import/m4/getprogname.m4: Update.
2686         * gnulib/import/m4/gettimeofday.m4: Update.
2687         * gnulib/import/m4/glibc21.m4: Update.
2688         * gnulib/import/m4/glob.m4: Update.
2689         * gnulib/import/m4/glob_h.m4: Update.
2690         * gnulib/import/m4/gnulib-cache.m4: Update.
2691         * gnulib/import/m4/gnulib-common.m4: Update.
2692         * gnulib/import/m4/gnulib-comp.m4: Update.
2693         * gnulib/import/m4/gnulib-tool.m4: Update.
2694         * gnulib/import/m4/hard-locale.m4: Update.
2695         * gnulib/import/m4/include_next.m4: Update.
2696         * gnulib/import/m4/inttypes-pri.m4: Update.
2697         * gnulib/import/m4/inttypes.m4: Update.
2698         * gnulib/import/m4/isnand.m4: Update.
2699         * gnulib/import/m4/isnanl.m4: Update.
2700         * gnulib/import/m4/largefile.m4: Update.
2701         * gnulib/import/m4/limits-h.m4: Update.
2702         * gnulib/import/m4/localcharset.m4: Update.
2703         * gnulib/import/m4/locale-fr.m4: Update.
2704         * gnulib/import/m4/locale-ja.m4: Update.
2705         * gnulib/import/m4/locale-zh.m4: Update.
2706         * gnulib/import/m4/localtime-buffer.m4: Update.
2707         * gnulib/import/m4/longlong.m4: Update.
2708         * gnulib/import/m4/lstat.m4: Update.
2709         * gnulib/import/m4/malloc.m4: Update.
2710         * gnulib/import/m4/malloca.m4: Update.
2711         * gnulib/import/m4/math_h.m4: Update.
2712         * gnulib/import/m4/mbrtowc.m4: Update.
2713         * gnulib/import/m4/mbsinit.m4: Update.
2714         * gnulib/import/m4/mbsrtowcs.m4: Update.
2715         * gnulib/import/m4/mbstate_t.m4: Update.
2716         * gnulib/import/m4/memchr.m4: Update.
2717         * gnulib/import/m4/memmem.m4: Update.
2718         * gnulib/import/m4/mempcpy.m4: Update.
2719         * gnulib/import/m4/memrchr.m4: Update.
2720         * gnulib/import/m4/mkdir.m4: Update.
2721         * gnulib/import/m4/mkstemp.m4: Update.
2722         * gnulib/import/m4/mmap-anon.m4: Update.
2723         * gnulib/import/m4/mode_t.m4: Update.
2724         * gnulib/import/m4/msvc-inval.m4: Update.
2725         * gnulib/import/m4/msvc-nothrow.m4: Update.
2726         * gnulib/import/m4/multiarch.m4: Update.
2727         * gnulib/import/m4/nocrash.m4: Update.
2728         * gnulib/import/m4/off_t.m4: Update.
2729         * gnulib/import/m4/onceonly.m4: Update.
2730         * gnulib/import/m4/open-cloexec.m4: Update.
2731         * gnulib/import/m4/open.m4: Update.
2732         * gnulib/import/m4/openat.m4: Update.
2733         * gnulib/import/m4/opendir.m4: Update.
2734         * gnulib/import/m4/pathmax.m4: Update.
2735         * gnulib/import/m4/rawmemchr.m4: Update.
2736         * gnulib/import/m4/readdir.m4: Update.
2737         * gnulib/import/m4/readlink.m4: Update.
2738         * gnulib/import/m4/realloc.m4: Update.
2739         * gnulib/import/m4/rename.m4: Update.
2740         * gnulib/import/m4/rewinddir.m4: Update.
2741         * gnulib/import/m4/rmdir.m4: Update.
2742         * gnulib/import/m4/save-cwd.m4: Update.
2743         * gnulib/import/m4/secure_getenv.m4: Update.
2744         * gnulib/import/m4/setenv.m4: Update.
2745         * gnulib/import/m4/signal_h.m4: Update.
2746         * gnulib/import/m4/ssize_t.m4: Update.
2747         * gnulib/import/m4/stat-time.m4: Update.
2748         * gnulib/import/m4/stat.m4: Update.
2749         * gnulib/import/m4/std-gnu11.m4: Update.
2750         * gnulib/import/m4/stdbool.m4: Update.
2751         * gnulib/import/m4/stddef_h.m4: Update.
2752         * gnulib/import/m4/stdint.m4: Update.
2753         * gnulib/import/m4/stdio_h.m4: Update.
2754         * gnulib/import/m4/stdlib_h.m4: Update.
2755         * gnulib/import/m4/strchrnul.m4: Update.
2756         * gnulib/import/m4/strdup.m4: Update.
2757         * gnulib/import/m4/strerror.m4: Update.
2758         * gnulib/import/m4/string_h.m4: Update.
2759         * gnulib/import/m4/strstr.m4: Update.
2760         * gnulib/import/m4/strtok_r.m4: Update.
2761         * gnulib/import/m4/sys_socket_h.m4: Update.
2762         * gnulib/import/m4/sys_stat_h.m4: Update.
2763         * gnulib/import/m4/sys_time_h.m4: Update.
2764         * gnulib/import/m4/sys_types_h.m4: Update.
2765         * gnulib/import/m4/tempname.m4: Update.
2766         * gnulib/import/m4/time_h.m4: Update.
2767         * gnulib/import/m4/unistd-safer.m4: Update.
2768         * gnulib/import/m4/unistd_h.m4: Update.
2769         * gnulib/import/m4/warn-on-use.m4: Update.
2770         * gnulib/import/m4/wchar_h.m4: Update.
2771         * gnulib/import/m4/wchar_t.m4: Update.
2772         * gnulib/import/m4/wctype_h.m4: Update.
2773         * gnulib/import/m4/wint_t.m4: Update.
2774         * gnulib/import/malloc.c: Update.
2775         * gnulib/import/malloc/scratch_buffer.h: Update.
2776         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2777         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2778         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2779         * gnulib/import/malloca.c: Update.
2780         * gnulib/import/malloca.h: Update.
2781         * gnulib/import/malloca.valgrind: Update.
2782         * gnulib/import/math.in.h: Update.
2783         * gnulib/import/mbrtowc.c: Update.
2784         * gnulib/import/mbsinit.c: Update.
2785         * gnulib/import/mbsrtowcs-impl.h: Update.
2786         * gnulib/import/mbsrtowcs-state.c: Update.
2787         * gnulib/import/mbsrtowcs.c: Update.
2788         * gnulib/import/memchr.c: Update.
2789         * gnulib/import/memmem.c: Update.
2790         * gnulib/import/mempcpy.c: Update.
2791         * gnulib/import/memrchr.c: Update.
2792         * gnulib/import/mkdir.c: Update.
2793         * gnulib/import/mkstemp.c: Update.
2794         * gnulib/import/msvc-inval.c: Update.
2795         * gnulib/import/msvc-inval.h: Update.
2796         * gnulib/import/msvc-nothrow.c: Update.
2797         * gnulib/import/msvc-nothrow.h: Update.
2798         * gnulib/import/open.c: Update.
2799         * gnulib/import/openat-die.c: Update.
2800         * gnulib/import/openat-priv.h: Update.
2801         * gnulib/import/openat-proc.c: Update.
2802         * gnulib/import/openat.c: Update.
2803         * gnulib/import/openat.h: Update.
2804         * gnulib/import/opendir.c: Update.
2805         * gnulib/import/pathmax.h: Update.
2806         * gnulib/import/pipe-safer.c: Update.
2807         * gnulib/import/rawmemchr.c: Update.
2808         * gnulib/import/readdir.c: Update.
2809         * gnulib/import/readlink.c: Update.
2810         * gnulib/import/realloc.c: Update.
2811         * gnulib/import/ref-add.sin: Update.
2812         * gnulib/import/ref-del.sin: Update.
2813         * gnulib/import/rename.c: Update.
2814         * gnulib/import/rewinddir.c: Update.
2815         * gnulib/import/rmdir.c: Update.
2816         * gnulib/import/same-inode.h: Update.
2817         * gnulib/import/save-cwd.c: Update.
2818         * gnulib/import/save-cwd.h: Update.
2819         * gnulib/import/scratch_buffer.h: Update.
2820         * gnulib/import/secure_getenv.c: Update.
2821         * gnulib/import/setenv.c: Update.
2822         * gnulib/import/signal.in.h: Update.
2823         * gnulib/import/stat-time.c: Update.
2824         * gnulib/import/stat-time.h: Update.
2825         * gnulib/import/stat-w32.c: Update.
2826         * gnulib/import/stat-w32.h: Update.
2827         * gnulib/import/stat.c: Update.
2828         * gnulib/import/stdbool.in.h: Update.
2829         * gnulib/import/stddef.in.h: Update.
2830         * gnulib/import/stdint.in.h: Update.
2831         * gnulib/import/stdio.in.h: Update.
2832         * gnulib/import/stdlib.in.h: Update.
2833         * gnulib/import/str-two-way.h: Update.
2834         * gnulib/import/strchrnul.c: Update.
2835         * gnulib/import/strdup.c: Update.
2836         * gnulib/import/streq.h: Update.
2837         * gnulib/import/strerror-override.c: Update.
2838         * gnulib/import/strerror-override.h: Update.
2839         * gnulib/import/strerror.c: Update.
2840         * gnulib/import/string.in.h: Update.
2841         * gnulib/import/stripslash.c: Update.
2842         * gnulib/import/strnlen1.c: Update.
2843         * gnulib/import/strnlen1.h: Update.
2844         * gnulib/import/strstr.c: Update.
2845         * gnulib/import/strtok_r.c: Update.
2846         * gnulib/import/sys_stat.in.h: Update.
2847         * gnulib/import/sys_time.in.h: Update.
2848         * gnulib/import/sys_types.in.h: Update.
2849         * gnulib/import/tempname.c: Update.
2850         * gnulib/import/tempname.h: Update.
2851         * gnulib/import/time.in.h: Update.
2852         * gnulib/import/unistd--.h: Update.
2853         * gnulib/import/unistd-safer.h: Update.
2854         * gnulib/import/unistd.in.h: Update.
2855         * gnulib/import/unsetenv.c: Update.
2856         * gnulib/import/verify.h: Update.
2857         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2858         * gnulib/import/wchar.in.h: Update.
2859         * gnulib/import/wctype.in.h: Update.
2860         * gnulib/import/xalloc-oversized.h: Update.
2861         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2862         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2863
2864 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2865
2866         * record-btrace.c (get_thread_current_frame): Remove
2867         old_inferior_ptid.
2868
2869 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2870
2871         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2872         with check_tag to 1 if and only if the type is tagged and the
2873         component being searched cannot been found in the current
2874         view. Otherwise, always call ada_to_fixed_type with
2875         check_tag to 0.
2876
2877 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2878
2879         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2880         declaration.
2881         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2882         * ada-varobj.c (ada_varobj_get_number_of_children,
2883         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2884
2885 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2886
2887         * ada-valprint.c (ada_value_print): Use type instead of
2888         enclosing type.
2889
2890 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2891
2892         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2893         an array of access to unconstrained array.
2894
2895 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2896
2897         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2898         (ada_check_typedef): Use it.
2899
2900 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2901
2902         * ada-varobj.c (ada_varobj_describe_struct_child)
2903         (ada_varobj_describe_child): Handle union case like struct one.
2904
2905 2018-09-10  Tom Tromey  <tom@tromey.com>
2906
2907         PR python/18380:
2908         * python/python.c (_initialize_python): Make example in "python"
2909         help work in Python 3.
2910
2911 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2912
2913         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2914         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2915         $(EXEEXT) to the script, as it is not a program.
2916
2917 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2918
2919         * python/py-prettyprint.c (pretty_print_one_value): Return
2920         gdbpy_ref<>.
2921         (print_string_repr): Adjust.
2922         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2923         * python/python-internal.h (apply_varobj_pretty_printer): Return
2924         gdbpy_ref<>.
2925         * varobj.c (varobj_value_get_print_value): Adjust.
2926
2927 2018-09-08  Tom Tromey  <tom@tromey.com>
2928
2929         PR python/16047:
2930         * python/py-prettyprint.c (pretty_print_one_value): Check for
2931         to_string method.
2932
2933 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2934
2935         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2936         replace_operator_with_call.
2937
2938 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2939
2940         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2941
2942 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2943
2944         * ada-typeprint.c (print_range): Print the bounds using TYPE
2945         rather than its TYPE_TARGET_TYPE.
2946
2947 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2948
2949         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2950         call to ada_to_fixed_value_create.
2951
2952 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2953
2954         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2955
2956 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2957
2958         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2959         by calls to error.
2960
2961 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2962
2963         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2964         Move update of loop variable "fi".
2965
2966 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2967
2968         * ada-lang.c (value_assign_to_component): In the case of
2969         big-endian targets, extract the bits of the given VAL
2970         using an src_offset of zero if container is not a scalar.
2971
2972 2018-09-06  Simon Ser  <contact@emersion.fr>
2973
2974         PR gdb/23105
2975         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2976         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2977         * fbsd-tdep.c (fbsd_make_note_desc): New.
2978         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2979         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2980         * target.h (enum target_object) Add FreeBSD-specific
2981         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2982
2983 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2984
2985         * compile/compile-c.h (generate_c_for_variable_locations):
2986         Change reference to pointer.
2987         * compile/compile-c-support.c (compile_program) <compute>:
2988         Likewise.
2989         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2990         (generate_c_for_for_one_variable): Likewise
2991         (generate_c_for_variable_locations): Likewise
2992         * compile/compile-c-types.c (compile_c_instance::convert_type):
2993         Likewise
2994         * compile/compile-cplus-symbols.c (convert_one_symbol):
2995         std::move the scope passed to enter_scope.
2996         * compile/compile-cplus-types.c
2997         (compile_cplus_instance::enter_scope): Make parameter
2998         rvalue-reference.
2999         (compile_cplus_instance::new_scope): Change reference to
3000         pointer.
3001         (compile_cplus_instance::convert_type): Likewise
3002         (compile_cplus_convert_typedef): std::move the scope passed to
3003         enter_scope.
3004         (compile_cplus_convert_struct_or_union): Likewise.
3005         (compile_cplus_convert_enum): Likewise.
3006         (compile_cplus_convert_namespace): Likewise.
3007         * compile/compile-cplus.h (compile_cplus_instance)
3008         <enter_scope>: Make parameter rvalue-reference.
3009         * compile/compile-internal.h (compile_instance)
3010         <get_cached_type>: Likewise
3011         * compile/compile-loc2c.c (push): Likewise
3012         (pushf): Likewise
3013         (unary): Likewise
3014         (binary): Likewise
3015         (print_label): Likewise
3016         (pushf_register_address): Likewise
3017         (pushf_register): Likewise
3018         (do_compile_dwarf_expr_to_c): Likewise
3019         (compile_dwarf_expr_to_c): Likewise
3020         (compile_dwarf_bounds_to_c): Likewise
3021         * compile/compile.c (compile_instance::get_cached_type):
3022         Likewise
3023         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
3024         (compile_dwarf_bounds_to_c): Likewise
3025         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
3026         (dwarf2_compile_property_to_c): Likewise
3027         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
3028         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3029         Likewise
3030
3031 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3032
3033         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
3034         * tui/tui-data.c (init_content_element): Don't initialize it.
3035
3036 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
3037
3038         * tui/tui-data.h (struct tui_win_info)
3039         <detail::opaque>: Remove.
3040         * tui/tui-data.c (init_win_info): Remove assignment.
3041
3042 2018-09-05  Tom Tromey  <tom@tromey.com>
3043
3044         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
3045         -Wformat-nonliteral.
3046         * target-float.c (host_float_ops<T>::to_string)
3047         (host_float_ops<T>::from_string): Use
3048         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3049         * configure: Rebuild.
3050
3051 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3052
3053         * printcmd.c (printf_c_string): Use
3054         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
3055         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
3056
3057 2018-09-05  Tom Tromey  <tom@tromey.com>
3058
3059         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
3060
3061 2018-09-05  Tom de Vries  <tdevries@suse.de>
3062
3063         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
3064         with resolve_abstract_p == true.
3065         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
3066         defaulting to false. Propagate resolve_abstract_p to
3067         dwarf2_fetch_die_loc_sect_off.
3068         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
3069         parameter, defaulting to false.
3070         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
3071         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
3072         parameter.
3073         * dwarf2read.h (struct die_info): Forward-declare.
3074         (die_info_ptr): New typedef.
3075         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
3076
3077 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
3078
3079         GDB 8.2 released.
3080
3081 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3082             Pedro Alves  <palves@redhat.com>
3083
3084         * gnulib/Makefile.in (aclocal_m4_deps): Move to
3085         "aclocal-m4-deps.mk".  Include file here.
3086         $(srcdir)/aclocal.m4: Add "configure.ac".
3087         * gnulib/aclocal-m4-deps.mk: New file.
3088         * gnulib/update-gnulib.sh: Automatically update
3089         "aclocal-m4-deps.mk".
3090
3091 2018-09-04  Tom Tromey  <tom@tromey.com>
3092
3093         * configure: Rebuild.
3094         * configure.ac: Remove multi-ice code.
3095
3096 2018-09-04  Tom Tromey  <tom@tromey.com>
3097
3098         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
3099         (ada-exp.o): Update.
3100
3101 2018-09-04  Tom Tromey  <tom@tromey.com>
3102
3103         * Makefile.in (printcmd.o, target-float.o): Remove.
3104         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
3105
3106 2018-09-04  Tom Tromey  <tom@tromey.com>
3107
3108         * gnulib/Makefile.in: Remove obsolete comment.
3109         * Makefile.in: Remove obsolete comment.
3110
3111 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
3112
3113         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
3114         line with '+'.
3115
3116 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3117
3118         * riscv-tdep.c: Add 'prologue-value.h' include.
3119         (struct riscv_unwind_cache): New struct.
3120         (riscv_debug_unwinder): New global.
3121         (riscv_scan_prologue): Update arguments, capture register details
3122         from prologue scan.
3123         (riscv_skip_prologue): Reformat arguments line, move end of
3124         prologue calculation into riscv_scan_prologue.
3125         (riscv_frame_cache): Update return type, create
3126         riscv_unwind_cache, scan the prologue, and fill in remaining cache
3127         details.
3128         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
3129         (riscv_frame_prev_register): Use the trad_frame within the
3130         riscv_unwind_cache.
3131         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
3132         flag.
3133
3134 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
3135
3136         * trad-frame.h (trad_frame_set_realreg): Declare.
3137         (trad_frame_set_addr): Declare.
3138         * trad-frame.c (trad_frame_set_realreg): Define new function.
3139         (trad_frame_set_addr): Define new function.
3140         (trad_frame_set_reg_realreg): Use new function.
3141         (trad_frame_set_reg_addr): Use new function.
3142
3143 2018-09-01  Keith Seitz  <keiths@redhat.com>
3144
3145         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
3146         pulongest instead of "%lld".
3147         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
3148         ATTRIBUTE_UNUSED.
3149
3150 2018-08-31  Tom Tromey  <tom@tromey.com>
3151
3152         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
3153         variant part type.
3154
3155 2018-08-31  Pedro Alves  <palves@redhat.com>
3156
3157         * gdbarch.h: Regenerate.
3158
3159 2018-08-31  Pedro Alves  <palves@redhat.com>
3160
3161         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
3162         * target.h (Hardware watchpoint interfaces): Describe
3163         continuable/steppable/non-steppable watchpoints.
3164         * gdbarch.h, gdbarch.c: Regenerate.
3165
3166 2018-08-31  Pedro Alves  <palves@redhat.com>
3167
3168         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
3169         Delete.
3170         * s390-linux-nat.c
3171         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
3172         * target.h (target_ops::have_continuable_watchpoint): Delete.
3173         (target_have_continuable_watchpoint): Delete.
3174         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
3175         * target-delegates.c: Regenerate.
3176
3177 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
3178
3179         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
3180         the files present in "gnulib/import/m4/".
3181
3182 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3183
3184         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
3185         c.sw, c.swsp, and c.sdsp.
3186
3187 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3188
3189         * riscv-tdep.c (struct riscv_inferior_data): Delete.
3190         (riscv_read_misa_reg): Don't cache value read into inferior data.
3191         (riscv_new_inferior_data): Delete.
3192         (riscv_inferior_data_cleanup): Delete.
3193         (riscv_inferior_data): Delete.
3194         (riscv_invalidate_inferior_data): Delete.
3195         (_initialize_riscv_tdep): Remove initialisation of inferior data.
3196
3197 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
3198
3199         * compile/compile-cplus-types.c
3200         (compile_cplus_instance::leave_scope): Take the address of scope
3201         object.
3202         (compile_cplus_instance::convert_qualified_base): Compare quals
3203         to 0.
3204
3205 2018-08-30  Keith Seitz  <keiths@redhat.com>
3206
3207         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
3208         Use "%s" and host_address_to_string instead of "%p" in printf.
3209
3210 2018-08-29  Keith Seitz  <keiths@redhat.com>
3211
3212         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
3213         and compile-cplus-types.c.
3214         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
3215         * c-lang.c (cplus_language_defn): Set C++ compile functions.
3216         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
3217         Declare.
3218         * compile/compile-c-support.c: Include compile-cplus.h.
3219         (load_libcompile): Templatize.
3220         (get_compile_context): "New" function.
3221         (c_get_compile_context): Use get_compile_context.
3222         (cplus_get_compile_context): New function.
3223         (cplus_push_user_expression, cplus_pop_user_expression)
3224         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
3225         (cplus_compute_program): Define new structs/functions.
3226         * compile/compile-cplus-symmbols.c: New file.
3227         * compile/compile-cplus-types.c: New file.
3228         * compile/compile-cplus.h: New file.
3229         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
3230         Declare.
3231         * compile/compile-object-load.c (get_out_value_type): Use
3232         strncmp_iw when comparing symbol names.
3233         (compile_object_load): Add mst_bss and mst_data.
3234         * compile/compile.c (_initialize_compile): Remove
3235         -Wno-implicit-function-declaration from `compile_args'.
3236         * compile/gcc-cp-plugin.h: New file.
3237         * NEWS: Mention C++ compile support and new debug options.
3238
3239 2018-08-29  Keith Seitz  <keiths@redhat.com>
3240
3241         * linespec.c (collect_info::add_symbol): Make virtual.
3242         (struct symbol_searcher_collect_info): New struct.
3243         (symbol_searcher::find_all_symbols): New method.
3244         * symtab.h (class symbol_searcher): New class.
3245
3246 2018-08-29  Keith Seitz  <keiths@redhat.com>
3247
3248         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3249         Change to vector of block_symbol.  Update all users.
3250         (struct collect_info) <symbols>: Likewise.
3251         (collect_info::add_symbol): Take block_symbol as argument.
3252         Update all callers.
3253         (decode_compound_collector) <m_symbols>: Change type to vector
3254         of block_symbol.  Update all users.
3255         (decode_compound_collector::operator ()): Change parameter type
3256         to block_symbol.
3257         (find_method, find_function_symbols, find_linespec_symbols)
3258         (find_label_symbols_in_block, find_label_symbols): Change symbol
3259         vectors to block_symbol vectors.
3260         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3261         block_symbol.
3262
3263 2018-08-29  Keith Seitz  <keiths@redhat.com>
3264
3265         * linespec.c (symbolp): Remove typedef and VEC definitions.
3266         (bound_minimal_symbol_d): Likewise.
3267
3268 2018-08-29  Keith Seitz  <keiths@redhat.com>
3269
3270         * linespec.c (decode_compound_collector::decode_compound_collector):
3271         Remove initialization for `m_symtabs'.
3272         (decode_compound_collector::release_symbols): Change return type
3273         to std::vector.  Update all callers.
3274         (class decode_compound_collector) <m_symbols>: Change type to
3275         std::vector.
3276         (lookup_prefix_sym): Change return type to std::vector.  Update all
3277         callers.
3278         (compare_symbols): Remove.
3279         (std_compare_symbols): Rename to `compare_symbols'.
3280         (find_method): Change `sym_classes' parameter to std::vector.
3281         Update all callers.  Use std::sort to sort sym_classes.
3282         (find_linespec_symbols): Remove cleanup.
3283
3284 2018-08-29  Keith Seitz  <keiths@redhat.com>
3285
3286         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3287         std::vector.  Update all users.
3288         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3289         (struct collect_info) <minimal_symbols>: Likewise.
3290         (compare_msymbols): Return bool.  Change parameters to const
3291         bound_minimal_symbol references.
3292         (find_method, find_function_symbols, find_linespec_symbols): Change
3293         `minsyms' parameter to std::vector.  Update all callers.
3294
3295 2018-08-29  Keith Seitz  <keiths@redhat.com>
3296
3297         * linespec.c (struct linespec) <label_symbols>: Change type to
3298         std::vector.  Update all users.
3299         (find_label_symbols_in_block): Change `result' parameter to
3300         std::vector.  Update all callers.
3301         (find_label_symbols): Return std::vector.  Update all callers.
3302
3303 2018-08-29  Keith Seitz  <keiths@redhat.com>
3304
3305         * linespec.c (struct linespec) <function_symbols>: Change type to
3306         std::vector.  Update all users.
3307         (struct collect_info) <function_symbols>: Likewise.
3308         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3309         (std_compare_symbols): New function.
3310         (find_method, find_function_symbols, find_linespec_symbols)
3311         (find_label_symbols_in_block): Change `symbols' parameter to
3312         std::vector.  Update all callers.
3313         (find_label_symbols): Likewise for `function_symbols' and
3314         `label_funcs_ret'.
3315
3316 2018-08-29  Keith Seitz  <keiths@redhat.com>
3317
3318         * linespec.c (symtab_vector_up): Define.
3319         (struct linespec) <file_symtabs>: Change type to std::vector *.
3320         Update all uses.
3321         (struct collect_info) <file_symtabs>: Likewise.
3322         (collect_symtabs_from_filename): Return symtab_vector_up.
3323         Update all callers.
3324         (decode_objc): Remove cleanup.
3325         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3326         (symtab_collector::release_symtabs): Return symtab_vector_up.
3327         Update all callers.
3328         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3329         Update all users.
3330         (collect_symtabs_from_filename, symtabs_from_filename): Return
3331         symtab_vector_up.  Update all callers.
3332
3333 2018-08-29  Tom Tromey  <tom@tromey.com>
3334
3335         * csky-tdep.c (csky_analyze_prologue): Use
3336         core_addr_to_string_nz.
3337
3338 2018-08-29  Tom Tromey  <tom@tromey.com>
3339
3340         * windows-nat.c (struct xlate_exception) <them>: Change type to
3341         DWORD.
3342         (xlate): Fix formatting.  Remove last entry.
3343         (struct xlate_exception, xlate): Comment out.
3344         (windows_nat_target::resume): Use ranged for.
3345
3346 2018-08-29  Jim Wilson  <jimw@sifive.com>
3347
3348         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3349         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3350         of NT_PRFPREG.
3351         (riscv_linux_nat_target::store_registers): Likewise.
3352
3353 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3354
3355         PR gdb/23555
3356         PR gdb/23558
3357         * gnulib/aclocal.m4: Regenerate.
3358         * gnulib/config.in: Regenerate.
3359         * gnulib/configure: Regenerate.
3360         * gnulib/import/Makefile.am: Update.
3361         * gnulib/import/Makefile.in: Update.
3362         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3363         * gnulib/import/_Noreturn.h: ... this.
3364         * gnulib/import/alloca.in.h: Update.
3365         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3366         * gnulib/import/arg-nonnull.h: ... this.
3367         * gnulib/import/assure.h: Update.
3368         * gnulib/import/at-func.c: Update.
3369         * gnulib/import/basename-lgpl.c: Update.
3370         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3371         * gnulib/import/c++defs.h: ... this.
3372         * gnulib/import/canonicalize-lgpl.c: Update.
3373         * gnulib/import/cdefs.h: Update.
3374         * gnulib/import/chdir-long.c: Update.
3375         * gnulib/import/chdir-long.h: Update.
3376         * gnulib/import/cloexec.c: Update.
3377         * gnulib/import/cloexec.h: Update.
3378         * gnulib/import/close.c: Update.
3379         * gnulib/import/closedir.c: Update.
3380         * gnulib/import/config.charset: Update.
3381         * gnulib/import/dirent-private.h: Update.
3382         * gnulib/import/dirent.in.h: Update.
3383         * gnulib/import/dirfd.c: Update.
3384         * gnulib/import/dirname-lgpl.c: Update.
3385         * gnulib/import/dirname.h: Update.
3386         * gnulib/import/dosname.h: Update.
3387         * gnulib/import/dup-safer-flag.c: Update.
3388         * gnulib/import/dup-safer.c: Update.
3389         * gnulib/import/dup.c: Update.
3390         * gnulib/import/dup2.c: Update.
3391         * gnulib/import/errno.in.h: Update.
3392         * gnulib/import/error.c: Update.
3393         * gnulib/import/error.h: Update.
3394         * gnulib/import/exitfail.c: Update.
3395         * gnulib/import/exitfail.h: Update.
3396         * gnulib/import/extra/update-copyright: Update.
3397         * gnulib/import/fchdir.c: Update.
3398         * gnulib/import/fcntl.c: Update.
3399         * gnulib/import/fcntl.in.h: Update.
3400         * gnulib/import/fd-hook.c: Update.
3401         * gnulib/import/fd-hook.h: Update.
3402         * gnulib/import/fd-safer-flag.c: Update.
3403         * gnulib/import/fd-safer.c: Update.
3404         * gnulib/import/fdopendir.c: Update.
3405         * gnulib/import/filename.h: Update.
3406         * gnulib/import/filenamecat-lgpl.c: Update.
3407         * gnulib/import/filenamecat.h: Update.
3408         * gnulib/import/flexmember.h: Update.
3409         * gnulib/import/float+.h: Update.
3410         * gnulib/import/float.c: Update.
3411         * gnulib/import/float.in.h: Update.
3412         * gnulib/import/fnmatch.c: Update.
3413         * gnulib/import/fnmatch.in.h: Update.
3414         * gnulib/import/fnmatch_loop.c: Update.
3415         * gnulib/import/fpucw.h: Update.
3416         * gnulib/import/frexp.c: Update.
3417         * gnulib/import/frexpl.c: Update.
3418         * gnulib/import/fstat.c: Update.
3419         * gnulib/import/fstatat.c: Update.
3420         * gnulib/import/getcwd-lgpl.c: Update.
3421         * gnulib/import/getcwd.c: Update.
3422         * gnulib/import/getdtablesize.c: Update.
3423         * gnulib/import/getlogin_r.c: Update.
3424         * gnulib/import/getprogname.c: Update.
3425         * gnulib/import/getprogname.h: Update.
3426         * gnulib/import/gettext.h: Update.
3427         * gnulib/import/gettimeofday.c: Update.
3428         * gnulib/import/glob-libc.h: Update.
3429         * gnulib/import/glob.c: Update.
3430         * gnulib/import/glob.in.h: Update.
3431         * gnulib/import/glob_internal.h: Update.
3432         * gnulib/import/glob_pattern_p.c: Update.
3433         * gnulib/import/globfree.c: Update.
3434         * gnulib/import/hard-locale.c: Update.
3435         * gnulib/import/hard-locale.h: Update.
3436         * gnulib/import/intprops.h: Update.
3437         * gnulib/import/inttypes.in.h: Update.
3438         * gnulib/import/isnan.c: Update.
3439         * gnulib/import/isnand-nolibm.h: Update.
3440         * gnulib/import/isnand.c: Update.
3441         * gnulib/import/isnanl-nolibm.h: Update.
3442         * gnulib/import/isnanl.c: Update.
3443         * gnulib/import/itold.c: Update.
3444         * gnulib/import/libc-config.h: Update.
3445         * gnulib/import/limits.in.h: Update.
3446         * gnulib/import/localcharset.c: Update.
3447         * gnulib/import/localcharset.h: Update.
3448         * gnulib/import/localtime-buffer.c: Update.
3449         * gnulib/import/localtime-buffer.h: Update.
3450         * gnulib/import/lstat.c: Update.
3451         * gnulib/import/m4/00gnulib.m4: Update.
3452         * gnulib/import/m4/__inline.m4: Update.
3453         * gnulib/import/m4/absolute-header.m4: Update.
3454         * gnulib/import/m4/alloca.m4: Update.
3455         * gnulib/import/m4/builtin-expect.m4: Update.
3456         * gnulib/import/m4/canonicalize.m4: Update.
3457         * gnulib/import/m4/chdir-long.m4: Update.
3458         * gnulib/import/m4/close.m4: Update.
3459         * gnulib/import/m4/closedir.m4: Update.
3460         * gnulib/import/m4/configmake.m4: Update.
3461         * gnulib/import/m4/d-ino.m4: Update.
3462         * gnulib/import/m4/d-type.m4: Update.
3463         * gnulib/import/m4/dirent_h.m4: Update.
3464         * gnulib/import/m4/dirfd.m4: Update.
3465         * gnulib/import/m4/dirname.m4: Update.
3466         * gnulib/import/m4/double-slash-root.m4: Update.
3467         * gnulib/import/m4/dup.m4: Update.
3468         * gnulib/import/m4/dup2.m4: Update.
3469         * gnulib/import/m4/eealloc.m4: Update.
3470         * gnulib/import/m4/environ.m4: Update.
3471         * gnulib/import/m4/errno_h.m4: Update.
3472         * gnulib/import/m4/error.m4: Update.
3473         * gnulib/import/m4/exponentd.m4: Update.
3474         * gnulib/import/m4/exponentl.m4: Update.
3475         * gnulib/import/m4/extensions.m4: Update.
3476         * gnulib/import/m4/extern-inline.m4: Update.
3477         * gnulib/import/m4/fchdir.m4: Update.
3478         * gnulib/import/m4/fcntl-o.m4: Update.
3479         * gnulib/import/m4/fcntl.m4: Update.
3480         * gnulib/import/m4/fcntl_h.m4: Update.
3481         * gnulib/import/m4/fdopendir.m4: Update.
3482         * gnulib/import/m4/filenamecat.m4: Update.
3483         * gnulib/import/m4/flexmember.m4: Update.
3484         * gnulib/import/m4/float_h.m4: Update.
3485         * gnulib/import/m4/fnmatch.m4: Update.
3486         * gnulib/import/m4/fnmatch_h.m4: Update.
3487         * gnulib/import/m4/fpieee.m4: Update.
3488         * gnulib/import/m4/frexp.m4: Update.
3489         * gnulib/import/m4/frexpl.m4: Update.
3490         * gnulib/import/m4/fstat.m4: Update.
3491         * gnulib/import/m4/fstatat.m4: Update.
3492         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3493         * gnulib/import/m4/getcwd-path-max.m4: Update.
3494         * gnulib/import/m4/getcwd.m4: Update.
3495         * gnulib/import/m4/getdtablesize.m4: Update.
3496         * gnulib/import/m4/getlogin.m4: Update.
3497         * gnulib/import/m4/getlogin_r.m4: Update.
3498         * gnulib/import/m4/getpagesize.m4: Update.
3499         * gnulib/import/m4/getprogname.m4: Update.
3500         * gnulib/import/m4/gettimeofday.m4: Update.
3501         * gnulib/import/m4/glibc21.m4: Update.
3502         * gnulib/import/m4/glob.m4: Update.
3503         * gnulib/import/m4/glob_h.m4: Update.
3504         * gnulib/import/m4/gnulib-cache.m4: Update.
3505         * gnulib/import/m4/gnulib-common.m4: Update.
3506         * gnulib/import/m4/gnulib-comp.m4: Update.
3507         * gnulib/import/m4/gnulib-tool.m4: Update.
3508         * gnulib/import/m4/hard-locale.m4: Update.
3509         * gnulib/import/m4/include_next.m4: Update.
3510         * gnulib/import/m4/inttypes-pri.m4: Update.
3511         * gnulib/import/m4/inttypes.m4: Update.
3512         * gnulib/import/m4/isnand.m4: Update.
3513         * gnulib/import/m4/isnanl.m4: Update.
3514         * gnulib/import/m4/largefile.m4: Update.
3515         * gnulib/import/m4/limits-h.m4: Update.
3516         * gnulib/import/m4/localcharset.m4: Update.
3517         * gnulib/import/m4/locale-fr.m4: Update.
3518         * gnulib/import/m4/locale-ja.m4: Update.
3519         * gnulib/import/m4/locale-zh.m4: Update.
3520         * gnulib/import/m4/localtime-buffer.m4: Update.
3521         * gnulib/import/m4/longlong.m4: Update.
3522         * gnulib/import/m4/lstat.m4: Update.
3523         * gnulib/import/m4/malloc.m4: Update.
3524         * gnulib/import/m4/malloca.m4: Update.
3525         * gnulib/import/m4/math_h.m4: Update.
3526         * gnulib/import/m4/mbrtowc.m4: Update.
3527         * gnulib/import/m4/mbsinit.m4: Update.
3528         * gnulib/import/m4/mbsrtowcs.m4: Update.
3529         * gnulib/import/m4/mbstate_t.m4: Update.
3530         * gnulib/import/m4/memchr.m4: Update.
3531         * gnulib/import/m4/memmem.m4: Update.
3532         * gnulib/import/m4/mempcpy.m4: Update.
3533         * gnulib/import/m4/memrchr.m4: Update.
3534         * gnulib/import/m4/mkdir.m4: Update.
3535         * gnulib/import/m4/mkstemp.m4: Update.
3536         * gnulib/import/m4/mmap-anon.m4: Update.
3537         * gnulib/import/m4/mode_t.m4: Update.
3538         * gnulib/import/m4/msvc-inval.m4: Update.
3539         * gnulib/import/m4/msvc-nothrow.m4: Update.
3540         * gnulib/import/m4/multiarch.m4: Update.
3541         * gnulib/import/m4/nocrash.m4: Update.
3542         * gnulib/import/m4/off_t.m4: Update.
3543         * gnulib/import/m4/onceonly.m4: Update.
3544         * gnulib/import/m4/open-cloexec.m4: Update.
3545         * gnulib/import/m4/open.m4: Update.
3546         * gnulib/import/m4/openat.m4: Update.
3547         * gnulib/import/m4/opendir.m4: Update.
3548         * gnulib/import/m4/pathmax.m4: Update.
3549         * gnulib/import/m4/rawmemchr.m4: Update.
3550         * gnulib/import/m4/readdir.m4: Update.
3551         * gnulib/import/m4/readlink.m4: Update.
3552         * gnulib/import/m4/realloc.m4: Update.
3553         * gnulib/import/m4/rename.m4: Update.
3554         * gnulib/import/m4/rewinddir.m4: Update.
3555         * gnulib/import/m4/rmdir.m4: Update.
3556         * gnulib/import/m4/save-cwd.m4: Update.
3557         * gnulib/import/m4/secure_getenv.m4: Update.
3558         * gnulib/import/m4/setenv.m4: Update.
3559         * gnulib/import/m4/signal_h.m4: Update.
3560         * gnulib/import/m4/ssize_t.m4: Update.
3561         * gnulib/import/m4/stat-time.m4: Update.
3562         * gnulib/import/m4/stat.m4: Update.
3563         * gnulib/import/m4/std-gnu11.m4: Update.
3564         * gnulib/import/m4/stdbool.m4: Update.
3565         * gnulib/import/m4/stddef_h.m4: Update.
3566         * gnulib/import/m4/stdint.m4: Update.
3567         * gnulib/import/m4/stdio_h.m4: Update.
3568         * gnulib/import/m4/stdlib_h.m4: Update.
3569         * gnulib/import/m4/strchrnul.m4: Update.
3570         * gnulib/import/m4/strdup.m4: Update.
3571         * gnulib/import/m4/strerror.m4: Update.
3572         * gnulib/import/m4/string_h.m4: Update.
3573         * gnulib/import/m4/strstr.m4: Update.
3574         * gnulib/import/m4/strtok_r.m4: Update.
3575         * gnulib/import/m4/sys_socket_h.m4: Update.
3576         * gnulib/import/m4/sys_stat_h.m4: Update.
3577         * gnulib/import/m4/sys_time_h.m4: Update.
3578         * gnulib/import/m4/sys_types_h.m4: Update.
3579         * gnulib/import/m4/tempname.m4: Update.
3580         * gnulib/import/m4/time_h.m4: Update.
3581         * gnulib/import/m4/unistd-safer.m4: Update.
3582         * gnulib/import/m4/unistd_h.m4: Update.
3583         * gnulib/import/m4/warn-on-use.m4: Update.
3584         * gnulib/import/m4/wchar_h.m4: Update.
3585         * gnulib/import/m4/wchar_t.m4: Update.
3586         * gnulib/import/m4/wctype_h.m4: Update.
3587         * gnulib/import/m4/wint_t.m4: Update.
3588         * gnulib/import/malloc.c: Update.
3589         * gnulib/import/malloc/scratch_buffer.h: Update.
3590         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3591         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3592         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3593         * gnulib/import/malloca.c: Update.
3594         * gnulib/import/malloca.h: Update.
3595         * gnulib/import/malloca.valgrind: Update.
3596         * gnulib/import/math.in.h: Update.
3597         * gnulib/import/mbrtowc.c: Update.
3598         * gnulib/import/mbsinit.c: Update.
3599         * gnulib/import/mbsrtowcs-impl.h: Update.
3600         * gnulib/import/mbsrtowcs-state.c: Update.
3601         * gnulib/import/mbsrtowcs.c: Update.
3602         * gnulib/import/memchr.c: Update.
3603         * gnulib/import/memmem.c: Update.
3604         * gnulib/import/mempcpy.c: Update.
3605         * gnulib/import/memrchr.c: Update.
3606         * gnulib/import/mkdir.c: Update.
3607         * gnulib/import/mkstemp.c: Update.
3608         * gnulib/import/msvc-inval.c: Update.
3609         * gnulib/import/msvc-inval.h: Update.
3610         * gnulib/import/msvc-nothrow.c: Update.
3611         * gnulib/import/msvc-nothrow.h: Update.
3612         * gnulib/import/open.c: Update.
3613         * gnulib/import/openat-die.c: Update.
3614         * gnulib/import/openat-priv.h: Update.
3615         * gnulib/import/openat-proc.c: Update.
3616         * gnulib/import/openat.c: Update.
3617         * gnulib/import/openat.h: Update.
3618         * gnulib/import/opendir.c: Update.
3619         * gnulib/import/pathmax.h: Update.
3620         * gnulib/import/pipe-safer.c: Update.
3621         * gnulib/import/rawmemchr.c: Update.
3622         * gnulib/import/readdir.c: Update.
3623         * gnulib/import/readlink.c: Update.
3624         * gnulib/import/realloc.c: Update.
3625         * gnulib/import/ref-add.sin: Update.
3626         * gnulib/import/ref-del.sin: Update.
3627         * gnulib/import/rename.c: Update.
3628         * gnulib/import/rewinddir.c: Update.
3629         * gnulib/import/rmdir.c: Update.
3630         * gnulib/import/same-inode.h: Update.
3631         * gnulib/import/save-cwd.c: Update.
3632         * gnulib/import/save-cwd.h: Update.
3633         * gnulib/import/scratch_buffer.h: Update.
3634         * gnulib/import/secure_getenv.c: Update.
3635         * gnulib/import/setenv.c: Update.
3636         * gnulib/import/signal.in.h: Update.
3637         * gnulib/import/stat-time.c: Update.
3638         * gnulib/import/stat-time.h: Update.
3639         * gnulib/import/stat-w32.c: Update.
3640         * gnulib/import/stat-w32.h: Update.
3641         * gnulib/import/stat.c: Update.
3642         * gnulib/import/stdbool.in.h: Update.
3643         * gnulib/import/stddef.in.h: Update.
3644         * gnulib/import/stdint.in.h: Update.
3645         * gnulib/import/stdio.in.h: Update.
3646         * gnulib/import/stdlib.in.h: Update.
3647         * gnulib/import/str-two-way.h: Update.
3648         * gnulib/import/strchrnul.c: Update.
3649         * gnulib/import/strdup.c: Update.
3650         * gnulib/import/streq.h: Update.
3651         * gnulib/import/strerror-override.c: Update.
3652         * gnulib/import/strerror-override.h: Update.
3653         * gnulib/import/strerror.c: Update.
3654         * gnulib/import/string.in.h: Update.
3655         * gnulib/import/stripslash.c: Update.
3656         * gnulib/import/strnlen1.c: Update.
3657         * gnulib/import/strnlen1.h: Update.
3658         * gnulib/import/strstr.c: Update.
3659         * gnulib/import/strtok_r.c: Update.
3660         * gnulib/import/sys_stat.in.h: Update.
3661         * gnulib/import/sys_time.in.h: Update.
3662         * gnulib/import/sys_types.in.h: Update.
3663         * gnulib/import/tempname.c: Update.
3664         * gnulib/import/tempname.h: Update.
3665         * gnulib/import/time.in.h: Update.
3666         * gnulib/import/unistd--.h: Update.
3667         * gnulib/import/unistd-safer.h: Update.
3668         * gnulib/import/unistd.in.h: Update.
3669         * gnulib/import/unsetenv.c: Update.
3670         * gnulib/import/verify.h: Update.
3671         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3672         * gnulib/import/wchar.in.h: Update.
3673         * gnulib/import/wctype.in.h: Update.
3674         * gnulib/import/xalloc-oversized.h: Update.
3675         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3676         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3677
3678 2018-08-16  Gary Benson <gbenson@redhat.com>
3679
3680         PR gdb/13000:
3681         * gdb/main.c (captured_main_1): Exit with nonzero status
3682         in batch mode if the last command to be executed failed.
3683         * NEWS: Mention the above.
3684
3685 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3686
3687         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3688         end of warning message.
3689
3690 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3691
3692         PR gdb/22943:
3693         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3694         (aarch64_extract_return_value): Use
3695         aapcs_is_vfp_call_or_return_candidate.
3696         (aarch64_return_in_memory): Likewise.
3697         (aarch64_store_return_value): Likewise.
3698
3699 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3700
3701         * aarch64-tdep.c
3702         (aapcs_is_vfp_call_or_return_candidate): Make static
3703         (pass_in_v_or_stack): Remove function.
3704         (pass_in_v_vfp_candidate): New function.
3705         (aarch64_push_dummy_call): Check for float register candidates.
3706
3707 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3708
3709         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3710         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3711         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3712
3713 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3714
3715         PR build/23399
3716         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3717         (struct ipa_sym_addresses): Rename to...
3718         (struct ipa_sym_addresses_common): ... this.
3719         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3720
3721 2018-08-28  Tom Tromey  <tom@tromey.com>
3722
3723         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3724         (token_fifo): Now a std::vector.
3725         (yylex, c_parse): Update.
3726         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3727         (token_fifo): Now a std::vector.
3728         (yylex, d_parse): Update.
3729         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3730         (token_fifo): Now a std::vector.
3731         (yylex, go_parse): Update.
3732
3733 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3734
3735         * parser-defs.h (struct type_stack) <elements>: Change type to
3736         std::vector<union type_stack_elt>.
3737         <depth, size>: Remove.
3738         * parse.c (parse_exp_in_context_1): Adjust.
3739         (type_stack_reserve): Remove.
3740         (check_type_stack_depth): Remove.
3741         (insert_into_type_stack): Adjust to std::vector.
3742         (insert_type): Likewise.
3743         (push_type): Likewise.
3744         (push_type_int): Likewise.
3745         (insert_type_address_space): Likewise.
3746         (pop_type): Likewise.
3747         (pop_type_int): Likewise.
3748         (pop_typelist): Likewise.
3749         (pop_type_stack): Likewise.
3750         (append_type_stack): Likewise.
3751         (push_type_stack): Likewise.
3752         (get_type_stack): Likewise.
3753         (type_stack_cleanup): Likewise.
3754         (push_typelist): Likewise.
3755         (follow_types): Likewise.
3756         (_initialize_parse): Likewise.
3757
3758 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3759
3760         * NEWS: Mention csky target.
3761
3762 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3763             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3764             Don Breazeal  <donb@codesourcery.com>
3765
3766         * csky-linux-tdep.c: New file.
3767         * csky-tdep.c: Likewise.
3768         * csky-tdep.h: Likewise.
3769         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3770         csky-tdep.o.
3771         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3772         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3773         * configure.tgt: Add csky support.
3774
3775 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3776
3777         * python/py-framefilter.c (py_print_frame): Print frame architecture
3778         when printing on an MI output.
3779
3780 2018-08-27  Tom Tromey  <tom@tromey.com>
3781
3782         PR build/23087:
3783         * configure: Rebuild.
3784         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3785
3786 2018-08-27  Tom Tromey  <tom@tromey.com>
3787
3788         * aarch64-linux-tdep.c
3789         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3790         casts to int.
3791
3792 2018-08-27  Tom Tromey  <tom@tromey.com>
3793
3794         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3795         unsigned.
3796         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3797         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3798         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3799         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3800         unsigned.
3801
3802 2018-08-27  Tom Tromey  <tom@tromey.com>
3803
3804         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3805         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3806
3807 2018-08-27  Tom Tromey  <tom@tromey.com>
3808
3809         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3810         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3811         ULONGEST_MAX.
3812         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3813         ULONGEST_MAX.
3814         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3815         ULONGEST_MAX.
3816         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3817         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3818         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3819         ULONGEST_MAX.
3820         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3821         (ppc64_linux_sigaction_tramp_frame)
3822         (ppc32_linux_sighandler_tramp_frame)
3823         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3824         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3825         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3826         * mn10300-linux-tdep.c (am33_linux_sigframe)
3827         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3828         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3829         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3830         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3831         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3832         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3833         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3834         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3835         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3836         * microblaze-linux-tdep.c
3837         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3838         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3839         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3840         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3841         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3842         * common/common-types.h (ULONGEST_MAX): New define.
3843         (CORE_ADDR_MAX): Fix formatting.
3844         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3845         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3846         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3847         (arm_linux_rt_sigreturn_tramp_frame)
3848         (arm_eabi_linux_sigreturn_tramp_frame)
3849         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3850         (thumb2_eabi_linux_sigreturn_tramp_frame)
3851         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3852         (arm_linux_restart_syscall_tramp_frame)
3853         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3854         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3855         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3856         ULONGEST_MAX.
3857         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3858
3859 2018-08-27  Tom Tromey  <tom@tromey.com>
3860
3861         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3862         CORE_ADDR_MAX.
3863         * mips-tdep.c (mips_deal_with_atomic_sequence)
3864         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3865         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3866         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3867         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3868         CORE_ADDR_MAX.
3869         * aarch64-tdep.c (aarch64_software_single_step): Use
3870         CORE_ADDR_MAX.
3871
3872 2018-08-27  Tom Tromey  <tom@tromey.com>
3873
3874         * linespec.c (complete_linespec_component): Add cast to "char".
3875         * completer.c (completion_tracker::build_completion_result): Add
3876         cast to "char".
3877
3878 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3879
3880         * solist.h (struct solist, struct target_so_ops): Fix
3881         indentation.
3882
3883 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3884
3885         * ada-tasks.c (ada_task_info_s): Remove typedef.
3886         (DEF_VEC_O(ada_task_info_s)): Remove.
3887         (struct ada_tasks_inferior_data): Initialize fields.
3888         <task_list>: Make an std::vector.
3889         (get_ada_tasks_inferior_data): Allocate with new.
3890         (ada_get_task_number): Adjust.
3891         (get_task_number_from_id): Likewise.
3892         (valid_task_id): Likewise.
3893         (ada_get_task_info_from_ptid): Likewise.
3894         (iterate_over_live_ada_tasks): Likewise.
3895         (add_ada_task): Likewise.
3896         (read_known_tasks): Likewise.
3897         (ada_build_task_list): Likewise.
3898         (print_ada_task_info): Likewise.
3899         (info_task): Likewise.
3900         (task_command_1): Likewise.
3901
3902 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3903
3904         * ada-lang.c (add_angle_brackets): Return std::string.
3905
3906 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3907
3908         * python/py-threadevent.c (py_get_event_thread): Initialize
3909         pythread.
3910
3911 2018-08-24  Pedro Alves  <palves@redhat.com>
3912
3913         * python/py-bpevent.c (create_breakpoint_event_object): Use
3914         copy-initialization.
3915         * python/py-continueevent.c (emit_continue_event): Use
3916         copy-initialization.
3917         * python/py-exitedevent.c (create_exited_event_object): Return a
3918         gdbpy_ref<>.
3919         (emit_exited_event): Use copy-initialization.
3920         * python/py-inferior.c (python_new_inferior)
3921         (python_inferior_deleted, add_thread_object): Use
3922         copy-initialization.
3923         * python/py-infevents.c (create_inferior_call_event_object)
3924         (create_register_changed_event_object)
3925         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3926         (emit_inferior_call_event, emit_memory_changed_event)
3927         (emit_register_changed_event): Use copy-initialization.
3928         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3929         Return a gdbpy_ref<>.
3930         (emit_new_objfile_event): Use copy-initialization.
3931         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3932         (emit_clear_objfiles_event): Use copy-initialization.
3933         * python/py-signalevent.c (create_signal_event_object): Use
3934         copy-initialization.
3935         * python/py-threadevent.c (create_thread_event_object): Use
3936         copy-initialization.
3937
3938 2018-08-24  Pedro Alves  <palves@redhat.com>
3939             Simon Marchi  <simon.marchi@ericsson.com>
3940
3941         PR gdb/23379
3942         * python/py-continueevent.c: Include "gdbthread.h".
3943         (create_continue_event_object): Add intro comment.  Add 'ptid'
3944         parameter.  Use it to find thread to pass to
3945         create_thread_event_object.
3946         (emit_continue_event): Pass PTID down to
3947         create_continue_event_object.
3948         * python/py-event.h (py_get_event_thread): Declare.
3949         (create_thread_event_object): Remove default from 'thread'
3950         parameter.
3951         * python/py-stopevent.c (create_stop_event_object): Use
3952         py_get_event_thread.
3953         * python/py-threadevent.c (get_event_thread): Rename to ...
3954         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3955         and use it to find the thread.
3956         (create_thread_event_object): Assert that THREAD isn't null.
3957         Don't find the event thread here.
3958
3959 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3960
3961         * block.h (blockrange, blockranges): New struct declarations.
3962         (struct block): Add new field named `ranges'.
3963         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3964         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3965         macros for accessing ranges in struct block.
3966         (make_blockranges): New declaration.
3967         block.c (make_blockranges): New function.
3968         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3969         for block.
3970         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3971         * blockframe.c (cache_pc_function_block): New static global.
3972         (clear_pc_function_cache): Clear cache_pc_function_block.
3973         (find_pc_partial_function): Move comment to symtab.h.  Add
3974         support for non-contiguous blocks.
3975         * cli/cli-cmds.c (block.h): Include.
3976         (print_disassembly): Handle printing of non-contiguous blocks.
3977         (disassemble_current_function): Likewise.
3978         (disassemble_command): Likewise.
3979
3980         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3981         BLOCK_START.
3982         * blockframe.c (get_pc_function_start): Likewise.
3983         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3984         (gcc_symbol_address): Likewise.
3985         * compile/compile-object-run.c (compile_object_run): Likewise.
3986         * compile/compile.c (get_expr_block_and_pc): Likewise.
3987         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3988         (func_addr_to_tail_call_list): Likewise.
3989         * findvar.c (default_read_var_value): Likewise.
3990         * inline-frame.c (inline_frame_this_id): Likewise.
3991         (skip-inline_frames): Likewise.
3992         * infcmd.c (until_next_command): Likewise.
3993         * linespec.c (convert_linespec_to_sals): Likewise.
3994         * parse.c (parse_exp_in_context_1): Likewise.
3995         * printcmd.c (build_address_symbolic): likewise.
3996         (info_address_command): Likewise.
3997         symtab.c (find_function_start_sal): Likewise.
3998         (skip_prologue_sal): Likewise.
3999         (find_function_alias_target): Likewise.
4000         (find_gnu_ifunc): Likewise.
4001         * stack.c (find_frame_funname): Likewise.
4002         * symtab.c (fixup_symbol_section): Likewise.
4003         (find_function_start_sal): Likewise.
4004         (skip_prologue_sal): Likewsie.
4005         (find_function_alias_target): Likewise.
4006         (find_gnu_ifunc): Likewise.
4007         * tracepoint.c (info_scope_command): Likewise.
4008         * value.c (value_fn_field): Likewise.
4009
4010         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
4011         in place of find_pc_partial_function.
4012         * blockframe.c (find_function_entry_range_from_pc): New function.
4013         * symtab.h (find_function_entry_range_from_pc): Declare and document.
4014         * objfiles.c (objfile_relocate1): Relocate start and end addresses
4015         for each range in a block.
4016
4017
4018 2018-08-23  Xavier Roirand  <roirand@adacore.com>
4019
4020         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
4021         incrementation.
4022
4023 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4024
4025         * solib-svr4.c (read_program_headers_from_bfd): Return
4026         gdb::optional<gdb::byte_vector>.
4027         (svr4_exec_displacement): Adjust.
4028
4029 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4030
4031         * solib-svr4.c (read_program_header): Return
4032         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
4033         (find_program_interpreter): Return
4034         gdb::optional<gdb::byte_vector>.
4035         (scan_dyntag_auxv): Adjust.
4036         (enable_break): Adjust.
4037         (svr4_exec_displacement): Adjust.
4038
4039 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4040
4041         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
4042         * inf-child.c (inf_child_target::terminal_save_inferior): New.
4043
4044 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
4045
4046         * guile/scm-string.c (gdbscm_scm_from_printf): Use
4047         string_vprintf.
4048         * guile/scm-utils.c (gdbscm_printf): Likewise.
4049         * serial.c (serial_printf): Likewise.
4050         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
4051
4052 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
4053
4054         * stack.c (print_frame): Print frame architecture when printing on
4055         an MI output.
4056         * NEWS: Mention new "arch" attribute in frame output.
4057
4058 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4059
4060         * arch/aarch64.h (aarch64_regnum): Update comment.
4061
4062 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
4063
4064         * NEWS: Add SVE to 8.2 section.
4065
4066 2018-08-21  Pedro Alves  <palves@redhat.com>
4067
4068         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
4069         out from gdbscm_parse_function_args.
4070         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
4071         gdbscm_parse_function_args_1.
4072
4073 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
4074
4075         PR gdb/17816
4076         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
4077         operator.
4078
4079 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
4080
4081         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
4082
4083 2018-08-19  Michael Spang  <spang@google.com>
4084
4085         PR gdb/11786
4086         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
4087         for PT_TLS segments.
4088
4089 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
4090
4091         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
4092         dwarf_variable_value.
4093         * dwarf2-frame.c (class dwarf_expr_executor):
4094         Add override for dwarf_variable_value.
4095         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
4096         (class symbol_needs_eval_context): Likewise.
4097         (indirect_synthetic_pointer): Add forward declaration.
4098         (sect_variable_value): New function.
4099         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
4100         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
4101         for DW_OP_GNU_variable_value.
4102
4103 2018-08-16  Tom Tromey  <tom@tromey.com>
4104
4105         * top.c (read_command_file): Update.
4106         (command_line_input): Remove "repeat" argument.
4107         * ada-lang.c (get_selections): Update.
4108         * linespec.c (decode_line_2): Update.
4109         * defs.h (command_line_input): Remove argument.
4110         * cli/cli-script.c (read_next_line): Update.
4111         * python/py-gdb-readline.c: Update.
4112
4113 2018-08-17  Tom Tromey  <tom@tromey.com>
4114
4115         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
4116         command_line_input.
4117
4118 2018-08-15  Tom Tromey  <tom@tromey.com>
4119
4120         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
4121
4122 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
4123
4124         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
4125         If used, use find_pc_partial_function to find address range
4126         to disassemble.
4127         * mi/mi-main.c (mi_cmd_list_features): Report
4128         "data-disassemble-a-option" feature.
4129         * NEWS: Mention new -data-disassemble option -a.
4130
4131 2018-08-13  Tom Tromey  <tom@tromey.com>
4132
4133         * common/common-defs.h (_FORTIFY_SOURCE): Define.
4134
4135 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4136
4137         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
4138         (aarch64_linux_collect_sve_regset): Likewise.
4139         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
4140         * regcache.h (regcache_map_entry_size): New function.
4141
4142 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4143
4144         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
4145         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
4146         (SVE_HEADER_VL_LENGTH): Likewise.
4147         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
4148         (SVE_HEADER_FLAGS_LENGTH): Likewise.
4149         (SVE_HEADER_RESERVED_LENGTH): Likewise.
4150         (SVE_HEADER_SIZE_OFFSET): Likewise.
4151         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
4152         (SVE_HEADER_VL_OFFSET): Likewise.
4153         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
4154         (SVE_HEADER_FLAGS_OFFSET): Likewise.
4155         (SVE_HEADER_RESERVED_OFFSET): Likewise.
4156         (SVE_HEADER_SIZE): Likewise.
4157         (aarch64_linux_core_read_vq): Add function.
4158         (aarch64_linux_core_read_description): Check for SVE section.
4159
4160 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
4161
4162         * aarch64-fbsd-tdep.c
4163         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
4164         collect_size.
4165         * aarch64-linux-tdep.c
4166         (aarch64_linux_iterate_over_regset_sections): Likewise.
4167         * alpha-linux-tdep.c
4168         (alpha_linux_iterate_over_regset_sections):
4169         * alpha-nbsd-tdep.c
4170         (alphanbsd_iterate_over_regset_sections): Likewise.
4171         * amd64-fbsd-tdep.c
4172         (amd64fbsd_iterate_over_regset_sections): Likewise.
4173         * amd64-linux-tdep.c
4174         (amd64_linux_iterate_over_regset_sections): Likewise.
4175         * arm-bsd-tdep.c
4176         (armbsd_iterate_over_regset_sections): Likewise.
4177         * arm-fbsd-tdep.c
4178         (arm_fbsd_iterate_over_regset_sections): Likewise.
4179         * arm-linux-tdep.c
4180         (arm_linux_iterate_over_regset_sections): Likewise.
4181         * corelow.c (get_core_registers_cb): Likewise.
4182         (core_target::fetch_registers): Likewise.
4183         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
4184         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
4185         * gdbarch.h (void): Regenerate.
4186         * gdbarch.sh: Add supply_size and collect_size.
4187         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
4188         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
4189         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
4190         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
4191         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
4192         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
4193         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
4194         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
4195         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
4196         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
4197         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
4198         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
4199         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
4200         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
4201         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
4202         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
4203         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
4204         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
4205         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
4206         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
4207         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
4208         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
4209         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
4210         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
4211         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
4212         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
4213         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
4214         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
4215         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
4216         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
4217
4218 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
4219
4220         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
4221         with string_printf.
4222
4223 2018-08-10  Keith Seitz  <keiths@redhat.com>
4224
4225         * compile/compile-c-support.c (add_code_header, add_code_footer):
4226         Move into policy class.
4227         (c_push_user_expression, pop_user_expression_nop)
4228         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
4229         (compile_program): New host class.
4230         (c_compile_program): New typedef.
4231         (c_compute_porgram): Use c_compile_program.
4232
4233 2018-08-10  Keith Seitz  <keiths@redhat.com>
4234
4235         * compile/compile-internal.h (compile_instance::~compile_instance):
4236         Remove calls to htab_delete.
4237         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4238         * compile.c (compile_instance::compile_instance): Initialize
4239         htab unique pointers.
4240         (compile_instance::get_cached_type, compile_instance::insert_type)
4241         (compile_instance::error_symbol_once): Update for unique_ptr.
4242
4243 2018-08-10  Keith Seitz  <keiths@redhat.com>
4244
4245         * compile/compile-c-symbols.c (struct symbol_error)
4246         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4247         (compile_instance::insert_symbol_error)
4248         (compile_instance::error_symbol_once): Move to ...
4249         * compile/compile.c: ... here.
4250
4251 2018-08-10  Keith Seitz  <keiths@redhat.com>
4252
4253         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4254         instead of `new_compile_instance'.
4255         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4256         Update description.
4257         If the symbol error map is not initialized, create it.
4258         (generate_c_for_for_one_symbol): Do not check/initialize
4259         the symbol error map.
4260         * compile/compile-c-types.c (compile_c_instance): Make a class.
4261         Update all callers.
4262         (compile_instance::compile_instance): Initialize the type cache.
4263         (get_cached_type): New function.
4264         (insert_type): Update description.
4265         (compile_c_instance::m_default_cflags): Define.
4266         (convert_type): Update description.  Use get_cached_type.
4267         (delete_instance): Moved to destructor.
4268         (new_compile_instance): Moved to constructor.
4269         * compile/compile-c.h (compile_c_instance): Make class inheriting
4270         from compile_instance.
4271         <base>: Remove field.
4272         <type_map, symbol_err_map>: Move to base class.
4273         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4274         * compile/compile-internal.h (compile_instance): Make class.
4275         <type_map_t, symbol_err_map_t>: Define.
4276         <fe>: Rename to `m_gcc_fe'.
4277         <scope, block, gcc_target_options>: Add `m_' prefix.
4278         <m_type_map, m_symbol_err_map>: New fields, moved from
4279         compile_c_instance.
4280         <destroy>: Remove.
4281         (convert_type, new_compile_instance): Remove.
4282         * compile/compile.c (cleanup_compile_instance): Remove.
4283         (compile_to_object): Use unique_ptr to eliminate cleanups.
4284         (compile_instance::set_print_callback, compile_instance::version)
4285         (compile_instance::set_verbose)
4286         (compile_instance::set_driver_filename)
4287         (compile_instance::set_triplet_regexp)
4288         (compile_instance::set_arguments)
4289         (compile_instance::set_source_file)
4290         (compile_instance::compile): Define.
4291
4292 2018-08-10  Keith Seitz  <keiths@redhat.com>
4293
4294         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4295         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4296         gcc-c-fe.def to define C plugin.
4297         (delete_instance): Delete `c_plugin'.
4298         (new_compile_instance): Initialize `c_plugin'.
4299         * compile/compile-c.h: Include gcc_c_plugin.h.
4300         (struct compile_c_instance) <c_plugin>: New member.
4301         * gcc-c-plugin.h: New file.
4302         Update all callers with API change.
4303
4304 2018-08-10  Keith Seitz  <keiths@redhat.com>
4305
4306         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4307         (HFILES_NO_SRCDIR): ... to here.
4308         Add compile-internal.h and compile-c.h.
4309         * compile/compile-c-support.c: Include compile-c.h.
4310         * compile/compile-c-symbols.c: Include compile-c.h.
4311         (generate_c_for_variable_locations): Update comment.
4312         * compile/compile-c-types.c: Include compile-c.h.
4313         * compile/compile-c.h: New file -- moved C language declarations
4314         from other files here.
4315         * compile/compile-internal.h: Do not include hashtab.h or
4316         common/enum-flags.h.
4317         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4318         (gcc_convert_symbol, gcc_symbol_address)
4319         (generate_c_for_variable_locations, c_get_mode_for_size)
4320         (c_get_range_decl_name): Definitions moved to compile-c.h.
4321         * compile/compile-loc2c.c: Include compile-c.h.
4322
4323 2018-08-10  Keith Seitz  <keiths@redhat.com>
4324
4325         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4326         (c_symbol_substitution_name): ... this.
4327         Update all callers.
4328
4329 2018-08-10  Keith Seitz  <keiths@redhat.com>
4330
4331         * compile/compile-c-support.c (c_compute_program): Use
4332         unique_xmalloc_ptr to eliminate cleanup.
4333         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4334         Return a unique_xmalloc_ptr and eliminate cleanup.
4335         * compile/compile-internal.h (generate_c_for_variable_locations):
4336         Return unique_xmalloc_ptr and update description.
4337
4338 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4339
4340         * corelow.c (core_target::get_core_register_section): Rename
4341         min_size to section_min_size.
4342
4343 2018-08-09  Jim Wilson  <jimw@sifive.com>
4344
4345         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4346         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4347         * NEWS: Mention new GNU/Linux RISC-V target.
4348         * configure.host: Add riscv*-*-linux*.
4349         * configure.nat: Add riscv*.
4350         * configure.tgt: Add riscv*-*-linux*.
4351         * riscv-linux-nat.c: New file.
4352         * riscv-linux-tdep.c: New file.
4353
4354 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4355
4356         * infrun.c (resume): Make static, add forward declaration.
4357         (proceed): Update header comment.
4358         * infrun.h (resume): Delete declaration.
4359
4360 2018-08-09  Tom Tromey  <tom@tromey.com>
4361
4362         * riscv-tdep.h: Minor formatting fixes.
4363
4364 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4365
4366         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4367         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4368         (test_mkdir_recursive): Likewise.
4369         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4370
4371 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4372
4373         * valarith.c (value_subscripted_rvalue): If an array is not in
4374         memory, and we don't know the upper bound, then we can't know that
4375         the requested element exists or not.
4376
4377 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4378
4379         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4380         (target_options_to_string): Add comment.
4381
4382 2018-08-08  Tom Tromey  <tom@tromey.com>
4383
4384         * unittests/scoped_mmap-selftests.c: Check result of "write".
4385
4386 2018-08-08  Jim Wilson  <jimw@sifive.com>
4387
4388         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4389         (decode_register_index_short): New.
4390         (decode_j_type_insn, decode_cj_type_insn): New.
4391         (decode_b_type_insn, decode_cb_type_insn): New.
4392         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4393         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4394         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4395         is_c_sw_insn instead of is_sw_insn.
4396         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4397         (riscv_software_single_step): New.
4398         * riscv-tdep.h (riscv_software_single_step): Declare.
4399
4400         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4401         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4402
4403 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4404
4405         PR gdb/18050:
4406         * target.c (dispose_inferior): Don't dispose of inferiors that are
4407         already killed.
4408
4409 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4410
4411         * remote.c (remote_target::download_tracepoint): Change char* to
4412         const char*.
4413
4414 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4415
4416         * target.h (target_options_to_string): Return an std::string.
4417         * target.c (str_comma_list_concat_elem): Return void, use
4418         std::string.
4419         (do_option): Likewise.
4420         (target_options_to_string): Return an std::string.
4421         * linux-nat.c (linux_nat_target::wait): Adjust.
4422         * target-debug.h (target_debug_print_options): Adjust.
4423
4424 2018-08-07  Tom Tromey  <tom@tromey.com>
4425
4426         * Makefile.in (CPPFLAGS): New variable.
4427         (INTERNAL_CPPFLAGS): Use it.
4428
4429 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4430
4431         * NEWS: Mention the index cache.
4432
4433 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4434
4435         * common/pathstuff.h (get_standard_cache_dir): New.
4436         * common/pathstuff.c (get_standard_cache_dir): New.
4437         * build-id.h (build_id_to_string): New.
4438         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4439         DEBUG_STR_SUFFIX): Move to here.
4440         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4441         DEBUG_STR_SUFFIX): Move from there.
4442         (write_psymtabs_to_index): Make non-static, add basename
4443         parameter.  Write to temporary files, rename when done.
4444         (save_gdb_index_command): Adjust call to
4445         write_psymtabs_to_index.
4446         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4447         field.
4448         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4449         (get_gdb_index_contents_from_cache): New.
4450         (get_gdb_index_contents_from_cache_dwz): New.
4451         (dwarf2_initialize_objfile): Read index from cache.
4452         (dwarf2_build_psymtabs): Save to index.
4453         * dwarf-index-cache.h: New file.
4454         * dwarf-index-cache.c: New file.
4455         * dwarf-index-write.h: New file.
4456
4457 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4458
4459         * gnulib/aclocal.m4: Re-generate.
4460         * gnulib/config.in: Re-generate.
4461         * gnulib/configure: Re-generate.
4462         * gnulib/import/Makefile.am: Re-generate.
4463         * gnulib/import/Makefile.in: Re-generate.
4464         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4465         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4466         * gnulib/import/m4/mkdir.m4: New file.
4467         * gnulib/import/mkdir.c: New file.
4468         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4469         module.
4470
4471 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4472
4473         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4474         * common/scoped_mmap.c: New file.
4475         * common/scoped_mmap.h (destroy): New method.
4476         (~scoped_mmap, reset): Use destroy.
4477         (scoped_mmap): New move constructor.
4478         (mmap_file): New declaration.
4479         * unittests/scoped_mmap-selftests.c (test_normal,
4480         test_invalid_filename, run_tests): New functions.
4481         (_initialize_scoped_mmap_selftests): Register selftest.
4482
4483 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4484
4485         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4486         (read_gdb_index_from_buffer): ... this.  Remove section
4487         parameter, add buffer parameter.
4488         (get_gdb_index_contents_ftype,
4489         get_gdb_index_contents_dwz_ftype): New typedefs.
4490         (dwarf2_read_gdb_index): Add callback parameters to get the
4491         index contents.
4492         (get_gdb_index_contents_from_section): New.
4493         (dwarf2_initialize_objfile): Update call to
4494         dwarf2_read_gdb_index.
4495
4496 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4497
4498         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4499         (gdb_open_cloexec): Likewise.
4500         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4501         (commandline_from_pid): Likewise.
4502         (linux_xfer_osdata_threads): Likewise.
4503         (linux_xfer_osdata_fds): Likewise.
4504         * ada-lang.c (is_package_name): Likewise.
4505         * auxv.c (procfs_xfer_auxv): Likewise.
4506         * breakpoint.c (print_one_breakpoint_location): Use
4507         uiout::field_fmt.
4508         (print_one_catch_solib): Use string_printf.
4509         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4510         (add_pe_forwarded_sym): Likewise.
4511         * dwarf2read.c (create_type_unit_group): Likewise.
4512         (build_error_marker_type): Likewise.
4513         * infcall.c (get_function_name): Likewise.
4514         * valprint.c (print_converted_chars_to_obstack): Likewise.
4515         * xtensa-tdep.c (xtensa_register_type): Likewise.
4516
4517 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4518
4519         * remote.c (remote_target::download_tracepoint): Fix format
4520         string errors.
4521
4522 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4523
4524         * tracefile.c: Include common/byte-vector.h.
4525         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4526         with trace_regblock_size if needed.  Update uses of buf.
4527
4528 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4529
4530         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4531         std::vector<unsigned char>.
4532         * tracepoint.c (collection_list::collection_list): Remove
4533         m_regs_mask initializer from initializer list.  Resize
4534         m_regs_mask using the largest remote register number.
4535         (collection_list::add_remote_register): Remove size check on
4536         m_regs_mask.  Use at to access element.
4537         (collection_list::stringify): Change type of temp_buf to
4538         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4539         stringify the register mask.  Use pack_hex_byte for the register
4540         mask.
4541
4542 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4543
4544         * tracepoint.h (class collection_list) <add_register>: Remove.
4545         <add_remote_register, add_ax_registers, add_local_register>:
4546         Declare.
4547         <add_memrange>: Add scope parameter.
4548         * tracepoint.c (encode_actions_1): Likewise.
4549         (collection_list::add_register): Rename to ...
4550         (collection_list::add_remote_register): ... this.  Update
4551         comment.
4552         (collection_list::add_ax_registers, add_local_register): New
4553         methods.
4554         (collection_list::add_memrange): Add scope parameter.  Call
4555         add_local_register instead of add_register.
4556         (finalize_tracepoint_aexpr): New function.
4557         (collection_list::collect_symbol): Update calls to add_memrange.
4558         Call add_local_register instead of add_register.  Call
4559         add_ax_registers.  Call finalize_tracepoint_aexpr.
4560         (encode_actions_1): Get remote regnos for $reg action.  Call
4561         add_remote_register, add_ax_registers, and add_local_register.
4562         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4563         (validate_actionline): Call finalize_tracepoint_aexpr.
4564
4565 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4566
4567         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4568         Replace array buf with gdb::char_vector buf, of size
4569         get_remote_packet_size ().  Replace references to buf and
4570         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4571         and xsnprintf with snprintf.  Raise errors if the buffer is too
4572         small.
4573
4574 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4575
4576         * remote.c (remote_target::download_tracepoint): Fix the has_more
4577         predicate in the QTDP action list iteration.
4578
4579 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4580
4581         * remote.c (remote_target::download_tracepoint): Fix indentation
4582         in for block.
4583
4584 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4585
4586         * proc-api.c (_initialize_proc_api): Remove c, unused.
4587         * procfs.c (procfs_init_inferior): Remove signals, unused.
4588         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4589         unused.
4590
4591 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4592             Andrew Burgess  <andrew.burgess@embecosm.com>
4593
4594         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4595         'W_STOPCODE (0)' as this could be ambiguous.
4596
4597 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4598
4599         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4600         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4601         "ai_socktype").
4602
4603 2018-08-02  Tom Tromey  <tom@tromey.com>
4604
4605         PR symtab/16842.
4606         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4607         symbols.
4608         (process_structure_scope): Likewise.
4609
4610 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4611
4612         PR gdb/22629:
4613         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4614         kill inferior.
4615
4616 2018-08-02  Tom Tromey  <tom@tromey.com>
4617
4618         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4619         (darwin_suspend_inferior, darwin_resume_inferior)
4620         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4621         (darwin_check_new_threads): Check result of get_darwin_inferior.
4622
4623 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4624
4625         GDB 8.1.1 released.
4626
4627 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4628
4629         * varobj.c (varobj_get_path_expr_parent): Report an error if
4630         parent is a dynamic varobj.
4631
4632 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4633
4634         * gnulib/aclocal.m4: Re-generate.
4635         * gnulib/config.in: Re-generate.
4636         * gnulib/configure: Re-generate.
4637         * gnulib/import/Makefile.in: Re-generate.
4638         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4639         * gnulib/import/m4/onceonly.m4: Re-generate.
4640
4641 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4642
4643         * target-descriptions.c (struct xml_test_tdesc): New.
4644         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4645         (record_xml_tdesc): Update.
4646         (maintenance_check_xml_descriptions): Update.
4647         * target-descriptions.h (record_xml_tdesc): Update comment.
4648
4649 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4650
4651         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4652         checking array bounds are defined.
4653
4654 2018-07-30  Tom Tromey  <tom@tromey.com>
4655
4656         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4657         irreflexivity violation.
4658
4659 2018-07-30  Tom Tromey  <tom@tromey.com>
4660
4661         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4662         * value.c (unpack_long): Remove lint code.
4663         * valops.c (value_ind): Remove lint code.
4664         * valarith.c (value_x_binop, value_x_unop, value_equal)
4665         (value_pos): Remove lint code.
4666
4667 2018-07-28  Tom de Vries  <tdevries@suse.de>
4668
4669         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4670         with undefined upper bound as <optimized out>.
4671
4672 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4673
4674         * gcore.in: Rename variable "name" to "prefix".  Expand
4675         "usage" text.
4676
4677 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4678
4679         * windows-nat.c (windows_nat_target::create_inferior): Update to
4680         call close() in global namespace.
4681
4682 2018-07-26  Tom Tromey  <tom@tromey.com>
4683
4684         * dwarf-index-write.c (add_address_entry): Don't add objfile
4685         offsets.
4686         * dbxread.c (find_stab_function): Rename from
4687         find_stab_function_addr.  Return a bound_minimal_symbol.
4688         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4689         Don't add objfile offsets.
4690         (end_psymtab): Use raw_text_low, raw_text_high,
4691         MSYMBOL_VALUE_RAW_ADDRESS.
4692         (read_ofile_symtab): Update.
4693         (process_one_symbol): Update.
4694         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4695         offsets.
4696         (dw2_relocate): Remove.
4697         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4698         searching addrmap.
4699         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4700         Update.
4701         (process_psymtab_comp_unit_reader, add_partial_symbol)
4702         (add_partial_subprogram, dwarf2_ranges_read): Update.
4703         (load_partial_dies): Update.
4704         (add_address_entry): Don't add objfile offsets.
4705         (dwarf2_build_include_psymtabs): Update.
4706         (create_addrmap_from_aranges): Don't add objfile offsets.
4707         (dw2_find_pc_sect_compunit_symtab): Update.
4708         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4709         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4710         Update.
4711         (parse_partial_symbols): Don't add objfile offsets.  Use
4712         raw_text_low, raw_text_high.  Update.
4713         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4714         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4715         or call 'relocate' quick function.  Clear psymbol_map.
4716         * psympriv.h (struct partial_symbol) <address>: Add section
4717         offset.
4718         <set_unrelocated_address>: Rename from set_address.
4719         <raw_text_low, raw_text_high>: New methods.
4720         <text_low, text_high>: Add objfile parameter.
4721         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4722         set_unrelocated_address.
4723         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4724         (find_pc_psymbol): Update.
4725         (fixup_psymbol_section, relocate_psymtabs): Remove.
4726         (dump_psymtab, psym_functions): Update.
4727         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4728         parameter.
4729         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4730         (start_psymtab_common): Update.
4731         * symfile-debug.c (debug_qf_relocate): Remove.
4732         (debug_sym_quick_functions): Update.
4733         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4734         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4735         Update.
4736
4737 2018-07-26  Tom Tromey  <tromey@redhat.com>
4738
4739         * dbxread.c (end_psymtab): Use text_high_valid and
4740         text_low_valid.
4741         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4742         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4743         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4744         Update comment.
4745         <text_low_valid, text_high_valid>: New fields.
4746         <set_text_low, set_text_high>: Update.
4747         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4748
4749 2018-07-26  Tom Tromey  <tom@tromey.com>
4750
4751         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4752         Update.
4753         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4754         textlow and texthigh fields.
4755         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4756         Update.
4757         * mdebugread.c (parse_lines, parse_partial_symbols)
4758         (psymtab_to_symtab_1): Update.
4759         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4760         Rename fields.  Update comment.  Now private.
4761         <text_low, text_high, set_text_low, set_text_high>: New methods.
4762         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4763         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4764         (start_psymtab_common, maintenance_info_psymtabs)
4765         (maintenance_check_psymtabs): Update.
4766         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4767         texthigh fields.
4768         (scan_xcoff_symtab): Update.
4769
4770 2018-07-26  Tom Tromey  <tromey@redhat.com>
4771
4772         * psympriv.h (struct partial_symbol) <unrelocated_address,
4773         address, set_address>: New methods.
4774         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4775         (fixup_psymbol_section, relocate_psymtabs): Update.
4776         (print_partial_symbols): Add 'objfile' parameter.  Update.
4777         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4778         Update.
4779
4780 2018-07-26  Tom Tromey  <tom@tromey.com>
4781
4782         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4783         (debug_names::write_psymbols): Update.
4784         * psympriv.h (struct partial_symbol): Derive from
4785         general_symbol_info.
4786         <obj_section>: New method.
4787         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4788         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4789         (find_pc_sect_psymbol, fixup_psymbol_section)
4790         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4791         (print_partial_symbols, recursively_search_psymtabs)
4792         (compare_psymbols, psymbol_hash, psymbol_compare)
4793         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4794         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4795
4796 2018-07-26  Tom Tromey  <tromey@redhat.com>
4797
4798         * dbxread.c (end_psymtab): Remove dead code.
4799
4800 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4801
4802         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4803         DWARF unwinders are disabled.
4804         * dwarf2-frame.c: Add dwarf2read.h include.
4805         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4806         disabled.
4807         (dwarf2_frame_unwinders_enabled_p): Define.
4808         (show_dwarf_unwinders_enabled_p): New function.
4809         (_initialize_dwarf2_frame): Register switch to control DWARF
4810         unwinder use.
4811         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4812         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4813         (show_dwarf_cmdlist): Remove static keyword.
4814         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4815         (show_dwarf_cmdlist): Declare.
4816         * NEWS: Document new feature.
4817
4818 2018-07-26  Tom de Vries  <tdevries@suse.de>
4819
4820         PR breakpoints/23366
4821         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4822
4823 2018-07-26  Tom de Vries  <tdevries@suse.de>
4824
4825         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4826         DW_AT_count can't be translated to a dynamic prop.
4827
4828 2018-07-25  Tom de Vries  <tdevries@suse.de>
4829
4830         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4831         try/catch.
4832
4833 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4834
4835         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4836
4837 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4838
4839         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4840
4841 2018-07-24  Keith Seitz  <keiths@redhat.comt
4842
4843         PR symtab/23010
4844         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4845         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4846         instead of add_symbol_to_list.
4847         (read_file_scope): Call prepare_one_comp_unit before reading
4848         any other DIEs.
4849
4850 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4851
4852         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4853
4854 2018-07-24  Tom Tromey  <tom@tromey.com>
4855
4856         * utils.c (malloc, realloc, free): Don't declare.
4857         * configure, config.in: Rebuild.
4858         * configure.ac: Don't check for declarations of free, malloc, or
4859         realloc.
4860
4861 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4862
4863         * aarch64-linux-nat.c
4864         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4865         variable.
4866         * arm-linux-nat.c (fetch_regs): Likewise.
4867         (store_regs): Likewise.
4868         (fetch_vfp_regs): Likewise.
4869         (store_vfp_regs): Likewise.
4870         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4871         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4872         (arm_linux_nat_target::insert_watchpoint): Likewise.
4873         (arm_linux_nat_target::remove_watchpoint): Likewise.
4874         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4875         Likewise.
4876         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4877         Likewise.
4878         * ppc-linux-nat.c (fetch_register): Likewise.
4879         (fetch_all_gp_regs): Likewise.
4880         (fetch_ppc_registers): Likewise.
4881         (store_all_gp_regs): Likewise.
4882         (store_ppc_registers): Likewise.
4883         (hwdebug_insert_point): Likewise.
4884         (can_use_watchpoint_cond_accel): Likewise.
4885         * remote-sim.c (gdb_os_write_stdout): Likewise.
4886
4887 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4888             Tom Tromey  <tom@tromey.com>
4889
4890         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4891         test for it.
4892         * configure: Rebuild.
4893
4894 2018-07-22  Tom Tromey  <tom@tromey.com>
4895
4896         * regformats/regdat.sh: Define xmltarget_${name} inside
4897         #ifndef IN_PROCESS_AGENT.
4898
4899 2018-07-22  Tom Tromey  <tom@tromey.com>
4900
4901         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4902
4903 2018-07-22  Tom Tromey  <tom@tromey.com>
4904
4905         * symfile.c (reread_symbols): Notify iter, not objfile.
4906
4907 2018-07-22  Tom Tromey  <tom@tromey.com>
4908
4909         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4910         Use arch_ops.
4911         (ravenscar_thread_target::prepare_to_store): Likewise.
4912
4913 2018-07-22  Tom Tromey  <tom@tromey.com>
4914
4915         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4916         unused variable.  Call value_fetch_lazy when needed.
4917         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4918         Remove unused variable.  Call value_fetch_lazy when needed.
4919
4920 2018-07-22  Tom Tromey  <tom@tromey.com>
4921
4922         * m32c-tdep.c (mark_dma): Return void.
4923         (make_regs): Remove unused declarations.
4924
4925 2018-07-22  Tom Tromey  <tom@tromey.com>
4926
4927         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4928         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4929         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4930         bkscm_get_valid_block_smob_arg_unsafe for effect.
4931
4932 2018-07-22  Tom Tromey  <tom@tromey.com>
4933
4934         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4935         value_type.
4936
4937 2018-07-22  Tom Tromey  <tom@tromey.com>
4938
4939         * windows-nat.c (saved_context): Conditionally define.
4940         * remote.c (remote_target::remote_btrace_maybe_reopen):
4941         Conditionally declare "warned".
4942         * inflow.c (sigquit_ours): Conditionally define.
4943         (new_tty): Move "tty" declaration inside #if.
4944         * guile/guile.c (guile_datadir): Conditionally define.
4945         * charset.c (set_be_le_names): Move some declarations inside #if.
4946         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4947         #if.
4948         (parse_xml_btrace_conf): Likewise.
4949
4950 2018-07-22  Tom Tromey  <tom@tromey.com>
4951
4952         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4953
4954 2018-07-22  Tom Tromey  <tom@tromey.com>
4955
4956         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4957         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4958         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4959         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4960         * stack.c (frame_apply_level_command): Remove unused variable.
4961         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4962         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4963         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4964         unused variable.
4965         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4966         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4967         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4968         variable.
4969         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4970         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4971         variable.
4972         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4973         Remove unused variable.
4974         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4975         variable.
4976         * common/tdesc.c (print_xml_feature::visit): Remove unused
4977         variable.
4978         * compile/compile-object-load.c (store_regs): Remove unused
4979         variables.
4980         * complaints.c (clear_complaints): Remove unused variable.
4981         * corelow.c (core_target_open): Remove unused variable.
4982         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4983         variable.
4984         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4985         variable.
4986         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4987         variable.
4988         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4989         variable.
4990         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4991         variable.
4992         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4993         variable.
4994         * ia64-tdep.c (examine_prologue): Remove unused variable.
4995         * infcall.c (run_inferior_call): Remove unused variable.
4996         * inferior.c (exit_inferior): Remove unused variable.
4997         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4998         * linespec.c (decode_line_2): Remove unused variable.
4999         * linux-nat.c (super_close): Remove.
5000         * linux-tdep.c (linux_info_proc): Remove unused variable.
5001         * mi/mi-main.c (mi_execute_command): Remove unused variable.
5002         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
5003         Remove unused variable.
5004         * parse.c (find_minsym_type_and_address): Remove unused variable.
5005         * printcmd.c (info_symbol_command, printf_floating): Remove unused
5006         variable.
5007         * python/py-breakpoint.c (bppy_set_commands): Remove unused
5008         variable.
5009         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
5010         variables.
5011         * record-btrace.c (record_btrace_target::store_registers): Remove
5012         unused variable.
5013         (cmd_show_record_btrace_cpu): Remove unused variable.
5014         * riscv-tdep.c (riscv_register_reggroup_p)
5015         (riscv_push_dummy_call, riscv_return_value): Remove unused
5016         variable.
5017         * rust-exp.y (literal): Remove unused variable.
5018         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
5019         unused variable.
5020         <STRUCTOP_ANONYMOUS>: Likewise.
5021         * s390-linux-tdep.c (s390_linux_init_abi_31)
5022         (s390_linux_init_abi_64): Remove unused variable.
5023         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
5024         (file_select_thread, net_windows_open, _initialize_ser_windows):
5025         Remove unused variables.
5026         * symtab.c (find_pc_sect_line): Remove unused variable.
5027         * target-memory.c (compute_garbled_blocks): Remove unused
5028         variable.
5029         (target_write_memory_blocks): Remove unused variable.
5030         * target.c (target_stack::unpush): Remove unused variables.
5031         * tracepoint.c (start_tracing, all_tracepoint_actions)
5032         (merge_uploaded_trace_state_variables)
5033         (print_one_static_tracepoint_marker): Remove unused variable.
5034         * unittests/basic_string_view/element_access/char/1.cc (test01):
5035         Remove unused variable.
5036         * windows-nat.c (windows_continue, windows_add_all_dlls)
5037         (do_initial_windows_stuff, windows_nat_target::create_inferior):
5038         Remove unused variables.
5039
5040 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
5041
5042         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
5043         attr_profile in HAVE_ELF.
5044         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
5045         HAVE_ELF.
5046
5047 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
5048
5049         * frame.c (frame_register_unwind): Change parameter name.
5050         (frame_unwind_register): Likewise.
5051         (frame_unwind_register_value): Likewise.
5052         (frame_unwind_register_signed): Likewise.
5053         (frame_unwind_register_unsigned): Likewise.
5054         * frame.h (frame_register_unwind): Likewise.
5055         (frame_unwind_register): Likewise.
5056         (frame_unwind_register_value): Likewise.
5057         (frame_unwind_register_signed): Likewise.
5058         (frame_unwind_register_unsigned): Likewise.
5059         (frame_unwind_arch): Likewise.
5060
5061 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5062
5063         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
5064         ISA maintenance.
5065
5066 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
5067
5068         * mips-linux-nat.c (mips_linux_nat_target::read_description):
5069         Call `get_ptrace_pid' rather than extracting the ptrace PID by
5070         hand.
5071
5072 2018-07-20  Keith Seitz  <keiths@redhat.com>
5073
5074         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
5075         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
5076         m_compunit_symtab, m_language>: Add "m_" prefix.
5077         Update all uses.
5078         * buildsym.c: Update all uses.
5079
5080 2018-07-20  Tom Tromey  <tom@tromey.com>
5081
5082         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
5083         * buildsym.h (record_line_ftype): Remove typedef.
5084
5085 2018-07-20  Tom Tromey  <tom@tromey.com>
5086
5087         * buildsym-legacy.h (augment_type_symtab): Don't declare.
5088         (end_expandable_symtab): Likewise.
5089         (end_symtab_get_static_block): Likewise.
5090         (end_symtab_from_static_block): Likewise.
5091         * buildsym-legacy.c (augment_type_symtab): Remove.
5092         (end_expandable_symtab): Remove.
5093         (end_symtab_get_static_block): Remove.
5094         (end_symtab_from_static_block): Remove.
5095
5096 2018-07-20  Tom Tromey  <tom@tromey.com>
5097
5098         * dwarf2read.c: Include buildsym.h.
5099         (struct dwarf2_cu) <builder>: New method.
5100         (fixup_go_packaging): Update.
5101         (process_full_comp_unit, process_full_type_unit): Update.  Don't
5102         use scoped_free_pendings.
5103         (using_directives): Add "cu" parameter, remove "language".
5104         (read_import_statement, setup_type_unit_groups, )
5105         (read_func_scope, read_lexical_block_scope)
5106         (dwarf2_record_block_ranges, read_namespace): Update.
5107         (lnp_state_machine::lnp_state_machine): Add cu parameter.
5108         (lnp_state_machine::handle_end_sequence): Update.
5109         (class lnp_state_machine) <m_cu>: New member.
5110         <m_record_line_callback>: Remove.
5111         <m_currently_recording_lines>: New member.
5112         (lnp_state_machine::handle_set_file): Update.
5113         (noop_record_line): Remove.
5114         (dwarf_record_line_p): Add cu parameter.
5115         (dwarf_record_line_1, dwarf_finish_line): Likewise.
5116         (lnp_state_machine::record_line)
5117         (lnp_state_machine::lnp_state_machine)
5118         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5119         (dwarf_decode_lines): Update.
5120         (dwarf2_start_subfile): Add cu parameter.
5121         (dwarf2_start_symtab, new_symbol): Update.
5122         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
5123         Remove dwarf2_per_objfile parameter.
5124         (dwarf_decode_macros): Update.
5125
5126 2018-07-20  Tom Tromey  <tom@tromey.com>
5127
5128         * stabsread.c (define_symbol): Update.
5129         * buildsym-legacy.h (get_buildsym_compunit): Declare.
5130         * dwarf2read.c (new_symbol): Update.
5131         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
5132         * cp-namespace.c: Include buildsym.h.
5133         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
5134         * buildsym-legacy.c (get_buildsym_compunit): New function.
5135
5136 2018-07-20  Tom Tromey  <tom@tromey.com>
5137
5138         * xcoffread.c: Include buildsym-legacy.h.
5139         * windows-nat.c: Include buildsym-legacy.h.
5140         * stabsread.c: Include buildsym-legacy.h.
5141         * mdebugread.c: Include buildsym-legacy.h.
5142         * buildsym-legacy.h: New file.
5143         * buildsym-legacy.c: New file, from buildsym.c.
5144         * go32-nat.c: Include buildsym-legacy.h.
5145         * dwarf2read.c: Include buildsym-legacy.h.
5146         * dbxread.c: Include buildsym-legacy.h.
5147         * cp-namespace.c: Include buildsym-legacy.h.
5148         * coffread.c: Include buildsym-legacy.h.
5149         * buildsym.h: Move some contents to buildsym-legacy.h.
5150         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
5151         buildsym-legacy.c.
5152         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
5153
5154 2018-07-20  Tom Tromey  <tom@tromey.com>
5155
5156         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
5157         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
5158         (buildsym_compunit::buildsym_compunit)
5159         (buildsym_compunit::~buildsym_compunit)
5160         (buildsym_compunit::get_macro_table): Define.
5161
5162 2018-07-20  Tom Tromey  <tom@tromey.com>
5163
5164         * buildsym.c (reset_symtab_globals): Remove.
5165         (buildsym_compunit::end_symtab_from_static_block): Update.
5166         (buildsym_compunit::augment_type_symtab): Update.
5167         (end_symtab_from_static_block): Call free_buildsym_compunit.
5168         (augment_type_symtab, end_symtab, end_expandable_symtab):
5169         Likewise.
5170
5171 2018-07-20  Tom Tromey  <tom@tromey.com>
5172
5173         * arch-utils.c: Do not include buildsym.h.
5174         * mipsread.c: Do not include buildsym.h.
5175         * machoread.c: Do not include buildsym.h.
5176         * elfread.c: Do not include buildsym.h.
5177
5178 2018-07-20  Tom Tromey  <tom@tromey.com>
5179
5180         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
5181         initialization.
5182         (buildsym_compunit): Add new constructor.
5183         (struct buildsym_compunit) <get_last_source_file, finish_block,
5184         record_block_range, start_subfile, patch_subfile_names,
5185         push_subfile, pop_subfile, record_line, get_compunit_symtab,
5186         set_last_source_start_addr, get_last_source_start_addr,
5187         get_local_using_directives, set_local_using_directives,
5188         get_global_using_directives, outermost_context_p,
5189         get_current_context_stack, get_context_stack_depth,
5190         get_current_subfile, get_local_symbols, get_file_symbols,
5191         get_global_symbols, record_debugformat, record_producer,
5192         push_context, pop_context, end_symtab_get_static_block,
5193         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
5194         New public methods.
5195         <record_pending_block, finish_block_internal, make_blockvector,
5196         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
5197         private methods.
5198         Update all users.
5199
5200 2018-05-22  Tom Tromey  <tom@tromey.com>
5201
5202         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5203         parameter.
5204         (finish_block_internal): Update.
5205
5206 2018-07-20  Tom Tromey  <tom@tromey.com>
5207
5208         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
5209         parameter.
5210         (finish_block_internal): Update.
5211
5212 2018-07-20  Tom Tromey  <tom@tromey.com>
5213
5214         * buildsym.h (EXTERN): Don't define or undef.
5215         * buildsym.c (EXTERN): Don't define.
5216
5217 2018-07-20  Tom Tromey  <tom@tromey.com>
5218
5219         * buildsym.c: Remove TODO comment.
5220
5221 2018-07-20  Tom Tromey  <tom@tromey.com>
5222
5223         * coffread.c (coff_symtab_read): Update.
5224         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
5225         (xcoff_new_init): Update.
5226         * mipsread.c (mipscoff_new_init): Update.
5227         * mdebugread.c (mdebug_build_psymtabs): Update.
5228         * elfread.c (elf_new_init): Update.
5229         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
5230         Update.
5231         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
5232         (coffstab_build_psymtabs, elfstab_build_psymtabs)
5233         (stabsect_build_psymtabs): Update.
5234         * buildsym.h (buildsym_init): Don't declare.
5235         * buildsym.c: Update comment.
5236         (prepare_for_building): Remove.
5237         (start_symtab, restart_symtab): Update.
5238         (reset_symtab_globals): Update comment.
5239         (buildsym_init): Remove.
5240
5241 2018-07-20  Tom Tromey  <tom@tromey.com>
5242
5243         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5244         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5245         (read_enum_type, common_block_start, common_block_end)
5246         (cleanup_undefined_types_1, finish_global_stabs): Update.
5247         * mdebugread.c (psymtab_to_symtab_1): Update.
5248         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5249         (read_lexical_block_scope, new_symbol): Update.
5250         * dbxread.c (process_one_symbol): Update.
5251         * coffread.c (coff_symtab_read, process_coff_symbol)
5252         (coff_read_enum_type): Update.
5253         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5254         declare.
5255         (get_local_symbols, get_file_symbols, get_global_symbols): New
5256         functions.
5257         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5258         m_global_symbols.
5259         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5260         (~scoped_free_pendings): Update.
5261         (finish_block, prepare_for_building, reset_symtab_globals)
5262         (end_symtab_get_static_block, end_symtab_with_blockvector)
5263         (augment_type_symtab, push_context): Update.
5264         (get_local_symbols, get_file_symbols, get_global_symbols): New
5265         functions.
5266         (buildsym_init): Update.
5267
5268 2018-07-20  Tom Tromey  <tom@tromey.com>
5269
5270         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5271         (process_full_type_unit): Likewise.
5272         (dwarf2_start_symtab): Set list_in_scope.
5273
5274 2018-07-20  Tom Tromey  <tom@tromey.com>
5275
5276         * dwarf2read.c (process_psymtab_comp_unit_reader)
5277         (build_type_psymtabs_reader): Do not set list_in_scope.
5278
5279 2018-07-20  Tom Tromey  <tom@tromey.com>
5280
5281         * buildsym.c (free_pendings): Remove.
5282         (add_symbol_to_list, scoped_free_pendings)
5283         (finish_block_internal, buildsym_init): Update.
5284
5285 2018-07-20  Tom Tromey  <tom@tromey.com>
5286
5287         * xcoffread.c (read_xcoff_symtab): Update.
5288         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5289         Update.
5290         * dbxread.c (process_one_symbol): Update.
5291         * coffread.c (coff_symtab_read): Update.
5292         * buildsym.h (finish_block): Update.
5293         * buildsym.c (finish_block): Remove "listhead" argument.
5294         (end_symtab_get_static_block): Update.
5295
5296 2018-07-20  Tom Tromey  <tom@tromey.com>
5297
5298         * buildsym.h (class scoped_free_pendings): Remove constructor.
5299         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5300         method.
5301         <m_pending_block_obstack, m_pending_blocks>: New members.
5302         (pending_block_obstack, pending_blocks): Remove.
5303         (scoped_free_pendings::scoped_free_pendings): Default.
5304         (~scoped_free_pendings): Update.
5305         (free_pending_blocks): Remove.
5306         (finish_block_internal, record_pending_block, make_blockvector)
5307         (end_symtab_get_static_block, augment_type_symtab, push_context)
5308         (buildsym_init): Update.
5309
5310 2018-07-20  Tom Tromey  <tom@tromey.com>
5311
5312         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5313         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5314         members.
5315         (pending_addrmap, pending_addrmap_obstack)
5316         (pending_addrmap_interesting): Remove.
5317         (scoped_free_pendings, record_block_range, make_blockvector)
5318         (prepare_for_building, reset_symtab_globals, buildsym_init):
5319         Update.
5320
5321 2018-07-20  Tom Tromey  <tom@tromey.com>
5322
5323         * xcoffread.c (process_linenos): Update.
5324         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5325         * mdebugread.c (psymtab_to_symtab_1): Update.
5326         * dwarf2read.c (setup_type_unit_groups)
5327         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5328         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5329         * dbxread.c (process_one_symbol): Update.
5330         * coffread.c (coff_symtab_read, enter_linenos)
5331         (process_coff_symbol): Update.
5332         * buildsym.h (current_subfile): Don't declare.
5333         (get_current_subfile): Declare.
5334         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5335         member.
5336         (start_subfile, free_buildsym_compunit, push_subfile)
5337         (prepare_for_building, start_symtab): Update.
5338         (get_current_subfile): New function.
5339
5340 2018-07-20  Tom Tromey  <tom@tromey.com>
5341
5342         * coffread.c (coff_symtab_read): Update.
5343         * xcoffread.c (read_xcoff_symtab): Update.
5344         * dwarf2read.c (new_symbol): Update.
5345         (read_func_scope, read_lexical_block_scope): Update.
5346         * dbxread.c (process_one_symbol): Update.
5347         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5348         (outermost_context_p): Remove macro.
5349         (outermost_context_p, get_current_context_stack)
5350         (get_context_stack_depth): Declare.
5351         (pop_context): Return struct context_stack.
5352         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5353         member.
5354         (context_stack_size): Remove.
5355         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5356         (prepare_for_building, end_symtab_get_static_block)
5357         (augment_type_symtab, push_context): Update.
5358         (pop_context): Return struct context_stack.
5359         (outermost_context_p, get_current_context_stack)
5360         (get_context_stack_depth): New functions.
5361         (buildsym_init): Update.
5362
5363 2018-07-20  Tom Tromey  <tom@tromey.com>
5364
5365         * rust-exp.y: Now a pure parser.  Update all rules.
5366         (%union): Move earlier.
5367         (current_parser, work_obstack): Remove globals.
5368         (rust_parser, ~rust_parser): Update.
5369         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5370         lex_character, lex_number, lex_string, lex_identifier,
5371         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5372         convert_name, convert_params_to_expression,
5373         convert_ast_to_expression, ast_basic_type, ast_operation,
5374         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5375         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5376         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5377         ast_array_type, ast_slice_type, ast_reference_type,
5378         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5379         (rust_parse): Update.
5380         (rustyyerror, rustyylex): Add parser parameter.
5381         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5382         (rust_lex_stringish_test, rust_lex_test_sequence)
5383         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5384         (rust_lex_test_push_back, rust_lex_tests): Update.
5385
5386 2018-07-19  Pedro Alves  <palves@redhat.com>
5387
5388         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5389         gdb::unique_xmalloc_ptr.
5390         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5391         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5392         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5393         copy-initialization.
5394         * guile/scm-pretty-print.c (ppscm_print_children): Use
5395         gdb::unique_xmalloc_ptr instead of cleanups.
5396         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5397         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5398         gdb::unique_xmalloc_ptr.
5399         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5400         Adjust to use gdb::unique_xmalloc_ptr.
5401         * guile/scm-utils.c (extract_arg): Adjust.
5402         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5403         gdb::unique_xmalloc_ptr instead of a cleanup.
5404
5405 2018-07-19  Tom Tromey  <tom@tromey.com>
5406
5407         * utils.c (do_value_free_to_mark)
5408         (make_cleanup_value_free_to_mark): Remove.
5409         * utils.h (make_cleanup_value_free_to_mark): Remove.
5410
5411 2018-07-19  Pedro Alves  <palves@redhat.com>
5412
5413         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5414         forwarding reference.
5415
5416 2018-07-18  Pedro Alves  <palves@redhat.com>
5417
5418         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5419         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5420         cleanup.
5421
5422 2018-07-18  Pedro Alves  <palves@redhat.com>
5423
5424         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5425         exceptions.
5426         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5427         (gdbscm_wrap): New.
5428         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5429         directly instead of a cleanup.
5430         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5431         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5432         (vlscm_binop_gdbthrow): New, factored out from ...
5433         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5434         (vlscm_rich_compare): Use gdbscm_wrap.
5435         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5436         instead of a cleanup.
5437         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5438         cleanup.
5439         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5440         Use xfree directly instead of a cleanup.
5441         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5442         Adjust to use gdbscm_wrap and scoped_value_mark.
5443         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5444         (gdbscm_value_address, gdbscm_value_dereference)
5445         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5446         scoped_value_mark.
5447         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5448         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5449         scoped_value_mark.
5450         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5451         gdbscm_wrap and scoped_value_mark.
5452         (gdbscm_value_to_string): Use xfree directly instead of a
5453         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5454         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5455         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5456         scoped_value_mark.
5457         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5458         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5459         scoped_value_mark.
5460         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5461         gdbscm_wrap.
5462
5463 2018-07-18  Tom de Vries  <tdevries@suse.de>
5464
5465         * findvar.c (default_read_var_value): Also resolve dynamic type for
5466         LOC_OPTIMIZED_OUT vars.
5467
5468 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5469
5470         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5471         decoding.
5472
5473 2018-07-17  Tom Tromey  <tom@tromey.com>
5474
5475         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5476         (compute_enum_list, pascm_set_param_value_x)
5477         (gdbscm_parameter_value): Update.
5478         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5479         (gdbscm_scm_to_host_string): Update.
5480         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5481         Update.
5482         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5483         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5484         * guile/scm-string.c (gdbscm_scm_to_string): Return
5485         unique_xmalloc_ptr.
5486         (gdbscm_scm_to_host_string): Likewise.
5487
5488 2018-07-17  Tom Tromey  <tom@tromey.com>
5489
5490         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5491         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5492         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5493         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5494         unique_xmalloc_ptr.
5495
5496 2018-07-17  Tom Tromey  <tom@tromey.com>
5497
5498         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5499         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5500         Update.
5501         * guile/scm-cmd.c (cmdscm_function): Update.
5502         * guile/scm-pretty-print.c
5503         (ppscm_print_exception_unless_memory_error): Update.
5504         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5505         Return unique_xmalloc_ptr.
5506
5507 2018-07-17  Tom Tromey  <tom@tromey.com>
5508
5509         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5510         Use string_printf.
5511
5512 2018-07-17  Jim Wilson  <jimw@sifive.com>
5513
5514         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5515         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5516         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5517         unecessary braces after EF_RISCV_RVC test.  Delete call to
5518         set_gdbarch_decr_pc_after_break.
5519
5520         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5521         RISCV_LAST_FP_REGNUM + 1.
5522         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5523
5524 2018-07-17  Tom Tromey  <tom@tromey.com>
5525
5526         * configure.ac: Remove --disable-gdbcli.
5527         * configure: Rebuild.
5528         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5529         (SUBDIR_CLI_CFLAGS): Remove.
5530         (SFILES): Use SUBDIR_CLI_SRCS.
5531         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5532
5533 2018-07-17  Tom Tromey  <tom@tromey.com>
5534
5535         PR gdb/18624:
5536         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5537
5538 2018-07-16  Jim Wilson  <jimw@sifive.com>
5539
5540         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5541
5542 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5543
5544         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5545         variable.
5546         (libunwind_frame_sniffer): Likewise.
5547         (libunwind_frame_prev_register): Likewise.
5548         (libunwind_sigtramp_frame_sniffer): Likewise.
5549         * ia64-tdep.c (ia64_access_reg): Likewise.
5550         (ia64_access_rse_reg): Likewise.
5551         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5552         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5553
5554 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5555
5556         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5557
5558 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5559
5560         * remote-sim.c (gdbsim_target::close,
5561         gdbsim_target::mourn_inferior): Remove unused variables.
5562
5563 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5564
5565         * ia64-tdep.c (ktab_buf): New global.
5566         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5567         (get_kernel_table): Adjust.
5568
5569 2018-07-16  Tom Tromey  <tom@tromey.com>
5570
5571         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5572         * dwarf2read.c (using_directives, new_symbol): Use
5573         outermost_context_p.
5574         * dbxread.c (process_one_symbol): Use outermost_context_p.
5575         * coffread.c (coff_symtab_read): Use outermost_context_p.
5576
5577 2018-07-16  Tom Tromey  <tom@tromey.com>
5578
5579         * dwarf2read.c (using_directives, read_func_scope)
5580         (read_lexical_block_scope): Update.
5581         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5582         * buildsym.h (local_using_directives, global_using_directives):
5583         Don't declare.
5584         (get_local_using_directives, set_local_using_directives)
5585         (get_global_using_directives): Declare.
5586         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5587         m_global_using_directives>: New members.
5588         (finish_block_internal, prepare_for_building)
5589         (reset_symtab_globals, end_symtab_get_static_block)
5590         (push_context): Update.
5591         (get_local_using_directives, set_local_using_directives)
5592         (get_global_using_directives): New functions.
5593         (buildsym_init): Update.
5594
5595 2018-07-16  Tom Tromey  <tom@tromey.com>
5596
5597         * xcoffread.c (xcoff_initial_scan): Don't call
5598         free_pending_blocks.
5599         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5600         * buildsym.h (class scoped_free_pendings): Add constructor.
5601         (free_pending_blocks): Don't declare.
5602         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5603         (free_pending_blocks): Now static.
5604
5605 2018-07-16  Tom Tromey  <tom@tromey.com>
5606
5607         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5608         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5609         member.
5610         (struct subfile_stack): Remove.
5611         (subfile_stack): Remove.
5612         (push_subfile, pop_subfile, buildsym_init): Update.
5613
5614 2018-07-16  Tom Tromey  <tom@tromey.com>
5615
5616         * buildsym.c (push_subfile): Use gdb_assert.
5617         (pop_subfile): Use gdb_assert.
5618
5619 2018-07-16  Tom Tromey  <tom@tromey.com>
5620
5621         * buildsym.h (merge_symbol_lists): Remove.
5622         * buildsym.c (merge_symbol_lists): Remove.
5623
5624 2018-07-16  Tom Tromey  <tom@tromey.com>
5625
5626         * stabsread.c (scan_file_globals): Update comment.
5627         * stabsread.h (scan_file_globals): Move from buildsym.h.
5628         * buildsym.h (scan_file_globals): Move to stabsread.h.
5629
5630 2018-07-16  Tom Tromey  <tom@tromey.com>
5631
5632         * xcoffread.c (xcoff_new_init): Update.
5633         * mipsread.c (mipscoff_new_init): Update.
5634         * mdebugread.c (mdebug_build_psymtabs): Update.
5635         * elfread.c (elf_new_init): Update.
5636         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5637         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5638         * buildsym.h (buildsym_new_init): Don't declare.
5639         * buildsym.c (buildsym_new_init): Remove.
5640
5641 2018-07-16  Tom Tromey  <tom@tromey.com>
5642
5643         * stabsread.h (within_function): Move from buildsym.h.
5644         * stabsread.c (start_stabs): Clear within_function.
5645         * coffread.c (coff_start_symtab): Clear within_function.
5646         * buildsym.h (within_function): Move to stabsread.h.
5647         * buildsym.c (prepare_for_building): Update.
5648
5649 2018-07-16  Tom Tromey  <tom@tromey.com>
5650
5651         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5652         * dwarf2read.c (dwarf2_start_symtab): Don't set
5653         processing_gcc_compilation.
5654         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5655
5656 2018-07-16  Tom Tromey  <tom@tromey.com>
5657
5658         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5659         (next_symbol_text_func): Move from buildsym.h.
5660         * stabsread.c (hashname): Move from buildsym.c.
5661         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5662         (next_symbol_text_func, hashname): Move to stabsread.h.
5663         * buildsym.c: Don't include bcache.h
5664         (hashname): Move to stasbread.c.
5665
5666 2018-07-16  Tom Tromey  <tom@tromey.com>
5667
5668         * buildsym.h (context_stack_size): Don't declare.
5669         * buildsym.c (context_stack_size): New global.
5670
5671 2018-07-16  Tom Tromey  <tom@tromey.com>
5672
5673         * dbxread.c (processing_acc_compilation): New global.
5674         * buildsym.h (processing_acc_compilation): Don't declare.
5675
5676 2018-07-16  Tom Tromey  <tom@tromey.com>
5677
5678         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5679         * dbxread.c (read_ofile_symtab): Update.
5680         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5681         * buildsym.h (last_source_start_addr): Remove.
5682         (set_last_source_start_addr, get_last_source_start_addr):
5683         Declare.
5684         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5685         parameter.
5686         (struct buildsym_compunit) <m_last_source_start_addr>: New
5687         member.
5688         (prepare_for_building): Remove start_addr parameter.
5689         (start_symtab, restart_symtab, end_symtab_get_static_block)
5690         (end_symtab_with_blockvector): Update.
5691         (set_last_source_start_addr, get_last_source_start_addr): New
5692         functions.
5693
5694 2018-07-16  Tom Tromey  <tom@tromey.com>
5695
5696         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5697         member.
5698         (have_line_numbers): Remove.
5699         (record_line, prepare_for_building, end_symtab_get_static_block)
5700         (augment_type_symtab): Update.
5701
5702 2018-07-16  Tom Tromey  <tom@tromey.com>
5703
5704         * buildsym.c (~buildsym_compunit): Free the macro table.
5705         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5706         methods.
5707         <m_pending_macros>: New member.
5708         (pending_macros): Remove.
5709         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5710         (reset_symtab_globals, end_symtab_get_static_block)
5711         (end_symtab_with_blockvector, augment_type_symtab)
5712         (buildsym_init): Update.
5713
5714 2018-07-16  Tom Tromey  <tom@tromey.com>
5715
5716         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5717         parameter.
5718         (buildsym_compunit::set_last_source_file): New method.
5719         <m_last_source_file>: New member.
5720         (prepare_for_building): Remove "name" parameter.
5721         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5722         (last_source_file): Remove.
5723         (set_last_source_file, get_last_source_file): Update.
5724
5725 2018-07-16  Tom Tromey  <tom@tromey.com>
5726
5727         * buildsym.c (prepare_for_building): Add assert.
5728
5729 2018-07-16  Tom Tromey  <tom@tromey.com>
5730
5731         * buildsym.c (~buildsym_compunit): Update.
5732         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5733         (start_subfile, patch_subfile_names)
5734         (end_symtab_with_blockvector): Update.
5735
5736 2018-07-16  Tom Tromey  <tom@tromey.com>
5737
5738         * buildsym.c (struct buildsym_compunit): Add constructor,
5739         destructor, initializers.
5740         (start_buildsym_compunit): Remove.
5741         (free_buildsym_compunit): Use "delete".
5742         (start_symtab, restart_symtab): Use "new".
5743
5744 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5745
5746         * symfile.c (set_objfile_default_section_offset): Remove struct
5747         keyword.
5748
5749 2018-07-14  Stafford Horne  <shorne@gmail.com>
5750
5751         * (Responsible Maintainers): Add myself as or1k maintainer.
5752
5753 2018-07-13  Tom Tromey  <tom@tromey.com>
5754
5755         * symfile.c (set_objfile_default_section_offset): Use extra braces
5756         around initializer.
5757
5758 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5759
5760         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5761         non-branching basr.
5762
5763 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5764
5765         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5766         unittests/cli-utils-selftests.c
5767         * unittests/cli-utils-selftests.c: New file.
5768
5769 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5770
5771         * NEWS: Mention new commands. Mention change to 'thread apply'.
5772
5773 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5774
5775         * thread.c (thr_try_catch_cmd): New function.
5776         (thread_apply_all_command): Handle qcs flags.
5777         (thread_apply_command): Handle qcs flags.
5778         (taas_command): New function.
5779         (tfaas_command): New function.
5780         (_initialize_thread): Update to setup the new commands 'taas
5781         and 'tfaas'. Change doc string for 'thread apply'.
5782
5783 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5784
5785         * stack.c: (trailing_outermost_frame): New function, mostly
5786         extracted from backtrace_command_1.
5787         (leading_innermost_frame): New function.
5788         (backtrace_command_1): Update to call trailing_outermost_frame.
5789         (frame_apply_command_count): New function.
5790         (frame_apply_level_command): New function.
5791         (frame_apply_all_command): New function.
5792         (frame_apply_command): New function.
5793         (faas_command): New function.
5794         (frame_cmd_list): New variable.
5795         (_initialize_stack): Update to setup the new commands 'frame apply'
5796         and 'faas'.
5797
5798 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5799
5800         * cli-utils.c (number_or_range_parser::get_number): Only handle
5801         numbers or convenience var as numbers.
5802         (parse_flags): New function.
5803         (parse_flags_qcs): New function.
5804         (number_or_range_parser::finished): Ensure parsing end is detected
5805         before end of string.
5806         * cli-utils.h (parse_flags): New function.
5807         (parse_flags_qcs): New function.
5808         (number_or_range_parser): Remove m_finished bool.
5809         (number_or_range_parser::skip_range): Set m_in_range to false.
5810
5811 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5812
5813         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5814         on Windows.
5815
5816 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5817             Jan Kratochvil  <jan.kratochvil@redhat.com>
5818             Paul Fertser  <fercerpav@gmail.com>
5819             Tsutomu Seki  <sekiriki@gmail.com>
5820             Pedro Alves  <palves@redhat.com>
5821
5822         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5823         'unittests/parse-connection-spec-selftests.c'.
5824         (COMMON_SFILES): Add 'common/netstuff.c'.
5825         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5826         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5827         * common/netstuff.c: New file.
5828         * common/netstuff.h: New file.
5829         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5830         (wait_for_connect): Update comment.  New parameter
5831         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5832         Use 'sock' directly instead of 'scb->fd'.
5833         (try_connect): New function, with code from 'net_open'.
5834         (net_open): Rewrite main loop to deal with multiple
5835         sockets/addresses.  Handle IPv6-style hostnames; implement
5836         support for IPv6 connections.
5837         * unittests/parse-connection-spec-selftests.c: New file.
5838
5839 2018-07-11  Pedro Alves  <palves@redhat.com>
5840
5841         PR gdb/23377
5842         * remote.c (remote_target::remote_detach_pid): Call
5843         set_current_process.
5844
5845 2018-07-11  Pedro Alves  <palves@redhat.com>
5846
5847         * h8300-tdep.c (h8300_gdbarch_init): Remove
5848         set_gdbarch_ecoff_reg_to_regnum calls.
5849
5850 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5851
5852         PR c++/23373
5853         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5854         offsets/sizes for static members of a class/struct.
5855
5856 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5857
5858         * target-descriptions.c (tdesc_register_bitsize): Rename.
5859         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5860         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5861         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5862
5863 2018-07-10  Tom Tromey  <tom@tromey.com>
5864
5865         * breakpoint.c (moribund_locations): Now static and a
5866         std::vector.
5867         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5868         (build_bpstat_chain, update_global_location_list)
5869         (breakpoint_retire_moribund): Update.
5870         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5871         VEC.
5872
5873 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5874
5875         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5876         (riscv_register_reggroup_p): Use new function, remove unneeded
5877         parenthesis.
5878         (riscv_push_dummy_call): Extend assert to compare against xlen or
5879         flen based on register type.
5880
5881 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5882
5883         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5884
5885 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5886
5887         * remote.c (show_hardware_watchpoint_limit): New function.
5888         (show_hardware_watchpoint_length_limit): New function.
5889         (show_hardware_breakpoint_limit): New function.
5890         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5891         where appropriate, update help text.
5892
5893 2018-07-09  Tom Tromey  <tom@tromey.com>
5894
5895         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5896         (CLIBS): Don't mention NAT_CLIBS.
5897
5898 2018-07-09  Tom Tromey  <tom@tromey.com>
5899
5900         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5901         (LIBGDB_OBS, clean mostlyclean): Update.
5902         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5903
5904 2018-07-09  Tom Tromey  <tom@tromey.com>
5905
5906         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5907         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5908         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5909
5910 2018-07-09  Tom Tromey  <tom@tromey.com>
5911
5912         * Makefile.in (ALLDEPFILES): Remove exec.c.
5913         (COMMON_OBS): Remove exec.o.
5914         (COMMON_SFILES): Add exec.c.
5915
5916 2018-07-09  Tom Tromey  <tom@tromey.com>
5917
5918         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5919
5920 2018-07-09  Tom Tromey  <tom@tromey.com>
5921
5922         * Makefile.in (clean mostlyclean): Remove stamp-version.
5923         (version.c): Depend on stamp-version.
5924         (stamp-version): New rule, from version.c rule.
5925
5926 2018-07-09  Tom Tromey  <tom@tromey.com>
5927
5928         * Makefile.in (init.c): Depend on stamp-init.
5929         (stamp-init): New rule, from init.c rule.
5930         (clean mostlyclean): Remove stamp-init.
5931
5932 2018-07-09  Tom Tromey  <tom@tromey.com>
5933
5934         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5935         SUBDIR_GCC_COMPILE_SRCS.
5936
5937 2018-07-09  Tom Tromey  <tom@tromey.com>
5938
5939         * Makefile.in (init.c): Remove some unused sed rules.
5940
5941 2018-07-09  Tom Tromey  <tom@tromey.com>
5942
5943         * Makefile.in (TSOBS): Remove.
5944         (INIT_FILES): Update.
5945         (LIBGDB_OBS): Update.
5946         (COMMON_SFILES): Add inflow.c.
5947         (SFILES): Remove inflow.c.
5948
5949 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5950
5951         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5952
5953 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5954
5955         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5956         get_saveloc_name, is_signal_frame_name, step_name,
5957         init_remote_name, create_addr_space_name,
5958         destroy_addr_space_name, search_unwind_table_name,
5959         find_dyn_list_name): Constify.
5960
5961 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5962
5963         * darwin-nat.c (darwin_pthread_kill): New function.
5964         (darwin_resume_thread): Use darwin_pthread_kill.
5965
5966 2018-07-05  Tom de Vries  <tdevries@suse.de>
5967
5968         * macroexp.c (macro_buffer) <operator=>: New member function.
5969
5970 2018-07-04  Tom Tromey  <tom@tromey.com>
5971
5972         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5973
5974 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5975
5976         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5977         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5978         * maint.c: Likewise.
5979         * top.c: Likewise.
5980
5981 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5982
5983         * NEWS: Create a new section for the next release branch.
5984         Rename the section of the current branch, now that it has
5985         been cut.
5986
5987 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5988
5989         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5990         * version.in: Bump version to 8.2.50.DATE-git.
5991
5992 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5993             Pedro Alves  <palves@redhat.com>
5994
5995         * linux-nat.c (linux_init_ptrace): Rename to ...
5996         (linux_init_ptrace_procfs): ... this.  Call
5997         linux_proc_init_warnings.
5998         (linux_nat_target::post_attach)
5999         (linux_nat_target::post_startup_inferior): Adjust.
6000         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
6001         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
6002
6003 2018-07-04  Tom de Vries  <tdevries@suse.de>
6004
6005         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
6006         check ...
6007         (read_comp_unit_head): ... here.
6008
6009 2018-07-03  Tom Tromey  <tom@tromey.com>
6010
6011         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
6012         (stop_tracing, tstatus_command)
6013         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
6014         (print_one_static_tracepoint_marker): Update.
6015         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
6016         std::vector.
6017         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
6018         VEC.
6019         (all_tracepoints, static_tracepoints_here): Return std::vector.
6020
6021 2018-07-03  Tom Tromey  <tom@tromey.com>
6022
6023         * common/ptid.c (ptid_equal): Remove.
6024         * common/ptid.h (ptid_equal): Don't declare.
6025         * ada-tasks.c: Update.
6026         * breakpoint.c: Update.
6027         * common/agent.c: Update.
6028         * corelow.c: Update.
6029         * darwin-nat-info.c: Update.
6030         * darwin-nat.c: Update.
6031         * dcache.c: Update.
6032         * dtrace-probe.c: Update.
6033         * dummy-frame.c: Update.
6034         * fbsd-nat.c: Update.
6035         * frame.c: Update.
6036         * gdbthread.h: Update.
6037         * gnu-nat.c: Update.
6038         * go32-nat.c: Update.
6039         * inf-loop.c: Update.
6040         * inf-ptrace.c: Update.
6041         * infcall.c: Update.
6042         * infcmd.c: Update.
6043         * inflow.c: Update.
6044         * infrun.c: Update.
6045         * linux-fork.c: Update.
6046         * linux-nat.c: Update.
6047         * linux-thread-db.c: Update.
6048         * mi/mi-cmd-var.c: Update.
6049         * mi/mi-interp.c: Update.
6050         * mi/mi-main.c: Update.
6051         * nto-procfs.c: Update.
6052         * ppc-linux-tdep.c: Update.
6053         * procfs.c: Update.
6054         * python/py-inferior.c: Update.
6055         * python/py-record-btrace.c: Update.
6056         * python/py-record.c: Update.
6057         * ravenscar-thread.c: Update.
6058         * regcache.c: Update.
6059         * remote-sim.c: Update.
6060         * remote.c: Update.
6061         * sol-thread.c: Update.
6062         * solib.c: Update.
6063         * target.c: Update.
6064         * tui/tui-stack.c: Update.
6065         * varobj.c: Update.
6066         * windows-nat.c: Update.
6067         * windows-tdep.c: Update.
6068
6069 2018-07-03  Tom Tromey  <tom@tromey.com>
6070
6071         * common/ptid.c (ptid_match): Remove.
6072         * common/ptid.h (ptid_match): Don't declare.
6073         * fbsd-nat.c: Update.
6074         * infcmd.c: Update.
6075         * infrun.c: Update.
6076         * linux-nat.c: Update.
6077         * record-btrace.c: Update.
6078         * regcache.c: Update.
6079         * remote.c: Update.
6080
6081 2018-07-03  Tom Tromey  <tom@tromey.com>
6082
6083         * common/ptid.c (ptid_tid_p): Remove.
6084         * common/ptid.h (ptid_tid_p): Don't declare.
6085         * sol-thread.c: Update.
6086
6087 2018-07-03  Tom Tromey  <tom@tromey.com>
6088
6089         * common/ptid.c (ptid_lwp_p): Remove.
6090         * common/ptid.h (ptid_lwp_p): Don't declare.
6091         * fbsd-nat.c: Update.
6092         * linux-nat.c: Update.
6093         * nat/linux-procfs.c: Update.
6094         * nat/x86-linux-dregs.c: Update.
6095         * sol-thread.c: Update.
6096
6097 2018-07-03  Tom Tromey  <tom@tromey.com>
6098
6099         * common/ptid.c (ptid_is_pid): Remove.
6100         * common/ptid.h (ptid_is_pid): Don't declare.
6101         * infrun.c: Update.
6102         * linux-nat.c: Update.
6103         * mi/mi-interp.c: Update.
6104         * remote.c: Update.
6105         * thread.c: Update.
6106
6107 2018-07-03  Tom Tromey  <tom@tromey.com>
6108
6109         * common/ptid.c (ptid_get_tid): Remove.
6110         * common/ptid.h (ptid_get_tid): Don't declare.
6111         * ada-tasks.c: Update.
6112         * aix-thread.c: Update.
6113         * bsd-uthread.c: Update.
6114         * darwin-nat.c: Update.
6115         * fbsd-nat.c: Update.
6116         * i386-darwin-nat.c: Update.
6117         * infrun.c: Update.
6118         * linux-tdep.c: Update.
6119         * nto-procfs.c: Update.
6120         * ppc-ravenscar-thread.c: Update.
6121         * python/py-infthread.c: Update.
6122         * ravenscar-thread.c: Update.
6123         * sol-thread.c: Update.
6124         * sparc-ravenscar-thread.c: Update.
6125         * windows-nat.c: Update.
6126
6127 2018-07-03  Tom Tromey  <tom@tromey.com>
6128
6129         * common/ptid.c (ptid_get_lwp): Remove.
6130         * common/ptid.h (ptid_get_lwp): Don't declare.
6131         * aarch64-linux-nat.c: Update.
6132         * ada-tasks.c: Update.
6133         * aix-thread.c: Update.
6134         * amd64-linux-nat.c: Update.
6135         * arm-linux-nat.c: Update.
6136         * corelow.c: Update.
6137         * fbsd-nat.c: Update.
6138         * fbsd-tdep.c: Update.
6139         * gnu-nat.c: Update.
6140         * i386-cygwin-tdep.c: Update.
6141         * i386-gnu-nat.c: Update.
6142         * i386-linux-nat.c: Update.
6143         * ia64-linux-nat.c: Update.
6144         * inf-ptrace.c: Update.
6145         * infrun.c: Update.
6146         * linux-fork.c: Update.
6147         * linux-nat.c: Update.
6148         * linux-tdep.c: Update.
6149         * linux-thread-db.c: Update.
6150         * mips-linux-nat.c: Update.
6151         * nat/aarch64-linux-hw-point.c: Update.
6152         * nat/aarch64-linux.c: Update.
6153         * nat/linux-btrace.c: Update.
6154         * nat/linux-osdata.c: Update.
6155         * nat/linux-procfs.c: Update.
6156         * nat/x86-linux-dregs.c: Update.
6157         * obsd-nat.c: Update.
6158         * ppc-fbsd-nat.c: Update.
6159         * ppc-linux-nat.c: Update.
6160         * procfs.c: Update.
6161         * python/py-infthread.c: Update.
6162         * ravenscar-thread.c: Update.
6163         * remote.c: Update.
6164         * s390-linux-nat.c: Update.
6165         * sol-thread.c: Update.
6166         * sol2-tdep.c: Update.
6167         * spu-linux-nat.c: Update.
6168         * x86-linux-nat.c: Update.
6169         * xtensa-linux-nat.c: Update.
6170
6171 2018-07-03  Tom Tromey  <tom@tromey.com>
6172
6173         * common/ptid.c (ptid_get_pid): Remove.
6174         * common/ptid.h (ptid_get_pid): Don't declare.
6175         * aarch64-linux-nat.c: Update.
6176         * ada-lang.c: Update.
6177         * aix-thread.c: Update.
6178         * alpha-bsd-nat.c: Update.
6179         * amd64-fbsd-nat.c: Update.
6180         * amd64-linux-nat.c: Update.
6181         * arm-linux-nat.c: Update.
6182         * arm-nbsd-nat.c: Update.
6183         * auxv.c: Update.
6184         * break-catch-syscall.c: Update.
6185         * breakpoint.c: Update.
6186         * bsd-uthread.c: Update.
6187         * corelow.c: Update.
6188         * ctf.c: Update.
6189         * darwin-nat.c: Update.
6190         * fbsd-nat.c: Update.
6191         * fbsd-tdep.c: Update.
6192         * gcore.c: Update.
6193         * gnu-nat.c: Update.
6194         * hppa-nbsd-nat.c: Update.
6195         * hppa-obsd-nat.c: Update.
6196         * i386-fbsd-nat.c: Update.
6197         * ia64-linux-nat.c: Update.
6198         * inf-ptrace.c: Update.
6199         * infcmd.c: Update.
6200         * inferior.c: Update.
6201         * inferior.h: Update.
6202         * inflow.c: Update.
6203         * infrun.c: Update.
6204         * linux-fork.c: Update.
6205         * linux-nat.c: Update.
6206         * linux-tdep.c: Update.
6207         * linux-thread-db.c: Update.
6208         * m68k-bsd-nat.c: Update.
6209         * mi/mi-interp.c: Update.
6210         * mi/mi-main.c: Update.
6211         * mips-linux-nat.c: Update.
6212         * mips-nbsd-nat.c: Update.
6213         * mips64-obsd-nat.c: Update.
6214         * nat/aarch64-linux-hw-point.c: Update.
6215         * nat/aarch64-linux.c: Update.
6216         * nat/linux-btrace.c: Update.
6217         * nat/linux-osdata.c: Update.
6218         * nat/linux-procfs.c: Update.
6219         * nat/x86-linux-dregs.c: Update.
6220         * nto-procfs.c: Update.
6221         * obsd-nat.c: Update.
6222         * ppc-linux-nat.c: Update.
6223         * ppc-nbsd-nat.c: Update.
6224         * ppc-obsd-nat.c: Update.
6225         * proc-service.c: Update.
6226         * procfs.c: Update.
6227         * python/py-inferior.c: Update.
6228         * python/py-infthread.c: Update.
6229         * ravenscar-thread.c: Update.
6230         * record.c: Update.
6231         * remote-sim.c: Update.
6232         * remote.c: Update.
6233         * rs6000-nat.c: Update.
6234         * s390-linux-nat.c: Update.
6235         * sh-nbsd-nat.c: Update.
6236         * sol-thread.c: Update.
6237         * sparc-nat.c: Update.
6238         * sparc64-tdep.c: Update.
6239         * spu-linux-nat.c: Update.
6240         * spu-tdep.c: Update.
6241         * target-debug.h: Update.
6242         * target.c: Update.
6243         * thread.c: Update.
6244         * tid-parse.c: Update.
6245         * tracefile-tfile.c: Update.
6246         * vax-bsd-nat.c: Update.
6247         * windows-nat.c: Update.
6248         * x86-linux-nat.c: Update.
6249         * x86-nat.c: Update.
6250
6251 2018-07-03  Tom Tromey  <tom@tromey.com>
6252
6253         * common/ptid.c (pid_to_ptid): Remove.
6254         * common/ptid.h (pid_to_ptid): Don't declare.
6255         * aix-thread.c: Update.
6256         * arm-linux-nat.c: Update.
6257         * common/ptid.c: Update.
6258         * common/ptid.h: Update.
6259         * corelow.c: Update.
6260         * ctf.c: Update.
6261         * darwin-nat.c: Update.
6262         * fbsd-nat.c: Update.
6263         * fork-child.c: Update.
6264         * gnu-nat.c: Update.
6265         * go32-nat.c: Update.
6266         * inf-ptrace.c: Update.
6267         * infcmd.c: Update.
6268         * inferior.c: Update.
6269         * infrun.c: Update.
6270         * linux-fork.c: Update.
6271         * linux-nat.c: Update.
6272         * nat/aarch64-linux-hw-point.c: Update.
6273         * nat/fork-inferior.c: Update.
6274         * nat/x86-linux-dregs.c: Update.
6275         * nto-procfs.c: Update.
6276         * obsd-nat.c: Update.
6277         * procfs.c: Update.
6278         * progspace.c: Update.
6279         * remote.c: Update.
6280         * rs6000-nat.c: Update.
6281         * s390-linux-nat.c: Update.
6282         * sol-thread.c: Update.
6283         * spu-linux-nat.c: Update.
6284         * target.c: Update.
6285         * top.c: Update.
6286         * tracefile-tfile.c: Update.
6287         * windows-nat.c: Update.
6288
6289 2018-07-03  Tom Tromey  <tom@tromey.com>
6290
6291         * common/ptid.h (ptid_build): Don't declare.
6292         * common/ptid.c (ptid_build): Remove.
6293         * aix-thread.c: Update.
6294         * bsd-kvm.c: Update.
6295         * bsd-uthread.c: Update.
6296         * common/agent.c: Update.
6297         * common/ptid.c: Update.
6298         * common/ptid.h: Update.
6299         * corelow.c: Update.
6300         * darwin-nat.c: Update.
6301         * fbsd-nat.c: Update.
6302         * gnu-nat.c: Update.
6303         * linux-fork.c: Update.
6304         * linux-nat.c: Update.
6305         * linux-thread-db.c: Update.
6306         * nat/linux-osdata.c: Update.
6307         * nat/linux-procfs.c: Update.
6308         * nto-procfs.c: Update.
6309         * obsd-nat.c: Update.
6310         * proc-service.c: Update.
6311         * procfs.c: Update.
6312         * ravenscar-thread.c: Update.
6313         * remote-sim.c: Update.
6314         * remote.c: Update.
6315         * sol-thread.c: Update.
6316         * target.c: Update.
6317         * windows-nat.c: Update.
6318
6319 2018-07-03  Tom Tromey  <tom@tromey.com>
6320
6321         * infrun.c (follow_exec): Use exit_inferior_silent.
6322         * inferior.c (exit_inferior_num_silent): Remove.
6323         * inferior.h (exit_inferior_num_silent): Don't declare.
6324
6325 2018-07-03  Tom Tromey  <tom@tromey.com>
6326
6327         PR cli/23340:
6328         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6329         inferior_ptid on error.
6330
6331 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6332             Simon Marchi  <simon.marchi@polymtl.ca>
6333
6334         PR tdep/8282
6335         * disasm.h (gdb_disassembler): Add
6336         `m_disassembler_options_holder'. member
6337         * disasm.c (get_all_disassembler_options): New function.
6338         (gdb_disassembler::gdb_disassembler): Use it.
6339         (gdb_buffered_insn_length_init_dis): Likewise.
6340         (gdb_buffered_insn_length): Adjust accordingly.
6341         (set_disassembler_options): Handle options with arguments.
6342         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6343         line if showing options with descriptions.
6344         (disassembler_options_completer): Adapt to using the
6345         `disasm_options_and_args_t' structure.
6346         * mips-tdep.c (mips_disassembler_options): New variable.
6347         (mips_disassembler_options_o32): Likewise.
6348         (mips_disassembler_options_n32): Likewise.
6349         (mips_disassembler_options_n64): Likewise.
6350         (gdb_print_insn_mips): Don't set `disassembler_options'.
6351         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6352         functions.
6353         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6354         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6355         `gdbarch_disassembler_options_implicit' and
6356         `gdbarch_valid_disassembler_options'.
6357         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6358         `disasm_options_and_args_t' structure.
6359         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6360         method.
6361         (valid_disassembler_options): Switch from `disasm_options_t' to
6362         the `disasm_options_and_args_t' structure.
6363         * NEWS: Document `set disassembler-options' support for the MIPS
6364         target.
6365         * gdbarch.h: Regenerate.
6366         * gdbarch.c: Regenerate.
6367
6368 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6369
6370         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6371
6372 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6373
6374         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6375         parameter in call to amd64_target_description.
6376         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6377         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6378         (amd64fbsd_init_abi): Likewise.
6379         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6380         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6381         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6382         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6383
6384 2018-06-29  Pedro Alves  <palves@redhat.com>
6385
6386         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6387         "segments" parameter.
6388         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6389         (_initialize_amd64_tdep): Update call to
6390         amd64_create_target_description.
6391         (amd64_target_description): Add "segments" parameter.  Adjust
6392         the implementation to use it.
6393         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6394         call to amd64_create_target_description.
6395         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6396         * gdb/arch/amd64.h (amd64_create_target_description): Add
6397         "segments" register.
6398         * gdb/arch/amd64.c (amd64_create_target_description): Add
6399         "segments" parameter.  Call create_feature_i386_64bit_segments
6400         only if SEGMENTS is true.
6401         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6402         call to amd64_create_target_description.
6403
6404 2018-06-29  Pedro Alves  <palves@redhat.com>
6405
6406         * thread.c (thread_target_id_str): New, factored out from ...
6407         (print_thread_info_1): ... here.  Use it to compute the max
6408         "Target Id" column width.
6409
6410 2018-06-29  Pedro Alves  <palves@redhat.com>
6411
6412         * remote.c (remote_target::extra_thread_info): Delete
6413         'display_buf' and 'n' locals.  from the cache, regardless of
6414         packet mechanims is in use.  Use cache for qThreadExtra and qP
6415         methods too.
6416
6417 2018-06-29  Pedro Alves  <palves@redhat.com>
6418
6419         * blockframe.c (find_pc_sect_containing_function): New function.
6420         * breakpoint.c (print_breakpoint_location): Don't call
6421         find_pc_sect_function.
6422         * linespec.c (create_sals_line_offset): Record the location's
6423         symbol in the sal.
6424         * linespec.c (convert_address_location_to_sals): Fill in sal's
6425         symbol with find_pc_sect_containing_function.
6426         * symtab.c (find_function_start_sal): Rename to ...
6427         (find_function_start_sal_1): ... this.
6428         (find_function_start_sal): Reimplement as wrapper around
6429         find_function_start_sal_1, and use
6430         find_pc_sect_containing_function to fill in the sal's symbol.
6431         (find_function_start_sal(symbol*, bool)): Adjust.
6432         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6433         comments.
6434         (find_pc_sect_containing_function): Declare.
6435
6436 2018-06-29  Pedro Alves  <palves@redhat.com>
6437
6438         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6439         true if the the location has no symbol.
6440
6441 2018-06-28  Tom Tromey  <tom@tromey.com>
6442
6443         * NEWS: Mention --enable-codesign.
6444         * silent-rules.mk (ECHO_SIGN): New variable.
6445         * configure.ac: Add --enable-codesign.
6446         * configure: Rebuild.
6447         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6448         (gdb$(EXEEXT)): Optionally invoke codesign.
6449
6450 2018-06-28  Pedro Alves  <palves@redhat.com>
6451
6452         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6453         comments.
6454         (switch_to_thread_no_regs): Adjust comment.
6455         * infcmd.c (stop_pc): Delete.
6456         (post_create_inferior, info_program_command): Replace references
6457         to stop_pc with references to thread_info->suspend.stop_pc.
6458         * inferior.h (stop_pc): Delete declaration.
6459         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6460         (handle_inferior_event_1, handle_signal_stop)
6461         (process_event_stop_test, keep_going_stepped_thread)
6462         (handle_step_into_function, handle_step_into_function_backward)
6463         (print_stop_location): Replace references to stop_pc with
6464         references to thread_info->suspend.stop_pc.
6465         (struct infcall_suspend_state) <stop_pc>: Delete field.
6466         (save_infcall_suspend_state, restore_infcall_suspend_state):
6467         Remove references to inf_stat->stop_pc.
6468         * linux-fork.c (fork_load_infrun_state): Likewise.
6469         * record-btrace.c (record_btrace_set_replay): Likewise.
6470         * record-full.c (record_full_goto_entry): Likewise.
6471         * remote.c (print_one_stopped_thread): Likewise.
6472         * target.c (target_resume): Extend comment.
6473         * thread.c (set_executing_thread): New.
6474         (set_executing): Use it.
6475         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6476         Remove references to stop_pc.
6477
6478 2018-06-28  Pedro Alves  <palves@redhat.com>
6479
6480         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6481         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6482
6483 2018-06-28  Tom Tromey  <tom@tromey.com>
6484
6485         * coffread.c (coff_symfile_finish): Update.
6486         * xcoffread.c (xcoff_symfile_finish): Update.
6487         * elfread.c (elf_symfile_finish): Update.
6488         * symfile.h (dwarf2_free_objfile): Don't declare.
6489         * dwarf2read.c (_initialize_dwarf2_read): Use
6490         register_objfile_data_with_cleanup.
6491         (dwarf2_free_objfile): Now static.  Change signature.
6492
6493 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6494
6495         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6496         option "-o" to add-symbol-file-load to add an offset to each
6497         section's load address.
6498         * symfile.c (set_objfile_default_section_offset): New function.
6499
6500 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6501
6502         * symfile.c (add_symbol_file_command): Make sure that sections
6503         with the same name are sorted in the same order.
6504
6505 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6506
6507         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6508         require the second argument.  If omitted, load sections at the
6509         addresses specified in the file.
6510
6511 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6512
6513         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6514         (_initialize_symfile): Add option "-o" to symbol-file to add an
6515         offset to each section of the symbol file.
6516
6517 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6518
6519         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6520
6521 2018-06-27  Tom Tromey  <tom@tromey.com>
6522
6523         * stack.c (_initialize_stack): Update "func" help text.
6524
6525 2018-06-27  Tom Tromey  <tom@tromey.com>
6526
6527         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6528         std::vector.
6529         (unwind_infopy_str, pyuw_create_unwind_info)
6530         (unwind_infopy_add_saved_register, pyuw_sniffer)
6531         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6532         Update.
6533         (struct saved_reg): Add constructor.
6534         <value>: Now a gdbpy_ref<>.
6535
6536 2018-06-27  Tom Tromey  <tom@tromey.com>
6537
6538         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6539
6540 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6541
6542         * gdb-gdb.py.in: Format using autopep8.
6543
6544 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6545
6546         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6547         (type_lookup_function): Recognize CORE_ADDR values.
6548
6549 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6550
6551         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6552         print tag_name.
6553
6554 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6555
6556         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6557         <__lt__>: Add.
6558
6559 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6560
6561         * gdb-gdb.py: Move to...
6562         * gdb-gdb.py.in: ... here.
6563         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6564         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6565         dependencies.
6566         (distclean): Remove gdb-gdb.py when cleaning.
6567         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6568         * configure: Re-generate.
6569
6570 2018-06-27  Pedro Alves  <palves@redhat.com>
6571
6572         * proc-service.c (get_ps_regcache): New.
6573         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6574         (ps_lsetfpregs): Use it.
6575
6576 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6577
6578         PR gdb/21695
6579         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6580         (dwarf_decode_lines_1): Adjust.
6581
6582 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6583
6584         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6585         override.
6586         <info_proc>: Likewise.
6587
6588 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6589
6590         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6591         to windows_fetch_one_register, and only handle the case of
6592         fetching one register.  Move the code that reloads the context
6593         and iterates over all registers if R is negative to...
6594         (windows_nat_target::fetch_registers): ... here.
6595         (do_windows_store_inferior_registers): Rename to
6596         windows_store_one_register, and only handle the case of storing
6597         one register.  Move the code that handles the case where r is
6598         negative to...
6599         (windows_nat_target::store_registers) ... here.
6600
6601 2018-06-26  Tom Tromey  <tom@tromey.com>
6602
6603         PR rust/22574:
6604         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6605         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6606         Update.
6607         (rust_internal_print_type): Add podata parameter.
6608         (rust_print_type): Update.
6609
6610 2018-06-26  Tom Tromey  <tom@tromey.com>
6611
6612         * typeprint.h (struct print_offset_data) <update, finish,
6613         maybe_print_hole>: New methods.
6614         <indentation>: New constant.
6615         * typeprint.c (print_offset_data::indentation): Define.
6616         (print_offset_data::maybe_print_hole, print_offset_data::update)
6617         (print_offset_data::finish): Move from c-typeprint.c and rename.
6618         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6619         (print_spaces_filtered_with_print_options): Update.
6620         (c_print_type_union_field_offset, maybe_print_hole)
6621         (c_print_type_struct_field_offset): Move to typeprint.c and
6622         rename.
6623         (c_type_print_base_struct_union): Update.
6624
6625 2018-06-25  Pedro Alves  <palves@redhat.com>
6626
6627         * gdbthread.h (thread_info_ref, delete_thread)
6628         (delete_thread_silent, first_thread_of_inferior)
6629         (any_thread_of_inferior, switch_to_thread)
6630         (enable_thread_stack_temporaries)
6631         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6632         (get_last_thread_stack_temporary)
6633         (value_in_thread_stack_temporaries, can_access_registers_thread):
6634         Spell out "struct thread_info" instead of just "thread_info".
6635         * inferior.h (notice_new_inferior): Likewise.
6636
6637 2018-06-25  Pedro Alves  <palves@redhat.com>
6638
6639         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6640         pass thread_info pointer to delete_thread.
6641         (windows_nat_target::detach): Pass inferior pointer to
6642         detach_inferior.
6643         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6644         delete_thread.
6645         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6646         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6647         and pass a thread_info pointer to delete_thread.
6648         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6649         pass thread_info pointer to delete_thread.
6650         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6651         delete_thread_silent call.
6652         * procfs.c (procfs_target::detach): Pass inferior pointer to
6653         detach_inferior.
6654         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6655         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6656         delete_thread_silent call.
6657         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6658         pass thread_info pointer to delete_thread.
6659         (windows_nat_target::detach): Pass inferior pointer to
6660         delete_inferior.
6661
6662 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6663
6664         * regcache.c (readable_regcache::read_part): Fix asserts.
6665         (reg_buffer::raw_collect_part): New function.
6666         (regcache::write_part): Fix asserts.
6667         (reg_buffer::raw_supply_part): New function.
6668         (regcache::transfer_regset_register): New helper function.
6669         (regcache::transfer_regset): Call new functions.
6670         (regcache_supply_regset): Use gdb_byte*.
6671         (regcache::supply_regset): Likewise.
6672         (regcache_collect_regset): Likewise.
6673         (regcache::collect_regset): Likewise.
6674         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6675         (reg_buffer::raw_supply_part): Likewise.
6676         (regcache::transfer_regset_register): Likewise.
6677         (regcache::transfer_regset): Use gdb_byte*.
6678
6679 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6680
6681         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6682
6683 2018-06-21  Pedro Alves  <palves@redhat.com>
6684
6685         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6686         instead of a ptid_t.  All callers adjusted.
6687         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6688         adjusted.
6689         (print_ada_task_info, display_current_task_id, task_command_1):
6690         Adjust.
6691         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6692         inferior_thread.
6693         (breakpoint_kind): Adjust.
6694         (remove_breakpoints_pid): Rename to ...
6695         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6696         pointer.  All callers adjusted.
6697         (bpstat_clear_actions): Use inferior_thread.
6698         (get_bpstat_thread): New.
6699         (bpstat_do_actions): Use it.
6700         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6701         to take a thread_info pointer.  All callers adjusted.
6702         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6703         (breakpoint_re_set_thread): Use inferior_thread.
6704         * breakpoint.h (struct inferior): Forward declare.
6705         (bpstat_stop_status): Update.
6706         (remove_breakpoints_pid): Delete.
6707         (remove_breakpoints_inf): New.
6708         * bsd-uthread.c (bsd_uthread_target::wait)
6709         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6710         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6711         (maint_btrace_packet_history_cmd)
6712         (maint_btrace_clear_packet_history_cmd): Adjust.
6713         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6714         inferior_thread.
6715         * cli/cli-interp.c: Include "inferior.h".
6716         * common/refcounted-object.h (struct
6717         refcounted_object_ref_policy): New.
6718         * compile/compile-object-load.c: Include gdbthread.h.
6719         (store_regs): Use inferior_thread.
6720         * corelow.c (core_target::close): Use current_inferior.
6721         (core_target_open): Adjust to use first_thread_of_inferior and use
6722         the current inferior.
6723         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6724         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6725         <thread>: ... this new field.  All references adjusted.
6726         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6727         Take a thread_info pointer instead of a ptid_t.
6728         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6729         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6730         thread_info pointer instead of a ptid_t.
6731         * elfread.c: Include "inferior.h".
6732         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6733         Use inferior_thread.
6734         * eval.c (evaluate_subexp): Likewise.
6735         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6736         inferior_thread.
6737         * gdb_proc_service.h (struct thread_info): Forward declare.
6738         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6739         <thread>: ... this new field.  All references adjusted.
6740         * gdbarch.h, gdbarch.c: Regenerate.
6741         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6742         'thread' parameter.  All implementations and callers adjusted.
6743         * gdbthread.h (thread_info) <set_running>: New method.
6744         (delete_thread, delete_thread_silent): Take a thread_info pointer
6745         instead of a ptid.
6746         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6747         (first_thread_of_process): Delete, replaced by ...
6748         (first_thread_of_inferior): ... this new function.  All callers
6749         adjusted.
6750         (any_live_thread_of_process): Delete, replaced by ...
6751         (any_live_thread_of_inferior): ... this new function.  All callers
6752         adjusted.
6753         (switch_to_thread, switch_to_no_thread): Declare.
6754         (is_executing): Delete.
6755         (enable_thread_stack_temporaries): Update comment.
6756         <enable_thread_stack_temporaries>: Take a thread_info pointer
6757         instead of a ptid_t.  Incref the thread.
6758         <~enable_thread_stack_temporaries>: Decref the thread.
6759         <m_ptid>: Delete
6760         <m_thr>: New.
6761         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6762         (get_last_thread_stack_temporary)
6763         (value_in_thread_stack_temporaries, can_access_registers_thread):
6764         Take a thread_info pointer instead of a ptid_t.  All callers
6765         adjusted.
6766         * infcall.c (get_call_return_value): Use inferior_thread.
6767         (run_inferior_call): Work with thread pointers instead of ptid_t.
6768         (call_function_by_hand_dummy): Work with thread pointers instead
6769         of ptid_t.  Use thread_info_ref.
6770         * infcmd.c (proceed_thread_callback): Access thread's state
6771         directly.
6772         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6773         access thread's state directly.
6774         (continue_command): Use inferior_thread.
6775         (info_program_command): Use find_thread_ptid and access thread
6776         state directly.
6777         (proceed_after_attach_callback): Use thread state directly.
6778         (notice_new_inferior): Take a thread_info pointer instead of a
6779         ptid_t.  All callers adjusted.
6780         (exit_inferior): Take an inferior pointer instead of a pid.  All
6781         callers adjusted.
6782         (exit_inferior_silent): New.
6783         (detach_inferior): Delete.
6784         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6785         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6786         (detach_inferior_command, kill_inferior_command): Use
6787         find_inferior_id instead of valid_gdb_inferior_id and
6788         gdb_inferior_id_to_pid.
6789         (inferior_command): Use inferior and thread pointers.
6790         * inferior.h (struct thread_info): Forward declare.
6791         (notice_new_inferior): Take a thread_info pointer instead of a
6792         ptid_t.  All callers adjusted.
6793         (detach_inferior): Delete declaration.
6794         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6795         instead of a pid.  All callers adjusted.
6796         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6797         (valid_gdb_inferior_id): Delete.
6798         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6799         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6800         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6801         ...
6802         <inf>: ... this new field.
6803         <step_ptid>: Delete, replaced by ...
6804         <step_thread>: ... this new field.
6805         (get_displaced_stepping_state): Take an inferior pointer instead
6806         of a pid.  All callers adjusted.
6807         (displaced_step_in_progress_any_inferior): Adjust.
6808         (displaced_step_in_progress_thread): Take a thread pointer instead
6809         of a ptid_t.  All callers adjusted.
6810         (displaced_step_in_progress, add_displaced_stepping_state): Take
6811         an inferior pointer instead of a pid.  All callers adjusted.
6812         (get_displaced_step_closure_by_addr): Adjust.
6813         (remove_displaced_stepping_state): Take an inferior pointer
6814         instead of a pid.  All callers adjusted.
6815         (displaced_step_prepare_throw, displaced_step_prepare)
6816         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6817         All callers adjusted.
6818         (start_step_over): Adjust.
6819         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6820         displaced step queue.
6821         (do_target_resume): Adjust.
6822         (fetch_inferior_event): Use inferior_thread.
6823         (context_switch, get_inferior_stop_soon): Take an
6824         execution_control_state pointer instead of a ptid_t.  All callers
6825         adjusted.
6826         (switch_to_thread_cleanup): Delete.
6827         (stop_all_threads): Use scoped_restore_current_thread.
6828         * inline-frame.c: Include "gdbthread.h".
6829         (inline_state) <inline_state>: Take a thread pointer instead of a
6830         ptid_t.  All callers adjusted.
6831         <ptid>: Delete, replaced by ...
6832         <thread>: ... this new field.
6833         (find_inline_frame_state): Take a thread pointer instead of a
6834         ptid_t.  All callers adjusted.
6835         (skip_inline_frames, step_into_inline_frame)
6836         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6837         pointer instead of a ptid_t.  All callers adjusted.
6838         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6839         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6840         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6841         pointers directly.
6842         * linux-nat.c (get_detach_signal): Likewise.
6843         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6844         (thread_db_notice_clone): Adjust.
6845         (thread_db_find_new_threads_silently)
6846         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6847         a thread pointer instead of a ptid_t.  All callers adjusted.
6848         * mi/mi-cmd-var.c: Include "inferior.h".
6849         (mi_cmd_var_update_iter): Update to use thread pointers.
6850         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6851         inferior directly.
6852         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6853         out to ...
6854         (mi_output_running): ... this new function.
6855         (mi_on_resume_1): Adjust to use it.
6856         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6857         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6858         directly.
6859         (interrupt_thread_callback): : Adjust to use thread and inferior
6860         pointers.
6861         * proc-service.c: Include "gdbthread.h".
6862         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6863         * progspace-and-thread.c: Include "inferior.h".
6864         * progspace.c: Include "inferior.h".
6865         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6866         hold a reference to an inferior_object.
6867         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6868         inferior_thread.
6869         * python/py-inferior.c (struct inferior_object): Give the type a
6870         tag name instead of a typedef.
6871         (python_on_normal_stop): No need to check if the current thread is
6872         listed.
6873         (inferior_to_inferior_object): Change return type to
6874         inferior_object.  All callers adjusted.
6875         (find_thread_object): Delete, bits factored out to ...
6876         (thread_to_thread_object): ... this new function.
6877         * python/py-infthread.c (create_thread_object): Use
6878         inferior_to_inferior_object.
6879         (thpy_is_stopped): Use thread pointer directly.
6880         (gdbpy_selected_thread): Use inferior_thread.
6881         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6882         field, replaced with ...
6883         <thread>: ... this new field.  All users adjusted.
6884         (btpy_insn_or_gap_new): Drop const.
6885         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6886         callers adjusted.
6887         * python/py-record.c: Include "gdbthread.h".
6888         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6889         a ptid_t.  All callers adjusted.
6890         (gdbpy_current_recording): Use inferior_thread.
6891         * python/py-record.h (recpy_record_object) <ptid>: Delete
6892         field, replaced with ...
6893         <thread>: ... this new field.  All users adjusted.
6894         (recpy_element_object) <ptid>: Delete
6895         field, replaced with ...
6896         <thread>: ... this new field.  All users adjusted.
6897         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6898         a ptid_t.  All callers adjusted.
6899         * python/py-threadevent.c: Include "gdbthread.h".
6900         (get_event_thread): Use thread_to_thread_object.
6901         * python/python-internal.h (struct inferior_object): Forward
6902         declare.
6903         (find_thread_object, find_inferior_object): Delete declarations.
6904         (thread_to_thread_object, inferior_to_inferior_object): New
6905         declarations.
6906         * record-btrace.c: Include "inferior.h".
6907         (require_btrace_thread): Use inferior_thread.
6908         (record_btrace_frame_sniffer)
6909         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6910         (get_thread_current_frame): Use scoped_restore_current_thread and
6911         switch_to_thread.
6912         (get_thread_current_frame): Use thread pointer directly.
6913         (record_btrace_replay_at_breakpoint): Use thread's inferior
6914         pointer directly.
6915         * record-full.c: Include "inferior.h".
6916         * regcache.c: Include "gdbthread.h".
6917         (get_thread_arch_regcache): Use the inferior's address space
6918         directly.
6919         (get_thread_regcache, registers_changed_thread): New.
6920         * regcache.h (get_thread_regcache(thread_info *thread)): New
6921         overload.
6922         (registers_changed_thread): New.
6923         (remote_target) <remote_detach_1>: Swap order of parameters.
6924         (remote_add_thread): <remote_add_thread>: Return the new thread.
6925         (get_remote_thread_info(ptid_t)): New overload.
6926         (remote_target::remote_notice_new_inferior): Use thread pointers
6927         directly.
6928         (remote_target::process_initial_stop_replies): Use
6929         thread_info::set_running.
6930         (remote_target::remote_detach_1, remote_target::detach)
6931         (extended_remote_target::detach): Adjust.
6932         * stack.c (frame_show_address): Use inferior_thread.
6933         * target-debug.h (target_debug_print_thread_info_pp): New.
6934         * target-delegates.c: Regenerate.
6935         * target.c (default_thread_address_space): Delete.
6936         (memory_xfer_partial_1): Use current_inferior.
6937         (target_detach): Use current_inferior.
6938         (target_thread_address_space): Delete.
6939         (generic_mourn_inferior): Use current_inferior.
6940         * target.h (struct target_ops) <thread_address_space>: Delete.
6941         (target_thread_address_space): Delete.
6942         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6943         pointers directly.
6944         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6945         thread pointer instead of a ptid_t.  Adjust all callers.
6946         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6947         (first_thread_of_process): Delete, replaced by ...
6948         (first_thread_of_inferior): ... this new function.  All callers
6949         adjusted.
6950         (any_thread_of_process): Rename to ...
6951         (any_thread_of_inferior): ... this, and take an inferior pointer.
6952         (any_live_thread_of_process): Rename to ...
6953         (any_live_thread_of_inferior): ... this, and take an inferior
6954         pointer.
6955         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6956         (value_in_thread_stack_temporaries)
6957         (get_last_thread_stack_temporary): Take a thread pointer instead
6958         of a ptid_t.  Adjust all callers.
6959         (thread_info::set_running): New.
6960         (validate_registers_access): Use inferior_thread.
6961         (can_access_registers_ptid): Rename to ...
6962         (can_access_registers_thread): ... this, and take a thread
6963         pointer.
6964         (print_thread_info_1): Adjust to compare thread pointers instead
6965         of ptids.
6966         (switch_to_no_thread, switch_to_thread): Make extern.
6967         (scoped_restore_current_thread::~scoped_restore_current_thread):
6968         Use m_thread pointer directly.
6969         (scoped_restore_current_thread::scoped_restore_current_thread):
6970         Use inferior_thread.
6971         (thread_command): Use thread pointer directly.
6972         (thread_num_make_value_helper): Use inferior_thread.
6973         * top.c (execute_command): Use inferior_thread.
6974         * tui/tui-interp.c: Include "inferior.h".
6975         * varobj.c (varobj_create): Use inferior_thread.
6976         (value_of_root_1): Use find_thread_global_id instead of
6977         global_thread_id_to_ptid.
6978
6979 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6980
6981         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6982         possible.
6983         (regcache::write_part): Likewise.
6984         (readable_regcache::cooked_read_part): Update comment.
6985         (readable_regcache::cooked_write_part): Likewise.
6986         * regcache.h: (readable_regcache::read_part): Likewise.
6987         (regcache::write_part): Likewise.
6988
6989 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6990             Dirk Schubert  <dirk.schubert@arm.com>
6991
6992         * aarch64-linux-nat.c (post_attach): New.
6993         (aarch64_linux_nat_target::post_attach): Override post_attach to
6994         record the number of hardware debug registers.
6995
6996 2018-06-20  Tom Tromey  <tom@tromey.com>
6997
6998         * python/py-param.c (add_setshow_generic): Make parameters const.
6999         (parmpy_init): Update.
7000
7001 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7002
7003         * regcache.h (regcache_cooked_read_ftype): Rename to...
7004         (register_read_ftype): ...this, change type to function_view.
7005         (class reg_buffer) <save>: Remove src parameter.
7006         (readonly_detached_regcache) <readonly_detached_regcache>: Make
7007         parameter non-const in first overload.  Remove src parameter in
7008         second overload.
7009         * regcache.c (do_cooked_read): Remove.
7010         (readonly_detached_regcache::readonly_detached_regcache): Make
7011         parameter non-const, adjust call to other constructor.
7012         (reg_buffer::save): Remove src parameter.
7013         * frame.c (do_frame_register_read): Remove.
7014         (frame_save_as_regcache): Use lambda function.
7015         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
7016         parameter to ppu2spu_data *.
7017         (ppu2spu_sniffer): Use lambda function.
7018
7019 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
7020
7021         * record-full.c (record_full_target::insert_breakpoint): Remove
7022         "struct" keyword, add const.
7023
7024 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
7025
7026         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
7027         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
7028         * configure.ac: Remove AC_PREREQ, add missing quoting.
7029         * gnulib/configure.ac: Modernize usage of
7030         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
7031         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
7032         (AUTOMAKE_VERSION): Bump to 1.15.1.
7033         * configure: Re-generate.
7034         * config.in: Re-generate.
7035         * aclocal.m4: Re-generate.
7036         * gnulib/aclocal.m4: Re-generate.
7037         * gnulib/config.in: Re-generate.
7038         * gnulib/configure: Re-generate.
7039         * gnulib/import/Makefile.in: Re-generate.
7040
7041 2018-06-19  Pedro Alves  <palves@redhat.com>
7042
7043         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
7044         (lookup_minimal_symbol_by_pc_section): ... here with
7045         gdb_assert_not_reached added.
7046
7047 2018-06-19  Pedro Alves  <palves@redhat.com>
7048
7049         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
7050         parameter with a block parameter.  Compare location's block symbol
7051         with the frame's block instead of addresses.
7052         (skip_inline_frames): Pass the current block instead of the
7053         frame's address.  Break out as soon as we determine the frame
7054         should not be skipped.
7055
7056 2018-06-18  Tom Tromey  <tom@tromey.com>
7057
7058         * solib-aix.c (solib_aix_get_section_offsets): Return
7059         unique_xmalloc_ptr.
7060         (solib_aix_solib_create_inferior_hook): Update.
7061
7062 2018-06-18  Tom Tromey  <tom@tromey.com>
7063
7064         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
7065
7066 2018-06-18  Tom Tromey  <tom@tromey.com>
7067
7068         * solib-frv.c (frv_relocate_main_executable): Use
7069         unique_xmalloc_ptr.
7070         * solib-dsbt.c (dsbt_relocate_main_executable): Use
7071         unique_xmalloc_ptr.
7072
7073 2018-06-18  Tom Tromey  <tom@tromey.com>
7074
7075         * objfiles.h (inhibit_section_map_updates): Update.
7076         (resume_section_map_updates, resume_section_map_updates_cleanup):
7077         Remove.
7078         * solib-svr4.c (svr4_handle_solib_event): Update.
7079         * objfiles.c (inhibit_section_map_updates): Return
7080         scoped_restore_tmpl<int>.
7081         (resume_section_map_updates, resume_section_map_updates_cleanup):
7082         Remove.
7083
7084 2018-06-18  Tom Tromey  <tom@tromey.com>
7085
7086         * valprint.h (read_string): Update.
7087         * valprint.c (read_string): Change type of "buffer".
7088         (val_print_string): Update.
7089         * python/py-value.c (valpy_string): Update.
7090         * language.h (struct language_defn) <la_get_string>: Change
7091         type of "buffer".
7092         (default_get_string, c_get_string): Update.
7093         * language.c (default_get_string): Change type of "buffer".
7094         * guile/scm-value.c (gdbscm_value_to_string): Update.
7095         * c-lang.c (c_get_string): Change type of "buffer".
7096
7097 2018-06-18  Tom Tromey  <tom@tromey.com>
7098
7099         * ser-mingw.c (struct pipe_state_destroyer): New.
7100         (pipe_state_up): New typedef.
7101         (cleanup_pipe_state): Remove.
7102         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
7103
7104 2018-06-18  Tom Tromey  <tom@tromey.com>
7105
7106         * rust-lang.h (rust_yyerror): Don't declare.
7107         * rust-lang.c (rust_language_defn): Update.
7108         * rust-exp.y (yyerror): Now static.
7109         * parse.c (parse_exp_in_context_1): Update.
7110         * p-lang.h (p_yyerror): Don't declare.
7111         * p-lang.c (p_language_defn): Update.
7112         * p-exp.y (yyerror): Now static.
7113         * opencl-lang.c (opencl_language_defn): Update.
7114         * objc-lang.c (objc_language_defn): Update.
7115         * m2-lang.h (m2_yyerror): Don't declare.
7116         * m2-lang.c (m2_language_defn): Update.
7117         * m2-exp.y (yyerror): Now static.
7118         * language.h (struct language_defn) <la_error>: Remove.
7119         * language.c (unk_lang_error): Remove.
7120         (unknown_language_defn, auto_language_defn): Remove.
7121         * go-lang.h (go_yyerror): Don't declare.
7122         * go-lang.c (go_language_defn): Update.
7123         * go-exp.y (yyerror): Now static.
7124         * f-lang.h (f_yyerror): Don't declare.
7125         * f-lang.c (f_language_defn): Update.
7126         * f-exp.y (yyerror): Now static.
7127         * d-lang.h (d_yyerror): Don't declare.
7128         * d-lang.c (d_language_defn): Update.
7129         * d-exp.y (yyerror): Now static.
7130         * c-lang.h (c_yyerror): Don't declare.
7131         * c-lang.c (c_language_defn, cplus_language_defn)
7132         (asm_language_defn, minimal_language_defn): Update.
7133         * c-exp.y (yyerror): Now static.
7134         * ada-lang.h (ada_yyerror): Don't declare.
7135         * ada-lang.c (ada_language_defn): Update.
7136         * ada-exp.y (yyerror): Now static.
7137
7138 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7139
7140         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
7141         (store_sveregs_to_thread): Likewise.
7142         (aarch64_linux_fetch_inferior_registers): Check for SVE.
7143         (aarch64_linux_store_inferior_registers): Likewise.
7144         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
7145         function.
7146         (aarch64_sve_regs_copy_to_regcache): Likewise.
7147         (aarch64_sve_regs_copy_from_regcache): Likewise.
7148         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
7149         declaration.
7150         (aarch64_sve_regs_copy_to_regcache): Likewise.
7151         (aarch64_sve_regs_copy_from_regcache): Likewise.
7152         (sve_context): Structure from Linux headers.
7153         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
7154         (SVE_SIG_ZREG_SIZE): Likewise.
7155         (SVE_SIG_PREG_SIZE): Likewise.
7156         (SVE_SIG_FFR_SIZE): Likewise.
7157         (SVE_SIG_REGS_OFFSET): Likewise.
7158         (SVE_SIG_ZREGS_OFFSET): Likewise.
7159         (SVE_SIG_ZREG_OFFSET): Likewise.
7160         (SVE_SIG_ZREGS_SIZE): Likewise.
7161         (SVE_SIG_PREGS_OFFSET): Likewise.
7162         (SVE_SIG_PREG_OFFSET): Likewise.
7163         (SVE_SIG_PREGS_SIZE): Likewise.
7164         (SVE_SIG_FFR_OFFSET): Likewise.
7165         (SVE_SIG_REGS_SIZE): Likewise.
7166         (SVE_SIG_CONTEXT_SIZE): Likewise.
7167         (SVE_PT_REGS_MASK): Likewise.
7168         (SVE_PT_REGS_FPSIMD): Likewise.
7169         (SVE_PT_REGS_SVE): Likewise.
7170         (SVE_PT_VL_INHERIT): Likewise.
7171         (SVE_PT_VL_ONEXEC): Likewise.
7172         (SVE_PT_REGS_OFFSET): Likewise.
7173         (SVE_PT_FPSIMD_OFFSET): Likewise.
7174         (SVE_PT_FPSIMD_SIZE): Likewise.
7175         (SVE_PT_SVE_ZREG_SIZE): Likewise.
7176         (SVE_PT_SVE_PREG_SIZE): Likewise.
7177         (SVE_PT_SVE_FFR_SIZE): Likewise.
7178         (SVE_PT_SVE_FPSR_SIZE): Likewise.
7179         (SVE_PT_SVE_FPCR_SIZE): Likewise.
7180         (__SVE_SIG_TO_PT): Likewise.
7181         (SVE_PT_SVE_OFFSET): Likewise.
7182         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
7183         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
7184         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
7185         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
7186         (SVE_PT_SVE_PREG_OFFSET): Likewise.
7187         (SVE_PT_SVE_PREGS_SIZE): Likewise.
7188         (SVE_PT_SVE_FFR_OFFSET): Likewise.
7189         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
7190         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
7191         (SVE_PT_SVE_SIZE): Likewise.
7192         (SVE_PT_SIZE): Likewise.
7193         (HAS_SVE_STATE): New define.
7194
7195 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
7196
7197         * nat/aarch64-sve-linux-sigcontext.h: New file.
7198         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
7199         new files.
7200         (SVE_VQ_MIN): Likewise.
7201         (SVE_VQ_MAX): Likewise.
7202         (SVE_VL_MIN): Likewise.
7203         (SVE_VL_MAX): Likewise.
7204         (SVE_NUM_ZREGS): Likewise.
7205         (SVE_NUM_PREGS): Likewise.
7206         (sve_vl_valid): Likewise.
7207         (struct user_sve_header): Likewise.
7208
7209 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
7210             Richard Bunt <Richard.Bunt@arm.com>
7211
7212         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
7213         was requested by GDB.
7214
7215 2018-06-15  Tom de Vries  <tdevries@suse.de>
7216
7217         * MAINTAINERS (Write After Approval): Add Tom de Vries.
7218
7219 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
7220
7221         * gnulib/update-gnulib.sh: Print expected versions of
7222         autoconf/aclocal.
7223
7224 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
7225
7226         * arch-utils.c (default_type_align): Use type_length_units.
7227         * gdbtypes.c (type_align): Use type_length_units.
7228
7229 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7230
7231         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
7232         of 'define' command.
7233
7234 2018-06-14  Tom de Vries  <tdevries@suse.de>
7235
7236         PR cli/22573
7237         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7238         get_no_prettyformat_print_options.
7239
7240 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7241
7242         * sparc-nat.h: Include target.h.
7243         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7244         <fetch_registers>: Remove this argument in function call.
7245         <store_registers>: Remove this argument in function call, remove
7246         extra semicolon.
7247         <low_forget_process>: Call sparc64_forget_process instead of
7248         sparc_forget_process.
7249
7250 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7251
7252         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7253         (procfs_target::make_corefile_notes): Adjust to new
7254         target_read_alloc return type.
7255
7256 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7257             Stephen Roberts  <stephen.roberts@arm.com>
7258
7259         PR gdb/22882
7260         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7261         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7262         Move should_notify_stop local into more inner scope.
7263
7264 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7265             Stephen Roberts  <stephen.roberts@arm.com>
7266
7267         PR gdb/22882
7268         * infrun.c (resume_1): Add call to mark_async_event_handler.
7269
7270 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7271
7272         * infrun.c (do_target_wait): Change old version of $pc printed.
7273
7274 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7275
7276         * dwarf2read.c (read_index_from_section): Rename to...
7277         (read_gdb_index_from_section): ... this, update all callers.
7278         (dwarf2_read_index): Rename to...
7279         (dwarf2_read_gdb_index): ... this, update all callers.
7280
7281 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7282
7283         * gdb/hppa-linux-nat.c
7284         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7285         hppa_linux_nat_target::fetch_registers.
7286
7287 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7288
7289         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7290         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7291         (AARCH64_DWARF_SVE_FFR): Likewise.
7292         (AARCH64_DWARF_SVE_P0): Likewise.
7293         (AARCH64_DWARF_SVE_Z0): Likewise.
7294
7295 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7296
7297         * common/common-regcache.h (raw_compare): New function.
7298         * regcache.c (regcache::raw_compare): Likewise.
7299         * regcache.h (regcache::raw_compare): New declaration.
7300
7301 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7302
7303         * common/common-regcache.h (reg_buffer_common): New structure.
7304         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7305         (reg_buffer::raw_supply): Likewise.
7306         (reg_buffer::raw_supply_integer): Likewise.
7307         (reg_buffer::raw_supply_zeroed): Likewise.
7308         (reg_buffer::raw_collect): Likewise.
7309         (reg_buffer::raw_collect_integer): Likewise.
7310         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7311         (reg_buffer::raw_supply): Likewise.
7312         (reg_buffer::raw_supply_integer): Likewise.
7313         (reg_buffer::raw_supply_zeroed): Likewise.
7314         (reg_buffer::raw_collect): Likewise.
7315         (reg_buffer::raw_collect_integer): Likewise.
7316
7317 2018-06-10  Tom Tromey  <tom@tromey.com>
7318
7319         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7320         (class remote_state) <stop_reply_queue>: Now std::vector.
7321         (remote_state::~remote_state)
7322         (remote_target::stop_reply_queue_length): Update.
7323         (struct queue_iter_param, remove_child_of_pending_fork)
7324         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7325         (check_pending_event_prevents_wildcard_vcont_callback)
7326         (remove_stop_reply_for_inferior)
7327         (remove_stop_reply_of_remote_state)
7328         (remote_notif_remove_once_on_match)
7329         (stop_reply_match_ptid_and_ws)
7330         (remote_kill_child_of_pending_fork): Remove.
7331         (remote_target::remove_new_fork_children)
7332         (remote_target::check_pending_events_prevent_wildcard_vcont)
7333         (remote_target::discard_pending_stop_replies)
7334         (remote_target::discard_pending_stop_replies_in_queue)
7335         (remote_target::remote_notif_remove_queued_reply)
7336         (remote_target::queued_stop_reply)
7337         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7338         (remote_target::wait, remote_target::kill_new_fork_children)
7339         (remote_target::async): Update.
7340
7341 2018-06-10  Tom Tromey  <tom@tromey.com>
7342
7343         * record-full.c (record_full_arch_list_cleanups): Remove.
7344         (record_full_message): Use try/catch.
7345         (record_full_wait_cleanups): Remove.
7346         (record_full_wait_1): Use try/catch.
7347         (record_full_restore): Likewise.
7348
7349 2018-06-10  Tom Tromey  <tom@tromey.com>
7350
7351         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7352         declare VEC.  Add constructor.
7353         <in_target_beneath>: Now bool.
7354         (record_full_breakpoints): Now a std::vector, static.
7355         (record_full_sync_record_breakpoints)
7356         (record_full_init_record_breakpoints)
7357         (record_full_target::insert_breakpoint)
7358         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7359
7360 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7361
7362         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7363         * serial.c (serial_interface_lookup): Remove struct keyword.
7364
7365 2018-06-10  Tom Tromey  <tom@tromey.com>
7366
7367         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7368         method.
7369         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7370         a method.
7371         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7372         method.
7373         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7374         "beneath" as a method.
7375         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7376         Use "beneath" as a method.
7377
7378 2018-06-10  Tom Tromey  <tom@tromey.com>
7379
7380         * tracefile.c (struct trace_file_writer_deleter): New.
7381         <operator()>: Rename from trace_file_writer_xfree.
7382         (trace_file_writer_up): New typedef.
7383         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7384
7385 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7386
7387         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7388         <m_registers, m_register_status>: Change type to
7389         std::unique_ptr.
7390         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7391         XCNEWVEC.
7392
7393 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7394
7395         * common/common-regcache.h (enum register_status): Add
7396         underlying type "signed char".
7397         * regcache.h (reg_buffer) <m_register_status>: Change type to
7398         register_status *.
7399         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7400         register_status instead of signed char.
7401         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7402         (reg_buffer::get_register_status): Remove cast.
7403         (readable_regcache::raw_read): Remove cast.
7404         (readable_regcache::cooked_read): Remove cast.
7405
7406 2018-06-09  Tom Tromey  <tom@tromey.com>
7407
7408         * source.c (reverse_search_command, forward_search_command): Use
7409         scoped_fd.
7410
7411 2018-06-09  Tom Tromey  <tom@tromey.com>
7412
7413         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7414         (serial_ops_list): Now static, std::vector.
7415         (serial_interface_lookup, serial_add_interface): Update.
7416
7417 2018-06-09  Tom Tromey  <tom@tromey.com>
7418
7419         * dwarf2read.c (process_cu_includes): Update.
7420         (process_full_comp_unit): Update.
7421         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7422         std::vector.
7423
7424 2018-06-08  Paul Koning  <paul_koning@dell.com>
7425
7426         PR gdb/23252
7427
7428         * python/python.c (do_start_initialization):
7429         Avoid call to internal Python API.
7430         (init__gdb_module): New function.
7431
7432 2018-06-08  Gary Benson <gbenson@redhat.com>
7433
7434         * linux-thread-db.c (valprint.h): New include.
7435         (struct check_thread_db_info): New structure.
7436         (check_thread_db_on_load, tdb_testinfo): New static globals.
7437         (check_thread_db, check_thread_db_callback): New functions.
7438         (try_thread_db_load_1): Run integrity checks if requested.
7439         (maintenance_check_libthread_db): New function.
7440         (_initialize_thread_db): Register "maint check libthread-db"
7441         and "maint set/show check-libthread-db".
7442         * NEWS: Mention the above new commands.
7443
7444 2018-06-08  Tom Tromey  <tom@tromey.com>
7445
7446         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7447         now a method.
7448
7449 2018-06-08  Tom Tromey  <tom@tromey.com>
7450
7451         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7452
7453 2018-06-08  Tom Tromey  <tom@tromey.com>
7454
7455         * common/btrace-common.h (struct btrace_data): Add constructor,
7456         destructor, move assignment operator.
7457         <empty, clear, fini>: New methods.
7458         <format>: Initialize.
7459         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7460         (btrace_data_empty): Don't declare.
7461         * common/btrace-common.c (btrace_data_init): Remove.
7462         (btrace_data::fini): Rename from btrace_data_fini.
7463         (btrace_data::empty): Rename from btrace_data_empty.
7464         (btrace_data::clear): Rename from btrace_data_clear.  Return
7465         bool.
7466         * btrace.h (make_cleanup_btrace_data): Don't declare.
7467         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7468         (parse_xml_btrace): Update.
7469         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7470         (maint_btrace_clear_packet_history_cmd): Update.
7471
7472 2018-06-07  Pedro Alves  <palves@redhat.com>
7473
7474         * target.h (target_ops) <beneath>: Now a method.  All references
7475         updated.
7476         (class target_stack): New.
7477         * target.c (g_target_stack): New.
7478         (g_current_top_target): Delete.
7479         (current_top_target): Get the top target out of g_target_stack.
7480         (target_stack::push, target_stack::unpush): New.
7481         (push_target, unpush_target): Reimplement.
7482         (target_is_pushed): Reimplement in terms of g_target_stack.
7483         (target_ops::beneath, target_stack::find_beneath): New.
7484
7485 2018-06-07  Pedro Alves  <palves@redhat.com>
7486
7487         * target.h (find_target_beneath): Delete declaration.
7488         * target.c (find_target_beneath): Delete definition.
7489         * aix-thread.c: All callers of find_target_beneath adjusted to
7490         call target_ops::beneath instead.
7491         * bsd-uthread.c: Likewise.
7492         * linux-thread-db.c: Likewise.
7493         * ravenscar-thread.c: Likewise.
7494         * sol-thread.c: Likewise.
7495         * spu-multiarch.c: Likewise.
7496
7497 2018-06-07  Pedro Alves  <palves@redhat.com>
7498
7499         * target.h (target_ops) <beneath>: Now a method.  All references
7500         updated.
7501         (target_ops) <m_beneath>: New.
7502         * target.c (target_ops::beneath): New.
7503         * corelow.c: Adjust all references to target_ops::beneath.
7504         * linux-thread-db.c: Likewise.
7505         * make-target-delegates: Likewise.
7506         * record-btrace.c: Likewise.
7507         * record-full.c: Likewise.
7508         * remote.c: Likewise.
7509         * target.c: Likewise.
7510         * target-delegates.c: Regenerate.
7511
7512 2018-06-07  Pedro Alves  <palves@redhat.com>
7513
7514         * target.h (target_stack): Delete.
7515         (current_top_target): Declare function.
7516         * target.c (target_stack): Delete.
7517         (g_current_top_target): New.
7518         (current_top_target): New function.
7519         * auxv.c: Use current_top_target instead of target_stack
7520         throughout.
7521         * avr-tdep.c: Likewise.
7522         * breakpoint.c: Likewise.
7523         * corefile.c: Likewise.
7524         * elfread.c: Likewise.
7525         * eval.c: Likewise.
7526         * exceptions.c: Likewise.
7527         * frame.c: Likewise.
7528         * gdbarch-selftests.c: Likewise.
7529         * gnu-v3-abi.c: Likewise.
7530         * ia64-tdep.c: Likewise.
7531         * ia64-vms-tdep.c: Likewise.
7532         * infcall.c: Likewise.
7533         * infcmd.c: Likewise.
7534         * infrun.c: Likewise.
7535         * linespec.c: Likewise.
7536         * linux-tdep.c: Likewise.
7537         * minsyms.c: Likewise.
7538         * ppc-linux-nat.c: Likewise.
7539         * ppc-linux-tdep.c: Likewise.
7540         * procfs.c: Likewise.
7541         * regcache.c: Likewise.
7542         * remote.c: Likewise.
7543         * rs6000-tdep.c: Likewise.
7544         * s390-linux-nat.c: Likewise.
7545         * s390-tdep.c: Likewise.
7546         * solib-aix.c: Likewise.
7547         * solib-darwin.c: Likewise.
7548         * solib-dsbt.c: Likewise.
7549         * solib-spu.c: Likewise.
7550         * solib-svr4.c: Likewise.
7551         * solib-target.c: Likewise.
7552         * sparc-tdep.c: Likewise.
7553         * sparc64-tdep.c: Likewise.
7554         * spu-tdep.c: Likewise.
7555         * symfile.c: Likewise.
7556         * symtab.c: Likewise.
7557         * target-descriptions.c: Likewise.
7558         * target-memory.c: Likewise.
7559         * target.c: Likewise.
7560         * target.h: Likewise.
7561         * tracefile-tfile.c: Likewise.
7562         * tracepoint.c: Likewise.
7563         * valops.c: Likewise.
7564         * valprint.c: Likewise.
7565         * value.c: Likewise.
7566         * windows-tdep.c: Likewise.
7567         * mi/mi-main.c: Likewise.
7568
7569 2018-06-07  Tom Tromey  <tom@tromey.com>
7570
7571         * valprint.h (build_address_symbolic): Declare.
7572         * printcmd.c (print_address_symbolic): Update.
7573         (build_address_symbolic): Change "name" and "filename" to
7574         std::string.
7575         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7576         Update.
7577         * defs.h (build_address_symbolic): Remove declaration.
7578
7579 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7580
7581         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7582         (aarch64_vnv_type): Add function.
7583         (aarch64_pseudo_register_name): Add V regs for SVE.
7584         (aarch64_pseudo_register_type): Likewise.
7585         (aarch64_pseudo_register_reggroup_p): Likewise.
7586         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7587         (aarch64_pseudo_read_value): Add V regs for SVE.
7588         (aarch64_pseudo_write_2): Use V0 offset for SVE
7589         (aarch64_pseudo_write): Add V regs for SVE.
7590         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7591
7592 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7593
7594         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7595         (sve_vl_from_vq): Likewise.
7596
7597 2018-06-05  Tom Tromey  <tom@tromey.com>
7598
7599         * cli/cli-cmds.c (show_version): Update.
7600         * top.c (print_gdb_version): Add "interactive" parameter.
7601         Update.
7602         * main.c (captured_main_1): Update.
7603         * top.h (print_gdb_version): Add "interactive" parameter and a
7604         comment.
7605
7606 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7607
7608         * common/enum-flags.h: Add trailing semicolon to example in
7609         comment.
7610
7611 2018-06-05  Tom Tromey  <tom@tromey.com>
7612
7613         PR cli/12326:
7614         * NEWS: Add entry about pager.
7615         * utils.c (pagination_disabled_for_command): New global.
7616         (prompt_for_continue): Allow "c" response to prompt.
7617         (reinitialize_more_filter): Clear
7618         pagination_disabled_for_command.
7619         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7620
7621 2018-06-04  Tom Tromey  <tom@tromey.com>
7622
7623         * ada-lang.h (ada_lookup_symbol_list): Update.
7624         * ada-lang.c (resolve_subexp): Update.
7625         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7626         parameter.
7627         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7628         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7629         results parameter to std::vector.
7630         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7631         Update.
7632         * ada-exp.y (block_lookup): Update.
7633         (select_possible_type_sym): Change type of syms.  Remove nsyms
7634         parameter.
7635         (write_var_or_type, write_name_assoc): Update.
7636
7637 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7638
7639         * windows-nat.c (windows_nat_target::xfer_partial): Return
7640         TARGET_XFER_E_IO if we need to delegate to the target beneath
7641         but BENEATH is NULL.
7642
7643 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7644
7645         * Makefile.in (config.status): Add configure.nat as a
7646         dependency.
7647
7648 2018-06-04  Tom Tromey  <tom@tromey.com>
7649
7650         * cp-name-parser.y (cpname_state): Add method declarations.
7651         (HANDLE_QUAL): Update.
7652         (cpname_state::d_grab, cpname_state::fill_comp)
7653         (cpname_state::make_operator, cpname_state::make_dtor)
7654         (cpname_state::make_builtin_type, cpname_state::make_name)
7655         (cpname_state::d_qualify, cpname_state::d_int_type)
7656         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7657         (%union): Move earlier.
7658
7659 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7660
7661         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7662
7663 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7664
7665         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7666         (aarch64_pseudo_write_1): Likewise.
7667         (aarch64_pseudo_read_value): Use helper.
7668         (aarch64_pseudo_write): Likewise.
7669
7670 2018-06-04  Pedro Alves  <palves@redhat.com>
7671
7672         * darwin-nat.c (darwin_ops): Delete.
7673         (darwin_attach_pid): Use get_native_target.
7674
7675 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7676
7677         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7678         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7679
7680 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7681
7682         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7683         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7684         (aarch64_gdbarch_init): Check for SVE.
7685         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7686
7687 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7688
7689         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7690         * aarch64-tdep.h (aarch64_read_description): Likewise.
7691         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7692         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7693         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7694         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7695         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7696
7697 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7698
7699         * value.c (value_fetch_lazy_bitfield): New.
7700         (value_fetch_lazy_memory): New.
7701         (value_fetch_lazy_register): New.
7702         (value_fetch_lazy): Factor out to smaller functions.
7703
7704 2018-06-01  Tom Tromey  <tom@tromey.com>
7705
7706         * cp-name-parser.y (backslashable, represented): Now const.
7707
7708 2018-06-01  Tom Tromey  <tom@tromey.com>
7709
7710         * cp-name-parser.y: Include parser-defs.h.
7711         (parser_fprintf): Remove declaration.
7712
7713 2018-06-01  Tom Tromey  <tom@tromey.com>
7714
7715         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7716         %parse-param.
7717         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7718         (global_result): Remove globals.
7719         (struct cpname_state): New.
7720         (yyparse): Don't declare.
7721         (yylex, yyerror): Move declarations after %union.
7722         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7723         (make_name): Add state parameter.
7724         Update all callers.
7725         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7726         parameter.
7727         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7728         Update.
7729         (yylex): Add lvalp, state parameters.
7730         (yyerror): Add state parameter.
7731         (cp_demangled_name_to_comp): Update.
7732
7733 2018-06-01  Tom Tromey  <tom@tromey.com>
7734
7735         * cp-name-parser.y (parser_fprintf): Declare.
7736         (GDB_YY_REMAP_PREFIX): Define.
7737         Include yy-remap.h.  Don't redefine yy* identifiers.
7738
7739 2018-06-01  Tom Tromey  <tom@tromey.com>
7740
7741         * python/py-type.c (typy_legacy_template_argument): Update.
7742         * cp-support.h (cp_demangled_name_to_comp): Update.
7743         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7744         parameter to be a "std::string *".
7745         (main): Update.
7746
7747 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7748
7749         * ada-lex.l: Include "diagnostics.h" instead of
7750         "common/diagnostics.h".
7751         * unittests/environ-selftests.c: Likewise.
7752         * common/diagnostics.h: Moved to ../include.
7753
7754 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7755
7756         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7757         to language_mode_manual while calling breakpoint_re_set_one.
7758
7759 2018-06-01  Tom Tromey  <tom@tromey.com>
7760
7761         * valops.c (value_cast_structs, destructor_name_p): Update.
7762         * symtab.c (gdb_mangle_name): Update.
7763         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7764         Update.
7765         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7766         (pascal_object_print_value_fields, pascal_object_print_value):
7767         Update.
7768         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7769         * linespec.c (find_methods): Update.
7770         * gdbtypes.h (type_name_no_tag): Remove.
7771         (type_name_or_error): Rename from type_name_no_tag_or_error.
7772         * gdbtypes.c (type_name_no_tag): Remove.
7773         (type_name_or_error): Rename from type_name_no_tag_or_error.
7774         (lookup_struct_elt_type, check_typedef): Update.
7775         * expprint.c (print_subexp_standard): Update.
7776         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7777         * d-namespace.c (d_lookup_nested_symbol): Update.
7778         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7779         (cp_print_class_member): Update.
7780         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7781         * completer.c (add_struct_fields): Update.
7782         * c-typeprint.c (cp_type_print_derivation_info)
7783         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7784         Update.
7785         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7786         (ada_prefer_type, ada_is_exception_sym): Update.
7787
7788 2018-06-01  Tom Tromey  <tom@tromey.com>
7789
7790         * valops.c (enum_constant_from_type, value_namespace_elt)
7791         (value_maybe_namespace_elt): Update.
7792         * valarith.c (find_size_for_pointer_math): Update.
7793         * target-descriptions.c (make_gdb_type): Update.
7794         * symmisc.c (print_symbol): Update.
7795         * stabsread.c (define_symbol, read_type)
7796         (complain_about_struct_wipeout, add_undefined_type)
7797         (cleanup_undefined_types_1): Update.
7798         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7799         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7800         (rust_internal_print_type, rust_composite_type)
7801         (rust_evaluate_funcall, rust_evaluate_subexp)
7802         (rust_inclusive_range_type_p): Update.
7803         * python/py-type.c (typy_get_tag): Update.
7804         * p-typeprint.c (pascal_type_print_base): Update.
7805         * mdebugread.c (parse_symbol, parse_type): Update.
7806         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7807         Update.
7808         * guile/scm-type.c (gdbscm_type_tag): Update.
7809         * go-lang.c (sixg_string_p): Update.
7810         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7811         Update.
7812         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7813         (TYPE_TAG_NAME): Remove.
7814         * gdbtypes.c (type_name_no_tag): Simplify.
7815         (check_typedef, check_types_equal, recursive_dump_type)
7816         (copy_type_recursive, arch_composite_type): Update.
7817         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7818         in summary mode when needed.
7819         * eval.c (evaluate_funcall): Update.
7820         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7821         (process_structure_scope, read_enumeration_type)
7822         (read_namespace_type, read_module_type, determine_prefix): Update.
7823         * cp-support.c (inspect_type): Update.
7824         * coffread.c (process_coff_symbol, decode_base_type): Update.
7825         * c-varobj.c (c_is_path_expr_parent): Update.
7826         * c-typeprint.c (c_type_print_base_struct_union): Update.
7827         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7828         summary when using C language.
7829         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7830         (gen_maybe_namespace_elt): Update.
7831         * ada-lang.c (ada_type_name): Simplify.
7832         (empty_record, ada_template_to_fixed_record_type_1)
7833         (template_to_static_fixed_type)
7834         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7835
7836 2018-06-01  Tom Tromey  <tom@tromey.com>
7837
7838         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7839         c_print_type.
7840         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7841         (c_print_type): Update.
7842         (c_print_type): New overload.
7843         (c_type_print_varspec_prefix, c_type_print_args)
7844         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7845         (c_type_print_base_struct_union, c_type_print_base_1)
7846         (cp_type_print_method_args): Add "language" parameter.
7847         (c_type_print_base): Update.
7848         * c-lang.h (c_print_type): Add new overload.
7849
7850 2018-06-01  Tom Tromey  <tom@tromey.com>
7851
7852         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7853         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7854
7855 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7856
7857         * aarch64-tdep.c (aarch64_sve_register_names): New const
7858         var.
7859         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7860         (AARCH64_SVE_Z_REGS_NUM): New define.
7861         (AARCH64_SVE_P_REGS_NUM): Likewise.
7862         (AARCH64_SVE_NUM_REGS): Likewise.
7863
7864 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7865
7866         * nat/linux-ptrace.h [__alpha__]
7867         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7868         definitions.
7869
7870 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7871
7872         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7873         the endianness selected.
7874         * NEWS: Document `set endian auto' mode operation update.
7875
7876 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7877
7878         * Makefile.in: Add new header.
7879         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7880         (sve_vl_from_vg): Likewise.
7881         (sve_vq_from_vl): Likewise.
7882         (sve_vl_from_vq): Likewise.
7883         (sve_vq_from_vg): Likewise.
7884         (sve_vg_from_vq): Likewise.
7885         * configure.nat: Add new c file.
7886         * nat/aarch64-sve-linux-ptrace.c: New file.
7887         * nat/aarch64-sve-linux-ptrace.h: New file.
7888
7889 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7890
7891         * aarch64-linux-nat.c (aarch64_linux_read_description):
7892         Add parmeter zero.
7893         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7894         Likewise.
7895         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7896         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7897         (aarch64_gdbarch_init): Add parmeter zero.
7898         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7899         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7900         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7901         parmeter.
7902         * doc/gdb.texinfo: Describe SVE feature
7903         * features/aarch64-sve.c: New file.
7904
7905 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7906
7907         PR gdb/23210
7908         * gdbarch.sh (significant_addr_bit): Default to zero when
7909         not set by target architecture.
7910         * gdbarch.c: Re-generated.
7911         * utils.c (address_significant): Update.
7912
7913 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7914
7915         * stack.c (func_command): Remove trailing newline in call to error.
7916
7917 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7918
7919         * regcache.h (regcache_raw_collect): Remove, update callers to
7920         use regcache::raw_collect.
7921         * regcache.c (regcache_raw_collect): Remove.
7922
7923 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7924
7925         * regcache.h (regcache_raw_supply): Remove, update callers to
7926         use detached_regcache::raw_supply.
7927         * regcache.c (regcache_raw_supply): Remove.
7928
7929 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7930
7931         * regcache.h (regcache_cooked_write_part): Remove, update
7932         callers to use regcache::cooked_write_part.
7933         * regcache.c (regcache_cooked_write_part): Remove.
7934
7935 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7936
7937         * regcache.h (regcache_cooked_read_part): Remove, update callers
7938         to use readable_regcache::cooked_read_part.
7939         * regcache.c (regcache_cooked_read_part): Remove.
7940
7941 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7942
7943         * regcache.h (regcache_cooked_read_value): Remove, update
7944         callers to use readable_regcache::cooked_read_value.
7945         * regcache.c (regcache_cooked_read_value): Remove.
7946
7947 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7948
7949         * regcache.h (regcache_cooked_write): Remove, update callers to
7950         use regcache::cooked_write.
7951         * regcache.c (regcache_cooked_write): Remove.
7952
7953 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7954
7955         * regcache.h (regcache_invalidate): Remove, update callers to
7956         use detached_regcache::invalidate instead.
7957         * regcache.c (regcache_invalidate): Remove.
7958
7959 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7960
7961         * regcache.h (regcache_raw_write_part): Remove, update callers
7962         to use regcache::raw_write_part instead.
7963         * regcache.c (regcache_raw_write_part): Remove.
7964
7965 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7966
7967         * regcache.h (regcache_raw_read_part): Remove, update callers to
7968         use readable_regcache::raw_read_part instead.
7969         * regcache.c (regcache_raw_read_part): Remove.
7970
7971 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7972
7973         * regcache.h (regcache_cooked_read): Remove, update callers to
7974         use readable_regcache::cooked_read instead.
7975         * regcache.c (regcache_cooked_read): Remove.
7976
7977 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7978
7979         * regcache.h (regcache_raw_write): Remove, update callers to use
7980         regcache::raw_write instead.
7981         * regcache.c (regcache_raw_write): Remove.
7982
7983 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7984
7985         * regcache.h (regcache_raw_read): Remove, update callers to use
7986         readable_regcache::raw_read instead.
7987         * regcache.c (regcache_raw_read): Remove.
7988
7989 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7990
7991         * regcache.h (regcache_raw_update): Remove, update callers to
7992         use readable_regcache::raw_update instead.
7993         * regcache.c (regcache_raw_update): Remove.
7994
7995 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7996
7997         * regcache.h (regcache_register_status): Remove, update callers
7998         to use reg_buffer::get_register_status directly instead.
7999         * regcache.c (regcache_register_status): Remove.
8000
8001 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8002
8003         * regcache.h (regcache_get_ptid): Remove, update all callers to
8004         call regcache::ptid instead.
8005         * regcache.c (regcache_get_ptid): Remove.
8006
8007 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8008
8009         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
8010
8011 2018-05-30  Pedro Alves  <palves@redhat.com>
8012
8013         * common/common-exceptions.h (exception_rethrow): Use
8014         ATTRIBUTE_NORETURN.
8015
8016 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
8017
8018         * breakpoint.c (print_solib_event, check_status_catch_solib):
8019         Remove struct keyword in range-based for loops.
8020         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
8021         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
8022         Likewise.
8023         * linespec.c (find_superclass_methods, search_minsyms_for_name):
8024         Likewise.
8025         * symfile.c (addr_info_make_relative): Likewise.
8026         * thread.c (value_in_thread_stack_temporaries): Likewise.
8027
8028 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
8029
8030         PR gdb/16841
8031         * valops.c (value_struct_elt_for_reference): Call check_typedef on
8032         aggregate type to get its real type before accessing it.
8033
8034 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
8035
8036         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
8037         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
8038         * coff-pe-read.c (add_pe_forwarded_sym): Replace
8039         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
8040         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
8041         * jit.c (jit_breakpoint_re_set_internal): Likewise.
8042         * printcmd.c (info_address_command): Likewise.
8043
8044 2018-05-29  Tom Tromey  <tom@tromey.com>
8045
8046         * windows-nat.c (handle_exception): Update fall-through comment.
8047
8048 2018-05-29  Tom Tromey  <tom@tromey.com>
8049
8050         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
8051         (struct program_space) <added_solibs>: Now a std::vector.
8052         * breakpoint.c (print_solib_event): Update.
8053         (check_status_catch_solib): Update.
8054         * progspace.c (clear_program_space_solib_cache): Update.
8055         * solib.c (update_solib_list): Update.
8056
8057 2018-05-29  Tom Tromey  <tom@tromey.com>
8058
8059         * python/py-type.c (typy_richcompare): Update.
8060         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
8061         * gdbtypes.h (types_deeply_equal): Return bool.
8062         (types_equal): Likewise.
8063         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
8064         declare VEC.
8065         (check_types_equal): Change worklist to std::vector.  Return
8066         bool.
8067         (struct type_equality_entry): Add constructor.
8068         (compare_maybe_null_strings): Return bool.
8069         (check_types_worklist): Return bool.  Change worklist to
8070         std::vector.
8071         (types_deeply_equal): Use std::vector.
8072         (types_equal): Return bool.
8073         (compare_maybe_null_strings): Simplify.
8074
8075 2018-05-29  Tom Tromey  <tom@tromey.com>
8076
8077         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
8078
8079 2018-05-29  Tom Tromey  <tom@tromey.com>
8080
8081         * objc-lang.h: Don't include cp-support.h.
8082         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
8083         declare VEC.
8084
8085 2018-05-27  Tom Tromey  <tom@tromey.com>
8086
8087         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
8088
8089 2018-05-25  Tom Tromey  <tom@tromey.com>
8090
8091         * value.c (value::location): Initialize.
8092
8093 2018-05-25  Tom Tromey  <tom@tromey.com>
8094
8095         * dbxread.c (init_bincl_list): Remove.
8096         (bincl_list): Now a std::vector.
8097         (bincls_allocated, next_bincl): Remove.
8098         (free_bincl_list, do_free_bincl_list_cleanup)
8099         (make_cleanup_free_bincl_list): Remove.
8100         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
8101         unique_xmalloc_ptr.
8102         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
8103         (struct header_file_location): Add constructor.
8104         (add_bincl_to_list): Remove.
8105
8106 2018-05-25  Tom Tromey  <tom@tromey.com>
8107
8108         * tui/tui.c (tui_enable): Update.
8109         * mi/mi-interp.c (mi_interp::init): Update.
8110         * interps.h (class interp) <name>: New method.
8111         <m_name>: Rename from name.
8112         (~scoped_restore_interp): Update.
8113         * interps.c (interp::interp): Update.
8114         (interp_add, interp_set, interp_lookup_existing)
8115         (current_interp_named_p): Update.
8116
8117 2018-05-25  Tom Tromey  <tom@tromey.com>
8118
8119         * interps.c (interp_name): Remove.
8120         * mi/mi-interp.c (mi_interp::init): Update.
8121         * interps.h (interp_name): Remove.
8122         (~scoped_restore_interp): Update.
8123         * tui/tui.c (tui_enable): Update.
8124
8125 2018-05-25  Tom Tromey  <tom@tromey.com>
8126
8127         * utils.c (fputs_maybe_filtered): Update.
8128         * linespec.c (decode_line_full): Update.
8129         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
8130         (mi_print_breakpoint_for_event, mi_solib_loaded)
8131         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
8132         (mi_user_selected_context_changed): Update.
8133         * mi/mi-main.c (mi_execute_command): Update.
8134         * cli/cli-script.c (execute_control_command): Update.
8135         * python/python.c (execute_gdb_command): Update.
8136         * solib.c (info_sharedlibrary_command): Update.
8137         * interps.c (interp_ui_out): Remove.
8138         * interps.h (interp_ui_out): Remove.
8139
8140 2018-05-25  Tom Tromey  <tom@tromey.com>
8141
8142         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
8143         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
8144         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
8145
8146 2018-05-25  Tom Tromey  <tom@tromey.com>
8147
8148         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
8149         * interps.c (interp_exec): Use scoped_restore.
8150
8151 2018-05-25  Tom Tromey  <tom@tromey.com>
8152
8153         * remote.c (remote_target::remote_file_get): Use
8154         gdb::byte_vector.
8155         (remote_target::remote_file_put): Likewise.
8156
8157 2018-05-25  Tom Tromey  <tom@tromey.com>
8158
8159         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
8160         a std::string.
8161         (get_pe_section_index, add_pe_exported_sym): Update.
8162         (read_pe_exported_syms): Use gdb::def_vector.
8163
8164 2018-05-25  Tom Tromey  <tom@tromey.com>
8165
8166         * frame.c (remove_prev_frame): Remove.
8167         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
8168
8169 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
8170
8171         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
8172         Remove prototypes.
8173         * mips-linux-nat.c (supply_fpregset): Always call
8174         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
8175         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
8176         `mips_fill_fpregset'.
8177         * mips-linux-tdep.c (mips_supply_fpregset)
8178         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
8179         (mips_fill_fpregset_wrapper): Remove functions.
8180         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
8181         (mips_linux_fpregset): Remove variable.
8182         (mips_linux_iterate_over_regset_sections): Use
8183         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
8184         (mips_linux_o32_sigframe_init): Remove comment.
8185
8186 2018-05-25  Pedro Alves  <palves@redhat.com>
8187
8188         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
8189         (struct readahead_cache, struct packet_reg, struct
8190         remote_arch_state, class remote_state): Move higher up in the
8191         file.
8192         (remote_target::m_remote_state): Now an object instead of a pointer.
8193         (remote_target::get_remote_state): Adjust.
8194
8195 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8196
8197         * stack.c (select_and_print_frame): Delete.
8198         (struct function_bounds): Move struct within function.
8199         (func_command): Most content moved into new function
8200         find_frame_for_function, use new function, print result, add
8201         function comment.
8202         (find_frame_for_function): New function, now returns a result.
8203
8204 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8205
8206         * stack.c (iterate_over_block_arg_vars): Fix comment.
8207         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
8208
8209 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
8210
8211         PR gdb/23203
8212         * frame.c
8213         (scoped_restore_selected_frame::scoped_restore_selected_frame):
8214         Define.
8215         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
8216         Define.
8217         * frame.h (class scoped_restore_selected_frame): New class.
8218         * stack.c (print_frame_local_vars): Remove catching and rethrowing
8219         of any exception, use scoped_restore_selected_frame to restore the
8220         frame instead.
8221
8222 2018-05-24  Pedro Alves  <palves@redhat.com>
8223
8224         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
8225         override.
8226
8227 2018-05-23  Tom Tromey  <tom@tromey.com>
8228
8229         * complaints.c (struct complaints): Remove.
8230         (symfile_complaint_book): Remove.
8231         (series): New global.
8232         (complaint_internal): Update.
8233         (clear_complaints): Update.
8234
8235 2018-05-23  Tom Tromey  <tom@tromey.com>
8236
8237         * complaints.c (counters): New global.
8238         (struct complain): Remove.
8239         (struct complaints) <root>: Remove.
8240         (complaint_sentinel): Remove.
8241         (symfile_complaint_book): Update.
8242         (find_complaint) Remove.
8243         (complaint_internal, clear_complaints): Update.
8244
8245 2018-05-23  Tom Tromey  <tom@tromey.com>
8246
8247         * complaints.c (struct complain) <file, line>: Remove.
8248         (find_complaint): Remove file, line parameters.
8249         (complaint_internal): Update.
8250
8251 2018-05-23  Tom Tromey  <tom@tromey.com>
8252
8253         * complaints.c (vcomplaint): Remove.
8254         (complaint_internal) Merge in contents of vcomplaint.
8255
8256 2018-05-23  Tom Tromey  <tom@tromey.com>
8257
8258         * complaints.c (struct complaints) <explanation>: Remove.
8259         (symfile_explanations): Remove.
8260         (symfile_complaint_book): Update.
8261         (vcomplaint): Update.
8262         (struct explanation): Remove.
8263
8264 2018-05-23  Tom Tromey  <tom@tromey.com>
8265
8266         * complaints.c (symfile_complaints): Remove.
8267         (complaint_internal): Remove "complaints" parameter.
8268         (clear_complaints, vcomplaint): Remove "c" parameter.
8269         (get_complaints): Remove.
8270         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8271         (dwarf2_debug_line_missing_file_complaint)
8272         (dwarf2_debug_line_missing_end_sequence_complaint)
8273         (dwarf2_complex_location_expr_complaint)
8274         (dwarf2_const_value_length_mismatch_complaint)
8275         (dwarf2_section_buffer_overflow_complaint)
8276         (dwarf2_macro_malformed_definition_complaint)
8277         (dwarf2_invalid_attrib_class_complaint)
8278         (create_addrmap_from_index, dw2_symtab_iter_next)
8279         (dw2_expand_marked_cus)
8280         (dw2_debug_names_iterator::find_vec_in_debug_names)
8281         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8282         (create_debug_type_hash_table, init_cutu_and_read_dies)
8283         (partial_die_parent_scope, add_partial_enumeration)
8284         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8285         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8286         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8287         (create_cus_hash_table, create_dwp_hash_table)
8288         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8289         (dwarf2_rnglists_process, dwarf2_ranges_process)
8290         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8291         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8292         (handle_struct_member_die, process_structure_scope)
8293         (read_array_type, read_common_block, read_module_type)
8294         (read_tag_pointer_type, read_typedef, read_base_type)
8295         (read_subrange_type, load_partial_dies, partial_die_info::read)
8296         (partial_die_info::read, partial_die_info::read)
8297         (partial_die_info::read, read_checked_initial_length_and_offset)
8298         (dwarf2_string_attr, read_formatted_entries)
8299         (dwarf_decode_line_header)
8300         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8301         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8302         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8303         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8304         (get_signatured_type, get_DW_AT_signature_type)
8305         (decode_locdesc, file_file_name, consume_improper_spaces)
8306         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8307         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8308         (dwarf2_symbol_mark_computed, set_die_type)
8309         (read_attribute_value): Update.
8310         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8311         Update.
8312         * dbxread.c (unknown_symtype_complaint)
8313         (lbrac_mismatch_complaint, repeated_header_complaint)
8314         (set_namestring, function_outside_compilation_unit_complaint)
8315         (read_dbx_symtab, process_one_symbol): Update.
8316         * gdbtypes.c (stub_noname_complaint): Update.
8317         * windows-nat.c (handle_unload_dll): Update.
8318         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8319         (decode_base_type): Update.
8320         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8321         (eb_complaint, record_include_begin, record_include_end)
8322         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8323         (process_xcoff_symbol, read_symbol)
8324         (function_outside_compilation_unit_complaint)
8325         (scan_xcoff_symtab): Update.
8326         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8327         * buildsym.c (finish_block_internal, make_blockvector)
8328         (end_symtab_get_static_block, augment_type_symtab): Update.
8329         * dtrace-probe.c (dtrace_process_dof)
8330         (dtrace_static_probe_ops::get_probes): Update.
8331         * complaints.h (struct complaint): Don't declare.
8332         (symfile_complaints): Remove.
8333         (complaint_internal): Remove "complaints" parameter.
8334         (complaint): Likewise.
8335         (clear_complaints): Likewise.
8336         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8337         (reread_symbols): Update.
8338         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8339         (dwarf2_frame_cache, decode_frame_entry): Update.
8340         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8341         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8342         (info_selectors_command): Update.
8343         * macrotab.c (macro_include, check_for_redefinition)
8344         (macro_undef): Update.
8345         * objfiles.c (filter_overlapping_sections): Update.
8346         * stabsread.c (invalid_cpp_abbrev_complaint)
8347         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8348         (define_symbol, error_type, read_type, rs6000_builtin_type)
8349         (stabs_method_name_from_physname, read_member_functions)
8350         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8351         (attach_fields_to_type, complain_about_struct_wipeout)
8352         (read_range_type, read_args, common_block_start)
8353         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8354         Update.
8355         * mdebugread.c (index_complaint, unknown_ext_complaint)
8356         (basic_type_complaint, bad_tag_guess_complaint)
8357         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8358         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8359         (parse_procedure, parse_lines)
8360         (function_outside_compilation_unit_complaint)
8361         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8362         (bad_tag_guess_complaint, reg_value_complaint): Update.
8363         * cp-support.c (demangled_name_complaint): Update.
8364         * macroscope.c (sal_macro_scope): Update.
8365         * dwarf-index-write.c (class debug_names): Update.
8366
8367 2018-05-23  Tom Tromey  <tom@tromey.com>
8368
8369         * complaints.c (clear_complaints): Remove "noisy" parameter.
8370         * complaints.h (clear_complaints): Update.
8371         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8372         (reread_symbols): Update.
8373
8374 2018-05-23  Tom Tromey  <tom@tromey.com>
8375
8376         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8377         SUBSEQUENT_MESSAGE.
8378         (vcomplaint, clear_complaints): Update.
8379         (symfile_explanations): Remove some messages.
8380
8381 2018-05-23  Tom Tromey  <tom@tromey.com>
8382
8383         * complaints.c (internal_complaint): Remove.
8384         * complaints.h (internal_complaint): Remove.
8385
8386 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8387
8388         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8389
8390 2018-05-22  Pedro Alves  <palves@redhat.com>
8391
8392         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8393         (remote_fileio_badfd, remote_fileio_return_errno)
8394         (remote_fileio_return_success, remote_fileio_func_open)
8395         (remote_fileio_func_open, remote_fileio_func_close)
8396         (remote_fileio_func_read, remote_fileio_func_write)
8397         (remote_fileio_func_lseek, remote_fileio_func_rename)
8398         (remote_fileio_func_unlink, remote_fileio_func_stat)
8399         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8400         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8401         remote_target parameter.
8402         (remote_fio_func_map) <func>: Add remote_target parameter.
8403         (do_remote_fileio_request, remote_fileio_request):
8404         * remote-fileio.h (remote_fileio_request):
8405         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8406         remote_target parameter.
8407         (remote_notif_process, handle_notification): Adjust to pass down
8408         the remote.
8409         (remote_notif_state_allocate): Add remote_target parameter.  Save
8410         it.
8411         * remote-notif.h (struct remote_target): Forward declare.
8412         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8413         remote_target parameter.
8414         (struct remote_notif_state) <remote>: New field.
8415         (remote_notif_ack, remote_notif_parse): Add remote_target
8416         parameter.
8417         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8418         remote_target parameter.
8419         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8420         (threads_listing_context, rmt_thread_action, protocol_feature)
8421         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8422         (packet_result, struct threads_listing_context, remote_state):
8423         Move definitions and declarations higher up.
8424         (remote_target) <~remote_target>: Declare.
8425         (remote_download_command_source, remote_file_put, remote_file_get)
8426         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8427         (remote_hostio_pread_vFile, remote_hostio_send_command)
8428         (remote_hostio_set_filesystem, remote_hostio_open)
8429         (remote_hostio_close, remote_hostio_unlink, remote_state)
8430         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8431         (get_memory_write_packet_size, get_memory_read_packet_size)
8432         (append_pending_thread_resumptions, remote_detach_1)
8433         (append_resumption, remote_resume_with_vcont)
8434         (add_current_inferior_and_thread, wait_ns, wait_as)
8435         (process_stop_reply, remote_notice_new_inferior)
8436         (process_initial_stop_replies, remote_add_thread)
8437         (btrace_sync_conf, remote_btrace_maybe_reopen)
8438         (remove_new_fork_children, kill_new_fork_children)
8439         (discard_pending_stop_replies, stop_reply_queue_length)
8440         (check_pending_events_prevent_wildcard_vcont)
8441         (discard_pending_stop_replies_in_queue, stop_reply)
8442         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8443         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8444         (remote_interrupt_as, remote_interrupt_ns)
8445         (remote_get_noisy_reply, remote_query_attached)
8446         (remote_add_inferior, remote_current_thread, get_current_thread)
8447         (set_thread, set_general_thread, set_continue_thread)
8448         (set_general_process, write_ptid)
8449         (remote_unpack_thread_info_response, remote_get_threadinfo)
8450         (parse_threadlist_response, remote_get_threadlist)
8451         (remote_threadlist_iterator, remote_get_threads_with_ql)
8452         (remote_get_threads_with_qxfer)
8453         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8454         (get_offsets, remote_check_symbols, remote_supported_packet)
8455         (remote_query_supported, remote_packet_size)
8456         (remote_serial_quit_handler, remote_detach_pid)
8457         (remote_vcont_probe, remote_resume_with_hc)
8458         (send_interrupt_sequence, interrupt_query)
8459         (remote_notif_get_pending_events, fetch_register_using_p)
8460         (send_g_packet, process_g_packet, fetch_registers_using_g)
8461         (store_register_using_P, store_registers_using_G)
8462         (set_remote_traceframe, check_binary_download)
8463         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8464         (remote_xfer_live_readonly_partial, remote_read_bytes)
8465         (remote_send_printf, remote_flash_write, readchar)
8466         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8467         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8468         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8469         (extended_remote_disable_randomization, extended_remote_run)
8470         (send_environment_packet, extended_remote_environment_support)
8471         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8472         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8473         (packet_command): Now methods of ...
8474         (remote_target): ... this class.
8475         (m_remote_state) <remote_target>: New field.
8476         (struct remote_state) <stop_reply_queue,
8477         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8478         fields.
8479         (remote_state::remote_state): Allocate stop_reply_queue.
8480         (remote_state): Delete global.
8481         (get_remote_state_raw): Delete.
8482         (remote_target::get_remote_state): Allocate m_remote_state on
8483         demand.
8484         (get_current_remote_target): New.
8485         (remote_ops, extended_remote_ops): Delete.
8486         (wait_forever_enabled_p, remote_async_inferior_event_token):
8487         Delete, moved to struct remote_state.
8488         (remote_target::close): Delete self.  Destruction bits split to
8489         ...
8490         (remote_target::~remote_target): ... this.
8491         (show_memory_packet_size): Adjust to use
8492         get_current_remote_target.
8493         (struct protocol_feature) <func>: Add remote_target parameter.
8494         All callers adjusted.
8495         (curr_quit_handler_target): New.
8496         (remote_serial_quit_handler): Reimplement.
8497         (remote_target::open_1): Adjust to use get_current_remote_target.
8498         Heap-allocate remote_target/extended_remote_target instances.
8499         (vcont_builder::vcont_builder): Add remote_target parameter, and
8500         save it in m_remote.  All callers adjusted.
8501         (vcont_builder::m_remote): New field.
8502         (vcont_builder::restart, vcont_builder::flush)
8503         (vcont_builder::push_action): Use it.
8504         (remote_target::commit_resume): Use it.
8505         (struct queue_iter_param) <remote>: New field.
8506         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8507         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8508         (check_pending_event_prevents_wildcard_vcont_callback)
8509         (remote_target::check_pending_events_prevent_wildcard_vcont)
8510         (remote_target::discard_pending_stop_replies)
8511         (remote_target::discard_pending_stop_replies_in_queue)
8512         (remote_target::remote_notif_remove_queued_reply): Fill in
8513         'remote' field.
8514         (remote_notif_get_pending_events): New.
8515         (remote_target::readchar, remote_target::remote_serial_write):
8516         Save/restore curr_quit_handler_target.
8517         (putpkt): New.
8518         (kill_new_fork_children): Fill in 'remote' field.
8519         (packet_command): Use get_current_remote_target, defer to
8520         remote_target method of same name.
8521         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8522         parameter, and save it in m_remote.  All callers adjusted.
8523         (scoped_remote_fd::release): Use m_remote.
8524         (scoped_remote_fd::m_remote): New field.
8525         (remote_file_put, remote_file_get, remote_file_delete): Use
8526         get_current_remote_target, defer to remote_target method of same
8527         name.
8528         (remote_btrace_reset): Add remote_state paremeter.  Update all
8529         callers.
8530         (remote_async_inferior_event_handler). Pass down 'data'.
8531         (remote_new_objfile): Use get_current_remote_target.
8532         (remote_target::vcont_r_supported): New.
8533         (set_range_stepping): Use get_current_remote_target and
8534         remote_target::vcont_r_supported.
8535         (_initialize_remote): Don't allocate 'remote_state' and
8536         'stop_reply_queue' globals.
8537         * remote.h (struct remote_target): Forward declare.
8538         (getpkt, putpkt, remote_notif_get_pending_events): Add
8539         'remote_target' parameter.
8540
8541 2018-05-22  Pedro Alves  <palves@redhat.com>
8542
8543         * remote.c (vcont_builder): Now a class.  Make all data members
8544         private.
8545         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8546         Declare methods.
8547         (vcont_builder_restart): Rename to ...
8548         (vcont_builder::restart): ... this.
8549         (vcont_builder_flush): Rename to ...
8550         (vcont_builder::flush): ... this.
8551         (vcont_builder_push_action): Rename to ...
8552         (vcont_builder::push_action): ... this.
8553         (remote_target::commit_resume): Adjust.
8554
8555 2018-05-22  Pedro Alves  <palves@redhat.com>
8556
8557         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8558         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8559         (get_fixed_memory_packet_size): New.
8560         (get_memory_packet_size): Use it.
8561         (set_memory_packet_size): Don't override the config size with
8562         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8563         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8564         Don't refer to get_memory_packet_size if not connected to a remote
8565         target.  Show "(default)" if configured size is 0.
8566
8567 2018-05-22  Pedro Alves  <palves@redhat.com>
8568
8569         * remote.c (remote_target::mourn_inferior): Move
8570         discard_pending_stop_replies call here from ...
8571         (_initialize_remote): ... here.
8572
8573 2018-05-22  Pedro Alves  <palves@redhat.com>
8574
8575         * remote.c (compare_section_command): Remove set_general_process
8576         call.
8577
8578 2018-05-22  Pedro Alves  <palves@redhat.com>
8579
8580         * remote.c (struct packet_reg, struct remote_arch_state):
8581         Move higher up in the file.
8582         (remote_state) <m_arch_states>: Store remote_arch_state values
8583         instead of remote_arch_state pointers.
8584         (remote_state::get_remote_arch_state): Adjust.
8585
8586 2018-05-22  Pedro Alves  <palves@redhat.com>
8587
8588         * remote.c: Include <unordered_map>.
8589         (remote_state): Now a class.
8590         (remote_state) <get_remote_arch_state>: Declare method.
8591         <get_remote_arch_state>: New field.
8592         (remote_arch_state) <remote_arch_state>: Declare ctor.
8593         <regs>: Now a unique_ptr.
8594         (remote_gdbarch_data_handle): Delete.
8595         (get_remote_arch_state): Delete.
8596         (remote_state::get_remote_arch_state): New.
8597         (get_remote_state): Adjust to call remote_state's
8598         get_remote_arch_state method.
8599         (init_remote_state): Delete, bits factored out to ...
8600         (remote_arch_state::remote_arch_state): ... this new method.
8601         (get_remote_packet_size, get_memory_packet_size)
8602         (process_g_packet, remote_target::fetch_registers)
8603         (remote_target::prepare_to_store, store_registers_using_G)
8604         (remote_target::store_registers, remote_target::get_trace_status):
8605         Adjust to call remote_state's method.
8606         (_initialize_remote): Remove reference to
8607         remote_gdbarch_data_handle.
8608
8609 2018-05-22  Pedro Alves  <palves@redhat.com>
8610
8611         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8612         pread>: New method declarations.
8613         (remote_target::open_1): Adjust.
8614         (readahead_cache_invalidate): Rename to ...
8615         (readahead_cache::invalidate): ... this, and adjust to be a class
8616         method.
8617         (readahead_cache_invalidate_fd): Rename to ...
8618         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8619         class method.
8620         (remote_hostio_pwrite): Adjust.
8621         (remote_hostio_pread_from_cache): Rename to ...
8622         (readahead_cache::pread): ... this, and adjust to be a class
8623         method.
8624         (remote_hostio_close): Adjust.
8625
8626 2018-05-22  Pedro Alves  <palves@redhat.com>
8627
8628         * remote.c (remote_hostio_close_cleanup): Delete.
8629         (class scoped_remote_fd): New.
8630         (remote_file_put, remote_file_get): Use it.
8631
8632 2018-05-22  Pedro Alves  <palves@redhat.com>
8633
8634         (struct vCont_action_support): Use bool and initialize all fields.
8635         (struct readahead_cache): Initialize all fields.
8636         (remote_state): Use bool and initialize all fields.
8637         (remote_state::remote_state, remote_state::~remote_state): New.
8638         (new_remote_state): Delete.
8639         (_initialize_remote): Use new to allocate remote_state.
8640
8641 2018-05-22  Pedro Alves  <palves@redhat.com>
8642             張俊芝  <zjz@zjz.name>
8643
8644         PR gdb/22973
8645         * c-exp.y: Include "c-support.h".
8646         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8647         of tolower.  Use c_ident_is_alpha to scan names.
8648         * c-lang.c: Include "c-support.h".
8649         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8650         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8651         * c-support.h: New file, with bits factored out from ...
8652         * cp-name-parser.y: ... this file.
8653         Include "c-support.h".
8654         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8655         c-support.h and renamed.
8656         (symbol_end, yylex): Adjust.
8657
8658 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8659
8660         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8661         parameter type to CORE_ADDR.
8662         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8663         parameter type in declaration to CORE_ADDR.
8664         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8665         target_auxv_search to get AT_HWCAP and use the result to get the
8666         target description.
8667         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8668         to CORE_ADDR. Remove the cast of the return value to unsigned
8669         long. Fix error predicate of target_auxv_search.
8670         (ppc_linux_nat_target::read_description): Change the type of the
8671         hwcap variable to CORE_ADDR.
8672
8673 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8674
8675         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8676         if the size of fpscr is larger than 32 bits.
8677
8678 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8679
8680         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8681         (ppc32_linux_vsxregmap): New global.
8682         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8683         regcache_supply_regset, and regcache_collect_regset.
8684         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8685         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8686         (fetch_vsx_register, store_vsx_register): Remove.
8687         (fetch_vsx_registers): Add regno parameter. Get regset using
8688         ppc_linux_vsxregset. Use regset to supply registers.
8689         (store_vsx_registers): Add regno parameter. Get regset using
8690         ppc_linux_vsxregset. Use regset to collect registers.
8691         (fetch_register): Call fetch_vsx_registers instead of
8692         fetch_vsx_register.
8693         (store_register): Call store_vsx_registers instead of
8694         store_vsx_register.
8695         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8696         new regno parameter.
8697         (store_ppc_registers): Call store_vsx_registers with -1 for the
8698         new regno parameter.
8699         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8700         (ppc_collect_vsxregset): Remove.
8701
8702 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8703
8704         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8705         offset fields.
8706         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8707         for vector register offset fields.
8708         (ppc64_fbsd_reg_offsets): Likewise.
8709         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8710         to vector register offset fields.
8711         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8712         to vector register offset fields.
8713         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8714         vector register offset fields.
8715         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8716         initializers for vector register offset fields.
8717         (rs6000_aix64_reg_offsets): Likewise.
8718         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8719         (ppc_supply_vrregset): Remove.
8720         (ppc_collect_vrregset): Remove.
8721         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8722         (ppc_linux_vrregset) : New function.
8723         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8724         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8725         (ppc32_linux_vrregset): Remove.
8726         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8727         and use result instead of ppc32_linux_vrregset.
8728         (ppc32_linux_reg_offsets): Remove initializers for vector register
8729         offset fields.
8730         (ppc64_linux_reg_offsets): Likewise.
8731         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8732         * ppc-linux-nat.c: Include regset.h.
8733         (gdb_vrregset_t): Adjust comment to account for little-endian
8734         mode.
8735         (supply_vrregset, fill_vrregset): Remove.
8736         (fetch_altivec_register, store_altivec_register): Remove.
8737         (fetch_altivec_registers): Add regno parameter. Get regset using
8738         ppc_linux_vrregset. Use regset to supply registers.
8739         (store_altivec_registers): Add regno parameter. Get regset using
8740         ppc_linux_vrregset. Use regset to collect registers.
8741         (fetch_register): Call fetch_altivec_registers instead of
8742         fetch_altivec_register.
8743         (store_register): Call store_altivec_registers instead of
8744         store_altivec_register.
8745         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8746         the new regno parameter.
8747         (store_ppc_registers): Call store_altivec_registers with -1 for
8748         the new regno parameter.
8749
8750 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8751
8752         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8753         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8754         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8755         (gdb_vrregset_t): Change array type size to
8756         PPC_LINUX_SIZEOF_VRREGSET.
8757         (gdb_vsxregset_t): Change array type size to
8758         PPC_LINUX_SIZEOF_VSXREGSET.
8759         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8760         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8761         PPC_LINUX_SIZEOF_VSXREGSET.
8762
8763 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8764
8765         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8766         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8767         nat/ppc-linux.c.
8768         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8769         ppc_linux_target_wordsize with tid.
8770         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8771         wordsize with tid.
8772         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8773         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8774         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8775         tid parameter. Remove static specifier.
8776         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8777         (ppc_linux_target_wordsize): New declaration.
8778
8779 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8780
8781         * arch/ppc-linux-common.c: New file.
8782         * arch/ppc-linux-common.h: New file.
8783         * arch/ppc-linux-tdesc.h: New file.
8784         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8785         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8786         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8787         arch/ppc-linux-tdesc.h.
8788         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8789         arch/ppc-linux-tdesc.h.
8790         (ppc_linux_nat_target::read_description): Remove target
8791         description matching code. Fill a ppc_linux_features struct and
8792         call ppc_linux_match_description with it. Move comment about ISA
8793         2.05 to ppc-linux-common.c.
8794         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8795         arch/ppc-linux-tdesc.h.
8796         (ppc_linux_core_read_description): Remove target description
8797         matching code. Fill a ppc_linux_features struct and call
8798         ppc_linux_match_description with it.
8799         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8800         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8801         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8802         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8803         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8804         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8805         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8806         (tdesc_powerpc_e500l): Remove.
8807
8808 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8809
8810         * ada-lang.c (catch_assert_command): Pass empty string instead
8811         of NULL for excep_string argument.
8812
8813 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8814
8815         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8816         the width of the requested register exceeds the width of the
8817         `ptrace' data type.
8818
8819 2018-05-21  Tom Tromey  <tom@tromey.com>
8820
8821         * printcmd.c (output_command): Remove.
8822         (output_command_const): Rename to output_command.
8823         * valprint.h (output_command): Rename from output_command_const.
8824         * tracepoint.c (trace_dump_actions): Call output_command.
8825
8826 2018-05-21  Tom Tromey  <tom@tromey.com>
8827
8828         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8829         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8830         * ada-lang.h (create_ada_exception_catchpoint): Update.
8831         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8832         std::string.
8833         (create_excep_cond_exprs, ~ada_catchpoint)
8834         (should_stop_exception, print_one_exception)
8835         (print_mention_exception, print_recreate_exception): Update.
8836         (ada_get_next_arg): Remove.
8837         (catch_ada_exception_command_split): Use std::string.  Change type
8838         of "excep_string", "cond_string".
8839         (catch_ada_exception_command): Update.
8840         (create_ada_exception_catchpoint): Change type of excep_string.
8841         (ada_exception_sal): Remove excep_string parameter.
8842         (~ada_catchpoint): Remove.
8843
8844 2018-05-21  Tom Tromey  <tom@tromey.com>
8845
8846         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8847         cleanup.
8848
8849 2018-05-21  Tom Tromey  <tom@tromey.com>
8850
8851         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8852         Return unique_xmalloc_ptr.
8853         (print_it_exception): Update.
8854
8855 2018-05-21  Tom Tromey  <tom@tromey.com>
8856
8857         * tracepoint.c (trace_dump_actions): Use std::string.
8858
8859 2018-05-21  Tom Tromey  <tom@tromey.com>
8860
8861         * symfile.c (reread_symbols): Use std::string for original_name.
8862
8863 2018-05-21  Tom Tromey  <tom@tromey.com>
8864
8865         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8866         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8867         constructor.
8868
8869 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8870
8871         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8872         instance to...
8873         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8874         * objfiles.c (get_objfile_bfd_data): Allocate
8875         objfile_per_bfd_storage with obstack_new when allocating on
8876         obstack.
8877
8878 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8879
8880         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8881         OBSTACK_ZALLOC.
8882         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8883         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8884         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8885         (add_pending): Likewise.
8886         (parse_symbol): Likewise.
8887         (parse_partial_symbols): Likewise.
8888         (psymtab_to_symtab_1): Likewise.
8889         (new_psymtab): Likewise.
8890         (elfmdebug_build_psymtabs): Likewise.
8891         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8892         * objfiles.c (get_objfile_bfd_data): Likewise.
8893         (objfile_register_static_link): Likewise.
8894         * psymtab.c (allocate_psymtab): Likewise.
8895         * stabsread.c (read_member_functions): Likewise.
8896         * xcoffread.c (xcoff_end_psymtab): Likewise.
8897
8898 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8899
8900         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8901         compiler supports std::is_trivially_constructible.
8902         * common/poison.h: Include obstack.h.
8903         (IsMallocable): Define to is_trivially_constructible if the
8904         compiler supports it, define to true_type otherwise.
8905         (xobnew): New.
8906         (XOBNEW): Redefine.
8907         (xobnewvec): New.
8908         (XOBNEWVEC): Redefine.
8909         * gdb_obstack.h (obstack_zalloc): New.
8910         (OBSTACK_ZALLOC): Redefine.
8911         (obstack_calloc): New.
8912         (OBSTACK_CALLOC): Redefine.
8913         (obstack_new): New.
8914         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8915         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8916         gdbarch.c.
8917         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8918         obstack_calloc/obstack_zalloc.
8919         (gdbarch_obstack_zalloc): Remove.
8920         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8921
8922 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8923
8924         * stack.c (backtrace_command_1): Remove useless variable int i.
8925
8926 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8927
8928         * stack.c (print_frame_info): Fix comment.
8929
8930 2018-05-18  Tom Tromey  <tom@tromey.com>
8931
8932         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8933         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8934         (~dwarf2_per_objfile): Update
8935         (dwarf2_get_dwz_file): Use new.
8936         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8937         unique_ptr.
8938
8939 2018-05-18  Tom Tromey  <tom@tromey.com>
8940
8941         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8942         unique_ptr.
8943         * dwarf2read.c (struct dwp_file): Add constructor and
8944         initializers.
8945         (open_and_init_dwp_file): Return a unique_ptr.
8946         (dwarf2_per_objfile, create_dwp_hash_table)
8947         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8948         (lookup_dwo_unit_in_dwp): Update.
8949         (open_and_init_dwp_file, get_dwp_file): Update.
8950
8951 2018-05-18  Tom Tromey  <tom@tromey.com>
8952
8953         * dwarf2read.c (dwarf2_per_objfile): Update.
8954         (struct mapped_index): Add initializers.
8955         (dwarf2_read_index): Use new.
8956         (dw2_symtab_iter_init): Update.
8957         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8958         unique_ptr.
8959
8960 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8961
8962         * dwarf2read.c (mapped_index) <total_size>: Remove.
8963
8964 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8965
8966         * unittests/format_pieces-selftests.c (test_format_specifier):
8967         Add ARI comments.
8968
8969 2018-05-18  Tom Tromey  <tom@tromey.com>
8970
8971         * c-typeprint.c (maybe_print_hole): New function.
8972         (c_print_type_struct_field_offset): Update.
8973         (c_type_print_base_struct_union): Call maybe_print_hole.
8974
8975 2018-05-17  Keith Seitz  <keiths@redhat.com>
8976
8977         * breakpoint.c (build_bpstat_chain): New function, moved from
8978         bpstat_stop_status.
8979         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8980         If no stop chain is passed, call build_bpstat_chain to build it.
8981         * breakpoint.h (build_bpstat_chain): Declare.
8982         (bpstat_stop_status): Move documentation here from breakpoint.c.
8983         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8984         build the stop chain and pass it to skip_inline_frames.
8985         Pass this stop chain to bpstat_stop_status.
8986         * inline-frame.c: Include breakpoint.h.
8987         (stopped_by_user_bp_inline_frame): New function.
8988         (skip_inline_frames): Add parameter `stop_chain'.
8989         Move documention to inline-frame.h.
8990         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8991         whether the frame should be elided.
8992         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8993         Add moved documentation and update for new parameter.
8994
8995 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8996
8997         PR cli/14975
8998         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8999         unittests/format_pieces-selftests.c.
9000         * common/format.h (format_piece) <operator==>: New.
9001         (format_pieces) <operator[]>: Remove.
9002         * common/format.c (format_pieces::format_pieces): Handle \e.
9003         * unittests/format_pieces-selftests.c: New.
9004
9005 2018-05-17  Tom Tromey  <tom@tromey.com>
9006
9007         PR symtab/23010:
9008         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
9009         (dw2_instantiate_symtab): Add skip_partial parameter.
9010         (dw2_find_last_source_symtab, dw2_map_expand_apply)
9011         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
9012         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
9013         (dw2_expand_symtabs_matching_one)
9014         (dw2_find_pc_sect_compunit_symtab)
9015         (dw2_debug_names_lookup_symbol)
9016         (dw2_debug_names_expand_symtabs_for_function): Update.
9017         (init_cutu_and_read_dies): Add skip_partial parameter.
9018         (process_psymtab_comp_unit, build_type_psymtabs_1)
9019         (process_skeletonless_type_unit, load_partial_comp_unit)
9020         (psymtab_to_symtab_1): Update.
9021         (load_full_comp_unit): Add skip_partial parameter.
9022         (process_imported_unit_die, dwarf2_read_addr_index)
9023         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
9024         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
9025         (read_signatured_type): Update.
9026
9027 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
9028
9029         * value.c (release_value): Remove unused variable.
9030         (record_latest_value): Likewise.
9031         (access_value_history): Likewise.
9032         (preserve_values): Likewise.
9033
9034 2018-05-17  Tom Tromey  <tom@tromey.com>
9035
9036         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
9037         Initialize.
9038
9039 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
9040
9041         PR gdb/22286
9042         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
9043         Also handle registers whose width is not a multiple of
9044         PTRACE_TYPE_RET.
9045         (linux_nat_trad_target::store_register): Likewise.
9046
9047 2018-05-16  Tom Tromey  <tom@tromey.com>
9048
9049         * gdbcore.h (core_bfd): Redefine.
9050         * corelow.c (core_target::close): Update.
9051         (core_target_open): Update.
9052         * progspace.h (struct program_space) <cbfd>: Now a
9053         gdb_bfd_ref_ptr.
9054
9055 2018-05-16  Tom Tromey  <tom@tromey.com>
9056
9057         PR cli/19551:
9058         * symfile-add-flags.h (enum symfile_add_flags)
9059         <SYMFILE_NOT_FILENAME>: New constant.
9060         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
9061         objfile name from BFD.
9062         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
9063         * minidebug.c (find_separate_debug_file_in_section): Put
9064         ".gnu_debugdata" into BFD's file name.
9065
9066 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
9067
9068         * regcache.c (regcache_read_ftype, regcache_write_ftype):
9069         Remove.
9070
9071 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
9072
9073         PR binutils/21446
9074         * aarch64-tdep.c (aarch64_analyze_prologue,
9075         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
9076         Indicate not interested in errors.
9077
9078 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9079
9080         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
9081         Supply the MIPS_ZERO_REGNUM register.
9082
9083 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
9084
9085         * mips-tdep.c (mask_address_var): Make variable static.
9086
9087 2018-05-14  Tom Tromey  <tom@tromey.com>
9088
9089         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
9090
9091 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
9092
9093         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
9094         FXSAVE_ADDR for the mxcsr register.
9095
9096 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
9097
9098         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
9099
9100 2018-05-11  Pedro Alves  <palves@redhat.com>
9101
9102         * corelow.c (core_target) <core_target>: No longer inline.
9103         Initialize m_core_gdbarch, m_core_vec and build the section table
9104         here.
9105         <~core_target>: New.
9106         <core_gdbarch, get_core_register_section>: New methods.
9107         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
9108         factored out from ...
9109         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
9110         (core_ops): Delete.
9111         (sniff_core_bfd): Add gdbarch parameter.
9112         (core_close): Delete, merged into ...
9113         (core_target::close): ... here.  Delete self.
9114         (core_close_cleanup): Delete.
9115         (core_target_open): Allocate a core_target on the heap.  Use a
9116         unique_ptr instead of a cleanup.  Bits moved into the core_target
9117         ctor.  Adjust to use core_target methods instead of globals.
9118         (get_core_register_section): Rename to ...
9119         (core_target::get_core_register_section): ... this and adjust.
9120         (struct get_core_registers_cb_data): New.
9121         (get_core_registers_cb): Use it.  Use bool.
9122         (core_target::fetch_registers, core_target::files_info)
9123         (core_target::xfer_partial, core_target::read_description)
9124         (core_target::pid_to, core_target::thread_name): Adjust to
9125         reference class fields instead of globals.
9126         * target.h (struct target_ops_deleter, target_ops_up): New.
9127
9128 2018-05-11  Pedro Alves  <palves@redhat.com>
9129
9130         * corefile.c (core_file_command): Move to corelow.c.
9131         * corelow.c (the_core_target): Delete.
9132         (core_file_command): Moved from corefile.c.  Check exec_bfd
9133         instead of the_core_target.  Use target_detach instead of calling
9134         into the_core_target directly.
9135         (maybe_say_no_core_file_now): New.
9136         (core_target::detach): Use it.
9137         (_initialize_corelow): Remove references to the_core_target.
9138         * gdbcore.h (the_core_target): Delete.
9139
9140 2018-05-11  Tom Tromey  <tromey@redhat.com>
9141             Pedro Alves  <palves@redhat.com>
9142
9143         * corefile.c (core_bfd): Remove.
9144         * gdbcore.h (core_bfd): Now a macro.
9145         * progspace.h (struct program_space) <cbfd>: New field.
9146
9147 2018-05-11  Tom Tromey  <tom@tromey.com>
9148
9149         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
9150         gdb::def_vector.
9151
9152 2018-05-10  Tom Tromey  <tom@tromey.com>
9153
9154         * configure: Rebuild.
9155         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
9156
9157 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
9158
9159         PR server/23158:
9160         * regformats/regdat.sh: Adjust script, following the addition
9161         of the new expedite_regs parameter to init_target_desc.
9162
9163 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
9164     
9165         PR gdb/23127
9166         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
9167         set_gdbarch_significant_addr_bit.
9168         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
9169         set_gdbarch_significant_addr_bit.
9170         * utils.c (address_significant): Update to sign extend addr.
9171
9172 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
9173
9174         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
9175         (xtensa_linux_init_abi): Limit tdep->num_regs by
9176         tdep->num_nopriv_regs.
9177         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
9178         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
9179         not initialized.
9180
9181 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
9182
9183         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
9184
9185 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
9186
9187         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
9188         (I387_MXCSR_INIT_VAL): New constant.
9189         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
9190         buffer if it was supplied by the inferior.
9191         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
9192         (i387_xsave_get_clear_bv): New function.
9193         (i387_supply_xsave): Only read x87 control registers from the
9194         xsave buffer if the feature is enabled, and the state will have
9195         been written, otherwise, provide a suitable default.
9196         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
9197         including x87 control registers.  Update control registers if they
9198         have changed from the default value, and mark features as enabled
9199         as required.
9200         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
9201
9202 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
9203
9204         * spu-tdep.c (info_spu_event_command): Fix output formatting.
9205
9206 2018-05-07  Tom Tromey  <tom@tromey.com>
9207
9208         * configure: Rebuild.
9209         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
9210
9211 2018-05-07  Tom Tromey  <tom@tromey.com>
9212
9213         PR tdep/20362:
9214         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
9215         bit.  Use correct value for VDIV.
9216
9217 2018-05-04  Tom Tromey  <tom@tromey.com>
9218
9219         * configure: Rebuild.
9220         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
9221
9222 2018-05-04  Tom Tromey  <tom@tromey.com>
9223
9224         * linux-record.c (record_linux_system_call) <case
9225         RECORD_SYS_RECVFROM>: Add "break".
9226
9227 2018-05-04  Tom Tromey  <tom@tromey.com>
9228
9229         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
9230         Add missing "break".
9231         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
9232         Add missing "break".
9233
9234 2018-05-04  Tom Tromey  <tom@tromey.com>
9235
9236         * rs6000-tdep.c (ppc_process_record_op4)
9237         (ppc_process_record_op63): Add fall-through comment.
9238
9239 2018-05-04  Tom Tromey  <tom@tromey.com>
9240
9241         * i386-tdep.c (i386_process_record): Add fall-through comment.
9242
9243 2018-05-04  Tom Tromey  <tom@tromey.com>
9244
9245         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9246         comment.
9247
9248 2018-05-04  Tom Tromey  <tom@tromey.com>
9249
9250         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9251         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9252         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9253         comment.
9254         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9255         comment.
9256         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9257         comment.
9258
9259 2018-05-04  Tom Tromey  <tom@tromey.com>
9260
9261         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9262
9263 2018-05-04  Tom Tromey  <tom@tromey.com>
9264
9265         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9266         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9267         * symfile.c (section_is_mapped): Fix fall-through comment.
9268         * stabsread.c (define_symbol, read_member_functions): Fix
9269         fall-through comment.
9270         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9271         comment.
9272         * remote.c (remote_wait_as): Fix fall-through comment.
9273         * p-exp.y (yylex): Fix fall-through comment.
9274         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9275         comment.
9276         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9277         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9278         * jv-exp.y (yylex): Fix fall-through comment.
9279         * go-exp.y (lex_one_token): Fix fall-through comment.
9280         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9281         fall-through comment.
9282         * f-exp.y (yylex): Fix fall-through comment.
9283         * dwarf2read.c (process_die): Fix fall-through comments.
9284         * dbxread.c (process_one_symbol): Fix fall-through comment.
9285         * d-exp.y (lex_one_token): Fix fall-through comment.
9286         * cp-name-parser.y (yylex): Fix fall-through comment.
9287         * coffread.c (coff_symtab_read): Fix fall-through comment.
9288         * c-exp.y (lex_one_token): Fix fall-through comment.
9289         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9290         comment.
9291         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9292         comment.
9293
9294 2018-05-04  Tom Tromey  <tom@tromey.com>
9295
9296         PR python/22730:
9297         * NEWS: Mention gdb.execute change.
9298         * gdbcmd.h (execute_control_command): Don't declare.
9299         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9300         execute_control_commands, execute_control_commands_to_string.
9301         * cli/cli-script.h (execute_control_commands)
9302         (execute_control_commands_to_string): Declare.
9303         (execute_control_command): Add from_tty parameter.
9304         * cli/cli-script.c (execute_control_commands)
9305         (execute_control_commands_to_string): New functions.
9306         (execute_user_command): Use execute_control_commands.
9307         (execute_control_command_1): Add "from_tty" parameter.  Update.
9308         (execute_control_command): Likewise.
9309
9310 2018-05-04  Tom Tromey  <tom@tromey.com>
9311
9312         PR python/22731:
9313         * NEWS: Mention that breakpoint commands are writable.
9314         * python/py-breakpoint.c (bppy_set_commands): New function.
9315         (breakpoint_object_getset) <"commands">: Use it.
9316
9317 2018-05-04  Tom Tromey  <tom@tromey.com>
9318
9319         * tracepoint.c (actions_command): Update.
9320         * mi/mi-cmd-break.c (mi_command_line_array)
9321         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9322         (mi_read_next_line): Remove.
9323         (mi_cmd_break_commands): Update.
9324         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9325         function_view.
9326         * cli/cli-script.c (get_command_line): Update.
9327         (process_next_line): Use function_view.  Constify.
9328         (recurse_read_control_structure, read_command_lines)
9329         (read_command_lines_1): Change argument types to function_view.
9330         (do_define_command, document_command): Update.
9331         * breakpoint.h (check_tracepoint_command): Don't declare.
9332         * breakpoint.c (check_tracepoint_command): Remove.
9333         (commands_command_1, create_tracepoint_from_upload): Update.
9334
9335 2018-05-04  Tom Tromey  <tom@tromey.com>
9336
9337         PR gdb/11750:
9338         * cli/cli-script.h (enum command_control_type) <define_control>:
9339         New constant.
9340         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9341         (build_command_line, execute_control_command_1)
9342         (process_next_line): Likewise.
9343         (do_define_command): New function, extracted from define_command.
9344         (define_command): Use it.
9345
9346 2018-05-04  Tom Tromey  <tom@tromey.com>
9347
9348         * tracepoint.c (actions_command): Update.
9349         * cli/cli-script.h (read_command_lines): Update.
9350         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9351         (MAX_TMPBUF): Remove define.
9352         (define_command): Use string_printf.
9353         (document_command): Likewise.
9354         * breakpoint.c (commands_command_1): Update.
9355
9356 2018-05-04  Tom Tromey  <tom@tromey.com>
9357
9358         * top.c (execute_command): Update.
9359         * cli/cli-script.h (print_command_lines): Now varargs.
9360         * cli/cli-script.c (print_command_lines): Now varargs.
9361         (execute_control_command_1) <case while_control, case if_control>:
9362         Update.
9363
9364 2018-05-04  Tom Tromey  <tom@tromey.com>
9365
9366         * tracepoint.c (all_tracepoint_actions): Rename from
9367         all_tracepoint_actions_and_cleanup.  Change return type.
9368         (actions_command, encode_actions_1, encode_actions)
9369         (trace_dump_actions, tdump_command): Update.
9370         * remote.c (remote_download_command_source): Update.
9371         * python/python.c (gdbpy_eval_from_control_command)
9372         (python_command, python_interactive_command): Update.
9373         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9374         * guile/guile.c (guile_command)
9375         (gdbscm_eval_from_control_command, guile_command): Update.
9376         * compile/compile.c (compile_code_command)
9377         (compile_print_command, compile_to_object): Update.
9378         * cli/cli-script.h (struct command_lines_deleter): New.
9379         (counted_command_line): New typedef.
9380         (struct command_line): Add constructor, destructor.
9381         <body_list>: Remove.
9382         <body_list_0, body_list_1>: New members.
9383         (command_line_up): Remove typedef.
9384         (read_command_lines, read_command_lines_1, get_command_line):
9385         Update.
9386         (copy_command_lines): Don't declare.
9387         * cli/cli-script.c (build_command_line): Use "new".
9388         (get_command_line): Return counted_command_line.
9389         (print_command_lines, execute_user_command)
9390         (execute_control_command_1, while_command, if_command): Update.
9391         (realloc_body_list): Remove.
9392         (process_next_line, recurse_read_control_structure): Update.
9393         (read_command_lines, read_command_lines_1): Return counted_command_line.
9394         (free_command_lines): Use "delete".
9395         (copy_command_lines): Remove.
9396         (define_command, document_command, show_user_1): Update.
9397         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9398         a counted_command_line.
9399         * breakpoint.h (counted_command_line): Remove typedef.
9400         (breakpoint_set_commands): Update.
9401         * breakpoint.c (check_no_tracepoint_commands)
9402         (validate_commands_for_breakpoint): Update.
9403         (breakpoint_set_commands): Change commands to be a
9404         counted_command_line.
9405         (commands_command_1, update_dprintf_command_list)
9406         (create_tracepoint_from_upload): Update.
9407
9408 2018-05-04  Tom Tromey  <tom@tromey.com>
9409
9410         * cli/cli-decode.h (cmd_list_element): New constructor.
9411         (~cmd_list_element): New destructor.
9412         (struct cmd_list_element): Add initializers.
9413         * cli/cli-decode.c (do_add_cmd): Use "new".
9414         (delete_cmd): Use "delete".
9415
9416 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9417             Pedro Alves <palves@redhat.com>
9418
9419         PR breakpoints/19806 and support for PR external/20207.
9420         * NEWS: Mention Aarch64 watchpoint improvements.
9421         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9422         watchpoints and PR external/20207 watchpoints.
9423         * nat/aarch64-linux-hw-point.c
9424         (kernel_supports_any_contiguous_range): New.
9425         (aarch64_watchpoint_offset): New.
9426         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9427         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9428         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9429         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9430         next_addr_orig_p.  Support PR external/20207 watchpoints.
9431         (aarch64_downgrade_regs): New.
9432         (aarch64_dr_state_insert_one_point): New parameters offset and
9433         addr_orig.
9434         (aarch64_dr_state_remove_one_point): Likewise.
9435         (aarch64_handle_breakpoint): Update caller.
9436         (aarch64_handle_aligned_watchpoint): Likewise.
9437         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9438         aligned_offset.
9439         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9440         aarch64_downgrade_regs.
9441         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9442         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9443         (DR_CONTROL_MASK): ... this.
9444         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9445         (unsigned int aarch64_watchpoint_offset): New prototype.
9446         (aarch64_linux_set_debug_regs): Remove const from state.
9447         * utils.c (align_up, align_down): Move to ...
9448         * common/common-utils.c (align_up, align_down): ... here.
9449         * utils.h (align_up, align_down): Move to ...
9450         * common/common-utils.h (align_up, align_down): ... here.
9451
9452 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9453
9454         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9455         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9456         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9457         Re-implement to match the ABI as summarized in GCC's
9458         gcc/config/sparc/sparc.c.  All callers updated.
9459         (sparc32_store_arguments): Remove assertion.
9460
9461 2018-05-04  Tom Tromey  <tom@tromey.com>
9462
9463         * printcmd.c: Don't include tui.h.
9464         (decode_format): Use skip_spaces.
9465
9466 2018-05-04  Tom Tromey  <tom@tromey.com>
9467
9468         PR gdb/22619:
9469         * printcmd.c (last_count): New global.
9470         (x_command): Use saved count when repeating.
9471
9472 2018-05-04  Tom Tromey  <tom@tromey.com>
9473
9474         * nto-procfs.c (do_closedir_cleanup): Remove.
9475         (procfs_pidlist): Use gdb_dir_up.
9476         * procfs.c (do_closedir_cleanup): Remove.
9477         (proc_update_threads): Use gdb_dir_up.
9478         * common/filestuff.h (struct gdb_dir_deleter): New.
9479         (gdb_dir_up): New typedef.
9480
9481 2018-05-04  Tom Tromey  <tom@tromey.com>
9482
9483         * ada-lang.c (print_mention_exception): Use std::string.
9484
9485 2018-05-04  Tom Tromey  <tom@tromey.com>
9486
9487         * ada-lang.c (create_excep_cond_exprs): Update.
9488         (ada_exception_catchpoint_cond_string): Use std::string.
9489
9490 2018-05-04  Tom Tromey  <tom@tromey.com>
9491
9492         * ada-lang.c (xget_renaming_scope): Return std::string.
9493         (old_renaming_is_invisible): Update.
9494
9495 2018-05-04  Tom Tromey  <tom@tromey.com>
9496
9497         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9498         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9499
9500 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9501
9502         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9503
9504 2018-05-04  Tom Tromey  <tom@tromey.com>
9505
9506         * remote.c (remote_query_supported_append): Change type.
9507         (remote_check_symbols): Update.
9508
9509 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9510
9511         PR gdb/11420
9512         * configure.ac: Prepend libpython.
9513         * python/python-config.py: Likewise.
9514         * configure: Regenerate.
9515
9516 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9517
9518         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9519
9520 2018-05-03  Pedro Alves  <palves@redhat.com>
9521
9522         * s390-linux-nat.c
9523         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9524         override.  Write 'true' instead of '1'.
9525         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9526         declaration.
9527
9528 2018-05-02  Pedro Alves  <palves@redhat.com>
9529
9530         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9531         add_inf_child_target.
9532         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9533         add_inf_child_target.
9534         * aix-thread.c (aix_thread_target_info): New.
9535         (aix_thread_target) <shortname, longname, doc>: Delete.
9536         <info>: New.
9537         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9538         add_inf_child_target.
9539         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9540         add_inf_child_target.
9541         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9542         add_inf_child_target.
9543         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9544         add_inf_child_target.
9545         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9546         add_inf_child_target.
9547         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9548         add_inf_child_target.
9549         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9550         add_inf_child_target.
9551         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9552         add_inf_child_target.
9553         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9554         add_inf_child_target.
9555         * bfd-target.c (target_bfd_target_info): New.
9556         (target_bfd) <shortname, longname, doc>: Delete.
9557         <info>: New.
9558         * bsd-kvm.c (bsd_kvm_target_info): New.
9559         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9560         <info>: New.
9561         (bsd_kvm_target::open): Rename to ...
9562         (bsd_kvm_target_open): ... this.  Adjust.
9563         * bsd-uthread.c (bsd_uthread_target_info): New.
9564         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9565         <info>: New.
9566         * corefile.c (core_file_command): Adjust.
9567         * corelow.c (core_target_info): New.
9568         (core_target) <shortname, longname, doc>: Delete.
9569         <info>: New.
9570         (core_target::open): Rename to ...
9571         (core_target_open): ... this.  Adjust.
9572         * ctf.c (ctf_target_info): New.
9573         (ctf_target) <shortname, longname, doc>: Delete.
9574         <info>: New.
9575         (ctf_target::open): Rename to ...
9576         (ctf_target_open): ... this.
9577         (_initialize_ctf): Adjust.
9578         * exec.c (exec_target_info): New.
9579         (exec_target) <shortname, longname, doc>: Delete.
9580         <info>: New.
9581         (exec_target::open): Rename to ...
9582         (exec_target_open): ... this.
9583         * gdbcore.h (core_target_open): Declare.
9584         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9585         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9586         add_inf_child_target.
9587         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9588         add_inf_child_target.
9589         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9590         add_inf_child_target.
9591         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9592         add_inf_child_target.
9593         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9594         add_inf_child_target.
9595         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9596         add_inf_child_target.
9597         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9598         add_inf_child_target.
9599         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9600         add_inf_child_target.
9601         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9602         add_inf_child_target.
9603         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9604         add_inf_child_target.
9605         * inf-child.c (inf_child_target_info): New.
9606         (inf_child_target::info): New.
9607         (inf_child_open_target): Remove 'target' parameter.  Use
9608         get_native_target instead.
9609         (inf_child_target::open): Delete.
9610         (add_inf_child_target): New.
9611         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9612         Delete.
9613         <info>: New.
9614         (add_inf_child_target): Declare.
9615         (inf_child_open_target): Declare.
9616         * linux-thread-db.c (thread_db_target_info): New.
9617         (thread_db_target) <shortname, longname, doc>: Delete.
9618         <info>: New.
9619         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9620         add_inf_child_target.
9621         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9622         add_inf_child_target.
9623         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9624         add_inf_child_target.
9625         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9626         add_inf_child_target.
9627         * make-target-delegates (print_class): Adjust.
9628         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9629         add_inf_child_target.
9630         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9631         add_inf_child_target.
9632         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9633         add_inf_child_target.
9634         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9635         add_inf_child_target.
9636         * nto-procfs.c (nto_native_target_info): New.
9637         (nto_procfs_target_native) <shortname, longname, doc>:
9638         Delete.
9639         <info>: New.
9640         (nto_procfs_target_info): New.
9641         (nto_procfs_target_procfs) <shortname, longname, doc>:
9642         Delete.
9643         <info>: New.
9644         (init_procfs_targets): Adjust.
9645         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9646         add_inf_child_target.
9647         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9648         add_inf_child_target.
9649         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9650         add_inf_child_target.
9651         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9652         add_inf_child_target.
9653         * ravenscar-thread.c (ravenscar_target_info): New.
9654         (ravenscar_thread_target) <shortname, longname, doc>:
9655         Delete.
9656         <info>: New.
9657         * record-btrace.c (record_btrace_target_info):
9658         (record_btrace_target) <shortname, longname, doc>: Delete.
9659         <info>: New.
9660         (record_btrace_target::open): Rename to ...
9661         (record_btrace_target_open): ... this.  Adjust.
9662         * record-full.c (record_longname, record_doc): New.
9663         (record_full_base_target) <shortname, longname, doc>: Delete.
9664         <info>: New.
9665         (record_full_target_info): New.
9666         (record_full_target): <shortname>: Delete.
9667         <info>: New.
9668         (record_full_core_open_1, record_full_open_1): Update comments.
9669         (record_full_base_target::open): Rename to ...
9670         (record_full_open): ... this.
9671         (cmd_record_full_restore): Update.
9672         (_initialize_record_full): Update.
9673         * remote-sim.c (remote_sim_target_info): New.
9674         (gdbsim_target) <shortname, longname, doc>: Delete.
9675         <info>: New.
9676         (gdbsim_target::open): Rename to ...
9677         (gdbsim_target_open): ... this.
9678         (_initialize_remote_sim): Adjust.
9679         * remote.c (remote_doc): New.
9680         (remote_target_info): New.
9681         (remote_target) <shortname, longname, doc>: Delete.
9682         <info>: New.
9683         (extended_remote_target_info): New.
9684         (extended_remote_target) <shortname, longname, doc>: Delete.
9685         <info>: New.
9686         (remote_target::open_1): Make static.  Adjust.
9687         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9688         * s390-linux-nat.c (_initialize_s390_nat): Use
9689         add_inf_child_target.
9690         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9691         add_inf_child_target.
9692         * sol-thread.c (thread_db_target_info): New.
9693         (sol_thread_target) <shortname, longname, doc>: Delete.
9694         <info>: New.
9695         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9696         add_inf_child_target.
9697         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9698         add_inf_child_target.
9699         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9700         add_inf_child_target.
9701         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9702         add_inf_child_target.
9703         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9704         add_inf_child_target.
9705         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9706         add_inf_child_target.
9707         * spu-linux-nat.c (_initialize_spu_nat): Use
9708         add_inf_child_target.
9709         * spu-multiarch.c (spu_multiarch_target_info): New.
9710         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9711         <info>: New.
9712         * target-delegates.c: Regenerate.
9713         * target.c: Include <unordered_map>.
9714         (target_ops_p): Delete.
9715         (DEF_VEC_P(target_ops_p)): Delete.
9716         (target_factories): New.
9717         (test_target_info): New.
9718         (test_target_ops::info): New.
9719         (open_target): Adjust to use target_factories.
9720         (add_target_with_completer): Rename to ...
9721         (add_target): ... this.  Change prototype.  Register target_info
9722         and open callback in target_factories.  Register target_info in
9723         command context instead of target_ops.
9724         (add_target): Delete old implementation.
9725         (add_deprecated_target_alias): Change prototype.  Adjust.
9726         (the_native_target): New.
9727         (set_native_target, get_native_target): New.
9728         (find_default_run_target): Use the_native_target.
9729         (find_attach_target, find_run_target): Simplify.
9730         (target_ops::open): Delete.
9731         (dummy_target_info): New.
9732         (dummy_target::shortname, dummy_target::longname)
9733         (dummy_target::doc): Delete.
9734         (dummy_target::info): New.
9735         (debug_target::shortname, debug_target::longname)
9736         (debug_target::doc): Delete.
9737         (debug_target::info): New.
9738         * target.h (struct target_info): New.
9739         (target_ops::~target_ops): Add comment.
9740         (target_ops::info): New.
9741         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9742         longer virtual.  Implement in terms of target_info.
9743         (set_native_target, get_native_target): Declare.
9744         (target_open_ftype): New.
9745         (add_target, add_target_with_completer)
9746         (add_deprecated_target_alias): Change prototype.
9747         (test_target) <shortname, longname, doc>: Delete.
9748         <info>: New.
9749         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9750         add_inf_child_target.
9751         * tracefile-tfile.c (tfile_target_info): New.
9752         (tfile_target) <shortname, longname, doc>: Delete.
9753         <info>: New.
9754         (tfile_target::open): Rename to ...
9755         (tfile_target_open): ... this.
9756         (_initialize_tracefile_tfile): Adjust.
9757         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9758         add_inf_child_target.
9759         * windows-nat.c (_initialize_windows_nat): Use
9760         add_inf_child_target.
9761         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9762         add_inf_child_target.
9763
9764 2018-05-02  Pedro Alves  <palves@redhat.com>
9765
9766         * linux-nat.h (linux_nat_target) <low_new_thread,
9767         low_delete_thread, low_new_fork, low_forget_process,
9768         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9769         New virtual methods.
9770         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9771         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9772         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9773         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9774         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9775         Delete.
9776         * linux-fork.c (delete_fork): Adjust to call low method.
9777         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9778         (linux_nat_new_fork, linux_nat_forget_process_hook)
9779         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9780         (linux_nat_status_is_event):
9781         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9782         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9783         to call low method.
9784         (sigtrap_is_event): Rename to ...
9785         (linux_nat_target::low_status_is_event): ... this.
9786         (linux_nat_set_status_is_event): Delete.
9787         (save_stop_reason, linux_nat_wait_1)
9788         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9789         low methods.
9790         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9791         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9792         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9793         (linux_nat_set_prepare_to_resume): Delete.
9794         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9795         low virtual methods.
9796         * amd64-linux-nat.c: Likewise.
9797         * arm-linux-nat.c: Likewise.
9798         * i386-linux-nat.c: Likewise.
9799         * ia64-linux-nat.c: Likewise.
9800         * mips-linux-nat.c: Likewise.
9801         * ppc-linux-nat.c: Likewise.
9802         * s390-linux-nat.c: Likewise.
9803         * sparc64-linux-nat.c: Likewise.
9804         * x86-linux-nat.c: Likewise.
9805         * x86-linux-nat.h: Include "nat/x86-linux.h".
9806         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9807         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9808         Override methods.
9809
9810 2018-05-02  Pedro Alves  <palves@redhat.com>
9811
9812         * target.h (target_ops)
9813         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9814         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9815         stopped_by_watchpoint, have_continuable_watchpoint,
9816         stopped_data_address, watchpoint_addr_within_range,
9817         can_accel_watchpoint_condition, can_run, thread_alive,
9818         has_all_memory, has_memory, has_stack, has_registers,
9819         has_execution, can_async_p, is_async_p, supports_non_stop,
9820         always_non_stop_p, can_execute_reverse, supports_multi_process,
9821         supports_enable_disable_tracepoint,
9822         supports_disable_randomization, supports_string_tracing,
9823         supports_evaluation_of_breakpoint_conditions,
9824         can_run_breakpoint_commands, filesystem_is_local,
9825         can_download_tracepoint, get_trace_state_variable_value,
9826         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9827         record_is_replaying, record_will_replay,
9828         augmented_libraries_svr4_read>: Adjust to return bool.
9829         * aarch64-linux-nat.c: All implementations adjusted.
9830         * aix-thread.c: All implementations adjusted.
9831         * arm-linux-nat.c: All implementations adjusted.
9832         * breakpoint.c: All implementations adjusted.
9833         * bsd-kvm.c: All implementations adjusted.
9834         * bsd-uthread.c: All implementations adjusted.
9835         * corelow.c: All implementations adjusted.
9836         * ctf.c: All implementations adjusted.
9837         * darwin-nat.c: All implementations adjusted.
9838         * darwin-nat.h: All implementations adjusted.
9839         * exec.c: All implementations adjusted.
9840         * fbsd-nat.c: All implementations adjusted.
9841         * fbsd-nat.h: All implementations adjusted.
9842         * gnu-nat.c: All implementations adjusted.
9843         * gnu-nat.h: All implementations adjusted.
9844         * go32-nat.c: All implementations adjusted.
9845         * ia64-linux-nat.c: All implementations adjusted.
9846         * inf-child.c: All implementations adjusted.
9847         * inf-child.h: All implementations adjusted.
9848         * inf-ptrace.c: All implementations adjusted.
9849         * inf-ptrace.h: All implementations adjusted.
9850         * linux-nat.c: All implementations adjusted.
9851         * linux-nat.h: All implementations adjusted.
9852         * mips-linux-nat.c: All implementations adjusted.
9853         * nto-procfs.c: All implementations adjusted.
9854         * ppc-linux-nat.c: All implementations adjusted.
9855         * procfs.c: All implementations adjusted.
9856         * ravenscar-thread.c: All implementations adjusted.
9857         * record-btrace.c: All implementations adjusted.
9858         * record-full.c: All implementations adjusted.
9859         * remote-sim.c: All implementations adjusted.
9860         * remote.c: All implementations adjusted.
9861         * s390-linux-nat.c: All implementations adjusted.
9862         * sol-thread.c: All implementations adjusted.
9863         * spu-multiarch.c: All implementations adjusted.
9864         * target-delegates.c: All implementations adjusted.
9865         * target.c: All implementations adjusted.
9866         * target.h: All implementations adjusted.
9867         * tracefile-tfile.c: All implementations adjusted.
9868         * tracefile.c: All implementations adjusted.
9869         * tracefile.h: All implementations adjusted.
9870         * windows-nat.c: All implementations adjusted.
9871         * x86-linux-nat.h: All implementations adjusted.
9872         * x86-nat.h: All implementations adjusted.
9873
9874 2018-05-02  Pedro Alves  <palves@redhat.com>
9875
9876         * make-target-delegates (scan_target_h): Don't trim lines here.
9877         Replace sequences of tabs and/or whitespace with a single
9878         whitespace.
9879         (top level, parsing methods): Trim each line before processing it
9880         here.
9881
9882 2018-05-02  Pedro Alves  <palves@redhat.com>
9883             John Baldwin  <jhb@freebsd.org>
9884
9885         * target.h (enum strata) <debug_stratum>: New.
9886         (struct target_ops) <all delegation methods>: Replace by C++
9887         virtual methods, and drop "to_" prefix.  All references updated
9888         throughout.
9889         <to_shortname, to_longname, to_doc, to_data,
9890         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9891         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9892         virtual methods.  All references updated throughout.
9893         <can_attach, supports_terminal_ours, can_create_inferior,
9894         get_thread_control_capabilities, attach_no_wait>: New
9895         virtual methods.
9896         <insert_breakpoint, remove_breakpoint>: Now
9897         TARGET_DEFAULT_NORETURN methods.
9898         <info_proc>: Now returns bool.
9899         <to_magic>: Delete.
9900         (OPS_MAGIC): Delete.
9901         (current_target): Delete.  All references replaced by references
9902         to ...
9903         (target_stack): ... this.  New.
9904         (target_shortname, target_longname): Adjust.
9905         (target_can_run): Now a function declaration.
9906         (default_child_has_all_memory, default_child_has_memory)
9907         (default_child_has_stack, default_child_has_registers)
9908         (default_child_has_execution): Remove target_ops parameter.
9909         (complete_target_initialization): Delete.
9910         (memory_breakpoint_target): New template class.
9911         (test_target_ops): Refactor as a C++ class with virtual methods.
9912         * make-target-delegates (NAME_PART): Tighten.
9913         (POINTER_PART, CP_SYMBOL): New.
9914         (SIMPLE_RETURN_PART): Reimplement.
9915         (VEC_RETURN_PART): Expect less.
9916         (RETURN_PART, VIRTUAL_PART): New.
9917         (METHOD): Adjust to C++ virtual methods.
9918         (scan_target_h): Remove reference to C99.
9919         (dname): Output "target_ops::" prefix.
9920         (write_function_header): Adjust to output a C++ class method.
9921         (write_declaration): New.
9922         (write_delegator): Adjust to output a C++ class method.
9923         (tdname): Output "dummy_target::" prefix.
9924         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9925         method.
9926         (tdefault_names, debug_names): Delete.
9927         (return_types, tdefaults, styles, argtypes_array): New.
9928         (top level): All methods are delegators.
9929         (print_class): New.
9930         (top level): Print dummy_target and debug_target classes.
9931         * target-delegates.c: Regenerate.
9932         * target-debug.h (target_debug_print_enum_info_proc_what)
9933         (target_debug_print_thread_control_capabilities)
9934         (target_debug_print_thread_info_p): New.
9935         * target.c (dummy_target): Delete.
9936         (the_dummy_target, the_debug_target): New.
9937         (target_stack): Now extern.
9938         (set_targetdebug): Push/unpush debug target.
9939         (default_child_has_all_memory, default_child_has_memory)
9940         (default_child_has_stack, default_child_has_registers)
9941         (default_child_has_execution): Remove target_ops parameter.
9942         (complete_target_initialization): Delete.
9943         (add_target_with_completer): No longer call
9944         complete_target_initialization.
9945         (target_supports_terminal_ours): Use regular delegation.
9946         (update_current_target): Delete.
9947         (push_target): No longer check magic number.  Don't call
9948         update_current_target.
9949         (unpush_target): Don't call update_current_target.
9950         (target_is_pushed): No longer check magic number.
9951         (target_require_runnable): Skip for all stratums over
9952         process_stratum.
9953         (target_ops::info_proc): New.
9954         (target_info_proc): Use find_target_at and
9955         find_default_run_target.
9956         (target_supports_disable_randomization): Use regular delegation.
9957         (target_get_osdata): Use find_target_at.
9958         (target_ops::open, target_ops::close, target_ops::can_attach)
9959         (target_ops::attach, target_ops::can_create_inferior)
9960         (target_ops::create_inferior, target_ops::can_run)
9961         (target_can_run): New.
9962         (default_fileio_target): Use regular delegation.
9963         (target_ops::fileio_open, target_ops::fileio_pwrite)
9964         (target_ops::fileio_pread, target_ops::fileio_fstat)
9965         (target_ops::fileio_close, target_ops::fileio_unlink)
9966         (target_ops::fileio_readlink): New.
9967         (target_fileio_open_1, target_fileio_unlink)
9968         (target_fileio_readlink): Always call the target method.  Handle
9969         FILEIO_ENOSYS.
9970         (return_zero, return_zero_has_execution): Delete.
9971         (init_dummy_target): Delete.
9972         (dummy_target::dummy_target, dummy_target::shortname)
9973         (dummy_target::longname, dummy_target::doc)
9974         (debug_target::debug_target, debug_target::shortname)
9975         (debug_target::longname, debug_target::doc): New.
9976         (target_supports_delete_record): Use regular delegation.
9977         (setup_target_debug): Delete.
9978         (maintenance_print_target_stack): Skip debug_stratum.
9979         (initialize_targets): Instantiate the_dummy_target and
9980         the_debug_target.
9981         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9982         use target_stack.
9983         (target_auxv_search, fprint_target_auxv): Adjust.
9984         (info_auxv_command): Adjust to use target_stack.
9985         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9986         * exceptions.c (print_flush): Handle a NULL target_stack.
9987         * regcache.c (target_ops_no_register): Refactor as class with
9988         virtual methods.
9989
9990         * exec.c (exec_target): New class.
9991         (exec_ops): Now an exec_target.
9992         (exec_open, exec_close_1, exec_get_section_table)
9993         (exec_xfer_partial, exec_files_info, exec_has_memory)
9994         (exec_make_note_section): Refactor as exec_target methods.
9995         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9996         Delete.
9997         (exec_target::find_memory_regions): New.
9998         (_initialize_exec): Don't call init_exec_ops.
9999         * gdbcore.h (exec_file_clear): Delete.
10000
10001         * corefile.c (core_target): Delete.
10002         (core_file_command): Adjust.
10003         * corelow.c (core_target): New class.
10004         (the_core_target): New.
10005         (core_close): Remove target_ops parameter.
10006         (core_close_cleanup): Adjust.
10007         (core_target::close): New.
10008         (core_open, core_detach, get_core_registers, core_files_info)
10009         (core_xfer_partial, core_thread_alive, core_read_description)
10010         (core_pid_to_str, core_thread_name, core_has_memory)
10011         (core_has_stack, core_has_registers, core_info_proc): Rework as
10012         core_target methods.
10013         (ignore, core_remove_breakpoint, init_core_ops): Delete.
10014         (_initialize_corelow): Initialize the_core_target.
10015         * gdbcore.h (core_target): Delete.
10016         (the_core_target): New.
10017
10018         * ctf.c: (ctf_target): New class.
10019         (ctf_ops): Now a ctf_target.
10020         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
10021         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
10022         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
10023         methods.
10024         (init_ctf_ops): Delete.
10025         (_initialize_ctf): Don't call it.
10026         * tracefile-tfile.c (tfile_target): New class.
10027         (tfile_ops): Now a tfile_target.
10028         (tfile_open, tfile_close, tfile_files_info)
10029         (tfile_get_tracepoint_status, tfile_trace_find)
10030         (tfile_fetch_registers, tfile_xfer_partial)
10031         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
10032         Refactor as tfile_target methods.
10033         (tfile_xfer_partial_features): Remove target_ops parameter.
10034         (init_tfile_ops): Delete.
10035         (_initialize_tracefile_tfile): Don't call it.
10036         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
10037         (tracefile_has_stack, tracefile_has_registers)
10038         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
10039         tracefile_target methods.
10040         (init_tracefile_ops): Delete.
10041         (tracefile_target::tracefile_target): New.
10042         * tracefile.h: Include "target.h".
10043         (tracefile_target): New class.
10044         (init_tracefile_ops): Delete.
10045
10046         * spu-multiarch.c (spu_multiarch_target): New class.
10047         (spu_ops): Now a spu_multiarch_target.
10048         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
10049         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
10050         (spu_search_memory, spu_mourn_inferior): Refactor as
10051         spu_multiarch_target methods.
10052         (init_spu_ops): Delete.
10053         (_initialize_spu_multiarch): Remove references to init_spu_ops,
10054         complete_target_initialization.
10055
10056         * ravenscar-thread.c (ravenscar_thread_target): New class.
10057         (ravenscar_ops): Now a ravenscar_thread_target.
10058         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
10059         (ravenscar_thread_alive, ravenscar_pid_to_str)
10060         (ravenscar_fetch_registers, ravenscar_store_registers)
10061         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
10062         (ravenscar_stopped_by_hw_breakpoint)
10063         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
10064         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
10065         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
10066         methods.
10067         (init_ravenscar_thread_ops): Delete.
10068         (_initialize_ravenscar): Remove references to
10069         init_ravenscar_thread_ops and complete_target_initialization.
10070
10071         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
10072         (bsd_uthread_target): New class.
10073         (bsd_uthread_ops): Now a bsd_uthread_target.
10074         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
10075         (bsd_uthread_close, bsd_uthread_mourn_inferior)
10076         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
10077         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
10078         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
10079         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
10080         (bsd_uthread_target): Delete function.
10081         (_initialize_bsd_uthread): Remove reference to
10082         complete_target_initialization.
10083
10084         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
10085         (target_bfd): ... this new class.
10086         (target_bfd_xfer_partial, target_bfd_get_section_table)
10087         (target_bfd_close): Refactor as target_bfd methods.
10088         (target_bfd::~target_bfd): New.
10089         (target_bfd_reopen): Adjust.
10090         (target_bfd::close): New.
10091
10092         * record-btrace.c (record_btrace_target): New class.
10093         (record_btrace_ops): Now a record_btrace_target.
10094         (record_btrace_open, record_btrace_stop_recording)
10095         (record_btrace_disconnect, record_btrace_close)
10096         (record_btrace_async, record_btrace_info)
10097         (record_btrace_insn_history, record_btrace_insn_history_range)
10098         (record_btrace_insn_history_from, record_btrace_call_history)
10099         (record_btrace_call_history_range)
10100         (record_btrace_call_history_from, record_btrace_record_method)
10101         (record_btrace_is_replaying, record_btrace_will_replay)
10102         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
10103         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
10104         (record_btrace_store_registers, record_btrace_prepare_to_store)
10105         (record_btrace_to_get_unwinder)
10106         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
10107         (record_btrace_commit_resume, record_btrace_wait)
10108         (record_btrace_stop, record_btrace_can_execute_reverse)
10109         (record_btrace_stopped_by_sw_breakpoint)
10110         (record_btrace_supports_stopped_by_sw_breakpoint)
10111         (record_btrace_stopped_by_hw_breakpoint)
10112         (record_btrace_supports_stopped_by_hw_breakpoint)
10113         (record_btrace_update_thread_list, record_btrace_thread_alive)
10114         (record_btrace_goto_begin, record_btrace_goto_end)
10115         (record_btrace_goto, record_btrace_stop_replaying_all)
10116         (record_btrace_execution_direction)
10117         (record_btrace_prepare_to_generate_core)
10118         (record_btrace_done_generating_core): Refactor as
10119         record_btrace_target methods.
10120         (init_record_btrace_ops): Delete.
10121         (_initialize_record_btrace): Remove reference to
10122         init_record_btrace_ops.
10123         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
10124         the execution_direction global.
10125         (record_full_base_target, record_full_target)
10126         (record_full_core_target): New classes.
10127         (record_full_ops): Now a record_full_target.
10128         (record_full_core_ops): Now a record_full_core_target.
10129         (record_full_target::detach, record_full_target::disconnect)
10130         (record_full_core_target::disconnect)
10131         (record_full_target::mourn_inferior, record_full_target::kill):
10132         New.
10133         (record_full_open, record_full_close, record_full_async): Refactor
10134         as methods of the record_full_base_target class.
10135         (record_full_resume, record_full_commit_resume): Refactor
10136         as methods of the record_full_target class.
10137         (record_full_wait, record_full_stopped_by_watchpoint)
10138         (record_full_stopped_data_address)
10139         (record_full_stopped_by_sw_breakpoint)
10140         (record_full_supports_stopped_by_sw_breakpoint)
10141         (record_full_stopped_by_hw_breakpoint)
10142         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
10143         methods of the record_full_base_target class.
10144         (record_full_store_registers, record_full_xfer_partial)
10145         (record_full_insert_breakpoint, record_full_remove_breakpoint):
10146         Refactor as methods of the record_full_target class.
10147         (record_full_can_execute_reverse, record_full_get_bookmark)
10148         (record_full_goto_bookmark, record_full_execution_direction)
10149         (record_full_record_method, record_full_info, record_full_delete)
10150         (record_full_is_replaying, record_full_will_replay)
10151         (record_full_goto_begin, record_full_goto_end, record_full_goto)
10152         (record_full_stop_replaying): Refactor as methods of the
10153         record_full_base_target class.
10154         (record_full_core_resume, record_full_core_kill)
10155         (record_full_core_fetch_registers)
10156         (record_full_core_prepare_to_store)
10157         (record_full_core_store_registers, record_full_core_xfer_partial)
10158         (record_full_core_insert_breakpoint)
10159         (record_full_core_remove_breakpoint)
10160         (record_full_core_has_execution): Refactor
10161         as methods of the record_full_core_target class.
10162         (record_full_base_target::supports_delete_record): New.
10163         (init_record_full_ops): Delete.
10164         (init_record_full_core_ops): Delete.
10165         (record_full_save): Refactor as method of the
10166         record_full_base_target class.
10167         (_initialize_record_full): Remove references to
10168         init_record_full_ops and init_record_full_core_ops.
10169
10170         * remote.c (remote_target, extended_remote_target): New classes.
10171         (remote_ops): Now a remote_target.
10172         (extended_remote_ops): Now an extended_remote_target.
10173         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
10174         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
10175         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
10176         (remote_pass_signals, remote_set_syscall_catchpoint)
10177         (remote_program_signals, )
10178         (remote_thread_always_alive): Remove target_ops parameter.
10179         (remote_thread_alive, remote_thread_name)
10180         (remote_update_thread_list, remote_threads_extra_info)
10181         (remote_static_tracepoint_marker_at)
10182         (remote_static_tracepoint_markers_by_strid)
10183         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
10184         (remote_open): Refactor as methods of remote_target.
10185         (extended_remote_open, extended_remote_detach)
10186         (extended_remote_attach, extended_remote_post_attach):
10187         (extended_remote_supports_disable_randomization)
10188         (extended_remote_create_inferior): : Refactor as method of
10189         extended_remote_target.
10190         (remote_set_permissions, remote_open_1, remote_detach)
10191         (remote_follow_fork, remote_follow_exec, remote_disconnect)
10192         (remote_resume, remote_commit_resume, remote_stop)
10193         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
10194         (remote_terminal_ours, remote_wait, remote_fetch_registers)
10195         (remote_prepare_to_store, remote_store_registers)
10196         (remote_flash_erase, remote_flash_done, remote_files_info)
10197         (remote_kill, remote_mourn, remote_insert_breakpoint)
10198         (remote_remove_breakpoint, remote_insert_watchpoint)
10199         (remote_watchpoint_addr_within_range)
10200         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
10201         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
10202         (remote_supports_stopped_by_sw_breakpoint)
10203         (remote_stopped_by_hw_breakpoint)
10204         (remote_supports_stopped_by_hw_breakpoint)
10205         (remote_stopped_by_watchpoint, remote_stopped_data_address)
10206         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
10207         (remote_verify_memory): Refactor as methods of remote_target.
10208         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
10209         parameter.
10210         (remote_xfer_partial, remote_get_memory_xfer_limit)
10211         (remote_search_memory, remote_rcmd, remote_memory_map)
10212         (remote_pid_to_str, remote_get_thread_local_address)
10213         (remote_get_tib_address, remote_read_description): Refactor as
10214         methods of remote_target.
10215         (remote_target::fileio_open, remote_target::fileio_pwrite)
10216         (remote_target::fileio_pread, remote_target::fileio_close): New.
10217         (remote_hostio_readlink, remote_hostio_fstat)
10218         (remote_filesystem_is_local, remote_can_execute_reverse)
10219         (remote_supports_non_stop, remote_supports_disable_randomization)
10220         (remote_supports_multi_process, remote_supports_cond_breakpoints)
10221         (remote_supports_enable_disable_tracepoint)
10222         (remote_supports_string_tracing)
10223         (remote_can_run_breakpoint_commands, remote_trace_init)
10224         (remote_download_tracepoint, remote_can_download_tracepoint)
10225         (remote_download_trace_state_variable, remote_enable_tracepoint)
10226         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
10227         (remote_trace_start, remote_get_trace_status)
10228         (remote_get_tracepoint_status, remote_trace_stop)
10229         (remote_trace_find, remote_get_trace_state_variable_value)
10230         (remote_save_trace_data, remote_get_raw_trace_data)
10231         (remote_set_disconnected_tracing, remote_core_of_thread)
10232         (remote_set_circular_trace_buffer, remote_traceframe_info)
10233         (remote_get_min_fast_tracepoint_insn_len)
10234         (remote_set_trace_buffer_size, remote_set_trace_notes)
10235         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10236         (remote_disable_btrace, remote_teardown_btrace)
10237         (remote_read_btrace, remote_btrace_conf)
10238         (remote_augmented_libraries_svr4_read, remote_load)
10239         (remote_pid_to_exec_file, remote_can_do_single_step)
10240         (remote_execution_direction, remote_thread_handle_to_thread_info):
10241         Refactor as methods of remote_target.
10242         (init_remote_ops, init_extended_remote_ops): Delete.
10243         (remote_can_async_p, remote_is_async_p, remote_async)
10244         (remote_thread_events, remote_upload_tracepoints)
10245         (remote_upload_trace_state_variables): Refactor as methods of
10246         remote_target.
10247         (_initialize_remote): Remove references to init_remote_ops and
10248         init_extended_remote_ops.
10249
10250         * remote-sim.c (gdbsim_target): New class.
10251         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10252         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10253         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10254         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10255         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10256         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10257         Refactor as methods of gdbsim_target.
10258         (gdbsim_ops): Now a gdbsim_target.
10259         (init_gdbsim_ops): Delete.
10260         (gdbsim_cntrl_c): Adjust.
10261         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10262
10263         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10264         (the_amd64_linux_nat_target): New.
10265         (amd64_linux_fetch_inferior_registers)
10266         (amd64_linux_store_inferior_registers): Refactor as methods of
10267         amd64_linux_nat_target.
10268         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10269         * i386-linux-nat.c: Don't include "linux-nat.h".
10270         (i386_linux_nat_target): New class.
10271         (the_i386_linux_nat_target): New.
10272         (i386_linux_fetch_inferior_registers)
10273         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10274         as methods of i386_linux_nat_target.
10275         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10276         * inf-child.c (inf_child_ops): Delete.
10277         (inf_child_fetch_inferior_registers)
10278         (inf_child_store_inferior_registers): Delete.
10279         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10280         methods of inf_child_target.
10281         (inf_child_target::supports_terminal_ours)
10282         (inf_child_target::terminal_init)
10283         (inf_child_target::terminal_inferior)
10284         (inf_child_target::terminal_ours_for_output)
10285         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10286         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10287         New.
10288         (inf_child_open, inf_child_disconnect, inf_child_close)
10289         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10290         (inf_child_post_startup_inferior, inf_child_can_run)
10291         (inf_child_pid_to_exec_file): Refactor as methods of
10292         inf_child_target.
10293         (inf_child_follow_fork): Delete.
10294         (inf_child_target::can_create_inferior)
10295         (inf_child_target::can_attach): New.
10296         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10297         (inf_child_target::has_stack, inf_child_target::has_registers)
10298         (inf_child_target::has_execution): New.
10299         (inf_child_fileio_open, inf_child_fileio_pwrite)
10300         (inf_child_fileio_pread, inf_child_fileio_fstat)
10301         (inf_child_fileio_close, inf_child_fileio_unlink)
10302         (inf_child_fileio_readlink, inf_child_use_agent)
10303         (inf_child_can_use_agent): Refactor as methods of
10304         inf_child_target.
10305         (return_zero, inf_child_target): Delete.
10306         (inf_child_target::inf_child_target): New.
10307         * inf-child.h: Include "target.h".
10308         (inf_child_target): Delete function prototype.
10309         (inf_child_target): New class.
10310         (inf_child_open_target, inf_child_mourn_inferior)
10311         (inf_child_maybe_unpush_target): Delete.
10312         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10313         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10314         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10315         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10316         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10317         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10318         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10319         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10320         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10321         methods of inf_ptrace_target.
10322         (inf_ptrace_target): Delete function.
10323         * inf-ptrace.h: Include "inf-child.h".
10324         (inf_ptrace_target): Delete function declaration.
10325         (inf_ptrace_target): New class.
10326         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10327         * linux-nat.c (linux_target): New.
10328         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10329         (linux_nat_target::~linux_nat_target): New.
10330         (linux_child_post_attach, linux_child_post_startup_inferior)
10331         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10332         (linux_child_remove_fork_catchpoint)
10333         (linux_child_insert_vfork_catchpoint)
10334         (linux_child_remove_vfork_catchpoint)
10335         (linux_child_insert_exec_catchpoint)
10336         (linux_child_remove_exec_catchpoint)
10337         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10338         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10339         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10340         (linux_nat_stopped_data_address)
10341         (linux_nat_stopped_by_sw_breakpoint)
10342         (linux_nat_supports_stopped_by_sw_breakpoint)
10343         (linux_nat_stopped_by_hw_breakpoint)
10344         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10345         (linux_nat_kill, linux_nat_mourn_inferior)
10346         (linux_nat_xfer_partial, linux_nat_thread_alive)
10347         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10348         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10349         (linux_child_static_tracepoint_markers_by_strid)
10350         (linux_nat_is_async_p, linux_nat_can_async_p)
10351         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10352         (linux_nat_supports_multi_process)
10353         (linux_nat_supports_disable_randomization, linux_nat_async)
10354         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10355         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10356         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10357         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10358         methods of linux_nat_target.
10359         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10360         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10361         parameter.
10362         (check_stopped_by_watchpoint): Adjust.
10363         (linux_xfer_partial): Delete.
10364         (linux_target_install_ops, linux_target, linux_nat_add_target):
10365         Delete.
10366         (linux_nat_target::linux_nat_target): New.
10367         * linux-nat.h: Include "inf-ptrace.h".
10368         (linux_nat_target): New.
10369         (linux_target, linux_target_install_ops, linux_nat_add_target):
10370         Delete function declarations.
10371         (linux_target): Declare global.
10372         * linux-thread-db.c (thread_db_target): New.
10373         (thread_db_target::thread_db_target): New.
10374         (thread_db_ops): Delete.
10375         (the_thread_db_target): New.
10376         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10377         (thread_db_update_thread_list, thread_db_pid_to_str)
10378         (thread_db_extra_thread_info)
10379         (thread_db_thread_handle_to_thread_info)
10380         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10381         (thread_db_resume): Refactor as methods of thread_db_target.
10382         (init_thread_db_ops): Delete.
10383         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10384         * x86-linux-nat.c: Don't include "linux-nat.h".
10385         (super_post_startup_inferior): Delete.
10386         (x86_linux_nat_target::~x86_linux_nat_target): New.
10387         (x86_linux_child_post_startup_inferior)
10388         (x86_linux_read_description, x86_linux_enable_btrace)
10389         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10390         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10391         methods of x86_linux_nat_target.
10392         (x86_linux_create_target): Delete.  Bits folded ...
10393         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10394         pointer.
10395         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10396         (x86_linux_nat_target): New class.
10397         (x86_linux_create_target): Delete.
10398         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10399         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10400         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10401         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10402         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10403         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10404         make extern.
10405         (x86_use_watchpoints): Delete.
10406         * x86-nat.h: Include "breakpoint.h" and "target.h".
10407         (x86_use_watchpoints): Delete.
10408         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10409         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10410         (x86_insert_watchpoint, x86_remove_watchpoint)
10411         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10412         (x86_stopped_by_hw_breakpoint): New declarations.
10413         (x86_nat_target): New template class.
10414
10415         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10416         (the_ppc_linux_nat_target): New.
10417         (ppc_linux_fetch_inferior_registers)
10418         (ppc_linux_can_use_hw_breakpoint)
10419         (ppc_linux_region_ok_for_hw_watchpoint)
10420         (ppc_linux_ranged_break_num_registers)
10421         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10422         (ppc_linux_insert_mask_watchpoint)
10423         (ppc_linux_remove_mask_watchpoint)
10424         (ppc_linux_can_accel_watchpoint_condition)
10425         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10426         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10427         (ppc_linux_watchpoint_addr_within_range)
10428         (ppc_linux_masked_watch_num_registers)
10429         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10430         (ppc_linux_read_description): Refactor as methods of
10431         ppc_linux_nat_target.
10432         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10433
10434         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10435         (procfs_target): New class.
10436         (the_procfs_target): New.
10437         (procfs_target): Delete function.
10438         (procfs_auxv_parse, procfs_attach, procfs_detach)
10439         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10440         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10441         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10442         (procfs_create_inferior, procfs_update_thread_list)
10443         (procfs_thread_alive, procfs_pid_to_str)
10444         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10445         (procfs_stopped_data_address, procfs_insert_watchpoint)
10446         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10447         (proc_find_memory_regions, procfs_info_proc)
10448         (procfs_make_note_section): Refactor as methods of procfs_target.
10449         (_initialize_procfs): Adjust.
10450         * sol-thread.c (sol_thread_target): New class.
10451         (sol_thread_ops): Now a sol_thread_target.
10452         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10453         (sol_thread_fetch_registers, sol_thread_store_registers)
10454         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10455         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10456         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10457         (init_sol_thread_ops): Delete.
10458         (_initialize_sol_thread): Adjust.  Remove references to
10459         init_sol_thread_ops and complete_target_initialization.
10460
10461         * windows-nat.c (windows_nat_target): New class.
10462         (windows_fetch_inferior_registers)
10463         (windows_store_inferior_registers, windows_resume, windows_wait)
10464         (windows_attach, windows_detach, windows_pid_to_exec_file)
10465         (windows_files_info, windows_create_inferior)
10466         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10467         (windows_close, windows_pid_to_str, windows_xfer_partial)
10468         (windows_get_tib_address, windows_get_ada_task_ptid)
10469         (windows_thread_name, windows_thread_alive): Refactor as
10470         windows_nat_target methods.
10471         (do_initial_windows_stuff): Adjust.
10472         (windows_target): Delete function.
10473         (_initialize_windows_nat): Adjust.
10474
10475         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10476         (darwin_mourn_inferior, darwin_kill_inferior)
10477         (darwin_create_inferior, darwin_attach, darwin_detach)
10478         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10479         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10480         (darwin_supports_multi_process): Refactor as darwin_nat_target
10481         methods.
10482         (darwin_resume_to, darwin_files_info): Delete.
10483         (_initialize_darwin_inferior): Rename to ...
10484         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10485         * darwin-nat.h: Include "inf-child.h".
10486         (darwin_nat_target): New class.
10487         (darwin_complete_target): Delete.
10488         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10489         (darwin_target): New.
10490         (i386_darwin_fetch_inferior_registers)
10491         (i386_darwin_store_inferior_registers): Refactor as methods of
10492         darwin_nat_target.
10493         (darwin_complete_target): Delete, with ...
10494         (_initialize_i386_darwin_nat): ... bits factored out here.
10495
10496         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10497         (the_alpha_linux_nat_target): New.
10498         (alpha_linux_register_u_offset): Refactor as
10499         alpha_linux_nat_target method.
10500         (_initialize_alpha_linux_nat): Adjust.
10501         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10502         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10503         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10504         methods of linux_nat_trad_target.
10505         (linux_trad_target): Delete.
10506         * linux-nat-trad.h (linux_trad_target): Delete function.
10507         (linux_nat_trad_target): New class.
10508         * mips-linux-nat.c (mips_linux_nat_target): New class.
10509         (super_fetch_registers, super_store_registers, super_close):
10510         Delete.
10511         (the_mips_linux_nat_target): New.
10512         (mips64_linux_regsets_fetch_registers)
10513         (mips64_linux_regsets_store_registers)
10514         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10515         (mips_linux_register_u_offset, mips_linux_read_description)
10516         (mips_linux_can_use_hw_breakpoint)
10517         (mips_linux_stopped_by_watchpoint)
10518         (mips_linux_stopped_data_address)
10519         (mips_linux_region_ok_for_hw_watchpoint)
10520         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10521         (mips_linux_close): Refactor as methods of mips_linux_nat.
10522         (_initialize_mips_linux_nat): Adjust to C++ification.
10523
10524         * aix-thread.c (aix_thread_target): New class.
10525         (aix_thread_ops): Now an aix_thread_target.
10526         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10527         (aix_thread_fetch_registers, aix_thread_store_registers)
10528         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10529         (aix_thread_thread_alive, aix_thread_pid_to_str)
10530         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10531         Refactor as methods of aix_thread_target.
10532         (init_aix_thread_ops): Delete.
10533         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10534         and complete_target_initialization.
10535         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10536         (rs6000_nat_target): New class.
10537         (the_rs6000_nat_target): New.
10538         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10539         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10540         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10541         (super_create_inferior): Delete.
10542         (_initialize_rs6000_nat): Adjust to C++ification.
10543
10544         * arm-linux-nat.c (arm_linux_nat_target): New class.
10545         (the_arm_linux_nat_target): New.
10546         (arm_linux_fetch_inferior_registers)
10547         (arm_linux_store_inferior_registers, arm_linux_read_description)
10548         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10549         (arm_linux_remove_hw_breakpoint)
10550         (arm_linux_region_ok_for_hw_watchpoint)
10551         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10552         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10553         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10554         arm_linux_nat_target.
10555         (_initialize_arm_linux_nat): Adjust to C++ification.
10556
10557         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10558         (the_aarch64_linux_nat_target): New.
10559         (aarch64_linux_fetch_inferior_registers)
10560         (aarch64_linux_store_inferior_registers)
10561         (aarch64_linux_child_post_startup_inferior)
10562         (aarch64_linux_read_description)
10563         (aarch64_linux_can_use_hw_breakpoint)
10564         (aarch64_linux_insert_hw_breakpoint)
10565         (aarch64_linux_remove_hw_breakpoint)
10566         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10567         (aarch64_linux_region_ok_for_hw_watchpoint)
10568         (aarch64_linux_stopped_data_address)
10569         (aarch64_linux_stopped_by_watchpoint)
10570         (aarch64_linux_watchpoint_addr_within_range)
10571         (aarch64_linux_can_do_single_step): Refactor as methods of
10572         aarch64_linux_nat_target.
10573         (super_post_startup_inferior): Delete.
10574         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10575
10576         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10577         (the_hppa_linux_nat_target): New.
10578         (hppa_linux_fetch_inferior_registers)
10579         (hppa_linux_store_inferior_registers): Refactor as methods of
10580         hppa_linux_nat_target.
10581         (_initialize_hppa_linux_nat): Adjust to C++ification.
10582
10583         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10584         (the_ia64_linux_nat_target): New.
10585         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10586         (ia64_linux_stopped_data_address)
10587         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10588         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10589         ia64_linux_nat_target methods.
10590         (super_xfer_partial): Delete.
10591         (_initialize_ia64_linux_nat): Adjust to C++ification.
10592
10593         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10594         (the_m32r_linux_nat_target): New.
10595         (m32r_linux_fetch_inferior_registers)
10596         (m32r_linux_store_inferior_registers): Refactor as
10597         m32r_linux_nat_target methods.
10598         (_initialize_m32r_linux_nat): Adjust to C++ification.
10599
10600         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10601         (the_m68k_linux_nat_target): New.
10602         (m68k_linux_fetch_inferior_registers)
10603         (m68k_linux_store_inferior_registers): Refactor as
10604         m68k_linux_nat_target methods.
10605         (_initialize_m68k_linux_nat): Adjust to C++ification.
10606
10607         * s390-linux-nat.c (s390_linux_nat_target): New class.
10608         (the_s390_linux_nat_target): New.
10609         (s390_linux_fetch_inferior_registers)
10610         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10611         (s390_insert_watchpoint, s390_remove_watchpoint)
10612         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10613         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10614         (s390_auxv_parse, s390_read_description): Refactor as methods of
10615         s390_linux_nat_target.
10616         (_initialize_s390_nat): Adjust to C++ification.
10617
10618         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10619         (the_sparc_linux_nat_target): New.
10620         (_initialize_sparc_linux_nat): Adjust to C++ification.
10621         * sparc-nat.c (sparc_fetch_inferior_registers)
10622         (sparc_store_inferior_registers): Remove target_ops parameter.
10623         * sparc-nat.h (sparc_fetch_inferior_registers)
10624         (sparc_store_inferior_registers): Remove target_ops parameter.
10625         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10626         (the_sparc64_linux_nat_target): New.
10627         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10628
10629         * spu-linux-nat.c (spu_linux_nat_target): New class.
10630         (the_spu_linux_nat_target): New.
10631         (spu_child_post_startup_inferior, spu_child_post_attach)
10632         (spu_child_wait, spu_fetch_inferior_registers)
10633         (spu_store_inferior_registers, spu_xfer_partial)
10634         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10635         methods.
10636         (_initialize_spu_nat): Adjust to C++ification.
10637
10638         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10639         (the_tilegx_linux_nat_target): New.
10640         (fetch_inferior_registers, store_inferior_registers):
10641         Refactor as methods.
10642         (_initialize_tile_linux_nat): Adjust to C++ification.
10643
10644         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10645         (the_xtensa_linux_nat_target): New.
10646         (xtensa_linux_fetch_inferior_registers)
10647         (xtensa_linux_store_inferior_registers): Refactor as
10648         xtensa_linux_nat_target methods.
10649         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10650
10651         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10652         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10653         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10654         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10655         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10656         (fbsd_stopped_by_sw_breakpoint)
10657         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10658         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10659         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10660         (fbsd_post_startup_inferior, fbsd_post_attach)
10661         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10662         (fbsd_set_syscall_catchpoint)
10663         (super_xfer_partial, super_resume, super_wait)
10664         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10665         (fbsd_handle_debug_trap): Remove target_ops parameter.
10666         (fbsd_nat_add_target): Delete.
10667         * fbsd-nat.h: Include "inf-ptrace.h".
10668         (fbsd_nat_add_target): Delete.
10669         (USE_SIGTRAP_SIGINFO): Define.
10670         (fbsd_nat_target): New class.
10671
10672         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10673         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10674         (amd64bsd_target): Delete.
10675         * amd64-bsd-nat.h: New file.
10676         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10677         "x86-bsd-nat.h".
10678         (amd64_fbsd_nat_target): New class.
10679         (the_amd64_fbsd_nat_target): New.
10680         (amd64fbsd_read_description): Refactor as method of
10681         amd64_fbsd_nat_target.
10682         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10683         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10684         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10685         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10686         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10687         (i386bsd_target): Delete.
10688         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10689         (i386bsd_fetch_inferior_registers)
10690         (i386bsd_store_inferior_registers): Declare.
10691         (i386_bsd_nat_target): New class.
10692         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10693         (the_i386_fbsd_nat_target): New.
10694         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10695         i386_fbsd_nat_target methods.
10696         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10697         (_initialize_i386fbsd_nat): Adjust to C++ification.
10698         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10699         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10700         (_initialize_x86_bsd_nat): Adjust to C++ification.
10701         * x86-bsd-nat.h: Include "x86-nat.h".
10702         (x86bsd_target): Delete declaration.
10703         (x86bsd_nat_target): New class.
10704
10705         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10706         (the_aarch64_fbsd_nat_target): New.
10707         (aarch64_fbsd_fetch_inferior_registers)
10708         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10709         aarch64_fbsd_nat_target.
10710         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10711         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10712         (the_alpha_bsd_nat_target): New.
10713         (alphabsd_fetch_inferior_registers)
10714         (alphabsd_store_inferior_registers): Refactor as
10715         alpha_bsd_nat_target methods.
10716         (_initialize_alphabsd_nat): Refactor as methods of
10717         alpha_bsd_nat_target.
10718         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10719         (the_amd64_nbsd_nat_target): New.
10720         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10721         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10722         (the_amd64_obsd_nat_target): New.
10723         (_initialize_amd64obsd_nat): Adjust to C++ification.
10724         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10725         (the_arm_fbsd_nat_target): New.
10726         (arm_fbsd_fetch_inferior_registers)
10727         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10728         (_initialize_arm_fbsd_nat): Refactor as methods of
10729         arm_fbsd_nat_target.
10730         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10731         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10732         (the_arm_netbsd_nat_target): New.
10733         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10734         arm_netbsd_nat_target.
10735         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10736         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10737         (the_hppa_nbsd_nat_target): New.
10738         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10739         hppa_nbsd_nat_target methods.
10740         (_initialize_hppanbsd_nat): Adjust to C++ification.
10741         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10742         (the_hppa_obsd_nat_target): New.
10743         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10744         methods of hppa_obsd_nat_target.
10745         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10746         add_target.
10747         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10748         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10749         add_target.
10750         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10751         (_initialize_i386obsd_nat): Use add_target.
10752         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10753         (the_m68k_bsd_nat_target): New.
10754         (m68kbsd_fetch_inferior_registers)
10755         (m68kbsd_store_inferior_registers): Refactor as methods of
10756         m68k_bsd_nat_target.
10757         (_initialize_m68kbsd_nat): Adjust to C++ification.
10758         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10759         (the_mips_fbsd_nat_target): New.
10760         (mips_fbsd_fetch_inferior_registers)
10761         (mips_fbsd_store_inferior_registers): Refactor as methods of
10762         mips_fbsd_nat_target.
10763         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10764         add_target.
10765         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10766         (the_mips_nbsd_nat_target): New.
10767         (mipsnbsd_fetch_inferior_registers)
10768         (mipsnbsd_store_inferior_registers): Refactor as methods of
10769         mips_nbsd_nat_target.
10770         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10771         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10772         (the_mips64_obsd_nat_target): New.
10773         (mips64obsd_fetch_inferior_registers)
10774         (mips64obsd_store_inferior_registers): Refactor as methods of
10775         mips64_obsd_nat_target.
10776         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10777         add_target.
10778         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10779         nbsd_nat_target.
10780         * nbsd-nat.h: Include "inf-ptrace.h".
10781         (nbsd_nat_target): New class.
10782         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10783         (obsd_wait): Refactor as methods of obsd_nat_target.
10784         (obsd_add_target): Delete.
10785         * obsd-nat.h: Include "inf-ptrace.h".
10786         (obsd_nat_target): New class.
10787         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10788         (the_ppc_fbsd_nat_target): New.
10789         (ppcfbsd_fetch_inferior_registers)
10790         (ppcfbsd_store_inferior_registers): Refactor as methods of
10791         ppc_fbsd_nat_target.
10792         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10793         add_target.
10794         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10795         (the_ppc_nbsd_nat_target): New.
10796         (ppcnbsd_fetch_inferior_registers)
10797         (ppcnbsd_store_inferior_registers): Refactor as methods of
10798         ppc_nbsd_nat_target.
10799         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10800         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10801         (the_ppc_obsd_nat_target): New.
10802         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10803         methods of ppc_obsd_nat_target.
10804         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10805         add_target.
10806         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10807         (the_sh_nbsd_nat_target): New.
10808         (shnbsd_fetch_inferior_registers)
10809         (shnbsd_store_inferior_registers): Refactor as methods of
10810         sh_nbsd_nat_target.
10811         (_initialize_shnbsd_nat): Adjust to C++ification.
10812         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10813         (inf_ptrace_xfer_partial): Delete.
10814         (sparc_xfer_partial, sparc_target): Delete.
10815         * sparc-nat.h (sparc_fetch_inferior_registers)
10816         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10817         (sparc_target): Delete function declaration.
10818         (sparc_target): New template class.
10819         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10820         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10821         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10822         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10823         add_target.
10824         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10825         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10826         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10827         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10828         add_target.
10829         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10830         (the_vax_bsd_nat_target): New.
10831         (vaxbsd_fetch_inferior_registers)
10832         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10833         methods.
10834         (_initialize_vaxbsd_nat): Adjust to C++ification.
10835
10836         * bsd-kvm.c (bsd_kvm_target): New class.
10837         (bsd_kvm_ops): Now a bsd_kvm_target.
10838         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10839         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10840         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10841         bsd_kvm_target.
10842         (bsd_kvm_return_one): Delete.
10843         (bsd_kvm_add_target): Adjust to C++ification.
10844
10845         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10846         (nto_procfs_target_procfs): New classes.
10847         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10848         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10849         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10850         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10851         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10852         (procfs_remove_hw_breakpoint, procfs_resume)
10853         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10854         (procfs_kill_inferior, procfs_store_registers)
10855         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10856         as methods of nto_procfs_target.
10857         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10858         (nto_native_ops): Delete.
10859         (procfs_open, procfs_native_open): Delete.
10860         (nto_native_ops): Now an nto_procfs_target_native.
10861         (init_procfs_targets): Adjust to C++ification.
10862         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10863         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10864         Refactor as methods of nto_procfs_target.
10865
10866         * go32-nat.c (go32_nat_target): New class.
10867         (the_go32_nat_target): New.
10868         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10869         (go32_store_registers, go32_xfer_partial, go32_files_info)
10870         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10871         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10872         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10873         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10874         (go32_target): Delete.
10875         (_initialize_go32_nat): Adjust to C++ification.
10876
10877         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10878         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10879         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10880         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10881         gnu_nat_target.
10882         (gnu_target): Delete.
10883         * gnu-nat.h (gnu_target): Delete.
10884         (gnu_nat_target): New class.
10885         * i386-gnu-nat.c (gnu_base_target): New.
10886         (i386_gnu_nat_target): New class.
10887         (the_i386_gnu_nat_target): New.
10888         (_initialize_i386gnu_nat): Adjust to C++ification.
10889
10890 2018-05-02  Pedro Alves  <palves@redhat.com>
10891
10892         * bfd-target.c (target_bfd_xclose): Rename to ...
10893         (target_bfd_close): ... this.
10894         (target_bfd_reopen): Adjust.
10895         * target.c (target_close): Remove references to to_xclose.
10896         * target.h (target_ops::to_xclose): Delete.
10897         (target_ops::to_close): Update comments.
10898
10899 2018-05-02  Pedro Alves  <palves@redhat.com>
10900
10901         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10902         "linux-nat.h".
10903         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10904         * inf-ptrace.c (inf_ptrace_register_u_offset)
10905         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10906         (inf_ptrace_store_register, inf_ptrace_store_registers)
10907         (inf_ptrace_trad_target): Move to ...
10908         * linux-nat-trad.c: ... this new file.
10909         * linux-nat-trad.h: New file.
10910         * linux-nat.c (linux_target_install_ops): Make extern.
10911         (linux_trad_target): Delete.
10912         * linux-nat.h (linux_trad_target): Delete declaration.
10913         (linux_target_install_ops): Declare.
10914         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10915         "linux-nat.h".
10916
10917 2018-05-02  Pedro Alves  <palves@redhat.com>
10918
10919         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10920         procfs_target/add_target here.
10921         * procfs.c (procfs_target): Make static.
10922         (_initialize_procfs): Call add_target here.
10923         * procfs.h (struct target_ops): Remove forward declaration.
10924         (procfs_target): Remove declaration.
10925         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10926
10927 2018-05-02  Pedro Alves  <palves@redhat.com>
10928
10929         * procfs.c (procfs_stopped_by_watchpoint)
10930         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10931         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10932         Forward declare.
10933         (procfs_use_watchpoints): Delete, move contents...
10934         (procfs_target): ... here.
10935         * procfs.h (procfs_use_watchpoints): Delete declaration.
10936         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10937         procfs_use_watchpoints.
10938         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10939         procfs_use_watchpoints.
10940
10941 2018-05-02  Tom Tromey  <tom@tromey.com>
10942
10943         PR python/20084:
10944         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10945         and var_zuinteger_unlimited.
10946         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10947         and PARAM_ZUINTEGER_UNLIMITED.
10948         (set_parameter_value): Handle var_zuinteger and
10949         var_zuinteger_unlimited.
10950         (add_setshow_generic): Likewise.
10951         (parmpy_init): Likewise.
10952
10953 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10954
10955         PR rust/23124
10956         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10957         pointer is not null before dereferencing it.
10958
10959 2018-04-30  Tom Tromey  <tom@tromey.com>
10960
10961         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10962         is_mi_like_p.
10963
10964 2018-04-30  Tom Tromey  <tom@tromey.com>
10965
10966         * breakpoint.c (mention): Remove use of is_mi_like_p.
10967         (print_mention_ranged_breakpoint): Likewise.
10968         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10969         of is_mi_like_p.
10970
10971 2018-04-30  Tom Tromey  <tom@tromey.com>
10972
10973         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10974
10975 2018-04-30  Tom Tromey  <tom@tromey.com>
10976
10977         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10978         (info_spu_event_command): Remove some uses of is_mi_like_p.
10979
10980 2018-04-30  Tom Tromey  <tom@tromey.com>
10981
10982         * python/py-framefilter.c (py_print_single_arg)
10983         (enumerate_locals, py_print_args, py_print_frame): Remove some
10984         uses of is_mi_like_p.
10985
10986 2018-04-30  Tom Tromey  <tom@tromey.com>
10987
10988         * ui-out.c: Update.
10989         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10990         * ui-out.h (ui_out::is_mi_like_p): Now const.
10991         (ui_out::do_is_mi_like_p): Now const.
10992         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10993
10994 2018-04-30  Tom Tromey  <tom@tromey.com>
10995
10996         * varobj.c (varobj_set_visualizer): Use new_reference.
10997         * python/python.c (gdbpy_decode_line): Use new_reference.
10998         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10999         new_reference.
11000
11001 2018-04-30  Tom Tromey  <tom@tromey.com>
11002
11003         * varobj.c (install_new_value): Use new_reference.
11004         * value.h (value_incref): Return void.  Swap intro comment with
11005         value_decref.
11006         * value.c (set_value_parent): Use new_reference.
11007         (value_incref): Return void.  Update intro comment.
11008         (release_value): Use new_reference.
11009         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
11010
11011 2018-04-30  Tom Tromey  <tom@tromey.com>
11012
11013         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
11014         * gdb_bfd.h (new_bfd_ref): Remove.
11015         (gdb_bfd_open): Update comment.
11016         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
11017         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
11018         (gdb_bfd_fdopenr): Use new_reference.
11019         * exec.c (exec_file_attach): Use new_reference.
11020
11021 2018-04-30  Tom Tromey  <tom@tromey.com>
11022
11023         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
11024         method.
11025
11026 2018-04-30  Tom Tromey  <tom@tromey.com>
11027
11028         * jit.c (jit_read_code_entry): Use type_align.
11029         * i386-tdep.c (i386_gdbarch_init): Don't call
11030         set_gdbarch_long_long_align_bit.
11031         * gdbarch.sh: Remove long_long_align_bit.
11032         * gdbarch.c, gdbarch.h: Rebuild.
11033         * arc-tdep.c (arc_type_align): New function.
11034         (arc_gdbarch_init): Use arc_type_align.  Don't call
11035         set_gdbarch_long_long_align_bit.
11036
11037 2018-04-30  Tom Tromey  <tom@tromey.com>
11038
11039         * rust-lang.c (rust_type_alignment): Remove.
11040         (rust_composite_type): Use type_align.
11041
11042 2018-04-30  Tom Tromey  <tom@tromey.com>
11043
11044         * NEWS: Mention Type.align.
11045         * python/py-type.c (typy_get_alignof): New function.
11046         (type_object_getset): Add "alignof".
11047
11048 2018-04-30  Tom Tromey  <tom@tromey.com>
11049
11050         PR exp/17095:
11051         * NEWS: Update.
11052         * std-operator.def (UNOP_ALIGNOF): New operator.
11053         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
11054         New.
11055         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
11056         * c-lang.c (c_op_print_tab): Add alignof.
11057         * c-exp.y (ALIGNOF): New token.
11058         (exp): Add "ALIGNOF" production.
11059         (ident_tokens): Add _Alignof and alignof.
11060
11061 2018-04-30  Tom Tromey  <tom@tromey.com>
11062
11063         * i386-tdep.c (i386_type_align): New function.
11064         (i386_gdbarch_init): Update.
11065         * gdbarch.sh (type_align): New method.
11066         * gdbarch.c, gdbarch.h: Rebuild.
11067         * arch-utils.h (default_type_align): Declare.
11068         * arch-utils.c (default_type_align): New function.
11069         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
11070         (struct type) <align_log2>: New field.
11071         <instance_flags>: Now a bitfield.
11072         (TYPE_RAW_ALIGN): New macro.
11073         (type_align, type_raw_align, set_type_align): Declare.
11074         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
11075         functions.
11076         * dwarf2read.c (quirk_rust_enum): Set type alignment.
11077         (get_alignment, maybe_set_alignment): New functions.
11078         (read_structure_type, read_enumeration_type, read_array_type)
11079         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
11080         (read_subrange_type, read_base_type): Set type alignment.
11081
11082 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
11083
11084         * dwarf2read.c (read_index_from_section): Use bool.
11085
11086 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
11087
11088         PR gdb/22950
11089         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
11090         with #ifdef.
11091
11092 2018-04-29  John Reiser  <jreiser@BitWagon.com>
11093
11094         PR build/22873
11095         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
11096         last step, and do it atomically.
11097
11098 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
11099
11100         * compile/compile-c-types.c (convert_int, convert_float):
11101         Update for C FE v1.
11102
11103 2018-04-27  Tom Tromey  <tom@tromey.com>
11104
11105         PR rust/22545:
11106         * rust-lang.c (rust_inclusive_range_type_p): New function.
11107         (rust_range): Handle inclusive ranges.
11108         (rust_compute_range): Likewise.
11109         * rust-exp.y (struct rust_op) <inclusive>: New field.
11110         (DOTDOTEQ): New constant.
11111         (range_expr): Add "..=" productions.
11112         (operator_tokens): Add "..=" token.
11113         (ast_range): Add "inclusive" parameter.
11114         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
11115         ranges.
11116         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
11117         bounds values.
11118         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
11119         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
11120         Update comments.
11121         * expprint.c (print_subexp_standard): Handle new bounds values.
11122         (dump_subexp_body_standard): Likewise.
11123
11124 2018-04-27  Tom Tromey  <tom@tromey.com>
11125
11126         * configure: Rebuild.
11127         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
11128         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
11129         "OVERRIDE".
11130         (class symbol_needs_eval_context): Likewise.
11131         * dwarf2read.c (mock_mapped_index::symbol_name_count)
11132         (mock_mapped_index::symbol_name_at): Use "override".  Remove
11133         "virtual".
11134         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
11135         "override".
11136         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
11137         * aarch64-tdep.c (instruction_reader::read): Use "override".
11138         (instruction_reader_test::read): Likewise.
11139         * arm-tdep.c (instruction_reader::read): Use "override".
11140         (instruction_reader_thumb::read): Likewise.
11141
11142 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
11143
11144         PR remote/9665
11145         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
11146         instead of remote_send.
11147         (remote_send): Remove.
11148
11149 2018-04-26  Pedro Alves  <palves@redhat.com>
11150
11151         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
11152         find_function_start_sal instead of find_pc_line.
11153
11154 2018-04-26  Pedro Alves  <palves@redhat.com>
11155
11156         * breakpoint.c (set_breakpoint_location_function): Handle
11157         mst_data_gnu_ifunc.
11158         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
11159         * elfread.c (elf_symtab_read): Give data symbols with
11160         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
11161         (elf_rel_plt_read): Update comment.
11162         * linespec.c (convert_linespec_to_sals): Handle
11163         mst_data_gnu_ifunc.
11164         (minsym_found): Handle mst_data_gnu_ifunc.
11165         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
11166         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
11167         * parse.c (find_minsym_type_and_address): Handle
11168         mst_data_gnu_ifunc.
11169         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
11170         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
11171         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
11172         comment.
11173         <mst_data_gnu_ifunc>: New enumerator.
11174
11175 2018-04-26  Pedro Alves  <palves@redhat.com>
11176
11177         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
11178         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
11179         'want_trampoline' parameter by a lookup_msym_prefer parameter.
11180         Handle it.
11181         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
11182         (lookup_minimal_symbol_by_pc): Adjust.
11183         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
11184         (lookup_solib_trampoline_symbol_by_pc): Adjust.
11185         * minsyms.h (lookup_msym_prefer): New enum.
11186         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11187         parameter by a lookup_msym_prefer parameter.
11188
11189 2018-04-26  Pedro Alves  <palves@redhat.com>
11190
11191         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
11192         ends in "@plt" instead of looking at the symbol's section.
11193
11194 2018-04-26  Pedro Alves  <palves@redhat.com>
11195
11196         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
11197         all references.
11198         (find_pc_partial_function_gnu_ifunc): Rename to ...
11199         (find_pc_partial_function): ... this, and remove references to
11200         'is_gnu_ifunc_p'.
11201         (find_pc_partial_function): Delete old implementation.
11202         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
11203
11204 2018-04-26  Pedro Alves  <palves@redhat.com>
11205
11206         * linespec.c (struct bound_minimal_symbol_search_key): New.
11207         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
11208         skip first line if we found a GNU ifunc minimal symbol by name.
11209         (compare_msymbols): Change parameters to work with a destructured
11210         lhs minsym.
11211         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
11212         functions.
11213
11214 2018-04-26  Pedro Alves  <palves@redhat.com>
11215
11216         * breakpoint.c (set_breakpoint_location_function): Don't resolve
11217         ifunc targets here.  Instead, if we have an ifunc minsym, use its
11218         address/name.
11219         (add_location_to_breakpoint): Store the minsym and the objfile in
11220         the breakpoint location.
11221         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
11222         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
11223         Record the minsym in the sal.
11224         * symtab.h (symtab_and_line) <msymbol>: New field.
11225
11226 2018-04-26  Pedro Alves  <palves@redhat.com>
11227
11228         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
11229         unless we actually resolved the ifunc.
11230
11231 2018-04-26  Pedro Alves  <palves@redhat.com>
11232
11233         * c-exp.y (variable production): Prefer ifunc minsyms over
11234         regular function symbols.
11235         * symtab.c (find_gnu_ifunc): New function.
11236         * minsyms.h (lookup_msym_prefer): New enum.
11237         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11238         parameter by a lookup_msym_prefer parameter.
11239         * symtab.h (find_gnu_ifunc): New declaration.
11240
11241 2018-04-26  Pedro Alves  <palves@redhat.com>
11242
11243         * blockframe.c (find_gnu_ifunc_target_type): New function.
11244         (find_function_type): New.
11245         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11246         return a value with a memory address.
11247         (eval_call): For calls to GNU ifunc functions, try to find the
11248         type of the target function from the type that the resolver
11249         returns.
11250         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11251         symbols.
11252         * infcall.c (find_function_return_type): Delete.
11253         (find_function_addr): Add 'function_type' parameter.  For calls to
11254         GNU ifunc functions, try to find the type of the target function
11255         from the type that the resolver returns, and return it via
11256         FUNCTION_TYPE.
11257         (call_function_by_hand_dummy): Adjust to use the function type
11258         returned by find_function_addr.
11259         (find_function_addr): Add 'function_type' parameter and move
11260         description here.
11261         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11262         declarations.
11263
11264 2018-04-26  Pedro Alves  <palves@redhat.com>
11265
11266         * c-exp.y (variable production): Skip finding an alias for ifunc
11267         symbols.
11268
11269 2018-04-26  Pedro Alves  <palves@redhat.com>
11270
11271         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11272
11273 2018-04-25  Pedro Alves  <palves@redhat.com>
11274
11275         * infcmd.c (kill_command): Print the pid as string, not the whole
11276         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11277         message.
11278         * remote.c (remote_detach_1): Print the pid as string, not the
11279         whole thread's ptid.
11280
11281 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11282             Sergio Durigan Junior  <sergiodj@redhat.com>
11283             Pedro Alves  <palves@redhat.com>
11284
11285         * infcmd.c (kill_command): Print message when inferior has
11286         been killed.
11287         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11288         '1'.
11289         (add_inferior): Improve message printed when
11290         'print_inferior_events' is on.
11291         (exit_inferior): Remove message printed when
11292         'print_inferior_events' is on.
11293         (detach_inferior): Improve message printed when
11294         'print_inferior_events' is on.
11295         (initialize_inferiors): Use 'add_inferior_silent' to set
11296         'current_inferior_'.
11297         * inferior.h (print_inferior_events): Declare here as
11298         'extern'.
11299         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11300         '[Detaching...]' messages when 'print_inferior_events' is on.
11301         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11302         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11303         'Detaching after fork from child...', replace it by '... from
11304         parent...'.
11305         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11306         prefix/suffix when printing 'Detaching...' messages.  Print
11307         them when 'print_inferior_events' is on.
11308         * remote.c (remote_detach_1): Print message when detaching
11309         from inferior and '!is_fork_parent'.
11310
11311 2018-04-24  Tom Tromey  <tom@tromey.com>
11312
11313         * cli-out.h: Reindent.
11314
11315 2018-04-24  Tom Tromey  <tom@tromey.com>
11316
11317         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11318         (cli_ui_out::do_field_string): Use fputs_filtered.
11319         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11320
11321 2018-04-23  Tom Tromey  <tom@tromey.com>
11322
11323         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11324         gdb::unique_xmalloc_ptr.
11325
11326 2018-04-23  Tom Tromey  <tom@tromey.com>
11327
11328         * configure: Rebuild.
11329
11330 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11331
11332         PR gdb/23095
11333         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11334         prepare_for_testing.  Set normal_bp to r_debug_state if target
11335         is bsd.
11336
11337 2018-04-21  Pedro Alves  <palves@redhat.com>
11338             Rajendra SY  <rajendra.sy@gmail.com>
11339
11340         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11341         * remote.c (extended_remote_attach): In all-stop mode, mark the
11342         thread as executing.
11343
11344 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11345
11346         * thread.c (thread_apply_all_command): Fix comment.
11347         (thread_command): Fix comment.
11348
11349 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11350
11351         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11352         parameter.
11353         * features/aarch64-core.c (create_feature_aarch64_core):
11354         Regenerate.
11355         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11356         Likewise.
11357         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11358         Likewise.
11359         * features/i386/32bit-avx512.c
11360         (create_feature_i386_32bit_avx512): Likewise.
11361         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11362         Likewise.
11363         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11364         Likewise.
11365         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11366         Likewise.
11367         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11368         Likewise.
11369         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11370         Likewise.
11371         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11372         Likewise.
11373         * features/i386/64bit-avx512.c
11374         (create_feature_i386_64bit_avx512): Likewise.
11375         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11376         Likewise.
11377         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11378         Likewise.
11379         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11380         Likewise.
11381         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11382         Likewise.
11383         * features/i386/64bit-segments.c
11384         (create_feature_i386_64bit_segments): Likewise.
11385         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11386         Likewise.
11387         * features/i386/x32-core.c
11388         (create_feature_i386_x32_core): Likewise.
11389         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11390         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11391         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11392         * target-descriptions.c: In generated code, don't pass xml
11393         filename.
11394
11395 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11396
11397         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11398         (print_xml_feature::visit_post): Likewise.
11399         (print_xml_feature::visit): Likewise.
11400         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11401         (print_xml_feature): Add new class.
11402         * regformats/regdat.sh: Null xmltarget on feature targets.
11403         * target-descriptions.c (struct target_desc): Add xmltarget.
11404         (maintenance_check_tdesc_xml_convert): Add unittest function.
11405         (tdesc_get_features_xml): Add function to get xml.
11406         (maintenance_check_xml_descriptions): Test xml generation.
11407         * xml-tdesc.c (string_read_description_xml): Add function.
11408         * xml-tdesc.h (string_read_description_xml): Add declaration.
11409
11410 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11411
11412         * features/Makefile: Add feature marker to targets with new style
11413         target descriptions.
11414         * regformats/aarch64.dat: Regenerate.
11415         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11416         * regformats/i386/amd64-avx-linux.dat: Likewise.
11417         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11418         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11419         * regformats/i386/amd64-linux.dat: Likewise.
11420         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11421         * regformats/i386/amd64.dat: Likewise.
11422         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11423         * regformats/i386/i386-avx-linux.dat: Likewise.
11424         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11425         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11426         * regformats/i386/i386-linux.dat: Likewise.
11427         * regformats/i386/i386-mmx-linux.dat: Likewise.
11428         * regformats/i386/i386-mpx-linux.dat: Likewise.
11429         * regformats/i386/i386.dat: Likewise.
11430         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11431         * regformats/i386/x32-avx-linux.dat: Likewise.
11432         * regformats/i386/x32-linux.dat: Likewise.
11433         * regformats/tic6x-c62x-linux.dat: Likewise.
11434         * regformats/tic6x-c64x-linux.dat: Likewise.
11435         * regformats/tic6x-c64xp-linux.dat: Likewise.
11436         * regformats/regdat.sh: Parse feature marker.
11437
11438 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11439
11440         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11441         (tdesc_osabi_name): Likewise.
11442         * target-descriptions.c (tdesc_architecture_name): Add new
11443         function.
11444         (tdesc_osabi_name): Likewise.
11445
11446 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11447
11448         * common/tdesc.c (tdesc_predefined_type): Move to here.
11449         (tdesc_named_type): Likewise.
11450         (tdesc_create_vector): Likewise.
11451         (tdesc_create_struct): Likewise.
11452         (tdesc_set_struct_size): Likewise.
11453         (tdesc_create_union): Likewise.
11454         (tdesc_create_flags): Likewise.
11455         (tdesc_create_enum): Likewise.
11456         (tdesc_add_field): Likewise.
11457         (tdesc_add_typed_bitfield): Likewise.
11458         (tdesc_add_bitfield): Likewise.
11459         (tdesc_add_flag): Likewise.
11460         (tdesc_add_enum_value): Likewise.
11461         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11462         (struct tdesc_type_vector): Likewise.
11463         (struct tdesc_type_field): Likewise.
11464         (struct tdesc_type_with_fields): Likewise.
11465         (tdesc_create_enum): Add declaration.
11466         (tdesc_add_typed_bitfield): Likewise.
11467         (tdesc_add_enum_value): Likewise.
11468         * target-descriptions.c (tdesc_type_field): Move from here.
11469         (tdesc_type_builtin): Likewise.
11470         (tdesc_type_vector): Likewise.
11471         (tdesc_type_with_fields): Likewise.
11472         (tdesc_predefined_types): Likewise.
11473         (tdesc_named_type): Likewise.
11474         (tdesc_create_vector): Likewise.
11475         (tdesc_create_struct): Likewise.
11476         (tdesc_set_struct_size): Likewise.
11477         (tdesc_create_union): Likewise.
11478         (tdesc_create_flags): Likewise.
11479         (tdesc_create_enum): Likewise.
11480         (tdesc_add_field): Likewise.
11481         (tdesc_add_typed_bitfield): Likewise.
11482         (tdesc_add_bitfield): Likewise.
11483         (tdesc_add_flag): Likewise.
11484         (tdesc_add_enum_value): Likewise.
11485         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11486         (tdesc_add_typed_bitfield): Likewise.
11487         (tdesc_add_enum_value): Likewise.
11488
11489 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11490
11491         * common/tdesc.c (tdesc_feature::accept): Move to here.
11492         (tdesc_feature::operator==): Likewise.
11493         (tdesc_create_reg): Likewise.
11494         * common/tdesc.h (tdesc_type_kind): Likewise.
11495         (struct tdesc_type): Likewise.
11496         (struct tdesc_feature): Likewise.
11497         * regformats/regdat.sh: Create a feature.
11498         * target-descriptions.c (tdesc_type_kind): Move from here.
11499         (tdesc_type): Likewise.
11500         (tdesc_type_up): Likewise.
11501         (tdesc_feature): Likewise.
11502         (tdesc_create_reg): Likewise.
11503
11504 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11505
11506         * Makefile.in: Add arch/tdesc.c
11507         * common/tdesc.c: New file.
11508         * common/tdesc.h (tdesc_element_visitor): Move to here.
11509         (tdesc_element): Likewise.
11510         (tdesc_reg): Likewise.
11511         (tdesc_reg_up): Likewise.
11512         * regformats/regdef.h (reg): Add offset to constructors.
11513         * target-descriptions.c (tdesc_element_visitor): Move from here.
11514         (tdesc_element): Likewise.
11515         (tdesc_reg): Likewise.
11516         (tdesc_reg_up): Likewise.
11517
11518 2018-04-17  Tom Tromey  <tom@tromey.com>
11519
11520         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11521         discriminant field.
11522
11523 2018-04-17  Tom Tromey  <tom@tromey.com>
11524
11525         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11526
11527 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11528
11529         * symtab.c (print_symbol_info): Skip printing filename and line
11530         number when `last' is NULL.
11531         (symtab_symbol_info): Use empty string instead of NULL for first
11532         invocation of print_symbol_info.
11533         (rbreak_command): Pass NULL to `last' parameter of
11534         print_symbol_info.
11535
11536 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11537
11538         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11539         instead of nullptr.
11540
11541 2018-04-16  Pedro Alves  <palves@redhat.com>
11542
11543         * MAINTAINERS (sh): Remove.
11544         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11545         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11546         (ALLDEPFILES): Remove sh64-tdep.c.
11547         * NEWS: Mentions that support for SH-5/SH64 is removed.
11548         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11549         (sh*-*-openbsd*): Ditto.
11550         (sh64-*-elf*): Remove.
11551         (sh*): Remove.
11552         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11553         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11554         * sh-tdep.c: No longer include "sh64-tdep.h".
11555         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11556         * sh64-tdep.c, sh64-tdep.h: Remove files.
11557
11558 2018-04-16  Pedro Alves  <palves@redhat.com>
11559
11560         * MAINTAINERS: Remove m88k.
11561         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11562         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11563         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11564         * NEWS: Mention that support for m88k was removed.
11565         * configure.host (m88*-*-*): Remove support.
11566         * configure.nat (m88k-*-*): Remove support.
11567         * configure.tgt (m88*-*-openbsd*): Remove.
11568         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11569
11570 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11571
11572         * configure.tgt (x86_tobjs): New variable.
11573         (amd64_tobjs, i386_tobjs): Use it.
11574
11575 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11576
11577         * symtab.c (print_symbol_info): Precede the symbol definition by
11578         the line number when available.
11579         * NEWS: Advertise this enhancement.
11580
11581 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11582
11583         * NEWS (New options): announce set/show record btrace cpu.
11584         * btrace.c: Include record-btrace.h.
11585         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11586         the vendor is unknown.
11587         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11588         Maybe overwrite the btrace configuration's cpu.
11589         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11590         (btrace_fetch): Add cpu parameter.  Update callers.
11591         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11592         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11593         errata workarounds if the vendor is unknown.
11594         * python/py-record-btrace.c: Include record-btrace.h.
11595         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11596         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11597         * record-btrace.c (record_btrace_cpu_state_kind): New.
11598         (record_btrace_cpu): New.
11599         (set_record_btrace_cpu_cmdlist): New.
11600         (record_btrace_get_cpu): New.
11601         (require_btrace_thread, record_btrace_info)
11602         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11603         (cmd_set_record_btrace_cpu_none): New.
11604         (cmd_set_record_btrace_cpu_auto): New.
11605         (cmd_set_record_btrace_cpu): New.
11606         (cmd_show_record_btrace_cpu): New.
11607         (_initialize_record_btrace): Initialize set/show record btrace cpu
11608         commands.
11609         * record-btrace.h (record_btrace_get_cpu): New.
11610
11611 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11612
11613         * record.c (set_record_command): Fix typo in message.
11614
11615 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11616
11617         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11618
11619 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11620
11621         * infrun.c (process_event_stop_test): Call
11622         gdbarch_in_indirect_branch_thunk.
11623         * gdbarch.sh (in_indirect_branch_thunk): New.
11624         * gdbarch.c: Regenerated.
11625         * gdbarch.h: Regenerated.
11626         * x86-tdep.h: New.
11627         * x86-tdep.c: New.
11628         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11629         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11630         (ALLDEPFILES): Add x86-tdep.c.
11631         * arch-utils.h (default_in_indirect_branch_thunk): New.
11632         * arch-utils.c (default_in_indirect_branch_thunk): New.
11633         * i386-tdep: Include x86-tdep.h.
11634         (i386_in_indirect_branch_thunk): New.
11635         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11636         function.
11637         * amd64-tdep: Include x86-tdep.h.
11638         (amd64_in_indirect_branch_thunk): New.
11639         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11640
11641 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11642
11643         PR gdb/23053
11644         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11645         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11646         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11647         regression.
11648
11649 2018-04-12  Tom Tromey  <tom@tromey.com>
11650
11651         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11652         (rust_evaluate_subexp): Likewise.
11653
11654 2018-04-12  Pedro Alves  <palves@redhat.com>
11655
11656         * procfs.c (procfs_detach): Make forward declaration's prototype
11657         match definition's protototype.
11658         (proc_get_LDT_entry): Remove stale do_cleanups call.
11659
11660 2018-04-12  Pedro Alves  <palves@redhat.com>
11661
11662         * target.h (target_ops::to_has_exited): Delete.
11663         (target_has_exited): Delete.
11664         * target-delegates.c: Regenerate.
11665
11666 2018-04-11  Pedro Alves  <palves@redhat.com>
11667
11668         * target.c (fileio_fh_t::t): Add comment.
11669         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11670         (target_fileio_close): Handle a NULL target.
11671         (invalidate_fileio_fh): New.
11672         (target_close): Call it.
11673         * remote.c (remote_hostio_send_command): No longer check whether
11674         remote_desc is open.
11675
11676 2018-04-11  Pedro Alves  <palves@redhat.com>
11677
11678         * target.c (fileio_fh_t): Make it a named struct instead of a
11679         typedef.
11680         (fileio_fh_t::is_closed): New method.
11681         (DEF_VEC_O (fileio_fh_t)): Remove.
11682         (fileio_fhandles): Now a std::vector.
11683         (is_closed_fileio_fh): Delete.
11684         (acquire_fileio_fd): Adjust.  Rename parameters.
11685         (release_fileio_fd): Adjust.
11686         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11687         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11688         (target_fileio_close): Adjust.
11689
11690 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11691
11692         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11693         index.
11694
11695 2018-04-10  Pedro Alves  <palves@redhat.com>
11696
11697         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11698         (scoped_finish_thread_state): New class.
11699         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11700         cleanup.
11701         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11702         (fetch_inferior_event, normal_stop): Likewise.
11703         * thread.c (finish_thread_state_cleanup): Delete.
11704
11705 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11706             Pedro Alves  <palves@redhat.com>
11707
11708         * value.c: Include "selftest.h" and "common/array-view.h".
11709         (struct range) <operator ==>: New.
11710         (test_ranges_contain): New.
11711         (check_ranges_vector): New.
11712         (test_insert_into_bit_range_vector): New.
11713         (_initialize_values): Register selftests.
11714         * common/array-view.h (operator==, operator!=): New.
11715
11716 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11717
11718         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11719         an iterator.
11720         * inline-frame.c: Include <algorithm>.
11721         (struct inline_state): Add constructor.
11722         (inline_state_s): Remove.
11723         (DEF_VEC_O(inline_state_s)): Remove.
11724         (inline_states): Change type to std::vector.
11725         (find_inline_frame_state): Adjust to std::vector.
11726         (allocate_inline_frame_state): Remove.
11727         (clear_inline_frame_state): Adjust to std::vector.
11728         (skip_inline_frames): Adjust to std::vector.
11729
11730 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11731
11732         * tracepoint.h (struct trace_state_variable): Add constructor.
11733         <name>: Change type to std::string.
11734         * tracepoint.c (tsv_s): Remove.
11735         (DEF_VEC_O(tsv_s)): Remove.
11736         (tvariables): Change to std::vector.
11737         (create_trace_state_variable): Adjust to std::vector.
11738         (find_trace_state_variable): Likewise.
11739         (find_trace_state_variable_by_number): Likewise.
11740         (delete_trace_state_variable): Likewise.
11741         (trace_variable_command): Adjust to std::string.
11742         (delete_trace_variable_command): Likewise.
11743         (tvariables_info_1): Adjust to std::vector.
11744         (save_trace_state_variables): Likewise.
11745         (start_tracing): Likewise.
11746         (merge_uploaded_trace_state_variables): Adjust to std::vector
11747         and std::string.
11748         * target.h (struct target_ops)
11749         <to_download_trace_state_variable>: Pass reference to
11750         trace_state_variable.
11751         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11752         * target-delegates.c: Re-generate.
11753         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11754         (mi_tsv_deleted): Likewise.
11755         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11756         * remote.c (remote_download_trace_state_variable): Change
11757         pointer to reference and adjust.
11758         * make-target-delegates (parse_argtypes): Handle references.
11759         (write_function_header): Likewise.
11760         (munge_type): Likewise.
11761
11762 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11763
11764         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11765         string_view-selftests.c.
11766         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11767         testsuite.
11768         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11769         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11770         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11771         * unittests/basic_string_view/element_access/char/1.cc:
11772         Likewise.
11773         * unittests/basic_string_view/element_access/char/empty.cc:
11774         Likewise.
11775         * unittests/basic_string_view/element_access/char/front_back.cc:
11776         Likewise.
11777         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11778         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11779         Likewise.
11780         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11781         Likewise.
11782         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11783         Likewise.
11784         * unittests/basic_string_view/operations/compare/char/1.cc:
11785         Likewise.
11786         * unittests/basic_string_view/operations/compare/char/13650.cc:
11787         Likewise.
11788         * unittests/basic_string_view/operations/copy/char/1.cc:
11789         Likewise.
11790         * unittests/basic_string_view/operations/data/char/1.cc:
11791         Likewise.
11792         * unittests/basic_string_view/operations/find/char/1.cc:
11793         Likewise.
11794         * unittests/basic_string_view/operations/find/char/2.cc:
11795         Likewise.
11796         * unittests/basic_string_view/operations/find/char/3.cc:
11797         Likewise.
11798         * unittests/basic_string_view/operations/find/char/4.cc:
11799         Likewise.
11800         * unittests/basic_string_view/operations/rfind/char/1.cc:
11801         Likewise.
11802         * unittests/basic_string_view/operations/rfind/char/2.cc:
11803         Likewise.
11804         * unittests/basic_string_view/operations/rfind/char/3.cc:
11805         Likewise.
11806         * unittests/basic_string_view/operations/substr/char/1.cc:
11807         Likewise.
11808         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11809         * unittests/string_view-selftests.c: New file.
11810
11811 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11812
11813         * unittests/basic_string_view/capacity/1.cc: New file.
11814         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11815         * unittests/basic_string_view/cons/char/1.cc: New file.
11816         * unittests/basic_string_view/cons/char/2.cc: New file.
11817         * unittests/basic_string_view/cons/char/3.cc: New file.
11818         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11819         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11820         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11821         * unittests/basic_string_view/element_access/char/1.cc: New file.
11822         * unittests/basic_string_view/element_access/char/2.cc: New file.
11823         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11824         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11825         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11826         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11827         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11828         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11829         * unittests/basic_string_view/include.cc: New file.
11830         * unittests/basic_string_view/inserters/char/1.cc: New file.
11831         * unittests/basic_string_view/inserters/char/2.cc: New file.
11832         * unittests/basic_string_view/inserters/char/3.cc: New file.
11833         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11834         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11835         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11836         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11837         * unittests/basic_string_view/literals/types.cc: New file.
11838         * unittests/basic_string_view/literals/values.cc: New file.
11839         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11840         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11841         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11842         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11843         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11844         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11845         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11846         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11847         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11848         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11849         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11850         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11851         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11852         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11853         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11854         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11855         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11856         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11857         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11858         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11859         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11860         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11861         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11862         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11863         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11864         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11865         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11866         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11867         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11868         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11869         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11870         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11871         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11872         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11873         * unittests/basic_string_view/operators/char/2.cc: New file.
11874         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11875         * unittests/basic_string_view/range_access/char/1.cc: New file.
11876         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11877         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11878         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11879         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11880         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11881         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11882         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11883         * unittests/basic_string_view/typedefs.cc: New file.
11884         * unittests/basic_string_view/types/1.cc: New file.
11885
11886 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11887
11888         * common/gdb_string_view.h: Remove libstdc++ implementation
11889         details, adjust to gdb reality.
11890         * common/gdb_string_view.tcc: Likewise.
11891         * cli/cli-script.c (struct string_view): Remove.
11892         (user_args) <m_args>: Change element type to gdb::string_view.
11893         (user_args::insert_args): Adjust.
11894
11895 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11896
11897         * common/gdb_string_view.h: New file.
11898         * common/gdb_string_view.tcc: New file.
11899
11900 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11901
11902         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11903         * configure: Re-generate.
11904
11905 2018-04-09  Pedro Alves  <palves@redhat.com>
11906
11907         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11908         (set_target_gdbarch): Call
11909         gdb::observers::architecture_changed.notify instead of
11910         observer_notify_architecture_changed.
11911
11912 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11913
11914         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11915         (do_restore_current_traceframe_cleanup): Remove.
11916         (restore_current_traceframe_cleanup_dtor): Remove.
11917         (make_cleanup_restore_current_traceframe): Remove.
11918         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11919         New.
11920         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11921         * infrun.c (fetch_inferior_event): Use
11922         scoped_restore_current_traceframe.
11923
11924 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11925
11926         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11927         Remove.
11928         <n_allocated_type_units>: Remove.
11929         <all_type_units>: Change to std::vector.
11930         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11931         to std::vector change.
11932         (dwarf2_per_objfile::get_cutu): Likewise.
11933         (dwarf2_per_objfile::get_tu): Likewise.
11934         (create_signatured_type_table_from_index): Likewise.
11935         (create_signatured_type_table_from_debug_names): Likewise.
11936         (dw2_symtab_iter_next): Likewise.
11937         (dw2_print_stats): Likewise.
11938         (dw2_expand_all_symtabs): Likewise.
11939         (dw2_expand_marked_cus): Likewise.
11940         (dw2_debug_names_iterator::next): Likewise.
11941         (dwarf2_initialize_objfile): Likewise.
11942         (add_signatured_type_cu_to_table): Likewise.
11943         (create_all_type_units): Likewise.
11944         (add_type_unit): Likewise.
11945         (struct tu_abbrev_offset): Add constructor.
11946         (build_type_psymtabs_1): Adjust to std::vector change.
11947         (print_tu_stats): Likewise.
11948         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11949         (write_debug_names): Likewise.
11950
11951 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11952
11953         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11954         Make an std::vector.
11955         <n_comp_units>: Remove.
11956         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11957         to std::vector change.
11958         (dwarf2_per_objfile::get_cutu): Likewise.
11959         (dwarf2_per_objfile::get_cu): Likewise.
11960         (create_cus_from_index): Likewise.
11961         (create_addrmap_from_index): Likewise.
11962         (create_addrmap_from_aranges): Likewise.
11963         (dwarf2_read_index): Likewise.
11964         (dw2_find_last_source_symtab): Likewise.
11965         (dw2_map_symtabs_matching_filename): Likewise.
11966         (dw2_symtab_iter_next): Likewise.
11967         (dw2_print_stats): Likewise.
11968         (dw2_expand_all_symtabs): Likewise.
11969         (dw2_expand_symtabs_with_fullname): Likewise.
11970         (dw2_expand_marked_cus): Likewise.
11971         (dw2_map_symbol_filenames): Likewise.
11972         (create_cus_from_debug_names): Likewise.
11973         (dwarf2_read_debug_names): Likewise.
11974         (dw2_debug_names_iterator::next): Likewise.
11975         (dwarf2_initialize_objfile): Likewise.
11976         (set_partial_user): Likewise.
11977         (dwarf2_build_psymtabs_hard): Likewise.
11978         (read_comp_units_from_section): Remove arguments, adjust to
11979         std::vector change.
11980         (create_all_comp_units): Adjust to std::vector and
11981         read_comp_units_from_section changes.
11982         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11983         change.
11984         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11985         (psyms_seen_size): Likewise.
11986         (write_gdbindex): Likewise.
11987         (write_debug_names): Likewise.
11988
11989 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11990
11991         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11992         with dwarf2_per_objfile.
11993         (create_cus_from_index): Likewise.
11994         (create_signatured_type_table_from_index): Likewise.
11995         (dwarf2_read_index): Likewise.
11996         (dwarf2_initialize_objfile): Likewise.
11997         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11998         per_cu rather than get_dwarf2_per_objfile.
11999
12000 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12001
12002         * dwarf2read.h (struct signatured_type): Forward declare.
12003         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
12004         New methods.
12005         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
12006         (dw2_get_cutu): ...this.
12007         (dwarf2_per_objfile::get_cu): Rename from...
12008         (dw2_get_cu): ...this.
12009         (dwarf2_per_objfile::get_tu): New.
12010         (create_addrmap_from_index): Adjust.
12011         (create_addrmap_from_aranges): Adjust.
12012         (dw2_find_last_source_symtab): Adjust.
12013         (dw2_map_symtabs_matching_filename): Adjust.
12014         (dw2_symtab_iter_next): Adjust.
12015         (dw2_print_stats): Adjust.
12016         (dw2_expand_all_symtabs): Adjust.
12017         (dw2_expand_symtabs_with_fullname): Adjust.
12018         (dw2_expand_marked_cus): Adjust.
12019         (dw_expand_symtabs_matching_file_matcher): Adjust.
12020         (dw2_map_symbol_filenames): Adjust.
12021         (dw2_debug_names_iterator::next): Adjust.
12022         (dwarf2_initialize_objfile): Adjust.
12023         (set_partial_user): Adjust.
12024         (dwarf2_build_psymtabs_hard): Adjust.
12025
12026 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12027
12028         * dwarf2read.c (create_signatured_type_table_from_debug_names):
12029         Remove unused variables.
12030         (dw2_map_symtabs_matching_filename): Likewise.
12031         (dwarf2_record_block_ranges): Likewise.
12032         (dwarf2_read_addr_index): Likewise.
12033         (follow_die_offset): Likewise.
12034
12035 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12036
12037         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
12038         to symbol_file_add_main.
12039
12040 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12041
12042         PR mi/22299
12043         * mi/mi-console.c (do_fputc_async_safe): New.
12044         (mi_console_file::write_async_safe): New.
12045         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
12046         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
12047         New.
12048         * ui-file.c (ui_file::putstrn): Adjust call to
12049         fputstrn_unfiltered.
12050         * utils.c (printchar): Replace do_fputs and do_fprintf
12051         parameters by do_fputc.
12052         (fputstr_filtered): Adjust call to printchar.
12053         (fputstr_unfiltered): Likewise.
12054         (fputstrn_filtered): Likewise.
12055         (fputstrn_unfiltered): Add do_fputc parameter, pass to
12056         printchar.
12057         * utils.h (do_fputc_ftype): New typedef.
12058         (fputstrn_unfiltered): Add do_fputc parameter.
12059
12060 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
12061
12062         * regformats/i386/i386-avx.dat: Remove.
12063
12064 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12065
12066         PR gdb/22979
12067         * amd64-tdep.c (amd64_none_init_abi): New function.
12068         (amd64_x32_none_init_abi): New function.
12069         (_initialize_amd64_tdep): Register handlers for x86-64 and
12070         x64_32 with GDB_OSABI_NONE.
12071         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
12072         GDB_OSABI_NONE osabi.
12073
12074 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12075
12076         PR gdb/22980
12077         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
12078         GDB_OSABI_NONE.
12079         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
12080         * osabi.c (gdb_osabi_names): Add "unknown" entry.
12081
12082 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12083
12084         * common/byte-vector.h (char_vector): New type.
12085         * target.h (target_read_alloc): Return
12086         gdb::optional<byte_vector>.
12087         (target_read_stralloc): Return gdb::optional<char_vector>.
12088         (target_get_osdata): Return gdb::optional<char_vector>.
12089         * target.c (target_read_alloc_1): Templatize.  Replacement
12090         manual memory management with vector.
12091         (target_read_alloc): Change return type, adjust.
12092         (target_read_stralloc): Change return type, adjust.
12093         (target_get_osdata): Change return type, adjust.
12094         * auxv.c (struct auxv_info) <length>: Remove.
12095         <data>: Change type to gdb::optional<byte_vector>.
12096         (auxv_inferior_data_cleanup): Free auxv_info with delete.
12097         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
12098         (target_auxv_search): Adjust.
12099         (fprint_target_auxv): Adjust.
12100         * avr-tdep.c (avr_io_reg_read_command): Adjust.
12101         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
12102         (linux_make_corefile_notes): Adjust.
12103         * osdata.c (get_osdata): Adjust.
12104         * remote.c (remote_get_threads_with_qxfer): Adjust.
12105         (remote_memory_map): Adjust.
12106         (remote_traceframe_info): Adjust.
12107         (btrace_read_config): Adjust.
12108         (remote_read_btrace): Adjust.
12109         (remote_pid_to_exec_file): Adjust.
12110         * solib-aix.c (solib_aix_get_library_list): Adjust.
12111         * solib-dsbt.c (decode_loadmap): Don't free buf.
12112         (dsbt_get_initial_loadmaps): Adjust.
12113         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
12114         * solib-target.c (solib_target_current_sos): Adjust.
12115         * tracepoint.c (sdata_make_value): Adjust.
12116         * xml-support.c (xinclude_start_include): Adjust.
12117         (xml_fetch_content_from_file): Adjust.
12118         * xml-support.h (xml_fetch_another): Change return type.
12119         (xml_fetch_content_from_file): Change return type.
12120         * xml-syscall.c (xml_init_syscalls_info): Adjust.
12121         * xml-tdesc.c (file_read_description_xml): Adjust.
12122         (fetch_available_features_from_target): Change return type.
12123         (target_fetch_description_xml): Adjust.
12124         (target_read_description_xml): Adjust.
12125
12126 2018-04-06  Tom Tromey  <tom@tromey.com>
12127
12128         * value.c (~value): Update.
12129         (struct value) <contents>: Now unique_xmalloc_ptr.
12130         (value_contents_bits_eq, allocate_value_contents)
12131         (value_contents_raw, value_contents_all_raw)
12132         (value_contents_for_printing, value_contents_for_printing_const)
12133         (set_value_enclosing_type): Update.
12134
12135 2018-04-06  Tom Tromey  <tom@tromey.com>
12136
12137         * value.c (range_s): Remove typedef, VEC.
12138         (struct range): Add operator<.
12139         (range_lessthan): Remove.
12140         (ranges_contain): Change type.
12141         (~value): Update.
12142         (struct value) <unavailable, optimized_out>: Now std::vector.
12143         (value_entirely_available)
12144         (value_entirely_covered_by_range_vector)
12145         (value_entirely_unavailable, value_entirely_optimized_out):
12146         Update.
12147         (insert_into_bit_range_vector): Change argument type.
12148         (find_first_range_overlap): Likewise.
12149         (struct ranges_and_idx, value_contents_bits_eq)
12150         (require_not_optimized_out, require_available): Update.
12151         (ranges_copy_adjusted): Change argument types.
12152         (value_optimized_out, value_copy, value_fetch_lazy): Update.
12153
12154 2018-04-06  Tom Tromey  <tom@tromey.com>
12155
12156         * value.c (~value): Update.
12157         (struct value) <parent>: Now a value_ref_ptr.
12158         (value_parent, set_value_parent, value_address, value_copy):
12159         Update.
12160
12161 2018-04-06  Tom Tromey  <tom@tromey.com>
12162
12163         * value.c (struct value): Add constructor, destructor, and member
12164         initializers.
12165         (allocate_value_lazy, value_decref): Update.
12166
12167 2018-04-06  Tom Tromey  <tom@tromey.com>
12168
12169         * value.c (struct value) <released, next>: Remove.
12170         (all_values): Now a std::vector.
12171         (allocate_value_lazy): Update.
12172         (value_next): Remove.
12173         (value_mark, value_free_to_mark, release_value)
12174         (value_release_to_mark): Update.
12175
12176 2018-04-06  Tom Tromey  <tom@tromey.com>
12177
12178         * value.h (fetch_subexp_value, value_release_to_mark): Update.
12179         (free_value_chain): Remove.
12180         * value.c (free_value_chain): Remove.
12181         (value_release_to_mark): Return a std::vector.
12182         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
12183         std::vector.
12184         (check_condition): Update.
12185         * eval.c (fetch_subexp_value): Change "val_chain" to a
12186         std::vector.
12187         * breakpoint.c (update_watchpoint): Update.
12188         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
12189
12190 2018-04-06  Tom Tromey  <tom@tromey.com>
12191
12192         * value.h (free_all_values): Remove.
12193         * value.c (free_all_values): Remove.
12194
12195 2018-04-06  Tom Tromey  <tom@tromey.com>
12196
12197         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
12198         (value_history_chain, value_history_count): Remove.
12199         (value_history): New global.
12200         (record_latest_value, access_value_history, show_values)
12201         (preserve_values): Update.
12202
12203 2018-04-06  Tom Tromey  <tom@tromey.com>
12204
12205         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
12206         * varobj.c (varobj_set_display_format, varobj_set_value)
12207         (install_default_visualizer, construct_visualizer)
12208         (install_new_value, ~varobj, varobj_get_value_type)
12209         (my_value_of_variable, varobj_editable_p): Update.
12210         * c-varobj.c (c_describe_child, c_value_of_variable)
12211         (cplus_number_of_children, cplus_describe_child): Update.
12212         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
12213         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
12214         (ada_value_of_variable, ada_value_is_changeable_p): Update.
12215
12216 2018-04-06  Tom Tromey  <tom@tromey.com>
12217
12218         * printcmd.c (last_examine_address): Change type to
12219         value_ref_ptr.
12220         (do_examine, x_command): Update.
12221
12222 2018-04-06  Tom Tromey  <tom@tromey.com>
12223
12224         * value.c (release_value): Update.
12225         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
12226         (struct bpstats) <val>: Now a value_ref_ptr.
12227         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12228         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12229         (~watchpoint, print_it_watchpoint, watch_command_1)
12230         (invalidate_bp_value_on_memory_change): Update.
12231
12232 2018-04-06  Tom Tromey  <tom@tromey.com>
12233
12234         * varobj.c (varobj_clear_saved_item)
12235         (update_dynamic_varobj_children, install_new_value, ~varobj):
12236         Update.
12237         * value.h (value_incref): Move declaration earlier.
12238         (value_decref): Rename from value_free.
12239         (struct value_ref_policy): New.
12240         (value_ref_ptr): New typedef.
12241         (struct value_deleter): Remove.
12242         (gdb_value_up): Remove typedef.
12243         (release_value): Change return type.
12244         (release_value_or_incref): Remove.
12245         * value.c (set_value_parent): Update.
12246         (value_incref): Change return type.
12247         (value_decref): Rename from value_free.
12248         (value_free_to_mark, free_all_values, free_value_chain): Update.
12249         (release_value): Return value_ref_ptr.
12250         (release_value_or_incref): Remove.
12251         (record_latest_value, set_internalvar, clear_internalvar):
12252         Update.
12253         * stack.c (info_frame_command): Don't call value_free.
12254         * python/py-value.c (valpy_dealloc, valpy_new)
12255         (value_to_value_object): Update.
12256         * printcmd.c (do_examine): Update.
12257         * opencl-lang.c (lval_func_free_closure): Update.
12258         * mi/mi-main.c (register_changed_p): Don't call value_free.
12259         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12260         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12261         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12262         value_free.
12263         * guile/scm-value.c (vlscm_free_value_smob)
12264         (vlscm_scm_from_value): Update.
12265         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12266         (frame_unwind_register_unsigned, get_frame_register_bytes)
12267         (put_frame_register_bytes): Don't call value_free.
12268         * findvar.c (address_from_register): Don't call value_free.
12269         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12270         * dwarf2loc.c (entry_data_value_free_closure)
12271         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12272         (dwarf2_evaluate_loc_desc_full): Update.
12273         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12274         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12275         (~watchpoint, watch_command_1)
12276         (invalidate_bp_value_on_memory_change): Update.
12277         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12278
12279 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12280
12281         PR gdb/23022
12282         * warning.m4: Add -Wno-error=deprecated-register.
12283         * configure: Re-generate.
12284
12285 2018-04-05  Tom Tromey  <tom@tromey.com>
12286
12287         * linespec.h: Remove include of "vec.h".
12288
12289 2018-04-05  Tom Tromey  <tom@tromey.com>
12290
12291         * linespec.c (typep): Remove typedef.
12292         (find_methods, find_superclass_methods): Take a std::vector.
12293         (find_method): Use std::vector.
12294
12295 2018-04-05  Tom Tromey  <tom@tromey.com>
12296
12297         * utils.c (compare_strings): Remove.
12298         * utils.h (compare_strings): Remove.
12299         * objc-lang.h (find_imps): Update.
12300         * objc-lang.c (find_methods): Take a std::vector.
12301         (uniquify_strings, find_imps): Likewise.
12302         * linespec.c (find_methods): Take a std::vector.
12303         (decode_objc): Use std::vector.
12304         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12305         a std::vector.
12306         (find_method, find_function_symbols): Use std::vector.
12307
12308 2018-04-05  Tom Tromey  <tom@tromey.com>
12309
12310         * completer.c (completion_tracker::completion_tracker): Remove
12311         cast.
12312         (completion_tracker::discard_completions): Likewise.
12313         * breakpoint.c (ambiguous_names_p): Remove cast.
12314         * ada-lang.c (_initialize_ada_language): Remove cast.
12315         * utils.h (streq): Update.
12316         (streq_hash): Add new declaration.
12317         * utils.c (streq): Return bool.
12318         (streq_hash): New function.
12319
12320 2018-04-05  Tom Tromey  <tom@tromey.com>
12321
12322         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12323         Remove a string copy.
12324
12325 2018-04-05  Tom Tromey  <tom@tromey.com>
12326
12327         * linespec.c (filter_results): Use std::vector.
12328         (decode_line_2, decode_line_full): Update.
12329
12330 2018-04-05  Tom Tromey  <tom@tromey.com>
12331
12332         * linespec.c (canonical_to_fullform): Return std::string.
12333         (filter_results): Update.
12334         (struct decode_line_2_item): Add constructor.
12335         <fullform, displayform>: Now std::string.
12336         (decode_line_2_compare_items): Now a std::sort comparator.
12337         (decode_line_2): Update.
12338
12339 2018-04-05  Tom Tromey  <tom@tromey.com>
12340
12341         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12342         (unexpected_linespec_error): Update.
12343         (linespec_parse_basic, parse_linespec): Update.
12344
12345 2018-04-05  Tom Tromey  <tom@tromey.com>
12346
12347         * linespec.c (linespec_parse_basic): Reindent.
12348
12349 2018-04-05  Tom Tromey  <tom@tromey.com>
12350
12351         * minsyms.h (iterate_over_minimal_symbols): Update.
12352         * minsyms.c (iterate_over_minimal_symbols): Take a
12353         gdb::function_view.
12354         * linespec.c (struct collect_minsyms): Remove.
12355         (compare_msyms): Now a std::sort comparator.
12356         (add_minsym): Add parameters.
12357         (search_minsyms_for_name): Update.  Use std::vector.
12358
12359 2018-04-03  Tom Tromey  <tom@tromey.com>
12360
12361         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12362         gdb::byte_vector.
12363
12364 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12365
12366         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12367
12368 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12369
12370         PR gdb/16959
12371         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12372         printing static type.
12373
12374 2018-04-01  Tom Tromey  <tom@tromey.com>
12375
12376         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12377         (rs6000_xfer_shared_libraries): Update.
12378
12379 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12380
12381         * common/gdb_vecs.h (char_ptr): Remove.
12382         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12383
12384 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12385
12386         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12387         with std::vector.
12388         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12389
12390 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12391
12392         * tracepoint.h (struct uploaded_tp): Initialize fields.
12393         <actions, step_actions, cmd_strings>: Change type to
12394         std::vector<char *>.
12395         * tracepoint.c (get_uploaded_tp): Allocate with new.
12396         (free_uploaded_tps): Free with delete.
12397         (parse_tracepoint_definition): Adjust to std::vector change.
12398         * breakpoint.c (read_uploaded_action): Likewise.
12399         (create_tracepoint_from_upload): Likewise.
12400         * ctf.c (ctf_write_uploaded_tp): Likewise.
12401         (SET_ARRAY_FIELD): Likewise.
12402         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12403
12404 2018-03-30  Tom Tromey  <tom@tromey.com>
12405
12406         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12407         std::unique_ptr.
12408         (svr4_keep_data_in_core): Update.
12409         (svr4_read_so_list): Update.
12410
12411 2018-03-30  Tom Tromey  <tom@tromey.com>
12412
12413         * windows-nat.c (handle_output_debug_string, handle_exception):
12414         Update.
12415         * target.h (target_read_string): Update.
12416         * target.c (target_read_string): Change "string" to
12417         unique_xmalloc_ptr.
12418         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12419         Update.
12420         * solib-frv.c (frv_current_sos): Update.
12421         * solib-dsbt.c (dsbt_current_sos): Update.
12422         * solib-darwin.c (darwin_current_sos): Update.
12423         * linux-thread-db.c (inferior_has_bug): Update.
12424         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12425         Update.  Remove alloca.
12426         * ada-lang.c (ada_main_name): Update.
12427
12428 2018-03-30  Tom Tromey  <tom@tromey.com>
12429
12430         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12431         (struct dwo_file_deleter): New.
12432         (dwo_file_up): New typedef.
12433         (open_and_init_dwo_file): Use dwo_file_up.
12434         (free_dwo_file_cleanup): Remove.
12435
12436 2018-03-30  Tom Tromey  <tom@tromey.com>
12437
12438         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12439         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12440
12441 2018-03-30  Tom Tromey  <tom@tromey.com>
12442
12443         * dwarf2read.c (class free_cached_comp_units): New class.
12444         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12445         (free_cached_comp_units): Remove function.
12446
12447 2018-03-30  Tom Tromey  <tom@tromey.com>
12448
12449         * utils.h (make_cleanup_unpush_target): Remove.
12450         * inf-ptrace.c (struct target_unpusher): New.
12451         (target_unpush_up) New typedef.
12452         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12453         target_unpush_up.
12454         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12455
12456 2018-03-27  Tom Tromey  <tom@tromey.com>
12457
12458         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12459
12460 2018-03-27  Pedro Alves  <palves@redhat.com>
12461             Tom Tromey  <tom@tromey.com>
12462
12463         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12464         destructor.  Now a class.
12465         (gdb_readline_wrapper_cleanup): Remove function.
12466         (gdb_readline_wrapper): Remove cleanups.
12467
12468 2018-03-27  Tom Tromey  <tom@tromey.com>
12469
12470         * typeprint.h (struct type_print_options) <local_typedefs,
12471         global_typedefs>: Remove "struct" keyword.
12472         (class typedef_hash_table): New class.
12473         (recursively_update_typedef_hash, add_template_parameters)
12474         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12475         (find_typedef_in_hash): Don't declare.
12476         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12477         (typedef_hash_table::recursively_update): Rename from
12478         recursively_update_typedef_hash.  Now a member.
12479         (typedef_hash_table::add_template_parameters): Rename from
12480         add_template_parameters.  Now a member.
12481         (typedef_hash_table::typedef_hash_table): Now a constructor;
12482         rename from create_typedef_hash.
12483         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12484         rename from free_typedef_hash.
12485         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12486         (do_free_global_table): Remove.
12487         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12488         from copy_type_recursive.
12489         (create_global_typedef_table): Remove.
12490         (typedef_hash_table::find_global_typedef): Now a member of
12491         typedef_hash_table.
12492         (typedef_hash_table::find_typedef): Rename from
12493         find_typedef_in_hash; now a member.
12494         (whatis_exp): Update.
12495         * extension.h (struct ext_lang_type_printers): Add constructor and
12496         destructor.
12497         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12498         declare.
12499         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12500         Now a constructor; rename from start_ext_lang_type_printers.
12501         (ext_lang_type_printers): Now a destructor; rename from
12502         free_ext_lang_type_printers.
12503         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12504         Update.
12505         (c_type_print_base_struct_union): Update.  Remove cleanups.
12506
12507 2018-03-27  Tom Tromey  <tom@tromey.com>
12508
12509         * dwarf-index-write.c: Include <cmath>.
12510
12511 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12512
12513         * NEWS: Add entry describing new "set|show varsize-limit" command.
12514         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12515         command.
12516         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12517         "set variable".
12518
12519 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12520
12521         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12522         dwarf-index-write.c
12523         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12524         * dwarf-index-common.c: New file.
12525         * dwarf-index-common.h: New file.
12526         * dwarf-index-write.c: New file.
12527         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12528         (struct dwarf2_section_info): Move from here.
12529         (dwarf2_section_info_def): Likewise.
12530         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12531         (offset_type): Likewise.
12532         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12533         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12534         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12535         (byte_swap): Likewise.
12536         (MAYBE_SWAP): Likewise.
12537         (dwarf2_per_cu_ptr): Likewise.
12538         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12539         (struct tu_stats): Likewise.
12540         (struct dwarf2_per_objfile): Likewise.
12541         (struct dwarf2_per_cu_data): Likewise.
12542         (struct signatured_type): Likewise.
12543         (sig_type_ptr): Likewise.
12544         (DEF_VEC_P (sig_type_ptr)): Likewise.
12545         (INDEX4_SUFFIX): Likewise.
12546         (INDEX5_SUFFIX): Likewise.
12547         (DEBUG_STR_SUFFIX): Likewise.
12548         (dwarf2_read_section): Make non-static.
12549         (mapped_index_string_hash): Move from here.
12550         (dwarf5_djb_hash): Likewise.
12551         (file_write): Likewise.
12552         (class data_buf): Likewise.
12553         (struct symtab_index_entry): Likewise.
12554         (struct mapped_symtab): Likewise.
12555         (find_slot): Likewise.
12556         (hash_expand): Likewise.
12557         (add_index_entry): Likewise.
12558         (uniquify_cu_indices): Likewise.
12559         (class c_str_view): Likewise.
12560         (class c_str_view_hasher): Likewise.
12561         (class vector_hasher): Likewise.
12562         (write_hash_table): Likewise.
12563         (psym_index_map): Likewise.
12564         (struct addrmap_index_data): Likewise.
12565         (add_address_entry): Likewise.
12566         (add_address_entry_worker): Likewise.
12567         (write_address_map): Likewise.
12568         (symbol_kind): Likewise.
12569         (write_psymbols): Likewise.
12570         (struct signatured_type_index_data): Likewise.
12571         (write_one_signatured_type): Likewise.
12572         (recursively_count_psymbols): Likewise.
12573         (recursively_write_psymbols): Likewise.
12574         (class debug_names): Likewise.
12575         (check_dwarf64_offsets): Likewise.
12576         (psyms_seen_size): Likewise.
12577         (write_gdbindex): Likewise.
12578         (write_debug_names): Likewise.
12579         (assert_file_size): Likewise.
12580         (write_psymtabs_to_index): Likewise.
12581         (save_gdb_index_command): Likewise.
12582         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12583         command.
12584         * dwarf2read.h: New file.
12585
12586 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12587
12588         PR gdb/22670
12589         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12590         symbol name if the CU's language stores symbol names in linkage
12591         format.
12592         * language.h (struct language_defn)
12593         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12594         all instances of this struct.
12595
12596 2018-03-26  Tom Tromey  <tom@tromey.com>
12597
12598         * stack.c (backtrace_command_1): Remove verbose code.
12599
12600 2018-03-26  Tom Tromey  <tom@tromey.com>
12601
12602         * python/py-framefilter.c (py_print_type): Don't catch
12603         exceptions.  Return void.
12604         (py_print_value): Likewise.
12605         (py_print_single_arg): Likewise.
12606         (enumerate_args): Don't catch exceptions.
12607         (py_print_args): Likewise.
12608         (py_print_frame): Likewise.
12609         (gdbpy_apply_frame_filter): Catch exceptions here.
12610
12611 2018-03-26  Tom Tromey  <tom@tromey.com>
12612
12613         * stack.c (_initialize_stack): Remove trailing newlines from help
12614         text.  Add "Usage" line to "backtrace" help.
12615
12616 2018-03-26  Tom Tromey  <tom@tromey.com>
12617
12618         PR python/16486:
12619         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12620
12621 2018-03-26  Tom Tromey  <tom@tromey.com>
12622
12623         * python/py-framefilter.c (py_print_single_arg): Return
12624         EXT_LANG_BT_ERROR from catch.
12625
12626 2018-03-26  Tom Tromey  <tom@tromey.com>
12627
12628         PR backtrace/15584:
12629         * stack.c (backtrace_command_1): Move some code into no-filters
12630         "if".
12631
12632 2018-03-26  Tom Tromey  <tom@tromey.com>
12633
12634         * python/py-framefilter.c (throw_quit_or_print_exception): New
12635         function.
12636         (gdbpy_apply_frame_filter): Use it.
12637
12638 2018-03-26  Tom Tromey  <tom@tromey.com>
12639
12640         PR cli/17716:
12641         * python/py-framefilter.c (py_print_type, py_print_value)
12642         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12643         RETURN_MASK_ERROR.
12644
12645 2018-03-26  Tom Tromey  <tom@tromey.com>
12646
12647         * python/py-framefilter.c (enumerate_args): Use
12648         gdb::unique_xmalloc_ptr.
12649
12650 2018-03-26  Tom Tromey  <tom@tromey.com>
12651
12652         * python/py-framefilter.c (py_print_frame): Return
12653         EXT_LANG_BT_OK.
12654         (gdbpy_apply_frame_filter): Update comment.
12655         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12656         Remove.
12657         <EXT_LANG_BT_NO_FILTERS>: Change value.
12658
12659 2018-03-26  Tom Tromey  <tom@tromey.com>
12660
12661         PR backtrace/15582:
12662         * stack.c (backtrace_command): Parse "hide" argument.
12663         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12664         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12665         constant.
12666
12667 2018-03-26  Tom Tromey  <tom@tromey.com>
12668
12669         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12670         add "flags".
12671         (backtrace_command): Remove "fulltrace", add "flags".
12672
12673 2018-03-26  Tom Tromey  <tom@tromey.com>
12674
12675         * stack.c (backtrace_command): Rewrite command line parsing.
12676
12677 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12678
12679         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12680
12681 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12682
12683         * filename-seen-cache.h: Add include guard.
12684
12685 2018-03-26  Keith Seitz  <keiths@redhat.com>
12686
12687         * symfile.c (place_section): Remove "struct" from section_addr_info
12688         in comment.
12689         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12690         "struct" keyword from section_addr_info.
12691
12692 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12693
12694         * regformats/regdef.h (reg): Add constructors.
12695
12696 2018-03-25  Pedro Alves  <palves@redhat.com>
12697
12698         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12699         if then/else bodies in var_func_name extraction.
12700
12701 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12702
12703         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12704         lookup_minimal_symbol() to find symbol entry.
12705         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12706
12707 2018-03-23  Keith Seitz  <keiths@redhat.com>
12708
12709         PR c++/22968
12710         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12711         nested type definitions for C++, too.
12712
12713 2018-03-23  Tom Tromey  <tom@tromey.com>
12714
12715         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12716         a typedef.
12717         (macho_register_oso): Remove.
12718         (macho_symtab_read): Take a std::vector.
12719         (oso_el_compare_name): Now a std::sort comparator.
12720         (macho_symfile_read_all_oso): Take a std::vector.
12721         (macho_symfile_read): Use std::vector.  Remove cleanups.
12722
12723 2018-03-22  Tom Tromey  <tom@tromey.com>
12724
12725         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12726         (record_full_goto_bookmark): Use std::string.
12727
12728 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12729
12730         PR tdep/18295
12731         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12732         a single mask.
12733
12734 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12735
12736         * rs6000-tdep.c (store_insn_p): New function.
12737         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12738         and cr_reg to their unshifted values. Use store_insn_p to
12739         match LR saves using either R1 or fdata->alloca_reg. Use
12740         store_insn_p to match CR saves. Set alloca_reg_offset
12741         when alloca_reg and framep are set. Remove lr_reg shift
12742         when assigning to fdata->lr_register.
12743
12744 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12745
12746         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12747         command line args instead of emitting a warning.
12748
12749 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12750
12751         * tracepoint.h (struct static_tracepoint_marker): Initialize
12752         fields, define default constructor, move constructor and move
12753         assignment, disable the rest.
12754         <str_id, extra>: Make std::string.
12755         (release_static_tracepoint_marker): Remove.
12756         (free_current_marker): Remove.
12757         * tracepoint.c (free_current_marker): Remove.
12758         (parse_static_tracepoint_marker_definition): Adjust to
12759         std::string, use new hex2str overload.
12760         (release_static_tracepoint_marker): Remove.
12761         (print_one_static_tracepoint_marker): Get marker by reference
12762         and adjust to std::string.
12763         (info_static_tracepoint_markers_command): Adjust to std::vector
12764         changes
12765         * target.h (static_tracepoint_marker_p): Remove typedef.
12766         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12767         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12768         bool.
12769         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12770         * target-debug.h
12771         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12772         (target_debug_print_std_vector_static_tracepoint_marker): New.
12773         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12774         to...
12775         (target_debug_print_static_tracepoint_marker_p): ... this.
12776         * target-delegates.c: Re-generate.
12777         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12778         Make std::string.
12779         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12780         (decode_static_tracepoint_spec): Adjust to std::vector.
12781         (tracepoint_print_one_detail): Adjust to std::string.
12782         (strace_marker_decode_location): Adjust to std::string.
12783         (update_static_tracepoint): Adjust to std::string, remove call
12784         to release_static_tracepoint_marker.
12785         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12786         Adjust to std::vector.
12787         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12788         (remote_static_tracepoint_markers_by_strid): Adjust to
12789         std::vector.
12790         * common/rsp-low.h (hex2str): New overload with explicit count
12791         of bytes.
12792         * common/rsp-low.c (hex2str): New overload with explicit count
12793         of bytes.
12794         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12795         (_initialize_rsp_low_selftests): Add test_hex2str test.
12796         * unittests/tracepoint-selftests.c
12797         (test_parse_static_tracepoint_marker_definition): Adjust to
12798         std::string.
12799
12800 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12801
12802         * tracepoint.c (parse_static_tracepoint_marker_definition):
12803         Consider case where the definition is followed by more
12804         definitions.
12805         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12806         tracepoint-selftests.c.
12807         * unittests/tracepoint-selftests.c: New.
12808
12809 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12810
12811         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12812         Carvalho.
12813
12814 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12815
12816         * symtab.c (find_pc_sect_line): fixed indentation.
12817
12818 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12819
12820         * symtab.c (find_pc_sect_line): now uses binary search.
12821
12822 2018-03-19  Tom Tromey  <tom@tromey.com>
12823
12824         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12825         "IDENT" production.
12826
12827 2018-03-19  Pedro Alves  <palves@redhat.com>
12828             Tom Tromey  <tom@tromey.com>
12829
12830         * unittests/observable-selftests.c: New file.
12831         * common/observable.h: New file.
12832         * observable.h: New file.
12833         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12834         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12835         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12836         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12837         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12838         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12839         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12840         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12841         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12842         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12843         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12844         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12845         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12846         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12847         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12848         tui/tui-interp.c, valops.c: Update all users.
12849         * tui/tui-hooks.c (tui_bp_created_observer)
12850         (tui_bp_deleted_observer, tui_bp_modified_observer)
12851         (tui_inferior_exit_observer, tui_before_prompt_observer)
12852         (tui_normal_stop_observer, tui_register_changed_observer):
12853         Remove.
12854         (tui_observers_token): New global.
12855         (attach_or_detach, tui_attach_detach_observers): New functions.
12856         (tui_install_hooks, tui_remove_hooks): Use
12857         tui_attach_detach_observers.
12858         * record-btrace.c (record_btrace_thread_observer): Remove.
12859         (record_btrace_thread_observer_token): New global.
12860         * observer.sh: Remove.
12861         * observer.c: Rename to observable.c.
12862         * observable.c (namespace gdb_observers): Define new objects.
12863         (observer_debug): Move into gdb_observers namespace.
12864         (struct observer, struct observer_list, xalloc_observer_list_node)
12865         (xfree_observer_list_node, generic_observer_attach)
12866         (generic_observer_detach, generic_observer_notify): Remove.
12867         (_initialize_observer): Update.
12868         Don't include observer.inc.
12869         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12870         (clean mostlyclean): Likewise.
12871         (observer.h, observer.inc): Remove targets.
12872         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12873         (COMMON_SFILES): Use observable.c, not observer.c.
12874         * .gitignore: Remove observer.h.
12875
12876 2018-03-18  Tom Tromey  <tom@tromey.com>
12877
12878         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12879         gdb::def_vector.
12880         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12881
12882 2018-03-17  Tom Tromey  <tom@tromey.com>
12883
12884         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12885
12886 2018-03-17  Tom Tromey  <tom@tromey.com>
12887
12888         * target.c (class scoped_target_fd): New.
12889         (target_fileio_close_cleanup): Remove.
12890         (target_fileio_read_alloc_1): Use scoped_target_fd.
12891
12892 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12893
12894         * silent-rules.mk: New.
12895         * Makefile.in: Include silent-rules.mk
12896         (srcdir, VPATH, top_srcdir): Move up.
12897         (COMPILE): Add ECHO_CXX.
12898         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12899         (init.c): Add ECHO_INIT_C.
12900         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12901         (version.c): Add ECHO_GEN.
12902         (printcmd.o): Add ECHO_CXX.
12903         (target-float.o): Add ECHO_CXX.
12904         (ada-exp.o): Add ECHO_CXX.
12905         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12906         (insight$(EXEEXT)): Add ECHO_CXXLD.
12907         * gnulib/configure.ac: Add AM_SILENT_RULES.
12908         * gnulib/aclocal.m4: Re-generate.
12909         * gnulib/configure: Re-generate.
12910         * gnulib/import/Makefile.in: Re-generate.
12911
12912 2018-03-16  Tom Tromey  <tom@tromey.com>
12913
12914         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12915         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12916         * utils.c (do_free_section_addr_info)
12917         (make_cleanup_free_section_addr_info): Remove.
12918         * symfile.h (struct other_sections): Add constructor.
12919         (struct section_addr_info): Remove.
12920         (section_addr_info): New typedef.
12921         (struct sym_fns) <sym_offsets>: Change type of parameter.
12922         (build_section_addr_info_from_objfile)
12923         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12924         (default_symfile_offsets, symbol_file_add)
12925         (symbol_file_add_from_bfd)
12926         (build_section_addr_info_from_section_table): Update.
12927         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12928         * symfile.c (alloc_section_addr_info): Remove.
12929         (build_section_addr_info_from_section_table): Change return type.
12930         Update.
12931         (build_section_addr_info_from_bfd)
12932         (build_section_addr_info_from_objfile): Likewise.
12933         (free_section_addr_info): Remove.
12934         (relative_addr_info_to_section_offsets): Change type of "addrs".
12935         (addrs_section_compar): Now a std::sort comparator.
12936         (addrs_section_sort): Change return type.
12937         (addr_info_make_relative): Change type of "addrs".  Update.
12938         (default_symfile_offsets, syms_from_objfile_1)
12939         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12940         (symbol_file_add_separate): Update.
12941         (symbol_file_add): Change type of "addrs".  Update.
12942         (add_symbol_file_command): Update.  Remove cleanups.
12943         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12944         cleanups.
12945         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12946         * solib.c (solib_read_symbols): Update.
12947         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12948         * machoread.c (macho_symfile_offsets): Update.
12949         * jit.c (jit_bfd_try_read_symtab): Update.
12950
12951 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12952
12953         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12954         unittests/utils-selftests.c.
12955         * unittests/utils-selftests.c: New file.
12956
12957 2018-03-14  Tom Tromey  <tom@tromey.com>
12958
12959         PR cli/14977:
12960         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12961         for NULL.
12962
12963 2018-03-14  Tom Tromey  <tom@tromey.com>
12964
12965         PR cli/19918:
12966         * printcmd.c (printf_pointer): Allow "-" in format.
12967
12968 2018-03-14  Tom Tromey  <tom@tromey.com>
12969
12970         * printcmd.c (_initialize_printcmd): Add usage to printf.
12971
12972 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12973
12974         * MAINTAINERS: Update my email address.
12975
12976 2018-03-13  Tom Tromey  <tom@tromey.com>
12977
12978         * machoread.c (macho_check_dsym): Change filenamep to a
12979         std::string*.
12980         (macho_symfile_read): Update.
12981         * symfile.c (load_command): Use std::string.
12982
12983 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12984
12985         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12986         to error message string.
12987         (riscv_register_name): Use xsnprintf instead of sprintf.
12988         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12989         internal_error.
12990         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12991         error.
12992         (riscv_push_dummy_call): Likewise.
12993
12994 2018-03-12  Tom Tromey  <tom@tromey.com>
12995
12996         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12997         Use gdb::byte_vector.
12998         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12999
13000 2018-03-12  Yao Qi  <yao.qi@linaro.org>
13001
13002         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
13003         parameter type to readable_regcache.
13004         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
13005         the declaration.
13006
13007 2018-03-11  Tom Tromey  <tom@tromey.com>
13008
13009         * dwarf2read.c (struct nextfield): Add initializers.
13010         (struct nextfnfield): Remove.
13011         (struct fnfieldlist): Add initializers.  Remove "length" and
13012         "head", use std::vector.
13013         (struct decl_field_list): Remove.
13014         (struct field_info): Add initializers.
13015         <fields, baseclasses>: Now std::vector.
13016         <nbaseclasses, nfnfields, typedef_field_list_count,
13017         nested_types_list_count>: Remove.
13018         (dwarf2_add_field, dwarf2_add_type_defn)
13019         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
13020         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
13021         (process_structure_scope): Update.
13022
13023 2018-03-11  Tom Tromey  <tom@tromey.com>
13024
13025         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
13026         for use by std::sort.
13027         (build_type_psymtabs_1): Use std::vector.
13028
13029 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
13030
13031         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
13032         and LIBMPFR in the printed configuration.
13033
13034 2018-03-08  Tom Tromey  <tom@tromey.com>
13035
13036         * source.c (get_filename_and_charpos): Use scoped_fd.
13037         * nto-procfs.c (procfs_open_1): Use scoped_fd.
13038         (procfs_pidlist): Likewise.
13039         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
13040         (iterate_over_mappings): Likewise.
13041
13042 2018-03-08  Tom Tromey  <tom@tromey.com>
13043
13044         * infcall.c (struct call_return_meta_info)
13045         <stack_temporaries_enabled>: Remove.
13046         (get_call_return_value, call_function_by_hand_dummy): Update.
13047         * thread.c (disable_thread_stack_temporaries): Remove.
13048         (enable_thread_stack_temporaries): Remove.
13049         (thread_stack_temporaries_enabled_p): Return bool.
13050         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
13051         (get_last_thread_stack_temporary): Update.
13052         * eval.c (evaluate_subexp): Update.
13053         * gdbthread.h (class enable_thread_stack_temporaries): Now a
13054         class, not a function.
13055         (value_ptr, value_vec): Remove typedefs.
13056         (class thread_info) <stack_temporaries_enabled>: Now bool.
13057         <stack_temporaries>: Now a std::vector.
13058         (thread_stack_temporaries_enabled_p)
13059         (value_in_thread_stack_temporaries): Return bool.
13060
13061 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
13062
13063         * remote.c (putpkt_binary): Fix omitted bytes reporting.
13064         (getpkt_or_notif_sane_1): Likewise.
13065
13066 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13067
13068         * build-id.c (build_id_to_debug_bfd): Use std::string.
13069
13070 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13071
13072         * build-id.c (find_separate_debug_file_by_buildid): Return
13073         std::string.
13074         * build-id.h (find_separate_debug_file_by_buildid): Return
13075         std::string.
13076         * coffread.c (coff_symfile_read): Adjust to std::string.
13077         * elfread.c (elf_symfile_read): Adjust to std::string.
13078         * symfile.c (separate_debug_file_exists): Change parameter to
13079         std::string.
13080         (find_separate_debug_file): Return std::string.
13081         (find_separate_debug_file_by_debuglink): Return std::string.
13082         * symfile.h (find_separate_debug_file_by_debuglink): Return
13083         std::string.
13084
13085 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
13086
13087         * common/xml-utils.c (xml_escape_text): Move code to...
13088         (xml_escape_text_append): ... this new function.
13089         * common/xml-utils.h (xml_escape_text_append): New declaration.
13090         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
13091         New function.
13092         (_initialize_xml_utils): register test_xml_escape_text_append as
13093         a selftest.
13094
13095 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
13096
13097         * defs.h: Remove MAX_REGISTER_SIZE.
13098         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
13099         asserts.
13100         * python/py-unwind.c (pyuw_sniffer): Likewise.
13101
13102 2018-03-07  Tom Tromey  <tom@tromey.com>
13103
13104         * linux-tdep.c (linux_info_proc): Update.
13105         * target.h (struct target_ops) <to_fileio_readlink>: Return
13106         optional<string>.
13107         (target_fileio_readlink): Return optional<string>.
13108         * remote.c (remote_hostio_readlink): Return optional<string>.
13109         * inf-child.c (inf_child_fileio_readlink): Return
13110         optional<string>.
13111         * target.c (target_fileio_readlink): Return optional<string>.
13112
13113 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
13114
13115         * regcache.c (cooked_read_test): Add riscv to the list of
13116         architectures that have a save_reggroup.
13117
13118 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13119
13120         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
13121         value is not a dynamic class object.
13122
13123 2018-03-06  Tom Tromey  <tom@tromey.com>
13124
13125         * rust-exp.y: Formatting fixes.
13126
13127 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13128
13129         * riscv-tdep.c (riscv_register_name): Remove target description
13130         support.
13131         (riscv_gdbarch_init): Remove target description check.
13132
13133 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13134
13135         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
13136         comment.
13137         * riscv-tdep.h: Likewise.
13138
13139 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13140
13141         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
13142         (riscv_pseudo_register_write): Delete.
13143         (riscv_gdbarch_init): Remove all use of pseudo registers.
13144
13145 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13146
13147         * record-btrace.c (btrace_print_lines): Replace cleanup
13148         parameter with RAII equivalents.
13149         (btrace_insn_history): Replace cleanup with RAII equivalents.
13150         * ui-out.h (make_cleanup_ui_out_list_begin_end,
13151         make_cleanup_ui_out_tuple_begin_end): Remove.
13152         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
13153         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
13154         make_cleanup_ui_out_list_begin_end): Remove.
13155
13156 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13157
13158         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
13159         parameter types to std::vector.  Use bool.
13160         (record_btrace_wait): Replace VEC(tp_t) with
13161         std::vector<thread_info *>.
13162         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
13163
13164 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
13165
13166         * record-btrace.c (record_btrace_disable_callback): Remove.
13167         (struct scoped_btrace_disable): New.
13168         (record_btrace_open): Use scoped_btrace_disable.
13169
13170 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13171
13172         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
13173         reading values from registers.
13174
13175 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13176
13177         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
13178         where appropriate.
13179
13180 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13181
13182         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
13183         change parameter type.  Use GDB's print functions, and use
13184         core_addr_to_string where appropriate.
13185         (riscv_push_dummy_call): Use core_addr_to_string where
13186         appropriate, update call to riscv_print_arg_location, and reindent
13187         a few lines.
13188         (riscv_return_value): Update call to riscv_print_arg_location.
13189
13190 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13191             Tim Newsome <tim@sifive.com>
13192             Albert Ou <a0u@eecs.berkeley.edu>
13193             Darius Rad <darius@bluespec.com>
13194
13195         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
13196         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
13197         (ALLDEPFILES): Add riscv-tdep.c
13198         * configure.tgt: Add riscv support.
13199         * riscv-tdep.c: New file.
13200         * riscv-tdep.h: New file.
13201         * NEWS: Mention new target.
13202         * MAINTAINERS: Add entry for riscv.
13203
13204 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
13205
13206         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
13207         fields within aggregates.
13208
13209 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
13210
13211         * record-btrace.c (btrace_print_lines): Change type of flags to
13212         gdb_disassembly_flags.
13213
13214 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13215
13216         * fbsd-nat.c: Include "inf-ptrace.h".
13217         (USE_SIGTRAP_SIGINFO): Conditionally define.
13218         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
13219         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
13220         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
13221         function.
13222         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
13223         Likewise.
13224         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
13225         Likewise.
13226         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
13227         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
13228         "supports_stopped_by_hw_breakpoint" target methods.
13229
13230 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13231
13232         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
13233         * fbsd-nat.c (debug_fbsd_nat): New variable.
13234         (show_fbsd_nat_debug): New function.
13235         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13236         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13237
13238 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13239
13240         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13241         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13242         prototype.
13243         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13244         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13245         method.
13246
13247 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13248
13249         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13250         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13251
13252 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13253
13254         * charset.c (struct charset_vector): New.
13255         (charsets): Change type to charset_vector.
13256         (find_charset_names): Adjust.
13257         (add_one): Adjust.
13258         (_initialize_charset): Adjust.
13259
13260 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13261
13262         * progspace.h (struct program_space) <deleted_solibs>: Change
13263         type to std::vector<std::string>.
13264         * progspace.c (clear_program_space_solib_cache): Adjust.
13265         * breakpoint.c (print_solib_event): Adjust.
13266         (check_status_catch_solib): Adjust.
13267         * solib.c (update_solib_list): Adjust.
13268         * ui-out.h (class ui_out) <field_string>: New overload.
13269         * ui-out.c (ui_out::field_string): New overload.
13270
13271 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13272
13273         * progspace.h (struct program_space): Add constructor and
13274         destructor, initialize fields.
13275         (add_program_space): Remove.
13276         * progspace.c (add_program_space): Rename to...
13277         (program_space::program_space): ... this.
13278         (release_program_space): Rename to...
13279         (program_space::~program_space): ... this.
13280         (delete_program_space): Use delete to delete program_space.
13281         (initialize_progspace): Use new to allocate program_space.
13282         * inferior.c (add_inferior_with_spaces): Likewise.
13283         (clone_inferior_command): Likewise.
13284         * infrun.c (follow_fork_inferior): Likewise.
13285         (handle_vfork_child_exec_or_exit): Likewise.
13286
13287 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13288
13289         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13290         (delim_string_to_char_ptr_vec): Return std::vector of
13291         gdb::unique_xmalloc_ptr.
13292         (dirnames_to_char_ptr_vec_append): Take std::vector of
13293         gdb::unique_xmalloc_ptr.
13294         (dirnames_to_char_ptr_vec): Return std::vector of
13295         gdb::unique_xmalloc_ptr.
13296         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13297         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13298         (delim_string_to_char_ptr_vec): Return an std::vector of
13299         gdb::unique_xmalloc_ptr, adjust the code.
13300         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13301         gdb::unique_xmalloc_ptr, adjust the code.
13302         (dirnames_to_char_ptr_vec): Return an std::vector of
13303         gdb::unique_xmalloc_ptr, adjust the code.
13304         * auto-load.c (auto_load_safe_path_vec): Change type to
13305         std::vector of gdb::unique_xmalloc_ptr.
13306         (auto_load_expand_dir_vars): Return an std::vector of
13307         gdb::unique_xmalloc_ptr, adjust the code.
13308         (auto_load_safe_path_vec_update): Adjust.
13309         (filename_is_in_auto_load_safe_path_vec): Adjust.
13310         (auto_load_objfile_script_1): Adjust.
13311         * build-id.c (build_id_to_debug_bfd): Adjust.
13312         * linux-thread-db.c (thread_db_load_search): Adjust.
13313         * source.c (add_path): Adjust.
13314         (openp): Adjust.
13315         * symfile.c (find_separate_debug_file): Adjust.
13316         * utils.c (do_free_char_ptr_vec): Remove.
13317         (make_cleanup_free_char_ptr_vec): Remove.
13318
13319 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13320
13321         PR gdb/22907
13322         * common/pathstuff.c: Conditionally include "<windows.h>".
13323
13324 2018-03-01  Georg Sauthoff  <mail@georg.so>
13325
13326         PR gdb/22888
13327         * gcore.in: Quote variables and switch interpreter to bash.
13328
13329 2018-03-01  Tom Tromey  <tom@tromey.com>
13330
13331         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13332         assertion.  Add assertion for discriminant_index.
13333         (quirk_rust_enum): Use correct base type name in univariant case.
13334
13335 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13336
13337         * record.c (get_call_history_modifiers): Return a
13338         record_print_flags.
13339         (cmd_record_call_history): Adjust.
13340         * record-btrace.c (record_btrace_call_history): Adjust.
13341         (record_btrace_call_history_range): Adjust.
13342         (record_btrace_call_history_from): Adjust.
13343         * target-debug.h (target_debug_print_record_print_flags): New.
13344         * target-delegates.c: Re-generate.
13345         * target.c (target_call_history): Change flags type.
13346         (target_call_history_from): Likewise.
13347         (target_call_history_range): Likewise.
13348         * target.h (struct target_ops) <target_call_history>: Likewise.
13349         (target_call_history_from): Likewise.
13350         (target_call_history_range): Likewise.
13351
13352 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13353             Simon Marchi  <simon.marchi@polymtl.ca>
13354
13355         * common/common-utils.c: Include "sys/stat.h".
13356         (is_regular_file): Move here from "source.c"; change return
13357         type to "bool".
13358         * common/common-utils.h (is_regular_file): New prototype.
13359         * common/pathstuff.c (contains_dir_separator): New function.
13360         * common/pathstuff.h (contains_dir_separator): New prototype.
13361         * source.c: Don't include "sys/stat.h".
13362         (is_regular_file): Move to "common/common-utils.c".
13363
13364 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13365
13366         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13367         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13368         * auto-load.c: Include "common/pathstuff.h".
13369         * common/common-def.h (current_directory): Move here.
13370         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13371         function.
13372         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13373         prototype.
13374         * common/pathstuff.c: New file.
13375         * common/pathstuff.h: New file.
13376         * compile/compile.c: Include "common/pathstuff.h".
13377         * defs.h (current_directory): Move to "common/common-defs.h".
13378         * dwarf2read.c: Include "common/pathstuff.h".
13379         * exec.c: Likewise.
13380         * guile/scm-safe-call.c: Likewise.
13381         * linux-thread-db.c: Likewise.
13382         * main.c: Likewise.
13383         * nto-tdep.c: Likewise.
13384         * objfiles.c: Likewise.
13385         * source.c: Likewise.
13386         * symtab.c: Likewise.
13387         * utils.c: Include "common/pathstuff.h".
13388         (gdb_realpath): Move to "common/pathstuff.c".
13389         (gdb_realpath_keepfile): Likewise.
13390         (gdb_abspath): Likewise.
13391         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13392         (gdb_realpath_keepfile): Likewise.
13393         (gdb_abspath): Likewise.
13394
13395 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13396
13397         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13398         wildcard process pid for super_resume for kernels with a
13399         specific bug.
13400
13401 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13402
13403         * compile/compile.c (get_args): Add additional comments
13404         explaining function.
13405
13406 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13407             Tom Tromey  <tom@tromey.com>
13408
13409         * target.h (memory_write_request_s): Remove typedef.  Don't define
13410         VEC.
13411         (target_write_memory_blocks): Change argument to std::vector.
13412         (struct memory_write_request): Add constructor.
13413         * target-memory.c (compare_block_starting_address): Return bool.
13414         Change argument types.
13415         (claim_memory): Change arguments to use std::vector.
13416         (split_regular_and_flash_blocks, blocks_to_erase)
13417         (compute_garbled_blocks): Likewise.
13418         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13419         (target_write_memory_blocks): Change argument to std::vector.
13420         * symfile.c (struct load_section_data): Add constructor and
13421         destructor.  Use std::vector for "requests".
13422         (struct load_progress_data): Add initializers.
13423         (load_section_callback): Update.  Use "new".
13424         (clear_memory_write_data): Remove.
13425         (generic_load): Update.
13426
13427 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13428
13429         * arch/aarch64.h: Use common/tdesc.h.
13430
13431 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13432
13433         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13434         architecture with a 64-bit ABI.
13435
13436 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13437
13438         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13439         ahead of target description loading.
13440
13441 2018-02-26  Tom Tromey  <tom@tromey.com>
13442
13443         * stack.c (backtrace_command_1): Update.
13444         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13445         of "flags".
13446         * python/py-framefilter.c (py_print_frame)
13447         (gdbpy_apply_frame_filter): Change type of "flags".
13448         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13449         of "flags".
13450         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13451         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13452         * extension.h (enum frame_filter_flag): Rename from
13453         frame_filter_flags.
13454         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13455         (apply_ext_lang_frame_filter): Change type of "flags".
13456         * extension.c (apply_ext_lang_frame_filter): Change type of
13457         "flags".
13458         * extension-priv.h (struct extension_language_ops)
13459         <apply_frame_filter>: Change type of "flags".
13460
13461 2018-02-26  Tom Tromey  <tom@tromey.com>
13462
13463         PR python/16497:
13464         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13465         off-by-one in py_end computation.
13466         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13467         PRINT_MORE_FRAMES.
13468         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13469         constant.
13470
13471 2018-02-26  Tom Tromey  <tom@tromey.com>
13472
13473         * dwarf2read.c (struct variant_field): New.
13474         (struct nextfield) <variant>: New field.
13475         (dwarf2_add_field): Handle DW_TAG_variant_part.
13476         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13477         discriminated union.
13478         (read_structure_type): Handle DW_TAG_variant_part.
13479         (handle_struct_member_die): New function, extracted from
13480         process_structure_scope.  Handle DW_TAG_variant.
13481         (process_structure_scope): Handle discriminated unions.  Call
13482         handle_struct_member_die.
13483
13484 2018-02-26  Tom Tromey  <tom@tromey.com>
13485
13486         * rust-lang.h (rust_last_path_segment): Declare.
13487         * rust-lang.c (rust_last_path_segment): Now public.  Change
13488         contract.
13489         (struct disr_info): Remove.
13490         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13491         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13492         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13493         (rust_enum_p, rust_enum_variant): New function.
13494         (rust_underscore_fields): Remove "offset" parameter.
13495         (rust_print_enum): New function.
13496         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13497         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13498         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13499         enums.
13500         (rust_internal_print_type): New function, from rust_print_type.
13501         Remove enum code.
13502         (rust_print_type): Call rust_internal_print_type.
13503         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13504         Update enum handling.
13505         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13506         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13507         (rust_union_quirks): New functions.
13508         (process_full_comp_unit, process_full_type_unit): Call
13509         rust_union_quirks.
13510         (process_structure_scope): Update rust_unions if necessary.
13511
13512 2018-02-26  Tom Tromey  <tom@tromey.com>
13513
13514         * value.h (value_union_variant): Declare.
13515         * valops.c (value_union_variant): New function.
13516         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13517         (struct discriminant_info): New.
13518         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13519         enumerator.
13520         (struct main_type) <flag_discriminated_union>: New field.
13521
13522 2018-02-26  Tom Tromey  <tom@tromey.com>
13523
13524         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13525         unittests/unpack-selftests.c.
13526         * unittests/unpack-selftests.c: New file.
13527         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13528
13529 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13530
13531         * dwarf2read.c (struct partial_die_info) <read>: New method.
13532         (read_partial_die): Remove the declaration.
13533         (load_partial_dies): Update.
13534         (partial_die_info::partial_die_info):
13535         (read_partial_die): Change it to partial_die_info::read.
13536
13537 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13538
13539         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13540         (fixup_partial_die): Remove declaration.
13541         (scan_partial_symbols): Update.
13542         (partial_die_parent_scope): Likewise.
13543         (partial_die_full_name): Likewise.
13544         (fixup_partial_die): Change it to partial_die_info::fixup.
13545
13546 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13547
13548         * dwarf2read.c (read_partial_die): Update the declaration.
13549         (load_partial_dies): Caller update.
13550         (read_partial_die): Remove one argument abbrev_len.
13551
13552 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13553
13554         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13555         assignment operator.
13556         (load_partial_dies): Use ctor and copy ctor.
13557         (read_partial_die): Update.
13558         (dwarf2_cu::find_partial_die): Use ctor.
13559
13560 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13561
13562         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13563         (find_partial_die_in_comp_unit): Change it to
13564         dwarf2_cu::find_partial_die.
13565         (find_partial_die): Update.
13566
13567 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13568
13569         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13570         is NULL.
13571
13572 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13573
13574         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13575
13576 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13577
13578         * arch/amd64.h: Use common/tdesc.h.
13579         * arch/i386.c: Likewise.
13580         * arch/i386.h: Likewise.
13581         * arch/tic6x.c: Likewise.
13582         * arch/tdesc.h: Move file from here...
13583         * common/tdesc.h: ...to here.
13584         * features/aarch64-core.c: Regenerate.
13585         * features/aarch64-fpu.c: Regenerate.
13586         * features/i386/32bit-avx.c: Regenerate.
13587         * features/i386/32bit-avx512.c: Regenerate.
13588         * features/i386/32bit-core.c: Regenerate.
13589         * features/i386/32bit-linux.c: Regenerate.
13590         * features/i386/32bit-mpx.c: Regenerate.
13591         * features/i386/32bit-pkeys.c: Regenerate.
13592         * features/i386/32bit-sse.c: Regenerate.
13593         * features/i386/64bit-avx.c: Regenerate.
13594         * features/i386/64bit-avx512.c: Regenerate.
13595         * features/i386/64bit-core.c: Regenerate.
13596         * features/i386/64bit-linux.c: Regenerate.
13597         * features/i386/64bit-mpx.c: Regenerate.
13598         * features/i386/64bit-pkeys.c: Regenerate.
13599         * features/i386/64bit-segments.c: Regenerate.
13600         * features/i386/64bit-sse.c: Regenerate.
13601         * features/i386/x32-core.c: Regenerate.
13602         * features/tic6x-c6xp.c: Regenerate.
13603         * features/tic6x-core.c: Regenerate.
13604         * features/tic6x-gp.c: Regenerate.
13605         * target-descriptions.c: Use common/tdesc.h.
13606         * target-descriptions.h: Likewise.
13607
13608 2018-02-24  Tom Tromey  <tom@tromey.com>
13609
13610         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13611         (try_thread_db_load_from_dir, thread_db_load_search): Use
13612         std::string.
13613         (info_auto_load_libthread_db_compare): Return bool.  Change
13614         argument types.
13615         (info_auto_load_libthread_db): Use std::vector, std::string.
13616         Remove cleanups.
13617
13618 2018-02-24  Tom Tromey  <tom@tromey.com>
13619
13620         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13621         std::string.
13622         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13623         std::string*.
13624         * gdbarch.c: Rebuild.
13625         * gdbarch.h: Rebuild.
13626         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13627         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13628         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13629         std::string*.
13630
13631 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13632
13633         * gdbtypes.h (sect_offset): Change type to uint64_t.
13634         (sect_offset_str): New function.
13635         * dwarf2read.c (create_addrmap_from_aranges): Use
13636         sect_offset_str.
13637         (error_check_comp_unit_head): Likewise.
13638         (create_debug_type_hash_table): Likewise.
13639         (read_cutu_die_from_dwo): Likewise.
13640         (init_cutu_and_read_dies): Likewise.
13641         (init_cutu_and_read_dies_no_follow): Likewise.
13642         (process_psymtab_comp_unit_reader): Likewise.
13643         (partial_die_parent_scope): Likewise.
13644         (peek_die_abbrev): Likewise.
13645         (process_queue): Likewise.
13646         (dwarf2_physname): Likewise.
13647         (read_namespace_alias): Likewise.
13648         (read_import_statement): Likewise.
13649         (create_dwo_cu_reader): Likewise.
13650         (create_cus_hash_table): Likewise.
13651         (lookup_dwo_cutu): Likewise.
13652         (inherit_abstract_dies): Likewise.
13653         (read_func_scope): Likewise.
13654         (read_call_site_scope): Likewise.
13655         (dwarf2_add_member_fn): Likewise.
13656         (read_common_block): Likewise.
13657         (read_module_type): Likewise.
13658         (read_typedef): Likewise.
13659         (read_subrange_type): Likewise.
13660         (load_partial_dies): Likewise.
13661         (read_partial_die): Likewise.
13662         (find_partial_die): Likewise.
13663         (read_str_index): Likewise.
13664         (dwarf2_string_attr): Likewise.
13665         (build_error_marker_type): Likewise.
13666         (lookup_die_type): Likewise.
13667         (dump_die_shallow): Likewise.
13668         (follow_die_ref): Likewise.
13669         (dwarf2_fetch_die_loc_sect_off): Likewise.
13670         (dwarf2_fetch_constant_bytes): Likewise.
13671         (follow_die_sig): Likewise.
13672         (get_signatured_type): Likewise.
13673         (get_DW_AT_signature_type): Likewise.
13674         (dwarf2_find_containing_comp_unit): Likewise.
13675         (set_die_type): Likewise.
13676
13677 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13678
13679         * arch/aarch64.c: Include "common-defs.h".
13680         * arch/amd64.c: Likewise.
13681         * arch/i386.c: Likewise.
13682
13683 2018-02-21  Tom Tromey  <tom@tromey.com>
13684
13685         * value.h: (extract_field_op): Update.
13686         * eval.c (extract_field_op): Return a const char *.
13687         * expression.h (parse_expression_for_completion): Update.
13688         * completer.c (complete_expression): Update.
13689         (add_struct_fields): Make fieldname const.
13690         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13691         (mark_completion_tag, parse_exp_in_context_1): Update.
13692         (parse_expression_for_completion): Change "name" to
13693         unique_xmalloc_ptr*.
13694
13695 2018-02-21  Tom Tromey  <tom@tromey.com>
13696
13697         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13698
13699 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13700
13701         * avr-tdep.c (avr_read_pc): Change parameter type to
13702         readable_regcache.
13703         * gdbarch.sh (read_pc): Likewise.
13704         * gdbarch.c: Re-generated.
13705         * gdbarch.h: Re-generated.
13706         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13707         readable_regcache.
13708         * ia64-tdep.c (ia64_read_pc): Likewise.
13709         * mips-tdep.c (mips_read_pc): Likewise.
13710         * spu-tdep.c (spu_read_pc): Likewise.
13711
13712 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13713
13714         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13715         * regcache-dump.c: New file.
13716         * regcache.c: Move register_dump to regcache-dump.c.
13717         (maintenance_print_registers): Likewise.
13718         (maintenance_print_raw_registers): Likewise.
13719         (maintenance_print_cooked_registers): Likewise.
13720         (maintenance_print_register_groups): Likewise.
13721         (maintenance_print_remote_registers): Likewise.
13722         (_initialize_regcache): Likewise.
13723         * regcache.h (register_dump): Moved from regcache.c.
13724
13725 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13726
13727         * regcache.c (regcache::regcache): Update.
13728         (regcache::invalidate): Move it to detached_regcache::invalidate.
13729         (get_thread_arch_aspace_regcache): Update.
13730         (regcache::raw_update): Update.
13731         (regcache::cooked_read): Remove some code.
13732         (regcache::cooked_read_value): Likewise.
13733         (regcache::raw_write): Remove assert on m_readonly_p.
13734         (regcache::raw_supply_integer): Move it to
13735         detached_regcache::raw_supply_integer.
13736         (regcache::raw_supply_zeroed): Likewise.
13737         * regcache.h (detached_regcache) <raw_supply_integer>: New
13738         declaration.
13739         <raw_supply_zeroed, invalidate>: Likewise.
13740         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13741         <invalidate>: Likewise.
13742         <m_readonly_p>: Removed.
13743
13744 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13745
13746         * infcmd.c (get_return_value): Let stop_regs point to
13747         get_current_regcache.
13748         * regcache.c (regcache::regcache): Remove.
13749         (register_dump_reg_buffer): New class.
13750         (regcache_print): Adjust.
13751         * regcache.h (regcache): Remove constructors.
13752
13753 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13754
13755         * regcache.c (class register_dump): New class.
13756         (register_dump_regcache, register_dump_none): New class.
13757         (register_dump_remote, register_dump_groups): New class.
13758         (regcache_print): Update.
13759         * regcache.h (regcache_dump_what): Move it to regcache.c.
13760         (regcache) <dump>: Remove.
13761
13762 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13763
13764         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13765          reg_buffer_rw *.
13766         (jit_unwind_reg_set_impl): Call raw_supply.
13767         (jit_frame_sniffer): Use reg_buffer_rw.
13768         * record-full.c (record_full_core_regbuf): Change its type.
13769         (record_full_core_open_1): Use reg_buffer_rw.
13770         (record_full_close): Likewise.
13771         (record_full_core_fetch_registers): Use regcache->raw_supply.
13772         (record_full_core_store_registers): Likewise.
13773         * regcache.c (regcache::get_register_status): Move it to
13774         reg_buffer.
13775         (regcache_raw_set_cached_value): Remove.
13776         (regcache::raw_set_cached_value): Remove.
13777         (regcache::raw_write): Call raw_supply.
13778         (regcache::raw_supply): Move it to reg_buffer_rw.
13779         * regcache.h (regcache_raw_set_cached_value): Remove.
13780         (reg_buffer_rw): New class.
13781
13782 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13783
13784         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13785         readonly_detached_regcache.
13786         (dummy_frame_prev_register): Use regcache->cooked_read.
13787         * frame.c (frame_save_as_regcache): Change return type.
13788         (frame_pop): Update.
13789         * frame.h (frame_save_as_regcache): Update declaration.
13790         * inferior.h (get_infcall_suspend_state_regcache): Update
13791         declaration.
13792         * infrun.c (infcall_suspend_state) <registers>: use
13793         readonly_detached_regcache.
13794         (save_infcall_suspend_state): Don't use regcache_dup.
13795         (get_infcall_suspend_state_regcache): Change return type.
13796         * linux-fork.c (struct fork_info) <savedregs>: Change to
13797         readonly_detached_regcache.
13798         <pc>: New field.
13799         (fork_save_infrun_state): Don't use regcache_dup.
13800         (info_checkpoints_command): Adjust.
13801         * mi/mi-main.c (register_changed_p): Update declaration.
13802         (mi_cmd_data_list_changed_registers): Use
13803         readonly_detached_regcache.
13804         (register_changed_p): Change parameter type to
13805         readonly_detached_regcache.
13806         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13807         readonly_detached_regcache.
13808         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13809         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13810         New.
13811         (regcache::save): Move it to reg_buffer.
13812         (regcache::restore): Change parameter type.
13813         (regcache_dup): Remove.
13814         * regcache.h (reg_buffer) <save>: New method.
13815         (readonly_detached_regcache): New class.
13816         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13817         readonly_detached_regcache.
13818         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13819
13820 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13821
13822         * frame.c (frame_save_as_regcache): Use regcache method save.
13823         (frame_pop): Use regcache method restore.
13824         * infrun.c (restore_infcall_suspend_state): Likewise.
13825         * linux-fork.c (fork_load_infrun_state): Likewise.
13826         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13827         save.
13828         * regcache.c (regcache_save): Remove.
13829         (regcache::restore): More asserts.
13830         (regcache_cpy): Remove.
13831         * regcache.h (regcache_save): Remove the declaration.
13832         (regcache::restore): Move from private to public.
13833         Remove the friend declaration of regcache_cpy.
13834         (regcache_cpy): Remove declaration.
13835
13836 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13837
13838         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13839         parameter type to 'readable_regcache *'.
13840         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13841         * arm-tdep.c (arm_neon_quad_read): Likewise.
13842         (arm_pseudo_read): Likewise.
13843         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13844         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13845         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13846         * gdbarch.c: Re-generated.
13847         * gdbarch.h: Re-generated.
13848         * gdbarch.sh (pseudo_register_read): Change parameter type to
13849         'readable_regcache *'.
13850         (pseudo_register_read_value): Likewise.
13851         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13852         (h8300_pseudo_register_read): Likewise.
13853         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13854         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13855         (i386_pseudo_register_read_into_value): Likewise.
13856         (i386_pseudo_register_read_value): Likewise.
13857         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13858         declaration.
13859         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13860         * m32c-tdep.c (m32c_raw_read): Likewise.
13861         (m32c_read_flg): Likewise.
13862         (m32c_banked_register): Likewise.
13863         (m32c_banked_read): Likewise.
13864         (m32c_sb_read): Likewise.
13865         (m32c_part_read): Likewise.
13866         (m32c_cat_read): Likewise.
13867         (m32c_r3r2r1r0_read): Likewise.
13868         (m32c_pseudo_register_read): Likewise.
13869         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13870         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13871         (mep_pseudo_cr64_read): Likewise.
13872         (mep_pseudo_register_read): Likewise.
13873         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13874         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13875         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13876         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13877         (regcache::cooked_read): Likewise.
13878         (regcache::cooked_read_value): Likewise.
13879         (regcache_cooked_read_signed):
13880         (regcache::cooked_read): Likewise.
13881         * regcache.h (readable_regcache): New class.
13882         (regcache): Inherit readable_regcache.  Move some methods to
13883         readable_regcache.
13884         * rl78-tdep.c (rl78_pseudo_register_read): Change
13885         parameter type to 'readable_regcache *'.
13886         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13887         (e500_pseudo_register_read): Change parameter type to
13888         'readable_regcache *'.
13889         (dfp_pseudo_register_read): Likewise.
13890         (vsx_pseudo_register_read): Likewise.
13891         (efpr_pseudo_register_read): Likewise.
13892         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13893         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13894         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13895         (sh64_pseudo_register_read): Likewise.
13896         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13897         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13898         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13899         (spu_pseudo_register_read): Likewise.
13900         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13901         (xtensa_pseudo_register_read): Likewise.
13902
13903 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13904
13905         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13906         (regcache::arch): Move it to reg_buffer::arch.
13907         (regcache::register_buffer): Likewise.
13908         (regcache::assert_regnum): Likewise.
13909         (regcache::num_raw_registers): Likewise.
13910         * regcache.h (reg_buffer): New class.
13911         (regcache): Inherit reg_buffer.
13912
13913 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13914
13915         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13916         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13917
13918 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13919
13920         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13921
13922 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13923
13924         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13925         (SFILES): Remove common/*.c files.
13926         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13927         * common/common.host: Add common reference.
13928         * configure.ac: Likewise.
13929         * configure: Regenerate.
13930
13931 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13932
13933         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13934         (block_initialize_namespace): Use new.
13935         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13936         (dwarf2_free_objfile): Use delete.
13937         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13938         (copy_type_recursive): Use new.
13939         * gdb_obstack.h (allocate_on_obstack): New.
13940
13941 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13942
13943         PR gdb/22849
13944         * inferior.c (exit_inferior_1): Reset inf->control.
13945
13946 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13947
13948         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13949         declaration.
13950
13951 2018-02-14  Pedro Alves  <palves@redhat.com>
13952
13953         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13954         frame_cleanup_after_sniffer on exception.
13955
13956 2018-02-14  Tom Tromey  <tom@tromey.com>
13957
13958         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13959         const.
13960         (solib_bfd_open): Make pathname const.
13961         * solib.c (solib_bfd_open): Make pathname const.
13962         * solib-spu.c (spu_bfd_fopen): Make name const.
13963         (spu_bfd_open): Make pathname const.
13964         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13965         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13966
13967 2018-02-14  Tom Tromey  <tom@tromey.com>
13968
13969         * symfile.c (symfile_bfd_open): Update.
13970         * source.h (openp, source_full_path_of, find_and_open_source):
13971         Change argument type to unique_xmalloc_ptr.
13972         * source.c (openp): Take a unique_xmalloc_ptr.
13973         (source_full_path_of, find_and_open_source): Likewise.
13974         (open_source_file, symtab_to_fullname): Update.
13975         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13976         unique_xmalloc_ptr.
13977         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13978         (exec_file_find): Update.
13979         * psymtab.c (psymtab_to_fullname): Update.
13980         * nto-tdep.h (nto_find_and_open_solib): Update.
13981         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13982         unique_xmalloc_ptr.
13983         * exec.c (exec_file_attach): Update.
13984         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13985         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13986
13987 2018-02-14  Tom Tromey  <tom@tromey.com>
13988
13989         * solib.c: Include source.h.
13990         * nto-tdep.c: Include source.h.
13991         * mi/mi-cmd-env.c: Include source.h.
13992         * infcmd.c: Include source.h.
13993         * exec.c: Include source.h.
13994         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13995         (add_path, directory_switch, source_path, init_source_path): Move
13996         declarations...
13997         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13998         (add_path, directory_switch, source_path, init_source_path):
13999         ...here.
14000
14001 2018-02-14  Tom Tromey  <tom@tromey.com>
14002
14003         * solist.h (exec_file_find, solib_find): Return
14004         unique_xmalloc_ptr.
14005         (solib_bfd_fopen): Take a const char *.
14006         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
14007         (exec_file_find, solib_find): Likewise.
14008         (solib_bfd_fopen): Do not take ownership of "pathname".
14009         (solib_bfd_open): Use unique_xmalloc_ptr.
14010         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
14011         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
14012         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
14013         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
14014
14015 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
14016
14017         * ada-lang.c (name_match_type_from_name): Remove reference to
14018         ada_name_for_lookup in function's documentation.
14019         * ada-lang.h (ada_name_for_lookup): Delete declaration.
14020
14021 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14022
14023         * defs.h (enum openp_flags): New enum.
14024         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
14025         Move to enum openp_flags.
14026         (openp_flags): New enum flags.
14027         (openp): Change parameter type to openp_flags.
14028         * source.c (openp): Change parameter type to openp_flags.
14029         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
14030         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
14031
14032 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
14033
14034         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
14035         per-command.
14036
14037 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14038
14039         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
14040         into...
14041         (class dwarf2_queue_guard): ...the destructor of this new class.
14042         (dw2_do_instantiate_symtab): Create instance of the new class
14043         dwarf2_queue_guard, remove cleanup.
14044
14045 2018-02-09  Tom Tromey  <tom@tromey.com>
14046
14047         * source.c (find_source_lines): Don't reference past the end of
14048         the vector.
14049
14050 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14051
14052         * remote.c (remote_btrace_maybe_reopen): Change error message.
14053         * btrace.c (btrace_enable): Likewise.
14054         (parse_xml_btrace): Likewise.
14055         (parse_xml_btrace_conf): Likewise.
14056
14057 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14058
14059         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
14060         (linux_enable_pt, linux_enable_bts): Call
14061         diagnose_perf_event_open_fail.
14062
14063 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14064
14065         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
14066         Remove parameter and change return type.  Update callers.  Move it.
14067         (linux_enable_bts, linux_enable_pt): Improve error message.
14068         (linux_enable_pt): Remove zero buffer size check.
14069         (linux_enable_btrace): Improve error messages.  Remove NULL return
14070         check.
14071
14072 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14073
14074         * btrace.c (btrace_enable): Remove target_supports_btrace call.
14075         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14076         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
14077         (linux_supports_pt, linux_supports_btrace): Remove.
14078         (linux_enable_bts): Call cpu_supports_bts.
14079         * nat/linux-btrace.h (linux_supports_btrace): Remove.
14080         * remote.c (remote_supports_btrace): Remove.
14081         (init_remote_ops): Remove remote_supports_btrace.
14082         * target-delegates.c: Regenerated.
14083         * target.c (target_supports_btrace): Remove.
14084         * target.h (target_ops) <to_supports_btrace>: Remove
14085         (target_supports_btrace): Remove.
14086         * x86-linux-nat.c (x86_linux_create_target): Remove
14087         linux_supports_btrace.
14088
14089 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14090
14091         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
14092         btrace failed.
14093         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
14094         exception and use message in own exception.
14095
14096 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14097
14098         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
14099         (perf_event_pt_event_type): Use gdb_file_up.
14100         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
14101         scoped_fd, and scoped_mmap.
14102
14103 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14104
14105         * common/scoped_mmap.h: New.
14106         * unittests/scoped_mmap-selftest.c: New.
14107         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14108         unittests/scoped_mmap-selftest.c.
14109
14110 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
14111
14112         * common/scoped_fd.h: New.
14113         * unittests/scoped_fd-selftest.c: New.
14114         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14115         unittests/scoped_fd-selftest.c.
14116
14117 2018-02-09  Tom Tromey  <tom@tromey.com>
14118
14119         * auto-load.c (auto_load_section_scripts): Use
14120         gdb::unique_xmalloc_ptr.
14121
14122 2018-02-09  Tom Tromey  <tom@tromey.com>
14123
14124         * auto-load.c (execute_script_contents): Use std::string.
14125
14126 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
14127
14128         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
14129         Python function, rather than a new command.
14130
14131 2018-02-08  Tom Tromey  <tom@tromey.com>
14132
14133         * solib.c (solib_find_1): Use std::string.
14134         (solib_bfd_fopen): Use unique_xmalloc_ptr.
14135
14136 2018-02-08  Tom Tromey  <tom@tromey.com>
14137
14138         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
14139
14140 2018-02-08  Tom Tromey  <tom@tromey.com>
14141
14142         * source.c (find_source_lines): Use gdb::def_vector.
14143
14144 2018-02-08  Tom Tromey  <tom@tromey.com>
14145
14146         * macrocmd.c (struct temporary_macro_definition): New.
14147         (macro_define_command): Use temporary_macro_definition.  Remove
14148         cleanups.
14149         (free_macro_definition_ptr): Remove.
14150
14151 2018-02-08  Tom Tromey  <tom@tromey.com>
14152
14153         * macroexp.c (maybe_expand): Use std::string.
14154
14155 2018-02-08  Tom Tromey  <tom@tromey.com>
14156
14157         * macroexp.c (struct macro_buffer): Add initializers for some
14158         members.
14159         (init_buffer, init_shared_buffer, free_buffer)
14160         (free_buffer_return_text): Remove.
14161         (macro_buffer): New constructors.
14162         (~macro_buffer): New destructor.
14163         (macro_buffer::set_shared): New method.
14164         (macro_buffer::resize_buffer, macro_buffer::appendc)
14165         (macro_buffer::appendmem): Now methods, not free functions.
14166         (set_token, append_tokens_without_splicing, stringify)
14167         (macro_stringify): Update.
14168         (gather_arguments): Change return type.  Remove argc_p argument,
14169         add args_ptr argument.  Use std::vector.
14170         (substitute_args): Remove argc argument.  Accept std::vector.
14171         (expand): Update.  Use std::vector.
14172         (scan, macro_expand, macro_expand_next): Update.
14173
14174 2018-02-08  Tom Tromey  <tom@tromey.com>
14175
14176         * symtab.c (default_collect_symbol_completion_matches_break_on):
14177         Use unique_xmalloc_ptr.
14178         * macroscope.h: (sal_macro_scope, user_macro_scope)
14179         (default_macro_scope): Return unique_xmalloc_ptr.
14180         * macroscope.c (sal_macro_scope, user_macro_scope)
14181         (default_macro_scope): Return unique_xmalloc_ptr.
14182         * macroexp.h (macro_expand, macro_expand_once): Return
14183         unique_xmalloc_ptr.
14184         * macroexp.c (macro_expand, macro_expand_once): Return
14185         unique_xmalloc_ptr.
14186         * macrocmd.c (macro_expand_command, macro_expand_once_command)
14187         (info_macro_command, info_macros_command): Use
14188         unique_xmalloc_ptr.
14189         * compile/compile-c-support.c (write_macro_definitions): Use
14190         unique_xmalloc_ptr.
14191         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
14192
14193 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
14194
14195         * value.c (value_static_field): Assign field type instead of
14196         containing type when returning an optimized out value.
14197
14198 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14199
14200         * ft32-tdep.c (ft32_read_pc): Remove.
14201         (ft32_write_pc): Remove.
14202         (ft32_gdbarch_init): Update.
14203         * m32r-tdep.c (m32r_read_pc): Remove.
14204         (m32r_gdbarch_init): Update.
14205         * mep-tdep.c (mep_read_pc): Remove.
14206         (mep_gdbarch_init): Update.
14207         * microblaze-tdep.c (microblaze_write_pc): Remove.
14208         (microblaze_gdbarch_init): Update.
14209         * mn10300-tdep.c (mn10300_read_pc): Remove.
14210         (mn10300_write_pc): Remove.
14211         (mn10300_gdbarch_init): Update.
14212         * moxie-tdep.c (moxie_read_pc): Remove.
14213         (moxie_write_pc): Remove.
14214         (moxie_gdbarch_init): Update.
14215
14216 2018-02-06  Yao Qi  <yao.qi@linaro.org>
14217
14218         * expprint.c (print_subexp_standard): Handle
14219         OP_F77_UNDETERMINED_ARGLIST.
14220         (dump_subexp_body_standard): Likewise.
14221
14222 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
14223
14224         * target-descriptions.c (tdesc_element_visitor) Add empty
14225         implementations.
14226         (tdesc_type): Move make_gdb_type from here.
14227         (tdesc_type_builtin): Likewise.
14228         (tdesc_type_vector): Likewise.
14229         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
14230         (make_gdb_type_struct): Move from tdesc_type_with_fields.
14231         (make_gdb_type_union): Likewise.
14232         (make_gdb_type_flags): Likewise.
14233         (make_gdb_type_enum): Likewise.
14234         (make_gdb_type): New function.
14235         (tdesc_register_type): Use static make_gdb_type.
14236
14237 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14238
14239         * infcmd.c (default_print_one_register_info): Align natural-format
14240         column values consistently one under another.
14241         (pad_to_column): New function.
14242
14243 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14244
14245         * dwarf2read.c (dwarf2_physname): Move commment.
14246
14247 2018-02-01  Leszek Swirski  <leszeks@google.com>
14248
14249         * varobj.c (varobj_formatted_print_options): Allow recursive
14250         pretty printing if pretty printing is enabled.
14251
14252 2018-02-01  Leszek Swirski  <leszeks@google.com>
14253
14254         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14255         names after a structop as a filename.
14256
14257 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14258
14259         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14260         (arm_record_coproc_data_proc): Likewise.
14261
14262 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14263
14264         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14265
14266 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14267
14268         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14269         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14270
14271 2018-01-31  Pedro Alves  <palves@redhat.com>
14272
14273         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14274         * inflow.c (child_terminal_save_inferior): Wrap reference to
14275         tcgetpgrp in HAVE_TERMIOS_H.
14276         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14277         _WIN32.
14278         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14279         always iterate over all inferiors.
14280         (gdbsim_cntrl_c): Adjust.
14281         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14282
14283 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14284
14285         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14286         index type is objfile-owned if the element type is as well.
14287
14288 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14289
14290         GDB 8.1 released.
14291
14292 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14293
14294         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14295         "features/s390x-linux64.c".
14296         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14297         s390_linux32 and s390x_linux64.
14298         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14299         default tdesc.
14300         * s390-tdep.c: Include "features/s390-linux32.c" and
14301         "features/s390x-linux64.c".
14302         (s390_tdesc_valid): Add check for tdesc_has_registers.
14303         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14304         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14305         tdesc_s390x_linux64.
14306         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14307         tdesc_s390x_linux64 to...
14308         * s390-tdep.h: ...here.
14309
14310 2018-01-30  Pedro Alves  <palves@redhat.com>
14311
14312         PR gdb/13211
14313         * config.in, configure: Regenerate.
14314         * configure.ac: Check for getpgid.
14315         * go32-nat.c (go32_pass_ctrlc): New.
14316         (go32_target): Install it.
14317         * inf-child.c (inf_child_target): Install
14318         child_terminal_save_inferior, child_pass_ctrlc and
14319         child_interrupt.
14320         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14321         (inf_ptrace_target): No longer install it.
14322         * infcmd.c (interrupt_target_1): Adjust.
14323         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14324         (child_interrupt): Declare.
14325         (inferior::terminal_state): New.
14326         * inflow.c (struct terminal_info): Update comments.
14327         (inferior_process_group): Delete.
14328         (terminal_is_ours): Delete.
14329         (gdb_tty_state): New.
14330         (child_terminal_init): Adjust.
14331         (is_gdb_terminal, sharing_input_terminal_1)
14332         (sharing_input_terminal): New functions.
14333         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14334         Set the process's actual process group in the foreground if
14335         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14336         mark terminal as the inferior's if not sharing GDB's terminal.
14337         Don't check attach_flag.
14338         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14339         pass down a target_terminal_state.
14340         (child_terminal_save_inferior): New, factored out from ...
14341         (child_terminal_ours_1): ... this.  Handle
14342         target_terminal_state::is_ours_for_output.
14343         (child_interrupt, child_pass_ctrlc): New.
14344         (inflow_inferior_exit): Clear the inferior's terminal_state.
14345         (copy_terminal_info): Copy the inferior's terminal state.
14346         (_initialize_inflow): Remove reference to terminal_is_ours.
14347         * inflow.h (inferior_process_group): Delete.
14348         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14349         * procfs.c (procfs_target): Don't install procfs_interrupt.
14350         (procfs_interrupt): Delete.
14351         * remote.c (remote_serial_quit_handler): Adjust.
14352         (remote_interrupt): Remove ptid parameter.  Adjust.
14353         * target-delegates.c: Regenerate.
14354         * target.c: Include "terminal.h".
14355         (target_terminal::terminal_state): Rename to ...
14356         (target_terminal::m_terminal_state): ... this.
14357         (target_terminal::init): Adjust.
14358         (target_terminal::inferior): Adjust to per-inferior
14359         terminal_state.
14360         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14361         (target_terminal::ours, target_terminal::ours_for_output): Use
14362         target_terminal_is_ours_kind.
14363         (target_interrupt): Remove ptid parameter.  Adjust.
14364         (default_target_pass_ctrlc): Adjust.
14365         * target.h (target_ops::to_terminal_save_inferior): New field.
14366         (target_ops::to_interrupt): Remove ptid_t parameter.
14367         (target_interrupt): Remove ptid_t parameter.  Update comment.
14368         (target_pass_ctrlc): Update comment.
14369         * target/target.h (target_terminal_state): New scoped enum,
14370         factored out of ...
14371         (target_terminal::terminal_state): ... here.
14372         (target_terminal::inferior): Update comments.
14373         (target_terminal::restore_inferior): New.
14374         (target_terminal::is_inferior, target_terminal::is_ours)
14375         (target_terminal::is_ours_for_output): Adjust.
14376         (target_terminal::scoped_restore_terminal_state): Adjust to
14377         rename, and call restore_inferior() instead of inferior().
14378         (target_terminal::scoped_restore_terminal_state::m_state): Change
14379         type.
14380         (target_terminal::terminal_state): Rename to ...
14381         (target_terminal::m_terminal_state): ... this and change type.
14382
14383 2018-01-30  Pedro Alves  <palves@redhat.com>
14384
14385         * linux-nat.c (wait_for_signal): New function.
14386         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14387         directly.
14388         (async_terminal_is_ours)
14389         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14390         (linux_nat_add_target): Don't override
14391         to_terminal_inferior/to_terminal_ours.
14392
14393 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14394
14395         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14396
14397 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14398
14399         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14400         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14401         dwarf2_per_objfile_free here.
14402         (dwarf2_per_objfile_free): Remove.
14403         (_initialize_dwarf2_read): Don't register
14404         dwarf2_per_objfile_free as a registry cleanup.
14405
14406 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14407
14408         Avoid compilation errors in MinGW native builds
14409
14410         The error is triggered by including python-internal.h, and the
14411         error message is:
14412
14413              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14414                       from build-gnulib/import/math.h:27,
14415                       from d:/usr/Python26/include/pyport.h:235,
14416                       from d:/usr/Python26/include/Python.h:58,
14417                       from python/python-internal.h:94,
14418                       from python/py-arch.c:24:
14419              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14420         using ::hypot;
14421                 ^~~~~
14422
14423         This happens because Python headers define 'hypot' to expand t
14424         '_hypot' in the Windows builds.
14425         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14426         'hypoth'.  This avoids a compilation error.
14427
14428 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14429
14430         * MAINTAINERS (Write After Approval): Fix ordering.
14431
14432 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14433
14434         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14435
14436 2018-01-26  Alan Modra  <amodra@gmail.com>
14437
14438         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14439         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14440         Remove nop.  Make const.  Comment.
14441         (powerpc32_plt_stub_so_2): New.
14442         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14443         Correct count.  Update uses.
14444         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14445         Move common code reading PLT entry word.  Correct
14446         powerpc32_plt_stub PLT address calculation.
14447         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14448         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14449         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14450         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14451         (ppc64_standard_linkage8): Likewise.
14452         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14453         Correct insns description.
14454         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14455
14456 2018-01-24  Pedro Alves  <palves@redhat.com>
14457
14458         GCC PR libstdc++/83906
14459         * gdbtypes.c (operator==(const dynamic_prop &,
14460         const dynamic_prop &)): New.
14461         (operator==(const range_bounds &, const range_bounds &)): New.
14462         (check_types_equal): Use them instead of memcmp.
14463         * gdbtypes.h (operator==(const dynamic_prop &,
14464         const dynamic_prop &)): Declare.
14465         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14466         (operator==(const range_bounds &, const range_bounds &)): Declare.
14467         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14468
14469 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14470
14471         * s390-linux-tdep.c (s390_record_address_mask)
14472         (s390_record_calc_disp_common, s390_record_calc_disp)
14473         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14474         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14475         (s390_process_record): Move to s390-tdep.c.
14476         (s390_linux_init_abi_any): Adjust.
14477         * s390-tdep.c (s390_record_address_mask)
14478         (s390_record_calc_disp_common, s390_record_calc_disp)
14479         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14480         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14481         (s390_process_record): Moved from s390-linux-tdep.c
14482         (s390_gdbarch_init): Adjust.
14483
14484 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14485
14486         * s390-linux-nat.c (s390-tdep.h): New include.
14487         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14488         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14489         (ALLDEPFILES): Add s390-tdep.c.
14490         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14491         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14492         * s390-tdep.h: ...this.  New file.
14493         * s390-linux-tdep.c (s390-tdep.h): New include.
14494         (_initialize_s390_tdep): Rename to...
14495         (_initialize_s390_linux_tdep): ...this and adjust.
14496         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14497         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14498         s390-tdep.h.
14499         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14500         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14501         (s390_is_partial_instruction, s390_software_single_step)
14502         (is_non_branch_ril, s390_displaced_step_copy_insn)
14503         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14504         (s390_prologue_data, s390_addr, s390_store, s390_load)
14505         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14506         (s390_register_call_saved, s390_guess_tracepoint_registers)
14507         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14508         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14509         (s390_pseudo_register_name, s390_pseudo_register_type)
14510         (s390_pseudo_register_read, s390_pseudo_register_write)
14511         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14512         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14513         (s390_addr_bits_remove, s390_address_class_type_flags)
14514         (s390_address_class_type_flags_to_name)
14515         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14516         (s390_function_arg_float, s390_function_arg_vector)
14517         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14518         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14519         (s390_frame_align, s390_register_return_value, s390_return_value)
14520         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14521         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14522         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14523         (s390_trad_frame_prev_register, s390_unwind_cache)
14524         (s390_prologue_frame_unwind_cache)
14525         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14526         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14527         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14528         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14529         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14530         (s390_frame_base_address, s390_local_base_address)
14531         (s390_frame_base, s390_gcc_target_options)
14532         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14533         (s390_validate_reg_range, s390_tdesc_valid)
14534         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14535         * s390-tdep.c: ...this.  New file.
14536
14537 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14538
14539         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14540         (s390_process_record, s390_gdbarch_tdep_alloc)
14541         (s390_linux_init_abi_any): Use/set new hook.
14542
14543 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14544
14545         * s390-linux-tdep.c (osabi.h): New include.
14546         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14547         (s390_linux_init_abi_any): New functions.
14548         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14549
14550 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14551
14552         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14553         tdesc_has_registers check
14554
14555 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14556
14557         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14558         (s390_validate_reg_range): New macro.
14559         (s390_gdbarch_init): Adjust.
14560
14561 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14562
14563         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14564         (s390_gdbarch_tdep_alloc): Adjust.
14565         (s390_gdbarch_init): Adjust.
14566
14567 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14568
14569         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14570         <have_tdb>: Change type to bool.
14571         (s390_gdbarch_tdep_alloc): Adjust.
14572         (s390_gdbarch_init): Adjust.
14573
14574 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14575
14576         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14577         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14578         (s390_gdbarch_tdep_alloc): New function.
14579         (s390_gdbarch_init): Allocate tdep at start and use its fields
14580         instead of separate variables.
14581
14582 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14583
14584         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14585         when looking for cached gdbarch and add comment for remaining.
14586
14587 2018-01-22  Pedro Alves  <palves@redhat.com>
14588             Sergio Durigan Junior  <sergiodj@redhat.com>
14589
14590         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14591         case.
14592
14593 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14594
14595         * MAINTAINERS: Update my company e-mail address.
14596
14597 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14598
14599         * regcache.c (cooked_write_test): New function.
14600         (_initialize_regcache): Register the test.
14601
14602 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14603
14604         * ia64-tdep.c (ia64_pseudo_register_read): Call
14605         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14606         * m32c-tdep.c (m32c_cat_read): Likewise.
14607         (m32c_r3r2r1r0_read): Likewise.
14608         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14609         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14610
14611 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14612
14613         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14614         method raw_read instead of regcache_raw_read.
14615         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14616         * arm-tdep.c (arm_neon_quad_read): Likewise.
14617         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14618         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14619         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14620         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14621         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14622         (i386_pseudo_register_read_into_value): Likewise.
14623         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14624         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14625         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14626         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14627         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14628         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14629         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14630         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14631         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14632
14633 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14634
14635         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14636         * configure.tgt: Remove target mt.
14637         * mt-tdep.c: Remove.
14638         * regcache.c (cooked_read_test): Remove the check for mt.
14639
14640 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14641
14642         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14643         instead of gdbarch_pseudo_register_read_value.
14644
14645 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14646
14647         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14648         language is Ada.
14649
14650 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14651
14652         * linespec.c (create_sals_line_offset): Remove code that preserved
14653         the symtab_and_line's line number.
14654
14655 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14656
14657         * varobj.c (varobj_create): Don't set valid_block when creating a
14658         floating varobj.
14659
14660 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14661
14662         * varobj.c (varobj_create): Remove out of date comment.
14663
14664 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14665
14666         PR mi/20395
14667         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14668         updating innermost block.
14669         * parse.c (innermost_block_tracker::update): Take extra type
14670         parameter, and check types match before updating innermost block.
14671         (write_dollar_variable): Update innermost block for registers.
14672         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14673         (innermost_block_tracker::innermost_block_tracker): Initialise
14674         m_types member.
14675         (innermost_block_tracker::reset): Take type parameter.
14676         (innermost_block_tracker::update): Take type parameter, and pass
14677         type through as needed.
14678         (innermost_block_tracker::m_types): New member.
14679         * varobj.c (varobj_create): Pass type when reseting innermost
14680         block.
14681
14682 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14683
14684         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14685         * ada-lang.c (resolve_subexp): Likewise.
14686         * breakpoint.c (set_breakpoint_condition) Likewise.
14687         (watch_command_1) Likewise.
14688         * c-exp.y (variable): Likewise.
14689         * d-exp.y (PrimaryExpression): Likewise.
14690         * f-exp.y (variable): Likewise.
14691         * go-exp.y (variable): Likewise.
14692         * m2-exp.y (variable): Likewise.
14693         * objfiles.c (objfile::~objfile): Likewise.
14694         * p-exp.y (variable): Likewise.
14695         * parse.c (innermost_block): Change type.
14696         * parser-defs.h (class innermost_block_tracker): New.
14697         (innermost_block): Change to innermost_block_tracker.
14698         * printcmd.c (display_command): Switch to innermost_block API.
14699         (do_one_display): Likewise.
14700         * rust-exp.y (do_one_display): Likewise.
14701         * symfile.c (clear_symtab_users): Likewise.
14702         * varobj.c (varobj_create): Switch to innermost_block API, replace
14703         use of innermost_block with block stored on varobj object.
14704
14705 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14706
14707         * expression.h (innermost_block): Remove declaration.
14708         * varobj.c: Add 'parser-defs.h' include.
14709
14710 2018-01-19  Tom Tromey  <tom@tromey.com>
14711
14712         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14713         symbols in the static and global blocks.
14714
14715 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14716
14717         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14718         gdb_ptrace.h, and move including gdb_wait.h ...
14719         * nat/linux-ptrace.h: ... to here.
14720
14721 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14722
14723         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14724         inf_ptrace_detach_success.
14725         (inf_ptrace_detach_success): Add inferior parameter, use it
14726         instead of inferior_ptid, pass it to detach_inferior.
14727         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14728         parameter.
14729         * inferior.c (detach_inferior): Add overload that takes an
14730         inferior object.
14731         * inferior.h (detach_inferior): Likewise.
14732         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14733         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14734         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14735
14736 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14737
14738         * target.h (struct target_ops) <to_detach>: Add inferior
14739         parameter.
14740         (target_detach): Likewise.
14741         * target.c (dispose_inferior): Pass inferior down.
14742         (target_detach): Pass inferior down.  Assert that it is equal to
14743         the current inferior.
14744         * aix-thread.c (aix_thread_detach): Pass inferior down.
14745         * corefile.c (core_file_command): Pass current_inferior() down.
14746         * corelow.c (core_detach): Add inferior parameter.
14747         * darwin-nat.c (darwin_detach): Likewise.
14748         * gnu-nat.c (gnu_detach): Likewise.
14749         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14750         * infcmd.c (detach_command): Pass current_inferior() down to
14751         target_detach.
14752         * infrun.c (follow_fork_inferior): Pass parent_inf to
14753         target_detach.
14754         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14755         target_detach.
14756         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14757         * linux-thread-db.c (thread_db_detach): Likewise.
14758         * nto-procfs.c (procfs_detach): Likewise.
14759         * procfs.c (procfs_detach): Likewise.
14760         * record.c (record_detach): Likewise.
14761         * record.h (struct inferior): Forward-declare.
14762         (record_detach): Add inferior parameter.
14763         * remote-sim.c (gdbsim_detach): Likewise.
14764         * remote.c (remote_detach_1): Likewise.
14765         (remote_detach): Likewise.
14766         (extended_remote_detach): Likewise.
14767         * sol-thread.c (sol_thread_detach): Likewise.
14768         * target-debug.h (target_debug_print_inferior_p): New macro.
14769         * target-delegates.c: Re-generate.
14770         * top.c (kill_or_detach): Pass inferior down to target_detach.
14771         * windows-nat.c (windows_detach): Add inferior parameter.
14772
14773 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14774
14775         * target.h (struct target_ops) <to_detach>: Remove args
14776         parameter.
14777         (target_detach): Likewise.
14778         * target.c (dispose_inferior): Adjust.
14779         (target_detach): Remove args parameter, adjust.
14780         * aix-thread.c (aix_thread_detach): Adjust.
14781         * corefile.c (core_file_command): Adjust.
14782         * corelow.c (core_detach): Adjust.
14783         * darwin-nat.c (darwin_detach): Adjust.
14784         * gnu-nat.c (gnu_detach): Adjust.
14785         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14786         * infcmd.c (detach_command): Adjust
14787         * infrun.c (follow_fork_inferior): Adjust.
14788         (handle_vfork_child_exec_or_exit): Adjust.
14789         * linux-fork.c (linux_fork_detach): Remove args parameter.
14790         * linux-fork.h (linux_fork_detach): Likewise.
14791         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14792         * linux-thread-db.c (thread_db_detach): Likewise.
14793         * nto-procfs.c (procfs_detach): Likewise.
14794         * procfs.c (procfs_detach): Likewise.
14795         (do_detach): Remove signo parameter.
14796         * record.c (record_detach): Remove args parameter.
14797         * record.h (record_detach): Likewise.
14798         * remote-sim.c (gdbsim_detach): Likewise.
14799         * remote.c (remote_detach_1): Likewise.
14800         (remote_detach): Likewise.
14801         (extended_remote_detach): Likewise.
14802         * sol-thread.c (sol_thread_detach): Likewise.
14803         * target-delegates.c: Re-generate.
14804         * top.c (struct qt_args) <args>: Remove field.
14805         (kill_or_detach): Don't pass args.
14806         (quit_force): Don't set args.
14807         * windows-nat.c (windows_detach): Remove args parameter.
14808
14809 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14810
14811         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14812         (arm_linux_init_abi): Install it.
14813
14814 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14815
14816         * osabi.c (gdb_osabi_names): Extend the regexp for
14817         arm-linux-gnueabihf.
14818
14819 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14820
14821         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14822         m_abbrevs.
14823         (abbrev_table::add_abbrev): Update.
14824         (abbrev_table::lookup_abbrev): Update.
14825
14826 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14827
14828         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14829
14830 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14831
14832         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14833         to "std::string".
14834
14835 2018-01-17  Tom Tromey  <tom@tromey.com>
14836
14837         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14838
14839 2018-01-17  Tom Tromey  <tom@tromey.com>
14840
14841         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14842         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14843         (create_array_type_with_stride): Update.
14844         * dwarf2read.c (set_die_type): Update.
14845
14846 2018-01-17  Tom Tromey  <tom@tromey.com>
14847
14848         * dwarf2read.c (delayed_method_info): Remove typedef.
14849         (dwarf2_cu::method_info): Now a std::vector.
14850         (add_to_method_list): Update.
14851         (free_delayed_list): Remove.
14852         (compute_delayed_physnames): Update.
14853         (process_full_comp_unit, process_full_type_unit): Clear the method
14854         list.  Remove cleanups.
14855         (psymtab_include_file_name): Add name_holder parameter.  Use
14856         unique_xmalloc_ptr.
14857         (dwarf_decode_lines): Update.
14858
14859 2018-01-17  Tom Tromey  <tom@tromey.com>
14860             Simon Marchi  <simon.marchi@ericsson.com>
14861
14862         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14863         (dwarf2_per_objfile::free_cached_comp_units)
14864         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14865         (init_cutu_and_read_dies_no_follow): Update.
14866         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14867         (dwarf2_cu::~dwarf2_cu): New.
14868         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14869         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14870
14871 2018-01-17  Tom Tromey  <tom@tromey.com>
14872             Simon Marchi  <simon.marchi@ericsson.com>
14873
14874         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14875         (struct die_reader_specs) <abbrev_table>: New member.
14876         (struct abbrev_table): Add constructor.
14877         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14878         <abbrev_obstack>: Now an auto_obstack.
14879         (abbrev_table_up): New typedef.
14880         (init_cu_die_reader): Add abbrev_table parameter.
14881         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14882         Add result_dwo_abbrev_table.
14883         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14884         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14885         Update.
14886         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14887         parameter.
14888         (skip_children): Update.
14889         (abbrev_table::alloc_abbrev): Rename from
14890         abbrev_table_alloc_abbrev.
14891         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14892         (abbrev_table::lookup_abbrev): Rename from
14893         abbrev_table_lookup_abbrev.
14894         (abbrev_table_read_table): Return abbrev_table_up.
14895         (abbrev_table_free, abbrev_table_free_cleanup)
14896         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14897         (load_partial_dies): Update.
14898
14899 2018-01-17  Tom Tromey  <tom@tromey.com>
14900
14901         * dwarf2read.c (dwarf2_compute_name): Update comment.
14902         (read_func_scope, read_variable): Update.
14903         (new_symbol): Remove.
14904         (new_symbol_full): Rename to new_symbol.
14905
14906 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14907
14908         PR gdb/16577
14909         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14910         a warning instead of throwing an error, set section size to 0 and return
14911         NULL.
14912         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14913
14914 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14915
14916         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14917         std::string.
14918         (linux_ptrace_attach_fail_reason_string): Likewise.
14919         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14920         Likewise.
14921         (linux_ptrace_attach_fail_reason_string): Likewise.
14922         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14923
14924 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14925
14926         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14927
14928 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14929
14930         PR gdb/21559
14931         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14932         checking for fs_base/gs_base fields in struct user_regs_struct.
14933         * configure: Regenerate.
14934
14935 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14936
14937         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14938         function.
14939         (aarch64_linux_init_abi): Install it to gdbarch hook
14940         gcc_target_options.
14941
14942 2018-01-15  Pedro Alves  <palves@redhat.com>
14943
14944         * common/signals-state-save-restore.c
14945         (save_original_signals_state): Fix typos.
14946
14947 2017-01-12  Tom Tromey  <tom@tromey.com>
14948             Sergio Durigan Junior  <sergiodj@redhat.com>
14949
14950         * Makefile.in (install-only): Install gdb-add-index.
14951
14952 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14953
14954         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14955
14956 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14957
14958         * infrun.c (keep_going_pass_signal): Clear step-over info when
14959         insert_breakpoints fails.
14960
14961 2018-01-11  Pedro Alves  <palves@redhat.com>
14962
14963         PR gdb/22583
14964         * infrun.c (resume): Rename to ...
14965         (resume_1): ... this.
14966         (resume): Reimplement as wrapper around resume_1.
14967
14968 2018-01-11  Pedro Alves  <palves@redhat.com>
14969
14970         PR remote/22597
14971         * remote.c (remote_parse_stop_reply): Default to the last-set
14972         general thread instead of to 'magic_null_ptid'.
14973
14974 2018-01-10  Pedro Alves  <palves@redhat.com>
14975
14976         * language.h (language_get_symbol_name_matcher): Rename ...
14977         (get_symbol_name_matcher): ... this.
14978         * language.c (language_get_symbol_name_matcher): Ditto.
14979         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14980         callers adjusted.
14981
14982 2018-01-10  Pedro Alves  <palves@redhat.com>
14983
14984         PR gdb/22670
14985         * dwarf2read.c
14986         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14987         Adjust to use language_get_symbol_name_matcher instead of
14988         language_defn::la_get_symbol_name_matcher.
14989         * language.c (language_get_symbol_name_matcher): If in Ada mode
14990         and the lookup name is a verbatim match, return Ada's matcher.
14991         * language.h (language_get_symbol_name_matcher): Adjust comment.
14992         (ada_lookup_name_info::verbatim_p):: New method.
14993
14994 2018-01-10  Pedro Alves  <palves@redhat.com>
14995
14996         PR gdb/22670
14997         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14998         minsym's language is language_auto or language_cplus, pass down
14999         language_ada instead.
15000         * symtab.c (compare_symbol_name): Don't frob symbol language here.
15001
15002 2018-01-10  Pedro Alves  <palves@redhat.com>
15003
15004         PR gdb/22670
15005         * minsyms.c (linkage_name_str): New function.
15006         (iterate_over_minimal_symbols): Use it.
15007
15008 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15009
15010         * NEWS: Document that 'info proc' now works on FreeBSD.
15011
15012 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15013
15014         * configure.ac: Check for kinfo_getfile in libutil.
15015         * configure: Regenerate.
15016         * config.in: Regenerate.
15017         * fbsd-nat.c: Include "fbsd-tdep.h".
15018         (fbsd_fetch_cmdline): New.
15019         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
15020         rather than calling error.
15021         (fbsd_info_proc): New.
15022         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
15023         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
15024         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
15025
15026 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15027
15028         * fbsd-nat.c (struct free_deleter): Remove.
15029         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
15030
15031 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15032
15033         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
15034         NULL for an empty pathname.
15035
15036 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
15037
15038         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
15039         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
15040         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
15041         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
15042         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
15043         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
15044         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
15045         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
15046         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
15047         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
15048         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
15049         (fbsd_core_fetch_timeval, fbsd_print_sigset)
15050         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
15051         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
15052         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
15053
15054 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
15055
15056         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
15057         (gnu_xfer_auxv): New function.
15058         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
15059         TARGET_OBJECT_AUXV.
15060
15061 2018-01-08  Yao Qi  <yao.qi@linaro.org>
15062             Simon Marchi  <simon.marchi@ericsson.com>
15063
15064         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
15065         common/selftest.c.
15066         (COMMON_OBS): Remove selftest.o.
15067         * configure.ac: Append selftest-arch.c and common/selftest.c to
15068         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
15069         * configure: Re-generated.
15070         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
15071         GDB_SELF_TEST.
15072         (maintenance_info_selftests): Likewise.
15073
15074 2018-01-08  Xavier Roirand  <roirand@adacore.com>
15075
15076         * ada-valprint.c (val_print_packed_array_elements): Use
15077         proper number of elements when printing an array indexed
15078         by an enumeration type.
15079
15080 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15081
15082         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
15083         (dw2_get_file_names_reader): Adjust.
15084         (lookup_dwo_signatured_type): Adjust.
15085         (lookup_dwp_signatured_type): Adjust.
15086         (lookup_signatured_type): Adjust.
15087         (create_type_unit_group): Adjust.
15088         (get_type_unit_group): Adjust.
15089         (process_psymtab_comp_unit_reader): Adjust.
15090         (build_type_psymtabs_reader): Adjust.
15091         (scan_partial_symbols): Adjust.
15092         (add_partial_symbol): Adjust.
15093         (add_partial_subprogram): Adjust.
15094         (peek_die_abbrev): Adjust.
15095         (fixup_go_packaging): Adjust.
15096         (process_imported_unit_die): Adjust.
15097         (dwarf2_compute_name): Adjust.
15098         (dwarf2_physname): Adjust.
15099         (read_import_statement): Adjust.
15100         (handle_DW_AT_stmt_list): Adjust.
15101         (read_file_scope): Adjust.
15102         (read_func_scope): Adjust.
15103         (read_lexical_block_scope): Adjust.
15104         (read_call_site_scope): Adjust.
15105         (read_variable): Adjust.
15106         (dwarf2_rnglists_process): Adjust.
15107         (dwarf2_ranges_process): Adjust.
15108         (dwarf2_ranges_read): Adjust.
15109         (dwarf2_get_pc_bounds): Adjust.
15110         (dwarf2_record_block_ranges): Adjust.
15111         (dwarf2_add_field): Adjust.
15112         (dwarf2_add_member_fn): Adjust.
15113         (read_structure_type): Adjust.
15114         (process_structure_scope): Adjust.
15115         (read_enumeration_type): Adjust.
15116         (read_array_type): Adjust.
15117         (mark_common_block_symbol_computed): Adjust.
15118         (read_common_block): Adjust.
15119         (read_namespace_type): Adjust.
15120         (read_namespace): Adjust.
15121         (read_module_type): Adjust.
15122         (read_tag_pointer_type): Adjust.
15123         (read_tag_ptr_to_member_type): Adjust.
15124         (read_tag_string_type): Adjust.
15125         (read_subroutine_type): Adjust.
15126         (read_typedef): Adjust.
15127         (read_base_type): Adjust.
15128         (attr_to_dynamic_prop): Adjust.
15129         (read_subrange_type): Adjust.
15130         (read_unspecified_type): Adjust.
15131         (dwarf2_read_abbrevs): Adjust.
15132         (load_partial_dies): Adjust.
15133         (read_partial_die): Adjust.
15134         (find_partial_die): Adjust.
15135         (guess_partial_die_structure_name): Adjust.
15136         (fixup_partial_die): Adjust.
15137         (read_attribute_value): Adjust.
15138         (read_addr_index): Adjust.
15139         (read_addr_index_from_leb128): Adjust.
15140         (read_str_index): Adjust.
15141         (dwarf2_string_attr): Adjust.
15142         (get_debug_line_section): Adjust.
15143         (dwarf_decode_line_header): Adjust.
15144         (lnp_state_machine::check_line_address): Adjust.
15145         (dwarf_decode_lines_1): Adjust.
15146         (dwarf_decode_lines): Adjust.
15147         (dwarf2_start_symtab): Adjust.
15148         (var_decode_location): Adjust.
15149         (new_symbol_full): Adjust.
15150         (dwarf2_const_value_data): Adjust.
15151         (dwarf2_const_value_attr): Adjust.
15152         (dwarf2_const_value): Adjust.
15153         (die_type): Adjust.
15154         (die_containing_type): Adjust.
15155         (build_error_marker_type): Adjust.
15156         (lookup_die_type): Adjust.
15157         (guess_full_die_structure_name): Adjust.
15158         (anonymous_struct_prefix): Adjust.
15159         (determine_prefix): Adjust.
15160         (dwarf2_name): Adjust.
15161         (follow_die_ref_or_sig): Adjust.
15162         (follow_die_offset): Adjust.
15163         (follow_die_ref): Adjust.
15164         (follow_die_sig_1): Adjust.
15165         (follow_die_sig): Adjust.
15166         (get_signatured_type): Adjust.
15167         (get_DW_AT_signature_type): Adjust.
15168         (decode_locdesc): Adjust.
15169         (dwarf_decode_macros): Adjust.
15170         (cu_debug_loc_section): Adjust.
15171         (fill_in_loclist_baton): Adjust.
15172         (dwarf2_symbol_mark_computed): Adjust.
15173         (init_one_comp_unit): Don't assign
15174         dwarf2_cu::dwarf2_per_objfile.
15175         (set_die_type): Adjust.
15176
15177 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15178
15179         * dwarf2read.c (struct mapped_debug_names): Add constructor.
15180         <dwarf2_per_objfile>: New field.
15181         (dwarf2_per_objfile): Remove global.
15182         (get_dwarf2_per_objfile): New function.
15183         (set_dwarf2_per_objfile): New function.
15184         (dwarf2_build_psymtabs_hard): Change objfile parameter to
15185         dwarf2_per_objfile.
15186         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15187         (read_abbrev_offset): Likewise.
15188         (read_indirect_string): Likewise.
15189         (read_indirect_line_string): Likewise.
15190         (read_indirect_string_at_offset): Likewise.
15191         (read_indirect_string_from_dwz): Likewise.
15192         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15193         dwarf2_per_objfile.
15194         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15195         (create_all_comp_units): Change objfile parameter to
15196         dwarf2_per_objfile.
15197         (create_all_type_units): Likewise.
15198         (process_queue): Add dwarf2_per_objfile parameter.
15199         (read_and_check_comp_unit_head): Likewise.
15200         (lookup_dwo_unit_in_dwp): Likewise.
15201         (get_dwp_file): Likewise.
15202         (process_cu_includes): Likewise.
15203         (struct free_dwo_file_cleanup_data): New struct.
15204         (dwarf2_has_info): Use get_dwarf2_per_objfile and
15205         set_dwarf2_per_objfile.
15206         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
15207         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
15208         context, adjust calls.
15209         (dw2_instantiate_symtab): Likewise.
15210         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
15211         (dw2_get_cu): Likewise.
15212         (create_cu_from_index_list): Change objfile parameter to
15213         dwarf2_per_objfile.
15214         (create_cus_from_index_list): Get dwarf2_per_objfile from
15215         context, adjust calls.
15216         (create_cus_from_index): Likewise.
15217         (create_signatured_type_table_from_index): Change objfile
15218         parameter to dwarf2_per_objfile.
15219         (create_signatured_type_table_from_debug_names): Change objfile
15220         parameter to dwarf2_per_objfile.
15221         (create_addrmap_from_index): Likewise.
15222         (create_addrmap_from_aranges): Likewise.
15223         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
15224         (dw2_setup): Remove.
15225         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
15226         context.
15227         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
15228         get_dwarf2_per_objfile.
15229         (dw2_forget_cached_source_info): Likewise.
15230         (dw2_map_symtabs_matching_filename): Likewise.
15231         (struct dw2_symtab_iterator) <index>: Remove.
15232         <dwarf2_per_objfile>: New field.
15233         (dw2_symtab_iter_init): Replace index parameter with
15234         dwarf2_per_objfile.
15235         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15236         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15237         (dw2_print_stats): Likewise.
15238         (dw2_dump): Likewise.
15239         (dw2_expand_symtabs_for_function): Likewise.
15240         (dw2_expand_all_symtabs): Likewise.
15241         (dw2_expand_symtabs_with_fullname): Likewise.
15242         (dw2_expand_marked_cus): Replace index and objfile parameters
15243         with dwarf2_per_objfile.
15244         (dw_expand_symtabs_matching_file_matcher): Add
15245         dwarf2_per_objfile parameter and adjust calls.
15246         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15247         adjust calls.
15248         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15249         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15250         adjust calls.
15251         (create_cus_from_debug_names_list): Replace objfile parameter
15252         with dwarf2_per_objfile and adjust calls.
15253         (create_cus_from_debug_names): Likewise.
15254         (dwarf2_read_debug_names): Likewise.
15255         (mapped_debug_names::namei_to_name): Adjust call.
15256         (dw2_debug_names_iterator::next): Likewise.
15257         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15258         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15259         (dw2_debug_names_dump): Likewise.
15260         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15261         (dw2_debug_names_expand_symtabs_matching): Likewise.
15262         (dwarf2_initialize_objfile): Likewise.
15263         (dwarf2_build_psymtabs): Likewise.
15264         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15265         this_cu.
15266         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15267         (read_and_check_comp_unit_head): Likewise.
15268         (read_abbrev_offset): Likewise.
15269         (create_debug_type_hash_table): Likewise.
15270         (create_debug_types_hash_table): Likewise.
15271         (create_all_type_units): Replace objfile parameter with
15272         dwarf2_per_objfile.
15273         (add_type_unit): Add dwarf2_per_objfile parameter.
15274         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15275         with dwarf2_per_objfile.
15276         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15277         (lookup_dwp_signatured_type): Likewise.
15278         (lookup_signatured_type): Likewise.
15279         (read_cutu_die_from_dwo): Likewise.
15280         (init_tu_and_read_dwo_dies): Likewise.
15281         (init_cutu_and_read_dies): Likewise.
15282         (init_cutu_and_read_dies_no_follow): Likewise.
15283         (allocate_type_unit_groups_table): Add objfile parameter.
15284         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15285         (get_type_unit_group): Likewise.
15286         (process_psymtab_comp_unit): Update call.
15287         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15288         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15289         (print_tu_stats): Likewise.
15290         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15291         in void* parameter.
15292         (build_type_psymtabs): Change objfile parameter to
15293         dwarf2_per_objfile.
15294         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15295         passed in void* parameter.
15296         (process_skeletonless_type_units): Change objfile parameter to
15297         dwarf2_per_objfile.
15298         (set_partial_user): Likewise.
15299         (dwarf2_build_psymtabs_hard): Likewise.
15300         (read_comp_units_from_section): Likewise.
15301         (create_all_comp_units): Likewise.
15302         (scan_partial_symbols): Update calls.
15303         (add_partial_symbol): Likewise.
15304         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15305         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15306         (process_queue): Add dwarf2_per_objfile parameter.
15307         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15308         (compute_compunit_symtab_includes): Likewise.
15309         (process_cu_includes): Add dwarf2_per_objfile parameter.
15310         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15311         (process_full_type_unit): Likewise.
15312         (process_imported_unit_die): Update call.
15313         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15314         (read_file_scope): Likewise.
15315         (allocate_dwo_file_hash_table): Add objfile parameter.
15316         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15317         (create_cus_hash_table): Likewise.
15318         (create_dwp_hash_table): Likewise.
15319         (create_dwo_unit_in_dwp_v1): Likewise.
15320         (create_dwp_v2_section): Likewise.
15321         (create_dwo_unit_in_dwp_v2): Likewise.
15322         (lookup_dwo_unit_in_dwp): Likewise.
15323         (try_open_dwop_file): Likewise.
15324         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15325         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15326         cleanup to include a reference to dwarf2_per_objfile.
15327         (open_dwp_file): Add dwarf2_per_objfile parameter.
15328         (open_and_init_dwp_file): Likewise.
15329         (get_dwp_file): Likewise.
15330         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15331         (queue_and_load_all_dwo_tus): Update call.
15332         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15333         data.
15334         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15335         (dwarf2_ranges_process): Likewise.
15336         (dwarf2_get_pc_bounds): Likewise.
15337         (mark_common_block_symbol_computed): Likewise.
15338         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15339         (dwarf2_read_abbrevs): Update call.
15340         (read_partial_die): Use dwarf2_per_objfile from cu.
15341         (find_partial_die): Likewise.
15342         (fixup_partial_die): Likewise.
15343         (read_attribute_value): Likewise.
15344         (read_indirect_string_at_offset_from): Add objfile parameter.
15345         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15346         parameter.
15347         (read_indirect_string_from_dwz): Add objfile parameter.
15348         (read_indirect_string): Add objfile parameter.
15349         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15350         (read_addr_index): Use dwarf2_per_objfile from cu.
15351         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15352         call dw2_setup.
15353         (read_str_index): Use dwarf2_per_objfile from cu.
15354         (get_debug_line_section): Likewise.
15355         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15356         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15357         (new_symbol_full): Use dwarf2_per_objfile from cu.
15358         (build_error_marker_type): Likewise.
15359         (lookup_die_type): Likewise.
15360         (determine_prefix): Likewise.
15361         (follow_die_offset): Likewise.
15362         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15363         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15364         (dwarf2_fetch_die_type_sect_off): Likewise.
15365         (dwarf2_get_die_type): Likewise.
15366         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15367         (get_signatured_type): Likewise.
15368         (get_DW_AT_signature_type): Likewise.
15369         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15370         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15371         (cu_debug_loc_section): Likewise.
15372         (fill_in_loclist_baton): Likewise.
15373         (dwarf2_symbol_mark_computed): Likewise.
15374         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15375         dwarf2_per_objfile.
15376         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15377         parameter.
15378         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15379         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15380         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15381         (set_die_type): Use dwarf2_free_objfile from cu.
15382         (get_die_type_at_offset): Likewise.
15383         (dwarf2_per_objfile_free): Don't assign global variable.
15384         (debug_names) <constructor>: Add dwarf2_per_objfile
15385         parameter, update m_debugstrlookup construction.
15386         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15387         parameter.
15388         <m_dwarf2_per_objfile>: New field.
15389         <lookup>: Use m_dwarf2_per_objfile.
15390         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15391         (psyms_seen_size): Likewise.
15392         (write_gdbindex): Replace objfile parameter with
15393         dwarf2_per_objfile.
15394         (write_debug_names): Likewise.
15395         (write_psymtabs_to_index): Likewise.
15396         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15397         calls.
15398
15399 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15400
15401         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15402         <dwarf2_per_objfile>: New field.
15403         (struct dwarf2_per_cu_data) <objfile>: Remove.
15404         <dwarf2_per_objfile>: New field.
15405         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15406         of objfile.
15407         (create_signatured_type_table_from_index): Likewise.
15408         (create_debug_type_hash_table): Likewise.
15409         (fill_in_sig_entry_from_dwo_entry): Likewise.
15410         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15411         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15412         objfile.
15413         (create_partial_symtab): Access objfile through
15414         dwarf2_per_objfile.
15415         (process_psymtab_comp_unit_reader): Likewise.
15416         (read_comp_units_from_section): Likewise.
15417         (scan_partial_symbols): Likewise.
15418         (add_partial_symbol): Likewise.
15419         (add_partial_subprogram): Likewise.
15420         (peek_die_abbrev): Likewise.
15421         (fixup_go_packaging): Likewise.
15422         (process_full_comp_unit): Likewise.
15423         (process_full_type_unit): Likewise.
15424         (process_imported_unit_die): Likewise.
15425         (dwarf2_compute_name): Likewise.
15426         (dwarf2_physname): Likewise.
15427         (read_import_statement): Likewise.
15428         (create_cus_hash_table): Assign dwarf2_physname instead of
15429         objfile.
15430         (read_func_scope): Access objfile through dwarf2_per_objfile.
15431         (read_lexical_block_scope): Likewise.
15432         (read_call_site_scope): Likewise.
15433         (read_variable): Likewise.
15434         (dwarf2_rnglists_process): Likewise.
15435         (dwarf2_ranges_process): Likewise.
15436         (dwarf2_ranges_read): Likewise.
15437         (dwarf2_record_block_ranges): Likewise.
15438         (dwarf2_add_field): Likewise.
15439         (dwarf2_add_member_fn): Likewise.
15440         (read_structure_type): Likewise.
15441         (process_structure_scope): Likewise.
15442         (read_enumeration_type): Likewise.
15443         (read_array_type): Likewise.
15444         (read_common_block): Likewise.
15445         (read_namespace_type): Likewise.
15446         (read_namespace): Likewise.
15447         (read_module_type): Likewise.
15448         (read_tag_pointer_type): Likewise.
15449         (read_tag_ptr_to_member_type): Likewise.
15450         (read_tag_string_type): Likewise.
15451         (read_subroutine_type): Likewise.
15452         (read_typedef): Likewise.
15453         (read_base_type): Likewise.
15454         (attr_to_dynamic_prop): Likewise.
15455         (read_subrange_type): Likewise.
15456         (read_unspecified_type): Likewise.
15457         (load_partial_dies): Likewise.
15458         (read_partial_die): Likewise.
15459         (find_partial_die): Likewise.
15460         (guess_partial_die_structure_name): Likewise.
15461         (fixup_partial_die): Likewise.
15462         (read_attribute_value): Likewise.
15463         (read_addr_index_from_leb128): Likewise.
15464         (dwarf2_read_addr_index): Likewise.
15465         (dwarf2_string_attr): Likewise.
15466         (lnp_state_machine::check_line_address): Likewise.
15467         (dwarf_decode_lines_1): Likewise.
15468         (dwarf_decode_lines): Likewise.
15469         (dwarf2_start_symtab): Likewise.
15470         (var_decode_location): Likewise.
15471         (new_symbol_full): Likewise.
15472         (dwarf2_const_value_data): Likewise.
15473         (dwarf2_const_value_attr): Likewise.
15474         (dwarf2_const_value): Likewise.
15475         (die_type): Likewise.
15476         (die_containing_type): Likewise.
15477         (lookup_die_type): Likewise.
15478         (guess_full_die_structure_name): Likewise.
15479         (anonymous_struct_prefix): Likewise.
15480         (dwarf2_name): Likewise.
15481         (follow_die_ref_or_sig): Likewise.
15482         (follow_die_offset): Likewise.
15483         (follow_die_ref): Likewise.
15484         (dwarf2_fetch_die_loc_sect_off): Likewise.
15485         (dwarf2_fetch_constant_bytes): Likewise.
15486         (dwarf2_fetch_die_type_sect_off): Likewise.
15487         (dwarf2_get_die_type): Likewise.
15488         (follow_die_sig): Likewise.
15489         (decode_locdesc): Likewise.
15490         (dwarf2_per_cu_objfile): Likewise.
15491         (dwarf2_per_cu_text_offset): Likewise.
15492         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15493         objfile.
15494         (set_die_type): Access objfile through
15495         dwarf2_per_objfile.
15496
15497 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15498
15499         * valprint.c (converted_character_d): Remove typedef.
15500         (DEF_VEC_O (converted_character_d)): Remove.
15501         (count_next_character): Use std::vector.
15502         (print_converted_chars_to_obstack): Likewise.
15503         (generic_printstr): Likewise.
15504
15505 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15506
15507         * xml-support.h (struct gdb_xml_value): Add constructor.
15508         <value>: Change type to unique_xmalloc_ptr.
15509         (gdb_xml_value_s): Remove typedef.
15510         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15511         (gdb_xml_element_start_handler): Change parameter type to
15512         std::vector.
15513         (xml_find_attribute): Likewise.
15514         * xml-support.c (xml_find_attribute): Change parameter type to
15515         std::vector and adjust.
15516         (gdb_xml_values_cleanup): Remove.
15517         (gdb_xml_parser::start_element): Adjust to std::vector.
15518         (xinclude_start_include): Change paraeter type to std::vector
15519         and adjust.
15520         * btrace.c (check_xml_btrace_version): Likewise.
15521         (parse_xml_btrace_block): Likewise.
15522         (parse_xml_btrace_pt_config_cpu): Likewise.
15523         (parse_xml_btrace_pt): Likewise.
15524         (parse_xml_btrace_conf_bts): Likewise.
15525         (parse_xml_btrace_conf_pt): Likewise.
15526         * memory-map.c (memory_map_start_memory): Likewise.
15527         (memory_map_start_property): Likewise.
15528         * osdata.c (osdata_start_osdata): Likewise.
15529         (osdata_start_item): Likewise.
15530         (osdata_start_column): Likewise.
15531         * remote.c (start_thread): Likewise.
15532         * solib-aix.c (library_list_start_library): Likewise.
15533         (library_list_start_list): Likewise.
15534         * solib-svr4.c (library_list_start_library): Likewise.
15535         (svr4_library_list_start_list): Likewise.
15536         * solib-target.c (library_list_start_segment): Likewise.
15537         (library_list_start_section): Likewise.
15538         (library_list_start_library): Likewise.
15539         (library_list_start_list): Likewise.
15540         * tracepoint.c (traceframe_info_start_memory): Likewise.
15541         (traceframe_info_start_tvar): Likewise.
15542         * xml-syscall.c (syscall_start_syscall): Likewise.
15543         * xml-tdesc.c (tdesc_start_target): Likewise.
15544         (tdesc_start_feature): Likewise.
15545         (tdesc_start_reg): Likewise.
15546         (tdesc_start_union): Likewise.
15547         (tdesc_start_struct): Likewise.
15548         (tdesc_start_flags): Likewise.
15549         (tdesc_start_enum): Likewise.
15550         (tdesc_start_field): Likewise.
15551         (tdesc_start_enum_value): Likewise.
15552         (tdesc_start_vector): Likewise.
15553
15554 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15555
15556         * extension.h (struct xmethod_worker) <clone>: Remove.
15557         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15558         Remove.
15559         (python_xmethod_worker::clone): Remove.
15560         * valops.c (find_overload_match): Use std::move instead of
15561         clone.
15562
15563 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15564
15565         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15566         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15567         <free_xmethod_worker_data>: Remove.
15568         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15569         <get_xmethod_arg_types>: Remove.
15570         <get_xmethod_result_type>: Remove.
15571         <invoke_xmethod>: Remove.
15572         * extension.c (new_xmethod_worker): Remove.
15573         (clone_xmethod_worker): Remove.
15574         (get_matching_xmethod_workers): Return void, pass std::vector by
15575         pointer.
15576         (get_xmethod_arg_types): Rename to...
15577         (xmethod_worker::get_arg_types): ... this, and adjust.
15578         (get_xmethod_result_type): Rename to...
15579         (xmethod_worker::get_result_type): ... this, and adjust.
15580         (invoke_xmethod): Remove.
15581         (free_xmethod_worker): Remove.
15582         (free_xmethod_worker_vec): Remove.
15583         * extension.h (enum ext_lang_rc): Move here from
15584         extension-priv.h.
15585         (struct xmethod_worker): Add constructor and destructor.
15586         <data>: Remove.
15587         <value>: Remove.
15588         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15589         virtual pure methods.
15590         <get_arg_types, get_result_type>: New methods.
15591         (xmethod_worker_ptr): Remove typedef.
15592         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15593         (xmethod_worker_vec): Remove typedef.
15594         (xmethod_worker_up): New typedef.
15595         (invoke_xmethod): Remove.
15596         (clone_xmethod_worker): Remove.
15597         (free_xmethod_worker): Remove.
15598         (free_xmethod_worker_vec): Remove.
15599         (get_xmethod_arg_types): Remove.
15600         (get_xmethod_result_type): Remove.
15601         * valops.c (find_method_list): Use std::vector, don't use
15602         intermediate vector.
15603         (value_find_oload_method_list): Use std::vector.
15604         (find_overload_match): Use std::vector.
15605         (find_oload_champ): Use std::vector.
15606         * value.c (value_free): Use operator delete.
15607         (value_of_xmethod): Rename to...
15608         (value_from_xmethod): ... this.  Don't assign
15609         xmethod_worker::value, take rvalue-reference.
15610         (result_type_of_xmethod): Adjust.
15611         (call_xmethod): Adjust.
15612         * value.h: Include extension.h.
15613         (struct xmethod_worker): Don't forward-declare.
15614         (value_of_xmethod): Rename to...
15615         (value_from_xmethod): ... this, take rvalue-reference.
15616         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15617         (struct python_xmethod_worker): ... this, add constructor and
15618         destructor.
15619         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15620         (gdbpy_free_xmethod_worker_data): Rename to...
15621         (python_xmethod_worker::~python_xmethod_worker): ... this and
15622         adjust.
15623         (gdbpy_clone_xmethod_worker_data): Rename to...
15624         (python_xmethod_worker::clone): ... this and adjust.
15625         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15626         temporary vector.
15627         (gdbpy_get_xmethod_arg_types): Rename to...
15628         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15629         (gdbpy_get_xmethod_result_type): Rename to...
15630         (python_xmethod_worker::do_get_result_type): ... this and
15631         adjust.
15632         (gdbpy_invoke_xmethod): Rename to...
15633         (python_xmethod_worker::invoke): ... this and adjust.
15634         (new_python_xmethod_worker): Rename to...
15635         (python_xmethod_worker::python_xmethod_worker): ... this and
15636         adjust.
15637         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15638         Remove.
15639         (gdbpy_free_xmethod_worker_data): Remove.
15640         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15641         (gdbpy_get_xmethod_arg_types): Remove.
15642         (gdbpy_get_xmethod_result_type): Remove.
15643         (gdbpy_invoke_xmethod): Remove.
15644         * python/python.c (python_extension_ops): Remove obsolete
15645         callbacks.
15646
15647 2018-01-05  Pedro Alves  <palves@redhat.com>
15648
15649         PR gdb/18653
15650         * common/signals-state-save-restore.c
15651         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15652         find a custom handler preinstalled, instead of internal erroring.
15653         But only warn if !quiet.
15654         * common/signals-state-save-restore.h
15655         (save_original_signals_state): New parameter 'quiet'.
15656         * main.c (captured_main_1): Move save_original_signals_state call
15657         after option handling, and pass QUIET.
15658
15659 2018-01-05  Pedro Alves  <palves@redhat.com>
15660
15661         * spu-tdep.c (spu_catch_start): Pass
15662         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15663
15664 2018-01-05  Pedro Alves  <palves@redhat.com>
15665
15666         PR gdb/22670
15667         * ada-lang.c (literal_symbol_name_matcher): New function.
15668         (ada_get_symbol_name_matcher): Use it for
15669         symbol_name_match_type::SEARCH_NAME.
15670         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15671         it down instead of assuming symbol_name_match_type::FULL.
15672         * block.h (block_lookup_symbol): New parameter 'match_type'.
15673         * c-valprint.c (print_unpacked_pointer): Use
15674         lookup_symbol_search_name instead of lookup_symbol.
15675         * compile/compile-object-load.c (get_out_value_type): Pass down
15676         symbol_name_match_type::SEARCH_NAME.
15677         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15678         symbol_name_match_type::FULL.
15679         * cp-support.c (cp_get_symbol_name_matcher): Handle
15680         symbol_name_match_type::SEARCH_NAME.
15681         * infrun.c (insert_exception_resume_breakpoint): Use
15682         lookup_symbol_search_name.
15683         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15684         * psymtab.c (maintenance_check_psymtabs): Use
15685         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15686         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15687         SYMBOL_SEARCH_NAME.
15688         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15689         if symbol_name_match_type::SEARCH_NAME.
15690         (lookup_symbol_in_language): Pass down
15691         symbol_name_match_type::FULL.
15692         (lookup_symbol_search_name): New.
15693         (lookup_language_this): Pass down
15694         symbol_name_match_type::SEARCH_NAME.
15695         (lookup_symbol_aux, lookup_local_symbol): New parameter
15696         'match_type'.  Pass it down.
15697         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15698         (lookup_symbol_search_name): New declaration.
15699         (lookup_symbol_in_block): New 'match_type' parameter.
15700
15701 2018-01-05  Pedro Alves  <palves@redhat.com>
15702
15703         PR gdb/22670
15704         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15705         ada_lookup_symbol.
15706         (ada_lookup_symbol): Reimplement in terms of
15707         ada_lookup_symbol_list, bits factored out from
15708         ada_lookup_encoded_symbol.
15709
15710 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15711
15712         * ada-exp.y (write_object_renaming): When subscripting an array
15713         using a symbol as the index, pass the block in call to
15714         ada_lookup_encoded_symbol when looking that symbol up.
15715
15716 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15717
15718         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15719         TYPE_INDEX_TYPE.
15720
15721 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15722
15723         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15724         the case where VALUE_LVAL (val0) is not lval_memory.
15725
15726 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15727
15728         * ada-valprint.c (print_optional_low_bound): Handle
15729         character-indexed array printing like boolean-indexed array
15730         printing.
15731
15732 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15733
15734         * NEWS: Create a new section for the next release branch.
15735         Rename the section of the current branch, now that it has
15736         been cut.
15737
15738 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15739
15740         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15741         * version.in: Bump version to 8.1.50.DATE-git.
15742
15743 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15744
15745         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15746         Add field.
15747         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15748         Add field.
15749         (default_exception_support_info) <catch_handlers_sym>: Add field.
15750         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15751         (ada_exception_name_addr_1): Add "catch handlers" handling.
15752         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15753         Update all callers.
15754         (create_excep_cond_exprs) <ex>: Add parameter.
15755         (re_set_exception): Update create_excep_cond_exprs call.
15756         (print_it_exception, print_one_exception, print_mention_exception)
15757         (print_recreate_exception): Add "catch handler" handling.
15758         (allocate_location_catch_handlers, re_set_catch_handlers)
15759         (check_status_catch_handlers, print_it_catch_handlers)
15760         (print_one_catch_handlers, print_mention_catch_handlers)
15761         (print_recreate_catch_handlers): New function.
15762         (catch_handlers_breakpoint_ops): New variable.
15763         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15764         Add parameter.  Add "catch handler" handling.
15765         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15766         Add "catch handler" handling.
15767         (ada_exception_catchpoint_cond_string): Add "catch handler"
15768         handling.
15769         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15770         call.
15771         (catch_ada_handlers_command): New function.
15772         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15773         operations structure.
15774         (_initialize_ada_language): Add "catch handlers" command entry.
15775         * NEWS: Document "catch handlers" feature.
15776
15777 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15778
15779         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15780         account when creating the array type of the slice.
15781         (ada_value_slice): Likewise.
15782
15783 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15784
15785         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15786         New enum value.
15787         (create_array_type_with_stride): Add byte_stride_prop parameter.
15788         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15789         New parameter.  Update all callers in this file.
15790         (array_type_has_dynamic_stride): New function.
15791         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15792         of arrays with dynamic byte strides.
15793         * dwarf2read.c (read_array_type): Add support for dynamic
15794         DW_AT_byte_stride attributes.
15795
15796 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15797
15798         * dwarf2read.c (read_unspecified_type): Treat
15799         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15800
15801 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15802
15803         Update copyright year range in all GDB files.
15804
15805 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15806
15807         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15808         and gdb/testsuite/gdb.base/step-line.c.
15809
15810 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15811
15812         * copyright.py (main): Dump the contents of
15813         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15814         even if BY_HAND is empty.
15815
15816 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15817
15818         * top.c (print_gdb_version): Update Copyright year in version
15819         message.
15820
15821 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15822
15823         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15824
15825 For older changes see ChangeLog-2017.
15826 \f
15827 Local Variables:
15828 mode: change-log
15829 left-margin: 8
15830 fill-column: 74
15831 version-control: never
15832 coding: utf-8
15833 End: