]> Git Repo - binutils.git/blob - gdb/ChangeLog
Add missing spaces after inet_ntop invocations.
[binutils.git] / gdb / ChangeLog
1 2018-09-19  John Baldwin  <[email protected]>
2
3         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
4         (fbsd_print_sockaddr_in6): Likewise.
5
6 2018-09-19  Richard Bunt  <[email protected]>
7             Chris January  <[email protected]>
8
9         * eval.c (skip_undetermined_arglist): Skip argument list helper.
10         (evaluate_subexp_standard): Return a dummy type when
11         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
12         OP_F77_UNDETERMINED_ARGLIST case.
13         * expression.h (enum noside): Update comment.
14
15 2018-09-19  George Vasick <[email protected]>
16
17         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
18
19 2018-09-19  Stefan Teleman <[email protected]>
20             April Chin <[email protected]>
21             Rainer Orth  <[email protected]>
22
23         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
24         uint_t lwpid_t.
25         (create_procinfo): Print pids in /proc without leading zeros.
26
27 2018-09-18  Sandra Loosemore  <[email protected]>
28
29         * nios2-tdep.c (nios2_gcc_target_options): New.
30         (nios2_gdb_arch_init): Install new hook.
31
32 2018-09-18  Simon Marchi  <[email protected]>
33
34         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
35         New file.
36         * update-gnulib.sh: Apply patch.
37         * configure: Re-generate.
38
39 2018-09-18  John Baldwin  <[email protected]>
40
41         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
42         description.  Make "info proc" command descriptions more
43         consistent.
44
45 2018-09-18  John Baldwin  <[email protected]>
46
47         * NEWS: Mention 'info proc files' command.
48
49 2018-09-18  John Baldwin  <[email protected]>
50
51         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
52         descriptors for IP_FILES and IP_ALL.
53
54 2018-09-18  John Baldwin  <[email protected]>
55
56         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
57         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
58         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
59         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
60         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
61         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
62         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
63         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
64         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
65         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
66         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
67         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
68         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
69         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
70         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
71         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
72         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
73         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
74         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
75         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
76         (struct fbsd_sockaddr_un): New types.
77         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
78         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
79         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
80         (fbsd_core_info_proc_files): New functions.
81         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
82         IP_ALL.
83         * fbsd-tdep.h (fbsd_info_proc_files_header)
84         (fbsd_info_proc_files_entry): New.
85
86 2018-09-18  John Baldwin  <[email protected]>
87
88         * defs.h (enum info_proc_what) [IP_FILES]: New value.
89         * infcmd.c (info_proc_cmd_files): New function.
90         (_initialize_infcmd): Register 'info proc files' command.
91
92 2018-09-18  John Baldwin  <[email protected]>
93
94         * gnulib/aclocal-m4-deps.mk: Re-generate.
95         * gnulib/aclocal.m4: Re-generate.
96         * gnulib/config.in: Re-generate.
97         * gnulib/configure: Re-generate.
98         * gnulib/import/Makefile.am: Re-generate.
99         * gnulib/import/Makefile.in: Re-generate.
100         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
101         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
102         * gnulib/import/arpa_inet.in.h: New file.
103         * gnulib/import/inet_ntop.c: New file.
104         * gnulib/import/m4/arpa_inet_h.m4: New file.
105         * gnulib/import/m4/inet_ntop.m4: New file.
106         * gnulib/import/m4/netinet_in_h.m4: New file.
107         * gnulib/import/m4/socklen.m4: New file.
108         * gnulib/import/m4/sockpfaf.m4: New file.
109         * gnulib/import/m4/stdalign.m4: New file.
110         * gnulib/import/m4/sys_uio_h.m4: New file.
111         * gnulib/import/netinet_in.in.h: New file.
112         * gnulib/import/stdalign.in.h: New file.
113         * gnulib/import/sys_socket.c: New file.
114         * gnulib/import/sys_socket.in.h: New file.
115         * gnulib/import/sys_uio.in.h: New file.
116         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
117         module.
118
119 2018-09-18  John Baldwin  <[email protected]>
120
121         * gnulib/aclocal-m4-deps.mk: New file.
122         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
123         deterministically.
124
125 2018-09-18  John Baldwin  <[email protected]>
126
127         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
128         KVE_PATH.
129
130 2018-09-18  Tom Tromey  <[email protected]>
131
132         * compile/compile-object-load.c (struct
133         link_hash_table_cleanup_data): Add constructor and destructor.
134         Use DISABLE_COPY_AND_ASSIGN.
135         (~link_hash_table_cleanup_data): Rename from
136         link_hash_table_free.  Now a destructor.
137         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
138
139 2018-09-18  Tom Tromey  <[email protected]>
140
141         * compile/compile-object-run.c (do_module_cleanup): Use delete.
142         * compile/compile-object-load.c (struct munmap_list): Move to
143         header file.
144         (munmap_list::add): Rename from munmap_list_add; rewrite.
145         (munmap_list::~munmap_list): Rename from munmap_list_free.
146         (munmap_listp_free_cleanup): Remove.
147         (compile_object_load): Update.
148         * compile/compile-object-load.h (struct munmap_list): Move from
149         compile-object-load.c.  Rewrite.
150
151 2018-09-18  Alan Hayward  <[email protected]>
152
153         * aarch64-tdep.c (pass_in_v): Use register size.
154         (aarch64_extract_return_value): Likewise.
155         (aarch64_store_return_value): Likewise.
156
157 2018-09-18  Rainer Orth  <[email protected]>
158
159         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
160         rlim_t.
161
162 2018-09-17  Philippe Waroquiers  <[email protected]>
163
164         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
165         Fix short help line.
166
167 2018-09-17  Tom Tromey  <[email protected]>
168
169         PR python/20445:
170         * configure: Rebuild.
171         * configure.ac: Conditionally use -DNDEBUG for Python.
172
173 2018-09-17  Tom Tromey  <[email protected]>
174
175         * configure: Rebuild.
176         * configure.ac: Use gmp as a library dependency when checking for
177         mpfr.
178
179 2018-09-17  Pedro Alves  <[email protected]>
180
181         * python/py-inferior.c (find_inferior_object): Delete.
182
183 2018-09-17  Simon Marchi  <[email protected]>
184
185         * compile/compile-cplus-types.c
186         (compile_cplus_instance::enter_scope): Don't use new_scope after
187         std::move.
188
189 2018-09-17  Tom Tromey  <[email protected]>
190
191         * common/pathstuff.c (get_standard_cache_dir): Use
192         ~/Library/Caches on macOS.
193         * common/pathstuff.h (get_standard_cache_dir): Update comment.
194
195 2018-09-17  Simon Marchi  <[email protected]>
196
197         PR python/23669
198         * breakpoint.c (commands_cmd_element): New.
199         (_initialize_breakpoint): Assign commands_cmd_element.
200         * breakpoint.h (commands_cmd_element): New.
201         * cli/cli-script.c (while_cmd_element, if_command,
202         define_cmd_element): New.
203         (command_name_equals): Remove.
204         (process_next_line): Compare commands by pointer, not by name.
205         (_initialize_cli_script): Assign the various cmd_list_element
206         variables.
207         * compile/compile.c (compile_cmd_element): New.
208         (_initialize_compile): Assign compile_cmd_element.
209         * compile/compile.h (compile_cmd_element): New.
210         * guile/guile.c (guile_cmd_element): New.
211         (install_gdb_commands): Assign guile_cmd_element.
212         * guile/guile.h (guile_cmd_element): New.
213         * python/python.c (python_cmd_element): New.
214         (_initialize_python): Assign python_cmd_element.
215         * python/python.h (python_cmd_element): New.
216         * tracepoint.c (while_stepping_cmd_element): New.
217         (_initialize_tracepoint): Assign while_stepping_cmd_element.
218         * tracepoint.h (while_stepping_cmd_element): New.
219
220 2018-09-17  Tom Tromey  <[email protected]>
221
222         * infrun.c (save_infcall_suspend_state): Return
223         infcall_suspend_state_up.
224         (save_infcall_control_state): Return infcall_control_state_up.
225         * inferior.h (save_infcall_suspend_state)
226         (save_infcall_control_state): Declare later.  Return unique
227         pointers.
228
229 2018-09-17  Tom Tromey  <[email protected]>
230
231         * infrun.c (struct stop_context): Declare constructor,
232         destructor, "changed" method.
233         (stop_context::stop_context): Rename from save_stop_context.
234         (stop_context::~stop_context): Rename from
235         release_stop_context_cleanup.
236         (normal_stop): Update.
237         (stop_context::changed): Rename from stop_context_changed.  Return
238         bool.
239
240 2018-09-17  Tom Tromey  <[email protected]>
241
242         * inferior.h (struct infcall_suspend_state_deleter): New.
243         (infcall_suspend_state_up): New typedef.
244         (struct infcall_control_state_deleter): New.
245         (infcall_control_state_up): New typedef.
246         (make_cleanup_restore_infcall_suspend_state)
247         (make_cleanup_restore_infcall_control_state): Don't declare.
248         * infcall.c (call_function_by_hand_dummy): Update.
249         * infrun.c (do_restore_infcall_suspend_state_cleanup)
250         (make_cleanup_restore_infcall_suspend_state): Remove.
251         (do_restore_infcall_control_state_cleanup)
252         (make_cleanup_restore_infcall_control_state): Remove.
253
254 2018-09-17  Tom Tromey  <[email protected]>
255
256         * gdbthread.h (struct thread_control_state): Add initializer.
257         (class thread_info) <control>: Remove initializer.
258         * inferior.h (struct inferior_control_state): Add initializer.
259         (class inferior) <control>: Remove initializer.
260         (exit_inferior_1): Update.
261         * infrun.c (struct infcall_control_state): Add constructors.
262         (save_infcall_control_state): Use new.
263         (restore_infcall_control_state, discard_infcall_control_state):
264         Use delete.
265
266 2018-09-17  Tom Tromey  <[email protected]>
267
268         * infrun.c (struct infcall_suspend_state) <registers>: Now a
269         unique_ptr.
270         <siginfo_data>: Now a unique_xmalloc_ptr.
271         (save_infcall_suspend_state, restore_infcall_suspend_state)
272         (discard_infcall_suspend_state)
273         (get_infcall_suspend_state_regcache): Update.
274
275 2018-09-17  Tom Tromey  <[email protected]>
276
277         * gdbthread.h (struct thread_suspend_state): Add initializers.
278         (class thread_info) <suspend>: Remove initializer.
279         * infrun.c (struct infcall_suspend_state): Add initializers.
280         (save_infcall_suspend_state): Use new.
281         (discard_infcall_suspend_state): Use delete.
282
283 2018-09-16  Tom Tromey  <[email protected]>
284
285         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
286         Remove.
287         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
288         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
289         (py_varobj_iter_new): Likewise.
290         (py_varobj_get_iterator): Use gdbpy_ref.
291
292 2018-09-16  Tom Tromey  <[email protected]>
293
294         * python/py-threadevent.c (py_get_event_thread): Simplify.
295         * python/py-inferior.c (infpy_thread_from_thread_handle):
296         Return immediately after calling thread_to_thread_object.  Use
297         Py_RETURN_NONE.
298         (thread_to_thread_object): Set the exception on a NULL return.
299
300 2018-09-16  Simon Marchi  <[email protected]>
301
302         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
303
304 2018-09-16  Tom Tromey  <[email protected]>
305
306         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
307         Remove.
308
309 2018-09-16  Tom Tromey  <[email protected]>
310
311         * python/python-internal.h (thread_to_thread_object): Change
312         return type.
313         * python/py-inferior.c (thread_to_thread_object): Return a new
314         reference.
315         (infpy_thread_from_thread_handle): Update.
316         * python/py-infthread.c (gdbpy_selected_thread): Update.
317         * python/py-stopevent.c (create_stop_event_object): Update.
318         * python/py-threadevent.c (py_get_event_thread): Return a new
319         reference.
320         (py_get_event_thread): Update.
321         * python/py-event.h (py_get_event_thread): Change return type.
322         * python/py-continueevent.c (create_continue_event_object):
323         Update.
324
325 2018-09-16  Tom Tromey  <[email protected]>
326
327         * python/py-progspace.c (pspy_get_objfiles): Update.
328         * python/python-internal.h (objfile_to_objfile_object): Change
329         return type.
330         * python/py-newobjfileevent.c (create_new_objfile_event_object):
331         Update.
332         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
333         Update.
334         * python/python.c (gdbpy_get_current_objfile): Update.
335         (gdbpy_objfiles): Update.
336         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
337         Update.
338         (objfile_to_objfile_object): Return a new reference.
339         * python/py-symtab.c (stpy_get_objfile): Update.
340         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
341         Update.
342
343 2018-09-16  Tom Tromey  <[email protected]>
344
345         * python/py-inferior.c (infpy_get_progspace): Update.
346         * python/python-internal.h (pspace_to_pspace_object): Change
347         return type.
348         * python/py-newobjfileevent.c
349         (create_clear_objfiles_event_object): Update.
350         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
351         Update.
352         * python/python.c (gdbpy_get_current_progspace): Update.
353         (gdbpy_progspaces): Update.
354         * python/py-progspace.c (pspace_to_pspace_object): Return a new
355         reference.
356         * python/py-objfile.c (objfpy_get_progspace): Update.
357         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
358         Update.
359
360 2018-09-16  Tom Tromey  <[email protected]>
361
362         * python/lib/gdb/__init__.py (current_progspace, objfiles)
363         (solib_name, block_for_pc, find_pc_line): New functions.
364         (execute_unwinders): Update.
365         * python/py-block.c (gdbpy_block_for_pc): Remove.
366         * python/py-inferior.c (infpy_get_progspace): New function.
367         (inferior_object_getset) <progspace>: Add.
368         * python/py-progspace.c (pspy_objfiles): Rewrite.
369         (pspy_solib_name, pspy_block_for_pc)
370         (pspy_find_pc_line, pspy_is_valid): New functions.
371         (progspace_object_methods): Add entries for solib_name,
372         block_for_pc, find_pc_line, is_valid.
373         * python/python-internal.h (gdbpy_block_for_pc)
374         (build_objfiles_list): Don't declare.
375         * python/python.c: Don't include solib.h.
376         (gdbpy_solib_name, gdbpy_find_pc_line)
377         (gdbpy_get_current_progspace, build_objfiles_list)
378         (gdbpy_objfiles): Remove.
379         (GdbMethods) <current_progspace, objfiles, block_for_pc,
380         solib_name, find_pc_line>: Remove entries.
381
382 2018-09-16  Tom Tromey  <[email protected]>
383
384         * top.c (new_ui_command): Use GNU style for metasyntactic
385         variables.
386         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
387         variables.
388         * maint.c (maintenance_translate_address): Remove "<>" around
389         text.
390         * interps.c (interpreter_exec_cmd): Use GNU style for
391         metasyntactic variables.
392         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
393         metasyntactic variables.
394         * tracepoint.c (tfind_range_command): Use GNU style for
395         metasyntactic variables.
396         (tfind_outside_command): Likewise.
397         (_initialize_tracepoint): Likewise.
398         * remote.c (extended_remote_target::create_inferior): Use GNU
399         style for metasyntactic variables.
400         * sparc64-tdep.c (adi_examine_command): Use GNU style for
401         metasyntactic variables.
402         (adi_assign_command): Likewise.
403
404 2018-09-16  Tom Tromey  <[email protected]>
405
406         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
407         metasyntactic variables.  Print message if no disassembler options
408         are available.
409
410 2018-09-15  Tom Tromey  <[email protected]>
411
412         * infcmd.c (get_inferior_args): Return const char *.
413         * inferior.h (get_inferior_args): Return type now const.
414         * linux-tdep.c (linux_fill_prpsinfo): Update.
415         * procfs.c (procfs_target::make_corefile_notes): Update.
416
417 2018-09-07  Tom Tromey  <[email protected]>
418
419         * python/python.c (execute_gdb_command): Call bpstat_do_actions
420         inside the TRY.
421
422 2018-09-14  Sandra Loosemore  <[email protected]>
423
424         * nios2-tdep.c (nios2_type_align): New.
425         (nios2_gdb_arch_init): Install type_align hook.
426
427 2018-09-10  Andrew Burgess  <[email protected]>
428
429         * eval.c (fake_method::fake_method): Call xzalloc directly for a
430         type that is neither object file owned, nor gdbarch owned.
431         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
432         gdbarch is non-NULL.
433         (alloc_type_instance): Allocate non-objfile owned types on the
434         gdbarch obstack.
435         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
436         using TYPE_ALLOC to ensure memory is allocated on the correct
437         obstack.
438         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
439         obstack, or the gdbarch obstack.
440         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
441
442 2018-09-14  Tom Tromey  <[email protected]>
443
444         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
445         block.
446
447 2018-09-14  Tom Tromey  <[email protected]>
448
449         * nat/fork-inferior.c (get_startup_shell): Remove "static".
450
451 2018-09-13  Tom Tromey  <[email protected]>
452
453         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
454         static.
455
456 2018-09-13  Tom Tromey  <[email protected]>
457
458         * exec.c (try_open_exec_file): Use std::string.
459
460 2018-09-13  Tom Tromey  <[email protected]>
461
462         * utils.h (gdb_bfd_errmsg): Return std::string.
463         * exec.c (exec_file_attach): Update.
464         * compile/compile-object-load.c (compile_object_load): Update.
465         * utils.c (gdb_bfd_errmsg): Return std::string.
466
467 2018-09-13  Tom Tromey  <[email protected]>
468
469         * procfs.c (struct procinfo_deleter): New.
470         (procinfo_up): New typedef.
471         (do_destroy_procinfo_cleanup): Remove.
472         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
473
474 2018-09-13  Tom Tromey  <[email protected]>
475
476         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
477
478 2018-09-13  Simon Marchi  <[email protected]>
479 2018-09-13  Tom Tromey  <[email protected]>
480
481         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
482         (pspy_get_objfiles): New function.
483         (progspace_object_methods): New.
484         (pspace_object_type): Add tp_methods callback.
485         * python/python-internal.h (build_objfiles_list): New
486         declaration.
487         * python/python.c (build_objfiles_list): New function.
488         (gdbpy_objfiles): Implement using build_objfiles_list.
489         * NEWS: Mention the Progspace.objfiles method.
490
491 2018-09-13  Simon Marchi  <[email protected]>
492
493         * python/py-inferior.c (infpy_get_progspace): New function.
494         (inferior_object_getset): Add progspace property.
495         * NEWS: Mention the new property.
496
497 2018-09-13  Tom Tromey  <[email protected]>
498
499         PR rust/23650:
500         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
501
502 2018-09-13  Tom Tromey  <[email protected]>
503
504         PR rust/23626:
505         * rust-lang.c (rust_enum_variant): Now static.
506         (rust_empty_enum_p): New function.
507         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
508         Handle empty enum.
509
510 2018-09-13  Simon Marchi  <[email protected]>
511
512         * python/py-inferior.c (infpy_repr): New.
513         (inferior_object_type): Register infpy_repr.
514         * python/py-objfile.c (objfpy_repr): New.
515         (objfile_object_type): Register objfpy_repr.
516
517 2018-09-12  John Baldwin  <[email protected]>
518
519         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
520
521 2018-09-12  John Baldwin  <[email protected]>
522
523         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
524         typo.
525
526 2018-09-12  Sergio Durigan Junior  <[email protected]>
527
528         * common/common-utils.c: Don't include '<sys/stat.h>'.
529         (is_regular_file): Move to...
530         * common/filestuff.c (is_regular_file): ... here.
531         * common/common-utils.h (is_regular_file): Move to...
532         * common/filestuff.h (is_regular_file): ... here.
533
534 2018-09-12  Simon Marchi  <[email protected]>
535
536         * skip.c (debug_skip): New variable.
537         (skiplist_entry::do_skip_file_p): Add debug output.
538         (skiplist_entry::do_skip_gfile_p): Likewise.
539         (skiplist_entry::skip_function_p): Likewise.
540         (_initialize_step_skip): Create debug command.
541         * NEWS: Mention set/show debug skip.
542
543 2018-09-11  Xavier Roirand  <[email protected]>
544
545         * darwin-nat.c (should_disable_startup_with_shell):
546         New function.
547         (darwin_nat_target::create_inferior): Add call.
548
549 2018-09-11  Xavier Roirand  <[email protected]>
550
551         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
552         inf_port, msg_state>: Initialize.
553         (struct darwin_thread_info) <signaled, single_step>: Change
554         type and initialize.
555         (struct darwin_thread_info) <event>: Initialize.
556
557 2018-09-10  Sergio Durigan Junior  <[email protected]>
558
559         PR gdb/23555
560         PR gdb/23558
561         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
562         guesses.
563
564 2018-09-10  Sergio Durigan Junior  <[email protected]>
565
566         Revert:
567         2018-08-29  Sergio Durigan Junior  <[email protected]>
568
569         PR gdb/23555
570         PR gdb/23558
571         * gnulib/aclocal.m4: Regenerate.
572         * gnulib/config.in: Regenerate.
573         * gnulib/configure: Regenerate.
574         * gnulib/import/Makefile.am: Update.
575         * gnulib/import/Makefile.in: Update.
576         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
577         * gnulib/import/_Noreturn.h: ... this.
578         * gnulib/import/alloca.in.h: Update.
579         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
580         * gnulib/import/arg-nonnull.h: ... this.
581         * gnulib/import/assure.h: Update.
582         * gnulib/import/at-func.c: Update.
583         * gnulib/import/basename-lgpl.c: Update.
584         * gnulib/import/extra/snippet/c++defs.h: Rename to...
585         * gnulib/import/c++defs.h: ... this.
586         * gnulib/import/canonicalize-lgpl.c: Update.
587         * gnulib/import/cdefs.h: Update.
588         * gnulib/import/chdir-long.c: Update.
589         * gnulib/import/chdir-long.h: Update.
590         * gnulib/import/cloexec.c: Update.
591         * gnulib/import/cloexec.h: Update.
592         * gnulib/import/close.c: Update.
593         * gnulib/import/closedir.c: Update.
594         * gnulib/import/config.charset: Update.
595         * gnulib/import/dirent-private.h: Update.
596         * gnulib/import/dirent.in.h: Update.
597         * gnulib/import/dirfd.c: Update.
598         * gnulib/import/dirname-lgpl.c: Update.
599         * gnulib/import/dirname.h: Update.
600         * gnulib/import/dosname.h: Update.
601         * gnulib/import/dup-safer-flag.c: Update.
602         * gnulib/import/dup-safer.c: Update.
603         * gnulib/import/dup.c: Update.
604         * gnulib/import/dup2.c: Update.
605         * gnulib/import/errno.in.h: Update.
606         * gnulib/import/error.c: Update.
607         * gnulib/import/error.h: Update.
608         * gnulib/import/exitfail.c: Update.
609         * gnulib/import/exitfail.h: Update.
610         * gnulib/import/extra/update-copyright: Update.
611         * gnulib/import/fchdir.c: Update.
612         * gnulib/import/fcntl.c: Update.
613         * gnulib/import/fcntl.in.h: Update.
614         * gnulib/import/fd-hook.c: Update.
615         * gnulib/import/fd-hook.h: Update.
616         * gnulib/import/fd-safer-flag.c: Update.
617         * gnulib/import/fd-safer.c: Update.
618         * gnulib/import/fdopendir.c: Update.
619         * gnulib/import/filename.h: Update.
620         * gnulib/import/filenamecat-lgpl.c: Update.
621         * gnulib/import/filenamecat.h: Update.
622         * gnulib/import/flexmember.h: Update.
623         * gnulib/import/float+.h: Update.
624         * gnulib/import/float.c: Update.
625         * gnulib/import/float.in.h: Update.
626         * gnulib/import/fnmatch.c: Update.
627         * gnulib/import/fnmatch.in.h: Update.
628         * gnulib/import/fnmatch_loop.c: Update.
629         * gnulib/import/fpucw.h: Update.
630         * gnulib/import/frexp.c: Update.
631         * gnulib/import/frexpl.c: Update.
632         * gnulib/import/fstat.c: Update.
633         * gnulib/import/fstatat.c: Update.
634         * gnulib/import/getcwd-lgpl.c: Update.
635         * gnulib/import/getcwd.c: Update.
636         * gnulib/import/getdtablesize.c: Update.
637         * gnulib/import/getlogin_r.c: Update.
638         * gnulib/import/getprogname.c: Update.
639         * gnulib/import/getprogname.h: Update.
640         * gnulib/import/gettext.h: Update.
641         * gnulib/import/gettimeofday.c: Update.
642         * gnulib/import/glob-libc.h: Update.
643         * gnulib/import/glob.c: Update.
644         * gnulib/import/glob.in.h: Update.
645         * gnulib/import/glob_internal.h: Update.
646         * gnulib/import/glob_pattern_p.c: Update.
647         * gnulib/import/globfree.c: Update.
648         * gnulib/import/hard-locale.c: Update.
649         * gnulib/import/hard-locale.h: Update.
650         * gnulib/import/intprops.h: Update.
651         * gnulib/import/inttypes.in.h: Update.
652         * gnulib/import/isnan.c: Update.
653         * gnulib/import/isnand-nolibm.h: Update.
654         * gnulib/import/isnand.c: Update.
655         * gnulib/import/isnanl-nolibm.h: Update.
656         * gnulib/import/isnanl.c: Update.
657         * gnulib/import/itold.c: Update.
658         * gnulib/import/libc-config.h: Update.
659         * gnulib/import/limits.in.h: Update.
660         * gnulib/import/localcharset.c: Update.
661         * gnulib/import/localcharset.h: Update.
662         * gnulib/import/localtime-buffer.c: Update.
663         * gnulib/import/localtime-buffer.h: Update.
664         * gnulib/import/lstat.c: Update.
665         * gnulib/import/m4/00gnulib.m4: Update.
666         * gnulib/import/m4/__inline.m4: Update.
667         * gnulib/import/m4/absolute-header.m4: Update.
668         * gnulib/import/m4/alloca.m4: Update.
669         * gnulib/import/m4/builtin-expect.m4: Update.
670         * gnulib/import/m4/canonicalize.m4: Update.
671         * gnulib/import/m4/chdir-long.m4: Update.
672         * gnulib/import/m4/close.m4: Update.
673         * gnulib/import/m4/closedir.m4: Update.
674         * gnulib/import/m4/configmake.m4: Update.
675         * gnulib/import/m4/d-ino.m4: Update.
676         * gnulib/import/m4/d-type.m4: Update.
677         * gnulib/import/m4/dirent_h.m4: Update.
678         * gnulib/import/m4/dirfd.m4: Update.
679         * gnulib/import/m4/dirname.m4: Update.
680         * gnulib/import/m4/double-slash-root.m4: Update.
681         * gnulib/import/m4/dup.m4: Update.
682         * gnulib/import/m4/dup2.m4: Update.
683         * gnulib/import/m4/eealloc.m4: Update.
684         * gnulib/import/m4/environ.m4: Update.
685         * gnulib/import/m4/errno_h.m4: Update.
686         * gnulib/import/m4/error.m4: Update.
687         * gnulib/import/m4/exponentd.m4: Update.
688         * gnulib/import/m4/exponentl.m4: Update.
689         * gnulib/import/m4/extensions.m4: Update.
690         * gnulib/import/m4/extern-inline.m4: Update.
691         * gnulib/import/m4/fchdir.m4: Update.
692         * gnulib/import/m4/fcntl-o.m4: Update.
693         * gnulib/import/m4/fcntl.m4: Update.
694         * gnulib/import/m4/fcntl_h.m4: Update.
695         * gnulib/import/m4/fdopendir.m4: Update.
696         * gnulib/import/m4/filenamecat.m4: Update.
697         * gnulib/import/m4/flexmember.m4: Update.
698         * gnulib/import/m4/float_h.m4: Update.
699         * gnulib/import/m4/fnmatch.m4: Update.
700         * gnulib/import/m4/fnmatch_h.m4: Update.
701         * gnulib/import/m4/fpieee.m4: Update.
702         * gnulib/import/m4/frexp.m4: Update.
703         * gnulib/import/m4/frexpl.m4: Update.
704         * gnulib/import/m4/fstat.m4: Update.
705         * gnulib/import/m4/fstatat.m4: Update.
706         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
707         * gnulib/import/m4/getcwd-path-max.m4: Update.
708         * gnulib/import/m4/getcwd.m4: Update.
709         * gnulib/import/m4/getdtablesize.m4: Update.
710         * gnulib/import/m4/getlogin.m4: Update.
711         * gnulib/import/m4/getlogin_r.m4: Update.
712         * gnulib/import/m4/getpagesize.m4: Update.
713         * gnulib/import/m4/getprogname.m4: Update.
714         * gnulib/import/m4/gettimeofday.m4: Update.
715         * gnulib/import/m4/glibc21.m4: Update.
716         * gnulib/import/m4/glob.m4: Update.
717         * gnulib/import/m4/glob_h.m4: Update.
718         * gnulib/import/m4/gnulib-cache.m4: Update.
719         * gnulib/import/m4/gnulib-common.m4: Update.
720         * gnulib/import/m4/gnulib-comp.m4: Update.
721         * gnulib/import/m4/gnulib-tool.m4: Update.
722         * gnulib/import/m4/hard-locale.m4: Update.
723         * gnulib/import/m4/include_next.m4: Update.
724         * gnulib/import/m4/inttypes-pri.m4: Update.
725         * gnulib/import/m4/inttypes.m4: Update.
726         * gnulib/import/m4/isnand.m4: Update.
727         * gnulib/import/m4/isnanl.m4: Update.
728         * gnulib/import/m4/largefile.m4: Update.
729         * gnulib/import/m4/limits-h.m4: Update.
730         * gnulib/import/m4/localcharset.m4: Update.
731         * gnulib/import/m4/locale-fr.m4: Update.
732         * gnulib/import/m4/locale-ja.m4: Update.
733         * gnulib/import/m4/locale-zh.m4: Update.
734         * gnulib/import/m4/localtime-buffer.m4: Update.
735         * gnulib/import/m4/longlong.m4: Update.
736         * gnulib/import/m4/lstat.m4: Update.
737         * gnulib/import/m4/malloc.m4: Update.
738         * gnulib/import/m4/malloca.m4: Update.
739         * gnulib/import/m4/math_h.m4: Update.
740         * gnulib/import/m4/mbrtowc.m4: Update.
741         * gnulib/import/m4/mbsinit.m4: Update.
742         * gnulib/import/m4/mbsrtowcs.m4: Update.
743         * gnulib/import/m4/mbstate_t.m4: Update.
744         * gnulib/import/m4/memchr.m4: Update.
745         * gnulib/import/m4/memmem.m4: Update.
746         * gnulib/import/m4/mempcpy.m4: Update.
747         * gnulib/import/m4/memrchr.m4: Update.
748         * gnulib/import/m4/mkdir.m4: Update.
749         * gnulib/import/m4/mkstemp.m4: Update.
750         * gnulib/import/m4/mmap-anon.m4: Update.
751         * gnulib/import/m4/mode_t.m4: Update.
752         * gnulib/import/m4/msvc-inval.m4: Update.
753         * gnulib/import/m4/msvc-nothrow.m4: Update.
754         * gnulib/import/m4/multiarch.m4: Update.
755         * gnulib/import/m4/nocrash.m4: Update.
756         * gnulib/import/m4/off_t.m4: Update.
757         * gnulib/import/m4/onceonly.m4: Update.
758         * gnulib/import/m4/open-cloexec.m4: Update.
759         * gnulib/import/m4/open.m4: Update.
760         * gnulib/import/m4/openat.m4: Update.
761         * gnulib/import/m4/opendir.m4: Update.
762         * gnulib/import/m4/pathmax.m4: Update.
763         * gnulib/import/m4/rawmemchr.m4: Update.
764         * gnulib/import/m4/readdir.m4: Update.
765         * gnulib/import/m4/readlink.m4: Update.
766         * gnulib/import/m4/realloc.m4: Update.
767         * gnulib/import/m4/rename.m4: Update.
768         * gnulib/import/m4/rewinddir.m4: Update.
769         * gnulib/import/m4/rmdir.m4: Update.
770         * gnulib/import/m4/save-cwd.m4: Update.
771         * gnulib/import/m4/secure_getenv.m4: Update.
772         * gnulib/import/m4/setenv.m4: Update.
773         * gnulib/import/m4/signal_h.m4: Update.
774         * gnulib/import/m4/ssize_t.m4: Update.
775         * gnulib/import/m4/stat-time.m4: Update.
776         * gnulib/import/m4/stat.m4: Update.
777         * gnulib/import/m4/std-gnu11.m4: Update.
778         * gnulib/import/m4/stdbool.m4: Update.
779         * gnulib/import/m4/stddef_h.m4: Update.
780         * gnulib/import/m4/stdint.m4: Update.
781         * gnulib/import/m4/stdio_h.m4: Update.
782         * gnulib/import/m4/stdlib_h.m4: Update.
783         * gnulib/import/m4/strchrnul.m4: Update.
784         * gnulib/import/m4/strdup.m4: Update.
785         * gnulib/import/m4/strerror.m4: Update.
786         * gnulib/import/m4/string_h.m4: Update.
787         * gnulib/import/m4/strstr.m4: Update.
788         * gnulib/import/m4/strtok_r.m4: Update.
789         * gnulib/import/m4/sys_socket_h.m4: Update.
790         * gnulib/import/m4/sys_stat_h.m4: Update.
791         * gnulib/import/m4/sys_time_h.m4: Update.
792         * gnulib/import/m4/sys_types_h.m4: Update.
793         * gnulib/import/m4/tempname.m4: Update.
794         * gnulib/import/m4/time_h.m4: Update.
795         * gnulib/import/m4/unistd-safer.m4: Update.
796         * gnulib/import/m4/unistd_h.m4: Update.
797         * gnulib/import/m4/warn-on-use.m4: Update.
798         * gnulib/import/m4/wchar_h.m4: Update.
799         * gnulib/import/m4/wchar_t.m4: Update.
800         * gnulib/import/m4/wctype_h.m4: Update.
801         * gnulib/import/m4/wint_t.m4: Update.
802         * gnulib/import/malloc.c: Update.
803         * gnulib/import/malloc/scratch_buffer.h: Update.
804         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
805         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
806         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
807         * gnulib/import/malloca.c: Update.
808         * gnulib/import/malloca.h: Update.
809         * gnulib/import/malloca.valgrind: Update.
810         * gnulib/import/math.in.h: Update.
811         * gnulib/import/mbrtowc.c: Update.
812         * gnulib/import/mbsinit.c: Update.
813         * gnulib/import/mbsrtowcs-impl.h: Update.
814         * gnulib/import/mbsrtowcs-state.c: Update.
815         * gnulib/import/mbsrtowcs.c: Update.
816         * gnulib/import/memchr.c: Update.
817         * gnulib/import/memmem.c: Update.
818         * gnulib/import/mempcpy.c: Update.
819         * gnulib/import/memrchr.c: Update.
820         * gnulib/import/mkdir.c: Update.
821         * gnulib/import/mkstemp.c: Update.
822         * gnulib/import/msvc-inval.c: Update.
823         * gnulib/import/msvc-inval.h: Update.
824         * gnulib/import/msvc-nothrow.c: Update.
825         * gnulib/import/msvc-nothrow.h: Update.
826         * gnulib/import/open.c: Update.
827         * gnulib/import/openat-die.c: Update.
828         * gnulib/import/openat-priv.h: Update.
829         * gnulib/import/openat-proc.c: Update.
830         * gnulib/import/openat.c: Update.
831         * gnulib/import/openat.h: Update.
832         * gnulib/import/opendir.c: Update.
833         * gnulib/import/pathmax.h: Update.
834         * gnulib/import/pipe-safer.c: Update.
835         * gnulib/import/rawmemchr.c: Update.
836         * gnulib/import/readdir.c: Update.
837         * gnulib/import/readlink.c: Update.
838         * gnulib/import/realloc.c: Update.
839         * gnulib/import/ref-add.sin: Update.
840         * gnulib/import/ref-del.sin: Update.
841         * gnulib/import/rename.c: Update.
842         * gnulib/import/rewinddir.c: Update.
843         * gnulib/import/rmdir.c: Update.
844         * gnulib/import/same-inode.h: Update.
845         * gnulib/import/save-cwd.c: Update.
846         * gnulib/import/save-cwd.h: Update.
847         * gnulib/import/scratch_buffer.h: Update.
848         * gnulib/import/secure_getenv.c: Update.
849         * gnulib/import/setenv.c: Update.
850         * gnulib/import/signal.in.h: Update.
851         * gnulib/import/stat-time.c: Update.
852         * gnulib/import/stat-time.h: Update.
853         * gnulib/import/stat-w32.c: Update.
854         * gnulib/import/stat-w32.h: Update.
855         * gnulib/import/stat.c: Update.
856         * gnulib/import/stdbool.in.h: Update.
857         * gnulib/import/stddef.in.h: Update.
858         * gnulib/import/stdint.in.h: Update.
859         * gnulib/import/stdio.in.h: Update.
860         * gnulib/import/stdlib.in.h: Update.
861         * gnulib/import/str-two-way.h: Update.
862         * gnulib/import/strchrnul.c: Update.
863         * gnulib/import/strdup.c: Update.
864         * gnulib/import/streq.h: Update.
865         * gnulib/import/strerror-override.c: Update.
866         * gnulib/import/strerror-override.h: Update.
867         * gnulib/import/strerror.c: Update.
868         * gnulib/import/string.in.h: Update.
869         * gnulib/import/stripslash.c: Update.
870         * gnulib/import/strnlen1.c: Update.
871         * gnulib/import/strnlen1.h: Update.
872         * gnulib/import/strstr.c: Update.
873         * gnulib/import/strtok_r.c: Update.
874         * gnulib/import/sys_stat.in.h: Update.
875         * gnulib/import/sys_time.in.h: Update.
876         * gnulib/import/sys_types.in.h: Update.
877         * gnulib/import/tempname.c: Update.
878         * gnulib/import/tempname.h: Update.
879         * gnulib/import/time.in.h: Update.
880         * gnulib/import/unistd--.h: Update.
881         * gnulib/import/unistd-safer.h: Update.
882         * gnulib/import/unistd.in.h: Update.
883         * gnulib/import/unsetenv.c: Update.
884         * gnulib/import/verify.h: Update.
885         * gnulib/import/extra/snippet/warn-on-use.h: Update.
886         * gnulib/import/wchar.in.h: Update.
887         * gnulib/import/wctype.in.h: Update.
888         * gnulib/import/xalloc-oversized.h: Update.
889         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
890         "53e2c179f26a890fa6685af4b6c1397ee370433b".
891
892 2018-09-10  Simon Marchi  <[email protected]>
893
894         * record-btrace.c (get_thread_current_frame): Remove
895         old_inferior_ptid.
896
897 2018-09-10  Jerome Guitton  <[email protected]>
898
899         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
900         with check_tag to 1 if and only if the type is tagged and the
901         component being searched cannot been found in the current
902         view. Otherwise, always call ada_to_fixed_type with
903         check_tag to 0.
904
905 2018-09-10  Xavier Roirand  <[email protected]>
906
907         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
908         declaration.
909         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
910         * ada-varobj.c (ada_varobj_get_number_of_children,
911         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
912
913 2018-09-10  Xavier Roirand  <[email protected]>
914
915         * ada-valprint.c (ada_value_print): Use type instead of
916         enclosing type.
917
918 2018-09-10  Xavier Roirand  <[email protected]>
919
920         * ada-lang.c (ada_value_subscript): Handle case when parameter is
921         an array of access to unconstrained array.
922
923 2018-09-10  Xavier Roirand  <[email protected]>
924
925         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
926         (ada_check_typedef): Use it.
927
928 2018-09-10  Xavier Roirand  <[email protected]>
929
930         * ada-varobj.c (ada_varobj_describe_struct_child)
931         (ada_varobj_describe_child): Handle union case like struct one.
932
933 2018-09-10  Tom Tromey  <[email protected]>
934
935         PR python/18380:
936         * python/python.c (_initialize_python): Make example in "python"
937         help work in Python 3.
938
939 2018-09-10  Eli Zaretskii  <[email protected]>
940
941         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
942         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
943         $(EXEEXT) to the script, as it is not a program.
944
945 2018-09-09  Simon Marchi  <[email protected]>
946
947         * python/py-prettyprint.c (pretty_print_one_value): Return
948         gdbpy_ref<>.
949         (print_string_repr): Adjust.
950         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
951         * python/python-internal.h (apply_varobj_pretty_printer): Return
952         gdbpy_ref<>.
953         * varobj.c (varobj_value_get_print_value): Adjust.
954
955 2018-09-08  Tom Tromey  <[email protected]>
956
957         PR python/16047:
958         * python/py-prettyprint.c (pretty_print_one_value): Check for
959         to_string method.
960
961 2018-09-08  Joel Brobecker  <[email protected]>
962
963         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
964         replace_operator_with_call.
965
966 2018-09-08  Joel Brobecker  <[email protected]>
967
968         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
969
970 2018-09-08  Joel Brobecker  <[email protected]>
971
972         * ada-typeprint.c (print_range): Print the bounds using TYPE
973         rather than its TYPE_TARGET_TYPE.
974
975 2018-09-08  Joel Brobecker  <[email protected]>
976
977         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
978         call to ada_to_fixed_value_create.
979
980 2018-09-08  Jerome Guitton  <[email protected]>
981
982         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
983
984 2018-09-08  Joel Brobecker  <[email protected]>
985
986         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
987         by calls to error.
988
989 2018-09-08  Joel Brobecker  <[email protected]>
990
991         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
992         Move update of loop variable "fi".
993
994 2018-09-08  Joel Brobecker  <[email protected]>
995
996         * ada-lang.c (value_assign_to_component): In the case of
997         big-endian targets, extract the bits of the given VAL
998         using an src_offset of zero if container is not a scalar.
999
1000 2018-09-06  Simon Ser  <[email protected]>
1001
1002         PR gdb/23105
1003         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1004         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1005         * fbsd-tdep.c (fbsd_make_note_desc): New.
1006         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1007         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1008         * target.h (enum target_object) Add FreeBSD-specific
1009         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1010
1011 2018-09-06  Simon Marchi  <[email protected]>
1012
1013         * compile/compile-c.h (generate_c_for_variable_locations):
1014         Change reference to pointer.
1015         * compile/compile-c-support.c (compile_program) <compute>:
1016         Likewise.
1017         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1018         (generate_c_for_for_one_variable): Likewise
1019         (generate_c_for_variable_locations): Likewise
1020         * compile/compile-c-types.c (compile_c_instance::convert_type):
1021         Likewise
1022         * compile/compile-cplus-symbols.c (convert_one_symbol):
1023         std::move the scope passed to enter_scope.
1024         * compile/compile-cplus-types.c
1025         (compile_cplus_instance::enter_scope): Make parameter
1026         rvalue-reference.
1027         (compile_cplus_instance::new_scope): Change reference to
1028         pointer.
1029         (compile_cplus_instance::convert_type): Likewise
1030         (compile_cplus_convert_typedef): std::move the scope passed to
1031         enter_scope.
1032         (compile_cplus_convert_struct_or_union): Likewise.
1033         (compile_cplus_convert_enum): Likewise.
1034         (compile_cplus_convert_namespace): Likewise.
1035         * compile/compile-cplus.h (compile_cplus_instance)
1036         <enter_scope>: Make parameter rvalue-reference.
1037         * compile/compile-internal.h (compile_instance)
1038         <get_cached_type>: Likewise
1039         * compile/compile-loc2c.c (push): Likewise
1040         (pushf): Likewise
1041         (unary): Likewise
1042         (binary): Likewise
1043         (print_label): Likewise
1044         (pushf_register_address): Likewise
1045         (pushf_register): Likewise
1046         (do_compile_dwarf_expr_to_c): Likewise
1047         (compile_dwarf_expr_to_c): Likewise
1048         (compile_dwarf_bounds_to_c): Likewise
1049         * compile/compile.c (compile_instance::get_cached_type):
1050         Likewise
1051         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1052         (compile_dwarf_bounds_to_c): Likewise
1053         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1054         (dwarf2_compile_property_to_c): Likewise
1055         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1056         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1057         Likewise
1058
1059 2018-09-06  Simon Marchi  <[email protected]>
1060
1061         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1062         * tui/tui-data.c (init_content_element): Don't initialize it.
1063
1064 2018-09-06  Simon Marchi  <[email protected]>
1065
1066         * tui/tui-data.h (struct tui_win_info)
1067         <detail::opaque>: Remove.
1068         * tui/tui-data.c (init_win_info): Remove assignment.
1069
1070 2018-09-05  Tom Tromey  <[email protected]>
1071
1072         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1073         -Wformat-nonliteral.
1074         * target-float.c (host_float_ops<T>::to_string)
1075         (host_float_ops<T>::from_string): Use
1076         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1077         * configure: Rebuild.
1078
1079 2018-09-05  Simon Marchi  <[email protected]>
1080
1081         * printcmd.c (printf_c_string): Use
1082         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1083         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1084
1085 2018-09-05  Tom Tromey  <[email protected]>
1086
1087         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1088
1089 2018-09-05  Tom de Vries  <[email protected]>
1090
1091         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1092         with resolve_abstract_p == true.
1093         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1094         defaulting to false. Propagate resolve_abstract_p to
1095         dwarf2_fetch_die_loc_sect_off.
1096         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1097         parameter, defaulting to false.
1098         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1099         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1100         parameter.
1101         * dwarf2read.h (struct die_info): Forward-declare.
1102         (die_info_ptr): New typedef.
1103         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1104
1105 2018-09-05  Joel Brobecker  <[email protected]>
1106
1107         GDB 8.2 released.
1108
1109 2018-09-04  Sergio Durigan Junior  <[email protected]>
1110             Pedro Alves  <[email protected]>
1111
1112         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1113         "aclocal-m4-deps.mk".  Include file here.
1114         $(srcdir)/aclocal.m4: Add "configure.ac".
1115         * gnulib/aclocal-m4-deps.mk: New file.
1116         * gnulib/update-gnulib.sh: Automatically update
1117         "aclocal-m4-deps.mk".
1118
1119 2018-09-04  Tom Tromey  <[email protected]>
1120
1121         * configure: Rebuild.
1122         * configure.ac: Remove multi-ice code.
1123
1124 2018-09-04  Tom Tromey  <[email protected]>
1125
1126         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1127         (ada-exp.o): Update.
1128
1129 2018-09-04  Tom Tromey  <[email protected]>
1130
1131         * Makefile.in (printcmd.o, target-float.o): Remove.
1132         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1133
1134 2018-09-04  Tom Tromey  <[email protected]>
1135
1136         * gnulib/Makefile.in: Remove obsolete comment.
1137         * Makefile.in: Remove obsolete comment.
1138
1139 2018-09-04  Andrew Burgess  <[email protected]>
1140
1141         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1142         line with '+'.
1143
1144 2018-09-03  Andrew Burgess  <[email protected]>
1145
1146         * riscv-tdep.c: Add 'prologue-value.h' include.
1147         (struct riscv_unwind_cache): New struct.
1148         (riscv_debug_unwinder): New global.
1149         (riscv_scan_prologue): Update arguments, capture register details
1150         from prologue scan.
1151         (riscv_skip_prologue): Reformat arguments line, move end of
1152         prologue calculation into riscv_scan_prologue.
1153         (riscv_frame_cache): Update return type, create
1154         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1155         details.
1156         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1157         (riscv_frame_prev_register): Use the trad_frame within the
1158         riscv_unwind_cache.
1159         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1160         flag.
1161
1162 2018-09-03  Andrew Burgess  <[email protected]>
1163
1164         * trad-frame.h (trad_frame_set_realreg): Declare.
1165         (trad_frame_set_addr): Declare.
1166         * trad-frame.c (trad_frame_set_realreg): Define new function.
1167         (trad_frame_set_addr): Define new function.
1168         (trad_frame_set_reg_realreg): Use new function.
1169         (trad_frame_set_reg_addr): Use new function.
1170
1171 2018-09-01  Keith Seitz  <[email protected]>
1172
1173         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1174         pulongest instead of "%lld".
1175         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1176         ATTRIBUTE_UNUSED.
1177
1178 2018-08-31  Tom Tromey  <[email protected]>
1179
1180         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1181         variant part type.
1182
1183 2018-08-31  Pedro Alves  <[email protected]>
1184
1185         * gdbarch.h: Regenerate.
1186
1187 2018-08-31  Pedro Alves  <[email protected]>
1188
1189         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1190         * target.h (Hardware watchpoint interfaces): Describe
1191         continuable/steppable/non-steppable watchpoints.
1192         * gdbarch.h, gdbarch.c: Regenerate.
1193
1194 2018-08-31  Pedro Alves  <[email protected]>
1195
1196         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1197         Delete.
1198         * s390-linux-nat.c
1199         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1200         * target.h (target_ops::have_continuable_watchpoint): Delete.
1201         (target_have_continuable_watchpoint): Delete.
1202         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1203         * target-delegates.c: Regenerate.
1204
1205 2018-08-31  Sergio Durigan Junior  <[email protected]>
1206
1207         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1208         the files present in "gnulib/import/m4/".
1209
1210 2018-08-30  Andrew Burgess  <[email protected]>
1211
1212         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1213         c.sw, c.swsp, and c.sdsp.
1214
1215 2018-08-30  Andrew Burgess  <[email protected]>
1216
1217         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1218         (riscv_read_misa_reg): Don't cache value read into inferior data.
1219         (riscv_new_inferior_data): Delete.
1220         (riscv_inferior_data_cleanup): Delete.
1221         (riscv_inferior_data): Delete.
1222         (riscv_invalidate_inferior_data): Delete.
1223         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1224
1225 2018-08-30  Simon Marchi  <[email protected]>
1226
1227         * compile/compile-cplus-types.c
1228         (compile_cplus_instance::leave_scope): Take the address of scope
1229         object.
1230         (compile_cplus_instance::convert_qualified_base): Compare quals
1231         to 0.
1232
1233 2018-08-30  Keith Seitz  <[email protected]>
1234
1235         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1236         Use "%s" and host_address_to_string instead of "%p" in printf.
1237
1238 2018-08-29  Keith Seitz  <[email protected]>
1239
1240         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1241         and compile-cplus-types.c.
1242         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1243         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1244         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1245         Declare.
1246         * compile/compile-c-support.c: Include compile-cplus.h.
1247         (load_libcompile): Templatize.
1248         (get_compile_context): "New" function.
1249         (c_get_compile_context): Use get_compile_context.
1250         (cplus_get_compile_context): New function.
1251         (cplus_push_user_expression, cplus_pop_user_expression)
1252         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1253         (cplus_compute_program): Define new structs/functions.
1254         * compile/compile-cplus-symmbols.c: New file.
1255         * compile/compile-cplus-types.c: New file.
1256         * compile/compile-cplus.h: New file.
1257         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1258         Declare.
1259         * compile/compile-object-load.c (get_out_value_type): Use
1260         strncmp_iw when comparing symbol names.
1261         (compile_object_load): Add mst_bss and mst_data.
1262         * compile/compile.c (_initialize_compile): Remove
1263         -Wno-implicit-function-declaration from `compile_args'.
1264         * compile/gcc-cp-plugin.h: New file.
1265         * NEWS: Mention C++ compile support and new debug options.
1266
1267 2018-08-29  Keith Seitz  <[email protected]>
1268
1269         * linespec.c (collect_info::add_symbol): Make virtual.
1270         (struct symbol_searcher_collect_info): New struct.
1271         (symbol_searcher::find_all_symbols): New method.
1272         * symtab.h (class symbol_searcher): New class.
1273
1274 2018-08-29  Keith Seitz  <[email protected]>
1275
1276         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1277         Change to vector of block_symbol.  Update all users.
1278         (struct collect_info) <symbols>: Likewise.
1279         (collect_info::add_symbol): Take block_symbol as argument.
1280         Update all callers.
1281         (decode_compound_collector) <m_symbols>: Change type to vector
1282         of block_symbol.  Update all users.
1283         (decode_compound_collector::operator ()): Change parameter type
1284         to block_symbol.
1285         (find_method, find_function_symbols, find_linespec_symbols)
1286         (find_label_symbols_in_block, find_label_symbols): Change symbol
1287         vectors to block_symbol vectors.
1288         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1289         block_symbol.
1290
1291 2018-08-29  Keith Seitz  <[email protected]>
1292
1293         * linespec.c (symbolp): Remove typedef and VEC definitions.
1294         (bound_minimal_symbol_d): Likewise.
1295
1296 2018-08-29  Keith Seitz  <[email protected]>
1297
1298         * linespec.c (decode_compound_collector::decode_compound_collector):
1299         Remove initialization for `m_symtabs'.
1300         (decode_compound_collector::release_symbols): Change return type
1301         to std::vector.  Update all callers.
1302         (class decode_compound_collector) <m_symbols>: Change type to
1303         std::vector.
1304         (lookup_prefix_sym): Change return type to std::vector.  Update all
1305         callers.
1306         (compare_symbols): Remove.
1307         (std_compare_symbols): Rename to `compare_symbols'.
1308         (find_method): Change `sym_classes' parameter to std::vector.
1309         Update all callers.  Use std::sort to sort sym_classes.
1310         (find_linespec_symbols): Remove cleanup.
1311
1312 2018-08-29  Keith Seitz  <[email protected]>
1313
1314         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1315         std::vector.  Update all users.
1316         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1317         (struct collect_info) <minimal_symbols>: Likewise.
1318         (compare_msymbols): Return bool.  Change parameters to const
1319         bound_minimal_symbol references.
1320         (find_method, find_function_symbols, find_linespec_symbols): Change
1321         `minsyms' parameter to std::vector.  Update all callers.
1322
1323 2018-08-29  Keith Seitz  <[email protected]>
1324
1325         * linespec.c (struct linespec) <label_symbols>: Change type to
1326         std::vector.  Update all users.
1327         (find_label_symbols_in_block): Change `result' parameter to
1328         std::vector.  Update all callers.
1329         (find_label_symbols): Return std::vector.  Update all callers.
1330
1331 2018-08-29  Keith Seitz  <[email protected]>
1332
1333         * linespec.c (struct linespec) <function_symbols>: Change type to
1334         std::vector.  Update all users.
1335         (struct collect_info) <function_symbols>: Likewise.
1336         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1337         (std_compare_symbols): New function.
1338         (find_method, find_function_symbols, find_linespec_symbols)
1339         (find_label_symbols_in_block): Change `symbols' parameter to
1340         std::vector.  Update all callers.
1341         (find_label_symbols): Likewise for `function_symbols' and
1342         `label_funcs_ret'.
1343
1344 2018-08-29  Keith Seitz  <[email protected]>
1345
1346         * linespec.c (symtab_vector_up): Define.
1347         (struct linespec) <file_symtabs>: Change type to std::vector *.
1348         Update all uses.
1349         (struct collect_info) <file_symtabs>: Likewise.
1350         (collect_symtabs_from_filename): Return symtab_vector_up.
1351         Update all callers.
1352         (decode_objc): Remove cleanup.
1353         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1354         (symtab_collector::release_symtabs): Return symtab_vector_up.
1355         Update all callers.
1356         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1357         Update all users.
1358         (collect_symtabs_from_filename, symtabs_from_filename): Return
1359         symtab_vector_up.  Update all callers.
1360
1361 2018-08-29  Tom Tromey  <[email protected]>
1362
1363         * csky-tdep.c (csky_analyze_prologue): Use
1364         core_addr_to_string_nz.
1365
1366 2018-08-29  Tom Tromey  <[email protected]>
1367
1368         * windows-nat.c (struct xlate_exception) <them>: Change type to
1369         DWORD.
1370         (xlate): Fix formatting.  Remove last entry.
1371         (struct xlate_exception, xlate): Comment out.
1372         (windows_nat_target::resume): Use ranged for.
1373
1374 2018-08-29  Jim Wilson  <[email protected]>
1375
1376         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1377         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1378         of NT_PRFPREG.
1379         (riscv_linux_nat_target::store_registers): Likewise.
1380
1381 2018-08-29  Sergio Durigan Junior  <[email protected]>
1382
1383         PR gdb/23555
1384         PR gdb/23558
1385         * gnulib/aclocal.m4: Regenerate.
1386         * gnulib/config.in: Regenerate.
1387         * gnulib/configure: Regenerate.
1388         * gnulib/import/Makefile.am: Update.
1389         * gnulib/import/Makefile.in: Update.
1390         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1391         * gnulib/import/_Noreturn.h: ... this.
1392         * gnulib/import/alloca.in.h: Update.
1393         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1394         * gnulib/import/arg-nonnull.h: ... this.
1395         * gnulib/import/assure.h: Update.
1396         * gnulib/import/at-func.c: Update.
1397         * gnulib/import/basename-lgpl.c: Update.
1398         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1399         * gnulib/import/c++defs.h: ... this.
1400         * gnulib/import/canonicalize-lgpl.c: Update.
1401         * gnulib/import/cdefs.h: Update.
1402         * gnulib/import/chdir-long.c: Update.
1403         * gnulib/import/chdir-long.h: Update.
1404         * gnulib/import/cloexec.c: Update.
1405         * gnulib/import/cloexec.h: Update.
1406         * gnulib/import/close.c: Update.
1407         * gnulib/import/closedir.c: Update.
1408         * gnulib/import/config.charset: Update.
1409         * gnulib/import/dirent-private.h: Update.
1410         * gnulib/import/dirent.in.h: Update.
1411         * gnulib/import/dirfd.c: Update.
1412         * gnulib/import/dirname-lgpl.c: Update.
1413         * gnulib/import/dirname.h: Update.
1414         * gnulib/import/dosname.h: Update.
1415         * gnulib/import/dup-safer-flag.c: Update.
1416         * gnulib/import/dup-safer.c: Update.
1417         * gnulib/import/dup.c: Update.
1418         * gnulib/import/dup2.c: Update.
1419         * gnulib/import/errno.in.h: Update.
1420         * gnulib/import/error.c: Update.
1421         * gnulib/import/error.h: Update.
1422         * gnulib/import/exitfail.c: Update.
1423         * gnulib/import/exitfail.h: Update.
1424         * gnulib/import/extra/update-copyright: Update.
1425         * gnulib/import/fchdir.c: Update.
1426         * gnulib/import/fcntl.c: Update.
1427         * gnulib/import/fcntl.in.h: Update.
1428         * gnulib/import/fd-hook.c: Update.
1429         * gnulib/import/fd-hook.h: Update.
1430         * gnulib/import/fd-safer-flag.c: Update.
1431         * gnulib/import/fd-safer.c: Update.
1432         * gnulib/import/fdopendir.c: Update.
1433         * gnulib/import/filename.h: Update.
1434         * gnulib/import/filenamecat-lgpl.c: Update.
1435         * gnulib/import/filenamecat.h: Update.
1436         * gnulib/import/flexmember.h: Update.
1437         * gnulib/import/float+.h: Update.
1438         * gnulib/import/float.c: Update.
1439         * gnulib/import/float.in.h: Update.
1440         * gnulib/import/fnmatch.c: Update.
1441         * gnulib/import/fnmatch.in.h: Update.
1442         * gnulib/import/fnmatch_loop.c: Update.
1443         * gnulib/import/fpucw.h: Update.
1444         * gnulib/import/frexp.c: Update.
1445         * gnulib/import/frexpl.c: Update.
1446         * gnulib/import/fstat.c: Update.
1447         * gnulib/import/fstatat.c: Update.
1448         * gnulib/import/getcwd-lgpl.c: Update.
1449         * gnulib/import/getcwd.c: Update.
1450         * gnulib/import/getdtablesize.c: Update.
1451         * gnulib/import/getlogin_r.c: Update.
1452         * gnulib/import/getprogname.c: Update.
1453         * gnulib/import/getprogname.h: Update.
1454         * gnulib/import/gettext.h: Update.
1455         * gnulib/import/gettimeofday.c: Update.
1456         * gnulib/import/glob-libc.h: Update.
1457         * gnulib/import/glob.c: Update.
1458         * gnulib/import/glob.in.h: Update.
1459         * gnulib/import/glob_internal.h: Update.
1460         * gnulib/import/glob_pattern_p.c: Update.
1461         * gnulib/import/globfree.c: Update.
1462         * gnulib/import/hard-locale.c: Update.
1463         * gnulib/import/hard-locale.h: Update.
1464         * gnulib/import/intprops.h: Update.
1465         * gnulib/import/inttypes.in.h: Update.
1466         * gnulib/import/isnan.c: Update.
1467         * gnulib/import/isnand-nolibm.h: Update.
1468         * gnulib/import/isnand.c: Update.
1469         * gnulib/import/isnanl-nolibm.h: Update.
1470         * gnulib/import/isnanl.c: Update.
1471         * gnulib/import/itold.c: Update.
1472         * gnulib/import/libc-config.h: Update.
1473         * gnulib/import/limits.in.h: Update.
1474         * gnulib/import/localcharset.c: Update.
1475         * gnulib/import/localcharset.h: Update.
1476         * gnulib/import/localtime-buffer.c: Update.
1477         * gnulib/import/localtime-buffer.h: Update.
1478         * gnulib/import/lstat.c: Update.
1479         * gnulib/import/m4/00gnulib.m4: Update.
1480         * gnulib/import/m4/__inline.m4: Update.
1481         * gnulib/import/m4/absolute-header.m4: Update.
1482         * gnulib/import/m4/alloca.m4: Update.
1483         * gnulib/import/m4/builtin-expect.m4: Update.
1484         * gnulib/import/m4/canonicalize.m4: Update.
1485         * gnulib/import/m4/chdir-long.m4: Update.
1486         * gnulib/import/m4/close.m4: Update.
1487         * gnulib/import/m4/closedir.m4: Update.
1488         * gnulib/import/m4/configmake.m4: Update.
1489         * gnulib/import/m4/d-ino.m4: Update.
1490         * gnulib/import/m4/d-type.m4: Update.
1491         * gnulib/import/m4/dirent_h.m4: Update.
1492         * gnulib/import/m4/dirfd.m4: Update.
1493         * gnulib/import/m4/dirname.m4: Update.
1494         * gnulib/import/m4/double-slash-root.m4: Update.
1495         * gnulib/import/m4/dup.m4: Update.
1496         * gnulib/import/m4/dup2.m4: Update.
1497         * gnulib/import/m4/eealloc.m4: Update.
1498         * gnulib/import/m4/environ.m4: Update.
1499         * gnulib/import/m4/errno_h.m4: Update.
1500         * gnulib/import/m4/error.m4: Update.
1501         * gnulib/import/m4/exponentd.m4: Update.
1502         * gnulib/import/m4/exponentl.m4: Update.
1503         * gnulib/import/m4/extensions.m4: Update.
1504         * gnulib/import/m4/extern-inline.m4: Update.
1505         * gnulib/import/m4/fchdir.m4: Update.
1506         * gnulib/import/m4/fcntl-o.m4: Update.
1507         * gnulib/import/m4/fcntl.m4: Update.
1508         * gnulib/import/m4/fcntl_h.m4: Update.
1509         * gnulib/import/m4/fdopendir.m4: Update.
1510         * gnulib/import/m4/filenamecat.m4: Update.
1511         * gnulib/import/m4/flexmember.m4: Update.
1512         * gnulib/import/m4/float_h.m4: Update.
1513         * gnulib/import/m4/fnmatch.m4: Update.
1514         * gnulib/import/m4/fnmatch_h.m4: Update.
1515         * gnulib/import/m4/fpieee.m4: Update.
1516         * gnulib/import/m4/frexp.m4: Update.
1517         * gnulib/import/m4/frexpl.m4: Update.
1518         * gnulib/import/m4/fstat.m4: Update.
1519         * gnulib/import/m4/fstatat.m4: Update.
1520         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1521         * gnulib/import/m4/getcwd-path-max.m4: Update.
1522         * gnulib/import/m4/getcwd.m4: Update.
1523         * gnulib/import/m4/getdtablesize.m4: Update.
1524         * gnulib/import/m4/getlogin.m4: Update.
1525         * gnulib/import/m4/getlogin_r.m4: Update.
1526         * gnulib/import/m4/getpagesize.m4: Update.
1527         * gnulib/import/m4/getprogname.m4: Update.
1528         * gnulib/import/m4/gettimeofday.m4: Update.
1529         * gnulib/import/m4/glibc21.m4: Update.
1530         * gnulib/import/m4/glob.m4: Update.
1531         * gnulib/import/m4/glob_h.m4: Update.
1532         * gnulib/import/m4/gnulib-cache.m4: Update.
1533         * gnulib/import/m4/gnulib-common.m4: Update.
1534         * gnulib/import/m4/gnulib-comp.m4: Update.
1535         * gnulib/import/m4/gnulib-tool.m4: Update.
1536         * gnulib/import/m4/hard-locale.m4: Update.
1537         * gnulib/import/m4/include_next.m4: Update.
1538         * gnulib/import/m4/inttypes-pri.m4: Update.
1539         * gnulib/import/m4/inttypes.m4: Update.
1540         * gnulib/import/m4/isnand.m4: Update.
1541         * gnulib/import/m4/isnanl.m4: Update.
1542         * gnulib/import/m4/largefile.m4: Update.
1543         * gnulib/import/m4/limits-h.m4: Update.
1544         * gnulib/import/m4/localcharset.m4: Update.
1545         * gnulib/import/m4/locale-fr.m4: Update.
1546         * gnulib/import/m4/locale-ja.m4: Update.
1547         * gnulib/import/m4/locale-zh.m4: Update.
1548         * gnulib/import/m4/localtime-buffer.m4: Update.
1549         * gnulib/import/m4/longlong.m4: Update.
1550         * gnulib/import/m4/lstat.m4: Update.
1551         * gnulib/import/m4/malloc.m4: Update.
1552         * gnulib/import/m4/malloca.m4: Update.
1553         * gnulib/import/m4/math_h.m4: Update.
1554         * gnulib/import/m4/mbrtowc.m4: Update.
1555         * gnulib/import/m4/mbsinit.m4: Update.
1556         * gnulib/import/m4/mbsrtowcs.m4: Update.
1557         * gnulib/import/m4/mbstate_t.m4: Update.
1558         * gnulib/import/m4/memchr.m4: Update.
1559         * gnulib/import/m4/memmem.m4: Update.
1560         * gnulib/import/m4/mempcpy.m4: Update.
1561         * gnulib/import/m4/memrchr.m4: Update.
1562         * gnulib/import/m4/mkdir.m4: Update.
1563         * gnulib/import/m4/mkstemp.m4: Update.
1564         * gnulib/import/m4/mmap-anon.m4: Update.
1565         * gnulib/import/m4/mode_t.m4: Update.
1566         * gnulib/import/m4/msvc-inval.m4: Update.
1567         * gnulib/import/m4/msvc-nothrow.m4: Update.
1568         * gnulib/import/m4/multiarch.m4: Update.
1569         * gnulib/import/m4/nocrash.m4: Update.
1570         * gnulib/import/m4/off_t.m4: Update.
1571         * gnulib/import/m4/onceonly.m4: Update.
1572         * gnulib/import/m4/open-cloexec.m4: Update.
1573         * gnulib/import/m4/open.m4: Update.
1574         * gnulib/import/m4/openat.m4: Update.
1575         * gnulib/import/m4/opendir.m4: Update.
1576         * gnulib/import/m4/pathmax.m4: Update.
1577         * gnulib/import/m4/rawmemchr.m4: Update.
1578         * gnulib/import/m4/readdir.m4: Update.
1579         * gnulib/import/m4/readlink.m4: Update.
1580         * gnulib/import/m4/realloc.m4: Update.
1581         * gnulib/import/m4/rename.m4: Update.
1582         * gnulib/import/m4/rewinddir.m4: Update.
1583         * gnulib/import/m4/rmdir.m4: Update.
1584         * gnulib/import/m4/save-cwd.m4: Update.
1585         * gnulib/import/m4/secure_getenv.m4: Update.
1586         * gnulib/import/m4/setenv.m4: Update.
1587         * gnulib/import/m4/signal_h.m4: Update.
1588         * gnulib/import/m4/ssize_t.m4: Update.
1589         * gnulib/import/m4/stat-time.m4: Update.
1590         * gnulib/import/m4/stat.m4: Update.
1591         * gnulib/import/m4/std-gnu11.m4: Update.
1592         * gnulib/import/m4/stdbool.m4: Update.
1593         * gnulib/import/m4/stddef_h.m4: Update.
1594         * gnulib/import/m4/stdint.m4: Update.
1595         * gnulib/import/m4/stdio_h.m4: Update.
1596         * gnulib/import/m4/stdlib_h.m4: Update.
1597         * gnulib/import/m4/strchrnul.m4: Update.
1598         * gnulib/import/m4/strdup.m4: Update.
1599         * gnulib/import/m4/strerror.m4: Update.
1600         * gnulib/import/m4/string_h.m4: Update.
1601         * gnulib/import/m4/strstr.m4: Update.
1602         * gnulib/import/m4/strtok_r.m4: Update.
1603         * gnulib/import/m4/sys_socket_h.m4: Update.
1604         * gnulib/import/m4/sys_stat_h.m4: Update.
1605         * gnulib/import/m4/sys_time_h.m4: Update.
1606         * gnulib/import/m4/sys_types_h.m4: Update.
1607         * gnulib/import/m4/tempname.m4: Update.
1608         * gnulib/import/m4/time_h.m4: Update.
1609         * gnulib/import/m4/unistd-safer.m4: Update.
1610         * gnulib/import/m4/unistd_h.m4: Update.
1611         * gnulib/import/m4/warn-on-use.m4: Update.
1612         * gnulib/import/m4/wchar_h.m4: Update.
1613         * gnulib/import/m4/wchar_t.m4: Update.
1614         * gnulib/import/m4/wctype_h.m4: Update.
1615         * gnulib/import/m4/wint_t.m4: Update.
1616         * gnulib/import/malloc.c: Update.
1617         * gnulib/import/malloc/scratch_buffer.h: Update.
1618         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1619         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1620         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1621         * gnulib/import/malloca.c: Update.
1622         * gnulib/import/malloca.h: Update.
1623         * gnulib/import/malloca.valgrind: Update.
1624         * gnulib/import/math.in.h: Update.
1625         * gnulib/import/mbrtowc.c: Update.
1626         * gnulib/import/mbsinit.c: Update.
1627         * gnulib/import/mbsrtowcs-impl.h: Update.
1628         * gnulib/import/mbsrtowcs-state.c: Update.
1629         * gnulib/import/mbsrtowcs.c: Update.
1630         * gnulib/import/memchr.c: Update.
1631         * gnulib/import/memmem.c: Update.
1632         * gnulib/import/mempcpy.c: Update.
1633         * gnulib/import/memrchr.c: Update.
1634         * gnulib/import/mkdir.c: Update.
1635         * gnulib/import/mkstemp.c: Update.
1636         * gnulib/import/msvc-inval.c: Update.
1637         * gnulib/import/msvc-inval.h: Update.
1638         * gnulib/import/msvc-nothrow.c: Update.
1639         * gnulib/import/msvc-nothrow.h: Update.
1640         * gnulib/import/open.c: Update.
1641         * gnulib/import/openat-die.c: Update.
1642         * gnulib/import/openat-priv.h: Update.
1643         * gnulib/import/openat-proc.c: Update.
1644         * gnulib/import/openat.c: Update.
1645         * gnulib/import/openat.h: Update.
1646         * gnulib/import/opendir.c: Update.
1647         * gnulib/import/pathmax.h: Update.
1648         * gnulib/import/pipe-safer.c: Update.
1649         * gnulib/import/rawmemchr.c: Update.
1650         * gnulib/import/readdir.c: Update.
1651         * gnulib/import/readlink.c: Update.
1652         * gnulib/import/realloc.c: Update.
1653         * gnulib/import/ref-add.sin: Update.
1654         * gnulib/import/ref-del.sin: Update.
1655         * gnulib/import/rename.c: Update.
1656         * gnulib/import/rewinddir.c: Update.
1657         * gnulib/import/rmdir.c: Update.
1658         * gnulib/import/same-inode.h: Update.
1659         * gnulib/import/save-cwd.c: Update.
1660         * gnulib/import/save-cwd.h: Update.
1661         * gnulib/import/scratch_buffer.h: Update.
1662         * gnulib/import/secure_getenv.c: Update.
1663         * gnulib/import/setenv.c: Update.
1664         * gnulib/import/signal.in.h: Update.
1665         * gnulib/import/stat-time.c: Update.
1666         * gnulib/import/stat-time.h: Update.
1667         * gnulib/import/stat-w32.c: Update.
1668         * gnulib/import/stat-w32.h: Update.
1669         * gnulib/import/stat.c: Update.
1670         * gnulib/import/stdbool.in.h: Update.
1671         * gnulib/import/stddef.in.h: Update.
1672         * gnulib/import/stdint.in.h: Update.
1673         * gnulib/import/stdio.in.h: Update.
1674         * gnulib/import/stdlib.in.h: Update.
1675         * gnulib/import/str-two-way.h: Update.
1676         * gnulib/import/strchrnul.c: Update.
1677         * gnulib/import/strdup.c: Update.
1678         * gnulib/import/streq.h: Update.
1679         * gnulib/import/strerror-override.c: Update.
1680         * gnulib/import/strerror-override.h: Update.
1681         * gnulib/import/strerror.c: Update.
1682         * gnulib/import/string.in.h: Update.
1683         * gnulib/import/stripslash.c: Update.
1684         * gnulib/import/strnlen1.c: Update.
1685         * gnulib/import/strnlen1.h: Update.
1686         * gnulib/import/strstr.c: Update.
1687         * gnulib/import/strtok_r.c: Update.
1688         * gnulib/import/sys_stat.in.h: Update.
1689         * gnulib/import/sys_time.in.h: Update.
1690         * gnulib/import/sys_types.in.h: Update.
1691         * gnulib/import/tempname.c: Update.
1692         * gnulib/import/tempname.h: Update.
1693         * gnulib/import/time.in.h: Update.
1694         * gnulib/import/unistd--.h: Update.
1695         * gnulib/import/unistd-safer.h: Update.
1696         * gnulib/import/unistd.in.h: Update.
1697         * gnulib/import/unsetenv.c: Update.
1698         * gnulib/import/verify.h: Update.
1699         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1700         * gnulib/import/wchar.in.h: Update.
1701         * gnulib/import/wctype.in.h: Update.
1702         * gnulib/import/xalloc-oversized.h: Update.
1703         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1704         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1705
1706 2018-08-16  Gary Benson <[email protected]>
1707
1708         PR gdb/13000:
1709         * gdb/main.c (captured_main_1): Exit with nonzero status
1710         in batch mode if the last command to be executed failed.
1711         * NEWS: Mention the above.
1712
1713 2018-08-29  Simon Marchi  <[email protected]>
1714
1715         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1716         end of warning message.
1717
1718 2018-08-29  Alan Hayward  <[email protected]>
1719
1720         PR gdb/22943:
1721         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1722         (aarch64_extract_return_value): Use
1723         aapcs_is_vfp_call_or_return_candidate.
1724         (aarch64_return_in_memory): Likewise.
1725         (aarch64_store_return_value): Likewise.
1726
1727 2018-08-29  Alan Hayward  <[email protected]>
1728
1729         * aarch64-tdep.c
1730         (aapcs_is_vfp_call_or_return_candidate): Make static
1731         (pass_in_v_or_stack): Remove function.
1732         (pass_in_v_vfp_candidate): New function.
1733         (aarch64_push_dummy_call): Check for float register candidates.
1734
1735 2018-08-29  Alan Hayward  <[email protected]>
1736
1737         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1738         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1739         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1740
1741 2018-08-28  Simon Marchi  <[email protected]>
1742
1743         PR build/23399
1744         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1745         (struct ipa_sym_addresses): Rename to...
1746         (struct ipa_sym_addresses_common): ... this.
1747         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1748
1749 2018-08-28  Tom Tromey  <[email protected]>
1750
1751         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1752         (token_fifo): Now a std::vector.
1753         (yylex, c_parse): Update.
1754         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1755         (token_fifo): Now a std::vector.
1756         (yylex, d_parse): Update.
1757         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1758         (token_fifo): Now a std::vector.
1759         (yylex, go_parse): Update.
1760
1761 2018-08-28  Simon Marchi  <[email protected]>
1762
1763         * parser-defs.h (struct type_stack) <elements>: Change type to
1764         std::vector<union type_stack_elt>.
1765         <depth, size>: Remove.
1766         * parse.c (parse_exp_in_context_1): Adjust.
1767         (type_stack_reserve): Remove.
1768         (check_type_stack_depth): Remove.
1769         (insert_into_type_stack): Adjust to std::vector.
1770         (insert_type): Likewise.
1771         (push_type): Likewise.
1772         (push_type_int): Likewise.
1773         (insert_type_address_space): Likewise.
1774         (pop_type): Likewise.
1775         (pop_type_int): Likewise.
1776         (pop_typelist): Likewise.
1777         (pop_type_stack): Likewise.
1778         (append_type_stack): Likewise.
1779         (push_type_stack): Likewise.
1780         (get_type_stack): Likewise.
1781         (type_stack_cleanup): Likewise.
1782         (push_typelist): Likewise.
1783         (follow_types): Likewise.
1784         (_initialize_parse): Likewise.
1785
1786 2018-08-28  Hafiz Abid Qadeer  <[email protected]>
1787
1788         * NEWS: Mention csky target.
1789
1790 2018-08-28  Jiangshuai Li  <[email protected]>
1791             Hafiz Abid Qadeer  <[email protected]>
1792             Don Breazeal  <[email protected]>
1793
1794         * csky-linux-tdep.c: New file.
1795         * csky-tdep.c: Likewise.
1796         * csky-tdep.h: Likewise.
1797         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1798         csky-tdep.o.
1799         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1800         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1801         * configure.tgt: Add csky support.
1802
1803 2018-08-27  Jan Vrany  <[email protected]>
1804
1805         * python/py-framefilter.c (py_print_frame): Print frame architecture
1806         when printing on an MI output.
1807
1808 2018-08-27  Tom Tromey  <[email protected]>
1809
1810         PR build/23087:
1811         * configure: Rebuild.
1812         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1813
1814 2018-08-27  Tom Tromey  <[email protected]>
1815
1816         * aarch64-linux-tdep.c
1817         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1818         casts to int.
1819
1820 2018-08-27  Tom Tromey  <[email protected]>
1821
1822         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1823         unsigned.
1824         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1825         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1826         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1827         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1828         unsigned.
1829
1830 2018-08-27  Tom Tromey  <[email protected]>
1831
1832         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1833         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1834
1835 2018-08-27  Tom Tromey  <[email protected]>
1836
1837         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1838         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1839         ULONGEST_MAX.
1840         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1841         ULONGEST_MAX.
1842         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1843         ULONGEST_MAX.
1844         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1845         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1846         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1847         ULONGEST_MAX.
1848         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1849         (ppc64_linux_sigaction_tramp_frame)
1850         (ppc32_linux_sighandler_tramp_frame)
1851         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1852         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1853         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1854         * mn10300-linux-tdep.c (am33_linux_sigframe)
1855         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1856         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1857         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1858         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1859         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1860         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1861         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1862         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1863         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1864         * microblaze-linux-tdep.c
1865         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1866         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1867         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1868         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1869         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1870         * common/common-types.h (ULONGEST_MAX): New define.
1871         (CORE_ADDR_MAX): Fix formatting.
1872         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1873         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1874         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1875         (arm_linux_rt_sigreturn_tramp_frame)
1876         (arm_eabi_linux_sigreturn_tramp_frame)
1877         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1878         (thumb2_eabi_linux_sigreturn_tramp_frame)
1879         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1880         (arm_linux_restart_syscall_tramp_frame)
1881         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1882         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1883         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1884         ULONGEST_MAX.
1885         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1886
1887 2018-08-27  Tom Tromey  <[email protected]>
1888
1889         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1890         CORE_ADDR_MAX.
1891         * mips-tdep.c (mips_deal_with_atomic_sequence)
1892         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1893         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1894         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1895         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1896         CORE_ADDR_MAX.
1897         * aarch64-tdep.c (aarch64_software_single_step): Use
1898         CORE_ADDR_MAX.
1899
1900 2018-08-27  Tom Tromey  <[email protected]>
1901
1902         * linespec.c (complete_linespec_component): Add cast to "char".
1903         * completer.c (completion_tracker::build_completion_result): Add
1904         cast to "char".
1905
1906 2018-08-26  Simon Marchi  <[email protected]>
1907
1908         * solist.h (struct solist, struct target_so_ops): Fix
1909         indentation.
1910
1911 2018-08-26  Simon Marchi  <[email protected]>
1912
1913         * ada-tasks.c (ada_task_info_s): Remove typedef.
1914         (DEF_VEC_O(ada_task_info_s)): Remove.
1915         (struct ada_tasks_inferior_data): Initialize fields.
1916         <task_list>: Make an std::vector.
1917         (get_ada_tasks_inferior_data): Allocate with new.
1918         (ada_get_task_number): Adjust.
1919         (get_task_number_from_id): Likewise.
1920         (valid_task_id): Likewise.
1921         (ada_get_task_info_from_ptid): Likewise.
1922         (iterate_over_live_ada_tasks): Likewise.
1923         (add_ada_task): Likewise.
1924         (read_known_tasks): Likewise.
1925         (ada_build_task_list): Likewise.
1926         (print_ada_task_info): Likewise.
1927         (info_task): Likewise.
1928         (task_command_1): Likewise.
1929
1930 2018-08-26  Simon Marchi  <[email protected]>
1931
1932         * ada-lang.c (add_angle_brackets): Return std::string.
1933
1934 2018-08-25  Simon Marchi  <[email protected]>
1935
1936         * python/py-threadevent.c (py_get_event_thread): Initialize
1937         pythread.
1938
1939 2018-08-24  Pedro Alves  <[email protected]>
1940
1941         * python/py-bpevent.c (create_breakpoint_event_object): Use
1942         copy-initialization.
1943         * python/py-continueevent.c (emit_continue_event): Use
1944         copy-initialization.
1945         * python/py-exitedevent.c (create_exited_event_object): Return a
1946         gdbpy_ref<>.
1947         (emit_exited_event): Use copy-initialization.
1948         * python/py-inferior.c (python_new_inferior)
1949         (python_inferior_deleted, add_thread_object): Use
1950         copy-initialization.
1951         * python/py-infevents.c (create_inferior_call_event_object)
1952         (create_register_changed_event_object)
1953         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1954         (emit_inferior_call_event, emit_memory_changed_event)
1955         (emit_register_changed_event): Use copy-initialization.
1956         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1957         Return a gdbpy_ref<>.
1958         (emit_new_objfile_event): Use copy-initialization.
1959         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1960         (emit_clear_objfiles_event): Use copy-initialization.
1961         * python/py-signalevent.c (create_signal_event_object): Use
1962         copy-initialization.
1963         * python/py-threadevent.c (create_thread_event_object): Use
1964         copy-initialization.
1965
1966 2018-08-24  Pedro Alves  <[email protected]>
1967             Simon Marchi  <[email protected]>
1968
1969         PR gdb/23379
1970         * python/py-continueevent.c: Include "gdbthread.h".
1971         (create_continue_event_object): Add intro comment.  Add 'ptid'
1972         parameter.  Use it to find thread to pass to
1973         create_thread_event_object.
1974         (emit_continue_event): Pass PTID down to
1975         create_continue_event_object.
1976         * python/py-event.h (py_get_event_thread): Declare.
1977         (create_thread_event_object): Remove default from 'thread'
1978         parameter.
1979         * python/py-stopevent.c (create_stop_event_object): Use
1980         py_get_event_thread.
1981         * python/py-threadevent.c (get_event_thread): Rename to ...
1982         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1983         and use it to find the thread.
1984         (create_thread_event_object): Assert that THREAD isn't null.
1985         Don't find the event thread here.
1986
1987 2018-08-23  Kevin Buettner  <[email protected]>
1988
1989         * block.h (blockrange, blockranges): New struct declarations.
1990         (struct block): Add new field named `ranges'.
1991         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1992         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1993         macros for accessing ranges in struct block.
1994         (make_blockranges): New declaration.
1995         block.c (make_blockranges): New function.
1996         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1997         for block.
1998         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1999         * blockframe.c (cache_pc_function_block): New static global.
2000         (clear_pc_function_cache): Clear cache_pc_function_block.
2001         (find_pc_partial_function): Move comment to symtab.h.  Add
2002         support for non-contiguous blocks.
2003         * cli/cli-cmds.c (block.h): Include.
2004         (print_disassembly): Handle printing of non-contiguous blocks.
2005         (disassemble_current_function): Likewise.
2006         (disassemble_command): Likewise.
2007
2008         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2009         BLOCK_START.
2010         * blockframe.c (get_pc_function_start): Likewise.
2011         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2012         (gcc_symbol_address): Likewise.
2013         * compile/compile-object-run.c (compile_object_run): Likewise.
2014         * compile/compile.c (get_expr_block_and_pc): Likewise.
2015         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2016         (func_addr_to_tail_call_list): Likewise.
2017         * findvar.c (default_read_var_value): Likewise.
2018         * inline-frame.c (inline_frame_this_id): Likewise.
2019         (skip-inline_frames): Likewise.
2020         * infcmd.c (until_next_command): Likewise.
2021         * linespec.c (convert_linespec_to_sals): Likewise.
2022         * parse.c (parse_exp_in_context_1): Likewise.
2023         * printcmd.c (build_address_symbolic): likewise.
2024         (info_address_command): Likewise.
2025         symtab.c (find_function_start_sal): Likewise.
2026         (skip_prologue_sal): Likewise.
2027         (find_function_alias_target): Likewise.
2028         (find_gnu_ifunc): Likewise.
2029         * stack.c (find_frame_funname): Likewise.
2030         * symtab.c (fixup_symbol_section): Likewise.
2031         (find_function_start_sal): Likewise.
2032         (skip_prologue_sal): Likewsie.
2033         (find_function_alias_target): Likewise.
2034         (find_gnu_ifunc): Likewise.
2035         * tracepoint.c (info_scope_command): Likewise.
2036         * value.c (value_fn_field): Likewise.
2037
2038         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2039         in place of find_pc_partial_function.
2040         * blockframe.c (find_function_entry_range_from_pc): New function.
2041         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2042         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2043         for each range in a block.
2044
2045
2046 2018-08-23  Xavier Roirand  <[email protected]>
2047
2048         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2049         incrementation.
2050
2051 2018-08-22  Simon Marchi  <[email protected]>
2052
2053         * solib-svr4.c (read_program_headers_from_bfd): Return
2054         gdb::optional<gdb::byte_vector>.
2055         (svr4_exec_displacement): Adjust.
2056
2057 2018-08-22  Simon Marchi  <[email protected]>
2058
2059         * solib-svr4.c (read_program_header): Return
2060         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2061         (find_program_interpreter): Return
2062         gdb::optional<gdb::byte_vector>.
2063         (scan_dyntag_auxv): Adjust.
2064         (enable_break): Adjust.
2065         (svr4_exec_displacement): Adjust.
2066
2067 2018-08-22  Simon Marchi  <[email protected]>
2068
2069         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2070         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2071
2072 2018-08-22  Simon Marchi  <[email protected]>
2073
2074         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2075         string_vprintf.
2076         * guile/scm-utils.c (gdbscm_printf): Likewise.
2077         * serial.c (serial_printf): Likewise.
2078         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2079
2080 2018-08-22  Jan Vrany  <[email protected]>
2081
2082         * stack.c (print_frame): Print frame architecture when printing on
2083         an MI output.
2084         * NEWS: Mention new "arch" attribute in frame output.
2085
2086 2018-08-21  Alan Hayward  <[email protected]>
2087
2088         * arch/aarch64.h (aarch64_regnum): Update comment.
2089
2090 2018-08-21  Alan Hayward  <[email protected]>
2091
2092         * NEWS: Add SVE to 8.2 section.
2093
2094 2018-08-21  Pedro Alves  <[email protected]>
2095
2096         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2097         out from gdbscm_parse_function_args.
2098         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2099         gdbscm_parse_function_args_1.
2100
2101 2018-08-21  Simon Marchi  <[email protected]>
2102
2103         PR gdb/17816
2104         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2105         operator.
2106
2107 2018-08-19  Simon Marchi  <[email protected]>
2108
2109         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2110
2111 2018-08-19  Michael Spang  <[email protected]>
2112
2113         PR gdb/11786
2114         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2115         for PT_TLS segments.
2116
2117 2018-08-18  Kevin Buettner  <[email protected]>
2118
2119         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2120         dwarf_variable_value.
2121         * dwarf2-frame.c (class dwarf_expr_executor):
2122         Add override for dwarf_variable_value.
2123         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2124         (class symbol_needs_eval_context): Likewise.
2125         (indirect_synthetic_pointer): Add forward declaration.
2126         (sect_variable_value): New function.
2127         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2128         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2129         for DW_OP_GNU_variable_value.
2130
2131 2018-08-16  Tom Tromey  <[email protected]>
2132
2133         * top.c (read_command_file): Update.
2134         (command_line_input): Remove "repeat" argument.
2135         * ada-lang.c (get_selections): Update.
2136         * linespec.c (decode_line_2): Update.
2137         * defs.h (command_line_input): Remove argument.
2138         * cli/cli-script.c (read_next_line): Update.
2139         * python/py-gdb-readline.c: Update.
2140
2141 2018-08-17  Tom Tromey  <[email protected]>
2142
2143         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2144         command_line_input.
2145
2146 2018-08-15  Tom Tromey  <[email protected]>
2147
2148         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2149
2150 2018-08-14  Jan Vrany  <[email protected]>
2151
2152         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2153         If used, use find_pc_partial_function to find address range
2154         to disassemble.
2155         * mi/mi-main.c (mi_cmd_list_features): Report
2156         "data-disassemble-a-option" feature.
2157         * NEWS: Mention new -data-disassemble option -a.
2158
2159 2018-08-13  Tom Tromey  <[email protected]>
2160
2161         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2162
2163 2018-08-13  Alan Hayward  <[email protected]>
2164
2165         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2166         (aarch64_linux_collect_sve_regset): Likewise.
2167         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2168         * regcache.h (regcache_map_entry_size): New function.
2169
2170 2018-08-13  Alan Hayward  <[email protected]>
2171
2172         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2173         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2174         (SVE_HEADER_VL_LENGTH): Likewise.
2175         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2176         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2177         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2178         (SVE_HEADER_SIZE_OFFSET): Likewise.
2179         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2180         (SVE_HEADER_VL_OFFSET): Likewise.
2181         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2182         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2183         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2184         (SVE_HEADER_SIZE): Likewise.
2185         (aarch64_linux_core_read_vq): Add function.
2186         (aarch64_linux_core_read_description): Check for SVE section.
2187
2188 2018-08-13  Alan Hayward  <[email protected]>
2189
2190         * aarch64-fbsd-tdep.c
2191         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2192         collect_size.
2193         * aarch64-linux-tdep.c
2194         (aarch64_linux_iterate_over_regset_sections): Likewise.
2195         * alpha-linux-tdep.c
2196         (alpha_linux_iterate_over_regset_sections):
2197         * alpha-nbsd-tdep.c
2198         (alphanbsd_iterate_over_regset_sections): Likewise.
2199         * amd64-fbsd-tdep.c
2200         (amd64fbsd_iterate_over_regset_sections): Likewise.
2201         * amd64-linux-tdep.c
2202         (amd64_linux_iterate_over_regset_sections): Likewise.
2203         * arm-bsd-tdep.c
2204         (armbsd_iterate_over_regset_sections): Likewise.
2205         * arm-fbsd-tdep.c
2206         (arm_fbsd_iterate_over_regset_sections): Likewise.
2207         * arm-linux-tdep.c
2208         (arm_linux_iterate_over_regset_sections): Likewise.
2209         * corelow.c (get_core_registers_cb): Likewise.
2210         (core_target::fetch_registers): Likewise.
2211         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2212         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2213         * gdbarch.h (void): Regenerate.
2214         * gdbarch.sh: Add supply_size and collect_size.
2215         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2216         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2217         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2218         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2219         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2220         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2221         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2222         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2223         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2224         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2225         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2226         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2227         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2228         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2229         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2230         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2231         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2232         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2233         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2234         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2235         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2236         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2237         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2238         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2239         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2240         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2241         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2242         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2243         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2244         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2245
2246 2018-08-10  Simon Marchi  <[email protected]>
2247
2248         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2249         with string_printf.
2250
2251 2018-08-10  Keith Seitz  <[email protected]>
2252
2253         * compile/compile-c-support.c (add_code_header, add_code_footer):
2254         Move into policy class.
2255         (c_push_user_expression, pop_user_expression_nop)
2256         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2257         (compile_program): New host class.
2258         (c_compile_program): New typedef.
2259         (c_compute_porgram): Use c_compile_program.
2260
2261 2018-08-10  Keith Seitz  <[email protected]>
2262
2263         * compile/compile-internal.h (compile_instance::~compile_instance):
2264         Remove calls to htab_delete.
2265         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2266         * compile.c (compile_instance::compile_instance): Initialize
2267         htab unique pointers.
2268         (compile_instance::get_cached_type, compile_instance::insert_type)
2269         (compile_instance::error_symbol_once): Update for unique_ptr.
2270
2271 2018-08-10  Keith Seitz  <[email protected]>
2272
2273         * compile/compile-c-symbols.c (struct symbol_error)
2274         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2275         (compile_instance::insert_symbol_error)
2276         (compile_instance::error_symbol_once): Move to ...
2277         * compile/compile.c: ... here.
2278
2279 2018-08-10  Keith Seitz  <[email protected]>
2280
2281         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2282         instead of `new_compile_instance'.
2283         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2284         Update description.
2285         If the symbol error map is not initialized, create it.
2286         (generate_c_for_for_one_symbol): Do not check/initialize
2287         the symbol error map.
2288         * compile/compile-c-types.c (compile_c_instance): Make a class.
2289         Update all callers.
2290         (compile_instance::compile_instance): Initialize the type cache.
2291         (get_cached_type): New function.
2292         (insert_type): Update description.
2293         (compile_c_instance::m_default_cflags): Define.
2294         (convert_type): Update description.  Use get_cached_type.
2295         (delete_instance): Moved to destructor.
2296         (new_compile_instance): Moved to constructor.
2297         * compile/compile-c.h (compile_c_instance): Make class inheriting
2298         from compile_instance.
2299         <base>: Remove field.
2300         <type_map, symbol_err_map>: Move to base class.
2301         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2302         * compile/compile-internal.h (compile_instance): Make class.
2303         <type_map_t, symbol_err_map_t>: Define.
2304         <fe>: Rename to `m_gcc_fe'.
2305         <scope, block, gcc_target_options>: Add `m_' prefix.
2306         <m_type_map, m_symbol_err_map>: New fields, moved from
2307         compile_c_instance.
2308         <destroy>: Remove.
2309         (convert_type, new_compile_instance): Remove.
2310         * compile/compile.c (cleanup_compile_instance): Remove.
2311         (compile_to_object): Use unique_ptr to eliminate cleanups.
2312         (compile_instance::set_print_callback, compile_instance::version)
2313         (compile_instance::set_verbose)
2314         (compile_instance::set_driver_filename)
2315         (compile_instance::set_triplet_regexp)
2316         (compile_instance::set_arguments)
2317         (compile_instance::set_source_file)
2318         (compile_instance::compile): Define.
2319
2320 2018-08-10  Keith Seitz  <[email protected]>
2321
2322         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2323         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2324         gcc-c-fe.def to define C plugin.
2325         (delete_instance): Delete `c_plugin'.
2326         (new_compile_instance): Initialize `c_plugin'.
2327         * compile/compile-c.h: Include gcc_c_plugin.h.
2328         (struct compile_c_instance) <c_plugin>: New member.
2329         * gcc-c-plugin.h: New file.
2330         Update all callers with API change.
2331
2332 2018-08-10  Keith Seitz  <[email protected]>
2333
2334         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2335         (HFILES_NO_SRCDIR): ... to here.
2336         Add compile-internal.h and compile-c.h.
2337         * compile/compile-c-support.c: Include compile-c.h.
2338         * compile/compile-c-symbols.c: Include compile-c.h.
2339         (generate_c_for_variable_locations): Update comment.
2340         * compile/compile-c-types.c: Include compile-c.h.
2341         * compile/compile-c.h: New file -- moved C language declarations
2342         from other files here.
2343         * compile/compile-internal.h: Do not include hashtab.h or
2344         common/enum-flags.h.
2345         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2346         (gcc_convert_symbol, gcc_symbol_address)
2347         (generate_c_for_variable_locations, c_get_mode_for_size)
2348         (c_get_range_decl_name): Definitions moved to compile-c.h.
2349         * compile/compile-loc2c.c: Include compile-c.h.
2350
2351 2018-08-10  Keith Seitz  <[email protected]>
2352
2353         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2354         (c_symbol_substitution_name): ... this.
2355         Update all callers.
2356
2357 2018-08-10  Keith Seitz  <[email protected]>
2358
2359         * compile/compile-c-support.c (c_compute_program): Use
2360         unique_xmalloc_ptr to eliminate cleanup.
2361         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2362         Return a unique_xmalloc_ptr and eliminate cleanup.
2363         * compile/compile-internal.h (generate_c_for_variable_locations):
2364         Return unique_xmalloc_ptr and update description.
2365
2366 2018-08-10  Alan Hayward  <[email protected]>
2367
2368         * corelow.c (core_target::get_core_register_section): Rename
2369         min_size to section_min_size.
2370
2371 2018-08-09  Jim Wilson  <[email protected]>
2372
2373         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2374         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2375         * NEWS: Mention new GNU/Linux RISC-V target.
2376         * configure.host: Add riscv*-*-linux*.
2377         * configure.nat: Add riscv*.
2378         * configure.tgt: Add riscv*-*-linux*.
2379         * riscv-linux-nat.c: New file.
2380         * riscv-linux-tdep.c: New file.
2381
2382 2018-08-09  Andrew Burgess  <[email protected]>
2383
2384         * infrun.c (resume): Make static, add forward declaration.
2385         (proceed): Update header comment.
2386         * infrun.h (resume): Delete declaration.
2387
2388 2018-08-09  Tom Tromey  <[email protected]>
2389
2390         * riscv-tdep.h: Minor formatting fixes.
2391
2392 2018-08-09  Simon Marchi  <[email protected]>
2393
2394         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2395         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2396         (test_mkdir_recursive): Likewise.
2397         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2398
2399 2018-08-09  Andrew Burgess  <[email protected]>
2400
2401         * valarith.c (value_subscripted_rvalue): If an array is not in
2402         memory, and we don't know the upper bound, then we can't know that
2403         the requested element exists or not.
2404
2405 2018-08-08  Simon Marchi  <[email protected]>
2406
2407         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2408         (target_options_to_string): Add comment.
2409
2410 2018-08-08  Tom Tromey  <[email protected]>
2411
2412         * unittests/scoped_mmap-selftests.c: Check result of "write".
2413
2414 2018-08-08  Jim Wilson  <[email protected]>
2415
2416         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2417         (decode_register_index_short): New.
2418         (decode_j_type_insn, decode_cj_type_insn): New.
2419         (decode_b_type_insn, decode_cb_type_insn): New.
2420         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2421         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2422         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2423         is_c_sw_insn instead of is_sw_insn.
2424         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2425         (riscv_software_single_step): New.
2426         * riscv-tdep.h (riscv_software_single_step): Declare.
2427
2428         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2429         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2430
2431 2018-08-08  Andrew Burgess  <[email protected]>
2432
2433         PR gdb/18050:
2434         * target.c (dispose_inferior): Don't dispose of inferiors that are
2435         already killed.
2436
2437 2018-08-08  Szabolcs Nagy  <[email protected]>
2438
2439         * remote.c (remote_target::download_tracepoint): Change char* to
2440         const char*.
2441
2442 2018-08-07  Simon Marchi  <[email protected]>
2443
2444         * target.h (target_options_to_string): Return an std::string.
2445         * target.c (str_comma_list_concat_elem): Return void, use
2446         std::string.
2447         (do_option): Likewise.
2448         (target_options_to_string): Return an std::string.
2449         * linux-nat.c (linux_nat_target::wait): Adjust.
2450         * target-debug.h (target_debug_print_options): Adjust.
2451
2452 2018-08-07  Tom Tromey  <[email protected]>
2453
2454         * Makefile.in (CPPFLAGS): New variable.
2455         (INTERNAL_CPPFLAGS): Use it.
2456
2457 2018-08-07  Simon Marchi  <[email protected]>
2458
2459         * NEWS: Mention the index cache.
2460
2461 2018-08-07  Simon Marchi  <[email protected]>
2462
2463         * common/pathstuff.h (get_standard_cache_dir): New.
2464         * common/pathstuff.c (get_standard_cache_dir): New.
2465         * build-id.h (build_id_to_string): New.
2466         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2467         DEBUG_STR_SUFFIX): Move to here.
2468         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2469         DEBUG_STR_SUFFIX): Move from there.
2470         (write_psymtabs_to_index): Make non-static, add basename
2471         parameter.  Write to temporary files, rename when done.
2472         (save_gdb_index_command): Adjust call to
2473         write_psymtabs_to_index.
2474         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2475         field.
2476         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2477         (get_gdb_index_contents_from_cache): New.
2478         (get_gdb_index_contents_from_cache_dwz): New.
2479         (dwarf2_initialize_objfile): Read index from cache.
2480         (dwarf2_build_psymtabs): Save to index.
2481         * dwarf-index-cache.h: New file.
2482         * dwarf-index-cache.c: New file.
2483         * dwarf-index-write.h: New file.
2484
2485 2018-08-07  Simon Marchi  <[email protected]>
2486
2487         * gnulib/aclocal.m4: Re-generate.
2488         * gnulib/config.in: Re-generate.
2489         * gnulib/configure: Re-generate.
2490         * gnulib/import/Makefile.am: Re-generate.
2491         * gnulib/import/Makefile.in: Re-generate.
2492         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2493         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2494         * gnulib/import/m4/mkdir.m4: New file.
2495         * gnulib/import/mkdir.c: New file.
2496         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2497         module.
2498
2499 2018-08-07  Simon Marchi  <[email protected]>
2500
2501         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2502         * common/scoped_mmap.c: New file.
2503         * common/scoped_mmap.h (destroy): New method.
2504         (~scoped_mmap, reset): Use destroy.
2505         (scoped_mmap): New move constructor.
2506         (mmap_file): New declaration.
2507         * unittests/scoped_mmap-selftests.c (test_normal,
2508         test_invalid_filename, run_tests): New functions.
2509         (_initialize_scoped_mmap_selftests): Register selftest.
2510
2511 2018-08-07  Simon Marchi  <[email protected]>
2512
2513         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2514         (read_gdb_index_from_buffer): ... this.  Remove section
2515         parameter, add buffer parameter.
2516         (get_gdb_index_contents_ftype,
2517         get_gdb_index_contents_dwz_ftype): New typedefs.
2518         (dwarf2_read_gdb_index): Add callback parameters to get the
2519         index contents.
2520         (get_gdb_index_contents_from_section): New.
2521         (dwarf2_initialize_objfile): Update call to
2522         dwarf2_read_gdb_index.
2523
2524 2018-08-07  Simon Marchi  <[email protected]>
2525
2526         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2527         (gdb_open_cloexec): Likewise.
2528         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2529         (commandline_from_pid): Likewise.
2530         (linux_xfer_osdata_threads): Likewise.
2531         (linux_xfer_osdata_fds): Likewise.
2532         * ada-lang.c (is_package_name): Likewise.
2533         * auxv.c (procfs_xfer_auxv): Likewise.
2534         * breakpoint.c (print_one_breakpoint_location): Use
2535         uiout::field_fmt.
2536         (print_one_catch_solib): Use string_printf.
2537         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2538         (add_pe_forwarded_sym): Likewise.
2539         * dwarf2read.c (create_type_unit_group): Likewise.
2540         (build_error_marker_type): Likewise.
2541         * infcall.c (get_function_name): Likewise.
2542         * valprint.c (print_converted_chars_to_obstack): Likewise.
2543         * xtensa-tdep.c (xtensa_register_type): Likewise.
2544
2545 2018-08-06  Simon Marchi  <[email protected]>
2546
2547         * remote.c (remote_target::download_tracepoint): Fix format
2548         string errors.
2549
2550 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
2551
2552         * tracefile.c: Include common/byte-vector.h.
2553         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2554         with trace_regblock_size if needed.  Update uses of buf.
2555
2556 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
2557
2558         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2559         std::vector<unsigned char>.
2560         * tracepoint.c (collection_list::collection_list): Remove
2561         m_regs_mask initializer from initializer list.  Resize
2562         m_regs_mask using the largest remote register number.
2563         (collection_list::add_remote_register): Remove size check on
2564         m_regs_mask.  Use at to access element.
2565         (collection_list::stringify): Change type of temp_buf to
2566         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2567         stringify the register mask.  Use pack_hex_byte for the register
2568         mask.
2569
2570 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
2571
2572         * tracepoint.h (class collection_list) <add_register>: Remove.
2573         <add_remote_register, add_ax_registers, add_local_register>:
2574         Declare.
2575         <add_memrange>: Add scope parameter.
2576         * tracepoint.c (encode_actions_1): Likewise.
2577         (collection_list::add_register): Rename to ...
2578         (collection_list::add_remote_register): ... this.  Update
2579         comment.
2580         (collection_list::add_ax_registers, add_local_register): New
2581         methods.
2582         (collection_list::add_memrange): Add scope parameter.  Call
2583         add_local_register instead of add_register.
2584         (finalize_tracepoint_aexpr): New function.
2585         (collection_list::collect_symbol): Update calls to add_memrange.
2586         Call add_local_register instead of add_register.  Call
2587         add_ax_registers.  Call finalize_tracepoint_aexpr.
2588         (encode_actions_1): Get remote regnos for $reg action.  Call
2589         add_remote_register, add_ax_registers, and add_local_register.
2590         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2591         (validate_actionline): Call finalize_tracepoint_aexpr.
2592
2593 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
2594
2595         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2596         Replace array buf with gdb::char_vector buf, of size
2597         get_remote_packet_size ().  Replace references to buf and
2598         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2599         and xsnprintf with snprintf.  Raise errors if the buffer is too
2600         small.
2601
2602 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
2603
2604         * remote.c (remote_target::download_tracepoint): Fix the has_more
2605         predicate in the QTDP action list iteration.
2606
2607 2018-08-06  Pedro Franco de Carvalho  <[email protected]>
2608
2609         * remote.c (remote_target::download_tracepoint): Fix indentation
2610         in for block.
2611
2612 2018-08-06  Rainer Orth  <[email protected]>
2613
2614         * proc-api.c (_initialize_proc_api): Remove c, unused.
2615         * procfs.c (procfs_init_inferior): Remove signals, unused.
2616         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2617         unused.
2618
2619 2018-08-06  Sergey Korolev  <[email protected]>
2620             Andrew Burgess  <[email protected]>
2621
2622         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2623         'W_STOPCODE (0)' as this could be ambiguous.
2624
2625 2018-08-03  Sergio Durigan Junior  <[email protected]>
2626
2627         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2628         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2629         "ai_socktype").
2630
2631 2018-08-02  Tom Tromey  <[email protected]>
2632
2633         PR symtab/16842.
2634         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2635         symbols.
2636         (process_structure_scope): Likewise.
2637
2638 2018-08-02  Xavier Roirand  <[email protected]>
2639
2640         PR gdb/22629:
2641         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2642         kill inferior.
2643
2644 2018-08-02  Tom Tromey  <[email protected]>
2645
2646         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2647         (darwin_suspend_inferior, darwin_resume_inferior)
2648         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2649         (darwin_check_new_threads): Check result of get_darwin_inferior.
2650
2651 2018-07-31  Joel Brobecker  <[email protected]>
2652
2653         GDB 8.1.1 released.
2654
2655 2018-07-31  Jan Vrany  <[email protected]>
2656
2657         * varobj.c (varobj_get_path_expr_parent): Report an error if
2658         parent is a dynamic varobj.
2659
2660 2018-07-31  Simon Marchi  <[email protected]>
2661
2662         * gnulib/aclocal.m4: Re-generate.
2663         * gnulib/config.in: Re-generate.
2664         * gnulib/configure: Re-generate.
2665         * gnulib/import/Makefile.in: Re-generate.
2666         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2667         * gnulib/import/m4/onceonly.m4: Re-generate.
2668
2669 2018-07-31  Simon Marchi  <[email protected]>
2670
2671         * target-descriptions.c (struct xml_test_tdesc): New.
2672         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2673         (record_xml_tdesc): Update.
2674         (maintenance_check_xml_descriptions): Update.
2675         * target-descriptions.h (record_xml_tdesc): Update comment.
2676
2677 2018-07-30  Andrew Burgess  <[email protected]>
2678
2679         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2680         checking array bounds are defined.
2681
2682 2018-07-30  Tom Tromey  <[email protected]>
2683
2684         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2685         irreflexivity violation.
2686
2687 2018-07-30  Tom Tromey  <[email protected]>
2688
2689         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2690         * value.c (unpack_long): Remove lint code.
2691         * valops.c (value_ind): Remove lint code.
2692         * valarith.c (value_x_binop, value_x_unop, value_equal)
2693         (value_pos): Remove lint code.
2694
2695 2018-07-28  Tom de Vries  <[email protected]>
2696
2697         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2698         with undefined upper bound as <optimized out>.
2699
2700 2018-07-27  Sergio Durigan Junior  <[email protected]>
2701
2702         * gcore.in: Rename variable "name" to "prefix".  Expand
2703         "usage" text.
2704
2705 2018-07-14  Jon Turney  <[email protected]>
2706
2707         * windows-nat.c (windows_nat_target::create_inferior): Update to
2708         call close() in global namespace.
2709
2710 2018-07-26  Tom Tromey  <[email protected]>
2711
2712         * dwarf-index-write.c (add_address_entry): Don't add objfile
2713         offsets.
2714         * dbxread.c (find_stab_function): Rename from
2715         find_stab_function_addr.  Return a bound_minimal_symbol.
2716         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2717         Don't add objfile offsets.
2718         (end_psymtab): Use raw_text_low, raw_text_high,
2719         MSYMBOL_VALUE_RAW_ADDRESS.
2720         (read_ofile_symtab): Update.
2721         (process_one_symbol): Update.
2722         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2723         offsets.
2724         (dw2_relocate): Remove.
2725         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2726         searching addrmap.
2727         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2728         Update.
2729         (process_psymtab_comp_unit_reader, add_partial_symbol)
2730         (add_partial_subprogram, dwarf2_ranges_read): Update.
2731         (load_partial_dies): Update.
2732         (add_address_entry): Don't add objfile offsets.
2733         (dwarf2_build_include_psymtabs): Update.
2734         (create_addrmap_from_aranges): Don't add objfile offsets.
2735         (dw2_find_pc_sect_compunit_symtab): Update.
2736         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2737         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2738         Update.
2739         (parse_partial_symbols): Don't add objfile offsets.  Use
2740         raw_text_low, raw_text_high.  Update.
2741         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2742         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2743         or call 'relocate' quick function.  Clear psymbol_map.
2744         * psympriv.h (struct partial_symbol) <address>: Add section
2745         offset.
2746         <set_unrelocated_address>: Rename from set_address.
2747         <raw_text_low, raw_text_high>: New methods.
2748         <text_low, text_high>: Add objfile parameter.
2749         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2750         set_unrelocated_address.
2751         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2752         (find_pc_psymbol): Update.
2753         (fixup_psymbol_section, relocate_psymtabs): Remove.
2754         (dump_psymtab, psym_functions): Update.
2755         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2756         parameter.
2757         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2758         (start_psymtab_common): Update.
2759         * symfile-debug.c (debug_qf_relocate): Remove.
2760         (debug_sym_quick_functions): Update.
2761         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2762         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2763         Update.
2764
2765 2018-07-26  Tom Tromey  <[email protected]>
2766
2767         * dbxread.c (end_psymtab): Use text_high_valid and
2768         text_low_valid.
2769         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2770         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2771         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2772         Update comment.
2773         <text_low_valid, text_high_valid>: New fields.
2774         <set_text_low, set_text_high>: Update.
2775         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2776
2777 2018-07-26  Tom Tromey  <[email protected]>
2778
2779         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2780         Update.
2781         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2782         textlow and texthigh fields.
2783         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2784         Update.
2785         * mdebugread.c (parse_lines, parse_partial_symbols)
2786         (psymtab_to_symtab_1): Update.
2787         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2788         Rename fields.  Update comment.  Now private.
2789         <text_low, text_high, set_text_low, set_text_high>: New methods.
2790         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2791         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2792         (start_psymtab_common, maintenance_info_psymtabs)
2793         (maintenance_check_psymtabs): Update.
2794         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2795         texthigh fields.
2796         (scan_xcoff_symtab): Update.
2797
2798 2018-07-26  Tom Tromey  <[email protected]>
2799
2800         * psympriv.h (struct partial_symbol) <unrelocated_address,
2801         address, set_address>: New methods.
2802         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2803         (fixup_psymbol_section, relocate_psymtabs): Update.
2804         (print_partial_symbols): Add 'objfile' parameter.  Update.
2805         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2806         Update.
2807
2808 2018-07-26  Tom Tromey  <[email protected]>
2809
2810         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2811         (debug_names::write_psymbols): Update.
2812         * psympriv.h (struct partial_symbol): Derive from
2813         general_symbol_info.
2814         <obj_section>: New method.
2815         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2816         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2817         (find_pc_sect_psymbol, fixup_psymbol_section)
2818         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2819         (print_partial_symbols, recursively_search_psymtabs)
2820         (compare_psymbols, psymbol_hash, psymbol_compare)
2821         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2822         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2823
2824 2018-07-26  Tom Tromey  <[email protected]>
2825
2826         * dbxread.c (end_psymtab): Remove dead code.
2827
2828 2018-07-26  Andrew Burgess  <[email protected]>
2829
2830         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2831         DWARF unwinders are disabled.
2832         * dwarf2-frame.c: Add dwarf2read.h include.
2833         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2834         disabled.
2835         (dwarf2_frame_unwinders_enabled_p): Define.
2836         (show_dwarf_unwinders_enabled_p): New function.
2837         (_initialize_dwarf2_frame): Register switch to control DWARF
2838         unwinder use.
2839         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2840         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2841         (show_dwarf_cmdlist): Remove static keyword.
2842         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2843         (show_dwarf_cmdlist): Declare.
2844         * NEWS: Document new feature.
2845
2846 2018-07-26  Tom de Vries  <[email protected]>
2847
2848         PR breakpoints/23366
2849         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2850
2851 2018-07-26  Tom de Vries  <[email protected]>
2852
2853         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2854         DW_AT_count can't be translated to a dynamic prop.
2855
2856 2018-07-25  Tom de Vries  <[email protected]>
2857
2858         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2859         try/catch.
2860
2861 2018-07-25  Jan Vrany  <[email protected]>
2862
2863         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2864
2865 2018-07-25  Joel Brobecker  <[email protected]>
2866
2867         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2868
2869 2018-07-24  Keith Seitz  <[email protected]
2870
2871         PR symtab/23010
2872         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2873         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2874         instead of add_symbol_to_list.
2875         (read_file_scope): Call prepare_one_comp_unit before reading
2876         any other DIEs.
2877
2878 2018-07-24  Simon Marchi  <[email protected]>
2879
2880         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2881
2882 2018-07-24  Tom Tromey  <[email protected]>
2883
2884         * utils.c (malloc, realloc, free): Don't declare.
2885         * configure, config.in: Rebuild.
2886         * configure.ac: Don't check for declarations of free, malloc, or
2887         realloc.
2888
2889 2018-07-22  Simon Marchi  <[email protected]>
2890
2891         * aarch64-linux-nat.c
2892         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2893         variable.
2894         * arm-linux-nat.c (fetch_regs): Likewise.
2895         (store_regs): Likewise.
2896         (fetch_vfp_regs): Likewise.
2897         (store_vfp_regs): Likewise.
2898         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2899         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2900         (arm_linux_nat_target::insert_watchpoint): Likewise.
2901         (arm_linux_nat_target::remove_watchpoint): Likewise.
2902         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2903         Likewise.
2904         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2905         Likewise.
2906         * ppc-linux-nat.c (fetch_register): Likewise.
2907         (fetch_all_gp_regs): Likewise.
2908         (fetch_ppc_registers): Likewise.
2909         (store_all_gp_regs): Likewise.
2910         (store_ppc_registers): Likewise.
2911         (hwdebug_insert_point): Likewise.
2912         (can_use_watchpoint_cond_accel): Likewise.
2913         * remote-sim.c (gdb_os_write_stdout): Likewise.
2914
2915 2018-07-22  Simon Marchi  <[email protected]>
2916             Tom Tromey  <[email protected]>
2917
2918         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2919         test for it.
2920         * configure: Rebuild.
2921
2922 2018-07-22  Tom Tromey  <[email protected]>
2923
2924         * regformats/regdat.sh: Define xmltarget_${name} inside
2925         #ifndef IN_PROCESS_AGENT.
2926
2927 2018-07-22  Tom Tromey  <[email protected]>
2928
2929         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2930
2931 2018-07-22  Tom Tromey  <[email protected]>
2932
2933         * symfile.c (reread_symbols): Notify iter, not objfile.
2934
2935 2018-07-22  Tom Tromey  <[email protected]>
2936
2937         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2938         Use arch_ops.
2939         (ravenscar_thread_target::prepare_to_store): Likewise.
2940
2941 2018-07-22  Tom Tromey  <[email protected]>
2942
2943         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2944         unused variable.  Call value_fetch_lazy when needed.
2945         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2946         Remove unused variable.  Call value_fetch_lazy when needed.
2947
2948 2018-07-22  Tom Tromey  <[email protected]>
2949
2950         * m32c-tdep.c (mark_dma): Return void.
2951         (make_regs): Remove unused declarations.
2952
2953 2018-07-22  Tom Tromey  <[email protected]>
2954
2955         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2956         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2957         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2958         bkscm_get_valid_block_smob_arg_unsafe for effect.
2959
2960 2018-07-22  Tom Tromey  <[email protected]>
2961
2962         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2963         value_type.
2964
2965 2018-07-22  Tom Tromey  <[email protected]>
2966
2967         * windows-nat.c (saved_context): Conditionally define.
2968         * remote.c (remote_target::remote_btrace_maybe_reopen):
2969         Conditionally declare "warned".
2970         * inflow.c (sigquit_ours): Conditionally define.
2971         (new_tty): Move "tty" declaration inside #if.
2972         * guile/guile.c (guile_datadir): Conditionally define.
2973         * charset.c (set_be_le_names): Move some declarations inside #if.
2974         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2975         #if.
2976         (parse_xml_btrace_conf): Likewise.
2977
2978 2018-07-22  Tom Tromey  <[email protected]>
2979
2980         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2981
2982 2018-07-22  Tom Tromey  <[email protected]>
2983
2984         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2985         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2986         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2987         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2988         * stack.c (frame_apply_level_command): Remove unused variable.
2989         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2990         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2991         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2992         unused variable.
2993         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2994         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2995         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2996         variable.
2997         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2998         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2999         variable.
3000         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3001         Remove unused variable.
3002         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3003         variable.
3004         * common/tdesc.c (print_xml_feature::visit): Remove unused
3005         variable.
3006         * compile/compile-object-load.c (store_regs): Remove unused
3007         variables.
3008         * complaints.c (clear_complaints): Remove unused variable.
3009         * corelow.c (core_target_open): Remove unused variable.
3010         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3011         variable.
3012         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3013         variable.
3014         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3015         variable.
3016         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3017         variable.
3018         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3019         variable.
3020         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3021         variable.
3022         * ia64-tdep.c (examine_prologue): Remove unused variable.
3023         * infcall.c (run_inferior_call): Remove unused variable.
3024         * inferior.c (exit_inferior): Remove unused variable.
3025         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3026         * linespec.c (decode_line_2): Remove unused variable.
3027         * linux-nat.c (super_close): Remove.
3028         * linux-tdep.c (linux_info_proc): Remove unused variable.
3029         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3030         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3031         Remove unused variable.
3032         * parse.c (find_minsym_type_and_address): Remove unused variable.
3033         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3034         variable.
3035         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3036         variable.
3037         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3038         variables.
3039         * record-btrace.c (record_btrace_target::store_registers): Remove
3040         unused variable.
3041         (cmd_show_record_btrace_cpu): Remove unused variable.
3042         * riscv-tdep.c (riscv_register_reggroup_p)
3043         (riscv_push_dummy_call, riscv_return_value): Remove unused
3044         variable.
3045         * rust-exp.y (literal): Remove unused variable.
3046         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3047         unused variable.
3048         <STRUCTOP_ANONYMOUS>: Likewise.
3049         * s390-linux-tdep.c (s390_linux_init_abi_31)
3050         (s390_linux_init_abi_64): Remove unused variable.
3051         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3052         (file_select_thread, net_windows_open, _initialize_ser_windows):
3053         Remove unused variables.
3054         * symtab.c (find_pc_sect_line): Remove unused variable.
3055         * target-memory.c (compute_garbled_blocks): Remove unused
3056         variable.
3057         (target_write_memory_blocks): Remove unused variable.
3058         * target.c (target_stack::unpush): Remove unused variables.
3059         * tracepoint.c (start_tracing, all_tracepoint_actions)
3060         (merge_uploaded_trace_state_variables)
3061         (print_one_static_tracepoint_marker): Remove unused variable.
3062         * unittests/basic_string_view/element_access/char/1.cc (test01):
3063         Remove unused variable.
3064         * windows-nat.c (windows_continue, windows_add_all_dlls)
3065         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3066         Remove unused variables.
3067
3068 2018-07-21  Simon Marchi  <[email protected]>
3069
3070         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3071         attr_profile in HAVE_ELF.
3072         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3073         HAVE_ELF.
3074
3075 2018-07-20  Simon Marchi  <[email protected]>
3076
3077         * frame.c (frame_register_unwind): Change parameter name.
3078         (frame_unwind_register): Likewise.
3079         (frame_unwind_register_value): Likewise.
3080         (frame_unwind_register_signed): Likewise.
3081         (frame_unwind_register_unsigned): Likewise.
3082         * frame.h (frame_register_unwind): Likewise.
3083         (frame_unwind_register): Likewise.
3084         (frame_unwind_register_value): Likewise.
3085         (frame_unwind_register_signed): Likewise.
3086         (frame_unwind_register_unsigned): Likewise.
3087         (frame_unwind_arch): Likewise.
3088
3089 2018-07-20  Maciej W. Rozycki  <[email protected]>
3090
3091         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3092         ISA maintenance.
3093
3094 2018-07-20  Maciej W. Rozycki  <[email protected]>
3095
3096         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3097         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3098         hand.
3099
3100 2018-07-20  Keith Seitz  <[email protected]>
3101
3102         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3103         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3104         m_compunit_symtab, m_language>: Add "m_" prefix.
3105         Update all uses.
3106         * buildsym.c: Update all uses.
3107
3108 2018-07-20  Tom Tromey  <[email protected]>
3109
3110         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3111         * buildsym.h (record_line_ftype): Remove typedef.
3112
3113 2018-07-20  Tom Tromey  <[email protected]>
3114
3115         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3116         (end_expandable_symtab): Likewise.
3117         (end_symtab_get_static_block): Likewise.
3118         (end_symtab_from_static_block): Likewise.
3119         * buildsym-legacy.c (augment_type_symtab): Remove.
3120         (end_expandable_symtab): Remove.
3121         (end_symtab_get_static_block): Remove.
3122         (end_symtab_from_static_block): Remove.
3123
3124 2018-07-20  Tom Tromey  <[email protected]>
3125
3126         * dwarf2read.c: Include buildsym.h.
3127         (struct dwarf2_cu) <builder>: New method.
3128         (fixup_go_packaging): Update.
3129         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3130         use scoped_free_pendings.
3131         (using_directives): Add "cu" parameter, remove "language".
3132         (read_import_statement, setup_type_unit_groups, )
3133         (read_func_scope, read_lexical_block_scope)
3134         (dwarf2_record_block_ranges, read_namespace): Update.
3135         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3136         (lnp_state_machine::handle_end_sequence): Update.
3137         (class lnp_state_machine) <m_cu>: New member.
3138         <m_record_line_callback>: Remove.
3139         <m_currently_recording_lines>: New member.
3140         (lnp_state_machine::handle_set_file): Update.
3141         (noop_record_line): Remove.
3142         (dwarf_record_line_p): Add cu parameter.
3143         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3144         (lnp_state_machine::record_line)
3145         (lnp_state_machine::lnp_state_machine)
3146         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3147         (dwarf_decode_lines): Update.
3148         (dwarf2_start_subfile): Add cu parameter.
3149         (dwarf2_start_symtab, new_symbol): Update.
3150         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3151         Remove dwarf2_per_objfile parameter.
3152         (dwarf_decode_macros): Update.
3153
3154 2018-07-20  Tom Tromey  <[email protected]>
3155
3156         * stabsread.c (define_symbol): Update.
3157         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3158         * dwarf2read.c (new_symbol): Update.
3159         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3160         * cp-namespace.c: Include buildsym.h.
3161         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3162         * buildsym-legacy.c (get_buildsym_compunit): New function.
3163
3164 2018-07-20  Tom Tromey  <[email protected]>
3165
3166         * xcoffread.c: Include buildsym-legacy.h.
3167         * windows-nat.c: Include buildsym-legacy.h.
3168         * stabsread.c: Include buildsym-legacy.h.
3169         * mdebugread.c: Include buildsym-legacy.h.
3170         * buildsym-legacy.h: New file.
3171         * buildsym-legacy.c: New file, from buildsym.c.
3172         * go32-nat.c: Include buildsym-legacy.h.
3173         * dwarf2read.c: Include buildsym-legacy.h.
3174         * dbxread.c: Include buildsym-legacy.h.
3175         * cp-namespace.c: Include buildsym-legacy.h.
3176         * coffread.c: Include buildsym-legacy.h.
3177         * buildsym.h: Move some contents to buildsym-legacy.h.
3178         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3179         buildsym-legacy.c.
3180         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3181
3182 2018-07-20  Tom Tromey  <[email protected]>
3183
3184         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3185         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3186         (buildsym_compunit::buildsym_compunit)
3187         (buildsym_compunit::~buildsym_compunit)
3188         (buildsym_compunit::get_macro_table): Define.
3189
3190 2018-07-20  Tom Tromey  <[email protected]>
3191
3192         * buildsym.c (reset_symtab_globals): Remove.
3193         (buildsym_compunit::end_symtab_from_static_block): Update.
3194         (buildsym_compunit::augment_type_symtab): Update.
3195         (end_symtab_from_static_block): Call free_buildsym_compunit.
3196         (augment_type_symtab, end_symtab, end_expandable_symtab):
3197         Likewise.
3198
3199 2018-07-20  Tom Tromey  <[email protected]>
3200
3201         * arch-utils.c: Do not include buildsym.h.
3202         * mipsread.c: Do not include buildsym.h.
3203         * machoread.c: Do not include buildsym.h.
3204         * elfread.c: Do not include buildsym.h.
3205
3206 2018-07-20  Tom Tromey  <[email protected]>
3207
3208         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3209         initialization.
3210         (buildsym_compunit): Add new constructor.
3211         (struct buildsym_compunit) <get_last_source_file, finish_block,
3212         record_block_range, start_subfile, patch_subfile_names,
3213         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3214         set_last_source_start_addr, get_last_source_start_addr,
3215         get_local_using_directives, set_local_using_directives,
3216         get_global_using_directives, outermost_context_p,
3217         get_current_context_stack, get_context_stack_depth,
3218         get_current_subfile, get_local_symbols, get_file_symbols,
3219         get_global_symbols, record_debugformat, record_producer,
3220         push_context, pop_context, end_symtab_get_static_block,
3221         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3222         New public methods.
3223         <record_pending_block, finish_block_internal, make_blockvector,
3224         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3225         private methods.
3226         Update all users.
3227
3228 2018-05-22  Tom Tromey  <[email protected]>
3229
3230         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3231         parameter.
3232         (finish_block_internal): Update.
3233
3234 2018-07-20  Tom Tromey  <[email protected]>
3235
3236         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3237         parameter.
3238         (finish_block_internal): Update.
3239
3240 2018-07-20  Tom Tromey  <[email protected]>
3241
3242         * buildsym.h (EXTERN): Don't define or undef.
3243         * buildsym.c (EXTERN): Don't define.
3244
3245 2018-07-20  Tom Tromey  <[email protected]>
3246
3247         * buildsym.c: Remove TODO comment.
3248
3249 2018-07-20  Tom Tromey  <[email protected]>
3250
3251         * coffread.c (coff_symtab_read): Update.
3252         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3253         (xcoff_new_init): Update.
3254         * mipsread.c (mipscoff_new_init): Update.
3255         * mdebugread.c (mdebug_build_psymtabs): Update.
3256         * elfread.c (elf_new_init): Update.
3257         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3258         Update.
3259         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3260         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3261         (stabsect_build_psymtabs): Update.
3262         * buildsym.h (buildsym_init): Don't declare.
3263         * buildsym.c: Update comment.
3264         (prepare_for_building): Remove.
3265         (start_symtab, restart_symtab): Update.
3266         (reset_symtab_globals): Update comment.
3267         (buildsym_init): Remove.
3268
3269 2018-07-20  Tom Tromey  <[email protected]>
3270
3271         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3272         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3273         (read_enum_type, common_block_start, common_block_end)
3274         (cleanup_undefined_types_1, finish_global_stabs): Update.
3275         * mdebugread.c (psymtab_to_symtab_1): Update.
3276         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3277         (read_lexical_block_scope, new_symbol): Update.
3278         * dbxread.c (process_one_symbol): Update.
3279         * coffread.c (coff_symtab_read, process_coff_symbol)
3280         (coff_read_enum_type): Update.
3281         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3282         declare.
3283         (get_local_symbols, get_file_symbols, get_global_symbols): New
3284         functions.
3285         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3286         m_global_symbols.
3287         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3288         (~scoped_free_pendings): Update.
3289         (finish_block, prepare_for_building, reset_symtab_globals)
3290         (end_symtab_get_static_block, end_symtab_with_blockvector)
3291         (augment_type_symtab, push_context): Update.
3292         (get_local_symbols, get_file_symbols, get_global_symbols): New
3293         functions.
3294         (buildsym_init): Update.
3295
3296 2018-07-20  Tom Tromey  <[email protected]>
3297
3298         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3299         (process_full_type_unit): Likewise.
3300         (dwarf2_start_symtab): Set list_in_scope.
3301
3302 2018-07-20  Tom Tromey  <[email protected]>
3303
3304         * dwarf2read.c (process_psymtab_comp_unit_reader)
3305         (build_type_psymtabs_reader): Do not set list_in_scope.
3306
3307 2018-07-20  Tom Tromey  <[email protected]>
3308
3309         * buildsym.c (free_pendings): Remove.
3310         (add_symbol_to_list, scoped_free_pendings)
3311         (finish_block_internal, buildsym_init): Update.
3312
3313 2018-07-20  Tom Tromey  <[email protected]>
3314
3315         * xcoffread.c (read_xcoff_symtab): Update.
3316         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3317         Update.
3318         * dbxread.c (process_one_symbol): Update.
3319         * coffread.c (coff_symtab_read): Update.
3320         * buildsym.h (finish_block): Update.
3321         * buildsym.c (finish_block): Remove "listhead" argument.
3322         (end_symtab_get_static_block): Update.
3323
3324 2018-07-20  Tom Tromey  <[email protected]>
3325
3326         * buildsym.h (class scoped_free_pendings): Remove constructor.
3327         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3328         method.
3329         <m_pending_block_obstack, m_pending_blocks>: New members.
3330         (pending_block_obstack, pending_blocks): Remove.
3331         (scoped_free_pendings::scoped_free_pendings): Default.
3332         (~scoped_free_pendings): Update.
3333         (free_pending_blocks): Remove.
3334         (finish_block_internal, record_pending_block, make_blockvector)
3335         (end_symtab_get_static_block, augment_type_symtab, push_context)
3336         (buildsym_init): Update.
3337
3338 2018-07-20  Tom Tromey  <[email protected]>
3339
3340         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3341         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3342         members.
3343         (pending_addrmap, pending_addrmap_obstack)
3344         (pending_addrmap_interesting): Remove.
3345         (scoped_free_pendings, record_block_range, make_blockvector)
3346         (prepare_for_building, reset_symtab_globals, buildsym_init):
3347         Update.
3348
3349 2018-07-20  Tom Tromey  <[email protected]>
3350
3351         * xcoffread.c (process_linenos): Update.
3352         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3353         * mdebugread.c (psymtab_to_symtab_1): Update.
3354         * dwarf2read.c (setup_type_unit_groups)
3355         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3356         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3357         * dbxread.c (process_one_symbol): Update.
3358         * coffread.c (coff_symtab_read, enter_linenos)
3359         (process_coff_symbol): Update.
3360         * buildsym.h (current_subfile): Don't declare.
3361         (get_current_subfile): Declare.
3362         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3363         member.
3364         (start_subfile, free_buildsym_compunit, push_subfile)
3365         (prepare_for_building, start_symtab): Update.
3366         (get_current_subfile): New function.
3367
3368 2018-07-20  Tom Tromey  <[email protected]>
3369
3370         * coffread.c (coff_symtab_read): Update.
3371         * xcoffread.c (read_xcoff_symtab): Update.
3372         * dwarf2read.c (new_symbol): Update.
3373         (read_func_scope, read_lexical_block_scope): Update.
3374         * dbxread.c (process_one_symbol): Update.
3375         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3376         (outermost_context_p): Remove macro.
3377         (outermost_context_p, get_current_context_stack)
3378         (get_context_stack_depth): Declare.
3379         (pop_context): Return struct context_stack.
3380         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3381         member.
3382         (context_stack_size): Remove.
3383         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3384         (prepare_for_building, end_symtab_get_static_block)
3385         (augment_type_symtab, push_context): Update.
3386         (pop_context): Return struct context_stack.
3387         (outermost_context_p, get_current_context_stack)
3388         (get_context_stack_depth): New functions.
3389         (buildsym_init): Update.
3390
3391 2018-07-20  Tom Tromey  <[email protected]>
3392
3393         * rust-exp.y: Now a pure parser.  Update all rules.
3394         (%union): Move earlier.
3395         (current_parser, work_obstack): Remove globals.
3396         (rust_parser, ~rust_parser): Update.
3397         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3398         lex_character, lex_number, lex_string, lex_identifier,
3399         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3400         convert_name, convert_params_to_expression,
3401         convert_ast_to_expression, ast_basic_type, ast_operation,
3402         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3403         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3404         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3405         ast_array_type, ast_slice_type, ast_reference_type,
3406         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3407         (rust_parse): Update.
3408         (rustyyerror, rustyylex): Add parser parameter.
3409         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3410         (rust_lex_stringish_test, rust_lex_test_sequence)
3411         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3412         (rust_lex_test_push_back, rust_lex_tests): Update.
3413
3414 2018-07-19  Pedro Alves  <[email protected]>
3415
3416         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3417         gdb::unique_xmalloc_ptr.
3418         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3419         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3420         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3421         copy-initialization.
3422         * guile/scm-pretty-print.c (ppscm_print_children): Use
3423         gdb::unique_xmalloc_ptr instead of cleanups.
3424         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3425         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3426         gdb::unique_xmalloc_ptr.
3427         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3428         Adjust to use gdb::unique_xmalloc_ptr.
3429         * guile/scm-utils.c (extract_arg): Adjust.
3430         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3431         gdb::unique_xmalloc_ptr instead of a cleanup.
3432
3433 2018-07-19  Tom Tromey  <[email protected]>
3434
3435         * utils.c (do_value_free_to_mark)
3436         (make_cleanup_value_free_to_mark): Remove.
3437         * utils.h (make_cleanup_value_free_to_mark): Remove.
3438
3439 2018-07-19  Pedro Alves  <[email protected]>
3440
3441         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3442         forwarding reference.
3443
3444 2018-07-18  Pedro Alves  <[email protected]>
3445
3446         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3447         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3448         cleanup.
3449
3450 2018-07-18  Pedro Alves  <[email protected]>
3451
3452         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3453         exceptions.
3454         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3455         (gdbscm_wrap): New.
3456         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3457         directly instead of a cleanup.
3458         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3459         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3460         (vlscm_binop_gdbthrow): New, factored out from ...
3461         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3462         (vlscm_rich_compare): Use gdbscm_wrap.
3463         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3464         instead of a cleanup.
3465         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3466         cleanup.
3467         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3468         Use xfree directly instead of a cleanup.
3469         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3470         Adjust to use gdbscm_wrap and scoped_value_mark.
3471         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3472         (gdbscm_value_address, gdbscm_value_dereference)
3473         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3474         scoped_value_mark.
3475         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3476         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3477         scoped_value_mark.
3478         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3479         gdbscm_wrap and scoped_value_mark.
3480         (gdbscm_value_to_string): Use xfree directly instead of a
3481         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3482         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3483         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3484         scoped_value_mark.
3485         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3486         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3487         scoped_value_mark.
3488         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3489         gdbscm_wrap.
3490
3491 2018-07-18  Tom de Vries  <[email protected]>
3492
3493         * findvar.c (default_read_var_value): Also resolve dynamic type for
3494         LOC_OPTIMIZED_OUT vars.
3495
3496 2018-07-18  Maciej W. Rozycki  <[email protected]>
3497
3498         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3499         decoding.
3500
3501 2018-07-17  Tom Tromey  <[email protected]>
3502
3503         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3504         (compute_enum_list, pascm_set_param_value_x)
3505         (gdbscm_parameter_value): Update.
3506         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3507         (gdbscm_scm_to_host_string): Update.
3508         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3509         Update.
3510         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3511         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3512         * guile/scm-string.c (gdbscm_scm_to_string): Return
3513         unique_xmalloc_ptr.
3514         (gdbscm_scm_to_host_string): Likewise.
3515
3516 2018-07-17  Tom Tromey  <[email protected]>
3517
3518         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3519         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3520         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3521         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3522         unique_xmalloc_ptr.
3523
3524 2018-07-17  Tom Tromey  <[email protected]>
3525
3526         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3527         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3528         Update.
3529         * guile/scm-cmd.c (cmdscm_function): Update.
3530         * guile/scm-pretty-print.c
3531         (ppscm_print_exception_unless_memory_error): Update.
3532         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3533         Return unique_xmalloc_ptr.
3534
3535 2018-07-17  Tom Tromey  <[email protected]>
3536
3537         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3538         Use string_printf.
3539
3540 2018-07-17  Jim Wilson  <[email protected]>
3541
3542         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3543         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3544         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3545         unecessary braces after EF_RISCV_RVC test.  Delete call to
3546         set_gdbarch_decr_pc_after_break.
3547
3548         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3549         RISCV_LAST_FP_REGNUM + 1.
3550         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3551
3552 2018-07-17  Tom Tromey  <[email protected]>
3553
3554         * configure.ac: Remove --disable-gdbcli.
3555         * configure: Rebuild.
3556         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3557         (SUBDIR_CLI_CFLAGS): Remove.
3558         (SFILES): Use SUBDIR_CLI_SRCS.
3559         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3560
3561 2018-07-17  Tom Tromey  <[email protected]>
3562
3563         PR gdb/18624:
3564         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3565
3566 2018-07-16  Jim Wilson  <[email protected]>
3567
3568         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3569
3570 2018-07-16  Simon Marchi  <[email protected]>
3571
3572         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3573         variable.
3574         (libunwind_frame_sniffer): Likewise.
3575         (libunwind_frame_prev_register): Likewise.
3576         (libunwind_sigtramp_frame_sniffer): Likewise.
3577         * ia64-tdep.c (ia64_access_reg): Likewise.
3578         (ia64_access_rse_reg): Likewise.
3579         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3580         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3581
3582 2018-07-16  Simon Marchi  <[email protected]>
3583
3584         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3585
3586 2018-07-16  Simon Marchi  <[email protected]>
3587
3588         * remote-sim.c (gdbsim_target::close,
3589         gdbsim_target::mourn_inferior): Remove unused variables.
3590
3591 2018-07-16  Simon Marchi  <[email protected]>
3592
3593         * ia64-tdep.c (ktab_buf): New global.
3594         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3595         (get_kernel_table): Adjust.
3596
3597 2018-07-16  Tom Tromey  <[email protected]>
3598
3599         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3600         * dwarf2read.c (using_directives, new_symbol): Use
3601         outermost_context_p.
3602         * dbxread.c (process_one_symbol): Use outermost_context_p.
3603         * coffread.c (coff_symtab_read): Use outermost_context_p.
3604
3605 2018-07-16  Tom Tromey  <[email protected]>
3606
3607         * dwarf2read.c (using_directives, read_func_scope)
3608         (read_lexical_block_scope): Update.
3609         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3610         * buildsym.h (local_using_directives, global_using_directives):
3611         Don't declare.
3612         (get_local_using_directives, set_local_using_directives)
3613         (get_global_using_directives): Declare.
3614         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3615         m_global_using_directives>: New members.
3616         (finish_block_internal, prepare_for_building)
3617         (reset_symtab_globals, end_symtab_get_static_block)
3618         (push_context): Update.
3619         (get_local_using_directives, set_local_using_directives)
3620         (get_global_using_directives): New functions.
3621         (buildsym_init): Update.
3622
3623 2018-07-16  Tom Tromey  <[email protected]>
3624
3625         * xcoffread.c (xcoff_initial_scan): Don't call
3626         free_pending_blocks.
3627         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3628         * buildsym.h (class scoped_free_pendings): Add constructor.
3629         (free_pending_blocks): Don't declare.
3630         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3631         (free_pending_blocks): Now static.
3632
3633 2018-07-16  Tom Tromey  <[email protected]>
3634
3635         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3636         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3637         member.
3638         (struct subfile_stack): Remove.
3639         (subfile_stack): Remove.
3640         (push_subfile, pop_subfile, buildsym_init): Update.
3641
3642 2018-07-16  Tom Tromey  <[email protected]>
3643
3644         * buildsym.c (push_subfile): Use gdb_assert.
3645         (pop_subfile): Use gdb_assert.
3646
3647 2018-07-16  Tom Tromey  <[email protected]>
3648
3649         * buildsym.h (merge_symbol_lists): Remove.
3650         * buildsym.c (merge_symbol_lists): Remove.
3651
3652 2018-07-16  Tom Tromey  <[email protected]>
3653
3654         * stabsread.c (scan_file_globals): Update comment.
3655         * stabsread.h (scan_file_globals): Move from buildsym.h.
3656         * buildsym.h (scan_file_globals): Move to stabsread.h.
3657
3658 2018-07-16  Tom Tromey  <[email protected]>
3659
3660         * xcoffread.c (xcoff_new_init): Update.
3661         * mipsread.c (mipscoff_new_init): Update.
3662         * mdebugread.c (mdebug_build_psymtabs): Update.
3663         * elfread.c (elf_new_init): Update.
3664         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3665         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3666         * buildsym.h (buildsym_new_init): Don't declare.
3667         * buildsym.c (buildsym_new_init): Remove.
3668
3669 2018-07-16  Tom Tromey  <[email protected]>
3670
3671         * stabsread.h (within_function): Move from buildsym.h.
3672         * stabsread.c (start_stabs): Clear within_function.
3673         * coffread.c (coff_start_symtab): Clear within_function.
3674         * buildsym.h (within_function): Move to stabsread.h.
3675         * buildsym.c (prepare_for_building): Update.
3676
3677 2018-07-16  Tom Tromey  <[email protected]>
3678
3679         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3680         * dwarf2read.c (dwarf2_start_symtab): Don't set
3681         processing_gcc_compilation.
3682         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3683
3684 2018-07-16  Tom Tromey  <[email protected]>
3685
3686         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3687         (next_symbol_text_func): Move from buildsym.h.
3688         * stabsread.c (hashname): Move from buildsym.c.
3689         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3690         (next_symbol_text_func, hashname): Move to stabsread.h.
3691         * buildsym.c: Don't include bcache.h
3692         (hashname): Move to stasbread.c.
3693
3694 2018-07-16  Tom Tromey  <[email protected]>
3695
3696         * buildsym.h (context_stack_size): Don't declare.
3697         * buildsym.c (context_stack_size): New global.
3698
3699 2018-07-16  Tom Tromey  <[email protected]>
3700
3701         * dbxread.c (processing_acc_compilation): New global.
3702         * buildsym.h (processing_acc_compilation): Don't declare.
3703
3704 2018-07-16  Tom Tromey  <[email protected]>
3705
3706         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3707         * dbxread.c (read_ofile_symtab): Update.
3708         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3709         * buildsym.h (last_source_start_addr): Remove.
3710         (set_last_source_start_addr, get_last_source_start_addr):
3711         Declare.
3712         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3713         parameter.
3714         (struct buildsym_compunit) <m_last_source_start_addr>: New
3715         member.
3716         (prepare_for_building): Remove start_addr parameter.
3717         (start_symtab, restart_symtab, end_symtab_get_static_block)
3718         (end_symtab_with_blockvector): Update.
3719         (set_last_source_start_addr, get_last_source_start_addr): New
3720         functions.
3721
3722 2018-07-16  Tom Tromey  <[email protected]>
3723
3724         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3725         member.
3726         (have_line_numbers): Remove.
3727         (record_line, prepare_for_building, end_symtab_get_static_block)
3728         (augment_type_symtab): Update.
3729
3730 2018-07-16  Tom Tromey  <[email protected]>
3731
3732         * buildsym.c (~buildsym_compunit): Free the macro table.
3733         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3734         methods.
3735         <m_pending_macros>: New member.
3736         (pending_macros): Remove.
3737         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3738         (reset_symtab_globals, end_symtab_get_static_block)
3739         (end_symtab_with_blockvector, augment_type_symtab)
3740         (buildsym_init): Update.
3741
3742 2018-07-16  Tom Tromey  <[email protected]>
3743
3744         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3745         parameter.
3746         (buildsym_compunit::set_last_source_file): New method.
3747         <m_last_source_file>: New member.
3748         (prepare_for_building): Remove "name" parameter.
3749         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3750         (last_source_file): Remove.
3751         (set_last_source_file, get_last_source_file): Update.
3752
3753 2018-07-16  Tom Tromey  <[email protected]>
3754
3755         * buildsym.c (prepare_for_building): Add assert.
3756
3757 2018-07-16  Tom Tromey  <[email protected]>
3758
3759         * buildsym.c (~buildsym_compunit): Update.
3760         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3761         (start_subfile, patch_subfile_names)
3762         (end_symtab_with_blockvector): Update.
3763
3764 2018-07-16  Tom Tromey  <[email protected]>
3765
3766         * buildsym.c (struct buildsym_compunit): Add constructor,
3767         destructor, initializers.
3768         (start_buildsym_compunit): Remove.
3769         (free_buildsym_compunit): Use "delete".
3770         (start_symtab, restart_symtab): Use "new".
3771
3772 2018-07-13  Simon Marchi  <[email protected]>
3773
3774         * symfile.c (set_objfile_default_section_offset): Remove struct
3775         keyword.
3776
3777 2018-07-14  Stafford Horne  <[email protected]>
3778
3779         * (Responsible Maintainers): Add myself as or1k maintainer.
3780
3781 2018-07-13  Tom Tromey  <[email protected]>
3782
3783         * symfile.c (set_objfile_default_section_offset): Use extra braces
3784         around initializer.
3785
3786 2018-07-13  Andreas Arnez  <[email protected]>
3787
3788         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3789         non-branching basr.
3790
3791 2018-07-12  Philippe Waroquiers  <[email protected]>
3792
3793         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3794         unittests/cli-utils-selftests.c
3795         * unittests/cli-utils-selftests.c: New file.
3796
3797 2018-07-12  Philippe Waroquiers  <[email protected]>
3798
3799         * NEWS: Mention new commands. Mention change to 'thread apply'.
3800
3801 2018-07-12  Philippe Waroquiers  <[email protected]>
3802
3803         * thread.c (thr_try_catch_cmd): New function.
3804         (thread_apply_all_command): Handle qcs flags.
3805         (thread_apply_command): Handle qcs flags.
3806         (taas_command): New function.
3807         (tfaas_command): New function.
3808         (_initialize_thread): Update to setup the new commands 'taas
3809         and 'tfaas'. Change doc string for 'thread apply'.
3810
3811 2018-07-12  Philippe Waroquiers  <[email protected]>
3812
3813         * stack.c: (trailing_outermost_frame): New function, mostly
3814         extracted from backtrace_command_1.
3815         (leading_innermost_frame): New function.
3816         (backtrace_command_1): Update to call trailing_outermost_frame.
3817         (frame_apply_command_count): New function.
3818         (frame_apply_level_command): New function.
3819         (frame_apply_all_command): New function.
3820         (frame_apply_command): New function.
3821         (faas_command): New function.
3822         (frame_cmd_list): New variable.
3823         (_initialize_stack): Update to setup the new commands 'frame apply'
3824         and 'faas'.
3825
3826 2018-07-12  Philippe Waroquiers  <[email protected]>
3827
3828         * cli-utils.c (number_or_range_parser::get_number): Only handle
3829         numbers or convenience var as numbers.
3830         (parse_flags): New function.
3831         (parse_flags_qcs): New function.
3832         (number_or_range_parser::finished): Ensure parsing end is detected
3833         before end of string.
3834         * cli-utils.h (parse_flags): New function.
3835         (parse_flags_qcs): New function.
3836         (number_or_range_parser): Remove m_finished bool.
3837         (number_or_range_parser::skip_range): Set m_in_range to false.
3838
3839 2018-07-12  Sergio Durigan Junior  <[email protected]>
3840
3841         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3842         on Windows.
3843
3844 2018-07-11  Sergio Durigan Junior  <[email protected]>
3845             Jan Kratochvil  <[email protected]>
3846             Paul Fertser  <[email protected]>
3847             Tsutomu Seki  <[email protected]>
3848             Pedro Alves  <[email protected]>
3849
3850         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3851         'unittests/parse-connection-spec-selftests.c'.
3852         (COMMON_SFILES): Add 'common/netstuff.c'.
3853         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3854         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3855         * common/netstuff.c: New file.
3856         * common/netstuff.h: New file.
3857         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3858         (wait_for_connect): Update comment.  New parameter
3859         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3860         Use 'sock' directly instead of 'scb->fd'.
3861         (try_connect): New function, with code from 'net_open'.
3862         (net_open): Rewrite main loop to deal with multiple
3863         sockets/addresses.  Handle IPv6-style hostnames; implement
3864         support for IPv6 connections.
3865         * unittests/parse-connection-spec-selftests.c: New file.
3866
3867 2018-07-11  Pedro Alves  <[email protected]>
3868
3869         PR gdb/23377
3870         * remote.c (remote_target::remote_detach_pid): Call
3871         set_current_process.
3872
3873 2018-07-11  Pedro Alves  <[email protected]>
3874
3875         * h8300-tdep.c (h8300_gdbarch_init): Remove
3876         set_gdbarch_ecoff_reg_to_regnum calls.
3877
3878 2018-07-11  Sergio Durigan Junior  <[email protected]>
3879
3880         PR c++/23373
3881         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3882         offsets/sizes for static members of a class/struct.
3883
3884 2018-07-11  Alan Hayward  <[email protected]>
3885
3886         * target-descriptions.c (tdesc_register_bitsize): Rename.
3887         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3888         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3889         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3890
3891 2018-07-10  Tom Tromey  <[email protected]>
3892
3893         * breakpoint.c (moribund_locations): Now static and a
3894         std::vector.
3895         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3896         (build_bpstat_chain, update_global_location_list)
3897         (breakpoint_retire_moribund): Update.
3898         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3899         VEC.
3900
3901 2018-07-10  Andrew Burgess  <[email protected]>
3902
3903         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3904         (riscv_register_reggroup_p): Use new function, remove unneeded
3905         parenthesis.
3906         (riscv_push_dummy_call): Extend assert to compare against xlen or
3907         flen based on register type.
3908
3909 2018-07-10  Andrew Burgess  <[email protected]>
3910
3911         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3912
3913 2018-07-09  Andrew Burgess  <[email protected]>
3914
3915         * remote.c (show_hardware_watchpoint_limit): New function.
3916         (show_hardware_watchpoint_length_limit): New function.
3917         (show_hardware_breakpoint_limit): New function.
3918         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3919         where appropriate, update help text.
3920
3921 2018-07-09  Tom Tromey  <[email protected]>
3922
3923         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3924         (CLIBS): Don't mention NAT_CLIBS.
3925
3926 2018-07-09  Tom Tromey  <[email protected]>
3927
3928         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3929         (LIBGDB_OBS, clean mostlyclean): Update.
3930         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3931
3932 2018-07-09  Tom Tromey  <[email protected]>
3933
3934         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3935         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3936         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3937
3938 2018-07-09  Tom Tromey  <[email protected]>
3939
3940         * Makefile.in (ALLDEPFILES): Remove exec.c.
3941         (COMMON_OBS): Remove exec.o.
3942         (COMMON_SFILES): Add exec.c.
3943
3944 2018-07-09  Tom Tromey  <[email protected]>
3945
3946         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3947
3948 2018-07-09  Tom Tromey  <[email protected]>
3949
3950         * Makefile.in (clean mostlyclean): Remove stamp-version.
3951         (version.c): Depend on stamp-version.
3952         (stamp-version): New rule, from version.c rule.
3953
3954 2018-07-09  Tom Tromey  <[email protected]>
3955
3956         * Makefile.in (init.c): Depend on stamp-init.
3957         (stamp-init): New rule, from init.c rule.
3958         (clean mostlyclean): Remove stamp-init.
3959
3960 2018-07-09  Tom Tromey  <[email protected]>
3961
3962         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3963         SUBDIR_GCC_COMPILE_SRCS.
3964
3965 2018-07-09  Tom Tromey  <[email protected]>
3966
3967         * Makefile.in (init.c): Remove some unused sed rules.
3968
3969 2018-07-09  Tom Tromey  <[email protected]>
3970
3971         * Makefile.in (TSOBS): Remove.
3972         (INIT_FILES): Update.
3973         (LIBGDB_OBS): Update.
3974         (COMMON_SFILES): Add inflow.c.
3975         (SFILES): Remove inflow.c.
3976
3977 2018-07-07  Jan Kratochvil  <[email protected]>
3978
3979         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3980
3981 2018-07-07  Simon Marchi  <[email protected]>
3982
3983         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3984         get_saveloc_name, is_signal_frame_name, step_name,
3985         init_remote_name, create_addr_space_name,
3986         destroy_addr_space_name, search_unwind_table_name,
3987         find_dyn_list_name): Constify.
3988
3989 2018-07-05  Simon Marchi  <[email protected]>
3990
3991         * darwin-nat.c (darwin_pthread_kill): New function.
3992         (darwin_resume_thread): Use darwin_pthread_kill.
3993
3994 2018-07-05  Tom de Vries  <[email protected]>
3995
3996         * macroexp.c (macro_buffer) <operator=>: New member function.
3997
3998 2018-07-04  Tom Tromey  <[email protected]>
3999
4000         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4001
4002 2018-07-04  Simon Marchi  <[email protected]>
4003
4004         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4005         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4006         * maint.c: Likewise.
4007         * top.c: Likewise.
4008
4009 2018-07-04  Joel Brobecker  <[email protected]>
4010
4011         * NEWS: Create a new section for the next release branch.
4012         Rename the section of the current branch, now that it has
4013         been cut.
4014
4015 2018-07-04  Joel Brobecker  <[email protected]>
4016
4017         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4018         * version.in: Bump version to 8.2.50.DATE-git.
4019
4020 2018-07-04  Vyacheslav Barinov  <[email protected]>
4021             Pedro Alves  <[email protected]>
4022
4023         * linux-nat.c (linux_init_ptrace): Rename to ...
4024         (linux_init_ptrace_procfs): ... this.  Call
4025         linux_proc_init_warnings.
4026         (linux_nat_target::post_attach)
4027         (linux_nat_target::post_startup_inferior): Adjust.
4028         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4029         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4030
4031 2018-07-04  Tom de Vries  <[email protected]>
4032
4033         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4034         check ...
4035         (read_comp_unit_head): ... here.
4036
4037 2018-07-03  Tom Tromey  <[email protected]>
4038
4039         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4040         (stop_tracing, tstatus_command)
4041         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4042         (print_one_static_tracepoint_marker): Update.
4043         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4044         std::vector.
4045         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4046         VEC.
4047         (all_tracepoints, static_tracepoints_here): Return std::vector.
4048
4049 2018-07-03  Tom Tromey  <[email protected]>
4050
4051         * common/ptid.c (ptid_equal): Remove.
4052         * common/ptid.h (ptid_equal): Don't declare.
4053         * ada-tasks.c: Update.
4054         * breakpoint.c: Update.
4055         * common/agent.c: Update.
4056         * corelow.c: Update.
4057         * darwin-nat-info.c: Update.
4058         * darwin-nat.c: Update.
4059         * dcache.c: Update.
4060         * dtrace-probe.c: Update.
4061         * dummy-frame.c: Update.
4062         * fbsd-nat.c: Update.
4063         * frame.c: Update.
4064         * gdbthread.h: Update.
4065         * gnu-nat.c: Update.
4066         * go32-nat.c: Update.
4067         * inf-loop.c: Update.
4068         * inf-ptrace.c: Update.
4069         * infcall.c: Update.
4070         * infcmd.c: Update.
4071         * inflow.c: Update.
4072         * infrun.c: Update.
4073         * linux-fork.c: Update.
4074         * linux-nat.c: Update.
4075         * linux-thread-db.c: Update.
4076         * mi/mi-cmd-var.c: Update.
4077         * mi/mi-interp.c: Update.
4078         * mi/mi-main.c: Update.
4079         * nto-procfs.c: Update.
4080         * ppc-linux-tdep.c: Update.
4081         * procfs.c: Update.
4082         * python/py-inferior.c: Update.
4083         * python/py-record-btrace.c: Update.
4084         * python/py-record.c: Update.
4085         * ravenscar-thread.c: Update.
4086         * regcache.c: Update.
4087         * remote-sim.c: Update.
4088         * remote.c: Update.
4089         * sol-thread.c: Update.
4090         * solib.c: Update.
4091         * target.c: Update.
4092         * tui/tui-stack.c: Update.
4093         * varobj.c: Update.
4094         * windows-nat.c: Update.
4095         * windows-tdep.c: Update.
4096
4097 2018-07-03  Tom Tromey  <[email protected]>
4098
4099         * common/ptid.c (ptid_match): Remove.
4100         * common/ptid.h (ptid_match): Don't declare.
4101         * fbsd-nat.c: Update.
4102         * infcmd.c: Update.
4103         * infrun.c: Update.
4104         * linux-nat.c: Update.
4105         * record-btrace.c: Update.
4106         * regcache.c: Update.
4107         * remote.c: Update.
4108
4109 2018-07-03  Tom Tromey  <[email protected]>
4110
4111         * common/ptid.c (ptid_tid_p): Remove.
4112         * common/ptid.h (ptid_tid_p): Don't declare.
4113         * sol-thread.c: Update.
4114
4115 2018-07-03  Tom Tromey  <[email protected]>
4116
4117         * common/ptid.c (ptid_lwp_p): Remove.
4118         * common/ptid.h (ptid_lwp_p): Don't declare.
4119         * fbsd-nat.c: Update.
4120         * linux-nat.c: Update.
4121         * nat/linux-procfs.c: Update.
4122         * nat/x86-linux-dregs.c: Update.
4123         * sol-thread.c: Update.
4124
4125 2018-07-03  Tom Tromey  <[email protected]>
4126
4127         * common/ptid.c (ptid_is_pid): Remove.
4128         * common/ptid.h (ptid_is_pid): Don't declare.
4129         * infrun.c: Update.
4130         * linux-nat.c: Update.
4131         * mi/mi-interp.c: Update.
4132         * remote.c: Update.
4133         * thread.c: Update.
4134
4135 2018-07-03  Tom Tromey  <[email protected]>
4136
4137         * common/ptid.c (ptid_get_tid): Remove.
4138         * common/ptid.h (ptid_get_tid): Don't declare.
4139         * ada-tasks.c: Update.
4140         * aix-thread.c: Update.
4141         * bsd-uthread.c: Update.
4142         * darwin-nat.c: Update.
4143         * fbsd-nat.c: Update.
4144         * i386-darwin-nat.c: Update.
4145         * infrun.c: Update.
4146         * linux-tdep.c: Update.
4147         * nto-procfs.c: Update.
4148         * ppc-ravenscar-thread.c: Update.
4149         * python/py-infthread.c: Update.
4150         * ravenscar-thread.c: Update.
4151         * sol-thread.c: Update.
4152         * sparc-ravenscar-thread.c: Update.
4153         * windows-nat.c: Update.
4154
4155 2018-07-03  Tom Tromey  <[email protected]>
4156
4157         * common/ptid.c (ptid_get_lwp): Remove.
4158         * common/ptid.h (ptid_get_lwp): Don't declare.
4159         * aarch64-linux-nat.c: Update.
4160         * ada-tasks.c: Update.
4161         * aix-thread.c: Update.
4162         * amd64-linux-nat.c: Update.
4163         * arm-linux-nat.c: Update.
4164         * corelow.c: Update.
4165         * fbsd-nat.c: Update.
4166         * fbsd-tdep.c: Update.
4167         * gnu-nat.c: Update.
4168         * i386-cygwin-tdep.c: Update.
4169         * i386-gnu-nat.c: Update.
4170         * i386-linux-nat.c: Update.
4171         * ia64-linux-nat.c: Update.
4172         * inf-ptrace.c: Update.
4173         * infrun.c: Update.
4174         * linux-fork.c: Update.
4175         * linux-nat.c: Update.
4176         * linux-tdep.c: Update.
4177         * linux-thread-db.c: Update.
4178         * mips-linux-nat.c: Update.
4179         * nat/aarch64-linux-hw-point.c: Update.
4180         * nat/aarch64-linux.c: Update.
4181         * nat/linux-btrace.c: Update.
4182         * nat/linux-osdata.c: Update.
4183         * nat/linux-procfs.c: Update.
4184         * nat/x86-linux-dregs.c: Update.
4185         * obsd-nat.c: Update.
4186         * ppc-fbsd-nat.c: Update.
4187         * ppc-linux-nat.c: Update.
4188         * procfs.c: Update.
4189         * python/py-infthread.c: Update.
4190         * ravenscar-thread.c: Update.
4191         * remote.c: Update.
4192         * s390-linux-nat.c: Update.
4193         * sol-thread.c: Update.
4194         * sol2-tdep.c: Update.
4195         * spu-linux-nat.c: Update.
4196         * x86-linux-nat.c: Update.
4197         * xtensa-linux-nat.c: Update.
4198
4199 2018-07-03  Tom Tromey  <[email protected]>
4200
4201         * common/ptid.c (ptid_get_pid): Remove.
4202         * common/ptid.h (ptid_get_pid): Don't declare.
4203         * aarch64-linux-nat.c: Update.
4204         * ada-lang.c: Update.
4205         * aix-thread.c: Update.
4206         * alpha-bsd-nat.c: Update.
4207         * amd64-fbsd-nat.c: Update.
4208         * amd64-linux-nat.c: Update.
4209         * arm-linux-nat.c: Update.
4210         * arm-nbsd-nat.c: Update.
4211         * auxv.c: Update.
4212         * break-catch-syscall.c: Update.
4213         * breakpoint.c: Update.
4214         * bsd-uthread.c: Update.
4215         * corelow.c: Update.
4216         * ctf.c: Update.
4217         * darwin-nat.c: Update.
4218         * fbsd-nat.c: Update.
4219         * fbsd-tdep.c: Update.
4220         * gcore.c: Update.
4221         * gnu-nat.c: Update.
4222         * hppa-nbsd-nat.c: Update.
4223         * hppa-obsd-nat.c: Update.
4224         * i386-fbsd-nat.c: Update.
4225         * ia64-linux-nat.c: Update.
4226         * inf-ptrace.c: Update.
4227         * infcmd.c: Update.
4228         * inferior.c: Update.
4229         * inferior.h: Update.
4230         * inflow.c: Update.
4231         * infrun.c: Update.
4232         * linux-fork.c: Update.
4233         * linux-nat.c: Update.
4234         * linux-tdep.c: Update.
4235         * linux-thread-db.c: Update.
4236         * m68k-bsd-nat.c: Update.
4237         * mi/mi-interp.c: Update.
4238         * mi/mi-main.c: Update.
4239         * mips-linux-nat.c: Update.
4240         * mips-nbsd-nat.c: Update.
4241         * mips64-obsd-nat.c: Update.
4242         * nat/aarch64-linux-hw-point.c: Update.
4243         * nat/aarch64-linux.c: Update.
4244         * nat/linux-btrace.c: Update.
4245         * nat/linux-osdata.c: Update.
4246         * nat/linux-procfs.c: Update.
4247         * nat/x86-linux-dregs.c: Update.
4248         * nto-procfs.c: Update.
4249         * obsd-nat.c: Update.
4250         * ppc-linux-nat.c: Update.
4251         * ppc-nbsd-nat.c: Update.
4252         * ppc-obsd-nat.c: Update.
4253         * proc-service.c: Update.
4254         * procfs.c: Update.
4255         * python/py-inferior.c: Update.
4256         * python/py-infthread.c: Update.
4257         * ravenscar-thread.c: Update.
4258         * record.c: Update.
4259         * remote-sim.c: Update.
4260         * remote.c: Update.
4261         * rs6000-nat.c: Update.
4262         * s390-linux-nat.c: Update.
4263         * sh-nbsd-nat.c: Update.
4264         * sol-thread.c: Update.
4265         * sparc-nat.c: Update.
4266         * sparc64-tdep.c: Update.
4267         * spu-linux-nat.c: Update.
4268         * spu-tdep.c: Update.
4269         * target-debug.h: Update.
4270         * target.c: Update.
4271         * thread.c: Update.
4272         * tid-parse.c: Update.
4273         * tracefile-tfile.c: Update.
4274         * vax-bsd-nat.c: Update.
4275         * windows-nat.c: Update.
4276         * x86-linux-nat.c: Update.
4277         * x86-nat.c: Update.
4278
4279 2018-07-03  Tom Tromey  <[email protected]>
4280
4281         * common/ptid.c (pid_to_ptid): Remove.
4282         * common/ptid.h (pid_to_ptid): Don't declare.
4283         * aix-thread.c: Update.
4284         * arm-linux-nat.c: Update.
4285         * common/ptid.c: Update.
4286         * common/ptid.h: Update.
4287         * corelow.c: Update.
4288         * ctf.c: Update.
4289         * darwin-nat.c: Update.
4290         * fbsd-nat.c: Update.
4291         * fork-child.c: Update.
4292         * gnu-nat.c: Update.
4293         * go32-nat.c: Update.
4294         * inf-ptrace.c: Update.
4295         * infcmd.c: Update.
4296         * inferior.c: Update.
4297         * infrun.c: Update.
4298         * linux-fork.c: Update.
4299         * linux-nat.c: Update.
4300         * nat/aarch64-linux-hw-point.c: Update.
4301         * nat/fork-inferior.c: Update.
4302         * nat/x86-linux-dregs.c: Update.
4303         * nto-procfs.c: Update.
4304         * obsd-nat.c: Update.
4305         * procfs.c: Update.
4306         * progspace.c: Update.
4307         * remote.c: Update.
4308         * rs6000-nat.c: Update.
4309         * s390-linux-nat.c: Update.
4310         * sol-thread.c: Update.
4311         * spu-linux-nat.c: Update.
4312         * target.c: Update.
4313         * top.c: Update.
4314         * tracefile-tfile.c: Update.
4315         * windows-nat.c: Update.
4316
4317 2018-07-03  Tom Tromey  <[email protected]>
4318
4319         * common/ptid.h (ptid_build): Don't declare.
4320         * common/ptid.c (ptid_build): Remove.
4321         * aix-thread.c: Update.
4322         * bsd-kvm.c: Update.
4323         * bsd-uthread.c: Update.
4324         * common/agent.c: Update.
4325         * common/ptid.c: Update.
4326         * common/ptid.h: Update.
4327         * corelow.c: Update.
4328         * darwin-nat.c: Update.
4329         * fbsd-nat.c: Update.
4330         * gnu-nat.c: Update.
4331         * linux-fork.c: Update.
4332         * linux-nat.c: Update.
4333         * linux-thread-db.c: Update.
4334         * nat/linux-osdata.c: Update.
4335         * nat/linux-procfs.c: Update.
4336         * nto-procfs.c: Update.
4337         * obsd-nat.c: Update.
4338         * proc-service.c: Update.
4339         * procfs.c: Update.
4340         * ravenscar-thread.c: Update.
4341         * remote-sim.c: Update.
4342         * remote.c: Update.
4343         * sol-thread.c: Update.
4344         * target.c: Update.
4345         * windows-nat.c: Update.
4346
4347 2018-07-03  Tom Tromey  <[email protected]>
4348
4349         * infrun.c (follow_exec): Use exit_inferior_silent.
4350         * inferior.c (exit_inferior_num_silent): Remove.
4351         * inferior.h (exit_inferior_num_silent): Don't declare.
4352
4353 2018-07-03  Tom Tromey  <[email protected]>
4354
4355         PR cli/23340:
4356         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4357         inferior_ptid on error.
4358
4359 2018-07-02  Maciej W. Rozycki  <[email protected]>
4360             Simon Marchi  <[email protected]>
4361
4362         PR tdep/8282
4363         * disasm.h (gdb_disassembler): Add
4364         `m_disassembler_options_holder'. member
4365         * disasm.c (get_all_disassembler_options): New function.
4366         (gdb_disassembler::gdb_disassembler): Use it.
4367         (gdb_buffered_insn_length_init_dis): Likewise.
4368         (gdb_buffered_insn_length): Adjust accordingly.
4369         (set_disassembler_options): Handle options with arguments.
4370         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4371         line if showing options with descriptions.
4372         (disassembler_options_completer): Adapt to using the
4373         `disasm_options_and_args_t' structure.
4374         * mips-tdep.c (mips_disassembler_options): New variable.
4375         (mips_disassembler_options_o32): Likewise.
4376         (mips_disassembler_options_n32): Likewise.
4377         (mips_disassembler_options_n64): Likewise.
4378         (gdb_print_insn_mips): Don't set `disassembler_options'.
4379         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4380         functions.
4381         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4382         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4383         `gdbarch_disassembler_options_implicit' and
4384         `gdbarch_valid_disassembler_options'.
4385         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4386         `disasm_options_and_args_t' structure.
4387         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4388         method.
4389         (valid_disassembler_options): Switch from `disasm_options_t' to
4390         the `disasm_options_and_args_t' structure.
4391         * NEWS: Document `set disassembler-options' support for the MIPS
4392         target.
4393         * gdbarch.h: Regenerate.
4394         * gdbarch.c: Regenerate.
4395
4396 2018-07-02  Sebastian Huber  <[email protected]>
4397
4398         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4399
4400 2018-06-29  Joel Brobecker  <[email protected]>
4401
4402         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4403         parameter in call to amd64_target_description.
4404         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4405         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4406         (amd64fbsd_init_abi): Likewise.
4407         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4408         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4409         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4410         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4411
4412 2018-06-29  Pedro Alves  <[email protected]>
4413
4414         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4415         "segments" parameter.
4416         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4417         (_initialize_amd64_tdep): Update call to
4418         amd64_create_target_description.
4419         (amd64_target_description): Add "segments" parameter.  Adjust
4420         the implementation to use it.
4421         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4422         call to amd64_create_target_description.
4423         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4424         * gdb/arch/amd64.h (amd64_create_target_description): Add
4425         "segments" register.
4426         * gdb/arch/amd64.c (amd64_create_target_description): Add
4427         "segments" parameter.  Call create_feature_i386_64bit_segments
4428         only if SEGMENTS is true.
4429         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4430         call to amd64_create_target_description.
4431
4432 2018-06-29  Pedro Alves  <[email protected]>
4433
4434         * thread.c (thread_target_id_str): New, factored out from ...
4435         (print_thread_info_1): ... here.  Use it to compute the max
4436         "Target Id" column width.
4437
4438 2018-06-29  Pedro Alves  <[email protected]>
4439
4440         * remote.c (remote_target::extra_thread_info): Delete
4441         'display_buf' and 'n' locals.  from the cache, regardless of
4442         packet mechanims is in use.  Use cache for qThreadExtra and qP
4443         methods too.
4444
4445 2018-06-29  Pedro Alves  <[email protected]>
4446
4447         * blockframe.c (find_pc_sect_containing_function): New function.
4448         * breakpoint.c (print_breakpoint_location): Don't call
4449         find_pc_sect_function.
4450         * linespec.c (create_sals_line_offset): Record the location's
4451         symbol in the sal.
4452         * linespec.c (convert_address_location_to_sals): Fill in sal's
4453         symbol with find_pc_sect_containing_function.
4454         * symtab.c (find_function_start_sal): Rename to ...
4455         (find_function_start_sal_1): ... this.
4456         (find_function_start_sal): Reimplement as wrapper around
4457         find_function_start_sal_1, and use
4458         find_pc_sect_containing_function to fill in the sal's symbol.
4459         (find_function_start_sal(symbol*, bool)): Adjust.
4460         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4461         comments.
4462         (find_pc_sect_containing_function): Declare.
4463
4464 2018-06-29  Pedro Alves  <[email protected]>
4465
4466         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4467         true if the the location has no symbol.
4468
4469 2018-06-28  Tom Tromey  <[email protected]>
4470
4471         * NEWS: Mention --enable-codesign.
4472         * silent-rules.mk (ECHO_SIGN): New variable.
4473         * configure.ac: Add --enable-codesign.
4474         * configure: Rebuild.
4475         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4476         (gdb$(EXEEXT)): Optionally invoke codesign.
4477
4478 2018-06-28  Pedro Alves  <[email protected]>
4479
4480         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4481         comments.
4482         (switch_to_thread_no_regs): Adjust comment.
4483         * infcmd.c (stop_pc): Delete.
4484         (post_create_inferior, info_program_command): Replace references
4485         to stop_pc with references to thread_info->suspend.stop_pc.
4486         * inferior.h (stop_pc): Delete declaration.
4487         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4488         (handle_inferior_event_1, handle_signal_stop)
4489         (process_event_stop_test, keep_going_stepped_thread)
4490         (handle_step_into_function, handle_step_into_function_backward)
4491         (print_stop_location): Replace references to stop_pc with
4492         references to thread_info->suspend.stop_pc.
4493         (struct infcall_suspend_state) <stop_pc>: Delete field.
4494         (save_infcall_suspend_state, restore_infcall_suspend_state):
4495         Remove references to inf_stat->stop_pc.
4496         * linux-fork.c (fork_load_infrun_state): Likewise.
4497         * record-btrace.c (record_btrace_set_replay): Likewise.
4498         * record-full.c (record_full_goto_entry): Likewise.
4499         * remote.c (print_one_stopped_thread): Likewise.
4500         * target.c (target_resume): Extend comment.
4501         * thread.c (set_executing_thread): New.
4502         (set_executing): Use it.
4503         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4504         Remove references to stop_pc.
4505
4506 2018-06-28  Pedro Alves  <[email protected]>
4507
4508         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4509         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4510
4511 2018-06-28  Tom Tromey  <[email protected]>
4512
4513         * coffread.c (coff_symfile_finish): Update.
4514         * xcoffread.c (xcoff_symfile_finish): Update.
4515         * elfread.c (elf_symfile_finish): Update.
4516         * symfile.h (dwarf2_free_objfile): Don't declare.
4517         * dwarf2read.c (_initialize_dwarf2_read): Use
4518         register_objfile_data_with_cleanup.
4519         (dwarf2_free_objfile): Now static.  Change signature.
4520
4521 2018-06-28  Petr Tesarik  <[email protected]>
4522
4523         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4524         option "-o" to add-symbol-file-load to add an offset to each
4525         section's load address.
4526         * symfile.c (set_objfile_default_section_offset): New function.
4527
4528 2018-06-28  Petr Tesarik  <[email protected]>
4529
4530         * symfile.c (add_symbol_file_command): Make sure that sections
4531         with the same name are sorted in the same order.
4532
4533 2018-06-28  Petr Tesarik  <[email protected]>
4534
4535         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4536         require the second argument.  If omitted, load sections at the
4537         addresses specified in the file.
4538
4539 2018-06-28  Petr Tesarik  <[email protected]>
4540
4541         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4542         (_initialize_symfile): Add option "-o" to symbol-file to add an
4543         offset to each section of the symbol file.
4544
4545 2018-06-28  Petr Tesarik  <[email protected]>
4546
4547         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4548
4549 2018-06-27  Tom Tromey  <[email protected]>
4550
4551         * stack.c (_initialize_stack): Update "func" help text.
4552
4553 2018-06-27  Tom Tromey  <[email protected]>
4554
4555         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4556         std::vector.
4557         (unwind_infopy_str, pyuw_create_unwind_info)
4558         (unwind_infopy_add_saved_register, pyuw_sniffer)
4559         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4560         Update.
4561         (struct saved_reg): Add constructor.
4562         <value>: Now a gdbpy_ref<>.
4563
4564 2018-06-27  Tom Tromey  <[email protected]>
4565
4566         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4567
4568 2018-06-27  Simon Marchi  <[email protected]>
4569
4570         * gdb-gdb.py.in: Format using autopep8.
4571
4572 2018-06-27  Simon Marchi  <[email protected]>
4573
4574         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4575         (type_lookup_function): Recognize CORE_ADDR values.
4576
4577 2018-06-27  Simon Marchi  <[email protected]>
4578
4579         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4580         print tag_name.
4581
4582 2018-06-27  Simon Marchi  <[email protected]>
4583
4584         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4585         <__lt__>: Add.
4586
4587 2018-06-27  Simon Marchi  <[email protected]>
4588
4589         * gdb-gdb.py: Move to...
4590         * gdb-gdb.py.in: ... here.
4591         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4592         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4593         dependencies.
4594         (distclean): Remove gdb-gdb.py when cleaning.
4595         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4596         * configure: Re-generate.
4597
4598 2018-06-27  Pedro Alves  <[email protected]>
4599
4600         * proc-service.c (get_ps_regcache): New.
4601         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4602         (ps_lsetfpregs): Use it.
4603
4604 2018-06-27  Omair Javaid  <[email protected]>
4605
4606         PR gdb/21695
4607         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4608         (dwarf_decode_lines_1): Adjust.
4609
4610 2018-06-27  Simon Marchi  <[email protected]>
4611
4612         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4613         override.
4614         <info_proc>: Likewise.
4615
4616 2018-06-26  Joel Brobecker  <[email protected]>
4617
4618         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4619         to windows_fetch_one_register, and only handle the case of
4620         fetching one register.  Move the code that reloads the context
4621         and iterates over all registers if R is negative to...
4622         (windows_nat_target::fetch_registers): ... here.
4623         (do_windows_store_inferior_registers): Rename to
4624         windows_store_one_register, and only handle the case of storing
4625         one register.  Move the code that handles the case where r is
4626         negative to...
4627         (windows_nat_target::store_registers) ... here.
4628
4629 2018-06-26  Tom Tromey  <[email protected]>
4630
4631         PR rust/22574:
4632         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4633         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4634         Update.
4635         (rust_internal_print_type): Add podata parameter.
4636         (rust_print_type): Update.
4637
4638 2018-06-26  Tom Tromey  <[email protected]>
4639
4640         * typeprint.h (struct print_offset_data) <update, finish,
4641         maybe_print_hole>: New methods.
4642         <indentation>: New constant.
4643         * typeprint.c (print_offset_data::indentation): Define.
4644         (print_offset_data::maybe_print_hole, print_offset_data::update)
4645         (print_offset_data::finish): Move from c-typeprint.c and rename.
4646         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4647         (print_spaces_filtered_with_print_options): Update.
4648         (c_print_type_union_field_offset, maybe_print_hole)
4649         (c_print_type_struct_field_offset): Move to typeprint.c and
4650         rename.
4651         (c_type_print_base_struct_union): Update.
4652
4653 2018-06-25  Pedro Alves  <[email protected]>
4654
4655         * gdbthread.h (thread_info_ref, delete_thread)
4656         (delete_thread_silent, first_thread_of_inferior)
4657         (any_thread_of_inferior, switch_to_thread)
4658         (enable_thread_stack_temporaries)
4659         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4660         (get_last_thread_stack_temporary)
4661         (value_in_thread_stack_temporaries, can_access_registers_thread):
4662         Spell out "struct thread_info" instead of just "thread_info".
4663         * inferior.h (notice_new_inferior): Likewise.
4664
4665 2018-06-25  Pedro Alves  <[email protected]>
4666
4667         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4668         pass thread_info pointer to delete_thread.
4669         (windows_nat_target::detach): Pass inferior pointer to
4670         detach_inferior.
4671         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4672         delete_thread.
4673         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4674         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4675         and pass a thread_info pointer to delete_thread.
4676         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4677         pass thread_info pointer to delete_thread.
4678         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4679         delete_thread_silent call.
4680         * procfs.c (procfs_target::detach): Pass inferior pointer to
4681         detach_inferior.
4682         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4683         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4684         delete_thread_silent call.
4685         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4686         pass thread_info pointer to delete_thread.
4687         (windows_nat_target::detach): Pass inferior pointer to
4688         delete_inferior.
4689
4690 2018-06-22  Alan Hayward  <[email protected]>
4691
4692         * regcache.c (readable_regcache::read_part): Fix asserts.
4693         (reg_buffer::raw_collect_part): New function.
4694         (regcache::write_part): Fix asserts.
4695         (reg_buffer::raw_supply_part): New function.
4696         (regcache::transfer_regset_register): New helper function.
4697         (regcache::transfer_regset): Call new functions.
4698         (regcache_supply_regset): Use gdb_byte*.
4699         (regcache::supply_regset): Likewise.
4700         (regcache_collect_regset): Likewise.
4701         (regcache::collect_regset): Likewise.
4702         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4703         (reg_buffer::raw_supply_part): Likewise.
4704         (regcache::transfer_regset_register): Likewise.
4705         (regcache::transfer_regset): Use gdb_byte*.
4706
4707 2018-06-22  Alan Hayward  <[email protected]>
4708
4709         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4710
4711 2018-06-21  Pedro Alves  <[email protected]>
4712
4713         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4714         instead of a ptid_t.  All callers adjusted.
4715         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4716         adjusted.
4717         (print_ada_task_info, display_current_task_id, task_command_1):
4718         Adjust.
4719         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4720         inferior_thread.
4721         (breakpoint_kind): Adjust.
4722         (remove_breakpoints_pid): Rename to ...
4723         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4724         pointer.  All callers adjusted.
4725         (bpstat_clear_actions): Use inferior_thread.
4726         (get_bpstat_thread): New.
4727         (bpstat_do_actions): Use it.
4728         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4729         to take a thread_info pointer.  All callers adjusted.
4730         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4731         (breakpoint_re_set_thread): Use inferior_thread.
4732         * breakpoint.h (struct inferior): Forward declare.
4733         (bpstat_stop_status): Update.
4734         (remove_breakpoints_pid): Delete.
4735         (remove_breakpoints_inf): New.
4736         * bsd-uthread.c (bsd_uthread_target::wait)
4737         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4738         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4739         (maint_btrace_packet_history_cmd)
4740         (maint_btrace_clear_packet_history_cmd): Adjust.
4741         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4742         inferior_thread.
4743         * cli/cli-interp.c: Include "inferior.h".
4744         * common/refcounted-object.h (struct
4745         refcounted_object_ref_policy): New.
4746         * compile/compile-object-load.c: Include gdbthread.h.
4747         (store_regs): Use inferior_thread.
4748         * corelow.c (core_target::close): Use current_inferior.
4749         (core_target_open): Adjust to use first_thread_of_inferior and use
4750         the current inferior.
4751         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4752         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4753         <thread>: ... this new field.  All references adjusted.
4754         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4755         Take a thread_info pointer instead of a ptid_t.
4756         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4757         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4758         thread_info pointer instead of a ptid_t.
4759         * elfread.c: Include "inferior.h".
4760         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4761         Use inferior_thread.
4762         * eval.c (evaluate_subexp): Likewise.
4763         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4764         inferior_thread.
4765         * gdb_proc_service.h (struct thread_info): Forward declare.
4766         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4767         <thread>: ... this new field.  All references adjusted.
4768         * gdbarch.h, gdbarch.c: Regenerate.
4769         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4770         'thread' parameter.  All implementations and callers adjusted.
4771         * gdbthread.h (thread_info) <set_running>: New method.
4772         (delete_thread, delete_thread_silent): Take a thread_info pointer
4773         instead of a ptid.
4774         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4775         (first_thread_of_process): Delete, replaced by ...
4776         (first_thread_of_inferior): ... this new function.  All callers
4777         adjusted.
4778         (any_live_thread_of_process): Delete, replaced by ...
4779         (any_live_thread_of_inferior): ... this new function.  All callers
4780         adjusted.
4781         (switch_to_thread, switch_to_no_thread): Declare.
4782         (is_executing): Delete.
4783         (enable_thread_stack_temporaries): Update comment.
4784         <enable_thread_stack_temporaries>: Take a thread_info pointer
4785         instead of a ptid_t.  Incref the thread.
4786         <~enable_thread_stack_temporaries>: Decref the thread.
4787         <m_ptid>: Delete
4788         <m_thr>: New.
4789         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4790         (get_last_thread_stack_temporary)
4791         (value_in_thread_stack_temporaries, can_access_registers_thread):
4792         Take a thread_info pointer instead of a ptid_t.  All callers
4793         adjusted.
4794         * infcall.c (get_call_return_value): Use inferior_thread.
4795         (run_inferior_call): Work with thread pointers instead of ptid_t.
4796         (call_function_by_hand_dummy): Work with thread pointers instead
4797         of ptid_t.  Use thread_info_ref.
4798         * infcmd.c (proceed_thread_callback): Access thread's state
4799         directly.
4800         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4801         access thread's state directly.
4802         (continue_command): Use inferior_thread.
4803         (info_program_command): Use find_thread_ptid and access thread
4804         state directly.
4805         (proceed_after_attach_callback): Use thread state directly.
4806         (notice_new_inferior): Take a thread_info pointer instead of a
4807         ptid_t.  All callers adjusted.
4808         (exit_inferior): Take an inferior pointer instead of a pid.  All
4809         callers adjusted.
4810         (exit_inferior_silent): New.
4811         (detach_inferior): Delete.
4812         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4813         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4814         (detach_inferior_command, kill_inferior_command): Use
4815         find_inferior_id instead of valid_gdb_inferior_id and
4816         gdb_inferior_id_to_pid.
4817         (inferior_command): Use inferior and thread pointers.
4818         * inferior.h (struct thread_info): Forward declare.
4819         (notice_new_inferior): Take a thread_info pointer instead of a
4820         ptid_t.  All callers adjusted.
4821         (detach_inferior): Delete declaration.
4822         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4823         instead of a pid.  All callers adjusted.
4824         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4825         (valid_gdb_inferior_id): Delete.
4826         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4827         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4828         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4829         ...
4830         <inf>: ... this new field.
4831         <step_ptid>: Delete, replaced by ...
4832         <step_thread>: ... this new field.
4833         (get_displaced_stepping_state): Take an inferior pointer instead
4834         of a pid.  All callers adjusted.
4835         (displaced_step_in_progress_any_inferior): Adjust.
4836         (displaced_step_in_progress_thread): Take a thread pointer instead
4837         of a ptid_t.  All callers adjusted.
4838         (displaced_step_in_progress, add_displaced_stepping_state): Take
4839         an inferior pointer instead of a pid.  All callers adjusted.
4840         (get_displaced_step_closure_by_addr): Adjust.
4841         (remove_displaced_stepping_state): Take an inferior pointer
4842         instead of a pid.  All callers adjusted.
4843         (displaced_step_prepare_throw, displaced_step_prepare)
4844         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4845         All callers adjusted.
4846         (start_step_over): Adjust.
4847         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4848         displaced step queue.
4849         (do_target_resume): Adjust.
4850         (fetch_inferior_event): Use inferior_thread.
4851         (context_switch, get_inferior_stop_soon): Take an
4852         execution_control_state pointer instead of a ptid_t.  All callers
4853         adjusted.
4854         (switch_to_thread_cleanup): Delete.
4855         (stop_all_threads): Use scoped_restore_current_thread.
4856         * inline-frame.c: Include "gdbthread.h".
4857         (inline_state) <inline_state>: Take a thread pointer instead of a
4858         ptid_t.  All callers adjusted.
4859         <ptid>: Delete, replaced by ...
4860         <thread>: ... this new field.
4861         (find_inline_frame_state): Take a thread pointer instead of a
4862         ptid_t.  All callers adjusted.
4863         (skip_inline_frames, step_into_inline_frame)
4864         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4865         pointer instead of a ptid_t.  All callers adjusted.
4866         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4867         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4868         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4869         pointers directly.
4870         * linux-nat.c (get_detach_signal): Likewise.
4871         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4872         (thread_db_notice_clone): Adjust.
4873         (thread_db_find_new_threads_silently)
4874         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4875         a thread pointer instead of a ptid_t.  All callers adjusted.
4876         * mi/mi-cmd-var.c: Include "inferior.h".
4877         (mi_cmd_var_update_iter): Update to use thread pointers.
4878         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4879         inferior directly.
4880         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4881         out to ...
4882         (mi_output_running): ... this new function.
4883         (mi_on_resume_1): Adjust to use it.
4884         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4885         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4886         directly.
4887         (interrupt_thread_callback): : Adjust to use thread and inferior
4888         pointers.
4889         * proc-service.c: Include "gdbthread.h".
4890         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4891         * progspace-and-thread.c: Include "inferior.h".
4892         * progspace.c: Include "inferior.h".
4893         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4894         hold a reference to an inferior_object.
4895         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4896         inferior_thread.
4897         * python/py-inferior.c (struct inferior_object): Give the type a
4898         tag name instead of a typedef.
4899         (python_on_normal_stop): No need to check if the current thread is
4900         listed.
4901         (inferior_to_inferior_object): Change return type to
4902         inferior_object.  All callers adjusted.
4903         (find_thread_object): Delete, bits factored out to ...
4904         (thread_to_thread_object): ... this new function.
4905         * python/py-infthread.c (create_thread_object): Use
4906         inferior_to_inferior_object.
4907         (thpy_is_stopped): Use thread pointer directly.
4908         (gdbpy_selected_thread): Use inferior_thread.
4909         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4910         field, replaced with ...
4911         <thread>: ... this new field.  All users adjusted.
4912         (btpy_insn_or_gap_new): Drop const.
4913         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4914         callers adjusted.
4915         * python/py-record.c: Include "gdbthread.h".
4916         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4917         a ptid_t.  All callers adjusted.
4918         (gdbpy_current_recording): Use inferior_thread.
4919         * python/py-record.h (recpy_record_object) <ptid>: Delete
4920         field, replaced with ...
4921         <thread>: ... this new field.  All users adjusted.
4922         (recpy_element_object) <ptid>: Delete
4923         field, replaced with ...
4924         <thread>: ... this new field.  All users adjusted.
4925         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4926         a ptid_t.  All callers adjusted.
4927         * python/py-threadevent.c: Include "gdbthread.h".
4928         (get_event_thread): Use thread_to_thread_object.
4929         * python/python-internal.h (struct inferior_object): Forward
4930         declare.
4931         (find_thread_object, find_inferior_object): Delete declarations.
4932         (thread_to_thread_object, inferior_to_inferior_object): New
4933         declarations.
4934         * record-btrace.c: Include "inferior.h".
4935         (require_btrace_thread): Use inferior_thread.
4936         (record_btrace_frame_sniffer)
4937         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4938         (get_thread_current_frame): Use scoped_restore_current_thread and
4939         switch_to_thread.
4940         (get_thread_current_frame): Use thread pointer directly.
4941         (record_btrace_replay_at_breakpoint): Use thread's inferior
4942         pointer directly.
4943         * record-full.c: Include "inferior.h".
4944         * regcache.c: Include "gdbthread.h".
4945         (get_thread_arch_regcache): Use the inferior's address space
4946         directly.
4947         (get_thread_regcache, registers_changed_thread): New.
4948         * regcache.h (get_thread_regcache(thread_info *thread)): New
4949         overload.
4950         (registers_changed_thread): New.
4951         (remote_target) <remote_detach_1>: Swap order of parameters.
4952         (remote_add_thread): <remote_add_thread>: Return the new thread.
4953         (get_remote_thread_info(ptid_t)): New overload.
4954         (remote_target::remote_notice_new_inferior): Use thread pointers
4955         directly.
4956         (remote_target::process_initial_stop_replies): Use
4957         thread_info::set_running.
4958         (remote_target::remote_detach_1, remote_target::detach)
4959         (extended_remote_target::detach): Adjust.
4960         * stack.c (frame_show_address): Use inferior_thread.
4961         * target-debug.h (target_debug_print_thread_info_pp): New.
4962         * target-delegates.c: Regenerate.
4963         * target.c (default_thread_address_space): Delete.
4964         (memory_xfer_partial_1): Use current_inferior.
4965         (target_detach): Use current_inferior.
4966         (target_thread_address_space): Delete.
4967         (generic_mourn_inferior): Use current_inferior.
4968         * target.h (struct target_ops) <thread_address_space>: Delete.
4969         (target_thread_address_space): Delete.
4970         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4971         pointers directly.
4972         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4973         thread pointer instead of a ptid_t.  Adjust all callers.
4974         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4975         (first_thread_of_process): Delete, replaced by ...
4976         (first_thread_of_inferior): ... this new function.  All callers
4977         adjusted.
4978         (any_thread_of_process): Rename to ...
4979         (any_thread_of_inferior): ... this, and take an inferior pointer.
4980         (any_live_thread_of_process): Rename to ...
4981         (any_live_thread_of_inferior): ... this, and take an inferior
4982         pointer.
4983         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4984         (value_in_thread_stack_temporaries)
4985         (get_last_thread_stack_temporary): Take a thread pointer instead
4986         of a ptid_t.  Adjust all callers.
4987         (thread_info::set_running): New.
4988         (validate_registers_access): Use inferior_thread.
4989         (can_access_registers_ptid): Rename to ...
4990         (can_access_registers_thread): ... this, and take a thread
4991         pointer.
4992         (print_thread_info_1): Adjust to compare thread pointers instead
4993         of ptids.
4994         (switch_to_no_thread, switch_to_thread): Make extern.
4995         (scoped_restore_current_thread::~scoped_restore_current_thread):
4996         Use m_thread pointer directly.
4997         (scoped_restore_current_thread::scoped_restore_current_thread):
4998         Use inferior_thread.
4999         (thread_command): Use thread pointer directly.
5000         (thread_num_make_value_helper): Use inferior_thread.
5001         * top.c (execute_command): Use inferior_thread.
5002         * tui/tui-interp.c: Include "inferior.h".
5003         * varobj.c (varobj_create): Use inferior_thread.
5004         (value_of_root_1): Use find_thread_global_id instead of
5005         global_thread_id_to_ptid.
5006
5007 2018-06-21  Alan Hayward  <[email protected]>
5008
5009         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5010         possible.
5011         (regcache::write_part): Likewise.
5012         (readable_regcache::cooked_read_part): Update comment.
5013         (readable_regcache::cooked_write_part): Likewise.
5014         * regcache.h: (readable_regcache::read_part): Likewise.
5015         (regcache::write_part): Likewise.
5016
5017 2018-06-21  Richard Bunt  <[email protected]>
5018             Dirk Schubert  <[email protected]>
5019
5020         * aarch64-linux-nat.c (post_attach): New.
5021         (aarch64_linux_nat_target::post_attach): Override post_attach to
5022         record the number of hardware debug registers.
5023
5024 2018-06-20  Tom Tromey  <[email protected]>
5025
5026         * python/py-param.c (add_setshow_generic): Make parameters const.
5027         (parmpy_init): Update.
5028
5029 2018-06-20  Simon Marchi  <[email protected]>
5030
5031         * regcache.h (regcache_cooked_read_ftype): Rename to...
5032         (register_read_ftype): ...this, change type to function_view.
5033         (class reg_buffer) <save>: Remove src parameter.
5034         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5035         parameter non-const in first overload.  Remove src parameter in
5036         second overload.
5037         * regcache.c (do_cooked_read): Remove.
5038         (readonly_detached_regcache::readonly_detached_regcache): Make
5039         parameter non-const, adjust call to other constructor.
5040         (reg_buffer::save): Remove src parameter.
5041         * frame.c (do_frame_register_read): Remove.
5042         (frame_save_as_regcache): Use lambda function.
5043         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5044         parameter to ppu2spu_data *.
5045         (ppu2spu_sniffer): Use lambda function.
5046
5047 2018-06-20  Simon Marchi  <[email protected]>
5048
5049         * record-full.c (record_full_target::insert_breakpoint): Remove
5050         "struct" keyword, add const.
5051
5052 2018-06-19  Simon Marchi  <[email protected]>
5053
5054         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5055         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5056         * configure.ac: Remove AC_PREREQ, add missing quoting.
5057         * gnulib/configure.ac: Modernize usage of
5058         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5059         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5060         (AUTOMAKE_VERSION): Bump to 1.15.1.
5061         * configure: Re-generate.
5062         * config.in: Re-generate.
5063         * aclocal.m4: Re-generate.
5064         * gnulib/aclocal.m4: Re-generate.
5065         * gnulib/config.in: Re-generate.
5066         * gnulib/configure: Re-generate.
5067         * gnulib/import/Makefile.in: Re-generate.
5068
5069 2018-06-19  Pedro Alves  <[email protected]>
5070
5071         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5072         (lookup_minimal_symbol_by_pc_section): ... here with
5073         gdb_assert_not_reached added.
5074
5075 2018-06-19  Pedro Alves  <[email protected]>
5076
5077         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5078         parameter with a block parameter.  Compare location's block symbol
5079         with the frame's block instead of addresses.
5080         (skip_inline_frames): Pass the current block instead of the
5081         frame's address.  Break out as soon as we determine the frame
5082         should not be skipped.
5083
5084 2018-06-18  Tom Tromey  <[email protected]>
5085
5086         * solib-aix.c (solib_aix_get_section_offsets): Return
5087         unique_xmalloc_ptr.
5088         (solib_aix_solib_create_inferior_hook): Update.
5089
5090 2018-06-18  Tom Tromey  <[email protected]>
5091
5092         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5093
5094 2018-06-18  Tom Tromey  <[email protected]>
5095
5096         * solib-frv.c (frv_relocate_main_executable): Use
5097         unique_xmalloc_ptr.
5098         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5099         unique_xmalloc_ptr.
5100
5101 2018-06-18  Tom Tromey  <[email protected]>
5102
5103         * objfiles.h (inhibit_section_map_updates): Update.
5104         (resume_section_map_updates, resume_section_map_updates_cleanup):
5105         Remove.
5106         * solib-svr4.c (svr4_handle_solib_event): Update.
5107         * objfiles.c (inhibit_section_map_updates): Return
5108         scoped_restore_tmpl<int>.
5109         (resume_section_map_updates, resume_section_map_updates_cleanup):
5110         Remove.
5111
5112 2018-06-18  Tom Tromey  <[email protected]>
5113
5114         * valprint.h (read_string): Update.
5115         * valprint.c (read_string): Change type of "buffer".
5116         (val_print_string): Update.
5117         * python/py-value.c (valpy_string): Update.
5118         * language.h (struct language_defn) <la_get_string>: Change
5119         type of "buffer".
5120         (default_get_string, c_get_string): Update.
5121         * language.c (default_get_string): Change type of "buffer".
5122         * guile/scm-value.c (gdbscm_value_to_string): Update.
5123         * c-lang.c (c_get_string): Change type of "buffer".
5124
5125 2018-06-18  Tom Tromey  <[email protected]>
5126
5127         * ser-mingw.c (struct pipe_state_destroyer): New.
5128         (pipe_state_up): New typedef.
5129         (cleanup_pipe_state): Remove.
5130         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5131
5132 2018-06-18  Tom Tromey  <[email protected]>
5133
5134         * rust-lang.h (rust_yyerror): Don't declare.
5135         * rust-lang.c (rust_language_defn): Update.
5136         * rust-exp.y (yyerror): Now static.
5137         * parse.c (parse_exp_in_context_1): Update.
5138         * p-lang.h (p_yyerror): Don't declare.
5139         * p-lang.c (p_language_defn): Update.
5140         * p-exp.y (yyerror): Now static.
5141         * opencl-lang.c (opencl_language_defn): Update.
5142         * objc-lang.c (objc_language_defn): Update.
5143         * m2-lang.h (m2_yyerror): Don't declare.
5144         * m2-lang.c (m2_language_defn): Update.
5145         * m2-exp.y (yyerror): Now static.
5146         * language.h (struct language_defn) <la_error>: Remove.
5147         * language.c (unk_lang_error): Remove.
5148         (unknown_language_defn, auto_language_defn): Remove.
5149         * go-lang.h (go_yyerror): Don't declare.
5150         * go-lang.c (go_language_defn): Update.
5151         * go-exp.y (yyerror): Now static.
5152         * f-lang.h (f_yyerror): Don't declare.
5153         * f-lang.c (f_language_defn): Update.
5154         * f-exp.y (yyerror): Now static.
5155         * d-lang.h (d_yyerror): Don't declare.
5156         * d-lang.c (d_language_defn): Update.
5157         * d-exp.y (yyerror): Now static.
5158         * c-lang.h (c_yyerror): Don't declare.
5159         * c-lang.c (c_language_defn, cplus_language_defn)
5160         (asm_language_defn, minimal_language_defn): Update.
5161         * c-exp.y (yyerror): Now static.
5162         * ada-lang.h (ada_yyerror): Don't declare.
5163         * ada-lang.c (ada_language_defn): Update.
5164         * ada-exp.y (yyerror): Now static.
5165
5166 2018-06-18  Alan Hayward  <[email protected]>
5167
5168         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5169         (store_sveregs_to_thread): Likewise.
5170         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5171         (aarch64_linux_store_inferior_registers): Likewise.
5172         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5173         function.
5174         (aarch64_sve_regs_copy_to_regcache): Likewise.
5175         (aarch64_sve_regs_copy_from_regcache): Likewise.
5176         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5177         declaration.
5178         (aarch64_sve_regs_copy_to_regcache): Likewise.
5179         (aarch64_sve_regs_copy_from_regcache): Likewise.
5180         (sve_context): Structure from Linux headers.
5181         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5182         (SVE_SIG_ZREG_SIZE): Likewise.
5183         (SVE_SIG_PREG_SIZE): Likewise.
5184         (SVE_SIG_FFR_SIZE): Likewise.
5185         (SVE_SIG_REGS_OFFSET): Likewise.
5186         (SVE_SIG_ZREGS_OFFSET): Likewise.
5187         (SVE_SIG_ZREG_OFFSET): Likewise.
5188         (SVE_SIG_ZREGS_SIZE): Likewise.
5189         (SVE_SIG_PREGS_OFFSET): Likewise.
5190         (SVE_SIG_PREG_OFFSET): Likewise.
5191         (SVE_SIG_PREGS_SIZE): Likewise.
5192         (SVE_SIG_FFR_OFFSET): Likewise.
5193         (SVE_SIG_REGS_SIZE): Likewise.
5194         (SVE_SIG_CONTEXT_SIZE): Likewise.
5195         (SVE_PT_REGS_MASK): Likewise.
5196         (SVE_PT_REGS_FPSIMD): Likewise.
5197         (SVE_PT_REGS_SVE): Likewise.
5198         (SVE_PT_VL_INHERIT): Likewise.
5199         (SVE_PT_VL_ONEXEC): Likewise.
5200         (SVE_PT_REGS_OFFSET): Likewise.
5201         (SVE_PT_FPSIMD_OFFSET): Likewise.
5202         (SVE_PT_FPSIMD_SIZE): Likewise.
5203         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5204         (SVE_PT_SVE_PREG_SIZE): Likewise.
5205         (SVE_PT_SVE_FFR_SIZE): Likewise.
5206         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5207         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5208         (__SVE_SIG_TO_PT): Likewise.
5209         (SVE_PT_SVE_OFFSET): Likewise.
5210         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5211         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5212         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5213         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5214         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5215         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5216         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5217         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5218         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5219         (SVE_PT_SVE_SIZE): Likewise.
5220         (SVE_PT_SIZE): Likewise.
5221         (HAS_SVE_STATE): New define.
5222
5223 2018-06-18  Alan Hayward  <[email protected]>
5224
5225         * nat/aarch64-sve-linux-sigcontext.h: New file.
5226         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5227         new files.
5228         (SVE_VQ_MIN): Likewise.
5229         (SVE_VQ_MAX): Likewise.
5230         (SVE_VL_MIN): Likewise.
5231         (SVE_VL_MAX): Likewise.
5232         (SVE_NUM_ZREGS): Likewise.
5233         (SVE_NUM_PREGS): Likewise.
5234         (sve_vl_valid): Likewise.
5235         (struct user_sve_header): Likewise.
5236
5237 2018-06-16  Andrew Burgess  <[email protected]>
5238             Richard Bunt <[email protected]>
5239
5240         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5241         was requested by GDB.
5242
5243 2018-06-15  Tom de Vries  <[email protected]>
5244
5245         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5246
5247 2018-06-14  Simon Marchi  <[email protected]>
5248
5249         * gnulib/update-gnulib.sh: Print expected versions of
5250         autoconf/aclocal.
5251
5252 2018-06-14  Simon Marchi  <[email protected]>
5253
5254         * arch-utils.c (default_type_align): Use type_length_units.
5255         * gdbtypes.c (type_align): Use type_length_units.
5256
5257 2018-06-14  Philippe Waroquiers  <[email protected]>
5258
5259         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5260         of 'define' command.
5261
5262 2018-06-14  Tom de Vries  <[email protected]>
5263
5264         PR cli/22573
5265         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5266         get_no_prettyformat_print_options.
5267
5268 2018-06-13  Simon Marchi  <[email protected]>
5269
5270         * sparc-nat.h: Include target.h.
5271         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5272         <fetch_registers>: Remove this argument in function call.
5273         <store_registers>: Remove this argument in function call, remove
5274         extra semicolon.
5275         <low_forget_process>: Call sparc64_forget_process instead of
5276         sparc_forget_process.
5277
5278 2018-06-13  Rainer Orth  <[email protected]>
5279
5280         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5281         (procfs_target::make_corefile_notes): Adjust to new
5282         target_read_alloc return type.
5283
5284 2018-06-12  Andrew Burgess  <[email protected]>
5285             Stephen Roberts  <[email protected]>
5286
5287         PR gdb/22882
5288         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5289         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5290         Move should_notify_stop local into more inner scope.
5291
5292 2018-06-12  Andrew Burgess  <[email protected]>
5293             Stephen Roberts  <[email protected]>
5294
5295         PR gdb/22882
5296         * infrun.c (resume_1): Add call to mark_async_event_handler.
5297
5298 2018-06-12  Andrew Burgess  <[email protected]>
5299
5300         * infrun.c (do_target_wait): Change old version of $pc printed.
5301
5302 2018-06-11  Simon Marchi  <[email protected]>
5303
5304         * dwarf2read.c (read_index_from_section): Rename to...
5305         (read_gdb_index_from_section): ... this, update all callers.
5306         (dwarf2_read_index): Rename to...
5307         (dwarf2_read_gdb_index): ... this, update all callers.
5308
5309 2018-06-11  John David Anglin  <[email protected]>
5310
5311         * gdb/hppa-linux-nat.c
5312         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5313         hppa_linux_nat_target::fetch_registers.
5314
5315 2018-06-11  Alan Hayward  <[email protected]>
5316
5317         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5318         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5319         (AARCH64_DWARF_SVE_FFR): Likewise.
5320         (AARCH64_DWARF_SVE_P0): Likewise.
5321         (AARCH64_DWARF_SVE_Z0): Likewise.
5322
5323 2018-06-11  Alan Hayward  <[email protected]>
5324
5325         * common/common-regcache.h (raw_compare): New function.
5326         * regcache.c (regcache::raw_compare): Likewise.
5327         * regcache.h (regcache::raw_compare): New declaration.
5328
5329 2018-06-11  Alan Hayward  <[email protected]>
5330
5331         * common/common-regcache.h (reg_buffer_common): New structure.
5332         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5333         (reg_buffer::raw_supply): Likewise.
5334         (reg_buffer::raw_supply_integer): Likewise.
5335         (reg_buffer::raw_supply_zeroed): Likewise.
5336         (reg_buffer::raw_collect): Likewise.
5337         (reg_buffer::raw_collect_integer): Likewise.
5338         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5339         (reg_buffer::raw_supply): Likewise.
5340         (reg_buffer::raw_supply_integer): Likewise.
5341         (reg_buffer::raw_supply_zeroed): Likewise.
5342         (reg_buffer::raw_collect): Likewise.
5343         (reg_buffer::raw_collect_integer): Likewise.
5344
5345 2018-06-10  Tom Tromey  <[email protected]>
5346
5347         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5348         (class remote_state) <stop_reply_queue>: Now std::vector.
5349         (remote_state::~remote_state)
5350         (remote_target::stop_reply_queue_length): Update.
5351         (struct queue_iter_param, remove_child_of_pending_fork)
5352         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5353         (check_pending_event_prevents_wildcard_vcont_callback)
5354         (remove_stop_reply_for_inferior)
5355         (remove_stop_reply_of_remote_state)
5356         (remote_notif_remove_once_on_match)
5357         (stop_reply_match_ptid_and_ws)
5358         (remote_kill_child_of_pending_fork): Remove.
5359         (remote_target::remove_new_fork_children)
5360         (remote_target::check_pending_events_prevent_wildcard_vcont)
5361         (remote_target::discard_pending_stop_replies)
5362         (remote_target::discard_pending_stop_replies_in_queue)
5363         (remote_target::remote_notif_remove_queued_reply)
5364         (remote_target::queued_stop_reply)
5365         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5366         (remote_target::wait, remote_target::kill_new_fork_children)
5367         (remote_target::async): Update.
5368
5369 2018-06-10  Tom Tromey  <[email protected]>
5370
5371         * record-full.c (record_full_arch_list_cleanups): Remove.
5372         (record_full_message): Use try/catch.
5373         (record_full_wait_cleanups): Remove.
5374         (record_full_wait_1): Use try/catch.
5375         (record_full_restore): Likewise.
5376
5377 2018-06-10  Tom Tromey  <[email protected]>
5378
5379         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5380         declare VEC.  Add constructor.
5381         <in_target_beneath>: Now bool.
5382         (record_full_breakpoints): Now a std::vector, static.
5383         (record_full_sync_record_breakpoints)
5384         (record_full_init_record_breakpoints)
5385         (record_full_target::insert_breakpoint)
5386         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5387
5388 2018-06-10  Simon Marchi  <[email protected]>
5389
5390         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5391         * serial.c (serial_interface_lookup): Remove struct keyword.
5392
5393 2018-06-10  Tom Tromey  <[email protected]>
5394
5395         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5396         method.
5397         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5398         a method.
5399         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5400         method.
5401         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5402         "beneath" as a method.
5403         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5404         Use "beneath" as a method.
5405
5406 2018-06-10  Tom Tromey  <[email protected]>
5407
5408         * tracefile.c (struct trace_file_writer_deleter): New.
5409         <operator()>: Rename from trace_file_writer_xfree.
5410         (trace_file_writer_up): New typedef.
5411         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5412
5413 2018-06-09  Simon Marchi  <[email protected]>
5414
5415         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5416         <m_registers, m_register_status>: Change type to
5417         std::unique_ptr.
5418         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5419         XCNEWVEC.
5420
5421 2018-06-09  Simon Marchi  <[email protected]>
5422
5423         * common/common-regcache.h (enum register_status): Add
5424         underlying type "signed char".
5425         * regcache.h (reg_buffer) <m_register_status>: Change type to
5426         register_status *.
5427         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5428         register_status instead of signed char.
5429         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5430         (reg_buffer::get_register_status): Remove cast.
5431         (readable_regcache::raw_read): Remove cast.
5432         (readable_regcache::cooked_read): Remove cast.
5433
5434 2018-06-09  Tom Tromey  <[email protected]>
5435
5436         * source.c (reverse_search_command, forward_search_command): Use
5437         scoped_fd.
5438
5439 2018-06-09  Tom Tromey  <[email protected]>
5440
5441         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5442         (serial_ops_list): Now static, std::vector.
5443         (serial_interface_lookup, serial_add_interface): Update.
5444
5445 2018-06-09  Tom Tromey  <[email protected]>
5446
5447         * dwarf2read.c (process_cu_includes): Update.
5448         (process_full_comp_unit): Update.
5449         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5450         std::vector.
5451
5452 2018-06-08  Paul Koning  <[email protected]>
5453
5454         PR gdb/23252
5455
5456         * python/python.c (do_start_initialization):
5457         Avoid call to internal Python API.
5458         (init__gdb_module): New function.
5459
5460 2018-06-08  Gary Benson <[email protected]>
5461
5462         * linux-thread-db.c (valprint.h): New include.
5463         (struct check_thread_db_info): New structure.
5464         (check_thread_db_on_load, tdb_testinfo): New static globals.
5465         (check_thread_db, check_thread_db_callback): New functions.
5466         (try_thread_db_load_1): Run integrity checks if requested.
5467         (maintenance_check_libthread_db): New function.
5468         (_initialize_thread_db): Register "maint check libthread-db"
5469         and "maint set/show check-libthread-db".
5470         * NEWS: Mention the above new commands.
5471
5472 2018-06-08  Tom Tromey  <[email protected]>
5473
5474         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5475         now a method.
5476
5477 2018-06-08  Tom Tromey  <[email protected]>
5478
5479         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5480
5481 2018-06-08  Tom Tromey  <[email protected]>
5482
5483         * common/btrace-common.h (struct btrace_data): Add constructor,
5484         destructor, move assignment operator.
5485         <empty, clear, fini>: New methods.
5486         <format>: Initialize.
5487         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5488         (btrace_data_empty): Don't declare.
5489         * common/btrace-common.c (btrace_data_init): Remove.
5490         (btrace_data::fini): Rename from btrace_data_fini.
5491         (btrace_data::empty): Rename from btrace_data_empty.
5492         (btrace_data::clear): Rename from btrace_data_clear.  Return
5493         bool.
5494         * btrace.h (make_cleanup_btrace_data): Don't declare.
5495         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5496         (parse_xml_btrace): Update.
5497         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5498         (maint_btrace_clear_packet_history_cmd): Update.
5499
5500 2018-06-07  Pedro Alves  <[email protected]>
5501
5502         * target.h (target_ops) <beneath>: Now a method.  All references
5503         updated.
5504         (class target_stack): New.
5505         * target.c (g_target_stack): New.
5506         (g_current_top_target): Delete.
5507         (current_top_target): Get the top target out of g_target_stack.
5508         (target_stack::push, target_stack::unpush): New.
5509         (push_target, unpush_target): Reimplement.
5510         (target_is_pushed): Reimplement in terms of g_target_stack.
5511         (target_ops::beneath, target_stack::find_beneath): New.
5512
5513 2018-06-07  Pedro Alves  <[email protected]>
5514
5515         * target.h (find_target_beneath): Delete declaration.
5516         * target.c (find_target_beneath): Delete definition.
5517         * aix-thread.c: All callers of find_target_beneath adjusted to
5518         call target_ops::beneath instead.
5519         * bsd-uthread.c: Likewise.
5520         * linux-thread-db.c: Likewise.
5521         * ravenscar-thread.c: Likewise.
5522         * sol-thread.c: Likewise.
5523         * spu-multiarch.c: Likewise.
5524
5525 2018-06-07  Pedro Alves  <[email protected]>
5526
5527         * target.h (target_ops) <beneath>: Now a method.  All references
5528         updated.
5529         (target_ops) <m_beneath>: New.
5530         * target.c (target_ops::beneath): New.
5531         * corelow.c: Adjust all references to target_ops::beneath.
5532         * linux-thread-db.c: Likewise.
5533         * make-target-delegates: Likewise.
5534         * record-btrace.c: Likewise.
5535         * record-full.c: Likewise.
5536         * remote.c: Likewise.
5537         * target.c: Likewise.
5538         * target-delegates.c: Regenerate.
5539
5540 2018-06-07  Pedro Alves  <[email protected]>
5541
5542         * target.h (target_stack): Delete.
5543         (current_top_target): Declare function.
5544         * target.c (target_stack): Delete.
5545         (g_current_top_target): New.
5546         (current_top_target): New function.
5547         * auxv.c: Use current_top_target instead of target_stack
5548         throughout.
5549         * avr-tdep.c: Likewise.
5550         * breakpoint.c: Likewise.
5551         * corefile.c: Likewise.
5552         * elfread.c: Likewise.
5553         * eval.c: Likewise.
5554         * exceptions.c: Likewise.
5555         * frame.c: Likewise.
5556         * gdbarch-selftests.c: Likewise.
5557         * gnu-v3-abi.c: Likewise.
5558         * ia64-tdep.c: Likewise.
5559         * ia64-vms-tdep.c: Likewise.
5560         * infcall.c: Likewise.
5561         * infcmd.c: Likewise.
5562         * infrun.c: Likewise.
5563         * linespec.c: Likewise.
5564         * linux-tdep.c: Likewise.
5565         * minsyms.c: Likewise.
5566         * ppc-linux-nat.c: Likewise.
5567         * ppc-linux-tdep.c: Likewise.
5568         * procfs.c: Likewise.
5569         * regcache.c: Likewise.
5570         * remote.c: Likewise.
5571         * rs6000-tdep.c: Likewise.
5572         * s390-linux-nat.c: Likewise.
5573         * s390-tdep.c: Likewise.
5574         * solib-aix.c: Likewise.
5575         * solib-darwin.c: Likewise.
5576         * solib-dsbt.c: Likewise.
5577         * solib-spu.c: Likewise.
5578         * solib-svr4.c: Likewise.
5579         * solib-target.c: Likewise.
5580         * sparc-tdep.c: Likewise.
5581         * sparc64-tdep.c: Likewise.
5582         * spu-tdep.c: Likewise.
5583         * symfile.c: Likewise.
5584         * symtab.c: Likewise.
5585         * target-descriptions.c: Likewise.
5586         * target-memory.c: Likewise.
5587         * target.c: Likewise.
5588         * target.h: Likewise.
5589         * tracefile-tfile.c: Likewise.
5590         * tracepoint.c: Likewise.
5591         * valops.c: Likewise.
5592         * valprint.c: Likewise.
5593         * value.c: Likewise.
5594         * windows-tdep.c: Likewise.
5595         * mi/mi-main.c: Likewise.
5596
5597 2018-06-07  Tom Tromey  <[email protected]>
5598
5599         * valprint.h (build_address_symbolic): Declare.
5600         * printcmd.c (print_address_symbolic): Update.
5601         (build_address_symbolic): Change "name" and "filename" to
5602         std::string.
5603         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5604         Update.
5605         * defs.h (build_address_symbolic): Remove declaration.
5606
5607 2018-06-07  Alan Hayward  <[email protected]>
5608
5609         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5610         (aarch64_vnv_type): Add function.
5611         (aarch64_pseudo_register_name): Add V regs for SVE.
5612         (aarch64_pseudo_register_type): Likewise.
5613         (aarch64_pseudo_register_reggroup_p): Likewise.
5614         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5615         (aarch64_pseudo_read_value): Add V regs for SVE.
5616         (aarch64_pseudo_write_2): Use V0 offset for SVE
5617         (aarch64_pseudo_write): Add V regs for SVE.
5618         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5619
5620 2018-06-06  Sergio Durigan Junior  <[email protected]>
5621
5622         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5623         (sve_vl_from_vq): Likewise.
5624
5625 2018-06-05  Tom Tromey  <[email protected]>
5626
5627         * cli/cli-cmds.c (show_version): Update.
5628         * top.c (print_gdb_version): Add "interactive" parameter.
5629         Update.
5630         * main.c (captured_main_1): Update.
5631         * top.h (print_gdb_version): Add "interactive" parameter and a
5632         comment.
5633
5634 2018-06-05  David Malcolm  <[email protected]>
5635
5636         * common/enum-flags.h: Add trailing semicolon to example in
5637         comment.
5638
5639 2018-06-05  Tom Tromey  <[email protected]>
5640
5641         PR cli/12326:
5642         * NEWS: Add entry about pager.
5643         * utils.c (pagination_disabled_for_command): New global.
5644         (prompt_for_continue): Allow "c" response to prompt.
5645         (reinitialize_more_filter): Clear
5646         pagination_disabled_for_command.
5647         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5648
5649 2018-06-04  Tom Tromey  <[email protected]>
5650
5651         * ada-lang.h (ada_lookup_symbol_list): Update.
5652         * ada-lang.c (resolve_subexp): Update.
5653         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5654         parameter.
5655         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5656         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5657         results parameter to std::vector.
5658         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5659         Update.
5660         * ada-exp.y (block_lookup): Update.
5661         (select_possible_type_sym): Change type of syms.  Remove nsyms
5662         parameter.
5663         (write_var_or_type, write_name_assoc): Update.
5664
5665 2018-06-04  Joel Brobecker  <[email protected]>
5666
5667         * windows-nat.c (windows_nat_target::xfer_partial): Return
5668         TARGET_XFER_E_IO if we need to delegate to the target beneath
5669         but BENEATH is NULL.
5670
5671 2018-06-04  Simon Marchi  <[email protected]>
5672
5673         * Makefile.in (config.status): Add configure.nat as a
5674         dependency.
5675
5676 2018-06-04  Tom Tromey  <[email protected]>
5677
5678         * cp-name-parser.y (cpname_state): Add method declarations.
5679         (HANDLE_QUAL): Update.
5680         (cpname_state::d_grab, cpname_state::fill_comp)
5681         (cpname_state::make_operator, cpname_state::make_dtor)
5682         (cpname_state::make_builtin_type, cpname_state::make_name)
5683         (cpname_state::d_qualify, cpname_state::d_int_type)
5684         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5685         (%union): Move earlier.
5686
5687 2018-06-04  Alan Hayward  <[email protected]>
5688
5689         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5690
5691 2018-06-04  Alan Hayward  <[email protected]>
5692
5693         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5694         (aarch64_pseudo_write_1): Likewise.
5695         (aarch64_pseudo_read_value): Use helper.
5696         (aarch64_pseudo_write): Likewise.
5697
5698 2018-06-04  Pedro Alves  <[email protected]>
5699
5700         * darwin-nat.c (darwin_ops): Delete.
5701         (darwin_attach_pid): Use get_native_target.
5702
5703 2018-06-04  Alan Hayward  <[email protected]>
5704
5705         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5706         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5707
5708 2018-06-04  Alan Hayward  <[email protected]>
5709
5710         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5711         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5712         (aarch64_gdbarch_init): Check for SVE.
5713         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5714
5715 2018-06-04  Alan Hayward  <[email protected]>
5716
5717         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5718         * aarch64-tdep.h (aarch64_read_description): Likewise.
5719         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5720         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5721         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5722         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5723         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5724
5725 2018-06-02  Simon Marchi  <[email protected]>
5726
5727         * value.c (value_fetch_lazy_bitfield): New.
5728         (value_fetch_lazy_memory): New.
5729         (value_fetch_lazy_register): New.
5730         (value_fetch_lazy): Factor out to smaller functions.
5731
5732 2018-06-01  Tom Tromey  <[email protected]>
5733
5734         * cp-name-parser.y (backslashable, represented): Now const.
5735
5736 2018-06-01  Tom Tromey  <[email protected]>
5737
5738         * cp-name-parser.y: Include parser-defs.h.
5739         (parser_fprintf): Remove declaration.
5740
5741 2018-06-01  Tom Tromey  <[email protected]>
5742
5743         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5744         %parse-param.
5745         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5746         (global_result): Remove globals.
5747         (struct cpname_state): New.
5748         (yyparse): Don't declare.
5749         (yylex, yyerror): Move declarations after %union.
5750         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5751         (make_name): Add state parameter.
5752         Update all callers.
5753         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5754         parameter.
5755         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5756         Update.
5757         (yylex): Add lvalp, state parameters.
5758         (yyerror): Add state parameter.
5759         (cp_demangled_name_to_comp): Update.
5760
5761 2018-06-01  Tom Tromey  <[email protected]>
5762
5763         * cp-name-parser.y (parser_fprintf): Declare.
5764         (GDB_YY_REMAP_PREFIX): Define.
5765         Include yy-remap.h.  Don't redefine yy* identifiers.
5766
5767 2018-06-01  Tom Tromey  <[email protected]>
5768
5769         * python/py-type.c (typy_legacy_template_argument): Update.
5770         * cp-support.h (cp_demangled_name_to_comp): Update.
5771         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5772         parameter to be a "std::string *".
5773         (main): Update.
5774
5775 2018-06-01  H.J. Lu  <[email protected]>
5776
5777         * ada-lex.l: Include "diagnostics.h" instead of
5778         "common/diagnostics.h".
5779         * unittests/environ-selftests.c: Likewise.
5780         * common/diagnostics.h: Moved to ../include.
5781
5782 2018-06-01  Joel Brobecker  <[email protected]>
5783
5784         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5785         to language_mode_manual while calling breakpoint_re_set_one.
5786
5787 2018-06-01  Tom Tromey  <[email protected]>
5788
5789         * valops.c (value_cast_structs, destructor_name_p): Update.
5790         * symtab.c (gdb_mangle_name): Update.
5791         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5792         Update.
5793         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5794         (pascal_object_print_value_fields, pascal_object_print_value):
5795         Update.
5796         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5797         * linespec.c (find_methods): Update.
5798         * gdbtypes.h (type_name_no_tag): Remove.
5799         (type_name_or_error): Rename from type_name_no_tag_or_error.
5800         * gdbtypes.c (type_name_no_tag): Remove.
5801         (type_name_or_error): Rename from type_name_no_tag_or_error.
5802         (lookup_struct_elt_type, check_typedef): Update.
5803         * expprint.c (print_subexp_standard): Update.
5804         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5805         * d-namespace.c (d_lookup_nested_symbol): Update.
5806         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5807         (cp_print_class_member): Update.
5808         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5809         * completer.c (add_struct_fields): Update.
5810         * c-typeprint.c (cp_type_print_derivation_info)
5811         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5812         Update.
5813         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5814         (ada_prefer_type, ada_is_exception_sym): Update.
5815
5816 2018-06-01  Tom Tromey  <[email protected]>
5817
5818         * valops.c (enum_constant_from_type, value_namespace_elt)
5819         (value_maybe_namespace_elt): Update.
5820         * valarith.c (find_size_for_pointer_math): Update.
5821         * target-descriptions.c (make_gdb_type): Update.
5822         * symmisc.c (print_symbol): Update.
5823         * stabsread.c (define_symbol, read_type)
5824         (complain_about_struct_wipeout, add_undefined_type)
5825         (cleanup_undefined_types_1): Update.
5826         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5827         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5828         (rust_internal_print_type, rust_composite_type)
5829         (rust_evaluate_funcall, rust_evaluate_subexp)
5830         (rust_inclusive_range_type_p): Update.
5831         * python/py-type.c (typy_get_tag): Update.
5832         * p-typeprint.c (pascal_type_print_base): Update.
5833         * mdebugread.c (parse_symbol, parse_type): Update.
5834         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5835         Update.
5836         * guile/scm-type.c (gdbscm_type_tag): Update.
5837         * go-lang.c (sixg_string_p): Update.
5838         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5839         Update.
5840         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5841         (TYPE_TAG_NAME): Remove.
5842         * gdbtypes.c (type_name_no_tag): Simplify.
5843         (check_typedef, check_types_equal, recursive_dump_type)
5844         (copy_type_recursive, arch_composite_type): Update.
5845         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5846         in summary mode when needed.
5847         * eval.c (evaluate_funcall): Update.
5848         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5849         (process_structure_scope, read_enumeration_type)
5850         (read_namespace_type, read_module_type, determine_prefix): Update.
5851         * cp-support.c (inspect_type): Update.
5852         * coffread.c (process_coff_symbol, decode_base_type): Update.
5853         * c-varobj.c (c_is_path_expr_parent): Update.
5854         * c-typeprint.c (c_type_print_base_struct_union): Update.
5855         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5856         summary when using C language.
5857         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5858         (gen_maybe_namespace_elt): Update.
5859         * ada-lang.c (ada_type_name): Simplify.
5860         (empty_record, ada_template_to_fixed_record_type_1)
5861         (template_to_static_fixed_type)
5862         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5863
5864 2018-06-01  Tom Tromey  <[email protected]>
5865
5866         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5867         c_print_type.
5868         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5869         (c_print_type): Update.
5870         (c_print_type): New overload.
5871         (c_type_print_varspec_prefix, c_type_print_args)
5872         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5873         (c_type_print_base_struct_union, c_type_print_base_1)
5874         (cp_type_print_method_args): Add "language" parameter.
5875         (c_type_print_base): Update.
5876         * c-lang.h (c_print_type): Add new overload.
5877
5878 2018-06-01  Tom Tromey  <[email protected]>
5879
5880         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5881         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5882
5883 2018-06-01  Alan Hayward  <[email protected]>
5884
5885         * aarch64-tdep.c (aarch64_sve_register_names): New const
5886         var.
5887         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5888         (AARCH64_SVE_Z_REGS_NUM): New define.
5889         (AARCH64_SVE_P_REGS_NUM): Likewise.
5890         (AARCH64_SVE_NUM_REGS): Likewise.
5891
5892 2018-05-31  Uros Bizjak  <[email protected]>
5893
5894         * nat/linux-ptrace.h [__alpha__]
5895         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5896         definitions.
5897
5898 2018-05-31  Maciej W. Rozycki  <[email protected]>
5899
5900         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5901         the endianness selected.
5902         * NEWS: Document `set endian auto' mode operation update.
5903
5904 2018-05-31  Alan Hayward  <[email protected]>
5905
5906         * Makefile.in: Add new header.
5907         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5908         (sve_vl_from_vg): Likewise.
5909         (sve_vq_from_vl): Likewise.
5910         (sve_vl_from_vq): Likewise.
5911         (sve_vq_from_vg): Likewise.
5912         (sve_vg_from_vq): Likewise.
5913         * configure.nat: Add new c file.
5914         * nat/aarch64-sve-linux-ptrace.c: New file.
5915         * nat/aarch64-sve-linux-ptrace.h: New file.
5916
5917 2018-05-31  Alan Hayward  <[email protected]>
5918
5919         * aarch64-linux-nat.c (aarch64_linux_read_description):
5920         Add parmeter zero.
5921         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5922         Likewise.
5923         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5924         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5925         (aarch64_gdbarch_init): Add parmeter zero.
5926         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5927         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5928         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5929         parmeter.
5930         * doc/gdb.texinfo: Describe SVE feature
5931         * features/aarch64-sve.c: New file.
5932
5933 2018-05-31  Omair Javaid  <[email protected]>
5934
5935         PR gdb/23210
5936         * gdbarch.sh (significant_addr_bit): Default to zero when
5937         not set by target architecture.
5938         * gdbarch.c: Re-generated.
5939         * utils.c (address_significant): Update.
5940
5941 2018-05-30  Joel Brobecker  <[email protected]>
5942
5943         * stack.c (func_command): Remove trailing newline in call to error.
5944
5945 2018-05-30  Simon Marchi  <[email protected]>
5946
5947         * regcache.h (regcache_raw_collect): Remove, update callers to
5948         use regcache::raw_collect.
5949         * regcache.c (regcache_raw_collect): Remove.
5950
5951 2018-05-30  Simon Marchi  <[email protected]>
5952
5953         * regcache.h (regcache_raw_supply): Remove, update callers to
5954         use detached_regcache::raw_supply.
5955         * regcache.c (regcache_raw_supply): Remove.
5956
5957 2018-05-30  Simon Marchi  <[email protected]>
5958
5959         * regcache.h (regcache_cooked_write_part): Remove, update
5960         callers to use regcache::cooked_write_part.
5961         * regcache.c (regcache_cooked_write_part): Remove.
5962
5963 2018-05-30  Simon Marchi  <[email protected]>
5964
5965         * regcache.h (regcache_cooked_read_part): Remove, update callers
5966         to use readable_regcache::cooked_read_part.
5967         * regcache.c (regcache_cooked_read_part): Remove.
5968
5969 2018-05-30  Simon Marchi  <[email protected]>
5970
5971         * regcache.h (regcache_cooked_read_value): Remove, update
5972         callers to use readable_regcache::cooked_read_value.
5973         * regcache.c (regcache_cooked_read_value): Remove.
5974
5975 2018-05-30  Simon Marchi  <[email protected]>
5976
5977         * regcache.h (regcache_cooked_write): Remove, update callers to
5978         use regcache::cooked_write.
5979         * regcache.c (regcache_cooked_write): Remove.
5980
5981 2018-05-30  Simon Marchi  <[email protected]>
5982
5983         * regcache.h (regcache_invalidate): Remove, update callers to
5984         use detached_regcache::invalidate instead.
5985         * regcache.c (regcache_invalidate): Remove.
5986
5987 2018-05-30  Simon Marchi  <[email protected]>
5988
5989         * regcache.h (regcache_raw_write_part): Remove, update callers
5990         to use regcache::raw_write_part instead.
5991         * regcache.c (regcache_raw_write_part): Remove.
5992
5993 2018-05-30  Simon Marchi  <[email protected]>
5994
5995         * regcache.h (regcache_raw_read_part): Remove, update callers to
5996         use readable_regcache::raw_read_part instead.
5997         * regcache.c (regcache_raw_read_part): Remove.
5998
5999 2018-05-30  Simon Marchi  <[email protected]>
6000
6001         * regcache.h (regcache_cooked_read): Remove, update callers to
6002         use readable_regcache::cooked_read instead.
6003         * regcache.c (regcache_cooked_read): Remove.
6004
6005 2018-05-30  Simon Marchi  <[email protected]>
6006
6007         * regcache.h (regcache_raw_write): Remove, update callers to use
6008         regcache::raw_write instead.
6009         * regcache.c (regcache_raw_write): Remove.
6010
6011 2018-05-30  Simon Marchi  <[email protected]>
6012
6013         * regcache.h (regcache_raw_read): Remove, update callers to use
6014         readable_regcache::raw_read instead.
6015         * regcache.c (regcache_raw_read): Remove.
6016
6017 2018-05-30  Simon Marchi  <[email protected]>
6018
6019         * regcache.h (regcache_raw_update): Remove, update callers to
6020         use readable_regcache::raw_update instead.
6021         * regcache.c (regcache_raw_update): Remove.
6022
6023 2018-05-30  Simon Marchi  <[email protected]>
6024
6025         * regcache.h (regcache_register_status): Remove, update callers
6026         to use reg_buffer::get_register_status directly instead.
6027         * regcache.c (regcache_register_status): Remove.
6028
6029 2018-05-30  Simon Marchi  <[email protected]>
6030
6031         * regcache.h (regcache_get_ptid): Remove, update all callers to
6032         call regcache::ptid instead.
6033         * regcache.c (regcache_get_ptid): Remove.
6034
6035 2018-05-30  Simon Marchi  <[email protected]>
6036
6037         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6038
6039 2018-05-30  Pedro Alves  <[email protected]>
6040
6041         * common/common-exceptions.h (exception_rethrow): Use
6042         ATTRIBUTE_NORETURN.
6043
6044 2018-05-29  Simon Marchi  <[email protected]>
6045
6046         * breakpoint.c (print_solib_event, check_status_catch_solib):
6047         Remove struct keyword in range-based for loops.
6048         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6049         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6050         Likewise.
6051         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6052         Likewise.
6053         * symfile.c (addr_info_make_relative): Likewise.
6054         * thread.c (value_in_thread_stack_temporaries): Likewise.
6055
6056 2018-06-12  Weimin Pan  <[email protected]>
6057
6058         PR gdb/16841
6059         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6060         aggregate type to get its real type before accessing it.
6061
6062 2018-05-29  Weimin Pan  <[email protected]>
6063
6064         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6065         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6066         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6067         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6068         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6069         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6070         * printcmd.c (info_address_command): Likewise.
6071
6072 2018-05-29  Tom Tromey  <[email protected]>
6073
6074         * windows-nat.c (handle_exception): Update fall-through comment.
6075
6076 2018-05-29  Tom Tromey  <[email protected]>
6077
6078         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6079         (struct program_space) <added_solibs>: Now a std::vector.
6080         * breakpoint.c (print_solib_event): Update.
6081         (check_status_catch_solib): Update.
6082         * progspace.c (clear_program_space_solib_cache): Update.
6083         * solib.c (update_solib_list): Update.
6084
6085 2018-05-29  Tom Tromey  <[email protected]>
6086
6087         * python/py-type.c (typy_richcompare): Update.
6088         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6089         * gdbtypes.h (types_deeply_equal): Return bool.
6090         (types_equal): Likewise.
6091         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6092         declare VEC.
6093         (check_types_equal): Change worklist to std::vector.  Return
6094         bool.
6095         (struct type_equality_entry): Add constructor.
6096         (compare_maybe_null_strings): Return bool.
6097         (check_types_worklist): Return bool.  Change worklist to
6098         std::vector.
6099         (types_deeply_equal): Use std::vector.
6100         (types_equal): Return bool.
6101         (compare_maybe_null_strings): Simplify.
6102
6103 2018-05-29  Tom Tromey  <[email protected]>
6104
6105         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6106
6107 2018-05-29  Tom Tromey  <[email protected]>
6108
6109         * objc-lang.h: Don't include cp-support.h.
6110         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6111         declare VEC.
6112
6113 2018-05-27  Tom Tromey  <[email protected]>
6114
6115         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6116
6117 2018-05-25  Tom Tromey  <[email protected]>
6118
6119         * value.c (value::location): Initialize.
6120
6121 2018-05-25  Tom Tromey  <[email protected]>
6122
6123         * dbxread.c (init_bincl_list): Remove.
6124         (bincl_list): Now a std::vector.
6125         (bincls_allocated, next_bincl): Remove.
6126         (free_bincl_list, do_free_bincl_list_cleanup)
6127         (make_cleanup_free_bincl_list): Remove.
6128         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6129         unique_xmalloc_ptr.
6130         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6131         (struct header_file_location): Add constructor.
6132         (add_bincl_to_list): Remove.
6133
6134 2018-05-25  Tom Tromey  <[email protected]>
6135
6136         * tui/tui.c (tui_enable): Update.
6137         * mi/mi-interp.c (mi_interp::init): Update.
6138         * interps.h (class interp) <name>: New method.
6139         <m_name>: Rename from name.
6140         (~scoped_restore_interp): Update.
6141         * interps.c (interp::interp): Update.
6142         (interp_add, interp_set, interp_lookup_existing)
6143         (current_interp_named_p): Update.
6144
6145 2018-05-25  Tom Tromey  <[email protected]>
6146
6147         * interps.c (interp_name): Remove.
6148         * mi/mi-interp.c (mi_interp::init): Update.
6149         * interps.h (interp_name): Remove.
6150         (~scoped_restore_interp): Update.
6151         * tui/tui.c (tui_enable): Update.
6152
6153 2018-05-25  Tom Tromey  <[email protected]>
6154
6155         * utils.c (fputs_maybe_filtered): Update.
6156         * linespec.c (decode_line_full): Update.
6157         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6158         (mi_print_breakpoint_for_event, mi_solib_loaded)
6159         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6160         (mi_user_selected_context_changed): Update.
6161         * mi/mi-main.c (mi_execute_command): Update.
6162         * cli/cli-script.c (execute_control_command): Update.
6163         * python/python.c (execute_gdb_command): Update.
6164         * solib.c (info_sharedlibrary_command): Update.
6165         * interps.c (interp_ui_out): Remove.
6166         * interps.h (interp_ui_out): Remove.
6167
6168 2018-05-25  Tom Tromey  <[email protected]>
6169
6170         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6171         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6172         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6173
6174 2018-05-25  Tom Tromey  <[email protected]>
6175
6176         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6177         * interps.c (interp_exec): Use scoped_restore.
6178
6179 2018-05-25  Tom Tromey  <[email protected]>
6180
6181         * remote.c (remote_target::remote_file_get): Use
6182         gdb::byte_vector.
6183         (remote_target::remote_file_put): Likewise.
6184
6185 2018-05-25  Tom Tromey  <[email protected]>
6186
6187         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6188         a std::string.
6189         (get_pe_section_index, add_pe_exported_sym): Update.
6190         (read_pe_exported_syms): Use gdb::def_vector.
6191
6192 2018-05-25  Tom Tromey  <[email protected]>
6193
6194         * frame.c (remove_prev_frame): Remove.
6195         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6196
6197 2018-05-25  Maciej W. Rozycki  <[email protected]>
6198
6199         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6200         Remove prototypes.
6201         * mips-linux-nat.c (supply_fpregset): Always call
6202         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6203         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6204         `mips_fill_fpregset'.
6205         * mips-linux-tdep.c (mips_supply_fpregset)
6206         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6207         (mips_fill_fpregset_wrapper): Remove functions.
6208         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6209         (mips_linux_fpregset): Remove variable.
6210         (mips_linux_iterate_over_regset_sections): Use
6211         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6212         (mips_linux_o32_sigframe_init): Remove comment.
6213
6214 2018-05-25  Pedro Alves  <[email protected]>
6215
6216         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6217         (struct readahead_cache, struct packet_reg, struct
6218         remote_arch_state, class remote_state): Move higher up in the
6219         file.
6220         (remote_target::m_remote_state): Now an object instead of a pointer.
6221         (remote_target::get_remote_state): Adjust.
6222
6223 2018-05-24  Andrew Burgess  <[email protected]>
6224
6225         * stack.c (select_and_print_frame): Delete.
6226         (struct function_bounds): Move struct within function.
6227         (func_command): Most content moved into new function
6228         find_frame_for_function, use new function, print result, add
6229         function comment.
6230         (find_frame_for_function): New function, now returns a result.
6231
6232 2018-05-24  Philippe Waroquiers  <[email protected]>
6233
6234         * stack.c (iterate_over_block_arg_vars): Fix comment.
6235         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6236
6237 2018-05-24  Andrew Burgess  <[email protected]>
6238
6239         PR gdb/23203
6240         * frame.c
6241         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6242         Define.
6243         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6244         Define.
6245         * frame.h (class scoped_restore_selected_frame): New class.
6246         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6247         of any exception, use scoped_restore_selected_frame to restore the
6248         frame instead.
6249
6250 2018-05-24  Pedro Alves  <[email protected]>
6251
6252         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6253         override.
6254
6255 2018-05-23  Tom Tromey  <[email protected]>
6256
6257         * complaints.c (struct complaints): Remove.
6258         (symfile_complaint_book): Remove.
6259         (series): New global.
6260         (complaint_internal): Update.
6261         (clear_complaints): Update.
6262
6263 2018-05-23  Tom Tromey  <[email protected]>
6264
6265         * complaints.c (counters): New global.
6266         (struct complain): Remove.
6267         (struct complaints) <root>: Remove.
6268         (complaint_sentinel): Remove.
6269         (symfile_complaint_book): Update.
6270         (find_complaint) Remove.
6271         (complaint_internal, clear_complaints): Update.
6272
6273 2018-05-23  Tom Tromey  <[email protected]>
6274
6275         * complaints.c (struct complain) <file, line>: Remove.
6276         (find_complaint): Remove file, line parameters.
6277         (complaint_internal): Update.
6278
6279 2018-05-23  Tom Tromey  <[email protected]>
6280
6281         * complaints.c (vcomplaint): Remove.
6282         (complaint_internal) Merge in contents of vcomplaint.
6283
6284 2018-05-23  Tom Tromey  <[email protected]>
6285
6286         * complaints.c (struct complaints) <explanation>: Remove.
6287         (symfile_explanations): Remove.
6288         (symfile_complaint_book): Update.
6289         (vcomplaint): Update.
6290         (struct explanation): Remove.
6291
6292 2018-05-23  Tom Tromey  <[email protected]>
6293
6294         * complaints.c (symfile_complaints): Remove.
6295         (complaint_internal): Remove "complaints" parameter.
6296         (clear_complaints, vcomplaint): Remove "c" parameter.
6297         (get_complaints): Remove.
6298         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6299         (dwarf2_debug_line_missing_file_complaint)
6300         (dwarf2_debug_line_missing_end_sequence_complaint)
6301         (dwarf2_complex_location_expr_complaint)
6302         (dwarf2_const_value_length_mismatch_complaint)
6303         (dwarf2_section_buffer_overflow_complaint)
6304         (dwarf2_macro_malformed_definition_complaint)
6305         (dwarf2_invalid_attrib_class_complaint)
6306         (create_addrmap_from_index, dw2_symtab_iter_next)
6307         (dw2_expand_marked_cus)
6308         (dw2_debug_names_iterator::find_vec_in_debug_names)
6309         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6310         (create_debug_type_hash_table, init_cutu_and_read_dies)
6311         (partial_die_parent_scope, add_partial_enumeration)
6312         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6313         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6314         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6315         (create_cus_hash_table, create_dwp_hash_table)
6316         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6317         (dwarf2_rnglists_process, dwarf2_ranges_process)
6318         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6319         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6320         (handle_struct_member_die, process_structure_scope)
6321         (read_array_type, read_common_block, read_module_type)
6322         (read_tag_pointer_type, read_typedef, read_base_type)
6323         (read_subrange_type, load_partial_dies, partial_die_info::read)
6324         (partial_die_info::read, partial_die_info::read)
6325         (partial_die_info::read, read_checked_initial_length_and_offset)
6326         (dwarf2_string_attr, read_formatted_entries)
6327         (dwarf_decode_line_header)
6328         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6329         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6330         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6331         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6332         (get_signatured_type, get_DW_AT_signature_type)
6333         (decode_locdesc, file_file_name, consume_improper_spaces)
6334         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6335         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6336         (dwarf2_symbol_mark_computed, set_die_type)
6337         (read_attribute_value): Update.
6338         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6339         Update.
6340         * dbxread.c (unknown_symtype_complaint)
6341         (lbrac_mismatch_complaint, repeated_header_complaint)
6342         (set_namestring, function_outside_compilation_unit_complaint)
6343         (read_dbx_symtab, process_one_symbol): Update.
6344         * gdbtypes.c (stub_noname_complaint): Update.
6345         * windows-nat.c (handle_unload_dll): Update.
6346         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6347         (decode_base_type): Update.
6348         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6349         (eb_complaint, record_include_begin, record_include_end)
6350         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6351         (process_xcoff_symbol, read_symbol)
6352         (function_outside_compilation_unit_complaint)
6353         (scan_xcoff_symtab): Update.
6354         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6355         * buildsym.c (finish_block_internal, make_blockvector)
6356         (end_symtab_get_static_block, augment_type_symtab): Update.
6357         * dtrace-probe.c (dtrace_process_dof)
6358         (dtrace_static_probe_ops::get_probes): Update.
6359         * complaints.h (struct complaint): Don't declare.
6360         (symfile_complaints): Remove.
6361         (complaint_internal): Remove "complaints" parameter.
6362         (complaint): Likewise.
6363         (clear_complaints): Likewise.
6364         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6365         (reread_symbols): Update.
6366         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6367         (dwarf2_frame_cache, decode_frame_entry): Update.
6368         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6369         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6370         (info_selectors_command): Update.
6371         * macrotab.c (macro_include, check_for_redefinition)
6372         (macro_undef): Update.
6373         * objfiles.c (filter_overlapping_sections): Update.
6374         * stabsread.c (invalid_cpp_abbrev_complaint)
6375         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6376         (define_symbol, error_type, read_type, rs6000_builtin_type)
6377         (stabs_method_name_from_physname, read_member_functions)
6378         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6379         (attach_fields_to_type, complain_about_struct_wipeout)
6380         (read_range_type, read_args, common_block_start)
6381         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6382         Update.
6383         * mdebugread.c (index_complaint, unknown_ext_complaint)
6384         (basic_type_complaint, bad_tag_guess_complaint)
6385         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6386         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6387         (parse_procedure, parse_lines)
6388         (function_outside_compilation_unit_complaint)
6389         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6390         (bad_tag_guess_complaint, reg_value_complaint): Update.
6391         * cp-support.c (demangled_name_complaint): Update.
6392         * macroscope.c (sal_macro_scope): Update.
6393         * dwarf-index-write.c (class debug_names): Update.
6394
6395 2018-05-23  Tom Tromey  <[email protected]>
6396
6397         * complaints.c (clear_complaints): Remove "noisy" parameter.
6398         * complaints.h (clear_complaints): Update.
6399         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6400         (reread_symbols): Update.
6401
6402 2018-05-23  Tom Tromey  <[email protected]>
6403
6404         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6405         SUBSEQUENT_MESSAGE.
6406         (vcomplaint, clear_complaints): Update.
6407         (symfile_explanations): Remove some messages.
6408
6409 2018-05-23  Tom Tromey  <[email protected]>
6410
6411         * complaints.c (internal_complaint): Remove.
6412         * complaints.h (internal_complaint): Remove.
6413
6414 2018-05-22  Maciej W. Rozycki  <[email protected]>
6415
6416         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6417
6418 2018-05-22  Pedro Alves  <[email protected]>
6419
6420         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6421         (remote_fileio_badfd, remote_fileio_return_errno)
6422         (remote_fileio_return_success, remote_fileio_func_open)
6423         (remote_fileio_func_open, remote_fileio_func_close)
6424         (remote_fileio_func_read, remote_fileio_func_write)
6425         (remote_fileio_func_lseek, remote_fileio_func_rename)
6426         (remote_fileio_func_unlink, remote_fileio_func_stat)
6427         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6428         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6429         remote_target parameter.
6430         (remote_fio_func_map) <func>: Add remote_target parameter.
6431         (do_remote_fileio_request, remote_fileio_request):
6432         * remote-fileio.h (remote_fileio_request):
6433         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6434         remote_target parameter.
6435         (remote_notif_process, handle_notification): Adjust to pass down
6436         the remote.
6437         (remote_notif_state_allocate): Add remote_target parameter.  Save
6438         it.
6439         * remote-notif.h (struct remote_target): Forward declare.
6440         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6441         remote_target parameter.
6442         (struct remote_notif_state) <remote>: New field.
6443         (remote_notif_ack, remote_notif_parse): Add remote_target
6444         parameter.
6445         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6446         remote_target parameter.
6447         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6448         (threads_listing_context, rmt_thread_action, protocol_feature)
6449         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6450         (packet_result, struct threads_listing_context, remote_state):
6451         Move definitions and declarations higher up.
6452         (remote_target) <~remote_target>: Declare.
6453         (remote_download_command_source, remote_file_put, remote_file_get)
6454         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6455         (remote_hostio_pread_vFile, remote_hostio_send_command)
6456         (remote_hostio_set_filesystem, remote_hostio_open)
6457         (remote_hostio_close, remote_hostio_unlink, remote_state)
6458         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6459         (get_memory_write_packet_size, get_memory_read_packet_size)
6460         (append_pending_thread_resumptions, remote_detach_1)
6461         (append_resumption, remote_resume_with_vcont)
6462         (add_current_inferior_and_thread, wait_ns, wait_as)
6463         (process_stop_reply, remote_notice_new_inferior)
6464         (process_initial_stop_replies, remote_add_thread)
6465         (btrace_sync_conf, remote_btrace_maybe_reopen)
6466         (remove_new_fork_children, kill_new_fork_children)
6467         (discard_pending_stop_replies, stop_reply_queue_length)
6468         (check_pending_events_prevent_wildcard_vcont)
6469         (discard_pending_stop_replies_in_queue, stop_reply)
6470         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6471         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6472         (remote_interrupt_as, remote_interrupt_ns)
6473         (remote_get_noisy_reply, remote_query_attached)
6474         (remote_add_inferior, remote_current_thread, get_current_thread)
6475         (set_thread, set_general_thread, set_continue_thread)
6476         (set_general_process, write_ptid)
6477         (remote_unpack_thread_info_response, remote_get_threadinfo)
6478         (parse_threadlist_response, remote_get_threadlist)
6479         (remote_threadlist_iterator, remote_get_threads_with_ql)
6480         (remote_get_threads_with_qxfer)
6481         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6482         (get_offsets, remote_check_symbols, remote_supported_packet)
6483         (remote_query_supported, remote_packet_size)
6484         (remote_serial_quit_handler, remote_detach_pid)
6485         (remote_vcont_probe, remote_resume_with_hc)
6486         (send_interrupt_sequence, interrupt_query)
6487         (remote_notif_get_pending_events, fetch_register_using_p)
6488         (send_g_packet, process_g_packet, fetch_registers_using_g)
6489         (store_register_using_P, store_registers_using_G)
6490         (set_remote_traceframe, check_binary_download)
6491         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6492         (remote_xfer_live_readonly_partial, remote_read_bytes)
6493         (remote_send_printf, remote_flash_write, readchar)
6494         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6495         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6496         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6497         (extended_remote_disable_randomization, extended_remote_run)
6498         (send_environment_packet, extended_remote_environment_support)
6499         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6500         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6501         (packet_command): Now methods of ...
6502         (remote_target): ... this class.
6503         (m_remote_state) <remote_target>: New field.
6504         (struct remote_state) <stop_reply_queue,
6505         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6506         fields.
6507         (remote_state::remote_state): Allocate stop_reply_queue.
6508         (remote_state): Delete global.
6509         (get_remote_state_raw): Delete.
6510         (remote_target::get_remote_state): Allocate m_remote_state on
6511         demand.
6512         (get_current_remote_target): New.
6513         (remote_ops, extended_remote_ops): Delete.
6514         (wait_forever_enabled_p, remote_async_inferior_event_token):
6515         Delete, moved to struct remote_state.
6516         (remote_target::close): Delete self.  Destruction bits split to
6517         ...
6518         (remote_target::~remote_target): ... this.
6519         (show_memory_packet_size): Adjust to use
6520         get_current_remote_target.
6521         (struct protocol_feature) <func>: Add remote_target parameter.
6522         All callers adjusted.
6523         (curr_quit_handler_target): New.
6524         (remote_serial_quit_handler): Reimplement.
6525         (remote_target::open_1): Adjust to use get_current_remote_target.
6526         Heap-allocate remote_target/extended_remote_target instances.
6527         (vcont_builder::vcont_builder): Add remote_target parameter, and
6528         save it in m_remote.  All callers adjusted.
6529         (vcont_builder::m_remote): New field.
6530         (vcont_builder::restart, vcont_builder::flush)
6531         (vcont_builder::push_action): Use it.
6532         (remote_target::commit_resume): Use it.
6533         (struct queue_iter_param) <remote>: New field.
6534         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6535         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6536         (check_pending_event_prevents_wildcard_vcont_callback)
6537         (remote_target::check_pending_events_prevent_wildcard_vcont)
6538         (remote_target::discard_pending_stop_replies)
6539         (remote_target::discard_pending_stop_replies_in_queue)
6540         (remote_target::remote_notif_remove_queued_reply): Fill in
6541         'remote' field.
6542         (remote_notif_get_pending_events): New.
6543         (remote_target::readchar, remote_target::remote_serial_write):
6544         Save/restore curr_quit_handler_target.
6545         (putpkt): New.
6546         (kill_new_fork_children): Fill in 'remote' field.
6547         (packet_command): Use get_current_remote_target, defer to
6548         remote_target method of same name.
6549         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6550         parameter, and save it in m_remote.  All callers adjusted.
6551         (scoped_remote_fd::release): Use m_remote.
6552         (scoped_remote_fd::m_remote): New field.
6553         (remote_file_put, remote_file_get, remote_file_delete): Use
6554         get_current_remote_target, defer to remote_target method of same
6555         name.
6556         (remote_btrace_reset): Add remote_state paremeter.  Update all
6557         callers.
6558         (remote_async_inferior_event_handler). Pass down 'data'.
6559         (remote_new_objfile): Use get_current_remote_target.
6560         (remote_target::vcont_r_supported): New.
6561         (set_range_stepping): Use get_current_remote_target and
6562         remote_target::vcont_r_supported.
6563         (_initialize_remote): Don't allocate 'remote_state' and
6564         'stop_reply_queue' globals.
6565         * remote.h (struct remote_target): Forward declare.
6566         (getpkt, putpkt, remote_notif_get_pending_events): Add
6567         'remote_target' parameter.
6568
6569 2018-05-22  Pedro Alves  <[email protected]>
6570
6571         * remote.c (vcont_builder): Now a class.  Make all data members
6572         private.
6573         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6574         Declare methods.
6575         (vcont_builder_restart): Rename to ...
6576         (vcont_builder::restart): ... this.
6577         (vcont_builder_flush): Rename to ...
6578         (vcont_builder::flush): ... this.
6579         (vcont_builder_push_action): Rename to ...
6580         (vcont_builder::push_action): ... this.
6581         (remote_target::commit_resume): Adjust.
6582
6583 2018-05-22  Pedro Alves  <[email protected]>
6584
6585         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6586         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6587         (get_fixed_memory_packet_size): New.
6588         (get_memory_packet_size): Use it.
6589         (set_memory_packet_size): Don't override the config size with
6590         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6591         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6592         Don't refer to get_memory_packet_size if not connected to a remote
6593         target.  Show "(default)" if configured size is 0.
6594
6595 2018-05-22  Pedro Alves  <[email protected]>
6596
6597         * remote.c (remote_target::mourn_inferior): Move
6598         discard_pending_stop_replies call here from ...
6599         (_initialize_remote): ... here.
6600
6601 2018-05-22  Pedro Alves  <[email protected]>
6602
6603         * remote.c (compare_section_command): Remove set_general_process
6604         call.
6605
6606 2018-05-22  Pedro Alves  <[email protected]>
6607
6608         * remote.c (struct packet_reg, struct remote_arch_state):
6609         Move higher up in the file.
6610         (remote_state) <m_arch_states>: Store remote_arch_state values
6611         instead of remote_arch_state pointers.
6612         (remote_state::get_remote_arch_state): Adjust.
6613
6614 2018-05-22  Pedro Alves  <[email protected]>
6615
6616         * remote.c: Include <unordered_map>.
6617         (remote_state): Now a class.
6618         (remote_state) <get_remote_arch_state>: Declare method.
6619         <get_remote_arch_state>: New field.
6620         (remote_arch_state) <remote_arch_state>: Declare ctor.
6621         <regs>: Now a unique_ptr.
6622         (remote_gdbarch_data_handle): Delete.
6623         (get_remote_arch_state): Delete.
6624         (remote_state::get_remote_arch_state): New.
6625         (get_remote_state): Adjust to call remote_state's
6626         get_remote_arch_state method.
6627         (init_remote_state): Delete, bits factored out to ...
6628         (remote_arch_state::remote_arch_state): ... this new method.
6629         (get_remote_packet_size, get_memory_packet_size)
6630         (process_g_packet, remote_target::fetch_registers)
6631         (remote_target::prepare_to_store, store_registers_using_G)
6632         (remote_target::store_registers, remote_target::get_trace_status):
6633         Adjust to call remote_state's method.
6634         (_initialize_remote): Remove reference to
6635         remote_gdbarch_data_handle.
6636
6637 2018-05-22  Pedro Alves  <[email protected]>
6638
6639         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6640         pread>: New method declarations.
6641         (remote_target::open_1): Adjust.
6642         (readahead_cache_invalidate): Rename to ...
6643         (readahead_cache::invalidate): ... this, and adjust to be a class
6644         method.
6645         (readahead_cache_invalidate_fd): Rename to ...
6646         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6647         class method.
6648         (remote_hostio_pwrite): Adjust.
6649         (remote_hostio_pread_from_cache): Rename to ...
6650         (readahead_cache::pread): ... this, and adjust to be a class
6651         method.
6652         (remote_hostio_close): Adjust.
6653
6654 2018-05-22  Pedro Alves  <[email protected]>
6655
6656         * remote.c (remote_hostio_close_cleanup): Delete.
6657         (class scoped_remote_fd): New.
6658         (remote_file_put, remote_file_get): Use it.
6659
6660 2018-05-22  Pedro Alves  <[email protected]>
6661
6662         (struct vCont_action_support): Use bool and initialize all fields.
6663         (struct readahead_cache): Initialize all fields.
6664         (remote_state): Use bool and initialize all fields.
6665         (remote_state::remote_state, remote_state::~remote_state): New.
6666         (new_remote_state): Delete.
6667         (_initialize_remote): Use new to allocate remote_state.
6668
6669 2018-05-22  Pedro Alves  <[email protected]>
6670             張俊芝  <[email protected]>
6671
6672         PR gdb/22973
6673         * c-exp.y: Include "c-support.h".
6674         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6675         of tolower.  Use c_ident_is_alpha to scan names.
6676         * c-lang.c: Include "c-support.h".
6677         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6678         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6679         * c-support.h: New file, with bits factored out from ...
6680         * cp-name-parser.y: ... this file.
6681         Include "c-support.h".
6682         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6683         c-support.h and renamed.
6684         (symbol_end, yylex): Adjust.
6685
6686 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
6687
6688         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6689         parameter type to CORE_ADDR.
6690         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6691         parameter type in declaration to CORE_ADDR.
6692         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6693         target_auxv_search to get AT_HWCAP and use the result to get the
6694         target description.
6695         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6696         to CORE_ADDR. Remove the cast of the return value to unsigned
6697         long. Fix error predicate of target_auxv_search.
6698         (ppc_linux_nat_target::read_description): Change the type of the
6699         hwcap variable to CORE_ADDR.
6700
6701 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
6702
6703         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6704         if the size of fpscr is larger than 32 bits.
6705
6706 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
6707
6708         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6709         (ppc32_linux_vsxregmap): New global.
6710         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6711         regcache_supply_regset, and regcache_collect_regset.
6712         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6713         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6714         (fetch_vsx_register, store_vsx_register): Remove.
6715         (fetch_vsx_registers): Add regno parameter. Get regset using
6716         ppc_linux_vsxregset. Use regset to supply registers.
6717         (store_vsx_registers): Add regno parameter. Get regset using
6718         ppc_linux_vsxregset. Use regset to collect registers.
6719         (fetch_register): Call fetch_vsx_registers instead of
6720         fetch_vsx_register.
6721         (store_register): Call store_vsx_registers instead of
6722         store_vsx_register.
6723         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6724         new regno parameter.
6725         (store_ppc_registers): Call store_vsx_registers with -1 for the
6726         new regno parameter.
6727         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6728         (ppc_collect_vsxregset): Remove.
6729
6730 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
6731
6732         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6733         offset fields.
6734         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6735         for vector register offset fields.
6736         (ppc64_fbsd_reg_offsets): Likewise.
6737         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6738         to vector register offset fields.
6739         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6740         to vector register offset fields.
6741         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6742         vector register offset fields.
6743         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6744         initializers for vector register offset fields.
6745         (rs6000_aix64_reg_offsets): Likewise.
6746         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6747         (ppc_supply_vrregset): Remove.
6748         (ppc_collect_vrregset): Remove.
6749         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6750         (ppc_linux_vrregset) : New function.
6751         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6752         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6753         (ppc32_linux_vrregset): Remove.
6754         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6755         and use result instead of ppc32_linux_vrregset.
6756         (ppc32_linux_reg_offsets): Remove initializers for vector register
6757         offset fields.
6758         (ppc64_linux_reg_offsets): Likewise.
6759         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6760         * ppc-linux-nat.c: Include regset.h.
6761         (gdb_vrregset_t): Adjust comment to account for little-endian
6762         mode.
6763         (supply_vrregset, fill_vrregset): Remove.
6764         (fetch_altivec_register, store_altivec_register): Remove.
6765         (fetch_altivec_registers): Add regno parameter. Get regset using
6766         ppc_linux_vrregset. Use regset to supply registers.
6767         (store_altivec_registers): Add regno parameter. Get regset using
6768         ppc_linux_vrregset. Use regset to collect registers.
6769         (fetch_register): Call fetch_altivec_registers instead of
6770         fetch_altivec_register.
6771         (store_register): Call store_altivec_registers instead of
6772         store_altivec_register.
6773         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6774         the new regno parameter.
6775         (store_ppc_registers): Call store_altivec_registers with -1 for
6776         the new regno parameter.
6777
6778 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
6779
6780         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6781         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6782         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6783         (gdb_vrregset_t): Change array type size to
6784         PPC_LINUX_SIZEOF_VRREGSET.
6785         (gdb_vsxregset_t): Change array type size to
6786         PPC_LINUX_SIZEOF_VSXREGSET.
6787         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6788         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6789         PPC_LINUX_SIZEOF_VSXREGSET.
6790
6791 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
6792
6793         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6794         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6795         nat/ppc-linux.c.
6796         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6797         ppc_linux_target_wordsize with tid.
6798         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6799         wordsize with tid.
6800         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6801         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6802         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6803         tid parameter. Remove static specifier.
6804         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6805         (ppc_linux_target_wordsize): New declaration.
6806
6807 2018-05-22  Pedro Franco de Carvalho  <[email protected]>
6808
6809         * arch/ppc-linux-common.c: New file.
6810         * arch/ppc-linux-common.h: New file.
6811         * arch/ppc-linux-tdesc.h: New file.
6812         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6813         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6814         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6815         arch/ppc-linux-tdesc.h.
6816         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6817         arch/ppc-linux-tdesc.h.
6818         (ppc_linux_nat_target::read_description): Remove target
6819         description matching code. Fill a ppc_linux_features struct and
6820         call ppc_linux_match_description with it. Move comment about ISA
6821         2.05 to ppc-linux-common.c.
6822         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6823         arch/ppc-linux-tdesc.h.
6824         (ppc_linux_core_read_description): Remove target description
6825         matching code. Fill a ppc_linux_features struct and call
6826         ppc_linux_match_description with it.
6827         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6828         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6829         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6830         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6831         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6832         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6833         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6834         (tdesc_powerpc_e500l): Remove.
6835
6836 2018-05-22  Joel Brobecker  <[email protected]>
6837
6838         * ada-lang.c (catch_assert_command): Pass empty string instead
6839         of NULL for excep_string argument.
6840
6841 2018-05-22  Maciej W. Rozycki  <[email protected]>
6842
6843         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6844         the width of the requested register exceeds the width of the
6845         `ptrace' data type.
6846
6847 2018-05-21  Tom Tromey  <[email protected]>
6848
6849         * printcmd.c (output_command): Remove.
6850         (output_command_const): Rename to output_command.
6851         * valprint.h (output_command): Rename from output_command_const.
6852         * tracepoint.c (trace_dump_actions): Call output_command.
6853
6854 2018-05-21  Tom Tromey  <[email protected]>
6855
6856         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6857         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6858         * ada-lang.h (create_ada_exception_catchpoint): Update.
6859         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6860         std::string.
6861         (create_excep_cond_exprs, ~ada_catchpoint)
6862         (should_stop_exception, print_one_exception)
6863         (print_mention_exception, print_recreate_exception): Update.
6864         (ada_get_next_arg): Remove.
6865         (catch_ada_exception_command_split): Use std::string.  Change type
6866         of "excep_string", "cond_string".
6867         (catch_ada_exception_command): Update.
6868         (create_ada_exception_catchpoint): Change type of excep_string.
6869         (ada_exception_sal): Remove excep_string parameter.
6870         (~ada_catchpoint): Remove.
6871
6872 2018-05-21  Tom Tromey  <[email protected]>
6873
6874         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6875         cleanup.
6876
6877 2018-05-21  Tom Tromey  <[email protected]>
6878
6879         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6880         Return unique_xmalloc_ptr.
6881         (print_it_exception): Update.
6882
6883 2018-05-21  Tom Tromey  <[email protected]>
6884
6885         * tracepoint.c (trace_dump_actions): Use std::string.
6886
6887 2018-05-21  Tom Tromey  <[email protected]>
6888
6889         * symfile.c (reread_symbols): Use std::string for original_name.
6890
6891 2018-05-21  Tom Tromey  <[email protected]>
6892
6893         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6894         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6895         constructor.
6896
6897 2018-05-20  Simon Marchi  <[email protected]>
6898
6899         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6900         instance to...
6901         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6902         * objfiles.c (get_objfile_bfd_data): Allocate
6903         objfile_per_bfd_storage with obstack_new when allocating on
6904         obstack.
6905
6906 2018-05-20  Simon Marchi  <[email protected]>
6907
6908         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6909         OBSTACK_ZALLOC.
6910         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6911         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6912         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6913         (add_pending): Likewise.
6914         (parse_symbol): Likewise.
6915         (parse_partial_symbols): Likewise.
6916         (psymtab_to_symtab_1): Likewise.
6917         (new_psymtab): Likewise.
6918         (elfmdebug_build_psymtabs): Likewise.
6919         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6920         * objfiles.c (get_objfile_bfd_data): Likewise.
6921         (objfile_register_static_link): Likewise.
6922         * psymtab.c (allocate_psymtab): Likewise.
6923         * stabsread.c (read_member_functions): Likewise.
6924         * xcoffread.c (xcoff_end_psymtab): Likewise.
6925
6926 2018-05-20  Simon Marchi  <[email protected]>
6927
6928         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6929         compiler supports std::is_trivially_constructible.
6930         * common/poison.h: Include obstack.h.
6931         (IsMallocable): Define to is_trivially_constructible if the
6932         compiler supports it, define to true_type otherwise.
6933         (xobnew): New.
6934         (XOBNEW): Redefine.
6935         (xobnewvec): New.
6936         (XOBNEWVEC): Redefine.
6937         * gdb_obstack.h (obstack_zalloc): New.
6938         (OBSTACK_ZALLOC): Redefine.
6939         (obstack_calloc): New.
6940         (OBSTACK_CALLOC): Redefine.
6941         (obstack_new): New.
6942         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6943         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6944         gdbarch.c.
6945         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6946         obstack_calloc/obstack_zalloc.
6947         (gdbarch_obstack_zalloc): Remove.
6948         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6949
6950 2018-05-19  Philippe Waroquiers  <[email protected]>
6951
6952         * stack.c (backtrace_command_1): Remove useless variable int i.
6953
6954 2018-05-19  Philippe Waroquiers  <[email protected]>
6955
6956         * stack.c (print_frame_info): Fix comment.
6957
6958 2018-05-18  Tom Tromey  <[email protected]>
6959
6960         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6961         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6962         (~dwarf2_per_objfile): Update
6963         (dwarf2_get_dwz_file): Use new.
6964         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6965         unique_ptr.
6966
6967 2018-05-18  Tom Tromey  <[email protected]>
6968
6969         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6970         unique_ptr.
6971         * dwarf2read.c (struct dwp_file): Add constructor and
6972         initializers.
6973         (open_and_init_dwp_file): Return a unique_ptr.
6974         (dwarf2_per_objfile, create_dwp_hash_table)
6975         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6976         (lookup_dwo_unit_in_dwp): Update.
6977         (open_and_init_dwp_file, get_dwp_file): Update.
6978
6979 2018-05-18  Tom Tromey  <[email protected]>
6980
6981         * dwarf2read.c (dwarf2_per_objfile): Update.
6982         (struct mapped_index): Add initializers.
6983         (dwarf2_read_index): Use new.
6984         (dw2_symtab_iter_init): Update.
6985         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6986         unique_ptr.
6987
6988 2018-05-18  Simon Marchi  <[email protected]>
6989
6990         * dwarf2read.c (mapped_index) <total_size>: Remove.
6991
6992 2018-05-18  Simon Marchi  <[email protected]>
6993
6994         * unittests/format_pieces-selftests.c (test_format_specifier):
6995         Add ARI comments.
6996
6997 2018-05-18  Tom Tromey  <[email protected]>
6998
6999         * c-typeprint.c (maybe_print_hole): New function.
7000         (c_print_type_struct_field_offset): Update.
7001         (c_type_print_base_struct_union): Call maybe_print_hole.
7002
7003 2018-05-17  Keith Seitz  <[email protected]>
7004
7005         * breakpoint.c (build_bpstat_chain): New function, moved from
7006         bpstat_stop_status.
7007         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7008         If no stop chain is passed, call build_bpstat_chain to build it.
7009         * breakpoint.h (build_bpstat_chain): Declare.
7010         (bpstat_stop_status): Move documentation here from breakpoint.c.
7011         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7012         build the stop chain and pass it to skip_inline_frames.
7013         Pass this stop chain to bpstat_stop_status.
7014         * inline-frame.c: Include breakpoint.h.
7015         (stopped_by_user_bp_inline_frame): New function.
7016         (skip_inline_frames): Add parameter `stop_chain'.
7017         Move documention to inline-frame.h.
7018         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7019         whether the frame should be elided.
7020         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7021         Add moved documentation and update for new parameter.
7022
7023 2018-05-17  Simon Marchi  <[email protected]>
7024
7025         PR cli/14975
7026         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7027         unittests/format_pieces-selftests.c.
7028         * common/format.h (format_piece) <operator==>: New.
7029         (format_pieces) <operator[]>: Remove.
7030         * common/format.c (format_pieces::format_pieces): Handle \e.
7031         * unittests/format_pieces-selftests.c: New.
7032
7033 2018-05-17  Tom Tromey  <[email protected]>
7034
7035         PR symtab/23010:
7036         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7037         (dw2_instantiate_symtab): Add skip_partial parameter.
7038         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7039         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7040         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7041         (dw2_expand_symtabs_matching_one)
7042         (dw2_find_pc_sect_compunit_symtab)
7043         (dw2_debug_names_lookup_symbol)
7044         (dw2_debug_names_expand_symtabs_for_function): Update.
7045         (init_cutu_and_read_dies): Add skip_partial parameter.
7046         (process_psymtab_comp_unit, build_type_psymtabs_1)
7047         (process_skeletonless_type_unit, load_partial_comp_unit)
7048         (psymtab_to_symtab_1): Update.
7049         (load_full_comp_unit): Add skip_partial parameter.
7050         (process_imported_unit_die, dwarf2_read_addr_index)
7051         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7052         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7053         (read_signatured_type): Update.
7054
7055 2018-05-17  Simon Marchi  <[email protected]>
7056
7057         * value.c (release_value): Remove unused variable.
7058         (record_latest_value): Likewise.
7059         (access_value_history): Likewise.
7060         (preserve_values): Likewise.
7061
7062 2018-05-17  Tom Tromey  <[email protected]>
7063
7064         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7065         Initialize.
7066
7067 2018-05-16  Maciej W. Rozycki  <[email protected]>
7068
7069         PR gdb/22286
7070         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7071         Also handle registers whose width is not a multiple of
7072         PTRACE_TYPE_RET.
7073         (linux_nat_trad_target::store_register): Likewise.
7074
7075 2018-05-16  Tom Tromey  <[email protected]>
7076
7077         * gdbcore.h (core_bfd): Redefine.
7078         * corelow.c (core_target::close): Update.
7079         (core_target_open): Update.
7080         * progspace.h (struct program_space) <cbfd>: Now a
7081         gdb_bfd_ref_ptr.
7082
7083 2018-05-16  Tom Tromey  <[email protected]>
7084
7085         PR cli/19551:
7086         * symfile-add-flags.h (enum symfile_add_flags)
7087         <SYMFILE_NOT_FILENAME>: New constant.
7088         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7089         objfile name from BFD.
7090         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7091         * minidebug.c (find_separate_debug_file_in_section): Put
7092         ".gnu_debugdata" into BFD's file name.
7093
7094 2018-05-16  Simon Marchi  <[email protected]>
7095
7096         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7097         Remove.
7098
7099 2018-05-15  Tamar Christina  <[email protected]>
7100
7101         PR binutils/21446
7102         * aarch64-tdep.c (aarch64_analyze_prologue,
7103         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7104         Indicate not interested in errors.
7105
7106 2018-05-15  Maciej W. Rozycki  <[email protected]>
7107
7108         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7109         Supply the MIPS_ZERO_REGNUM register.
7110
7111 2018-05-15  Maciej W. Rozycki  <[email protected]>
7112
7113         * mips-tdep.c (mask_address_var): Make variable static.
7114
7115 2018-05-14  Tom Tromey  <[email protected]>
7116
7117         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7118
7119 2018-05-11  Andrew Burgess  <[email protected]>
7120
7121         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7122         FXSAVE_ADDR for the mxcsr register.
7123
7124 2018-05-11  Max Filippov  <[email protected]>
7125
7126         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7127
7128 2018-05-11  Pedro Alves  <[email protected]>
7129
7130         * corelow.c (core_target) <core_target>: No longer inline.
7131         Initialize m_core_gdbarch, m_core_vec and build the section table
7132         here.
7133         <~core_target>: New.
7134         <core_gdbarch, get_core_register_section>: New methods.
7135         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7136         factored out from ...
7137         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7138         (core_ops): Delete.
7139         (sniff_core_bfd): Add gdbarch parameter.
7140         (core_close): Delete, merged into ...
7141         (core_target::close): ... here.  Delete self.
7142         (core_close_cleanup): Delete.
7143         (core_target_open): Allocate a core_target on the heap.  Use a
7144         unique_ptr instead of a cleanup.  Bits moved into the core_target
7145         ctor.  Adjust to use core_target methods instead of globals.
7146         (get_core_register_section): Rename to ...
7147         (core_target::get_core_register_section): ... this and adjust.
7148         (struct get_core_registers_cb_data): New.
7149         (get_core_registers_cb): Use it.  Use bool.
7150         (core_target::fetch_registers, core_target::files_info)
7151         (core_target::xfer_partial, core_target::read_description)
7152         (core_target::pid_to, core_target::thread_name): Adjust to
7153         reference class fields instead of globals.
7154         * target.h (struct target_ops_deleter, target_ops_up): New.
7155
7156 2018-05-11  Pedro Alves  <[email protected]>
7157
7158         * corefile.c (core_file_command): Move to corelow.c.
7159         * corelow.c (the_core_target): Delete.
7160         (core_file_command): Moved from corefile.c.  Check exec_bfd
7161         instead of the_core_target.  Use target_detach instead of calling
7162         into the_core_target directly.
7163         (maybe_say_no_core_file_now): New.
7164         (core_target::detach): Use it.
7165         (_initialize_corelow): Remove references to the_core_target.
7166         * gdbcore.h (the_core_target): Delete.
7167
7168 2018-05-11  Tom Tromey  <[email protected]>
7169             Pedro Alves  <[email protected]>
7170
7171         * corefile.c (core_bfd): Remove.
7172         * gdbcore.h (core_bfd): Now a macro.
7173         * progspace.h (struct program_space) <cbfd>: New field.
7174
7175 2018-05-11  Tom Tromey  <[email protected]>
7176
7177         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7178         gdb::def_vector.
7179
7180 2018-05-10  Tom Tromey  <[email protected]>
7181
7182         * configure: Rebuild.
7183         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7184
7185 2018-05-10  Joel Brobecker  <[email protected]>
7186
7187         PR server/23158:
7188         * regformats/regdat.sh: Adjust script, following the addition
7189         of the new expedite_regs parameter to init_target_desc.
7190
7191 2018-05-10  Omair Javaid  <[email protected]>
7192     
7193         PR gdb/23127
7194         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7195         set_gdbarch_significant_addr_bit.
7196         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7197         set_gdbarch_significant_addr_bit.
7198         * utils.c (address_significant): Update to sign extend addr.
7199
7200 2018-05-09  Max Filippov  <[email protected]>
7201
7202         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7203         (xtensa_linux_init_abi): Limit tdep->num_regs by
7204         tdep->num_nopriv_regs.
7205         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7206         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7207         not initialized.
7208
7209 2018-05-08  Simon Marchi  <[email protected]>
7210
7211         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7212
7213 2018-05-08  Andrew Burgess  <[email protected]>
7214
7215         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7216         (I387_MXCSR_INIT_VAL): New constant.
7217         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7218         buffer if it was supplied by the inferior.
7219         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7220         (i387_xsave_get_clear_bv): New function.
7221         (i387_supply_xsave): Only read x87 control registers from the
7222         xsave buffer if the feature is enabled, and the state will have
7223         been written, otherwise, provide a suitable default.
7224         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7225         including x87 control registers.  Update control registers if they
7226         have changed from the default value, and mark features as enabled
7227         as required.
7228         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7229
7230 2018-05-08  Ulrich Weigand  <[email protected]>
7231
7232         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7233
7234 2018-05-07  Tom Tromey  <[email protected]>
7235
7236         * configure: Rebuild.
7237         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7238
7239 2018-05-07  Tom Tromey  <[email protected]>
7240
7241         PR tdep/20362:
7242         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7243         bit.  Use correct value for VDIV.
7244
7245 2018-05-04  Tom Tromey  <[email protected]>
7246
7247         * configure: Rebuild.
7248         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7249
7250 2018-05-04  Tom Tromey  <[email protected]>
7251
7252         * linux-record.c (record_linux_system_call) <case
7253         RECORD_SYS_RECVFROM>: Add "break".
7254
7255 2018-05-04  Tom Tromey  <[email protected]>
7256
7257         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7258         Add missing "break".
7259         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7260         Add missing "break".
7261
7262 2018-05-04  Tom Tromey  <[email protected]>
7263
7264         * rs6000-tdep.c (ppc_process_record_op4)
7265         (ppc_process_record_op63): Add fall-through comment.
7266
7267 2018-05-04  Tom Tromey  <[email protected]>
7268
7269         * i386-tdep.c (i386_process_record): Add fall-through comment.
7270
7271 2018-05-04  Tom Tromey  <[email protected]>
7272
7273         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7274         comment.
7275
7276 2018-05-04  Tom Tromey  <[email protected]>
7277
7278         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7279         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7280         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7281         comment.
7282         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7283         comment.
7284         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7285         comment.
7286
7287 2018-05-04  Tom Tromey  <[email protected]>
7288
7289         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7290
7291 2018-05-04  Tom Tromey  <[email protected]>
7292
7293         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7294         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7295         * symfile.c (section_is_mapped): Fix fall-through comment.
7296         * stabsread.c (define_symbol, read_member_functions): Fix
7297         fall-through comment.
7298         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7299         comment.
7300         * remote.c (remote_wait_as): Fix fall-through comment.
7301         * p-exp.y (yylex): Fix fall-through comment.
7302         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7303         comment.
7304         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7305         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7306         * jv-exp.y (yylex): Fix fall-through comment.
7307         * go-exp.y (lex_one_token): Fix fall-through comment.
7308         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7309         fall-through comment.
7310         * f-exp.y (yylex): Fix fall-through comment.
7311         * dwarf2read.c (process_die): Fix fall-through comments.
7312         * dbxread.c (process_one_symbol): Fix fall-through comment.
7313         * d-exp.y (lex_one_token): Fix fall-through comment.
7314         * cp-name-parser.y (yylex): Fix fall-through comment.
7315         * coffread.c (coff_symtab_read): Fix fall-through comment.
7316         * c-exp.y (lex_one_token): Fix fall-through comment.
7317         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7318         comment.
7319         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7320         comment.
7321
7322 2018-05-04  Tom Tromey  <[email protected]>
7323
7324         PR python/22730:
7325         * NEWS: Mention gdb.execute change.
7326         * gdbcmd.h (execute_control_command): Don't declare.
7327         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7328         execute_control_commands, execute_control_commands_to_string.
7329         * cli/cli-script.h (execute_control_commands)
7330         (execute_control_commands_to_string): Declare.
7331         (execute_control_command): Add from_tty parameter.
7332         * cli/cli-script.c (execute_control_commands)
7333         (execute_control_commands_to_string): New functions.
7334         (execute_user_command): Use execute_control_commands.
7335         (execute_control_command_1): Add "from_tty" parameter.  Update.
7336         (execute_control_command): Likewise.
7337
7338 2018-05-04  Tom Tromey  <[email protected]>
7339
7340         PR python/22731:
7341         * NEWS: Mention that breakpoint commands are writable.
7342         * python/py-breakpoint.c (bppy_set_commands): New function.
7343         (breakpoint_object_getset) <"commands">: Use it.
7344
7345 2018-05-04  Tom Tromey  <[email protected]>
7346
7347         * tracepoint.c (actions_command): Update.
7348         * mi/mi-cmd-break.c (mi_command_line_array)
7349         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7350         (mi_read_next_line): Remove.
7351         (mi_cmd_break_commands): Update.
7352         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7353         function_view.
7354         * cli/cli-script.c (get_command_line): Update.
7355         (process_next_line): Use function_view.  Constify.
7356         (recurse_read_control_structure, read_command_lines)
7357         (read_command_lines_1): Change argument types to function_view.
7358         (do_define_command, document_command): Update.
7359         * breakpoint.h (check_tracepoint_command): Don't declare.
7360         * breakpoint.c (check_tracepoint_command): Remove.
7361         (commands_command_1, create_tracepoint_from_upload): Update.
7362
7363 2018-05-04  Tom Tromey  <[email protected]>
7364
7365         PR gdb/11750:
7366         * cli/cli-script.h (enum command_control_type) <define_control>:
7367         New constant.
7368         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7369         (build_command_line, execute_control_command_1)
7370         (process_next_line): Likewise.
7371         (do_define_command): New function, extracted from define_command.
7372         (define_command): Use it.
7373
7374 2018-05-04  Tom Tromey  <[email protected]>
7375
7376         * tracepoint.c (actions_command): Update.
7377         * cli/cli-script.h (read_command_lines): Update.
7378         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7379         (MAX_TMPBUF): Remove define.
7380         (define_command): Use string_printf.
7381         (document_command): Likewise.
7382         * breakpoint.c (commands_command_1): Update.
7383
7384 2018-05-04  Tom Tromey  <[email protected]>
7385
7386         * top.c (execute_command): Update.
7387         * cli/cli-script.h (print_command_lines): Now varargs.
7388         * cli/cli-script.c (print_command_lines): Now varargs.
7389         (execute_control_command_1) <case while_control, case if_control>:
7390         Update.
7391
7392 2018-05-04  Tom Tromey  <[email protected]>
7393
7394         * tracepoint.c (all_tracepoint_actions): Rename from
7395         all_tracepoint_actions_and_cleanup.  Change return type.
7396         (actions_command, encode_actions_1, encode_actions)
7397         (trace_dump_actions, tdump_command): Update.
7398         * remote.c (remote_download_command_source): Update.
7399         * python/python.c (gdbpy_eval_from_control_command)
7400         (python_command, python_interactive_command): Update.
7401         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7402         * guile/guile.c (guile_command)
7403         (gdbscm_eval_from_control_command, guile_command): Update.
7404         * compile/compile.c (compile_code_command)
7405         (compile_print_command, compile_to_object): Update.
7406         * cli/cli-script.h (struct command_lines_deleter): New.
7407         (counted_command_line): New typedef.
7408         (struct command_line): Add constructor, destructor.
7409         <body_list>: Remove.
7410         <body_list_0, body_list_1>: New members.
7411         (command_line_up): Remove typedef.
7412         (read_command_lines, read_command_lines_1, get_command_line):
7413         Update.
7414         (copy_command_lines): Don't declare.
7415         * cli/cli-script.c (build_command_line): Use "new".
7416         (get_command_line): Return counted_command_line.
7417         (print_command_lines, execute_user_command)
7418         (execute_control_command_1, while_command, if_command): Update.
7419         (realloc_body_list): Remove.
7420         (process_next_line, recurse_read_control_structure): Update.
7421         (read_command_lines, read_command_lines_1): Return counted_command_line.
7422         (free_command_lines): Use "delete".
7423         (copy_command_lines): Remove.
7424         (define_command, document_command, show_user_1): Update.
7425         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7426         a counted_command_line.
7427         * breakpoint.h (counted_command_line): Remove typedef.
7428         (breakpoint_set_commands): Update.
7429         * breakpoint.c (check_no_tracepoint_commands)
7430         (validate_commands_for_breakpoint): Update.
7431         (breakpoint_set_commands): Change commands to be a
7432         counted_command_line.
7433         (commands_command_1, update_dprintf_command_list)
7434         (create_tracepoint_from_upload): Update.
7435
7436 2018-05-04  Tom Tromey  <[email protected]>
7437
7438         * cli/cli-decode.h (cmd_list_element): New constructor.
7439         (~cmd_list_element): New destructor.
7440         (struct cmd_list_element): Add initializers.
7441         * cli/cli-decode.c (do_add_cmd): Use "new".
7442         (delete_cmd): Use "delete".
7443
7444 2018-05-04  Jan Kratochvil  <[email protected]>
7445             Pedro Alves <[email protected]>
7446
7447         PR breakpoints/19806 and support for PR external/20207.
7448         * NEWS: Mention Aarch64 watchpoint improvements.
7449         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7450         watchpoints and PR external/20207 watchpoints.
7451         * nat/aarch64-linux-hw-point.c
7452         (kernel_supports_any_contiguous_range): New.
7453         (aarch64_watchpoint_offset): New.
7454         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7455         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7456         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7457         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7458         next_addr_orig_p.  Support PR external/20207 watchpoints.
7459         (aarch64_downgrade_regs): New.
7460         (aarch64_dr_state_insert_one_point): New parameters offset and
7461         addr_orig.
7462         (aarch64_dr_state_remove_one_point): Likewise.
7463         (aarch64_handle_breakpoint): Update caller.
7464         (aarch64_handle_aligned_watchpoint): Likewise.
7465         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7466         aligned_offset.
7467         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7468         aarch64_downgrade_regs.
7469         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7470         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7471         (DR_CONTROL_MASK): ... this.
7472         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7473         (unsigned int aarch64_watchpoint_offset): New prototype.
7474         (aarch64_linux_set_debug_regs): Remove const from state.
7475         * utils.c (align_up, align_down): Move to ...
7476         * common/common-utils.c (align_up, align_down): ... here.
7477         * utils.h (align_up, align_down): Move to ...
7478         * common/common-utils.h (align_up, align_down): ... here.
7479
7480 2018-05-04  Joel Brobecker  <[email protected]>
7481
7482         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7483         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7484         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7485         Re-implement to match the ABI as summarized in GCC's
7486         gcc/config/sparc/sparc.c.  All callers updated.
7487         (sparc32_store_arguments): Remove assertion.
7488
7489 2018-05-04  Tom Tromey  <[email protected]>
7490
7491         * printcmd.c: Don't include tui.h.
7492         (decode_format): Use skip_spaces.
7493
7494 2018-05-04  Tom Tromey  <[email protected]>
7495
7496         PR gdb/22619:
7497         * printcmd.c (last_count): New global.
7498         (x_command): Use saved count when repeating.
7499
7500 2018-05-04  Tom Tromey  <[email protected]>
7501
7502         * nto-procfs.c (do_closedir_cleanup): Remove.
7503         (procfs_pidlist): Use gdb_dir_up.
7504         * procfs.c (do_closedir_cleanup): Remove.
7505         (proc_update_threads): Use gdb_dir_up.
7506         * common/filestuff.h (struct gdb_dir_deleter): New.
7507         (gdb_dir_up): New typedef.
7508
7509 2018-05-04  Tom Tromey  <[email protected]>
7510
7511         * ada-lang.c (print_mention_exception): Use std::string.
7512
7513 2018-05-04  Tom Tromey  <[email protected]>
7514
7515         * ada-lang.c (create_excep_cond_exprs): Update.
7516         (ada_exception_catchpoint_cond_string): Use std::string.
7517
7518 2018-05-04  Tom Tromey  <[email protected]>
7519
7520         * ada-lang.c (xget_renaming_scope): Return std::string.
7521         (old_renaming_is_invisible): Update.
7522
7523 2018-05-04  Tom Tromey  <[email protected]>
7524
7525         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7526         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7527
7528 2018-05-04  Ulrich Weigand  <[email protected]>
7529
7530         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7531
7532 2018-05-04  Tom Tromey  <[email protected]>
7533
7534         * remote.c (remote_query_supported_append): Change type.
7535         (remote_check_symbols): Update.
7536
7537 2018-05-04  Paul Pluzhnikov  <[email protected]>
7538
7539         PR gdb/11420
7540         * configure.ac: Prepend libpython.
7541         * python/python-config.py: Likewise.
7542         * configure: Regenerate.
7543
7544 2018-05-03  Simon Marchi  <[email protected]>
7545
7546         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7547
7548 2018-05-03  Pedro Alves  <[email protected]>
7549
7550         * s390-linux-nat.c
7551         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7552         override.  Write 'true' instead of '1'.
7553         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7554         declaration.
7555
7556 2018-05-02  Pedro Alves  <[email protected]>
7557
7558         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7559         add_inf_child_target.
7560         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7561         add_inf_child_target.
7562         * aix-thread.c (aix_thread_target_info): New.
7563         (aix_thread_target) <shortname, longname, doc>: Delete.
7564         <info>: New.
7565         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7566         add_inf_child_target.
7567         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7568         add_inf_child_target.
7569         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7570         add_inf_child_target.
7571         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7572         add_inf_child_target.
7573         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7574         add_inf_child_target.
7575         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7576         add_inf_child_target.
7577         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7578         add_inf_child_target.
7579         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7580         add_inf_child_target.
7581         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7582         add_inf_child_target.
7583         * bfd-target.c (target_bfd_target_info): New.
7584         (target_bfd) <shortname, longname, doc>: Delete.
7585         <info>: New.
7586         * bsd-kvm.c (bsd_kvm_target_info): New.
7587         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7588         <info>: New.
7589         (bsd_kvm_target::open): Rename to ...
7590         (bsd_kvm_target_open): ... this.  Adjust.
7591         * bsd-uthread.c (bsd_uthread_target_info): New.
7592         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7593         <info>: New.
7594         * corefile.c (core_file_command): Adjust.
7595         * corelow.c (core_target_info): New.
7596         (core_target) <shortname, longname, doc>: Delete.
7597         <info>: New.
7598         (core_target::open): Rename to ...
7599         (core_target_open): ... this.  Adjust.
7600         * ctf.c (ctf_target_info): New.
7601         (ctf_target) <shortname, longname, doc>: Delete.
7602         <info>: New.
7603         (ctf_target::open): Rename to ...
7604         (ctf_target_open): ... this.
7605         (_initialize_ctf): Adjust.
7606         * exec.c (exec_target_info): New.
7607         (exec_target) <shortname, longname, doc>: Delete.
7608         <info>: New.
7609         (exec_target::open): Rename to ...
7610         (exec_target_open): ... this.
7611         * gdbcore.h (core_target_open): Declare.
7612         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7613         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7614         add_inf_child_target.
7615         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7616         add_inf_child_target.
7617         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7618         add_inf_child_target.
7619         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7620         add_inf_child_target.
7621         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7622         add_inf_child_target.
7623         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7624         add_inf_child_target.
7625         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7626         add_inf_child_target.
7627         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7628         add_inf_child_target.
7629         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7630         add_inf_child_target.
7631         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7632         add_inf_child_target.
7633         * inf-child.c (inf_child_target_info): New.
7634         (inf_child_target::info): New.
7635         (inf_child_open_target): Remove 'target' parameter.  Use
7636         get_native_target instead.
7637         (inf_child_target::open): Delete.
7638         (add_inf_child_target): New.
7639         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7640         Delete.
7641         <info>: New.
7642         (add_inf_child_target): Declare.
7643         (inf_child_open_target): Declare.
7644         * linux-thread-db.c (thread_db_target_info): New.
7645         (thread_db_target) <shortname, longname, doc>: Delete.
7646         <info>: New.
7647         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7648         add_inf_child_target.
7649         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7650         add_inf_child_target.
7651         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7652         add_inf_child_target.
7653         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7654         add_inf_child_target.
7655         * make-target-delegates (print_class): Adjust.
7656         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7657         add_inf_child_target.
7658         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7659         add_inf_child_target.
7660         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7661         add_inf_child_target.
7662         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7663         add_inf_child_target.
7664         * nto-procfs.c (nto_native_target_info): New.
7665         (nto_procfs_target_native) <shortname, longname, doc>:
7666         Delete.
7667         <info>: New.
7668         (nto_procfs_target_info): New.
7669         (nto_procfs_target_procfs) <shortname, longname, doc>:
7670         Delete.
7671         <info>: New.
7672         (init_procfs_targets): Adjust.
7673         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7674         add_inf_child_target.
7675         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7676         add_inf_child_target.
7677         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7678         add_inf_child_target.
7679         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7680         add_inf_child_target.
7681         * ravenscar-thread.c (ravenscar_target_info): New.
7682         (ravenscar_thread_target) <shortname, longname, doc>:
7683         Delete.
7684         <info>: New.
7685         * record-btrace.c (record_btrace_target_info):
7686         (record_btrace_target) <shortname, longname, doc>: Delete.
7687         <info>: New.
7688         (record_btrace_target::open): Rename to ...
7689         (record_btrace_target_open): ... this.  Adjust.
7690         * record-full.c (record_longname, record_doc): New.
7691         (record_full_base_target) <shortname, longname, doc>: Delete.
7692         <info>: New.
7693         (record_full_target_info): New.
7694         (record_full_target): <shortname>: Delete.
7695         <info>: New.
7696         (record_full_core_open_1, record_full_open_1): Update comments.
7697         (record_full_base_target::open): Rename to ...
7698         (record_full_open): ... this.
7699         (cmd_record_full_restore): Update.
7700         (_initialize_record_full): Update.
7701         * remote-sim.c (remote_sim_target_info): New.
7702         (gdbsim_target) <shortname, longname, doc>: Delete.
7703         <info>: New.
7704         (gdbsim_target::open): Rename to ...
7705         (gdbsim_target_open): ... this.
7706         (_initialize_remote_sim): Adjust.
7707         * remote.c (remote_doc): New.
7708         (remote_target_info): New.
7709         (remote_target) <shortname, longname, doc>: Delete.
7710         <info>: New.
7711         (extended_remote_target_info): New.
7712         (extended_remote_target) <shortname, longname, doc>: Delete.
7713         <info>: New.
7714         (remote_target::open_1): Make static.  Adjust.
7715         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7716         * s390-linux-nat.c (_initialize_s390_nat): Use
7717         add_inf_child_target.
7718         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7719         add_inf_child_target.
7720         * sol-thread.c (thread_db_target_info): New.
7721         (sol_thread_target) <shortname, longname, doc>: Delete.
7722         <info>: New.
7723         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7724         add_inf_child_target.
7725         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7726         add_inf_child_target.
7727         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7728         add_inf_child_target.
7729         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7730         add_inf_child_target.
7731         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7732         add_inf_child_target.
7733         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7734         add_inf_child_target.
7735         * spu-linux-nat.c (_initialize_spu_nat): Use
7736         add_inf_child_target.
7737         * spu-multiarch.c (spu_multiarch_target_info): New.
7738         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7739         <info>: New.
7740         * target-delegates.c: Regenerate.
7741         * target.c: Include <unordered_map>.
7742         (target_ops_p): Delete.
7743         (DEF_VEC_P(target_ops_p)): Delete.
7744         (target_factories): New.
7745         (test_target_info): New.
7746         (test_target_ops::info): New.
7747         (open_target): Adjust to use target_factories.
7748         (add_target_with_completer): Rename to ...
7749         (add_target): ... this.  Change prototype.  Register target_info
7750         and open callback in target_factories.  Register target_info in
7751         command context instead of target_ops.
7752         (add_target): Delete old implementation.
7753         (add_deprecated_target_alias): Change prototype.  Adjust.
7754         (the_native_target): New.
7755         (set_native_target, get_native_target): New.
7756         (find_default_run_target): Use the_native_target.
7757         (find_attach_target, find_run_target): Simplify.
7758         (target_ops::open): Delete.
7759         (dummy_target_info): New.
7760         (dummy_target::shortname, dummy_target::longname)
7761         (dummy_target::doc): Delete.
7762         (dummy_target::info): New.
7763         (debug_target::shortname, debug_target::longname)
7764         (debug_target::doc): Delete.
7765         (debug_target::info): New.
7766         * target.h (struct target_info): New.
7767         (target_ops::~target_ops): Add comment.
7768         (target_ops::info): New.
7769         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7770         longer virtual.  Implement in terms of target_info.
7771         (set_native_target, get_native_target): Declare.
7772         (target_open_ftype): New.
7773         (add_target, add_target_with_completer)
7774         (add_deprecated_target_alias): Change prototype.
7775         (test_target) <shortname, longname, doc>: Delete.
7776         <info>: New.
7777         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7778         add_inf_child_target.
7779         * tracefile-tfile.c (tfile_target_info): New.
7780         (tfile_target) <shortname, longname, doc>: Delete.
7781         <info>: New.
7782         (tfile_target::open): Rename to ...
7783         (tfile_target_open): ... this.
7784         (_initialize_tracefile_tfile): Adjust.
7785         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7786         add_inf_child_target.
7787         * windows-nat.c (_initialize_windows_nat): Use
7788         add_inf_child_target.
7789         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7790         add_inf_child_target.
7791
7792 2018-05-02  Pedro Alves  <[email protected]>
7793
7794         * linux-nat.h (linux_nat_target) <low_new_thread,
7795         low_delete_thread, low_new_fork, low_forget_process,
7796         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7797         New virtual methods.
7798         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7799         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7800         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7801         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7802         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7803         Delete.
7804         * linux-fork.c (delete_fork): Adjust to call low method.
7805         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7806         (linux_nat_new_fork, linux_nat_forget_process_hook)
7807         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7808         (linux_nat_status_is_event):
7809         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7810         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7811         to call low method.
7812         (sigtrap_is_event): Rename to ...
7813         (linux_nat_target::low_status_is_event): ... this.
7814         (linux_nat_set_status_is_event): Delete.
7815         (save_stop_reason, linux_nat_wait_1)
7816         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7817         low methods.
7818         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7819         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7820         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7821         (linux_nat_set_prepare_to_resume): Delete.
7822         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7823         low virtual methods.
7824         * amd64-linux-nat.c: Likewise.
7825         * arm-linux-nat.c: Likewise.
7826         * i386-linux-nat.c: Likewise.
7827         * ia64-linux-nat.c: Likewise.
7828         * mips-linux-nat.c: Likewise.
7829         * ppc-linux-nat.c: Likewise.
7830         * s390-linux-nat.c: Likewise.
7831         * sparc64-linux-nat.c: Likewise.
7832         * x86-linux-nat.c: Likewise.
7833         * x86-linux-nat.h: Include "nat/x86-linux.h".
7834         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7835         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7836         Override methods.
7837
7838 2018-05-02  Pedro Alves  <[email protected]>
7839
7840         * target.h (target_ops)
7841         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7842         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7843         stopped_by_watchpoint, have_continuable_watchpoint,
7844         stopped_data_address, watchpoint_addr_within_range,
7845         can_accel_watchpoint_condition, can_run, thread_alive,
7846         has_all_memory, has_memory, has_stack, has_registers,
7847         has_execution, can_async_p, is_async_p, supports_non_stop,
7848         always_non_stop_p, can_execute_reverse, supports_multi_process,
7849         supports_enable_disable_tracepoint,
7850         supports_disable_randomization, supports_string_tracing,
7851         supports_evaluation_of_breakpoint_conditions,
7852         can_run_breakpoint_commands, filesystem_is_local,
7853         can_download_tracepoint, get_trace_state_variable_value,
7854         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7855         record_is_replaying, record_will_replay,
7856         augmented_libraries_svr4_read>: Adjust to return bool.
7857         * aarch64-linux-nat.c: All implementations adjusted.
7858         * aix-thread.c: All implementations adjusted.
7859         * arm-linux-nat.c: All implementations adjusted.
7860         * breakpoint.c: All implementations adjusted.
7861         * bsd-kvm.c: All implementations adjusted.
7862         * bsd-uthread.c: All implementations adjusted.
7863         * corelow.c: All implementations adjusted.
7864         * ctf.c: All implementations adjusted.
7865         * darwin-nat.c: All implementations adjusted.
7866         * darwin-nat.h: All implementations adjusted.
7867         * exec.c: All implementations adjusted.
7868         * fbsd-nat.c: All implementations adjusted.
7869         * fbsd-nat.h: All implementations adjusted.
7870         * gnu-nat.c: All implementations adjusted.
7871         * gnu-nat.h: All implementations adjusted.
7872         * go32-nat.c: All implementations adjusted.
7873         * ia64-linux-nat.c: All implementations adjusted.
7874         * inf-child.c: All implementations adjusted.
7875         * inf-child.h: All implementations adjusted.
7876         * inf-ptrace.c: All implementations adjusted.
7877         * inf-ptrace.h: All implementations adjusted.
7878         * linux-nat.c: All implementations adjusted.
7879         * linux-nat.h: All implementations adjusted.
7880         * mips-linux-nat.c: All implementations adjusted.
7881         * nto-procfs.c: All implementations adjusted.
7882         * ppc-linux-nat.c: All implementations adjusted.
7883         * procfs.c: All implementations adjusted.
7884         * ravenscar-thread.c: All implementations adjusted.
7885         * record-btrace.c: All implementations adjusted.
7886         * record-full.c: All implementations adjusted.
7887         * remote-sim.c: All implementations adjusted.
7888         * remote.c: All implementations adjusted.
7889         * s390-linux-nat.c: All implementations adjusted.
7890         * sol-thread.c: All implementations adjusted.
7891         * spu-multiarch.c: All implementations adjusted.
7892         * target-delegates.c: All implementations adjusted.
7893         * target.c: All implementations adjusted.
7894         * target.h: All implementations adjusted.
7895         * tracefile-tfile.c: All implementations adjusted.
7896         * tracefile.c: All implementations adjusted.
7897         * tracefile.h: All implementations adjusted.
7898         * windows-nat.c: All implementations adjusted.
7899         * x86-linux-nat.h: All implementations adjusted.
7900         * x86-nat.h: All implementations adjusted.
7901
7902 2018-05-02  Pedro Alves  <[email protected]>
7903
7904         * make-target-delegates (scan_target_h): Don't trim lines here.
7905         Replace sequences of tabs and/or whitespace with a single
7906         whitespace.
7907         (top level, parsing methods): Trim each line before processing it
7908         here.
7909
7910 2018-05-02  Pedro Alves  <[email protected]>
7911             John Baldwin  <[email protected]>
7912
7913         * target.h (enum strata) <debug_stratum>: New.
7914         (struct target_ops) <all delegation methods>: Replace by C++
7915         virtual methods, and drop "to_" prefix.  All references updated
7916         throughout.
7917         <to_shortname, to_longname, to_doc, to_data,
7918         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7919         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7920         virtual methods.  All references updated throughout.
7921         <can_attach, supports_terminal_ours, can_create_inferior,
7922         get_thread_control_capabilities, attach_no_wait>: New
7923         virtual methods.
7924         <insert_breakpoint, remove_breakpoint>: Now
7925         TARGET_DEFAULT_NORETURN methods.
7926         <info_proc>: Now returns bool.
7927         <to_magic>: Delete.
7928         (OPS_MAGIC): Delete.
7929         (current_target): Delete.  All references replaced by references
7930         to ...
7931         (target_stack): ... this.  New.
7932         (target_shortname, target_longname): Adjust.
7933         (target_can_run): Now a function declaration.
7934         (default_child_has_all_memory, default_child_has_memory)
7935         (default_child_has_stack, default_child_has_registers)
7936         (default_child_has_execution): Remove target_ops parameter.
7937         (complete_target_initialization): Delete.
7938         (memory_breakpoint_target): New template class.
7939         (test_target_ops): Refactor as a C++ class with virtual methods.
7940         * make-target-delegates (NAME_PART): Tighten.
7941         (POINTER_PART, CP_SYMBOL): New.
7942         (SIMPLE_RETURN_PART): Reimplement.
7943         (VEC_RETURN_PART): Expect less.
7944         (RETURN_PART, VIRTUAL_PART): New.
7945         (METHOD): Adjust to C++ virtual methods.
7946         (scan_target_h): Remove reference to C99.
7947         (dname): Output "target_ops::" prefix.
7948         (write_function_header): Adjust to output a C++ class method.
7949         (write_declaration): New.
7950         (write_delegator): Adjust to output a C++ class method.
7951         (tdname): Output "dummy_target::" prefix.
7952         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7953         method.
7954         (tdefault_names, debug_names): Delete.
7955         (return_types, tdefaults, styles, argtypes_array): New.
7956         (top level): All methods are delegators.
7957         (print_class): New.
7958         (top level): Print dummy_target and debug_target classes.
7959         * target-delegates.c: Regenerate.
7960         * target-debug.h (target_debug_print_enum_info_proc_what)
7961         (target_debug_print_thread_control_capabilities)
7962         (target_debug_print_thread_info_p): New.
7963         * target.c (dummy_target): Delete.
7964         (the_dummy_target, the_debug_target): New.
7965         (target_stack): Now extern.
7966         (set_targetdebug): Push/unpush debug target.
7967         (default_child_has_all_memory, default_child_has_memory)
7968         (default_child_has_stack, default_child_has_registers)
7969         (default_child_has_execution): Remove target_ops parameter.
7970         (complete_target_initialization): Delete.
7971         (add_target_with_completer): No longer call
7972         complete_target_initialization.
7973         (target_supports_terminal_ours): Use regular delegation.
7974         (update_current_target): Delete.
7975         (push_target): No longer check magic number.  Don't call
7976         update_current_target.
7977         (unpush_target): Don't call update_current_target.
7978         (target_is_pushed): No longer check magic number.
7979         (target_require_runnable): Skip for all stratums over
7980         process_stratum.
7981         (target_ops::info_proc): New.
7982         (target_info_proc): Use find_target_at and
7983         find_default_run_target.
7984         (target_supports_disable_randomization): Use regular delegation.
7985         (target_get_osdata): Use find_target_at.
7986         (target_ops::open, target_ops::close, target_ops::can_attach)
7987         (target_ops::attach, target_ops::can_create_inferior)
7988         (target_ops::create_inferior, target_ops::can_run)
7989         (target_can_run): New.
7990         (default_fileio_target): Use regular delegation.
7991         (target_ops::fileio_open, target_ops::fileio_pwrite)
7992         (target_ops::fileio_pread, target_ops::fileio_fstat)
7993         (target_ops::fileio_close, target_ops::fileio_unlink)
7994         (target_ops::fileio_readlink): New.
7995         (target_fileio_open_1, target_fileio_unlink)
7996         (target_fileio_readlink): Always call the target method.  Handle
7997         FILEIO_ENOSYS.
7998         (return_zero, return_zero_has_execution): Delete.
7999         (init_dummy_target): Delete.
8000         (dummy_target::dummy_target, dummy_target::shortname)
8001         (dummy_target::longname, dummy_target::doc)
8002         (debug_target::debug_target, debug_target::shortname)
8003         (debug_target::longname, debug_target::doc): New.
8004         (target_supports_delete_record): Use regular delegation.
8005         (setup_target_debug): Delete.
8006         (maintenance_print_target_stack): Skip debug_stratum.
8007         (initialize_targets): Instantiate the_dummy_target and
8008         the_debug_target.
8009         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8010         use target_stack.
8011         (target_auxv_search, fprint_target_auxv): Adjust.
8012         (info_auxv_command): Adjust to use target_stack.
8013         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8014         * exceptions.c (print_flush): Handle a NULL target_stack.
8015         * regcache.c (target_ops_no_register): Refactor as class with
8016         virtual methods.
8017
8018         * exec.c (exec_target): New class.
8019         (exec_ops): Now an exec_target.
8020         (exec_open, exec_close_1, exec_get_section_table)
8021         (exec_xfer_partial, exec_files_info, exec_has_memory)
8022         (exec_make_note_section): Refactor as exec_target methods.
8023         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8024         Delete.
8025         (exec_target::find_memory_regions): New.
8026         (_initialize_exec): Don't call init_exec_ops.
8027         * gdbcore.h (exec_file_clear): Delete.
8028
8029         * corefile.c (core_target): Delete.
8030         (core_file_command): Adjust.
8031         * corelow.c (core_target): New class.
8032         (the_core_target): New.
8033         (core_close): Remove target_ops parameter.
8034         (core_close_cleanup): Adjust.
8035         (core_target::close): New.
8036         (core_open, core_detach, get_core_registers, core_files_info)
8037         (core_xfer_partial, core_thread_alive, core_read_description)
8038         (core_pid_to_str, core_thread_name, core_has_memory)
8039         (core_has_stack, core_has_registers, core_info_proc): Rework as
8040         core_target methods.
8041         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8042         (_initialize_corelow): Initialize the_core_target.
8043         * gdbcore.h (core_target): Delete.
8044         (the_core_target): New.
8045
8046         * ctf.c: (ctf_target): New class.
8047         (ctf_ops): Now a ctf_target.
8048         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8049         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8050         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8051         methods.
8052         (init_ctf_ops): Delete.
8053         (_initialize_ctf): Don't call it.
8054         * tracefile-tfile.c (tfile_target): New class.
8055         (tfile_ops): Now a tfile_target.
8056         (tfile_open, tfile_close, tfile_files_info)
8057         (tfile_get_tracepoint_status, tfile_trace_find)
8058         (tfile_fetch_registers, tfile_xfer_partial)
8059         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8060         Refactor as tfile_target methods.
8061         (tfile_xfer_partial_features): Remove target_ops parameter.
8062         (init_tfile_ops): Delete.
8063         (_initialize_tracefile_tfile): Don't call it.
8064         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8065         (tracefile_has_stack, tracefile_has_registers)
8066         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8067         tracefile_target methods.
8068         (init_tracefile_ops): Delete.
8069         (tracefile_target::tracefile_target): New.
8070         * tracefile.h: Include "target.h".
8071         (tracefile_target): New class.
8072         (init_tracefile_ops): Delete.
8073
8074         * spu-multiarch.c (spu_multiarch_target): New class.
8075         (spu_ops): Now a spu_multiarch_target.
8076         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8077         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8078         (spu_search_memory, spu_mourn_inferior): Refactor as
8079         spu_multiarch_target methods.
8080         (init_spu_ops): Delete.
8081         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8082         complete_target_initialization.
8083
8084         * ravenscar-thread.c (ravenscar_thread_target): New class.
8085         (ravenscar_ops): Now a ravenscar_thread_target.
8086         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8087         (ravenscar_thread_alive, ravenscar_pid_to_str)
8088         (ravenscar_fetch_registers, ravenscar_store_registers)
8089         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8090         (ravenscar_stopped_by_hw_breakpoint)
8091         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8092         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8093         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8094         methods.
8095         (init_ravenscar_thread_ops): Delete.
8096         (_initialize_ravenscar): Remove references to
8097         init_ravenscar_thread_ops and complete_target_initialization.
8098
8099         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8100         (bsd_uthread_target): New class.
8101         (bsd_uthread_ops): Now a bsd_uthread_target.
8102         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8103         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8104         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8105         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8106         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8107         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8108         (bsd_uthread_target): Delete function.
8109         (_initialize_bsd_uthread): Remove reference to
8110         complete_target_initialization.
8111
8112         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8113         (target_bfd): ... this new class.
8114         (target_bfd_xfer_partial, target_bfd_get_section_table)
8115         (target_bfd_close): Refactor as target_bfd methods.
8116         (target_bfd::~target_bfd): New.
8117         (target_bfd_reopen): Adjust.
8118         (target_bfd::close): New.
8119
8120         * record-btrace.c (record_btrace_target): New class.
8121         (record_btrace_ops): Now a record_btrace_target.
8122         (record_btrace_open, record_btrace_stop_recording)
8123         (record_btrace_disconnect, record_btrace_close)
8124         (record_btrace_async, record_btrace_info)
8125         (record_btrace_insn_history, record_btrace_insn_history_range)
8126         (record_btrace_insn_history_from, record_btrace_call_history)
8127         (record_btrace_call_history_range)
8128         (record_btrace_call_history_from, record_btrace_record_method)
8129         (record_btrace_is_replaying, record_btrace_will_replay)
8130         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8131         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8132         (record_btrace_store_registers, record_btrace_prepare_to_store)
8133         (record_btrace_to_get_unwinder)
8134         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8135         (record_btrace_commit_resume, record_btrace_wait)
8136         (record_btrace_stop, record_btrace_can_execute_reverse)
8137         (record_btrace_stopped_by_sw_breakpoint)
8138         (record_btrace_supports_stopped_by_sw_breakpoint)
8139         (record_btrace_stopped_by_hw_breakpoint)
8140         (record_btrace_supports_stopped_by_hw_breakpoint)
8141         (record_btrace_update_thread_list, record_btrace_thread_alive)
8142         (record_btrace_goto_begin, record_btrace_goto_end)
8143         (record_btrace_goto, record_btrace_stop_replaying_all)
8144         (record_btrace_execution_direction)
8145         (record_btrace_prepare_to_generate_core)
8146         (record_btrace_done_generating_core): Refactor as
8147         record_btrace_target methods.
8148         (init_record_btrace_ops): Delete.
8149         (_initialize_record_btrace): Remove reference to
8150         init_record_btrace_ops.
8151         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8152         the execution_direction global.
8153         (record_full_base_target, record_full_target)
8154         (record_full_core_target): New classes.
8155         (record_full_ops): Now a record_full_target.
8156         (record_full_core_ops): Now a record_full_core_target.
8157         (record_full_target::detach, record_full_target::disconnect)
8158         (record_full_core_target::disconnect)
8159         (record_full_target::mourn_inferior, record_full_target::kill):
8160         New.
8161         (record_full_open, record_full_close, record_full_async): Refactor
8162         as methods of the record_full_base_target class.
8163         (record_full_resume, record_full_commit_resume): Refactor
8164         as methods of the record_full_target class.
8165         (record_full_wait, record_full_stopped_by_watchpoint)
8166         (record_full_stopped_data_address)
8167         (record_full_stopped_by_sw_breakpoint)
8168         (record_full_supports_stopped_by_sw_breakpoint)
8169         (record_full_stopped_by_hw_breakpoint)
8170         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8171         methods of the record_full_base_target class.
8172         (record_full_store_registers, record_full_xfer_partial)
8173         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8174         Refactor as methods of the record_full_target class.
8175         (record_full_can_execute_reverse, record_full_get_bookmark)
8176         (record_full_goto_bookmark, record_full_execution_direction)
8177         (record_full_record_method, record_full_info, record_full_delete)
8178         (record_full_is_replaying, record_full_will_replay)
8179         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8180         (record_full_stop_replaying): Refactor as methods of the
8181         record_full_base_target class.
8182         (record_full_core_resume, record_full_core_kill)
8183         (record_full_core_fetch_registers)
8184         (record_full_core_prepare_to_store)
8185         (record_full_core_store_registers, record_full_core_xfer_partial)
8186         (record_full_core_insert_breakpoint)
8187         (record_full_core_remove_breakpoint)
8188         (record_full_core_has_execution): Refactor
8189         as methods of the record_full_core_target class.
8190         (record_full_base_target::supports_delete_record): New.
8191         (init_record_full_ops): Delete.
8192         (init_record_full_core_ops): Delete.
8193         (record_full_save): Refactor as method of the
8194         record_full_base_target class.
8195         (_initialize_record_full): Remove references to
8196         init_record_full_ops and init_record_full_core_ops.
8197
8198         * remote.c (remote_target, extended_remote_target): New classes.
8199         (remote_ops): Now a remote_target.
8200         (extended_remote_ops): Now an extended_remote_target.
8201         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8202         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8203         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8204         (remote_pass_signals, remote_set_syscall_catchpoint)
8205         (remote_program_signals, )
8206         (remote_thread_always_alive): Remove target_ops parameter.
8207         (remote_thread_alive, remote_thread_name)
8208         (remote_update_thread_list, remote_threads_extra_info)
8209         (remote_static_tracepoint_marker_at)
8210         (remote_static_tracepoint_markers_by_strid)
8211         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8212         (remote_open): Refactor as methods of remote_target.
8213         (extended_remote_open, extended_remote_detach)
8214         (extended_remote_attach, extended_remote_post_attach):
8215         (extended_remote_supports_disable_randomization)
8216         (extended_remote_create_inferior): : Refactor as method of
8217         extended_remote_target.
8218         (remote_set_permissions, remote_open_1, remote_detach)
8219         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8220         (remote_resume, remote_commit_resume, remote_stop)
8221         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8222         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8223         (remote_prepare_to_store, remote_store_registers)
8224         (remote_flash_erase, remote_flash_done, remote_files_info)
8225         (remote_kill, remote_mourn, remote_insert_breakpoint)
8226         (remote_remove_breakpoint, remote_insert_watchpoint)
8227         (remote_watchpoint_addr_within_range)
8228         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8229         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8230         (remote_supports_stopped_by_sw_breakpoint)
8231         (remote_stopped_by_hw_breakpoint)
8232         (remote_supports_stopped_by_hw_breakpoint)
8233         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8234         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8235         (remote_verify_memory): Refactor as methods of remote_target.
8236         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8237         parameter.
8238         (remote_xfer_partial, remote_get_memory_xfer_limit)
8239         (remote_search_memory, remote_rcmd, remote_memory_map)
8240         (remote_pid_to_str, remote_get_thread_local_address)
8241         (remote_get_tib_address, remote_read_description): Refactor as
8242         methods of remote_target.
8243         (remote_target::fileio_open, remote_target::fileio_pwrite)
8244         (remote_target::fileio_pread, remote_target::fileio_close): New.
8245         (remote_hostio_readlink, remote_hostio_fstat)
8246         (remote_filesystem_is_local, remote_can_execute_reverse)
8247         (remote_supports_non_stop, remote_supports_disable_randomization)
8248         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8249         (remote_supports_enable_disable_tracepoint)
8250         (remote_supports_string_tracing)
8251         (remote_can_run_breakpoint_commands, remote_trace_init)
8252         (remote_download_tracepoint, remote_can_download_tracepoint)
8253         (remote_download_trace_state_variable, remote_enable_tracepoint)
8254         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8255         (remote_trace_start, remote_get_trace_status)
8256         (remote_get_tracepoint_status, remote_trace_stop)
8257         (remote_trace_find, remote_get_trace_state_variable_value)
8258         (remote_save_trace_data, remote_get_raw_trace_data)
8259         (remote_set_disconnected_tracing, remote_core_of_thread)
8260         (remote_set_circular_trace_buffer, remote_traceframe_info)
8261         (remote_get_min_fast_tracepoint_insn_len)
8262         (remote_set_trace_buffer_size, remote_set_trace_notes)
8263         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8264         (remote_disable_btrace, remote_teardown_btrace)
8265         (remote_read_btrace, remote_btrace_conf)
8266         (remote_augmented_libraries_svr4_read, remote_load)
8267         (remote_pid_to_exec_file, remote_can_do_single_step)
8268         (remote_execution_direction, remote_thread_handle_to_thread_info):
8269         Refactor as methods of remote_target.
8270         (init_remote_ops, init_extended_remote_ops): Delete.
8271         (remote_can_async_p, remote_is_async_p, remote_async)
8272         (remote_thread_events, remote_upload_tracepoints)
8273         (remote_upload_trace_state_variables): Refactor as methods of
8274         remote_target.
8275         (_initialize_remote): Remove references to init_remote_ops and
8276         init_extended_remote_ops.
8277
8278         * remote-sim.c (gdbsim_target): New class.
8279         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8280         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8281         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8282         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8283         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8284         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8285         Refactor as methods of gdbsim_target.
8286         (gdbsim_ops): Now a gdbsim_target.
8287         (init_gdbsim_ops): Delete.
8288         (gdbsim_cntrl_c): Adjust.
8289         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8290
8291         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8292         (the_amd64_linux_nat_target): New.
8293         (amd64_linux_fetch_inferior_registers)
8294         (amd64_linux_store_inferior_registers): Refactor as methods of
8295         amd64_linux_nat_target.
8296         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8297         * i386-linux-nat.c: Don't include "linux-nat.h".
8298         (i386_linux_nat_target): New class.
8299         (the_i386_linux_nat_target): New.
8300         (i386_linux_fetch_inferior_registers)
8301         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8302         as methods of i386_linux_nat_target.
8303         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8304         * inf-child.c (inf_child_ops): Delete.
8305         (inf_child_fetch_inferior_registers)
8306         (inf_child_store_inferior_registers): Delete.
8307         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8308         methods of inf_child_target.
8309         (inf_child_target::supports_terminal_ours)
8310         (inf_child_target::terminal_init)
8311         (inf_child_target::terminal_inferior)
8312         (inf_child_target::terminal_ours_for_output)
8313         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8314         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8315         New.
8316         (inf_child_open, inf_child_disconnect, inf_child_close)
8317         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8318         (inf_child_post_startup_inferior, inf_child_can_run)
8319         (inf_child_pid_to_exec_file): Refactor as methods of
8320         inf_child_target.
8321         (inf_child_follow_fork): Delete.
8322         (inf_child_target::can_create_inferior)
8323         (inf_child_target::can_attach): New.
8324         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8325         (inf_child_target::has_stack, inf_child_target::has_registers)
8326         (inf_child_target::has_execution): New.
8327         (inf_child_fileio_open, inf_child_fileio_pwrite)
8328         (inf_child_fileio_pread, inf_child_fileio_fstat)
8329         (inf_child_fileio_close, inf_child_fileio_unlink)
8330         (inf_child_fileio_readlink, inf_child_use_agent)
8331         (inf_child_can_use_agent): Refactor as methods of
8332         inf_child_target.
8333         (return_zero, inf_child_target): Delete.
8334         (inf_child_target::inf_child_target): New.
8335         * inf-child.h: Include "target.h".
8336         (inf_child_target): Delete function prototype.
8337         (inf_child_target): New class.
8338         (inf_child_open_target, inf_child_mourn_inferior)
8339         (inf_child_maybe_unpush_target): Delete.
8340         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8341         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8342         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8343         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8344         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8345         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8346         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8347         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8348         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8349         methods of inf_ptrace_target.
8350         (inf_ptrace_target): Delete function.
8351         * inf-ptrace.h: Include "inf-child.h".
8352         (inf_ptrace_target): Delete function declaration.
8353         (inf_ptrace_target): New class.
8354         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8355         * linux-nat.c (linux_target): New.
8356         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8357         (linux_nat_target::~linux_nat_target): New.
8358         (linux_child_post_attach, linux_child_post_startup_inferior)
8359         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8360         (linux_child_remove_fork_catchpoint)
8361         (linux_child_insert_vfork_catchpoint)
8362         (linux_child_remove_vfork_catchpoint)
8363         (linux_child_insert_exec_catchpoint)
8364         (linux_child_remove_exec_catchpoint)
8365         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8366         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8367         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8368         (linux_nat_stopped_data_address)
8369         (linux_nat_stopped_by_sw_breakpoint)
8370         (linux_nat_supports_stopped_by_sw_breakpoint)
8371         (linux_nat_stopped_by_hw_breakpoint)
8372         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8373         (linux_nat_kill, linux_nat_mourn_inferior)
8374         (linux_nat_xfer_partial, linux_nat_thread_alive)
8375         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8376         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8377         (linux_child_static_tracepoint_markers_by_strid)
8378         (linux_nat_is_async_p, linux_nat_can_async_p)
8379         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8380         (linux_nat_supports_multi_process)
8381         (linux_nat_supports_disable_randomization, linux_nat_async)
8382         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8383         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8384         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8385         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8386         methods of linux_nat_target.
8387         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8388         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8389         parameter.
8390         (check_stopped_by_watchpoint): Adjust.
8391         (linux_xfer_partial): Delete.
8392         (linux_target_install_ops, linux_target, linux_nat_add_target):
8393         Delete.
8394         (linux_nat_target::linux_nat_target): New.
8395         * linux-nat.h: Include "inf-ptrace.h".
8396         (linux_nat_target): New.
8397         (linux_target, linux_target_install_ops, linux_nat_add_target):
8398         Delete function declarations.
8399         (linux_target): Declare global.
8400         * linux-thread-db.c (thread_db_target): New.
8401         (thread_db_target::thread_db_target): New.
8402         (thread_db_ops): Delete.
8403         (the_thread_db_target): New.
8404         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8405         (thread_db_update_thread_list, thread_db_pid_to_str)
8406         (thread_db_extra_thread_info)
8407         (thread_db_thread_handle_to_thread_info)
8408         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8409         (thread_db_resume): Refactor as methods of thread_db_target.
8410         (init_thread_db_ops): Delete.
8411         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8412         * x86-linux-nat.c: Don't include "linux-nat.h".
8413         (super_post_startup_inferior): Delete.
8414         (x86_linux_nat_target::~x86_linux_nat_target): New.
8415         (x86_linux_child_post_startup_inferior)
8416         (x86_linux_read_description, x86_linux_enable_btrace)
8417         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8418         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8419         methods of x86_linux_nat_target.
8420         (x86_linux_create_target): Delete.  Bits folded ...
8421         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8422         pointer.
8423         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8424         (x86_linux_nat_target): New class.
8425         (x86_linux_create_target): Delete.
8426         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8427         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8428         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8429         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8430         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8431         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8432         make extern.
8433         (x86_use_watchpoints): Delete.
8434         * x86-nat.h: Include "breakpoint.h" and "target.h".
8435         (x86_use_watchpoints): Delete.
8436         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8437         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8438         (x86_insert_watchpoint, x86_remove_watchpoint)
8439         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8440         (x86_stopped_by_hw_breakpoint): New declarations.
8441         (x86_nat_target): New template class.
8442
8443         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8444         (the_ppc_linux_nat_target): New.
8445         (ppc_linux_fetch_inferior_registers)
8446         (ppc_linux_can_use_hw_breakpoint)
8447         (ppc_linux_region_ok_for_hw_watchpoint)
8448         (ppc_linux_ranged_break_num_registers)
8449         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8450         (ppc_linux_insert_mask_watchpoint)
8451         (ppc_linux_remove_mask_watchpoint)
8452         (ppc_linux_can_accel_watchpoint_condition)
8453         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8454         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8455         (ppc_linux_watchpoint_addr_within_range)
8456         (ppc_linux_masked_watch_num_registers)
8457         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8458         (ppc_linux_read_description): Refactor as methods of
8459         ppc_linux_nat_target.
8460         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8461
8462         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8463         (procfs_target): New class.
8464         (the_procfs_target): New.
8465         (procfs_target): Delete function.
8466         (procfs_auxv_parse, procfs_attach, procfs_detach)
8467         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8468         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8469         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8470         (procfs_create_inferior, procfs_update_thread_list)
8471         (procfs_thread_alive, procfs_pid_to_str)
8472         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8473         (procfs_stopped_data_address, procfs_insert_watchpoint)
8474         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8475         (proc_find_memory_regions, procfs_info_proc)
8476         (procfs_make_note_section): Refactor as methods of procfs_target.
8477         (_initialize_procfs): Adjust.
8478         * sol-thread.c (sol_thread_target): New class.
8479         (sol_thread_ops): Now a sol_thread_target.
8480         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8481         (sol_thread_fetch_registers, sol_thread_store_registers)
8482         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8483         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8484         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8485         (init_sol_thread_ops): Delete.
8486         (_initialize_sol_thread): Adjust.  Remove references to
8487         init_sol_thread_ops and complete_target_initialization.
8488
8489         * windows-nat.c (windows_nat_target): New class.
8490         (windows_fetch_inferior_registers)
8491         (windows_store_inferior_registers, windows_resume, windows_wait)
8492         (windows_attach, windows_detach, windows_pid_to_exec_file)
8493         (windows_files_info, windows_create_inferior)
8494         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8495         (windows_close, windows_pid_to_str, windows_xfer_partial)
8496         (windows_get_tib_address, windows_get_ada_task_ptid)
8497         (windows_thread_name, windows_thread_alive): Refactor as
8498         windows_nat_target methods.
8499         (do_initial_windows_stuff): Adjust.
8500         (windows_target): Delete function.
8501         (_initialize_windows_nat): Adjust.
8502
8503         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8504         (darwin_mourn_inferior, darwin_kill_inferior)
8505         (darwin_create_inferior, darwin_attach, darwin_detach)
8506         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8507         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8508         (darwin_supports_multi_process): Refactor as darwin_nat_target
8509         methods.
8510         (darwin_resume_to, darwin_files_info): Delete.
8511         (_initialize_darwin_inferior): Rename to ...
8512         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8513         * darwin-nat.h: Include "inf-child.h".
8514         (darwin_nat_target): New class.
8515         (darwin_complete_target): Delete.
8516         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8517         (darwin_target): New.
8518         (i386_darwin_fetch_inferior_registers)
8519         (i386_darwin_store_inferior_registers): Refactor as methods of
8520         darwin_nat_target.
8521         (darwin_complete_target): Delete, with ...
8522         (_initialize_i386_darwin_nat): ... bits factored out here.
8523
8524         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8525         (the_alpha_linux_nat_target): New.
8526         (alpha_linux_register_u_offset): Refactor as
8527         alpha_linux_nat_target method.
8528         (_initialize_alpha_linux_nat): Adjust.
8529         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8530         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8531         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8532         methods of linux_nat_trad_target.
8533         (linux_trad_target): Delete.
8534         * linux-nat-trad.h (linux_trad_target): Delete function.
8535         (linux_nat_trad_target): New class.
8536         * mips-linux-nat.c (mips_linux_nat_target): New class.
8537         (super_fetch_registers, super_store_registers, super_close):
8538         Delete.
8539         (the_mips_linux_nat_target): New.
8540         (mips64_linux_regsets_fetch_registers)
8541         (mips64_linux_regsets_store_registers)
8542         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8543         (mips_linux_register_u_offset, mips_linux_read_description)
8544         (mips_linux_can_use_hw_breakpoint)
8545         (mips_linux_stopped_by_watchpoint)
8546         (mips_linux_stopped_data_address)
8547         (mips_linux_region_ok_for_hw_watchpoint)
8548         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8549         (mips_linux_close): Refactor as methods of mips_linux_nat.
8550         (_initialize_mips_linux_nat): Adjust to C++ification.
8551
8552         * aix-thread.c (aix_thread_target): New class.
8553         (aix_thread_ops): Now an aix_thread_target.
8554         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8555         (aix_thread_fetch_registers, aix_thread_store_registers)
8556         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8557         (aix_thread_thread_alive, aix_thread_pid_to_str)
8558         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8559         Refactor as methods of aix_thread_target.
8560         (init_aix_thread_ops): Delete.
8561         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8562         and complete_target_initialization.
8563         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8564         (rs6000_nat_target): New class.
8565         (the_rs6000_nat_target): New.
8566         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8567         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8568         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8569         (super_create_inferior): Delete.
8570         (_initialize_rs6000_nat): Adjust to C++ification.
8571
8572         * arm-linux-nat.c (arm_linux_nat_target): New class.
8573         (the_arm_linux_nat_target): New.
8574         (arm_linux_fetch_inferior_registers)
8575         (arm_linux_store_inferior_registers, arm_linux_read_description)
8576         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8577         (arm_linux_remove_hw_breakpoint)
8578         (arm_linux_region_ok_for_hw_watchpoint)
8579         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8580         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8581         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8582         arm_linux_nat_target.
8583         (_initialize_arm_linux_nat): Adjust to C++ification.
8584
8585         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8586         (the_aarch64_linux_nat_target): New.
8587         (aarch64_linux_fetch_inferior_registers)
8588         (aarch64_linux_store_inferior_registers)
8589         (aarch64_linux_child_post_startup_inferior)
8590         (aarch64_linux_read_description)
8591         (aarch64_linux_can_use_hw_breakpoint)
8592         (aarch64_linux_insert_hw_breakpoint)
8593         (aarch64_linux_remove_hw_breakpoint)
8594         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8595         (aarch64_linux_region_ok_for_hw_watchpoint)
8596         (aarch64_linux_stopped_data_address)
8597         (aarch64_linux_stopped_by_watchpoint)
8598         (aarch64_linux_watchpoint_addr_within_range)
8599         (aarch64_linux_can_do_single_step): Refactor as methods of
8600         aarch64_linux_nat_target.
8601         (super_post_startup_inferior): Delete.
8602         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8603
8604         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8605         (the_hppa_linux_nat_target): New.
8606         (hppa_linux_fetch_inferior_registers)
8607         (hppa_linux_store_inferior_registers): Refactor as methods of
8608         hppa_linux_nat_target.
8609         (_initialize_hppa_linux_nat): Adjust to C++ification.
8610
8611         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8612         (the_ia64_linux_nat_target): New.
8613         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8614         (ia64_linux_stopped_data_address)
8615         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8616         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8617         ia64_linux_nat_target methods.
8618         (super_xfer_partial): Delete.
8619         (_initialize_ia64_linux_nat): Adjust to C++ification.
8620
8621         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8622         (the_m32r_linux_nat_target): New.
8623         (m32r_linux_fetch_inferior_registers)
8624         (m32r_linux_store_inferior_registers): Refactor as
8625         m32r_linux_nat_target methods.
8626         (_initialize_m32r_linux_nat): Adjust to C++ification.
8627
8628         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8629         (the_m68k_linux_nat_target): New.
8630         (m68k_linux_fetch_inferior_registers)
8631         (m68k_linux_store_inferior_registers): Refactor as
8632         m68k_linux_nat_target methods.
8633         (_initialize_m68k_linux_nat): Adjust to C++ification.
8634
8635         * s390-linux-nat.c (s390_linux_nat_target): New class.
8636         (the_s390_linux_nat_target): New.
8637         (s390_linux_fetch_inferior_registers)
8638         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8639         (s390_insert_watchpoint, s390_remove_watchpoint)
8640         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8641         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8642         (s390_auxv_parse, s390_read_description): Refactor as methods of
8643         s390_linux_nat_target.
8644         (_initialize_s390_nat): Adjust to C++ification.
8645
8646         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8647         (the_sparc_linux_nat_target): New.
8648         (_initialize_sparc_linux_nat): Adjust to C++ification.
8649         * sparc-nat.c (sparc_fetch_inferior_registers)
8650         (sparc_store_inferior_registers): Remove target_ops parameter.
8651         * sparc-nat.h (sparc_fetch_inferior_registers)
8652         (sparc_store_inferior_registers): Remove target_ops parameter.
8653         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8654         (the_sparc64_linux_nat_target): New.
8655         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8656
8657         * spu-linux-nat.c (spu_linux_nat_target): New class.
8658         (the_spu_linux_nat_target): New.
8659         (spu_child_post_startup_inferior, spu_child_post_attach)
8660         (spu_child_wait, spu_fetch_inferior_registers)
8661         (spu_store_inferior_registers, spu_xfer_partial)
8662         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8663         methods.
8664         (_initialize_spu_nat): Adjust to C++ification.
8665
8666         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8667         (the_tilegx_linux_nat_target): New.
8668         (fetch_inferior_registers, store_inferior_registers):
8669         Refactor as methods.
8670         (_initialize_tile_linux_nat): Adjust to C++ification.
8671
8672         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8673         (the_xtensa_linux_nat_target): New.
8674         (xtensa_linux_fetch_inferior_registers)
8675         (xtensa_linux_store_inferior_registers): Refactor as
8676         xtensa_linux_nat_target methods.
8677         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8678
8679         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8680         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8681         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8682         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8683         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8684         (fbsd_stopped_by_sw_breakpoint)
8685         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8686         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8687         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8688         (fbsd_post_startup_inferior, fbsd_post_attach)
8689         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8690         (fbsd_set_syscall_catchpoint)
8691         (super_xfer_partial, super_resume, super_wait)
8692         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8693         (fbsd_handle_debug_trap): Remove target_ops parameter.
8694         (fbsd_nat_add_target): Delete.
8695         * fbsd-nat.h: Include "inf-ptrace.h".
8696         (fbsd_nat_add_target): Delete.
8697         (USE_SIGTRAP_SIGINFO): Define.
8698         (fbsd_nat_target): New class.
8699
8700         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8701         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8702         (amd64bsd_target): Delete.
8703         * amd64-bsd-nat.h: New file.
8704         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8705         "x86-bsd-nat.h".
8706         (amd64_fbsd_nat_target): New class.
8707         (the_amd64_fbsd_nat_target): New.
8708         (amd64fbsd_read_description): Refactor as method of
8709         amd64_fbsd_nat_target.
8710         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8711         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8712         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8713         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8714         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8715         (i386bsd_target): Delete.
8716         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8717         (i386bsd_fetch_inferior_registers)
8718         (i386bsd_store_inferior_registers): Declare.
8719         (i386_bsd_nat_target): New class.
8720         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8721         (the_i386_fbsd_nat_target): New.
8722         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8723         i386_fbsd_nat_target methods.
8724         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8725         (_initialize_i386fbsd_nat): Adjust to C++ification.
8726         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8727         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8728         (_initialize_x86_bsd_nat): Adjust to C++ification.
8729         * x86-bsd-nat.h: Include "x86-nat.h".
8730         (x86bsd_target): Delete declaration.
8731         (x86bsd_nat_target): New class.
8732
8733         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8734         (the_aarch64_fbsd_nat_target): New.
8735         (aarch64_fbsd_fetch_inferior_registers)
8736         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8737         aarch64_fbsd_nat_target.
8738         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8739         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8740         (the_alpha_bsd_nat_target): New.
8741         (alphabsd_fetch_inferior_registers)
8742         (alphabsd_store_inferior_registers): Refactor as
8743         alpha_bsd_nat_target methods.
8744         (_initialize_alphabsd_nat): Refactor as methods of
8745         alpha_bsd_nat_target.
8746         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8747         (the_amd64_nbsd_nat_target): New.
8748         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8749         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8750         (the_amd64_obsd_nat_target): New.
8751         (_initialize_amd64obsd_nat): Adjust to C++ification.
8752         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8753         (the_arm_fbsd_nat_target): New.
8754         (arm_fbsd_fetch_inferior_registers)
8755         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8756         (_initialize_arm_fbsd_nat): Refactor as methods of
8757         arm_fbsd_nat_target.
8758         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8759         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8760         (the_arm_netbsd_nat_target): New.
8761         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8762         arm_netbsd_nat_target.
8763         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8764         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8765         (the_hppa_nbsd_nat_target): New.
8766         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8767         hppa_nbsd_nat_target methods.
8768         (_initialize_hppanbsd_nat): Adjust to C++ification.
8769         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8770         (the_hppa_obsd_nat_target): New.
8771         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8772         methods of hppa_obsd_nat_target.
8773         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8774         add_target.
8775         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8776         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8777         add_target.
8778         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8779         (_initialize_i386obsd_nat): Use add_target.
8780         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8781         (the_m68k_bsd_nat_target): New.
8782         (m68kbsd_fetch_inferior_registers)
8783         (m68kbsd_store_inferior_registers): Refactor as methods of
8784         m68k_bsd_nat_target.
8785         (_initialize_m68kbsd_nat): Adjust to C++ification.
8786         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8787         (the_mips_fbsd_nat_target): New.
8788         (mips_fbsd_fetch_inferior_registers)
8789         (mips_fbsd_store_inferior_registers): Refactor as methods of
8790         mips_fbsd_nat_target.
8791         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8792         add_target.
8793         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8794         (the_mips_nbsd_nat_target): New.
8795         (mipsnbsd_fetch_inferior_registers)
8796         (mipsnbsd_store_inferior_registers): Refactor as methods of
8797         mips_nbsd_nat_target.
8798         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8799         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8800         (the_mips64_obsd_nat_target): New.
8801         (mips64obsd_fetch_inferior_registers)
8802         (mips64obsd_store_inferior_registers): Refactor as methods of
8803         mips64_obsd_nat_target.
8804         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8805         add_target.
8806         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8807         nbsd_nat_target.
8808         * nbsd-nat.h: Include "inf-ptrace.h".
8809         (nbsd_nat_target): New class.
8810         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8811         (obsd_wait): Refactor as methods of obsd_nat_target.
8812         (obsd_add_target): Delete.
8813         * obsd-nat.h: Include "inf-ptrace.h".
8814         (obsd_nat_target): New class.
8815         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8816         (the_ppc_fbsd_nat_target): New.
8817         (ppcfbsd_fetch_inferior_registers)
8818         (ppcfbsd_store_inferior_registers): Refactor as methods of
8819         ppc_fbsd_nat_target.
8820         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8821         add_target.
8822         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8823         (the_ppc_nbsd_nat_target): New.
8824         (ppcnbsd_fetch_inferior_registers)
8825         (ppcnbsd_store_inferior_registers): Refactor as methods of
8826         ppc_nbsd_nat_target.
8827         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8828         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8829         (the_ppc_obsd_nat_target): New.
8830         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8831         methods of ppc_obsd_nat_target.
8832         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8833         add_target.
8834         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8835         (the_sh_nbsd_nat_target): New.
8836         (shnbsd_fetch_inferior_registers)
8837         (shnbsd_store_inferior_registers): Refactor as methods of
8838         sh_nbsd_nat_target.
8839         (_initialize_shnbsd_nat): Adjust to C++ification.
8840         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8841         (inf_ptrace_xfer_partial): Delete.
8842         (sparc_xfer_partial, sparc_target): Delete.
8843         * sparc-nat.h (sparc_fetch_inferior_registers)
8844         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8845         (sparc_target): Delete function declaration.
8846         (sparc_target): New template class.
8847         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8848         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8849         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8850         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8851         add_target.
8852         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8853         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8854         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8855         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8856         add_target.
8857         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8858         (the_vax_bsd_nat_target): New.
8859         (vaxbsd_fetch_inferior_registers)
8860         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8861         methods.
8862         (_initialize_vaxbsd_nat): Adjust to C++ification.
8863
8864         * bsd-kvm.c (bsd_kvm_target): New class.
8865         (bsd_kvm_ops): Now a bsd_kvm_target.
8866         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8867         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8868         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8869         bsd_kvm_target.
8870         (bsd_kvm_return_one): Delete.
8871         (bsd_kvm_add_target): Adjust to C++ification.
8872
8873         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8874         (nto_procfs_target_procfs): New classes.
8875         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8876         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8877         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8878         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8879         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8880         (procfs_remove_hw_breakpoint, procfs_resume)
8881         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8882         (procfs_kill_inferior, procfs_store_registers)
8883         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8884         as methods of nto_procfs_target.
8885         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8886         (nto_native_ops): Delete.
8887         (procfs_open, procfs_native_open): Delete.
8888         (nto_native_ops): Now an nto_procfs_target_native.
8889         (init_procfs_targets): Adjust to C++ification.
8890         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8891         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8892         Refactor as methods of nto_procfs_target.
8893
8894         * go32-nat.c (go32_nat_target): New class.
8895         (the_go32_nat_target): New.
8896         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8897         (go32_store_registers, go32_xfer_partial, go32_files_info)
8898         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8899         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8900         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8901         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8902         (go32_target): Delete.
8903         (_initialize_go32_nat): Adjust to C++ification.
8904
8905         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8906         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8907         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8908         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8909         gnu_nat_target.
8910         (gnu_target): Delete.
8911         * gnu-nat.h (gnu_target): Delete.
8912         (gnu_nat_target): New class.
8913         * i386-gnu-nat.c (gnu_base_target): New.
8914         (i386_gnu_nat_target): New class.
8915         (the_i386_gnu_nat_target): New.
8916         (_initialize_i386gnu_nat): Adjust to C++ification.
8917
8918 2018-05-02  Pedro Alves  <[email protected]>
8919
8920         * bfd-target.c (target_bfd_xclose): Rename to ...
8921         (target_bfd_close): ... this.
8922         (target_bfd_reopen): Adjust.
8923         * target.c (target_close): Remove references to to_xclose.
8924         * target.h (target_ops::to_xclose): Delete.
8925         (target_ops::to_close): Update comments.
8926
8927 2018-05-02  Pedro Alves  <[email protected]>
8928
8929         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8930         "linux-nat.h".
8931         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8932         * inf-ptrace.c (inf_ptrace_register_u_offset)
8933         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8934         (inf_ptrace_store_register, inf_ptrace_store_registers)
8935         (inf_ptrace_trad_target): Move to ...
8936         * linux-nat-trad.c: ... this new file.
8937         * linux-nat-trad.h: New file.
8938         * linux-nat.c (linux_target_install_ops): Make extern.
8939         (linux_trad_target): Delete.
8940         * linux-nat.h (linux_trad_target): Delete declaration.
8941         (linux_target_install_ops): Declare.
8942         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8943         "linux-nat.h".
8944
8945 2018-05-02  Pedro Alves  <[email protected]>
8946
8947         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8948         procfs_target/add_target here.
8949         * procfs.c (procfs_target): Make static.
8950         (_initialize_procfs): Call add_target here.
8951         * procfs.h (struct target_ops): Remove forward declaration.
8952         (procfs_target): Remove declaration.
8953         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8954
8955 2018-05-02  Pedro Alves  <[email protected]>
8956
8957         * procfs.c (procfs_stopped_by_watchpoint)
8958         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8959         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8960         Forward declare.
8961         (procfs_use_watchpoints): Delete, move contents...
8962         (procfs_target): ... here.
8963         * procfs.h (procfs_use_watchpoints): Delete declaration.
8964         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8965         procfs_use_watchpoints.
8966         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8967         procfs_use_watchpoints.
8968
8969 2018-05-02  Tom Tromey  <[email protected]>
8970
8971         PR python/20084:
8972         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8973         and var_zuinteger_unlimited.
8974         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8975         and PARAM_ZUINTEGER_UNLIMITED.
8976         (set_parameter_value): Handle var_zuinteger and
8977         var_zuinteger_unlimited.
8978         (add_setshow_generic): Likewise.
8979         (parmpy_init): Likewise.
8980
8981 2018-04-28  Dan Robertson  <[email protected]>
8982
8983         PR rust/23124
8984         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8985         pointer is not null before dereferencing it.
8986
8987 2018-04-30  Tom Tromey  <[email protected]>
8988
8989         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8990         is_mi_like_p.
8991
8992 2018-04-30  Tom Tromey  <[email protected]>
8993
8994         * breakpoint.c (mention): Remove use of is_mi_like_p.
8995         (print_mention_ranged_breakpoint): Likewise.
8996         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8997         of is_mi_like_p.
8998
8999 2018-04-30  Tom Tromey  <[email protected]>
9000
9001         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9002
9003 2018-04-30  Tom Tromey  <[email protected]>
9004
9005         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9006         (info_spu_event_command): Remove some uses of is_mi_like_p.
9007
9008 2018-04-30  Tom Tromey  <[email protected]>
9009
9010         * python/py-framefilter.c (py_print_single_arg)
9011         (enumerate_locals, py_print_args, py_print_frame): Remove some
9012         uses of is_mi_like_p.
9013
9014 2018-04-30  Tom Tromey  <[email protected]>
9015
9016         * ui-out.c: Update.
9017         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9018         * ui-out.h (ui_out::is_mi_like_p): Now const.
9019         (ui_out::do_is_mi_like_p): Now const.
9020         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9021
9022 2018-04-30  Tom Tromey  <[email protected]>
9023
9024         * varobj.c (varobj_set_visualizer): Use new_reference.
9025         * python/python.c (gdbpy_decode_line): Use new_reference.
9026         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9027         new_reference.
9028
9029 2018-04-30  Tom Tromey  <[email protected]>
9030
9031         * varobj.c (install_new_value): Use new_reference.
9032         * value.h (value_incref): Return void.  Swap intro comment with
9033         value_decref.
9034         * value.c (set_value_parent): Use new_reference.
9035         (value_incref): Return void.  Update intro comment.
9036         (release_value): Use new_reference.
9037         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9038
9039 2018-04-30  Tom Tromey  <[email protected]>
9040
9041         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9042         * gdb_bfd.h (new_bfd_ref): Remove.
9043         (gdb_bfd_open): Update comment.
9044         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9045         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9046         (gdb_bfd_fdopenr): Use new_reference.
9047         * exec.c (exec_file_attach): Use new_reference.
9048
9049 2018-04-30  Tom Tromey  <[email protected]>
9050
9051         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9052         method.
9053
9054 2018-04-30  Tom Tromey  <[email protected]>
9055
9056         * jit.c (jit_read_code_entry): Use type_align.
9057         * i386-tdep.c (i386_gdbarch_init): Don't call
9058         set_gdbarch_long_long_align_bit.
9059         * gdbarch.sh: Remove long_long_align_bit.
9060         * gdbarch.c, gdbarch.h: Rebuild.
9061         * arc-tdep.c (arc_type_align): New function.
9062         (arc_gdbarch_init): Use arc_type_align.  Don't call
9063         set_gdbarch_long_long_align_bit.
9064
9065 2018-04-30  Tom Tromey  <[email protected]>
9066
9067         * rust-lang.c (rust_type_alignment): Remove.
9068         (rust_composite_type): Use type_align.
9069
9070 2018-04-30  Tom Tromey  <[email protected]>
9071
9072         * NEWS: Mention Type.align.
9073         * python/py-type.c (typy_get_alignof): New function.
9074         (type_object_getset): Add "alignof".
9075
9076 2018-04-30  Tom Tromey  <[email protected]>
9077
9078         PR exp/17095:
9079         * NEWS: Update.
9080         * std-operator.def (UNOP_ALIGNOF): New operator.
9081         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9082         New.
9083         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9084         * c-lang.c (c_op_print_tab): Add alignof.
9085         * c-exp.y (ALIGNOF): New token.
9086         (exp): Add "ALIGNOF" production.
9087         (ident_tokens): Add _Alignof and alignof.
9088
9089 2018-04-30  Tom Tromey  <[email protected]>
9090
9091         * i386-tdep.c (i386_type_align): New function.
9092         (i386_gdbarch_init): Update.
9093         * gdbarch.sh (type_align): New method.
9094         * gdbarch.c, gdbarch.h: Rebuild.
9095         * arch-utils.h (default_type_align): Declare.
9096         * arch-utils.c (default_type_align): New function.
9097         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9098         (struct type) <align_log2>: New field.
9099         <instance_flags>: Now a bitfield.
9100         (TYPE_RAW_ALIGN): New macro.
9101         (type_align, type_raw_align, set_type_align): Declare.
9102         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9103         functions.
9104         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9105         (get_alignment, maybe_set_alignment): New functions.
9106         (read_structure_type, read_enumeration_type, read_array_type)
9107         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9108         (read_subrange_type, read_base_type): Set type alignment.
9109
9110 2018-04-30  Simon Marchi  <[email protected]>
9111
9112         * dwarf2read.c (read_index_from_section): Use bool.
9113
9114 2018-04-29  Fabian Groffen  <[email protected]>
9115
9116         PR gdb/22950
9117         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9118         with #ifdef.
9119
9120 2018-04-29  John Reiser  <[email protected]>
9121
9122         PR build/22873
9123         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9124         last step, and do it atomically.
9125
9126 2018-04-27  Alexandre Oliva  <[email protected]>
9127
9128         * compile/compile-c-types.c (convert_int, convert_float):
9129         Update for C FE v1.
9130
9131 2018-04-27  Tom Tromey  <[email protected]>
9132
9133         PR rust/22545:
9134         * rust-lang.c (rust_inclusive_range_type_p): New function.
9135         (rust_range): Handle inclusive ranges.
9136         (rust_compute_range): Likewise.
9137         * rust-exp.y (struct rust_op) <inclusive>: New field.
9138         (DOTDOTEQ): New constant.
9139         (range_expr): Add "..=" productions.
9140         (operator_tokens): Add "..=" token.
9141         (ast_range): Add "inclusive" parameter.
9142         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9143         ranges.
9144         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9145         bounds values.
9146         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9147         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9148         Update comments.
9149         * expprint.c (print_subexp_standard): Handle new bounds values.
9150         (dump_subexp_body_standard): Likewise.
9151
9152 2018-04-27  Tom Tromey  <[email protected]>
9153
9154         * configure: Rebuild.
9155         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9156         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9157         "OVERRIDE".
9158         (class symbol_needs_eval_context): Likewise.
9159         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9160         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9161         "virtual".
9162         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9163         "override".
9164         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9165         * aarch64-tdep.c (instruction_reader::read): Use "override".
9166         (instruction_reader_test::read): Likewise.
9167         * arm-tdep.c (instruction_reader::read): Use "override".
9168         (instruction_reader_thumb::read): Likewise.
9169
9170 2018-04-26  Andrzej Kaczmarek  <[email protected]>
9171
9172         PR remote/9665
9173         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9174         instead of remote_send.
9175         (remote_send): Remove.
9176
9177 2018-04-26  Pedro Alves  <[email protected]>
9178
9179         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9180         find_function_start_sal instead of find_pc_line.
9181
9182 2018-04-26  Pedro Alves  <[email protected]>
9183
9184         * breakpoint.c (set_breakpoint_location_function): Handle
9185         mst_data_gnu_ifunc.
9186         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9187         * elfread.c (elf_symtab_read): Give data symbols with
9188         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9189         (elf_rel_plt_read): Update comment.
9190         * linespec.c (convert_linespec_to_sals): Handle
9191         mst_data_gnu_ifunc.
9192         (minsym_found): Handle mst_data_gnu_ifunc.
9193         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9194         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9195         * parse.c (find_minsym_type_and_address): Handle
9196         mst_data_gnu_ifunc.
9197         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9198         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9199         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9200         comment.
9201         <mst_data_gnu_ifunc>: New enumerator.
9202
9203 2018-04-26  Pedro Alves  <[email protected]>
9204
9205         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9206         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9207         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9208         Handle it.
9209         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9210         (lookup_minimal_symbol_by_pc): Adjust.
9211         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9212         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9213         * minsyms.h (lookup_msym_prefer): New enum.
9214         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9215         parameter by a lookup_msym_prefer parameter.
9216
9217 2018-04-26  Pedro Alves  <[email protected]>
9218
9219         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9220         ends in "@plt" instead of looking at the symbol's section.
9221
9222 2018-04-26  Pedro Alves  <[email protected]>
9223
9224         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9225         all references.
9226         (find_pc_partial_function_gnu_ifunc): Rename to ...
9227         (find_pc_partial_function): ... this, and remove references to
9228         'is_gnu_ifunc_p'.
9229         (find_pc_partial_function): Delete old implementation.
9230         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9231
9232 2018-04-26  Pedro Alves  <[email protected]>
9233
9234         * linespec.c (struct bound_minimal_symbol_search_key): New.
9235         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9236         skip first line if we found a GNU ifunc minimal symbol by name.
9237         (compare_msymbols): Change parameters to work with a destructured
9238         lhs minsym.
9239         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9240         functions.
9241
9242 2018-04-26  Pedro Alves  <[email protected]>
9243
9244         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9245         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9246         address/name.
9247         (add_location_to_breakpoint): Store the minsym and the objfile in
9248         the breakpoint location.
9249         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9250         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9251         Record the minsym in the sal.
9252         * symtab.h (symtab_and_line) <msymbol>: New field.
9253
9254 2018-04-26  Pedro Alves  <[email protected]>
9255
9256         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9257         unless we actually resolved the ifunc.
9258
9259 2018-04-26  Pedro Alves  <[email protected]>
9260
9261         * c-exp.y (variable production): Prefer ifunc minsyms over
9262         regular function symbols.
9263         * symtab.c (find_gnu_ifunc): New function.
9264         * minsyms.h (lookup_msym_prefer): New enum.
9265         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9266         parameter by a lookup_msym_prefer parameter.
9267         * symtab.h (find_gnu_ifunc): New declaration.
9268
9269 2018-04-26  Pedro Alves  <[email protected]>
9270
9271         * blockframe.c (find_gnu_ifunc_target_type): New function.
9272         (find_function_type): New.
9273         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9274         return a value with a memory address.
9275         (eval_call): For calls to GNU ifunc functions, try to find the
9276         type of the target function from the type that the resolver
9277         returns.
9278         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9279         symbols.
9280         * infcall.c (find_function_return_type): Delete.
9281         (find_function_addr): Add 'function_type' parameter.  For calls to
9282         GNU ifunc functions, try to find the type of the target function
9283         from the type that the resolver returns, and return it via
9284         FUNCTION_TYPE.
9285         (call_function_by_hand_dummy): Adjust to use the function type
9286         returned by find_function_addr.
9287         (find_function_addr): Add 'function_type' parameter and move
9288         description here.
9289         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9290         declarations.
9291
9292 2018-04-26  Pedro Alves  <[email protected]>
9293
9294         * c-exp.y (variable production): Skip finding an alias for ifunc
9295         symbols.
9296
9297 2018-04-26  Pedro Alves  <[email protected]>
9298
9299         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9300
9301 2018-04-25  Pedro Alves  <[email protected]>
9302
9303         * infcmd.c (kill_command): Print the pid as string, not the whole
9304         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9305         message.
9306         * remote.c (remote_detach_1): Print the pid as string, not the
9307         whole thread's ptid.
9308
9309 2018-04-24  Jan Kratochvil  <[email protected]>
9310             Sergio Durigan Junior  <[email protected]>
9311             Pedro Alves  <[email protected]>
9312
9313         * infcmd.c (kill_command): Print message when inferior has
9314         been killed.
9315         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9316         '1'.
9317         (add_inferior): Improve message printed when
9318         'print_inferior_events' is on.
9319         (exit_inferior): Remove message printed when
9320         'print_inferior_events' is on.
9321         (detach_inferior): Improve message printed when
9322         'print_inferior_events' is on.
9323         (initialize_inferiors): Use 'add_inferior_silent' to set
9324         'current_inferior_'.
9325         * inferior.h (print_inferior_events): Declare here as
9326         'extern'.
9327         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9328         '[Detaching...]' messages when 'print_inferior_events' is on.
9329         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9330         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9331         'Detaching after fork from child...', replace it by '... from
9332         parent...'.
9333         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9334         prefix/suffix when printing 'Detaching...' messages.  Print
9335         them when 'print_inferior_events' is on.
9336         * remote.c (remote_detach_1): Print message when detaching
9337         from inferior and '!is_fork_parent'.
9338
9339 2018-04-24  Tom Tromey  <[email protected]>
9340
9341         * cli-out.h: Reindent.
9342
9343 2018-04-24  Tom Tromey  <[email protected]>
9344
9345         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9346         (cli_ui_out::do_field_string): Use fputs_filtered.
9347         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9348
9349 2018-04-23  Tom Tromey  <[email protected]>
9350
9351         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9352         gdb::unique_xmalloc_ptr.
9353
9354 2018-04-23  Tom Tromey  <[email protected]>
9355
9356         * configure: Rebuild.
9357
9358 2018-04-22  Rajendra SY  <[email protected]>
9359
9360         PR gdb/23095
9361         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9362         prepare_for_testing.  Set normal_bp to r_debug_state if target
9363         is bsd.
9364
9365 2018-04-21  Pedro Alves  <[email protected]>
9366             Rajendra SY  <[email protected]>
9367
9368         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9369         * remote.c (extended_remote_attach): In all-stop mode, mark the
9370         thread as executing.
9371
9372 2018-04-19  Philippe Waroquiers  <[email protected]>
9373
9374         * thread.c (thread_apply_all_command): Fix comment.
9375         (thread_command): Fix comment.
9376
9377 2018-04-10  Alan Hayward  <[email protected]>
9378
9379         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9380         parameter.
9381         * features/aarch64-core.c (create_feature_aarch64_core):
9382         Regenerate.
9383         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9384         Likewise.
9385         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9386         Likewise.
9387         * features/i386/32bit-avx512.c
9388         (create_feature_i386_32bit_avx512): Likewise.
9389         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9390         Likewise.
9391         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9392         Likewise.
9393         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9394         Likewise.
9395         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9396         Likewise.
9397         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9398         Likewise.
9399         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9400         Likewise.
9401         * features/i386/64bit-avx512.c
9402         (create_feature_i386_64bit_avx512): Likewise.
9403         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9404         Likewise.
9405         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9406         Likewise.
9407         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9408         Likewise.
9409         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9410         Likewise.
9411         * features/i386/64bit-segments.c
9412         (create_feature_i386_64bit_segments): Likewise.
9413         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9414         Likewise.
9415         * features/i386/x32-core.c
9416         (create_feature_i386_x32_core): Likewise.
9417         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9418         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9419         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9420         * target-descriptions.c: In generated code, don't pass xml
9421         filename.
9422
9423 2018-04-18  Alan Hayward  <[email protected]>
9424
9425         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9426         (print_xml_feature::visit_post): Likewise.
9427         (print_xml_feature::visit): Likewise.
9428         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9429         (print_xml_feature): Add new class.
9430         * regformats/regdat.sh: Null xmltarget on feature targets.
9431         * target-descriptions.c (struct target_desc): Add xmltarget.
9432         (maintenance_check_tdesc_xml_convert): Add unittest function.
9433         (tdesc_get_features_xml): Add function to get xml.
9434         (maintenance_check_xml_descriptions): Test xml generation.
9435         * xml-tdesc.c (string_read_description_xml): Add function.
9436         * xml-tdesc.h (string_read_description_xml): Add declaration.
9437
9438 2018-04-18  Alan Hayward  <[email protected]>
9439
9440         * features/Makefile: Add feature marker to targets with new style
9441         target descriptions.
9442         * regformats/aarch64.dat: Regenerate.
9443         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9444         * regformats/i386/amd64-avx-linux.dat: Likewise.
9445         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9446         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9447         * regformats/i386/amd64-linux.dat: Likewise.
9448         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9449         * regformats/i386/amd64.dat: Likewise.
9450         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9451         * regformats/i386/i386-avx-linux.dat: Likewise.
9452         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9453         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9454         * regformats/i386/i386-linux.dat: Likewise.
9455         * regformats/i386/i386-mmx-linux.dat: Likewise.
9456         * regformats/i386/i386-mpx-linux.dat: Likewise.
9457         * regformats/i386/i386.dat: Likewise.
9458         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9459         * regformats/i386/x32-avx-linux.dat: Likewise.
9460         * regformats/i386/x32-linux.dat: Likewise.
9461         * regformats/tic6x-c62x-linux.dat: Likewise.
9462         * regformats/tic6x-c64x-linux.dat: Likewise.
9463         * regformats/tic6x-c64xp-linux.dat: Likewise.
9464         * regformats/regdat.sh: Parse feature marker.
9465
9466 2018-04-18  Alan Hayward  <[email protected]>
9467
9468         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9469         (tdesc_osabi_name): Likewise.
9470         * target-descriptions.c (tdesc_architecture_name): Add new
9471         function.
9472         (tdesc_osabi_name): Likewise.
9473
9474 2018-04-18  Alan Hayward  <[email protected]>
9475
9476         * common/tdesc.c (tdesc_predefined_type): Move to here.
9477         (tdesc_named_type): Likewise.
9478         (tdesc_create_vector): Likewise.
9479         (tdesc_create_struct): Likewise.
9480         (tdesc_set_struct_size): Likewise.
9481         (tdesc_create_union): Likewise.
9482         (tdesc_create_flags): Likewise.
9483         (tdesc_create_enum): Likewise.
9484         (tdesc_add_field): Likewise.
9485         (tdesc_add_typed_bitfield): Likewise.
9486         (tdesc_add_bitfield): Likewise.
9487         (tdesc_add_flag): Likewise.
9488         (tdesc_add_enum_value): Likewise.
9489         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9490         (struct tdesc_type_vector): Likewise.
9491         (struct tdesc_type_field): Likewise.
9492         (struct tdesc_type_with_fields): Likewise.
9493         (tdesc_create_enum): Add declaration.
9494         (tdesc_add_typed_bitfield): Likewise.
9495         (tdesc_add_enum_value): Likewise.
9496         * target-descriptions.c (tdesc_type_field): Move from here.
9497         (tdesc_type_builtin): Likewise.
9498         (tdesc_type_vector): Likewise.
9499         (tdesc_type_with_fields): Likewise.
9500         (tdesc_predefined_types): Likewise.
9501         (tdesc_named_type): Likewise.
9502         (tdesc_create_vector): Likewise.
9503         (tdesc_create_struct): Likewise.
9504         (tdesc_set_struct_size): Likewise.
9505         (tdesc_create_union): Likewise.
9506         (tdesc_create_flags): Likewise.
9507         (tdesc_create_enum): Likewise.
9508         (tdesc_add_field): Likewise.
9509         (tdesc_add_typed_bitfield): Likewise.
9510         (tdesc_add_bitfield): Likewise.
9511         (tdesc_add_flag): Likewise.
9512         (tdesc_add_enum_value): Likewise.
9513         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9514         (tdesc_add_typed_bitfield): Likewise.
9515         (tdesc_add_enum_value): Likewise.
9516
9517 2018-04-18  Alan Hayward  <[email protected]>
9518
9519         * common/tdesc.c (tdesc_feature::accept): Move to here.
9520         (tdesc_feature::operator==): Likewise.
9521         (tdesc_create_reg): Likewise.
9522         * common/tdesc.h (tdesc_type_kind): Likewise.
9523         (struct tdesc_type): Likewise.
9524         (struct tdesc_feature): Likewise.
9525         * regformats/regdat.sh: Create a feature.
9526         * target-descriptions.c (tdesc_type_kind): Move from here.
9527         (tdesc_type): Likewise.
9528         (tdesc_type_up): Likewise.
9529         (tdesc_feature): Likewise.
9530         (tdesc_create_reg): Likewise.
9531
9532 2018-04-18  Alan Hayward  <[email protected]>
9533
9534         * Makefile.in: Add arch/tdesc.c
9535         * common/tdesc.c: New file.
9536         * common/tdesc.h (tdesc_element_visitor): Move to here.
9537         (tdesc_element): Likewise.
9538         (tdesc_reg): Likewise.
9539         (tdesc_reg_up): Likewise.
9540         * regformats/regdef.h (reg): Add offset to constructors.
9541         * target-descriptions.c (tdesc_element_visitor): Move from here.
9542         (tdesc_element): Likewise.
9543         (tdesc_reg): Likewise.
9544         (tdesc_reg_up): Likewise.
9545
9546 2018-04-17  Tom Tromey  <[email protected]>
9547
9548         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9549         discriminant field.
9550
9551 2018-04-17  Tom Tromey  <[email protected]>
9552
9553         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9554
9555 2018-04-17  Andreas Arnez  <[email protected]>
9556
9557         * symtab.c (print_symbol_info): Skip printing filename and line
9558         number when `last' is NULL.
9559         (symtab_symbol_info): Use empty string instead of NULL for first
9560         invocation of print_symbol_info.
9561         (rbreak_command): Pass NULL to `last' parameter of
9562         print_symbol_info.
9563
9564 2018-04-16  Simon Marchi  <[email protected]>
9565
9566         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9567         instead of nullptr.
9568
9569 2018-04-16  Pedro Alves  <[email protected]>
9570
9571         * MAINTAINERS (sh): Remove.
9572         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9573         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9574         (ALLDEPFILES): Remove sh64-tdep.c.
9575         * NEWS: Mentions that support for SH-5/SH64 is removed.
9576         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9577         (sh*-*-openbsd*): Ditto.
9578         (sh64-*-elf*): Remove.
9579         (sh*): Remove.
9580         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9581         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9582         * sh-tdep.c: No longer include "sh64-tdep.h".
9583         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9584         * sh64-tdep.c, sh64-tdep.h: Remove files.
9585
9586 2018-04-16  Pedro Alves  <[email protected]>
9587
9588         * MAINTAINERS: Remove m88k.
9589         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9590         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9591         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9592         * NEWS: Mention that support for m88k was removed.
9593         * configure.host (m88*-*-*): Remove support.
9594         * configure.nat (m88k-*-*): Remove support.
9595         * configure.tgt (m88*-*-openbsd*): Remove.
9596         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9597
9598 2018-04-15  Simon Marchi  <[email protected]>
9599
9600         * configure.tgt (x86_tobjs): New variable.
9601         (amd64_tobjs, i386_tobjs): Use it.
9602
9603 2018-04-13  Andreas Arnez  <[email protected]>
9604
9605         * symtab.c (print_symbol_info): Precede the symbol definition by
9606         the line number when available.
9607         * NEWS: Advertise this enhancement.
9608
9609 2018-04-13  Markus Metzger  <[email protected]>
9610
9611         * NEWS (New options): announce set/show record btrace cpu.
9612         * btrace.c: Include record-btrace.h.
9613         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9614         the vendor is unknown.
9615         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9616         Maybe overwrite the btrace configuration's cpu.
9617         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9618         (btrace_fetch): Add cpu parameter.  Update callers.
9619         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9620         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9621         errata workarounds if the vendor is unknown.
9622         * python/py-record-btrace.c: Include record-btrace.h.
9623         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9624         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9625         * record-btrace.c (record_btrace_cpu_state_kind): New.
9626         (record_btrace_cpu): New.
9627         (set_record_btrace_cpu_cmdlist): New.
9628         (record_btrace_get_cpu): New.
9629         (require_btrace_thread, record_btrace_info)
9630         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9631         (cmd_set_record_btrace_cpu_none): New.
9632         (cmd_set_record_btrace_cpu_auto): New.
9633         (cmd_set_record_btrace_cpu): New.
9634         (cmd_show_record_btrace_cpu): New.
9635         (_initialize_record_btrace): Initialize set/show record btrace cpu
9636         commands.
9637         * record-btrace.h (record_btrace_get_cpu): New.
9638
9639 2018-04-13  Markus Metzger  <[email protected]>
9640
9641         * record.c (set_record_command): Fix typo in message.
9642
9643 2018-04-13  Markus Metzger  <[email protected]>
9644
9645         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9646
9647 2018-04-13  Markus Metzger  <[email protected]>
9648
9649         * infrun.c (process_event_stop_test): Call
9650         gdbarch_in_indirect_branch_thunk.
9651         * gdbarch.sh (in_indirect_branch_thunk): New.
9652         * gdbarch.c: Regenerated.
9653         * gdbarch.h: Regenerated.
9654         * x86-tdep.h: New.
9655         * x86-tdep.c: New.
9656         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9657         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9658         (ALLDEPFILES): Add x86-tdep.c.
9659         * arch-utils.h (default_in_indirect_branch_thunk): New.
9660         * arch-utils.c (default_in_indirect_branch_thunk): New.
9661         * i386-tdep: Include x86-tdep.h.
9662         (i386_in_indirect_branch_thunk): New.
9663         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9664         function.
9665         * amd64-tdep: Include x86-tdep.h.
9666         (amd64_in_indirect_branch_thunk): New.
9667         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9668
9669 2018-04-12  Jan Kratochvil  <[email protected]>
9670
9671         PR gdb/23053
9672         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9673         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9674         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9675         regression.
9676
9677 2018-04-12  Tom Tromey  <[email protected]>
9678
9679         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9680         (rust_evaluate_subexp): Likewise.
9681
9682 2018-04-12  Pedro Alves  <[email protected]>
9683
9684         * procfs.c (procfs_detach): Make forward declaration's prototype
9685         match definition's protototype.
9686         (proc_get_LDT_entry): Remove stale do_cleanups call.
9687
9688 2018-04-12  Pedro Alves  <[email protected]>
9689
9690         * target.h (target_ops::to_has_exited): Delete.
9691         (target_has_exited): Delete.
9692         * target-delegates.c: Regenerate.
9693
9694 2018-04-11  Pedro Alves  <[email protected]>
9695
9696         * target.c (fileio_fh_t::t): Add comment.
9697         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9698         (target_fileio_close): Handle a NULL target.
9699         (invalidate_fileio_fh): New.
9700         (target_close): Call it.
9701         * remote.c (remote_hostio_send_command): No longer check whether
9702         remote_desc is open.
9703
9704 2018-04-11  Pedro Alves  <[email protected]>
9705
9706         * target.c (fileio_fh_t): Make it a named struct instead of a
9707         typedef.
9708         (fileio_fh_t::is_closed): New method.
9709         (DEF_VEC_O (fileio_fh_t)): Remove.
9710         (fileio_fhandles): Now a std::vector.
9711         (is_closed_fileio_fh): Delete.
9712         (acquire_fileio_fd): Adjust.  Rename parameters.
9713         (release_fileio_fd): Adjust.
9714         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9715         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9716         (target_fileio_close): Adjust.
9717
9718 2018-04-10  Simon Marchi  <[email protected]>
9719
9720         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9721         index.
9722
9723 2018-04-10  Pedro Alves  <[email protected]>
9724
9725         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9726         (scoped_finish_thread_state): New class.
9727         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9728         cleanup.
9729         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9730         (fetch_inferior_event, normal_stop): Likewise.
9731         * thread.c (finish_thread_state_cleanup): Delete.
9732
9733 2018-04-09  Simon Marchi  <[email protected]>
9734             Pedro Alves  <[email protected]>
9735
9736         * value.c: Include "selftest.h" and "common/array-view.h".
9737         (struct range) <operator ==>: New.
9738         (test_ranges_contain): New.
9739         (check_ranges_vector): New.
9740         (test_insert_into_bit_range_vector): New.
9741         (_initialize_values): Register selftests.
9742         * common/array-view.h (operator==, operator!=): New.
9743
9744 2018-04-09  Simon Marchi  <[email protected]>
9745
9746         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9747         an iterator.
9748         * inline-frame.c: Include <algorithm>.
9749         (struct inline_state): Add constructor.
9750         (inline_state_s): Remove.
9751         (DEF_VEC_O(inline_state_s)): Remove.
9752         (inline_states): Change type to std::vector.
9753         (find_inline_frame_state): Adjust to std::vector.
9754         (allocate_inline_frame_state): Remove.
9755         (clear_inline_frame_state): Adjust to std::vector.
9756         (skip_inline_frames): Adjust to std::vector.
9757
9758 2018-04-09  Simon Marchi  <[email protected]>
9759
9760         * tracepoint.h (struct trace_state_variable): Add constructor.
9761         <name>: Change type to std::string.
9762         * tracepoint.c (tsv_s): Remove.
9763         (DEF_VEC_O(tsv_s)): Remove.
9764         (tvariables): Change to std::vector.
9765         (create_trace_state_variable): Adjust to std::vector.
9766         (find_trace_state_variable): Likewise.
9767         (find_trace_state_variable_by_number): Likewise.
9768         (delete_trace_state_variable): Likewise.
9769         (trace_variable_command): Adjust to std::string.
9770         (delete_trace_variable_command): Likewise.
9771         (tvariables_info_1): Adjust to std::vector.
9772         (save_trace_state_variables): Likewise.
9773         (start_tracing): Likewise.
9774         (merge_uploaded_trace_state_variables): Adjust to std::vector
9775         and std::string.
9776         * target.h (struct target_ops)
9777         <to_download_trace_state_variable>: Pass reference to
9778         trace_state_variable.
9779         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9780         * target-delegates.c: Re-generate.
9781         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9782         (mi_tsv_deleted): Likewise.
9783         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9784         * remote.c (remote_download_trace_state_variable): Change
9785         pointer to reference and adjust.
9786         * make-target-delegates (parse_argtypes): Handle references.
9787         (write_function_header): Likewise.
9788         (munge_type): Likewise.
9789
9790 2018-04-09  Simon Marchi  <[email protected]>
9791
9792         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9793         string_view-selftests.c.
9794         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9795         testsuite.
9796         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9797         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9798         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9799         * unittests/basic_string_view/element_access/char/1.cc:
9800         Likewise.
9801         * unittests/basic_string_view/element_access/char/empty.cc:
9802         Likewise.
9803         * unittests/basic_string_view/element_access/char/front_back.cc:
9804         Likewise.
9805         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9806         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9807         Likewise.
9808         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9809         Likewise.
9810         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9811         Likewise.
9812         * unittests/basic_string_view/operations/compare/char/1.cc:
9813         Likewise.
9814         * unittests/basic_string_view/operations/compare/char/13650.cc:
9815         Likewise.
9816         * unittests/basic_string_view/operations/copy/char/1.cc:
9817         Likewise.
9818         * unittests/basic_string_view/operations/data/char/1.cc:
9819         Likewise.
9820         * unittests/basic_string_view/operations/find/char/1.cc:
9821         Likewise.
9822         * unittests/basic_string_view/operations/find/char/2.cc:
9823         Likewise.
9824         * unittests/basic_string_view/operations/find/char/3.cc:
9825         Likewise.
9826         * unittests/basic_string_view/operations/find/char/4.cc:
9827         Likewise.
9828         * unittests/basic_string_view/operations/rfind/char/1.cc:
9829         Likewise.
9830         * unittests/basic_string_view/operations/rfind/char/2.cc:
9831         Likewise.
9832         * unittests/basic_string_view/operations/rfind/char/3.cc:
9833         Likewise.
9834         * unittests/basic_string_view/operations/substr/char/1.cc:
9835         Likewise.
9836         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9837         * unittests/string_view-selftests.c: New file.
9838
9839 2018-04-09  Simon Marchi  <[email protected]>
9840
9841         * unittests/basic_string_view/capacity/1.cc: New file.
9842         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9843         * unittests/basic_string_view/cons/char/1.cc: New file.
9844         * unittests/basic_string_view/cons/char/2.cc: New file.
9845         * unittests/basic_string_view/cons/char/3.cc: New file.
9846         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9847         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9848         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9849         * unittests/basic_string_view/element_access/char/1.cc: New file.
9850         * unittests/basic_string_view/element_access/char/2.cc: New file.
9851         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9852         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9853         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9854         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9855         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9856         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9857         * unittests/basic_string_view/include.cc: New file.
9858         * unittests/basic_string_view/inserters/char/1.cc: New file.
9859         * unittests/basic_string_view/inserters/char/2.cc: New file.
9860         * unittests/basic_string_view/inserters/char/3.cc: New file.
9861         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9862         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9863         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9864         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9865         * unittests/basic_string_view/literals/types.cc: New file.
9866         * unittests/basic_string_view/literals/values.cc: New file.
9867         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9868         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9869         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9870         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9871         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9872         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9873         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9874         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9875         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9876         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9877         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9878         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9879         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9880         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9881         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9882         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9883         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9884         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9885         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9886         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9887         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9888         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9889         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9890         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9891         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9892         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9893         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9894         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9895         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9896         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9897         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9898         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9899         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9900         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9901         * unittests/basic_string_view/operators/char/2.cc: New file.
9902         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9903         * unittests/basic_string_view/range_access/char/1.cc: New file.
9904         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9905         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9906         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9907         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9908         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9909         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9910         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9911         * unittests/basic_string_view/typedefs.cc: New file.
9912         * unittests/basic_string_view/types/1.cc: New file.
9913
9914 2018-04-09  Simon Marchi  <[email protected]>
9915
9916         * common/gdb_string_view.h: Remove libstdc++ implementation
9917         details, adjust to gdb reality.
9918         * common/gdb_string_view.tcc: Likewise.
9919         * cli/cli-script.c (struct string_view): Remove.
9920         (user_args) <m_args>: Change element type to gdb::string_view.
9921         (user_args::insert_args): Adjust.
9922
9923 2018-04-09  Simon Marchi  <[email protected]>
9924
9925         * common/gdb_string_view.h: New file.
9926         * common/gdb_string_view.tcc: New file.
9927
9928 2018-04-09  Simon Marchi  <[email protected]>
9929
9930         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9931         * configure: Re-generate.
9932
9933 2018-04-09  Pedro Alves  <[email protected]>
9934
9935         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9936         (set_target_gdbarch): Call
9937         gdb::observers::architecture_changed.notify instead of
9938         observer_notify_architecture_changed.
9939
9940 2018-04-07  Simon Marchi  <[email protected]>
9941
9942         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9943         (do_restore_current_traceframe_cleanup): Remove.
9944         (restore_current_traceframe_cleanup_dtor): Remove.
9945         (make_cleanup_restore_current_traceframe): Remove.
9946         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9947         New.
9948         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9949         * infrun.c (fetch_inferior_event): Use
9950         scoped_restore_current_traceframe.
9951
9952 2018-04-07  Simon Marchi  <[email protected]>
9953
9954         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9955         Remove.
9956         <n_allocated_type_units>: Remove.
9957         <all_type_units>: Change to std::vector.
9958         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9959         to std::vector change.
9960         (dwarf2_per_objfile::get_cutu): Likewise.
9961         (dwarf2_per_objfile::get_tu): Likewise.
9962         (create_signatured_type_table_from_index): Likewise.
9963         (create_signatured_type_table_from_debug_names): Likewise.
9964         (dw2_symtab_iter_next): Likewise.
9965         (dw2_print_stats): Likewise.
9966         (dw2_expand_all_symtabs): Likewise.
9967         (dw2_expand_marked_cus): Likewise.
9968         (dw2_debug_names_iterator::next): Likewise.
9969         (dwarf2_initialize_objfile): Likewise.
9970         (add_signatured_type_cu_to_table): Likewise.
9971         (create_all_type_units): Likewise.
9972         (add_type_unit): Likewise.
9973         (struct tu_abbrev_offset): Add constructor.
9974         (build_type_psymtabs_1): Adjust to std::vector change.
9975         (print_tu_stats): Likewise.
9976         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9977         (write_debug_names): Likewise.
9978
9979 2018-04-07  Simon Marchi  <[email protected]>
9980
9981         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9982         Make an std::vector.
9983         <n_comp_units>: Remove.
9984         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9985         to std::vector change.
9986         (dwarf2_per_objfile::get_cutu): Likewise.
9987         (dwarf2_per_objfile::get_cu): Likewise.
9988         (create_cus_from_index): Likewise.
9989         (create_addrmap_from_index): Likewise.
9990         (create_addrmap_from_aranges): Likewise.
9991         (dwarf2_read_index): Likewise.
9992         (dw2_find_last_source_symtab): Likewise.
9993         (dw2_map_symtabs_matching_filename): Likewise.
9994         (dw2_symtab_iter_next): Likewise.
9995         (dw2_print_stats): Likewise.
9996         (dw2_expand_all_symtabs): Likewise.
9997         (dw2_expand_symtabs_with_fullname): Likewise.
9998         (dw2_expand_marked_cus): Likewise.
9999         (dw2_map_symbol_filenames): Likewise.
10000         (create_cus_from_debug_names): Likewise.
10001         (dwarf2_read_debug_names): Likewise.
10002         (dw2_debug_names_iterator::next): Likewise.
10003         (dwarf2_initialize_objfile): Likewise.
10004         (set_partial_user): Likewise.
10005         (dwarf2_build_psymtabs_hard): Likewise.
10006         (read_comp_units_from_section): Remove arguments, adjust to
10007         std::vector change.
10008         (create_all_comp_units): Adjust to std::vector and
10009         read_comp_units_from_section changes.
10010         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10011         change.
10012         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10013         (psyms_seen_size): Likewise.
10014         (write_gdbindex): Likewise.
10015         (write_debug_names): Likewise.
10016
10017 2018-04-07  Simon Marchi  <[email protected]>
10018
10019         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10020         with dwarf2_per_objfile.
10021         (create_cus_from_index): Likewise.
10022         (create_signatured_type_table_from_index): Likewise.
10023         (dwarf2_read_index): Likewise.
10024         (dwarf2_initialize_objfile): Likewise.
10025         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10026         per_cu rather than get_dwarf2_per_objfile.
10027
10028 2018-04-07  Simon Marchi  <[email protected]>
10029
10030         * dwarf2read.h (struct signatured_type): Forward declare.
10031         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10032         New methods.
10033         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10034         (dw2_get_cutu): ...this.
10035         (dwarf2_per_objfile::get_cu): Rename from...
10036         (dw2_get_cu): ...this.
10037         (dwarf2_per_objfile::get_tu): New.
10038         (create_addrmap_from_index): Adjust.
10039         (create_addrmap_from_aranges): Adjust.
10040         (dw2_find_last_source_symtab): Adjust.
10041         (dw2_map_symtabs_matching_filename): Adjust.
10042         (dw2_symtab_iter_next): Adjust.
10043         (dw2_print_stats): Adjust.
10044         (dw2_expand_all_symtabs): Adjust.
10045         (dw2_expand_symtabs_with_fullname): Adjust.
10046         (dw2_expand_marked_cus): Adjust.
10047         (dw_expand_symtabs_matching_file_matcher): Adjust.
10048         (dw2_map_symbol_filenames): Adjust.
10049         (dw2_debug_names_iterator::next): Adjust.
10050         (dwarf2_initialize_objfile): Adjust.
10051         (set_partial_user): Adjust.
10052         (dwarf2_build_psymtabs_hard): Adjust.
10053
10054 2018-04-07  Simon Marchi  <[email protected]>
10055
10056         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10057         Remove unused variables.
10058         (dw2_map_symtabs_matching_filename): Likewise.
10059         (dwarf2_record_block_ranges): Likewise.
10060         (dwarf2_read_addr_index): Likewise.
10061         (follow_die_offset): Likewise.
10062
10063 2018-04-07  Simon Marchi  <[email protected]>
10064
10065         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10066         to symbol_file_add_main.
10067
10068 2018-04-07  Simon Marchi  <[email protected]>
10069
10070         PR mi/22299
10071         * mi/mi-console.c (do_fputc_async_safe): New.
10072         (mi_console_file::write_async_safe): New.
10073         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10074         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10075         New.
10076         * ui-file.c (ui_file::putstrn): Adjust call to
10077         fputstrn_unfiltered.
10078         * utils.c (printchar): Replace do_fputs and do_fprintf
10079         parameters by do_fputc.
10080         (fputstr_filtered): Adjust call to printchar.
10081         (fputstr_unfiltered): Likewise.
10082         (fputstrn_filtered): Likewise.
10083         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10084         printchar.
10085         * utils.h (do_fputc_ftype): New typedef.
10086         (fputstrn_unfiltered): Add do_fputc parameter.
10087
10088 2018-04-07  Simon Marchi  <[email protected]>
10089
10090         * regformats/i386/i386-avx.dat: Remove.
10091
10092 2018-04-07  Simon Marchi  <[email protected]>
10093
10094         PR gdb/22979
10095         * amd64-tdep.c (amd64_none_init_abi): New function.
10096         (amd64_x32_none_init_abi): New function.
10097         (_initialize_amd64_tdep): Register handlers for x86-64 and
10098         x64_32 with GDB_OSABI_NONE.
10099         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10100         GDB_OSABI_NONE osabi.
10101
10102 2018-04-07  Simon Marchi  <[email protected]>
10103
10104         PR gdb/22980
10105         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10106         GDB_OSABI_NONE.
10107         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10108         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10109
10110 2018-04-07  Simon Marchi  <[email protected]>
10111
10112         * common/byte-vector.h (char_vector): New type.
10113         * target.h (target_read_alloc): Return
10114         gdb::optional<byte_vector>.
10115         (target_read_stralloc): Return gdb::optional<char_vector>.
10116         (target_get_osdata): Return gdb::optional<char_vector>.
10117         * target.c (target_read_alloc_1): Templatize.  Replacement
10118         manual memory management with vector.
10119         (target_read_alloc): Change return type, adjust.
10120         (target_read_stralloc): Change return type, adjust.
10121         (target_get_osdata): Change return type, adjust.
10122         * auxv.c (struct auxv_info) <length>: Remove.
10123         <data>: Change type to gdb::optional<byte_vector>.
10124         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10125         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10126         (target_auxv_search): Adjust.
10127         (fprint_target_auxv): Adjust.
10128         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10129         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10130         (linux_make_corefile_notes): Adjust.
10131         * osdata.c (get_osdata): Adjust.
10132         * remote.c (remote_get_threads_with_qxfer): Adjust.
10133         (remote_memory_map): Adjust.
10134         (remote_traceframe_info): Adjust.
10135         (btrace_read_config): Adjust.
10136         (remote_read_btrace): Adjust.
10137         (remote_pid_to_exec_file): Adjust.
10138         * solib-aix.c (solib_aix_get_library_list): Adjust.
10139         * solib-dsbt.c (decode_loadmap): Don't free buf.
10140         (dsbt_get_initial_loadmaps): Adjust.
10141         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10142         * solib-target.c (solib_target_current_sos): Adjust.
10143         * tracepoint.c (sdata_make_value): Adjust.
10144         * xml-support.c (xinclude_start_include): Adjust.
10145         (xml_fetch_content_from_file): Adjust.
10146         * xml-support.h (xml_fetch_another): Change return type.
10147         (xml_fetch_content_from_file): Change return type.
10148         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10149         * xml-tdesc.c (file_read_description_xml): Adjust.
10150         (fetch_available_features_from_target): Change return type.
10151         (target_fetch_description_xml): Adjust.
10152         (target_read_description_xml): Adjust.
10153
10154 2018-04-06  Tom Tromey  <[email protected]>
10155
10156         * value.c (~value): Update.
10157         (struct value) <contents>: Now unique_xmalloc_ptr.
10158         (value_contents_bits_eq, allocate_value_contents)
10159         (value_contents_raw, value_contents_all_raw)
10160         (value_contents_for_printing, value_contents_for_printing_const)
10161         (set_value_enclosing_type): Update.
10162
10163 2018-04-06  Tom Tromey  <[email protected]>
10164
10165         * value.c (range_s): Remove typedef, VEC.
10166         (struct range): Add operator<.
10167         (range_lessthan): Remove.
10168         (ranges_contain): Change type.
10169         (~value): Update.
10170         (struct value) <unavailable, optimized_out>: Now std::vector.
10171         (value_entirely_available)
10172         (value_entirely_covered_by_range_vector)
10173         (value_entirely_unavailable, value_entirely_optimized_out):
10174         Update.
10175         (insert_into_bit_range_vector): Change argument type.
10176         (find_first_range_overlap): Likewise.
10177         (struct ranges_and_idx, value_contents_bits_eq)
10178         (require_not_optimized_out, require_available): Update.
10179         (ranges_copy_adjusted): Change argument types.
10180         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10181
10182 2018-04-06  Tom Tromey  <[email protected]>
10183
10184         * value.c (~value): Update.
10185         (struct value) <parent>: Now a value_ref_ptr.
10186         (value_parent, set_value_parent, value_address, value_copy):
10187         Update.
10188
10189 2018-04-06  Tom Tromey  <[email protected]>
10190
10191         * value.c (struct value): Add constructor, destructor, and member
10192         initializers.
10193         (allocate_value_lazy, value_decref): Update.
10194
10195 2018-04-06  Tom Tromey  <[email protected]>
10196
10197         * value.c (struct value) <released, next>: Remove.
10198         (all_values): Now a std::vector.
10199         (allocate_value_lazy): Update.
10200         (value_next): Remove.
10201         (value_mark, value_free_to_mark, release_value)
10202         (value_release_to_mark): Update.
10203
10204 2018-04-06  Tom Tromey  <[email protected]>
10205
10206         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10207         (free_value_chain): Remove.
10208         * value.c (free_value_chain): Remove.
10209         (value_release_to_mark): Return a std::vector.
10210         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10211         std::vector.
10212         (check_condition): Update.
10213         * eval.c (fetch_subexp_value): Change "val_chain" to a
10214         std::vector.
10215         * breakpoint.c (update_watchpoint): Update.
10216         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10217
10218 2018-04-06  Tom Tromey  <[email protected]>
10219
10220         * value.h (free_all_values): Remove.
10221         * value.c (free_all_values): Remove.
10222
10223 2018-04-06  Tom Tromey  <[email protected]>
10224
10225         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10226         (value_history_chain, value_history_count): Remove.
10227         (value_history): New global.
10228         (record_latest_value, access_value_history, show_values)
10229         (preserve_values): Update.
10230
10231 2018-04-06  Tom Tromey  <[email protected]>
10232
10233         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10234         * varobj.c (varobj_set_display_format, varobj_set_value)
10235         (install_default_visualizer, construct_visualizer)
10236         (install_new_value, ~varobj, varobj_get_value_type)
10237         (my_value_of_variable, varobj_editable_p): Update.
10238         * c-varobj.c (c_describe_child, c_value_of_variable)
10239         (cplus_number_of_children, cplus_describe_child): Update.
10240         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10241         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10242         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10243
10244 2018-04-06  Tom Tromey  <[email protected]>
10245
10246         * printcmd.c (last_examine_address): Change type to
10247         value_ref_ptr.
10248         (do_examine, x_command): Update.
10249
10250 2018-04-06  Tom Tromey  <[email protected]>
10251
10252         * value.c (release_value): Update.
10253         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10254         (struct bpstats) <val>: Now a value_ref_ptr.
10255         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10256         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10257         (~watchpoint, print_it_watchpoint, watch_command_1)
10258         (invalidate_bp_value_on_memory_change): Update.
10259
10260 2018-04-06  Tom Tromey  <[email protected]>
10261
10262         * varobj.c (varobj_clear_saved_item)
10263         (update_dynamic_varobj_children, install_new_value, ~varobj):
10264         Update.
10265         * value.h (value_incref): Move declaration earlier.
10266         (value_decref): Rename from value_free.
10267         (struct value_ref_policy): New.
10268         (value_ref_ptr): New typedef.
10269         (struct value_deleter): Remove.
10270         (gdb_value_up): Remove typedef.
10271         (release_value): Change return type.
10272         (release_value_or_incref): Remove.
10273         * value.c (set_value_parent): Update.
10274         (value_incref): Change return type.
10275         (value_decref): Rename from value_free.
10276         (value_free_to_mark, free_all_values, free_value_chain): Update.
10277         (release_value): Return value_ref_ptr.
10278         (release_value_or_incref): Remove.
10279         (record_latest_value, set_internalvar, clear_internalvar):
10280         Update.
10281         * stack.c (info_frame_command): Don't call value_free.
10282         * python/py-value.c (valpy_dealloc, valpy_new)
10283         (value_to_value_object): Update.
10284         * printcmd.c (do_examine): Update.
10285         * opencl-lang.c (lval_func_free_closure): Update.
10286         * mi/mi-main.c (register_changed_p): Don't call value_free.
10287         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10288         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10289         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10290         value_free.
10291         * guile/scm-value.c (vlscm_free_value_smob)
10292         (vlscm_scm_from_value): Update.
10293         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10294         (frame_unwind_register_unsigned, get_frame_register_bytes)
10295         (put_frame_register_bytes): Don't call value_free.
10296         * findvar.c (address_from_register): Don't call value_free.
10297         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10298         * dwarf2loc.c (entry_data_value_free_closure)
10299         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10300         (dwarf2_evaluate_loc_desc_full): Update.
10301         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10302         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10303         (~watchpoint, watch_command_1)
10304         (invalidate_bp_value_on_memory_change): Update.
10305         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10306
10307 2018-04-06  Simon Marchi  <[email protected]>
10308
10309         PR gdb/23022
10310         * warning.m4: Add -Wno-error=deprecated-register.
10311         * configure: Re-generate.
10312
10313 2018-04-05  Tom Tromey  <[email protected]>
10314
10315         * linespec.h: Remove include of "vec.h".
10316
10317 2018-04-05  Tom Tromey  <[email protected]>
10318
10319         * linespec.c (typep): Remove typedef.
10320         (find_methods, find_superclass_methods): Take a std::vector.
10321         (find_method): Use std::vector.
10322
10323 2018-04-05  Tom Tromey  <[email protected]>
10324
10325         * utils.c (compare_strings): Remove.
10326         * utils.h (compare_strings): Remove.
10327         * objc-lang.h (find_imps): Update.
10328         * objc-lang.c (find_methods): Take a std::vector.
10329         (uniquify_strings, find_imps): Likewise.
10330         * linespec.c (find_methods): Take a std::vector.
10331         (decode_objc): Use std::vector.
10332         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10333         a std::vector.
10334         (find_method, find_function_symbols): Use std::vector.
10335
10336 2018-04-05  Tom Tromey  <[email protected]>
10337
10338         * completer.c (completion_tracker::completion_tracker): Remove
10339         cast.
10340         (completion_tracker::discard_completions): Likewise.
10341         * breakpoint.c (ambiguous_names_p): Remove cast.
10342         * ada-lang.c (_initialize_ada_language): Remove cast.
10343         * utils.h (streq): Update.
10344         (streq_hash): Add new declaration.
10345         * utils.c (streq): Return bool.
10346         (streq_hash): New function.
10347
10348 2018-04-05  Tom Tromey  <[email protected]>
10349
10350         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10351         Remove a string copy.
10352
10353 2018-04-05  Tom Tromey  <[email protected]>
10354
10355         * linespec.c (filter_results): Use std::vector.
10356         (decode_line_2, decode_line_full): Update.
10357
10358 2018-04-05  Tom Tromey  <[email protected]>
10359
10360         * linespec.c (canonical_to_fullform): Return std::string.
10361         (filter_results): Update.
10362         (struct decode_line_2_item): Add constructor.
10363         <fullform, displayform>: Now std::string.
10364         (decode_line_2_compare_items): Now a std::sort comparator.
10365         (decode_line_2): Update.
10366
10367 2018-04-05  Tom Tromey  <[email protected]>
10368
10369         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10370         (unexpected_linespec_error): Update.
10371         (linespec_parse_basic, parse_linespec): Update.
10372
10373 2018-04-05  Tom Tromey  <[email protected]>
10374
10375         * linespec.c (linespec_parse_basic): Reindent.
10376
10377 2018-04-05  Tom Tromey  <[email protected]>
10378
10379         * minsyms.h (iterate_over_minimal_symbols): Update.
10380         * minsyms.c (iterate_over_minimal_symbols): Take a
10381         gdb::function_view.
10382         * linespec.c (struct collect_minsyms): Remove.
10383         (compare_msyms): Now a std::sort comparator.
10384         (add_minsym): Add parameters.
10385         (search_minsyms_for_name): Update.  Use std::vector.
10386
10387 2018-04-03  Tom Tromey  <[email protected]>
10388
10389         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10390         gdb::byte_vector.
10391
10392 2018-04-02  Weimin Pan  <[email protected]>
10393
10394         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10395
10396 2018-04-02  Weimin Pan  <[email protected]>
10397
10398         PR gdb/16959
10399         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10400         printing static type.
10401
10402 2018-04-01  Tom Tromey  <[email protected]>
10403
10404         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10405         (rs6000_xfer_shared_libraries): Update.
10406
10407 2018-04-01  Simon Marchi  <[email protected]>
10408
10409         * common/gdb_vecs.h (char_ptr): Remove.
10410         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10411
10412 2018-03-30  Simon Marchi  <[email protected]>
10413
10414         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10415         with std::vector.
10416         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10417
10418 2018-03-30  Simon Marchi  <[email protected]>
10419
10420         * tracepoint.h (struct uploaded_tp): Initialize fields.
10421         <actions, step_actions, cmd_strings>: Change type to
10422         std::vector<char *>.
10423         * tracepoint.c (get_uploaded_tp): Allocate with new.
10424         (free_uploaded_tps): Free with delete.
10425         (parse_tracepoint_definition): Adjust to std::vector change.
10426         * breakpoint.c (read_uploaded_action): Likewise.
10427         (create_tracepoint_from_upload): Likewise.
10428         * ctf.c (ctf_write_uploaded_tp): Likewise.
10429         (SET_ARRAY_FIELD): Likewise.
10430         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10431
10432 2018-03-30  Tom Tromey  <[email protected]>
10433
10434         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10435         std::unique_ptr.
10436         (svr4_keep_data_in_core): Update.
10437         (svr4_read_so_list): Update.
10438
10439 2018-03-30  Tom Tromey  <[email protected]>
10440
10441         * windows-nat.c (handle_output_debug_string, handle_exception):
10442         Update.
10443         * target.h (target_read_string): Update.
10444         * target.c (target_read_string): Change "string" to
10445         unique_xmalloc_ptr.
10446         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10447         Update.
10448         * solib-frv.c (frv_current_sos): Update.
10449         * solib-dsbt.c (dsbt_current_sos): Update.
10450         * solib-darwin.c (darwin_current_sos): Update.
10451         * linux-thread-db.c (inferior_has_bug): Update.
10452         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10453         Update.  Remove alloca.
10454         * ada-lang.c (ada_main_name): Update.
10455
10456 2018-03-30  Tom Tromey  <[email protected]>
10457
10458         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10459         (struct dwo_file_deleter): New.
10460         (dwo_file_up): New typedef.
10461         (open_and_init_dwo_file): Use dwo_file_up.
10462         (free_dwo_file_cleanup): Remove.
10463
10464 2018-03-30  Tom Tromey  <[email protected]>
10465
10466         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10467         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10468
10469 2018-03-30  Tom Tromey  <[email protected]>
10470
10471         * dwarf2read.c (class free_cached_comp_units): New class.
10472         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10473         (free_cached_comp_units): Remove function.
10474
10475 2018-03-30  Tom Tromey  <[email protected]>
10476
10477         * utils.h (make_cleanup_unpush_target): Remove.
10478         * inf-ptrace.c (struct target_unpusher): New.
10479         (target_unpush_up) New typedef.
10480         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10481         target_unpush_up.
10482         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10483
10484 2018-03-27  Tom Tromey  <[email protected]>
10485
10486         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10487
10488 2018-03-27  Pedro Alves  <[email protected]>
10489             Tom Tromey  <[email protected]>
10490
10491         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10492         destructor.  Now a class.
10493         (gdb_readline_wrapper_cleanup): Remove function.
10494         (gdb_readline_wrapper): Remove cleanups.
10495
10496 2018-03-27  Tom Tromey  <[email protected]>
10497
10498         * typeprint.h (struct type_print_options) <local_typedefs,
10499         global_typedefs>: Remove "struct" keyword.
10500         (class typedef_hash_table): New class.
10501         (recursively_update_typedef_hash, add_template_parameters)
10502         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10503         (find_typedef_in_hash): Don't declare.
10504         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10505         (typedef_hash_table::recursively_update): Rename from
10506         recursively_update_typedef_hash.  Now a member.
10507         (typedef_hash_table::add_template_parameters): Rename from
10508         add_template_parameters.  Now a member.
10509         (typedef_hash_table::typedef_hash_table): Now a constructor;
10510         rename from create_typedef_hash.
10511         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10512         rename from free_typedef_hash.
10513         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10514         (do_free_global_table): Remove.
10515         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10516         from copy_type_recursive.
10517         (create_global_typedef_table): Remove.
10518         (typedef_hash_table::find_global_typedef): Now a member of
10519         typedef_hash_table.
10520         (typedef_hash_table::find_typedef): Rename from
10521         find_typedef_in_hash; now a member.
10522         (whatis_exp): Update.
10523         * extension.h (struct ext_lang_type_printers): Add constructor and
10524         destructor.
10525         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10526         declare.
10527         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10528         Now a constructor; rename from start_ext_lang_type_printers.
10529         (ext_lang_type_printers): Now a destructor; rename from
10530         free_ext_lang_type_printers.
10531         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10532         Update.
10533         (c_type_print_base_struct_union): Update.  Remove cleanups.
10534
10535 2018-03-27  Tom Tromey  <[email protected]>
10536
10537         * dwarf-index-write.c: Include <cmath>.
10538
10539 2018-03-27  Joel Brobecker  <[email protected]>
10540
10541         * NEWS: Add entry describing new "set|show varsize-limit" command.
10542         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10543         command.
10544         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10545         "set variable".
10546
10547 2018-03-27  Simon Marchi  <[email protected]>
10548
10549         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10550         dwarf-index-write.c
10551         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10552         * dwarf-index-common.c: New file.
10553         * dwarf-index-common.h: New file.
10554         * dwarf-index-write.c: New file.
10555         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10556         (struct dwarf2_section_info): Move from here.
10557         (dwarf2_section_info_def): Likewise.
10558         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10559         (offset_type): Likewise.
10560         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10561         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10562         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10563         (byte_swap): Likewise.
10564         (MAYBE_SWAP): Likewise.
10565         (dwarf2_per_cu_ptr): Likewise.
10566         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10567         (struct tu_stats): Likewise.
10568         (struct dwarf2_per_objfile): Likewise.
10569         (struct dwarf2_per_cu_data): Likewise.
10570         (struct signatured_type): Likewise.
10571         (sig_type_ptr): Likewise.
10572         (DEF_VEC_P (sig_type_ptr)): Likewise.
10573         (INDEX4_SUFFIX): Likewise.
10574         (INDEX5_SUFFIX): Likewise.
10575         (DEBUG_STR_SUFFIX): Likewise.
10576         (dwarf2_read_section): Make non-static.
10577         (mapped_index_string_hash): Move from here.
10578         (dwarf5_djb_hash): Likewise.
10579         (file_write): Likewise.
10580         (class data_buf): Likewise.
10581         (struct symtab_index_entry): Likewise.
10582         (struct mapped_symtab): Likewise.
10583         (find_slot): Likewise.
10584         (hash_expand): Likewise.
10585         (add_index_entry): Likewise.
10586         (uniquify_cu_indices): Likewise.
10587         (class c_str_view): Likewise.
10588         (class c_str_view_hasher): Likewise.
10589         (class vector_hasher): Likewise.
10590         (write_hash_table): Likewise.
10591         (psym_index_map): Likewise.
10592         (struct addrmap_index_data): Likewise.
10593         (add_address_entry): Likewise.
10594         (add_address_entry_worker): Likewise.
10595         (write_address_map): Likewise.
10596         (symbol_kind): Likewise.
10597         (write_psymbols): Likewise.
10598         (struct signatured_type_index_data): Likewise.
10599         (write_one_signatured_type): Likewise.
10600         (recursively_count_psymbols): Likewise.
10601         (recursively_write_psymbols): Likewise.
10602         (class debug_names): Likewise.
10603         (check_dwarf64_offsets): Likewise.
10604         (psyms_seen_size): Likewise.
10605         (write_gdbindex): Likewise.
10606         (write_debug_names): Likewise.
10607         (assert_file_size): Likewise.
10608         (write_psymtabs_to_index): Likewise.
10609         (save_gdb_index_command): Likewise.
10610         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10611         command.
10612         * dwarf2read.h: New file.
10613
10614 2018-03-27  Joel Brobecker  <[email protected]>
10615
10616         PR gdb/22670
10617         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10618         symbol name if the CU's language stores symbol names in linkage
10619         format.
10620         * language.h (struct language_defn)
10621         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10622         all instances of this struct.
10623
10624 2018-03-26  Tom Tromey  <[email protected]>
10625
10626         * stack.c (backtrace_command_1): Remove verbose code.
10627
10628 2018-03-26  Tom Tromey  <[email protected]>
10629
10630         * python/py-framefilter.c (py_print_type): Don't catch
10631         exceptions.  Return void.
10632         (py_print_value): Likewise.
10633         (py_print_single_arg): Likewise.
10634         (enumerate_args): Don't catch exceptions.
10635         (py_print_args): Likewise.
10636         (py_print_frame): Likewise.
10637         (gdbpy_apply_frame_filter): Catch exceptions here.
10638
10639 2018-03-26  Tom Tromey  <[email protected]>
10640
10641         * stack.c (_initialize_stack): Remove trailing newlines from help
10642         text.  Add "Usage" line to "backtrace" help.
10643
10644 2018-03-26  Tom Tromey  <[email protected]>
10645
10646         PR python/16486:
10647         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10648
10649 2018-03-26  Tom Tromey  <[email protected]>
10650
10651         * python/py-framefilter.c (py_print_single_arg): Return
10652         EXT_LANG_BT_ERROR from catch.
10653
10654 2018-03-26  Tom Tromey  <[email protected]>
10655
10656         PR backtrace/15584:
10657         * stack.c (backtrace_command_1): Move some code into no-filters
10658         "if".
10659
10660 2018-03-26  Tom Tromey  <[email protected]>
10661
10662         * python/py-framefilter.c (throw_quit_or_print_exception): New
10663         function.
10664         (gdbpy_apply_frame_filter): Use it.
10665
10666 2018-03-26  Tom Tromey  <[email protected]>
10667
10668         PR cli/17716:
10669         * python/py-framefilter.c (py_print_type, py_print_value)
10670         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10671         RETURN_MASK_ERROR.
10672
10673 2018-03-26  Tom Tromey  <[email protected]>
10674
10675         * python/py-framefilter.c (enumerate_args): Use
10676         gdb::unique_xmalloc_ptr.
10677
10678 2018-03-26  Tom Tromey  <[email protected]>
10679
10680         * python/py-framefilter.c (py_print_frame): Return
10681         EXT_LANG_BT_OK.
10682         (gdbpy_apply_frame_filter): Update comment.
10683         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10684         Remove.
10685         <EXT_LANG_BT_NO_FILTERS>: Change value.
10686
10687 2018-03-26  Tom Tromey  <[email protected]>
10688
10689         PR backtrace/15582:
10690         * stack.c (backtrace_command): Parse "hide" argument.
10691         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10692         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10693         constant.
10694
10695 2018-03-26  Tom Tromey  <[email protected]>
10696
10697         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10698         add "flags".
10699         (backtrace_command): Remove "fulltrace", add "flags".
10700
10701 2018-03-26  Tom Tromey  <[email protected]>
10702
10703         * stack.c (backtrace_command): Rewrite command line parsing.
10704
10705 2018-03-26  Simon Marchi  <[email protected]>
10706
10707         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10708
10709 2018-03-26  Simon Marchi  <[email protected]>
10710
10711         * filename-seen-cache.h: Add include guard.
10712
10713 2018-03-26  Keith Seitz  <[email protected]>
10714
10715         * symfile.c (place_section): Remove "struct" from section_addr_info
10716         in comment.
10717         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10718         "struct" keyword from section_addr_info.
10719
10720 2018-03-26  Alan Hayward  <[email protected]>
10721
10722         * regformats/regdef.h (reg): Add constructors.
10723
10724 2018-03-25  Pedro Alves  <[email protected]>
10725
10726         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10727         if then/else bodies in var_func_name extraction.
10728
10729 2018-03-23  Weimin Pan  <[email protected]>
10730
10731         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10732         lookup_minimal_symbol() to find symbol entry.
10733         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10734
10735 2018-03-23  Keith Seitz  <[email protected]>
10736
10737         PR c++/22968
10738         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10739         nested type definitions for C++, too.
10740
10741 2018-03-23  Tom Tromey  <[email protected]>
10742
10743         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10744         a typedef.
10745         (macho_register_oso): Remove.
10746         (macho_symtab_read): Take a std::vector.
10747         (oso_el_compare_name): Now a std::sort comparator.
10748         (macho_symfile_read_all_oso): Take a std::vector.
10749         (macho_symfile_read): Use std::vector.  Remove cleanups.
10750
10751 2018-03-22  Tom Tromey  <[email protected]>
10752
10753         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10754         (record_full_goto_bookmark): Use std::string.
10755
10756 2018-03-22  Pedro Franco de Carvalho  <[email protected]>
10757
10758         PR tdep/18295
10759         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10760         a single mask.
10761
10762 2018-03-22  Pedro Franco de Carvalho  <[email protected]>
10763
10764         * rs6000-tdep.c (store_insn_p): New function.
10765         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10766         and cr_reg to their unshifted values. Use store_insn_p to
10767         match LR saves using either R1 or fdata->alloca_reg. Use
10768         store_insn_p to match CR saves. Set alloca_reg_offset
10769         when alloca_reg and framep are set. Remove lr_reg shift
10770         when assigning to fdata->lr_register.
10771
10772 2018-03-22  Andreas Arnez  <[email protected]>
10773
10774         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10775         command line args instead of emitting a warning.
10776
10777 2018-03-22  Simon Marchi  <[email protected]>
10778
10779         * tracepoint.h (struct static_tracepoint_marker): Initialize
10780         fields, define default constructor, move constructor and move
10781         assignment, disable the rest.
10782         <str_id, extra>: Make std::string.
10783         (release_static_tracepoint_marker): Remove.
10784         (free_current_marker): Remove.
10785         * tracepoint.c (free_current_marker): Remove.
10786         (parse_static_tracepoint_marker_definition): Adjust to
10787         std::string, use new hex2str overload.
10788         (release_static_tracepoint_marker): Remove.
10789         (print_one_static_tracepoint_marker): Get marker by reference
10790         and adjust to std::string.
10791         (info_static_tracepoint_markers_command): Adjust to std::vector
10792         changes
10793         * target.h (static_tracepoint_marker_p): Remove typedef.
10794         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10795         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10796         bool.
10797         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10798         * target-debug.h
10799         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10800         (target_debug_print_std_vector_static_tracepoint_marker): New.
10801         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10802         to...
10803         (target_debug_print_static_tracepoint_marker_p): ... this.
10804         * target-delegates.c: Re-generate.
10805         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10806         Make std::string.
10807         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10808         (decode_static_tracepoint_spec): Adjust to std::vector.
10809         (tracepoint_print_one_detail): Adjust to std::string.
10810         (strace_marker_decode_location): Adjust to std::string.
10811         (update_static_tracepoint): Adjust to std::string, remove call
10812         to release_static_tracepoint_marker.
10813         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10814         Adjust to std::vector.
10815         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10816         (remote_static_tracepoint_markers_by_strid): Adjust to
10817         std::vector.
10818         * common/rsp-low.h (hex2str): New overload with explicit count
10819         of bytes.
10820         * common/rsp-low.c (hex2str): New overload with explicit count
10821         of bytes.
10822         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10823         (_initialize_rsp_low_selftests): Add test_hex2str test.
10824         * unittests/tracepoint-selftests.c
10825         (test_parse_static_tracepoint_marker_definition): Adjust to
10826         std::string.
10827
10828 2018-03-22  Simon Marchi  <[email protected]>
10829
10830         * tracepoint.c (parse_static_tracepoint_marker_definition):
10831         Consider case where the definition is followed by more
10832         definitions.
10833         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10834         tracepoint-selftests.c.
10835         * unittests/tracepoint-selftests.c: New.
10836
10837 2018-03-21  Pedro Franco de Carvalho  <[email protected]>
10838
10839         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10840         Carvalho.
10841
10842 2018-03-20  Stephen Roberts  <[email protected]>
10843
10844         * symtab.c (find_pc_sect_line): fixed indentation.
10845
10846 2018-03-20  Stephen Roberts  <[email protected]>
10847
10848         * symtab.c (find_pc_sect_line): now uses binary search.
10849
10850 2018-03-19  Tom Tromey  <[email protected]>
10851
10852         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10853         "IDENT" production.
10854
10855 2018-03-19  Pedro Alves  <[email protected]>
10856             Tom Tromey  <[email protected]>
10857
10858         * unittests/observable-selftests.c: New file.
10859         * common/observable.h: New file.
10860         * observable.h: New file.
10861         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10862         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10863         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10864         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10865         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10866         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10867         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10868         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10869         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10870         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10871         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10872         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10873         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10874         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10875         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10876         tui/tui-interp.c, valops.c: Update all users.
10877         * tui/tui-hooks.c (tui_bp_created_observer)
10878         (tui_bp_deleted_observer, tui_bp_modified_observer)
10879         (tui_inferior_exit_observer, tui_before_prompt_observer)
10880         (tui_normal_stop_observer, tui_register_changed_observer):
10881         Remove.
10882         (tui_observers_token): New global.
10883         (attach_or_detach, tui_attach_detach_observers): New functions.
10884         (tui_install_hooks, tui_remove_hooks): Use
10885         tui_attach_detach_observers.
10886         * record-btrace.c (record_btrace_thread_observer): Remove.
10887         (record_btrace_thread_observer_token): New global.
10888         * observer.sh: Remove.
10889         * observer.c: Rename to observable.c.
10890         * observable.c (namespace gdb_observers): Define new objects.
10891         (observer_debug): Move into gdb_observers namespace.
10892         (struct observer, struct observer_list, xalloc_observer_list_node)
10893         (xfree_observer_list_node, generic_observer_attach)
10894         (generic_observer_detach, generic_observer_notify): Remove.
10895         (_initialize_observer): Update.
10896         Don't include observer.inc.
10897         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10898         (clean mostlyclean): Likewise.
10899         (observer.h, observer.inc): Remove targets.
10900         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10901         (COMMON_SFILES): Use observable.c, not observer.c.
10902         * .gitignore: Remove observer.h.
10903
10904 2018-03-18  Tom Tromey  <[email protected]>
10905
10906         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10907         gdb::def_vector.
10908         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10909
10910 2018-03-17  Tom Tromey  <[email protected]>
10911
10912         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10913
10914 2018-03-17  Tom Tromey  <[email protected]>
10915
10916         * target.c (class scoped_target_fd): New.
10917         (target_fileio_close_cleanup): Remove.
10918         (target_fileio_read_alloc_1): Use scoped_target_fd.
10919
10920 2018-03-16  Simon Marchi  <[email protected]>
10921
10922         * silent-rules.mk: New.
10923         * Makefile.in: Include silent-rules.mk
10924         (srcdir, VPATH, top_srcdir): Move up.
10925         (COMPILE): Add ECHO_CXX.
10926         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10927         (init.c): Add ECHO_INIT_C.
10928         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10929         (version.c): Add ECHO_GEN.
10930         (printcmd.o): Add ECHO_CXX.
10931         (target-float.o): Add ECHO_CXX.
10932         (ada-exp.o): Add ECHO_CXX.
10933         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10934         (insight$(EXEEXT)): Add ECHO_CXXLD.
10935         * gnulib/configure.ac: Add AM_SILENT_RULES.
10936         * gnulib/aclocal.m4: Re-generate.
10937         * gnulib/configure: Re-generate.
10938         * gnulib/import/Makefile.in: Re-generate.
10939
10940 2018-03-16  Tom Tromey  <[email protected]>
10941
10942         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10943         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10944         * utils.c (do_free_section_addr_info)
10945         (make_cleanup_free_section_addr_info): Remove.
10946         * symfile.h (struct other_sections): Add constructor.
10947         (struct section_addr_info): Remove.
10948         (section_addr_info): New typedef.
10949         (struct sym_fns) <sym_offsets>: Change type of parameter.
10950         (build_section_addr_info_from_objfile)
10951         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10952         (default_symfile_offsets, symbol_file_add)
10953         (symbol_file_add_from_bfd)
10954         (build_section_addr_info_from_section_table): Update.
10955         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10956         * symfile.c (alloc_section_addr_info): Remove.
10957         (build_section_addr_info_from_section_table): Change return type.
10958         Update.
10959         (build_section_addr_info_from_bfd)
10960         (build_section_addr_info_from_objfile): Likewise.
10961         (free_section_addr_info): Remove.
10962         (relative_addr_info_to_section_offsets): Change type of "addrs".
10963         (addrs_section_compar): Now a std::sort comparator.
10964         (addrs_section_sort): Change return type.
10965         (addr_info_make_relative): Change type of "addrs".  Update.
10966         (default_symfile_offsets, syms_from_objfile_1)
10967         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10968         (symbol_file_add_separate): Update.
10969         (symbol_file_add): Change type of "addrs".  Update.
10970         (add_symbol_file_command): Update.  Remove cleanups.
10971         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10972         cleanups.
10973         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10974         * solib.c (solib_read_symbols): Update.
10975         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10976         * machoread.c (macho_symfile_offsets): Update.
10977         * jit.c (jit_bfd_try_read_symtab): Update.
10978
10979 2018-03-15  Simon Marchi  <[email protected]>
10980
10981         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10982         unittests/utils-selftests.c.
10983         * unittests/utils-selftests.c: New file.
10984
10985 2018-03-14  Tom Tromey  <[email protected]>
10986
10987         PR cli/14977:
10988         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10989         for NULL.
10990
10991 2018-03-14  Tom Tromey  <[email protected]>
10992
10993         PR cli/19918:
10994         * printcmd.c (printf_pointer): Allow "-" in format.
10995
10996 2018-03-14  Tom Tromey  <[email protected]>
10997
10998         * printcmd.c (_initialize_printcmd): Add usage to printf.
10999
11000 2018-03-14  Yao Qi  <[email protected]>
11001
11002         * MAINTAINERS: Update my email address.
11003
11004 2018-03-13  Tom Tromey  <[email protected]>
11005
11006         * machoread.c (macho_check_dsym): Change filenamep to a
11007         std::string*.
11008         (macho_symfile_read): Update.
11009         * symfile.c (load_command): Use std::string.
11010
11011 2018-03-12  Andrew Burgess  <[email protected]>
11012
11013         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11014         to error message string.
11015         (riscv_register_name): Use xsnprintf instead of sprintf.
11016         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11017         internal_error.
11018         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11019         error.
11020         (riscv_push_dummy_call): Likewise.
11021
11022 2018-03-12  Tom Tromey  <[email protected]>
11023
11024         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11025         Use gdb::byte_vector.
11026         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11027
11028 2018-03-12  Yao Qi  <[email protected]>
11029
11030         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11031         parameter type to readable_regcache.
11032         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11033         the declaration.
11034
11035 2018-03-11  Tom Tromey  <[email protected]>
11036
11037         * dwarf2read.c (struct nextfield): Add initializers.
11038         (struct nextfnfield): Remove.
11039         (struct fnfieldlist): Add initializers.  Remove "length" and
11040         "head", use std::vector.
11041         (struct decl_field_list): Remove.
11042         (struct field_info): Add initializers.
11043         <fields, baseclasses>: Now std::vector.
11044         <nbaseclasses, nfnfields, typedef_field_list_count,
11045         nested_types_list_count>: Remove.
11046         (dwarf2_add_field, dwarf2_add_type_defn)
11047         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11048         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11049         (process_structure_scope): Update.
11050
11051 2018-03-11  Tom Tromey  <[email protected]>
11052
11053         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11054         for use by std::sort.
11055         (build_type_psymtabs_1): Use std::vector.
11056
11057 2018-03-09  Eli Zaretskii  <[email protected]>
11058
11059         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11060         and LIBMPFR in the printed configuration.
11061
11062 2018-03-08  Tom Tromey  <[email protected]>
11063
11064         * source.c (get_filename_and_charpos): Use scoped_fd.
11065         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11066         (procfs_pidlist): Likewise.
11067         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11068         (iterate_over_mappings): Likewise.
11069
11070 2018-03-08  Tom Tromey  <[email protected]>
11071
11072         * infcall.c (struct call_return_meta_info)
11073         <stack_temporaries_enabled>: Remove.
11074         (get_call_return_value, call_function_by_hand_dummy): Update.
11075         * thread.c (disable_thread_stack_temporaries): Remove.
11076         (enable_thread_stack_temporaries): Remove.
11077         (thread_stack_temporaries_enabled_p): Return bool.
11078         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11079         (get_last_thread_stack_temporary): Update.
11080         * eval.c (evaluate_subexp): Update.
11081         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11082         class, not a function.
11083         (value_ptr, value_vec): Remove typedefs.
11084         (class thread_info) <stack_temporaries_enabled>: Now bool.
11085         <stack_temporaries>: Now a std::vector.
11086         (thread_stack_temporaries_enabled_p)
11087         (value_in_thread_stack_temporaries): Return bool.
11088
11089 2018-03-08  Simon Marchi  <[email protected]>
11090
11091         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11092         (getpkt_or_notif_sane_1): Likewise.
11093
11094 2018-03-08  Simon Marchi  <[email protected]>
11095
11096         * build-id.c (build_id_to_debug_bfd): Use std::string.
11097
11098 2018-03-08  Simon Marchi  <[email protected]>
11099
11100         * build-id.c (find_separate_debug_file_by_buildid): Return
11101         std::string.
11102         * build-id.h (find_separate_debug_file_by_buildid): Return
11103         std::string.
11104         * coffread.c (coff_symfile_read): Adjust to std::string.
11105         * elfread.c (elf_symfile_read): Adjust to std::string.
11106         * symfile.c (separate_debug_file_exists): Change parameter to
11107         std::string.
11108         (find_separate_debug_file): Return std::string.
11109         (find_separate_debug_file_by_debuglink): Return std::string.
11110         * symfile.h (find_separate_debug_file_by_debuglink): Return
11111         std::string.
11112
11113 2018-03-08  Simon Marchi  <[email protected]>
11114
11115         * common/xml-utils.c (xml_escape_text): Move code to...
11116         (xml_escape_text_append): ... this new function.
11117         * common/xml-utils.h (xml_escape_text_append): New declaration.
11118         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11119         New function.
11120         (_initialize_xml_utils): register test_xml_escape_text_append as
11121         a selftest.
11122
11123 2018-03-07  Alan Hayward  <[email protected]>
11124
11125         * defs.h: Remove MAX_REGISTER_SIZE.
11126         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11127         asserts.
11128         * python/py-unwind.c (pyuw_sniffer): Likewise.
11129
11130 2018-03-07  Tom Tromey  <[email protected]>
11131
11132         * linux-tdep.c (linux_info_proc): Update.
11133         * target.h (struct target_ops) <to_fileio_readlink>: Return
11134         optional<string>.
11135         (target_fileio_readlink): Return optional<string>.
11136         * remote.c (remote_hostio_readlink): Return optional<string>.
11137         * inf-child.c (inf_child_fileio_readlink): Return
11138         optional<string>.
11139         * target.c (target_fileio_readlink): Return optional<string>.
11140
11141 2018-03-07  Andrew Burgess  <[email protected]>
11142
11143         * regcache.c (cooked_read_test): Add riscv to the list of
11144         architectures that have a save_reggroup.
11145
11146 2018-03-07  Andreas Arnez  <[email protected]>
11147
11148         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11149         value is not a dynamic class object.
11150
11151 2018-03-06  Tom Tromey  <[email protected]>
11152
11153         * rust-exp.y: Formatting fixes.
11154
11155 2018-03-06  Andrew Burgess  <[email protected]>
11156
11157         * riscv-tdep.c (riscv_register_name): Remove target description
11158         support.
11159         (riscv_gdbarch_init): Remove target description check.
11160
11161 2018-03-06  Andrew Burgess  <[email protected]>
11162
11163         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11164         comment.
11165         * riscv-tdep.h: Likewise.
11166
11167 2018-03-06  Andrew Burgess  <[email protected]>
11168
11169         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11170         (riscv_pseudo_register_write): Delete.
11171         (riscv_gdbarch_init): Remove all use of pseudo registers.
11172
11173 2018-03-06  Simon Marchi  <[email protected]>
11174
11175         * record-btrace.c (btrace_print_lines): Replace cleanup
11176         parameter with RAII equivalents.
11177         (btrace_insn_history): Replace cleanup with RAII equivalents.
11178         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11179         make_cleanup_ui_out_tuple_begin_end): Remove.
11180         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11181         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11182         make_cleanup_ui_out_list_begin_end): Remove.
11183
11184 2018-03-06  Simon Marchi  <[email protected]>
11185
11186         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11187         parameter types to std::vector.  Use bool.
11188         (record_btrace_wait): Replace VEC(tp_t) with
11189         std::vector<thread_info *>.
11190         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11191
11192 2018-03-06  Simon Marchi  <[email protected]>
11193
11194         * record-btrace.c (record_btrace_disable_callback): Remove.
11195         (struct scoped_btrace_disable): New.
11196         (record_btrace_open): Use scoped_btrace_disable.
11197
11198 2018-03-06  Andrew Burgess  <[email protected]>
11199
11200         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11201         reading values from registers.
11202
11203 2018-03-06  Andrew Burgess  <[email protected]>
11204
11205         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11206         where appropriate.
11207
11208 2018-03-06  Andrew Burgess  <[email protected]>
11209
11210         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11211         change parameter type.  Use GDB's print functions, and use
11212         core_addr_to_string where appropriate.
11213         (riscv_push_dummy_call): Use core_addr_to_string where
11214         appropriate, update call to riscv_print_arg_location, and reindent
11215         a few lines.
11216         (riscv_return_value): Update call to riscv_print_arg_location.
11217
11218 2018-03-06  Andrew Burgess  <[email protected]>
11219             Tim Newsome <[email protected]>
11220             Albert Ou <[email protected]>
11221             Darius Rad <[email protected]>
11222
11223         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11224         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11225         (ALLDEPFILES): Add riscv-tdep.c
11226         * configure.tgt: Add riscv support.
11227         * riscv-tdep.c: New file.
11228         * riscv-tdep.h: New file.
11229         * NEWS: Mention new target.
11230         * MAINTAINERS: Add entry for riscv.
11231
11232 2018-03-06  Andrew Burgess  <[email protected]>
11233
11234         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11235         fields within aggregates.
11236
11237 2018-03-04  Simon Marchi  <[email protected]>
11238
11239         * record-btrace.c (btrace_print_lines): Change type of flags to
11240         gdb_disassembly_flags.
11241
11242 2018-03-04  John Baldwin  <[email protected]>
11243
11244         * fbsd-nat.c: Include "inf-ptrace.h".
11245         (USE_SIGTRAP_SIGINFO): Conditionally define.
11246         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11247         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11248         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11249         function.
11250         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11251         Likewise.
11252         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11253         Likewise.
11254         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11255         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11256         "supports_stopped_by_hw_breakpoint" target methods.
11257
11258 2018-03-04  John Baldwin  <[email protected]>
11259
11260         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11261         * fbsd-nat.c (debug_fbsd_nat): New variable.
11262         (show_fbsd_nat_debug): New function.
11263         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11264         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11265
11266 2018-03-04  John Baldwin  <[email protected]>
11267
11268         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11269         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11270         prototype.
11271         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11272         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11273         method.
11274
11275 2018-03-02  Simon Marchi  <[email protected]>
11276
11277         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11278         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11279
11280 2018-03-02  Simon Marchi  <[email protected]>
11281
11282         * charset.c (struct charset_vector): New.
11283         (charsets): Change type to charset_vector.
11284         (find_charset_names): Adjust.
11285         (add_one): Adjust.
11286         (_initialize_charset): Adjust.
11287
11288 2018-03-02  Simon Marchi  <[email protected]>
11289
11290         * progspace.h (struct program_space) <deleted_solibs>: Change
11291         type to std::vector<std::string>.
11292         * progspace.c (clear_program_space_solib_cache): Adjust.
11293         * breakpoint.c (print_solib_event): Adjust.
11294         (check_status_catch_solib): Adjust.
11295         * solib.c (update_solib_list): Adjust.
11296         * ui-out.h (class ui_out) <field_string>: New overload.
11297         * ui-out.c (ui_out::field_string): New overload.
11298
11299 2018-03-02  Simon Marchi  <[email protected]>
11300
11301         * progspace.h (struct program_space): Add constructor and
11302         destructor, initialize fields.
11303         (add_program_space): Remove.
11304         * progspace.c (add_program_space): Rename to...
11305         (program_space::program_space): ... this.
11306         (release_program_space): Rename to...
11307         (program_space::~program_space): ... this.
11308         (delete_program_space): Use delete to delete program_space.
11309         (initialize_progspace): Use new to allocate program_space.
11310         * inferior.c (add_inferior_with_spaces): Likewise.
11311         (clone_inferior_command): Likewise.
11312         * infrun.c (follow_fork_inferior): Likewise.
11313         (handle_vfork_child_exec_or_exit): Likewise.
11314
11315 2018-03-02  Simon Marchi  <[email protected]>
11316
11317         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11318         (delim_string_to_char_ptr_vec): Return std::vector of
11319         gdb::unique_xmalloc_ptr.
11320         (dirnames_to_char_ptr_vec_append): Take std::vector of
11321         gdb::unique_xmalloc_ptr.
11322         (dirnames_to_char_ptr_vec): Return std::vector of
11323         gdb::unique_xmalloc_ptr.
11324         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11325         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11326         (delim_string_to_char_ptr_vec): Return an std::vector of
11327         gdb::unique_xmalloc_ptr, adjust the code.
11328         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11329         gdb::unique_xmalloc_ptr, adjust the code.
11330         (dirnames_to_char_ptr_vec): Return an std::vector of
11331         gdb::unique_xmalloc_ptr, adjust the code.
11332         * auto-load.c (auto_load_safe_path_vec): Change type to
11333         std::vector of gdb::unique_xmalloc_ptr.
11334         (auto_load_expand_dir_vars): Return an std::vector of
11335         gdb::unique_xmalloc_ptr, adjust the code.
11336         (auto_load_safe_path_vec_update): Adjust.
11337         (filename_is_in_auto_load_safe_path_vec): Adjust.
11338         (auto_load_objfile_script_1): Adjust.
11339         * build-id.c (build_id_to_debug_bfd): Adjust.
11340         * linux-thread-db.c (thread_db_load_search): Adjust.
11341         * source.c (add_path): Adjust.
11342         (openp): Adjust.
11343         * symfile.c (find_separate_debug_file): Adjust.
11344         * utils.c (do_free_char_ptr_vec): Remove.
11345         (make_cleanup_free_char_ptr_vec): Remove.
11346
11347 2018-03-01  Sergio Durigan Junior  <[email protected]>
11348
11349         PR gdb/22907
11350         * common/pathstuff.c: Conditionally include "<windows.h>".
11351
11352 2018-03-01  Georg Sauthoff  <[email protected]>
11353
11354         PR gdb/22888
11355         * gcore.in: Quote variables and switch interpreter to bash.
11356
11357 2018-03-01  Tom Tromey  <[email protected]>
11358
11359         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11360         assertion.  Add assertion for discriminant_index.
11361         (quirk_rust_enum): Use correct base type name in univariant case.
11362
11363 2018-03-01  Simon Marchi  <[email protected]>
11364
11365         * record.c (get_call_history_modifiers): Return a
11366         record_print_flags.
11367         (cmd_record_call_history): Adjust.
11368         * record-btrace.c (record_btrace_call_history): Adjust.
11369         (record_btrace_call_history_range): Adjust.
11370         (record_btrace_call_history_from): Adjust.
11371         * target-debug.h (target_debug_print_record_print_flags): New.
11372         * target-delegates.c: Re-generate.
11373         * target.c (target_call_history): Change flags type.
11374         (target_call_history_from): Likewise.
11375         (target_call_history_range): Likewise.
11376         * target.h (struct target_ops) <target_call_history>: Likewise.
11377         (target_call_history_from): Likewise.
11378         (target_call_history_range): Likewise.
11379
11380 2018-02-28  Sergio Durigan Junior  <[email protected]>
11381             Simon Marchi  <[email protected]>
11382
11383         * common/common-utils.c: Include "sys/stat.h".
11384         (is_regular_file): Move here from "source.c"; change return
11385         type to "bool".
11386         * common/common-utils.h (is_regular_file): New prototype.
11387         * common/pathstuff.c (contains_dir_separator): New function.
11388         * common/pathstuff.h (contains_dir_separator): New prototype.
11389         * source.c: Don't include "sys/stat.h".
11390         (is_regular_file): Move to "common/common-utils.c".
11391
11392 2018-02-28  Sergio Durigan Junior  <[email protected]>
11393
11394         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11395         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11396         * auto-load.c: Include "common/pathstuff.h".
11397         * common/common-def.h (current_directory): Move here.
11398         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11399         function.
11400         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11401         prototype.
11402         * common/pathstuff.c: New file.
11403         * common/pathstuff.h: New file.
11404         * compile/compile.c: Include "common/pathstuff.h".
11405         * defs.h (current_directory): Move to "common/common-defs.h".
11406         * dwarf2read.c: Include "common/pathstuff.h".
11407         * exec.c: Likewise.
11408         * guile/scm-safe-call.c: Likewise.
11409         * linux-thread-db.c: Likewise.
11410         * main.c: Likewise.
11411         * nto-tdep.c: Likewise.
11412         * objfiles.c: Likewise.
11413         * source.c: Likewise.
11414         * symtab.c: Likewise.
11415         * utils.c: Include "common/pathstuff.h".
11416         (gdb_realpath): Move to "common/pathstuff.c".
11417         (gdb_realpath_keepfile): Likewise.
11418         (gdb_abspath): Likewise.
11419         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11420         (gdb_realpath_keepfile): Likewise.
11421         (gdb_abspath): Likewise.
11422
11423 2018-02-28  John Baldwin  <[email protected]>
11424
11425         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11426         wildcard process pid for super_resume for kernels with a
11427         specific bug.
11428
11429 2018-02-27  Phil Muldoon  <[email protected]>
11430
11431         * compile/compile.c (get_args): Add additional comments
11432         explaining function.
11433
11434 2018-02-27  Simon Marchi  <[email protected]>
11435             Tom Tromey  <[email protected]>
11436
11437         * target.h (memory_write_request_s): Remove typedef.  Don't define
11438         VEC.
11439         (target_write_memory_blocks): Change argument to std::vector.
11440         (struct memory_write_request): Add constructor.
11441         * target-memory.c (compare_block_starting_address): Return bool.
11442         Change argument types.
11443         (claim_memory): Change arguments to use std::vector.
11444         (split_regular_and_flash_blocks, blocks_to_erase)
11445         (compute_garbled_blocks): Likewise.
11446         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11447         (target_write_memory_blocks): Change argument to std::vector.
11448         * symfile.c (struct load_section_data): Add constructor and
11449         destructor.  Use std::vector for "requests".
11450         (struct load_progress_data): Add initializers.
11451         (load_section_callback): Update.  Use "new".
11452         (clear_memory_write_data): Remove.
11453         (generic_load): Update.
11454
11455 2018-02-27  Alan Hayward  <[email protected]>
11456
11457         * arch/aarch64.h: Use common/tdesc.h.
11458
11459 2018-02-26  Maciej W. Rozycki  <[email protected]>
11460
11461         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11462         architecture with a 64-bit ABI.
11463
11464 2018-02-26  Maciej W. Rozycki  <[email protected]>
11465
11466         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11467         ahead of target description loading.
11468
11469 2018-02-26  Tom Tromey  <[email protected]>
11470
11471         * stack.c (backtrace_command_1): Update.
11472         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11473         of "flags".
11474         * python/py-framefilter.c (py_print_frame)
11475         (gdbpy_apply_frame_filter): Change type of "flags".
11476         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11477         of "flags".
11478         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11479         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11480         * extension.h (enum frame_filter_flag): Rename from
11481         frame_filter_flags.
11482         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11483         (apply_ext_lang_frame_filter): Change type of "flags".
11484         * extension.c (apply_ext_lang_frame_filter): Change type of
11485         "flags".
11486         * extension-priv.h (struct extension_language_ops)
11487         <apply_frame_filter>: Change type of "flags".
11488
11489 2018-02-26  Tom Tromey  <[email protected]>
11490
11491         PR python/16497:
11492         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11493         off-by-one in py_end computation.
11494         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11495         PRINT_MORE_FRAMES.
11496         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11497         constant.
11498
11499 2018-02-26  Tom Tromey  <[email protected]>
11500
11501         * dwarf2read.c (struct variant_field): New.
11502         (struct nextfield) <variant>: New field.
11503         (dwarf2_add_field): Handle DW_TAG_variant_part.
11504         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11505         discriminated union.
11506         (read_structure_type): Handle DW_TAG_variant_part.
11507         (handle_struct_member_die): New function, extracted from
11508         process_structure_scope.  Handle DW_TAG_variant.
11509         (process_structure_scope): Handle discriminated unions.  Call
11510         handle_struct_member_die.
11511
11512 2018-02-26  Tom Tromey  <[email protected]>
11513
11514         * rust-lang.h (rust_last_path_segment): Declare.
11515         * rust-lang.c (rust_last_path_segment): Now public.  Change
11516         contract.
11517         (struct disr_info): Remove.
11518         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11519         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11520         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11521         (rust_enum_p, rust_enum_variant): New function.
11522         (rust_underscore_fields): Remove "offset" parameter.
11523         (rust_print_enum): New function.
11524         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11525         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11526         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11527         enums.
11528         (rust_internal_print_type): New function, from rust_print_type.
11529         Remove enum code.
11530         (rust_print_type): Call rust_internal_print_type.
11531         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11532         Update enum handling.
11533         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11534         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11535         (rust_union_quirks): New functions.
11536         (process_full_comp_unit, process_full_type_unit): Call
11537         rust_union_quirks.
11538         (process_structure_scope): Update rust_unions if necessary.
11539
11540 2018-02-26  Tom Tromey  <[email protected]>
11541
11542         * value.h (value_union_variant): Declare.
11543         * valops.c (value_union_variant): New function.
11544         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11545         (struct discriminant_info): New.
11546         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11547         enumerator.
11548         (struct main_type) <flag_discriminated_union>: New field.
11549
11550 2018-02-26  Tom Tromey  <[email protected]>
11551
11552         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11553         unittests/unpack-selftests.c.
11554         * unittests/unpack-selftests.c: New file.
11555         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11556
11557 2018-02-26  Yao Qi  <[email protected]>
11558
11559         * dwarf2read.c (struct partial_die_info) <read>: New method.
11560         (read_partial_die): Remove the declaration.
11561         (load_partial_dies): Update.
11562         (partial_die_info::partial_die_info):
11563         (read_partial_die): Change it to partial_die_info::read.
11564
11565 2018-02-26  Yao Qi  <[email protected]>
11566
11567         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11568         (fixup_partial_die): Remove declaration.
11569         (scan_partial_symbols): Update.
11570         (partial_die_parent_scope): Likewise.
11571         (partial_die_full_name): Likewise.
11572         (fixup_partial_die): Change it to partial_die_info::fixup.
11573
11574 2018-02-26  Yao Qi  <[email protected]>
11575
11576         * dwarf2read.c (read_partial_die): Update the declaration.
11577         (load_partial_dies): Caller update.
11578         (read_partial_die): Remove one argument abbrev_len.
11579
11580 2018-02-26  Yao Qi  <[email protected]>
11581
11582         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11583         assignment operator.
11584         (load_partial_dies): Use ctor and copy ctor.
11585         (read_partial_die): Update.
11586         (dwarf2_cu::find_partial_die): Use ctor.
11587
11588 2018-02-26  Yao Qi  <[email protected]>
11589
11590         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11591         (find_partial_die_in_comp_unit): Change it to
11592         dwarf2_cu::find_partial_die.
11593         (find_partial_die): Update.
11594
11595 2018-02-26  Yao Qi  <[email protected]>
11596
11597         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11598         is NULL.
11599
11600 2018-02-26  Yao Qi  <[email protected]>
11601
11602         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11603
11604 2018-02-26  Alan Hayward  <[email protected]>
11605
11606         * arch/amd64.h: Use common/tdesc.h.
11607         * arch/i386.c: Likewise.
11608         * arch/i386.h: Likewise.
11609         * arch/tic6x.c: Likewise.
11610         * arch/tdesc.h: Move file from here...
11611         * common/tdesc.h: ...to here.
11612         * features/aarch64-core.c: Regenerate.
11613         * features/aarch64-fpu.c: Regenerate.
11614         * features/i386/32bit-avx.c: Regenerate.
11615         * features/i386/32bit-avx512.c: Regenerate.
11616         * features/i386/32bit-core.c: Regenerate.
11617         * features/i386/32bit-linux.c: Regenerate.
11618         * features/i386/32bit-mpx.c: Regenerate.
11619         * features/i386/32bit-pkeys.c: Regenerate.
11620         * features/i386/32bit-sse.c: Regenerate.
11621         * features/i386/64bit-avx.c: Regenerate.
11622         * features/i386/64bit-avx512.c: Regenerate.
11623         * features/i386/64bit-core.c: Regenerate.
11624         * features/i386/64bit-linux.c: Regenerate.
11625         * features/i386/64bit-mpx.c: Regenerate.
11626         * features/i386/64bit-pkeys.c: Regenerate.
11627         * features/i386/64bit-segments.c: Regenerate.
11628         * features/i386/64bit-sse.c: Regenerate.
11629         * features/i386/x32-core.c: Regenerate.
11630         * features/tic6x-c6xp.c: Regenerate.
11631         * features/tic6x-core.c: Regenerate.
11632         * features/tic6x-gp.c: Regenerate.
11633         * target-descriptions.c: Use common/tdesc.h.
11634         * target-descriptions.h: Likewise.
11635
11636 2018-02-24  Tom Tromey  <[email protected]>
11637
11638         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11639         (try_thread_db_load_from_dir, thread_db_load_search): Use
11640         std::string.
11641         (info_auto_load_libthread_db_compare): Return bool.  Change
11642         argument types.
11643         (info_auto_load_libthread_db): Use std::vector, std::string.
11644         Remove cleanups.
11645
11646 2018-02-24  Tom Tromey  <[email protected]>
11647
11648         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11649         std::string.
11650         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11651         std::string*.
11652         * gdbarch.c: Rebuild.
11653         * gdbarch.h: Rebuild.
11654         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11655         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11656         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11657         std::string*.
11658
11659 2018-02-23  Simon Marchi  <[email protected]>
11660
11661         * gdbtypes.h (sect_offset): Change type to uint64_t.
11662         (sect_offset_str): New function.
11663         * dwarf2read.c (create_addrmap_from_aranges): Use
11664         sect_offset_str.
11665         (error_check_comp_unit_head): Likewise.
11666         (create_debug_type_hash_table): Likewise.
11667         (read_cutu_die_from_dwo): Likewise.
11668         (init_cutu_and_read_dies): Likewise.
11669         (init_cutu_and_read_dies_no_follow): Likewise.
11670         (process_psymtab_comp_unit_reader): Likewise.
11671         (partial_die_parent_scope): Likewise.
11672         (peek_die_abbrev): Likewise.
11673         (process_queue): Likewise.
11674         (dwarf2_physname): Likewise.
11675         (read_namespace_alias): Likewise.
11676         (read_import_statement): Likewise.
11677         (create_dwo_cu_reader): Likewise.
11678         (create_cus_hash_table): Likewise.
11679         (lookup_dwo_cutu): Likewise.
11680         (inherit_abstract_dies): Likewise.
11681         (read_func_scope): Likewise.
11682         (read_call_site_scope): Likewise.
11683         (dwarf2_add_member_fn): Likewise.
11684         (read_common_block): Likewise.
11685         (read_module_type): Likewise.
11686         (read_typedef): Likewise.
11687         (read_subrange_type): Likewise.
11688         (load_partial_dies): Likewise.
11689         (read_partial_die): Likewise.
11690         (find_partial_die): Likewise.
11691         (read_str_index): Likewise.
11692         (dwarf2_string_attr): Likewise.
11693         (build_error_marker_type): Likewise.
11694         (lookup_die_type): Likewise.
11695         (dump_die_shallow): Likewise.
11696         (follow_die_ref): Likewise.
11697         (dwarf2_fetch_die_loc_sect_off): Likewise.
11698         (dwarf2_fetch_constant_bytes): Likewise.
11699         (follow_die_sig): Likewise.
11700         (get_signatured_type): Likewise.
11701         (get_DW_AT_signature_type): Likewise.
11702         (dwarf2_find_containing_comp_unit): Likewise.
11703         (set_die_type): Likewise.
11704
11705 2018-02-21  John Baldwin  <[email protected]>
11706
11707         * arch/aarch64.c: Include "common-defs.h".
11708         * arch/amd64.c: Likewise.
11709         * arch/i386.c: Likewise.
11710
11711 2018-02-21  Tom Tromey  <[email protected]>
11712
11713         * value.h: (extract_field_op): Update.
11714         * eval.c (extract_field_op): Return a const char *.
11715         * expression.h (parse_expression_for_completion): Update.
11716         * completer.c (complete_expression): Update.
11717         (add_struct_fields): Make fieldname const.
11718         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11719         (mark_completion_tag, parse_exp_in_context_1): Update.
11720         (parse_expression_for_completion): Change "name" to
11721         unique_xmalloc_ptr*.
11722
11723 2018-02-21  Tom Tromey  <[email protected]>
11724
11725         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11726
11727 2018-02-21  Yao Qi  <[email protected]>
11728
11729         * avr-tdep.c (avr_read_pc): Change parameter type to
11730         readable_regcache.
11731         * gdbarch.sh (read_pc): Likewise.
11732         * gdbarch.c: Re-generated.
11733         * gdbarch.h: Re-generated.
11734         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11735         readable_regcache.
11736         * ia64-tdep.c (ia64_read_pc): Likewise.
11737         * mips-tdep.c (mips_read_pc): Likewise.
11738         * spu-tdep.c (spu_read_pc): Likewise.
11739
11740 2018-02-21  Yao Qi  <[email protected]>
11741
11742         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11743         * regcache-dump.c: New file.
11744         * regcache.c: Move register_dump to regcache-dump.c.
11745         (maintenance_print_registers): Likewise.
11746         (maintenance_print_raw_registers): Likewise.
11747         (maintenance_print_cooked_registers): Likewise.
11748         (maintenance_print_register_groups): Likewise.
11749         (maintenance_print_remote_registers): Likewise.
11750         (_initialize_regcache): Likewise.
11751         * regcache.h (register_dump): Moved from regcache.c.
11752
11753 2018-02-21  Yao Qi  <[email protected]>
11754
11755         * regcache.c (regcache::regcache): Update.
11756         (regcache::invalidate): Move it to detached_regcache::invalidate.
11757         (get_thread_arch_aspace_regcache): Update.
11758         (regcache::raw_update): Update.
11759         (regcache::cooked_read): Remove some code.
11760         (regcache::cooked_read_value): Likewise.
11761         (regcache::raw_write): Remove assert on m_readonly_p.
11762         (regcache::raw_supply_integer): Move it to
11763         detached_regcache::raw_supply_integer.
11764         (regcache::raw_supply_zeroed): Likewise.
11765         * regcache.h (detached_regcache) <raw_supply_integer>: New
11766         declaration.
11767         <raw_supply_zeroed, invalidate>: Likewise.
11768         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11769         <invalidate>: Likewise.
11770         <m_readonly_p>: Removed.
11771
11772 2018-02-21  Yao Qi  <[email protected]>
11773
11774         * infcmd.c (get_return_value): Let stop_regs point to
11775         get_current_regcache.
11776         * regcache.c (regcache::regcache): Remove.
11777         (register_dump_reg_buffer): New class.
11778         (regcache_print): Adjust.
11779         * regcache.h (regcache): Remove constructors.
11780
11781 2018-02-21  Yao Qi  <[email protected]>
11782
11783         * regcache.c (class register_dump): New class.
11784         (register_dump_regcache, register_dump_none): New class.
11785         (register_dump_remote, register_dump_groups): New class.
11786         (regcache_print): Update.
11787         * regcache.h (regcache_dump_what): Move it to regcache.c.
11788         (regcache) <dump>: Remove.
11789
11790 2018-02-21  Yao Qi  <[email protected]>
11791
11792         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11793          reg_buffer_rw *.
11794         (jit_unwind_reg_set_impl): Call raw_supply.
11795         (jit_frame_sniffer): Use reg_buffer_rw.
11796         * record-full.c (record_full_core_regbuf): Change its type.
11797         (record_full_core_open_1): Use reg_buffer_rw.
11798         (record_full_close): Likewise.
11799         (record_full_core_fetch_registers): Use regcache->raw_supply.
11800         (record_full_core_store_registers): Likewise.
11801         * regcache.c (regcache::get_register_status): Move it to
11802         reg_buffer.
11803         (regcache_raw_set_cached_value): Remove.
11804         (regcache::raw_set_cached_value): Remove.
11805         (regcache::raw_write): Call raw_supply.
11806         (regcache::raw_supply): Move it to reg_buffer_rw.
11807         * regcache.h (regcache_raw_set_cached_value): Remove.
11808         (reg_buffer_rw): New class.
11809
11810 2018-02-21  Yao Qi  <[email protected]>
11811
11812         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11813         readonly_detached_regcache.
11814         (dummy_frame_prev_register): Use regcache->cooked_read.
11815         * frame.c (frame_save_as_regcache): Change return type.
11816         (frame_pop): Update.
11817         * frame.h (frame_save_as_regcache): Update declaration.
11818         * inferior.h (get_infcall_suspend_state_regcache): Update
11819         declaration.
11820         * infrun.c (infcall_suspend_state) <registers>: use
11821         readonly_detached_regcache.
11822         (save_infcall_suspend_state): Don't use regcache_dup.
11823         (get_infcall_suspend_state_regcache): Change return type.
11824         * linux-fork.c (struct fork_info) <savedregs>: Change to
11825         readonly_detached_regcache.
11826         <pc>: New field.
11827         (fork_save_infrun_state): Don't use regcache_dup.
11828         (info_checkpoints_command): Adjust.
11829         * mi/mi-main.c (register_changed_p): Update declaration.
11830         (mi_cmd_data_list_changed_registers): Use
11831         readonly_detached_regcache.
11832         (register_changed_p): Change parameter type to
11833         readonly_detached_regcache.
11834         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11835         readonly_detached_regcache.
11836         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11837         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11838         New.
11839         (regcache::save): Move it to reg_buffer.
11840         (regcache::restore): Change parameter type.
11841         (regcache_dup): Remove.
11842         * regcache.h (reg_buffer) <save>: New method.
11843         (readonly_detached_regcache): New class.
11844         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11845         readonly_detached_regcache.
11846         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11847
11848 2018-02-21  Yao Qi  <[email protected]>
11849
11850         * frame.c (frame_save_as_regcache): Use regcache method save.
11851         (frame_pop): Use regcache method restore.
11852         * infrun.c (restore_infcall_suspend_state): Likewise.
11853         * linux-fork.c (fork_load_infrun_state): Likewise.
11854         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11855         save.
11856         * regcache.c (regcache_save): Remove.
11857         (regcache::restore): More asserts.
11858         (regcache_cpy): Remove.
11859         * regcache.h (regcache_save): Remove the declaration.
11860         (regcache::restore): Move from private to public.
11861         Remove the friend declaration of regcache_cpy.
11862         (regcache_cpy): Remove declaration.
11863
11864 2018-02-21  Yao Qi  <[email protected]>
11865
11866         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11867         parameter type to 'readable_regcache *'.
11868         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11869         * arm-tdep.c (arm_neon_quad_read): Likewise.
11870         (arm_pseudo_read): Likewise.
11871         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11872         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11873         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11874         * gdbarch.c: Re-generated.
11875         * gdbarch.h: Re-generated.
11876         * gdbarch.sh (pseudo_register_read): Change parameter type to
11877         'readable_regcache *'.
11878         (pseudo_register_read_value): Likewise.
11879         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11880         (h8300_pseudo_register_read): Likewise.
11881         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11882         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11883         (i386_pseudo_register_read_into_value): Likewise.
11884         (i386_pseudo_register_read_value): Likewise.
11885         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11886         declaration.
11887         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11888         * m32c-tdep.c (m32c_raw_read): Likewise.
11889         (m32c_read_flg): Likewise.
11890         (m32c_banked_register): Likewise.
11891         (m32c_banked_read): Likewise.
11892         (m32c_sb_read): Likewise.
11893         (m32c_part_read): Likewise.
11894         (m32c_cat_read): Likewise.
11895         (m32c_r3r2r1r0_read): Likewise.
11896         (m32c_pseudo_register_read): Likewise.
11897         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11898         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11899         (mep_pseudo_cr64_read): Likewise.
11900         (mep_pseudo_register_read): Likewise.
11901         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11902         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11903         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11904         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11905         (regcache::cooked_read): Likewise.
11906         (regcache::cooked_read_value): Likewise.
11907         (regcache_cooked_read_signed):
11908         (regcache::cooked_read): Likewise.
11909         * regcache.h (readable_regcache): New class.
11910         (regcache): Inherit readable_regcache.  Move some methods to
11911         readable_regcache.
11912         * rl78-tdep.c (rl78_pseudo_register_read): Change
11913         parameter type to 'readable_regcache *'.
11914         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11915         (e500_pseudo_register_read): Change parameter type to
11916         'readable_regcache *'.
11917         (dfp_pseudo_register_read): Likewise.
11918         (vsx_pseudo_register_read): Likewise.
11919         (efpr_pseudo_register_read): Likewise.
11920         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11921         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11922         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11923         (sh64_pseudo_register_read): Likewise.
11924         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11925         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11926         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11927         (spu_pseudo_register_read): Likewise.
11928         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11929         (xtensa_pseudo_register_read): Likewise.
11930
11931 2018-02-21  Yao Qi  <[email protected]>
11932
11933         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11934         (regcache::arch): Move it to reg_buffer::arch.
11935         (regcache::register_buffer): Likewise.
11936         (regcache::assert_regnum): Likewise.
11937         (regcache::num_raw_registers): Likewise.
11938         * regcache.h (reg_buffer): New class.
11939         (regcache): Inherit reg_buffer.
11940
11941 2018-02-20  Simon Marchi  <[email protected]>
11942
11943         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11944         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11945
11946 2018-02-20  Markus Metzger  <[email protected]>
11947
11948         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11949
11950 2018-02-19  Alan Hayward  <[email protected]>
11951
11952         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11953         (SFILES): Remove common/*.c files.
11954         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11955         * common/common.host: Add common reference.
11956         * configure.ac: Likewise.
11957         * configure: Regenerate.
11958
11959 2018-02-16  Yao Qi  <[email protected]>
11960
11961         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11962         (block_initialize_namespace): Use new.
11963         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11964         (dwarf2_free_objfile): Use delete.
11965         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11966         (copy_type_recursive): Use new.
11967         * gdb_obstack.h (allocate_on_obstack): New.
11968
11969 2018-02-15  Yao Qi  <[email protected]>
11970
11971         PR gdb/22849
11972         * inferior.c (exit_inferior_1): Reset inf->control.
11973
11974 2018-02-15  Joel Brobecker  <[email protected]>
11975
11976         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11977         declaration.
11978
11979 2018-02-14  Pedro Alves  <[email protected]>
11980
11981         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11982         frame_cleanup_after_sniffer on exception.
11983
11984 2018-02-14  Tom Tromey  <[email protected]>
11985
11986         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11987         const.
11988         (solib_bfd_open): Make pathname const.
11989         * solib.c (solib_bfd_open): Make pathname const.
11990         * solib-spu.c (spu_bfd_fopen): Make name const.
11991         (spu_bfd_open): Make pathname const.
11992         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11993         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11994
11995 2018-02-14  Tom Tromey  <[email protected]>
11996
11997         * symfile.c (symfile_bfd_open): Update.
11998         * source.h (openp, source_full_path_of, find_and_open_source):
11999         Change argument type to unique_xmalloc_ptr.
12000         * source.c (openp): Take a unique_xmalloc_ptr.
12001         (source_full_path_of, find_and_open_source): Likewise.
12002         (open_source_file, symtab_to_fullname): Update.
12003         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12004         unique_xmalloc_ptr.
12005         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12006         (exec_file_find): Update.
12007         * psymtab.c (psymtab_to_fullname): Update.
12008         * nto-tdep.h (nto_find_and_open_solib): Update.
12009         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12010         unique_xmalloc_ptr.
12011         * exec.c (exec_file_attach): Update.
12012         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12013         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12014
12015 2018-02-14  Tom Tromey  <[email protected]>
12016
12017         * solib.c: Include source.h.
12018         * nto-tdep.c: Include source.h.
12019         * mi/mi-cmd-env.c: Include source.h.
12020         * infcmd.c: Include source.h.
12021         * exec.c: Include source.h.
12022         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12023         (add_path, directory_switch, source_path, init_source_path): Move
12024         declarations...
12025         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12026         (add_path, directory_switch, source_path, init_source_path):
12027         ...here.
12028
12029 2018-02-14  Tom Tromey  <[email protected]>
12030
12031         * solist.h (exec_file_find, solib_find): Return
12032         unique_xmalloc_ptr.
12033         (solib_bfd_fopen): Take a const char *.
12034         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12035         (exec_file_find, solib_find): Likewise.
12036         (solib_bfd_fopen): Do not take ownership of "pathname".
12037         (solib_bfd_open): Use unique_xmalloc_ptr.
12038         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12039         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12040         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12041         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12042
12043 2018-02-14  Joel Brobecker  <[email protected]>
12044
12045         * ada-lang.c (name_match_type_from_name): Remove reference to
12046         ada_name_for_lookup in function's documentation.
12047         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12048
12049 2018-02-13  Simon Marchi  <[email protected]>
12050
12051         * defs.h (enum openp_flags): New enum.
12052         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12053         Move to enum openp_flags.
12054         (openp_flags): New enum flags.
12055         (openp): Change parameter type to openp_flags.
12056         * source.c (openp): Change parameter type to openp_flags.
12057         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12058         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12059
12060 2018-02-13  Simon Marchi  <[email protected]>
12061
12062         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12063         per-command.
12064
12065 2018-02-12  Andrew Burgess  <[email protected]>
12066
12067         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12068         into...
12069         (class dwarf2_queue_guard): ...the destructor of this new class.
12070         (dw2_do_instantiate_symtab): Create instance of the new class
12071         dwarf2_queue_guard, remove cleanup.
12072
12073 2018-02-09  Tom Tromey  <[email protected]>
12074
12075         * source.c (find_source_lines): Don't reference past the end of
12076         the vector.
12077
12078 2018-02-09  Markus Metzger  <[email protected]>
12079
12080         * remote.c (remote_btrace_maybe_reopen): Change error message.
12081         * btrace.c (btrace_enable): Likewise.
12082         (parse_xml_btrace): Likewise.
12083         (parse_xml_btrace_conf): Likewise.
12084
12085 2018-02-09  Markus Metzger  <[email protected]>
12086
12087         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12088         (linux_enable_pt, linux_enable_bts): Call
12089         diagnose_perf_event_open_fail.
12090
12091 2018-02-09  Markus Metzger  <[email protected]>
12092
12093         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12094         Remove parameter and change return type.  Update callers.  Move it.
12095         (linux_enable_bts, linux_enable_pt): Improve error message.
12096         (linux_enable_pt): Remove zero buffer size check.
12097         (linux_enable_btrace): Improve error messages.  Remove NULL return
12098         check.
12099
12100 2018-02-09  Markus Metzger  <[email protected]>
12101
12102         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12103         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12104         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12105         (linux_supports_pt, linux_supports_btrace): Remove.
12106         (linux_enable_bts): Call cpu_supports_bts.
12107         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12108         * remote.c (remote_supports_btrace): Remove.
12109         (init_remote_ops): Remove remote_supports_btrace.
12110         * target-delegates.c: Regenerated.
12111         * target.c (target_supports_btrace): Remove.
12112         * target.h (target_ops) <to_supports_btrace>: Remove
12113         (target_supports_btrace): Remove.
12114         * x86-linux-nat.c (x86_linux_create_target): Remove
12115         linux_supports_btrace.
12116
12117 2018-02-09  Markus Metzger  <[email protected]>
12118
12119         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12120         btrace failed.
12121         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12122         exception and use message in own exception.
12123
12124 2018-02-09  Markus Metzger  <[email protected]>
12125
12126         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12127         (perf_event_pt_event_type): Use gdb_file_up.
12128         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12129         scoped_fd, and scoped_mmap.
12130
12131 2018-02-09  Markus Metzger  <[email protected]>
12132
12133         * common/scoped_mmap.h: New.
12134         * unittests/scoped_mmap-selftest.c: New.
12135         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12136         unittests/scoped_mmap-selftest.c.
12137
12138 2018-02-09  Markus Metzger  <[email protected]>
12139
12140         * common/scoped_fd.h: New.
12141         * unittests/scoped_fd-selftest.c: New.
12142         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12143         unittests/scoped_fd-selftest.c.
12144
12145 2018-02-09  Tom Tromey  <[email protected]>
12146
12147         * auto-load.c (auto_load_section_scripts): Use
12148         gdb::unique_xmalloc_ptr.
12149
12150 2018-02-09  Tom Tromey  <[email protected]>
12151
12152         * auto-load.c (execute_script_contents): Use std::string.
12153
12154 2018-02-09  Joel Brobecker  <[email protected]>
12155
12156         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12157         Python function, rather than a new command.
12158
12159 2018-02-08  Tom Tromey  <[email protected]>
12160
12161         * solib.c (solib_find_1): Use std::string.
12162         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12163
12164 2018-02-08  Tom Tromey  <[email protected]>
12165
12166         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12167
12168 2018-02-08  Tom Tromey  <[email protected]>
12169
12170         * source.c (find_source_lines): Use gdb::def_vector.
12171
12172 2018-02-08  Tom Tromey  <[email protected]>
12173
12174         * macrocmd.c (struct temporary_macro_definition): New.
12175         (macro_define_command): Use temporary_macro_definition.  Remove
12176         cleanups.
12177         (free_macro_definition_ptr): Remove.
12178
12179 2018-02-08  Tom Tromey  <[email protected]>
12180
12181         * macroexp.c (maybe_expand): Use std::string.
12182
12183 2018-02-08  Tom Tromey  <[email protected]>
12184
12185         * macroexp.c (struct macro_buffer): Add initializers for some
12186         members.
12187         (init_buffer, init_shared_buffer, free_buffer)
12188         (free_buffer_return_text): Remove.
12189         (macro_buffer): New constructors.
12190         (~macro_buffer): New destructor.
12191         (macro_buffer::set_shared): New method.
12192         (macro_buffer::resize_buffer, macro_buffer::appendc)
12193         (macro_buffer::appendmem): Now methods, not free functions.
12194         (set_token, append_tokens_without_splicing, stringify)
12195         (macro_stringify): Update.
12196         (gather_arguments): Change return type.  Remove argc_p argument,
12197         add args_ptr argument.  Use std::vector.
12198         (substitute_args): Remove argc argument.  Accept std::vector.
12199         (expand): Update.  Use std::vector.
12200         (scan, macro_expand, macro_expand_next): Update.
12201
12202 2018-02-08  Tom Tromey  <[email protected]>
12203
12204         * symtab.c (default_collect_symbol_completion_matches_break_on):
12205         Use unique_xmalloc_ptr.
12206         * macroscope.h: (sal_macro_scope, user_macro_scope)
12207         (default_macro_scope): Return unique_xmalloc_ptr.
12208         * macroscope.c (sal_macro_scope, user_macro_scope)
12209         (default_macro_scope): Return unique_xmalloc_ptr.
12210         * macroexp.h (macro_expand, macro_expand_once): Return
12211         unique_xmalloc_ptr.
12212         * macroexp.c (macro_expand, macro_expand_once): Return
12213         unique_xmalloc_ptr.
12214         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12215         (info_macro_command, info_macros_command): Use
12216         unique_xmalloc_ptr.
12217         * compile/compile-c-support.c (write_macro_definitions): Use
12218         unique_xmalloc_ptr.
12219         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12220
12221 2018-02-07  Simon Marchi  <[email protected]>
12222
12223         * value.c (value_static_field): Assign field type instead of
12224         containing type when returning an optimized out value.
12225
12226 2018-02-06  Yao Qi  <[email protected]>
12227
12228         * ft32-tdep.c (ft32_read_pc): Remove.
12229         (ft32_write_pc): Remove.
12230         (ft32_gdbarch_init): Update.
12231         * m32r-tdep.c (m32r_read_pc): Remove.
12232         (m32r_gdbarch_init): Update.
12233         * mep-tdep.c (mep_read_pc): Remove.
12234         (mep_gdbarch_init): Update.
12235         * microblaze-tdep.c (microblaze_write_pc): Remove.
12236         (microblaze_gdbarch_init): Update.
12237         * mn10300-tdep.c (mn10300_read_pc): Remove.
12238         (mn10300_write_pc): Remove.
12239         (mn10300_gdbarch_init): Update.
12240         * moxie-tdep.c (moxie_read_pc): Remove.
12241         (moxie_write_pc): Remove.
12242         (moxie_gdbarch_init): Update.
12243
12244 2018-02-06  Yao Qi  <[email protected]>
12245
12246         * expprint.c (print_subexp_standard): Handle
12247         OP_F77_UNDETERMINED_ARGLIST.
12248         (dump_subexp_body_standard): Likewise.
12249
12250 2018-02-05  Alan Hayward  <[email protected]>
12251
12252         * target-descriptions.c (tdesc_element_visitor) Add empty
12253         implementations.
12254         (tdesc_type): Move make_gdb_type from here.
12255         (tdesc_type_builtin): Likewise.
12256         (tdesc_type_vector): Likewise.
12257         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12258         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12259         (make_gdb_type_union): Likewise.
12260         (make_gdb_type_flags): Likewise.
12261         (make_gdb_type_enum): Likewise.
12262         (make_gdb_type): New function.
12263         (tdesc_register_type): Use static make_gdb_type.
12264
12265 2018-02-05  Ruslan Kabatsayev <[email protected]>
12266
12267         * infcmd.c (default_print_one_register_info): Align natural-format
12268         column values consistently one under another.
12269         (pad_to_column): New function.
12270
12271 2018-02-05  Joel Brobecker  <[email protected]>
12272
12273         * dwarf2read.c (dwarf2_physname): Move commment.
12274
12275 2018-02-01  Leszek Swirski  <[email protected]>
12276
12277         * varobj.c (varobj_formatted_print_options): Allow recursive
12278         pretty printing if pretty printing is enabled.
12279
12280 2018-02-01  Leszek Swirski  <[email protected]>
12281
12282         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12283         names after a structop as a filename.
12284
12285 2018-02-01  Yao Qi  <[email protected]>
12286
12287         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12288         (arm_record_coproc_data_proc): Likewise.
12289
12290 2018-02-01  Yao Qi  <[email protected]>
12291
12292         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12293
12294 2018-01-31  Nikola Prica  <[email protected]>
12295
12296         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12297         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12298
12299 2018-01-31  Pedro Alves  <[email protected]>
12300
12301         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12302         * inflow.c (child_terminal_save_inferior): Wrap reference to
12303         tcgetpgrp in HAVE_TERMIOS_H.
12304         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12305         _WIN32.
12306         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12307         always iterate over all inferiors.
12308         (gdbsim_cntrl_c): Adjust.
12309         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12310
12311 2018-01-31  Joel Brobecker  <[email protected]>
12312
12313         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12314         index type is objfile-owned if the element type is as well.
12315
12316 2018-01-31  Joel Brobecker  <[email protected]>
12317
12318         GDB 8.1 released.
12319
12320 2018-01-30  Philipp Rudo  <[email protected]>
12321
12322         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12323         "features/s390x-linux64.c".
12324         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12325         s390_linux32 and s390x_linux64.
12326         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12327         default tdesc.
12328         * s390-tdep.c: Include "features/s390-linux32.c" and
12329         "features/s390x-linux64.c".
12330         (s390_tdesc_valid): Add check for tdesc_has_registers.
12331         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12332         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12333         tdesc_s390x_linux64.
12334         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12335         tdesc_s390x_linux64 to...
12336         * s390-tdep.h: ...here.
12337
12338 2018-01-30  Pedro Alves  <[email protected]>
12339
12340         PR gdb/13211
12341         * config.in, configure: Regenerate.
12342         * configure.ac: Check for getpgid.
12343         * go32-nat.c (go32_pass_ctrlc): New.
12344         (go32_target): Install it.
12345         * inf-child.c (inf_child_target): Install
12346         child_terminal_save_inferior, child_pass_ctrlc and
12347         child_interrupt.
12348         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12349         (inf_ptrace_target): No longer install it.
12350         * infcmd.c (interrupt_target_1): Adjust.
12351         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12352         (child_interrupt): Declare.
12353         (inferior::terminal_state): New.
12354         * inflow.c (struct terminal_info): Update comments.
12355         (inferior_process_group): Delete.
12356         (terminal_is_ours): Delete.
12357         (gdb_tty_state): New.
12358         (child_terminal_init): Adjust.
12359         (is_gdb_terminal, sharing_input_terminal_1)
12360         (sharing_input_terminal): New functions.
12361         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12362         Set the process's actual process group in the foreground if
12363         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12364         mark terminal as the inferior's if not sharing GDB's terminal.
12365         Don't check attach_flag.
12366         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12367         pass down a target_terminal_state.
12368         (child_terminal_save_inferior): New, factored out from ...
12369         (child_terminal_ours_1): ... this.  Handle
12370         target_terminal_state::is_ours_for_output.
12371         (child_interrupt, child_pass_ctrlc): New.
12372         (inflow_inferior_exit): Clear the inferior's terminal_state.
12373         (copy_terminal_info): Copy the inferior's terminal state.
12374         (_initialize_inflow): Remove reference to terminal_is_ours.
12375         * inflow.h (inferior_process_group): Delete.
12376         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12377         * procfs.c (procfs_target): Don't install procfs_interrupt.
12378         (procfs_interrupt): Delete.
12379         * remote.c (remote_serial_quit_handler): Adjust.
12380         (remote_interrupt): Remove ptid parameter.  Adjust.
12381         * target-delegates.c: Regenerate.
12382         * target.c: Include "terminal.h".
12383         (target_terminal::terminal_state): Rename to ...
12384         (target_terminal::m_terminal_state): ... this.
12385         (target_terminal::init): Adjust.
12386         (target_terminal::inferior): Adjust to per-inferior
12387         terminal_state.
12388         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12389         (target_terminal::ours, target_terminal::ours_for_output): Use
12390         target_terminal_is_ours_kind.
12391         (target_interrupt): Remove ptid parameter.  Adjust.
12392         (default_target_pass_ctrlc): Adjust.
12393         * target.h (target_ops::to_terminal_save_inferior): New field.
12394         (target_ops::to_interrupt): Remove ptid_t parameter.
12395         (target_interrupt): Remove ptid_t parameter.  Update comment.
12396         (target_pass_ctrlc): Update comment.
12397         * target/target.h (target_terminal_state): New scoped enum,
12398         factored out of ...
12399         (target_terminal::terminal_state): ... here.
12400         (target_terminal::inferior): Update comments.
12401         (target_terminal::restore_inferior): New.
12402         (target_terminal::is_inferior, target_terminal::is_ours)
12403         (target_terminal::is_ours_for_output): Adjust.
12404         (target_terminal::scoped_restore_terminal_state): Adjust to
12405         rename, and call restore_inferior() instead of inferior().
12406         (target_terminal::scoped_restore_terminal_state::m_state): Change
12407         type.
12408         (target_terminal::terminal_state): Rename to ...
12409         (target_terminal::m_terminal_state): ... this and change type.
12410
12411 2018-01-30  Pedro Alves  <[email protected]>
12412
12413         * linux-nat.c (wait_for_signal): New function.
12414         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12415         directly.
12416         (async_terminal_is_ours)
12417         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12418         (linux_nat_add_target): Don't override
12419         to_terminal_inferior/to_terminal_ours.
12420
12421 2018-01-29  Sergio Durigan Junior  <[email protected]>
12422
12423         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12424
12425 2018-01-28  Simon Marchi  <[email protected]>
12426
12427         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12428         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12429         dwarf2_per_objfile_free here.
12430         (dwarf2_per_objfile_free): Remove.
12431         (_initialize_dwarf2_read): Don't register
12432         dwarf2_per_objfile_free as a registry cleanup.
12433
12434 2018-01-27  Eli Zaretskii  <[email protected]>
12435
12436         Avoid compilation errors in MinGW native builds
12437
12438         The error is triggered by including python-internal.h, and the
12439         error message is:
12440
12441              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12442                       from build-gnulib/import/math.h:27,
12443                       from d:/usr/Python26/include/pyport.h:235,
12444                       from d:/usr/Python26/include/Python.h:58,
12445                       from python/python-internal.h:94,
12446                       from python/py-arch.c:24:
12447              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12448         using ::hypot;
12449                 ^~~~~
12450
12451         This happens because Python headers define 'hypot' to expand t
12452         '_hypot' in the Windows builds.
12453         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12454         'hypoth'.  This avoids a compilation error.
12455
12456 2018-01-26  Alan Hayward  <[email protected]>
12457
12458         * MAINTAINERS (Write After Approval): Fix ordering.
12459
12460 2018-01-26  Alan Hayward  <[email protected]>
12461
12462         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12463
12464 2018-01-26  Alan Modra  <[email protected]>
12465
12466         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12467         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12468         Remove nop.  Make const.  Comment.
12469         (powerpc32_plt_stub_so_2): New.
12470         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12471         Correct count.  Update uses.
12472         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12473         Move common code reading PLT entry word.  Correct
12474         powerpc32_plt_stub PLT address calculation.
12475         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12476         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12477         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12478         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12479         (ppc64_standard_linkage8): Likewise.
12480         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12481         Correct insns description.
12482         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12483
12484 2018-01-24  Pedro Alves  <[email protected]>
12485
12486         GCC PR libstdc++/83906
12487         * gdbtypes.c (operator==(const dynamic_prop &,
12488         const dynamic_prop &)): New.
12489         (operator==(const range_bounds &, const range_bounds &)): New.
12490         (check_types_equal): Use them instead of memcmp.
12491         * gdbtypes.h (operator==(const dynamic_prop &,
12492         const dynamic_prop &)): Declare.
12493         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12494         (operator==(const range_bounds &, const range_bounds &)): Declare.
12495         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12496
12497 2018-01-23  Philipp Rudo  <[email protected]>
12498
12499         * s390-linux-tdep.c (s390_record_address_mask)
12500         (s390_record_calc_disp_common, s390_record_calc_disp)
12501         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12502         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12503         (s390_process_record): Move to s390-tdep.c.
12504         (s390_linux_init_abi_any): Adjust.
12505         * s390-tdep.c (s390_record_address_mask)
12506         (s390_record_calc_disp_common, s390_record_calc_disp)
12507         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12508         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12509         (s390_process_record): Moved from s390-linux-tdep.c
12510         (s390_gdbarch_init): Adjust.
12511
12512 2018-01-23  Philipp Rudo  <[email protected]>
12513
12514         * s390-linux-nat.c (s390-tdep.h): New include.
12515         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12516         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12517         (ALLDEPFILES): Add s390-tdep.c.
12518         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12519         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12520         * s390-tdep.h: ...this.  New file.
12521         * s390-linux-tdep.c (s390-tdep.h): New include.
12522         (_initialize_s390_tdep): Rename to...
12523         (_initialize_s390_linux_tdep): ...this and adjust.
12524         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12525         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12526         s390-tdep.h.
12527         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12528         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12529         (s390_is_partial_instruction, s390_software_single_step)
12530         (is_non_branch_ril, s390_displaced_step_copy_insn)
12531         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12532         (s390_prologue_data, s390_addr, s390_store, s390_load)
12533         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12534         (s390_register_call_saved, s390_guess_tracepoint_registers)
12535         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12536         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12537         (s390_pseudo_register_name, s390_pseudo_register_type)
12538         (s390_pseudo_register_read, s390_pseudo_register_write)
12539         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12540         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12541         (s390_addr_bits_remove, s390_address_class_type_flags)
12542         (s390_address_class_type_flags_to_name)
12543         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12544         (s390_function_arg_float, s390_function_arg_vector)
12545         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12546         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12547         (s390_frame_align, s390_register_return_value, s390_return_value)
12548         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12549         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12550         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12551         (s390_trad_frame_prev_register, s390_unwind_cache)
12552         (s390_prologue_frame_unwind_cache)
12553         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12554         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12555         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12556         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12557         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12558         (s390_frame_base_address, s390_local_base_address)
12559         (s390_frame_base, s390_gcc_target_options)
12560         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12561         (s390_validate_reg_range, s390_tdesc_valid)
12562         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12563         * s390-tdep.c: ...this.  New file.
12564
12565 2018-01-23  Philipp Rudo  <[email protected]>
12566
12567         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12568         (s390_process_record, s390_gdbarch_tdep_alloc)
12569         (s390_linux_init_abi_any): Use/set new hook.
12570
12571 2018-01-23  Philipp Rudo  <[email protected]>
12572
12573         * s390-linux-tdep.c (osabi.h): New include.
12574         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12575         (s390_linux_init_abi_any): New functions.
12576         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12577
12578 2018-01-23  Philipp Rudo  <[email protected]>
12579
12580         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12581         tdesc_has_registers check
12582
12583 2018-01-23  Philipp Rudo  <[email protected]>
12584
12585         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12586         (s390_validate_reg_range): New macro.
12587         (s390_gdbarch_init): Adjust.
12588
12589 2018-01-23  Philipp Rudo  <[email protected]>
12590
12591         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12592         (s390_gdbarch_tdep_alloc): Adjust.
12593         (s390_gdbarch_init): Adjust.
12594
12595 2018-01-23  Philipp Rudo  <[email protected]>
12596
12597         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12598         <have_tdb>: Change type to bool.
12599         (s390_gdbarch_tdep_alloc): Adjust.
12600         (s390_gdbarch_init): Adjust.
12601
12602 2018-01-23  Philipp Rudo  <[email protected]>
12603
12604         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12605         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12606         (s390_gdbarch_tdep_alloc): New function.
12607         (s390_gdbarch_init): Allocate tdep at start and use its fields
12608         instead of separate variables.
12609
12610 2018-01-23  Philipp Rudo  <[email protected]>
12611
12612         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12613         when looking for cached gdbarch and add comment for remaining.
12614
12615 2018-01-22  Pedro Alves  <[email protected]>
12616             Sergio Durigan Junior  <[email protected]>
12617
12618         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12619         case.
12620
12621 2018-01-22  Maciej W. Rozycki  <[email protected]>
12622
12623         * MAINTAINERS: Update my company e-mail address.
12624
12625 2018-01-22  Yao Qi  <[email protected]>
12626
12627         * regcache.c (cooked_write_test): New function.
12628         (_initialize_regcache): Register the test.
12629
12630 2018-01-22  Yao Qi  <[email protected]>
12631
12632         * ia64-tdep.c (ia64_pseudo_register_read): Call
12633         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12634         * m32c-tdep.c (m32c_cat_read): Likewise.
12635         (m32c_r3r2r1r0_read): Likewise.
12636         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12637         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12638
12639 2018-01-22  Yao Qi  <[email protected]>
12640
12641         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12642         method raw_read instead of regcache_raw_read.
12643         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12644         * arm-tdep.c (arm_neon_quad_read): Likewise.
12645         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12646         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12647         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12648         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12649         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12650         (i386_pseudo_register_read_into_value): Likewise.
12651         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12652         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12653         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12654         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12655         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12656         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12657         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12658         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12659         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12660
12661 2018-01-22  Yao Qi  <[email protected]>
12662
12663         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12664         * configure.tgt: Remove target mt.
12665         * mt-tdep.c: Remove.
12666         * regcache.c (cooked_read_test): Remove the check for mt.
12667
12668 2018-01-22  Yao Qi  <[email protected]>
12669
12670         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12671         instead of gdbarch_pseudo_register_read_value.
12672
12673 2018-01-22  Joel Brobecker  <[email protected]>
12674
12675         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12676         language is Ada.
12677
12678 2018-01-22  Joel Brobecker  <[email protected]>
12679
12680         * linespec.c (create_sals_line_offset): Remove code that preserved
12681         the symtab_and_line's line number.
12682
12683 2018-01-21  Andrew Burgess  <[email protected]>
12684
12685         * varobj.c (varobj_create): Don't set valid_block when creating a
12686         floating varobj.
12687
12688 2018-01-21  Andrew Burgess  <[email protected]>
12689
12690         * varobj.c (varobj_create): Remove out of date comment.
12691
12692 2018-01-21  Andrew Burgess  <[email protected]>
12693
12694         PR mi/20395
12695         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12696         updating innermost block.
12697         * parse.c (innermost_block_tracker::update): Take extra type
12698         parameter, and check types match before updating innermost block.
12699         (write_dollar_variable): Update innermost block for registers.
12700         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12701         (innermost_block_tracker::innermost_block_tracker): Initialise
12702         m_types member.
12703         (innermost_block_tracker::reset): Take type parameter.
12704         (innermost_block_tracker::update): Take type parameter, and pass
12705         type through as needed.
12706         (innermost_block_tracker::m_types): New member.
12707         * varobj.c (varobj_create): Pass type when reseting innermost
12708         block.
12709
12710 2018-01-21  Andrew Burgess  <[email protected]>
12711
12712         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12713         * ada-lang.c (resolve_subexp): Likewise.
12714         * breakpoint.c (set_breakpoint_condition) Likewise.
12715         (watch_command_1) Likewise.
12716         * c-exp.y (variable): Likewise.
12717         * d-exp.y (PrimaryExpression): Likewise.
12718         * f-exp.y (variable): Likewise.
12719         * go-exp.y (variable): Likewise.
12720         * m2-exp.y (variable): Likewise.
12721         * objfiles.c (objfile::~objfile): Likewise.
12722         * p-exp.y (variable): Likewise.
12723         * parse.c (innermost_block): Change type.
12724         * parser-defs.h (class innermost_block_tracker): New.
12725         (innermost_block): Change to innermost_block_tracker.
12726         * printcmd.c (display_command): Switch to innermost_block API.
12727         (do_one_display): Likewise.
12728         * rust-exp.y (do_one_display): Likewise.
12729         * symfile.c (clear_symtab_users): Likewise.
12730         * varobj.c (varobj_create): Switch to innermost_block API, replace
12731         use of innermost_block with block stored on varobj object.
12732
12733 2018-01-21  Andrew Burgess  <[email protected]>
12734
12735         * expression.h (innermost_block): Remove declaration.
12736         * varobj.c: Add 'parser-defs.h' include.
12737
12738 2018-01-19  Tom Tromey  <[email protected]>
12739
12740         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12741         symbols in the static and global blocks.
12742
12743 2018-01-19  James Clarke  <[email protected]>
12744
12745         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12746         gdb_ptrace.h, and move including gdb_wait.h ...
12747         * nat/linux-ptrace.h: ... to here.
12748
12749 2018-01-19  Simon Marchi  <[email protected]>
12750
12751         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12752         inf_ptrace_detach_success.
12753         (inf_ptrace_detach_success): Add inferior parameter, use it
12754         instead of inferior_ptid, pass it to detach_inferior.
12755         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12756         parameter.
12757         * inferior.c (detach_inferior): Add overload that takes an
12758         inferior object.
12759         * inferior.h (detach_inferior): Likewise.
12760         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12761         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12762         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12763
12764 2018-01-19  Simon Marchi  <[email protected]>
12765
12766         * target.h (struct target_ops) <to_detach>: Add inferior
12767         parameter.
12768         (target_detach): Likewise.
12769         * target.c (dispose_inferior): Pass inferior down.
12770         (target_detach): Pass inferior down.  Assert that it is equal to
12771         the current inferior.
12772         * aix-thread.c (aix_thread_detach): Pass inferior down.
12773         * corefile.c (core_file_command): Pass current_inferior() down.
12774         * corelow.c (core_detach): Add inferior parameter.
12775         * darwin-nat.c (darwin_detach): Likewise.
12776         * gnu-nat.c (gnu_detach): Likewise.
12777         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12778         * infcmd.c (detach_command): Pass current_inferior() down to
12779         target_detach.
12780         * infrun.c (follow_fork_inferior): Pass parent_inf to
12781         target_detach.
12782         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12783         target_detach.
12784         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12785         * linux-thread-db.c (thread_db_detach): Likewise.
12786         * nto-procfs.c (procfs_detach): Likewise.
12787         * procfs.c (procfs_detach): Likewise.
12788         * record.c (record_detach): Likewise.
12789         * record.h (struct inferior): Forward-declare.
12790         (record_detach): Add inferior parameter.
12791         * remote-sim.c (gdbsim_detach): Likewise.
12792         * remote.c (remote_detach_1): Likewise.
12793         (remote_detach): Likewise.
12794         (extended_remote_detach): Likewise.
12795         * sol-thread.c (sol_thread_detach): Likewise.
12796         * target-debug.h (target_debug_print_inferior_p): New macro.
12797         * target-delegates.c: Re-generate.
12798         * top.c (kill_or_detach): Pass inferior down to target_detach.
12799         * windows-nat.c (windows_detach): Add inferior parameter.
12800
12801 2018-01-19  Simon Marchi  <[email protected]>
12802
12803         * target.h (struct target_ops) <to_detach>: Remove args
12804         parameter.
12805         (target_detach): Likewise.
12806         * target.c (dispose_inferior): Adjust.
12807         (target_detach): Remove args parameter, adjust.
12808         * aix-thread.c (aix_thread_detach): Adjust.
12809         * corefile.c (core_file_command): Adjust.
12810         * corelow.c (core_detach): Adjust.
12811         * darwin-nat.c (darwin_detach): Adjust.
12812         * gnu-nat.c (gnu_detach): Adjust.
12813         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12814         * infcmd.c (detach_command): Adjust
12815         * infrun.c (follow_fork_inferior): Adjust.
12816         (handle_vfork_child_exec_or_exit): Adjust.
12817         * linux-fork.c (linux_fork_detach): Remove args parameter.
12818         * linux-fork.h (linux_fork_detach): Likewise.
12819         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12820         * linux-thread-db.c (thread_db_detach): Likewise.
12821         * nto-procfs.c (procfs_detach): Likewise.
12822         * procfs.c (procfs_detach): Likewise.
12823         (do_detach): Remove signo parameter.
12824         * record.c (record_detach): Remove args parameter.
12825         * record.h (record_detach): Likewise.
12826         * remote-sim.c (gdbsim_detach): Likewise.
12827         * remote.c (remote_detach_1): Likewise.
12828         (remote_detach): Likewise.
12829         (extended_remote_detach): Likewise.
12830         * sol-thread.c (sol_thread_detach): Likewise.
12831         * target-delegates.c: Re-generate.
12832         * top.c (struct qt_args) <args>: Remove field.
12833         (kill_or_detach): Don't pass args.
12834         (quit_force): Don't set args.
12835         * windows-nat.c (windows_detach): Remove args parameter.
12836
12837 2018-01-19  Yao Qi  <[email protected]>
12838
12839         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12840         (arm_linux_init_abi): Install it.
12841
12842 2018-01-19  Yao Qi  <[email protected]>
12843
12844         * osabi.c (gdb_osabi_names): Extend the regexp for
12845         arm-linux-gnueabihf.
12846
12847 2018-01-18  Yao Qi  <[email protected]>
12848
12849         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12850         m_abbrevs.
12851         (abbrev_table::add_abbrev): Update.
12852         (abbrev_table::lookup_abbrev): Update.
12853
12854 2018-01-18  Yao Qi  <[email protected]>
12855
12856         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12857
12858 2018-01-17  Sergio Durigan Junior  <[email protected]>
12859
12860         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12861         to "std::string".
12862
12863 2018-01-17  Tom Tromey  <[email protected]>
12864
12865         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12866
12867 2018-01-17  Tom Tromey  <[email protected]>
12868
12869         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12870         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12871         (create_array_type_with_stride): Update.
12872         * dwarf2read.c (set_die_type): Update.
12873
12874 2018-01-17  Tom Tromey  <[email protected]>
12875
12876         * dwarf2read.c (delayed_method_info): Remove typedef.
12877         (dwarf2_cu::method_info): Now a std::vector.
12878         (add_to_method_list): Update.
12879         (free_delayed_list): Remove.
12880         (compute_delayed_physnames): Update.
12881         (process_full_comp_unit, process_full_type_unit): Clear the method
12882         list.  Remove cleanups.
12883         (psymtab_include_file_name): Add name_holder parameter.  Use
12884         unique_xmalloc_ptr.
12885         (dwarf_decode_lines): Update.
12886
12887 2018-01-17  Tom Tromey  <[email protected]>
12888             Simon Marchi  <[email protected]>
12889
12890         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12891         (dwarf2_per_objfile::free_cached_comp_units)
12892         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12893         (init_cutu_and_read_dies_no_follow): Update.
12894         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12895         (dwarf2_cu::~dwarf2_cu): New.
12896         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12897         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12898
12899 2018-01-17  Tom Tromey  <[email protected]>
12900             Simon Marchi  <[email protected]>
12901
12902         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12903         (struct die_reader_specs) <abbrev_table>: New member.
12904         (struct abbrev_table): Add constructor.
12905         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12906         <abbrev_obstack>: Now an auto_obstack.
12907         (abbrev_table_up): New typedef.
12908         (init_cu_die_reader): Add abbrev_table parameter.
12909         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12910         Add result_dwo_abbrev_table.
12911         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12912         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12913         Update.
12914         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12915         parameter.
12916         (skip_children): Update.
12917         (abbrev_table::alloc_abbrev): Rename from
12918         abbrev_table_alloc_abbrev.
12919         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12920         (abbrev_table::lookup_abbrev): Rename from
12921         abbrev_table_lookup_abbrev.
12922         (abbrev_table_read_table): Return abbrev_table_up.
12923         (abbrev_table_free, abbrev_table_free_cleanup)
12924         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12925         (load_partial_dies): Update.
12926
12927 2018-01-17  Tom Tromey  <[email protected]>
12928
12929         * dwarf2read.c (dwarf2_compute_name): Update comment.
12930         (read_func_scope, read_variable): Update.
12931         (new_symbol): Remove.
12932         (new_symbol_full): Rename to new_symbol.
12933
12934 2018-01-17  Mike Gulick  <[email protected]>
12935
12936         PR gdb/16577
12937         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12938         a warning instead of throwing an error, set section size to 0 and return
12939         NULL.
12940         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12941
12942 2018-01-17  Simon Marchi  <[email protected]>
12943
12944         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12945         std::string.
12946         (linux_ptrace_attach_fail_reason_string): Likewise.
12947         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12948         Likewise.
12949         (linux_ptrace_attach_fail_reason_string): Likewise.
12950         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12951
12952 2018-01-17  Simon Marchi  <[email protected]>
12953
12954         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12955
12956 2018-01-17  Eldar Abusalimov  <[email protected]>
12957
12958         PR gdb/21559
12959         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12960         checking for fs_base/gs_base fields in struct user_regs_struct.
12961         * configure: Regenerate.
12962
12963 2018-01-17  Yao Qi  <[email protected]>
12964
12965         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12966         function.
12967         (aarch64_linux_init_abi): Install it to gdbarch hook
12968         gcc_target_options.
12969
12970 2018-01-15  Pedro Alves  <[email protected]>
12971
12972         * common/signals-state-save-restore.c
12973         (save_original_signals_state): Fix typos.
12974
12975 2017-01-12  Tom Tromey  <[email protected]>
12976             Sergio Durigan Junior  <[email protected]>
12977
12978         * Makefile.in (install-only): Install gdb-add-index.
12979
12980 2018-01-12  John Baldwin  <[email protected]>
12981
12982         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12983
12984 2018-01-12  Andreas Arnez  <[email protected]>
12985
12986         * infrun.c (keep_going_pass_signal): Clear step-over info when
12987         insert_breakpoints fails.
12988
12989 2018-01-11  Pedro Alves  <[email protected]>
12990
12991         PR gdb/22583
12992         * infrun.c (resume): Rename to ...
12993         (resume_1): ... this.
12994         (resume): Reimplement as wrapper around resume_1.
12995
12996 2018-01-11  Pedro Alves  <[email protected]>
12997
12998         PR remote/22597
12999         * remote.c (remote_parse_stop_reply): Default to the last-set
13000         general thread instead of to 'magic_null_ptid'.
13001
13002 2018-01-10  Pedro Alves  <[email protected]>
13003
13004         * language.h (language_get_symbol_name_matcher): Rename ...
13005         (get_symbol_name_matcher): ... this.
13006         * language.c (language_get_symbol_name_matcher): Ditto.
13007         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13008         callers adjusted.
13009
13010 2018-01-10  Pedro Alves  <[email protected]>
13011
13012         PR gdb/22670
13013         * dwarf2read.c
13014         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13015         Adjust to use language_get_symbol_name_matcher instead of
13016         language_defn::la_get_symbol_name_matcher.
13017         * language.c (language_get_symbol_name_matcher): If in Ada mode
13018         and the lookup name is a verbatim match, return Ada's matcher.
13019         * language.h (language_get_symbol_name_matcher): Adjust comment.
13020         (ada_lookup_name_info::verbatim_p):: New method.
13021
13022 2018-01-10  Pedro Alves  <[email protected]>
13023
13024         PR gdb/22670
13025         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13026         minsym's language is language_auto or language_cplus, pass down
13027         language_ada instead.
13028         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13029
13030 2018-01-10  Pedro Alves  <[email protected]>
13031
13032         PR gdb/22670
13033         * minsyms.c (linkage_name_str): New function.
13034         (iterate_over_minimal_symbols): Use it.
13035
13036 2018-01-09  John Baldwin  <[email protected]>
13037
13038         * NEWS: Document that 'info proc' now works on FreeBSD.
13039
13040 2018-01-09  John Baldwin  <[email protected]>
13041
13042         * configure.ac: Check for kinfo_getfile in libutil.
13043         * configure: Regenerate.
13044         * config.in: Regenerate.
13045         * fbsd-nat.c: Include "fbsd-tdep.h".
13046         (fbsd_fetch_cmdline): New.
13047         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13048         rather than calling error.
13049         (fbsd_info_proc): New.
13050         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13051         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13052         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13053
13054 2018-01-09  John Baldwin  <[email protected]>
13055
13056         * fbsd-nat.c (struct free_deleter): Remove.
13057         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13058
13059 2018-01-09  John Baldwin  <[email protected]>
13060
13061         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13062         NULL for an empty pathname.
13063
13064 2018-01-09  John Baldwin  <[email protected]>
13065
13066         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13067         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13068         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13069         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13070         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13071         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13072         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13073         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13074         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13075         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13076         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13077         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13078         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13079         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13080         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13081
13082 2018-01-08  Samuel Thibault  <[email protected]>
13083
13084         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13085         (gnu_xfer_auxv): New function.
13086         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13087         TARGET_OBJECT_AUXV.
13088
13089 2018-01-08  Yao Qi  <[email protected]>
13090             Simon Marchi  <[email protected]>
13091
13092         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13093         common/selftest.c.
13094         (COMMON_OBS): Remove selftest.o.
13095         * configure.ac: Append selftest-arch.c and common/selftest.c to
13096         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13097         * configure: Re-generated.
13098         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13099         GDB_SELF_TEST.
13100         (maintenance_info_selftests): Likewise.
13101
13102 2018-01-08  Xavier Roirand  <[email protected]>
13103
13104         * ada-valprint.c (val_print_packed_array_elements): Use
13105         proper number of elements when printing an array indexed
13106         by an enumeration type.
13107
13108 2018-01-07  Simon Marchi  <[email protected]>
13109
13110         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13111         (dw2_get_file_names_reader): Adjust.
13112         (lookup_dwo_signatured_type): Adjust.
13113         (lookup_dwp_signatured_type): Adjust.
13114         (lookup_signatured_type): Adjust.
13115         (create_type_unit_group): Adjust.
13116         (get_type_unit_group): Adjust.
13117         (process_psymtab_comp_unit_reader): Adjust.
13118         (build_type_psymtabs_reader): Adjust.
13119         (scan_partial_symbols): Adjust.
13120         (add_partial_symbol): Adjust.
13121         (add_partial_subprogram): Adjust.
13122         (peek_die_abbrev): Adjust.
13123         (fixup_go_packaging): Adjust.
13124         (process_imported_unit_die): Adjust.
13125         (dwarf2_compute_name): Adjust.
13126         (dwarf2_physname): Adjust.
13127         (read_import_statement): Adjust.
13128         (handle_DW_AT_stmt_list): Adjust.
13129         (read_file_scope): Adjust.
13130         (read_func_scope): Adjust.
13131         (read_lexical_block_scope): Adjust.
13132         (read_call_site_scope): Adjust.
13133         (read_variable): Adjust.
13134         (dwarf2_rnglists_process): Adjust.
13135         (dwarf2_ranges_process): Adjust.
13136         (dwarf2_ranges_read): Adjust.
13137         (dwarf2_get_pc_bounds): Adjust.
13138         (dwarf2_record_block_ranges): Adjust.
13139         (dwarf2_add_field): Adjust.
13140         (dwarf2_add_member_fn): Adjust.
13141         (read_structure_type): Adjust.
13142         (process_structure_scope): Adjust.
13143         (read_enumeration_type): Adjust.
13144         (read_array_type): Adjust.
13145         (mark_common_block_symbol_computed): Adjust.
13146         (read_common_block): Adjust.
13147         (read_namespace_type): Adjust.
13148         (read_namespace): Adjust.
13149         (read_module_type): Adjust.
13150         (read_tag_pointer_type): Adjust.
13151         (read_tag_ptr_to_member_type): Adjust.
13152         (read_tag_string_type): Adjust.
13153         (read_subroutine_type): Adjust.
13154         (read_typedef): Adjust.
13155         (read_base_type): Adjust.
13156         (attr_to_dynamic_prop): Adjust.
13157         (read_subrange_type): Adjust.
13158         (read_unspecified_type): Adjust.
13159         (dwarf2_read_abbrevs): Adjust.
13160         (load_partial_dies): Adjust.
13161         (read_partial_die): Adjust.
13162         (find_partial_die): Adjust.
13163         (guess_partial_die_structure_name): Adjust.
13164         (fixup_partial_die): Adjust.
13165         (read_attribute_value): Adjust.
13166         (read_addr_index): Adjust.
13167         (read_addr_index_from_leb128): Adjust.
13168         (read_str_index): Adjust.
13169         (dwarf2_string_attr): Adjust.
13170         (get_debug_line_section): Adjust.
13171         (dwarf_decode_line_header): Adjust.
13172         (lnp_state_machine::check_line_address): Adjust.
13173         (dwarf_decode_lines_1): Adjust.
13174         (dwarf_decode_lines): Adjust.
13175         (dwarf2_start_symtab): Adjust.
13176         (var_decode_location): Adjust.
13177         (new_symbol_full): Adjust.
13178         (dwarf2_const_value_data): Adjust.
13179         (dwarf2_const_value_attr): Adjust.
13180         (dwarf2_const_value): Adjust.
13181         (die_type): Adjust.
13182         (die_containing_type): Adjust.
13183         (build_error_marker_type): Adjust.
13184         (lookup_die_type): Adjust.
13185         (guess_full_die_structure_name): Adjust.
13186         (anonymous_struct_prefix): Adjust.
13187         (determine_prefix): Adjust.
13188         (dwarf2_name): Adjust.
13189         (follow_die_ref_or_sig): Adjust.
13190         (follow_die_offset): Adjust.
13191         (follow_die_ref): Adjust.
13192         (follow_die_sig_1): Adjust.
13193         (follow_die_sig): Adjust.
13194         (get_signatured_type): Adjust.
13195         (get_DW_AT_signature_type): Adjust.
13196         (decode_locdesc): Adjust.
13197         (dwarf_decode_macros): Adjust.
13198         (cu_debug_loc_section): Adjust.
13199         (fill_in_loclist_baton): Adjust.
13200         (dwarf2_symbol_mark_computed): Adjust.
13201         (init_one_comp_unit): Don't assign
13202         dwarf2_cu::dwarf2_per_objfile.
13203         (set_die_type): Adjust.
13204
13205 2018-01-07  Simon Marchi  <[email protected]>
13206
13207         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13208         <dwarf2_per_objfile>: New field.
13209         (dwarf2_per_objfile): Remove global.
13210         (get_dwarf2_per_objfile): New function.
13211         (set_dwarf2_per_objfile): New function.
13212         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13213         dwarf2_per_objfile.
13214         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13215         (read_abbrev_offset): Likewise.
13216         (read_indirect_string): Likewise.
13217         (read_indirect_line_string): Likewise.
13218         (read_indirect_string_at_offset): Likewise.
13219         (read_indirect_string_from_dwz): Likewise.
13220         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13221         dwarf2_per_objfile.
13222         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13223         (create_all_comp_units): Change objfile parameter to
13224         dwarf2_per_objfile.
13225         (create_all_type_units): Likewise.
13226         (process_queue): Add dwarf2_per_objfile parameter.
13227         (read_and_check_comp_unit_head): Likewise.
13228         (lookup_dwo_unit_in_dwp): Likewise.
13229         (get_dwp_file): Likewise.
13230         (process_cu_includes): Likewise.
13231         (struct free_dwo_file_cleanup_data): New struct.
13232         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13233         set_dwarf2_per_objfile.
13234         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13235         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13236         context, adjust calls.
13237         (dw2_instantiate_symtab): Likewise.
13238         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13239         (dw2_get_cu): Likewise.
13240         (create_cu_from_index_list): Change objfile parameter to
13241         dwarf2_per_objfile.
13242         (create_cus_from_index_list): Get dwarf2_per_objfile from
13243         context, adjust calls.
13244         (create_cus_from_index): Likewise.
13245         (create_signatured_type_table_from_index): Change objfile
13246         parameter to dwarf2_per_objfile.
13247         (create_signatured_type_table_from_debug_names): Change objfile
13248         parameter to dwarf2_per_objfile.
13249         (create_addrmap_from_index): Likewise.
13250         (create_addrmap_from_aranges): Likewise.
13251         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13252         (dw2_setup): Remove.
13253         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13254         context.
13255         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13256         get_dwarf2_per_objfile.
13257         (dw2_forget_cached_source_info): Likewise.
13258         (dw2_map_symtabs_matching_filename): Likewise.
13259         (struct dw2_symtab_iterator) <index>: Remove.
13260         <dwarf2_per_objfile>: New field.
13261         (dw2_symtab_iter_init): Replace index parameter with
13262         dwarf2_per_objfile.
13263         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13264         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13265         (dw2_print_stats): Likewise.
13266         (dw2_dump): Likewise.
13267         (dw2_expand_symtabs_for_function): Likewise.
13268         (dw2_expand_all_symtabs): Likewise.
13269         (dw2_expand_symtabs_with_fullname): Likewise.
13270         (dw2_expand_marked_cus): Replace index and objfile parameters
13271         with dwarf2_per_objfile.
13272         (dw_expand_symtabs_matching_file_matcher): Add
13273         dwarf2_per_objfile parameter and adjust calls.
13274         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13275         adjust calls.
13276         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13277         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13278         adjust calls.
13279         (create_cus_from_debug_names_list): Replace objfile parameter
13280         with dwarf2_per_objfile and adjust calls.
13281         (create_cus_from_debug_names): Likewise.
13282         (dwarf2_read_debug_names): Likewise.
13283         (mapped_debug_names::namei_to_name): Adjust call.
13284         (dw2_debug_names_iterator::next): Likewise.
13285         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13286         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13287         (dw2_debug_names_dump): Likewise.
13288         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13289         (dw2_debug_names_expand_symtabs_matching): Likewise.
13290         (dwarf2_initialize_objfile): Likewise.
13291         (dwarf2_build_psymtabs): Likewise.
13292         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13293         this_cu.
13294         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13295         (read_and_check_comp_unit_head): Likewise.
13296         (read_abbrev_offset): Likewise.
13297         (create_debug_type_hash_table): Likewise.
13298         (create_debug_types_hash_table): Likewise.
13299         (create_all_type_units): Replace objfile parameter with
13300         dwarf2_per_objfile.
13301         (add_type_unit): Add dwarf2_per_objfile parameter.
13302         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13303         with dwarf2_per_objfile.
13304         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13305         (lookup_dwp_signatured_type): Likewise.
13306         (lookup_signatured_type): Likewise.
13307         (read_cutu_die_from_dwo): Likewise.
13308         (init_tu_and_read_dwo_dies): Likewise.
13309         (init_cutu_and_read_dies): Likewise.
13310         (init_cutu_and_read_dies_no_follow): Likewise.
13311         (allocate_type_unit_groups_table): Add objfile parameter.
13312         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13313         (get_type_unit_group): Likewise.
13314         (process_psymtab_comp_unit): Update call.
13315         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13316         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13317         (print_tu_stats): Likewise.
13318         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13319         in void* parameter.
13320         (build_type_psymtabs): Change objfile parameter to
13321         dwarf2_per_objfile.
13322         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13323         passed in void* parameter.
13324         (process_skeletonless_type_units): Change objfile parameter to
13325         dwarf2_per_objfile.
13326         (set_partial_user): Likewise.
13327         (dwarf2_build_psymtabs_hard): Likewise.
13328         (read_comp_units_from_section): Likewise.
13329         (create_all_comp_units): Likewise.
13330         (scan_partial_symbols): Update calls.
13331         (add_partial_symbol): Likewise.
13332         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13333         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13334         (process_queue): Add dwarf2_per_objfile parameter.
13335         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13336         (compute_compunit_symtab_includes): Likewise.
13337         (process_cu_includes): Add dwarf2_per_objfile parameter.
13338         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13339         (process_full_type_unit): Likewise.
13340         (process_imported_unit_die): Update call.
13341         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13342         (read_file_scope): Likewise.
13343         (allocate_dwo_file_hash_table): Add objfile parameter.
13344         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13345         (create_cus_hash_table): Likewise.
13346         (create_dwp_hash_table): Likewise.
13347         (create_dwo_unit_in_dwp_v1): Likewise.
13348         (create_dwp_v2_section): Likewise.
13349         (create_dwo_unit_in_dwp_v2): Likewise.
13350         (lookup_dwo_unit_in_dwp): Likewise.
13351         (try_open_dwop_file): Likewise.
13352         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13353         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13354         cleanup to include a reference to dwarf2_per_objfile.
13355         (open_dwp_file): Add dwarf2_per_objfile parameter.
13356         (open_and_init_dwp_file): Likewise.
13357         (get_dwp_file): Likewise.
13358         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13359         (queue_and_load_all_dwo_tus): Update call.
13360         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13361         data.
13362         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13363         (dwarf2_ranges_process): Likewise.
13364         (dwarf2_get_pc_bounds): Likewise.
13365         (mark_common_block_symbol_computed): Likewise.
13366         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13367         (dwarf2_read_abbrevs): Update call.
13368         (read_partial_die): Use dwarf2_per_objfile from cu.
13369         (find_partial_die): Likewise.
13370         (fixup_partial_die): Likewise.
13371         (read_attribute_value): Likewise.
13372         (read_indirect_string_at_offset_from): Add objfile parameter.
13373         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13374         parameter.
13375         (read_indirect_string_from_dwz): Add objfile parameter.
13376         (read_indirect_string): Add objfile parameter.
13377         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13378         (read_addr_index): Use dwarf2_per_objfile from cu.
13379         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13380         call dw2_setup.
13381         (read_str_index): Use dwarf2_per_objfile from cu.
13382         (get_debug_line_section): Likewise.
13383         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13384         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13385         (new_symbol_full): Use dwarf2_per_objfile from cu.
13386         (build_error_marker_type): Likewise.
13387         (lookup_die_type): Likewise.
13388         (determine_prefix): Likewise.
13389         (follow_die_offset): Likewise.
13390         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13391         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13392         (dwarf2_fetch_die_type_sect_off): Likewise.
13393         (dwarf2_get_die_type): Likewise.
13394         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13395         (get_signatured_type): Likewise.
13396         (get_DW_AT_signature_type): Likewise.
13397         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13398         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13399         (cu_debug_loc_section): Likewise.
13400         (fill_in_loclist_baton): Likewise.
13401         (dwarf2_symbol_mark_computed): Likewise.
13402         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13403         dwarf2_per_objfile.
13404         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13405         parameter.
13406         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13407         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13408         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13409         (set_die_type): Use dwarf2_free_objfile from cu.
13410         (get_die_type_at_offset): Likewise.
13411         (dwarf2_per_objfile_free): Don't assign global variable.
13412         (debug_names) <constructor>: Add dwarf2_per_objfile
13413         parameter, update m_debugstrlookup construction.
13414         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13415         parameter.
13416         <m_dwarf2_per_objfile>: New field.
13417         <lookup>: Use m_dwarf2_per_objfile.
13418         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13419         (psyms_seen_size): Likewise.
13420         (write_gdbindex): Replace objfile parameter with
13421         dwarf2_per_objfile.
13422         (write_debug_names): Likewise.
13423         (write_psymtabs_to_index): Likewise.
13424         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13425         calls.
13426
13427 2018-01-07  Simon Marchi  <[email protected]>
13428
13429         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13430         <dwarf2_per_objfile>: New field.
13431         (struct dwarf2_per_cu_data) <objfile>: Remove.
13432         <dwarf2_per_objfile>: New field.
13433         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13434         of objfile.
13435         (create_signatured_type_table_from_index): Likewise.
13436         (create_debug_type_hash_table): Likewise.
13437         (fill_in_sig_entry_from_dwo_entry): Likewise.
13438         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13439         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13440         objfile.
13441         (create_partial_symtab): Access objfile through
13442         dwarf2_per_objfile.
13443         (process_psymtab_comp_unit_reader): Likewise.
13444         (read_comp_units_from_section): Likewise.
13445         (scan_partial_symbols): Likewise.
13446         (add_partial_symbol): Likewise.
13447         (add_partial_subprogram): Likewise.
13448         (peek_die_abbrev): Likewise.
13449         (fixup_go_packaging): Likewise.
13450         (process_full_comp_unit): Likewise.
13451         (process_full_type_unit): Likewise.
13452         (process_imported_unit_die): Likewise.
13453         (dwarf2_compute_name): Likewise.
13454         (dwarf2_physname): Likewise.
13455         (read_import_statement): Likewise.
13456         (create_cus_hash_table): Assign dwarf2_physname instead of
13457         objfile.
13458         (read_func_scope): Access objfile through dwarf2_per_objfile.
13459         (read_lexical_block_scope): Likewise.
13460         (read_call_site_scope): Likewise.
13461         (read_variable): Likewise.
13462         (dwarf2_rnglists_process): Likewise.
13463         (dwarf2_ranges_process): Likewise.
13464         (dwarf2_ranges_read): Likewise.
13465         (dwarf2_record_block_ranges): Likewise.
13466         (dwarf2_add_field): Likewise.
13467         (dwarf2_add_member_fn): Likewise.
13468         (read_structure_type): Likewise.
13469         (process_structure_scope): Likewise.
13470         (read_enumeration_type): Likewise.
13471         (read_array_type): Likewise.
13472         (read_common_block): Likewise.
13473         (read_namespace_type): Likewise.
13474         (read_namespace): Likewise.
13475         (read_module_type): Likewise.
13476         (read_tag_pointer_type): Likewise.
13477         (read_tag_ptr_to_member_type): Likewise.
13478         (read_tag_string_type): Likewise.
13479         (read_subroutine_type): Likewise.
13480         (read_typedef): Likewise.
13481         (read_base_type): Likewise.
13482         (attr_to_dynamic_prop): Likewise.
13483         (read_subrange_type): Likewise.
13484         (read_unspecified_type): Likewise.
13485         (load_partial_dies): Likewise.
13486         (read_partial_die): Likewise.
13487         (find_partial_die): Likewise.
13488         (guess_partial_die_structure_name): Likewise.
13489         (fixup_partial_die): Likewise.
13490         (read_attribute_value): Likewise.
13491         (read_addr_index_from_leb128): Likewise.
13492         (dwarf2_read_addr_index): Likewise.
13493         (dwarf2_string_attr): Likewise.
13494         (lnp_state_machine::check_line_address): Likewise.
13495         (dwarf_decode_lines_1): Likewise.
13496         (dwarf_decode_lines): Likewise.
13497         (dwarf2_start_symtab): Likewise.
13498         (var_decode_location): Likewise.
13499         (new_symbol_full): Likewise.
13500         (dwarf2_const_value_data): Likewise.
13501         (dwarf2_const_value_attr): Likewise.
13502         (dwarf2_const_value): Likewise.
13503         (die_type): Likewise.
13504         (die_containing_type): Likewise.
13505         (lookup_die_type): Likewise.
13506         (guess_full_die_structure_name): Likewise.
13507         (anonymous_struct_prefix): Likewise.
13508         (dwarf2_name): Likewise.
13509         (follow_die_ref_or_sig): Likewise.
13510         (follow_die_offset): Likewise.
13511         (follow_die_ref): Likewise.
13512         (dwarf2_fetch_die_loc_sect_off): Likewise.
13513         (dwarf2_fetch_constant_bytes): Likewise.
13514         (dwarf2_fetch_die_type_sect_off): Likewise.
13515         (dwarf2_get_die_type): Likewise.
13516         (follow_die_sig): Likewise.
13517         (decode_locdesc): Likewise.
13518         (dwarf2_per_cu_objfile): Likewise.
13519         (dwarf2_per_cu_text_offset): Likewise.
13520         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13521         objfile.
13522         (set_die_type): Access objfile through
13523         dwarf2_per_objfile.
13524
13525 2018-01-07  Simon Marchi  <[email protected]>
13526
13527         * valprint.c (converted_character_d): Remove typedef.
13528         (DEF_VEC_O (converted_character_d)): Remove.
13529         (count_next_character): Use std::vector.
13530         (print_converted_chars_to_obstack): Likewise.
13531         (generic_printstr): Likewise.
13532
13533 2018-01-07  Simon Marchi  <[email protected]>
13534
13535         * xml-support.h (struct gdb_xml_value): Add constructor.
13536         <value>: Change type to unique_xmalloc_ptr.
13537         (gdb_xml_value_s): Remove typedef.
13538         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13539         (gdb_xml_element_start_handler): Change parameter type to
13540         std::vector.
13541         (xml_find_attribute): Likewise.
13542         * xml-support.c (xml_find_attribute): Change parameter type to
13543         std::vector and adjust.
13544         (gdb_xml_values_cleanup): Remove.
13545         (gdb_xml_parser::start_element): Adjust to std::vector.
13546         (xinclude_start_include): Change paraeter type to std::vector
13547         and adjust.
13548         * btrace.c (check_xml_btrace_version): Likewise.
13549         (parse_xml_btrace_block): Likewise.
13550         (parse_xml_btrace_pt_config_cpu): Likewise.
13551         (parse_xml_btrace_pt): Likewise.
13552         (parse_xml_btrace_conf_bts): Likewise.
13553         (parse_xml_btrace_conf_pt): Likewise.
13554         * memory-map.c (memory_map_start_memory): Likewise.
13555         (memory_map_start_property): Likewise.
13556         * osdata.c (osdata_start_osdata): Likewise.
13557         (osdata_start_item): Likewise.
13558         (osdata_start_column): Likewise.
13559         * remote.c (start_thread): Likewise.
13560         * solib-aix.c (library_list_start_library): Likewise.
13561         (library_list_start_list): Likewise.
13562         * solib-svr4.c (library_list_start_library): Likewise.
13563         (svr4_library_list_start_list): Likewise.
13564         * solib-target.c (library_list_start_segment): Likewise.
13565         (library_list_start_section): Likewise.
13566         (library_list_start_library): Likewise.
13567         (library_list_start_list): Likewise.
13568         * tracepoint.c (traceframe_info_start_memory): Likewise.
13569         (traceframe_info_start_tvar): Likewise.
13570         * xml-syscall.c (syscall_start_syscall): Likewise.
13571         * xml-tdesc.c (tdesc_start_target): Likewise.
13572         (tdesc_start_feature): Likewise.
13573         (tdesc_start_reg): Likewise.
13574         (tdesc_start_union): Likewise.
13575         (tdesc_start_struct): Likewise.
13576         (tdesc_start_flags): Likewise.
13577         (tdesc_start_enum): Likewise.
13578         (tdesc_start_field): Likewise.
13579         (tdesc_start_enum_value): Likewise.
13580         (tdesc_start_vector): Likewise.
13581
13582 2018-01-07  Simon Marchi  <[email protected]>
13583
13584         * extension.h (struct xmethod_worker) <clone>: Remove.
13585         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13586         Remove.
13587         (python_xmethod_worker::clone): Remove.
13588         * valops.c (find_overload_match): Use std::move instead of
13589         clone.
13590
13591 2018-01-07  Simon Marchi  <[email protected]>
13592
13593         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13594         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13595         <free_xmethod_worker_data>: Remove.
13596         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13597         <get_xmethod_arg_types>: Remove.
13598         <get_xmethod_result_type>: Remove.
13599         <invoke_xmethod>: Remove.
13600         * extension.c (new_xmethod_worker): Remove.
13601         (clone_xmethod_worker): Remove.
13602         (get_matching_xmethod_workers): Return void, pass std::vector by
13603         pointer.
13604         (get_xmethod_arg_types): Rename to...
13605         (xmethod_worker::get_arg_types): ... this, and adjust.
13606         (get_xmethod_result_type): Rename to...
13607         (xmethod_worker::get_result_type): ... this, and adjust.
13608         (invoke_xmethod): Remove.
13609         (free_xmethod_worker): Remove.
13610         (free_xmethod_worker_vec): Remove.
13611         * extension.h (enum ext_lang_rc): Move here from
13612         extension-priv.h.
13613         (struct xmethod_worker): Add constructor and destructor.
13614         <data>: Remove.
13615         <value>: Remove.
13616         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13617         virtual pure methods.
13618         <get_arg_types, get_result_type>: New methods.
13619         (xmethod_worker_ptr): Remove typedef.
13620         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13621         (xmethod_worker_vec): Remove typedef.
13622         (xmethod_worker_up): New typedef.
13623         (invoke_xmethod): Remove.
13624         (clone_xmethod_worker): Remove.
13625         (free_xmethod_worker): Remove.
13626         (free_xmethod_worker_vec): Remove.
13627         (get_xmethod_arg_types): Remove.
13628         (get_xmethod_result_type): Remove.
13629         * valops.c (find_method_list): Use std::vector, don't use
13630         intermediate vector.
13631         (value_find_oload_method_list): Use std::vector.
13632         (find_overload_match): Use std::vector.
13633         (find_oload_champ): Use std::vector.
13634         * value.c (value_free): Use operator delete.
13635         (value_of_xmethod): Rename to...
13636         (value_from_xmethod): ... this.  Don't assign
13637         xmethod_worker::value, take rvalue-reference.
13638         (result_type_of_xmethod): Adjust.
13639         (call_xmethod): Adjust.
13640         * value.h: Include extension.h.
13641         (struct xmethod_worker): Don't forward-declare.
13642         (value_of_xmethod): Rename to...
13643         (value_from_xmethod): ... this, take rvalue-reference.
13644         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13645         (struct python_xmethod_worker): ... this, add constructor and
13646         destructor.
13647         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13648         (gdbpy_free_xmethod_worker_data): Rename to...
13649         (python_xmethod_worker::~python_xmethod_worker): ... this and
13650         adjust.
13651         (gdbpy_clone_xmethod_worker_data): Rename to...
13652         (python_xmethod_worker::clone): ... this and adjust.
13653         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13654         temporary vector.
13655         (gdbpy_get_xmethod_arg_types): Rename to...
13656         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13657         (gdbpy_get_xmethod_result_type): Rename to...
13658         (python_xmethod_worker::do_get_result_type): ... this and
13659         adjust.
13660         (gdbpy_invoke_xmethod): Rename to...
13661         (python_xmethod_worker::invoke): ... this and adjust.
13662         (new_python_xmethod_worker): Rename to...
13663         (python_xmethod_worker::python_xmethod_worker): ... this and
13664         adjust.
13665         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13666         Remove.
13667         (gdbpy_free_xmethod_worker_data): Remove.
13668         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13669         (gdbpy_get_xmethod_arg_types): Remove.
13670         (gdbpy_get_xmethod_result_type): Remove.
13671         (gdbpy_invoke_xmethod): Remove.
13672         * python/python.c (python_extension_ops): Remove obsolete
13673         callbacks.
13674
13675 2018-01-05  Pedro Alves  <[email protected]>
13676
13677         PR gdb/18653
13678         * common/signals-state-save-restore.c
13679         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13680         find a custom handler preinstalled, instead of internal erroring.
13681         But only warn if !quiet.
13682         * common/signals-state-save-restore.h
13683         (save_original_signals_state): New parameter 'quiet'.
13684         * main.c (captured_main_1): Move save_original_signals_state call
13685         after option handling, and pass QUIET.
13686
13687 2018-01-05  Pedro Alves  <[email protected]>
13688
13689         * spu-tdep.c (spu_catch_start): Pass
13690         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13691
13692 2018-01-05  Pedro Alves  <[email protected]>
13693
13694         PR gdb/22670
13695         * ada-lang.c (literal_symbol_name_matcher): New function.
13696         (ada_get_symbol_name_matcher): Use it for
13697         symbol_name_match_type::SEARCH_NAME.
13698         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13699         it down instead of assuming symbol_name_match_type::FULL.
13700         * block.h (block_lookup_symbol): New parameter 'match_type'.
13701         * c-valprint.c (print_unpacked_pointer): Use
13702         lookup_symbol_search_name instead of lookup_symbol.
13703         * compile/compile-object-load.c (get_out_value_type): Pass down
13704         symbol_name_match_type::SEARCH_NAME.
13705         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13706         symbol_name_match_type::FULL.
13707         * cp-support.c (cp_get_symbol_name_matcher): Handle
13708         symbol_name_match_type::SEARCH_NAME.
13709         * infrun.c (insert_exception_resume_breakpoint): Use
13710         lookup_symbol_search_name.
13711         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13712         * psymtab.c (maintenance_check_psymtabs): Use
13713         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13714         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13715         SYMBOL_SEARCH_NAME.
13716         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13717         if symbol_name_match_type::SEARCH_NAME.
13718         (lookup_symbol_in_language): Pass down
13719         symbol_name_match_type::FULL.
13720         (lookup_symbol_search_name): New.
13721         (lookup_language_this): Pass down
13722         symbol_name_match_type::SEARCH_NAME.
13723         (lookup_symbol_aux, lookup_local_symbol): New parameter
13724         'match_type'.  Pass it down.
13725         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13726         (lookup_symbol_search_name): New declaration.
13727         (lookup_symbol_in_block): New 'match_type' parameter.
13728
13729 2018-01-05  Pedro Alves  <[email protected]>
13730
13731         PR gdb/22670
13732         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13733         ada_lookup_symbol.
13734         (ada_lookup_symbol): Reimplement in terms of
13735         ada_lookup_symbol_list, bits factored out from
13736         ada_lookup_encoded_symbol.
13737
13738 2018-01-05  Joel Brobecker  <[email protected]>
13739
13740         * ada-exp.y (write_object_renaming): When subscripting an array
13741         using a symbol as the index, pass the block in call to
13742         ada_lookup_encoded_symbol when looking that symbol up.
13743
13744 2018-01-05  Jerome Guitton  <[email protected]>
13745
13746         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13747         TYPE_INDEX_TYPE.
13748
13749 2018-01-05  Joel Brobecker  <[email protected]>
13750
13751         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13752         the case where VALUE_LVAL (val0) is not lval_memory.
13753
13754 2018-01-05  Xavier Roirand  <[email protected]>
13755
13756         * ada-valprint.c (print_optional_low_bound): Handle
13757         character-indexed array printing like boolean-indexed array
13758         printing.
13759
13760 2018-01-05  Joel Brobecker  <[email protected]>
13761
13762         * NEWS: Create a new section for the next release branch.
13763         Rename the section of the current branch, now that it has
13764         been cut.
13765
13766 2018-01-05  Joel Brobecker  <[email protected]>
13767
13768         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13769         * version.in: Bump version to 8.1.50.DATE-git.
13770
13771 2018-01-03  Xavier Roirand  <[email protected]>
13772
13773         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13774         Add field.
13775         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13776         Add field.
13777         (default_exception_support_info) <catch_handlers_sym>: Add field.
13778         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13779         (ada_exception_name_addr_1): Add "catch handlers" handling.
13780         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13781         Update all callers.
13782         (create_excep_cond_exprs) <ex>: Add parameter.
13783         (re_set_exception): Update create_excep_cond_exprs call.
13784         (print_it_exception, print_one_exception, print_mention_exception)
13785         (print_recreate_exception): Add "catch handler" handling.
13786         (allocate_location_catch_handlers, re_set_catch_handlers)
13787         (check_status_catch_handlers, print_it_catch_handlers)
13788         (print_one_catch_handlers, print_mention_catch_handlers)
13789         (print_recreate_catch_handlers): New function.
13790         (catch_handlers_breakpoint_ops): New variable.
13791         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13792         Add parameter.  Add "catch handler" handling.
13793         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13794         Add "catch handler" handling.
13795         (ada_exception_catchpoint_cond_string): Add "catch handler"
13796         handling.
13797         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13798         call.
13799         (catch_ada_handlers_command): New function.
13800         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13801         operations structure.
13802         (_initialize_ada_language): Add "catch handlers" command entry.
13803         * NEWS: Document "catch handlers" feature.
13804
13805 2018-01-02  Joel Brobecker  <[email protected]>
13806
13807         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13808         account when creating the array type of the slice.
13809         (ada_value_slice): Likewise.
13810
13811 2018-01-02  Joel Brobecker  <[email protected]>
13812
13813         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13814         New enum value.
13815         (create_array_type_with_stride): Add byte_stride_prop parameter.
13816         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13817         New parameter.  Update all callers in this file.
13818         (array_type_has_dynamic_stride): New function.
13819         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13820         of arrays with dynamic byte strides.
13821         * dwarf2read.c (read_array_type): Add support for dynamic
13822         DW_AT_byte_stride attributes.
13823
13824 2018-01-02  Joel Brobecker  <[email protected]>
13825
13826         * dwarf2read.c (read_unspecified_type): Treat
13827         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13828
13829 2018-01-01  Joel Brobecker  <[email protected]>
13830
13831         Update copyright year range in all GDB files.
13832
13833 2018-01-01  Joel Brobecker  <[email protected]>
13834
13835         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13836         and gdb/testsuite/gdb.base/step-line.c.
13837
13838 2018-01-01  Joel Brobecker  <[email protected]>
13839
13840         * copyright.py (main): Dump the contents of
13841         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13842         even if BY_HAND is empty.
13843
13844 2018-01-01  Joel Brobecker  <[email protected]>
13845
13846         * top.c (print_gdb_version): Update Copyright year in version
13847         message.
13848
13849 2018-01-01  Joel Brobecker  <[email protected]>
13850
13851         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13852
13853 For older changes see ChangeLog-2017.
13854 \f
13855 Local Variables:
13856 mode: change-log
13857 left-margin: 8
13858 fill-column: 74
13859 version-control: never
13860 coding: utf-8
13861 End:
This page took 0.839636 seconds and 4 git commands to generate.