Use new and delete for struct infcall_control_state
[external/binutils.git] / gdb / ChangeLog
1 2018-09-17  Tom Tromey  <tom@tromey.com>
2
3         * gdbthread.h (struct thread_control_state): Add initializer.
4         (class thread_info) <control>: Remove initializer.
5         * inferior.h (struct inferior_control_state): Add initializer.
6         (class inferior) <control>: Remove initializer.
7         (exit_inferior_1): Update.
8         * infrun.c (struct infcall_control_state): Add constructors.
9         (save_infcall_control_state): Use new.
10         (restore_infcall_control_state, discard_infcall_control_state):
11         Use delete.
12
13 2018-09-17  Tom Tromey  <tom@tromey.com>
14
15         * infrun.c (struct infcall_suspend_state) <registers>: Now a
16         unique_ptr.
17         <siginfo_data>: Now a unique_xmalloc_ptr.
18         (save_infcall_suspend_state, restore_infcall_suspend_state)
19         (discard_infcall_suspend_state)
20         (get_infcall_suspend_state_regcache): Update.
21
22 2018-09-17  Tom Tromey  <tom@tromey.com>
23
24         * gdbthread.h (struct thread_suspend_state): Add initializers.
25         (class thread_info) <suspend>: Remove initializer.
26         * infrun.c (struct infcall_suspend_state): Add initializers.
27         (save_infcall_suspend_state): Use new.
28         (discard_infcall_suspend_state): Use delete.
29
30 2018-09-16  Tom Tromey  <tom@tromey.com>
31
32         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
33         Remove.
34         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
35         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
36         (py_varobj_iter_new): Likewise.
37         (py_varobj_get_iterator): Use gdbpy_ref.
38
39 2018-09-16  Tom Tromey  <tom@tromey.com>
40
41         * python/py-threadevent.c (py_get_event_thread): Simplify.
42         * python/py-inferior.c (infpy_thread_from_thread_handle):
43         Return immediately after calling thread_to_thread_object.  Use
44         Py_RETURN_NONE.
45         (thread_to_thread_object): Set the exception on a NULL return.
46
47 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
48
49         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
50
51 2018-09-16  Tom Tromey  <tom@tromey.com>
52
53         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
54         Remove.
55
56 2018-09-16  Tom Tromey  <tom@tromey.com>
57
58         * python/python-internal.h (thread_to_thread_object): Change
59         return type.
60         * python/py-inferior.c (thread_to_thread_object): Return a new
61         reference.
62         (infpy_thread_from_thread_handle): Update.
63         * python/py-infthread.c (gdbpy_selected_thread): Update.
64         * python/py-stopevent.c (create_stop_event_object): Update.
65         * python/py-threadevent.c (py_get_event_thread): Return a new
66         reference.
67         (py_get_event_thread): Update.
68         * python/py-event.h (py_get_event_thread): Change return type.
69         * python/py-continueevent.c (create_continue_event_object):
70         Update.
71
72 2018-09-16  Tom Tromey  <tom@tromey.com>
73
74         * python/py-progspace.c (pspy_get_objfiles): Update.
75         * python/python-internal.h (objfile_to_objfile_object): Change
76         return type.
77         * python/py-newobjfileevent.c (create_new_objfile_event_object):
78         Update.
79         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
80         Update.
81         * python/python.c (gdbpy_get_current_objfile): Update.
82         (gdbpy_objfiles): Update.
83         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
84         Update.
85         (objfile_to_objfile_object): Return a new reference.
86         * python/py-symtab.c (stpy_get_objfile): Update.
87         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
88         Update.
89
90 2018-09-16  Tom Tromey  <tom@tromey.com>
91
92         * python/py-inferior.c (infpy_get_progspace): Update.
93         * python/python-internal.h (pspace_to_pspace_object): Change
94         return type.
95         * python/py-newobjfileevent.c
96         (create_clear_objfiles_event_object): Update.
97         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
98         Update.
99         * python/python.c (gdbpy_get_current_progspace): Update.
100         (gdbpy_progspaces): Update.
101         * python/py-progspace.c (pspace_to_pspace_object): Return a new
102         reference.
103         * python/py-objfile.c (objfpy_get_progspace): Update.
104         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
105         Update.
106
107 2018-09-16  Tom Tromey  <tom@tromey.com>
108
109         * python/lib/gdb/__init__.py (current_progspace, objfiles)
110         (solib_name, block_for_pc, find_pc_line): New functions.
111         (execute_unwinders): Update.
112         * python/py-block.c (gdbpy_block_for_pc): Remove.
113         * python/py-inferior.c (infpy_get_progspace): New function.
114         (inferior_object_getset) <progspace>: Add.
115         * python/py-progspace.c (pspy_objfiles): Rewrite.
116         (pspy_solib_name, pspy_block_for_pc)
117         (pspy_find_pc_line, pspy_is_valid): New functions.
118         (progspace_object_methods): Add entries for solib_name,
119         block_for_pc, find_pc_line, is_valid.
120         * python/python-internal.h (gdbpy_block_for_pc)
121         (build_objfiles_list): Don't declare.
122         * python/python.c: Don't include solib.h.
123         (gdbpy_solib_name, gdbpy_find_pc_line)
124         (gdbpy_get_current_progspace, build_objfiles_list)
125         (gdbpy_objfiles): Remove.
126         (GdbMethods) <current_progspace, objfiles, block_for_pc,
127         solib_name, find_pc_line>: Remove entries.
128
129 2018-09-16  Tom Tromey  <tom@tromey.com>
130
131         * top.c (new_ui_command): Use GNU style for metasyntactic
132         variables.
133         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
134         variables.
135         * maint.c (maintenance_translate_address): Remove "<>" around
136         text.
137         * interps.c (interpreter_exec_cmd): Use GNU style for
138         metasyntactic variables.
139         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
140         metasyntactic variables.
141         * tracepoint.c (tfind_range_command): Use GNU style for
142         metasyntactic variables.
143         (tfind_outside_command): Likewise.
144         (_initialize_tracepoint): Likewise.
145         * remote.c (extended_remote_target::create_inferior): Use GNU
146         style for metasyntactic variables.
147         * sparc64-tdep.c (adi_examine_command): Use GNU style for
148         metasyntactic variables.
149         (adi_assign_command): Likewise.
150
151 2018-09-16  Tom Tromey  <tom@tromey.com>
152
153         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
154         metasyntactic variables.  Print message if no disassembler options
155         are available.
156
157 2018-09-15  Tom Tromey  <tom@tromey.com>
158
159         * infcmd.c (get_inferior_args): Return const char *.
160         * inferior.h (get_inferior_args): Return type now const.
161         * linux-tdep.c (linux_fill_prpsinfo): Update.
162         * procfs.c (procfs_target::make_corefile_notes): Update.
163
164 2018-09-07  Tom Tromey  <tom@tromey.com>
165
166         * python/python.c (execute_gdb_command): Call bpstat_do_actions
167         inside the TRY.
168
169 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
170
171         * nios2-tdep.c (nios2_type_align): New.
172         (nios2_gdb_arch_init): Install type_align hook.
173
174 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
175
176         * eval.c (fake_method::fake_method): Call xzalloc directly for a
177         type that is neither object file owned, nor gdbarch owned.
178         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
179         gdbarch is non-NULL.
180         (alloc_type_instance): Allocate non-objfile owned types on the
181         gdbarch obstack.
182         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
183         using TYPE_ALLOC to ensure memory is allocated on the correct
184         obstack.
185         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
186         obstack, or the gdbarch obstack.
187         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
188
189 2018-09-14  Tom Tromey  <tom@tromey.com>
190
191         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
192         block.
193
194 2018-09-14  Tom Tromey  <tom@tromey.com>
195
196         * nat/fork-inferior.c (get_startup_shell): Remove "static".
197
198 2018-09-13  Tom Tromey  <tom@tromey.com>
199
200         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
201         static.
202
203 2018-09-13  Tom Tromey  <tom@tromey.com>
204
205         * exec.c (try_open_exec_file): Use std::string.
206
207 2018-09-13  Tom Tromey  <tom@tromey.com>
208
209         * utils.h (gdb_bfd_errmsg): Return std::string.
210         * exec.c (exec_file_attach): Update.
211         * compile/compile-object-load.c (compile_object_load): Update.
212         * utils.c (gdb_bfd_errmsg): Return std::string.
213
214 2018-09-13  Tom Tromey  <tom@tromey.com>
215
216         * procfs.c (struct procinfo_deleter): New.
217         (procinfo_up): New typedef.
218         (do_destroy_procinfo_cleanup): Remove.
219         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
220
221 2018-09-13  Tom Tromey  <tom@tromey.com>
222
223         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
224
225 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
226 2018-09-13  Tom Tromey  <tom@tromey.com>
227
228         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
229         (pspy_get_objfiles): New function.
230         (progspace_object_methods): New.
231         (pspace_object_type): Add tp_methods callback.
232         * python/python-internal.h (build_objfiles_list): New
233         declaration.
234         * python/python.c (build_objfiles_list): New function.
235         (gdbpy_objfiles): Implement using build_objfiles_list.
236         * NEWS: Mention the Progspace.objfiles method.
237
238 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
239
240         * python/py-inferior.c (infpy_get_progspace): New function.
241         (inferior_object_getset): Add progspace property.
242         * NEWS: Mention the new property.
243
244 2018-09-13  Tom Tromey  <tom@tromey.com>
245
246         PR rust/23650:
247         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
248
249 2018-09-13  Tom Tromey  <tom@tromey.com>
250
251         PR rust/23626:
252         * rust-lang.c (rust_enum_variant): Now static.
253         (rust_empty_enum_p): New function.
254         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
255         Handle empty enum.
256
257 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
258
259         * python/py-inferior.c (infpy_repr): New.
260         (inferior_object_type): Register infpy_repr.
261         * python/py-objfile.c (objfpy_repr): New.
262         (objfile_object_type): Register objfpy_repr.
263
264 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
265
266         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
267
268 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
269
270         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
271         typo.
272
273 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
274
275         * common/common-utils.c: Don't include '<sys/stat.h>'.
276         (is_regular_file): Move to...
277         * common/filestuff.c (is_regular_file): ... here.
278         * common/common-utils.h (is_regular_file): Move to...
279         * common/filestuff.h (is_regular_file): ... here.
280
281 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
282
283         * skip.c (debug_skip): New variable.
284         (skiplist_entry::do_skip_file_p): Add debug output.
285         (skiplist_entry::do_skip_gfile_p): Likewise.
286         (skiplist_entry::skip_function_p): Likewise.
287         (_initialize_step_skip): Create debug command.
288         * NEWS: Mention set/show debug skip.
289
290 2018-09-11  Xavier Roirand  <roirand@adacore.com>
291
292         * darwin-nat.c (should_disable_startup_with_shell):
293         New function.
294         (darwin_nat_target::create_inferior): Add call.
295
296 2018-09-11  Xavier Roirand  <roirand@adacore.com>
297
298         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
299         inf_port, msg_state>: Initialize.
300         (struct darwin_thread_info) <signaled, single_step>: Change
301         type and initialize.
302         (struct darwin_thread_info) <event>: Initialize.
303
304 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
305
306         PR gdb/23555
307         PR gdb/23558
308         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
309         guesses.
310
311 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
312
313         Revert:
314         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
315
316         PR gdb/23555
317         PR gdb/23558
318         * gnulib/aclocal.m4: Regenerate.
319         * gnulib/config.in: Regenerate.
320         * gnulib/configure: Regenerate.
321         * gnulib/import/Makefile.am: Update.
322         * gnulib/import/Makefile.in: Update.
323         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
324         * gnulib/import/_Noreturn.h: ... this.
325         * gnulib/import/alloca.in.h: Update.
326         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
327         * gnulib/import/arg-nonnull.h: ... this.
328         * gnulib/import/assure.h: Update.
329         * gnulib/import/at-func.c: Update.
330         * gnulib/import/basename-lgpl.c: Update.
331         * gnulib/import/extra/snippet/c++defs.h: Rename to...
332         * gnulib/import/c++defs.h: ... this.
333         * gnulib/import/canonicalize-lgpl.c: Update.
334         * gnulib/import/cdefs.h: Update.
335         * gnulib/import/chdir-long.c: Update.
336         * gnulib/import/chdir-long.h: Update.
337         * gnulib/import/cloexec.c: Update.
338         * gnulib/import/cloexec.h: Update.
339         * gnulib/import/close.c: Update.
340         * gnulib/import/closedir.c: Update.
341         * gnulib/import/config.charset: Update.
342         * gnulib/import/dirent-private.h: Update.
343         * gnulib/import/dirent.in.h: Update.
344         * gnulib/import/dirfd.c: Update.
345         * gnulib/import/dirname-lgpl.c: Update.
346         * gnulib/import/dirname.h: Update.
347         * gnulib/import/dosname.h: Update.
348         * gnulib/import/dup-safer-flag.c: Update.
349         * gnulib/import/dup-safer.c: Update.
350         * gnulib/import/dup.c: Update.
351         * gnulib/import/dup2.c: Update.
352         * gnulib/import/errno.in.h: Update.
353         * gnulib/import/error.c: Update.
354         * gnulib/import/error.h: Update.
355         * gnulib/import/exitfail.c: Update.
356         * gnulib/import/exitfail.h: Update.
357         * gnulib/import/extra/update-copyright: Update.
358         * gnulib/import/fchdir.c: Update.
359         * gnulib/import/fcntl.c: Update.
360         * gnulib/import/fcntl.in.h: Update.
361         * gnulib/import/fd-hook.c: Update.
362         * gnulib/import/fd-hook.h: Update.
363         * gnulib/import/fd-safer-flag.c: Update.
364         * gnulib/import/fd-safer.c: Update.
365         * gnulib/import/fdopendir.c: Update.
366         * gnulib/import/filename.h: Update.
367         * gnulib/import/filenamecat-lgpl.c: Update.
368         * gnulib/import/filenamecat.h: Update.
369         * gnulib/import/flexmember.h: Update.
370         * gnulib/import/float+.h: Update.
371         * gnulib/import/float.c: Update.
372         * gnulib/import/float.in.h: Update.
373         * gnulib/import/fnmatch.c: Update.
374         * gnulib/import/fnmatch.in.h: Update.
375         * gnulib/import/fnmatch_loop.c: Update.
376         * gnulib/import/fpucw.h: Update.
377         * gnulib/import/frexp.c: Update.
378         * gnulib/import/frexpl.c: Update.
379         * gnulib/import/fstat.c: Update.
380         * gnulib/import/fstatat.c: Update.
381         * gnulib/import/getcwd-lgpl.c: Update.
382         * gnulib/import/getcwd.c: Update.
383         * gnulib/import/getdtablesize.c: Update.
384         * gnulib/import/getlogin_r.c: Update.
385         * gnulib/import/getprogname.c: Update.
386         * gnulib/import/getprogname.h: Update.
387         * gnulib/import/gettext.h: Update.
388         * gnulib/import/gettimeofday.c: Update.
389         * gnulib/import/glob-libc.h: Update.
390         * gnulib/import/glob.c: Update.
391         * gnulib/import/glob.in.h: Update.
392         * gnulib/import/glob_internal.h: Update.
393         * gnulib/import/glob_pattern_p.c: Update.
394         * gnulib/import/globfree.c: Update.
395         * gnulib/import/hard-locale.c: Update.
396         * gnulib/import/hard-locale.h: Update.
397         * gnulib/import/intprops.h: Update.
398         * gnulib/import/inttypes.in.h: Update.
399         * gnulib/import/isnan.c: Update.
400         * gnulib/import/isnand-nolibm.h: Update.
401         * gnulib/import/isnand.c: Update.
402         * gnulib/import/isnanl-nolibm.h: Update.
403         * gnulib/import/isnanl.c: Update.
404         * gnulib/import/itold.c: Update.
405         * gnulib/import/libc-config.h: Update.
406         * gnulib/import/limits.in.h: Update.
407         * gnulib/import/localcharset.c: Update.
408         * gnulib/import/localcharset.h: Update.
409         * gnulib/import/localtime-buffer.c: Update.
410         * gnulib/import/localtime-buffer.h: Update.
411         * gnulib/import/lstat.c: Update.
412         * gnulib/import/m4/00gnulib.m4: Update.
413         * gnulib/import/m4/__inline.m4: Update.
414         * gnulib/import/m4/absolute-header.m4: Update.
415         * gnulib/import/m4/alloca.m4: Update.
416         * gnulib/import/m4/builtin-expect.m4: Update.
417         * gnulib/import/m4/canonicalize.m4: Update.
418         * gnulib/import/m4/chdir-long.m4: Update.
419         * gnulib/import/m4/close.m4: Update.
420         * gnulib/import/m4/closedir.m4: Update.
421         * gnulib/import/m4/configmake.m4: Update.
422         * gnulib/import/m4/d-ino.m4: Update.
423         * gnulib/import/m4/d-type.m4: Update.
424         * gnulib/import/m4/dirent_h.m4: Update.
425         * gnulib/import/m4/dirfd.m4: Update.
426         * gnulib/import/m4/dirname.m4: Update.
427         * gnulib/import/m4/double-slash-root.m4: Update.
428         * gnulib/import/m4/dup.m4: Update.
429         * gnulib/import/m4/dup2.m4: Update.
430         * gnulib/import/m4/eealloc.m4: Update.
431         * gnulib/import/m4/environ.m4: Update.
432         * gnulib/import/m4/errno_h.m4: Update.
433         * gnulib/import/m4/error.m4: Update.
434         * gnulib/import/m4/exponentd.m4: Update.
435         * gnulib/import/m4/exponentl.m4: Update.
436         * gnulib/import/m4/extensions.m4: Update.
437         * gnulib/import/m4/extern-inline.m4: Update.
438         * gnulib/import/m4/fchdir.m4: Update.
439         * gnulib/import/m4/fcntl-o.m4: Update.
440         * gnulib/import/m4/fcntl.m4: Update.
441         * gnulib/import/m4/fcntl_h.m4: Update.
442         * gnulib/import/m4/fdopendir.m4: Update.
443         * gnulib/import/m4/filenamecat.m4: Update.
444         * gnulib/import/m4/flexmember.m4: Update.
445         * gnulib/import/m4/float_h.m4: Update.
446         * gnulib/import/m4/fnmatch.m4: Update.
447         * gnulib/import/m4/fnmatch_h.m4: Update.
448         * gnulib/import/m4/fpieee.m4: Update.
449         * gnulib/import/m4/frexp.m4: Update.
450         * gnulib/import/m4/frexpl.m4: Update.
451         * gnulib/import/m4/fstat.m4: Update.
452         * gnulib/import/m4/fstatat.m4: Update.
453         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
454         * gnulib/import/m4/getcwd-path-max.m4: Update.
455         * gnulib/import/m4/getcwd.m4: Update.
456         * gnulib/import/m4/getdtablesize.m4: Update.
457         * gnulib/import/m4/getlogin.m4: Update.
458         * gnulib/import/m4/getlogin_r.m4: Update.
459         * gnulib/import/m4/getpagesize.m4: Update.
460         * gnulib/import/m4/getprogname.m4: Update.
461         * gnulib/import/m4/gettimeofday.m4: Update.
462         * gnulib/import/m4/glibc21.m4: Update.
463         * gnulib/import/m4/glob.m4: Update.
464         * gnulib/import/m4/glob_h.m4: Update.
465         * gnulib/import/m4/gnulib-cache.m4: Update.
466         * gnulib/import/m4/gnulib-common.m4: Update.
467         * gnulib/import/m4/gnulib-comp.m4: Update.
468         * gnulib/import/m4/gnulib-tool.m4: Update.
469         * gnulib/import/m4/hard-locale.m4: Update.
470         * gnulib/import/m4/include_next.m4: Update.
471         * gnulib/import/m4/inttypes-pri.m4: Update.
472         * gnulib/import/m4/inttypes.m4: Update.
473         * gnulib/import/m4/isnand.m4: Update.
474         * gnulib/import/m4/isnanl.m4: Update.
475         * gnulib/import/m4/largefile.m4: Update.
476         * gnulib/import/m4/limits-h.m4: Update.
477         * gnulib/import/m4/localcharset.m4: Update.
478         * gnulib/import/m4/locale-fr.m4: Update.
479         * gnulib/import/m4/locale-ja.m4: Update.
480         * gnulib/import/m4/locale-zh.m4: Update.
481         * gnulib/import/m4/localtime-buffer.m4: Update.
482         * gnulib/import/m4/longlong.m4: Update.
483         * gnulib/import/m4/lstat.m4: Update.
484         * gnulib/import/m4/malloc.m4: Update.
485         * gnulib/import/m4/malloca.m4: Update.
486         * gnulib/import/m4/math_h.m4: Update.
487         * gnulib/import/m4/mbrtowc.m4: Update.
488         * gnulib/import/m4/mbsinit.m4: Update.
489         * gnulib/import/m4/mbsrtowcs.m4: Update.
490         * gnulib/import/m4/mbstate_t.m4: Update.
491         * gnulib/import/m4/memchr.m4: Update.
492         * gnulib/import/m4/memmem.m4: Update.
493         * gnulib/import/m4/mempcpy.m4: Update.
494         * gnulib/import/m4/memrchr.m4: Update.
495         * gnulib/import/m4/mkdir.m4: Update.
496         * gnulib/import/m4/mkstemp.m4: Update.
497         * gnulib/import/m4/mmap-anon.m4: Update.
498         * gnulib/import/m4/mode_t.m4: Update.
499         * gnulib/import/m4/msvc-inval.m4: Update.
500         * gnulib/import/m4/msvc-nothrow.m4: Update.
501         * gnulib/import/m4/multiarch.m4: Update.
502         * gnulib/import/m4/nocrash.m4: Update.
503         * gnulib/import/m4/off_t.m4: Update.
504         * gnulib/import/m4/onceonly.m4: Update.
505         * gnulib/import/m4/open-cloexec.m4: Update.
506         * gnulib/import/m4/open.m4: Update.
507         * gnulib/import/m4/openat.m4: Update.
508         * gnulib/import/m4/opendir.m4: Update.
509         * gnulib/import/m4/pathmax.m4: Update.
510         * gnulib/import/m4/rawmemchr.m4: Update.
511         * gnulib/import/m4/readdir.m4: Update.
512         * gnulib/import/m4/readlink.m4: Update.
513         * gnulib/import/m4/realloc.m4: Update.
514         * gnulib/import/m4/rename.m4: Update.
515         * gnulib/import/m4/rewinddir.m4: Update.
516         * gnulib/import/m4/rmdir.m4: Update.
517         * gnulib/import/m4/save-cwd.m4: Update.
518         * gnulib/import/m4/secure_getenv.m4: Update.
519         * gnulib/import/m4/setenv.m4: Update.
520         * gnulib/import/m4/signal_h.m4: Update.
521         * gnulib/import/m4/ssize_t.m4: Update.
522         * gnulib/import/m4/stat-time.m4: Update.
523         * gnulib/import/m4/stat.m4: Update.
524         * gnulib/import/m4/std-gnu11.m4: Update.
525         * gnulib/import/m4/stdbool.m4: Update.
526         * gnulib/import/m4/stddef_h.m4: Update.
527         * gnulib/import/m4/stdint.m4: Update.
528         * gnulib/import/m4/stdio_h.m4: Update.
529         * gnulib/import/m4/stdlib_h.m4: Update.
530         * gnulib/import/m4/strchrnul.m4: Update.
531         * gnulib/import/m4/strdup.m4: Update.
532         * gnulib/import/m4/strerror.m4: Update.
533         * gnulib/import/m4/string_h.m4: Update.
534         * gnulib/import/m4/strstr.m4: Update.
535         * gnulib/import/m4/strtok_r.m4: Update.
536         * gnulib/import/m4/sys_socket_h.m4: Update.
537         * gnulib/import/m4/sys_stat_h.m4: Update.
538         * gnulib/import/m4/sys_time_h.m4: Update.
539         * gnulib/import/m4/sys_types_h.m4: Update.
540         * gnulib/import/m4/tempname.m4: Update.
541         * gnulib/import/m4/time_h.m4: Update.
542         * gnulib/import/m4/unistd-safer.m4: Update.
543         * gnulib/import/m4/unistd_h.m4: Update.
544         * gnulib/import/m4/warn-on-use.m4: Update.
545         * gnulib/import/m4/wchar_h.m4: Update.
546         * gnulib/import/m4/wchar_t.m4: Update.
547         * gnulib/import/m4/wctype_h.m4: Update.
548         * gnulib/import/m4/wint_t.m4: Update.
549         * gnulib/import/malloc.c: Update.
550         * gnulib/import/malloc/scratch_buffer.h: Update.
551         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
552         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
553         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
554         * gnulib/import/malloca.c: Update.
555         * gnulib/import/malloca.h: Update.
556         * gnulib/import/malloca.valgrind: Update.
557         * gnulib/import/math.in.h: Update.
558         * gnulib/import/mbrtowc.c: Update.
559         * gnulib/import/mbsinit.c: Update.
560         * gnulib/import/mbsrtowcs-impl.h: Update.
561         * gnulib/import/mbsrtowcs-state.c: Update.
562         * gnulib/import/mbsrtowcs.c: Update.
563         * gnulib/import/memchr.c: Update.
564         * gnulib/import/memmem.c: Update.
565         * gnulib/import/mempcpy.c: Update.
566         * gnulib/import/memrchr.c: Update.
567         * gnulib/import/mkdir.c: Update.
568         * gnulib/import/mkstemp.c: Update.
569         * gnulib/import/msvc-inval.c: Update.
570         * gnulib/import/msvc-inval.h: Update.
571         * gnulib/import/msvc-nothrow.c: Update.
572         * gnulib/import/msvc-nothrow.h: Update.
573         * gnulib/import/open.c: Update.
574         * gnulib/import/openat-die.c: Update.
575         * gnulib/import/openat-priv.h: Update.
576         * gnulib/import/openat-proc.c: Update.
577         * gnulib/import/openat.c: Update.
578         * gnulib/import/openat.h: Update.
579         * gnulib/import/opendir.c: Update.
580         * gnulib/import/pathmax.h: Update.
581         * gnulib/import/pipe-safer.c: Update.
582         * gnulib/import/rawmemchr.c: Update.
583         * gnulib/import/readdir.c: Update.
584         * gnulib/import/readlink.c: Update.
585         * gnulib/import/realloc.c: Update.
586         * gnulib/import/ref-add.sin: Update.
587         * gnulib/import/ref-del.sin: Update.
588         * gnulib/import/rename.c: Update.
589         * gnulib/import/rewinddir.c: Update.
590         * gnulib/import/rmdir.c: Update.
591         * gnulib/import/same-inode.h: Update.
592         * gnulib/import/save-cwd.c: Update.
593         * gnulib/import/save-cwd.h: Update.
594         * gnulib/import/scratch_buffer.h: Update.
595         * gnulib/import/secure_getenv.c: Update.
596         * gnulib/import/setenv.c: Update.
597         * gnulib/import/signal.in.h: Update.
598         * gnulib/import/stat-time.c: Update.
599         * gnulib/import/stat-time.h: Update.
600         * gnulib/import/stat-w32.c: Update.
601         * gnulib/import/stat-w32.h: Update.
602         * gnulib/import/stat.c: Update.
603         * gnulib/import/stdbool.in.h: Update.
604         * gnulib/import/stddef.in.h: Update.
605         * gnulib/import/stdint.in.h: Update.
606         * gnulib/import/stdio.in.h: Update.
607         * gnulib/import/stdlib.in.h: Update.
608         * gnulib/import/str-two-way.h: Update.
609         * gnulib/import/strchrnul.c: Update.
610         * gnulib/import/strdup.c: Update.
611         * gnulib/import/streq.h: Update.
612         * gnulib/import/strerror-override.c: Update.
613         * gnulib/import/strerror-override.h: Update.
614         * gnulib/import/strerror.c: Update.
615         * gnulib/import/string.in.h: Update.
616         * gnulib/import/stripslash.c: Update.
617         * gnulib/import/strnlen1.c: Update.
618         * gnulib/import/strnlen1.h: Update.
619         * gnulib/import/strstr.c: Update.
620         * gnulib/import/strtok_r.c: Update.
621         * gnulib/import/sys_stat.in.h: Update.
622         * gnulib/import/sys_time.in.h: Update.
623         * gnulib/import/sys_types.in.h: Update.
624         * gnulib/import/tempname.c: Update.
625         * gnulib/import/tempname.h: Update.
626         * gnulib/import/time.in.h: Update.
627         * gnulib/import/unistd--.h: Update.
628         * gnulib/import/unistd-safer.h: Update.
629         * gnulib/import/unistd.in.h: Update.
630         * gnulib/import/unsetenv.c: Update.
631         * gnulib/import/verify.h: Update.
632         * gnulib/import/extra/snippet/warn-on-use.h: Update.
633         * gnulib/import/wchar.in.h: Update.
634         * gnulib/import/wctype.in.h: Update.
635         * gnulib/import/xalloc-oversized.h: Update.
636         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
637         "53e2c179f26a890fa6685af4b6c1397ee370433b".
638
639 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
640
641         * record-btrace.c (get_thread_current_frame): Remove
642         old_inferior_ptid.
643
644 2018-09-10  Jerome Guitton  <guitton@adacore.com>
645
646         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
647         with check_tag to 1 if and only if the type is tagged and the
648         component being searched cannot been found in the current
649         view. Otherwise, always call ada_to_fixed_type with
650         check_tag to 0.
651
652 2018-09-10  Xavier Roirand  <roirand@adacore.com>
653
654         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
655         declaration.
656         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
657         * ada-varobj.c (ada_varobj_get_number_of_children,
658         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
659
660 2018-09-10  Xavier Roirand  <roirand@adacore.com>
661
662         * ada-valprint.c (ada_value_print): Use type instead of
663         enclosing type.
664
665 2018-09-10  Xavier Roirand  <roirand@adacore.com>
666
667         * ada-lang.c (ada_value_subscript): Handle case when parameter is
668         an array of access to unconstrained array.
669
670 2018-09-10  Xavier Roirand  <roirand@adacore.com>
671
672         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
673         (ada_check_typedef): Use it.
674
675 2018-09-10  Xavier Roirand  <roirand@adacore.com>
676
677         * ada-varobj.c (ada_varobj_describe_struct_child)
678         (ada_varobj_describe_child): Handle union case like struct one.
679
680 2018-09-10  Tom Tromey  <tom@tromey.com>
681
682         PR python/18380:
683         * python/python.c (_initialize_python): Make example in "python"
684         help work in Python 3.
685
686 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
687
688         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
689         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
690         $(EXEEXT) to the script, as it is not a program.
691
692 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
693
694         * python/py-prettyprint.c (pretty_print_one_value): Return
695         gdbpy_ref<>.
696         (print_string_repr): Adjust.
697         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
698         * python/python-internal.h (apply_varobj_pretty_printer): Return
699         gdbpy_ref<>.
700         * varobj.c (varobj_value_get_print_value): Adjust.
701
702 2018-09-08  Tom Tromey  <tom@tromey.com>
703
704         PR python/16047:
705         * python/py-prettyprint.c (pretty_print_one_value): Check for
706         to_string method.
707
708 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
709
710         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
711         replace_operator_with_call.
712
713 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
714
715         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
716
717 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
718
719         * ada-typeprint.c (print_range): Print the bounds using TYPE
720         rather than its TYPE_TARGET_TYPE.
721
722 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
723
724         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
725         call to ada_to_fixed_value_create.
726
727 2018-09-08  Jerome Guitton  <guitton@adacore.com>
728
729         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
730
731 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
732
733         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
734         by calls to error.
735
736 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
737
738         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
739         Move update of loop variable "fi".
740
741 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
742
743         * ada-lang.c (value_assign_to_component): In the case of
744         big-endian targets, extract the bits of the given VAL
745         using an src_offset of zero if container is not a scalar.
746
747 2018-09-06  Simon Ser  <contact@emersion.fr>
748
749         PR gdb/23105
750         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
751         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
752         * fbsd-tdep.c (fbsd_make_note_desc): New.
753         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
754         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
755         * target.h (enum target_object) Add FreeBSD-specific
756         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
757
758 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
759
760         * compile/compile-c.h (generate_c_for_variable_locations):
761         Change reference to pointer.
762         * compile/compile-c-support.c (compile_program) <compute>:
763         Likewise.
764         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
765         (generate_c_for_for_one_variable): Likewise
766         (generate_c_for_variable_locations): Likewise
767         * compile/compile-c-types.c (compile_c_instance::convert_type):
768         Likewise
769         * compile/compile-cplus-symbols.c (convert_one_symbol):
770         std::move the scope passed to enter_scope.
771         * compile/compile-cplus-types.c
772         (compile_cplus_instance::enter_scope): Make parameter
773         rvalue-reference.
774         (compile_cplus_instance::new_scope): Change reference to
775         pointer.
776         (compile_cplus_instance::convert_type): Likewise
777         (compile_cplus_convert_typedef): std::move the scope passed to
778         enter_scope.
779         (compile_cplus_convert_struct_or_union): Likewise.
780         (compile_cplus_convert_enum): Likewise.
781         (compile_cplus_convert_namespace): Likewise.
782         * compile/compile-cplus.h (compile_cplus_instance)
783         <enter_scope>: Make parameter rvalue-reference.
784         * compile/compile-internal.h (compile_instance)
785         <get_cached_type>: Likewise
786         * compile/compile-loc2c.c (push): Likewise
787         (pushf): Likewise
788         (unary): Likewise
789         (binary): Likewise
790         (print_label): Likewise
791         (pushf_register_address): Likewise
792         (pushf_register): Likewise
793         (do_compile_dwarf_expr_to_c): Likewise
794         (compile_dwarf_expr_to_c): Likewise
795         (compile_dwarf_bounds_to_c): Likewise
796         * compile/compile.c (compile_instance::get_cached_type):
797         Likewise
798         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
799         (compile_dwarf_bounds_to_c): Likewise
800         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
801         (dwarf2_compile_property_to_c): Likewise
802         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
803         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
804         Likewise
805
806 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
807
808         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
809         * tui/tui-data.c (init_content_element): Don't initialize it.
810
811 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
812
813         * tui/tui-data.h (struct tui_win_info)
814         <detail::opaque>: Remove.
815         * tui/tui-data.c (init_win_info): Remove assignment.
816
817 2018-09-05  Tom Tromey  <tom@tromey.com>
818
819         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
820         -Wformat-nonliteral.
821         * target-float.c (host_float_ops<T>::to_string)
822         (host_float_ops<T>::from_string): Use
823         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
824         * configure: Rebuild.
825
826 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
827
828         * printcmd.c (printf_c_string): Use
829         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
830         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
831
832 2018-09-05  Tom Tromey  <tom@tromey.com>
833
834         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
835
836 2018-09-05  Tom de Vries  <tdevries@suse.de>
837
838         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
839         with resolve_abstract_p == true.
840         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
841         defaulting to false. Propagate resolve_abstract_p to
842         dwarf2_fetch_die_loc_sect_off.
843         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
844         parameter, defaulting to false.
845         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
846         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
847         parameter.
848         * dwarf2read.h (struct die_info): Forward-declare.
849         (die_info_ptr): New typedef.
850         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
851
852 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
853
854         GDB 8.2 released.
855
856 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
857             Pedro Alves  <palves@redhat.com>
858
859         * gnulib/Makefile.in (aclocal_m4_deps): Move to
860         "aclocal-m4-deps.mk".  Include file here.
861         $(srcdir)/aclocal.m4: Add "configure.ac".
862         * gnulib/aclocal-m4-deps.mk: New file.
863         * gnulib/update-gnulib.sh: Automatically update
864         "aclocal-m4-deps.mk".
865
866 2018-09-04  Tom Tromey  <tom@tromey.com>
867
868         * configure: Rebuild.
869         * configure.ac: Remove multi-ice code.
870
871 2018-09-04  Tom Tromey  <tom@tromey.com>
872
873         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
874         (ada-exp.o): Update.
875
876 2018-09-04  Tom Tromey  <tom@tromey.com>
877
878         * Makefile.in (printcmd.o, target-float.o): Remove.
879         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
880
881 2018-09-04  Tom Tromey  <tom@tromey.com>
882
883         * gnulib/Makefile.in: Remove obsolete comment.
884         * Makefile.in: Remove obsolete comment.
885
886 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
887
888         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
889         line with '+'.
890
891 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
892
893         * riscv-tdep.c: Add 'prologue-value.h' include.
894         (struct riscv_unwind_cache): New struct.
895         (riscv_debug_unwinder): New global.
896         (riscv_scan_prologue): Update arguments, capture register details
897         from prologue scan.
898         (riscv_skip_prologue): Reformat arguments line, move end of
899         prologue calculation into riscv_scan_prologue.
900         (riscv_frame_cache): Update return type, create
901         riscv_unwind_cache, scan the prologue, and fill in remaining cache
902         details.
903         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
904         (riscv_frame_prev_register): Use the trad_frame within the
905         riscv_unwind_cache.
906         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
907         flag.
908
909 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
910
911         * trad-frame.h (trad_frame_set_realreg): Declare.
912         (trad_frame_set_addr): Declare.
913         * trad-frame.c (trad_frame_set_realreg): Define new function.
914         (trad_frame_set_addr): Define new function.
915         (trad_frame_set_reg_realreg): Use new function.
916         (trad_frame_set_reg_addr): Use new function.
917
918 2018-09-01  Keith Seitz  <keiths@redhat.com>
919
920         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
921         pulongest instead of "%lld".
922         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
923         ATTRIBUTE_UNUSED.
924
925 2018-08-31  Tom Tromey  <tom@tromey.com>
926
927         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
928         variant part type.
929
930 2018-08-31  Pedro Alves  <palves@redhat.com>
931
932         * gdbarch.h: Regenerate.
933
934 2018-08-31  Pedro Alves  <palves@redhat.com>
935
936         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
937         * target.h (Hardware watchpoint interfaces): Describe
938         continuable/steppable/non-steppable watchpoints.
939         * gdbarch.h, gdbarch.c: Regenerate.
940
941 2018-08-31  Pedro Alves  <palves@redhat.com>
942
943         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
944         Delete.
945         * s390-linux-nat.c
946         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
947         * target.h (target_ops::have_continuable_watchpoint): Delete.
948         (target_have_continuable_watchpoint): Delete.
949         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
950         * target-delegates.c: Regenerate.
951
952 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
953
954         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
955         the files present in "gnulib/import/m4/".
956
957 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
958
959         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
960         c.sw, c.swsp, and c.sdsp.
961
962 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
963
964         * riscv-tdep.c (struct riscv_inferior_data): Delete.
965         (riscv_read_misa_reg): Don't cache value read into inferior data.
966         (riscv_new_inferior_data): Delete.
967         (riscv_inferior_data_cleanup): Delete.
968         (riscv_inferior_data): Delete.
969         (riscv_invalidate_inferior_data): Delete.
970         (_initialize_riscv_tdep): Remove initialisation of inferior data.
971
972 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
973
974         * compile/compile-cplus-types.c
975         (compile_cplus_instance::leave_scope): Take the address of scope
976         object.
977         (compile_cplus_instance::convert_qualified_base): Compare quals
978         to 0.
979
980 2018-08-30  Keith Seitz  <keiths@redhat.com>
981
982         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
983         Use "%s" and host_address_to_string instead of "%p" in printf.
984
985 2018-08-29  Keith Seitz  <keiths@redhat.com>
986
987         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
988         and compile-cplus-types.c.
989         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
990         * c-lang.c (cplus_language_defn): Set C++ compile functions.
991         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
992         Declare.
993         * compile/compile-c-support.c: Include compile-cplus.h.
994         (load_libcompile): Templatize.
995         (get_compile_context): "New" function.
996         (c_get_compile_context): Use get_compile_context.
997         (cplus_get_compile_context): New function.
998         (cplus_push_user_expression, cplus_pop_user_expression)
999         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1000         (cplus_compute_program): Define new structs/functions.
1001         * compile/compile-cplus-symmbols.c: New file.
1002         * compile/compile-cplus-types.c: New file.
1003         * compile/compile-cplus.h: New file.
1004         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1005         Declare.
1006         * compile/compile-object-load.c (get_out_value_type): Use
1007         strncmp_iw when comparing symbol names.
1008         (compile_object_load): Add mst_bss and mst_data.
1009         * compile/compile.c (_initialize_compile): Remove
1010         -Wno-implicit-function-declaration from `compile_args'.
1011         * compile/gcc-cp-plugin.h: New file.
1012         * NEWS: Mention C++ compile support and new debug options.
1013
1014 2018-08-29  Keith Seitz  <keiths@redhat.com>
1015
1016         * linespec.c (collect_info::add_symbol): Make virtual.
1017         (struct symbol_searcher_collect_info): New struct.
1018         (symbol_searcher::find_all_symbols): New method.
1019         * symtab.h (class symbol_searcher): New class.
1020
1021 2018-08-29  Keith Seitz  <keiths@redhat.com>
1022
1023         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1024         Change to vector of block_symbol.  Update all users.
1025         (struct collect_info) <symbols>: Likewise.
1026         (collect_info::add_symbol): Take block_symbol as argument.
1027         Update all callers.
1028         (decode_compound_collector) <m_symbols>: Change type to vector
1029         of block_symbol.  Update all users.
1030         (decode_compound_collector::operator ()): Change parameter type
1031         to block_symbol.
1032         (find_method, find_function_symbols, find_linespec_symbols)
1033         (find_label_symbols_in_block, find_label_symbols): Change symbol
1034         vectors to block_symbol vectors.
1035         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1036         block_symbol.
1037
1038 2018-08-29  Keith Seitz  <keiths@redhat.com>
1039
1040         * linespec.c (symbolp): Remove typedef and VEC definitions.
1041         (bound_minimal_symbol_d): Likewise.
1042
1043 2018-08-29  Keith Seitz  <keiths@redhat.com>
1044
1045         * linespec.c (decode_compound_collector::decode_compound_collector):
1046         Remove initialization for `m_symtabs'.
1047         (decode_compound_collector::release_symbols): Change return type
1048         to std::vector.  Update all callers.
1049         (class decode_compound_collector) <m_symbols>: Change type to
1050         std::vector.
1051         (lookup_prefix_sym): Change return type to std::vector.  Update all
1052         callers.
1053         (compare_symbols): Remove.
1054         (std_compare_symbols): Rename to `compare_symbols'.
1055         (find_method): Change `sym_classes' parameter to std::vector.
1056         Update all callers.  Use std::sort to sort sym_classes.
1057         (find_linespec_symbols): Remove cleanup.
1058
1059 2018-08-29  Keith Seitz  <keiths@redhat.com>
1060
1061         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1062         std::vector.  Update all users.
1063         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1064         (struct collect_info) <minimal_symbols>: Likewise.
1065         (compare_msymbols): Return bool.  Change parameters to const
1066         bound_minimal_symbol references.
1067         (find_method, find_function_symbols, find_linespec_symbols): Change
1068         `minsyms' parameter to std::vector.  Update all callers.
1069
1070 2018-08-29  Keith Seitz  <keiths@redhat.com>
1071
1072         * linespec.c (struct linespec) <label_symbols>: Change type to
1073         std::vector.  Update all users.
1074         (find_label_symbols_in_block): Change `result' parameter to
1075         std::vector.  Update all callers.
1076         (find_label_symbols): Return std::vector.  Update all callers.
1077
1078 2018-08-29  Keith Seitz  <keiths@redhat.com>
1079
1080         * linespec.c (struct linespec) <function_symbols>: Change type to
1081         std::vector.  Update all users.
1082         (struct collect_info) <function_symbols>: Likewise.
1083         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1084         (std_compare_symbols): New function.
1085         (find_method, find_function_symbols, find_linespec_symbols)
1086         (find_label_symbols_in_block): Change `symbols' parameter to
1087         std::vector.  Update all callers.
1088         (find_label_symbols): Likewise for `function_symbols' and
1089         `label_funcs_ret'.
1090
1091 2018-08-29  Keith Seitz  <keiths@redhat.com>
1092
1093         * linespec.c (symtab_vector_up): Define.
1094         (struct linespec) <file_symtabs>: Change type to std::vector *.
1095         Update all uses.
1096         (struct collect_info) <file_symtabs>: Likewise.
1097         (collect_symtabs_from_filename): Return symtab_vector_up.
1098         Update all callers.
1099         (decode_objc): Remove cleanup.
1100         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1101         (symtab_collector::release_symtabs): Return symtab_vector_up.
1102         Update all callers.
1103         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1104         Update all users.
1105         (collect_symtabs_from_filename, symtabs_from_filename): Return
1106         symtab_vector_up.  Update all callers.
1107
1108 2018-08-29  Tom Tromey  <tom@tromey.com>
1109
1110         * csky-tdep.c (csky_analyze_prologue): Use
1111         core_addr_to_string_nz.
1112
1113 2018-08-29  Tom Tromey  <tom@tromey.com>
1114
1115         * windows-nat.c (struct xlate_exception) <them>: Change type to
1116         DWORD.
1117         (xlate): Fix formatting.  Remove last entry.
1118         (struct xlate_exception, xlate): Comment out.
1119         (windows_nat_target::resume): Use ranged for.
1120
1121 2018-08-29  Jim Wilson  <jimw@sifive.com>
1122
1123         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1124         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1125         of NT_PRFPREG.
1126         (riscv_linux_nat_target::store_registers): Likewise.
1127
1128 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1129
1130         PR gdb/23555
1131         PR gdb/23558
1132         * gnulib/aclocal.m4: Regenerate.
1133         * gnulib/config.in: Regenerate.
1134         * gnulib/configure: Regenerate.
1135         * gnulib/import/Makefile.am: Update.
1136         * gnulib/import/Makefile.in: Update.
1137         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1138         * gnulib/import/_Noreturn.h: ... this.
1139         * gnulib/import/alloca.in.h: Update.
1140         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1141         * gnulib/import/arg-nonnull.h: ... this.
1142         * gnulib/import/assure.h: Update.
1143         * gnulib/import/at-func.c: Update.
1144         * gnulib/import/basename-lgpl.c: Update.
1145         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1146         * gnulib/import/c++defs.h: ... this.
1147         * gnulib/import/canonicalize-lgpl.c: Update.
1148         * gnulib/import/cdefs.h: Update.
1149         * gnulib/import/chdir-long.c: Update.
1150         * gnulib/import/chdir-long.h: Update.
1151         * gnulib/import/cloexec.c: Update.
1152         * gnulib/import/cloexec.h: Update.
1153         * gnulib/import/close.c: Update.
1154         * gnulib/import/closedir.c: Update.
1155         * gnulib/import/config.charset: Update.
1156         * gnulib/import/dirent-private.h: Update.
1157         * gnulib/import/dirent.in.h: Update.
1158         * gnulib/import/dirfd.c: Update.
1159         * gnulib/import/dirname-lgpl.c: Update.
1160         * gnulib/import/dirname.h: Update.
1161         * gnulib/import/dosname.h: Update.
1162         * gnulib/import/dup-safer-flag.c: Update.
1163         * gnulib/import/dup-safer.c: Update.
1164         * gnulib/import/dup.c: Update.
1165         * gnulib/import/dup2.c: Update.
1166         * gnulib/import/errno.in.h: Update.
1167         * gnulib/import/error.c: Update.
1168         * gnulib/import/error.h: Update.
1169         * gnulib/import/exitfail.c: Update.
1170         * gnulib/import/exitfail.h: Update.
1171         * gnulib/import/extra/update-copyright: Update.
1172         * gnulib/import/fchdir.c: Update.
1173         * gnulib/import/fcntl.c: Update.
1174         * gnulib/import/fcntl.in.h: Update.
1175         * gnulib/import/fd-hook.c: Update.
1176         * gnulib/import/fd-hook.h: Update.
1177         * gnulib/import/fd-safer-flag.c: Update.
1178         * gnulib/import/fd-safer.c: Update.
1179         * gnulib/import/fdopendir.c: Update.
1180         * gnulib/import/filename.h: Update.
1181         * gnulib/import/filenamecat-lgpl.c: Update.
1182         * gnulib/import/filenamecat.h: Update.
1183         * gnulib/import/flexmember.h: Update.
1184         * gnulib/import/float+.h: Update.
1185         * gnulib/import/float.c: Update.
1186         * gnulib/import/float.in.h: Update.
1187         * gnulib/import/fnmatch.c: Update.
1188         * gnulib/import/fnmatch.in.h: Update.
1189         * gnulib/import/fnmatch_loop.c: Update.
1190         * gnulib/import/fpucw.h: Update.
1191         * gnulib/import/frexp.c: Update.
1192         * gnulib/import/frexpl.c: Update.
1193         * gnulib/import/fstat.c: Update.
1194         * gnulib/import/fstatat.c: Update.
1195         * gnulib/import/getcwd-lgpl.c: Update.
1196         * gnulib/import/getcwd.c: Update.
1197         * gnulib/import/getdtablesize.c: Update.
1198         * gnulib/import/getlogin_r.c: Update.
1199         * gnulib/import/getprogname.c: Update.
1200         * gnulib/import/getprogname.h: Update.
1201         * gnulib/import/gettext.h: Update.
1202         * gnulib/import/gettimeofday.c: Update.
1203         * gnulib/import/glob-libc.h: Update.
1204         * gnulib/import/glob.c: Update.
1205         * gnulib/import/glob.in.h: Update.
1206         * gnulib/import/glob_internal.h: Update.
1207         * gnulib/import/glob_pattern_p.c: Update.
1208         * gnulib/import/globfree.c: Update.
1209         * gnulib/import/hard-locale.c: Update.
1210         * gnulib/import/hard-locale.h: Update.
1211         * gnulib/import/intprops.h: Update.
1212         * gnulib/import/inttypes.in.h: Update.
1213         * gnulib/import/isnan.c: Update.
1214         * gnulib/import/isnand-nolibm.h: Update.
1215         * gnulib/import/isnand.c: Update.
1216         * gnulib/import/isnanl-nolibm.h: Update.
1217         * gnulib/import/isnanl.c: Update.
1218         * gnulib/import/itold.c: Update.
1219         * gnulib/import/libc-config.h: Update.
1220         * gnulib/import/limits.in.h: Update.
1221         * gnulib/import/localcharset.c: Update.
1222         * gnulib/import/localcharset.h: Update.
1223         * gnulib/import/localtime-buffer.c: Update.
1224         * gnulib/import/localtime-buffer.h: Update.
1225         * gnulib/import/lstat.c: Update.
1226         * gnulib/import/m4/00gnulib.m4: Update.
1227         * gnulib/import/m4/__inline.m4: Update.
1228         * gnulib/import/m4/absolute-header.m4: Update.
1229         * gnulib/import/m4/alloca.m4: Update.
1230         * gnulib/import/m4/builtin-expect.m4: Update.
1231         * gnulib/import/m4/canonicalize.m4: Update.
1232         * gnulib/import/m4/chdir-long.m4: Update.
1233         * gnulib/import/m4/close.m4: Update.
1234         * gnulib/import/m4/closedir.m4: Update.
1235         * gnulib/import/m4/configmake.m4: Update.
1236         * gnulib/import/m4/d-ino.m4: Update.
1237         * gnulib/import/m4/d-type.m4: Update.
1238         * gnulib/import/m4/dirent_h.m4: Update.
1239         * gnulib/import/m4/dirfd.m4: Update.
1240         * gnulib/import/m4/dirname.m4: Update.
1241         * gnulib/import/m4/double-slash-root.m4: Update.
1242         * gnulib/import/m4/dup.m4: Update.
1243         * gnulib/import/m4/dup2.m4: Update.
1244         * gnulib/import/m4/eealloc.m4: Update.
1245         * gnulib/import/m4/environ.m4: Update.
1246         * gnulib/import/m4/errno_h.m4: Update.
1247         * gnulib/import/m4/error.m4: Update.
1248         * gnulib/import/m4/exponentd.m4: Update.
1249         * gnulib/import/m4/exponentl.m4: Update.
1250         * gnulib/import/m4/extensions.m4: Update.
1251         * gnulib/import/m4/extern-inline.m4: Update.
1252         * gnulib/import/m4/fchdir.m4: Update.
1253         * gnulib/import/m4/fcntl-o.m4: Update.
1254         * gnulib/import/m4/fcntl.m4: Update.
1255         * gnulib/import/m4/fcntl_h.m4: Update.
1256         * gnulib/import/m4/fdopendir.m4: Update.
1257         * gnulib/import/m4/filenamecat.m4: Update.
1258         * gnulib/import/m4/flexmember.m4: Update.
1259         * gnulib/import/m4/float_h.m4: Update.
1260         * gnulib/import/m4/fnmatch.m4: Update.
1261         * gnulib/import/m4/fnmatch_h.m4: Update.
1262         * gnulib/import/m4/fpieee.m4: Update.
1263         * gnulib/import/m4/frexp.m4: Update.
1264         * gnulib/import/m4/frexpl.m4: Update.
1265         * gnulib/import/m4/fstat.m4: Update.
1266         * gnulib/import/m4/fstatat.m4: Update.
1267         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1268         * gnulib/import/m4/getcwd-path-max.m4: Update.
1269         * gnulib/import/m4/getcwd.m4: Update.
1270         * gnulib/import/m4/getdtablesize.m4: Update.
1271         * gnulib/import/m4/getlogin.m4: Update.
1272         * gnulib/import/m4/getlogin_r.m4: Update.
1273         * gnulib/import/m4/getpagesize.m4: Update.
1274         * gnulib/import/m4/getprogname.m4: Update.
1275         * gnulib/import/m4/gettimeofday.m4: Update.
1276         * gnulib/import/m4/glibc21.m4: Update.
1277         * gnulib/import/m4/glob.m4: Update.
1278         * gnulib/import/m4/glob_h.m4: Update.
1279         * gnulib/import/m4/gnulib-cache.m4: Update.
1280         * gnulib/import/m4/gnulib-common.m4: Update.
1281         * gnulib/import/m4/gnulib-comp.m4: Update.
1282         * gnulib/import/m4/gnulib-tool.m4: Update.
1283         * gnulib/import/m4/hard-locale.m4: Update.
1284         * gnulib/import/m4/include_next.m4: Update.
1285         * gnulib/import/m4/inttypes-pri.m4: Update.
1286         * gnulib/import/m4/inttypes.m4: Update.
1287         * gnulib/import/m4/isnand.m4: Update.
1288         * gnulib/import/m4/isnanl.m4: Update.
1289         * gnulib/import/m4/largefile.m4: Update.
1290         * gnulib/import/m4/limits-h.m4: Update.
1291         * gnulib/import/m4/localcharset.m4: Update.
1292         * gnulib/import/m4/locale-fr.m4: Update.
1293         * gnulib/import/m4/locale-ja.m4: Update.
1294         * gnulib/import/m4/locale-zh.m4: Update.
1295         * gnulib/import/m4/localtime-buffer.m4: Update.
1296         * gnulib/import/m4/longlong.m4: Update.
1297         * gnulib/import/m4/lstat.m4: Update.
1298         * gnulib/import/m4/malloc.m4: Update.
1299         * gnulib/import/m4/malloca.m4: Update.
1300         * gnulib/import/m4/math_h.m4: Update.
1301         * gnulib/import/m4/mbrtowc.m4: Update.
1302         * gnulib/import/m4/mbsinit.m4: Update.
1303         * gnulib/import/m4/mbsrtowcs.m4: Update.
1304         * gnulib/import/m4/mbstate_t.m4: Update.
1305         * gnulib/import/m4/memchr.m4: Update.
1306         * gnulib/import/m4/memmem.m4: Update.
1307         * gnulib/import/m4/mempcpy.m4: Update.
1308         * gnulib/import/m4/memrchr.m4: Update.
1309         * gnulib/import/m4/mkdir.m4: Update.
1310         * gnulib/import/m4/mkstemp.m4: Update.
1311         * gnulib/import/m4/mmap-anon.m4: Update.
1312         * gnulib/import/m4/mode_t.m4: Update.
1313         * gnulib/import/m4/msvc-inval.m4: Update.
1314         * gnulib/import/m4/msvc-nothrow.m4: Update.
1315         * gnulib/import/m4/multiarch.m4: Update.
1316         * gnulib/import/m4/nocrash.m4: Update.
1317         * gnulib/import/m4/off_t.m4: Update.
1318         * gnulib/import/m4/onceonly.m4: Update.
1319         * gnulib/import/m4/open-cloexec.m4: Update.
1320         * gnulib/import/m4/open.m4: Update.
1321         * gnulib/import/m4/openat.m4: Update.
1322         * gnulib/import/m4/opendir.m4: Update.
1323         * gnulib/import/m4/pathmax.m4: Update.
1324         * gnulib/import/m4/rawmemchr.m4: Update.
1325         * gnulib/import/m4/readdir.m4: Update.
1326         * gnulib/import/m4/readlink.m4: Update.
1327         * gnulib/import/m4/realloc.m4: Update.
1328         * gnulib/import/m4/rename.m4: Update.
1329         * gnulib/import/m4/rewinddir.m4: Update.
1330         * gnulib/import/m4/rmdir.m4: Update.
1331         * gnulib/import/m4/save-cwd.m4: Update.
1332         * gnulib/import/m4/secure_getenv.m4: Update.
1333         * gnulib/import/m4/setenv.m4: Update.
1334         * gnulib/import/m4/signal_h.m4: Update.
1335         * gnulib/import/m4/ssize_t.m4: Update.
1336         * gnulib/import/m4/stat-time.m4: Update.
1337         * gnulib/import/m4/stat.m4: Update.
1338         * gnulib/import/m4/std-gnu11.m4: Update.
1339         * gnulib/import/m4/stdbool.m4: Update.
1340         * gnulib/import/m4/stddef_h.m4: Update.
1341         * gnulib/import/m4/stdint.m4: Update.
1342         * gnulib/import/m4/stdio_h.m4: Update.
1343         * gnulib/import/m4/stdlib_h.m4: Update.
1344         * gnulib/import/m4/strchrnul.m4: Update.
1345         * gnulib/import/m4/strdup.m4: Update.
1346         * gnulib/import/m4/strerror.m4: Update.
1347         * gnulib/import/m4/string_h.m4: Update.
1348         * gnulib/import/m4/strstr.m4: Update.
1349         * gnulib/import/m4/strtok_r.m4: Update.
1350         * gnulib/import/m4/sys_socket_h.m4: Update.
1351         * gnulib/import/m4/sys_stat_h.m4: Update.
1352         * gnulib/import/m4/sys_time_h.m4: Update.
1353         * gnulib/import/m4/sys_types_h.m4: Update.
1354         * gnulib/import/m4/tempname.m4: Update.
1355         * gnulib/import/m4/time_h.m4: Update.
1356         * gnulib/import/m4/unistd-safer.m4: Update.
1357         * gnulib/import/m4/unistd_h.m4: Update.
1358         * gnulib/import/m4/warn-on-use.m4: Update.
1359         * gnulib/import/m4/wchar_h.m4: Update.
1360         * gnulib/import/m4/wchar_t.m4: Update.
1361         * gnulib/import/m4/wctype_h.m4: Update.
1362         * gnulib/import/m4/wint_t.m4: Update.
1363         * gnulib/import/malloc.c: Update.
1364         * gnulib/import/malloc/scratch_buffer.h: Update.
1365         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1366         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1367         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1368         * gnulib/import/malloca.c: Update.
1369         * gnulib/import/malloca.h: Update.
1370         * gnulib/import/malloca.valgrind: Update.
1371         * gnulib/import/math.in.h: Update.
1372         * gnulib/import/mbrtowc.c: Update.
1373         * gnulib/import/mbsinit.c: Update.
1374         * gnulib/import/mbsrtowcs-impl.h: Update.
1375         * gnulib/import/mbsrtowcs-state.c: Update.
1376         * gnulib/import/mbsrtowcs.c: Update.
1377         * gnulib/import/memchr.c: Update.
1378         * gnulib/import/memmem.c: Update.
1379         * gnulib/import/mempcpy.c: Update.
1380         * gnulib/import/memrchr.c: Update.
1381         * gnulib/import/mkdir.c: Update.
1382         * gnulib/import/mkstemp.c: Update.
1383         * gnulib/import/msvc-inval.c: Update.
1384         * gnulib/import/msvc-inval.h: Update.
1385         * gnulib/import/msvc-nothrow.c: Update.
1386         * gnulib/import/msvc-nothrow.h: Update.
1387         * gnulib/import/open.c: Update.
1388         * gnulib/import/openat-die.c: Update.
1389         * gnulib/import/openat-priv.h: Update.
1390         * gnulib/import/openat-proc.c: Update.
1391         * gnulib/import/openat.c: Update.
1392         * gnulib/import/openat.h: Update.
1393         * gnulib/import/opendir.c: Update.
1394         * gnulib/import/pathmax.h: Update.
1395         * gnulib/import/pipe-safer.c: Update.
1396         * gnulib/import/rawmemchr.c: Update.
1397         * gnulib/import/readdir.c: Update.
1398         * gnulib/import/readlink.c: Update.
1399         * gnulib/import/realloc.c: Update.
1400         * gnulib/import/ref-add.sin: Update.
1401         * gnulib/import/ref-del.sin: Update.
1402         * gnulib/import/rename.c: Update.
1403         * gnulib/import/rewinddir.c: Update.
1404         * gnulib/import/rmdir.c: Update.
1405         * gnulib/import/same-inode.h: Update.
1406         * gnulib/import/save-cwd.c: Update.
1407         * gnulib/import/save-cwd.h: Update.
1408         * gnulib/import/scratch_buffer.h: Update.
1409         * gnulib/import/secure_getenv.c: Update.
1410         * gnulib/import/setenv.c: Update.
1411         * gnulib/import/signal.in.h: Update.
1412         * gnulib/import/stat-time.c: Update.
1413         * gnulib/import/stat-time.h: Update.
1414         * gnulib/import/stat-w32.c: Update.
1415         * gnulib/import/stat-w32.h: Update.
1416         * gnulib/import/stat.c: Update.
1417         * gnulib/import/stdbool.in.h: Update.
1418         * gnulib/import/stddef.in.h: Update.
1419         * gnulib/import/stdint.in.h: Update.
1420         * gnulib/import/stdio.in.h: Update.
1421         * gnulib/import/stdlib.in.h: Update.
1422         * gnulib/import/str-two-way.h: Update.
1423         * gnulib/import/strchrnul.c: Update.
1424         * gnulib/import/strdup.c: Update.
1425         * gnulib/import/streq.h: Update.
1426         * gnulib/import/strerror-override.c: Update.
1427         * gnulib/import/strerror-override.h: Update.
1428         * gnulib/import/strerror.c: Update.
1429         * gnulib/import/string.in.h: Update.
1430         * gnulib/import/stripslash.c: Update.
1431         * gnulib/import/strnlen1.c: Update.
1432         * gnulib/import/strnlen1.h: Update.
1433         * gnulib/import/strstr.c: Update.
1434         * gnulib/import/strtok_r.c: Update.
1435         * gnulib/import/sys_stat.in.h: Update.
1436         * gnulib/import/sys_time.in.h: Update.
1437         * gnulib/import/sys_types.in.h: Update.
1438         * gnulib/import/tempname.c: Update.
1439         * gnulib/import/tempname.h: Update.
1440         * gnulib/import/time.in.h: Update.
1441         * gnulib/import/unistd--.h: Update.
1442         * gnulib/import/unistd-safer.h: Update.
1443         * gnulib/import/unistd.in.h: Update.
1444         * gnulib/import/unsetenv.c: Update.
1445         * gnulib/import/verify.h: Update.
1446         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1447         * gnulib/import/wchar.in.h: Update.
1448         * gnulib/import/wctype.in.h: Update.
1449         * gnulib/import/xalloc-oversized.h: Update.
1450         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1451         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1452
1453 2018-08-16  Gary Benson <gbenson@redhat.com>
1454
1455         PR gdb/13000:
1456         * gdb/main.c (captured_main_1): Exit with nonzero status
1457         in batch mode if the last command to be executed failed.
1458         * NEWS: Mention the above.
1459
1460 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1461
1462         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1463         end of warning message.
1464
1465 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1466
1467         PR gdb/22943:
1468         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1469         (aarch64_extract_return_value): Use
1470         aapcs_is_vfp_call_or_return_candidate.
1471         (aarch64_return_in_memory): Likewise.
1472         (aarch64_store_return_value): Likewise.
1473
1474 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1475
1476         * aarch64-tdep.c
1477         (aapcs_is_vfp_call_or_return_candidate): Make static
1478         (pass_in_v_or_stack): Remove function.
1479         (pass_in_v_vfp_candidate): New function.
1480         (aarch64_push_dummy_call): Check for float register candidates.
1481
1482 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1483
1484         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1485         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1486         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1487
1488 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1489
1490         PR build/23399
1491         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1492         (struct ipa_sym_addresses): Rename to...
1493         (struct ipa_sym_addresses_common): ... this.
1494         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1495
1496 2018-08-28  Tom Tromey  <tom@tromey.com>
1497
1498         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1499         (token_fifo): Now a std::vector.
1500         (yylex, c_parse): Update.
1501         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1502         (token_fifo): Now a std::vector.
1503         (yylex, d_parse): Update.
1504         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1505         (token_fifo): Now a std::vector.
1506         (yylex, go_parse): Update.
1507
1508 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1509
1510         * parser-defs.h (struct type_stack) <elements>: Change type to
1511         std::vector<union type_stack_elt>.
1512         <depth, size>: Remove.
1513         * parse.c (parse_exp_in_context_1): Adjust.
1514         (type_stack_reserve): Remove.
1515         (check_type_stack_depth): Remove.
1516         (insert_into_type_stack): Adjust to std::vector.
1517         (insert_type): Likewise.
1518         (push_type): Likewise.
1519         (push_type_int): Likewise.
1520         (insert_type_address_space): Likewise.
1521         (pop_type): Likewise.
1522         (pop_type_int): Likewise.
1523         (pop_typelist): Likewise.
1524         (pop_type_stack): Likewise.
1525         (append_type_stack): Likewise.
1526         (push_type_stack): Likewise.
1527         (get_type_stack): Likewise.
1528         (type_stack_cleanup): Likewise.
1529         (push_typelist): Likewise.
1530         (follow_types): Likewise.
1531         (_initialize_parse): Likewise.
1532
1533 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1534
1535         * NEWS: Mention csky target.
1536
1537 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1538             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1539             Don Breazeal  <donb@codesourcery.com>
1540
1541         * csky-linux-tdep.c: New file.
1542         * csky-tdep.c: Likewise.
1543         * csky-tdep.h: Likewise.
1544         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1545         csky-tdep.o.
1546         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1547         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1548         * configure.tgt: Add csky support.
1549
1550 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1551
1552         * python/py-framefilter.c (py_print_frame): Print frame architecture
1553         when printing on an MI output.
1554
1555 2018-08-27  Tom Tromey  <tom@tromey.com>
1556
1557         PR build/23087:
1558         * configure: Rebuild.
1559         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1560
1561 2018-08-27  Tom Tromey  <tom@tromey.com>
1562
1563         * aarch64-linux-tdep.c
1564         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1565         casts to int.
1566
1567 2018-08-27  Tom Tromey  <tom@tromey.com>
1568
1569         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1570         unsigned.
1571         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1572         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1573         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1574         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1575         unsigned.
1576
1577 2018-08-27  Tom Tromey  <tom@tromey.com>
1578
1579         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1580         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1581
1582 2018-08-27  Tom Tromey  <tom@tromey.com>
1583
1584         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1585         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1586         ULONGEST_MAX.
1587         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1588         ULONGEST_MAX.
1589         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1590         ULONGEST_MAX.
1591         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1592         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1593         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1594         ULONGEST_MAX.
1595         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1596         (ppc64_linux_sigaction_tramp_frame)
1597         (ppc32_linux_sighandler_tramp_frame)
1598         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1599         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1600         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1601         * mn10300-linux-tdep.c (am33_linux_sigframe)
1602         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1603         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1604         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1605         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1606         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1607         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1608         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1609         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1610         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1611         * microblaze-linux-tdep.c
1612         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1613         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1614         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1615         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1616         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1617         * common/common-types.h (ULONGEST_MAX): New define.
1618         (CORE_ADDR_MAX): Fix formatting.
1619         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1620         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1621         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1622         (arm_linux_rt_sigreturn_tramp_frame)
1623         (arm_eabi_linux_sigreturn_tramp_frame)
1624         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1625         (thumb2_eabi_linux_sigreturn_tramp_frame)
1626         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1627         (arm_linux_restart_syscall_tramp_frame)
1628         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1629         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1630         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1631         ULONGEST_MAX.
1632         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1633
1634 2018-08-27  Tom Tromey  <tom@tromey.com>
1635
1636         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1637         CORE_ADDR_MAX.
1638         * mips-tdep.c (mips_deal_with_atomic_sequence)
1639         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1640         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1641         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1642         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1643         CORE_ADDR_MAX.
1644         * aarch64-tdep.c (aarch64_software_single_step): Use
1645         CORE_ADDR_MAX.
1646
1647 2018-08-27  Tom Tromey  <tom@tromey.com>
1648
1649         * linespec.c (complete_linespec_component): Add cast to "char".
1650         * completer.c (completion_tracker::build_completion_result): Add
1651         cast to "char".
1652
1653 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1654
1655         * solist.h (struct solist, struct target_so_ops): Fix
1656         indentation.
1657
1658 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1659
1660         * ada-tasks.c (ada_task_info_s): Remove typedef.
1661         (DEF_VEC_O(ada_task_info_s)): Remove.
1662         (struct ada_tasks_inferior_data): Initialize fields.
1663         <task_list>: Make an std::vector.
1664         (get_ada_tasks_inferior_data): Allocate with new.
1665         (ada_get_task_number): Adjust.
1666         (get_task_number_from_id): Likewise.
1667         (valid_task_id): Likewise.
1668         (ada_get_task_info_from_ptid): Likewise.
1669         (iterate_over_live_ada_tasks): Likewise.
1670         (add_ada_task): Likewise.
1671         (read_known_tasks): Likewise.
1672         (ada_build_task_list): Likewise.
1673         (print_ada_task_info): Likewise.
1674         (info_task): Likewise.
1675         (task_command_1): Likewise.
1676
1677 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1678
1679         * ada-lang.c (add_angle_brackets): Return std::string.
1680
1681 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1682
1683         * python/py-threadevent.c (py_get_event_thread): Initialize
1684         pythread.
1685
1686 2018-08-24  Pedro Alves  <palves@redhat.com>
1687
1688         * python/py-bpevent.c (create_breakpoint_event_object): Use
1689         copy-initialization.
1690         * python/py-continueevent.c (emit_continue_event): Use
1691         copy-initialization.
1692         * python/py-exitedevent.c (create_exited_event_object): Return a
1693         gdbpy_ref<>.
1694         (emit_exited_event): Use copy-initialization.
1695         * python/py-inferior.c (python_new_inferior)
1696         (python_inferior_deleted, add_thread_object): Use
1697         copy-initialization.
1698         * python/py-infevents.c (create_inferior_call_event_object)
1699         (create_register_changed_event_object)
1700         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1701         (emit_inferior_call_event, emit_memory_changed_event)
1702         (emit_register_changed_event): Use copy-initialization.
1703         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1704         Return a gdbpy_ref<>.
1705         (emit_new_objfile_event): Use copy-initialization.
1706         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1707         (emit_clear_objfiles_event): Use copy-initialization.
1708         * python/py-signalevent.c (create_signal_event_object): Use
1709         copy-initialization.
1710         * python/py-threadevent.c (create_thread_event_object): Use
1711         copy-initialization.
1712
1713 2018-08-24  Pedro Alves  <palves@redhat.com>
1714             Simon Marchi  <simon.marchi@ericsson.com>
1715
1716         PR gdb/23379
1717         * python/py-continueevent.c: Include "gdbthread.h".
1718         (create_continue_event_object): Add intro comment.  Add 'ptid'
1719         parameter.  Use it to find thread to pass to
1720         create_thread_event_object.
1721         (emit_continue_event): Pass PTID down to
1722         create_continue_event_object.
1723         * python/py-event.h (py_get_event_thread): Declare.
1724         (create_thread_event_object): Remove default from 'thread'
1725         parameter.
1726         * python/py-stopevent.c (create_stop_event_object): Use
1727         py_get_event_thread.
1728         * python/py-threadevent.c (get_event_thread): Rename to ...
1729         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1730         and use it to find the thread.
1731         (create_thread_event_object): Assert that THREAD isn't null.
1732         Don't find the event thread here.
1733
1734 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1735
1736         * block.h (blockrange, blockranges): New struct declarations.
1737         (struct block): Add new field named `ranges'.
1738         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1739         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1740         macros for accessing ranges in struct block.
1741         (make_blockranges): New declaration.
1742         block.c (make_blockranges): New function.
1743         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1744         for block.
1745         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1746         * blockframe.c (cache_pc_function_block): New static global.
1747         (clear_pc_function_cache): Clear cache_pc_function_block.
1748         (find_pc_partial_function): Move comment to symtab.h.  Add
1749         support for non-contiguous blocks.
1750         * cli/cli-cmds.c (block.h): Include.
1751         (print_disassembly): Handle printing of non-contiguous blocks.
1752         (disassemble_current_function): Likewise.
1753         (disassemble_command): Likewise.
1754
1755         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1756         BLOCK_START.
1757         * blockframe.c (get_pc_function_start): Likewise.
1758         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1759         (gcc_symbol_address): Likewise.
1760         * compile/compile-object-run.c (compile_object_run): Likewise.
1761         * compile/compile.c (get_expr_block_and_pc): Likewise.
1762         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1763         (func_addr_to_tail_call_list): Likewise.
1764         * findvar.c (default_read_var_value): Likewise.
1765         * inline-frame.c (inline_frame_this_id): Likewise.
1766         (skip-inline_frames): Likewise.
1767         * infcmd.c (until_next_command): Likewise.
1768         * linespec.c (convert_linespec_to_sals): Likewise.
1769         * parse.c (parse_exp_in_context_1): Likewise.
1770         * printcmd.c (build_address_symbolic): likewise.
1771         (info_address_command): Likewise.
1772         symtab.c (find_function_start_sal): Likewise.
1773         (skip_prologue_sal): Likewise.
1774         (find_function_alias_target): Likewise.
1775         (find_gnu_ifunc): Likewise.
1776         * stack.c (find_frame_funname): Likewise.
1777         * symtab.c (fixup_symbol_section): Likewise.
1778         (find_function_start_sal): Likewise.
1779         (skip_prologue_sal): Likewsie.
1780         (find_function_alias_target): Likewise.
1781         (find_gnu_ifunc): Likewise.
1782         * tracepoint.c (info_scope_command): Likewise.
1783         * value.c (value_fn_field): Likewise.
1784
1785         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1786         in place of find_pc_partial_function.
1787         * blockframe.c (find_function_entry_range_from_pc): New function.
1788         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1789         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1790         for each range in a block.
1791
1792
1793 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1794
1795         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1796         incrementation.
1797
1798 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1799
1800         * solib-svr4.c (read_program_headers_from_bfd): Return
1801         gdb::optional<gdb::byte_vector>.
1802         (svr4_exec_displacement): Adjust.
1803
1804 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1805
1806         * solib-svr4.c (read_program_header): Return
1807         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1808         (find_program_interpreter): Return
1809         gdb::optional<gdb::byte_vector>.
1810         (scan_dyntag_auxv): Adjust.
1811         (enable_break): Adjust.
1812         (svr4_exec_displacement): Adjust.
1813
1814 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1815
1816         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1817         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1818
1819 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1820
1821         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1822         string_vprintf.
1823         * guile/scm-utils.c (gdbscm_printf): Likewise.
1824         * serial.c (serial_printf): Likewise.
1825         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1826
1827 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1828
1829         * stack.c (print_frame): Print frame architecture when printing on
1830         an MI output.
1831         * NEWS: Mention new "arch" attribute in frame output.
1832
1833 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1834
1835         * arch/aarch64.h (aarch64_regnum): Update comment.
1836
1837 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1838
1839         * NEWS: Add SVE to 8.2 section.
1840
1841 2018-08-21  Pedro Alves  <palves@redhat.com>
1842
1843         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1844         out from gdbscm_parse_function_args.
1845         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1846         gdbscm_parse_function_args_1.
1847
1848 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1849
1850         PR gdb/17816
1851         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1852         operator.
1853
1854 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1855
1856         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1857
1858 2018-08-19  Michael Spang  <spang@google.com>
1859
1860         PR gdb/11786
1861         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1862         for PT_TLS segments.
1863
1864 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1865
1866         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1867         dwarf_variable_value.
1868         * dwarf2-frame.c (class dwarf_expr_executor):
1869         Add override for dwarf_variable_value.
1870         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1871         (class symbol_needs_eval_context): Likewise.
1872         (indirect_synthetic_pointer): Add forward declaration.
1873         (sect_variable_value): New function.
1874         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1875         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1876         for DW_OP_GNU_variable_value.
1877
1878 2018-08-16  Tom Tromey  <tom@tromey.com>
1879
1880         * top.c (read_command_file): Update.
1881         (command_line_input): Remove "repeat" argument.
1882         * ada-lang.c (get_selections): Update.
1883         * linespec.c (decode_line_2): Update.
1884         * defs.h (command_line_input): Remove argument.
1885         * cli/cli-script.c (read_next_line): Update.
1886         * python/py-gdb-readline.c: Update.
1887
1888 2018-08-17  Tom Tromey  <tom@tromey.com>
1889
1890         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1891         command_line_input.
1892
1893 2018-08-15  Tom Tromey  <tom@tromey.com>
1894
1895         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1896
1897 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1898
1899         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1900         If used, use find_pc_partial_function to find address range
1901         to disassemble.
1902         * mi/mi-main.c (mi_cmd_list_features): Report
1903         "data-disassemble-a-option" feature.
1904         * NEWS: Mention new -data-disassemble option -a.
1905
1906 2018-08-13  Tom Tromey  <tom@tromey.com>
1907
1908         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1909
1910 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1911
1912         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1913         (aarch64_linux_collect_sve_regset): Likewise.
1914         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1915         * regcache.h (regcache_map_entry_size): New function.
1916
1917 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1918
1919         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1920         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1921         (SVE_HEADER_VL_LENGTH): Likewise.
1922         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1923         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1924         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1925         (SVE_HEADER_SIZE_OFFSET): Likewise.
1926         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1927         (SVE_HEADER_VL_OFFSET): Likewise.
1928         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1929         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1930         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1931         (SVE_HEADER_SIZE): Likewise.
1932         (aarch64_linux_core_read_vq): Add function.
1933         (aarch64_linux_core_read_description): Check for SVE section.
1934
1935 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1936
1937         * aarch64-fbsd-tdep.c
1938         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1939         collect_size.
1940         * aarch64-linux-tdep.c
1941         (aarch64_linux_iterate_over_regset_sections): Likewise.
1942         * alpha-linux-tdep.c
1943         (alpha_linux_iterate_over_regset_sections):
1944         * alpha-nbsd-tdep.c
1945         (alphanbsd_iterate_over_regset_sections): Likewise.
1946         * amd64-fbsd-tdep.c
1947         (amd64fbsd_iterate_over_regset_sections): Likewise.
1948         * amd64-linux-tdep.c
1949         (amd64_linux_iterate_over_regset_sections): Likewise.
1950         * arm-bsd-tdep.c
1951         (armbsd_iterate_over_regset_sections): Likewise.
1952         * arm-fbsd-tdep.c
1953         (arm_fbsd_iterate_over_regset_sections): Likewise.
1954         * arm-linux-tdep.c
1955         (arm_linux_iterate_over_regset_sections): Likewise.
1956         * corelow.c (get_core_registers_cb): Likewise.
1957         (core_target::fetch_registers): Likewise.
1958         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1959         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1960         * gdbarch.h (void): Regenerate.
1961         * gdbarch.sh: Add supply_size and collect_size.
1962         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1963         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1964         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1965         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1966         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1967         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1968         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1969         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1970         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1971         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1972         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1973         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1974         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1975         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1976         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1977         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1978         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1979         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1980         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1981         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1982         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1983         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1984         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1985         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1986         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1987         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1988         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1989         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1990         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1991         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1992
1993 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1994
1995         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1996         with string_printf.
1997
1998 2018-08-10  Keith Seitz  <keiths@redhat.com>
1999
2000         * compile/compile-c-support.c (add_code_header, add_code_footer):
2001         Move into policy class.
2002         (c_push_user_expression, pop_user_expression_nop)
2003         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2004         (compile_program): New host class.
2005         (c_compile_program): New typedef.
2006         (c_compute_porgram): Use c_compile_program.
2007
2008 2018-08-10  Keith Seitz  <keiths@redhat.com>
2009
2010         * compile/compile-internal.h (compile_instance::~compile_instance):
2011         Remove calls to htab_delete.
2012         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2013         * compile.c (compile_instance::compile_instance): Initialize
2014         htab unique pointers.
2015         (compile_instance::get_cached_type, compile_instance::insert_type)
2016         (compile_instance::error_symbol_once): Update for unique_ptr.
2017
2018 2018-08-10  Keith Seitz  <keiths@redhat.com>
2019
2020         * compile/compile-c-symbols.c (struct symbol_error)
2021         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2022         (compile_instance::insert_symbol_error)
2023         (compile_instance::error_symbol_once): Move to ...
2024         * compile/compile.c: ... here.
2025
2026 2018-08-10  Keith Seitz  <keiths@redhat.com>
2027
2028         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2029         instead of `new_compile_instance'.
2030         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2031         Update description.
2032         If the symbol error map is not initialized, create it.
2033         (generate_c_for_for_one_symbol): Do not check/initialize
2034         the symbol error map.
2035         * compile/compile-c-types.c (compile_c_instance): Make a class.
2036         Update all callers.
2037         (compile_instance::compile_instance): Initialize the type cache.
2038         (get_cached_type): New function.
2039         (insert_type): Update description.
2040         (compile_c_instance::m_default_cflags): Define.
2041         (convert_type): Update description.  Use get_cached_type.
2042         (delete_instance): Moved to destructor.
2043         (new_compile_instance): Moved to constructor.
2044         * compile/compile-c.h (compile_c_instance): Make class inheriting
2045         from compile_instance.
2046         <base>: Remove field.
2047         <type_map, symbol_err_map>: Move to base class.
2048         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2049         * compile/compile-internal.h (compile_instance): Make class.
2050         <type_map_t, symbol_err_map_t>: Define.
2051         <fe>: Rename to `m_gcc_fe'.
2052         <scope, block, gcc_target_options>: Add `m_' prefix.
2053         <m_type_map, m_symbol_err_map>: New fields, moved from
2054         compile_c_instance.
2055         <destroy>: Remove.
2056         (convert_type, new_compile_instance): Remove.
2057         * compile/compile.c (cleanup_compile_instance): Remove.
2058         (compile_to_object): Use unique_ptr to eliminate cleanups.
2059         (compile_instance::set_print_callback, compile_instance::version)
2060         (compile_instance::set_verbose)
2061         (compile_instance::set_driver_filename)
2062         (compile_instance::set_triplet_regexp)
2063         (compile_instance::set_arguments)
2064         (compile_instance::set_source_file)
2065         (compile_instance::compile): Define.
2066
2067 2018-08-10  Keith Seitz  <keiths@redhat.com>
2068
2069         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2070         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2071         gcc-c-fe.def to define C plugin.
2072         (delete_instance): Delete `c_plugin'.
2073         (new_compile_instance): Initialize `c_plugin'.
2074         * compile/compile-c.h: Include gcc_c_plugin.h.
2075         (struct compile_c_instance) <c_plugin>: New member.
2076         * gcc-c-plugin.h: New file.
2077         Update all callers with API change.
2078
2079 2018-08-10  Keith Seitz  <keiths@redhat.com>
2080
2081         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2082         (HFILES_NO_SRCDIR): ... to here.
2083         Add compile-internal.h and compile-c.h.
2084         * compile/compile-c-support.c: Include compile-c.h.
2085         * compile/compile-c-symbols.c: Include compile-c.h.
2086         (generate_c_for_variable_locations): Update comment.
2087         * compile/compile-c-types.c: Include compile-c.h.
2088         * compile/compile-c.h: New file -- moved C language declarations
2089         from other files here.
2090         * compile/compile-internal.h: Do not include hashtab.h or
2091         common/enum-flags.h.
2092         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2093         (gcc_convert_symbol, gcc_symbol_address)
2094         (generate_c_for_variable_locations, c_get_mode_for_size)
2095         (c_get_range_decl_name): Definitions moved to compile-c.h.
2096         * compile/compile-loc2c.c: Include compile-c.h.
2097
2098 2018-08-10  Keith Seitz  <keiths@redhat.com>
2099
2100         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2101         (c_symbol_substitution_name): ... this.
2102         Update all callers.
2103
2104 2018-08-10  Keith Seitz  <keiths@redhat.com>
2105
2106         * compile/compile-c-support.c (c_compute_program): Use
2107         unique_xmalloc_ptr to eliminate cleanup.
2108         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2109         Return a unique_xmalloc_ptr and eliminate cleanup.
2110         * compile/compile-internal.h (generate_c_for_variable_locations):
2111         Return unique_xmalloc_ptr and update description.
2112
2113 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2114
2115         * corelow.c (core_target::get_core_register_section): Rename
2116         min_size to section_min_size.
2117
2118 2018-08-09  Jim Wilson  <jimw@sifive.com>
2119
2120         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2121         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2122         * NEWS: Mention new GNU/Linux RISC-V target.
2123         * configure.host: Add riscv*-*-linux*.
2124         * configure.nat: Add riscv*.
2125         * configure.tgt: Add riscv*-*-linux*.
2126         * riscv-linux-nat.c: New file.
2127         * riscv-linux-tdep.c: New file.
2128
2129 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2130
2131         * infrun.c (resume): Make static, add forward declaration.
2132         (proceed): Update header comment.
2133         * infrun.h (resume): Delete declaration.
2134
2135 2018-08-09  Tom Tromey  <tom@tromey.com>
2136
2137         * riscv-tdep.h: Minor formatting fixes.
2138
2139 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2140
2141         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2142         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2143         (test_mkdir_recursive): Likewise.
2144         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2145
2146 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2147
2148         * valarith.c (value_subscripted_rvalue): If an array is not in
2149         memory, and we don't know the upper bound, then we can't know that
2150         the requested element exists or not.
2151
2152 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2153
2154         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2155         (target_options_to_string): Add comment.
2156
2157 2018-08-08  Tom Tromey  <tom@tromey.com>
2158
2159         * unittests/scoped_mmap-selftests.c: Check result of "write".
2160
2161 2018-08-08  Jim Wilson  <jimw@sifive.com>
2162
2163         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2164         (decode_register_index_short): New.
2165         (decode_j_type_insn, decode_cj_type_insn): New.
2166         (decode_b_type_insn, decode_cb_type_insn): New.
2167         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2168         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2169         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2170         is_c_sw_insn instead of is_sw_insn.
2171         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2172         (riscv_software_single_step): New.
2173         * riscv-tdep.h (riscv_software_single_step): Declare.
2174
2175         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2176         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2177
2178 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2179
2180         PR gdb/18050:
2181         * target.c (dispose_inferior): Don't dispose of inferiors that are
2182         already killed.
2183
2184 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2185
2186         * remote.c (remote_target::download_tracepoint): Change char* to
2187         const char*.
2188
2189 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2190
2191         * target.h (target_options_to_string): Return an std::string.
2192         * target.c (str_comma_list_concat_elem): Return void, use
2193         std::string.
2194         (do_option): Likewise.
2195         (target_options_to_string): Return an std::string.
2196         * linux-nat.c (linux_nat_target::wait): Adjust.
2197         * target-debug.h (target_debug_print_options): Adjust.
2198
2199 2018-08-07  Tom Tromey  <tom@tromey.com>
2200
2201         * Makefile.in (CPPFLAGS): New variable.
2202         (INTERNAL_CPPFLAGS): Use it.
2203
2204 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2205
2206         * NEWS: Mention the index cache.
2207
2208 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2209
2210         * common/pathstuff.h (get_standard_cache_dir): New.
2211         * common/pathstuff.c (get_standard_cache_dir): New.
2212         * build-id.h (build_id_to_string): New.
2213         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2214         DEBUG_STR_SUFFIX): Move to here.
2215         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2216         DEBUG_STR_SUFFIX): Move from there.
2217         (write_psymtabs_to_index): Make non-static, add basename
2218         parameter.  Write to temporary files, rename when done.
2219         (save_gdb_index_command): Adjust call to
2220         write_psymtabs_to_index.
2221         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2222         field.
2223         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2224         (get_gdb_index_contents_from_cache): New.
2225         (get_gdb_index_contents_from_cache_dwz): New.
2226         (dwarf2_initialize_objfile): Read index from cache.
2227         (dwarf2_build_psymtabs): Save to index.
2228         * dwarf-index-cache.h: New file.
2229         * dwarf-index-cache.c: New file.
2230         * dwarf-index-write.h: New file.
2231
2232 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2233
2234         * gnulib/aclocal.m4: Re-generate.
2235         * gnulib/config.in: Re-generate.
2236         * gnulib/configure: Re-generate.
2237         * gnulib/import/Makefile.am: Re-generate.
2238         * gnulib/import/Makefile.in: Re-generate.
2239         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2240         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2241         * gnulib/import/m4/mkdir.m4: New file.
2242         * gnulib/import/mkdir.c: New file.
2243         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2244         module.
2245
2246 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2247
2248         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2249         * common/scoped_mmap.c: New file.
2250         * common/scoped_mmap.h (destroy): New method.
2251         (~scoped_mmap, reset): Use destroy.
2252         (scoped_mmap): New move constructor.
2253         (mmap_file): New declaration.
2254         * unittests/scoped_mmap-selftests.c (test_normal,
2255         test_invalid_filename, run_tests): New functions.
2256         (_initialize_scoped_mmap_selftests): Register selftest.
2257
2258 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2259
2260         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2261         (read_gdb_index_from_buffer): ... this.  Remove section
2262         parameter, add buffer parameter.
2263         (get_gdb_index_contents_ftype,
2264         get_gdb_index_contents_dwz_ftype): New typedefs.
2265         (dwarf2_read_gdb_index): Add callback parameters to get the
2266         index contents.
2267         (get_gdb_index_contents_from_section): New.
2268         (dwarf2_initialize_objfile): Update call to
2269         dwarf2_read_gdb_index.
2270
2271 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2272
2273         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2274         (gdb_open_cloexec): Likewise.
2275         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2276         (commandline_from_pid): Likewise.
2277         (linux_xfer_osdata_threads): Likewise.
2278         (linux_xfer_osdata_fds): Likewise.
2279         * ada-lang.c (is_package_name): Likewise.
2280         * auxv.c (procfs_xfer_auxv): Likewise.
2281         * breakpoint.c (print_one_breakpoint_location): Use
2282         uiout::field_fmt.
2283         (print_one_catch_solib): Use string_printf.
2284         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2285         (add_pe_forwarded_sym): Likewise.
2286         * dwarf2read.c (create_type_unit_group): Likewise.
2287         (build_error_marker_type): Likewise.
2288         * infcall.c (get_function_name): Likewise.
2289         * valprint.c (print_converted_chars_to_obstack): Likewise.
2290         * xtensa-tdep.c (xtensa_register_type): Likewise.
2291
2292 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2293
2294         * remote.c (remote_target::download_tracepoint): Fix format
2295         string errors.
2296
2297 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2298
2299         * tracefile.c: Include common/byte-vector.h.
2300         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2301         with trace_regblock_size if needed.  Update uses of buf.
2302
2303 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2304
2305         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2306         std::vector<unsigned char>.
2307         * tracepoint.c (collection_list::collection_list): Remove
2308         m_regs_mask initializer from initializer list.  Resize
2309         m_regs_mask using the largest remote register number.
2310         (collection_list::add_remote_register): Remove size check on
2311         m_regs_mask.  Use at to access element.
2312         (collection_list::stringify): Change type of temp_buf to
2313         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2314         stringify the register mask.  Use pack_hex_byte for the register
2315         mask.
2316
2317 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2318
2319         * tracepoint.h (class collection_list) <add_register>: Remove.
2320         <add_remote_register, add_ax_registers, add_local_register>:
2321         Declare.
2322         <add_memrange>: Add scope parameter.
2323         * tracepoint.c (encode_actions_1): Likewise.
2324         (collection_list::add_register): Rename to ...
2325         (collection_list::add_remote_register): ... this.  Update
2326         comment.
2327         (collection_list::add_ax_registers, add_local_register): New
2328         methods.
2329         (collection_list::add_memrange): Add scope parameter.  Call
2330         add_local_register instead of add_register.
2331         (finalize_tracepoint_aexpr): New function.
2332         (collection_list::collect_symbol): Update calls to add_memrange.
2333         Call add_local_register instead of add_register.  Call
2334         add_ax_registers.  Call finalize_tracepoint_aexpr.
2335         (encode_actions_1): Get remote regnos for $reg action.  Call
2336         add_remote_register, add_ax_registers, and add_local_register.
2337         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2338         (validate_actionline): Call finalize_tracepoint_aexpr.
2339
2340 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2341
2342         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2343         Replace array buf with gdb::char_vector buf, of size
2344         get_remote_packet_size ().  Replace references to buf and
2345         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2346         and xsnprintf with snprintf.  Raise errors if the buffer is too
2347         small.
2348
2349 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2350
2351         * remote.c (remote_target::download_tracepoint): Fix the has_more
2352         predicate in the QTDP action list iteration.
2353
2354 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2355
2356         * remote.c (remote_target::download_tracepoint): Fix indentation
2357         in for block.
2358
2359 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2360
2361         * proc-api.c (_initialize_proc_api): Remove c, unused.
2362         * procfs.c (procfs_init_inferior): Remove signals, unused.
2363         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2364         unused.
2365
2366 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2367             Andrew Burgess  <andrew.burgess@embecosm.com>
2368
2369         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2370         'W_STOPCODE (0)' as this could be ambiguous.
2371
2372 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2373
2374         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2375         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2376         "ai_socktype").
2377
2378 2018-08-02  Tom Tromey  <tom@tromey.com>
2379
2380         PR symtab/16842.
2381         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2382         symbols.
2383         (process_structure_scope): Likewise.
2384
2385 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2386
2387         PR gdb/22629:
2388         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2389         kill inferior.
2390
2391 2018-08-02  Tom Tromey  <tom@tromey.com>
2392
2393         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2394         (darwin_suspend_inferior, darwin_resume_inferior)
2395         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2396         (darwin_check_new_threads): Check result of get_darwin_inferior.
2397
2398 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2399
2400         GDB 8.1.1 released.
2401
2402 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2403
2404         * varobj.c (varobj_get_path_expr_parent): Report an error if
2405         parent is a dynamic varobj.
2406
2407 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2408
2409         * gnulib/aclocal.m4: Re-generate.
2410         * gnulib/config.in: Re-generate.
2411         * gnulib/configure: Re-generate.
2412         * gnulib/import/Makefile.in: Re-generate.
2413         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2414         * gnulib/import/m4/onceonly.m4: Re-generate.
2415
2416 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2417
2418         * target-descriptions.c (struct xml_test_tdesc): New.
2419         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2420         (record_xml_tdesc): Update.
2421         (maintenance_check_xml_descriptions): Update.
2422         * target-descriptions.h (record_xml_tdesc): Update comment.
2423
2424 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2425
2426         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2427         checking array bounds are defined.
2428
2429 2018-07-30  Tom Tromey  <tom@tromey.com>
2430
2431         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2432         irreflexivity violation.
2433
2434 2018-07-30  Tom Tromey  <tom@tromey.com>
2435
2436         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2437         * value.c (unpack_long): Remove lint code.
2438         * valops.c (value_ind): Remove lint code.
2439         * valarith.c (value_x_binop, value_x_unop, value_equal)
2440         (value_pos): Remove lint code.
2441
2442 2018-07-28  Tom de Vries  <tdevries@suse.de>
2443
2444         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2445         with undefined upper bound as <optimized out>.
2446
2447 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2448
2449         * gcore.in: Rename variable "name" to "prefix".  Expand
2450         "usage" text.
2451
2452 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2453
2454         * windows-nat.c (windows_nat_target::create_inferior): Update to
2455         call close() in global namespace.
2456
2457 2018-07-26  Tom Tromey  <tom@tromey.com>
2458
2459         * dwarf-index-write.c (add_address_entry): Don't add objfile
2460         offsets.
2461         * dbxread.c (find_stab_function): Rename from
2462         find_stab_function_addr.  Return a bound_minimal_symbol.
2463         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2464         Don't add objfile offsets.
2465         (end_psymtab): Use raw_text_low, raw_text_high,
2466         MSYMBOL_VALUE_RAW_ADDRESS.
2467         (read_ofile_symtab): Update.
2468         (process_one_symbol): Update.
2469         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2470         offsets.
2471         (dw2_relocate): Remove.
2472         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2473         searching addrmap.
2474         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2475         Update.
2476         (process_psymtab_comp_unit_reader, add_partial_symbol)
2477         (add_partial_subprogram, dwarf2_ranges_read): Update.
2478         (load_partial_dies): Update.
2479         (add_address_entry): Don't add objfile offsets.
2480         (dwarf2_build_include_psymtabs): Update.
2481         (create_addrmap_from_aranges): Don't add objfile offsets.
2482         (dw2_find_pc_sect_compunit_symtab): Update.
2483         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2484         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2485         Update.
2486         (parse_partial_symbols): Don't add objfile offsets.  Use
2487         raw_text_low, raw_text_high.  Update.
2488         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2489         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2490         or call 'relocate' quick function.  Clear psymbol_map.
2491         * psympriv.h (struct partial_symbol) <address>: Add section
2492         offset.
2493         <set_unrelocated_address>: Rename from set_address.
2494         <raw_text_low, raw_text_high>: New methods.
2495         <text_low, text_high>: Add objfile parameter.
2496         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2497         set_unrelocated_address.
2498         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2499         (find_pc_psymbol): Update.
2500         (fixup_psymbol_section, relocate_psymtabs): Remove.
2501         (dump_psymtab, psym_functions): Update.
2502         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2503         parameter.
2504         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2505         (start_psymtab_common): Update.
2506         * symfile-debug.c (debug_qf_relocate): Remove.
2507         (debug_sym_quick_functions): Update.
2508         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2509         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2510         Update.
2511
2512 2018-07-26  Tom Tromey  <tromey@redhat.com>
2513
2514         * dbxread.c (end_psymtab): Use text_high_valid and
2515         text_low_valid.
2516         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2517         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2518         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2519         Update comment.
2520         <text_low_valid, text_high_valid>: New fields.
2521         <set_text_low, set_text_high>: Update.
2522         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2523
2524 2018-07-26  Tom Tromey  <tom@tromey.com>
2525
2526         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2527         Update.
2528         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2529         textlow and texthigh fields.
2530         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2531         Update.
2532         * mdebugread.c (parse_lines, parse_partial_symbols)
2533         (psymtab_to_symtab_1): Update.
2534         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2535         Rename fields.  Update comment.  Now private.
2536         <text_low, text_high, set_text_low, set_text_high>: New methods.
2537         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2538         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2539         (start_psymtab_common, maintenance_info_psymtabs)
2540         (maintenance_check_psymtabs): Update.
2541         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2542         texthigh fields.
2543         (scan_xcoff_symtab): Update.
2544
2545 2018-07-26  Tom Tromey  <tromey@redhat.com>
2546
2547         * psympriv.h (struct partial_symbol) <unrelocated_address,
2548         address, set_address>: New methods.
2549         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2550         (fixup_psymbol_section, relocate_psymtabs): Update.
2551         (print_partial_symbols): Add 'objfile' parameter.  Update.
2552         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2553         Update.
2554
2555 2018-07-26  Tom Tromey  <tom@tromey.com>
2556
2557         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2558         (debug_names::write_psymbols): Update.
2559         * psympriv.h (struct partial_symbol): Derive from
2560         general_symbol_info.
2561         <obj_section>: New method.
2562         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2563         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2564         (find_pc_sect_psymbol, fixup_psymbol_section)
2565         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2566         (print_partial_symbols, recursively_search_psymtabs)
2567         (compare_psymbols, psymbol_hash, psymbol_compare)
2568         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2569         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2570
2571 2018-07-26  Tom Tromey  <tromey@redhat.com>
2572
2573         * dbxread.c (end_psymtab): Remove dead code.
2574
2575 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2576
2577         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2578         DWARF unwinders are disabled.
2579         * dwarf2-frame.c: Add dwarf2read.h include.
2580         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2581         disabled.
2582         (dwarf2_frame_unwinders_enabled_p): Define.
2583         (show_dwarf_unwinders_enabled_p): New function.
2584         (_initialize_dwarf2_frame): Register switch to control DWARF
2585         unwinder use.
2586         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2587         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2588         (show_dwarf_cmdlist): Remove static keyword.
2589         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2590         (show_dwarf_cmdlist): Declare.
2591         * NEWS: Document new feature.
2592
2593 2018-07-26  Tom de Vries  <tdevries@suse.de>
2594
2595         PR breakpoints/23366
2596         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2597
2598 2018-07-26  Tom de Vries  <tdevries@suse.de>
2599
2600         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2601         DW_AT_count can't be translated to a dynamic prop.
2602
2603 2018-07-25  Tom de Vries  <tdevries@suse.de>
2604
2605         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2606         try/catch.
2607
2608 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2609
2610         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2611
2612 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2613
2614         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2615
2616 2018-07-24  Keith Seitz  <keiths@redhat.comt
2617
2618         PR symtab/23010
2619         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2620         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2621         instead of add_symbol_to_list.
2622         (read_file_scope): Call prepare_one_comp_unit before reading
2623         any other DIEs.
2624
2625 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2626
2627         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2628
2629 2018-07-24  Tom Tromey  <tom@tromey.com>
2630
2631         * utils.c (malloc, realloc, free): Don't declare.
2632         * configure, config.in: Rebuild.
2633         * configure.ac: Don't check for declarations of free, malloc, or
2634         realloc.
2635
2636 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2637
2638         * aarch64-linux-nat.c
2639         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2640         variable.
2641         * arm-linux-nat.c (fetch_regs): Likewise.
2642         (store_regs): Likewise.
2643         (fetch_vfp_regs): Likewise.
2644         (store_vfp_regs): Likewise.
2645         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2646         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2647         (arm_linux_nat_target::insert_watchpoint): Likewise.
2648         (arm_linux_nat_target::remove_watchpoint): Likewise.
2649         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2650         Likewise.
2651         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2652         Likewise.
2653         * ppc-linux-nat.c (fetch_register): Likewise.
2654         (fetch_all_gp_regs): Likewise.
2655         (fetch_ppc_registers): Likewise.
2656         (store_all_gp_regs): Likewise.
2657         (store_ppc_registers): Likewise.
2658         (hwdebug_insert_point): Likewise.
2659         (can_use_watchpoint_cond_accel): Likewise.
2660         * remote-sim.c (gdb_os_write_stdout): Likewise.
2661
2662 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2663             Tom Tromey  <tom@tromey.com>
2664
2665         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2666         test for it.
2667         * configure: Rebuild.
2668
2669 2018-07-22  Tom Tromey  <tom@tromey.com>
2670
2671         * regformats/regdat.sh: Define xmltarget_${name} inside
2672         #ifndef IN_PROCESS_AGENT.
2673
2674 2018-07-22  Tom Tromey  <tom@tromey.com>
2675
2676         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2677
2678 2018-07-22  Tom Tromey  <tom@tromey.com>
2679
2680         * symfile.c (reread_symbols): Notify iter, not objfile.
2681
2682 2018-07-22  Tom Tromey  <tom@tromey.com>
2683
2684         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2685         Use arch_ops.
2686         (ravenscar_thread_target::prepare_to_store): Likewise.
2687
2688 2018-07-22  Tom Tromey  <tom@tromey.com>
2689
2690         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2691         unused variable.  Call value_fetch_lazy when needed.
2692         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2693         Remove unused variable.  Call value_fetch_lazy when needed.
2694
2695 2018-07-22  Tom Tromey  <tom@tromey.com>
2696
2697         * m32c-tdep.c (mark_dma): Return void.
2698         (make_regs): Remove unused declarations.
2699
2700 2018-07-22  Tom Tromey  <tom@tromey.com>
2701
2702         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2703         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2704         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2705         bkscm_get_valid_block_smob_arg_unsafe for effect.
2706
2707 2018-07-22  Tom Tromey  <tom@tromey.com>
2708
2709         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2710         value_type.
2711
2712 2018-07-22  Tom Tromey  <tom@tromey.com>
2713
2714         * windows-nat.c (saved_context): Conditionally define.
2715         * remote.c (remote_target::remote_btrace_maybe_reopen):
2716         Conditionally declare "warned".
2717         * inflow.c (sigquit_ours): Conditionally define.
2718         (new_tty): Move "tty" declaration inside #if.
2719         * guile/guile.c (guile_datadir): Conditionally define.
2720         * charset.c (set_be_le_names): Move some declarations inside #if.
2721         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2722         #if.
2723         (parse_xml_btrace_conf): Likewise.
2724
2725 2018-07-22  Tom Tromey  <tom@tromey.com>
2726
2727         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2728
2729 2018-07-22  Tom Tromey  <tom@tromey.com>
2730
2731         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2732         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2733         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2734         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2735         * stack.c (frame_apply_level_command): Remove unused variable.
2736         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2737         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2738         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2739         unused variable.
2740         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2741         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2742         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2743         variable.
2744         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2745         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2746         variable.
2747         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2748         Remove unused variable.
2749         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2750         variable.
2751         * common/tdesc.c (print_xml_feature::visit): Remove unused
2752         variable.
2753         * compile/compile-object-load.c (store_regs): Remove unused
2754         variables.
2755         * complaints.c (clear_complaints): Remove unused variable.
2756         * corelow.c (core_target_open): Remove unused variable.
2757         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2758         variable.
2759         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2760         variable.
2761         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2762         variable.
2763         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2764         variable.
2765         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2766         variable.
2767         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2768         variable.
2769         * ia64-tdep.c (examine_prologue): Remove unused variable.
2770         * infcall.c (run_inferior_call): Remove unused variable.
2771         * inferior.c (exit_inferior): Remove unused variable.
2772         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2773         * linespec.c (decode_line_2): Remove unused variable.
2774         * linux-nat.c (super_close): Remove.
2775         * linux-tdep.c (linux_info_proc): Remove unused variable.
2776         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2777         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2778         Remove unused variable.
2779         * parse.c (find_minsym_type_and_address): Remove unused variable.
2780         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2781         variable.
2782         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2783         variable.
2784         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2785         variables.
2786         * record-btrace.c (record_btrace_target::store_registers): Remove
2787         unused variable.
2788         (cmd_show_record_btrace_cpu): Remove unused variable.
2789         * riscv-tdep.c (riscv_register_reggroup_p)
2790         (riscv_push_dummy_call, riscv_return_value): Remove unused
2791         variable.
2792         * rust-exp.y (literal): Remove unused variable.
2793         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2794         unused variable.
2795         <STRUCTOP_ANONYMOUS>: Likewise.
2796         * s390-linux-tdep.c (s390_linux_init_abi_31)
2797         (s390_linux_init_abi_64): Remove unused variable.
2798         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2799         (file_select_thread, net_windows_open, _initialize_ser_windows):
2800         Remove unused variables.
2801         * symtab.c (find_pc_sect_line): Remove unused variable.
2802         * target-memory.c (compute_garbled_blocks): Remove unused
2803         variable.
2804         (target_write_memory_blocks): Remove unused variable.
2805         * target.c (target_stack::unpush): Remove unused variables.
2806         * tracepoint.c (start_tracing, all_tracepoint_actions)
2807         (merge_uploaded_trace_state_variables)
2808         (print_one_static_tracepoint_marker): Remove unused variable.
2809         * unittests/basic_string_view/element_access/char/1.cc (test01):
2810         Remove unused variable.
2811         * windows-nat.c (windows_continue, windows_add_all_dlls)
2812         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2813         Remove unused variables.
2814
2815 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2816
2817         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2818         attr_profile in HAVE_ELF.
2819         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2820         HAVE_ELF.
2821
2822 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2823
2824         * frame.c (frame_register_unwind): Change parameter name.
2825         (frame_unwind_register): Likewise.
2826         (frame_unwind_register_value): Likewise.
2827         (frame_unwind_register_signed): Likewise.
2828         (frame_unwind_register_unsigned): Likewise.
2829         * frame.h (frame_register_unwind): Likewise.
2830         (frame_unwind_register): Likewise.
2831         (frame_unwind_register_value): Likewise.
2832         (frame_unwind_register_signed): Likewise.
2833         (frame_unwind_register_unsigned): Likewise.
2834         (frame_unwind_arch): Likewise.
2835
2836 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2837
2838         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2839         ISA maintenance.
2840
2841 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2842
2843         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2844         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2845         hand.
2846
2847 2018-07-20  Keith Seitz  <keiths@redhat.com>
2848
2849         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2850         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2851         m_compunit_symtab, m_language>: Add "m_" prefix.
2852         Update all uses.
2853         * buildsym.c: Update all uses.
2854
2855 2018-07-20  Tom Tromey  <tom@tromey.com>
2856
2857         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2858         * buildsym.h (record_line_ftype): Remove typedef.
2859
2860 2018-07-20  Tom Tromey  <tom@tromey.com>
2861
2862         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2863         (end_expandable_symtab): Likewise.
2864         (end_symtab_get_static_block): Likewise.
2865         (end_symtab_from_static_block): Likewise.
2866         * buildsym-legacy.c (augment_type_symtab): Remove.
2867         (end_expandable_symtab): Remove.
2868         (end_symtab_get_static_block): Remove.
2869         (end_symtab_from_static_block): Remove.
2870
2871 2018-07-20  Tom Tromey  <tom@tromey.com>
2872
2873         * dwarf2read.c: Include buildsym.h.
2874         (struct dwarf2_cu) <builder>: New method.
2875         (fixup_go_packaging): Update.
2876         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2877         use scoped_free_pendings.
2878         (using_directives): Add "cu" parameter, remove "language".
2879         (read_import_statement, setup_type_unit_groups, )
2880         (read_func_scope, read_lexical_block_scope)
2881         (dwarf2_record_block_ranges, read_namespace): Update.
2882         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2883         (lnp_state_machine::handle_end_sequence): Update.
2884         (class lnp_state_machine) <m_cu>: New member.
2885         <m_record_line_callback>: Remove.
2886         <m_currently_recording_lines>: New member.
2887         (lnp_state_machine::handle_set_file): Update.
2888         (noop_record_line): Remove.
2889         (dwarf_record_line_p): Add cu parameter.
2890         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2891         (lnp_state_machine::record_line)
2892         (lnp_state_machine::lnp_state_machine)
2893         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2894         (dwarf_decode_lines): Update.
2895         (dwarf2_start_subfile): Add cu parameter.
2896         (dwarf2_start_symtab, new_symbol): Update.
2897         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2898         Remove dwarf2_per_objfile parameter.
2899         (dwarf_decode_macros): Update.
2900
2901 2018-07-20  Tom Tromey  <tom@tromey.com>
2902
2903         * stabsread.c (define_symbol): Update.
2904         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2905         * dwarf2read.c (new_symbol): Update.
2906         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2907         * cp-namespace.c: Include buildsym.h.
2908         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2909         * buildsym-legacy.c (get_buildsym_compunit): New function.
2910
2911 2018-07-20  Tom Tromey  <tom@tromey.com>
2912
2913         * xcoffread.c: Include buildsym-legacy.h.
2914         * windows-nat.c: Include buildsym-legacy.h.
2915         * stabsread.c: Include buildsym-legacy.h.
2916         * mdebugread.c: Include buildsym-legacy.h.
2917         * buildsym-legacy.h: New file.
2918         * buildsym-legacy.c: New file, from buildsym.c.
2919         * go32-nat.c: Include buildsym-legacy.h.
2920         * dwarf2read.c: Include buildsym-legacy.h.
2921         * dbxread.c: Include buildsym-legacy.h.
2922         * cp-namespace.c: Include buildsym-legacy.h.
2923         * coffread.c: Include buildsym-legacy.h.
2924         * buildsym.h: Move some contents to buildsym-legacy.h.
2925         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2926         buildsym-legacy.c.
2927         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2928
2929 2018-07-20  Tom Tromey  <tom@tromey.com>
2930
2931         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2932         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2933         (buildsym_compunit::buildsym_compunit)
2934         (buildsym_compunit::~buildsym_compunit)
2935         (buildsym_compunit::get_macro_table): Define.
2936
2937 2018-07-20  Tom Tromey  <tom@tromey.com>
2938
2939         * buildsym.c (reset_symtab_globals): Remove.
2940         (buildsym_compunit::end_symtab_from_static_block): Update.
2941         (buildsym_compunit::augment_type_symtab): Update.
2942         (end_symtab_from_static_block): Call free_buildsym_compunit.
2943         (augment_type_symtab, end_symtab, end_expandable_symtab):
2944         Likewise.
2945
2946 2018-07-20  Tom Tromey  <tom@tromey.com>
2947
2948         * arch-utils.c: Do not include buildsym.h.
2949         * mipsread.c: Do not include buildsym.h.
2950         * machoread.c: Do not include buildsym.h.
2951         * elfread.c: Do not include buildsym.h.
2952
2953 2018-07-20  Tom Tromey  <tom@tromey.com>
2954
2955         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2956         initialization.
2957         (buildsym_compunit): Add new constructor.
2958         (struct buildsym_compunit) <get_last_source_file, finish_block,
2959         record_block_range, start_subfile, patch_subfile_names,
2960         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2961         set_last_source_start_addr, get_last_source_start_addr,
2962         get_local_using_directives, set_local_using_directives,
2963         get_global_using_directives, outermost_context_p,
2964         get_current_context_stack, get_context_stack_depth,
2965         get_current_subfile, get_local_symbols, get_file_symbols,
2966         get_global_symbols, record_debugformat, record_producer,
2967         push_context, pop_context, end_symtab_get_static_block,
2968         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2969         New public methods.
2970         <record_pending_block, finish_block_internal, make_blockvector,
2971         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2972         private methods.
2973         Update all users.
2974
2975 2018-05-22  Tom Tromey  <tom@tromey.com>
2976
2977         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2978         parameter.
2979         (finish_block_internal): Update.
2980
2981 2018-07-20  Tom Tromey  <tom@tromey.com>
2982
2983         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2984         parameter.
2985         (finish_block_internal): Update.
2986
2987 2018-07-20  Tom Tromey  <tom@tromey.com>
2988
2989         * buildsym.h (EXTERN): Don't define or undef.
2990         * buildsym.c (EXTERN): Don't define.
2991
2992 2018-07-20  Tom Tromey  <tom@tromey.com>
2993
2994         * buildsym.c: Remove TODO comment.
2995
2996 2018-07-20  Tom Tromey  <tom@tromey.com>
2997
2998         * coffread.c (coff_symtab_read): Update.
2999         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3000         (xcoff_new_init): Update.
3001         * mipsread.c (mipscoff_new_init): Update.
3002         * mdebugread.c (mdebug_build_psymtabs): Update.
3003         * elfread.c (elf_new_init): Update.
3004         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3005         Update.
3006         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3007         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3008         (stabsect_build_psymtabs): Update.
3009         * buildsym.h (buildsym_init): Don't declare.
3010         * buildsym.c: Update comment.
3011         (prepare_for_building): Remove.
3012         (start_symtab, restart_symtab): Update.
3013         (reset_symtab_globals): Update comment.
3014         (buildsym_init): Remove.
3015
3016 2018-07-20  Tom Tromey  <tom@tromey.com>
3017
3018         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3019         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3020         (read_enum_type, common_block_start, common_block_end)
3021         (cleanup_undefined_types_1, finish_global_stabs): Update.
3022         * mdebugread.c (psymtab_to_symtab_1): Update.
3023         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3024         (read_lexical_block_scope, new_symbol): Update.
3025         * dbxread.c (process_one_symbol): Update.
3026         * coffread.c (coff_symtab_read, process_coff_symbol)
3027         (coff_read_enum_type): Update.
3028         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3029         declare.
3030         (get_local_symbols, get_file_symbols, get_global_symbols): New
3031         functions.
3032         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3033         m_global_symbols.
3034         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3035         (~scoped_free_pendings): Update.
3036         (finish_block, prepare_for_building, reset_symtab_globals)
3037         (end_symtab_get_static_block, end_symtab_with_blockvector)
3038         (augment_type_symtab, push_context): Update.
3039         (get_local_symbols, get_file_symbols, get_global_symbols): New
3040         functions.
3041         (buildsym_init): Update.
3042
3043 2018-07-20  Tom Tromey  <tom@tromey.com>
3044
3045         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3046         (process_full_type_unit): Likewise.
3047         (dwarf2_start_symtab): Set list_in_scope.
3048
3049 2018-07-20  Tom Tromey  <tom@tromey.com>
3050
3051         * dwarf2read.c (process_psymtab_comp_unit_reader)
3052         (build_type_psymtabs_reader): Do not set list_in_scope.
3053
3054 2018-07-20  Tom Tromey  <tom@tromey.com>
3055
3056         * buildsym.c (free_pendings): Remove.
3057         (add_symbol_to_list, scoped_free_pendings)
3058         (finish_block_internal, buildsym_init): Update.
3059
3060 2018-07-20  Tom Tromey  <tom@tromey.com>
3061
3062         * xcoffread.c (read_xcoff_symtab): Update.
3063         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3064         Update.
3065         * dbxread.c (process_one_symbol): Update.
3066         * coffread.c (coff_symtab_read): Update.
3067         * buildsym.h (finish_block): Update.
3068         * buildsym.c (finish_block): Remove "listhead" argument.
3069         (end_symtab_get_static_block): Update.
3070
3071 2018-07-20  Tom Tromey  <tom@tromey.com>
3072
3073         * buildsym.h (class scoped_free_pendings): Remove constructor.
3074         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3075         method.
3076         <m_pending_block_obstack, m_pending_blocks>: New members.
3077         (pending_block_obstack, pending_blocks): Remove.
3078         (scoped_free_pendings::scoped_free_pendings): Default.
3079         (~scoped_free_pendings): Update.
3080         (free_pending_blocks): Remove.
3081         (finish_block_internal, record_pending_block, make_blockvector)
3082         (end_symtab_get_static_block, augment_type_symtab, push_context)
3083         (buildsym_init): Update.
3084
3085 2018-07-20  Tom Tromey  <tom@tromey.com>
3086
3087         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3088         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3089         members.
3090         (pending_addrmap, pending_addrmap_obstack)
3091         (pending_addrmap_interesting): Remove.
3092         (scoped_free_pendings, record_block_range, make_blockvector)
3093         (prepare_for_building, reset_symtab_globals, buildsym_init):
3094         Update.
3095
3096 2018-07-20  Tom Tromey  <tom@tromey.com>
3097
3098         * xcoffread.c (process_linenos): Update.
3099         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3100         * mdebugread.c (psymtab_to_symtab_1): Update.
3101         * dwarf2read.c (setup_type_unit_groups)
3102         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3103         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3104         * dbxread.c (process_one_symbol): Update.
3105         * coffread.c (coff_symtab_read, enter_linenos)
3106         (process_coff_symbol): Update.
3107         * buildsym.h (current_subfile): Don't declare.
3108         (get_current_subfile): Declare.
3109         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3110         member.
3111         (start_subfile, free_buildsym_compunit, push_subfile)
3112         (prepare_for_building, start_symtab): Update.
3113         (get_current_subfile): New function.
3114
3115 2018-07-20  Tom Tromey  <tom@tromey.com>
3116
3117         * coffread.c (coff_symtab_read): Update.
3118         * xcoffread.c (read_xcoff_symtab): Update.
3119         * dwarf2read.c (new_symbol): Update.
3120         (read_func_scope, read_lexical_block_scope): Update.
3121         * dbxread.c (process_one_symbol): Update.
3122         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3123         (outermost_context_p): Remove macro.
3124         (outermost_context_p, get_current_context_stack)
3125         (get_context_stack_depth): Declare.
3126         (pop_context): Return struct context_stack.
3127         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3128         member.
3129         (context_stack_size): Remove.
3130         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3131         (prepare_for_building, end_symtab_get_static_block)
3132         (augment_type_symtab, push_context): Update.
3133         (pop_context): Return struct context_stack.
3134         (outermost_context_p, get_current_context_stack)
3135         (get_context_stack_depth): New functions.
3136         (buildsym_init): Update.
3137
3138 2018-07-20  Tom Tromey  <tom@tromey.com>
3139
3140         * rust-exp.y: Now a pure parser.  Update all rules.
3141         (%union): Move earlier.
3142         (current_parser, work_obstack): Remove globals.
3143         (rust_parser, ~rust_parser): Update.
3144         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3145         lex_character, lex_number, lex_string, lex_identifier,
3146         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3147         convert_name, convert_params_to_expression,
3148         convert_ast_to_expression, ast_basic_type, ast_operation,
3149         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3150         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3151         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3152         ast_array_type, ast_slice_type, ast_reference_type,
3153         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3154         (rust_parse): Update.
3155         (rustyyerror, rustyylex): Add parser parameter.
3156         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3157         (rust_lex_stringish_test, rust_lex_test_sequence)
3158         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3159         (rust_lex_test_push_back, rust_lex_tests): Update.
3160
3161 2018-07-19  Pedro Alves  <palves@redhat.com>
3162
3163         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3164         gdb::unique_xmalloc_ptr.
3165         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3166         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3167         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3168         copy-initialization.
3169         * guile/scm-pretty-print.c (ppscm_print_children): Use
3170         gdb::unique_xmalloc_ptr instead of cleanups.
3171         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3172         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3173         gdb::unique_xmalloc_ptr.
3174         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3175         Adjust to use gdb::unique_xmalloc_ptr.
3176         * guile/scm-utils.c (extract_arg): Adjust.
3177         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3178         gdb::unique_xmalloc_ptr instead of a cleanup.
3179
3180 2018-07-19  Tom Tromey  <tom@tromey.com>
3181
3182         * utils.c (do_value_free_to_mark)
3183         (make_cleanup_value_free_to_mark): Remove.
3184         * utils.h (make_cleanup_value_free_to_mark): Remove.
3185
3186 2018-07-19  Pedro Alves  <palves@redhat.com>
3187
3188         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3189         forwarding reference.
3190
3191 2018-07-18  Pedro Alves  <palves@redhat.com>
3192
3193         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3194         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3195         cleanup.
3196
3197 2018-07-18  Pedro Alves  <palves@redhat.com>
3198
3199         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3200         exceptions.
3201         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3202         (gdbscm_wrap): New.
3203         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3204         directly instead of a cleanup.
3205         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3206         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3207         (vlscm_binop_gdbthrow): New, factored out from ...
3208         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3209         (vlscm_rich_compare): Use gdbscm_wrap.
3210         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3211         instead of a cleanup.
3212         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3213         cleanup.
3214         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3215         Use xfree directly instead of a cleanup.
3216         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3217         Adjust to use gdbscm_wrap and scoped_value_mark.
3218         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3219         (gdbscm_value_address, gdbscm_value_dereference)
3220         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3221         scoped_value_mark.
3222         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3223         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3224         scoped_value_mark.
3225         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3226         gdbscm_wrap and scoped_value_mark.
3227         (gdbscm_value_to_string): Use xfree directly instead of a
3228         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3229         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3230         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3231         scoped_value_mark.
3232         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3233         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3234         scoped_value_mark.
3235         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3236         gdbscm_wrap.
3237
3238 2018-07-18  Tom de Vries  <tdevries@suse.de>
3239
3240         * findvar.c (default_read_var_value): Also resolve dynamic type for
3241         LOC_OPTIMIZED_OUT vars.
3242
3243 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3244
3245         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3246         decoding.
3247
3248 2018-07-17  Tom Tromey  <tom@tromey.com>
3249
3250         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3251         (compute_enum_list, pascm_set_param_value_x)
3252         (gdbscm_parameter_value): Update.
3253         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3254         (gdbscm_scm_to_host_string): Update.
3255         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3256         Update.
3257         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3258         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3259         * guile/scm-string.c (gdbscm_scm_to_string): Return
3260         unique_xmalloc_ptr.
3261         (gdbscm_scm_to_host_string): Likewise.
3262
3263 2018-07-17  Tom Tromey  <tom@tromey.com>
3264
3265         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3266         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3267         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3268         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3269         unique_xmalloc_ptr.
3270
3271 2018-07-17  Tom Tromey  <tom@tromey.com>
3272
3273         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3274         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3275         Update.
3276         * guile/scm-cmd.c (cmdscm_function): Update.
3277         * guile/scm-pretty-print.c
3278         (ppscm_print_exception_unless_memory_error): Update.
3279         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3280         Return unique_xmalloc_ptr.
3281
3282 2018-07-17  Tom Tromey  <tom@tromey.com>
3283
3284         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3285         Use string_printf.
3286
3287 2018-07-17  Jim Wilson  <jimw@sifive.com>
3288
3289         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3290         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3291         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3292         unecessary braces after EF_RISCV_RVC test.  Delete call to
3293         set_gdbarch_decr_pc_after_break.
3294
3295         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3296         RISCV_LAST_FP_REGNUM + 1.
3297         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3298
3299 2018-07-17  Tom Tromey  <tom@tromey.com>
3300
3301         * configure.ac: Remove --disable-gdbcli.
3302         * configure: Rebuild.
3303         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3304         (SUBDIR_CLI_CFLAGS): Remove.
3305         (SFILES): Use SUBDIR_CLI_SRCS.
3306         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3307
3308 2018-07-17  Tom Tromey  <tom@tromey.com>
3309
3310         PR gdb/18624:
3311         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3312
3313 2018-07-16  Jim Wilson  <jimw@sifive.com>
3314
3315         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3316
3317 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3318
3319         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3320         variable.
3321         (libunwind_frame_sniffer): Likewise.
3322         (libunwind_frame_prev_register): Likewise.
3323         (libunwind_sigtramp_frame_sniffer): Likewise.
3324         * ia64-tdep.c (ia64_access_reg): Likewise.
3325         (ia64_access_rse_reg): Likewise.
3326         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3327         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3328
3329 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3330
3331         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3332
3333 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3334
3335         * remote-sim.c (gdbsim_target::close,
3336         gdbsim_target::mourn_inferior): Remove unused variables.
3337
3338 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3339
3340         * ia64-tdep.c (ktab_buf): New global.
3341         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3342         (get_kernel_table): Adjust.
3343
3344 2018-07-16  Tom Tromey  <tom@tromey.com>
3345
3346         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3347         * dwarf2read.c (using_directives, new_symbol): Use
3348         outermost_context_p.
3349         * dbxread.c (process_one_symbol): Use outermost_context_p.
3350         * coffread.c (coff_symtab_read): Use outermost_context_p.
3351
3352 2018-07-16  Tom Tromey  <tom@tromey.com>
3353
3354         * dwarf2read.c (using_directives, read_func_scope)
3355         (read_lexical_block_scope): Update.
3356         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3357         * buildsym.h (local_using_directives, global_using_directives):
3358         Don't declare.
3359         (get_local_using_directives, set_local_using_directives)
3360         (get_global_using_directives): Declare.
3361         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3362         m_global_using_directives>: New members.
3363         (finish_block_internal, prepare_for_building)
3364         (reset_symtab_globals, end_symtab_get_static_block)
3365         (push_context): Update.
3366         (get_local_using_directives, set_local_using_directives)
3367         (get_global_using_directives): New functions.
3368         (buildsym_init): Update.
3369
3370 2018-07-16  Tom Tromey  <tom@tromey.com>
3371
3372         * xcoffread.c (xcoff_initial_scan): Don't call
3373         free_pending_blocks.
3374         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3375         * buildsym.h (class scoped_free_pendings): Add constructor.
3376         (free_pending_blocks): Don't declare.
3377         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3378         (free_pending_blocks): Now static.
3379
3380 2018-07-16  Tom Tromey  <tom@tromey.com>
3381
3382         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3383         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3384         member.
3385         (struct subfile_stack): Remove.
3386         (subfile_stack): Remove.
3387         (push_subfile, pop_subfile, buildsym_init): Update.
3388
3389 2018-07-16  Tom Tromey  <tom@tromey.com>
3390
3391         * buildsym.c (push_subfile): Use gdb_assert.
3392         (pop_subfile): Use gdb_assert.
3393
3394 2018-07-16  Tom Tromey  <tom@tromey.com>
3395
3396         * buildsym.h (merge_symbol_lists): Remove.
3397         * buildsym.c (merge_symbol_lists): Remove.
3398
3399 2018-07-16  Tom Tromey  <tom@tromey.com>
3400
3401         * stabsread.c (scan_file_globals): Update comment.
3402         * stabsread.h (scan_file_globals): Move from buildsym.h.
3403         * buildsym.h (scan_file_globals): Move to stabsread.h.
3404
3405 2018-07-16  Tom Tromey  <tom@tromey.com>
3406
3407         * xcoffread.c (xcoff_new_init): Update.
3408         * mipsread.c (mipscoff_new_init): Update.
3409         * mdebugread.c (mdebug_build_psymtabs): Update.
3410         * elfread.c (elf_new_init): Update.
3411         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3412         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3413         * buildsym.h (buildsym_new_init): Don't declare.
3414         * buildsym.c (buildsym_new_init): Remove.
3415
3416 2018-07-16  Tom Tromey  <tom@tromey.com>
3417
3418         * stabsread.h (within_function): Move from buildsym.h.
3419         * stabsread.c (start_stabs): Clear within_function.
3420         * coffread.c (coff_start_symtab): Clear within_function.
3421         * buildsym.h (within_function): Move to stabsread.h.
3422         * buildsym.c (prepare_for_building): Update.
3423
3424 2018-07-16  Tom Tromey  <tom@tromey.com>
3425
3426         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3427         * dwarf2read.c (dwarf2_start_symtab): Don't set
3428         processing_gcc_compilation.
3429         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3430
3431 2018-07-16  Tom Tromey  <tom@tromey.com>
3432
3433         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3434         (next_symbol_text_func): Move from buildsym.h.
3435         * stabsread.c (hashname): Move from buildsym.c.
3436         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3437         (next_symbol_text_func, hashname): Move to stabsread.h.
3438         * buildsym.c: Don't include bcache.h
3439         (hashname): Move to stasbread.c.
3440
3441 2018-07-16  Tom Tromey  <tom@tromey.com>
3442
3443         * buildsym.h (context_stack_size): Don't declare.
3444         * buildsym.c (context_stack_size): New global.
3445
3446 2018-07-16  Tom Tromey  <tom@tromey.com>
3447
3448         * dbxread.c (processing_acc_compilation): New global.
3449         * buildsym.h (processing_acc_compilation): Don't declare.
3450
3451 2018-07-16  Tom Tromey  <tom@tromey.com>
3452
3453         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3454         * dbxread.c (read_ofile_symtab): Update.
3455         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3456         * buildsym.h (last_source_start_addr): Remove.
3457         (set_last_source_start_addr, get_last_source_start_addr):
3458         Declare.
3459         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3460         parameter.
3461         (struct buildsym_compunit) <m_last_source_start_addr>: New
3462         member.
3463         (prepare_for_building): Remove start_addr parameter.
3464         (start_symtab, restart_symtab, end_symtab_get_static_block)
3465         (end_symtab_with_blockvector): Update.
3466         (set_last_source_start_addr, get_last_source_start_addr): New
3467         functions.
3468
3469 2018-07-16  Tom Tromey  <tom@tromey.com>
3470
3471         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3472         member.
3473         (have_line_numbers): Remove.
3474         (record_line, prepare_for_building, end_symtab_get_static_block)
3475         (augment_type_symtab): Update.
3476
3477 2018-07-16  Tom Tromey  <tom@tromey.com>
3478
3479         * buildsym.c (~buildsym_compunit): Free the macro table.
3480         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3481         methods.
3482         <m_pending_macros>: New member.
3483         (pending_macros): Remove.
3484         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3485         (reset_symtab_globals, end_symtab_get_static_block)
3486         (end_symtab_with_blockvector, augment_type_symtab)
3487         (buildsym_init): Update.
3488
3489 2018-07-16  Tom Tromey  <tom@tromey.com>
3490
3491         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3492         parameter.
3493         (buildsym_compunit::set_last_source_file): New method.
3494         <m_last_source_file>: New member.
3495         (prepare_for_building): Remove "name" parameter.
3496         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3497         (last_source_file): Remove.
3498         (set_last_source_file, get_last_source_file): Update.
3499
3500 2018-07-16  Tom Tromey  <tom@tromey.com>
3501
3502         * buildsym.c (prepare_for_building): Add assert.
3503
3504 2018-07-16  Tom Tromey  <tom@tromey.com>
3505
3506         * buildsym.c (~buildsym_compunit): Update.
3507         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3508         (start_subfile, patch_subfile_names)
3509         (end_symtab_with_blockvector): Update.
3510
3511 2018-07-16  Tom Tromey  <tom@tromey.com>
3512
3513         * buildsym.c (struct buildsym_compunit): Add constructor,
3514         destructor, initializers.
3515         (start_buildsym_compunit): Remove.
3516         (free_buildsym_compunit): Use "delete".
3517         (start_symtab, restart_symtab): Use "new".
3518
3519 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3520
3521         * symfile.c (set_objfile_default_section_offset): Remove struct
3522         keyword.
3523
3524 2018-07-14  Stafford Horne  <shorne@gmail.com>
3525
3526         * (Responsible Maintainers): Add myself as or1k maintainer.
3527
3528 2018-07-13  Tom Tromey  <tom@tromey.com>
3529
3530         * symfile.c (set_objfile_default_section_offset): Use extra braces
3531         around initializer.
3532
3533 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3534
3535         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3536         non-branching basr.
3537
3538 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3539
3540         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3541         unittests/cli-utils-selftests.c
3542         * unittests/cli-utils-selftests.c: New file.
3543
3544 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3545
3546         * NEWS: Mention new commands. Mention change to 'thread apply'.
3547
3548 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3549
3550         * thread.c (thr_try_catch_cmd): New function.
3551         (thread_apply_all_command): Handle qcs flags.
3552         (thread_apply_command): Handle qcs flags.
3553         (taas_command): New function.
3554         (tfaas_command): New function.
3555         (_initialize_thread): Update to setup the new commands 'taas
3556         and 'tfaas'. Change doc string for 'thread apply'.
3557
3558 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3559
3560         * stack.c: (trailing_outermost_frame): New function, mostly
3561         extracted from backtrace_command_1.
3562         (leading_innermost_frame): New function.
3563         (backtrace_command_1): Update to call trailing_outermost_frame.
3564         (frame_apply_command_count): New function.
3565         (frame_apply_level_command): New function.
3566         (frame_apply_all_command): New function.
3567         (frame_apply_command): New function.
3568         (faas_command): New function.
3569         (frame_cmd_list): New variable.
3570         (_initialize_stack): Update to setup the new commands 'frame apply'
3571         and 'faas'.
3572
3573 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3574
3575         * cli-utils.c (number_or_range_parser::get_number): Only handle
3576         numbers or convenience var as numbers.
3577         (parse_flags): New function.
3578         (parse_flags_qcs): New function.
3579         (number_or_range_parser::finished): Ensure parsing end is detected
3580         before end of string.
3581         * cli-utils.h (parse_flags): New function.
3582         (parse_flags_qcs): New function.
3583         (number_or_range_parser): Remove m_finished bool.
3584         (number_or_range_parser::skip_range): Set m_in_range to false.
3585
3586 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3587
3588         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3589         on Windows.
3590
3591 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3592             Jan Kratochvil  <jan.kratochvil@redhat.com>
3593             Paul Fertser  <fercerpav@gmail.com>
3594             Tsutomu Seki  <sekiriki@gmail.com>
3595             Pedro Alves  <palves@redhat.com>
3596
3597         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3598         'unittests/parse-connection-spec-selftests.c'.
3599         (COMMON_SFILES): Add 'common/netstuff.c'.
3600         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3601         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3602         * common/netstuff.c: New file.
3603         * common/netstuff.h: New file.
3604         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3605         (wait_for_connect): Update comment.  New parameter
3606         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3607         Use 'sock' directly instead of 'scb->fd'.
3608         (try_connect): New function, with code from 'net_open'.
3609         (net_open): Rewrite main loop to deal with multiple
3610         sockets/addresses.  Handle IPv6-style hostnames; implement
3611         support for IPv6 connections.
3612         * unittests/parse-connection-spec-selftests.c: New file.
3613
3614 2018-07-11  Pedro Alves  <palves@redhat.com>
3615
3616         PR gdb/23377
3617         * remote.c (remote_target::remote_detach_pid): Call
3618         set_current_process.
3619
3620 2018-07-11  Pedro Alves  <palves@redhat.com>
3621
3622         * h8300-tdep.c (h8300_gdbarch_init): Remove
3623         set_gdbarch_ecoff_reg_to_regnum calls.
3624
3625 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3626
3627         PR c++/23373
3628         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3629         offsets/sizes for static members of a class/struct.
3630
3631 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3632
3633         * target-descriptions.c (tdesc_register_bitsize): Rename.
3634         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3635         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3636         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3637
3638 2018-07-10  Tom Tromey  <tom@tromey.com>
3639
3640         * breakpoint.c (moribund_locations): Now static and a
3641         std::vector.
3642         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3643         (build_bpstat_chain, update_global_location_list)
3644         (breakpoint_retire_moribund): Update.
3645         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3646         VEC.
3647
3648 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3649
3650         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3651         (riscv_register_reggroup_p): Use new function, remove unneeded
3652         parenthesis.
3653         (riscv_push_dummy_call): Extend assert to compare against xlen or
3654         flen based on register type.
3655
3656 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3657
3658         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3659
3660 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3661
3662         * remote.c (show_hardware_watchpoint_limit): New function.
3663         (show_hardware_watchpoint_length_limit): New function.
3664         (show_hardware_breakpoint_limit): New function.
3665         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3666         where appropriate, update help text.
3667
3668 2018-07-09  Tom Tromey  <tom@tromey.com>
3669
3670         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3671         (CLIBS): Don't mention NAT_CLIBS.
3672
3673 2018-07-09  Tom Tromey  <tom@tromey.com>
3674
3675         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3676         (LIBGDB_OBS, clean mostlyclean): Update.
3677         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3678
3679 2018-07-09  Tom Tromey  <tom@tromey.com>
3680
3681         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3682         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3683         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3684
3685 2018-07-09  Tom Tromey  <tom@tromey.com>
3686
3687         * Makefile.in (ALLDEPFILES): Remove exec.c.
3688         (COMMON_OBS): Remove exec.o.
3689         (COMMON_SFILES): Add exec.c.
3690
3691 2018-07-09  Tom Tromey  <tom@tromey.com>
3692
3693         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3694
3695 2018-07-09  Tom Tromey  <tom@tromey.com>
3696
3697         * Makefile.in (clean mostlyclean): Remove stamp-version.
3698         (version.c): Depend on stamp-version.
3699         (stamp-version): New rule, from version.c rule.
3700
3701 2018-07-09  Tom Tromey  <tom@tromey.com>
3702
3703         * Makefile.in (init.c): Depend on stamp-init.
3704         (stamp-init): New rule, from init.c rule.
3705         (clean mostlyclean): Remove stamp-init.
3706
3707 2018-07-09  Tom Tromey  <tom@tromey.com>
3708
3709         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3710         SUBDIR_GCC_COMPILE_SRCS.
3711
3712 2018-07-09  Tom Tromey  <tom@tromey.com>
3713
3714         * Makefile.in (init.c): Remove some unused sed rules.
3715
3716 2018-07-09  Tom Tromey  <tom@tromey.com>
3717
3718         * Makefile.in (TSOBS): Remove.
3719         (INIT_FILES): Update.
3720         (LIBGDB_OBS): Update.
3721         (COMMON_SFILES): Add inflow.c.
3722         (SFILES): Remove inflow.c.
3723
3724 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3725
3726         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3727
3728 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3729
3730         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3731         get_saveloc_name, is_signal_frame_name, step_name,
3732         init_remote_name, create_addr_space_name,
3733         destroy_addr_space_name, search_unwind_table_name,
3734         find_dyn_list_name): Constify.
3735
3736 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3737
3738         * darwin-nat.c (darwin_pthread_kill): New function.
3739         (darwin_resume_thread): Use darwin_pthread_kill.
3740
3741 2018-07-05  Tom de Vries  <tdevries@suse.de>
3742
3743         * macroexp.c (macro_buffer) <operator=>: New member function.
3744
3745 2018-07-04  Tom Tromey  <tom@tromey.com>
3746
3747         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3748
3749 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3750
3751         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3752         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3753         * maint.c: Likewise.
3754         * top.c: Likewise.
3755
3756 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3757
3758         * NEWS: Create a new section for the next release branch.
3759         Rename the section of the current branch, now that it has
3760         been cut.
3761
3762 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3763
3764         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3765         * version.in: Bump version to 8.2.50.DATE-git.
3766
3767 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3768             Pedro Alves  <palves@redhat.com>
3769
3770         * linux-nat.c (linux_init_ptrace): Rename to ...
3771         (linux_init_ptrace_procfs): ... this.  Call
3772         linux_proc_init_warnings.
3773         (linux_nat_target::post_attach)
3774         (linux_nat_target::post_startup_inferior): Adjust.
3775         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3776         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3777
3778 2018-07-04  Tom de Vries  <tdevries@suse.de>
3779
3780         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3781         check ...
3782         (read_comp_unit_head): ... here.
3783
3784 2018-07-03  Tom Tromey  <tom@tromey.com>
3785
3786         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3787         (stop_tracing, tstatus_command)
3788         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3789         (print_one_static_tracepoint_marker): Update.
3790         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3791         std::vector.
3792         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3793         VEC.
3794         (all_tracepoints, static_tracepoints_here): Return std::vector.
3795
3796 2018-07-03  Tom Tromey  <tom@tromey.com>
3797
3798         * common/ptid.c (ptid_equal): Remove.
3799         * common/ptid.h (ptid_equal): Don't declare.
3800         * ada-tasks.c: Update.
3801         * breakpoint.c: Update.
3802         * common/agent.c: Update.
3803         * corelow.c: Update.
3804         * darwin-nat-info.c: Update.
3805         * darwin-nat.c: Update.
3806         * dcache.c: Update.
3807         * dtrace-probe.c: Update.
3808         * dummy-frame.c: Update.
3809         * fbsd-nat.c: Update.
3810         * frame.c: Update.
3811         * gdbthread.h: Update.
3812         * gnu-nat.c: Update.
3813         * go32-nat.c: Update.
3814         * inf-loop.c: Update.
3815         * inf-ptrace.c: Update.
3816         * infcall.c: Update.
3817         * infcmd.c: Update.
3818         * inflow.c: Update.
3819         * infrun.c: Update.
3820         * linux-fork.c: Update.
3821         * linux-nat.c: Update.
3822         * linux-thread-db.c: Update.
3823         * mi/mi-cmd-var.c: Update.
3824         * mi/mi-interp.c: Update.
3825         * mi/mi-main.c: Update.
3826         * nto-procfs.c: Update.
3827         * ppc-linux-tdep.c: Update.
3828         * procfs.c: Update.
3829         * python/py-inferior.c: Update.
3830         * python/py-record-btrace.c: Update.
3831         * python/py-record.c: Update.
3832         * ravenscar-thread.c: Update.
3833         * regcache.c: Update.
3834         * remote-sim.c: Update.
3835         * remote.c: Update.
3836         * sol-thread.c: Update.
3837         * solib.c: Update.
3838         * target.c: Update.
3839         * tui/tui-stack.c: Update.
3840         * varobj.c: Update.
3841         * windows-nat.c: Update.
3842         * windows-tdep.c: Update.
3843
3844 2018-07-03  Tom Tromey  <tom@tromey.com>
3845
3846         * common/ptid.c (ptid_match): Remove.
3847         * common/ptid.h (ptid_match): Don't declare.
3848         * fbsd-nat.c: Update.
3849         * infcmd.c: Update.
3850         * infrun.c: Update.
3851         * linux-nat.c: Update.
3852         * record-btrace.c: Update.
3853         * regcache.c: Update.
3854         * remote.c: Update.
3855
3856 2018-07-03  Tom Tromey  <tom@tromey.com>
3857
3858         * common/ptid.c (ptid_tid_p): Remove.
3859         * common/ptid.h (ptid_tid_p): Don't declare.
3860         * sol-thread.c: Update.
3861
3862 2018-07-03  Tom Tromey  <tom@tromey.com>
3863
3864         * common/ptid.c (ptid_lwp_p): Remove.
3865         * common/ptid.h (ptid_lwp_p): Don't declare.
3866         * fbsd-nat.c: Update.
3867         * linux-nat.c: Update.
3868         * nat/linux-procfs.c: Update.
3869         * nat/x86-linux-dregs.c: Update.
3870         * sol-thread.c: Update.
3871
3872 2018-07-03  Tom Tromey  <tom@tromey.com>
3873
3874         * common/ptid.c (ptid_is_pid): Remove.
3875         * common/ptid.h (ptid_is_pid): Don't declare.
3876         * infrun.c: Update.
3877         * linux-nat.c: Update.
3878         * mi/mi-interp.c: Update.
3879         * remote.c: Update.
3880         * thread.c: Update.
3881
3882 2018-07-03  Tom Tromey  <tom@tromey.com>
3883
3884         * common/ptid.c (ptid_get_tid): Remove.
3885         * common/ptid.h (ptid_get_tid): Don't declare.
3886         * ada-tasks.c: Update.
3887         * aix-thread.c: Update.
3888         * bsd-uthread.c: Update.
3889         * darwin-nat.c: Update.
3890         * fbsd-nat.c: Update.
3891         * i386-darwin-nat.c: Update.
3892         * infrun.c: Update.
3893         * linux-tdep.c: Update.
3894         * nto-procfs.c: Update.
3895         * ppc-ravenscar-thread.c: Update.
3896         * python/py-infthread.c: Update.
3897         * ravenscar-thread.c: Update.
3898         * sol-thread.c: Update.
3899         * sparc-ravenscar-thread.c: Update.
3900         * windows-nat.c: Update.
3901
3902 2018-07-03  Tom Tromey  <tom@tromey.com>
3903
3904         * common/ptid.c (ptid_get_lwp): Remove.
3905         * common/ptid.h (ptid_get_lwp): Don't declare.
3906         * aarch64-linux-nat.c: Update.
3907         * ada-tasks.c: Update.
3908         * aix-thread.c: Update.
3909         * amd64-linux-nat.c: Update.
3910         * arm-linux-nat.c: Update.
3911         * corelow.c: Update.
3912         * fbsd-nat.c: Update.
3913         * fbsd-tdep.c: Update.
3914         * gnu-nat.c: Update.
3915         * i386-cygwin-tdep.c: Update.
3916         * i386-gnu-nat.c: Update.
3917         * i386-linux-nat.c: Update.
3918         * ia64-linux-nat.c: Update.
3919         * inf-ptrace.c: Update.
3920         * infrun.c: Update.
3921         * linux-fork.c: Update.
3922         * linux-nat.c: Update.
3923         * linux-tdep.c: Update.
3924         * linux-thread-db.c: Update.
3925         * mips-linux-nat.c: Update.
3926         * nat/aarch64-linux-hw-point.c: Update.
3927         * nat/aarch64-linux.c: Update.
3928         * nat/linux-btrace.c: Update.
3929         * nat/linux-osdata.c: Update.
3930         * nat/linux-procfs.c: Update.
3931         * nat/x86-linux-dregs.c: Update.
3932         * obsd-nat.c: Update.
3933         * ppc-fbsd-nat.c: Update.
3934         * ppc-linux-nat.c: Update.
3935         * procfs.c: Update.
3936         * python/py-infthread.c: Update.
3937         * ravenscar-thread.c: Update.
3938         * remote.c: Update.
3939         * s390-linux-nat.c: Update.
3940         * sol-thread.c: Update.
3941         * sol2-tdep.c: Update.
3942         * spu-linux-nat.c: Update.
3943         * x86-linux-nat.c: Update.
3944         * xtensa-linux-nat.c: Update.
3945
3946 2018-07-03  Tom Tromey  <tom@tromey.com>
3947
3948         * common/ptid.c (ptid_get_pid): Remove.
3949         * common/ptid.h (ptid_get_pid): Don't declare.
3950         * aarch64-linux-nat.c: Update.
3951         * ada-lang.c: Update.
3952         * aix-thread.c: Update.
3953         * alpha-bsd-nat.c: Update.
3954         * amd64-fbsd-nat.c: Update.
3955         * amd64-linux-nat.c: Update.
3956         * arm-linux-nat.c: Update.
3957         * arm-nbsd-nat.c: Update.
3958         * auxv.c: Update.
3959         * break-catch-syscall.c: Update.
3960         * breakpoint.c: Update.
3961         * bsd-uthread.c: Update.
3962         * corelow.c: Update.
3963         * ctf.c: Update.
3964         * darwin-nat.c: Update.
3965         * fbsd-nat.c: Update.
3966         * fbsd-tdep.c: Update.
3967         * gcore.c: Update.
3968         * gnu-nat.c: Update.
3969         * hppa-nbsd-nat.c: Update.
3970         * hppa-obsd-nat.c: Update.
3971         * i386-fbsd-nat.c: Update.
3972         * ia64-linux-nat.c: Update.
3973         * inf-ptrace.c: Update.
3974         * infcmd.c: Update.
3975         * inferior.c: Update.
3976         * inferior.h: Update.
3977         * inflow.c: Update.
3978         * infrun.c: Update.
3979         * linux-fork.c: Update.
3980         * linux-nat.c: Update.
3981         * linux-tdep.c: Update.
3982         * linux-thread-db.c: Update.
3983         * m68k-bsd-nat.c: Update.
3984         * mi/mi-interp.c: Update.
3985         * mi/mi-main.c: Update.
3986         * mips-linux-nat.c: Update.
3987         * mips-nbsd-nat.c: Update.
3988         * mips64-obsd-nat.c: Update.
3989         * nat/aarch64-linux-hw-point.c: Update.
3990         * nat/aarch64-linux.c: Update.
3991         * nat/linux-btrace.c: Update.
3992         * nat/linux-osdata.c: Update.
3993         * nat/linux-procfs.c: Update.
3994         * nat/x86-linux-dregs.c: Update.
3995         * nto-procfs.c: Update.
3996         * obsd-nat.c: Update.
3997         * ppc-linux-nat.c: Update.
3998         * ppc-nbsd-nat.c: Update.
3999         * ppc-obsd-nat.c: Update.
4000         * proc-service.c: Update.
4001         * procfs.c: Update.
4002         * python/py-inferior.c: Update.
4003         * python/py-infthread.c: Update.
4004         * ravenscar-thread.c: Update.
4005         * record.c: Update.
4006         * remote-sim.c: Update.
4007         * remote.c: Update.
4008         * rs6000-nat.c: Update.
4009         * s390-linux-nat.c: Update.
4010         * sh-nbsd-nat.c: Update.
4011         * sol-thread.c: Update.
4012         * sparc-nat.c: Update.
4013         * sparc64-tdep.c: Update.
4014         * spu-linux-nat.c: Update.
4015         * spu-tdep.c: Update.
4016         * target-debug.h: Update.
4017         * target.c: Update.
4018         * thread.c: Update.
4019         * tid-parse.c: Update.
4020         * tracefile-tfile.c: Update.
4021         * vax-bsd-nat.c: Update.
4022         * windows-nat.c: Update.
4023         * x86-linux-nat.c: Update.
4024         * x86-nat.c: Update.
4025
4026 2018-07-03  Tom Tromey  <tom@tromey.com>
4027
4028         * common/ptid.c (pid_to_ptid): Remove.
4029         * common/ptid.h (pid_to_ptid): Don't declare.
4030         * aix-thread.c: Update.
4031         * arm-linux-nat.c: Update.
4032         * common/ptid.c: Update.
4033         * common/ptid.h: Update.
4034         * corelow.c: Update.
4035         * ctf.c: Update.
4036         * darwin-nat.c: Update.
4037         * fbsd-nat.c: Update.
4038         * fork-child.c: Update.
4039         * gnu-nat.c: Update.
4040         * go32-nat.c: Update.
4041         * inf-ptrace.c: Update.
4042         * infcmd.c: Update.
4043         * inferior.c: Update.
4044         * infrun.c: Update.
4045         * linux-fork.c: Update.
4046         * linux-nat.c: Update.
4047         * nat/aarch64-linux-hw-point.c: Update.
4048         * nat/fork-inferior.c: Update.
4049         * nat/x86-linux-dregs.c: Update.
4050         * nto-procfs.c: Update.
4051         * obsd-nat.c: Update.
4052         * procfs.c: Update.
4053         * progspace.c: Update.
4054         * remote.c: Update.
4055         * rs6000-nat.c: Update.
4056         * s390-linux-nat.c: Update.
4057         * sol-thread.c: Update.
4058         * spu-linux-nat.c: Update.
4059         * target.c: Update.
4060         * top.c: Update.
4061         * tracefile-tfile.c: Update.
4062         * windows-nat.c: Update.
4063
4064 2018-07-03  Tom Tromey  <tom@tromey.com>
4065
4066         * common/ptid.h (ptid_build): Don't declare.
4067         * common/ptid.c (ptid_build): Remove.
4068         * aix-thread.c: Update.
4069         * bsd-kvm.c: Update.
4070         * bsd-uthread.c: Update.
4071         * common/agent.c: Update.
4072         * common/ptid.c: Update.
4073         * common/ptid.h: Update.
4074         * corelow.c: Update.
4075         * darwin-nat.c: Update.
4076         * fbsd-nat.c: Update.
4077         * gnu-nat.c: Update.
4078         * linux-fork.c: Update.
4079         * linux-nat.c: Update.
4080         * linux-thread-db.c: Update.
4081         * nat/linux-osdata.c: Update.
4082         * nat/linux-procfs.c: Update.
4083         * nto-procfs.c: Update.
4084         * obsd-nat.c: Update.
4085         * proc-service.c: Update.
4086         * procfs.c: Update.
4087         * ravenscar-thread.c: Update.
4088         * remote-sim.c: Update.
4089         * remote.c: Update.
4090         * sol-thread.c: Update.
4091         * target.c: Update.
4092         * windows-nat.c: Update.
4093
4094 2018-07-03  Tom Tromey  <tom@tromey.com>
4095
4096         * infrun.c (follow_exec): Use exit_inferior_silent.
4097         * inferior.c (exit_inferior_num_silent): Remove.
4098         * inferior.h (exit_inferior_num_silent): Don't declare.
4099
4100 2018-07-03  Tom Tromey  <tom@tromey.com>
4101
4102         PR cli/23340:
4103         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4104         inferior_ptid on error.
4105
4106 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4107             Simon Marchi  <simon.marchi@polymtl.ca>
4108
4109         PR tdep/8282
4110         * disasm.h (gdb_disassembler): Add
4111         `m_disassembler_options_holder'. member
4112         * disasm.c (get_all_disassembler_options): New function.
4113         (gdb_disassembler::gdb_disassembler): Use it.
4114         (gdb_buffered_insn_length_init_dis): Likewise.
4115         (gdb_buffered_insn_length): Adjust accordingly.
4116         (set_disassembler_options): Handle options with arguments.
4117         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4118         line if showing options with descriptions.
4119         (disassembler_options_completer): Adapt to using the
4120         `disasm_options_and_args_t' structure.
4121         * mips-tdep.c (mips_disassembler_options): New variable.
4122         (mips_disassembler_options_o32): Likewise.
4123         (mips_disassembler_options_n32): Likewise.
4124         (mips_disassembler_options_n64): Likewise.
4125         (gdb_print_insn_mips): Don't set `disassembler_options'.
4126         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4127         functions.
4128         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4129         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4130         `gdbarch_disassembler_options_implicit' and
4131         `gdbarch_valid_disassembler_options'.
4132         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4133         `disasm_options_and_args_t' structure.
4134         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4135         method.
4136         (valid_disassembler_options): Switch from `disasm_options_t' to
4137         the `disasm_options_and_args_t' structure.
4138         * NEWS: Document `set disassembler-options' support for the MIPS
4139         target.
4140         * gdbarch.h: Regenerate.
4141         * gdbarch.c: Regenerate.
4142
4143 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4144
4145         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4146
4147 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4148
4149         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4150         parameter in call to amd64_target_description.
4151         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4152         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4153         (amd64fbsd_init_abi): Likewise.
4154         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4155         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4156         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4157         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4158
4159 2018-06-29  Pedro Alves  <palves@redhat.com>
4160
4161         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4162         "segments" parameter.
4163         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4164         (_initialize_amd64_tdep): Update call to
4165         amd64_create_target_description.
4166         (amd64_target_description): Add "segments" parameter.  Adjust
4167         the implementation to use it.
4168         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4169         call to amd64_create_target_description.
4170         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4171         * gdb/arch/amd64.h (amd64_create_target_description): Add
4172         "segments" register.
4173         * gdb/arch/amd64.c (amd64_create_target_description): Add
4174         "segments" parameter.  Call create_feature_i386_64bit_segments
4175         only if SEGMENTS is true.
4176         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4177         call to amd64_create_target_description.
4178
4179 2018-06-29  Pedro Alves  <palves@redhat.com>
4180
4181         * thread.c (thread_target_id_str): New, factored out from ...
4182         (print_thread_info_1): ... here.  Use it to compute the max
4183         "Target Id" column width.
4184
4185 2018-06-29  Pedro Alves  <palves@redhat.com>
4186
4187         * remote.c (remote_target::extra_thread_info): Delete
4188         'display_buf' and 'n' locals.  from the cache, regardless of
4189         packet mechanims is in use.  Use cache for qThreadExtra and qP
4190         methods too.
4191
4192 2018-06-29  Pedro Alves  <palves@redhat.com>
4193
4194         * blockframe.c (find_pc_sect_containing_function): New function.
4195         * breakpoint.c (print_breakpoint_location): Don't call
4196         find_pc_sect_function.
4197         * linespec.c (create_sals_line_offset): Record the location's
4198         symbol in the sal.
4199         * linespec.c (convert_address_location_to_sals): Fill in sal's
4200         symbol with find_pc_sect_containing_function.
4201         * symtab.c (find_function_start_sal): Rename to ...
4202         (find_function_start_sal_1): ... this.
4203         (find_function_start_sal): Reimplement as wrapper around
4204         find_function_start_sal_1, and use
4205         find_pc_sect_containing_function to fill in the sal's symbol.
4206         (find_function_start_sal(symbol*, bool)): Adjust.
4207         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4208         comments.
4209         (find_pc_sect_containing_function): Declare.
4210
4211 2018-06-29  Pedro Alves  <palves@redhat.com>
4212
4213         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4214         true if the the location has no symbol.
4215
4216 2018-06-28  Tom Tromey  <tom@tromey.com>
4217
4218         * NEWS: Mention --enable-codesign.
4219         * silent-rules.mk (ECHO_SIGN): New variable.
4220         * configure.ac: Add --enable-codesign.
4221         * configure: Rebuild.
4222         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4223         (gdb$(EXEEXT)): Optionally invoke codesign.
4224
4225 2018-06-28  Pedro Alves  <palves@redhat.com>
4226
4227         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4228         comments.
4229         (switch_to_thread_no_regs): Adjust comment.
4230         * infcmd.c (stop_pc): Delete.
4231         (post_create_inferior, info_program_command): Replace references
4232         to stop_pc with references to thread_info->suspend.stop_pc.
4233         * inferior.h (stop_pc): Delete declaration.
4234         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4235         (handle_inferior_event_1, handle_signal_stop)
4236         (process_event_stop_test, keep_going_stepped_thread)
4237         (handle_step_into_function, handle_step_into_function_backward)
4238         (print_stop_location): Replace references to stop_pc with
4239         references to thread_info->suspend.stop_pc.
4240         (struct infcall_suspend_state) <stop_pc>: Delete field.
4241         (save_infcall_suspend_state, restore_infcall_suspend_state):
4242         Remove references to inf_stat->stop_pc.
4243         * linux-fork.c (fork_load_infrun_state): Likewise.
4244         * record-btrace.c (record_btrace_set_replay): Likewise.
4245         * record-full.c (record_full_goto_entry): Likewise.
4246         * remote.c (print_one_stopped_thread): Likewise.
4247         * target.c (target_resume): Extend comment.
4248         * thread.c (set_executing_thread): New.
4249         (set_executing): Use it.
4250         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4251         Remove references to stop_pc.
4252
4253 2018-06-28  Pedro Alves  <palves@redhat.com>
4254
4255         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4256         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4257
4258 2018-06-28  Tom Tromey  <tom@tromey.com>
4259
4260         * coffread.c (coff_symfile_finish): Update.
4261         * xcoffread.c (xcoff_symfile_finish): Update.
4262         * elfread.c (elf_symfile_finish): Update.
4263         * symfile.h (dwarf2_free_objfile): Don't declare.
4264         * dwarf2read.c (_initialize_dwarf2_read): Use
4265         register_objfile_data_with_cleanup.
4266         (dwarf2_free_objfile): Now static.  Change signature.
4267
4268 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4269
4270         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4271         option "-o" to add-symbol-file-load to add an offset to each
4272         section's load address.
4273         * symfile.c (set_objfile_default_section_offset): New function.
4274
4275 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4276
4277         * symfile.c (add_symbol_file_command): Make sure that sections
4278         with the same name are sorted in the same order.
4279
4280 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4281
4282         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4283         require the second argument.  If omitted, load sections at the
4284         addresses specified in the file.
4285
4286 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4287
4288         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4289         (_initialize_symfile): Add option "-o" to symbol-file to add an
4290         offset to each section of the symbol file.
4291
4292 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4293
4294         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4295
4296 2018-06-27  Tom Tromey  <tom@tromey.com>
4297
4298         * stack.c (_initialize_stack): Update "func" help text.
4299
4300 2018-06-27  Tom Tromey  <tom@tromey.com>
4301
4302         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4303         std::vector.
4304         (unwind_infopy_str, pyuw_create_unwind_info)
4305         (unwind_infopy_add_saved_register, pyuw_sniffer)
4306         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4307         Update.
4308         (struct saved_reg): Add constructor.
4309         <value>: Now a gdbpy_ref<>.
4310
4311 2018-06-27  Tom Tromey  <tom@tromey.com>
4312
4313         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4314
4315 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4316
4317         * gdb-gdb.py.in: Format using autopep8.
4318
4319 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4320
4321         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4322         (type_lookup_function): Recognize CORE_ADDR values.
4323
4324 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4325
4326         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4327         print tag_name.
4328
4329 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4330
4331         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4332         <__lt__>: Add.
4333
4334 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4335
4336         * gdb-gdb.py: Move to...
4337         * gdb-gdb.py.in: ... here.
4338         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4339         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4340         dependencies.
4341         (distclean): Remove gdb-gdb.py when cleaning.
4342         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4343         * configure: Re-generate.
4344
4345 2018-06-27  Pedro Alves  <palves@redhat.com>
4346
4347         * proc-service.c (get_ps_regcache): New.
4348         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4349         (ps_lsetfpregs): Use it.
4350
4351 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4352
4353         PR gdb/21695
4354         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4355         (dwarf_decode_lines_1): Adjust.
4356
4357 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4358
4359         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4360         override.
4361         <info_proc>: Likewise.
4362
4363 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4364
4365         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4366         to windows_fetch_one_register, and only handle the case of
4367         fetching one register.  Move the code that reloads the context
4368         and iterates over all registers if R is negative to...
4369         (windows_nat_target::fetch_registers): ... here.
4370         (do_windows_store_inferior_registers): Rename to
4371         windows_store_one_register, and only handle the case of storing
4372         one register.  Move the code that handles the case where r is
4373         negative to...
4374         (windows_nat_target::store_registers) ... here.
4375
4376 2018-06-26  Tom Tromey  <tom@tromey.com>
4377
4378         PR rust/22574:
4379         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4380         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4381         Update.
4382         (rust_internal_print_type): Add podata parameter.
4383         (rust_print_type): Update.
4384
4385 2018-06-26  Tom Tromey  <tom@tromey.com>
4386
4387         * typeprint.h (struct print_offset_data) <update, finish,
4388         maybe_print_hole>: New methods.
4389         <indentation>: New constant.
4390         * typeprint.c (print_offset_data::indentation): Define.
4391         (print_offset_data::maybe_print_hole, print_offset_data::update)
4392         (print_offset_data::finish): Move from c-typeprint.c and rename.
4393         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4394         (print_spaces_filtered_with_print_options): Update.
4395         (c_print_type_union_field_offset, maybe_print_hole)
4396         (c_print_type_struct_field_offset): Move to typeprint.c and
4397         rename.
4398         (c_type_print_base_struct_union): Update.
4399
4400 2018-06-25  Pedro Alves  <palves@redhat.com>
4401
4402         * gdbthread.h (thread_info_ref, delete_thread)
4403         (delete_thread_silent, first_thread_of_inferior)
4404         (any_thread_of_inferior, switch_to_thread)
4405         (enable_thread_stack_temporaries)
4406         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4407         (get_last_thread_stack_temporary)
4408         (value_in_thread_stack_temporaries, can_access_registers_thread):
4409         Spell out "struct thread_info" instead of just "thread_info".
4410         * inferior.h (notice_new_inferior): Likewise.
4411
4412 2018-06-25  Pedro Alves  <palves@redhat.com>
4413
4414         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4415         pass thread_info pointer to delete_thread.
4416         (windows_nat_target::detach): Pass inferior pointer to
4417         detach_inferior.
4418         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4419         delete_thread.
4420         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4421         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4422         and pass a thread_info pointer to delete_thread.
4423         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4424         pass thread_info pointer to delete_thread.
4425         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4426         delete_thread_silent call.
4427         * procfs.c (procfs_target::detach): Pass inferior pointer to
4428         detach_inferior.
4429         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4430         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4431         delete_thread_silent call.
4432         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4433         pass thread_info pointer to delete_thread.
4434         (windows_nat_target::detach): Pass inferior pointer to
4435         delete_inferior.
4436
4437 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4438
4439         * regcache.c (readable_regcache::read_part): Fix asserts.
4440         (reg_buffer::raw_collect_part): New function.
4441         (regcache::write_part): Fix asserts.
4442         (reg_buffer::raw_supply_part): New function.
4443         (regcache::transfer_regset_register): New helper function.
4444         (regcache::transfer_regset): Call new functions.
4445         (regcache_supply_regset): Use gdb_byte*.
4446         (regcache::supply_regset): Likewise.
4447         (regcache_collect_regset): Likewise.
4448         (regcache::collect_regset): Likewise.
4449         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4450         (reg_buffer::raw_supply_part): Likewise.
4451         (regcache::transfer_regset_register): Likewise.
4452         (regcache::transfer_regset): Use gdb_byte*.
4453
4454 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4455
4456         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4457
4458 2018-06-21  Pedro Alves  <palves@redhat.com>
4459
4460         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4461         instead of a ptid_t.  All callers adjusted.
4462         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4463         adjusted.
4464         (print_ada_task_info, display_current_task_id, task_command_1):
4465         Adjust.
4466         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4467         inferior_thread.
4468         (breakpoint_kind): Adjust.
4469         (remove_breakpoints_pid): Rename to ...
4470         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4471         pointer.  All callers adjusted.
4472         (bpstat_clear_actions): Use inferior_thread.
4473         (get_bpstat_thread): New.
4474         (bpstat_do_actions): Use it.
4475         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4476         to take a thread_info pointer.  All callers adjusted.
4477         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4478         (breakpoint_re_set_thread): Use inferior_thread.
4479         * breakpoint.h (struct inferior): Forward declare.
4480         (bpstat_stop_status): Update.
4481         (remove_breakpoints_pid): Delete.
4482         (remove_breakpoints_inf): New.
4483         * bsd-uthread.c (bsd_uthread_target::wait)
4484         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4485         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4486         (maint_btrace_packet_history_cmd)
4487         (maint_btrace_clear_packet_history_cmd): Adjust.
4488         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4489         inferior_thread.
4490         * cli/cli-interp.c: Include "inferior.h".
4491         * common/refcounted-object.h (struct
4492         refcounted_object_ref_policy): New.
4493         * compile/compile-object-load.c: Include gdbthread.h.
4494         (store_regs): Use inferior_thread.
4495         * corelow.c (core_target::close): Use current_inferior.
4496         (core_target_open): Adjust to use first_thread_of_inferior and use
4497         the current inferior.
4498         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4499         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4500         <thread>: ... this new field.  All references adjusted.
4501         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4502         Take a thread_info pointer instead of a ptid_t.
4503         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4504         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4505         thread_info pointer instead of a ptid_t.
4506         * elfread.c: Include "inferior.h".
4507         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4508         Use inferior_thread.
4509         * eval.c (evaluate_subexp): Likewise.
4510         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4511         inferior_thread.
4512         * gdb_proc_service.h (struct thread_info): Forward declare.
4513         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4514         <thread>: ... this new field.  All references adjusted.
4515         * gdbarch.h, gdbarch.c: Regenerate.
4516         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4517         'thread' parameter.  All implementations and callers adjusted.
4518         * gdbthread.h (thread_info) <set_running>: New method.
4519         (delete_thread, delete_thread_silent): Take a thread_info pointer
4520         instead of a ptid.
4521         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4522         (first_thread_of_process): Delete, replaced by ...
4523         (first_thread_of_inferior): ... this new function.  All callers
4524         adjusted.
4525         (any_live_thread_of_process): Delete, replaced by ...
4526         (any_live_thread_of_inferior): ... this new function.  All callers
4527         adjusted.
4528         (switch_to_thread, switch_to_no_thread): Declare.
4529         (is_executing): Delete.
4530         (enable_thread_stack_temporaries): Update comment.
4531         <enable_thread_stack_temporaries>: Take a thread_info pointer
4532         instead of a ptid_t.  Incref the thread.
4533         <~enable_thread_stack_temporaries>: Decref the thread.
4534         <m_ptid>: Delete
4535         <m_thr>: New.
4536         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4537         (get_last_thread_stack_temporary)
4538         (value_in_thread_stack_temporaries, can_access_registers_thread):
4539         Take a thread_info pointer instead of a ptid_t.  All callers
4540         adjusted.
4541         * infcall.c (get_call_return_value): Use inferior_thread.
4542         (run_inferior_call): Work with thread pointers instead of ptid_t.
4543         (call_function_by_hand_dummy): Work with thread pointers instead
4544         of ptid_t.  Use thread_info_ref.
4545         * infcmd.c (proceed_thread_callback): Access thread's state
4546         directly.
4547         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4548         access thread's state directly.
4549         (continue_command): Use inferior_thread.
4550         (info_program_command): Use find_thread_ptid and access thread
4551         state directly.
4552         (proceed_after_attach_callback): Use thread state directly.
4553         (notice_new_inferior): Take a thread_info pointer instead of a
4554         ptid_t.  All callers adjusted.
4555         (exit_inferior): Take an inferior pointer instead of a pid.  All
4556         callers adjusted.
4557         (exit_inferior_silent): New.
4558         (detach_inferior): Delete.
4559         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4560         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4561         (detach_inferior_command, kill_inferior_command): Use
4562         find_inferior_id instead of valid_gdb_inferior_id and
4563         gdb_inferior_id_to_pid.
4564         (inferior_command): Use inferior and thread pointers.
4565         * inferior.h (struct thread_info): Forward declare.
4566         (notice_new_inferior): Take a thread_info pointer instead of a
4567         ptid_t.  All callers adjusted.
4568         (detach_inferior): Delete declaration.
4569         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4570         instead of a pid.  All callers adjusted.
4571         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4572         (valid_gdb_inferior_id): Delete.
4573         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4574         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4575         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4576         ...
4577         <inf>: ... this new field.
4578         <step_ptid>: Delete, replaced by ...
4579         <step_thread>: ... this new field.
4580         (get_displaced_stepping_state): Take an inferior pointer instead
4581         of a pid.  All callers adjusted.
4582         (displaced_step_in_progress_any_inferior): Adjust.
4583         (displaced_step_in_progress_thread): Take a thread pointer instead
4584         of a ptid_t.  All callers adjusted.
4585         (displaced_step_in_progress, add_displaced_stepping_state): Take
4586         an inferior pointer instead of a pid.  All callers adjusted.
4587         (get_displaced_step_closure_by_addr): Adjust.
4588         (remove_displaced_stepping_state): Take an inferior pointer
4589         instead of a pid.  All callers adjusted.
4590         (displaced_step_prepare_throw, displaced_step_prepare)
4591         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4592         All callers adjusted.
4593         (start_step_over): Adjust.
4594         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4595         displaced step queue.
4596         (do_target_resume): Adjust.
4597         (fetch_inferior_event): Use inferior_thread.
4598         (context_switch, get_inferior_stop_soon): Take an
4599         execution_control_state pointer instead of a ptid_t.  All callers
4600         adjusted.
4601         (switch_to_thread_cleanup): Delete.
4602         (stop_all_threads): Use scoped_restore_current_thread.
4603         * inline-frame.c: Include "gdbthread.h".
4604         (inline_state) <inline_state>: Take a thread pointer instead of a
4605         ptid_t.  All callers adjusted.
4606         <ptid>: Delete, replaced by ...
4607         <thread>: ... this new field.
4608         (find_inline_frame_state): Take a thread pointer instead of a
4609         ptid_t.  All callers adjusted.
4610         (skip_inline_frames, step_into_inline_frame)
4611         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4612         pointer instead of a ptid_t.  All callers adjusted.
4613         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4614         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4615         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4616         pointers directly.
4617         * linux-nat.c (get_detach_signal): Likewise.
4618         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4619         (thread_db_notice_clone): Adjust.
4620         (thread_db_find_new_threads_silently)
4621         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4622         a thread pointer instead of a ptid_t.  All callers adjusted.
4623         * mi/mi-cmd-var.c: Include "inferior.h".
4624         (mi_cmd_var_update_iter): Update to use thread pointers.
4625         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4626         inferior directly.
4627         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4628         out to ...
4629         (mi_output_running): ... this new function.
4630         (mi_on_resume_1): Adjust to use it.
4631         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4632         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4633         directly.
4634         (interrupt_thread_callback): : Adjust to use thread and inferior
4635         pointers.
4636         * proc-service.c: Include "gdbthread.h".
4637         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4638         * progspace-and-thread.c: Include "inferior.h".
4639         * progspace.c: Include "inferior.h".
4640         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4641         hold a reference to an inferior_object.
4642         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4643         inferior_thread.
4644         * python/py-inferior.c (struct inferior_object): Give the type a
4645         tag name instead of a typedef.
4646         (python_on_normal_stop): No need to check if the current thread is
4647         listed.
4648         (inferior_to_inferior_object): Change return type to
4649         inferior_object.  All callers adjusted.
4650         (find_thread_object): Delete, bits factored out to ...
4651         (thread_to_thread_object): ... this new function.
4652         * python/py-infthread.c (create_thread_object): Use
4653         inferior_to_inferior_object.
4654         (thpy_is_stopped): Use thread pointer directly.
4655         (gdbpy_selected_thread): Use inferior_thread.
4656         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4657         field, replaced with ...
4658         <thread>: ... this new field.  All users adjusted.
4659         (btpy_insn_or_gap_new): Drop const.
4660         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4661         callers adjusted.
4662         * python/py-record.c: Include "gdbthread.h".
4663         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4664         a ptid_t.  All callers adjusted.
4665         (gdbpy_current_recording): Use inferior_thread.
4666         * python/py-record.h (recpy_record_object) <ptid>: Delete
4667         field, replaced with ...
4668         <thread>: ... this new field.  All users adjusted.
4669         (recpy_element_object) <ptid>: Delete
4670         field, replaced with ...
4671         <thread>: ... this new field.  All users adjusted.
4672         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4673         a ptid_t.  All callers adjusted.
4674         * python/py-threadevent.c: Include "gdbthread.h".
4675         (get_event_thread): Use thread_to_thread_object.
4676         * python/python-internal.h (struct inferior_object): Forward
4677         declare.
4678         (find_thread_object, find_inferior_object): Delete declarations.
4679         (thread_to_thread_object, inferior_to_inferior_object): New
4680         declarations.
4681         * record-btrace.c: Include "inferior.h".
4682         (require_btrace_thread): Use inferior_thread.
4683         (record_btrace_frame_sniffer)
4684         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4685         (get_thread_current_frame): Use scoped_restore_current_thread and
4686         switch_to_thread.
4687         (get_thread_current_frame): Use thread pointer directly.
4688         (record_btrace_replay_at_breakpoint): Use thread's inferior
4689         pointer directly.
4690         * record-full.c: Include "inferior.h".
4691         * regcache.c: Include "gdbthread.h".
4692         (get_thread_arch_regcache): Use the inferior's address space
4693         directly.
4694         (get_thread_regcache, registers_changed_thread): New.
4695         * regcache.h (get_thread_regcache(thread_info *thread)): New
4696         overload.
4697         (registers_changed_thread): New.
4698         (remote_target) <remote_detach_1>: Swap order of parameters.
4699         (remote_add_thread): <remote_add_thread>: Return the new thread.
4700         (get_remote_thread_info(ptid_t)): New overload.
4701         (remote_target::remote_notice_new_inferior): Use thread pointers
4702         directly.
4703         (remote_target::process_initial_stop_replies): Use
4704         thread_info::set_running.
4705         (remote_target::remote_detach_1, remote_target::detach)
4706         (extended_remote_target::detach): Adjust.
4707         * stack.c (frame_show_address): Use inferior_thread.
4708         * target-debug.h (target_debug_print_thread_info_pp): New.
4709         * target-delegates.c: Regenerate.
4710         * target.c (default_thread_address_space): Delete.
4711         (memory_xfer_partial_1): Use current_inferior.
4712         (target_detach): Use current_inferior.
4713         (target_thread_address_space): Delete.
4714         (generic_mourn_inferior): Use current_inferior.
4715         * target.h (struct target_ops) <thread_address_space>: Delete.
4716         (target_thread_address_space): Delete.
4717         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4718         pointers directly.
4719         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4720         thread pointer instead of a ptid_t.  Adjust all callers.
4721         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4722         (first_thread_of_process): Delete, replaced by ...
4723         (first_thread_of_inferior): ... this new function.  All callers
4724         adjusted.
4725         (any_thread_of_process): Rename to ...
4726         (any_thread_of_inferior): ... this, and take an inferior pointer.
4727         (any_live_thread_of_process): Rename to ...
4728         (any_live_thread_of_inferior): ... this, and take an inferior
4729         pointer.
4730         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4731         (value_in_thread_stack_temporaries)
4732         (get_last_thread_stack_temporary): Take a thread pointer instead
4733         of a ptid_t.  Adjust all callers.
4734         (thread_info::set_running): New.
4735         (validate_registers_access): Use inferior_thread.
4736         (can_access_registers_ptid): Rename to ...
4737         (can_access_registers_thread): ... this, and take a thread
4738         pointer.
4739         (print_thread_info_1): Adjust to compare thread pointers instead
4740         of ptids.
4741         (switch_to_no_thread, switch_to_thread): Make extern.
4742         (scoped_restore_current_thread::~scoped_restore_current_thread):
4743         Use m_thread pointer directly.
4744         (scoped_restore_current_thread::scoped_restore_current_thread):
4745         Use inferior_thread.
4746         (thread_command): Use thread pointer directly.
4747         (thread_num_make_value_helper): Use inferior_thread.
4748         * top.c (execute_command): Use inferior_thread.
4749         * tui/tui-interp.c: Include "inferior.h".
4750         * varobj.c (varobj_create): Use inferior_thread.
4751         (value_of_root_1): Use find_thread_global_id instead of
4752         global_thread_id_to_ptid.
4753
4754 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4755
4756         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4757         possible.
4758         (regcache::write_part): Likewise.
4759         (readable_regcache::cooked_read_part): Update comment.
4760         (readable_regcache::cooked_write_part): Likewise.
4761         * regcache.h: (readable_regcache::read_part): Likewise.
4762         (regcache::write_part): Likewise.
4763
4764 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4765             Dirk Schubert  <dirk.schubert@arm.com>
4766
4767         * aarch64-linux-nat.c (post_attach): New.
4768         (aarch64_linux_nat_target::post_attach): Override post_attach to
4769         record the number of hardware debug registers.
4770
4771 2018-06-20  Tom Tromey  <tom@tromey.com>
4772
4773         * python/py-param.c (add_setshow_generic): Make parameters const.
4774         (parmpy_init): Update.
4775
4776 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4777
4778         * regcache.h (regcache_cooked_read_ftype): Rename to...
4779         (register_read_ftype): ...this, change type to function_view.
4780         (class reg_buffer) <save>: Remove src parameter.
4781         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4782         parameter non-const in first overload.  Remove src parameter in
4783         second overload.
4784         * regcache.c (do_cooked_read): Remove.
4785         (readonly_detached_regcache::readonly_detached_regcache): Make
4786         parameter non-const, adjust call to other constructor.
4787         (reg_buffer::save): Remove src parameter.
4788         * frame.c (do_frame_register_read): Remove.
4789         (frame_save_as_regcache): Use lambda function.
4790         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4791         parameter to ppu2spu_data *.
4792         (ppu2spu_sniffer): Use lambda function.
4793
4794 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4795
4796         * record-full.c (record_full_target::insert_breakpoint): Remove
4797         "struct" keyword, add const.
4798
4799 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4800
4801         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4802         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4803         * configure.ac: Remove AC_PREREQ, add missing quoting.
4804         * gnulib/configure.ac: Modernize usage of
4805         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4806         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4807         (AUTOMAKE_VERSION): Bump to 1.15.1.
4808         * configure: Re-generate.
4809         * config.in: Re-generate.
4810         * aclocal.m4: Re-generate.
4811         * gnulib/aclocal.m4: Re-generate.
4812         * gnulib/config.in: Re-generate.
4813         * gnulib/configure: Re-generate.
4814         * gnulib/import/Makefile.in: Re-generate.
4815
4816 2018-06-19  Pedro Alves  <palves@redhat.com>
4817
4818         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4819         (lookup_minimal_symbol_by_pc_section): ... here with
4820         gdb_assert_not_reached added.
4821
4822 2018-06-19  Pedro Alves  <palves@redhat.com>
4823
4824         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4825         parameter with a block parameter.  Compare location's block symbol
4826         with the frame's block instead of addresses.
4827         (skip_inline_frames): Pass the current block instead of the
4828         frame's address.  Break out as soon as we determine the frame
4829         should not be skipped.
4830
4831 2018-06-18  Tom Tromey  <tom@tromey.com>
4832
4833         * solib-aix.c (solib_aix_get_section_offsets): Return
4834         unique_xmalloc_ptr.
4835         (solib_aix_solib_create_inferior_hook): Update.
4836
4837 2018-06-18  Tom Tromey  <tom@tromey.com>
4838
4839         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4840
4841 2018-06-18  Tom Tromey  <tom@tromey.com>
4842
4843         * solib-frv.c (frv_relocate_main_executable): Use
4844         unique_xmalloc_ptr.
4845         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4846         unique_xmalloc_ptr.
4847
4848 2018-06-18  Tom Tromey  <tom@tromey.com>
4849
4850         * objfiles.h (inhibit_section_map_updates): Update.
4851         (resume_section_map_updates, resume_section_map_updates_cleanup):
4852         Remove.
4853         * solib-svr4.c (svr4_handle_solib_event): Update.
4854         * objfiles.c (inhibit_section_map_updates): Return
4855         scoped_restore_tmpl<int>.
4856         (resume_section_map_updates, resume_section_map_updates_cleanup):
4857         Remove.
4858
4859 2018-06-18  Tom Tromey  <tom@tromey.com>
4860
4861         * valprint.h (read_string): Update.
4862         * valprint.c (read_string): Change type of "buffer".
4863         (val_print_string): Update.
4864         * python/py-value.c (valpy_string): Update.
4865         * language.h (struct language_defn) <la_get_string>: Change
4866         type of "buffer".
4867         (default_get_string, c_get_string): Update.
4868         * language.c (default_get_string): Change type of "buffer".
4869         * guile/scm-value.c (gdbscm_value_to_string): Update.
4870         * c-lang.c (c_get_string): Change type of "buffer".
4871
4872 2018-06-18  Tom Tromey  <tom@tromey.com>
4873
4874         * ser-mingw.c (struct pipe_state_destroyer): New.
4875         (pipe_state_up): New typedef.
4876         (cleanup_pipe_state): Remove.
4877         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4878
4879 2018-06-18  Tom Tromey  <tom@tromey.com>
4880
4881         * rust-lang.h (rust_yyerror): Don't declare.
4882         * rust-lang.c (rust_language_defn): Update.
4883         * rust-exp.y (yyerror): Now static.
4884         * parse.c (parse_exp_in_context_1): Update.
4885         * p-lang.h (p_yyerror): Don't declare.
4886         * p-lang.c (p_language_defn): Update.
4887         * p-exp.y (yyerror): Now static.
4888         * opencl-lang.c (opencl_language_defn): Update.
4889         * objc-lang.c (objc_language_defn): Update.
4890         * m2-lang.h (m2_yyerror): Don't declare.
4891         * m2-lang.c (m2_language_defn): Update.
4892         * m2-exp.y (yyerror): Now static.
4893         * language.h (struct language_defn) <la_error>: Remove.
4894         * language.c (unk_lang_error): Remove.
4895         (unknown_language_defn, auto_language_defn): Remove.
4896         * go-lang.h (go_yyerror): Don't declare.
4897         * go-lang.c (go_language_defn): Update.
4898         * go-exp.y (yyerror): Now static.
4899         * f-lang.h (f_yyerror): Don't declare.
4900         * f-lang.c (f_language_defn): Update.
4901         * f-exp.y (yyerror): Now static.
4902         * d-lang.h (d_yyerror): Don't declare.
4903         * d-lang.c (d_language_defn): Update.
4904         * d-exp.y (yyerror): Now static.
4905         * c-lang.h (c_yyerror): Don't declare.
4906         * c-lang.c (c_language_defn, cplus_language_defn)
4907         (asm_language_defn, minimal_language_defn): Update.
4908         * c-exp.y (yyerror): Now static.
4909         * ada-lang.h (ada_yyerror): Don't declare.
4910         * ada-lang.c (ada_language_defn): Update.
4911         * ada-exp.y (yyerror): Now static.
4912
4913 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4914
4915         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4916         (store_sveregs_to_thread): Likewise.
4917         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4918         (aarch64_linux_store_inferior_registers): Likewise.
4919         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4920         function.
4921         (aarch64_sve_regs_copy_to_regcache): Likewise.
4922         (aarch64_sve_regs_copy_from_regcache): Likewise.
4923         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4924         declaration.
4925         (aarch64_sve_regs_copy_to_regcache): Likewise.
4926         (aarch64_sve_regs_copy_from_regcache): Likewise.
4927         (sve_context): Structure from Linux headers.
4928         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4929         (SVE_SIG_ZREG_SIZE): Likewise.
4930         (SVE_SIG_PREG_SIZE): Likewise.
4931         (SVE_SIG_FFR_SIZE): Likewise.
4932         (SVE_SIG_REGS_OFFSET): Likewise.
4933         (SVE_SIG_ZREGS_OFFSET): Likewise.
4934         (SVE_SIG_ZREG_OFFSET): Likewise.
4935         (SVE_SIG_ZREGS_SIZE): Likewise.
4936         (SVE_SIG_PREGS_OFFSET): Likewise.
4937         (SVE_SIG_PREG_OFFSET): Likewise.
4938         (SVE_SIG_PREGS_SIZE): Likewise.
4939         (SVE_SIG_FFR_OFFSET): Likewise.
4940         (SVE_SIG_REGS_SIZE): Likewise.
4941         (SVE_SIG_CONTEXT_SIZE): Likewise.
4942         (SVE_PT_REGS_MASK): Likewise.
4943         (SVE_PT_REGS_FPSIMD): Likewise.
4944         (SVE_PT_REGS_SVE): Likewise.
4945         (SVE_PT_VL_INHERIT): Likewise.
4946         (SVE_PT_VL_ONEXEC): Likewise.
4947         (SVE_PT_REGS_OFFSET): Likewise.
4948         (SVE_PT_FPSIMD_OFFSET): Likewise.
4949         (SVE_PT_FPSIMD_SIZE): Likewise.
4950         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4951         (SVE_PT_SVE_PREG_SIZE): Likewise.
4952         (SVE_PT_SVE_FFR_SIZE): Likewise.
4953         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4954         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4955         (__SVE_SIG_TO_PT): Likewise.
4956         (SVE_PT_SVE_OFFSET): Likewise.
4957         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4958         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4959         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4960         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4961         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4962         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4963         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4964         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4965         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4966         (SVE_PT_SVE_SIZE): Likewise.
4967         (SVE_PT_SIZE): Likewise.
4968         (HAS_SVE_STATE): New define.
4969
4970 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4971
4972         * nat/aarch64-sve-linux-sigcontext.h: New file.
4973         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4974         new files.
4975         (SVE_VQ_MIN): Likewise.
4976         (SVE_VQ_MAX): Likewise.
4977         (SVE_VL_MIN): Likewise.
4978         (SVE_VL_MAX): Likewise.
4979         (SVE_NUM_ZREGS): Likewise.
4980         (SVE_NUM_PREGS): Likewise.
4981         (sve_vl_valid): Likewise.
4982         (struct user_sve_header): Likewise.
4983
4984 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4985             Richard Bunt <Richard.Bunt@arm.com>
4986
4987         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4988         was requested by GDB.
4989
4990 2018-06-15  Tom de Vries  <tdevries@suse.de>
4991
4992         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4993
4994 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4995
4996         * gnulib/update-gnulib.sh: Print expected versions of
4997         autoconf/aclocal.
4998
4999 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5000
5001         * arch-utils.c (default_type_align): Use type_length_units.
5002         * gdbtypes.c (type_align): Use type_length_units.
5003
5004 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5005
5006         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5007         of 'define' command.
5008
5009 2018-06-14  Tom de Vries  <tdevries@suse.de>
5010
5011         PR cli/22573
5012         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5013         get_no_prettyformat_print_options.
5014
5015 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5016
5017         * sparc-nat.h: Include target.h.
5018         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5019         <fetch_registers>: Remove this argument in function call.
5020         <store_registers>: Remove this argument in function call, remove
5021         extra semicolon.
5022         <low_forget_process>: Call sparc64_forget_process instead of
5023         sparc_forget_process.
5024
5025 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5026
5027         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5028         (procfs_target::make_corefile_notes): Adjust to new
5029         target_read_alloc return type.
5030
5031 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5032             Stephen Roberts  <stephen.roberts@arm.com>
5033
5034         PR gdb/22882
5035         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5036         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5037         Move should_notify_stop local into more inner scope.
5038
5039 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5040             Stephen Roberts  <stephen.roberts@arm.com>
5041
5042         PR gdb/22882
5043         * infrun.c (resume_1): Add call to mark_async_event_handler.
5044
5045 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5046
5047         * infrun.c (do_target_wait): Change old version of $pc printed.
5048
5049 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5050
5051         * dwarf2read.c (read_index_from_section): Rename to...
5052         (read_gdb_index_from_section): ... this, update all callers.
5053         (dwarf2_read_index): Rename to...
5054         (dwarf2_read_gdb_index): ... this, update all callers.
5055
5056 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5057
5058         * gdb/hppa-linux-nat.c
5059         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5060         hppa_linux_nat_target::fetch_registers.
5061
5062 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5063
5064         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5065         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5066         (AARCH64_DWARF_SVE_FFR): Likewise.
5067         (AARCH64_DWARF_SVE_P0): Likewise.
5068         (AARCH64_DWARF_SVE_Z0): Likewise.
5069
5070 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5071
5072         * common/common-regcache.h (raw_compare): New function.
5073         * regcache.c (regcache::raw_compare): Likewise.
5074         * regcache.h (regcache::raw_compare): New declaration.
5075
5076 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5077
5078         * common/common-regcache.h (reg_buffer_common): New structure.
5079         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5080         (reg_buffer::raw_supply): Likewise.
5081         (reg_buffer::raw_supply_integer): Likewise.
5082         (reg_buffer::raw_supply_zeroed): Likewise.
5083         (reg_buffer::raw_collect): Likewise.
5084         (reg_buffer::raw_collect_integer): Likewise.
5085         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5086         (reg_buffer::raw_supply): Likewise.
5087         (reg_buffer::raw_supply_integer): Likewise.
5088         (reg_buffer::raw_supply_zeroed): Likewise.
5089         (reg_buffer::raw_collect): Likewise.
5090         (reg_buffer::raw_collect_integer): Likewise.
5091
5092 2018-06-10  Tom Tromey  <tom@tromey.com>
5093
5094         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5095         (class remote_state) <stop_reply_queue>: Now std::vector.
5096         (remote_state::~remote_state)
5097         (remote_target::stop_reply_queue_length): Update.
5098         (struct queue_iter_param, remove_child_of_pending_fork)
5099         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5100         (check_pending_event_prevents_wildcard_vcont_callback)
5101         (remove_stop_reply_for_inferior)
5102         (remove_stop_reply_of_remote_state)
5103         (remote_notif_remove_once_on_match)
5104         (stop_reply_match_ptid_and_ws)
5105         (remote_kill_child_of_pending_fork): Remove.
5106         (remote_target::remove_new_fork_children)
5107         (remote_target::check_pending_events_prevent_wildcard_vcont)
5108         (remote_target::discard_pending_stop_replies)
5109         (remote_target::discard_pending_stop_replies_in_queue)
5110         (remote_target::remote_notif_remove_queued_reply)
5111         (remote_target::queued_stop_reply)
5112         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5113         (remote_target::wait, remote_target::kill_new_fork_children)
5114         (remote_target::async): Update.
5115
5116 2018-06-10  Tom Tromey  <tom@tromey.com>
5117
5118         * record-full.c (record_full_arch_list_cleanups): Remove.
5119         (record_full_message): Use try/catch.
5120         (record_full_wait_cleanups): Remove.
5121         (record_full_wait_1): Use try/catch.
5122         (record_full_restore): Likewise.
5123
5124 2018-06-10  Tom Tromey  <tom@tromey.com>
5125
5126         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5127         declare VEC.  Add constructor.
5128         <in_target_beneath>: Now bool.
5129         (record_full_breakpoints): Now a std::vector, static.
5130         (record_full_sync_record_breakpoints)
5131         (record_full_init_record_breakpoints)
5132         (record_full_target::insert_breakpoint)
5133         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5134
5135 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5136
5137         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5138         * serial.c (serial_interface_lookup): Remove struct keyword.
5139
5140 2018-06-10  Tom Tromey  <tom@tromey.com>
5141
5142         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5143         method.
5144         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5145         a method.
5146         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5147         method.
5148         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5149         "beneath" as a method.
5150         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5151         Use "beneath" as a method.
5152
5153 2018-06-10  Tom Tromey  <tom@tromey.com>
5154
5155         * tracefile.c (struct trace_file_writer_deleter): New.
5156         <operator()>: Rename from trace_file_writer_xfree.
5157         (trace_file_writer_up): New typedef.
5158         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5159
5160 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5161
5162         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5163         <m_registers, m_register_status>: Change type to
5164         std::unique_ptr.
5165         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5166         XCNEWVEC.
5167
5168 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5169
5170         * common/common-regcache.h (enum register_status): Add
5171         underlying type "signed char".
5172         * regcache.h (reg_buffer) <m_register_status>: Change type to
5173         register_status *.
5174         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5175         register_status instead of signed char.
5176         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5177         (reg_buffer::get_register_status): Remove cast.
5178         (readable_regcache::raw_read): Remove cast.
5179         (readable_regcache::cooked_read): Remove cast.
5180
5181 2018-06-09  Tom Tromey  <tom@tromey.com>
5182
5183         * source.c (reverse_search_command, forward_search_command): Use
5184         scoped_fd.
5185
5186 2018-06-09  Tom Tromey  <tom@tromey.com>
5187
5188         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5189         (serial_ops_list): Now static, std::vector.
5190         (serial_interface_lookup, serial_add_interface): Update.
5191
5192 2018-06-09  Tom Tromey  <tom@tromey.com>
5193
5194         * dwarf2read.c (process_cu_includes): Update.
5195         (process_full_comp_unit): Update.
5196         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5197         std::vector.
5198
5199 2018-06-08  Paul Koning  <paul_koning@dell.com>
5200
5201         PR gdb/23252
5202
5203         * python/python.c (do_start_initialization):
5204         Avoid call to internal Python API.
5205         (init__gdb_module): New function.
5206
5207 2018-06-08  Gary Benson <gbenson@redhat.com>
5208
5209         * linux-thread-db.c (valprint.h): New include.
5210         (struct check_thread_db_info): New structure.
5211         (check_thread_db_on_load, tdb_testinfo): New static globals.
5212         (check_thread_db, check_thread_db_callback): New functions.
5213         (try_thread_db_load_1): Run integrity checks if requested.
5214         (maintenance_check_libthread_db): New function.
5215         (_initialize_thread_db): Register "maint check libthread-db"
5216         and "maint set/show check-libthread-db".
5217         * NEWS: Mention the above new commands.
5218
5219 2018-06-08  Tom Tromey  <tom@tromey.com>
5220
5221         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5222         now a method.
5223
5224 2018-06-08  Tom Tromey  <tom@tromey.com>
5225
5226         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5227
5228 2018-06-08  Tom Tromey  <tom@tromey.com>
5229
5230         * common/btrace-common.h (struct btrace_data): Add constructor,
5231         destructor, move assignment operator.
5232         <empty, clear, fini>: New methods.
5233         <format>: Initialize.
5234         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5235         (btrace_data_empty): Don't declare.
5236         * common/btrace-common.c (btrace_data_init): Remove.
5237         (btrace_data::fini): Rename from btrace_data_fini.
5238         (btrace_data::empty): Rename from btrace_data_empty.
5239         (btrace_data::clear): Rename from btrace_data_clear.  Return
5240         bool.
5241         * btrace.h (make_cleanup_btrace_data): Don't declare.
5242         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5243         (parse_xml_btrace): Update.
5244         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5245         (maint_btrace_clear_packet_history_cmd): Update.
5246
5247 2018-06-07  Pedro Alves  <palves@redhat.com>
5248
5249         * target.h (target_ops) <beneath>: Now a method.  All references
5250         updated.
5251         (class target_stack): New.
5252         * target.c (g_target_stack): New.
5253         (g_current_top_target): Delete.
5254         (current_top_target): Get the top target out of g_target_stack.
5255         (target_stack::push, target_stack::unpush): New.
5256         (push_target, unpush_target): Reimplement.
5257         (target_is_pushed): Reimplement in terms of g_target_stack.
5258         (target_ops::beneath, target_stack::find_beneath): New.
5259
5260 2018-06-07  Pedro Alves  <palves@redhat.com>
5261
5262         * target.h (find_target_beneath): Delete declaration.
5263         * target.c (find_target_beneath): Delete definition.
5264         * aix-thread.c: All callers of find_target_beneath adjusted to
5265         call target_ops::beneath instead.
5266         * bsd-uthread.c: Likewise.
5267         * linux-thread-db.c: Likewise.
5268         * ravenscar-thread.c: Likewise.
5269         * sol-thread.c: Likewise.
5270         * spu-multiarch.c: Likewise.
5271
5272 2018-06-07  Pedro Alves  <palves@redhat.com>
5273
5274         * target.h (target_ops) <beneath>: Now a method.  All references
5275         updated.
5276         (target_ops) <m_beneath>: New.
5277         * target.c (target_ops::beneath): New.
5278         * corelow.c: Adjust all references to target_ops::beneath.
5279         * linux-thread-db.c: Likewise.
5280         * make-target-delegates: Likewise.
5281         * record-btrace.c: Likewise.
5282         * record-full.c: Likewise.
5283         * remote.c: Likewise.
5284         * target.c: Likewise.
5285         * target-delegates.c: Regenerate.
5286
5287 2018-06-07  Pedro Alves  <palves@redhat.com>
5288
5289         * target.h (target_stack): Delete.
5290         (current_top_target): Declare function.
5291         * target.c (target_stack): Delete.
5292         (g_current_top_target): New.
5293         (current_top_target): New function.
5294         * auxv.c: Use current_top_target instead of target_stack
5295         throughout.
5296         * avr-tdep.c: Likewise.
5297         * breakpoint.c: Likewise.
5298         * corefile.c: Likewise.
5299         * elfread.c: Likewise.
5300         * eval.c: Likewise.
5301         * exceptions.c: Likewise.
5302         * frame.c: Likewise.
5303         * gdbarch-selftests.c: Likewise.
5304         * gnu-v3-abi.c: Likewise.
5305         * ia64-tdep.c: Likewise.
5306         * ia64-vms-tdep.c: Likewise.
5307         * infcall.c: Likewise.
5308         * infcmd.c: Likewise.
5309         * infrun.c: Likewise.
5310         * linespec.c: Likewise.
5311         * linux-tdep.c: Likewise.
5312         * minsyms.c: Likewise.
5313         * ppc-linux-nat.c: Likewise.
5314         * ppc-linux-tdep.c: Likewise.
5315         * procfs.c: Likewise.
5316         * regcache.c: Likewise.
5317         * remote.c: Likewise.
5318         * rs6000-tdep.c: Likewise.
5319         * s390-linux-nat.c: Likewise.
5320         * s390-tdep.c: Likewise.
5321         * solib-aix.c: Likewise.
5322         * solib-darwin.c: Likewise.
5323         * solib-dsbt.c: Likewise.
5324         * solib-spu.c: Likewise.
5325         * solib-svr4.c: Likewise.
5326         * solib-target.c: Likewise.
5327         * sparc-tdep.c: Likewise.
5328         * sparc64-tdep.c: Likewise.
5329         * spu-tdep.c: Likewise.
5330         * symfile.c: Likewise.
5331         * symtab.c: Likewise.
5332         * target-descriptions.c: Likewise.
5333         * target-memory.c: Likewise.
5334         * target.c: Likewise.
5335         * target.h: Likewise.
5336         * tracefile-tfile.c: Likewise.
5337         * tracepoint.c: Likewise.
5338         * valops.c: Likewise.
5339         * valprint.c: Likewise.
5340         * value.c: Likewise.
5341         * windows-tdep.c: Likewise.
5342         * mi/mi-main.c: Likewise.
5343
5344 2018-06-07  Tom Tromey  <tom@tromey.com>
5345
5346         * valprint.h (build_address_symbolic): Declare.
5347         * printcmd.c (print_address_symbolic): Update.
5348         (build_address_symbolic): Change "name" and "filename" to
5349         std::string.
5350         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5351         Update.
5352         * defs.h (build_address_symbolic): Remove declaration.
5353
5354 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5355
5356         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5357         (aarch64_vnv_type): Add function.
5358         (aarch64_pseudo_register_name): Add V regs for SVE.
5359         (aarch64_pseudo_register_type): Likewise.
5360         (aarch64_pseudo_register_reggroup_p): Likewise.
5361         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5362         (aarch64_pseudo_read_value): Add V regs for SVE.
5363         (aarch64_pseudo_write_2): Use V0 offset for SVE
5364         (aarch64_pseudo_write): Add V regs for SVE.
5365         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5366
5367 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5368
5369         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5370         (sve_vl_from_vq): Likewise.
5371
5372 2018-06-05  Tom Tromey  <tom@tromey.com>
5373
5374         * cli/cli-cmds.c (show_version): Update.
5375         * top.c (print_gdb_version): Add "interactive" parameter.
5376         Update.
5377         * main.c (captured_main_1): Update.
5378         * top.h (print_gdb_version): Add "interactive" parameter and a
5379         comment.
5380
5381 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5382
5383         * common/enum-flags.h: Add trailing semicolon to example in
5384         comment.
5385
5386 2018-06-05  Tom Tromey  <tom@tromey.com>
5387
5388         PR cli/12326:
5389         * NEWS: Add entry about pager.
5390         * utils.c (pagination_disabled_for_command): New global.
5391         (prompt_for_continue): Allow "c" response to prompt.
5392         (reinitialize_more_filter): Clear
5393         pagination_disabled_for_command.
5394         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5395
5396 2018-06-04  Tom Tromey  <tom@tromey.com>
5397
5398         * ada-lang.h (ada_lookup_symbol_list): Update.
5399         * ada-lang.c (resolve_subexp): Update.
5400         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5401         parameter.
5402         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5403         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5404         results parameter to std::vector.
5405         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5406         Update.
5407         * ada-exp.y (block_lookup): Update.
5408         (select_possible_type_sym): Change type of syms.  Remove nsyms
5409         parameter.
5410         (write_var_or_type, write_name_assoc): Update.
5411
5412 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5413
5414         * windows-nat.c (windows_nat_target::xfer_partial): Return
5415         TARGET_XFER_E_IO if we need to delegate to the target beneath
5416         but BENEATH is NULL.
5417
5418 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5419
5420         * Makefile.in (config.status): Add configure.nat as a
5421         dependency.
5422
5423 2018-06-04  Tom Tromey  <tom@tromey.com>
5424
5425         * cp-name-parser.y (cpname_state): Add method declarations.
5426         (HANDLE_QUAL): Update.
5427         (cpname_state::d_grab, cpname_state::fill_comp)
5428         (cpname_state::make_operator, cpname_state::make_dtor)
5429         (cpname_state::make_builtin_type, cpname_state::make_name)
5430         (cpname_state::d_qualify, cpname_state::d_int_type)
5431         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5432         (%union): Move earlier.
5433
5434 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5435
5436         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5437
5438 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5439
5440         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5441         (aarch64_pseudo_write_1): Likewise.
5442         (aarch64_pseudo_read_value): Use helper.
5443         (aarch64_pseudo_write): Likewise.
5444
5445 2018-06-04  Pedro Alves  <palves@redhat.com>
5446
5447         * darwin-nat.c (darwin_ops): Delete.
5448         (darwin_attach_pid): Use get_native_target.
5449
5450 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5451
5452         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5453         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5454
5455 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5456
5457         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5458         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5459         (aarch64_gdbarch_init): Check for SVE.
5460         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5461
5462 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5463
5464         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5465         * aarch64-tdep.h (aarch64_read_description): Likewise.
5466         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5467         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5468         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5469         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5470         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5471
5472 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5473
5474         * value.c (value_fetch_lazy_bitfield): New.
5475         (value_fetch_lazy_memory): New.
5476         (value_fetch_lazy_register): New.
5477         (value_fetch_lazy): Factor out to smaller functions.
5478
5479 2018-06-01  Tom Tromey  <tom@tromey.com>
5480
5481         * cp-name-parser.y (backslashable, represented): Now const.
5482
5483 2018-06-01  Tom Tromey  <tom@tromey.com>
5484
5485         * cp-name-parser.y: Include parser-defs.h.
5486         (parser_fprintf): Remove declaration.
5487
5488 2018-06-01  Tom Tromey  <tom@tromey.com>
5489
5490         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5491         %parse-param.
5492         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5493         (global_result): Remove globals.
5494         (struct cpname_state): New.
5495         (yyparse): Don't declare.
5496         (yylex, yyerror): Move declarations after %union.
5497         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5498         (make_name): Add state parameter.
5499         Update all callers.
5500         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5501         parameter.
5502         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5503         Update.
5504         (yylex): Add lvalp, state parameters.
5505         (yyerror): Add state parameter.
5506         (cp_demangled_name_to_comp): Update.
5507
5508 2018-06-01  Tom Tromey  <tom@tromey.com>
5509
5510         * cp-name-parser.y (parser_fprintf): Declare.
5511         (GDB_YY_REMAP_PREFIX): Define.
5512         Include yy-remap.h.  Don't redefine yy* identifiers.
5513
5514 2018-06-01  Tom Tromey  <tom@tromey.com>
5515
5516         * python/py-type.c (typy_legacy_template_argument): Update.
5517         * cp-support.h (cp_demangled_name_to_comp): Update.
5518         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5519         parameter to be a "std::string *".
5520         (main): Update.
5521
5522 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5523
5524         * ada-lex.l: Include "diagnostics.h" instead of
5525         "common/diagnostics.h".
5526         * unittests/environ-selftests.c: Likewise.
5527         * common/diagnostics.h: Moved to ../include.
5528
5529 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5530
5531         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5532         to language_mode_manual while calling breakpoint_re_set_one.
5533
5534 2018-06-01  Tom Tromey  <tom@tromey.com>
5535
5536         * valops.c (value_cast_structs, destructor_name_p): Update.
5537         * symtab.c (gdb_mangle_name): Update.
5538         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5539         Update.
5540         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5541         (pascal_object_print_value_fields, pascal_object_print_value):
5542         Update.
5543         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5544         * linespec.c (find_methods): Update.
5545         * gdbtypes.h (type_name_no_tag): Remove.
5546         (type_name_or_error): Rename from type_name_no_tag_or_error.
5547         * gdbtypes.c (type_name_no_tag): Remove.
5548         (type_name_or_error): Rename from type_name_no_tag_or_error.
5549         (lookup_struct_elt_type, check_typedef): Update.
5550         * expprint.c (print_subexp_standard): Update.
5551         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5552         * d-namespace.c (d_lookup_nested_symbol): Update.
5553         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5554         (cp_print_class_member): Update.
5555         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5556         * completer.c (add_struct_fields): Update.
5557         * c-typeprint.c (cp_type_print_derivation_info)
5558         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5559         Update.
5560         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5561         (ada_prefer_type, ada_is_exception_sym): Update.
5562
5563 2018-06-01  Tom Tromey  <tom@tromey.com>
5564
5565         * valops.c (enum_constant_from_type, value_namespace_elt)
5566         (value_maybe_namespace_elt): Update.
5567         * valarith.c (find_size_for_pointer_math): Update.
5568         * target-descriptions.c (make_gdb_type): Update.
5569         * symmisc.c (print_symbol): Update.
5570         * stabsread.c (define_symbol, read_type)
5571         (complain_about_struct_wipeout, add_undefined_type)
5572         (cleanup_undefined_types_1): Update.
5573         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5574         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5575         (rust_internal_print_type, rust_composite_type)
5576         (rust_evaluate_funcall, rust_evaluate_subexp)
5577         (rust_inclusive_range_type_p): Update.
5578         * python/py-type.c (typy_get_tag): Update.
5579         * p-typeprint.c (pascal_type_print_base): Update.
5580         * mdebugread.c (parse_symbol, parse_type): Update.
5581         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5582         Update.
5583         * guile/scm-type.c (gdbscm_type_tag): Update.
5584         * go-lang.c (sixg_string_p): Update.
5585         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5586         Update.
5587         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5588         (TYPE_TAG_NAME): Remove.
5589         * gdbtypes.c (type_name_no_tag): Simplify.
5590         (check_typedef, check_types_equal, recursive_dump_type)
5591         (copy_type_recursive, arch_composite_type): Update.
5592         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5593         in summary mode when needed.
5594         * eval.c (evaluate_funcall): Update.
5595         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5596         (process_structure_scope, read_enumeration_type)
5597         (read_namespace_type, read_module_type, determine_prefix): Update.
5598         * cp-support.c (inspect_type): Update.
5599         * coffread.c (process_coff_symbol, decode_base_type): Update.
5600         * c-varobj.c (c_is_path_expr_parent): Update.
5601         * c-typeprint.c (c_type_print_base_struct_union): Update.
5602         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5603         summary when using C language.
5604         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5605         (gen_maybe_namespace_elt): Update.
5606         * ada-lang.c (ada_type_name): Simplify.
5607         (empty_record, ada_template_to_fixed_record_type_1)
5608         (template_to_static_fixed_type)
5609         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5610
5611 2018-06-01  Tom Tromey  <tom@tromey.com>
5612
5613         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5614         c_print_type.
5615         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5616         (c_print_type): Update.
5617         (c_print_type): New overload.
5618         (c_type_print_varspec_prefix, c_type_print_args)
5619         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5620         (c_type_print_base_struct_union, c_type_print_base_1)
5621         (cp_type_print_method_args): Add "language" parameter.
5622         (c_type_print_base): Update.
5623         * c-lang.h (c_print_type): Add new overload.
5624
5625 2018-06-01  Tom Tromey  <tom@tromey.com>
5626
5627         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5628         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5629
5630 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5631
5632         * aarch64-tdep.c (aarch64_sve_register_names): New const
5633         var.
5634         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5635         (AARCH64_SVE_Z_REGS_NUM): New define.
5636         (AARCH64_SVE_P_REGS_NUM): Likewise.
5637         (AARCH64_SVE_NUM_REGS): Likewise.
5638
5639 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5640
5641         * nat/linux-ptrace.h [__alpha__]
5642         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5643         definitions.
5644
5645 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5646
5647         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5648         the endianness selected.
5649         * NEWS: Document `set endian auto' mode operation update.
5650
5651 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5652
5653         * Makefile.in: Add new header.
5654         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5655         (sve_vl_from_vg): Likewise.
5656         (sve_vq_from_vl): Likewise.
5657         (sve_vl_from_vq): Likewise.
5658         (sve_vq_from_vg): Likewise.
5659         (sve_vg_from_vq): Likewise.
5660         * configure.nat: Add new c file.
5661         * nat/aarch64-sve-linux-ptrace.c: New file.
5662         * nat/aarch64-sve-linux-ptrace.h: New file.
5663
5664 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5665
5666         * aarch64-linux-nat.c (aarch64_linux_read_description):
5667         Add parmeter zero.
5668         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5669         Likewise.
5670         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5671         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5672         (aarch64_gdbarch_init): Add parmeter zero.
5673         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5674         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5675         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5676         parmeter.
5677         * doc/gdb.texinfo: Describe SVE feature
5678         * features/aarch64-sve.c: New file.
5679
5680 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5681
5682         PR gdb/23210
5683         * gdbarch.sh (significant_addr_bit): Default to zero when
5684         not set by target architecture.
5685         * gdbarch.c: Re-generated.
5686         * utils.c (address_significant): Update.
5687
5688 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5689
5690         * stack.c (func_command): Remove trailing newline in call to error.
5691
5692 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5693
5694         * regcache.h (regcache_raw_collect): Remove, update callers to
5695         use regcache::raw_collect.
5696         * regcache.c (regcache_raw_collect): Remove.
5697
5698 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5699
5700         * regcache.h (regcache_raw_supply): Remove, update callers to
5701         use detached_regcache::raw_supply.
5702         * regcache.c (regcache_raw_supply): Remove.
5703
5704 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5705
5706         * regcache.h (regcache_cooked_write_part): Remove, update
5707         callers to use regcache::cooked_write_part.
5708         * regcache.c (regcache_cooked_write_part): Remove.
5709
5710 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5711
5712         * regcache.h (regcache_cooked_read_part): Remove, update callers
5713         to use readable_regcache::cooked_read_part.
5714         * regcache.c (regcache_cooked_read_part): Remove.
5715
5716 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5717
5718         * regcache.h (regcache_cooked_read_value): Remove, update
5719         callers to use readable_regcache::cooked_read_value.
5720         * regcache.c (regcache_cooked_read_value): Remove.
5721
5722 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5723
5724         * regcache.h (regcache_cooked_write): Remove, update callers to
5725         use regcache::cooked_write.
5726         * regcache.c (regcache_cooked_write): Remove.
5727
5728 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5729
5730         * regcache.h (regcache_invalidate): Remove, update callers to
5731         use detached_regcache::invalidate instead.
5732         * regcache.c (regcache_invalidate): Remove.
5733
5734 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5735
5736         * regcache.h (regcache_raw_write_part): Remove, update callers
5737         to use regcache::raw_write_part instead.
5738         * regcache.c (regcache_raw_write_part): Remove.
5739
5740 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5741
5742         * regcache.h (regcache_raw_read_part): Remove, update callers to
5743         use readable_regcache::raw_read_part instead.
5744         * regcache.c (regcache_raw_read_part): Remove.
5745
5746 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5747
5748         * regcache.h (regcache_cooked_read): Remove, update callers to
5749         use readable_regcache::cooked_read instead.
5750         * regcache.c (regcache_cooked_read): Remove.
5751
5752 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5753
5754         * regcache.h (regcache_raw_write): Remove, update callers to use
5755         regcache::raw_write instead.
5756         * regcache.c (regcache_raw_write): Remove.
5757
5758 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5759
5760         * regcache.h (regcache_raw_read): Remove, update callers to use
5761         readable_regcache::raw_read instead.
5762         * regcache.c (regcache_raw_read): Remove.
5763
5764 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5765
5766         * regcache.h (regcache_raw_update): Remove, update callers to
5767         use readable_regcache::raw_update instead.
5768         * regcache.c (regcache_raw_update): Remove.
5769
5770 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5771
5772         * regcache.h (regcache_register_status): Remove, update callers
5773         to use reg_buffer::get_register_status directly instead.
5774         * regcache.c (regcache_register_status): Remove.
5775
5776 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5777
5778         * regcache.h (regcache_get_ptid): Remove, update all callers to
5779         call regcache::ptid instead.
5780         * regcache.c (regcache_get_ptid): Remove.
5781
5782 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5783
5784         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5785
5786 2018-05-30  Pedro Alves  <palves@redhat.com>
5787
5788         * common/common-exceptions.h (exception_rethrow): Use
5789         ATTRIBUTE_NORETURN.
5790
5791 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5792
5793         * breakpoint.c (print_solib_event, check_status_catch_solib):
5794         Remove struct keyword in range-based for loops.
5795         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5796         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5797         Likewise.
5798         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5799         Likewise.
5800         * symfile.c (addr_info_make_relative): Likewise.
5801         * thread.c (value_in_thread_stack_temporaries): Likewise.
5802
5803 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5804
5805         PR gdb/16841
5806         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5807         aggregate type to get its real type before accessing it.
5808
5809 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5810
5811         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5812         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5813         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5814         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5815         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5816         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5817         * printcmd.c (info_address_command): Likewise.
5818
5819 2018-05-29  Tom Tromey  <tom@tromey.com>
5820
5821         * windows-nat.c (handle_exception): Update fall-through comment.
5822
5823 2018-05-29  Tom Tromey  <tom@tromey.com>
5824
5825         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5826         (struct program_space) <added_solibs>: Now a std::vector.
5827         * breakpoint.c (print_solib_event): Update.
5828         (check_status_catch_solib): Update.
5829         * progspace.c (clear_program_space_solib_cache): Update.
5830         * solib.c (update_solib_list): Update.
5831
5832 2018-05-29  Tom Tromey  <tom@tromey.com>
5833
5834         * python/py-type.c (typy_richcompare): Update.
5835         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5836         * gdbtypes.h (types_deeply_equal): Return bool.
5837         (types_equal): Likewise.
5838         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5839         declare VEC.
5840         (check_types_equal): Change worklist to std::vector.  Return
5841         bool.
5842         (struct type_equality_entry): Add constructor.
5843         (compare_maybe_null_strings): Return bool.
5844         (check_types_worklist): Return bool.  Change worklist to
5845         std::vector.
5846         (types_deeply_equal): Use std::vector.
5847         (types_equal): Return bool.
5848         (compare_maybe_null_strings): Simplify.
5849
5850 2018-05-29  Tom Tromey  <tom@tromey.com>
5851
5852         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5853
5854 2018-05-29  Tom Tromey  <tom@tromey.com>
5855
5856         * objc-lang.h: Don't include cp-support.h.
5857         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5858         declare VEC.
5859
5860 2018-05-27  Tom Tromey  <tom@tromey.com>
5861
5862         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5863
5864 2018-05-25  Tom Tromey  <tom@tromey.com>
5865
5866         * value.c (value::location): Initialize.
5867
5868 2018-05-25  Tom Tromey  <tom@tromey.com>
5869
5870         * dbxread.c (init_bincl_list): Remove.
5871         (bincl_list): Now a std::vector.
5872         (bincls_allocated, next_bincl): Remove.
5873         (free_bincl_list, do_free_bincl_list_cleanup)
5874         (make_cleanup_free_bincl_list): Remove.
5875         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5876         unique_xmalloc_ptr.
5877         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5878         (struct header_file_location): Add constructor.
5879         (add_bincl_to_list): Remove.
5880
5881 2018-05-25  Tom Tromey  <tom@tromey.com>
5882
5883         * tui/tui.c (tui_enable): Update.
5884         * mi/mi-interp.c (mi_interp::init): Update.
5885         * interps.h (class interp) <name>: New method.
5886         <m_name>: Rename from name.
5887         (~scoped_restore_interp): Update.
5888         * interps.c (interp::interp): Update.
5889         (interp_add, interp_set, interp_lookup_existing)
5890         (current_interp_named_p): Update.
5891
5892 2018-05-25  Tom Tromey  <tom@tromey.com>
5893
5894         * interps.c (interp_name): Remove.
5895         * mi/mi-interp.c (mi_interp::init): Update.
5896         * interps.h (interp_name): Remove.
5897         (~scoped_restore_interp): Update.
5898         * tui/tui.c (tui_enable): Update.
5899
5900 2018-05-25  Tom Tromey  <tom@tromey.com>
5901
5902         * utils.c (fputs_maybe_filtered): Update.
5903         * linespec.c (decode_line_full): Update.
5904         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5905         (mi_print_breakpoint_for_event, mi_solib_loaded)
5906         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5907         (mi_user_selected_context_changed): Update.
5908         * mi/mi-main.c (mi_execute_command): Update.
5909         * cli/cli-script.c (execute_control_command): Update.
5910         * python/python.c (execute_gdb_command): Update.
5911         * solib.c (info_sharedlibrary_command): Update.
5912         * interps.c (interp_ui_out): Remove.
5913         * interps.h (interp_ui_out): Remove.
5914
5915 2018-05-25  Tom Tromey  <tom@tromey.com>
5916
5917         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5918         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5919         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5920
5921 2018-05-25  Tom Tromey  <tom@tromey.com>
5922
5923         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5924         * interps.c (interp_exec): Use scoped_restore.
5925
5926 2018-05-25  Tom Tromey  <tom@tromey.com>
5927
5928         * remote.c (remote_target::remote_file_get): Use
5929         gdb::byte_vector.
5930         (remote_target::remote_file_put): Likewise.
5931
5932 2018-05-25  Tom Tromey  <tom@tromey.com>
5933
5934         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5935         a std::string.
5936         (get_pe_section_index, add_pe_exported_sym): Update.
5937         (read_pe_exported_syms): Use gdb::def_vector.
5938
5939 2018-05-25  Tom Tromey  <tom@tromey.com>
5940
5941         * frame.c (remove_prev_frame): Remove.
5942         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5943
5944 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5945
5946         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5947         Remove prototypes.
5948         * mips-linux-nat.c (supply_fpregset): Always call
5949         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5950         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5951         `mips_fill_fpregset'.
5952         * mips-linux-tdep.c (mips_supply_fpregset)
5953         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5954         (mips_fill_fpregset_wrapper): Remove functions.
5955         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5956         (mips_linux_fpregset): Remove variable.
5957         (mips_linux_iterate_over_regset_sections): Use
5958         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5959         (mips_linux_o32_sigframe_init): Remove comment.
5960
5961 2018-05-25  Pedro Alves  <palves@redhat.com>
5962
5963         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5964         (struct readahead_cache, struct packet_reg, struct
5965         remote_arch_state, class remote_state): Move higher up in the
5966         file.
5967         (remote_target::m_remote_state): Now an object instead of a pointer.
5968         (remote_target::get_remote_state): Adjust.
5969
5970 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5971
5972         * stack.c (select_and_print_frame): Delete.
5973         (struct function_bounds): Move struct within function.
5974         (func_command): Most content moved into new function
5975         find_frame_for_function, use new function, print result, add
5976         function comment.
5977         (find_frame_for_function): New function, now returns a result.
5978
5979 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5980
5981         * stack.c (iterate_over_block_arg_vars): Fix comment.
5982         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5983
5984 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5985
5986         PR gdb/23203
5987         * frame.c
5988         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5989         Define.
5990         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5991         Define.
5992         * frame.h (class scoped_restore_selected_frame): New class.
5993         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5994         of any exception, use scoped_restore_selected_frame to restore the
5995         frame instead.
5996
5997 2018-05-24  Pedro Alves  <palves@redhat.com>
5998
5999         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6000         override.
6001
6002 2018-05-23  Tom Tromey  <tom@tromey.com>
6003
6004         * complaints.c (struct complaints): Remove.
6005         (symfile_complaint_book): Remove.
6006         (series): New global.
6007         (complaint_internal): Update.
6008         (clear_complaints): Update.
6009
6010 2018-05-23  Tom Tromey  <tom@tromey.com>
6011
6012         * complaints.c (counters): New global.
6013         (struct complain): Remove.
6014         (struct complaints) <root>: Remove.
6015         (complaint_sentinel): Remove.
6016         (symfile_complaint_book): Update.
6017         (find_complaint) Remove.
6018         (complaint_internal, clear_complaints): Update.
6019
6020 2018-05-23  Tom Tromey  <tom@tromey.com>
6021
6022         * complaints.c (struct complain) <file, line>: Remove.
6023         (find_complaint): Remove file, line parameters.
6024         (complaint_internal): Update.
6025
6026 2018-05-23  Tom Tromey  <tom@tromey.com>
6027
6028         * complaints.c (vcomplaint): Remove.
6029         (complaint_internal) Merge in contents of vcomplaint.
6030
6031 2018-05-23  Tom Tromey  <tom@tromey.com>
6032
6033         * complaints.c (struct complaints) <explanation>: Remove.
6034         (symfile_explanations): Remove.
6035         (symfile_complaint_book): Update.
6036         (vcomplaint): Update.
6037         (struct explanation): Remove.
6038
6039 2018-05-23  Tom Tromey  <tom@tromey.com>
6040
6041         * complaints.c (symfile_complaints): Remove.
6042         (complaint_internal): Remove "complaints" parameter.
6043         (clear_complaints, vcomplaint): Remove "c" parameter.
6044         (get_complaints): Remove.
6045         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6046         (dwarf2_debug_line_missing_file_complaint)
6047         (dwarf2_debug_line_missing_end_sequence_complaint)
6048         (dwarf2_complex_location_expr_complaint)
6049         (dwarf2_const_value_length_mismatch_complaint)
6050         (dwarf2_section_buffer_overflow_complaint)
6051         (dwarf2_macro_malformed_definition_complaint)
6052         (dwarf2_invalid_attrib_class_complaint)
6053         (create_addrmap_from_index, dw2_symtab_iter_next)
6054         (dw2_expand_marked_cus)
6055         (dw2_debug_names_iterator::find_vec_in_debug_names)
6056         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6057         (create_debug_type_hash_table, init_cutu_and_read_dies)
6058         (partial_die_parent_scope, add_partial_enumeration)
6059         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6060         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6061         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6062         (create_cus_hash_table, create_dwp_hash_table)
6063         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6064         (dwarf2_rnglists_process, dwarf2_ranges_process)
6065         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6066         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6067         (handle_struct_member_die, process_structure_scope)
6068         (read_array_type, read_common_block, read_module_type)
6069         (read_tag_pointer_type, read_typedef, read_base_type)
6070         (read_subrange_type, load_partial_dies, partial_die_info::read)
6071         (partial_die_info::read, partial_die_info::read)
6072         (partial_die_info::read, read_checked_initial_length_and_offset)
6073         (dwarf2_string_attr, read_formatted_entries)
6074         (dwarf_decode_line_header)
6075         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6076         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6077         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6078         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6079         (get_signatured_type, get_DW_AT_signature_type)
6080         (decode_locdesc, file_file_name, consume_improper_spaces)
6081         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6082         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6083         (dwarf2_symbol_mark_computed, set_die_type)
6084         (read_attribute_value): Update.
6085         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6086         Update.
6087         * dbxread.c (unknown_symtype_complaint)
6088         (lbrac_mismatch_complaint, repeated_header_complaint)
6089         (set_namestring, function_outside_compilation_unit_complaint)
6090         (read_dbx_symtab, process_one_symbol): Update.
6091         * gdbtypes.c (stub_noname_complaint): Update.
6092         * windows-nat.c (handle_unload_dll): Update.
6093         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6094         (decode_base_type): Update.
6095         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6096         (eb_complaint, record_include_begin, record_include_end)
6097         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6098         (process_xcoff_symbol, read_symbol)
6099         (function_outside_compilation_unit_complaint)
6100         (scan_xcoff_symtab): Update.
6101         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6102         * buildsym.c (finish_block_internal, make_blockvector)
6103         (end_symtab_get_static_block, augment_type_symtab): Update.
6104         * dtrace-probe.c (dtrace_process_dof)
6105         (dtrace_static_probe_ops::get_probes): Update.
6106         * complaints.h (struct complaint): Don't declare.
6107         (symfile_complaints): Remove.
6108         (complaint_internal): Remove "complaints" parameter.
6109         (complaint): Likewise.
6110         (clear_complaints): Likewise.
6111         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6112         (reread_symbols): Update.
6113         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6114         (dwarf2_frame_cache, decode_frame_entry): Update.
6115         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6116         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6117         (info_selectors_command): Update.
6118         * macrotab.c (macro_include, check_for_redefinition)
6119         (macro_undef): Update.
6120         * objfiles.c (filter_overlapping_sections): Update.
6121         * stabsread.c (invalid_cpp_abbrev_complaint)
6122         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6123         (define_symbol, error_type, read_type, rs6000_builtin_type)
6124         (stabs_method_name_from_physname, read_member_functions)
6125         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6126         (attach_fields_to_type, complain_about_struct_wipeout)
6127         (read_range_type, read_args, common_block_start)
6128         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6129         Update.
6130         * mdebugread.c (index_complaint, unknown_ext_complaint)
6131         (basic_type_complaint, bad_tag_guess_complaint)
6132         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6133         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6134         (parse_procedure, parse_lines)
6135         (function_outside_compilation_unit_complaint)
6136         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6137         (bad_tag_guess_complaint, reg_value_complaint): Update.
6138         * cp-support.c (demangled_name_complaint): Update.
6139         * macroscope.c (sal_macro_scope): Update.
6140         * dwarf-index-write.c (class debug_names): Update.
6141
6142 2018-05-23  Tom Tromey  <tom@tromey.com>
6143
6144         * complaints.c (clear_complaints): Remove "noisy" parameter.
6145         * complaints.h (clear_complaints): Update.
6146         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6147         (reread_symbols): Update.
6148
6149 2018-05-23  Tom Tromey  <tom@tromey.com>
6150
6151         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6152         SUBSEQUENT_MESSAGE.
6153         (vcomplaint, clear_complaints): Update.
6154         (symfile_explanations): Remove some messages.
6155
6156 2018-05-23  Tom Tromey  <tom@tromey.com>
6157
6158         * complaints.c (internal_complaint): Remove.
6159         * complaints.h (internal_complaint): Remove.
6160
6161 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6162
6163         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6164
6165 2018-05-22  Pedro Alves  <palves@redhat.com>
6166
6167         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6168         (remote_fileio_badfd, remote_fileio_return_errno)
6169         (remote_fileio_return_success, remote_fileio_func_open)
6170         (remote_fileio_func_open, remote_fileio_func_close)
6171         (remote_fileio_func_read, remote_fileio_func_write)
6172         (remote_fileio_func_lseek, remote_fileio_func_rename)
6173         (remote_fileio_func_unlink, remote_fileio_func_stat)
6174         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6175         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6176         remote_target parameter.
6177         (remote_fio_func_map) <func>: Add remote_target parameter.
6178         (do_remote_fileio_request, remote_fileio_request):
6179         * remote-fileio.h (remote_fileio_request):
6180         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6181         remote_target parameter.
6182         (remote_notif_process, handle_notification): Adjust to pass down
6183         the remote.
6184         (remote_notif_state_allocate): Add remote_target parameter.  Save
6185         it.
6186         * remote-notif.h (struct remote_target): Forward declare.
6187         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6188         remote_target parameter.
6189         (struct remote_notif_state) <remote>: New field.
6190         (remote_notif_ack, remote_notif_parse): Add remote_target
6191         parameter.
6192         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6193         remote_target parameter.
6194         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6195         (threads_listing_context, rmt_thread_action, protocol_feature)
6196         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6197         (packet_result, struct threads_listing_context, remote_state):
6198         Move definitions and declarations higher up.
6199         (remote_target) <~remote_target>: Declare.
6200         (remote_download_command_source, remote_file_put, remote_file_get)
6201         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6202         (remote_hostio_pread_vFile, remote_hostio_send_command)
6203         (remote_hostio_set_filesystem, remote_hostio_open)
6204         (remote_hostio_close, remote_hostio_unlink, remote_state)
6205         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6206         (get_memory_write_packet_size, get_memory_read_packet_size)
6207         (append_pending_thread_resumptions, remote_detach_1)
6208         (append_resumption, remote_resume_with_vcont)
6209         (add_current_inferior_and_thread, wait_ns, wait_as)
6210         (process_stop_reply, remote_notice_new_inferior)
6211         (process_initial_stop_replies, remote_add_thread)
6212         (btrace_sync_conf, remote_btrace_maybe_reopen)
6213         (remove_new_fork_children, kill_new_fork_children)
6214         (discard_pending_stop_replies, stop_reply_queue_length)
6215         (check_pending_events_prevent_wildcard_vcont)
6216         (discard_pending_stop_replies_in_queue, stop_reply)
6217         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6218         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6219         (remote_interrupt_as, remote_interrupt_ns)
6220         (remote_get_noisy_reply, remote_query_attached)
6221         (remote_add_inferior, remote_current_thread, get_current_thread)
6222         (set_thread, set_general_thread, set_continue_thread)
6223         (set_general_process, write_ptid)
6224         (remote_unpack_thread_info_response, remote_get_threadinfo)
6225         (parse_threadlist_response, remote_get_threadlist)
6226         (remote_threadlist_iterator, remote_get_threads_with_ql)
6227         (remote_get_threads_with_qxfer)
6228         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6229         (get_offsets, remote_check_symbols, remote_supported_packet)
6230         (remote_query_supported, remote_packet_size)
6231         (remote_serial_quit_handler, remote_detach_pid)
6232         (remote_vcont_probe, remote_resume_with_hc)
6233         (send_interrupt_sequence, interrupt_query)
6234         (remote_notif_get_pending_events, fetch_register_using_p)
6235         (send_g_packet, process_g_packet, fetch_registers_using_g)
6236         (store_register_using_P, store_registers_using_G)
6237         (set_remote_traceframe, check_binary_download)
6238         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6239         (remote_xfer_live_readonly_partial, remote_read_bytes)
6240         (remote_send_printf, remote_flash_write, readchar)
6241         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6242         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6243         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6244         (extended_remote_disable_randomization, extended_remote_run)
6245         (send_environment_packet, extended_remote_environment_support)
6246         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6247         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6248         (packet_command): Now methods of ...
6249         (remote_target): ... this class.
6250         (m_remote_state) <remote_target>: New field.
6251         (struct remote_state) <stop_reply_queue,
6252         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6253         fields.
6254         (remote_state::remote_state): Allocate stop_reply_queue.
6255         (remote_state): Delete global.
6256         (get_remote_state_raw): Delete.
6257         (remote_target::get_remote_state): Allocate m_remote_state on
6258         demand.
6259         (get_current_remote_target): New.
6260         (remote_ops, extended_remote_ops): Delete.
6261         (wait_forever_enabled_p, remote_async_inferior_event_token):
6262         Delete, moved to struct remote_state.
6263         (remote_target::close): Delete self.  Destruction bits split to
6264         ...
6265         (remote_target::~remote_target): ... this.
6266         (show_memory_packet_size): Adjust to use
6267         get_current_remote_target.
6268         (struct protocol_feature) <func>: Add remote_target parameter.
6269         All callers adjusted.
6270         (curr_quit_handler_target): New.
6271         (remote_serial_quit_handler): Reimplement.
6272         (remote_target::open_1): Adjust to use get_current_remote_target.
6273         Heap-allocate remote_target/extended_remote_target instances.
6274         (vcont_builder::vcont_builder): Add remote_target parameter, and
6275         save it in m_remote.  All callers adjusted.
6276         (vcont_builder::m_remote): New field.
6277         (vcont_builder::restart, vcont_builder::flush)
6278         (vcont_builder::push_action): Use it.
6279         (remote_target::commit_resume): Use it.
6280         (struct queue_iter_param) <remote>: New field.
6281         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6282         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6283         (check_pending_event_prevents_wildcard_vcont_callback)
6284         (remote_target::check_pending_events_prevent_wildcard_vcont)
6285         (remote_target::discard_pending_stop_replies)
6286         (remote_target::discard_pending_stop_replies_in_queue)
6287         (remote_target::remote_notif_remove_queued_reply): Fill in
6288         'remote' field.
6289         (remote_notif_get_pending_events): New.
6290         (remote_target::readchar, remote_target::remote_serial_write):
6291         Save/restore curr_quit_handler_target.
6292         (putpkt): New.
6293         (kill_new_fork_children): Fill in 'remote' field.
6294         (packet_command): Use get_current_remote_target, defer to
6295         remote_target method of same name.
6296         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6297         parameter, and save it in m_remote.  All callers adjusted.
6298         (scoped_remote_fd::release): Use m_remote.
6299         (scoped_remote_fd::m_remote): New field.
6300         (remote_file_put, remote_file_get, remote_file_delete): Use
6301         get_current_remote_target, defer to remote_target method of same
6302         name.
6303         (remote_btrace_reset): Add remote_state paremeter.  Update all
6304         callers.
6305         (remote_async_inferior_event_handler). Pass down 'data'.
6306         (remote_new_objfile): Use get_current_remote_target.
6307         (remote_target::vcont_r_supported): New.
6308         (set_range_stepping): Use get_current_remote_target and
6309         remote_target::vcont_r_supported.
6310         (_initialize_remote): Don't allocate 'remote_state' and
6311         'stop_reply_queue' globals.
6312         * remote.h (struct remote_target): Forward declare.
6313         (getpkt, putpkt, remote_notif_get_pending_events): Add
6314         'remote_target' parameter.
6315
6316 2018-05-22  Pedro Alves  <palves@redhat.com>
6317
6318         * remote.c (vcont_builder): Now a class.  Make all data members
6319         private.
6320         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6321         Declare methods.
6322         (vcont_builder_restart): Rename to ...
6323         (vcont_builder::restart): ... this.
6324         (vcont_builder_flush): Rename to ...
6325         (vcont_builder::flush): ... this.
6326         (vcont_builder_push_action): Rename to ...
6327         (vcont_builder::push_action): ... this.
6328         (remote_target::commit_resume): Adjust.
6329
6330 2018-05-22  Pedro Alves  <palves@redhat.com>
6331
6332         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6333         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6334         (get_fixed_memory_packet_size): New.
6335         (get_memory_packet_size): Use it.
6336         (set_memory_packet_size): Don't override the config size with
6337         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6338         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6339         Don't refer to get_memory_packet_size if not connected to a remote
6340         target.  Show "(default)" if configured size is 0.
6341
6342 2018-05-22  Pedro Alves  <palves@redhat.com>
6343
6344         * remote.c (remote_target::mourn_inferior): Move
6345         discard_pending_stop_replies call here from ...
6346         (_initialize_remote): ... here.
6347
6348 2018-05-22  Pedro Alves  <palves@redhat.com>
6349
6350         * remote.c (compare_section_command): Remove set_general_process
6351         call.
6352
6353 2018-05-22  Pedro Alves  <palves@redhat.com>
6354
6355         * remote.c (struct packet_reg, struct remote_arch_state):
6356         Move higher up in the file.
6357         (remote_state) <m_arch_states>: Store remote_arch_state values
6358         instead of remote_arch_state pointers.
6359         (remote_state::get_remote_arch_state): Adjust.
6360
6361 2018-05-22  Pedro Alves  <palves@redhat.com>
6362
6363         * remote.c: Include <unordered_map>.
6364         (remote_state): Now a class.
6365         (remote_state) <get_remote_arch_state>: Declare method.
6366         <get_remote_arch_state>: New field.
6367         (remote_arch_state) <remote_arch_state>: Declare ctor.
6368         <regs>: Now a unique_ptr.
6369         (remote_gdbarch_data_handle): Delete.
6370         (get_remote_arch_state): Delete.
6371         (remote_state::get_remote_arch_state): New.
6372         (get_remote_state): Adjust to call remote_state's
6373         get_remote_arch_state method.
6374         (init_remote_state): Delete, bits factored out to ...
6375         (remote_arch_state::remote_arch_state): ... this new method.
6376         (get_remote_packet_size, get_memory_packet_size)
6377         (process_g_packet, remote_target::fetch_registers)
6378         (remote_target::prepare_to_store, store_registers_using_G)
6379         (remote_target::store_registers, remote_target::get_trace_status):
6380         Adjust to call remote_state's method.
6381         (_initialize_remote): Remove reference to
6382         remote_gdbarch_data_handle.
6383
6384 2018-05-22  Pedro Alves  <palves@redhat.com>
6385
6386         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6387         pread>: New method declarations.
6388         (remote_target::open_1): Adjust.
6389         (readahead_cache_invalidate): Rename to ...
6390         (readahead_cache::invalidate): ... this, and adjust to be a class
6391         method.
6392         (readahead_cache_invalidate_fd): Rename to ...
6393         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6394         class method.
6395         (remote_hostio_pwrite): Adjust.
6396         (remote_hostio_pread_from_cache): Rename to ...
6397         (readahead_cache::pread): ... this, and adjust to be a class
6398         method.
6399         (remote_hostio_close): Adjust.
6400
6401 2018-05-22  Pedro Alves  <palves@redhat.com>
6402
6403         * remote.c (remote_hostio_close_cleanup): Delete.
6404         (class scoped_remote_fd): New.
6405         (remote_file_put, remote_file_get): Use it.
6406
6407 2018-05-22  Pedro Alves  <palves@redhat.com>
6408
6409         (struct vCont_action_support): Use bool and initialize all fields.
6410         (struct readahead_cache): Initialize all fields.
6411         (remote_state): Use bool and initialize all fields.
6412         (remote_state::remote_state, remote_state::~remote_state): New.
6413         (new_remote_state): Delete.
6414         (_initialize_remote): Use new to allocate remote_state.
6415
6416 2018-05-22  Pedro Alves  <palves@redhat.com>
6417             張俊芝  <zjz@zjz.name>
6418
6419         PR gdb/22973
6420         * c-exp.y: Include "c-support.h".
6421         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6422         of tolower.  Use c_ident_is_alpha to scan names.
6423         * c-lang.c: Include "c-support.h".
6424         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6425         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6426         * c-support.h: New file, with bits factored out from ...
6427         * cp-name-parser.y: ... this file.
6428         Include "c-support.h".
6429         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6430         c-support.h and renamed.
6431         (symbol_end, yylex): Adjust.
6432
6433 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6434
6435         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6436         parameter type to CORE_ADDR.
6437         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6438         parameter type in declaration to CORE_ADDR.
6439         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6440         target_auxv_search to get AT_HWCAP and use the result to get the
6441         target description.
6442         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6443         to CORE_ADDR. Remove the cast of the return value to unsigned
6444         long. Fix error predicate of target_auxv_search.
6445         (ppc_linux_nat_target::read_description): Change the type of the
6446         hwcap variable to CORE_ADDR.
6447
6448 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6449
6450         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6451         if the size of fpscr is larger than 32 bits.
6452
6453 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6454
6455         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6456         (ppc32_linux_vsxregmap): New global.
6457         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6458         regcache_supply_regset, and regcache_collect_regset.
6459         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6460         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6461         (fetch_vsx_register, store_vsx_register): Remove.
6462         (fetch_vsx_registers): Add regno parameter. Get regset using
6463         ppc_linux_vsxregset. Use regset to supply registers.
6464         (store_vsx_registers): Add regno parameter. Get regset using
6465         ppc_linux_vsxregset. Use regset to collect registers.
6466         (fetch_register): Call fetch_vsx_registers instead of
6467         fetch_vsx_register.
6468         (store_register): Call store_vsx_registers instead of
6469         store_vsx_register.
6470         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6471         new regno parameter.
6472         (store_ppc_registers): Call store_vsx_registers with -1 for the
6473         new regno parameter.
6474         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6475         (ppc_collect_vsxregset): Remove.
6476
6477 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6478
6479         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6480         offset fields.
6481         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6482         for vector register offset fields.
6483         (ppc64_fbsd_reg_offsets): Likewise.
6484         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6485         to vector register offset fields.
6486         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6487         to vector register offset fields.
6488         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6489         vector register offset fields.
6490         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6491         initializers for vector register offset fields.
6492         (rs6000_aix64_reg_offsets): Likewise.
6493         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6494         (ppc_supply_vrregset): Remove.
6495         (ppc_collect_vrregset): Remove.
6496         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6497         (ppc_linux_vrregset) : New function.
6498         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6499         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6500         (ppc32_linux_vrregset): Remove.
6501         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6502         and use result instead of ppc32_linux_vrregset.
6503         (ppc32_linux_reg_offsets): Remove initializers for vector register
6504         offset fields.
6505         (ppc64_linux_reg_offsets): Likewise.
6506         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6507         * ppc-linux-nat.c: Include regset.h.
6508         (gdb_vrregset_t): Adjust comment to account for little-endian
6509         mode.
6510         (supply_vrregset, fill_vrregset): Remove.
6511         (fetch_altivec_register, store_altivec_register): Remove.
6512         (fetch_altivec_registers): Add regno parameter. Get regset using
6513         ppc_linux_vrregset. Use regset to supply registers.
6514         (store_altivec_registers): Add regno parameter. Get regset using
6515         ppc_linux_vrregset. Use regset to collect registers.
6516         (fetch_register): Call fetch_altivec_registers instead of
6517         fetch_altivec_register.
6518         (store_register): Call store_altivec_registers instead of
6519         store_altivec_register.
6520         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6521         the new regno parameter.
6522         (store_ppc_registers): Call store_altivec_registers with -1 for
6523         the new regno parameter.
6524
6525 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6526
6527         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6528         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6529         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6530         (gdb_vrregset_t): Change array type size to
6531         PPC_LINUX_SIZEOF_VRREGSET.
6532         (gdb_vsxregset_t): Change array type size to
6533         PPC_LINUX_SIZEOF_VSXREGSET.
6534         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6535         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6536         PPC_LINUX_SIZEOF_VSXREGSET.
6537
6538 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6539
6540         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6541         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6542         nat/ppc-linux.c.
6543         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6544         ppc_linux_target_wordsize with tid.
6545         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6546         wordsize with tid.
6547         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6548         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6549         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6550         tid parameter. Remove static specifier.
6551         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6552         (ppc_linux_target_wordsize): New declaration.
6553
6554 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6555
6556         * arch/ppc-linux-common.c: New file.
6557         * arch/ppc-linux-common.h: New file.
6558         * arch/ppc-linux-tdesc.h: New file.
6559         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6560         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6561         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6562         arch/ppc-linux-tdesc.h.
6563         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6564         arch/ppc-linux-tdesc.h.
6565         (ppc_linux_nat_target::read_description): Remove target
6566         description matching code. Fill a ppc_linux_features struct and
6567         call ppc_linux_match_description with it. Move comment about ISA
6568         2.05 to ppc-linux-common.c.
6569         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6570         arch/ppc-linux-tdesc.h.
6571         (ppc_linux_core_read_description): Remove target description
6572         matching code. Fill a ppc_linux_features struct and call
6573         ppc_linux_match_description with it.
6574         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6575         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6576         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6577         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6578         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6579         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6580         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6581         (tdesc_powerpc_e500l): Remove.
6582
6583 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6584
6585         * ada-lang.c (catch_assert_command): Pass empty string instead
6586         of NULL for excep_string argument.
6587
6588 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6589
6590         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6591         the width of the requested register exceeds the width of the
6592         `ptrace' data type.
6593
6594 2018-05-21  Tom Tromey  <tom@tromey.com>
6595
6596         * printcmd.c (output_command): Remove.
6597         (output_command_const): Rename to output_command.
6598         * valprint.h (output_command): Rename from output_command_const.
6599         * tracepoint.c (trace_dump_actions): Call output_command.
6600
6601 2018-05-21  Tom Tromey  <tom@tromey.com>
6602
6603         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6604         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6605         * ada-lang.h (create_ada_exception_catchpoint): Update.
6606         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6607         std::string.
6608         (create_excep_cond_exprs, ~ada_catchpoint)
6609         (should_stop_exception, print_one_exception)
6610         (print_mention_exception, print_recreate_exception): Update.
6611         (ada_get_next_arg): Remove.
6612         (catch_ada_exception_command_split): Use std::string.  Change type
6613         of "excep_string", "cond_string".
6614         (catch_ada_exception_command): Update.
6615         (create_ada_exception_catchpoint): Change type of excep_string.
6616         (ada_exception_sal): Remove excep_string parameter.
6617         (~ada_catchpoint): Remove.
6618
6619 2018-05-21  Tom Tromey  <tom@tromey.com>
6620
6621         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6622         cleanup.
6623
6624 2018-05-21  Tom Tromey  <tom@tromey.com>
6625
6626         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6627         Return unique_xmalloc_ptr.
6628         (print_it_exception): Update.
6629
6630 2018-05-21  Tom Tromey  <tom@tromey.com>
6631
6632         * tracepoint.c (trace_dump_actions): Use std::string.
6633
6634 2018-05-21  Tom Tromey  <tom@tromey.com>
6635
6636         * symfile.c (reread_symbols): Use std::string for original_name.
6637
6638 2018-05-21  Tom Tromey  <tom@tromey.com>
6639
6640         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6641         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6642         constructor.
6643
6644 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6645
6646         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6647         instance to...
6648         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6649         * objfiles.c (get_objfile_bfd_data): Allocate
6650         objfile_per_bfd_storage with obstack_new when allocating on
6651         obstack.
6652
6653 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6654
6655         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6656         OBSTACK_ZALLOC.
6657         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6658         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6659         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6660         (add_pending): Likewise.
6661         (parse_symbol): Likewise.
6662         (parse_partial_symbols): Likewise.
6663         (psymtab_to_symtab_1): Likewise.
6664         (new_psymtab): Likewise.
6665         (elfmdebug_build_psymtabs): Likewise.
6666         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6667         * objfiles.c (get_objfile_bfd_data): Likewise.
6668         (objfile_register_static_link): Likewise.
6669         * psymtab.c (allocate_psymtab): Likewise.
6670         * stabsread.c (read_member_functions): Likewise.
6671         * xcoffread.c (xcoff_end_psymtab): Likewise.
6672
6673 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6674
6675         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6676         compiler supports std::is_trivially_constructible.
6677         * common/poison.h: Include obstack.h.
6678         (IsMallocable): Define to is_trivially_constructible if the
6679         compiler supports it, define to true_type otherwise.
6680         (xobnew): New.
6681         (XOBNEW): Redefine.
6682         (xobnewvec): New.
6683         (XOBNEWVEC): Redefine.
6684         * gdb_obstack.h (obstack_zalloc): New.
6685         (OBSTACK_ZALLOC): Redefine.
6686         (obstack_calloc): New.
6687         (OBSTACK_CALLOC): Redefine.
6688         (obstack_new): New.
6689         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6690         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6691         gdbarch.c.
6692         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6693         obstack_calloc/obstack_zalloc.
6694         (gdbarch_obstack_zalloc): Remove.
6695         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6696
6697 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6698
6699         * stack.c (backtrace_command_1): Remove useless variable int i.
6700
6701 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6702
6703         * stack.c (print_frame_info): Fix comment.
6704
6705 2018-05-18  Tom Tromey  <tom@tromey.com>
6706
6707         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6708         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6709         (~dwarf2_per_objfile): Update
6710         (dwarf2_get_dwz_file): Use new.
6711         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6712         unique_ptr.
6713
6714 2018-05-18  Tom Tromey  <tom@tromey.com>
6715
6716         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6717         unique_ptr.
6718         * dwarf2read.c (struct dwp_file): Add constructor and
6719         initializers.
6720         (open_and_init_dwp_file): Return a unique_ptr.
6721         (dwarf2_per_objfile, create_dwp_hash_table)
6722         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6723         (lookup_dwo_unit_in_dwp): Update.
6724         (open_and_init_dwp_file, get_dwp_file): Update.
6725
6726 2018-05-18  Tom Tromey  <tom@tromey.com>
6727
6728         * dwarf2read.c (dwarf2_per_objfile): Update.
6729         (struct mapped_index): Add initializers.
6730         (dwarf2_read_index): Use new.
6731         (dw2_symtab_iter_init): Update.
6732         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6733         unique_ptr.
6734
6735 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6736
6737         * dwarf2read.c (mapped_index) <total_size>: Remove.
6738
6739 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6740
6741         * unittests/format_pieces-selftests.c (test_format_specifier):
6742         Add ARI comments.
6743
6744 2018-05-18  Tom Tromey  <tom@tromey.com>
6745
6746         * c-typeprint.c (maybe_print_hole): New function.
6747         (c_print_type_struct_field_offset): Update.
6748         (c_type_print_base_struct_union): Call maybe_print_hole.
6749
6750 2018-05-17  Keith Seitz  <keiths@redhat.com>
6751
6752         * breakpoint.c (build_bpstat_chain): New function, moved from
6753         bpstat_stop_status.
6754         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6755         If no stop chain is passed, call build_bpstat_chain to build it.
6756         * breakpoint.h (build_bpstat_chain): Declare.
6757         (bpstat_stop_status): Move documentation here from breakpoint.c.
6758         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6759         build the stop chain and pass it to skip_inline_frames.
6760         Pass this stop chain to bpstat_stop_status.
6761         * inline-frame.c: Include breakpoint.h.
6762         (stopped_by_user_bp_inline_frame): New function.
6763         (skip_inline_frames): Add parameter `stop_chain'.
6764         Move documention to inline-frame.h.
6765         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6766         whether the frame should be elided.
6767         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6768         Add moved documentation and update for new parameter.
6769
6770 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6771
6772         PR cli/14975
6773         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6774         unittests/format_pieces-selftests.c.
6775         * common/format.h (format_piece) <operator==>: New.
6776         (format_pieces) <operator[]>: Remove.
6777         * common/format.c (format_pieces::format_pieces): Handle \e.
6778         * unittests/format_pieces-selftests.c: New.
6779
6780 2018-05-17  Tom Tromey  <tom@tromey.com>
6781
6782         PR symtab/23010:
6783         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6784         (dw2_instantiate_symtab): Add skip_partial parameter.
6785         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6786         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6787         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6788         (dw2_expand_symtabs_matching_one)
6789         (dw2_find_pc_sect_compunit_symtab)
6790         (dw2_debug_names_lookup_symbol)
6791         (dw2_debug_names_expand_symtabs_for_function): Update.
6792         (init_cutu_and_read_dies): Add skip_partial parameter.
6793         (process_psymtab_comp_unit, build_type_psymtabs_1)
6794         (process_skeletonless_type_unit, load_partial_comp_unit)
6795         (psymtab_to_symtab_1): Update.
6796         (load_full_comp_unit): Add skip_partial parameter.
6797         (process_imported_unit_die, dwarf2_read_addr_index)
6798         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6799         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6800         (read_signatured_type): Update.
6801
6802 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6803
6804         * value.c (release_value): Remove unused variable.
6805         (record_latest_value): Likewise.
6806         (access_value_history): Likewise.
6807         (preserve_values): Likewise.
6808
6809 2018-05-17  Tom Tromey  <tom@tromey.com>
6810
6811         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6812         Initialize.
6813
6814 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6815
6816         PR gdb/22286
6817         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6818         Also handle registers whose width is not a multiple of
6819         PTRACE_TYPE_RET.
6820         (linux_nat_trad_target::store_register): Likewise.
6821
6822 2018-05-16  Tom Tromey  <tom@tromey.com>
6823
6824         * gdbcore.h (core_bfd): Redefine.
6825         * corelow.c (core_target::close): Update.
6826         (core_target_open): Update.
6827         * progspace.h (struct program_space) <cbfd>: Now a
6828         gdb_bfd_ref_ptr.
6829
6830 2018-05-16  Tom Tromey  <tom@tromey.com>
6831
6832         PR cli/19551:
6833         * symfile-add-flags.h (enum symfile_add_flags)
6834         <SYMFILE_NOT_FILENAME>: New constant.
6835         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6836         objfile name from BFD.
6837         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6838         * minidebug.c (find_separate_debug_file_in_section): Put
6839         ".gnu_debugdata" into BFD's file name.
6840
6841 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6842
6843         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6844         Remove.
6845
6846 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6847
6848         PR binutils/21446
6849         * aarch64-tdep.c (aarch64_analyze_prologue,
6850         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6851         Indicate not interested in errors.
6852
6853 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6854
6855         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6856         Supply the MIPS_ZERO_REGNUM register.
6857
6858 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6859
6860         * mips-tdep.c (mask_address_var): Make variable static.
6861
6862 2018-05-14  Tom Tromey  <tom@tromey.com>
6863
6864         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6865
6866 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6867
6868         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6869         FXSAVE_ADDR for the mxcsr register.
6870
6871 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6872
6873         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6874
6875 2018-05-11  Pedro Alves  <palves@redhat.com>
6876
6877         * corelow.c (core_target) <core_target>: No longer inline.
6878         Initialize m_core_gdbarch, m_core_vec and build the section table
6879         here.
6880         <~core_target>: New.
6881         <core_gdbarch, get_core_register_section>: New methods.
6882         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6883         factored out from ...
6884         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6885         (core_ops): Delete.
6886         (sniff_core_bfd): Add gdbarch parameter.
6887         (core_close): Delete, merged into ...
6888         (core_target::close): ... here.  Delete self.
6889         (core_close_cleanup): Delete.
6890         (core_target_open): Allocate a core_target on the heap.  Use a
6891         unique_ptr instead of a cleanup.  Bits moved into the core_target
6892         ctor.  Adjust to use core_target methods instead of globals.
6893         (get_core_register_section): Rename to ...
6894         (core_target::get_core_register_section): ... this and adjust.
6895         (struct get_core_registers_cb_data): New.
6896         (get_core_registers_cb): Use it.  Use bool.
6897         (core_target::fetch_registers, core_target::files_info)
6898         (core_target::xfer_partial, core_target::read_description)
6899         (core_target::pid_to, core_target::thread_name): Adjust to
6900         reference class fields instead of globals.
6901         * target.h (struct target_ops_deleter, target_ops_up): New.
6902
6903 2018-05-11  Pedro Alves  <palves@redhat.com>
6904
6905         * corefile.c (core_file_command): Move to corelow.c.
6906         * corelow.c (the_core_target): Delete.
6907         (core_file_command): Moved from corefile.c.  Check exec_bfd
6908         instead of the_core_target.  Use target_detach instead of calling
6909         into the_core_target directly.
6910         (maybe_say_no_core_file_now): New.
6911         (core_target::detach): Use it.
6912         (_initialize_corelow): Remove references to the_core_target.
6913         * gdbcore.h (the_core_target): Delete.
6914
6915 2018-05-11  Tom Tromey  <tromey@redhat.com>
6916             Pedro Alves  <palves@redhat.com>
6917
6918         * corefile.c (core_bfd): Remove.
6919         * gdbcore.h (core_bfd): Now a macro.
6920         * progspace.h (struct program_space) <cbfd>: New field.
6921
6922 2018-05-11  Tom Tromey  <tom@tromey.com>
6923
6924         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6925         gdb::def_vector.
6926
6927 2018-05-10  Tom Tromey  <tom@tromey.com>
6928
6929         * configure: Rebuild.
6930         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6931
6932 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6933
6934         PR server/23158:
6935         * regformats/regdat.sh: Adjust script, following the addition
6936         of the new expedite_regs parameter to init_target_desc.
6937
6938 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6939     
6940         PR gdb/23127
6941         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6942         set_gdbarch_significant_addr_bit.
6943         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6944         set_gdbarch_significant_addr_bit.
6945         * utils.c (address_significant): Update to sign extend addr.
6946
6947 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6948
6949         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6950         (xtensa_linux_init_abi): Limit tdep->num_regs by
6951         tdep->num_nopriv_regs.
6952         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6953         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6954         not initialized.
6955
6956 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6957
6958         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6959
6960 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6961
6962         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6963         (I387_MXCSR_INIT_VAL): New constant.
6964         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6965         buffer if it was supplied by the inferior.
6966         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6967         (i387_xsave_get_clear_bv): New function.
6968         (i387_supply_xsave): Only read x87 control registers from the
6969         xsave buffer if the feature is enabled, and the state will have
6970         been written, otherwise, provide a suitable default.
6971         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6972         including x87 control registers.  Update control registers if they
6973         have changed from the default value, and mark features as enabled
6974         as required.
6975         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6976
6977 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6978
6979         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6980
6981 2018-05-07  Tom Tromey  <tom@tromey.com>
6982
6983         * configure: Rebuild.
6984         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6985
6986 2018-05-07  Tom Tromey  <tom@tromey.com>
6987
6988         PR tdep/20362:
6989         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6990         bit.  Use correct value for VDIV.
6991
6992 2018-05-04  Tom Tromey  <tom@tromey.com>
6993
6994         * configure: Rebuild.
6995         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6996
6997 2018-05-04  Tom Tromey  <tom@tromey.com>
6998
6999         * linux-record.c (record_linux_system_call) <case
7000         RECORD_SYS_RECVFROM>: Add "break".
7001
7002 2018-05-04  Tom Tromey  <tom@tromey.com>
7003
7004         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7005         Add missing "break".
7006         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7007         Add missing "break".
7008
7009 2018-05-04  Tom Tromey  <tom@tromey.com>
7010
7011         * rs6000-tdep.c (ppc_process_record_op4)
7012         (ppc_process_record_op63): Add fall-through comment.
7013
7014 2018-05-04  Tom Tromey  <tom@tromey.com>
7015
7016         * i386-tdep.c (i386_process_record): Add fall-through comment.
7017
7018 2018-05-04  Tom Tromey  <tom@tromey.com>
7019
7020         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7021         comment.
7022
7023 2018-05-04  Tom Tromey  <tom@tromey.com>
7024
7025         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7026         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7027         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7028         comment.
7029         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7030         comment.
7031         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7032         comment.
7033
7034 2018-05-04  Tom Tromey  <tom@tromey.com>
7035
7036         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7037
7038 2018-05-04  Tom Tromey  <tom@tromey.com>
7039
7040         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7041         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7042         * symfile.c (section_is_mapped): Fix fall-through comment.
7043         * stabsread.c (define_symbol, read_member_functions): Fix
7044         fall-through comment.
7045         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7046         comment.
7047         * remote.c (remote_wait_as): Fix fall-through comment.
7048         * p-exp.y (yylex): Fix fall-through comment.
7049         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7050         comment.
7051         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7052         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7053         * jv-exp.y (yylex): Fix fall-through comment.
7054         * go-exp.y (lex_one_token): Fix fall-through comment.
7055         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7056         fall-through comment.
7057         * f-exp.y (yylex): Fix fall-through comment.
7058         * dwarf2read.c (process_die): Fix fall-through comments.
7059         * dbxread.c (process_one_symbol): Fix fall-through comment.
7060         * d-exp.y (lex_one_token): Fix fall-through comment.
7061         * cp-name-parser.y (yylex): Fix fall-through comment.
7062         * coffread.c (coff_symtab_read): Fix fall-through comment.
7063         * c-exp.y (lex_one_token): Fix fall-through comment.
7064         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7065         comment.
7066         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7067         comment.
7068
7069 2018-05-04  Tom Tromey  <tom@tromey.com>
7070
7071         PR python/22730:
7072         * NEWS: Mention gdb.execute change.
7073         * gdbcmd.h (execute_control_command): Don't declare.
7074         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7075         execute_control_commands, execute_control_commands_to_string.
7076         * cli/cli-script.h (execute_control_commands)
7077         (execute_control_commands_to_string): Declare.
7078         (execute_control_command): Add from_tty parameter.
7079         * cli/cli-script.c (execute_control_commands)
7080         (execute_control_commands_to_string): New functions.
7081         (execute_user_command): Use execute_control_commands.
7082         (execute_control_command_1): Add "from_tty" parameter.  Update.
7083         (execute_control_command): Likewise.
7084
7085 2018-05-04  Tom Tromey  <tom@tromey.com>
7086
7087         PR python/22731:
7088         * NEWS: Mention that breakpoint commands are writable.
7089         * python/py-breakpoint.c (bppy_set_commands): New function.
7090         (breakpoint_object_getset) <"commands">: Use it.
7091
7092 2018-05-04  Tom Tromey  <tom@tromey.com>
7093
7094         * tracepoint.c (actions_command): Update.
7095         * mi/mi-cmd-break.c (mi_command_line_array)
7096         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7097         (mi_read_next_line): Remove.
7098         (mi_cmd_break_commands): Update.
7099         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7100         function_view.
7101         * cli/cli-script.c (get_command_line): Update.
7102         (process_next_line): Use function_view.  Constify.
7103         (recurse_read_control_structure, read_command_lines)
7104         (read_command_lines_1): Change argument types to function_view.
7105         (do_define_command, document_command): Update.
7106         * breakpoint.h (check_tracepoint_command): Don't declare.
7107         * breakpoint.c (check_tracepoint_command): Remove.
7108         (commands_command_1, create_tracepoint_from_upload): Update.
7109
7110 2018-05-04  Tom Tromey  <tom@tromey.com>
7111
7112         PR gdb/11750:
7113         * cli/cli-script.h (enum command_control_type) <define_control>:
7114         New constant.
7115         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7116         (build_command_line, execute_control_command_1)
7117         (process_next_line): Likewise.
7118         (do_define_command): New function, extracted from define_command.
7119         (define_command): Use it.
7120
7121 2018-05-04  Tom Tromey  <tom@tromey.com>
7122
7123         * tracepoint.c (actions_command): Update.
7124         * cli/cli-script.h (read_command_lines): Update.
7125         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7126         (MAX_TMPBUF): Remove define.
7127         (define_command): Use string_printf.
7128         (document_command): Likewise.
7129         * breakpoint.c (commands_command_1): Update.
7130
7131 2018-05-04  Tom Tromey  <tom@tromey.com>
7132
7133         * top.c (execute_command): Update.
7134         * cli/cli-script.h (print_command_lines): Now varargs.
7135         * cli/cli-script.c (print_command_lines): Now varargs.
7136         (execute_control_command_1) <case while_control, case if_control>:
7137         Update.
7138
7139 2018-05-04  Tom Tromey  <tom@tromey.com>
7140
7141         * tracepoint.c (all_tracepoint_actions): Rename from
7142         all_tracepoint_actions_and_cleanup.  Change return type.
7143         (actions_command, encode_actions_1, encode_actions)
7144         (trace_dump_actions, tdump_command): Update.
7145         * remote.c (remote_download_command_source): Update.
7146         * python/python.c (gdbpy_eval_from_control_command)
7147         (python_command, python_interactive_command): Update.
7148         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7149         * guile/guile.c (guile_command)
7150         (gdbscm_eval_from_control_command, guile_command): Update.
7151         * compile/compile.c (compile_code_command)
7152         (compile_print_command, compile_to_object): Update.
7153         * cli/cli-script.h (struct command_lines_deleter): New.
7154         (counted_command_line): New typedef.
7155         (struct command_line): Add constructor, destructor.
7156         <body_list>: Remove.
7157         <body_list_0, body_list_1>: New members.
7158         (command_line_up): Remove typedef.
7159         (read_command_lines, read_command_lines_1, get_command_line):
7160         Update.
7161         (copy_command_lines): Don't declare.
7162         * cli/cli-script.c (build_command_line): Use "new".
7163         (get_command_line): Return counted_command_line.
7164         (print_command_lines, execute_user_command)
7165         (execute_control_command_1, while_command, if_command): Update.
7166         (realloc_body_list): Remove.
7167         (process_next_line, recurse_read_control_structure): Update.
7168         (read_command_lines, read_command_lines_1): Return counted_command_line.
7169         (free_command_lines): Use "delete".
7170         (copy_command_lines): Remove.
7171         (define_command, document_command, show_user_1): Update.
7172         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7173         a counted_command_line.
7174         * breakpoint.h (counted_command_line): Remove typedef.
7175         (breakpoint_set_commands): Update.
7176         * breakpoint.c (check_no_tracepoint_commands)
7177         (validate_commands_for_breakpoint): Update.
7178         (breakpoint_set_commands): Change commands to be a
7179         counted_command_line.
7180         (commands_command_1, update_dprintf_command_list)
7181         (create_tracepoint_from_upload): Update.
7182
7183 2018-05-04  Tom Tromey  <tom@tromey.com>
7184
7185         * cli/cli-decode.h (cmd_list_element): New constructor.
7186         (~cmd_list_element): New destructor.
7187         (struct cmd_list_element): Add initializers.
7188         * cli/cli-decode.c (do_add_cmd): Use "new".
7189         (delete_cmd): Use "delete".
7190
7191 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7192             Pedro Alves <palves@redhat.com>
7193
7194         PR breakpoints/19806 and support for PR external/20207.
7195         * NEWS: Mention Aarch64 watchpoint improvements.
7196         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7197         watchpoints and PR external/20207 watchpoints.
7198         * nat/aarch64-linux-hw-point.c
7199         (kernel_supports_any_contiguous_range): New.
7200         (aarch64_watchpoint_offset): New.
7201         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7202         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7203         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7204         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7205         next_addr_orig_p.  Support PR external/20207 watchpoints.
7206         (aarch64_downgrade_regs): New.
7207         (aarch64_dr_state_insert_one_point): New parameters offset and
7208         addr_orig.
7209         (aarch64_dr_state_remove_one_point): Likewise.
7210         (aarch64_handle_breakpoint): Update caller.
7211         (aarch64_handle_aligned_watchpoint): Likewise.
7212         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7213         aligned_offset.
7214         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7215         aarch64_downgrade_regs.
7216         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7217         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7218         (DR_CONTROL_MASK): ... this.
7219         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7220         (unsigned int aarch64_watchpoint_offset): New prototype.
7221         (aarch64_linux_set_debug_regs): Remove const from state.
7222         * utils.c (align_up, align_down): Move to ...
7223         * common/common-utils.c (align_up, align_down): ... here.
7224         * utils.h (align_up, align_down): Move to ...
7225         * common/common-utils.h (align_up, align_down): ... here.
7226
7227 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7228
7229         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7230         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7231         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7232         Re-implement to match the ABI as summarized in GCC's
7233         gcc/config/sparc/sparc.c.  All callers updated.
7234         (sparc32_store_arguments): Remove assertion.
7235
7236 2018-05-04  Tom Tromey  <tom@tromey.com>
7237
7238         * printcmd.c: Don't include tui.h.
7239         (decode_format): Use skip_spaces.
7240
7241 2018-05-04  Tom Tromey  <tom@tromey.com>
7242
7243         PR gdb/22619:
7244         * printcmd.c (last_count): New global.
7245         (x_command): Use saved count when repeating.
7246
7247 2018-05-04  Tom Tromey  <tom@tromey.com>
7248
7249         * nto-procfs.c (do_closedir_cleanup): Remove.
7250         (procfs_pidlist): Use gdb_dir_up.
7251         * procfs.c (do_closedir_cleanup): Remove.
7252         (proc_update_threads): Use gdb_dir_up.
7253         * common/filestuff.h (struct gdb_dir_deleter): New.
7254         (gdb_dir_up): New typedef.
7255
7256 2018-05-04  Tom Tromey  <tom@tromey.com>
7257
7258         * ada-lang.c (print_mention_exception): Use std::string.
7259
7260 2018-05-04  Tom Tromey  <tom@tromey.com>
7261
7262         * ada-lang.c (create_excep_cond_exprs): Update.
7263         (ada_exception_catchpoint_cond_string): Use std::string.
7264
7265 2018-05-04  Tom Tromey  <tom@tromey.com>
7266
7267         * ada-lang.c (xget_renaming_scope): Return std::string.
7268         (old_renaming_is_invisible): Update.
7269
7270 2018-05-04  Tom Tromey  <tom@tromey.com>
7271
7272         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7273         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7274
7275 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7276
7277         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7278
7279 2018-05-04  Tom Tromey  <tom@tromey.com>
7280
7281         * remote.c (remote_query_supported_append): Change type.
7282         (remote_check_symbols): Update.
7283
7284 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7285
7286         PR gdb/11420
7287         * configure.ac: Prepend libpython.
7288         * python/python-config.py: Likewise.
7289         * configure: Regenerate.
7290
7291 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7292
7293         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7294
7295 2018-05-03  Pedro Alves  <palves@redhat.com>
7296
7297         * s390-linux-nat.c
7298         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7299         override.  Write 'true' instead of '1'.
7300         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7301         declaration.
7302
7303 2018-05-02  Pedro Alves  <palves@redhat.com>
7304
7305         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7306         add_inf_child_target.
7307         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7308         add_inf_child_target.
7309         * aix-thread.c (aix_thread_target_info): New.
7310         (aix_thread_target) <shortname, longname, doc>: Delete.
7311         <info>: New.
7312         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7313         add_inf_child_target.
7314         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7315         add_inf_child_target.
7316         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7317         add_inf_child_target.
7318         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7319         add_inf_child_target.
7320         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7321         add_inf_child_target.
7322         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7323         add_inf_child_target.
7324         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7325         add_inf_child_target.
7326         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7327         add_inf_child_target.
7328         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7329         add_inf_child_target.
7330         * bfd-target.c (target_bfd_target_info): New.
7331         (target_bfd) <shortname, longname, doc>: Delete.
7332         <info>: New.
7333         * bsd-kvm.c (bsd_kvm_target_info): New.
7334         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7335         <info>: New.
7336         (bsd_kvm_target::open): Rename to ...
7337         (bsd_kvm_target_open): ... this.  Adjust.
7338         * bsd-uthread.c (bsd_uthread_target_info): New.
7339         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7340         <info>: New.
7341         * corefile.c (core_file_command): Adjust.
7342         * corelow.c (core_target_info): New.
7343         (core_target) <shortname, longname, doc>: Delete.
7344         <info>: New.
7345         (core_target::open): Rename to ...
7346         (core_target_open): ... this.  Adjust.
7347         * ctf.c (ctf_target_info): New.
7348         (ctf_target) <shortname, longname, doc>: Delete.
7349         <info>: New.
7350         (ctf_target::open): Rename to ...
7351         (ctf_target_open): ... this.
7352         (_initialize_ctf): Adjust.
7353         * exec.c (exec_target_info): New.
7354         (exec_target) <shortname, longname, doc>: Delete.
7355         <info>: New.
7356         (exec_target::open): Rename to ...
7357         (exec_target_open): ... this.
7358         * gdbcore.h (core_target_open): Declare.
7359         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7360         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7361         add_inf_child_target.
7362         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7363         add_inf_child_target.
7364         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7365         add_inf_child_target.
7366         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7367         add_inf_child_target.
7368         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7369         add_inf_child_target.
7370         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7371         add_inf_child_target.
7372         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7373         add_inf_child_target.
7374         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7375         add_inf_child_target.
7376         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7377         add_inf_child_target.
7378         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7379         add_inf_child_target.
7380         * inf-child.c (inf_child_target_info): New.
7381         (inf_child_target::info): New.
7382         (inf_child_open_target): Remove 'target' parameter.  Use
7383         get_native_target instead.
7384         (inf_child_target::open): Delete.
7385         (add_inf_child_target): New.
7386         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7387         Delete.
7388         <info>: New.
7389         (add_inf_child_target): Declare.
7390         (inf_child_open_target): Declare.
7391         * linux-thread-db.c (thread_db_target_info): New.
7392         (thread_db_target) <shortname, longname, doc>: Delete.
7393         <info>: New.
7394         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7395         add_inf_child_target.
7396         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7397         add_inf_child_target.
7398         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7399         add_inf_child_target.
7400         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7401         add_inf_child_target.
7402         * make-target-delegates (print_class): Adjust.
7403         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7404         add_inf_child_target.
7405         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7406         add_inf_child_target.
7407         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7408         add_inf_child_target.
7409         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7410         add_inf_child_target.
7411         * nto-procfs.c (nto_native_target_info): New.
7412         (nto_procfs_target_native) <shortname, longname, doc>:
7413         Delete.
7414         <info>: New.
7415         (nto_procfs_target_info): New.
7416         (nto_procfs_target_procfs) <shortname, longname, doc>:
7417         Delete.
7418         <info>: New.
7419         (init_procfs_targets): Adjust.
7420         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7421         add_inf_child_target.
7422         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7423         add_inf_child_target.
7424         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7425         add_inf_child_target.
7426         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7427         add_inf_child_target.
7428         * ravenscar-thread.c (ravenscar_target_info): New.
7429         (ravenscar_thread_target) <shortname, longname, doc>:
7430         Delete.
7431         <info>: New.
7432         * record-btrace.c (record_btrace_target_info):
7433         (record_btrace_target) <shortname, longname, doc>: Delete.
7434         <info>: New.
7435         (record_btrace_target::open): Rename to ...
7436         (record_btrace_target_open): ... this.  Adjust.
7437         * record-full.c (record_longname, record_doc): New.
7438         (record_full_base_target) <shortname, longname, doc>: Delete.
7439         <info>: New.
7440         (record_full_target_info): New.
7441         (record_full_target): <shortname>: Delete.
7442         <info>: New.
7443         (record_full_core_open_1, record_full_open_1): Update comments.
7444         (record_full_base_target::open): Rename to ...
7445         (record_full_open): ... this.
7446         (cmd_record_full_restore): Update.
7447         (_initialize_record_full): Update.
7448         * remote-sim.c (remote_sim_target_info): New.
7449         (gdbsim_target) <shortname, longname, doc>: Delete.
7450         <info>: New.
7451         (gdbsim_target::open): Rename to ...
7452         (gdbsim_target_open): ... this.
7453         (_initialize_remote_sim): Adjust.
7454         * remote.c (remote_doc): New.
7455         (remote_target_info): New.
7456         (remote_target) <shortname, longname, doc>: Delete.
7457         <info>: New.
7458         (extended_remote_target_info): New.
7459         (extended_remote_target) <shortname, longname, doc>: Delete.
7460         <info>: New.
7461         (remote_target::open_1): Make static.  Adjust.
7462         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7463         * s390-linux-nat.c (_initialize_s390_nat): Use
7464         add_inf_child_target.
7465         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7466         add_inf_child_target.
7467         * sol-thread.c (thread_db_target_info): New.
7468         (sol_thread_target) <shortname, longname, doc>: Delete.
7469         <info>: New.
7470         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7471         add_inf_child_target.
7472         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7473         add_inf_child_target.
7474         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7475         add_inf_child_target.
7476         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7477         add_inf_child_target.
7478         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7479         add_inf_child_target.
7480         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7481         add_inf_child_target.
7482         * spu-linux-nat.c (_initialize_spu_nat): Use
7483         add_inf_child_target.
7484         * spu-multiarch.c (spu_multiarch_target_info): New.
7485         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7486         <info>: New.
7487         * target-delegates.c: Regenerate.
7488         * target.c: Include <unordered_map>.
7489         (target_ops_p): Delete.
7490         (DEF_VEC_P(target_ops_p)): Delete.
7491         (target_factories): New.
7492         (test_target_info): New.
7493         (test_target_ops::info): New.
7494         (open_target): Adjust to use target_factories.
7495         (add_target_with_completer): Rename to ...
7496         (add_target): ... this.  Change prototype.  Register target_info
7497         and open callback in target_factories.  Register target_info in
7498         command context instead of target_ops.
7499         (add_target): Delete old implementation.
7500         (add_deprecated_target_alias): Change prototype.  Adjust.
7501         (the_native_target): New.
7502         (set_native_target, get_native_target): New.
7503         (find_default_run_target): Use the_native_target.
7504         (find_attach_target, find_run_target): Simplify.
7505         (target_ops::open): Delete.
7506         (dummy_target_info): New.
7507         (dummy_target::shortname, dummy_target::longname)
7508         (dummy_target::doc): Delete.
7509         (dummy_target::info): New.
7510         (debug_target::shortname, debug_target::longname)
7511         (debug_target::doc): Delete.
7512         (debug_target::info): New.
7513         * target.h (struct target_info): New.
7514         (target_ops::~target_ops): Add comment.
7515         (target_ops::info): New.
7516         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7517         longer virtual.  Implement in terms of target_info.
7518         (set_native_target, get_native_target): Declare.
7519         (target_open_ftype): New.
7520         (add_target, add_target_with_completer)
7521         (add_deprecated_target_alias): Change prototype.
7522         (test_target) <shortname, longname, doc>: Delete.
7523         <info>: New.
7524         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7525         add_inf_child_target.
7526         * tracefile-tfile.c (tfile_target_info): New.
7527         (tfile_target) <shortname, longname, doc>: Delete.
7528         <info>: New.
7529         (tfile_target::open): Rename to ...
7530         (tfile_target_open): ... this.
7531         (_initialize_tracefile_tfile): Adjust.
7532         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7533         add_inf_child_target.
7534         * windows-nat.c (_initialize_windows_nat): Use
7535         add_inf_child_target.
7536         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7537         add_inf_child_target.
7538
7539 2018-05-02  Pedro Alves  <palves@redhat.com>
7540
7541         * linux-nat.h (linux_nat_target) <low_new_thread,
7542         low_delete_thread, low_new_fork, low_forget_process,
7543         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7544         New virtual methods.
7545         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7546         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7547         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7548         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7549         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7550         Delete.
7551         * linux-fork.c (delete_fork): Adjust to call low method.
7552         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7553         (linux_nat_new_fork, linux_nat_forget_process_hook)
7554         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7555         (linux_nat_status_is_event):
7556         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7557         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7558         to call low method.
7559         (sigtrap_is_event): Rename to ...
7560         (linux_nat_target::low_status_is_event): ... this.
7561         (linux_nat_set_status_is_event): Delete.
7562         (save_stop_reason, linux_nat_wait_1)
7563         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7564         low methods.
7565         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7566         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7567         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7568         (linux_nat_set_prepare_to_resume): Delete.
7569         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7570         low virtual methods.
7571         * amd64-linux-nat.c: Likewise.
7572         * arm-linux-nat.c: Likewise.
7573         * i386-linux-nat.c: Likewise.
7574         * ia64-linux-nat.c: Likewise.
7575         * mips-linux-nat.c: Likewise.
7576         * ppc-linux-nat.c: Likewise.
7577         * s390-linux-nat.c: Likewise.
7578         * sparc64-linux-nat.c: Likewise.
7579         * x86-linux-nat.c: Likewise.
7580         * x86-linux-nat.h: Include "nat/x86-linux.h".
7581         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7582         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7583         Override methods.
7584
7585 2018-05-02  Pedro Alves  <palves@redhat.com>
7586
7587         * target.h (target_ops)
7588         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7589         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7590         stopped_by_watchpoint, have_continuable_watchpoint,
7591         stopped_data_address, watchpoint_addr_within_range,
7592         can_accel_watchpoint_condition, can_run, thread_alive,
7593         has_all_memory, has_memory, has_stack, has_registers,
7594         has_execution, can_async_p, is_async_p, supports_non_stop,
7595         always_non_stop_p, can_execute_reverse, supports_multi_process,
7596         supports_enable_disable_tracepoint,
7597         supports_disable_randomization, supports_string_tracing,
7598         supports_evaluation_of_breakpoint_conditions,
7599         can_run_breakpoint_commands, filesystem_is_local,
7600         can_download_tracepoint, get_trace_state_variable_value,
7601         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7602         record_is_replaying, record_will_replay,
7603         augmented_libraries_svr4_read>: Adjust to return bool.
7604         * aarch64-linux-nat.c: All implementations adjusted.
7605         * aix-thread.c: All implementations adjusted.
7606         * arm-linux-nat.c: All implementations adjusted.
7607         * breakpoint.c: All implementations adjusted.
7608         * bsd-kvm.c: All implementations adjusted.
7609         * bsd-uthread.c: All implementations adjusted.
7610         * corelow.c: All implementations adjusted.
7611         * ctf.c: All implementations adjusted.
7612         * darwin-nat.c: All implementations adjusted.
7613         * darwin-nat.h: All implementations adjusted.
7614         * exec.c: All implementations adjusted.
7615         * fbsd-nat.c: All implementations adjusted.
7616         * fbsd-nat.h: All implementations adjusted.
7617         * gnu-nat.c: All implementations adjusted.
7618         * gnu-nat.h: All implementations adjusted.
7619         * go32-nat.c: All implementations adjusted.
7620         * ia64-linux-nat.c: All implementations adjusted.
7621         * inf-child.c: All implementations adjusted.
7622         * inf-child.h: All implementations adjusted.
7623         * inf-ptrace.c: All implementations adjusted.
7624         * inf-ptrace.h: All implementations adjusted.
7625         * linux-nat.c: All implementations adjusted.
7626         * linux-nat.h: All implementations adjusted.
7627         * mips-linux-nat.c: All implementations adjusted.
7628         * nto-procfs.c: All implementations adjusted.
7629         * ppc-linux-nat.c: All implementations adjusted.
7630         * procfs.c: All implementations adjusted.
7631         * ravenscar-thread.c: All implementations adjusted.
7632         * record-btrace.c: All implementations adjusted.
7633         * record-full.c: All implementations adjusted.
7634         * remote-sim.c: All implementations adjusted.
7635         * remote.c: All implementations adjusted.
7636         * s390-linux-nat.c: All implementations adjusted.
7637         * sol-thread.c: All implementations adjusted.
7638         * spu-multiarch.c: All implementations adjusted.
7639         * target-delegates.c: All implementations adjusted.
7640         * target.c: All implementations adjusted.
7641         * target.h: All implementations adjusted.
7642         * tracefile-tfile.c: All implementations adjusted.
7643         * tracefile.c: All implementations adjusted.
7644         * tracefile.h: All implementations adjusted.
7645         * windows-nat.c: All implementations adjusted.
7646         * x86-linux-nat.h: All implementations adjusted.
7647         * x86-nat.h: All implementations adjusted.
7648
7649 2018-05-02  Pedro Alves  <palves@redhat.com>
7650
7651         * make-target-delegates (scan_target_h): Don't trim lines here.
7652         Replace sequences of tabs and/or whitespace with a single
7653         whitespace.
7654         (top level, parsing methods): Trim each line before processing it
7655         here.
7656
7657 2018-05-02  Pedro Alves  <palves@redhat.com>
7658             John Baldwin  <jhb@freebsd.org>
7659
7660         * target.h (enum strata) <debug_stratum>: New.
7661         (struct target_ops) <all delegation methods>: Replace by C++
7662         virtual methods, and drop "to_" prefix.  All references updated
7663         throughout.
7664         <to_shortname, to_longname, to_doc, to_data,
7665         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7666         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7667         virtual methods.  All references updated throughout.
7668         <can_attach, supports_terminal_ours, can_create_inferior,
7669         get_thread_control_capabilities, attach_no_wait>: New
7670         virtual methods.
7671         <insert_breakpoint, remove_breakpoint>: Now
7672         TARGET_DEFAULT_NORETURN methods.
7673         <info_proc>: Now returns bool.
7674         <to_magic>: Delete.
7675         (OPS_MAGIC): Delete.
7676         (current_target): Delete.  All references replaced by references
7677         to ...
7678         (target_stack): ... this.  New.
7679         (target_shortname, target_longname): Adjust.
7680         (target_can_run): Now a function declaration.
7681         (default_child_has_all_memory, default_child_has_memory)
7682         (default_child_has_stack, default_child_has_registers)
7683         (default_child_has_execution): Remove target_ops parameter.
7684         (complete_target_initialization): Delete.
7685         (memory_breakpoint_target): New template class.
7686         (test_target_ops): Refactor as a C++ class with virtual methods.
7687         * make-target-delegates (NAME_PART): Tighten.
7688         (POINTER_PART, CP_SYMBOL): New.
7689         (SIMPLE_RETURN_PART): Reimplement.
7690         (VEC_RETURN_PART): Expect less.
7691         (RETURN_PART, VIRTUAL_PART): New.
7692         (METHOD): Adjust to C++ virtual methods.
7693         (scan_target_h): Remove reference to C99.
7694         (dname): Output "target_ops::" prefix.
7695         (write_function_header): Adjust to output a C++ class method.
7696         (write_declaration): New.
7697         (write_delegator): Adjust to output a C++ class method.
7698         (tdname): Output "dummy_target::" prefix.
7699         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7700         method.
7701         (tdefault_names, debug_names): Delete.
7702         (return_types, tdefaults, styles, argtypes_array): New.
7703         (top level): All methods are delegators.
7704         (print_class): New.
7705         (top level): Print dummy_target and debug_target classes.
7706         * target-delegates.c: Regenerate.
7707         * target-debug.h (target_debug_print_enum_info_proc_what)
7708         (target_debug_print_thread_control_capabilities)
7709         (target_debug_print_thread_info_p): New.
7710         * target.c (dummy_target): Delete.
7711         (the_dummy_target, the_debug_target): New.
7712         (target_stack): Now extern.
7713         (set_targetdebug): Push/unpush debug target.
7714         (default_child_has_all_memory, default_child_has_memory)
7715         (default_child_has_stack, default_child_has_registers)
7716         (default_child_has_execution): Remove target_ops parameter.
7717         (complete_target_initialization): Delete.
7718         (add_target_with_completer): No longer call
7719         complete_target_initialization.
7720         (target_supports_terminal_ours): Use regular delegation.
7721         (update_current_target): Delete.
7722         (push_target): No longer check magic number.  Don't call
7723         update_current_target.
7724         (unpush_target): Don't call update_current_target.
7725         (target_is_pushed): No longer check magic number.
7726         (target_require_runnable): Skip for all stratums over
7727         process_stratum.
7728         (target_ops::info_proc): New.
7729         (target_info_proc): Use find_target_at and
7730         find_default_run_target.
7731         (target_supports_disable_randomization): Use regular delegation.
7732         (target_get_osdata): Use find_target_at.
7733         (target_ops::open, target_ops::close, target_ops::can_attach)
7734         (target_ops::attach, target_ops::can_create_inferior)
7735         (target_ops::create_inferior, target_ops::can_run)
7736         (target_can_run): New.
7737         (default_fileio_target): Use regular delegation.
7738         (target_ops::fileio_open, target_ops::fileio_pwrite)
7739         (target_ops::fileio_pread, target_ops::fileio_fstat)
7740         (target_ops::fileio_close, target_ops::fileio_unlink)
7741         (target_ops::fileio_readlink): New.
7742         (target_fileio_open_1, target_fileio_unlink)
7743         (target_fileio_readlink): Always call the target method.  Handle
7744         FILEIO_ENOSYS.
7745         (return_zero, return_zero_has_execution): Delete.
7746         (init_dummy_target): Delete.
7747         (dummy_target::dummy_target, dummy_target::shortname)
7748         (dummy_target::longname, dummy_target::doc)
7749         (debug_target::debug_target, debug_target::shortname)
7750         (debug_target::longname, debug_target::doc): New.
7751         (target_supports_delete_record): Use regular delegation.
7752         (setup_target_debug): Delete.
7753         (maintenance_print_target_stack): Skip debug_stratum.
7754         (initialize_targets): Instantiate the_dummy_target and
7755         the_debug_target.
7756         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7757         use target_stack.
7758         (target_auxv_search, fprint_target_auxv): Adjust.
7759         (info_auxv_command): Adjust to use target_stack.
7760         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7761         * exceptions.c (print_flush): Handle a NULL target_stack.
7762         * regcache.c (target_ops_no_register): Refactor as class with
7763         virtual methods.
7764
7765         * exec.c (exec_target): New class.
7766         (exec_ops): Now an exec_target.
7767         (exec_open, exec_close_1, exec_get_section_table)
7768         (exec_xfer_partial, exec_files_info, exec_has_memory)
7769         (exec_make_note_section): Refactor as exec_target methods.
7770         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7771         Delete.
7772         (exec_target::find_memory_regions): New.
7773         (_initialize_exec): Don't call init_exec_ops.
7774         * gdbcore.h (exec_file_clear): Delete.
7775
7776         * corefile.c (core_target): Delete.
7777         (core_file_command): Adjust.
7778         * corelow.c (core_target): New class.
7779         (the_core_target): New.
7780         (core_close): Remove target_ops parameter.
7781         (core_close_cleanup): Adjust.
7782         (core_target::close): New.
7783         (core_open, core_detach, get_core_registers, core_files_info)
7784         (core_xfer_partial, core_thread_alive, core_read_description)
7785         (core_pid_to_str, core_thread_name, core_has_memory)
7786         (core_has_stack, core_has_registers, core_info_proc): Rework as
7787         core_target methods.
7788         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7789         (_initialize_corelow): Initialize the_core_target.
7790         * gdbcore.h (core_target): Delete.
7791         (the_core_target): New.
7792
7793         * ctf.c: (ctf_target): New class.
7794         (ctf_ops): Now a ctf_target.
7795         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7796         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7797         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7798         methods.
7799         (init_ctf_ops): Delete.
7800         (_initialize_ctf): Don't call it.
7801         * tracefile-tfile.c (tfile_target): New class.
7802         (tfile_ops): Now a tfile_target.
7803         (tfile_open, tfile_close, tfile_files_info)
7804         (tfile_get_tracepoint_status, tfile_trace_find)
7805         (tfile_fetch_registers, tfile_xfer_partial)
7806         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7807         Refactor as tfile_target methods.
7808         (tfile_xfer_partial_features): Remove target_ops parameter.
7809         (init_tfile_ops): Delete.
7810         (_initialize_tracefile_tfile): Don't call it.
7811         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7812         (tracefile_has_stack, tracefile_has_registers)
7813         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7814         tracefile_target methods.
7815         (init_tracefile_ops): Delete.
7816         (tracefile_target::tracefile_target): New.
7817         * tracefile.h: Include "target.h".
7818         (tracefile_target): New class.
7819         (init_tracefile_ops): Delete.
7820
7821         * spu-multiarch.c (spu_multiarch_target): New class.
7822         (spu_ops): Now a spu_multiarch_target.
7823         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7824         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7825         (spu_search_memory, spu_mourn_inferior): Refactor as
7826         spu_multiarch_target methods.
7827         (init_spu_ops): Delete.
7828         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7829         complete_target_initialization.
7830
7831         * ravenscar-thread.c (ravenscar_thread_target): New class.
7832         (ravenscar_ops): Now a ravenscar_thread_target.
7833         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7834         (ravenscar_thread_alive, ravenscar_pid_to_str)
7835         (ravenscar_fetch_registers, ravenscar_store_registers)
7836         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7837         (ravenscar_stopped_by_hw_breakpoint)
7838         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7839         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7840         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7841         methods.
7842         (init_ravenscar_thread_ops): Delete.
7843         (_initialize_ravenscar): Remove references to
7844         init_ravenscar_thread_ops and complete_target_initialization.
7845
7846         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7847         (bsd_uthread_target): New class.
7848         (bsd_uthread_ops): Now a bsd_uthread_target.
7849         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7850         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7851         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7852         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7853         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7854         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7855         (bsd_uthread_target): Delete function.
7856         (_initialize_bsd_uthread): Remove reference to
7857         complete_target_initialization.
7858
7859         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7860         (target_bfd): ... this new class.
7861         (target_bfd_xfer_partial, target_bfd_get_section_table)
7862         (target_bfd_close): Refactor as target_bfd methods.
7863         (target_bfd::~target_bfd): New.
7864         (target_bfd_reopen): Adjust.
7865         (target_bfd::close): New.
7866
7867         * record-btrace.c (record_btrace_target): New class.
7868         (record_btrace_ops): Now a record_btrace_target.
7869         (record_btrace_open, record_btrace_stop_recording)
7870         (record_btrace_disconnect, record_btrace_close)
7871         (record_btrace_async, record_btrace_info)
7872         (record_btrace_insn_history, record_btrace_insn_history_range)
7873         (record_btrace_insn_history_from, record_btrace_call_history)
7874         (record_btrace_call_history_range)
7875         (record_btrace_call_history_from, record_btrace_record_method)
7876         (record_btrace_is_replaying, record_btrace_will_replay)
7877         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7878         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7879         (record_btrace_store_registers, record_btrace_prepare_to_store)
7880         (record_btrace_to_get_unwinder)
7881         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7882         (record_btrace_commit_resume, record_btrace_wait)
7883         (record_btrace_stop, record_btrace_can_execute_reverse)
7884         (record_btrace_stopped_by_sw_breakpoint)
7885         (record_btrace_supports_stopped_by_sw_breakpoint)
7886         (record_btrace_stopped_by_hw_breakpoint)
7887         (record_btrace_supports_stopped_by_hw_breakpoint)
7888         (record_btrace_update_thread_list, record_btrace_thread_alive)
7889         (record_btrace_goto_begin, record_btrace_goto_end)
7890         (record_btrace_goto, record_btrace_stop_replaying_all)
7891         (record_btrace_execution_direction)
7892         (record_btrace_prepare_to_generate_core)
7893         (record_btrace_done_generating_core): Refactor as
7894         record_btrace_target methods.
7895         (init_record_btrace_ops): Delete.
7896         (_initialize_record_btrace): Remove reference to
7897         init_record_btrace_ops.
7898         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7899         the execution_direction global.
7900         (record_full_base_target, record_full_target)
7901         (record_full_core_target): New classes.
7902         (record_full_ops): Now a record_full_target.
7903         (record_full_core_ops): Now a record_full_core_target.
7904         (record_full_target::detach, record_full_target::disconnect)
7905         (record_full_core_target::disconnect)
7906         (record_full_target::mourn_inferior, record_full_target::kill):
7907         New.
7908         (record_full_open, record_full_close, record_full_async): Refactor
7909         as methods of the record_full_base_target class.
7910         (record_full_resume, record_full_commit_resume): Refactor
7911         as methods of the record_full_target class.
7912         (record_full_wait, record_full_stopped_by_watchpoint)
7913         (record_full_stopped_data_address)
7914         (record_full_stopped_by_sw_breakpoint)
7915         (record_full_supports_stopped_by_sw_breakpoint)
7916         (record_full_stopped_by_hw_breakpoint)
7917         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7918         methods of the record_full_base_target class.
7919         (record_full_store_registers, record_full_xfer_partial)
7920         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7921         Refactor as methods of the record_full_target class.
7922         (record_full_can_execute_reverse, record_full_get_bookmark)
7923         (record_full_goto_bookmark, record_full_execution_direction)
7924         (record_full_record_method, record_full_info, record_full_delete)
7925         (record_full_is_replaying, record_full_will_replay)
7926         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7927         (record_full_stop_replaying): Refactor as methods of the
7928         record_full_base_target class.
7929         (record_full_core_resume, record_full_core_kill)
7930         (record_full_core_fetch_registers)
7931         (record_full_core_prepare_to_store)
7932         (record_full_core_store_registers, record_full_core_xfer_partial)
7933         (record_full_core_insert_breakpoint)
7934         (record_full_core_remove_breakpoint)
7935         (record_full_core_has_execution): Refactor
7936         as methods of the record_full_core_target class.
7937         (record_full_base_target::supports_delete_record): New.
7938         (init_record_full_ops): Delete.
7939         (init_record_full_core_ops): Delete.
7940         (record_full_save): Refactor as method of the
7941         record_full_base_target class.
7942         (_initialize_record_full): Remove references to
7943         init_record_full_ops and init_record_full_core_ops.
7944
7945         * remote.c (remote_target, extended_remote_target): New classes.
7946         (remote_ops): Now a remote_target.
7947         (extended_remote_ops): Now an extended_remote_target.
7948         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7949         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7950         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7951         (remote_pass_signals, remote_set_syscall_catchpoint)
7952         (remote_program_signals, )
7953         (remote_thread_always_alive): Remove target_ops parameter.
7954         (remote_thread_alive, remote_thread_name)
7955         (remote_update_thread_list, remote_threads_extra_info)
7956         (remote_static_tracepoint_marker_at)
7957         (remote_static_tracepoint_markers_by_strid)
7958         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7959         (remote_open): Refactor as methods of remote_target.
7960         (extended_remote_open, extended_remote_detach)
7961         (extended_remote_attach, extended_remote_post_attach):
7962         (extended_remote_supports_disable_randomization)
7963         (extended_remote_create_inferior): : Refactor as method of
7964         extended_remote_target.
7965         (remote_set_permissions, remote_open_1, remote_detach)
7966         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7967         (remote_resume, remote_commit_resume, remote_stop)
7968         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7969         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7970         (remote_prepare_to_store, remote_store_registers)
7971         (remote_flash_erase, remote_flash_done, remote_files_info)
7972         (remote_kill, remote_mourn, remote_insert_breakpoint)
7973         (remote_remove_breakpoint, remote_insert_watchpoint)
7974         (remote_watchpoint_addr_within_range)
7975         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7976         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7977         (remote_supports_stopped_by_sw_breakpoint)
7978         (remote_stopped_by_hw_breakpoint)
7979         (remote_supports_stopped_by_hw_breakpoint)
7980         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7981         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7982         (remote_verify_memory): Refactor as methods of remote_target.
7983         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7984         parameter.
7985         (remote_xfer_partial, remote_get_memory_xfer_limit)
7986         (remote_search_memory, remote_rcmd, remote_memory_map)
7987         (remote_pid_to_str, remote_get_thread_local_address)
7988         (remote_get_tib_address, remote_read_description): Refactor as
7989         methods of remote_target.
7990         (remote_target::fileio_open, remote_target::fileio_pwrite)
7991         (remote_target::fileio_pread, remote_target::fileio_close): New.
7992         (remote_hostio_readlink, remote_hostio_fstat)
7993         (remote_filesystem_is_local, remote_can_execute_reverse)
7994         (remote_supports_non_stop, remote_supports_disable_randomization)
7995         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7996         (remote_supports_enable_disable_tracepoint)
7997         (remote_supports_string_tracing)
7998         (remote_can_run_breakpoint_commands, remote_trace_init)
7999         (remote_download_tracepoint, remote_can_download_tracepoint)
8000         (remote_download_trace_state_variable, remote_enable_tracepoint)
8001         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8002         (remote_trace_start, remote_get_trace_status)
8003         (remote_get_tracepoint_status, remote_trace_stop)
8004         (remote_trace_find, remote_get_trace_state_variable_value)
8005         (remote_save_trace_data, remote_get_raw_trace_data)
8006         (remote_set_disconnected_tracing, remote_core_of_thread)
8007         (remote_set_circular_trace_buffer, remote_traceframe_info)
8008         (remote_get_min_fast_tracepoint_insn_len)
8009         (remote_set_trace_buffer_size, remote_set_trace_notes)
8010         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8011         (remote_disable_btrace, remote_teardown_btrace)
8012         (remote_read_btrace, remote_btrace_conf)
8013         (remote_augmented_libraries_svr4_read, remote_load)
8014         (remote_pid_to_exec_file, remote_can_do_single_step)
8015         (remote_execution_direction, remote_thread_handle_to_thread_info):
8016         Refactor as methods of remote_target.
8017         (init_remote_ops, init_extended_remote_ops): Delete.
8018         (remote_can_async_p, remote_is_async_p, remote_async)
8019         (remote_thread_events, remote_upload_tracepoints)
8020         (remote_upload_trace_state_variables): Refactor as methods of
8021         remote_target.
8022         (_initialize_remote): Remove references to init_remote_ops and
8023         init_extended_remote_ops.
8024
8025         * remote-sim.c (gdbsim_target): New class.
8026         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8027         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8028         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8029         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8030         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8031         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8032         Refactor as methods of gdbsim_target.
8033         (gdbsim_ops): Now a gdbsim_target.
8034         (init_gdbsim_ops): Delete.
8035         (gdbsim_cntrl_c): Adjust.
8036         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8037
8038         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8039         (the_amd64_linux_nat_target): New.
8040         (amd64_linux_fetch_inferior_registers)
8041         (amd64_linux_store_inferior_registers): Refactor as methods of
8042         amd64_linux_nat_target.
8043         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8044         * i386-linux-nat.c: Don't include "linux-nat.h".
8045         (i386_linux_nat_target): New class.
8046         (the_i386_linux_nat_target): New.
8047         (i386_linux_fetch_inferior_registers)
8048         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8049         as methods of i386_linux_nat_target.
8050         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8051         * inf-child.c (inf_child_ops): Delete.
8052         (inf_child_fetch_inferior_registers)
8053         (inf_child_store_inferior_registers): Delete.
8054         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8055         methods of inf_child_target.
8056         (inf_child_target::supports_terminal_ours)
8057         (inf_child_target::terminal_init)
8058         (inf_child_target::terminal_inferior)
8059         (inf_child_target::terminal_ours_for_output)
8060         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8061         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8062         New.
8063         (inf_child_open, inf_child_disconnect, inf_child_close)
8064         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8065         (inf_child_post_startup_inferior, inf_child_can_run)
8066         (inf_child_pid_to_exec_file): Refactor as methods of
8067         inf_child_target.
8068         (inf_child_follow_fork): Delete.
8069         (inf_child_target::can_create_inferior)
8070         (inf_child_target::can_attach): New.
8071         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8072         (inf_child_target::has_stack, inf_child_target::has_registers)
8073         (inf_child_target::has_execution): New.
8074         (inf_child_fileio_open, inf_child_fileio_pwrite)
8075         (inf_child_fileio_pread, inf_child_fileio_fstat)
8076         (inf_child_fileio_close, inf_child_fileio_unlink)
8077         (inf_child_fileio_readlink, inf_child_use_agent)
8078         (inf_child_can_use_agent): Refactor as methods of
8079         inf_child_target.
8080         (return_zero, inf_child_target): Delete.
8081         (inf_child_target::inf_child_target): New.
8082         * inf-child.h: Include "target.h".
8083         (inf_child_target): Delete function prototype.
8084         (inf_child_target): New class.
8085         (inf_child_open_target, inf_child_mourn_inferior)
8086         (inf_child_maybe_unpush_target): Delete.
8087         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8088         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8089         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8090         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8091         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8092         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8093         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8094         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8095         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8096         methods of inf_ptrace_target.
8097         (inf_ptrace_target): Delete function.
8098         * inf-ptrace.h: Include "inf-child.h".
8099         (inf_ptrace_target): Delete function declaration.
8100         (inf_ptrace_target): New class.
8101         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8102         * linux-nat.c (linux_target): New.
8103         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8104         (linux_nat_target::~linux_nat_target): New.
8105         (linux_child_post_attach, linux_child_post_startup_inferior)
8106         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8107         (linux_child_remove_fork_catchpoint)
8108         (linux_child_insert_vfork_catchpoint)
8109         (linux_child_remove_vfork_catchpoint)
8110         (linux_child_insert_exec_catchpoint)
8111         (linux_child_remove_exec_catchpoint)
8112         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8113         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8114         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8115         (linux_nat_stopped_data_address)
8116         (linux_nat_stopped_by_sw_breakpoint)
8117         (linux_nat_supports_stopped_by_sw_breakpoint)
8118         (linux_nat_stopped_by_hw_breakpoint)
8119         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8120         (linux_nat_kill, linux_nat_mourn_inferior)
8121         (linux_nat_xfer_partial, linux_nat_thread_alive)
8122         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8123         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8124         (linux_child_static_tracepoint_markers_by_strid)
8125         (linux_nat_is_async_p, linux_nat_can_async_p)
8126         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8127         (linux_nat_supports_multi_process)
8128         (linux_nat_supports_disable_randomization, linux_nat_async)
8129         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8130         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8131         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8132         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8133         methods of linux_nat_target.
8134         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8135         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8136         parameter.
8137         (check_stopped_by_watchpoint): Adjust.
8138         (linux_xfer_partial): Delete.
8139         (linux_target_install_ops, linux_target, linux_nat_add_target):
8140         Delete.
8141         (linux_nat_target::linux_nat_target): New.
8142         * linux-nat.h: Include "inf-ptrace.h".
8143         (linux_nat_target): New.
8144         (linux_target, linux_target_install_ops, linux_nat_add_target):
8145         Delete function declarations.
8146         (linux_target): Declare global.
8147         * linux-thread-db.c (thread_db_target): New.
8148         (thread_db_target::thread_db_target): New.
8149         (thread_db_ops): Delete.
8150         (the_thread_db_target): New.
8151         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8152         (thread_db_update_thread_list, thread_db_pid_to_str)
8153         (thread_db_extra_thread_info)
8154         (thread_db_thread_handle_to_thread_info)
8155         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8156         (thread_db_resume): Refactor as methods of thread_db_target.
8157         (init_thread_db_ops): Delete.
8158         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8159         * x86-linux-nat.c: Don't include "linux-nat.h".
8160         (super_post_startup_inferior): Delete.
8161         (x86_linux_nat_target::~x86_linux_nat_target): New.
8162         (x86_linux_child_post_startup_inferior)
8163         (x86_linux_read_description, x86_linux_enable_btrace)
8164         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8165         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8166         methods of x86_linux_nat_target.
8167         (x86_linux_create_target): Delete.  Bits folded ...
8168         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8169         pointer.
8170         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8171         (x86_linux_nat_target): New class.
8172         (x86_linux_create_target): Delete.
8173         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8174         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8175         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8176         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8177         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8178         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8179         make extern.
8180         (x86_use_watchpoints): Delete.
8181         * x86-nat.h: Include "breakpoint.h" and "target.h".
8182         (x86_use_watchpoints): Delete.
8183         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8184         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8185         (x86_insert_watchpoint, x86_remove_watchpoint)
8186         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8187         (x86_stopped_by_hw_breakpoint): New declarations.
8188         (x86_nat_target): New template class.
8189
8190         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8191         (the_ppc_linux_nat_target): New.
8192         (ppc_linux_fetch_inferior_registers)
8193         (ppc_linux_can_use_hw_breakpoint)
8194         (ppc_linux_region_ok_for_hw_watchpoint)
8195         (ppc_linux_ranged_break_num_registers)
8196         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8197         (ppc_linux_insert_mask_watchpoint)
8198         (ppc_linux_remove_mask_watchpoint)
8199         (ppc_linux_can_accel_watchpoint_condition)
8200         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8201         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8202         (ppc_linux_watchpoint_addr_within_range)
8203         (ppc_linux_masked_watch_num_registers)
8204         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8205         (ppc_linux_read_description): Refactor as methods of
8206         ppc_linux_nat_target.
8207         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8208
8209         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8210         (procfs_target): New class.
8211         (the_procfs_target): New.
8212         (procfs_target): Delete function.
8213         (procfs_auxv_parse, procfs_attach, procfs_detach)
8214         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8215         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8216         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8217         (procfs_create_inferior, procfs_update_thread_list)
8218         (procfs_thread_alive, procfs_pid_to_str)
8219         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8220         (procfs_stopped_data_address, procfs_insert_watchpoint)
8221         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8222         (proc_find_memory_regions, procfs_info_proc)
8223         (procfs_make_note_section): Refactor as methods of procfs_target.
8224         (_initialize_procfs): Adjust.
8225         * sol-thread.c (sol_thread_target): New class.
8226         (sol_thread_ops): Now a sol_thread_target.
8227         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8228         (sol_thread_fetch_registers, sol_thread_store_registers)
8229         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8230         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8231         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8232         (init_sol_thread_ops): Delete.
8233         (_initialize_sol_thread): Adjust.  Remove references to
8234         init_sol_thread_ops and complete_target_initialization.
8235
8236         * windows-nat.c (windows_nat_target): New class.
8237         (windows_fetch_inferior_registers)
8238         (windows_store_inferior_registers, windows_resume, windows_wait)
8239         (windows_attach, windows_detach, windows_pid_to_exec_file)
8240         (windows_files_info, windows_create_inferior)
8241         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8242         (windows_close, windows_pid_to_str, windows_xfer_partial)
8243         (windows_get_tib_address, windows_get_ada_task_ptid)
8244         (windows_thread_name, windows_thread_alive): Refactor as
8245         windows_nat_target methods.
8246         (do_initial_windows_stuff): Adjust.
8247         (windows_target): Delete function.
8248         (_initialize_windows_nat): Adjust.
8249
8250         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8251         (darwin_mourn_inferior, darwin_kill_inferior)
8252         (darwin_create_inferior, darwin_attach, darwin_detach)
8253         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8254         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8255         (darwin_supports_multi_process): Refactor as darwin_nat_target
8256         methods.
8257         (darwin_resume_to, darwin_files_info): Delete.
8258         (_initialize_darwin_inferior): Rename to ...
8259         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8260         * darwin-nat.h: Include "inf-child.h".
8261         (darwin_nat_target): New class.
8262         (darwin_complete_target): Delete.
8263         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8264         (darwin_target): New.
8265         (i386_darwin_fetch_inferior_registers)
8266         (i386_darwin_store_inferior_registers): Refactor as methods of
8267         darwin_nat_target.
8268         (darwin_complete_target): Delete, with ...
8269         (_initialize_i386_darwin_nat): ... bits factored out here.
8270
8271         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8272         (the_alpha_linux_nat_target): New.
8273         (alpha_linux_register_u_offset): Refactor as
8274         alpha_linux_nat_target method.
8275         (_initialize_alpha_linux_nat): Adjust.
8276         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8277         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8278         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8279         methods of linux_nat_trad_target.
8280         (linux_trad_target): Delete.
8281         * linux-nat-trad.h (linux_trad_target): Delete function.
8282         (linux_nat_trad_target): New class.
8283         * mips-linux-nat.c (mips_linux_nat_target): New class.
8284         (super_fetch_registers, super_store_registers, super_close):
8285         Delete.
8286         (the_mips_linux_nat_target): New.
8287         (mips64_linux_regsets_fetch_registers)
8288         (mips64_linux_regsets_store_registers)
8289         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8290         (mips_linux_register_u_offset, mips_linux_read_description)
8291         (mips_linux_can_use_hw_breakpoint)
8292         (mips_linux_stopped_by_watchpoint)
8293         (mips_linux_stopped_data_address)
8294         (mips_linux_region_ok_for_hw_watchpoint)
8295         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8296         (mips_linux_close): Refactor as methods of mips_linux_nat.
8297         (_initialize_mips_linux_nat): Adjust to C++ification.
8298
8299         * aix-thread.c (aix_thread_target): New class.
8300         (aix_thread_ops): Now an aix_thread_target.
8301         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8302         (aix_thread_fetch_registers, aix_thread_store_registers)
8303         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8304         (aix_thread_thread_alive, aix_thread_pid_to_str)
8305         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8306         Refactor as methods of aix_thread_target.
8307         (init_aix_thread_ops): Delete.
8308         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8309         and complete_target_initialization.
8310         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8311         (rs6000_nat_target): New class.
8312         (the_rs6000_nat_target): New.
8313         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8314         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8315         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8316         (super_create_inferior): Delete.
8317         (_initialize_rs6000_nat): Adjust to C++ification.
8318
8319         * arm-linux-nat.c (arm_linux_nat_target): New class.
8320         (the_arm_linux_nat_target): New.
8321         (arm_linux_fetch_inferior_registers)
8322         (arm_linux_store_inferior_registers, arm_linux_read_description)
8323         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8324         (arm_linux_remove_hw_breakpoint)
8325         (arm_linux_region_ok_for_hw_watchpoint)
8326         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8327         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8328         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8329         arm_linux_nat_target.
8330         (_initialize_arm_linux_nat): Adjust to C++ification.
8331
8332         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8333         (the_aarch64_linux_nat_target): New.
8334         (aarch64_linux_fetch_inferior_registers)
8335         (aarch64_linux_store_inferior_registers)
8336         (aarch64_linux_child_post_startup_inferior)
8337         (aarch64_linux_read_description)
8338         (aarch64_linux_can_use_hw_breakpoint)
8339         (aarch64_linux_insert_hw_breakpoint)
8340         (aarch64_linux_remove_hw_breakpoint)
8341         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8342         (aarch64_linux_region_ok_for_hw_watchpoint)
8343         (aarch64_linux_stopped_data_address)
8344         (aarch64_linux_stopped_by_watchpoint)
8345         (aarch64_linux_watchpoint_addr_within_range)
8346         (aarch64_linux_can_do_single_step): Refactor as methods of
8347         aarch64_linux_nat_target.
8348         (super_post_startup_inferior): Delete.
8349         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8350
8351         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8352         (the_hppa_linux_nat_target): New.
8353         (hppa_linux_fetch_inferior_registers)
8354         (hppa_linux_store_inferior_registers): Refactor as methods of
8355         hppa_linux_nat_target.
8356         (_initialize_hppa_linux_nat): Adjust to C++ification.
8357
8358         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8359         (the_ia64_linux_nat_target): New.
8360         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8361         (ia64_linux_stopped_data_address)
8362         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8363         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8364         ia64_linux_nat_target methods.
8365         (super_xfer_partial): Delete.
8366         (_initialize_ia64_linux_nat): Adjust to C++ification.
8367
8368         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8369         (the_m32r_linux_nat_target): New.
8370         (m32r_linux_fetch_inferior_registers)
8371         (m32r_linux_store_inferior_registers): Refactor as
8372         m32r_linux_nat_target methods.
8373         (_initialize_m32r_linux_nat): Adjust to C++ification.
8374
8375         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8376         (the_m68k_linux_nat_target): New.
8377         (m68k_linux_fetch_inferior_registers)
8378         (m68k_linux_store_inferior_registers): Refactor as
8379         m68k_linux_nat_target methods.
8380         (_initialize_m68k_linux_nat): Adjust to C++ification.
8381
8382         * s390-linux-nat.c (s390_linux_nat_target): New class.
8383         (the_s390_linux_nat_target): New.
8384         (s390_linux_fetch_inferior_registers)
8385         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8386         (s390_insert_watchpoint, s390_remove_watchpoint)
8387         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8388         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8389         (s390_auxv_parse, s390_read_description): Refactor as methods of
8390         s390_linux_nat_target.
8391         (_initialize_s390_nat): Adjust to C++ification.
8392
8393         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8394         (the_sparc_linux_nat_target): New.
8395         (_initialize_sparc_linux_nat): Adjust to C++ification.
8396         * sparc-nat.c (sparc_fetch_inferior_registers)
8397         (sparc_store_inferior_registers): Remove target_ops parameter.
8398         * sparc-nat.h (sparc_fetch_inferior_registers)
8399         (sparc_store_inferior_registers): Remove target_ops parameter.
8400         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8401         (the_sparc64_linux_nat_target): New.
8402         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8403
8404         * spu-linux-nat.c (spu_linux_nat_target): New class.
8405         (the_spu_linux_nat_target): New.
8406         (spu_child_post_startup_inferior, spu_child_post_attach)
8407         (spu_child_wait, spu_fetch_inferior_registers)
8408         (spu_store_inferior_registers, spu_xfer_partial)
8409         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8410         methods.
8411         (_initialize_spu_nat): Adjust to C++ification.
8412
8413         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8414         (the_tilegx_linux_nat_target): New.
8415         (fetch_inferior_registers, store_inferior_registers):
8416         Refactor as methods.
8417         (_initialize_tile_linux_nat): Adjust to C++ification.
8418
8419         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8420         (the_xtensa_linux_nat_target): New.
8421         (xtensa_linux_fetch_inferior_registers)
8422         (xtensa_linux_store_inferior_registers): Refactor as
8423         xtensa_linux_nat_target methods.
8424         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8425
8426         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8427         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8428         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8429         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8430         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8431         (fbsd_stopped_by_sw_breakpoint)
8432         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8433         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8434         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8435         (fbsd_post_startup_inferior, fbsd_post_attach)
8436         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8437         (fbsd_set_syscall_catchpoint)
8438         (super_xfer_partial, super_resume, super_wait)
8439         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8440         (fbsd_handle_debug_trap): Remove target_ops parameter.
8441         (fbsd_nat_add_target): Delete.
8442         * fbsd-nat.h: Include "inf-ptrace.h".
8443         (fbsd_nat_add_target): Delete.
8444         (USE_SIGTRAP_SIGINFO): Define.
8445         (fbsd_nat_target): New class.
8446
8447         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8448         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8449         (amd64bsd_target): Delete.
8450         * amd64-bsd-nat.h: New file.
8451         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8452         "x86-bsd-nat.h".
8453         (amd64_fbsd_nat_target): New class.
8454         (the_amd64_fbsd_nat_target): New.
8455         (amd64fbsd_read_description): Refactor as method of
8456         amd64_fbsd_nat_target.
8457         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8458         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8459         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8460         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8461         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8462         (i386bsd_target): Delete.
8463         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8464         (i386bsd_fetch_inferior_registers)
8465         (i386bsd_store_inferior_registers): Declare.
8466         (i386_bsd_nat_target): New class.
8467         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8468         (the_i386_fbsd_nat_target): New.
8469         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8470         i386_fbsd_nat_target methods.
8471         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8472         (_initialize_i386fbsd_nat): Adjust to C++ification.
8473         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8474         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8475         (_initialize_x86_bsd_nat): Adjust to C++ification.
8476         * x86-bsd-nat.h: Include "x86-nat.h".
8477         (x86bsd_target): Delete declaration.
8478         (x86bsd_nat_target): New class.
8479
8480         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8481         (the_aarch64_fbsd_nat_target): New.
8482         (aarch64_fbsd_fetch_inferior_registers)
8483         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8484         aarch64_fbsd_nat_target.
8485         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8486         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8487         (the_alpha_bsd_nat_target): New.
8488         (alphabsd_fetch_inferior_registers)
8489         (alphabsd_store_inferior_registers): Refactor as
8490         alpha_bsd_nat_target methods.
8491         (_initialize_alphabsd_nat): Refactor as methods of
8492         alpha_bsd_nat_target.
8493         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8494         (the_amd64_nbsd_nat_target): New.
8495         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8496         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8497         (the_amd64_obsd_nat_target): New.
8498         (_initialize_amd64obsd_nat): Adjust to C++ification.
8499         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8500         (the_arm_fbsd_nat_target): New.
8501         (arm_fbsd_fetch_inferior_registers)
8502         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8503         (_initialize_arm_fbsd_nat): Refactor as methods of
8504         arm_fbsd_nat_target.
8505         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8506         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8507         (the_arm_netbsd_nat_target): New.
8508         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8509         arm_netbsd_nat_target.
8510         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8511         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8512         (the_hppa_nbsd_nat_target): New.
8513         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8514         hppa_nbsd_nat_target methods.
8515         (_initialize_hppanbsd_nat): Adjust to C++ification.
8516         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8517         (the_hppa_obsd_nat_target): New.
8518         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8519         methods of hppa_obsd_nat_target.
8520         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8521         add_target.
8522         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8523         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8524         add_target.
8525         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8526         (_initialize_i386obsd_nat): Use add_target.
8527         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8528         (the_m68k_bsd_nat_target): New.
8529         (m68kbsd_fetch_inferior_registers)
8530         (m68kbsd_store_inferior_registers): Refactor as methods of
8531         m68k_bsd_nat_target.
8532         (_initialize_m68kbsd_nat): Adjust to C++ification.
8533         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8534         (the_mips_fbsd_nat_target): New.
8535         (mips_fbsd_fetch_inferior_registers)
8536         (mips_fbsd_store_inferior_registers): Refactor as methods of
8537         mips_fbsd_nat_target.
8538         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8539         add_target.
8540         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8541         (the_mips_nbsd_nat_target): New.
8542         (mipsnbsd_fetch_inferior_registers)
8543         (mipsnbsd_store_inferior_registers): Refactor as methods of
8544         mips_nbsd_nat_target.
8545         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8546         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8547         (the_mips64_obsd_nat_target): New.
8548         (mips64obsd_fetch_inferior_registers)
8549         (mips64obsd_store_inferior_registers): Refactor as methods of
8550         mips64_obsd_nat_target.
8551         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8552         add_target.
8553         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8554         nbsd_nat_target.
8555         * nbsd-nat.h: Include "inf-ptrace.h".
8556         (nbsd_nat_target): New class.
8557         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8558         (obsd_wait): Refactor as methods of obsd_nat_target.
8559         (obsd_add_target): Delete.
8560         * obsd-nat.h: Include "inf-ptrace.h".
8561         (obsd_nat_target): New class.
8562         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8563         (the_ppc_fbsd_nat_target): New.
8564         (ppcfbsd_fetch_inferior_registers)
8565         (ppcfbsd_store_inferior_registers): Refactor as methods of
8566         ppc_fbsd_nat_target.
8567         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8568         add_target.
8569         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8570         (the_ppc_nbsd_nat_target): New.
8571         (ppcnbsd_fetch_inferior_registers)
8572         (ppcnbsd_store_inferior_registers): Refactor as methods of
8573         ppc_nbsd_nat_target.
8574         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8575         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8576         (the_ppc_obsd_nat_target): New.
8577         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8578         methods of ppc_obsd_nat_target.
8579         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8580         add_target.
8581         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8582         (the_sh_nbsd_nat_target): New.
8583         (shnbsd_fetch_inferior_registers)
8584         (shnbsd_store_inferior_registers): Refactor as methods of
8585         sh_nbsd_nat_target.
8586         (_initialize_shnbsd_nat): Adjust to C++ification.
8587         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8588         (inf_ptrace_xfer_partial): Delete.
8589         (sparc_xfer_partial, sparc_target): Delete.
8590         * sparc-nat.h (sparc_fetch_inferior_registers)
8591         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8592         (sparc_target): Delete function declaration.
8593         (sparc_target): New template class.
8594         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8595         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8596         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8597         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8598         add_target.
8599         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8600         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8601         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8602         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8603         add_target.
8604         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8605         (the_vax_bsd_nat_target): New.
8606         (vaxbsd_fetch_inferior_registers)
8607         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8608         methods.
8609         (_initialize_vaxbsd_nat): Adjust to C++ification.
8610
8611         * bsd-kvm.c (bsd_kvm_target): New class.
8612         (bsd_kvm_ops): Now a bsd_kvm_target.
8613         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8614         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8615         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8616         bsd_kvm_target.
8617         (bsd_kvm_return_one): Delete.
8618         (bsd_kvm_add_target): Adjust to C++ification.
8619
8620         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8621         (nto_procfs_target_procfs): New classes.
8622         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8623         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8624         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8625         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8626         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8627         (procfs_remove_hw_breakpoint, procfs_resume)
8628         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8629         (procfs_kill_inferior, procfs_store_registers)
8630         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8631         as methods of nto_procfs_target.
8632         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8633         (nto_native_ops): Delete.
8634         (procfs_open, procfs_native_open): Delete.
8635         (nto_native_ops): Now an nto_procfs_target_native.
8636         (init_procfs_targets): Adjust to C++ification.
8637         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8638         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8639         Refactor as methods of nto_procfs_target.
8640
8641         * go32-nat.c (go32_nat_target): New class.
8642         (the_go32_nat_target): New.
8643         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8644         (go32_store_registers, go32_xfer_partial, go32_files_info)
8645         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8646         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8647         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8648         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8649         (go32_target): Delete.
8650         (_initialize_go32_nat): Adjust to C++ification.
8651
8652         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8653         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8654         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8655         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8656         gnu_nat_target.
8657         (gnu_target): Delete.
8658         * gnu-nat.h (gnu_target): Delete.
8659         (gnu_nat_target): New class.
8660         * i386-gnu-nat.c (gnu_base_target): New.
8661         (i386_gnu_nat_target): New class.
8662         (the_i386_gnu_nat_target): New.
8663         (_initialize_i386gnu_nat): Adjust to C++ification.
8664
8665 2018-05-02  Pedro Alves  <palves@redhat.com>
8666
8667         * bfd-target.c (target_bfd_xclose): Rename to ...
8668         (target_bfd_close): ... this.
8669         (target_bfd_reopen): Adjust.
8670         * target.c (target_close): Remove references to to_xclose.
8671         * target.h (target_ops::to_xclose): Delete.
8672         (target_ops::to_close): Update comments.
8673
8674 2018-05-02  Pedro Alves  <palves@redhat.com>
8675
8676         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8677         "linux-nat.h".
8678         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8679         * inf-ptrace.c (inf_ptrace_register_u_offset)
8680         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8681         (inf_ptrace_store_register, inf_ptrace_store_registers)
8682         (inf_ptrace_trad_target): Move to ...
8683         * linux-nat-trad.c: ... this new file.
8684         * linux-nat-trad.h: New file.
8685         * linux-nat.c (linux_target_install_ops): Make extern.
8686         (linux_trad_target): Delete.
8687         * linux-nat.h (linux_trad_target): Delete declaration.
8688         (linux_target_install_ops): Declare.
8689         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8690         "linux-nat.h".
8691
8692 2018-05-02  Pedro Alves  <palves@redhat.com>
8693
8694         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8695         procfs_target/add_target here.
8696         * procfs.c (procfs_target): Make static.
8697         (_initialize_procfs): Call add_target here.
8698         * procfs.h (struct target_ops): Remove forward declaration.
8699         (procfs_target): Remove declaration.
8700         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8701
8702 2018-05-02  Pedro Alves  <palves@redhat.com>
8703
8704         * procfs.c (procfs_stopped_by_watchpoint)
8705         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8706         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8707         Forward declare.
8708         (procfs_use_watchpoints): Delete, move contents...
8709         (procfs_target): ... here.
8710         * procfs.h (procfs_use_watchpoints): Delete declaration.
8711         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8712         procfs_use_watchpoints.
8713         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8714         procfs_use_watchpoints.
8715
8716 2018-05-02  Tom Tromey  <tom@tromey.com>
8717
8718         PR python/20084:
8719         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8720         and var_zuinteger_unlimited.
8721         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8722         and PARAM_ZUINTEGER_UNLIMITED.
8723         (set_parameter_value): Handle var_zuinteger and
8724         var_zuinteger_unlimited.
8725         (add_setshow_generic): Likewise.
8726         (parmpy_init): Likewise.
8727
8728 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8729
8730         PR rust/23124
8731         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8732         pointer is not null before dereferencing it.
8733
8734 2018-04-30  Tom Tromey  <tom@tromey.com>
8735
8736         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8737         is_mi_like_p.
8738
8739 2018-04-30  Tom Tromey  <tom@tromey.com>
8740
8741         * breakpoint.c (mention): Remove use of is_mi_like_p.
8742         (print_mention_ranged_breakpoint): Likewise.
8743         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8744         of is_mi_like_p.
8745
8746 2018-04-30  Tom Tromey  <tom@tromey.com>
8747
8748         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8749
8750 2018-04-30  Tom Tromey  <tom@tromey.com>
8751
8752         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8753         (info_spu_event_command): Remove some uses of is_mi_like_p.
8754
8755 2018-04-30  Tom Tromey  <tom@tromey.com>
8756
8757         * python/py-framefilter.c (py_print_single_arg)
8758         (enumerate_locals, py_print_args, py_print_frame): Remove some
8759         uses of is_mi_like_p.
8760
8761 2018-04-30  Tom Tromey  <tom@tromey.com>
8762
8763         * ui-out.c: Update.
8764         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8765         * ui-out.h (ui_out::is_mi_like_p): Now const.
8766         (ui_out::do_is_mi_like_p): Now const.
8767         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8768
8769 2018-04-30  Tom Tromey  <tom@tromey.com>
8770
8771         * varobj.c (varobj_set_visualizer): Use new_reference.
8772         * python/python.c (gdbpy_decode_line): Use new_reference.
8773         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8774         new_reference.
8775
8776 2018-04-30  Tom Tromey  <tom@tromey.com>
8777
8778         * varobj.c (install_new_value): Use new_reference.
8779         * value.h (value_incref): Return void.  Swap intro comment with
8780         value_decref.
8781         * value.c (set_value_parent): Use new_reference.
8782         (value_incref): Return void.  Update intro comment.
8783         (release_value): Use new_reference.
8784         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8785
8786 2018-04-30  Tom Tromey  <tom@tromey.com>
8787
8788         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8789         * gdb_bfd.h (new_bfd_ref): Remove.
8790         (gdb_bfd_open): Update comment.
8791         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8792         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8793         (gdb_bfd_fdopenr): Use new_reference.
8794         * exec.c (exec_file_attach): Use new_reference.
8795
8796 2018-04-30  Tom Tromey  <tom@tromey.com>
8797
8798         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8799         method.
8800
8801 2018-04-30  Tom Tromey  <tom@tromey.com>
8802
8803         * jit.c (jit_read_code_entry): Use type_align.
8804         * i386-tdep.c (i386_gdbarch_init): Don't call
8805         set_gdbarch_long_long_align_bit.
8806         * gdbarch.sh: Remove long_long_align_bit.
8807         * gdbarch.c, gdbarch.h: Rebuild.
8808         * arc-tdep.c (arc_type_align): New function.
8809         (arc_gdbarch_init): Use arc_type_align.  Don't call
8810         set_gdbarch_long_long_align_bit.
8811
8812 2018-04-30  Tom Tromey  <tom@tromey.com>
8813
8814         * rust-lang.c (rust_type_alignment): Remove.
8815         (rust_composite_type): Use type_align.
8816
8817 2018-04-30  Tom Tromey  <tom@tromey.com>
8818
8819         * NEWS: Mention Type.align.
8820         * python/py-type.c (typy_get_alignof): New function.
8821         (type_object_getset): Add "alignof".
8822
8823 2018-04-30  Tom Tromey  <tom@tromey.com>
8824
8825         PR exp/17095:
8826         * NEWS: Update.
8827         * std-operator.def (UNOP_ALIGNOF): New operator.
8828         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8829         New.
8830         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8831         * c-lang.c (c_op_print_tab): Add alignof.
8832         * c-exp.y (ALIGNOF): New token.
8833         (exp): Add "ALIGNOF" production.
8834         (ident_tokens): Add _Alignof and alignof.
8835
8836 2018-04-30  Tom Tromey  <tom@tromey.com>
8837
8838         * i386-tdep.c (i386_type_align): New function.
8839         (i386_gdbarch_init): Update.
8840         * gdbarch.sh (type_align): New method.
8841         * gdbarch.c, gdbarch.h: Rebuild.
8842         * arch-utils.h (default_type_align): Declare.
8843         * arch-utils.c (default_type_align): New function.
8844         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8845         (struct type) <align_log2>: New field.
8846         <instance_flags>: Now a bitfield.
8847         (TYPE_RAW_ALIGN): New macro.
8848         (type_align, type_raw_align, set_type_align): Declare.
8849         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8850         functions.
8851         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8852         (get_alignment, maybe_set_alignment): New functions.
8853         (read_structure_type, read_enumeration_type, read_array_type)
8854         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8855         (read_subrange_type, read_base_type): Set type alignment.
8856
8857 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8858
8859         * dwarf2read.c (read_index_from_section): Use bool.
8860
8861 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8862
8863         PR gdb/22950
8864         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8865         with #ifdef.
8866
8867 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8868
8869         PR build/22873
8870         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8871         last step, and do it atomically.
8872
8873 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8874
8875         * compile/compile-c-types.c (convert_int, convert_float):
8876         Update for C FE v1.
8877
8878 2018-04-27  Tom Tromey  <tom@tromey.com>
8879
8880         PR rust/22545:
8881         * rust-lang.c (rust_inclusive_range_type_p): New function.
8882         (rust_range): Handle inclusive ranges.
8883         (rust_compute_range): Likewise.
8884         * rust-exp.y (struct rust_op) <inclusive>: New field.
8885         (DOTDOTEQ): New constant.
8886         (range_expr): Add "..=" productions.
8887         (operator_tokens): Add "..=" token.
8888         (ast_range): Add "inclusive" parameter.
8889         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8890         ranges.
8891         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8892         bounds values.
8893         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8894         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8895         Update comments.
8896         * expprint.c (print_subexp_standard): Handle new bounds values.
8897         (dump_subexp_body_standard): Likewise.
8898
8899 2018-04-27  Tom Tromey  <tom@tromey.com>
8900
8901         * configure: Rebuild.
8902         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8903         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8904         "OVERRIDE".
8905         (class symbol_needs_eval_context): Likewise.
8906         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8907         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8908         "virtual".
8909         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8910         "override".
8911         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8912         * aarch64-tdep.c (instruction_reader::read): Use "override".
8913         (instruction_reader_test::read): Likewise.
8914         * arm-tdep.c (instruction_reader::read): Use "override".
8915         (instruction_reader_thumb::read): Likewise.
8916
8917 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8918
8919         PR remote/9665
8920         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8921         instead of remote_send.
8922         (remote_send): Remove.
8923
8924 2018-04-26  Pedro Alves  <palves@redhat.com>
8925
8926         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8927         find_function_start_sal instead of find_pc_line.
8928
8929 2018-04-26  Pedro Alves  <palves@redhat.com>
8930
8931         * breakpoint.c (set_breakpoint_location_function): Handle
8932         mst_data_gnu_ifunc.
8933         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8934         * elfread.c (elf_symtab_read): Give data symbols with
8935         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8936         (elf_rel_plt_read): Update comment.
8937         * linespec.c (convert_linespec_to_sals): Handle
8938         mst_data_gnu_ifunc.
8939         (minsym_found): Handle mst_data_gnu_ifunc.
8940         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8941         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8942         * parse.c (find_minsym_type_and_address): Handle
8943         mst_data_gnu_ifunc.
8944         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8945         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8946         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8947         comment.
8948         <mst_data_gnu_ifunc>: New enumerator.
8949
8950 2018-04-26  Pedro Alves  <palves@redhat.com>
8951
8952         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8953         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8954         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8955         Handle it.
8956         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8957         (lookup_minimal_symbol_by_pc): Adjust.
8958         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8959         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8960         * minsyms.h (lookup_msym_prefer): New enum.
8961         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8962         parameter by a lookup_msym_prefer parameter.
8963
8964 2018-04-26  Pedro Alves  <palves@redhat.com>
8965
8966         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8967         ends in "@plt" instead of looking at the symbol's section.
8968
8969 2018-04-26  Pedro Alves  <palves@redhat.com>
8970
8971         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8972         all references.
8973         (find_pc_partial_function_gnu_ifunc): Rename to ...
8974         (find_pc_partial_function): ... this, and remove references to
8975         'is_gnu_ifunc_p'.
8976         (find_pc_partial_function): Delete old implementation.
8977         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8978
8979 2018-04-26  Pedro Alves  <palves@redhat.com>
8980
8981         * linespec.c (struct bound_minimal_symbol_search_key): New.
8982         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8983         skip first line if we found a GNU ifunc minimal symbol by name.
8984         (compare_msymbols): Change parameters to work with a destructured
8985         lhs minsym.
8986         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8987         functions.
8988
8989 2018-04-26  Pedro Alves  <palves@redhat.com>
8990
8991         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8992         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8993         address/name.
8994         (add_location_to_breakpoint): Store the minsym and the objfile in
8995         the breakpoint location.
8996         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8997         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8998         Record the minsym in the sal.
8999         * symtab.h (symtab_and_line) <msymbol>: New field.
9000
9001 2018-04-26  Pedro Alves  <palves@redhat.com>
9002
9003         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9004         unless we actually resolved the ifunc.
9005
9006 2018-04-26  Pedro Alves  <palves@redhat.com>
9007
9008         * c-exp.y (variable production): Prefer ifunc minsyms over
9009         regular function symbols.
9010         * symtab.c (find_gnu_ifunc): New function.
9011         * minsyms.h (lookup_msym_prefer): New enum.
9012         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9013         parameter by a lookup_msym_prefer parameter.
9014         * symtab.h (find_gnu_ifunc): New declaration.
9015
9016 2018-04-26  Pedro Alves  <palves@redhat.com>
9017
9018         * blockframe.c (find_gnu_ifunc_target_type): New function.
9019         (find_function_type): New.
9020         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9021         return a value with a memory address.
9022         (eval_call): For calls to GNU ifunc functions, try to find the
9023         type of the target function from the type that the resolver
9024         returns.
9025         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9026         symbols.
9027         * infcall.c (find_function_return_type): Delete.
9028         (find_function_addr): Add 'function_type' parameter.  For calls to
9029         GNU ifunc functions, try to find the type of the target function
9030         from the type that the resolver returns, and return it via
9031         FUNCTION_TYPE.
9032         (call_function_by_hand_dummy): Adjust to use the function type
9033         returned by find_function_addr.
9034         (find_function_addr): Add 'function_type' parameter and move
9035         description here.
9036         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9037         declarations.
9038
9039 2018-04-26  Pedro Alves  <palves@redhat.com>
9040
9041         * c-exp.y (variable production): Skip finding an alias for ifunc
9042         symbols.
9043
9044 2018-04-26  Pedro Alves  <palves@redhat.com>
9045
9046         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9047
9048 2018-04-25  Pedro Alves  <palves@redhat.com>
9049
9050         * infcmd.c (kill_command): Print the pid as string, not the whole
9051         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9052         message.
9053         * remote.c (remote_detach_1): Print the pid as string, not the
9054         whole thread's ptid.
9055
9056 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9057             Sergio Durigan Junior  <sergiodj@redhat.com>
9058             Pedro Alves  <palves@redhat.com>
9059
9060         * infcmd.c (kill_command): Print message when inferior has
9061         been killed.
9062         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9063         '1'.
9064         (add_inferior): Improve message printed when
9065         'print_inferior_events' is on.
9066         (exit_inferior): Remove message printed when
9067         'print_inferior_events' is on.
9068         (detach_inferior): Improve message printed when
9069         'print_inferior_events' is on.
9070         (initialize_inferiors): Use 'add_inferior_silent' to set
9071         'current_inferior_'.
9072         * inferior.h (print_inferior_events): Declare here as
9073         'extern'.
9074         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9075         '[Detaching...]' messages when 'print_inferior_events' is on.
9076         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9077         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9078         'Detaching after fork from child...', replace it by '... from
9079         parent...'.
9080         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9081         prefix/suffix when printing 'Detaching...' messages.  Print
9082         them when 'print_inferior_events' is on.
9083         * remote.c (remote_detach_1): Print message when detaching
9084         from inferior and '!is_fork_parent'.
9085
9086 2018-04-24  Tom Tromey  <tom@tromey.com>
9087
9088         * cli-out.h: Reindent.
9089
9090 2018-04-24  Tom Tromey  <tom@tromey.com>
9091
9092         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9093         (cli_ui_out::do_field_string): Use fputs_filtered.
9094         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9095
9096 2018-04-23  Tom Tromey  <tom@tromey.com>
9097
9098         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9099         gdb::unique_xmalloc_ptr.
9100
9101 2018-04-23  Tom Tromey  <tom@tromey.com>
9102
9103         * configure: Rebuild.
9104
9105 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9106
9107         PR gdb/23095
9108         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9109         prepare_for_testing.  Set normal_bp to r_debug_state if target
9110         is bsd.
9111
9112 2018-04-21  Pedro Alves  <palves@redhat.com>
9113             Rajendra SY  <rajendra.sy@gmail.com>
9114
9115         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9116         * remote.c (extended_remote_attach): In all-stop mode, mark the
9117         thread as executing.
9118
9119 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9120
9121         * thread.c (thread_apply_all_command): Fix comment.
9122         (thread_command): Fix comment.
9123
9124 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9125
9126         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9127         parameter.
9128         * features/aarch64-core.c (create_feature_aarch64_core):
9129         Regenerate.
9130         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9131         Likewise.
9132         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9133         Likewise.
9134         * features/i386/32bit-avx512.c
9135         (create_feature_i386_32bit_avx512): Likewise.
9136         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9137         Likewise.
9138         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9139         Likewise.
9140         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9141         Likewise.
9142         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9143         Likewise.
9144         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9145         Likewise.
9146         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9147         Likewise.
9148         * features/i386/64bit-avx512.c
9149         (create_feature_i386_64bit_avx512): Likewise.
9150         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9151         Likewise.
9152         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9153         Likewise.
9154         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9155         Likewise.
9156         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9157         Likewise.
9158         * features/i386/64bit-segments.c
9159         (create_feature_i386_64bit_segments): Likewise.
9160         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9161         Likewise.
9162         * features/i386/x32-core.c
9163         (create_feature_i386_x32_core): Likewise.
9164         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9165         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9166         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9167         * target-descriptions.c: In generated code, don't pass xml
9168         filename.
9169
9170 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9171
9172         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9173         (print_xml_feature::visit_post): Likewise.
9174         (print_xml_feature::visit): Likewise.
9175         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9176         (print_xml_feature): Add new class.
9177         * regformats/regdat.sh: Null xmltarget on feature targets.
9178         * target-descriptions.c (struct target_desc): Add xmltarget.
9179         (maintenance_check_tdesc_xml_convert): Add unittest function.
9180         (tdesc_get_features_xml): Add function to get xml.
9181         (maintenance_check_xml_descriptions): Test xml generation.
9182         * xml-tdesc.c (string_read_description_xml): Add function.
9183         * xml-tdesc.h (string_read_description_xml): Add declaration.
9184
9185 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9186
9187         * features/Makefile: Add feature marker to targets with new style
9188         target descriptions.
9189         * regformats/aarch64.dat: Regenerate.
9190         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9191         * regformats/i386/amd64-avx-linux.dat: Likewise.
9192         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9193         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9194         * regformats/i386/amd64-linux.dat: Likewise.
9195         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9196         * regformats/i386/amd64.dat: Likewise.
9197         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9198         * regformats/i386/i386-avx-linux.dat: Likewise.
9199         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9200         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9201         * regformats/i386/i386-linux.dat: Likewise.
9202         * regformats/i386/i386-mmx-linux.dat: Likewise.
9203         * regformats/i386/i386-mpx-linux.dat: Likewise.
9204         * regformats/i386/i386.dat: Likewise.
9205         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9206         * regformats/i386/x32-avx-linux.dat: Likewise.
9207         * regformats/i386/x32-linux.dat: Likewise.
9208         * regformats/tic6x-c62x-linux.dat: Likewise.
9209         * regformats/tic6x-c64x-linux.dat: Likewise.
9210         * regformats/tic6x-c64xp-linux.dat: Likewise.
9211         * regformats/regdat.sh: Parse feature marker.
9212
9213 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9214
9215         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9216         (tdesc_osabi_name): Likewise.
9217         * target-descriptions.c (tdesc_architecture_name): Add new
9218         function.
9219         (tdesc_osabi_name): Likewise.
9220
9221 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9222
9223         * common/tdesc.c (tdesc_predefined_type): Move to here.
9224         (tdesc_named_type): Likewise.
9225         (tdesc_create_vector): Likewise.
9226         (tdesc_create_struct): Likewise.
9227         (tdesc_set_struct_size): Likewise.
9228         (tdesc_create_union): Likewise.
9229         (tdesc_create_flags): Likewise.
9230         (tdesc_create_enum): Likewise.
9231         (tdesc_add_field): Likewise.
9232         (tdesc_add_typed_bitfield): Likewise.
9233         (tdesc_add_bitfield): Likewise.
9234         (tdesc_add_flag): Likewise.
9235         (tdesc_add_enum_value): Likewise.
9236         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9237         (struct tdesc_type_vector): Likewise.
9238         (struct tdesc_type_field): Likewise.
9239         (struct tdesc_type_with_fields): Likewise.
9240         (tdesc_create_enum): Add declaration.
9241         (tdesc_add_typed_bitfield): Likewise.
9242         (tdesc_add_enum_value): Likewise.
9243         * target-descriptions.c (tdesc_type_field): Move from here.
9244         (tdesc_type_builtin): Likewise.
9245         (tdesc_type_vector): Likewise.
9246         (tdesc_type_with_fields): Likewise.
9247         (tdesc_predefined_types): Likewise.
9248         (tdesc_named_type): Likewise.
9249         (tdesc_create_vector): Likewise.
9250         (tdesc_create_struct): Likewise.
9251         (tdesc_set_struct_size): Likewise.
9252         (tdesc_create_union): Likewise.
9253         (tdesc_create_flags): Likewise.
9254         (tdesc_create_enum): Likewise.
9255         (tdesc_add_field): Likewise.
9256         (tdesc_add_typed_bitfield): Likewise.
9257         (tdesc_add_bitfield): Likewise.
9258         (tdesc_add_flag): Likewise.
9259         (tdesc_add_enum_value): Likewise.
9260         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9261         (tdesc_add_typed_bitfield): Likewise.
9262         (tdesc_add_enum_value): Likewise.
9263
9264 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9265
9266         * common/tdesc.c (tdesc_feature::accept): Move to here.
9267         (tdesc_feature::operator==): Likewise.
9268         (tdesc_create_reg): Likewise.
9269         * common/tdesc.h (tdesc_type_kind): Likewise.
9270         (struct tdesc_type): Likewise.
9271         (struct tdesc_feature): Likewise.
9272         * regformats/regdat.sh: Create a feature.
9273         * target-descriptions.c (tdesc_type_kind): Move from here.
9274         (tdesc_type): Likewise.
9275         (tdesc_type_up): Likewise.
9276         (tdesc_feature): Likewise.
9277         (tdesc_create_reg): Likewise.
9278
9279 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9280
9281         * Makefile.in: Add arch/tdesc.c
9282         * common/tdesc.c: New file.
9283         * common/tdesc.h (tdesc_element_visitor): Move to here.
9284         (tdesc_element): Likewise.
9285         (tdesc_reg): Likewise.
9286         (tdesc_reg_up): Likewise.
9287         * regformats/regdef.h (reg): Add offset to constructors.
9288         * target-descriptions.c (tdesc_element_visitor): Move from here.
9289         (tdesc_element): Likewise.
9290         (tdesc_reg): Likewise.
9291         (tdesc_reg_up): Likewise.
9292
9293 2018-04-17  Tom Tromey  <tom@tromey.com>
9294
9295         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9296         discriminant field.
9297
9298 2018-04-17  Tom Tromey  <tom@tromey.com>
9299
9300         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9301
9302 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9303
9304         * symtab.c (print_symbol_info): Skip printing filename and line
9305         number when `last' is NULL.
9306         (symtab_symbol_info): Use empty string instead of NULL for first
9307         invocation of print_symbol_info.
9308         (rbreak_command): Pass NULL to `last' parameter of
9309         print_symbol_info.
9310
9311 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9312
9313         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9314         instead of nullptr.
9315
9316 2018-04-16  Pedro Alves  <palves@redhat.com>
9317
9318         * MAINTAINERS (sh): Remove.
9319         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9320         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9321         (ALLDEPFILES): Remove sh64-tdep.c.
9322         * NEWS: Mentions that support for SH-5/SH64 is removed.
9323         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9324         (sh*-*-openbsd*): Ditto.
9325         (sh64-*-elf*): Remove.
9326         (sh*): Remove.
9327         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9328         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9329         * sh-tdep.c: No longer include "sh64-tdep.h".
9330         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9331         * sh64-tdep.c, sh64-tdep.h: Remove files.
9332
9333 2018-04-16  Pedro Alves  <palves@redhat.com>
9334
9335         * MAINTAINERS: Remove m88k.
9336         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9337         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9338         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9339         * NEWS: Mention that support for m88k was removed.
9340         * configure.host (m88*-*-*): Remove support.
9341         * configure.nat (m88k-*-*): Remove support.
9342         * configure.tgt (m88*-*-openbsd*): Remove.
9343         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9344
9345 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9346
9347         * configure.tgt (x86_tobjs): New variable.
9348         (amd64_tobjs, i386_tobjs): Use it.
9349
9350 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9351
9352         * symtab.c (print_symbol_info): Precede the symbol definition by
9353         the line number when available.
9354         * NEWS: Advertise this enhancement.
9355
9356 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9357
9358         * NEWS (New options): announce set/show record btrace cpu.
9359         * btrace.c: Include record-btrace.h.
9360         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9361         the vendor is unknown.
9362         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9363         Maybe overwrite the btrace configuration's cpu.
9364         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9365         (btrace_fetch): Add cpu parameter.  Update callers.
9366         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9367         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9368         errata workarounds if the vendor is unknown.
9369         * python/py-record-btrace.c: Include record-btrace.h.
9370         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9371         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9372         * record-btrace.c (record_btrace_cpu_state_kind): New.
9373         (record_btrace_cpu): New.
9374         (set_record_btrace_cpu_cmdlist): New.
9375         (record_btrace_get_cpu): New.
9376         (require_btrace_thread, record_btrace_info)
9377         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9378         (cmd_set_record_btrace_cpu_none): New.
9379         (cmd_set_record_btrace_cpu_auto): New.
9380         (cmd_set_record_btrace_cpu): New.
9381         (cmd_show_record_btrace_cpu): New.
9382         (_initialize_record_btrace): Initialize set/show record btrace cpu
9383         commands.
9384         * record-btrace.h (record_btrace_get_cpu): New.
9385
9386 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9387
9388         * record.c (set_record_command): Fix typo in message.
9389
9390 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9391
9392         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9393
9394 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9395
9396         * infrun.c (process_event_stop_test): Call
9397         gdbarch_in_indirect_branch_thunk.
9398         * gdbarch.sh (in_indirect_branch_thunk): New.
9399         * gdbarch.c: Regenerated.
9400         * gdbarch.h: Regenerated.
9401         * x86-tdep.h: New.
9402         * x86-tdep.c: New.
9403         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9404         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9405         (ALLDEPFILES): Add x86-tdep.c.
9406         * arch-utils.h (default_in_indirect_branch_thunk): New.
9407         * arch-utils.c (default_in_indirect_branch_thunk): New.
9408         * i386-tdep: Include x86-tdep.h.
9409         (i386_in_indirect_branch_thunk): New.
9410         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9411         function.
9412         * amd64-tdep: Include x86-tdep.h.
9413         (amd64_in_indirect_branch_thunk): New.
9414         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9415
9416 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9417
9418         PR gdb/23053
9419         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9420         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9421         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9422         regression.
9423
9424 2018-04-12  Tom Tromey  <tom@tromey.com>
9425
9426         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9427         (rust_evaluate_subexp): Likewise.
9428
9429 2018-04-12  Pedro Alves  <palves@redhat.com>
9430
9431         * procfs.c (procfs_detach): Make forward declaration's prototype
9432         match definition's protototype.
9433         (proc_get_LDT_entry): Remove stale do_cleanups call.
9434
9435 2018-04-12  Pedro Alves  <palves@redhat.com>
9436
9437         * target.h (target_ops::to_has_exited): Delete.
9438         (target_has_exited): Delete.
9439         * target-delegates.c: Regenerate.
9440
9441 2018-04-11  Pedro Alves  <palves@redhat.com>
9442
9443         * target.c (fileio_fh_t::t): Add comment.
9444         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9445         (target_fileio_close): Handle a NULL target.
9446         (invalidate_fileio_fh): New.
9447         (target_close): Call it.
9448         * remote.c (remote_hostio_send_command): No longer check whether
9449         remote_desc is open.
9450
9451 2018-04-11  Pedro Alves  <palves@redhat.com>
9452
9453         * target.c (fileio_fh_t): Make it a named struct instead of a
9454         typedef.
9455         (fileio_fh_t::is_closed): New method.
9456         (DEF_VEC_O (fileio_fh_t)): Remove.
9457         (fileio_fhandles): Now a std::vector.
9458         (is_closed_fileio_fh): Delete.
9459         (acquire_fileio_fd): Adjust.  Rename parameters.
9460         (release_fileio_fd): Adjust.
9461         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9462         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9463         (target_fileio_close): Adjust.
9464
9465 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9466
9467         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9468         index.
9469
9470 2018-04-10  Pedro Alves  <palves@redhat.com>
9471
9472         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9473         (scoped_finish_thread_state): New class.
9474         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9475         cleanup.
9476         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9477         (fetch_inferior_event, normal_stop): Likewise.
9478         * thread.c (finish_thread_state_cleanup): Delete.
9479
9480 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9481             Pedro Alves  <palves@redhat.com>
9482
9483         * value.c: Include "selftest.h" and "common/array-view.h".
9484         (struct range) <operator ==>: New.
9485         (test_ranges_contain): New.
9486         (check_ranges_vector): New.
9487         (test_insert_into_bit_range_vector): New.
9488         (_initialize_values): Register selftests.
9489         * common/array-view.h (operator==, operator!=): New.
9490
9491 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9492
9493         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9494         an iterator.
9495         * inline-frame.c: Include <algorithm>.
9496         (struct inline_state): Add constructor.
9497         (inline_state_s): Remove.
9498         (DEF_VEC_O(inline_state_s)): Remove.
9499         (inline_states): Change type to std::vector.
9500         (find_inline_frame_state): Adjust to std::vector.
9501         (allocate_inline_frame_state): Remove.
9502         (clear_inline_frame_state): Adjust to std::vector.
9503         (skip_inline_frames): Adjust to std::vector.
9504
9505 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9506
9507         * tracepoint.h (struct trace_state_variable): Add constructor.
9508         <name>: Change type to std::string.
9509         * tracepoint.c (tsv_s): Remove.
9510         (DEF_VEC_O(tsv_s)): Remove.
9511         (tvariables): Change to std::vector.
9512         (create_trace_state_variable): Adjust to std::vector.
9513         (find_trace_state_variable): Likewise.
9514         (find_trace_state_variable_by_number): Likewise.
9515         (delete_trace_state_variable): Likewise.
9516         (trace_variable_command): Adjust to std::string.
9517         (delete_trace_variable_command): Likewise.
9518         (tvariables_info_1): Adjust to std::vector.
9519         (save_trace_state_variables): Likewise.
9520         (start_tracing): Likewise.
9521         (merge_uploaded_trace_state_variables): Adjust to std::vector
9522         and std::string.
9523         * target.h (struct target_ops)
9524         <to_download_trace_state_variable>: Pass reference to
9525         trace_state_variable.
9526         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9527         * target-delegates.c: Re-generate.
9528         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9529         (mi_tsv_deleted): Likewise.
9530         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9531         * remote.c (remote_download_trace_state_variable): Change
9532         pointer to reference and adjust.
9533         * make-target-delegates (parse_argtypes): Handle references.
9534         (write_function_header): Likewise.
9535         (munge_type): Likewise.
9536
9537 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9538
9539         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9540         string_view-selftests.c.
9541         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9542         testsuite.
9543         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9544         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9545         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9546         * unittests/basic_string_view/element_access/char/1.cc:
9547         Likewise.
9548         * unittests/basic_string_view/element_access/char/empty.cc:
9549         Likewise.
9550         * unittests/basic_string_view/element_access/char/front_back.cc:
9551         Likewise.
9552         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9553         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9554         Likewise.
9555         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9556         Likewise.
9557         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9558         Likewise.
9559         * unittests/basic_string_view/operations/compare/char/1.cc:
9560         Likewise.
9561         * unittests/basic_string_view/operations/compare/char/13650.cc:
9562         Likewise.
9563         * unittests/basic_string_view/operations/copy/char/1.cc:
9564         Likewise.
9565         * unittests/basic_string_view/operations/data/char/1.cc:
9566         Likewise.
9567         * unittests/basic_string_view/operations/find/char/1.cc:
9568         Likewise.
9569         * unittests/basic_string_view/operations/find/char/2.cc:
9570         Likewise.
9571         * unittests/basic_string_view/operations/find/char/3.cc:
9572         Likewise.
9573         * unittests/basic_string_view/operations/find/char/4.cc:
9574         Likewise.
9575         * unittests/basic_string_view/operations/rfind/char/1.cc:
9576         Likewise.
9577         * unittests/basic_string_view/operations/rfind/char/2.cc:
9578         Likewise.
9579         * unittests/basic_string_view/operations/rfind/char/3.cc:
9580         Likewise.
9581         * unittests/basic_string_view/operations/substr/char/1.cc:
9582         Likewise.
9583         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9584         * unittests/string_view-selftests.c: New file.
9585
9586 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9587
9588         * unittests/basic_string_view/capacity/1.cc: New file.
9589         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9590         * unittests/basic_string_view/cons/char/1.cc: New file.
9591         * unittests/basic_string_view/cons/char/2.cc: New file.
9592         * unittests/basic_string_view/cons/char/3.cc: New file.
9593         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9594         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9595         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9596         * unittests/basic_string_view/element_access/char/1.cc: New file.
9597         * unittests/basic_string_view/element_access/char/2.cc: New file.
9598         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9599         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9600         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9601         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9602         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9603         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9604         * unittests/basic_string_view/include.cc: New file.
9605         * unittests/basic_string_view/inserters/char/1.cc: New file.
9606         * unittests/basic_string_view/inserters/char/2.cc: New file.
9607         * unittests/basic_string_view/inserters/char/3.cc: New file.
9608         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9609         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9610         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9611         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9612         * unittests/basic_string_view/literals/types.cc: New file.
9613         * unittests/basic_string_view/literals/values.cc: New file.
9614         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9615         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9616         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9617         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9618         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9619         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9620         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9621         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9622         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9623         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9624         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9625         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9626         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9627         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9628         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9629         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9630         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9631         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9632         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9633         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9634         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9635         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9636         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9637         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9638         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9639         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9640         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9641         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9642         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9643         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9644         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9645         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9646         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9647         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9648         * unittests/basic_string_view/operators/char/2.cc: New file.
9649         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9650         * unittests/basic_string_view/range_access/char/1.cc: New file.
9651         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9652         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9653         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9654         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9655         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9656         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9657         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9658         * unittests/basic_string_view/typedefs.cc: New file.
9659         * unittests/basic_string_view/types/1.cc: New file.
9660
9661 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9662
9663         * common/gdb_string_view.h: Remove libstdc++ implementation
9664         details, adjust to gdb reality.
9665         * common/gdb_string_view.tcc: Likewise.
9666         * cli/cli-script.c (struct string_view): Remove.
9667         (user_args) <m_args>: Change element type to gdb::string_view.
9668         (user_args::insert_args): Adjust.
9669
9670 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9671
9672         * common/gdb_string_view.h: New file.
9673         * common/gdb_string_view.tcc: New file.
9674
9675 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9676
9677         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9678         * configure: Re-generate.
9679
9680 2018-04-09  Pedro Alves  <palves@redhat.com>
9681
9682         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9683         (set_target_gdbarch): Call
9684         gdb::observers::architecture_changed.notify instead of
9685         observer_notify_architecture_changed.
9686
9687 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9688
9689         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9690         (do_restore_current_traceframe_cleanup): Remove.
9691         (restore_current_traceframe_cleanup_dtor): Remove.
9692         (make_cleanup_restore_current_traceframe): Remove.
9693         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9694         New.
9695         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9696         * infrun.c (fetch_inferior_event): Use
9697         scoped_restore_current_traceframe.
9698
9699 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9700
9701         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9702         Remove.
9703         <n_allocated_type_units>: Remove.
9704         <all_type_units>: Change to std::vector.
9705         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9706         to std::vector change.
9707         (dwarf2_per_objfile::get_cutu): Likewise.
9708         (dwarf2_per_objfile::get_tu): Likewise.
9709         (create_signatured_type_table_from_index): Likewise.
9710         (create_signatured_type_table_from_debug_names): Likewise.
9711         (dw2_symtab_iter_next): Likewise.
9712         (dw2_print_stats): Likewise.
9713         (dw2_expand_all_symtabs): Likewise.
9714         (dw2_expand_marked_cus): Likewise.
9715         (dw2_debug_names_iterator::next): Likewise.
9716         (dwarf2_initialize_objfile): Likewise.
9717         (add_signatured_type_cu_to_table): Likewise.
9718         (create_all_type_units): Likewise.
9719         (add_type_unit): Likewise.
9720         (struct tu_abbrev_offset): Add constructor.
9721         (build_type_psymtabs_1): Adjust to std::vector change.
9722         (print_tu_stats): Likewise.
9723         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9724         (write_debug_names): Likewise.
9725
9726 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9727
9728         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9729         Make an std::vector.
9730         <n_comp_units>: Remove.
9731         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9732         to std::vector change.
9733         (dwarf2_per_objfile::get_cutu): Likewise.
9734         (dwarf2_per_objfile::get_cu): Likewise.
9735         (create_cus_from_index): Likewise.
9736         (create_addrmap_from_index): Likewise.
9737         (create_addrmap_from_aranges): Likewise.
9738         (dwarf2_read_index): Likewise.
9739         (dw2_find_last_source_symtab): Likewise.
9740         (dw2_map_symtabs_matching_filename): Likewise.
9741         (dw2_symtab_iter_next): Likewise.
9742         (dw2_print_stats): Likewise.
9743         (dw2_expand_all_symtabs): Likewise.
9744         (dw2_expand_symtabs_with_fullname): Likewise.
9745         (dw2_expand_marked_cus): Likewise.
9746         (dw2_map_symbol_filenames): Likewise.
9747         (create_cus_from_debug_names): Likewise.
9748         (dwarf2_read_debug_names): Likewise.
9749         (dw2_debug_names_iterator::next): Likewise.
9750         (dwarf2_initialize_objfile): Likewise.
9751         (set_partial_user): Likewise.
9752         (dwarf2_build_psymtabs_hard): Likewise.
9753         (read_comp_units_from_section): Remove arguments, adjust to
9754         std::vector change.
9755         (create_all_comp_units): Adjust to std::vector and
9756         read_comp_units_from_section changes.
9757         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9758         change.
9759         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9760         (psyms_seen_size): Likewise.
9761         (write_gdbindex): Likewise.
9762         (write_debug_names): Likewise.
9763
9764 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9765
9766         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9767         with dwarf2_per_objfile.
9768         (create_cus_from_index): Likewise.
9769         (create_signatured_type_table_from_index): Likewise.
9770         (dwarf2_read_index): Likewise.
9771         (dwarf2_initialize_objfile): Likewise.
9772         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9773         per_cu rather than get_dwarf2_per_objfile.
9774
9775 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9776
9777         * dwarf2read.h (struct signatured_type): Forward declare.
9778         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9779         New methods.
9780         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9781         (dw2_get_cutu): ...this.
9782         (dwarf2_per_objfile::get_cu): Rename from...
9783         (dw2_get_cu): ...this.
9784         (dwarf2_per_objfile::get_tu): New.
9785         (create_addrmap_from_index): Adjust.
9786         (create_addrmap_from_aranges): Adjust.
9787         (dw2_find_last_source_symtab): Adjust.
9788         (dw2_map_symtabs_matching_filename): Adjust.
9789         (dw2_symtab_iter_next): Adjust.
9790         (dw2_print_stats): Adjust.
9791         (dw2_expand_all_symtabs): Adjust.
9792         (dw2_expand_symtabs_with_fullname): Adjust.
9793         (dw2_expand_marked_cus): Adjust.
9794         (dw_expand_symtabs_matching_file_matcher): Adjust.
9795         (dw2_map_symbol_filenames): Adjust.
9796         (dw2_debug_names_iterator::next): Adjust.
9797         (dwarf2_initialize_objfile): Adjust.
9798         (set_partial_user): Adjust.
9799         (dwarf2_build_psymtabs_hard): Adjust.
9800
9801 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9802
9803         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9804         Remove unused variables.
9805         (dw2_map_symtabs_matching_filename): Likewise.
9806         (dwarf2_record_block_ranges): Likewise.
9807         (dwarf2_read_addr_index): Likewise.
9808         (follow_die_offset): Likewise.
9809
9810 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9811
9812         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9813         to symbol_file_add_main.
9814
9815 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9816
9817         PR mi/22299
9818         * mi/mi-console.c (do_fputc_async_safe): New.
9819         (mi_console_file::write_async_safe): New.
9820         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9821         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9822         New.
9823         * ui-file.c (ui_file::putstrn): Adjust call to
9824         fputstrn_unfiltered.
9825         * utils.c (printchar): Replace do_fputs and do_fprintf
9826         parameters by do_fputc.
9827         (fputstr_filtered): Adjust call to printchar.
9828         (fputstr_unfiltered): Likewise.
9829         (fputstrn_filtered): Likewise.
9830         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9831         printchar.
9832         * utils.h (do_fputc_ftype): New typedef.
9833         (fputstrn_unfiltered): Add do_fputc parameter.
9834
9835 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9836
9837         * regformats/i386/i386-avx.dat: Remove.
9838
9839 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9840
9841         PR gdb/22979
9842         * amd64-tdep.c (amd64_none_init_abi): New function.
9843         (amd64_x32_none_init_abi): New function.
9844         (_initialize_amd64_tdep): Register handlers for x86-64 and
9845         x64_32 with GDB_OSABI_NONE.
9846         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9847         GDB_OSABI_NONE osabi.
9848
9849 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9850
9851         PR gdb/22980
9852         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9853         GDB_OSABI_NONE.
9854         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9855         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9856
9857 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9858
9859         * common/byte-vector.h (char_vector): New type.
9860         * target.h (target_read_alloc): Return
9861         gdb::optional<byte_vector>.
9862         (target_read_stralloc): Return gdb::optional<char_vector>.
9863         (target_get_osdata): Return gdb::optional<char_vector>.
9864         * target.c (target_read_alloc_1): Templatize.  Replacement
9865         manual memory management with vector.
9866         (target_read_alloc): Change return type, adjust.
9867         (target_read_stralloc): Change return type, adjust.
9868         (target_get_osdata): Change return type, adjust.
9869         * auxv.c (struct auxv_info) <length>: Remove.
9870         <data>: Change type to gdb::optional<byte_vector>.
9871         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9872         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9873         (target_auxv_search): Adjust.
9874         (fprint_target_auxv): Adjust.
9875         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9876         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9877         (linux_make_corefile_notes): Adjust.
9878         * osdata.c (get_osdata): Adjust.
9879         * remote.c (remote_get_threads_with_qxfer): Adjust.
9880         (remote_memory_map): Adjust.
9881         (remote_traceframe_info): Adjust.
9882         (btrace_read_config): Adjust.
9883         (remote_read_btrace): Adjust.
9884         (remote_pid_to_exec_file): Adjust.
9885         * solib-aix.c (solib_aix_get_library_list): Adjust.
9886         * solib-dsbt.c (decode_loadmap): Don't free buf.
9887         (dsbt_get_initial_loadmaps): Adjust.
9888         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9889         * solib-target.c (solib_target_current_sos): Adjust.
9890         * tracepoint.c (sdata_make_value): Adjust.
9891         * xml-support.c (xinclude_start_include): Adjust.
9892         (xml_fetch_content_from_file): Adjust.
9893         * xml-support.h (xml_fetch_another): Change return type.
9894         (xml_fetch_content_from_file): Change return type.
9895         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9896         * xml-tdesc.c (file_read_description_xml): Adjust.
9897         (fetch_available_features_from_target): Change return type.
9898         (target_fetch_description_xml): Adjust.
9899         (target_read_description_xml): Adjust.
9900
9901 2018-04-06  Tom Tromey  <tom@tromey.com>
9902
9903         * value.c (~value): Update.
9904         (struct value) <contents>: Now unique_xmalloc_ptr.
9905         (value_contents_bits_eq, allocate_value_contents)
9906         (value_contents_raw, value_contents_all_raw)
9907         (value_contents_for_printing, value_contents_for_printing_const)
9908         (set_value_enclosing_type): Update.
9909
9910 2018-04-06  Tom Tromey  <tom@tromey.com>
9911
9912         * value.c (range_s): Remove typedef, VEC.
9913         (struct range): Add operator<.
9914         (range_lessthan): Remove.
9915         (ranges_contain): Change type.
9916         (~value): Update.
9917         (struct value) <unavailable, optimized_out>: Now std::vector.
9918         (value_entirely_available)
9919         (value_entirely_covered_by_range_vector)
9920         (value_entirely_unavailable, value_entirely_optimized_out):
9921         Update.
9922         (insert_into_bit_range_vector): Change argument type.
9923         (find_first_range_overlap): Likewise.
9924         (struct ranges_and_idx, value_contents_bits_eq)
9925         (require_not_optimized_out, require_available): Update.
9926         (ranges_copy_adjusted): Change argument types.
9927         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9928
9929 2018-04-06  Tom Tromey  <tom@tromey.com>
9930
9931         * value.c (~value): Update.
9932         (struct value) <parent>: Now a value_ref_ptr.
9933         (value_parent, set_value_parent, value_address, value_copy):
9934         Update.
9935
9936 2018-04-06  Tom Tromey  <tom@tromey.com>
9937
9938         * value.c (struct value): Add constructor, destructor, and member
9939         initializers.
9940         (allocate_value_lazy, value_decref): Update.
9941
9942 2018-04-06  Tom Tromey  <tom@tromey.com>
9943
9944         * value.c (struct value) <released, next>: Remove.
9945         (all_values): Now a std::vector.
9946         (allocate_value_lazy): Update.
9947         (value_next): Remove.
9948         (value_mark, value_free_to_mark, release_value)
9949         (value_release_to_mark): Update.
9950
9951 2018-04-06  Tom Tromey  <tom@tromey.com>
9952
9953         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9954         (free_value_chain): Remove.
9955         * value.c (free_value_chain): Remove.
9956         (value_release_to_mark): Return a std::vector.
9957         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9958         std::vector.
9959         (check_condition): Update.
9960         * eval.c (fetch_subexp_value): Change "val_chain" to a
9961         std::vector.
9962         * breakpoint.c (update_watchpoint): Update.
9963         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9964
9965 2018-04-06  Tom Tromey  <tom@tromey.com>
9966
9967         * value.h (free_all_values): Remove.
9968         * value.c (free_all_values): Remove.
9969
9970 2018-04-06  Tom Tromey  <tom@tromey.com>
9971
9972         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9973         (value_history_chain, value_history_count): Remove.
9974         (value_history): New global.
9975         (record_latest_value, access_value_history, show_values)
9976         (preserve_values): Update.
9977
9978 2018-04-06  Tom Tromey  <tom@tromey.com>
9979
9980         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9981         * varobj.c (varobj_set_display_format, varobj_set_value)
9982         (install_default_visualizer, construct_visualizer)
9983         (install_new_value, ~varobj, varobj_get_value_type)
9984         (my_value_of_variable, varobj_editable_p): Update.
9985         * c-varobj.c (c_describe_child, c_value_of_variable)
9986         (cplus_number_of_children, cplus_describe_child): Update.
9987         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9988         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9989         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9990
9991 2018-04-06  Tom Tromey  <tom@tromey.com>
9992
9993         * printcmd.c (last_examine_address): Change type to
9994         value_ref_ptr.
9995         (do_examine, x_command): Update.
9996
9997 2018-04-06  Tom Tromey  <tom@tromey.com>
9998
9999         * value.c (release_value): Update.
10000         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10001         (struct bpstats) <val>: Now a value_ref_ptr.
10002         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10003         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10004         (~watchpoint, print_it_watchpoint, watch_command_1)
10005         (invalidate_bp_value_on_memory_change): Update.
10006
10007 2018-04-06  Tom Tromey  <tom@tromey.com>
10008
10009         * varobj.c (varobj_clear_saved_item)
10010         (update_dynamic_varobj_children, install_new_value, ~varobj):
10011         Update.
10012         * value.h (value_incref): Move declaration earlier.
10013         (value_decref): Rename from value_free.
10014         (struct value_ref_policy): New.
10015         (value_ref_ptr): New typedef.
10016         (struct value_deleter): Remove.
10017         (gdb_value_up): Remove typedef.
10018         (release_value): Change return type.
10019         (release_value_or_incref): Remove.
10020         * value.c (set_value_parent): Update.
10021         (value_incref): Change return type.
10022         (value_decref): Rename from value_free.
10023         (value_free_to_mark, free_all_values, free_value_chain): Update.
10024         (release_value): Return value_ref_ptr.
10025         (release_value_or_incref): Remove.
10026         (record_latest_value, set_internalvar, clear_internalvar):
10027         Update.
10028         * stack.c (info_frame_command): Don't call value_free.
10029         * python/py-value.c (valpy_dealloc, valpy_new)
10030         (value_to_value_object): Update.
10031         * printcmd.c (do_examine): Update.
10032         * opencl-lang.c (lval_func_free_closure): Update.
10033         * mi/mi-main.c (register_changed_p): Don't call value_free.
10034         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10035         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10036         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10037         value_free.
10038         * guile/scm-value.c (vlscm_free_value_smob)
10039         (vlscm_scm_from_value): Update.
10040         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10041         (frame_unwind_register_unsigned, get_frame_register_bytes)
10042         (put_frame_register_bytes): Don't call value_free.
10043         * findvar.c (address_from_register): Don't call value_free.
10044         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10045         * dwarf2loc.c (entry_data_value_free_closure)
10046         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10047         (dwarf2_evaluate_loc_desc_full): Update.
10048         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10049         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10050         (~watchpoint, watch_command_1)
10051         (invalidate_bp_value_on_memory_change): Update.
10052         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10053
10054 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10055
10056         PR gdb/23022
10057         * warning.m4: Add -Wno-error=deprecated-register.
10058         * configure: Re-generate.
10059
10060 2018-04-05  Tom Tromey  <tom@tromey.com>
10061
10062         * linespec.h: Remove include of "vec.h".
10063
10064 2018-04-05  Tom Tromey  <tom@tromey.com>
10065
10066         * linespec.c (typep): Remove typedef.
10067         (find_methods, find_superclass_methods): Take a std::vector.
10068         (find_method): Use std::vector.
10069
10070 2018-04-05  Tom Tromey  <tom@tromey.com>
10071
10072         * utils.c (compare_strings): Remove.
10073         * utils.h (compare_strings): Remove.
10074         * objc-lang.h (find_imps): Update.
10075         * objc-lang.c (find_methods): Take a std::vector.
10076         (uniquify_strings, find_imps): Likewise.
10077         * linespec.c (find_methods): Take a std::vector.
10078         (decode_objc): Use std::vector.
10079         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10080         a std::vector.
10081         (find_method, find_function_symbols): Use std::vector.
10082
10083 2018-04-05  Tom Tromey  <tom@tromey.com>
10084
10085         * completer.c (completion_tracker::completion_tracker): Remove
10086         cast.
10087         (completion_tracker::discard_completions): Likewise.
10088         * breakpoint.c (ambiguous_names_p): Remove cast.
10089         * ada-lang.c (_initialize_ada_language): Remove cast.
10090         * utils.h (streq): Update.
10091         (streq_hash): Add new declaration.
10092         * utils.c (streq): Return bool.
10093         (streq_hash): New function.
10094
10095 2018-04-05  Tom Tromey  <tom@tromey.com>
10096
10097         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10098         Remove a string copy.
10099
10100 2018-04-05  Tom Tromey  <tom@tromey.com>
10101
10102         * linespec.c (filter_results): Use std::vector.
10103         (decode_line_2, decode_line_full): Update.
10104
10105 2018-04-05  Tom Tromey  <tom@tromey.com>
10106
10107         * linespec.c (canonical_to_fullform): Return std::string.
10108         (filter_results): Update.
10109         (struct decode_line_2_item): Add constructor.
10110         <fullform, displayform>: Now std::string.
10111         (decode_line_2_compare_items): Now a std::sort comparator.
10112         (decode_line_2): Update.
10113
10114 2018-04-05  Tom Tromey  <tom@tromey.com>
10115
10116         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10117         (unexpected_linespec_error): Update.
10118         (linespec_parse_basic, parse_linespec): Update.
10119
10120 2018-04-05  Tom Tromey  <tom@tromey.com>
10121
10122         * linespec.c (linespec_parse_basic): Reindent.
10123
10124 2018-04-05  Tom Tromey  <tom@tromey.com>
10125
10126         * minsyms.h (iterate_over_minimal_symbols): Update.
10127         * minsyms.c (iterate_over_minimal_symbols): Take a
10128         gdb::function_view.
10129         * linespec.c (struct collect_minsyms): Remove.
10130         (compare_msyms): Now a std::sort comparator.
10131         (add_minsym): Add parameters.
10132         (search_minsyms_for_name): Update.  Use std::vector.
10133
10134 2018-04-03  Tom Tromey  <tom@tromey.com>
10135
10136         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10137         gdb::byte_vector.
10138
10139 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10140
10141         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10142
10143 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10144
10145         PR gdb/16959
10146         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10147         printing static type.
10148
10149 2018-04-01  Tom Tromey  <tom@tromey.com>
10150
10151         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10152         (rs6000_xfer_shared_libraries): Update.
10153
10154 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10155
10156         * common/gdb_vecs.h (char_ptr): Remove.
10157         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10158
10159 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10160
10161         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10162         with std::vector.
10163         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10164
10165 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10166
10167         * tracepoint.h (struct uploaded_tp): Initialize fields.
10168         <actions, step_actions, cmd_strings>: Change type to
10169         std::vector<char *>.
10170         * tracepoint.c (get_uploaded_tp): Allocate with new.
10171         (free_uploaded_tps): Free with delete.
10172         (parse_tracepoint_definition): Adjust to std::vector change.
10173         * breakpoint.c (read_uploaded_action): Likewise.
10174         (create_tracepoint_from_upload): Likewise.
10175         * ctf.c (ctf_write_uploaded_tp): Likewise.
10176         (SET_ARRAY_FIELD): Likewise.
10177         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10178
10179 2018-03-30  Tom Tromey  <tom@tromey.com>
10180
10181         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10182         std::unique_ptr.
10183         (svr4_keep_data_in_core): Update.
10184         (svr4_read_so_list): Update.
10185
10186 2018-03-30  Tom Tromey  <tom@tromey.com>
10187
10188         * windows-nat.c (handle_output_debug_string, handle_exception):
10189         Update.
10190         * target.h (target_read_string): Update.
10191         * target.c (target_read_string): Change "string" to
10192         unique_xmalloc_ptr.
10193         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10194         Update.
10195         * solib-frv.c (frv_current_sos): Update.
10196         * solib-dsbt.c (dsbt_current_sos): Update.
10197         * solib-darwin.c (darwin_current_sos): Update.
10198         * linux-thread-db.c (inferior_has_bug): Update.
10199         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10200         Update.  Remove alloca.
10201         * ada-lang.c (ada_main_name): Update.
10202
10203 2018-03-30  Tom Tromey  <tom@tromey.com>
10204
10205         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10206         (struct dwo_file_deleter): New.
10207         (dwo_file_up): New typedef.
10208         (open_and_init_dwo_file): Use dwo_file_up.
10209         (free_dwo_file_cleanup): Remove.
10210
10211 2018-03-30  Tom Tromey  <tom@tromey.com>
10212
10213         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10214         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10215
10216 2018-03-30  Tom Tromey  <tom@tromey.com>
10217
10218         * dwarf2read.c (class free_cached_comp_units): New class.
10219         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10220         (free_cached_comp_units): Remove function.
10221
10222 2018-03-30  Tom Tromey  <tom@tromey.com>
10223
10224         * utils.h (make_cleanup_unpush_target): Remove.
10225         * inf-ptrace.c (struct target_unpusher): New.
10226         (target_unpush_up) New typedef.
10227         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10228         target_unpush_up.
10229         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10230
10231 2018-03-27  Tom Tromey  <tom@tromey.com>
10232
10233         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10234
10235 2018-03-27  Pedro Alves  <palves@redhat.com>
10236             Tom Tromey  <tom@tromey.com>
10237
10238         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10239         destructor.  Now a class.
10240         (gdb_readline_wrapper_cleanup): Remove function.
10241         (gdb_readline_wrapper): Remove cleanups.
10242
10243 2018-03-27  Tom Tromey  <tom@tromey.com>
10244
10245         * typeprint.h (struct type_print_options) <local_typedefs,
10246         global_typedefs>: Remove "struct" keyword.
10247         (class typedef_hash_table): New class.
10248         (recursively_update_typedef_hash, add_template_parameters)
10249         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10250         (find_typedef_in_hash): Don't declare.
10251         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10252         (typedef_hash_table::recursively_update): Rename from
10253         recursively_update_typedef_hash.  Now a member.
10254         (typedef_hash_table::add_template_parameters): Rename from
10255         add_template_parameters.  Now a member.
10256         (typedef_hash_table::typedef_hash_table): Now a constructor;
10257         rename from create_typedef_hash.
10258         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10259         rename from free_typedef_hash.
10260         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10261         (do_free_global_table): Remove.
10262         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10263         from copy_type_recursive.
10264         (create_global_typedef_table): Remove.
10265         (typedef_hash_table::find_global_typedef): Now a member of
10266         typedef_hash_table.
10267         (typedef_hash_table::find_typedef): Rename from
10268         find_typedef_in_hash; now a member.
10269         (whatis_exp): Update.
10270         * extension.h (struct ext_lang_type_printers): Add constructor and
10271         destructor.
10272         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10273         declare.
10274         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10275         Now a constructor; rename from start_ext_lang_type_printers.
10276         (ext_lang_type_printers): Now a destructor; rename from
10277         free_ext_lang_type_printers.
10278         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10279         Update.
10280         (c_type_print_base_struct_union): Update.  Remove cleanups.
10281
10282 2018-03-27  Tom Tromey  <tom@tromey.com>
10283
10284         * dwarf-index-write.c: Include <cmath>.
10285
10286 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10287
10288         * NEWS: Add entry describing new "set|show varsize-limit" command.
10289         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10290         command.
10291         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10292         "set variable".
10293
10294 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10295
10296         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10297         dwarf-index-write.c
10298         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10299         * dwarf-index-common.c: New file.
10300         * dwarf-index-common.h: New file.
10301         * dwarf-index-write.c: New file.
10302         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10303         (struct dwarf2_section_info): Move from here.
10304         (dwarf2_section_info_def): Likewise.
10305         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10306         (offset_type): Likewise.
10307         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10308         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10309         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10310         (byte_swap): Likewise.
10311         (MAYBE_SWAP): Likewise.
10312         (dwarf2_per_cu_ptr): Likewise.
10313         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10314         (struct tu_stats): Likewise.
10315         (struct dwarf2_per_objfile): Likewise.
10316         (struct dwarf2_per_cu_data): Likewise.
10317         (struct signatured_type): Likewise.
10318         (sig_type_ptr): Likewise.
10319         (DEF_VEC_P (sig_type_ptr)): Likewise.
10320         (INDEX4_SUFFIX): Likewise.
10321         (INDEX5_SUFFIX): Likewise.
10322         (DEBUG_STR_SUFFIX): Likewise.
10323         (dwarf2_read_section): Make non-static.
10324         (mapped_index_string_hash): Move from here.
10325         (dwarf5_djb_hash): Likewise.
10326         (file_write): Likewise.
10327         (class data_buf): Likewise.
10328         (struct symtab_index_entry): Likewise.
10329         (struct mapped_symtab): Likewise.
10330         (find_slot): Likewise.
10331         (hash_expand): Likewise.
10332         (add_index_entry): Likewise.
10333         (uniquify_cu_indices): Likewise.
10334         (class c_str_view): Likewise.
10335         (class c_str_view_hasher): Likewise.
10336         (class vector_hasher): Likewise.
10337         (write_hash_table): Likewise.
10338         (psym_index_map): Likewise.
10339         (struct addrmap_index_data): Likewise.
10340         (add_address_entry): Likewise.
10341         (add_address_entry_worker): Likewise.
10342         (write_address_map): Likewise.
10343         (symbol_kind): Likewise.
10344         (write_psymbols): Likewise.
10345         (struct signatured_type_index_data): Likewise.
10346         (write_one_signatured_type): Likewise.
10347         (recursively_count_psymbols): Likewise.
10348         (recursively_write_psymbols): Likewise.
10349         (class debug_names): Likewise.
10350         (check_dwarf64_offsets): Likewise.
10351         (psyms_seen_size): Likewise.
10352         (write_gdbindex): Likewise.
10353         (write_debug_names): Likewise.
10354         (assert_file_size): Likewise.
10355         (write_psymtabs_to_index): Likewise.
10356         (save_gdb_index_command): Likewise.
10357         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10358         command.
10359         * dwarf2read.h: New file.
10360
10361 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10362
10363         PR gdb/22670
10364         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10365         symbol name if the CU's language stores symbol names in linkage
10366         format.
10367         * language.h (struct language_defn)
10368         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10369         all instances of this struct.
10370
10371 2018-03-26  Tom Tromey  <tom@tromey.com>
10372
10373         * stack.c (backtrace_command_1): Remove verbose code.
10374
10375 2018-03-26  Tom Tromey  <tom@tromey.com>
10376
10377         * python/py-framefilter.c (py_print_type): Don't catch
10378         exceptions.  Return void.
10379         (py_print_value): Likewise.
10380         (py_print_single_arg): Likewise.
10381         (enumerate_args): Don't catch exceptions.
10382         (py_print_args): Likewise.
10383         (py_print_frame): Likewise.
10384         (gdbpy_apply_frame_filter): Catch exceptions here.
10385
10386 2018-03-26  Tom Tromey  <tom@tromey.com>
10387
10388         * stack.c (_initialize_stack): Remove trailing newlines from help
10389         text.  Add "Usage" line to "backtrace" help.
10390
10391 2018-03-26  Tom Tromey  <tom@tromey.com>
10392
10393         PR python/16486:
10394         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10395
10396 2018-03-26  Tom Tromey  <tom@tromey.com>
10397
10398         * python/py-framefilter.c (py_print_single_arg): Return
10399         EXT_LANG_BT_ERROR from catch.
10400
10401 2018-03-26  Tom Tromey  <tom@tromey.com>
10402
10403         PR backtrace/15584:
10404         * stack.c (backtrace_command_1): Move some code into no-filters
10405         "if".
10406
10407 2018-03-26  Tom Tromey  <tom@tromey.com>
10408
10409         * python/py-framefilter.c (throw_quit_or_print_exception): New
10410         function.
10411         (gdbpy_apply_frame_filter): Use it.
10412
10413 2018-03-26  Tom Tromey  <tom@tromey.com>
10414
10415         PR cli/17716:
10416         * python/py-framefilter.c (py_print_type, py_print_value)
10417         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10418         RETURN_MASK_ERROR.
10419
10420 2018-03-26  Tom Tromey  <tom@tromey.com>
10421
10422         * python/py-framefilter.c (enumerate_args): Use
10423         gdb::unique_xmalloc_ptr.
10424
10425 2018-03-26  Tom Tromey  <tom@tromey.com>
10426
10427         * python/py-framefilter.c (py_print_frame): Return
10428         EXT_LANG_BT_OK.
10429         (gdbpy_apply_frame_filter): Update comment.
10430         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10431         Remove.
10432         <EXT_LANG_BT_NO_FILTERS>: Change value.
10433
10434 2018-03-26  Tom Tromey  <tom@tromey.com>
10435
10436         PR backtrace/15582:
10437         * stack.c (backtrace_command): Parse "hide" argument.
10438         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10439         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10440         constant.
10441
10442 2018-03-26  Tom Tromey  <tom@tromey.com>
10443
10444         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10445         add "flags".
10446         (backtrace_command): Remove "fulltrace", add "flags".
10447
10448 2018-03-26  Tom Tromey  <tom@tromey.com>
10449
10450         * stack.c (backtrace_command): Rewrite command line parsing.
10451
10452 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10453
10454         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10455
10456 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10457
10458         * filename-seen-cache.h: Add include guard.
10459
10460 2018-03-26  Keith Seitz  <keiths@redhat.com>
10461
10462         * symfile.c (place_section): Remove "struct" from section_addr_info
10463         in comment.
10464         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10465         "struct" keyword from section_addr_info.
10466
10467 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10468
10469         * regformats/regdef.h (reg): Add constructors.
10470
10471 2018-03-25  Pedro Alves  <palves@redhat.com>
10472
10473         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10474         if then/else bodies in var_func_name extraction.
10475
10476 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10477
10478         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10479         lookup_minimal_symbol() to find symbol entry.
10480         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10481
10482 2018-03-23  Keith Seitz  <keiths@redhat.com>
10483
10484         PR c++/22968
10485         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10486         nested type definitions for C++, too.
10487
10488 2018-03-23  Tom Tromey  <tom@tromey.com>
10489
10490         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10491         a typedef.
10492         (macho_register_oso): Remove.
10493         (macho_symtab_read): Take a std::vector.
10494         (oso_el_compare_name): Now a std::sort comparator.
10495         (macho_symfile_read_all_oso): Take a std::vector.
10496         (macho_symfile_read): Use std::vector.  Remove cleanups.
10497
10498 2018-03-22  Tom Tromey  <tom@tromey.com>
10499
10500         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10501         (record_full_goto_bookmark): Use std::string.
10502
10503 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10504
10505         PR tdep/18295
10506         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10507         a single mask.
10508
10509 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10510
10511         * rs6000-tdep.c (store_insn_p): New function.
10512         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10513         and cr_reg to their unshifted values. Use store_insn_p to
10514         match LR saves using either R1 or fdata->alloca_reg. Use
10515         store_insn_p to match CR saves. Set alloca_reg_offset
10516         when alloca_reg and framep are set. Remove lr_reg shift
10517         when assigning to fdata->lr_register.
10518
10519 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10520
10521         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10522         command line args instead of emitting a warning.
10523
10524 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10525
10526         * tracepoint.h (struct static_tracepoint_marker): Initialize
10527         fields, define default constructor, move constructor and move
10528         assignment, disable the rest.
10529         <str_id, extra>: Make std::string.
10530         (release_static_tracepoint_marker): Remove.
10531         (free_current_marker): Remove.
10532         * tracepoint.c (free_current_marker): Remove.
10533         (parse_static_tracepoint_marker_definition): Adjust to
10534         std::string, use new hex2str overload.
10535         (release_static_tracepoint_marker): Remove.
10536         (print_one_static_tracepoint_marker): Get marker by reference
10537         and adjust to std::string.
10538         (info_static_tracepoint_markers_command): Adjust to std::vector
10539         changes
10540         * target.h (static_tracepoint_marker_p): Remove typedef.
10541         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10542         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10543         bool.
10544         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10545         * target-debug.h
10546         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10547         (target_debug_print_std_vector_static_tracepoint_marker): New.
10548         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10549         to...
10550         (target_debug_print_static_tracepoint_marker_p): ... this.
10551         * target-delegates.c: Re-generate.
10552         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10553         Make std::string.
10554         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10555         (decode_static_tracepoint_spec): Adjust to std::vector.
10556         (tracepoint_print_one_detail): Adjust to std::string.
10557         (strace_marker_decode_location): Adjust to std::string.
10558         (update_static_tracepoint): Adjust to std::string, remove call
10559         to release_static_tracepoint_marker.
10560         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10561         Adjust to std::vector.
10562         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10563         (remote_static_tracepoint_markers_by_strid): Adjust to
10564         std::vector.
10565         * common/rsp-low.h (hex2str): New overload with explicit count
10566         of bytes.
10567         * common/rsp-low.c (hex2str): New overload with explicit count
10568         of bytes.
10569         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10570         (_initialize_rsp_low_selftests): Add test_hex2str test.
10571         * unittests/tracepoint-selftests.c
10572         (test_parse_static_tracepoint_marker_definition): Adjust to
10573         std::string.
10574
10575 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10576
10577         * tracepoint.c (parse_static_tracepoint_marker_definition):
10578         Consider case where the definition is followed by more
10579         definitions.
10580         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10581         tracepoint-selftests.c.
10582         * unittests/tracepoint-selftests.c: New.
10583
10584 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10585
10586         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10587         Carvalho.
10588
10589 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10590
10591         * symtab.c (find_pc_sect_line): fixed indentation.
10592
10593 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10594
10595         * symtab.c (find_pc_sect_line): now uses binary search.
10596
10597 2018-03-19  Tom Tromey  <tom@tromey.com>
10598
10599         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10600         "IDENT" production.
10601
10602 2018-03-19  Pedro Alves  <palves@redhat.com>
10603             Tom Tromey  <tom@tromey.com>
10604
10605         * unittests/observable-selftests.c: New file.
10606         * common/observable.h: New file.
10607         * observable.h: New file.
10608         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10609         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10610         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10611         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10612         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10613         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10614         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10615         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10616         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10617         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10618         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10619         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10620         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10621         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10622         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10623         tui/tui-interp.c, valops.c: Update all users.
10624         * tui/tui-hooks.c (tui_bp_created_observer)
10625         (tui_bp_deleted_observer, tui_bp_modified_observer)
10626         (tui_inferior_exit_observer, tui_before_prompt_observer)
10627         (tui_normal_stop_observer, tui_register_changed_observer):
10628         Remove.
10629         (tui_observers_token): New global.
10630         (attach_or_detach, tui_attach_detach_observers): New functions.
10631         (tui_install_hooks, tui_remove_hooks): Use
10632         tui_attach_detach_observers.
10633         * record-btrace.c (record_btrace_thread_observer): Remove.
10634         (record_btrace_thread_observer_token): New global.
10635         * observer.sh: Remove.
10636         * observer.c: Rename to observable.c.
10637         * observable.c (namespace gdb_observers): Define new objects.
10638         (observer_debug): Move into gdb_observers namespace.
10639         (struct observer, struct observer_list, xalloc_observer_list_node)
10640         (xfree_observer_list_node, generic_observer_attach)
10641         (generic_observer_detach, generic_observer_notify): Remove.
10642         (_initialize_observer): Update.
10643         Don't include observer.inc.
10644         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10645         (clean mostlyclean): Likewise.
10646         (observer.h, observer.inc): Remove targets.
10647         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10648         (COMMON_SFILES): Use observable.c, not observer.c.
10649         * .gitignore: Remove observer.h.
10650
10651 2018-03-18  Tom Tromey  <tom@tromey.com>
10652
10653         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10654         gdb::def_vector.
10655         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10656
10657 2018-03-17  Tom Tromey  <tom@tromey.com>
10658
10659         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10660
10661 2018-03-17  Tom Tromey  <tom@tromey.com>
10662
10663         * target.c (class scoped_target_fd): New.
10664         (target_fileio_close_cleanup): Remove.
10665         (target_fileio_read_alloc_1): Use scoped_target_fd.
10666
10667 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10668
10669         * silent-rules.mk: New.
10670         * Makefile.in: Include silent-rules.mk
10671         (srcdir, VPATH, top_srcdir): Move up.
10672         (COMPILE): Add ECHO_CXX.
10673         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10674         (init.c): Add ECHO_INIT_C.
10675         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10676         (version.c): Add ECHO_GEN.
10677         (printcmd.o): Add ECHO_CXX.
10678         (target-float.o): Add ECHO_CXX.
10679         (ada-exp.o): Add ECHO_CXX.
10680         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10681         (insight$(EXEEXT)): Add ECHO_CXXLD.
10682         * gnulib/configure.ac: Add AM_SILENT_RULES.
10683         * gnulib/aclocal.m4: Re-generate.
10684         * gnulib/configure: Re-generate.
10685         * gnulib/import/Makefile.in: Re-generate.
10686
10687 2018-03-16  Tom Tromey  <tom@tromey.com>
10688
10689         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10690         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10691         * utils.c (do_free_section_addr_info)
10692         (make_cleanup_free_section_addr_info): Remove.
10693         * symfile.h (struct other_sections): Add constructor.
10694         (struct section_addr_info): Remove.
10695         (section_addr_info): New typedef.
10696         (struct sym_fns) <sym_offsets>: Change type of parameter.
10697         (build_section_addr_info_from_objfile)
10698         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10699         (default_symfile_offsets, symbol_file_add)
10700         (symbol_file_add_from_bfd)
10701         (build_section_addr_info_from_section_table): Update.
10702         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10703         * symfile.c (alloc_section_addr_info): Remove.
10704         (build_section_addr_info_from_section_table): Change return type.
10705         Update.
10706         (build_section_addr_info_from_bfd)
10707         (build_section_addr_info_from_objfile): Likewise.
10708         (free_section_addr_info): Remove.
10709         (relative_addr_info_to_section_offsets): Change type of "addrs".
10710         (addrs_section_compar): Now a std::sort comparator.
10711         (addrs_section_sort): Change return type.
10712         (addr_info_make_relative): Change type of "addrs".  Update.
10713         (default_symfile_offsets, syms_from_objfile_1)
10714         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10715         (symbol_file_add_separate): Update.
10716         (symbol_file_add): Change type of "addrs".  Update.
10717         (add_symbol_file_command): Update.  Remove cleanups.
10718         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10719         cleanups.
10720         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10721         * solib.c (solib_read_symbols): Update.
10722         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10723         * machoread.c (macho_symfile_offsets): Update.
10724         * jit.c (jit_bfd_try_read_symtab): Update.
10725
10726 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10727
10728         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10729         unittests/utils-selftests.c.
10730         * unittests/utils-selftests.c: New file.
10731
10732 2018-03-14  Tom Tromey  <tom@tromey.com>
10733
10734         PR cli/14977:
10735         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10736         for NULL.
10737
10738 2018-03-14  Tom Tromey  <tom@tromey.com>
10739
10740         PR cli/19918:
10741         * printcmd.c (printf_pointer): Allow "-" in format.
10742
10743 2018-03-14  Tom Tromey  <tom@tromey.com>
10744
10745         * printcmd.c (_initialize_printcmd): Add usage to printf.
10746
10747 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10748
10749         * MAINTAINERS: Update my email address.
10750
10751 2018-03-13  Tom Tromey  <tom@tromey.com>
10752
10753         * machoread.c (macho_check_dsym): Change filenamep to a
10754         std::string*.
10755         (macho_symfile_read): Update.
10756         * symfile.c (load_command): Use std::string.
10757
10758 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10759
10760         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10761         to error message string.
10762         (riscv_register_name): Use xsnprintf instead of sprintf.
10763         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10764         internal_error.
10765         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10766         error.
10767         (riscv_push_dummy_call): Likewise.
10768
10769 2018-03-12  Tom Tromey  <tom@tromey.com>
10770
10771         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10772         Use gdb::byte_vector.
10773         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10774
10775 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10776
10777         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10778         parameter type to readable_regcache.
10779         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10780         the declaration.
10781
10782 2018-03-11  Tom Tromey  <tom@tromey.com>
10783
10784         * dwarf2read.c (struct nextfield): Add initializers.
10785         (struct nextfnfield): Remove.
10786         (struct fnfieldlist): Add initializers.  Remove "length" and
10787         "head", use std::vector.
10788         (struct decl_field_list): Remove.
10789         (struct field_info): Add initializers.
10790         <fields, baseclasses>: Now std::vector.
10791         <nbaseclasses, nfnfields, typedef_field_list_count,
10792         nested_types_list_count>: Remove.
10793         (dwarf2_add_field, dwarf2_add_type_defn)
10794         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10795         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10796         (process_structure_scope): Update.
10797
10798 2018-03-11  Tom Tromey  <tom@tromey.com>
10799
10800         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10801         for use by std::sort.
10802         (build_type_psymtabs_1): Use std::vector.
10803
10804 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10805
10806         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10807         and LIBMPFR in the printed configuration.
10808
10809 2018-03-08  Tom Tromey  <tom@tromey.com>
10810
10811         * source.c (get_filename_and_charpos): Use scoped_fd.
10812         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10813         (procfs_pidlist): Likewise.
10814         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10815         (iterate_over_mappings): Likewise.
10816
10817 2018-03-08  Tom Tromey  <tom@tromey.com>
10818
10819         * infcall.c (struct call_return_meta_info)
10820         <stack_temporaries_enabled>: Remove.
10821         (get_call_return_value, call_function_by_hand_dummy): Update.
10822         * thread.c (disable_thread_stack_temporaries): Remove.
10823         (enable_thread_stack_temporaries): Remove.
10824         (thread_stack_temporaries_enabled_p): Return bool.
10825         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10826         (get_last_thread_stack_temporary): Update.
10827         * eval.c (evaluate_subexp): Update.
10828         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10829         class, not a function.
10830         (value_ptr, value_vec): Remove typedefs.
10831         (class thread_info) <stack_temporaries_enabled>: Now bool.
10832         <stack_temporaries>: Now a std::vector.
10833         (thread_stack_temporaries_enabled_p)
10834         (value_in_thread_stack_temporaries): Return bool.
10835
10836 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10837
10838         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10839         (getpkt_or_notif_sane_1): Likewise.
10840
10841 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10842
10843         * build-id.c (build_id_to_debug_bfd): Use std::string.
10844
10845 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10846
10847         * build-id.c (find_separate_debug_file_by_buildid): Return
10848         std::string.
10849         * build-id.h (find_separate_debug_file_by_buildid): Return
10850         std::string.
10851         * coffread.c (coff_symfile_read): Adjust to std::string.
10852         * elfread.c (elf_symfile_read): Adjust to std::string.
10853         * symfile.c (separate_debug_file_exists): Change parameter to
10854         std::string.
10855         (find_separate_debug_file): Return std::string.
10856         (find_separate_debug_file_by_debuglink): Return std::string.
10857         * symfile.h (find_separate_debug_file_by_debuglink): Return
10858         std::string.
10859
10860 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10861
10862         * common/xml-utils.c (xml_escape_text): Move code to...
10863         (xml_escape_text_append): ... this new function.
10864         * common/xml-utils.h (xml_escape_text_append): New declaration.
10865         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10866         New function.
10867         (_initialize_xml_utils): register test_xml_escape_text_append as
10868         a selftest.
10869
10870 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10871
10872         * defs.h: Remove MAX_REGISTER_SIZE.
10873         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10874         asserts.
10875         * python/py-unwind.c (pyuw_sniffer): Likewise.
10876
10877 2018-03-07  Tom Tromey  <tom@tromey.com>
10878
10879         * linux-tdep.c (linux_info_proc): Update.
10880         * target.h (struct target_ops) <to_fileio_readlink>: Return
10881         optional<string>.
10882         (target_fileio_readlink): Return optional<string>.
10883         * remote.c (remote_hostio_readlink): Return optional<string>.
10884         * inf-child.c (inf_child_fileio_readlink): Return
10885         optional<string>.
10886         * target.c (target_fileio_readlink): Return optional<string>.
10887
10888 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10889
10890         * regcache.c (cooked_read_test): Add riscv to the list of
10891         architectures that have a save_reggroup.
10892
10893 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10894
10895         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10896         value is not a dynamic class object.
10897
10898 2018-03-06  Tom Tromey  <tom@tromey.com>
10899
10900         * rust-exp.y: Formatting fixes.
10901
10902 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10903
10904         * riscv-tdep.c (riscv_register_name): Remove target description
10905         support.
10906         (riscv_gdbarch_init): Remove target description check.
10907
10908 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10909
10910         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10911         comment.
10912         * riscv-tdep.h: Likewise.
10913
10914 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10915
10916         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10917         (riscv_pseudo_register_write): Delete.
10918         (riscv_gdbarch_init): Remove all use of pseudo registers.
10919
10920 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10921
10922         * record-btrace.c (btrace_print_lines): Replace cleanup
10923         parameter with RAII equivalents.
10924         (btrace_insn_history): Replace cleanup with RAII equivalents.
10925         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10926         make_cleanup_ui_out_tuple_begin_end): Remove.
10927         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10928         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10929         make_cleanup_ui_out_list_begin_end): Remove.
10930
10931 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10932
10933         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10934         parameter types to std::vector.  Use bool.
10935         (record_btrace_wait): Replace VEC(tp_t) with
10936         std::vector<thread_info *>.
10937         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10938
10939 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10940
10941         * record-btrace.c (record_btrace_disable_callback): Remove.
10942         (struct scoped_btrace_disable): New.
10943         (record_btrace_open): Use scoped_btrace_disable.
10944
10945 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10946
10947         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10948         reading values from registers.
10949
10950 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10951
10952         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10953         where appropriate.
10954
10955 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10956
10957         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10958         change parameter type.  Use GDB's print functions, and use
10959         core_addr_to_string where appropriate.
10960         (riscv_push_dummy_call): Use core_addr_to_string where
10961         appropriate, update call to riscv_print_arg_location, and reindent
10962         a few lines.
10963         (riscv_return_value): Update call to riscv_print_arg_location.
10964
10965 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10966             Tim Newsome <tim@sifive.com>
10967             Albert Ou <a0u@eecs.berkeley.edu>
10968             Darius Rad <darius@bluespec.com>
10969
10970         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10971         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10972         (ALLDEPFILES): Add riscv-tdep.c
10973         * configure.tgt: Add riscv support.
10974         * riscv-tdep.c: New file.
10975         * riscv-tdep.h: New file.
10976         * NEWS: Mention new target.
10977         * MAINTAINERS: Add entry for riscv.
10978
10979 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10980
10981         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10982         fields within aggregates.
10983
10984 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10985
10986         * record-btrace.c (btrace_print_lines): Change type of flags to
10987         gdb_disassembly_flags.
10988
10989 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10990
10991         * fbsd-nat.c: Include "inf-ptrace.h".
10992         (USE_SIGTRAP_SIGINFO): Conditionally define.
10993         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10994         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10995         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10996         function.
10997         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10998         Likewise.
10999         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11000         Likewise.
11001         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11002         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11003         "supports_stopped_by_hw_breakpoint" target methods.
11004
11005 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11006
11007         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11008         * fbsd-nat.c (debug_fbsd_nat): New variable.
11009         (show_fbsd_nat_debug): New function.
11010         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11011         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11012
11013 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11014
11015         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11016         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11017         prototype.
11018         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11019         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11020         method.
11021
11022 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11023
11024         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11025         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11026
11027 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11028
11029         * charset.c (struct charset_vector): New.
11030         (charsets): Change type to charset_vector.
11031         (find_charset_names): Adjust.
11032         (add_one): Adjust.
11033         (_initialize_charset): Adjust.
11034
11035 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11036
11037         * progspace.h (struct program_space) <deleted_solibs>: Change
11038         type to std::vector<std::string>.
11039         * progspace.c (clear_program_space_solib_cache): Adjust.
11040         * breakpoint.c (print_solib_event): Adjust.
11041         (check_status_catch_solib): Adjust.
11042         * solib.c (update_solib_list): Adjust.
11043         * ui-out.h (class ui_out) <field_string>: New overload.
11044         * ui-out.c (ui_out::field_string): New overload.
11045
11046 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11047
11048         * progspace.h (struct program_space): Add constructor and
11049         destructor, initialize fields.
11050         (add_program_space): Remove.
11051         * progspace.c (add_program_space): Rename to...
11052         (program_space::program_space): ... this.
11053         (release_program_space): Rename to...
11054         (program_space::~program_space): ... this.
11055         (delete_program_space): Use delete to delete program_space.
11056         (initialize_progspace): Use new to allocate program_space.
11057         * inferior.c (add_inferior_with_spaces): Likewise.
11058         (clone_inferior_command): Likewise.
11059         * infrun.c (follow_fork_inferior): Likewise.
11060         (handle_vfork_child_exec_or_exit): Likewise.
11061
11062 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11063
11064         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11065         (delim_string_to_char_ptr_vec): Return std::vector of
11066         gdb::unique_xmalloc_ptr.
11067         (dirnames_to_char_ptr_vec_append): Take std::vector of
11068         gdb::unique_xmalloc_ptr.
11069         (dirnames_to_char_ptr_vec): Return std::vector of
11070         gdb::unique_xmalloc_ptr.
11071         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11072         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11073         (delim_string_to_char_ptr_vec): Return an std::vector of
11074         gdb::unique_xmalloc_ptr, adjust the code.
11075         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11076         gdb::unique_xmalloc_ptr, adjust the code.
11077         (dirnames_to_char_ptr_vec): Return an std::vector of
11078         gdb::unique_xmalloc_ptr, adjust the code.
11079         * auto-load.c (auto_load_safe_path_vec): Change type to
11080         std::vector of gdb::unique_xmalloc_ptr.
11081         (auto_load_expand_dir_vars): Return an std::vector of
11082         gdb::unique_xmalloc_ptr, adjust the code.
11083         (auto_load_safe_path_vec_update): Adjust.
11084         (filename_is_in_auto_load_safe_path_vec): Adjust.
11085         (auto_load_objfile_script_1): Adjust.
11086         * build-id.c (build_id_to_debug_bfd): Adjust.
11087         * linux-thread-db.c (thread_db_load_search): Adjust.
11088         * source.c (add_path): Adjust.
11089         (openp): Adjust.
11090         * symfile.c (find_separate_debug_file): Adjust.
11091         * utils.c (do_free_char_ptr_vec): Remove.
11092         (make_cleanup_free_char_ptr_vec): Remove.
11093
11094 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11095
11096         PR gdb/22907
11097         * common/pathstuff.c: Conditionally include "<windows.h>".
11098
11099 2018-03-01  Georg Sauthoff  <mail@georg.so>
11100
11101         PR gdb/22888
11102         * gcore.in: Quote variables and switch interpreter to bash.
11103
11104 2018-03-01  Tom Tromey  <tom@tromey.com>
11105
11106         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11107         assertion.  Add assertion for discriminant_index.
11108         (quirk_rust_enum): Use correct base type name in univariant case.
11109
11110 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11111
11112         * record.c (get_call_history_modifiers): Return a
11113         record_print_flags.
11114         (cmd_record_call_history): Adjust.
11115         * record-btrace.c (record_btrace_call_history): Adjust.
11116         (record_btrace_call_history_range): Adjust.
11117         (record_btrace_call_history_from): Adjust.
11118         * target-debug.h (target_debug_print_record_print_flags): New.
11119         * target-delegates.c: Re-generate.
11120         * target.c (target_call_history): Change flags type.
11121         (target_call_history_from): Likewise.
11122         (target_call_history_range): Likewise.
11123         * target.h (struct target_ops) <target_call_history>: Likewise.
11124         (target_call_history_from): Likewise.
11125         (target_call_history_range): Likewise.
11126
11127 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11128             Simon Marchi  <simon.marchi@polymtl.ca>
11129
11130         * common/common-utils.c: Include "sys/stat.h".
11131         (is_regular_file): Move here from "source.c"; change return
11132         type to "bool".
11133         * common/common-utils.h (is_regular_file): New prototype.
11134         * common/pathstuff.c (contains_dir_separator): New function.
11135         * common/pathstuff.h (contains_dir_separator): New prototype.
11136         * source.c: Don't include "sys/stat.h".
11137         (is_regular_file): Move to "common/common-utils.c".
11138
11139 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11140
11141         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11142         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11143         * auto-load.c: Include "common/pathstuff.h".
11144         * common/common-def.h (current_directory): Move here.
11145         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11146         function.
11147         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11148         prototype.
11149         * common/pathstuff.c: New file.
11150         * common/pathstuff.h: New file.
11151         * compile/compile.c: Include "common/pathstuff.h".
11152         * defs.h (current_directory): Move to "common/common-defs.h".
11153         * dwarf2read.c: Include "common/pathstuff.h".
11154         * exec.c: Likewise.
11155         * guile/scm-safe-call.c: Likewise.
11156         * linux-thread-db.c: Likewise.
11157         * main.c: Likewise.
11158         * nto-tdep.c: Likewise.
11159         * objfiles.c: Likewise.
11160         * source.c: Likewise.
11161         * symtab.c: Likewise.
11162         * utils.c: Include "common/pathstuff.h".
11163         (gdb_realpath): Move to "common/pathstuff.c".
11164         (gdb_realpath_keepfile): Likewise.
11165         (gdb_abspath): Likewise.
11166         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11167         (gdb_realpath_keepfile): Likewise.
11168         (gdb_abspath): Likewise.
11169
11170 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11171
11172         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11173         wildcard process pid for super_resume for kernels with a
11174         specific bug.
11175
11176 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11177
11178         * compile/compile.c (get_args): Add additional comments
11179         explaining function.
11180
11181 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11182             Tom Tromey  <tom@tromey.com>
11183
11184         * target.h (memory_write_request_s): Remove typedef.  Don't define
11185         VEC.
11186         (target_write_memory_blocks): Change argument to std::vector.
11187         (struct memory_write_request): Add constructor.
11188         * target-memory.c (compare_block_starting_address): Return bool.
11189         Change argument types.
11190         (claim_memory): Change arguments to use std::vector.
11191         (split_regular_and_flash_blocks, blocks_to_erase)
11192         (compute_garbled_blocks): Likewise.
11193         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11194         (target_write_memory_blocks): Change argument to std::vector.
11195         * symfile.c (struct load_section_data): Add constructor and
11196         destructor.  Use std::vector for "requests".
11197         (struct load_progress_data): Add initializers.
11198         (load_section_callback): Update.  Use "new".
11199         (clear_memory_write_data): Remove.
11200         (generic_load): Update.
11201
11202 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11203
11204         * arch/aarch64.h: Use common/tdesc.h.
11205
11206 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11207
11208         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11209         architecture with a 64-bit ABI.
11210
11211 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11212
11213         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11214         ahead of target description loading.
11215
11216 2018-02-26  Tom Tromey  <tom@tromey.com>
11217
11218         * stack.c (backtrace_command_1): Update.
11219         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11220         of "flags".
11221         * python/py-framefilter.c (py_print_frame)
11222         (gdbpy_apply_frame_filter): Change type of "flags".
11223         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11224         of "flags".
11225         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11226         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11227         * extension.h (enum frame_filter_flag): Rename from
11228         frame_filter_flags.
11229         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11230         (apply_ext_lang_frame_filter): Change type of "flags".
11231         * extension.c (apply_ext_lang_frame_filter): Change type of
11232         "flags".
11233         * extension-priv.h (struct extension_language_ops)
11234         <apply_frame_filter>: Change type of "flags".
11235
11236 2018-02-26  Tom Tromey  <tom@tromey.com>
11237
11238         PR python/16497:
11239         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11240         off-by-one in py_end computation.
11241         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11242         PRINT_MORE_FRAMES.
11243         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11244         constant.
11245
11246 2018-02-26  Tom Tromey  <tom@tromey.com>
11247
11248         * dwarf2read.c (struct variant_field): New.
11249         (struct nextfield) <variant>: New field.
11250         (dwarf2_add_field): Handle DW_TAG_variant_part.
11251         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11252         discriminated union.
11253         (read_structure_type): Handle DW_TAG_variant_part.
11254         (handle_struct_member_die): New function, extracted from
11255         process_structure_scope.  Handle DW_TAG_variant.
11256         (process_structure_scope): Handle discriminated unions.  Call
11257         handle_struct_member_die.
11258
11259 2018-02-26  Tom Tromey  <tom@tromey.com>
11260
11261         * rust-lang.h (rust_last_path_segment): Declare.
11262         * rust-lang.c (rust_last_path_segment): Now public.  Change
11263         contract.
11264         (struct disr_info): Remove.
11265         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11266         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11267         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11268         (rust_enum_p, rust_enum_variant): New function.
11269         (rust_underscore_fields): Remove "offset" parameter.
11270         (rust_print_enum): New function.
11271         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11272         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11273         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11274         enums.
11275         (rust_internal_print_type): New function, from rust_print_type.
11276         Remove enum code.
11277         (rust_print_type): Call rust_internal_print_type.
11278         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11279         Update enum handling.
11280         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11281         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11282         (rust_union_quirks): New functions.
11283         (process_full_comp_unit, process_full_type_unit): Call
11284         rust_union_quirks.
11285         (process_structure_scope): Update rust_unions if necessary.
11286
11287 2018-02-26  Tom Tromey  <tom@tromey.com>
11288
11289         * value.h (value_union_variant): Declare.
11290         * valops.c (value_union_variant): New function.
11291         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11292         (struct discriminant_info): New.
11293         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11294         enumerator.
11295         (struct main_type) <flag_discriminated_union>: New field.
11296
11297 2018-02-26  Tom Tromey  <tom@tromey.com>
11298
11299         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11300         unittests/unpack-selftests.c.
11301         * unittests/unpack-selftests.c: New file.
11302         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11303
11304 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11305
11306         * dwarf2read.c (struct partial_die_info) <read>: New method.
11307         (read_partial_die): Remove the declaration.
11308         (load_partial_dies): Update.
11309         (partial_die_info::partial_die_info):
11310         (read_partial_die): Change it to partial_die_info::read.
11311
11312 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11313
11314         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11315         (fixup_partial_die): Remove declaration.
11316         (scan_partial_symbols): Update.
11317         (partial_die_parent_scope): Likewise.
11318         (partial_die_full_name): Likewise.
11319         (fixup_partial_die): Change it to partial_die_info::fixup.
11320
11321 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11322
11323         * dwarf2read.c (read_partial_die): Update the declaration.
11324         (load_partial_dies): Caller update.
11325         (read_partial_die): Remove one argument abbrev_len.
11326
11327 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11328
11329         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11330         assignment operator.
11331         (load_partial_dies): Use ctor and copy ctor.
11332         (read_partial_die): Update.
11333         (dwarf2_cu::find_partial_die): Use ctor.
11334
11335 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11336
11337         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11338         (find_partial_die_in_comp_unit): Change it to
11339         dwarf2_cu::find_partial_die.
11340         (find_partial_die): Update.
11341
11342 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11343
11344         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11345         is NULL.
11346
11347 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11348
11349         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11350
11351 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11352
11353         * arch/amd64.h: Use common/tdesc.h.
11354         * arch/i386.c: Likewise.
11355         * arch/i386.h: Likewise.
11356         * arch/tic6x.c: Likewise.
11357         * arch/tdesc.h: Move file from here...
11358         * common/tdesc.h: ...to here.
11359         * features/aarch64-core.c: Regenerate.
11360         * features/aarch64-fpu.c: Regenerate.
11361         * features/i386/32bit-avx.c: Regenerate.
11362         * features/i386/32bit-avx512.c: Regenerate.
11363         * features/i386/32bit-core.c: Regenerate.
11364         * features/i386/32bit-linux.c: Regenerate.
11365         * features/i386/32bit-mpx.c: Regenerate.
11366         * features/i386/32bit-pkeys.c: Regenerate.
11367         * features/i386/32bit-sse.c: Regenerate.
11368         * features/i386/64bit-avx.c: Regenerate.
11369         * features/i386/64bit-avx512.c: Regenerate.
11370         * features/i386/64bit-core.c: Regenerate.
11371         * features/i386/64bit-linux.c: Regenerate.
11372         * features/i386/64bit-mpx.c: Regenerate.
11373         * features/i386/64bit-pkeys.c: Regenerate.
11374         * features/i386/64bit-segments.c: Regenerate.
11375         * features/i386/64bit-sse.c: Regenerate.
11376         * features/i386/x32-core.c: Regenerate.
11377         * features/tic6x-c6xp.c: Regenerate.
11378         * features/tic6x-core.c: Regenerate.
11379         * features/tic6x-gp.c: Regenerate.
11380         * target-descriptions.c: Use common/tdesc.h.
11381         * target-descriptions.h: Likewise.
11382
11383 2018-02-24  Tom Tromey  <tom@tromey.com>
11384
11385         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11386         (try_thread_db_load_from_dir, thread_db_load_search): Use
11387         std::string.
11388         (info_auto_load_libthread_db_compare): Return bool.  Change
11389         argument types.
11390         (info_auto_load_libthread_db): Use std::vector, std::string.
11391         Remove cleanups.
11392
11393 2018-02-24  Tom Tromey  <tom@tromey.com>
11394
11395         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11396         std::string.
11397         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11398         std::string*.
11399         * gdbarch.c: Rebuild.
11400         * gdbarch.h: Rebuild.
11401         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11402         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11403         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11404         std::string*.
11405
11406 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11407
11408         * gdbtypes.h (sect_offset): Change type to uint64_t.
11409         (sect_offset_str): New function.
11410         * dwarf2read.c (create_addrmap_from_aranges): Use
11411         sect_offset_str.
11412         (error_check_comp_unit_head): Likewise.
11413         (create_debug_type_hash_table): Likewise.
11414         (read_cutu_die_from_dwo): Likewise.
11415         (init_cutu_and_read_dies): Likewise.
11416         (init_cutu_and_read_dies_no_follow): Likewise.
11417         (process_psymtab_comp_unit_reader): Likewise.
11418         (partial_die_parent_scope): Likewise.
11419         (peek_die_abbrev): Likewise.
11420         (process_queue): Likewise.
11421         (dwarf2_physname): Likewise.
11422         (read_namespace_alias): Likewise.
11423         (read_import_statement): Likewise.
11424         (create_dwo_cu_reader): Likewise.
11425         (create_cus_hash_table): Likewise.
11426         (lookup_dwo_cutu): Likewise.
11427         (inherit_abstract_dies): Likewise.
11428         (read_func_scope): Likewise.
11429         (read_call_site_scope): Likewise.
11430         (dwarf2_add_member_fn): Likewise.
11431         (read_common_block): Likewise.
11432         (read_module_type): Likewise.
11433         (read_typedef): Likewise.
11434         (read_subrange_type): Likewise.
11435         (load_partial_dies): Likewise.
11436         (read_partial_die): Likewise.
11437         (find_partial_die): Likewise.
11438         (read_str_index): Likewise.
11439         (dwarf2_string_attr): Likewise.
11440         (build_error_marker_type): Likewise.
11441         (lookup_die_type): Likewise.
11442         (dump_die_shallow): Likewise.
11443         (follow_die_ref): Likewise.
11444         (dwarf2_fetch_die_loc_sect_off): Likewise.
11445         (dwarf2_fetch_constant_bytes): Likewise.
11446         (follow_die_sig): Likewise.
11447         (get_signatured_type): Likewise.
11448         (get_DW_AT_signature_type): Likewise.
11449         (dwarf2_find_containing_comp_unit): Likewise.
11450         (set_die_type): Likewise.
11451
11452 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11453
11454         * arch/aarch64.c: Include "common-defs.h".
11455         * arch/amd64.c: Likewise.
11456         * arch/i386.c: Likewise.
11457
11458 2018-02-21  Tom Tromey  <tom@tromey.com>
11459
11460         * value.h: (extract_field_op): Update.
11461         * eval.c (extract_field_op): Return a const char *.
11462         * expression.h (parse_expression_for_completion): Update.
11463         * completer.c (complete_expression): Update.
11464         (add_struct_fields): Make fieldname const.
11465         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11466         (mark_completion_tag, parse_exp_in_context_1): Update.
11467         (parse_expression_for_completion): Change "name" to
11468         unique_xmalloc_ptr*.
11469
11470 2018-02-21  Tom Tromey  <tom@tromey.com>
11471
11472         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11473
11474 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11475
11476         * avr-tdep.c (avr_read_pc): Change parameter type to
11477         readable_regcache.
11478         * gdbarch.sh (read_pc): Likewise.
11479         * gdbarch.c: Re-generated.
11480         * gdbarch.h: Re-generated.
11481         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11482         readable_regcache.
11483         * ia64-tdep.c (ia64_read_pc): Likewise.
11484         * mips-tdep.c (mips_read_pc): Likewise.
11485         * spu-tdep.c (spu_read_pc): Likewise.
11486
11487 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11488
11489         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11490         * regcache-dump.c: New file.
11491         * regcache.c: Move register_dump to regcache-dump.c.
11492         (maintenance_print_registers): Likewise.
11493         (maintenance_print_raw_registers): Likewise.
11494         (maintenance_print_cooked_registers): Likewise.
11495         (maintenance_print_register_groups): Likewise.
11496         (maintenance_print_remote_registers): Likewise.
11497         (_initialize_regcache): Likewise.
11498         * regcache.h (register_dump): Moved from regcache.c.
11499
11500 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11501
11502         * regcache.c (regcache::regcache): Update.
11503         (regcache::invalidate): Move it to detached_regcache::invalidate.
11504         (get_thread_arch_aspace_regcache): Update.
11505         (regcache::raw_update): Update.
11506         (regcache::cooked_read): Remove some code.
11507         (regcache::cooked_read_value): Likewise.
11508         (regcache::raw_write): Remove assert on m_readonly_p.
11509         (regcache::raw_supply_integer): Move it to
11510         detached_regcache::raw_supply_integer.
11511         (regcache::raw_supply_zeroed): Likewise.
11512         * regcache.h (detached_regcache) <raw_supply_integer>: New
11513         declaration.
11514         <raw_supply_zeroed, invalidate>: Likewise.
11515         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11516         <invalidate>: Likewise.
11517         <m_readonly_p>: Removed.
11518
11519 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11520
11521         * infcmd.c (get_return_value): Let stop_regs point to
11522         get_current_regcache.
11523         * regcache.c (regcache::regcache): Remove.
11524         (register_dump_reg_buffer): New class.
11525         (regcache_print): Adjust.
11526         * regcache.h (regcache): Remove constructors.
11527
11528 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11529
11530         * regcache.c (class register_dump): New class.
11531         (register_dump_regcache, register_dump_none): New class.
11532         (register_dump_remote, register_dump_groups): New class.
11533         (regcache_print): Update.
11534         * regcache.h (regcache_dump_what): Move it to regcache.c.
11535         (regcache) <dump>: Remove.
11536
11537 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11538
11539         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11540          reg_buffer_rw *.
11541         (jit_unwind_reg_set_impl): Call raw_supply.
11542         (jit_frame_sniffer): Use reg_buffer_rw.
11543         * record-full.c (record_full_core_regbuf): Change its type.
11544         (record_full_core_open_1): Use reg_buffer_rw.
11545         (record_full_close): Likewise.
11546         (record_full_core_fetch_registers): Use regcache->raw_supply.
11547         (record_full_core_store_registers): Likewise.
11548         * regcache.c (regcache::get_register_status): Move it to
11549         reg_buffer.
11550         (regcache_raw_set_cached_value): Remove.
11551         (regcache::raw_set_cached_value): Remove.
11552         (regcache::raw_write): Call raw_supply.
11553         (regcache::raw_supply): Move it to reg_buffer_rw.
11554         * regcache.h (regcache_raw_set_cached_value): Remove.
11555         (reg_buffer_rw): New class.
11556
11557 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11558
11559         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11560         readonly_detached_regcache.
11561         (dummy_frame_prev_register): Use regcache->cooked_read.
11562         * frame.c (frame_save_as_regcache): Change return type.
11563         (frame_pop): Update.
11564         * frame.h (frame_save_as_regcache): Update declaration.
11565         * inferior.h (get_infcall_suspend_state_regcache): Update
11566         declaration.
11567         * infrun.c (infcall_suspend_state) <registers>: use
11568         readonly_detached_regcache.
11569         (save_infcall_suspend_state): Don't use regcache_dup.
11570         (get_infcall_suspend_state_regcache): Change return type.
11571         * linux-fork.c (struct fork_info) <savedregs>: Change to
11572         readonly_detached_regcache.
11573         <pc>: New field.
11574         (fork_save_infrun_state): Don't use regcache_dup.
11575         (info_checkpoints_command): Adjust.
11576         * mi/mi-main.c (register_changed_p): Update declaration.
11577         (mi_cmd_data_list_changed_registers): Use
11578         readonly_detached_regcache.
11579         (register_changed_p): Change parameter type to
11580         readonly_detached_regcache.
11581         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11582         readonly_detached_regcache.
11583         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11584         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11585         New.
11586         (regcache::save): Move it to reg_buffer.
11587         (regcache::restore): Change parameter type.
11588         (regcache_dup): Remove.
11589         * regcache.h (reg_buffer) <save>: New method.
11590         (readonly_detached_regcache): New class.
11591         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11592         readonly_detached_regcache.
11593         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11594
11595 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11596
11597         * frame.c (frame_save_as_regcache): Use regcache method save.
11598         (frame_pop): Use regcache method restore.
11599         * infrun.c (restore_infcall_suspend_state): Likewise.
11600         * linux-fork.c (fork_load_infrun_state): Likewise.
11601         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11602         save.
11603         * regcache.c (regcache_save): Remove.
11604         (regcache::restore): More asserts.
11605         (regcache_cpy): Remove.
11606         * regcache.h (regcache_save): Remove the declaration.
11607         (regcache::restore): Move from private to public.
11608         Remove the friend declaration of regcache_cpy.
11609         (regcache_cpy): Remove declaration.
11610
11611 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11612
11613         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11614         parameter type to 'readable_regcache *'.
11615         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11616         * arm-tdep.c (arm_neon_quad_read): Likewise.
11617         (arm_pseudo_read): Likewise.
11618         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11619         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11620         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11621         * gdbarch.c: Re-generated.
11622         * gdbarch.h: Re-generated.
11623         * gdbarch.sh (pseudo_register_read): Change parameter type to
11624         'readable_regcache *'.
11625         (pseudo_register_read_value): Likewise.
11626         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11627         (h8300_pseudo_register_read): Likewise.
11628         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11629         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11630         (i386_pseudo_register_read_into_value): Likewise.
11631         (i386_pseudo_register_read_value): Likewise.
11632         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11633         declaration.
11634         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11635         * m32c-tdep.c (m32c_raw_read): Likewise.
11636         (m32c_read_flg): Likewise.
11637         (m32c_banked_register): Likewise.
11638         (m32c_banked_read): Likewise.
11639         (m32c_sb_read): Likewise.
11640         (m32c_part_read): Likewise.
11641         (m32c_cat_read): Likewise.
11642         (m32c_r3r2r1r0_read): Likewise.
11643         (m32c_pseudo_register_read): Likewise.
11644         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11645         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11646         (mep_pseudo_cr64_read): Likewise.
11647         (mep_pseudo_register_read): Likewise.
11648         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11649         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11650         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11651         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11652         (regcache::cooked_read): Likewise.
11653         (regcache::cooked_read_value): Likewise.
11654         (regcache_cooked_read_signed):
11655         (regcache::cooked_read): Likewise.
11656         * regcache.h (readable_regcache): New class.
11657         (regcache): Inherit readable_regcache.  Move some methods to
11658         readable_regcache.
11659         * rl78-tdep.c (rl78_pseudo_register_read): Change
11660         parameter type to 'readable_regcache *'.
11661         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11662         (e500_pseudo_register_read): Change parameter type to
11663         'readable_regcache *'.
11664         (dfp_pseudo_register_read): Likewise.
11665         (vsx_pseudo_register_read): Likewise.
11666         (efpr_pseudo_register_read): Likewise.
11667         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11668         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11669         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11670         (sh64_pseudo_register_read): Likewise.
11671         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11672         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11673         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11674         (spu_pseudo_register_read): Likewise.
11675         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11676         (xtensa_pseudo_register_read): Likewise.
11677
11678 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11679
11680         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11681         (regcache::arch): Move it to reg_buffer::arch.
11682         (regcache::register_buffer): Likewise.
11683         (regcache::assert_regnum): Likewise.
11684         (regcache::num_raw_registers): Likewise.
11685         * regcache.h (reg_buffer): New class.
11686         (regcache): Inherit reg_buffer.
11687
11688 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11689
11690         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11691         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11692
11693 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11694
11695         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11696
11697 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11698
11699         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11700         (SFILES): Remove common/*.c files.
11701         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11702         * common/common.host: Add common reference.
11703         * configure.ac: Likewise.
11704         * configure: Regenerate.
11705
11706 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11707
11708         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11709         (block_initialize_namespace): Use new.
11710         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11711         (dwarf2_free_objfile): Use delete.
11712         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11713         (copy_type_recursive): Use new.
11714         * gdb_obstack.h (allocate_on_obstack): New.
11715
11716 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11717
11718         PR gdb/22849
11719         * inferior.c (exit_inferior_1): Reset inf->control.
11720
11721 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11722
11723         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11724         declaration.
11725
11726 2018-02-14  Pedro Alves  <palves@redhat.com>
11727
11728         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11729         frame_cleanup_after_sniffer on exception.
11730
11731 2018-02-14  Tom Tromey  <tom@tromey.com>
11732
11733         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11734         const.
11735         (solib_bfd_open): Make pathname const.
11736         * solib.c (solib_bfd_open): Make pathname const.
11737         * solib-spu.c (spu_bfd_fopen): Make name const.
11738         (spu_bfd_open): Make pathname const.
11739         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11740         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11741
11742 2018-02-14  Tom Tromey  <tom@tromey.com>
11743
11744         * symfile.c (symfile_bfd_open): Update.
11745         * source.h (openp, source_full_path_of, find_and_open_source):
11746         Change argument type to unique_xmalloc_ptr.
11747         * source.c (openp): Take a unique_xmalloc_ptr.
11748         (source_full_path_of, find_and_open_source): Likewise.
11749         (open_source_file, symtab_to_fullname): Update.
11750         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11751         unique_xmalloc_ptr.
11752         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11753         (exec_file_find): Update.
11754         * psymtab.c (psymtab_to_fullname): Update.
11755         * nto-tdep.h (nto_find_and_open_solib): Update.
11756         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11757         unique_xmalloc_ptr.
11758         * exec.c (exec_file_attach): Update.
11759         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11760         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11761
11762 2018-02-14  Tom Tromey  <tom@tromey.com>
11763
11764         * solib.c: Include source.h.
11765         * nto-tdep.c: Include source.h.
11766         * mi/mi-cmd-env.c: Include source.h.
11767         * infcmd.c: Include source.h.
11768         * exec.c: Include source.h.
11769         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11770         (add_path, directory_switch, source_path, init_source_path): Move
11771         declarations...
11772         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11773         (add_path, directory_switch, source_path, init_source_path):
11774         ...here.
11775
11776 2018-02-14  Tom Tromey  <tom@tromey.com>
11777
11778         * solist.h (exec_file_find, solib_find): Return
11779         unique_xmalloc_ptr.
11780         (solib_bfd_fopen): Take a const char *.
11781         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11782         (exec_file_find, solib_find): Likewise.
11783         (solib_bfd_fopen): Do not take ownership of "pathname".
11784         (solib_bfd_open): Use unique_xmalloc_ptr.
11785         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11786         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11787         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11788         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11789
11790 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11791
11792         * ada-lang.c (name_match_type_from_name): Remove reference to
11793         ada_name_for_lookup in function's documentation.
11794         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11795
11796 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11797
11798         * defs.h (enum openp_flags): New enum.
11799         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11800         Move to enum openp_flags.
11801         (openp_flags): New enum flags.
11802         (openp): Change parameter type to openp_flags.
11803         * source.c (openp): Change parameter type to openp_flags.
11804         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11805         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11806
11807 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11808
11809         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11810         per-command.
11811
11812 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11813
11814         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11815         into...
11816         (class dwarf2_queue_guard): ...the destructor of this new class.
11817         (dw2_do_instantiate_symtab): Create instance of the new class
11818         dwarf2_queue_guard, remove cleanup.
11819
11820 2018-02-09  Tom Tromey  <tom@tromey.com>
11821
11822         * source.c (find_source_lines): Don't reference past the end of
11823         the vector.
11824
11825 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11826
11827         * remote.c (remote_btrace_maybe_reopen): Change error message.
11828         * btrace.c (btrace_enable): Likewise.
11829         (parse_xml_btrace): Likewise.
11830         (parse_xml_btrace_conf): Likewise.
11831
11832 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11833
11834         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11835         (linux_enable_pt, linux_enable_bts): Call
11836         diagnose_perf_event_open_fail.
11837
11838 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11839
11840         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11841         Remove parameter and change return type.  Update callers.  Move it.
11842         (linux_enable_bts, linux_enable_pt): Improve error message.
11843         (linux_enable_pt): Remove zero buffer size check.
11844         (linux_enable_btrace): Improve error messages.  Remove NULL return
11845         check.
11846
11847 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11848
11849         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11850         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11851         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11852         (linux_supports_pt, linux_supports_btrace): Remove.
11853         (linux_enable_bts): Call cpu_supports_bts.
11854         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11855         * remote.c (remote_supports_btrace): Remove.
11856         (init_remote_ops): Remove remote_supports_btrace.
11857         * target-delegates.c: Regenerated.
11858         * target.c (target_supports_btrace): Remove.
11859         * target.h (target_ops) <to_supports_btrace>: Remove
11860         (target_supports_btrace): Remove.
11861         * x86-linux-nat.c (x86_linux_create_target): Remove
11862         linux_supports_btrace.
11863
11864 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11865
11866         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11867         btrace failed.
11868         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11869         exception and use message in own exception.
11870
11871 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11872
11873         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11874         (perf_event_pt_event_type): Use gdb_file_up.
11875         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11876         scoped_fd, and scoped_mmap.
11877
11878 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11879
11880         * common/scoped_mmap.h: New.
11881         * unittests/scoped_mmap-selftest.c: New.
11882         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11883         unittests/scoped_mmap-selftest.c.
11884
11885 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11886
11887         * common/scoped_fd.h: New.
11888         * unittests/scoped_fd-selftest.c: New.
11889         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11890         unittests/scoped_fd-selftest.c.
11891
11892 2018-02-09  Tom Tromey  <tom@tromey.com>
11893
11894         * auto-load.c (auto_load_section_scripts): Use
11895         gdb::unique_xmalloc_ptr.
11896
11897 2018-02-09  Tom Tromey  <tom@tromey.com>
11898
11899         * auto-load.c (execute_script_contents): Use std::string.
11900
11901 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11902
11903         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11904         Python function, rather than a new command.
11905
11906 2018-02-08  Tom Tromey  <tom@tromey.com>
11907
11908         * solib.c (solib_find_1): Use std::string.
11909         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11910
11911 2018-02-08  Tom Tromey  <tom@tromey.com>
11912
11913         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11914
11915 2018-02-08  Tom Tromey  <tom@tromey.com>
11916
11917         * source.c (find_source_lines): Use gdb::def_vector.
11918
11919 2018-02-08  Tom Tromey  <tom@tromey.com>
11920
11921         * macrocmd.c (struct temporary_macro_definition): New.
11922         (macro_define_command): Use temporary_macro_definition.  Remove
11923         cleanups.
11924         (free_macro_definition_ptr): Remove.
11925
11926 2018-02-08  Tom Tromey  <tom@tromey.com>
11927
11928         * macroexp.c (maybe_expand): Use std::string.
11929
11930 2018-02-08  Tom Tromey  <tom@tromey.com>
11931
11932         * macroexp.c (struct macro_buffer): Add initializers for some
11933         members.
11934         (init_buffer, init_shared_buffer, free_buffer)
11935         (free_buffer_return_text): Remove.
11936         (macro_buffer): New constructors.
11937         (~macro_buffer): New destructor.
11938         (macro_buffer::set_shared): New method.
11939         (macro_buffer::resize_buffer, macro_buffer::appendc)
11940         (macro_buffer::appendmem): Now methods, not free functions.
11941         (set_token, append_tokens_without_splicing, stringify)
11942         (macro_stringify): Update.
11943         (gather_arguments): Change return type.  Remove argc_p argument,
11944         add args_ptr argument.  Use std::vector.
11945         (substitute_args): Remove argc argument.  Accept std::vector.
11946         (expand): Update.  Use std::vector.
11947         (scan, macro_expand, macro_expand_next): Update.
11948
11949 2018-02-08  Tom Tromey  <tom@tromey.com>
11950
11951         * symtab.c (default_collect_symbol_completion_matches_break_on):
11952         Use unique_xmalloc_ptr.
11953         * macroscope.h: (sal_macro_scope, user_macro_scope)
11954         (default_macro_scope): Return unique_xmalloc_ptr.
11955         * macroscope.c (sal_macro_scope, user_macro_scope)
11956         (default_macro_scope): Return unique_xmalloc_ptr.
11957         * macroexp.h (macro_expand, macro_expand_once): Return
11958         unique_xmalloc_ptr.
11959         * macroexp.c (macro_expand, macro_expand_once): Return
11960         unique_xmalloc_ptr.
11961         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11962         (info_macro_command, info_macros_command): Use
11963         unique_xmalloc_ptr.
11964         * compile/compile-c-support.c (write_macro_definitions): Use
11965         unique_xmalloc_ptr.
11966         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11967
11968 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11969
11970         * value.c (value_static_field): Assign field type instead of
11971         containing type when returning an optimized out value.
11972
11973 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11974
11975         * ft32-tdep.c (ft32_read_pc): Remove.
11976         (ft32_write_pc): Remove.
11977         (ft32_gdbarch_init): Update.
11978         * m32r-tdep.c (m32r_read_pc): Remove.
11979         (m32r_gdbarch_init): Update.
11980         * mep-tdep.c (mep_read_pc): Remove.
11981         (mep_gdbarch_init): Update.
11982         * microblaze-tdep.c (microblaze_write_pc): Remove.
11983         (microblaze_gdbarch_init): Update.
11984         * mn10300-tdep.c (mn10300_read_pc): Remove.
11985         (mn10300_write_pc): Remove.
11986         (mn10300_gdbarch_init): Update.
11987         * moxie-tdep.c (moxie_read_pc): Remove.
11988         (moxie_write_pc): Remove.
11989         (moxie_gdbarch_init): Update.
11990
11991 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11992
11993         * expprint.c (print_subexp_standard): Handle
11994         OP_F77_UNDETERMINED_ARGLIST.
11995         (dump_subexp_body_standard): Likewise.
11996
11997 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11998
11999         * target-descriptions.c (tdesc_element_visitor) Add empty
12000         implementations.
12001         (tdesc_type): Move make_gdb_type from here.
12002         (tdesc_type_builtin): Likewise.
12003         (tdesc_type_vector): Likewise.
12004         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12005         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12006         (make_gdb_type_union): Likewise.
12007         (make_gdb_type_flags): Likewise.
12008         (make_gdb_type_enum): Likewise.
12009         (make_gdb_type): New function.
12010         (tdesc_register_type): Use static make_gdb_type.
12011
12012 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12013
12014         * infcmd.c (default_print_one_register_info): Align natural-format
12015         column values consistently one under another.
12016         (pad_to_column): New function.
12017
12018 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12019
12020         * dwarf2read.c (dwarf2_physname): Move commment.
12021
12022 2018-02-01  Leszek Swirski  <leszeks@google.com>
12023
12024         * varobj.c (varobj_formatted_print_options): Allow recursive
12025         pretty printing if pretty printing is enabled.
12026
12027 2018-02-01  Leszek Swirski  <leszeks@google.com>
12028
12029         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12030         names after a structop as a filename.
12031
12032 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12033
12034         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12035         (arm_record_coproc_data_proc): Likewise.
12036
12037 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12038
12039         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12040
12041 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12042
12043         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12044         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12045
12046 2018-01-31  Pedro Alves  <palves@redhat.com>
12047
12048         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12049         * inflow.c (child_terminal_save_inferior): Wrap reference to
12050         tcgetpgrp in HAVE_TERMIOS_H.
12051         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12052         _WIN32.
12053         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12054         always iterate over all inferiors.
12055         (gdbsim_cntrl_c): Adjust.
12056         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12057
12058 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12059
12060         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12061         index type is objfile-owned if the element type is as well.
12062
12063 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12064
12065         GDB 8.1 released.
12066
12067 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12068
12069         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12070         "features/s390x-linux64.c".
12071         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12072         s390_linux32 and s390x_linux64.
12073         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12074         default tdesc.
12075         * s390-tdep.c: Include "features/s390-linux32.c" and
12076         "features/s390x-linux64.c".
12077         (s390_tdesc_valid): Add check for tdesc_has_registers.
12078         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12079         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12080         tdesc_s390x_linux64.
12081         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12082         tdesc_s390x_linux64 to...
12083         * s390-tdep.h: ...here.
12084
12085 2018-01-30  Pedro Alves  <palves@redhat.com>
12086
12087         PR gdb/13211
12088         * config.in, configure: Regenerate.
12089         * configure.ac: Check for getpgid.
12090         * go32-nat.c (go32_pass_ctrlc): New.
12091         (go32_target): Install it.
12092         * inf-child.c (inf_child_target): Install
12093         child_terminal_save_inferior, child_pass_ctrlc and
12094         child_interrupt.
12095         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12096         (inf_ptrace_target): No longer install it.
12097         * infcmd.c (interrupt_target_1): Adjust.
12098         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12099         (child_interrupt): Declare.
12100         (inferior::terminal_state): New.
12101         * inflow.c (struct terminal_info): Update comments.
12102         (inferior_process_group): Delete.
12103         (terminal_is_ours): Delete.
12104         (gdb_tty_state): New.
12105         (child_terminal_init): Adjust.
12106         (is_gdb_terminal, sharing_input_terminal_1)
12107         (sharing_input_terminal): New functions.
12108         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12109         Set the process's actual process group in the foreground if
12110         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12111         mark terminal as the inferior's if not sharing GDB's terminal.
12112         Don't check attach_flag.
12113         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12114         pass down a target_terminal_state.
12115         (child_terminal_save_inferior): New, factored out from ...
12116         (child_terminal_ours_1): ... this.  Handle
12117         target_terminal_state::is_ours_for_output.
12118         (child_interrupt, child_pass_ctrlc): New.
12119         (inflow_inferior_exit): Clear the inferior's terminal_state.
12120         (copy_terminal_info): Copy the inferior's terminal state.
12121         (_initialize_inflow): Remove reference to terminal_is_ours.
12122         * inflow.h (inferior_process_group): Delete.
12123         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12124         * procfs.c (procfs_target): Don't install procfs_interrupt.
12125         (procfs_interrupt): Delete.
12126         * remote.c (remote_serial_quit_handler): Adjust.
12127         (remote_interrupt): Remove ptid parameter.  Adjust.
12128         * target-delegates.c: Regenerate.
12129         * target.c: Include "terminal.h".
12130         (target_terminal::terminal_state): Rename to ...
12131         (target_terminal::m_terminal_state): ... this.
12132         (target_terminal::init): Adjust.
12133         (target_terminal::inferior): Adjust to per-inferior
12134         terminal_state.
12135         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12136         (target_terminal::ours, target_terminal::ours_for_output): Use
12137         target_terminal_is_ours_kind.
12138         (target_interrupt): Remove ptid parameter.  Adjust.
12139         (default_target_pass_ctrlc): Adjust.
12140         * target.h (target_ops::to_terminal_save_inferior): New field.
12141         (target_ops::to_interrupt): Remove ptid_t parameter.
12142         (target_interrupt): Remove ptid_t parameter.  Update comment.
12143         (target_pass_ctrlc): Update comment.
12144         * target/target.h (target_terminal_state): New scoped enum,
12145         factored out of ...
12146         (target_terminal::terminal_state): ... here.
12147         (target_terminal::inferior): Update comments.
12148         (target_terminal::restore_inferior): New.
12149         (target_terminal::is_inferior, target_terminal::is_ours)
12150         (target_terminal::is_ours_for_output): Adjust.
12151         (target_terminal::scoped_restore_terminal_state): Adjust to
12152         rename, and call restore_inferior() instead of inferior().
12153         (target_terminal::scoped_restore_terminal_state::m_state): Change
12154         type.
12155         (target_terminal::terminal_state): Rename to ...
12156         (target_terminal::m_terminal_state): ... this and change type.
12157
12158 2018-01-30  Pedro Alves  <palves@redhat.com>
12159
12160         * linux-nat.c (wait_for_signal): New function.
12161         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12162         directly.
12163         (async_terminal_is_ours)
12164         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12165         (linux_nat_add_target): Don't override
12166         to_terminal_inferior/to_terminal_ours.
12167
12168 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12169
12170         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12171
12172 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12173
12174         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12175         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12176         dwarf2_per_objfile_free here.
12177         (dwarf2_per_objfile_free): Remove.
12178         (_initialize_dwarf2_read): Don't register
12179         dwarf2_per_objfile_free as a registry cleanup.
12180
12181 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12182
12183         Avoid compilation errors in MinGW native builds
12184
12185         The error is triggered by including python-internal.h, and the
12186         error message is:
12187
12188              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12189                       from build-gnulib/import/math.h:27,
12190                       from d:/usr/Python26/include/pyport.h:235,
12191                       from d:/usr/Python26/include/Python.h:58,
12192                       from python/python-internal.h:94,
12193                       from python/py-arch.c:24:
12194              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12195         using ::hypot;
12196                 ^~~~~
12197
12198         This happens because Python headers define 'hypot' to expand t
12199         '_hypot' in the Windows builds.
12200         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12201         'hypoth'.  This avoids a compilation error.
12202
12203 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12204
12205         * MAINTAINERS (Write After Approval): Fix ordering.
12206
12207 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12208
12209         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12210
12211 2018-01-26  Alan Modra  <amodra@gmail.com>
12212
12213         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12214         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12215         Remove nop.  Make const.  Comment.
12216         (powerpc32_plt_stub_so_2): New.
12217         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12218         Correct count.  Update uses.
12219         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12220         Move common code reading PLT entry word.  Correct
12221         powerpc32_plt_stub PLT address calculation.
12222         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12223         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12224         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12225         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12226         (ppc64_standard_linkage8): Likewise.
12227         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12228         Correct insns description.
12229         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12230
12231 2018-01-24  Pedro Alves  <palves@redhat.com>
12232
12233         GCC PR libstdc++/83906
12234         * gdbtypes.c (operator==(const dynamic_prop &,
12235         const dynamic_prop &)): New.
12236         (operator==(const range_bounds &, const range_bounds &)): New.
12237         (check_types_equal): Use them instead of memcmp.
12238         * gdbtypes.h (operator==(const dynamic_prop &,
12239         const dynamic_prop &)): Declare.
12240         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12241         (operator==(const range_bounds &, const range_bounds &)): Declare.
12242         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12243
12244 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12245
12246         * s390-linux-tdep.c (s390_record_address_mask)
12247         (s390_record_calc_disp_common, s390_record_calc_disp)
12248         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12249         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12250         (s390_process_record): Move to s390-tdep.c.
12251         (s390_linux_init_abi_any): Adjust.
12252         * s390-tdep.c (s390_record_address_mask)
12253         (s390_record_calc_disp_common, s390_record_calc_disp)
12254         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12255         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12256         (s390_process_record): Moved from s390-linux-tdep.c
12257         (s390_gdbarch_init): Adjust.
12258
12259 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12260
12261         * s390-linux-nat.c (s390-tdep.h): New include.
12262         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12263         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12264         (ALLDEPFILES): Add s390-tdep.c.
12265         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12266         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12267         * s390-tdep.h: ...this.  New file.
12268         * s390-linux-tdep.c (s390-tdep.h): New include.
12269         (_initialize_s390_tdep): Rename to...
12270         (_initialize_s390_linux_tdep): ...this and adjust.
12271         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12272         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12273         s390-tdep.h.
12274         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12275         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12276         (s390_is_partial_instruction, s390_software_single_step)
12277         (is_non_branch_ril, s390_displaced_step_copy_insn)
12278         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12279         (s390_prologue_data, s390_addr, s390_store, s390_load)
12280         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12281         (s390_register_call_saved, s390_guess_tracepoint_registers)
12282         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12283         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12284         (s390_pseudo_register_name, s390_pseudo_register_type)
12285         (s390_pseudo_register_read, s390_pseudo_register_write)
12286         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12287         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12288         (s390_addr_bits_remove, s390_address_class_type_flags)
12289         (s390_address_class_type_flags_to_name)
12290         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12291         (s390_function_arg_float, s390_function_arg_vector)
12292         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12293         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12294         (s390_frame_align, s390_register_return_value, s390_return_value)
12295         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12296         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12297         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12298         (s390_trad_frame_prev_register, s390_unwind_cache)
12299         (s390_prologue_frame_unwind_cache)
12300         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12301         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12302         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12303         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12304         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12305         (s390_frame_base_address, s390_local_base_address)
12306         (s390_frame_base, s390_gcc_target_options)
12307         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12308         (s390_validate_reg_range, s390_tdesc_valid)
12309         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12310         * s390-tdep.c: ...this.  New file.
12311
12312 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12313
12314         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12315         (s390_process_record, s390_gdbarch_tdep_alloc)
12316         (s390_linux_init_abi_any): Use/set new hook.
12317
12318 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12319
12320         * s390-linux-tdep.c (osabi.h): New include.
12321         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12322         (s390_linux_init_abi_any): New functions.
12323         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12324
12325 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12326
12327         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12328         tdesc_has_registers check
12329
12330 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12331
12332         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12333         (s390_validate_reg_range): New macro.
12334         (s390_gdbarch_init): Adjust.
12335
12336 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12337
12338         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12339         (s390_gdbarch_tdep_alloc): Adjust.
12340         (s390_gdbarch_init): Adjust.
12341
12342 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12343
12344         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12345         <have_tdb>: Change type to bool.
12346         (s390_gdbarch_tdep_alloc): Adjust.
12347         (s390_gdbarch_init): Adjust.
12348
12349 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12350
12351         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12352         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12353         (s390_gdbarch_tdep_alloc): New function.
12354         (s390_gdbarch_init): Allocate tdep at start and use its fields
12355         instead of separate variables.
12356
12357 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12358
12359         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12360         when looking for cached gdbarch and add comment for remaining.
12361
12362 2018-01-22  Pedro Alves  <palves@redhat.com>
12363             Sergio Durigan Junior  <sergiodj@redhat.com>
12364
12365         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12366         case.
12367
12368 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12369
12370         * MAINTAINERS: Update my company e-mail address.
12371
12372 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12373
12374         * regcache.c (cooked_write_test): New function.
12375         (_initialize_regcache): Register the test.
12376
12377 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12378
12379         * ia64-tdep.c (ia64_pseudo_register_read): Call
12380         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12381         * m32c-tdep.c (m32c_cat_read): Likewise.
12382         (m32c_r3r2r1r0_read): Likewise.
12383         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12384         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12385
12386 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12387
12388         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12389         method raw_read instead of regcache_raw_read.
12390         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12391         * arm-tdep.c (arm_neon_quad_read): Likewise.
12392         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12393         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12394         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12395         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12396         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12397         (i386_pseudo_register_read_into_value): Likewise.
12398         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12399         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12400         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12401         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12402         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12403         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12404         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12405         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12406         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12407
12408 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12409
12410         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12411         * configure.tgt: Remove target mt.
12412         * mt-tdep.c: Remove.
12413         * regcache.c (cooked_read_test): Remove the check for mt.
12414
12415 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12416
12417         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12418         instead of gdbarch_pseudo_register_read_value.
12419
12420 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12421
12422         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12423         language is Ada.
12424
12425 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12426
12427         * linespec.c (create_sals_line_offset): Remove code that preserved
12428         the symtab_and_line's line number.
12429
12430 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12431
12432         * varobj.c (varobj_create): Don't set valid_block when creating a
12433         floating varobj.
12434
12435 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12436
12437         * varobj.c (varobj_create): Remove out of date comment.
12438
12439 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12440
12441         PR mi/20395
12442         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12443         updating innermost block.
12444         * parse.c (innermost_block_tracker::update): Take extra type
12445         parameter, and check types match before updating innermost block.
12446         (write_dollar_variable): Update innermost block for registers.
12447         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12448         (innermost_block_tracker::innermost_block_tracker): Initialise
12449         m_types member.
12450         (innermost_block_tracker::reset): Take type parameter.
12451         (innermost_block_tracker::update): Take type parameter, and pass
12452         type through as needed.
12453         (innermost_block_tracker::m_types): New member.
12454         * varobj.c (varobj_create): Pass type when reseting innermost
12455         block.
12456
12457 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12458
12459         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12460         * ada-lang.c (resolve_subexp): Likewise.
12461         * breakpoint.c (set_breakpoint_condition) Likewise.
12462         (watch_command_1) Likewise.
12463         * c-exp.y (variable): Likewise.
12464         * d-exp.y (PrimaryExpression): Likewise.
12465         * f-exp.y (variable): Likewise.
12466         * go-exp.y (variable): Likewise.
12467         * m2-exp.y (variable): Likewise.
12468         * objfiles.c (objfile::~objfile): Likewise.
12469         * p-exp.y (variable): Likewise.
12470         * parse.c (innermost_block): Change type.
12471         * parser-defs.h (class innermost_block_tracker): New.
12472         (innermost_block): Change to innermost_block_tracker.
12473         * printcmd.c (display_command): Switch to innermost_block API.
12474         (do_one_display): Likewise.
12475         * rust-exp.y (do_one_display): Likewise.
12476         * symfile.c (clear_symtab_users): Likewise.
12477         * varobj.c (varobj_create): Switch to innermost_block API, replace
12478         use of innermost_block with block stored on varobj object.
12479
12480 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12481
12482         * expression.h (innermost_block): Remove declaration.
12483         * varobj.c: Add 'parser-defs.h' include.
12484
12485 2018-01-19  Tom Tromey  <tom@tromey.com>
12486
12487         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12488         symbols in the static and global blocks.
12489
12490 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12491
12492         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12493         gdb_ptrace.h, and move including gdb_wait.h ...
12494         * nat/linux-ptrace.h: ... to here.
12495
12496 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12497
12498         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12499         inf_ptrace_detach_success.
12500         (inf_ptrace_detach_success): Add inferior parameter, use it
12501         instead of inferior_ptid, pass it to detach_inferior.
12502         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12503         parameter.
12504         * inferior.c (detach_inferior): Add overload that takes an
12505         inferior object.
12506         * inferior.h (detach_inferior): Likewise.
12507         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12508         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12509         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12510
12511 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12512
12513         * target.h (struct target_ops) <to_detach>: Add inferior
12514         parameter.
12515         (target_detach): Likewise.
12516         * target.c (dispose_inferior): Pass inferior down.
12517         (target_detach): Pass inferior down.  Assert that it is equal to
12518         the current inferior.
12519         * aix-thread.c (aix_thread_detach): Pass inferior down.
12520         * corefile.c (core_file_command): Pass current_inferior() down.
12521         * corelow.c (core_detach): Add inferior parameter.
12522         * darwin-nat.c (darwin_detach): Likewise.
12523         * gnu-nat.c (gnu_detach): Likewise.
12524         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12525         * infcmd.c (detach_command): Pass current_inferior() down to
12526         target_detach.
12527         * infrun.c (follow_fork_inferior): Pass parent_inf to
12528         target_detach.
12529         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12530         target_detach.
12531         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12532         * linux-thread-db.c (thread_db_detach): Likewise.
12533         * nto-procfs.c (procfs_detach): Likewise.
12534         * procfs.c (procfs_detach): Likewise.
12535         * record.c (record_detach): Likewise.
12536         * record.h (struct inferior): Forward-declare.
12537         (record_detach): Add inferior parameter.
12538         * remote-sim.c (gdbsim_detach): Likewise.
12539         * remote.c (remote_detach_1): Likewise.
12540         (remote_detach): Likewise.
12541         (extended_remote_detach): Likewise.
12542         * sol-thread.c (sol_thread_detach): Likewise.
12543         * target-debug.h (target_debug_print_inferior_p): New macro.
12544         * target-delegates.c: Re-generate.
12545         * top.c (kill_or_detach): Pass inferior down to target_detach.
12546         * windows-nat.c (windows_detach): Add inferior parameter.
12547
12548 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12549
12550         * target.h (struct target_ops) <to_detach>: Remove args
12551         parameter.
12552         (target_detach): Likewise.
12553         * target.c (dispose_inferior): Adjust.
12554         (target_detach): Remove args parameter, adjust.
12555         * aix-thread.c (aix_thread_detach): Adjust.
12556         * corefile.c (core_file_command): Adjust.
12557         * corelow.c (core_detach): Adjust.
12558         * darwin-nat.c (darwin_detach): Adjust.
12559         * gnu-nat.c (gnu_detach): Adjust.
12560         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12561         * infcmd.c (detach_command): Adjust
12562         * infrun.c (follow_fork_inferior): Adjust.
12563         (handle_vfork_child_exec_or_exit): Adjust.
12564         * linux-fork.c (linux_fork_detach): Remove args parameter.
12565         * linux-fork.h (linux_fork_detach): Likewise.
12566         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12567         * linux-thread-db.c (thread_db_detach): Likewise.
12568         * nto-procfs.c (procfs_detach): Likewise.
12569         * procfs.c (procfs_detach): Likewise.
12570         (do_detach): Remove signo parameter.
12571         * record.c (record_detach): Remove args parameter.
12572         * record.h (record_detach): Likewise.
12573         * remote-sim.c (gdbsim_detach): Likewise.
12574         * remote.c (remote_detach_1): Likewise.
12575         (remote_detach): Likewise.
12576         (extended_remote_detach): Likewise.
12577         * sol-thread.c (sol_thread_detach): Likewise.
12578         * target-delegates.c: Re-generate.
12579         * top.c (struct qt_args) <args>: Remove field.
12580         (kill_or_detach): Don't pass args.
12581         (quit_force): Don't set args.
12582         * windows-nat.c (windows_detach): Remove args parameter.
12583
12584 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12585
12586         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12587         (arm_linux_init_abi): Install it.
12588
12589 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12590
12591         * osabi.c (gdb_osabi_names): Extend the regexp for
12592         arm-linux-gnueabihf.
12593
12594 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12595
12596         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12597         m_abbrevs.
12598         (abbrev_table::add_abbrev): Update.
12599         (abbrev_table::lookup_abbrev): Update.
12600
12601 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12602
12603         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12604
12605 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12606
12607         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12608         to "std::string".
12609
12610 2018-01-17  Tom Tromey  <tom@tromey.com>
12611
12612         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12613
12614 2018-01-17  Tom Tromey  <tom@tromey.com>
12615
12616         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12617         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12618         (create_array_type_with_stride): Update.
12619         * dwarf2read.c (set_die_type): Update.
12620
12621 2018-01-17  Tom Tromey  <tom@tromey.com>
12622
12623         * dwarf2read.c (delayed_method_info): Remove typedef.
12624         (dwarf2_cu::method_info): Now a std::vector.
12625         (add_to_method_list): Update.
12626         (free_delayed_list): Remove.
12627         (compute_delayed_physnames): Update.
12628         (process_full_comp_unit, process_full_type_unit): Clear the method
12629         list.  Remove cleanups.
12630         (psymtab_include_file_name): Add name_holder parameter.  Use
12631         unique_xmalloc_ptr.
12632         (dwarf_decode_lines): Update.
12633
12634 2018-01-17  Tom Tromey  <tom@tromey.com>
12635             Simon Marchi  <simon.marchi@ericsson.com>
12636
12637         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12638         (dwarf2_per_objfile::free_cached_comp_units)
12639         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12640         (init_cutu_and_read_dies_no_follow): Update.
12641         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12642         (dwarf2_cu::~dwarf2_cu): New.
12643         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12644         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12645
12646 2018-01-17  Tom Tromey  <tom@tromey.com>
12647             Simon Marchi  <simon.marchi@ericsson.com>
12648
12649         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12650         (struct die_reader_specs) <abbrev_table>: New member.
12651         (struct abbrev_table): Add constructor.
12652         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12653         <abbrev_obstack>: Now an auto_obstack.
12654         (abbrev_table_up): New typedef.
12655         (init_cu_die_reader): Add abbrev_table parameter.
12656         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12657         Add result_dwo_abbrev_table.
12658         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12659         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12660         Update.
12661         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12662         parameter.
12663         (skip_children): Update.
12664         (abbrev_table::alloc_abbrev): Rename from
12665         abbrev_table_alloc_abbrev.
12666         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12667         (abbrev_table::lookup_abbrev): Rename from
12668         abbrev_table_lookup_abbrev.
12669         (abbrev_table_read_table): Return abbrev_table_up.
12670         (abbrev_table_free, abbrev_table_free_cleanup)
12671         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12672         (load_partial_dies): Update.
12673
12674 2018-01-17  Tom Tromey  <tom@tromey.com>
12675
12676         * dwarf2read.c (dwarf2_compute_name): Update comment.
12677         (read_func_scope, read_variable): Update.
12678         (new_symbol): Remove.
12679         (new_symbol_full): Rename to new_symbol.
12680
12681 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12682
12683         PR gdb/16577
12684         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12685         a warning instead of throwing an error, set section size to 0 and return
12686         NULL.
12687         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12688
12689 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12690
12691         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12692         std::string.
12693         (linux_ptrace_attach_fail_reason_string): Likewise.
12694         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12695         Likewise.
12696         (linux_ptrace_attach_fail_reason_string): Likewise.
12697         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12698
12699 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12700
12701         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12702
12703 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12704
12705         PR gdb/21559
12706         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12707         checking for fs_base/gs_base fields in struct user_regs_struct.
12708         * configure: Regenerate.
12709
12710 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12711
12712         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12713         function.
12714         (aarch64_linux_init_abi): Install it to gdbarch hook
12715         gcc_target_options.
12716
12717 2018-01-15  Pedro Alves  <palves@redhat.com>
12718
12719         * common/signals-state-save-restore.c
12720         (save_original_signals_state): Fix typos.
12721
12722 2017-01-12  Tom Tromey  <tom@tromey.com>
12723             Sergio Durigan Junior  <sergiodj@redhat.com>
12724
12725         * Makefile.in (install-only): Install gdb-add-index.
12726
12727 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12728
12729         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12730
12731 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12732
12733         * infrun.c (keep_going_pass_signal): Clear step-over info when
12734         insert_breakpoints fails.
12735
12736 2018-01-11  Pedro Alves  <palves@redhat.com>
12737
12738         PR gdb/22583
12739         * infrun.c (resume): Rename to ...
12740         (resume_1): ... this.
12741         (resume): Reimplement as wrapper around resume_1.
12742
12743 2018-01-11  Pedro Alves  <palves@redhat.com>
12744
12745         PR remote/22597
12746         * remote.c (remote_parse_stop_reply): Default to the last-set
12747         general thread instead of to 'magic_null_ptid'.
12748
12749 2018-01-10  Pedro Alves  <palves@redhat.com>
12750
12751         * language.h (language_get_symbol_name_matcher): Rename ...
12752         (get_symbol_name_matcher): ... this.
12753         * language.c (language_get_symbol_name_matcher): Ditto.
12754         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12755         callers adjusted.
12756
12757 2018-01-10  Pedro Alves  <palves@redhat.com>
12758
12759         PR gdb/22670
12760         * dwarf2read.c
12761         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12762         Adjust to use language_get_symbol_name_matcher instead of
12763         language_defn::la_get_symbol_name_matcher.
12764         * language.c (language_get_symbol_name_matcher): If in Ada mode
12765         and the lookup name is a verbatim match, return Ada's matcher.
12766         * language.h (language_get_symbol_name_matcher): Adjust comment.
12767         (ada_lookup_name_info::verbatim_p):: New method.
12768
12769 2018-01-10  Pedro Alves  <palves@redhat.com>
12770
12771         PR gdb/22670
12772         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12773         minsym's language is language_auto or language_cplus, pass down
12774         language_ada instead.
12775         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12776
12777 2018-01-10  Pedro Alves  <palves@redhat.com>
12778
12779         PR gdb/22670
12780         * minsyms.c (linkage_name_str): New function.
12781         (iterate_over_minimal_symbols): Use it.
12782
12783 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12784
12785         * NEWS: Document that 'info proc' now works on FreeBSD.
12786
12787 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12788
12789         * configure.ac: Check for kinfo_getfile in libutil.
12790         * configure: Regenerate.
12791         * config.in: Regenerate.
12792         * fbsd-nat.c: Include "fbsd-tdep.h".
12793         (fbsd_fetch_cmdline): New.
12794         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12795         rather than calling error.
12796         (fbsd_info_proc): New.
12797         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12798         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12799         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12800
12801 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12802
12803         * fbsd-nat.c (struct free_deleter): Remove.
12804         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12805
12806 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12807
12808         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12809         NULL for an empty pathname.
12810
12811 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12812
12813         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12814         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12815         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12816         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12817         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12818         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12819         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12820         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12821         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12822         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12823         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12824         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12825         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12826         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12827         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12828
12829 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12830
12831         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12832         (gnu_xfer_auxv): New function.
12833         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12834         TARGET_OBJECT_AUXV.
12835
12836 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12837             Simon Marchi  <simon.marchi@ericsson.com>
12838
12839         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12840         common/selftest.c.
12841         (COMMON_OBS): Remove selftest.o.
12842         * configure.ac: Append selftest-arch.c and common/selftest.c to
12843         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12844         * configure: Re-generated.
12845         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12846         GDB_SELF_TEST.
12847         (maintenance_info_selftests): Likewise.
12848
12849 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12850
12851         * ada-valprint.c (val_print_packed_array_elements): Use
12852         proper number of elements when printing an array indexed
12853         by an enumeration type.
12854
12855 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12856
12857         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12858         (dw2_get_file_names_reader): Adjust.
12859         (lookup_dwo_signatured_type): Adjust.
12860         (lookup_dwp_signatured_type): Adjust.
12861         (lookup_signatured_type): Adjust.
12862         (create_type_unit_group): Adjust.
12863         (get_type_unit_group): Adjust.
12864         (process_psymtab_comp_unit_reader): Adjust.
12865         (build_type_psymtabs_reader): Adjust.
12866         (scan_partial_symbols): Adjust.
12867         (add_partial_symbol): Adjust.
12868         (add_partial_subprogram): Adjust.
12869         (peek_die_abbrev): Adjust.
12870         (fixup_go_packaging): Adjust.
12871         (process_imported_unit_die): Adjust.
12872         (dwarf2_compute_name): Adjust.
12873         (dwarf2_physname): Adjust.
12874         (read_import_statement): Adjust.
12875         (handle_DW_AT_stmt_list): Adjust.
12876         (read_file_scope): Adjust.
12877         (read_func_scope): Adjust.
12878         (read_lexical_block_scope): Adjust.
12879         (read_call_site_scope): Adjust.
12880         (read_variable): Adjust.
12881         (dwarf2_rnglists_process): Adjust.
12882         (dwarf2_ranges_process): Adjust.
12883         (dwarf2_ranges_read): Adjust.
12884         (dwarf2_get_pc_bounds): Adjust.
12885         (dwarf2_record_block_ranges): Adjust.
12886         (dwarf2_add_field): Adjust.
12887         (dwarf2_add_member_fn): Adjust.
12888         (read_structure_type): Adjust.
12889         (process_structure_scope): Adjust.
12890         (read_enumeration_type): Adjust.
12891         (read_array_type): Adjust.
12892         (mark_common_block_symbol_computed): Adjust.
12893         (read_common_block): Adjust.
12894         (read_namespace_type): Adjust.
12895         (read_namespace): Adjust.
12896         (read_module_type): Adjust.
12897         (read_tag_pointer_type): Adjust.
12898         (read_tag_ptr_to_member_type): Adjust.
12899         (read_tag_string_type): Adjust.
12900         (read_subroutine_type): Adjust.
12901         (read_typedef): Adjust.
12902         (read_base_type): Adjust.
12903         (attr_to_dynamic_prop): Adjust.
12904         (read_subrange_type): Adjust.
12905         (read_unspecified_type): Adjust.
12906         (dwarf2_read_abbrevs): Adjust.
12907         (load_partial_dies): Adjust.
12908         (read_partial_die): Adjust.
12909         (find_partial_die): Adjust.
12910         (guess_partial_die_structure_name): Adjust.
12911         (fixup_partial_die): Adjust.
12912         (read_attribute_value): Adjust.
12913         (read_addr_index): Adjust.
12914         (read_addr_index_from_leb128): Adjust.
12915         (read_str_index): Adjust.
12916         (dwarf2_string_attr): Adjust.
12917         (get_debug_line_section): Adjust.
12918         (dwarf_decode_line_header): Adjust.
12919         (lnp_state_machine::check_line_address): Adjust.
12920         (dwarf_decode_lines_1): Adjust.
12921         (dwarf_decode_lines): Adjust.
12922         (dwarf2_start_symtab): Adjust.
12923         (var_decode_location): Adjust.
12924         (new_symbol_full): Adjust.
12925         (dwarf2_const_value_data): Adjust.
12926         (dwarf2_const_value_attr): Adjust.
12927         (dwarf2_const_value): Adjust.
12928         (die_type): Adjust.
12929         (die_containing_type): Adjust.
12930         (build_error_marker_type): Adjust.
12931         (lookup_die_type): Adjust.
12932         (guess_full_die_structure_name): Adjust.
12933         (anonymous_struct_prefix): Adjust.
12934         (determine_prefix): Adjust.
12935         (dwarf2_name): Adjust.
12936         (follow_die_ref_or_sig): Adjust.
12937         (follow_die_offset): Adjust.
12938         (follow_die_ref): Adjust.
12939         (follow_die_sig_1): Adjust.
12940         (follow_die_sig): Adjust.
12941         (get_signatured_type): Adjust.
12942         (get_DW_AT_signature_type): Adjust.
12943         (decode_locdesc): Adjust.
12944         (dwarf_decode_macros): Adjust.
12945         (cu_debug_loc_section): Adjust.
12946         (fill_in_loclist_baton): Adjust.
12947         (dwarf2_symbol_mark_computed): Adjust.
12948         (init_one_comp_unit): Don't assign
12949         dwarf2_cu::dwarf2_per_objfile.
12950         (set_die_type): Adjust.
12951
12952 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12953
12954         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12955         <dwarf2_per_objfile>: New field.
12956         (dwarf2_per_objfile): Remove global.
12957         (get_dwarf2_per_objfile): New function.
12958         (set_dwarf2_per_objfile): New function.
12959         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12960         dwarf2_per_objfile.
12961         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12962         (read_abbrev_offset): Likewise.
12963         (read_indirect_string): Likewise.
12964         (read_indirect_line_string): Likewise.
12965         (read_indirect_string_at_offset): Likewise.
12966         (read_indirect_string_from_dwz): Likewise.
12967         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12968         dwarf2_per_objfile.
12969         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12970         (create_all_comp_units): Change objfile parameter to
12971         dwarf2_per_objfile.
12972         (create_all_type_units): Likewise.
12973         (process_queue): Add dwarf2_per_objfile parameter.
12974         (read_and_check_comp_unit_head): Likewise.
12975         (lookup_dwo_unit_in_dwp): Likewise.
12976         (get_dwp_file): Likewise.
12977         (process_cu_includes): Likewise.
12978         (struct free_dwo_file_cleanup_data): New struct.
12979         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12980         set_dwarf2_per_objfile.
12981         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12982         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12983         context, adjust calls.
12984         (dw2_instantiate_symtab): Likewise.
12985         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12986         (dw2_get_cu): Likewise.
12987         (create_cu_from_index_list): Change objfile parameter to
12988         dwarf2_per_objfile.
12989         (create_cus_from_index_list): Get dwarf2_per_objfile from
12990         context, adjust calls.
12991         (create_cus_from_index): Likewise.
12992         (create_signatured_type_table_from_index): Change objfile
12993         parameter to dwarf2_per_objfile.
12994         (create_signatured_type_table_from_debug_names): Change objfile
12995         parameter to dwarf2_per_objfile.
12996         (create_addrmap_from_index): Likewise.
12997         (create_addrmap_from_aranges): Likewise.
12998         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12999         (dw2_setup): Remove.
13000         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13001         context.
13002         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13003         get_dwarf2_per_objfile.
13004         (dw2_forget_cached_source_info): Likewise.
13005         (dw2_map_symtabs_matching_filename): Likewise.
13006         (struct dw2_symtab_iterator) <index>: Remove.
13007         <dwarf2_per_objfile>: New field.
13008         (dw2_symtab_iter_init): Replace index parameter with
13009         dwarf2_per_objfile.
13010         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13011         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13012         (dw2_print_stats): Likewise.
13013         (dw2_dump): Likewise.
13014         (dw2_expand_symtabs_for_function): Likewise.
13015         (dw2_expand_all_symtabs): Likewise.
13016         (dw2_expand_symtabs_with_fullname): Likewise.
13017         (dw2_expand_marked_cus): Replace index and objfile parameters
13018         with dwarf2_per_objfile.
13019         (dw_expand_symtabs_matching_file_matcher): Add
13020         dwarf2_per_objfile parameter and adjust calls.
13021         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13022         adjust calls.
13023         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13024         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13025         adjust calls.
13026         (create_cus_from_debug_names_list): Replace objfile parameter
13027         with dwarf2_per_objfile and adjust calls.
13028         (create_cus_from_debug_names): Likewise.
13029         (dwarf2_read_debug_names): Likewise.
13030         (mapped_debug_names::namei_to_name): Adjust call.
13031         (dw2_debug_names_iterator::next): Likewise.
13032         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13033         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13034         (dw2_debug_names_dump): Likewise.
13035         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13036         (dw2_debug_names_expand_symtabs_matching): Likewise.
13037         (dwarf2_initialize_objfile): Likewise.
13038         (dwarf2_build_psymtabs): Likewise.
13039         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13040         this_cu.
13041         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13042         (read_and_check_comp_unit_head): Likewise.
13043         (read_abbrev_offset): Likewise.
13044         (create_debug_type_hash_table): Likewise.
13045         (create_debug_types_hash_table): Likewise.
13046         (create_all_type_units): Replace objfile parameter with
13047         dwarf2_per_objfile.
13048         (add_type_unit): Add dwarf2_per_objfile parameter.
13049         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13050         with dwarf2_per_objfile.
13051         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13052         (lookup_dwp_signatured_type): Likewise.
13053         (lookup_signatured_type): Likewise.
13054         (read_cutu_die_from_dwo): Likewise.
13055         (init_tu_and_read_dwo_dies): Likewise.
13056         (init_cutu_and_read_dies): Likewise.
13057         (init_cutu_and_read_dies_no_follow): Likewise.
13058         (allocate_type_unit_groups_table): Add objfile parameter.
13059         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13060         (get_type_unit_group): Likewise.
13061         (process_psymtab_comp_unit): Update call.
13062         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13063         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13064         (print_tu_stats): Likewise.
13065         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13066         in void* parameter.
13067         (build_type_psymtabs): Change objfile parameter to
13068         dwarf2_per_objfile.
13069         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13070         passed in void* parameter.
13071         (process_skeletonless_type_units): Change objfile parameter to
13072         dwarf2_per_objfile.
13073         (set_partial_user): Likewise.
13074         (dwarf2_build_psymtabs_hard): Likewise.
13075         (read_comp_units_from_section): Likewise.
13076         (create_all_comp_units): Likewise.
13077         (scan_partial_symbols): Update calls.
13078         (add_partial_symbol): Likewise.
13079         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13080         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13081         (process_queue): Add dwarf2_per_objfile parameter.
13082         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13083         (compute_compunit_symtab_includes): Likewise.
13084         (process_cu_includes): Add dwarf2_per_objfile parameter.
13085         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13086         (process_full_type_unit): Likewise.
13087         (process_imported_unit_die): Update call.
13088         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13089         (read_file_scope): Likewise.
13090         (allocate_dwo_file_hash_table): Add objfile parameter.
13091         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13092         (create_cus_hash_table): Likewise.
13093         (create_dwp_hash_table): Likewise.
13094         (create_dwo_unit_in_dwp_v1): Likewise.
13095         (create_dwp_v2_section): Likewise.
13096         (create_dwo_unit_in_dwp_v2): Likewise.
13097         (lookup_dwo_unit_in_dwp): Likewise.
13098         (try_open_dwop_file): Likewise.
13099         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13100         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13101         cleanup to include a reference to dwarf2_per_objfile.
13102         (open_dwp_file): Add dwarf2_per_objfile parameter.
13103         (open_and_init_dwp_file): Likewise.
13104         (get_dwp_file): Likewise.
13105         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13106         (queue_and_load_all_dwo_tus): Update call.
13107         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13108         data.
13109         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13110         (dwarf2_ranges_process): Likewise.
13111         (dwarf2_get_pc_bounds): Likewise.
13112         (mark_common_block_symbol_computed): Likewise.
13113         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13114         (dwarf2_read_abbrevs): Update call.
13115         (read_partial_die): Use dwarf2_per_objfile from cu.
13116         (find_partial_die): Likewise.
13117         (fixup_partial_die): Likewise.
13118         (read_attribute_value): Likewise.
13119         (read_indirect_string_at_offset_from): Add objfile parameter.
13120         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13121         parameter.
13122         (read_indirect_string_from_dwz): Add objfile parameter.
13123         (read_indirect_string): Add objfile parameter.
13124         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13125         (read_addr_index): Use dwarf2_per_objfile from cu.
13126         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13127         call dw2_setup.
13128         (read_str_index): Use dwarf2_per_objfile from cu.
13129         (get_debug_line_section): Likewise.
13130         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13131         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13132         (new_symbol_full): Use dwarf2_per_objfile from cu.
13133         (build_error_marker_type): Likewise.
13134         (lookup_die_type): Likewise.
13135         (determine_prefix): Likewise.
13136         (follow_die_offset): Likewise.
13137         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13138         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13139         (dwarf2_fetch_die_type_sect_off): Likewise.
13140         (dwarf2_get_die_type): Likewise.
13141         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13142         (get_signatured_type): Likewise.
13143         (get_DW_AT_signature_type): Likewise.
13144         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13145         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13146         (cu_debug_loc_section): Likewise.
13147         (fill_in_loclist_baton): Likewise.
13148         (dwarf2_symbol_mark_computed): Likewise.
13149         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13150         dwarf2_per_objfile.
13151         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13152         parameter.
13153         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13154         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13155         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13156         (set_die_type): Use dwarf2_free_objfile from cu.
13157         (get_die_type_at_offset): Likewise.
13158         (dwarf2_per_objfile_free): Don't assign global variable.
13159         (debug_names) <constructor>: Add dwarf2_per_objfile
13160         parameter, update m_debugstrlookup construction.
13161         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13162         parameter.
13163         <m_dwarf2_per_objfile>: New field.
13164         <lookup>: Use m_dwarf2_per_objfile.
13165         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13166         (psyms_seen_size): Likewise.
13167         (write_gdbindex): Replace objfile parameter with
13168         dwarf2_per_objfile.
13169         (write_debug_names): Likewise.
13170         (write_psymtabs_to_index): Likewise.
13171         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13172         calls.
13173
13174 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13175
13176         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13177         <dwarf2_per_objfile>: New field.
13178         (struct dwarf2_per_cu_data) <objfile>: Remove.
13179         <dwarf2_per_objfile>: New field.
13180         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13181         of objfile.
13182         (create_signatured_type_table_from_index): Likewise.
13183         (create_debug_type_hash_table): Likewise.
13184         (fill_in_sig_entry_from_dwo_entry): Likewise.
13185         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13186         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13187         objfile.
13188         (create_partial_symtab): Access objfile through
13189         dwarf2_per_objfile.
13190         (process_psymtab_comp_unit_reader): Likewise.
13191         (read_comp_units_from_section): Likewise.
13192         (scan_partial_symbols): Likewise.
13193         (add_partial_symbol): Likewise.
13194         (add_partial_subprogram): Likewise.
13195         (peek_die_abbrev): Likewise.
13196         (fixup_go_packaging): Likewise.
13197         (process_full_comp_unit): Likewise.
13198         (process_full_type_unit): Likewise.
13199         (process_imported_unit_die): Likewise.
13200         (dwarf2_compute_name): Likewise.
13201         (dwarf2_physname): Likewise.
13202         (read_import_statement): Likewise.
13203         (create_cus_hash_table): Assign dwarf2_physname instead of
13204         objfile.
13205         (read_func_scope): Access objfile through dwarf2_per_objfile.
13206         (read_lexical_block_scope): Likewise.
13207         (read_call_site_scope): Likewise.
13208         (read_variable): Likewise.
13209         (dwarf2_rnglists_process): Likewise.
13210         (dwarf2_ranges_process): Likewise.
13211         (dwarf2_ranges_read): Likewise.
13212         (dwarf2_record_block_ranges): Likewise.
13213         (dwarf2_add_field): Likewise.
13214         (dwarf2_add_member_fn): Likewise.
13215         (read_structure_type): Likewise.
13216         (process_structure_scope): Likewise.
13217         (read_enumeration_type): Likewise.
13218         (read_array_type): Likewise.
13219         (read_common_block): Likewise.
13220         (read_namespace_type): Likewise.
13221         (read_namespace): Likewise.
13222         (read_module_type): Likewise.
13223         (read_tag_pointer_type): Likewise.
13224         (read_tag_ptr_to_member_type): Likewise.
13225         (read_tag_string_type): Likewise.
13226         (read_subroutine_type): Likewise.
13227         (read_typedef): Likewise.
13228         (read_base_type): Likewise.
13229         (attr_to_dynamic_prop): Likewise.
13230         (read_subrange_type): Likewise.
13231         (read_unspecified_type): Likewise.
13232         (load_partial_dies): Likewise.
13233         (read_partial_die): Likewise.
13234         (find_partial_die): Likewise.
13235         (guess_partial_die_structure_name): Likewise.
13236         (fixup_partial_die): Likewise.
13237         (read_attribute_value): Likewise.
13238         (read_addr_index_from_leb128): Likewise.
13239         (dwarf2_read_addr_index): Likewise.
13240         (dwarf2_string_attr): Likewise.
13241         (lnp_state_machine::check_line_address): Likewise.
13242         (dwarf_decode_lines_1): Likewise.
13243         (dwarf_decode_lines): Likewise.
13244         (dwarf2_start_symtab): Likewise.
13245         (var_decode_location): Likewise.
13246         (new_symbol_full): Likewise.
13247         (dwarf2_const_value_data): Likewise.
13248         (dwarf2_const_value_attr): Likewise.
13249         (dwarf2_const_value): Likewise.
13250         (die_type): Likewise.
13251         (die_containing_type): Likewise.
13252         (lookup_die_type): Likewise.
13253         (guess_full_die_structure_name): Likewise.
13254         (anonymous_struct_prefix): Likewise.
13255         (dwarf2_name): Likewise.
13256         (follow_die_ref_or_sig): Likewise.
13257         (follow_die_offset): Likewise.
13258         (follow_die_ref): Likewise.
13259         (dwarf2_fetch_die_loc_sect_off): Likewise.
13260         (dwarf2_fetch_constant_bytes): Likewise.
13261         (dwarf2_fetch_die_type_sect_off): Likewise.
13262         (dwarf2_get_die_type): Likewise.
13263         (follow_die_sig): Likewise.
13264         (decode_locdesc): Likewise.
13265         (dwarf2_per_cu_objfile): Likewise.
13266         (dwarf2_per_cu_text_offset): Likewise.
13267         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13268         objfile.
13269         (set_die_type): Access objfile through
13270         dwarf2_per_objfile.
13271
13272 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13273
13274         * valprint.c (converted_character_d): Remove typedef.
13275         (DEF_VEC_O (converted_character_d)): Remove.
13276         (count_next_character): Use std::vector.
13277         (print_converted_chars_to_obstack): Likewise.
13278         (generic_printstr): Likewise.
13279
13280 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13281
13282         * xml-support.h (struct gdb_xml_value): Add constructor.
13283         <value>: Change type to unique_xmalloc_ptr.
13284         (gdb_xml_value_s): Remove typedef.
13285         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13286         (gdb_xml_element_start_handler): Change parameter type to
13287         std::vector.
13288         (xml_find_attribute): Likewise.
13289         * xml-support.c (xml_find_attribute): Change parameter type to
13290         std::vector and adjust.
13291         (gdb_xml_values_cleanup): Remove.
13292         (gdb_xml_parser::start_element): Adjust to std::vector.
13293         (xinclude_start_include): Change paraeter type to std::vector
13294         and adjust.
13295         * btrace.c (check_xml_btrace_version): Likewise.
13296         (parse_xml_btrace_block): Likewise.
13297         (parse_xml_btrace_pt_config_cpu): Likewise.
13298         (parse_xml_btrace_pt): Likewise.
13299         (parse_xml_btrace_conf_bts): Likewise.
13300         (parse_xml_btrace_conf_pt): Likewise.
13301         * memory-map.c (memory_map_start_memory): Likewise.
13302         (memory_map_start_property): Likewise.
13303         * osdata.c (osdata_start_osdata): Likewise.
13304         (osdata_start_item): Likewise.
13305         (osdata_start_column): Likewise.
13306         * remote.c (start_thread): Likewise.
13307         * solib-aix.c (library_list_start_library): Likewise.
13308         (library_list_start_list): Likewise.
13309         * solib-svr4.c (library_list_start_library): Likewise.
13310         (svr4_library_list_start_list): Likewise.
13311         * solib-target.c (library_list_start_segment): Likewise.
13312         (library_list_start_section): Likewise.
13313         (library_list_start_library): Likewise.
13314         (library_list_start_list): Likewise.
13315         * tracepoint.c (traceframe_info_start_memory): Likewise.
13316         (traceframe_info_start_tvar): Likewise.
13317         * xml-syscall.c (syscall_start_syscall): Likewise.
13318         * xml-tdesc.c (tdesc_start_target): Likewise.
13319         (tdesc_start_feature): Likewise.
13320         (tdesc_start_reg): Likewise.
13321         (tdesc_start_union): Likewise.
13322         (tdesc_start_struct): Likewise.
13323         (tdesc_start_flags): Likewise.
13324         (tdesc_start_enum): Likewise.
13325         (tdesc_start_field): Likewise.
13326         (tdesc_start_enum_value): Likewise.
13327         (tdesc_start_vector): Likewise.
13328
13329 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13330
13331         * extension.h (struct xmethod_worker) <clone>: Remove.
13332         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13333         Remove.
13334         (python_xmethod_worker::clone): Remove.
13335         * valops.c (find_overload_match): Use std::move instead of
13336         clone.
13337
13338 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13339
13340         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13341         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13342         <free_xmethod_worker_data>: Remove.
13343         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13344         <get_xmethod_arg_types>: Remove.
13345         <get_xmethod_result_type>: Remove.
13346         <invoke_xmethod>: Remove.
13347         * extension.c (new_xmethod_worker): Remove.
13348         (clone_xmethod_worker): Remove.
13349         (get_matching_xmethod_workers): Return void, pass std::vector by
13350         pointer.
13351         (get_xmethod_arg_types): Rename to...
13352         (xmethod_worker::get_arg_types): ... this, and adjust.
13353         (get_xmethod_result_type): Rename to...
13354         (xmethod_worker::get_result_type): ... this, and adjust.
13355         (invoke_xmethod): Remove.
13356         (free_xmethod_worker): Remove.
13357         (free_xmethod_worker_vec): Remove.
13358         * extension.h (enum ext_lang_rc): Move here from
13359         extension-priv.h.
13360         (struct xmethod_worker): Add constructor and destructor.
13361         <data>: Remove.
13362         <value>: Remove.
13363         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13364         virtual pure methods.
13365         <get_arg_types, get_result_type>: New methods.
13366         (xmethod_worker_ptr): Remove typedef.
13367         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13368         (xmethod_worker_vec): Remove typedef.
13369         (xmethod_worker_up): New typedef.
13370         (invoke_xmethod): Remove.
13371         (clone_xmethod_worker): Remove.
13372         (free_xmethod_worker): Remove.
13373         (free_xmethod_worker_vec): Remove.
13374         (get_xmethod_arg_types): Remove.
13375         (get_xmethod_result_type): Remove.
13376         * valops.c (find_method_list): Use std::vector, don't use
13377         intermediate vector.
13378         (value_find_oload_method_list): Use std::vector.
13379         (find_overload_match): Use std::vector.
13380         (find_oload_champ): Use std::vector.
13381         * value.c (value_free): Use operator delete.
13382         (value_of_xmethod): Rename to...
13383         (value_from_xmethod): ... this.  Don't assign
13384         xmethod_worker::value, take rvalue-reference.
13385         (result_type_of_xmethod): Adjust.
13386         (call_xmethod): Adjust.
13387         * value.h: Include extension.h.
13388         (struct xmethod_worker): Don't forward-declare.
13389         (value_of_xmethod): Rename to...
13390         (value_from_xmethod): ... this, take rvalue-reference.
13391         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13392         (struct python_xmethod_worker): ... this, add constructor and
13393         destructor.
13394         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13395         (gdbpy_free_xmethod_worker_data): Rename to...
13396         (python_xmethod_worker::~python_xmethod_worker): ... this and
13397         adjust.
13398         (gdbpy_clone_xmethod_worker_data): Rename to...
13399         (python_xmethod_worker::clone): ... this and adjust.
13400         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13401         temporary vector.
13402         (gdbpy_get_xmethod_arg_types): Rename to...
13403         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13404         (gdbpy_get_xmethod_result_type): Rename to...
13405         (python_xmethod_worker::do_get_result_type): ... this and
13406         adjust.
13407         (gdbpy_invoke_xmethod): Rename to...
13408         (python_xmethod_worker::invoke): ... this and adjust.
13409         (new_python_xmethod_worker): Rename to...
13410         (python_xmethod_worker::python_xmethod_worker): ... this and
13411         adjust.
13412         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13413         Remove.
13414         (gdbpy_free_xmethod_worker_data): Remove.
13415         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13416         (gdbpy_get_xmethod_arg_types): Remove.
13417         (gdbpy_get_xmethod_result_type): Remove.
13418         (gdbpy_invoke_xmethod): Remove.
13419         * python/python.c (python_extension_ops): Remove obsolete
13420         callbacks.
13421
13422 2018-01-05  Pedro Alves  <palves@redhat.com>
13423
13424         PR gdb/18653
13425         * common/signals-state-save-restore.c
13426         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13427         find a custom handler preinstalled, instead of internal erroring.
13428         But only warn if !quiet.
13429         * common/signals-state-save-restore.h
13430         (save_original_signals_state): New parameter 'quiet'.
13431         * main.c (captured_main_1): Move save_original_signals_state call
13432         after option handling, and pass QUIET.
13433
13434 2018-01-05  Pedro Alves  <palves@redhat.com>
13435
13436         * spu-tdep.c (spu_catch_start): Pass
13437         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13438
13439 2018-01-05  Pedro Alves  <palves@redhat.com>
13440
13441         PR gdb/22670
13442         * ada-lang.c (literal_symbol_name_matcher): New function.
13443         (ada_get_symbol_name_matcher): Use it for
13444         symbol_name_match_type::SEARCH_NAME.
13445         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13446         it down instead of assuming symbol_name_match_type::FULL.
13447         * block.h (block_lookup_symbol): New parameter 'match_type'.
13448         * c-valprint.c (print_unpacked_pointer): Use
13449         lookup_symbol_search_name instead of lookup_symbol.
13450         * compile/compile-object-load.c (get_out_value_type): Pass down
13451         symbol_name_match_type::SEARCH_NAME.
13452         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13453         symbol_name_match_type::FULL.
13454         * cp-support.c (cp_get_symbol_name_matcher): Handle
13455         symbol_name_match_type::SEARCH_NAME.
13456         * infrun.c (insert_exception_resume_breakpoint): Use
13457         lookup_symbol_search_name.
13458         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13459         * psymtab.c (maintenance_check_psymtabs): Use
13460         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13461         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13462         SYMBOL_SEARCH_NAME.
13463         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13464         if symbol_name_match_type::SEARCH_NAME.
13465         (lookup_symbol_in_language): Pass down
13466         symbol_name_match_type::FULL.
13467         (lookup_symbol_search_name): New.
13468         (lookup_language_this): Pass down
13469         symbol_name_match_type::SEARCH_NAME.
13470         (lookup_symbol_aux, lookup_local_symbol): New parameter
13471         'match_type'.  Pass it down.
13472         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13473         (lookup_symbol_search_name): New declaration.
13474         (lookup_symbol_in_block): New 'match_type' parameter.
13475
13476 2018-01-05  Pedro Alves  <palves@redhat.com>
13477
13478         PR gdb/22670
13479         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13480         ada_lookup_symbol.
13481         (ada_lookup_symbol): Reimplement in terms of
13482         ada_lookup_symbol_list, bits factored out from
13483         ada_lookup_encoded_symbol.
13484
13485 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13486
13487         * ada-exp.y (write_object_renaming): When subscripting an array
13488         using a symbol as the index, pass the block in call to
13489         ada_lookup_encoded_symbol when looking that symbol up.
13490
13491 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13492
13493         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13494         TYPE_INDEX_TYPE.
13495
13496 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13497
13498         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13499         the case where VALUE_LVAL (val0) is not lval_memory.
13500
13501 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13502
13503         * ada-valprint.c (print_optional_low_bound): Handle
13504         character-indexed array printing like boolean-indexed array
13505         printing.
13506
13507 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13508
13509         * NEWS: Create a new section for the next release branch.
13510         Rename the section of the current branch, now that it has
13511         been cut.
13512
13513 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13514
13515         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13516         * version.in: Bump version to 8.1.50.DATE-git.
13517
13518 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13519
13520         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13521         Add field.
13522         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13523         Add field.
13524         (default_exception_support_info) <catch_handlers_sym>: Add field.
13525         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13526         (ada_exception_name_addr_1): Add "catch handlers" handling.
13527         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13528         Update all callers.
13529         (create_excep_cond_exprs) <ex>: Add parameter.
13530         (re_set_exception): Update create_excep_cond_exprs call.
13531         (print_it_exception, print_one_exception, print_mention_exception)
13532         (print_recreate_exception): Add "catch handler" handling.
13533         (allocate_location_catch_handlers, re_set_catch_handlers)
13534         (check_status_catch_handlers, print_it_catch_handlers)
13535         (print_one_catch_handlers, print_mention_catch_handlers)
13536         (print_recreate_catch_handlers): New function.
13537         (catch_handlers_breakpoint_ops): New variable.
13538         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13539         Add parameter.  Add "catch handler" handling.
13540         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13541         Add "catch handler" handling.
13542         (ada_exception_catchpoint_cond_string): Add "catch handler"
13543         handling.
13544         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13545         call.
13546         (catch_ada_handlers_command): New function.
13547         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13548         operations structure.
13549         (_initialize_ada_language): Add "catch handlers" command entry.
13550         * NEWS: Document "catch handlers" feature.
13551
13552 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13553
13554         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13555         account when creating the array type of the slice.
13556         (ada_value_slice): Likewise.
13557
13558 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13559
13560         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13561         New enum value.
13562         (create_array_type_with_stride): Add byte_stride_prop parameter.
13563         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13564         New parameter.  Update all callers in this file.
13565         (array_type_has_dynamic_stride): New function.
13566         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13567         of arrays with dynamic byte strides.
13568         * dwarf2read.c (read_array_type): Add support for dynamic
13569         DW_AT_byte_stride attributes.
13570
13571 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13572
13573         * dwarf2read.c (read_unspecified_type): Treat
13574         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13575
13576 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13577
13578         Update copyright year range in all GDB files.
13579
13580 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13581
13582         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13583         and gdb/testsuite/gdb.base/step-line.c.
13584
13585 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13586
13587         * copyright.py (main): Dump the contents of
13588         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13589         even if BY_HAND is empty.
13590
13591 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13592
13593         * top.c (print_gdb_version): Update Copyright year in version
13594         message.
13595
13596 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13597
13598         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13599
13600 For older changes see ChangeLog-2017.
13601 \f
13602 Local Variables:
13603 mode: change-log
13604 left-margin: 8
13605 fill-column: 74
13606 version-control: never
13607 coding: utf-8
13608 End: