Remove CPYCHECKER_RETURNS_BORROWED_REF
[external/binutils.git] / gdb / ChangeLog
1 2018-09-16  Tom Tromey  <tom@tromey.com>
2
3         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
4         Remove.
5
6 2018-09-16  Tom Tromey  <tom@tromey.com>
7
8         * python/python-internal.h (thread_to_thread_object): Change
9         return type.
10         * python/py-inferior.c (thread_to_thread_object): Return a new
11         reference.
12         (infpy_thread_from_thread_handle): Update.
13         * python/py-infthread.c (gdbpy_selected_thread): Update.
14         * python/py-stopevent.c (create_stop_event_object): Update.
15         * python/py-threadevent.c (py_get_event_thread): Return a new
16         reference.
17         (py_get_event_thread): Update.
18         * python/py-event.h (py_get_event_thread): Change return type.
19         * python/py-continueevent.c (create_continue_event_object):
20         Update.
21
22 2018-09-16  Tom Tromey  <tom@tromey.com>
23
24         * python/py-progspace.c (pspy_get_objfiles): Update.
25         * python/python-internal.h (objfile_to_objfile_object): Change
26         return type.
27         * python/py-newobjfileevent.c (create_new_objfile_event_object):
28         Update.
29         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
30         Update.
31         * python/python.c (gdbpy_get_current_objfile): Update.
32         (gdbpy_objfiles): Update.
33         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
34         Update.
35         (objfile_to_objfile_object): Return a new reference.
36         * python/py-symtab.c (stpy_get_objfile): Update.
37         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
38         Update.
39
40 2018-09-16  Tom Tromey  <tom@tromey.com>
41
42         * python/py-inferior.c (infpy_get_progspace): Update.
43         * python/python-internal.h (pspace_to_pspace_object): Change
44         return type.
45         * python/py-newobjfileevent.c
46         (create_clear_objfiles_event_object): Update.
47         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
48         Update.
49         * python/python.c (gdbpy_get_current_progspace): Update.
50         (gdbpy_progspaces): Update.
51         * python/py-progspace.c (pspace_to_pspace_object): Return a new
52         reference.
53         * python/py-objfile.c (objfpy_get_progspace): Update.
54         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
55         Update.
56
57 2018-09-16  Tom Tromey  <tom@tromey.com>
58
59         * python/lib/gdb/__init__.py (current_progspace, objfiles)
60         (solib_name, block_for_pc, find_pc_line): New functions.
61         (execute_unwinders): Update.
62         * python/py-block.c (gdbpy_block_for_pc): Remove.
63         * python/py-inferior.c (infpy_get_progspace): New function.
64         (inferior_object_getset) <progspace>: Add.
65         * python/py-progspace.c (pspy_objfiles): Rewrite.
66         (pspy_solib_name, pspy_block_for_pc)
67         (pspy_find_pc_line, pspy_is_valid): New functions.
68         (progspace_object_methods): Add entries for solib_name,
69         block_for_pc, find_pc_line, is_valid.
70         * python/python-internal.h (gdbpy_block_for_pc)
71         (build_objfiles_list): Don't declare.
72         * python/python.c: Don't include solib.h.
73         (gdbpy_solib_name, gdbpy_find_pc_line)
74         (gdbpy_get_current_progspace, build_objfiles_list)
75         (gdbpy_objfiles): Remove.
76         (GdbMethods) <current_progspace, objfiles, block_for_pc,
77         solib_name, find_pc_line>: Remove entries.
78
79 2018-09-16  Tom Tromey  <tom@tromey.com>
80
81         * top.c (new_ui_command): Use GNU style for metasyntactic
82         variables.
83         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
84         variables.
85         * maint.c (maintenance_translate_address): Remove "<>" around
86         text.
87         * interps.c (interpreter_exec_cmd): Use GNU style for
88         metasyntactic variables.
89         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
90         metasyntactic variables.
91         * tracepoint.c (tfind_range_command): Use GNU style for
92         metasyntactic variables.
93         (tfind_outside_command): Likewise.
94         (_initialize_tracepoint): Likewise.
95         * remote.c (extended_remote_target::create_inferior): Use GNU
96         style for metasyntactic variables.
97         * sparc64-tdep.c (adi_examine_command): Use GNU style for
98         metasyntactic variables.
99         (adi_assign_command): Likewise.
100
101 2018-09-16  Tom Tromey  <tom@tromey.com>
102
103         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
104         metasyntactic variables.  Print message if no disassembler options
105         are available.
106
107 2018-09-15  Tom Tromey  <tom@tromey.com>
108
109         * infcmd.c (get_inferior_args): Return const char *.
110         * inferior.h (get_inferior_args): Return type now const.
111         * linux-tdep.c (linux_fill_prpsinfo): Update.
112         * procfs.c (procfs_target::make_corefile_notes): Update.
113
114 2018-09-07  Tom Tromey  <tom@tromey.com>
115
116         * python/python.c (execute_gdb_command): Call bpstat_do_actions
117         inside the TRY.
118
119 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
120
121         * nios2-tdep.c (nios2_type_align): New.
122         (nios2_gdb_arch_init): Install type_align hook.
123
124 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
125
126         * eval.c (fake_method::fake_method): Call xzalloc directly for a
127         type that is neither object file owned, nor gdbarch owned.
128         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
129         gdbarch is non-NULL.
130         (alloc_type_instance): Allocate non-objfile owned types on the
131         gdbarch obstack.
132         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
133         using TYPE_ALLOC to ensure memory is allocated on the correct
134         obstack.
135         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
136         obstack, or the gdbarch obstack.
137         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
138
139 2018-09-14  Tom Tromey  <tom@tromey.com>
140
141         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
142         block.
143
144 2018-09-14  Tom Tromey  <tom@tromey.com>
145
146         * nat/fork-inferior.c (get_startup_shell): Remove "static".
147
148 2018-09-13  Tom Tromey  <tom@tromey.com>
149
150         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
151         static.
152
153 2018-09-13  Tom Tromey  <tom@tromey.com>
154
155         * exec.c (try_open_exec_file): Use std::string.
156
157 2018-09-13  Tom Tromey  <tom@tromey.com>
158
159         * utils.h (gdb_bfd_errmsg): Return std::string.
160         * exec.c (exec_file_attach): Update.
161         * compile/compile-object-load.c (compile_object_load): Update.
162         * utils.c (gdb_bfd_errmsg): Return std::string.
163
164 2018-09-13  Tom Tromey  <tom@tromey.com>
165
166         * procfs.c (struct procinfo_deleter): New.
167         (procinfo_up): New typedef.
168         (do_destroy_procinfo_cleanup): Remove.
169         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
170
171 2018-09-13  Tom Tromey  <tom@tromey.com>
172
173         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
174
175 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
176 2018-09-13  Tom Tromey  <tom@tromey.com>
177
178         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
179         (pspy_get_objfiles): New function.
180         (progspace_object_methods): New.
181         (pspace_object_type): Add tp_methods callback.
182         * python/python-internal.h (build_objfiles_list): New
183         declaration.
184         * python/python.c (build_objfiles_list): New function.
185         (gdbpy_objfiles): Implement using build_objfiles_list.
186         * NEWS: Mention the Progspace.objfiles method.
187
188 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
189
190         * python/py-inferior.c (infpy_get_progspace): New function.
191         (inferior_object_getset): Add progspace property.
192         * NEWS: Mention the new property.
193
194 2018-09-13  Tom Tromey  <tom@tromey.com>
195
196         PR rust/23650:
197         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
198
199 2018-09-13  Tom Tromey  <tom@tromey.com>
200
201         PR rust/23626:
202         * rust-lang.c (rust_enum_variant): Now static.
203         (rust_empty_enum_p): New function.
204         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
205         Handle empty enum.
206
207 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
208
209         * python/py-inferior.c (infpy_repr): New.
210         (inferior_object_type): Register infpy_repr.
211         * python/py-objfile.c (objfpy_repr): New.
212         (objfile_object_type): Register objfpy_repr.
213
214 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
215
216         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
217
218 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
219
220         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
221         typo.
222
223 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
224
225         * common/common-utils.c: Don't include '<sys/stat.h>'.
226         (is_regular_file): Move to...
227         * common/filestuff.c (is_regular_file): ... here.
228         * common/common-utils.h (is_regular_file): Move to...
229         * common/filestuff.h (is_regular_file): ... here.
230
231 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
232
233         * skip.c (debug_skip): New variable.
234         (skiplist_entry::do_skip_file_p): Add debug output.
235         (skiplist_entry::do_skip_gfile_p): Likewise.
236         (skiplist_entry::skip_function_p): Likewise.
237         (_initialize_step_skip): Create debug command.
238         * NEWS: Mention set/show debug skip.
239
240 2018-09-11  Xavier Roirand  <roirand@adacore.com>
241
242         * darwin-nat.c (should_disable_startup_with_shell):
243         New function.
244         (darwin_nat_target::create_inferior): Add call.
245
246 2018-09-11  Xavier Roirand  <roirand@adacore.com>
247
248         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
249         inf_port, msg_state>: Initialize.
250         (struct darwin_thread_info) <signaled, single_step>: Change
251         type and initialize.
252         (struct darwin_thread_info) <event>: Initialize.
253
254 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
255
256         PR gdb/23555
257         PR gdb/23558
258         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
259         guesses.
260
261 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
262
263         Revert:
264         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
265
266         PR gdb/23555
267         PR gdb/23558
268         * gnulib/aclocal.m4: Regenerate.
269         * gnulib/config.in: Regenerate.
270         * gnulib/configure: Regenerate.
271         * gnulib/import/Makefile.am: Update.
272         * gnulib/import/Makefile.in: Update.
273         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
274         * gnulib/import/_Noreturn.h: ... this.
275         * gnulib/import/alloca.in.h: Update.
276         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
277         * gnulib/import/arg-nonnull.h: ... this.
278         * gnulib/import/assure.h: Update.
279         * gnulib/import/at-func.c: Update.
280         * gnulib/import/basename-lgpl.c: Update.
281         * gnulib/import/extra/snippet/c++defs.h: Rename to...
282         * gnulib/import/c++defs.h: ... this.
283         * gnulib/import/canonicalize-lgpl.c: Update.
284         * gnulib/import/cdefs.h: Update.
285         * gnulib/import/chdir-long.c: Update.
286         * gnulib/import/chdir-long.h: Update.
287         * gnulib/import/cloexec.c: Update.
288         * gnulib/import/cloexec.h: Update.
289         * gnulib/import/close.c: Update.
290         * gnulib/import/closedir.c: Update.
291         * gnulib/import/config.charset: Update.
292         * gnulib/import/dirent-private.h: Update.
293         * gnulib/import/dirent.in.h: Update.
294         * gnulib/import/dirfd.c: Update.
295         * gnulib/import/dirname-lgpl.c: Update.
296         * gnulib/import/dirname.h: Update.
297         * gnulib/import/dosname.h: Update.
298         * gnulib/import/dup-safer-flag.c: Update.
299         * gnulib/import/dup-safer.c: Update.
300         * gnulib/import/dup.c: Update.
301         * gnulib/import/dup2.c: Update.
302         * gnulib/import/errno.in.h: Update.
303         * gnulib/import/error.c: Update.
304         * gnulib/import/error.h: Update.
305         * gnulib/import/exitfail.c: Update.
306         * gnulib/import/exitfail.h: Update.
307         * gnulib/import/extra/update-copyright: Update.
308         * gnulib/import/fchdir.c: Update.
309         * gnulib/import/fcntl.c: Update.
310         * gnulib/import/fcntl.in.h: Update.
311         * gnulib/import/fd-hook.c: Update.
312         * gnulib/import/fd-hook.h: Update.
313         * gnulib/import/fd-safer-flag.c: Update.
314         * gnulib/import/fd-safer.c: Update.
315         * gnulib/import/fdopendir.c: Update.
316         * gnulib/import/filename.h: Update.
317         * gnulib/import/filenamecat-lgpl.c: Update.
318         * gnulib/import/filenamecat.h: Update.
319         * gnulib/import/flexmember.h: Update.
320         * gnulib/import/float+.h: Update.
321         * gnulib/import/float.c: Update.
322         * gnulib/import/float.in.h: Update.
323         * gnulib/import/fnmatch.c: Update.
324         * gnulib/import/fnmatch.in.h: Update.
325         * gnulib/import/fnmatch_loop.c: Update.
326         * gnulib/import/fpucw.h: Update.
327         * gnulib/import/frexp.c: Update.
328         * gnulib/import/frexpl.c: Update.
329         * gnulib/import/fstat.c: Update.
330         * gnulib/import/fstatat.c: Update.
331         * gnulib/import/getcwd-lgpl.c: Update.
332         * gnulib/import/getcwd.c: Update.
333         * gnulib/import/getdtablesize.c: Update.
334         * gnulib/import/getlogin_r.c: Update.
335         * gnulib/import/getprogname.c: Update.
336         * gnulib/import/getprogname.h: Update.
337         * gnulib/import/gettext.h: Update.
338         * gnulib/import/gettimeofday.c: Update.
339         * gnulib/import/glob-libc.h: Update.
340         * gnulib/import/glob.c: Update.
341         * gnulib/import/glob.in.h: Update.
342         * gnulib/import/glob_internal.h: Update.
343         * gnulib/import/glob_pattern_p.c: Update.
344         * gnulib/import/globfree.c: Update.
345         * gnulib/import/hard-locale.c: Update.
346         * gnulib/import/hard-locale.h: Update.
347         * gnulib/import/intprops.h: Update.
348         * gnulib/import/inttypes.in.h: Update.
349         * gnulib/import/isnan.c: Update.
350         * gnulib/import/isnand-nolibm.h: Update.
351         * gnulib/import/isnand.c: Update.
352         * gnulib/import/isnanl-nolibm.h: Update.
353         * gnulib/import/isnanl.c: Update.
354         * gnulib/import/itold.c: Update.
355         * gnulib/import/libc-config.h: Update.
356         * gnulib/import/limits.in.h: Update.
357         * gnulib/import/localcharset.c: Update.
358         * gnulib/import/localcharset.h: Update.
359         * gnulib/import/localtime-buffer.c: Update.
360         * gnulib/import/localtime-buffer.h: Update.
361         * gnulib/import/lstat.c: Update.
362         * gnulib/import/m4/00gnulib.m4: Update.
363         * gnulib/import/m4/__inline.m4: Update.
364         * gnulib/import/m4/absolute-header.m4: Update.
365         * gnulib/import/m4/alloca.m4: Update.
366         * gnulib/import/m4/builtin-expect.m4: Update.
367         * gnulib/import/m4/canonicalize.m4: Update.
368         * gnulib/import/m4/chdir-long.m4: Update.
369         * gnulib/import/m4/close.m4: Update.
370         * gnulib/import/m4/closedir.m4: Update.
371         * gnulib/import/m4/configmake.m4: Update.
372         * gnulib/import/m4/d-ino.m4: Update.
373         * gnulib/import/m4/d-type.m4: Update.
374         * gnulib/import/m4/dirent_h.m4: Update.
375         * gnulib/import/m4/dirfd.m4: Update.
376         * gnulib/import/m4/dirname.m4: Update.
377         * gnulib/import/m4/double-slash-root.m4: Update.
378         * gnulib/import/m4/dup.m4: Update.
379         * gnulib/import/m4/dup2.m4: Update.
380         * gnulib/import/m4/eealloc.m4: Update.
381         * gnulib/import/m4/environ.m4: Update.
382         * gnulib/import/m4/errno_h.m4: Update.
383         * gnulib/import/m4/error.m4: Update.
384         * gnulib/import/m4/exponentd.m4: Update.
385         * gnulib/import/m4/exponentl.m4: Update.
386         * gnulib/import/m4/extensions.m4: Update.
387         * gnulib/import/m4/extern-inline.m4: Update.
388         * gnulib/import/m4/fchdir.m4: Update.
389         * gnulib/import/m4/fcntl-o.m4: Update.
390         * gnulib/import/m4/fcntl.m4: Update.
391         * gnulib/import/m4/fcntl_h.m4: Update.
392         * gnulib/import/m4/fdopendir.m4: Update.
393         * gnulib/import/m4/filenamecat.m4: Update.
394         * gnulib/import/m4/flexmember.m4: Update.
395         * gnulib/import/m4/float_h.m4: Update.
396         * gnulib/import/m4/fnmatch.m4: Update.
397         * gnulib/import/m4/fnmatch_h.m4: Update.
398         * gnulib/import/m4/fpieee.m4: Update.
399         * gnulib/import/m4/frexp.m4: Update.
400         * gnulib/import/m4/frexpl.m4: Update.
401         * gnulib/import/m4/fstat.m4: Update.
402         * gnulib/import/m4/fstatat.m4: Update.
403         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
404         * gnulib/import/m4/getcwd-path-max.m4: Update.
405         * gnulib/import/m4/getcwd.m4: Update.
406         * gnulib/import/m4/getdtablesize.m4: Update.
407         * gnulib/import/m4/getlogin.m4: Update.
408         * gnulib/import/m4/getlogin_r.m4: Update.
409         * gnulib/import/m4/getpagesize.m4: Update.
410         * gnulib/import/m4/getprogname.m4: Update.
411         * gnulib/import/m4/gettimeofday.m4: Update.
412         * gnulib/import/m4/glibc21.m4: Update.
413         * gnulib/import/m4/glob.m4: Update.
414         * gnulib/import/m4/glob_h.m4: Update.
415         * gnulib/import/m4/gnulib-cache.m4: Update.
416         * gnulib/import/m4/gnulib-common.m4: Update.
417         * gnulib/import/m4/gnulib-comp.m4: Update.
418         * gnulib/import/m4/gnulib-tool.m4: Update.
419         * gnulib/import/m4/hard-locale.m4: Update.
420         * gnulib/import/m4/include_next.m4: Update.
421         * gnulib/import/m4/inttypes-pri.m4: Update.
422         * gnulib/import/m4/inttypes.m4: Update.
423         * gnulib/import/m4/isnand.m4: Update.
424         * gnulib/import/m4/isnanl.m4: Update.
425         * gnulib/import/m4/largefile.m4: Update.
426         * gnulib/import/m4/limits-h.m4: Update.
427         * gnulib/import/m4/localcharset.m4: Update.
428         * gnulib/import/m4/locale-fr.m4: Update.
429         * gnulib/import/m4/locale-ja.m4: Update.
430         * gnulib/import/m4/locale-zh.m4: Update.
431         * gnulib/import/m4/localtime-buffer.m4: Update.
432         * gnulib/import/m4/longlong.m4: Update.
433         * gnulib/import/m4/lstat.m4: Update.
434         * gnulib/import/m4/malloc.m4: Update.
435         * gnulib/import/m4/malloca.m4: Update.
436         * gnulib/import/m4/math_h.m4: Update.
437         * gnulib/import/m4/mbrtowc.m4: Update.
438         * gnulib/import/m4/mbsinit.m4: Update.
439         * gnulib/import/m4/mbsrtowcs.m4: Update.
440         * gnulib/import/m4/mbstate_t.m4: Update.
441         * gnulib/import/m4/memchr.m4: Update.
442         * gnulib/import/m4/memmem.m4: Update.
443         * gnulib/import/m4/mempcpy.m4: Update.
444         * gnulib/import/m4/memrchr.m4: Update.
445         * gnulib/import/m4/mkdir.m4: Update.
446         * gnulib/import/m4/mkstemp.m4: Update.
447         * gnulib/import/m4/mmap-anon.m4: Update.
448         * gnulib/import/m4/mode_t.m4: Update.
449         * gnulib/import/m4/msvc-inval.m4: Update.
450         * gnulib/import/m4/msvc-nothrow.m4: Update.
451         * gnulib/import/m4/multiarch.m4: Update.
452         * gnulib/import/m4/nocrash.m4: Update.
453         * gnulib/import/m4/off_t.m4: Update.
454         * gnulib/import/m4/onceonly.m4: Update.
455         * gnulib/import/m4/open-cloexec.m4: Update.
456         * gnulib/import/m4/open.m4: Update.
457         * gnulib/import/m4/openat.m4: Update.
458         * gnulib/import/m4/opendir.m4: Update.
459         * gnulib/import/m4/pathmax.m4: Update.
460         * gnulib/import/m4/rawmemchr.m4: Update.
461         * gnulib/import/m4/readdir.m4: Update.
462         * gnulib/import/m4/readlink.m4: Update.
463         * gnulib/import/m4/realloc.m4: Update.
464         * gnulib/import/m4/rename.m4: Update.
465         * gnulib/import/m4/rewinddir.m4: Update.
466         * gnulib/import/m4/rmdir.m4: Update.
467         * gnulib/import/m4/save-cwd.m4: Update.
468         * gnulib/import/m4/secure_getenv.m4: Update.
469         * gnulib/import/m4/setenv.m4: Update.
470         * gnulib/import/m4/signal_h.m4: Update.
471         * gnulib/import/m4/ssize_t.m4: Update.
472         * gnulib/import/m4/stat-time.m4: Update.
473         * gnulib/import/m4/stat.m4: Update.
474         * gnulib/import/m4/std-gnu11.m4: Update.
475         * gnulib/import/m4/stdbool.m4: Update.
476         * gnulib/import/m4/stddef_h.m4: Update.
477         * gnulib/import/m4/stdint.m4: Update.
478         * gnulib/import/m4/stdio_h.m4: Update.
479         * gnulib/import/m4/stdlib_h.m4: Update.
480         * gnulib/import/m4/strchrnul.m4: Update.
481         * gnulib/import/m4/strdup.m4: Update.
482         * gnulib/import/m4/strerror.m4: Update.
483         * gnulib/import/m4/string_h.m4: Update.
484         * gnulib/import/m4/strstr.m4: Update.
485         * gnulib/import/m4/strtok_r.m4: Update.
486         * gnulib/import/m4/sys_socket_h.m4: Update.
487         * gnulib/import/m4/sys_stat_h.m4: Update.
488         * gnulib/import/m4/sys_time_h.m4: Update.
489         * gnulib/import/m4/sys_types_h.m4: Update.
490         * gnulib/import/m4/tempname.m4: Update.
491         * gnulib/import/m4/time_h.m4: Update.
492         * gnulib/import/m4/unistd-safer.m4: Update.
493         * gnulib/import/m4/unistd_h.m4: Update.
494         * gnulib/import/m4/warn-on-use.m4: Update.
495         * gnulib/import/m4/wchar_h.m4: Update.
496         * gnulib/import/m4/wchar_t.m4: Update.
497         * gnulib/import/m4/wctype_h.m4: Update.
498         * gnulib/import/m4/wint_t.m4: Update.
499         * gnulib/import/malloc.c: Update.
500         * gnulib/import/malloc/scratch_buffer.h: Update.
501         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
502         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
503         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
504         * gnulib/import/malloca.c: Update.
505         * gnulib/import/malloca.h: Update.
506         * gnulib/import/malloca.valgrind: Update.
507         * gnulib/import/math.in.h: Update.
508         * gnulib/import/mbrtowc.c: Update.
509         * gnulib/import/mbsinit.c: Update.
510         * gnulib/import/mbsrtowcs-impl.h: Update.
511         * gnulib/import/mbsrtowcs-state.c: Update.
512         * gnulib/import/mbsrtowcs.c: Update.
513         * gnulib/import/memchr.c: Update.
514         * gnulib/import/memmem.c: Update.
515         * gnulib/import/mempcpy.c: Update.
516         * gnulib/import/memrchr.c: Update.
517         * gnulib/import/mkdir.c: Update.
518         * gnulib/import/mkstemp.c: Update.
519         * gnulib/import/msvc-inval.c: Update.
520         * gnulib/import/msvc-inval.h: Update.
521         * gnulib/import/msvc-nothrow.c: Update.
522         * gnulib/import/msvc-nothrow.h: Update.
523         * gnulib/import/open.c: Update.
524         * gnulib/import/openat-die.c: Update.
525         * gnulib/import/openat-priv.h: Update.
526         * gnulib/import/openat-proc.c: Update.
527         * gnulib/import/openat.c: Update.
528         * gnulib/import/openat.h: Update.
529         * gnulib/import/opendir.c: Update.
530         * gnulib/import/pathmax.h: Update.
531         * gnulib/import/pipe-safer.c: Update.
532         * gnulib/import/rawmemchr.c: Update.
533         * gnulib/import/readdir.c: Update.
534         * gnulib/import/readlink.c: Update.
535         * gnulib/import/realloc.c: Update.
536         * gnulib/import/ref-add.sin: Update.
537         * gnulib/import/ref-del.sin: Update.
538         * gnulib/import/rename.c: Update.
539         * gnulib/import/rewinddir.c: Update.
540         * gnulib/import/rmdir.c: Update.
541         * gnulib/import/same-inode.h: Update.
542         * gnulib/import/save-cwd.c: Update.
543         * gnulib/import/save-cwd.h: Update.
544         * gnulib/import/scratch_buffer.h: Update.
545         * gnulib/import/secure_getenv.c: Update.
546         * gnulib/import/setenv.c: Update.
547         * gnulib/import/signal.in.h: Update.
548         * gnulib/import/stat-time.c: Update.
549         * gnulib/import/stat-time.h: Update.
550         * gnulib/import/stat-w32.c: Update.
551         * gnulib/import/stat-w32.h: Update.
552         * gnulib/import/stat.c: Update.
553         * gnulib/import/stdbool.in.h: Update.
554         * gnulib/import/stddef.in.h: Update.
555         * gnulib/import/stdint.in.h: Update.
556         * gnulib/import/stdio.in.h: Update.
557         * gnulib/import/stdlib.in.h: Update.
558         * gnulib/import/str-two-way.h: Update.
559         * gnulib/import/strchrnul.c: Update.
560         * gnulib/import/strdup.c: Update.
561         * gnulib/import/streq.h: Update.
562         * gnulib/import/strerror-override.c: Update.
563         * gnulib/import/strerror-override.h: Update.
564         * gnulib/import/strerror.c: Update.
565         * gnulib/import/string.in.h: Update.
566         * gnulib/import/stripslash.c: Update.
567         * gnulib/import/strnlen1.c: Update.
568         * gnulib/import/strnlen1.h: Update.
569         * gnulib/import/strstr.c: Update.
570         * gnulib/import/strtok_r.c: Update.
571         * gnulib/import/sys_stat.in.h: Update.
572         * gnulib/import/sys_time.in.h: Update.
573         * gnulib/import/sys_types.in.h: Update.
574         * gnulib/import/tempname.c: Update.
575         * gnulib/import/tempname.h: Update.
576         * gnulib/import/time.in.h: Update.
577         * gnulib/import/unistd--.h: Update.
578         * gnulib/import/unistd-safer.h: Update.
579         * gnulib/import/unistd.in.h: Update.
580         * gnulib/import/unsetenv.c: Update.
581         * gnulib/import/verify.h: Update.
582         * gnulib/import/extra/snippet/warn-on-use.h: Update.
583         * gnulib/import/wchar.in.h: Update.
584         * gnulib/import/wctype.in.h: Update.
585         * gnulib/import/xalloc-oversized.h: Update.
586         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
587         "53e2c179f26a890fa6685af4b6c1397ee370433b".
588
589 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
590
591         * record-btrace.c (get_thread_current_frame): Remove
592         old_inferior_ptid.
593
594 2018-09-10  Jerome Guitton  <guitton@adacore.com>
595
596         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
597         with check_tag to 1 if and only if the type is tagged and the
598         component being searched cannot been found in the current
599         view. Otherwise, always call ada_to_fixed_type with
600         check_tag to 0.
601
602 2018-09-10  Xavier Roirand  <roirand@adacore.com>
603
604         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
605         declaration.
606         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
607         * ada-varobj.c (ada_varobj_get_number_of_children,
608         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
609
610 2018-09-10  Xavier Roirand  <roirand@adacore.com>
611
612         * ada-valprint.c (ada_value_print): Use type instead of
613         enclosing type.
614
615 2018-09-10  Xavier Roirand  <roirand@adacore.com>
616
617         * ada-lang.c (ada_value_subscript): Handle case when parameter is
618         an array of access to unconstrained array.
619
620 2018-09-10  Xavier Roirand  <roirand@adacore.com>
621
622         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
623         (ada_check_typedef): Use it.
624
625 2018-09-10  Xavier Roirand  <roirand@adacore.com>
626
627         * ada-varobj.c (ada_varobj_describe_struct_child)
628         (ada_varobj_describe_child): Handle union case like struct one.
629
630 2018-09-10  Tom Tromey  <tom@tromey.com>
631
632         PR python/18380:
633         * python/python.c (_initialize_python): Make example in "python"
634         help work in Python 3.
635
636 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
637
638         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
639         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
640         $(EXEEXT) to the script, as it is not a program.
641
642 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
643
644         * python/py-prettyprint.c (pretty_print_one_value): Return
645         gdbpy_ref<>.
646         (print_string_repr): Adjust.
647         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
648         * python/python-internal.h (apply_varobj_pretty_printer): Return
649         gdbpy_ref<>.
650         * varobj.c (varobj_value_get_print_value): Adjust.
651
652 2018-09-08  Tom Tromey  <tom@tromey.com>
653
654         PR python/16047:
655         * python/py-prettyprint.c (pretty_print_one_value): Check for
656         to_string method.
657
658 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
659
660         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
661         replace_operator_with_call.
662
663 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
664
665         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
666
667 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
668
669         * ada-typeprint.c (print_range): Print the bounds using TYPE
670         rather than its TYPE_TARGET_TYPE.
671
672 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
673
674         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
675         call to ada_to_fixed_value_create.
676
677 2018-09-08  Jerome Guitton  <guitton@adacore.com>
678
679         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
680
681 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
682
683         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
684         by calls to error.
685
686 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
687
688         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
689         Move update of loop variable "fi".
690
691 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
692
693         * ada-lang.c (value_assign_to_component): In the case of
694         big-endian targets, extract the bits of the given VAL
695         using an src_offset of zero if container is not a scalar.
696
697 2018-09-06  Simon Ser  <contact@emersion.fr>
698
699         PR gdb/23105
700         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
701         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
702         * fbsd-tdep.c (fbsd_make_note_desc): New.
703         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
704         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
705         * target.h (enum target_object) Add FreeBSD-specific
706         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
707
708 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
709
710         * compile/compile-c.h (generate_c_for_variable_locations):
711         Change reference to pointer.
712         * compile/compile-c-support.c (compile_program) <compute>:
713         Likewise.
714         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
715         (generate_c_for_for_one_variable): Likewise
716         (generate_c_for_variable_locations): Likewise
717         * compile/compile-c-types.c (compile_c_instance::convert_type):
718         Likewise
719         * compile/compile-cplus-symbols.c (convert_one_symbol):
720         std::move the scope passed to enter_scope.
721         * compile/compile-cplus-types.c
722         (compile_cplus_instance::enter_scope): Make parameter
723         rvalue-reference.
724         (compile_cplus_instance::new_scope): Change reference to
725         pointer.
726         (compile_cplus_instance::convert_type): Likewise
727         (compile_cplus_convert_typedef): std::move the scope passed to
728         enter_scope.
729         (compile_cplus_convert_struct_or_union): Likewise.
730         (compile_cplus_convert_enum): Likewise.
731         (compile_cplus_convert_namespace): Likewise.
732         * compile/compile-cplus.h (compile_cplus_instance)
733         <enter_scope>: Make parameter rvalue-reference.
734         * compile/compile-internal.h (compile_instance)
735         <get_cached_type>: Likewise
736         * compile/compile-loc2c.c (push): Likewise
737         (pushf): Likewise
738         (unary): Likewise
739         (binary): Likewise
740         (print_label): Likewise
741         (pushf_register_address): Likewise
742         (pushf_register): Likewise
743         (do_compile_dwarf_expr_to_c): Likewise
744         (compile_dwarf_expr_to_c): Likewise
745         (compile_dwarf_bounds_to_c): Likewise
746         * compile/compile.c (compile_instance::get_cached_type):
747         Likewise
748         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
749         (compile_dwarf_bounds_to_c): Likewise
750         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
751         (dwarf2_compile_property_to_c): Likewise
752         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
753         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
754         Likewise
755
756 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
757
758         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
759         * tui/tui-data.c (init_content_element): Don't initialize it.
760
761 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
762
763         * tui/tui-data.h (struct tui_win_info)
764         <detail::opaque>: Remove.
765         * tui/tui-data.c (init_win_info): Remove assignment.
766
767 2018-09-05  Tom Tromey  <tom@tromey.com>
768
769         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
770         -Wformat-nonliteral.
771         * target-float.c (host_float_ops<T>::to_string)
772         (host_float_ops<T>::from_string): Use
773         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
774         * configure: Rebuild.
775
776 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
777
778         * printcmd.c (printf_c_string): Use
779         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
780         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
781
782 2018-09-05  Tom Tromey  <tom@tromey.com>
783
784         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
785
786 2018-09-05  Tom de Vries  <tdevries@suse.de>
787
788         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
789         with resolve_abstract_p == true.
790         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
791         defaulting to false. Propagate resolve_abstract_p to
792         dwarf2_fetch_die_loc_sect_off.
793         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
794         parameter, defaulting to false.
795         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
796         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
797         parameter.
798         * dwarf2read.h (struct die_info): Forward-declare.
799         (die_info_ptr): New typedef.
800         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
801
802 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
803
804         GDB 8.2 released.
805
806 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
807             Pedro Alves  <palves@redhat.com>
808
809         * gnulib/Makefile.in (aclocal_m4_deps): Move to
810         "aclocal-m4-deps.mk".  Include file here.
811         $(srcdir)/aclocal.m4: Add "configure.ac".
812         * gnulib/aclocal-m4-deps.mk: New file.
813         * gnulib/update-gnulib.sh: Automatically update
814         "aclocal-m4-deps.mk".
815
816 2018-09-04  Tom Tromey  <tom@tromey.com>
817
818         * configure: Rebuild.
819         * configure.ac: Remove multi-ice code.
820
821 2018-09-04  Tom Tromey  <tom@tromey.com>
822
823         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
824         (ada-exp.o): Update.
825
826 2018-09-04  Tom Tromey  <tom@tromey.com>
827
828         * Makefile.in (printcmd.o, target-float.o): Remove.
829         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
830
831 2018-09-04  Tom Tromey  <tom@tromey.com>
832
833         * gnulib/Makefile.in: Remove obsolete comment.
834         * Makefile.in: Remove obsolete comment.
835
836 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
837
838         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
839         line with '+'.
840
841 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
842
843         * riscv-tdep.c: Add 'prologue-value.h' include.
844         (struct riscv_unwind_cache): New struct.
845         (riscv_debug_unwinder): New global.
846         (riscv_scan_prologue): Update arguments, capture register details
847         from prologue scan.
848         (riscv_skip_prologue): Reformat arguments line, move end of
849         prologue calculation into riscv_scan_prologue.
850         (riscv_frame_cache): Update return type, create
851         riscv_unwind_cache, scan the prologue, and fill in remaining cache
852         details.
853         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
854         (riscv_frame_prev_register): Use the trad_frame within the
855         riscv_unwind_cache.
856         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
857         flag.
858
859 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
860
861         * trad-frame.h (trad_frame_set_realreg): Declare.
862         (trad_frame_set_addr): Declare.
863         * trad-frame.c (trad_frame_set_realreg): Define new function.
864         (trad_frame_set_addr): Define new function.
865         (trad_frame_set_reg_realreg): Use new function.
866         (trad_frame_set_reg_addr): Use new function.
867
868 2018-09-01  Keith Seitz  <keiths@redhat.com>
869
870         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
871         pulongest instead of "%lld".
872         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
873         ATTRIBUTE_UNUSED.
874
875 2018-08-31  Tom Tromey  <tom@tromey.com>
876
877         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
878         variant part type.
879
880 2018-08-31  Pedro Alves  <palves@redhat.com>
881
882         * gdbarch.h: Regenerate.
883
884 2018-08-31  Pedro Alves  <palves@redhat.com>
885
886         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
887         * target.h (Hardware watchpoint interfaces): Describe
888         continuable/steppable/non-steppable watchpoints.
889         * gdbarch.h, gdbarch.c: Regenerate.
890
891 2018-08-31  Pedro Alves  <palves@redhat.com>
892
893         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
894         Delete.
895         * s390-linux-nat.c
896         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
897         * target.h (target_ops::have_continuable_watchpoint): Delete.
898         (target_have_continuable_watchpoint): Delete.
899         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
900         * target-delegates.c: Regenerate.
901
902 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
903
904         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
905         the files present in "gnulib/import/m4/".
906
907 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
908
909         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
910         c.sw, c.swsp, and c.sdsp.
911
912 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
913
914         * riscv-tdep.c (struct riscv_inferior_data): Delete.
915         (riscv_read_misa_reg): Don't cache value read into inferior data.
916         (riscv_new_inferior_data): Delete.
917         (riscv_inferior_data_cleanup): Delete.
918         (riscv_inferior_data): Delete.
919         (riscv_invalidate_inferior_data): Delete.
920         (_initialize_riscv_tdep): Remove initialisation of inferior data.
921
922 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
923
924         * compile/compile-cplus-types.c
925         (compile_cplus_instance::leave_scope): Take the address of scope
926         object.
927         (compile_cplus_instance::convert_qualified_base): Compare quals
928         to 0.
929
930 2018-08-30  Keith Seitz  <keiths@redhat.com>
931
932         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
933         Use "%s" and host_address_to_string instead of "%p" in printf.
934
935 2018-08-29  Keith Seitz  <keiths@redhat.com>
936
937         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
938         and compile-cplus-types.c.
939         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
940         * c-lang.c (cplus_language_defn): Set C++ compile functions.
941         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
942         Declare.
943         * compile/compile-c-support.c: Include compile-cplus.h.
944         (load_libcompile): Templatize.
945         (get_compile_context): "New" function.
946         (c_get_compile_context): Use get_compile_context.
947         (cplus_get_compile_context): New function.
948         (cplus_push_user_expression, cplus_pop_user_expression)
949         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
950         (cplus_compute_program): Define new structs/functions.
951         * compile/compile-cplus-symmbols.c: New file.
952         * compile/compile-cplus-types.c: New file.
953         * compile/compile-cplus.h: New file.
954         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
955         Declare.
956         * compile/compile-object-load.c (get_out_value_type): Use
957         strncmp_iw when comparing symbol names.
958         (compile_object_load): Add mst_bss and mst_data.
959         * compile/compile.c (_initialize_compile): Remove
960         -Wno-implicit-function-declaration from `compile_args'.
961         * compile/gcc-cp-plugin.h: New file.
962         * NEWS: Mention C++ compile support and new debug options.
963
964 2018-08-29  Keith Seitz  <keiths@redhat.com>
965
966         * linespec.c (collect_info::add_symbol): Make virtual.
967         (struct symbol_searcher_collect_info): New struct.
968         (symbol_searcher::find_all_symbols): New method.
969         * symtab.h (class symbol_searcher): New class.
970
971 2018-08-29  Keith Seitz  <keiths@redhat.com>
972
973         * linespec.c (struct linespec) <function_symbols, label_symbols>:
974         Change to vector of block_symbol.  Update all users.
975         (struct collect_info) <symbols>: Likewise.
976         (collect_info::add_symbol): Take block_symbol as argument.
977         Update all callers.
978         (decode_compound_collector) <m_symbols>: Change type to vector
979         of block_symbol.  Update all users.
980         (decode_compound_collector::operator ()): Change parameter type
981         to block_symbol.
982         (find_method, find_function_symbols, find_linespec_symbols)
983         (find_label_symbols_in_block, find_label_symbols): Change symbol
984         vectors to block_symbol vectors.
985         * symtab.h (symbol_found_callback_ftype): Change parameter type to
986         block_symbol.
987
988 2018-08-29  Keith Seitz  <keiths@redhat.com>
989
990         * linespec.c (symbolp): Remove typedef and VEC definitions.
991         (bound_minimal_symbol_d): Likewise.
992
993 2018-08-29  Keith Seitz  <keiths@redhat.com>
994
995         * linespec.c (decode_compound_collector::decode_compound_collector):
996         Remove initialization for `m_symtabs'.
997         (decode_compound_collector::release_symbols): Change return type
998         to std::vector.  Update all callers.
999         (class decode_compound_collector) <m_symbols>: Change type to
1000         std::vector.
1001         (lookup_prefix_sym): Change return type to std::vector.  Update all
1002         callers.
1003         (compare_symbols): Remove.
1004         (std_compare_symbols): Rename to `compare_symbols'.
1005         (find_method): Change `sym_classes' parameter to std::vector.
1006         Update all callers.  Use std::sort to sort sym_classes.
1007         (find_linespec_symbols): Remove cleanup.
1008
1009 2018-08-29  Keith Seitz  <keiths@redhat.com>
1010
1011         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1012         std::vector.  Update all users.
1013         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1014         (struct collect_info) <minimal_symbols>: Likewise.
1015         (compare_msymbols): Return bool.  Change parameters to const
1016         bound_minimal_symbol references.
1017         (find_method, find_function_symbols, find_linespec_symbols): Change
1018         `minsyms' parameter to std::vector.  Update all callers.
1019
1020 2018-08-29  Keith Seitz  <keiths@redhat.com>
1021
1022         * linespec.c (struct linespec) <label_symbols>: Change type to
1023         std::vector.  Update all users.
1024         (find_label_symbols_in_block): Change `result' parameter to
1025         std::vector.  Update all callers.
1026         (find_label_symbols): Return std::vector.  Update all callers.
1027
1028 2018-08-29  Keith Seitz  <keiths@redhat.com>
1029
1030         * linespec.c (struct linespec) <function_symbols>: Change type to
1031         std::vector.  Update all users.
1032         (struct collect_info) <function_symbols>: Likewise.
1033         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1034         (std_compare_symbols): New function.
1035         (find_method, find_function_symbols, find_linespec_symbols)
1036         (find_label_symbols_in_block): Change `symbols' parameter to
1037         std::vector.  Update all callers.
1038         (find_label_symbols): Likewise for `function_symbols' and
1039         `label_funcs_ret'.
1040
1041 2018-08-29  Keith Seitz  <keiths@redhat.com>
1042
1043         * linespec.c (symtab_vector_up): Define.
1044         (struct linespec) <file_symtabs>: Change type to std::vector *.
1045         Update all uses.
1046         (struct collect_info) <file_symtabs>: Likewise.
1047         (collect_symtabs_from_filename): Return symtab_vector_up.
1048         Update all callers.
1049         (decode_objc): Remove cleanup.
1050         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1051         (symtab_collector::release_symtabs): Return symtab_vector_up.
1052         Update all callers.
1053         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1054         Update all users.
1055         (collect_symtabs_from_filename, symtabs_from_filename): Return
1056         symtab_vector_up.  Update all callers.
1057
1058 2018-08-29  Tom Tromey  <tom@tromey.com>
1059
1060         * csky-tdep.c (csky_analyze_prologue): Use
1061         core_addr_to_string_nz.
1062
1063 2018-08-29  Tom Tromey  <tom@tromey.com>
1064
1065         * windows-nat.c (struct xlate_exception) <them>: Change type to
1066         DWORD.
1067         (xlate): Fix formatting.  Remove last entry.
1068         (struct xlate_exception, xlate): Comment out.
1069         (windows_nat_target::resume): Use ranged for.
1070
1071 2018-08-29  Jim Wilson  <jimw@sifive.com>
1072
1073         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1074         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1075         of NT_PRFPREG.
1076         (riscv_linux_nat_target::store_registers): Likewise.
1077
1078 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1079
1080         PR gdb/23555
1081         PR gdb/23558
1082         * gnulib/aclocal.m4: Regenerate.
1083         * gnulib/config.in: Regenerate.
1084         * gnulib/configure: Regenerate.
1085         * gnulib/import/Makefile.am: Update.
1086         * gnulib/import/Makefile.in: Update.
1087         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1088         * gnulib/import/_Noreturn.h: ... this.
1089         * gnulib/import/alloca.in.h: Update.
1090         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1091         * gnulib/import/arg-nonnull.h: ... this.
1092         * gnulib/import/assure.h: Update.
1093         * gnulib/import/at-func.c: Update.
1094         * gnulib/import/basename-lgpl.c: Update.
1095         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1096         * gnulib/import/c++defs.h: ... this.
1097         * gnulib/import/canonicalize-lgpl.c: Update.
1098         * gnulib/import/cdefs.h: Update.
1099         * gnulib/import/chdir-long.c: Update.
1100         * gnulib/import/chdir-long.h: Update.
1101         * gnulib/import/cloexec.c: Update.
1102         * gnulib/import/cloexec.h: Update.
1103         * gnulib/import/close.c: Update.
1104         * gnulib/import/closedir.c: Update.
1105         * gnulib/import/config.charset: Update.
1106         * gnulib/import/dirent-private.h: Update.
1107         * gnulib/import/dirent.in.h: Update.
1108         * gnulib/import/dirfd.c: Update.
1109         * gnulib/import/dirname-lgpl.c: Update.
1110         * gnulib/import/dirname.h: Update.
1111         * gnulib/import/dosname.h: Update.
1112         * gnulib/import/dup-safer-flag.c: Update.
1113         * gnulib/import/dup-safer.c: Update.
1114         * gnulib/import/dup.c: Update.
1115         * gnulib/import/dup2.c: Update.
1116         * gnulib/import/errno.in.h: Update.
1117         * gnulib/import/error.c: Update.
1118         * gnulib/import/error.h: Update.
1119         * gnulib/import/exitfail.c: Update.
1120         * gnulib/import/exitfail.h: Update.
1121         * gnulib/import/extra/update-copyright: Update.
1122         * gnulib/import/fchdir.c: Update.
1123         * gnulib/import/fcntl.c: Update.
1124         * gnulib/import/fcntl.in.h: Update.
1125         * gnulib/import/fd-hook.c: Update.
1126         * gnulib/import/fd-hook.h: Update.
1127         * gnulib/import/fd-safer-flag.c: Update.
1128         * gnulib/import/fd-safer.c: Update.
1129         * gnulib/import/fdopendir.c: Update.
1130         * gnulib/import/filename.h: Update.
1131         * gnulib/import/filenamecat-lgpl.c: Update.
1132         * gnulib/import/filenamecat.h: Update.
1133         * gnulib/import/flexmember.h: Update.
1134         * gnulib/import/float+.h: Update.
1135         * gnulib/import/float.c: Update.
1136         * gnulib/import/float.in.h: Update.
1137         * gnulib/import/fnmatch.c: Update.
1138         * gnulib/import/fnmatch.in.h: Update.
1139         * gnulib/import/fnmatch_loop.c: Update.
1140         * gnulib/import/fpucw.h: Update.
1141         * gnulib/import/frexp.c: Update.
1142         * gnulib/import/frexpl.c: Update.
1143         * gnulib/import/fstat.c: Update.
1144         * gnulib/import/fstatat.c: Update.
1145         * gnulib/import/getcwd-lgpl.c: Update.
1146         * gnulib/import/getcwd.c: Update.
1147         * gnulib/import/getdtablesize.c: Update.
1148         * gnulib/import/getlogin_r.c: Update.
1149         * gnulib/import/getprogname.c: Update.
1150         * gnulib/import/getprogname.h: Update.
1151         * gnulib/import/gettext.h: Update.
1152         * gnulib/import/gettimeofday.c: Update.
1153         * gnulib/import/glob-libc.h: Update.
1154         * gnulib/import/glob.c: Update.
1155         * gnulib/import/glob.in.h: Update.
1156         * gnulib/import/glob_internal.h: Update.
1157         * gnulib/import/glob_pattern_p.c: Update.
1158         * gnulib/import/globfree.c: Update.
1159         * gnulib/import/hard-locale.c: Update.
1160         * gnulib/import/hard-locale.h: Update.
1161         * gnulib/import/intprops.h: Update.
1162         * gnulib/import/inttypes.in.h: Update.
1163         * gnulib/import/isnan.c: Update.
1164         * gnulib/import/isnand-nolibm.h: Update.
1165         * gnulib/import/isnand.c: Update.
1166         * gnulib/import/isnanl-nolibm.h: Update.
1167         * gnulib/import/isnanl.c: Update.
1168         * gnulib/import/itold.c: Update.
1169         * gnulib/import/libc-config.h: Update.
1170         * gnulib/import/limits.in.h: Update.
1171         * gnulib/import/localcharset.c: Update.
1172         * gnulib/import/localcharset.h: Update.
1173         * gnulib/import/localtime-buffer.c: Update.
1174         * gnulib/import/localtime-buffer.h: Update.
1175         * gnulib/import/lstat.c: Update.
1176         * gnulib/import/m4/00gnulib.m4: Update.
1177         * gnulib/import/m4/__inline.m4: Update.
1178         * gnulib/import/m4/absolute-header.m4: Update.
1179         * gnulib/import/m4/alloca.m4: Update.
1180         * gnulib/import/m4/builtin-expect.m4: Update.
1181         * gnulib/import/m4/canonicalize.m4: Update.
1182         * gnulib/import/m4/chdir-long.m4: Update.
1183         * gnulib/import/m4/close.m4: Update.
1184         * gnulib/import/m4/closedir.m4: Update.
1185         * gnulib/import/m4/configmake.m4: Update.
1186         * gnulib/import/m4/d-ino.m4: Update.
1187         * gnulib/import/m4/d-type.m4: Update.
1188         * gnulib/import/m4/dirent_h.m4: Update.
1189         * gnulib/import/m4/dirfd.m4: Update.
1190         * gnulib/import/m4/dirname.m4: Update.
1191         * gnulib/import/m4/double-slash-root.m4: Update.
1192         * gnulib/import/m4/dup.m4: Update.
1193         * gnulib/import/m4/dup2.m4: Update.
1194         * gnulib/import/m4/eealloc.m4: Update.
1195         * gnulib/import/m4/environ.m4: Update.
1196         * gnulib/import/m4/errno_h.m4: Update.
1197         * gnulib/import/m4/error.m4: Update.
1198         * gnulib/import/m4/exponentd.m4: Update.
1199         * gnulib/import/m4/exponentl.m4: Update.
1200         * gnulib/import/m4/extensions.m4: Update.
1201         * gnulib/import/m4/extern-inline.m4: Update.
1202         * gnulib/import/m4/fchdir.m4: Update.
1203         * gnulib/import/m4/fcntl-o.m4: Update.
1204         * gnulib/import/m4/fcntl.m4: Update.
1205         * gnulib/import/m4/fcntl_h.m4: Update.
1206         * gnulib/import/m4/fdopendir.m4: Update.
1207         * gnulib/import/m4/filenamecat.m4: Update.
1208         * gnulib/import/m4/flexmember.m4: Update.
1209         * gnulib/import/m4/float_h.m4: Update.
1210         * gnulib/import/m4/fnmatch.m4: Update.
1211         * gnulib/import/m4/fnmatch_h.m4: Update.
1212         * gnulib/import/m4/fpieee.m4: Update.
1213         * gnulib/import/m4/frexp.m4: Update.
1214         * gnulib/import/m4/frexpl.m4: Update.
1215         * gnulib/import/m4/fstat.m4: Update.
1216         * gnulib/import/m4/fstatat.m4: Update.
1217         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1218         * gnulib/import/m4/getcwd-path-max.m4: Update.
1219         * gnulib/import/m4/getcwd.m4: Update.
1220         * gnulib/import/m4/getdtablesize.m4: Update.
1221         * gnulib/import/m4/getlogin.m4: Update.
1222         * gnulib/import/m4/getlogin_r.m4: Update.
1223         * gnulib/import/m4/getpagesize.m4: Update.
1224         * gnulib/import/m4/getprogname.m4: Update.
1225         * gnulib/import/m4/gettimeofday.m4: Update.
1226         * gnulib/import/m4/glibc21.m4: Update.
1227         * gnulib/import/m4/glob.m4: Update.
1228         * gnulib/import/m4/glob_h.m4: Update.
1229         * gnulib/import/m4/gnulib-cache.m4: Update.
1230         * gnulib/import/m4/gnulib-common.m4: Update.
1231         * gnulib/import/m4/gnulib-comp.m4: Update.
1232         * gnulib/import/m4/gnulib-tool.m4: Update.
1233         * gnulib/import/m4/hard-locale.m4: Update.
1234         * gnulib/import/m4/include_next.m4: Update.
1235         * gnulib/import/m4/inttypes-pri.m4: Update.
1236         * gnulib/import/m4/inttypes.m4: Update.
1237         * gnulib/import/m4/isnand.m4: Update.
1238         * gnulib/import/m4/isnanl.m4: Update.
1239         * gnulib/import/m4/largefile.m4: Update.
1240         * gnulib/import/m4/limits-h.m4: Update.
1241         * gnulib/import/m4/localcharset.m4: Update.
1242         * gnulib/import/m4/locale-fr.m4: Update.
1243         * gnulib/import/m4/locale-ja.m4: Update.
1244         * gnulib/import/m4/locale-zh.m4: Update.
1245         * gnulib/import/m4/localtime-buffer.m4: Update.
1246         * gnulib/import/m4/longlong.m4: Update.
1247         * gnulib/import/m4/lstat.m4: Update.
1248         * gnulib/import/m4/malloc.m4: Update.
1249         * gnulib/import/m4/malloca.m4: Update.
1250         * gnulib/import/m4/math_h.m4: Update.
1251         * gnulib/import/m4/mbrtowc.m4: Update.
1252         * gnulib/import/m4/mbsinit.m4: Update.
1253         * gnulib/import/m4/mbsrtowcs.m4: Update.
1254         * gnulib/import/m4/mbstate_t.m4: Update.
1255         * gnulib/import/m4/memchr.m4: Update.
1256         * gnulib/import/m4/memmem.m4: Update.
1257         * gnulib/import/m4/mempcpy.m4: Update.
1258         * gnulib/import/m4/memrchr.m4: Update.
1259         * gnulib/import/m4/mkdir.m4: Update.
1260         * gnulib/import/m4/mkstemp.m4: Update.
1261         * gnulib/import/m4/mmap-anon.m4: Update.
1262         * gnulib/import/m4/mode_t.m4: Update.
1263         * gnulib/import/m4/msvc-inval.m4: Update.
1264         * gnulib/import/m4/msvc-nothrow.m4: Update.
1265         * gnulib/import/m4/multiarch.m4: Update.
1266         * gnulib/import/m4/nocrash.m4: Update.
1267         * gnulib/import/m4/off_t.m4: Update.
1268         * gnulib/import/m4/onceonly.m4: Update.
1269         * gnulib/import/m4/open-cloexec.m4: Update.
1270         * gnulib/import/m4/open.m4: Update.
1271         * gnulib/import/m4/openat.m4: Update.
1272         * gnulib/import/m4/opendir.m4: Update.
1273         * gnulib/import/m4/pathmax.m4: Update.
1274         * gnulib/import/m4/rawmemchr.m4: Update.
1275         * gnulib/import/m4/readdir.m4: Update.
1276         * gnulib/import/m4/readlink.m4: Update.
1277         * gnulib/import/m4/realloc.m4: Update.
1278         * gnulib/import/m4/rename.m4: Update.
1279         * gnulib/import/m4/rewinddir.m4: Update.
1280         * gnulib/import/m4/rmdir.m4: Update.
1281         * gnulib/import/m4/save-cwd.m4: Update.
1282         * gnulib/import/m4/secure_getenv.m4: Update.
1283         * gnulib/import/m4/setenv.m4: Update.
1284         * gnulib/import/m4/signal_h.m4: Update.
1285         * gnulib/import/m4/ssize_t.m4: Update.
1286         * gnulib/import/m4/stat-time.m4: Update.
1287         * gnulib/import/m4/stat.m4: Update.
1288         * gnulib/import/m4/std-gnu11.m4: Update.
1289         * gnulib/import/m4/stdbool.m4: Update.
1290         * gnulib/import/m4/stddef_h.m4: Update.
1291         * gnulib/import/m4/stdint.m4: Update.
1292         * gnulib/import/m4/stdio_h.m4: Update.
1293         * gnulib/import/m4/stdlib_h.m4: Update.
1294         * gnulib/import/m4/strchrnul.m4: Update.
1295         * gnulib/import/m4/strdup.m4: Update.
1296         * gnulib/import/m4/strerror.m4: Update.
1297         * gnulib/import/m4/string_h.m4: Update.
1298         * gnulib/import/m4/strstr.m4: Update.
1299         * gnulib/import/m4/strtok_r.m4: Update.
1300         * gnulib/import/m4/sys_socket_h.m4: Update.
1301         * gnulib/import/m4/sys_stat_h.m4: Update.
1302         * gnulib/import/m4/sys_time_h.m4: Update.
1303         * gnulib/import/m4/sys_types_h.m4: Update.
1304         * gnulib/import/m4/tempname.m4: Update.
1305         * gnulib/import/m4/time_h.m4: Update.
1306         * gnulib/import/m4/unistd-safer.m4: Update.
1307         * gnulib/import/m4/unistd_h.m4: Update.
1308         * gnulib/import/m4/warn-on-use.m4: Update.
1309         * gnulib/import/m4/wchar_h.m4: Update.
1310         * gnulib/import/m4/wchar_t.m4: Update.
1311         * gnulib/import/m4/wctype_h.m4: Update.
1312         * gnulib/import/m4/wint_t.m4: Update.
1313         * gnulib/import/malloc.c: Update.
1314         * gnulib/import/malloc/scratch_buffer.h: Update.
1315         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1316         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1317         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1318         * gnulib/import/malloca.c: Update.
1319         * gnulib/import/malloca.h: Update.
1320         * gnulib/import/malloca.valgrind: Update.
1321         * gnulib/import/math.in.h: Update.
1322         * gnulib/import/mbrtowc.c: Update.
1323         * gnulib/import/mbsinit.c: Update.
1324         * gnulib/import/mbsrtowcs-impl.h: Update.
1325         * gnulib/import/mbsrtowcs-state.c: Update.
1326         * gnulib/import/mbsrtowcs.c: Update.
1327         * gnulib/import/memchr.c: Update.
1328         * gnulib/import/memmem.c: Update.
1329         * gnulib/import/mempcpy.c: Update.
1330         * gnulib/import/memrchr.c: Update.
1331         * gnulib/import/mkdir.c: Update.
1332         * gnulib/import/mkstemp.c: Update.
1333         * gnulib/import/msvc-inval.c: Update.
1334         * gnulib/import/msvc-inval.h: Update.
1335         * gnulib/import/msvc-nothrow.c: Update.
1336         * gnulib/import/msvc-nothrow.h: Update.
1337         * gnulib/import/open.c: Update.
1338         * gnulib/import/openat-die.c: Update.
1339         * gnulib/import/openat-priv.h: Update.
1340         * gnulib/import/openat-proc.c: Update.
1341         * gnulib/import/openat.c: Update.
1342         * gnulib/import/openat.h: Update.
1343         * gnulib/import/opendir.c: Update.
1344         * gnulib/import/pathmax.h: Update.
1345         * gnulib/import/pipe-safer.c: Update.
1346         * gnulib/import/rawmemchr.c: Update.
1347         * gnulib/import/readdir.c: Update.
1348         * gnulib/import/readlink.c: Update.
1349         * gnulib/import/realloc.c: Update.
1350         * gnulib/import/ref-add.sin: Update.
1351         * gnulib/import/ref-del.sin: Update.
1352         * gnulib/import/rename.c: Update.
1353         * gnulib/import/rewinddir.c: Update.
1354         * gnulib/import/rmdir.c: Update.
1355         * gnulib/import/same-inode.h: Update.
1356         * gnulib/import/save-cwd.c: Update.
1357         * gnulib/import/save-cwd.h: Update.
1358         * gnulib/import/scratch_buffer.h: Update.
1359         * gnulib/import/secure_getenv.c: Update.
1360         * gnulib/import/setenv.c: Update.
1361         * gnulib/import/signal.in.h: Update.
1362         * gnulib/import/stat-time.c: Update.
1363         * gnulib/import/stat-time.h: Update.
1364         * gnulib/import/stat-w32.c: Update.
1365         * gnulib/import/stat-w32.h: Update.
1366         * gnulib/import/stat.c: Update.
1367         * gnulib/import/stdbool.in.h: Update.
1368         * gnulib/import/stddef.in.h: Update.
1369         * gnulib/import/stdint.in.h: Update.
1370         * gnulib/import/stdio.in.h: Update.
1371         * gnulib/import/stdlib.in.h: Update.
1372         * gnulib/import/str-two-way.h: Update.
1373         * gnulib/import/strchrnul.c: Update.
1374         * gnulib/import/strdup.c: Update.
1375         * gnulib/import/streq.h: Update.
1376         * gnulib/import/strerror-override.c: Update.
1377         * gnulib/import/strerror-override.h: Update.
1378         * gnulib/import/strerror.c: Update.
1379         * gnulib/import/string.in.h: Update.
1380         * gnulib/import/stripslash.c: Update.
1381         * gnulib/import/strnlen1.c: Update.
1382         * gnulib/import/strnlen1.h: Update.
1383         * gnulib/import/strstr.c: Update.
1384         * gnulib/import/strtok_r.c: Update.
1385         * gnulib/import/sys_stat.in.h: Update.
1386         * gnulib/import/sys_time.in.h: Update.
1387         * gnulib/import/sys_types.in.h: Update.
1388         * gnulib/import/tempname.c: Update.
1389         * gnulib/import/tempname.h: Update.
1390         * gnulib/import/time.in.h: Update.
1391         * gnulib/import/unistd--.h: Update.
1392         * gnulib/import/unistd-safer.h: Update.
1393         * gnulib/import/unistd.in.h: Update.
1394         * gnulib/import/unsetenv.c: Update.
1395         * gnulib/import/verify.h: Update.
1396         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1397         * gnulib/import/wchar.in.h: Update.
1398         * gnulib/import/wctype.in.h: Update.
1399         * gnulib/import/xalloc-oversized.h: Update.
1400         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1401         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1402
1403 2018-08-16  Gary Benson <gbenson@redhat.com>
1404
1405         PR gdb/13000:
1406         * gdb/main.c (captured_main_1): Exit with nonzero status
1407         in batch mode if the last command to be executed failed.
1408         * NEWS: Mention the above.
1409
1410 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1411
1412         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1413         end of warning message.
1414
1415 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1416
1417         PR gdb/22943:
1418         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1419         (aarch64_extract_return_value): Use
1420         aapcs_is_vfp_call_or_return_candidate.
1421         (aarch64_return_in_memory): Likewise.
1422         (aarch64_store_return_value): Likewise.
1423
1424 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1425
1426         * aarch64-tdep.c
1427         (aapcs_is_vfp_call_or_return_candidate): Make static
1428         (pass_in_v_or_stack): Remove function.
1429         (pass_in_v_vfp_candidate): New function.
1430         (aarch64_push_dummy_call): Check for float register candidates.
1431
1432 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1433
1434         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1435         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1436         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1437
1438 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1439
1440         PR build/23399
1441         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1442         (struct ipa_sym_addresses): Rename to...
1443         (struct ipa_sym_addresses_common): ... this.
1444         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1445
1446 2018-08-28  Tom Tromey  <tom@tromey.com>
1447
1448         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1449         (token_fifo): Now a std::vector.
1450         (yylex, c_parse): Update.
1451         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1452         (token_fifo): Now a std::vector.
1453         (yylex, d_parse): Update.
1454         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1455         (token_fifo): Now a std::vector.
1456         (yylex, go_parse): Update.
1457
1458 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1459
1460         * parser-defs.h (struct type_stack) <elements>: Change type to
1461         std::vector<union type_stack_elt>.
1462         <depth, size>: Remove.
1463         * parse.c (parse_exp_in_context_1): Adjust.
1464         (type_stack_reserve): Remove.
1465         (check_type_stack_depth): Remove.
1466         (insert_into_type_stack): Adjust to std::vector.
1467         (insert_type): Likewise.
1468         (push_type): Likewise.
1469         (push_type_int): Likewise.
1470         (insert_type_address_space): Likewise.
1471         (pop_type): Likewise.
1472         (pop_type_int): Likewise.
1473         (pop_typelist): Likewise.
1474         (pop_type_stack): Likewise.
1475         (append_type_stack): Likewise.
1476         (push_type_stack): Likewise.
1477         (get_type_stack): Likewise.
1478         (type_stack_cleanup): Likewise.
1479         (push_typelist): Likewise.
1480         (follow_types): Likewise.
1481         (_initialize_parse): Likewise.
1482
1483 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1484
1485         * NEWS: Mention csky target.
1486
1487 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1488             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1489             Don Breazeal  <donb@codesourcery.com>
1490
1491         * csky-linux-tdep.c: New file.
1492         * csky-tdep.c: Likewise.
1493         * csky-tdep.h: Likewise.
1494         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1495         csky-tdep.o.
1496         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1497         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1498         * configure.tgt: Add csky support.
1499
1500 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1501
1502         * python/py-framefilter.c (py_print_frame): Print frame architecture
1503         when printing on an MI output.
1504
1505 2018-08-27  Tom Tromey  <tom@tromey.com>
1506
1507         PR build/23087:
1508         * configure: Rebuild.
1509         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1510
1511 2018-08-27  Tom Tromey  <tom@tromey.com>
1512
1513         * aarch64-linux-tdep.c
1514         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1515         casts to int.
1516
1517 2018-08-27  Tom Tromey  <tom@tromey.com>
1518
1519         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1520         unsigned.
1521         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1522         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1523         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1524         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1525         unsigned.
1526
1527 2018-08-27  Tom Tromey  <tom@tromey.com>
1528
1529         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1530         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1531
1532 2018-08-27  Tom Tromey  <tom@tromey.com>
1533
1534         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1535         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1536         ULONGEST_MAX.
1537         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1538         ULONGEST_MAX.
1539         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1540         ULONGEST_MAX.
1541         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1542         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1543         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1544         ULONGEST_MAX.
1545         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1546         (ppc64_linux_sigaction_tramp_frame)
1547         (ppc32_linux_sighandler_tramp_frame)
1548         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1549         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1550         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1551         * mn10300-linux-tdep.c (am33_linux_sigframe)
1552         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1553         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1554         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1555         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1556         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1557         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1558         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1559         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1560         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1561         * microblaze-linux-tdep.c
1562         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1563         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1564         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1565         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1566         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1567         * common/common-types.h (ULONGEST_MAX): New define.
1568         (CORE_ADDR_MAX): Fix formatting.
1569         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1570         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1571         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1572         (arm_linux_rt_sigreturn_tramp_frame)
1573         (arm_eabi_linux_sigreturn_tramp_frame)
1574         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1575         (thumb2_eabi_linux_sigreturn_tramp_frame)
1576         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1577         (arm_linux_restart_syscall_tramp_frame)
1578         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1579         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1580         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1581         ULONGEST_MAX.
1582         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1583
1584 2018-08-27  Tom Tromey  <tom@tromey.com>
1585
1586         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1587         CORE_ADDR_MAX.
1588         * mips-tdep.c (mips_deal_with_atomic_sequence)
1589         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1590         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1591         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1592         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1593         CORE_ADDR_MAX.
1594         * aarch64-tdep.c (aarch64_software_single_step): Use
1595         CORE_ADDR_MAX.
1596
1597 2018-08-27  Tom Tromey  <tom@tromey.com>
1598
1599         * linespec.c (complete_linespec_component): Add cast to "char".
1600         * completer.c (completion_tracker::build_completion_result): Add
1601         cast to "char".
1602
1603 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1604
1605         * solist.h (struct solist, struct target_so_ops): Fix
1606         indentation.
1607
1608 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1609
1610         * ada-tasks.c (ada_task_info_s): Remove typedef.
1611         (DEF_VEC_O(ada_task_info_s)): Remove.
1612         (struct ada_tasks_inferior_data): Initialize fields.
1613         <task_list>: Make an std::vector.
1614         (get_ada_tasks_inferior_data): Allocate with new.
1615         (ada_get_task_number): Adjust.
1616         (get_task_number_from_id): Likewise.
1617         (valid_task_id): Likewise.
1618         (ada_get_task_info_from_ptid): Likewise.
1619         (iterate_over_live_ada_tasks): Likewise.
1620         (add_ada_task): Likewise.
1621         (read_known_tasks): Likewise.
1622         (ada_build_task_list): Likewise.
1623         (print_ada_task_info): Likewise.
1624         (info_task): Likewise.
1625         (task_command_1): Likewise.
1626
1627 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1628
1629         * ada-lang.c (add_angle_brackets): Return std::string.
1630
1631 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1632
1633         * python/py-threadevent.c (py_get_event_thread): Initialize
1634         pythread.
1635
1636 2018-08-24  Pedro Alves  <palves@redhat.com>
1637
1638         * python/py-bpevent.c (create_breakpoint_event_object): Use
1639         copy-initialization.
1640         * python/py-continueevent.c (emit_continue_event): Use
1641         copy-initialization.
1642         * python/py-exitedevent.c (create_exited_event_object): Return a
1643         gdbpy_ref<>.
1644         (emit_exited_event): Use copy-initialization.
1645         * python/py-inferior.c (python_new_inferior)
1646         (python_inferior_deleted, add_thread_object): Use
1647         copy-initialization.
1648         * python/py-infevents.c (create_inferior_call_event_object)
1649         (create_register_changed_event_object)
1650         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1651         (emit_inferior_call_event, emit_memory_changed_event)
1652         (emit_register_changed_event): Use copy-initialization.
1653         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1654         Return a gdbpy_ref<>.
1655         (emit_new_objfile_event): Use copy-initialization.
1656         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1657         (emit_clear_objfiles_event): Use copy-initialization.
1658         * python/py-signalevent.c (create_signal_event_object): Use
1659         copy-initialization.
1660         * python/py-threadevent.c (create_thread_event_object): Use
1661         copy-initialization.
1662
1663 2018-08-24  Pedro Alves  <palves@redhat.com>
1664             Simon Marchi  <simon.marchi@ericsson.com>
1665
1666         PR gdb/23379
1667         * python/py-continueevent.c: Include "gdbthread.h".
1668         (create_continue_event_object): Add intro comment.  Add 'ptid'
1669         parameter.  Use it to find thread to pass to
1670         create_thread_event_object.
1671         (emit_continue_event): Pass PTID down to
1672         create_continue_event_object.
1673         * python/py-event.h (py_get_event_thread): Declare.
1674         (create_thread_event_object): Remove default from 'thread'
1675         parameter.
1676         * python/py-stopevent.c (create_stop_event_object): Use
1677         py_get_event_thread.
1678         * python/py-threadevent.c (get_event_thread): Rename to ...
1679         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1680         and use it to find the thread.
1681         (create_thread_event_object): Assert that THREAD isn't null.
1682         Don't find the event thread here.
1683
1684 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1685
1686         * block.h (blockrange, blockranges): New struct declarations.
1687         (struct block): Add new field named `ranges'.
1688         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1689         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1690         macros for accessing ranges in struct block.
1691         (make_blockranges): New declaration.
1692         block.c (make_blockranges): New function.
1693         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1694         for block.
1695         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1696         * blockframe.c (cache_pc_function_block): New static global.
1697         (clear_pc_function_cache): Clear cache_pc_function_block.
1698         (find_pc_partial_function): Move comment to symtab.h.  Add
1699         support for non-contiguous blocks.
1700         * cli/cli-cmds.c (block.h): Include.
1701         (print_disassembly): Handle printing of non-contiguous blocks.
1702         (disassemble_current_function): Likewise.
1703         (disassemble_command): Likewise.
1704
1705         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1706         BLOCK_START.
1707         * blockframe.c (get_pc_function_start): Likewise.
1708         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1709         (gcc_symbol_address): Likewise.
1710         * compile/compile-object-run.c (compile_object_run): Likewise.
1711         * compile/compile.c (get_expr_block_and_pc): Likewise.
1712         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1713         (func_addr_to_tail_call_list): Likewise.
1714         * findvar.c (default_read_var_value): Likewise.
1715         * inline-frame.c (inline_frame_this_id): Likewise.
1716         (skip-inline_frames): Likewise.
1717         * infcmd.c (until_next_command): Likewise.
1718         * linespec.c (convert_linespec_to_sals): Likewise.
1719         * parse.c (parse_exp_in_context_1): Likewise.
1720         * printcmd.c (build_address_symbolic): likewise.
1721         (info_address_command): Likewise.
1722         symtab.c (find_function_start_sal): Likewise.
1723         (skip_prologue_sal): Likewise.
1724         (find_function_alias_target): Likewise.
1725         (find_gnu_ifunc): Likewise.
1726         * stack.c (find_frame_funname): Likewise.
1727         * symtab.c (fixup_symbol_section): Likewise.
1728         (find_function_start_sal): Likewise.
1729         (skip_prologue_sal): Likewsie.
1730         (find_function_alias_target): Likewise.
1731         (find_gnu_ifunc): Likewise.
1732         * tracepoint.c (info_scope_command): Likewise.
1733         * value.c (value_fn_field): Likewise.
1734
1735         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1736         in place of find_pc_partial_function.
1737         * blockframe.c (find_function_entry_range_from_pc): New function.
1738         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1739         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1740         for each range in a block.
1741
1742
1743 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1744
1745         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1746         incrementation.
1747
1748 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1749
1750         * solib-svr4.c (read_program_headers_from_bfd): Return
1751         gdb::optional<gdb::byte_vector>.
1752         (svr4_exec_displacement): Adjust.
1753
1754 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1755
1756         * solib-svr4.c (read_program_header): Return
1757         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1758         (find_program_interpreter): Return
1759         gdb::optional<gdb::byte_vector>.
1760         (scan_dyntag_auxv): Adjust.
1761         (enable_break): Adjust.
1762         (svr4_exec_displacement): Adjust.
1763
1764 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1765
1766         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1767         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1768
1769 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1770
1771         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1772         string_vprintf.
1773         * guile/scm-utils.c (gdbscm_printf): Likewise.
1774         * serial.c (serial_printf): Likewise.
1775         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1776
1777 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1778
1779         * stack.c (print_frame): Print frame architecture when printing on
1780         an MI output.
1781         * NEWS: Mention new "arch" attribute in frame output.
1782
1783 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1784
1785         * arch/aarch64.h (aarch64_regnum): Update comment.
1786
1787 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1788
1789         * NEWS: Add SVE to 8.2 section.
1790
1791 2018-08-21  Pedro Alves  <palves@redhat.com>
1792
1793         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1794         out from gdbscm_parse_function_args.
1795         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1796         gdbscm_parse_function_args_1.
1797
1798 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1799
1800         PR gdb/17816
1801         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1802         operator.
1803
1804 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1805
1806         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1807
1808 2018-08-19  Michael Spang  <spang@google.com>
1809
1810         PR gdb/11786
1811         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1812         for PT_TLS segments.
1813
1814 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1815
1816         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1817         dwarf_variable_value.
1818         * dwarf2-frame.c (class dwarf_expr_executor):
1819         Add override for dwarf_variable_value.
1820         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1821         (class symbol_needs_eval_context): Likewise.
1822         (indirect_synthetic_pointer): Add forward declaration.
1823         (sect_variable_value): New function.
1824         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1825         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1826         for DW_OP_GNU_variable_value.
1827
1828 2018-08-16  Tom Tromey  <tom@tromey.com>
1829
1830         * top.c (read_command_file): Update.
1831         (command_line_input): Remove "repeat" argument.
1832         * ada-lang.c (get_selections): Update.
1833         * linespec.c (decode_line_2): Update.
1834         * defs.h (command_line_input): Remove argument.
1835         * cli/cli-script.c (read_next_line): Update.
1836         * python/py-gdb-readline.c: Update.
1837
1838 2018-08-17  Tom Tromey  <tom@tromey.com>
1839
1840         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1841         command_line_input.
1842
1843 2018-08-15  Tom Tromey  <tom@tromey.com>
1844
1845         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1846
1847 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
1848
1849         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1850         If used, use find_pc_partial_function to find address range
1851         to disassemble.
1852         * mi/mi-main.c (mi_cmd_list_features): Report
1853         "data-disassemble-a-option" feature.
1854         * NEWS: Mention new -data-disassemble option -a.
1855
1856 2018-08-13  Tom Tromey  <tom@tromey.com>
1857
1858         * common/common-defs.h (_FORTIFY_SOURCE): Define.
1859
1860 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1861
1862         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1863         (aarch64_linux_collect_sve_regset): Likewise.
1864         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1865         * regcache.h (regcache_map_entry_size): New function.
1866
1867 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1868
1869         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1870         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1871         (SVE_HEADER_VL_LENGTH): Likewise.
1872         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1873         (SVE_HEADER_FLAGS_LENGTH): Likewise.
1874         (SVE_HEADER_RESERVED_LENGTH): Likewise.
1875         (SVE_HEADER_SIZE_OFFSET): Likewise.
1876         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1877         (SVE_HEADER_VL_OFFSET): Likewise.
1878         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1879         (SVE_HEADER_FLAGS_OFFSET): Likewise.
1880         (SVE_HEADER_RESERVED_OFFSET): Likewise.
1881         (SVE_HEADER_SIZE): Likewise.
1882         (aarch64_linux_core_read_vq): Add function.
1883         (aarch64_linux_core_read_description): Check for SVE section.
1884
1885 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
1886
1887         * aarch64-fbsd-tdep.c
1888         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1889         collect_size.
1890         * aarch64-linux-tdep.c
1891         (aarch64_linux_iterate_over_regset_sections): Likewise.
1892         * alpha-linux-tdep.c
1893         (alpha_linux_iterate_over_regset_sections):
1894         * alpha-nbsd-tdep.c
1895         (alphanbsd_iterate_over_regset_sections): Likewise.
1896         * amd64-fbsd-tdep.c
1897         (amd64fbsd_iterate_over_regset_sections): Likewise.
1898         * amd64-linux-tdep.c
1899         (amd64_linux_iterate_over_regset_sections): Likewise.
1900         * arm-bsd-tdep.c
1901         (armbsd_iterate_over_regset_sections): Likewise.
1902         * arm-fbsd-tdep.c
1903         (arm_fbsd_iterate_over_regset_sections): Likewise.
1904         * arm-linux-tdep.c
1905         (arm_linux_iterate_over_regset_sections): Likewise.
1906         * corelow.c (get_core_registers_cb): Likewise.
1907         (core_target::fetch_registers): Likewise.
1908         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1909         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1910         * gdbarch.h (void): Regenerate.
1911         * gdbarch.sh: Add supply_size and collect_size.
1912         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1913         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1914         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1915         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1916         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1917         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1918         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1919         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1920         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1921         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1922         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1923         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1924         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1925         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1926         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1927         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1928         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1929         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1930         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1931         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1932         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1933         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1934         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1935         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1936         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1937         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1938         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1939         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1940         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1941         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1942
1943 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1944
1945         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1946         with string_printf.
1947
1948 2018-08-10  Keith Seitz  <keiths@redhat.com>
1949
1950         * compile/compile-c-support.c (add_code_header, add_code_footer):
1951         Move into policy class.
1952         (c_push_user_expression, pop_user_expression_nop)
1953         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1954         (compile_program): New host class.
1955         (c_compile_program): New typedef.
1956         (c_compute_porgram): Use c_compile_program.
1957
1958 2018-08-10  Keith Seitz  <keiths@redhat.com>
1959
1960         * compile/compile-internal.h (compile_instance::~compile_instance):
1961         Remove calls to htab_delete.
1962         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1963         * compile.c (compile_instance::compile_instance): Initialize
1964         htab unique pointers.
1965         (compile_instance::get_cached_type, compile_instance::insert_type)
1966         (compile_instance::error_symbol_once): Update for unique_ptr.
1967
1968 2018-08-10  Keith Seitz  <keiths@redhat.com>
1969
1970         * compile/compile-c-symbols.c (struct symbol_error)
1971         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1972         (compile_instance::insert_symbol_error)
1973         (compile_instance::error_symbol_once): Move to ...
1974         * compile/compile.c: ... here.
1975
1976 2018-08-10  Keith Seitz  <keiths@redhat.com>
1977
1978         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1979         instead of `new_compile_instance'.
1980         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1981         Update description.
1982         If the symbol error map is not initialized, create it.
1983         (generate_c_for_for_one_symbol): Do not check/initialize
1984         the symbol error map.
1985         * compile/compile-c-types.c (compile_c_instance): Make a class.
1986         Update all callers.
1987         (compile_instance::compile_instance): Initialize the type cache.
1988         (get_cached_type): New function.
1989         (insert_type): Update description.
1990         (compile_c_instance::m_default_cflags): Define.
1991         (convert_type): Update description.  Use get_cached_type.
1992         (delete_instance): Moved to destructor.
1993         (new_compile_instance): Moved to constructor.
1994         * compile/compile-c.h (compile_c_instance): Make class inheriting
1995         from compile_instance.
1996         <base>: Remove field.
1997         <type_map, symbol_err_map>: Move to base class.
1998         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1999         * compile/compile-internal.h (compile_instance): Make class.
2000         <type_map_t, symbol_err_map_t>: Define.
2001         <fe>: Rename to `m_gcc_fe'.
2002         <scope, block, gcc_target_options>: Add `m_' prefix.
2003         <m_type_map, m_symbol_err_map>: New fields, moved from
2004         compile_c_instance.
2005         <destroy>: Remove.
2006         (convert_type, new_compile_instance): Remove.
2007         * compile/compile.c (cleanup_compile_instance): Remove.
2008         (compile_to_object): Use unique_ptr to eliminate cleanups.
2009         (compile_instance::set_print_callback, compile_instance::version)
2010         (compile_instance::set_verbose)
2011         (compile_instance::set_driver_filename)
2012         (compile_instance::set_triplet_regexp)
2013         (compile_instance::set_arguments)
2014         (compile_instance::set_source_file)
2015         (compile_instance::compile): Define.
2016
2017 2018-08-10  Keith Seitz  <keiths@redhat.com>
2018
2019         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2020         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2021         gcc-c-fe.def to define C plugin.
2022         (delete_instance): Delete `c_plugin'.
2023         (new_compile_instance): Initialize `c_plugin'.
2024         * compile/compile-c.h: Include gcc_c_plugin.h.
2025         (struct compile_c_instance) <c_plugin>: New member.
2026         * gcc-c-plugin.h: New file.
2027         Update all callers with API change.
2028
2029 2018-08-10  Keith Seitz  <keiths@redhat.com>
2030
2031         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2032         (HFILES_NO_SRCDIR): ... to here.
2033         Add compile-internal.h and compile-c.h.
2034         * compile/compile-c-support.c: Include compile-c.h.
2035         * compile/compile-c-symbols.c: Include compile-c.h.
2036         (generate_c_for_variable_locations): Update comment.
2037         * compile/compile-c-types.c: Include compile-c.h.
2038         * compile/compile-c.h: New file -- moved C language declarations
2039         from other files here.
2040         * compile/compile-internal.h: Do not include hashtab.h or
2041         common/enum-flags.h.
2042         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2043         (gcc_convert_symbol, gcc_symbol_address)
2044         (generate_c_for_variable_locations, c_get_mode_for_size)
2045         (c_get_range_decl_name): Definitions moved to compile-c.h.
2046         * compile/compile-loc2c.c: Include compile-c.h.
2047
2048 2018-08-10  Keith Seitz  <keiths@redhat.com>
2049
2050         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2051         (c_symbol_substitution_name): ... this.
2052         Update all callers.
2053
2054 2018-08-10  Keith Seitz  <keiths@redhat.com>
2055
2056         * compile/compile-c-support.c (c_compute_program): Use
2057         unique_xmalloc_ptr to eliminate cleanup.
2058         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2059         Return a unique_xmalloc_ptr and eliminate cleanup.
2060         * compile/compile-internal.h (generate_c_for_variable_locations):
2061         Return unique_xmalloc_ptr and update description.
2062
2063 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2064
2065         * corelow.c (core_target::get_core_register_section): Rename
2066         min_size to section_min_size.
2067
2068 2018-08-09  Jim Wilson  <jimw@sifive.com>
2069
2070         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2071         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2072         * NEWS: Mention new GNU/Linux RISC-V target.
2073         * configure.host: Add riscv*-*-linux*.
2074         * configure.nat: Add riscv*.
2075         * configure.tgt: Add riscv*-*-linux*.
2076         * riscv-linux-nat.c: New file.
2077         * riscv-linux-tdep.c: New file.
2078
2079 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2080
2081         * infrun.c (resume): Make static, add forward declaration.
2082         (proceed): Update header comment.
2083         * infrun.h (resume): Delete declaration.
2084
2085 2018-08-09  Tom Tromey  <tom@tromey.com>
2086
2087         * riscv-tdep.h: Minor formatting fixes.
2088
2089 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2090
2091         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2092         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2093         (test_mkdir_recursive): Likewise.
2094         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2095
2096 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2097
2098         * valarith.c (value_subscripted_rvalue): If an array is not in
2099         memory, and we don't know the upper bound, then we can't know that
2100         the requested element exists or not.
2101
2102 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2103
2104         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2105         (target_options_to_string): Add comment.
2106
2107 2018-08-08  Tom Tromey  <tom@tromey.com>
2108
2109         * unittests/scoped_mmap-selftests.c: Check result of "write".
2110
2111 2018-08-08  Jim Wilson  <jimw@sifive.com>
2112
2113         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2114         (decode_register_index_short): New.
2115         (decode_j_type_insn, decode_cj_type_insn): New.
2116         (decode_b_type_insn, decode_cb_type_insn): New.
2117         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2118         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2119         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2120         is_c_sw_insn instead of is_sw_insn.
2121         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2122         (riscv_software_single_step): New.
2123         * riscv-tdep.h (riscv_software_single_step): Declare.
2124
2125         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2126         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2127
2128 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2129
2130         PR gdb/18050:
2131         * target.c (dispose_inferior): Don't dispose of inferiors that are
2132         already killed.
2133
2134 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2135
2136         * remote.c (remote_target::download_tracepoint): Change char* to
2137         const char*.
2138
2139 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2140
2141         * target.h (target_options_to_string): Return an std::string.
2142         * target.c (str_comma_list_concat_elem): Return void, use
2143         std::string.
2144         (do_option): Likewise.
2145         (target_options_to_string): Return an std::string.
2146         * linux-nat.c (linux_nat_target::wait): Adjust.
2147         * target-debug.h (target_debug_print_options): Adjust.
2148
2149 2018-08-07  Tom Tromey  <tom@tromey.com>
2150
2151         * Makefile.in (CPPFLAGS): New variable.
2152         (INTERNAL_CPPFLAGS): Use it.
2153
2154 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2155
2156         * NEWS: Mention the index cache.
2157
2158 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2159
2160         * common/pathstuff.h (get_standard_cache_dir): New.
2161         * common/pathstuff.c (get_standard_cache_dir): New.
2162         * build-id.h (build_id_to_string): New.
2163         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2164         DEBUG_STR_SUFFIX): Move to here.
2165         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2166         DEBUG_STR_SUFFIX): Move from there.
2167         (write_psymtabs_to_index): Make non-static, add basename
2168         parameter.  Write to temporary files, rename when done.
2169         (save_gdb_index_command): Adjust call to
2170         write_psymtabs_to_index.
2171         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2172         field.
2173         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2174         (get_gdb_index_contents_from_cache): New.
2175         (get_gdb_index_contents_from_cache_dwz): New.
2176         (dwarf2_initialize_objfile): Read index from cache.
2177         (dwarf2_build_psymtabs): Save to index.
2178         * dwarf-index-cache.h: New file.
2179         * dwarf-index-cache.c: New file.
2180         * dwarf-index-write.h: New file.
2181
2182 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2183
2184         * gnulib/aclocal.m4: Re-generate.
2185         * gnulib/config.in: Re-generate.
2186         * gnulib/configure: Re-generate.
2187         * gnulib/import/Makefile.am: Re-generate.
2188         * gnulib/import/Makefile.in: Re-generate.
2189         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2190         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2191         * gnulib/import/m4/mkdir.m4: New file.
2192         * gnulib/import/mkdir.c: New file.
2193         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2194         module.
2195
2196 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2197
2198         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2199         * common/scoped_mmap.c: New file.
2200         * common/scoped_mmap.h (destroy): New method.
2201         (~scoped_mmap, reset): Use destroy.
2202         (scoped_mmap): New move constructor.
2203         (mmap_file): New declaration.
2204         * unittests/scoped_mmap-selftests.c (test_normal,
2205         test_invalid_filename, run_tests): New functions.
2206         (_initialize_scoped_mmap_selftests): Register selftest.
2207
2208 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2209
2210         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2211         (read_gdb_index_from_buffer): ... this.  Remove section
2212         parameter, add buffer parameter.
2213         (get_gdb_index_contents_ftype,
2214         get_gdb_index_contents_dwz_ftype): New typedefs.
2215         (dwarf2_read_gdb_index): Add callback parameters to get the
2216         index contents.
2217         (get_gdb_index_contents_from_section): New.
2218         (dwarf2_initialize_objfile): Update call to
2219         dwarf2_read_gdb_index.
2220
2221 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2222
2223         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2224         (gdb_open_cloexec): Likewise.
2225         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2226         (commandline_from_pid): Likewise.
2227         (linux_xfer_osdata_threads): Likewise.
2228         (linux_xfer_osdata_fds): Likewise.
2229         * ada-lang.c (is_package_name): Likewise.
2230         * auxv.c (procfs_xfer_auxv): Likewise.
2231         * breakpoint.c (print_one_breakpoint_location): Use
2232         uiout::field_fmt.
2233         (print_one_catch_solib): Use string_printf.
2234         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2235         (add_pe_forwarded_sym): Likewise.
2236         * dwarf2read.c (create_type_unit_group): Likewise.
2237         (build_error_marker_type): Likewise.
2238         * infcall.c (get_function_name): Likewise.
2239         * valprint.c (print_converted_chars_to_obstack): Likewise.
2240         * xtensa-tdep.c (xtensa_register_type): Likewise.
2241
2242 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2243
2244         * remote.c (remote_target::download_tracepoint): Fix format
2245         string errors.
2246
2247 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2248
2249         * tracefile.c: Include common/byte-vector.h.
2250         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2251         with trace_regblock_size if needed.  Update uses of buf.
2252
2253 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2254
2255         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2256         std::vector<unsigned char>.
2257         * tracepoint.c (collection_list::collection_list): Remove
2258         m_regs_mask initializer from initializer list.  Resize
2259         m_regs_mask using the largest remote register number.
2260         (collection_list::add_remote_register): Remove size check on
2261         m_regs_mask.  Use at to access element.
2262         (collection_list::stringify): Change type of temp_buf to
2263         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2264         stringify the register mask.  Use pack_hex_byte for the register
2265         mask.
2266
2267 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2268
2269         * tracepoint.h (class collection_list) <add_register>: Remove.
2270         <add_remote_register, add_ax_registers, add_local_register>:
2271         Declare.
2272         <add_memrange>: Add scope parameter.
2273         * tracepoint.c (encode_actions_1): Likewise.
2274         (collection_list::add_register): Rename to ...
2275         (collection_list::add_remote_register): ... this.  Update
2276         comment.
2277         (collection_list::add_ax_registers, add_local_register): New
2278         methods.
2279         (collection_list::add_memrange): Add scope parameter.  Call
2280         add_local_register instead of add_register.
2281         (finalize_tracepoint_aexpr): New function.
2282         (collection_list::collect_symbol): Update calls to add_memrange.
2283         Call add_local_register instead of add_register.  Call
2284         add_ax_registers.  Call finalize_tracepoint_aexpr.
2285         (encode_actions_1): Get remote regnos for $reg action.  Call
2286         add_remote_register, add_ax_registers, and add_local_register.
2287         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2288         (validate_actionline): Call finalize_tracepoint_aexpr.
2289
2290 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2291
2292         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2293         Replace array buf with gdb::char_vector buf, of size
2294         get_remote_packet_size ().  Replace references to buf and
2295         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2296         and xsnprintf with snprintf.  Raise errors if the buffer is too
2297         small.
2298
2299 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2300
2301         * remote.c (remote_target::download_tracepoint): Fix the has_more
2302         predicate in the QTDP action list iteration.
2303
2304 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2305
2306         * remote.c (remote_target::download_tracepoint): Fix indentation
2307         in for block.
2308
2309 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2310
2311         * proc-api.c (_initialize_proc_api): Remove c, unused.
2312         * procfs.c (procfs_init_inferior): Remove signals, unused.
2313         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2314         unused.
2315
2316 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2317             Andrew Burgess  <andrew.burgess@embecosm.com>
2318
2319         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2320         'W_STOPCODE (0)' as this could be ambiguous.
2321
2322 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2323
2324         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2325         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2326         "ai_socktype").
2327
2328 2018-08-02  Tom Tromey  <tom@tromey.com>
2329
2330         PR symtab/16842.
2331         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2332         symbols.
2333         (process_structure_scope): Likewise.
2334
2335 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2336
2337         PR gdb/22629:
2338         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2339         kill inferior.
2340
2341 2018-08-02  Tom Tromey  <tom@tromey.com>
2342
2343         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2344         (darwin_suspend_inferior, darwin_resume_inferior)
2345         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2346         (darwin_check_new_threads): Check result of get_darwin_inferior.
2347
2348 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2349
2350         GDB 8.1.1 released.
2351
2352 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2353
2354         * varobj.c (varobj_get_path_expr_parent): Report an error if
2355         parent is a dynamic varobj.
2356
2357 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2358
2359         * gnulib/aclocal.m4: Re-generate.
2360         * gnulib/config.in: Re-generate.
2361         * gnulib/configure: Re-generate.
2362         * gnulib/import/Makefile.in: Re-generate.
2363         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2364         * gnulib/import/m4/onceonly.m4: Re-generate.
2365
2366 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2367
2368         * target-descriptions.c (struct xml_test_tdesc): New.
2369         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2370         (record_xml_tdesc): Update.
2371         (maintenance_check_xml_descriptions): Update.
2372         * target-descriptions.h (record_xml_tdesc): Update comment.
2373
2374 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2375
2376         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2377         checking array bounds are defined.
2378
2379 2018-07-30  Tom Tromey  <tom@tromey.com>
2380
2381         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2382         irreflexivity violation.
2383
2384 2018-07-30  Tom Tromey  <tom@tromey.com>
2385
2386         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2387         * value.c (unpack_long): Remove lint code.
2388         * valops.c (value_ind): Remove lint code.
2389         * valarith.c (value_x_binop, value_x_unop, value_equal)
2390         (value_pos): Remove lint code.
2391
2392 2018-07-28  Tom de Vries  <tdevries@suse.de>
2393
2394         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2395         with undefined upper bound as <optimized out>.
2396
2397 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2398
2399         * gcore.in: Rename variable "name" to "prefix".  Expand
2400         "usage" text.
2401
2402 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2403
2404         * windows-nat.c (windows_nat_target::create_inferior): Update to
2405         call close() in global namespace.
2406
2407 2018-07-26  Tom Tromey  <tom@tromey.com>
2408
2409         * dwarf-index-write.c (add_address_entry): Don't add objfile
2410         offsets.
2411         * dbxread.c (find_stab_function): Rename from
2412         find_stab_function_addr.  Return a bound_minimal_symbol.
2413         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2414         Don't add objfile offsets.
2415         (end_psymtab): Use raw_text_low, raw_text_high,
2416         MSYMBOL_VALUE_RAW_ADDRESS.
2417         (read_ofile_symtab): Update.
2418         (process_one_symbol): Update.
2419         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2420         offsets.
2421         (dw2_relocate): Remove.
2422         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2423         searching addrmap.
2424         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2425         Update.
2426         (process_psymtab_comp_unit_reader, add_partial_symbol)
2427         (add_partial_subprogram, dwarf2_ranges_read): Update.
2428         (load_partial_dies): Update.
2429         (add_address_entry): Don't add objfile offsets.
2430         (dwarf2_build_include_psymtabs): Update.
2431         (create_addrmap_from_aranges): Don't add objfile offsets.
2432         (dw2_find_pc_sect_compunit_symtab): Update.
2433         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2434         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2435         Update.
2436         (parse_partial_symbols): Don't add objfile offsets.  Use
2437         raw_text_low, raw_text_high.  Update.
2438         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2439         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2440         or call 'relocate' quick function.  Clear psymbol_map.
2441         * psympriv.h (struct partial_symbol) <address>: Add section
2442         offset.
2443         <set_unrelocated_address>: Rename from set_address.
2444         <raw_text_low, raw_text_high>: New methods.
2445         <text_low, text_high>: Add objfile parameter.
2446         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2447         set_unrelocated_address.
2448         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2449         (find_pc_psymbol): Update.
2450         (fixup_psymbol_section, relocate_psymtabs): Remove.
2451         (dump_psymtab, psym_functions): Update.
2452         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2453         parameter.
2454         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2455         (start_psymtab_common): Update.
2456         * symfile-debug.c (debug_qf_relocate): Remove.
2457         (debug_sym_quick_functions): Update.
2458         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2459         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2460         Update.
2461
2462 2018-07-26  Tom Tromey  <tromey@redhat.com>
2463
2464         * dbxread.c (end_psymtab): Use text_high_valid and
2465         text_low_valid.
2466         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2467         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2468         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2469         Update comment.
2470         <text_low_valid, text_high_valid>: New fields.
2471         <set_text_low, set_text_high>: Update.
2472         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2473
2474 2018-07-26  Tom Tromey  <tom@tromey.com>
2475
2476         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2477         Update.
2478         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2479         textlow and texthigh fields.
2480         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2481         Update.
2482         * mdebugread.c (parse_lines, parse_partial_symbols)
2483         (psymtab_to_symtab_1): Update.
2484         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2485         Rename fields.  Update comment.  Now private.
2486         <text_low, text_high, set_text_low, set_text_high>: New methods.
2487         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2488         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2489         (start_psymtab_common, maintenance_info_psymtabs)
2490         (maintenance_check_psymtabs): Update.
2491         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2492         texthigh fields.
2493         (scan_xcoff_symtab): Update.
2494
2495 2018-07-26  Tom Tromey  <tromey@redhat.com>
2496
2497         * psympriv.h (struct partial_symbol) <unrelocated_address,
2498         address, set_address>: New methods.
2499         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2500         (fixup_psymbol_section, relocate_psymtabs): Update.
2501         (print_partial_symbols): Add 'objfile' parameter.  Update.
2502         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2503         Update.
2504
2505 2018-07-26  Tom Tromey  <tom@tromey.com>
2506
2507         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2508         (debug_names::write_psymbols): Update.
2509         * psympriv.h (struct partial_symbol): Derive from
2510         general_symbol_info.
2511         <obj_section>: New method.
2512         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2513         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2514         (find_pc_sect_psymbol, fixup_psymbol_section)
2515         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2516         (print_partial_symbols, recursively_search_psymtabs)
2517         (compare_psymbols, psymbol_hash, psymbol_compare)
2518         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2519         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2520
2521 2018-07-26  Tom Tromey  <tromey@redhat.com>
2522
2523         * dbxread.c (end_psymtab): Remove dead code.
2524
2525 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2526
2527         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2528         DWARF unwinders are disabled.
2529         * dwarf2-frame.c: Add dwarf2read.h include.
2530         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2531         disabled.
2532         (dwarf2_frame_unwinders_enabled_p): Define.
2533         (show_dwarf_unwinders_enabled_p): New function.
2534         (_initialize_dwarf2_frame): Register switch to control DWARF
2535         unwinder use.
2536         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2537         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2538         (show_dwarf_cmdlist): Remove static keyword.
2539         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2540         (show_dwarf_cmdlist): Declare.
2541         * NEWS: Document new feature.
2542
2543 2018-07-26  Tom de Vries  <tdevries@suse.de>
2544
2545         PR breakpoints/23366
2546         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2547
2548 2018-07-26  Tom de Vries  <tdevries@suse.de>
2549
2550         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2551         DW_AT_count can't be translated to a dynamic prop.
2552
2553 2018-07-25  Tom de Vries  <tdevries@suse.de>
2554
2555         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2556         try/catch.
2557
2558 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2559
2560         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2561
2562 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2563
2564         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2565
2566 2018-07-24  Keith Seitz  <keiths@redhat.comt
2567
2568         PR symtab/23010
2569         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2570         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2571         instead of add_symbol_to_list.
2572         (read_file_scope): Call prepare_one_comp_unit before reading
2573         any other DIEs.
2574
2575 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2576
2577         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2578
2579 2018-07-24  Tom Tromey  <tom@tromey.com>
2580
2581         * utils.c (malloc, realloc, free): Don't declare.
2582         * configure, config.in: Rebuild.
2583         * configure.ac: Don't check for declarations of free, malloc, or
2584         realloc.
2585
2586 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2587
2588         * aarch64-linux-nat.c
2589         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2590         variable.
2591         * arm-linux-nat.c (fetch_regs): Likewise.
2592         (store_regs): Likewise.
2593         (fetch_vfp_regs): Likewise.
2594         (store_vfp_regs): Likewise.
2595         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2596         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2597         (arm_linux_nat_target::insert_watchpoint): Likewise.
2598         (arm_linux_nat_target::remove_watchpoint): Likewise.
2599         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2600         Likewise.
2601         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2602         Likewise.
2603         * ppc-linux-nat.c (fetch_register): Likewise.
2604         (fetch_all_gp_regs): Likewise.
2605         (fetch_ppc_registers): Likewise.
2606         (store_all_gp_regs): Likewise.
2607         (store_ppc_registers): Likewise.
2608         (hwdebug_insert_point): Likewise.
2609         (can_use_watchpoint_cond_accel): Likewise.
2610         * remote-sim.c (gdb_os_write_stdout): Likewise.
2611
2612 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2613             Tom Tromey  <tom@tromey.com>
2614
2615         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2616         test for it.
2617         * configure: Rebuild.
2618
2619 2018-07-22  Tom Tromey  <tom@tromey.com>
2620
2621         * regformats/regdat.sh: Define xmltarget_${name} inside
2622         #ifndef IN_PROCESS_AGENT.
2623
2624 2018-07-22  Tom Tromey  <tom@tromey.com>
2625
2626         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2627
2628 2018-07-22  Tom Tromey  <tom@tromey.com>
2629
2630         * symfile.c (reread_symbols): Notify iter, not objfile.
2631
2632 2018-07-22  Tom Tromey  <tom@tromey.com>
2633
2634         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2635         Use arch_ops.
2636         (ravenscar_thread_target::prepare_to_store): Likewise.
2637
2638 2018-07-22  Tom Tromey  <tom@tromey.com>
2639
2640         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2641         unused variable.  Call value_fetch_lazy when needed.
2642         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2643         Remove unused variable.  Call value_fetch_lazy when needed.
2644
2645 2018-07-22  Tom Tromey  <tom@tromey.com>
2646
2647         * m32c-tdep.c (mark_dma): Return void.
2648         (make_regs): Remove unused declarations.
2649
2650 2018-07-22  Tom Tromey  <tom@tromey.com>
2651
2652         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2653         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2654         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2655         bkscm_get_valid_block_smob_arg_unsafe for effect.
2656
2657 2018-07-22  Tom Tromey  <tom@tromey.com>
2658
2659         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2660         value_type.
2661
2662 2018-07-22  Tom Tromey  <tom@tromey.com>
2663
2664         * windows-nat.c (saved_context): Conditionally define.
2665         * remote.c (remote_target::remote_btrace_maybe_reopen):
2666         Conditionally declare "warned".
2667         * inflow.c (sigquit_ours): Conditionally define.
2668         (new_tty): Move "tty" declaration inside #if.
2669         * guile/guile.c (guile_datadir): Conditionally define.
2670         * charset.c (set_be_le_names): Move some declarations inside #if.
2671         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2672         #if.
2673         (parse_xml_btrace_conf): Likewise.
2674
2675 2018-07-22  Tom Tromey  <tom@tromey.com>
2676
2677         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2678
2679 2018-07-22  Tom Tromey  <tom@tromey.com>
2680
2681         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2682         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2683         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2684         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2685         * stack.c (frame_apply_level_command): Remove unused variable.
2686         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2687         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2688         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2689         unused variable.
2690         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2691         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2692         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2693         variable.
2694         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2695         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2696         variable.
2697         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2698         Remove unused variable.
2699         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2700         variable.
2701         * common/tdesc.c (print_xml_feature::visit): Remove unused
2702         variable.
2703         * compile/compile-object-load.c (store_regs): Remove unused
2704         variables.
2705         * complaints.c (clear_complaints): Remove unused variable.
2706         * corelow.c (core_target_open): Remove unused variable.
2707         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2708         variable.
2709         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2710         variable.
2711         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2712         variable.
2713         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2714         variable.
2715         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2716         variable.
2717         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2718         variable.
2719         * ia64-tdep.c (examine_prologue): Remove unused variable.
2720         * infcall.c (run_inferior_call): Remove unused variable.
2721         * inferior.c (exit_inferior): Remove unused variable.
2722         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2723         * linespec.c (decode_line_2): Remove unused variable.
2724         * linux-nat.c (super_close): Remove.
2725         * linux-tdep.c (linux_info_proc): Remove unused variable.
2726         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2727         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2728         Remove unused variable.
2729         * parse.c (find_minsym_type_and_address): Remove unused variable.
2730         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2731         variable.
2732         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2733         variable.
2734         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2735         variables.
2736         * record-btrace.c (record_btrace_target::store_registers): Remove
2737         unused variable.
2738         (cmd_show_record_btrace_cpu): Remove unused variable.
2739         * riscv-tdep.c (riscv_register_reggroup_p)
2740         (riscv_push_dummy_call, riscv_return_value): Remove unused
2741         variable.
2742         * rust-exp.y (literal): Remove unused variable.
2743         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2744         unused variable.
2745         <STRUCTOP_ANONYMOUS>: Likewise.
2746         * s390-linux-tdep.c (s390_linux_init_abi_31)
2747         (s390_linux_init_abi_64): Remove unused variable.
2748         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2749         (file_select_thread, net_windows_open, _initialize_ser_windows):
2750         Remove unused variables.
2751         * symtab.c (find_pc_sect_line): Remove unused variable.
2752         * target-memory.c (compute_garbled_blocks): Remove unused
2753         variable.
2754         (target_write_memory_blocks): Remove unused variable.
2755         * target.c (target_stack::unpush): Remove unused variables.
2756         * tracepoint.c (start_tracing, all_tracepoint_actions)
2757         (merge_uploaded_trace_state_variables)
2758         (print_one_static_tracepoint_marker): Remove unused variable.
2759         * unittests/basic_string_view/element_access/char/1.cc (test01):
2760         Remove unused variable.
2761         * windows-nat.c (windows_continue, windows_add_all_dlls)
2762         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2763         Remove unused variables.
2764
2765 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2766
2767         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2768         attr_profile in HAVE_ELF.
2769         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2770         HAVE_ELF.
2771
2772 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2773
2774         * frame.c (frame_register_unwind): Change parameter name.
2775         (frame_unwind_register): Likewise.
2776         (frame_unwind_register_value): Likewise.
2777         (frame_unwind_register_signed): Likewise.
2778         (frame_unwind_register_unsigned): Likewise.
2779         * frame.h (frame_register_unwind): Likewise.
2780         (frame_unwind_register): Likewise.
2781         (frame_unwind_register_value): Likewise.
2782         (frame_unwind_register_signed): Likewise.
2783         (frame_unwind_register_unsigned): Likewise.
2784         (frame_unwind_arch): Likewise.
2785
2786 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2787
2788         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2789         ISA maintenance.
2790
2791 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2792
2793         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2794         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2795         hand.
2796
2797 2018-07-20  Keith Seitz  <keiths@redhat.com>
2798
2799         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2800         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2801         m_compunit_symtab, m_language>: Add "m_" prefix.
2802         Update all uses.
2803         * buildsym.c: Update all uses.
2804
2805 2018-07-20  Tom Tromey  <tom@tromey.com>
2806
2807         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2808         * buildsym.h (record_line_ftype): Remove typedef.
2809
2810 2018-07-20  Tom Tromey  <tom@tromey.com>
2811
2812         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2813         (end_expandable_symtab): Likewise.
2814         (end_symtab_get_static_block): Likewise.
2815         (end_symtab_from_static_block): Likewise.
2816         * buildsym-legacy.c (augment_type_symtab): Remove.
2817         (end_expandable_symtab): Remove.
2818         (end_symtab_get_static_block): Remove.
2819         (end_symtab_from_static_block): Remove.
2820
2821 2018-07-20  Tom Tromey  <tom@tromey.com>
2822
2823         * dwarf2read.c: Include buildsym.h.
2824         (struct dwarf2_cu) <builder>: New method.
2825         (fixup_go_packaging): Update.
2826         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2827         use scoped_free_pendings.
2828         (using_directives): Add "cu" parameter, remove "language".
2829         (read_import_statement, setup_type_unit_groups, )
2830         (read_func_scope, read_lexical_block_scope)
2831         (dwarf2_record_block_ranges, read_namespace): Update.
2832         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2833         (lnp_state_machine::handle_end_sequence): Update.
2834         (class lnp_state_machine) <m_cu>: New member.
2835         <m_record_line_callback>: Remove.
2836         <m_currently_recording_lines>: New member.
2837         (lnp_state_machine::handle_set_file): Update.
2838         (noop_record_line): Remove.
2839         (dwarf_record_line_p): Add cu parameter.
2840         (dwarf_record_line_1, dwarf_finish_line): Likewise.
2841         (lnp_state_machine::record_line)
2842         (lnp_state_machine::lnp_state_machine)
2843         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2844         (dwarf_decode_lines): Update.
2845         (dwarf2_start_subfile): Add cu parameter.
2846         (dwarf2_start_symtab, new_symbol): Update.
2847         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2848         Remove dwarf2_per_objfile parameter.
2849         (dwarf_decode_macros): Update.
2850
2851 2018-07-20  Tom Tromey  <tom@tromey.com>
2852
2853         * stabsread.c (define_symbol): Update.
2854         * buildsym-legacy.h (get_buildsym_compunit): Declare.
2855         * dwarf2read.c (new_symbol): Update.
2856         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2857         * cp-namespace.c: Include buildsym.h.
2858         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2859         * buildsym-legacy.c (get_buildsym_compunit): New function.
2860
2861 2018-07-20  Tom Tromey  <tom@tromey.com>
2862
2863         * xcoffread.c: Include buildsym-legacy.h.
2864         * windows-nat.c: Include buildsym-legacy.h.
2865         * stabsread.c: Include buildsym-legacy.h.
2866         * mdebugread.c: Include buildsym-legacy.h.
2867         * buildsym-legacy.h: New file.
2868         * buildsym-legacy.c: New file, from buildsym.c.
2869         * go32-nat.c: Include buildsym-legacy.h.
2870         * dwarf2read.c: Include buildsym-legacy.h.
2871         * dbxread.c: Include buildsym-legacy.h.
2872         * cp-namespace.c: Include buildsym-legacy.h.
2873         * coffread.c: Include buildsym-legacy.h.
2874         * buildsym.h: Move some contents to buildsym-legacy.h.
2875         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
2876         buildsym-legacy.c.
2877         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2878
2879 2018-07-20  Tom Tromey  <tom@tromey.com>
2880
2881         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2882         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2883         (buildsym_compunit::buildsym_compunit)
2884         (buildsym_compunit::~buildsym_compunit)
2885         (buildsym_compunit::get_macro_table): Define.
2886
2887 2018-07-20  Tom Tromey  <tom@tromey.com>
2888
2889         * buildsym.c (reset_symtab_globals): Remove.
2890         (buildsym_compunit::end_symtab_from_static_block): Update.
2891         (buildsym_compunit::augment_type_symtab): Update.
2892         (end_symtab_from_static_block): Call free_buildsym_compunit.
2893         (augment_type_symtab, end_symtab, end_expandable_symtab):
2894         Likewise.
2895
2896 2018-07-20  Tom Tromey  <tom@tromey.com>
2897
2898         * arch-utils.c: Do not include buildsym.h.
2899         * mipsread.c: Do not include buildsym.h.
2900         * machoread.c: Do not include buildsym.h.
2901         * elfread.c: Do not include buildsym.h.
2902
2903 2018-07-20  Tom Tromey  <tom@tromey.com>
2904
2905         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2906         initialization.
2907         (buildsym_compunit): Add new constructor.
2908         (struct buildsym_compunit) <get_last_source_file, finish_block,
2909         record_block_range, start_subfile, patch_subfile_names,
2910         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2911         set_last_source_start_addr, get_last_source_start_addr,
2912         get_local_using_directives, set_local_using_directives,
2913         get_global_using_directives, outermost_context_p,
2914         get_current_context_stack, get_context_stack_depth,
2915         get_current_subfile, get_local_symbols, get_file_symbols,
2916         get_global_symbols, record_debugformat, record_producer,
2917         push_context, pop_context, end_symtab_get_static_block,
2918         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2919         New public methods.
2920         <record_pending_block, finish_block_internal, make_blockvector,
2921         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2922         private methods.
2923         Update all users.
2924
2925 2018-05-22  Tom Tromey  <tom@tromey.com>
2926
2927         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2928         parameter.
2929         (finish_block_internal): Update.
2930
2931 2018-07-20  Tom Tromey  <tom@tromey.com>
2932
2933         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2934         parameter.
2935         (finish_block_internal): Update.
2936
2937 2018-07-20  Tom Tromey  <tom@tromey.com>
2938
2939         * buildsym.h (EXTERN): Don't define or undef.
2940         * buildsym.c (EXTERN): Don't define.
2941
2942 2018-07-20  Tom Tromey  <tom@tromey.com>
2943
2944         * buildsym.c: Remove TODO comment.
2945
2946 2018-07-20  Tom Tromey  <tom@tromey.com>
2947
2948         * coffread.c (coff_symtab_read): Update.
2949         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2950         (xcoff_new_init): Update.
2951         * mipsread.c (mipscoff_new_init): Update.
2952         * mdebugread.c (mdebug_build_psymtabs): Update.
2953         * elfread.c (elf_new_init): Update.
2954         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2955         Update.
2956         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2957         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2958         (stabsect_build_psymtabs): Update.
2959         * buildsym.h (buildsym_init): Don't declare.
2960         * buildsym.c: Update comment.
2961         (prepare_for_building): Remove.
2962         (start_symtab, restart_symtab): Update.
2963         (reset_symtab_globals): Update comment.
2964         (buildsym_init): Remove.
2965
2966 2018-07-20  Tom Tromey  <tom@tromey.com>
2967
2968         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2969         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2970         (read_enum_type, common_block_start, common_block_end)
2971         (cleanup_undefined_types_1, finish_global_stabs): Update.
2972         * mdebugread.c (psymtab_to_symtab_1): Update.
2973         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2974         (read_lexical_block_scope, new_symbol): Update.
2975         * dbxread.c (process_one_symbol): Update.
2976         * coffread.c (coff_symtab_read, process_coff_symbol)
2977         (coff_read_enum_type): Update.
2978         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2979         declare.
2980         (get_local_symbols, get_file_symbols, get_global_symbols): New
2981         functions.
2982         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2983         m_global_symbols.
2984         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2985         (~scoped_free_pendings): Update.
2986         (finish_block, prepare_for_building, reset_symtab_globals)
2987         (end_symtab_get_static_block, end_symtab_with_blockvector)
2988         (augment_type_symtab, push_context): Update.
2989         (get_local_symbols, get_file_symbols, get_global_symbols): New
2990         functions.
2991         (buildsym_init): Update.
2992
2993 2018-07-20  Tom Tromey  <tom@tromey.com>
2994
2995         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2996         (process_full_type_unit): Likewise.
2997         (dwarf2_start_symtab): Set list_in_scope.
2998
2999 2018-07-20  Tom Tromey  <tom@tromey.com>
3000
3001         * dwarf2read.c (process_psymtab_comp_unit_reader)
3002         (build_type_psymtabs_reader): Do not set list_in_scope.
3003
3004 2018-07-20  Tom Tromey  <tom@tromey.com>
3005
3006         * buildsym.c (free_pendings): Remove.
3007         (add_symbol_to_list, scoped_free_pendings)
3008         (finish_block_internal, buildsym_init): Update.
3009
3010 2018-07-20  Tom Tromey  <tom@tromey.com>
3011
3012         * xcoffread.c (read_xcoff_symtab): Update.
3013         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3014         Update.
3015         * dbxread.c (process_one_symbol): Update.
3016         * coffread.c (coff_symtab_read): Update.
3017         * buildsym.h (finish_block): Update.
3018         * buildsym.c (finish_block): Remove "listhead" argument.
3019         (end_symtab_get_static_block): Update.
3020
3021 2018-07-20  Tom Tromey  <tom@tromey.com>
3022
3023         * buildsym.h (class scoped_free_pendings): Remove constructor.
3024         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3025         method.
3026         <m_pending_block_obstack, m_pending_blocks>: New members.
3027         (pending_block_obstack, pending_blocks): Remove.
3028         (scoped_free_pendings::scoped_free_pendings): Default.
3029         (~scoped_free_pendings): Update.
3030         (free_pending_blocks): Remove.
3031         (finish_block_internal, record_pending_block, make_blockvector)
3032         (end_symtab_get_static_block, augment_type_symtab, push_context)
3033         (buildsym_init): Update.
3034
3035 2018-07-20  Tom Tromey  <tom@tromey.com>
3036
3037         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3038         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3039         members.
3040         (pending_addrmap, pending_addrmap_obstack)
3041         (pending_addrmap_interesting): Remove.
3042         (scoped_free_pendings, record_block_range, make_blockvector)
3043         (prepare_for_building, reset_symtab_globals, buildsym_init):
3044         Update.
3045
3046 2018-07-20  Tom Tromey  <tom@tromey.com>
3047
3048         * xcoffread.c (process_linenos): Update.
3049         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3050         * mdebugread.c (psymtab_to_symtab_1): Update.
3051         * dwarf2read.c (setup_type_unit_groups)
3052         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3053         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3054         * dbxread.c (process_one_symbol): Update.
3055         * coffread.c (coff_symtab_read, enter_linenos)
3056         (process_coff_symbol): Update.
3057         * buildsym.h (current_subfile): Don't declare.
3058         (get_current_subfile): Declare.
3059         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3060         member.
3061         (start_subfile, free_buildsym_compunit, push_subfile)
3062         (prepare_for_building, start_symtab): Update.
3063         (get_current_subfile): New function.
3064
3065 2018-07-20  Tom Tromey  <tom@tromey.com>
3066
3067         * coffread.c (coff_symtab_read): Update.
3068         * xcoffread.c (read_xcoff_symtab): Update.
3069         * dwarf2read.c (new_symbol): Update.
3070         (read_func_scope, read_lexical_block_scope): Update.
3071         * dbxread.c (process_one_symbol): Update.
3072         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3073         (outermost_context_p): Remove macro.
3074         (outermost_context_p, get_current_context_stack)
3075         (get_context_stack_depth): Declare.
3076         (pop_context): Return struct context_stack.
3077         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3078         member.
3079         (context_stack_size): Remove.
3080         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3081         (prepare_for_building, end_symtab_get_static_block)
3082         (augment_type_symtab, push_context): Update.
3083         (pop_context): Return struct context_stack.
3084         (outermost_context_p, get_current_context_stack)
3085         (get_context_stack_depth): New functions.
3086         (buildsym_init): Update.
3087
3088 2018-07-20  Tom Tromey  <tom@tromey.com>
3089
3090         * rust-exp.y: Now a pure parser.  Update all rules.
3091         (%union): Move earlier.
3092         (current_parser, work_obstack): Remove globals.
3093         (rust_parser, ~rust_parser): Update.
3094         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3095         lex_character, lex_number, lex_string, lex_identifier,
3096         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3097         convert_name, convert_params_to_expression,
3098         convert_ast_to_expression, ast_basic_type, ast_operation,
3099         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3100         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3101         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3102         ast_array_type, ast_slice_type, ast_reference_type,
3103         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3104         (rust_parse): Update.
3105         (rustyyerror, rustyylex): Add parser parameter.
3106         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3107         (rust_lex_stringish_test, rust_lex_test_sequence)
3108         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3109         (rust_lex_test_push_back, rust_lex_tests): Update.
3110
3111 2018-07-19  Pedro Alves  <palves@redhat.com>
3112
3113         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3114         gdb::unique_xmalloc_ptr.
3115         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3116         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3117         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3118         copy-initialization.
3119         * guile/scm-pretty-print.c (ppscm_print_children): Use
3120         gdb::unique_xmalloc_ptr instead of cleanups.
3121         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3122         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3123         gdb::unique_xmalloc_ptr.
3124         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3125         Adjust to use gdb::unique_xmalloc_ptr.
3126         * guile/scm-utils.c (extract_arg): Adjust.
3127         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3128         gdb::unique_xmalloc_ptr instead of a cleanup.
3129
3130 2018-07-19  Tom Tromey  <tom@tromey.com>
3131
3132         * utils.c (do_value_free_to_mark)
3133         (make_cleanup_value_free_to_mark): Remove.
3134         * utils.h (make_cleanup_value_free_to_mark): Remove.
3135
3136 2018-07-19  Pedro Alves  <palves@redhat.com>
3137
3138         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3139         forwarding reference.
3140
3141 2018-07-18  Pedro Alves  <palves@redhat.com>
3142
3143         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3144         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3145         cleanup.
3146
3147 2018-07-18  Pedro Alves  <palves@redhat.com>
3148
3149         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3150         exceptions.
3151         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3152         (gdbscm_wrap): New.
3153         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3154         directly instead of a cleanup.
3155         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3156         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3157         (vlscm_binop_gdbthrow): New, factored out from ...
3158         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3159         (vlscm_rich_compare): Use gdbscm_wrap.
3160         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3161         instead of a cleanup.
3162         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3163         cleanup.
3164         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3165         Use xfree directly instead of a cleanup.
3166         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3167         Adjust to use gdbscm_wrap and scoped_value_mark.
3168         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3169         (gdbscm_value_address, gdbscm_value_dereference)
3170         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3171         scoped_value_mark.
3172         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3173         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3174         scoped_value_mark.
3175         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3176         gdbscm_wrap and scoped_value_mark.
3177         (gdbscm_value_to_string): Use xfree directly instead of a
3178         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3179         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3180         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3181         scoped_value_mark.
3182         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3183         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3184         scoped_value_mark.
3185         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3186         gdbscm_wrap.
3187
3188 2018-07-18  Tom de Vries  <tdevries@suse.de>
3189
3190         * findvar.c (default_read_var_value): Also resolve dynamic type for
3191         LOC_OPTIMIZED_OUT vars.
3192
3193 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3194
3195         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3196         decoding.
3197
3198 2018-07-17  Tom Tromey  <tom@tromey.com>
3199
3200         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3201         (compute_enum_list, pascm_set_param_value_x)
3202         (gdbscm_parameter_value): Update.
3203         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3204         (gdbscm_scm_to_host_string): Update.
3205         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3206         Update.
3207         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3208         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3209         * guile/scm-string.c (gdbscm_scm_to_string): Return
3210         unique_xmalloc_ptr.
3211         (gdbscm_scm_to_host_string): Likewise.
3212
3213 2018-07-17  Tom Tromey  <tom@tromey.com>
3214
3215         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3216         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3217         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3218         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3219         unique_xmalloc_ptr.
3220
3221 2018-07-17  Tom Tromey  <tom@tromey.com>
3222
3223         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3224         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3225         Update.
3226         * guile/scm-cmd.c (cmdscm_function): Update.
3227         * guile/scm-pretty-print.c
3228         (ppscm_print_exception_unless_memory_error): Update.
3229         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3230         Return unique_xmalloc_ptr.
3231
3232 2018-07-17  Tom Tromey  <tom@tromey.com>
3233
3234         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3235         Use string_printf.
3236
3237 2018-07-17  Jim Wilson  <jimw@sifive.com>
3238
3239         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3240         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3241         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3242         unecessary braces after EF_RISCV_RVC test.  Delete call to
3243         set_gdbarch_decr_pc_after_break.
3244
3245         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3246         RISCV_LAST_FP_REGNUM + 1.
3247         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3248
3249 2018-07-17  Tom Tromey  <tom@tromey.com>
3250
3251         * configure.ac: Remove --disable-gdbcli.
3252         * configure: Rebuild.
3253         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3254         (SUBDIR_CLI_CFLAGS): Remove.
3255         (SFILES): Use SUBDIR_CLI_SRCS.
3256         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3257
3258 2018-07-17  Tom Tromey  <tom@tromey.com>
3259
3260         PR gdb/18624:
3261         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3262
3263 2018-07-16  Jim Wilson  <jimw@sifive.com>
3264
3265         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3266
3267 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3268
3269         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3270         variable.
3271         (libunwind_frame_sniffer): Likewise.
3272         (libunwind_frame_prev_register): Likewise.
3273         (libunwind_sigtramp_frame_sniffer): Likewise.
3274         * ia64-tdep.c (ia64_access_reg): Likewise.
3275         (ia64_access_rse_reg): Likewise.
3276         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3277         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3278
3279 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3280
3281         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3282
3283 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3284
3285         * remote-sim.c (gdbsim_target::close,
3286         gdbsim_target::mourn_inferior): Remove unused variables.
3287
3288 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3289
3290         * ia64-tdep.c (ktab_buf): New global.
3291         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3292         (get_kernel_table): Adjust.
3293
3294 2018-07-16  Tom Tromey  <tom@tromey.com>
3295
3296         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3297         * dwarf2read.c (using_directives, new_symbol): Use
3298         outermost_context_p.
3299         * dbxread.c (process_one_symbol): Use outermost_context_p.
3300         * coffread.c (coff_symtab_read): Use outermost_context_p.
3301
3302 2018-07-16  Tom Tromey  <tom@tromey.com>
3303
3304         * dwarf2read.c (using_directives, read_func_scope)
3305         (read_lexical_block_scope): Update.
3306         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3307         * buildsym.h (local_using_directives, global_using_directives):
3308         Don't declare.
3309         (get_local_using_directives, set_local_using_directives)
3310         (get_global_using_directives): Declare.
3311         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3312         m_global_using_directives>: New members.
3313         (finish_block_internal, prepare_for_building)
3314         (reset_symtab_globals, end_symtab_get_static_block)
3315         (push_context): Update.
3316         (get_local_using_directives, set_local_using_directives)
3317         (get_global_using_directives): New functions.
3318         (buildsym_init): Update.
3319
3320 2018-07-16  Tom Tromey  <tom@tromey.com>
3321
3322         * xcoffread.c (xcoff_initial_scan): Don't call
3323         free_pending_blocks.
3324         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3325         * buildsym.h (class scoped_free_pendings): Add constructor.
3326         (free_pending_blocks): Don't declare.
3327         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3328         (free_pending_blocks): Now static.
3329
3330 2018-07-16  Tom Tromey  <tom@tromey.com>
3331
3332         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3333         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3334         member.
3335         (struct subfile_stack): Remove.
3336         (subfile_stack): Remove.
3337         (push_subfile, pop_subfile, buildsym_init): Update.
3338
3339 2018-07-16  Tom Tromey  <tom@tromey.com>
3340
3341         * buildsym.c (push_subfile): Use gdb_assert.
3342         (pop_subfile): Use gdb_assert.
3343
3344 2018-07-16  Tom Tromey  <tom@tromey.com>
3345
3346         * buildsym.h (merge_symbol_lists): Remove.
3347         * buildsym.c (merge_symbol_lists): Remove.
3348
3349 2018-07-16  Tom Tromey  <tom@tromey.com>
3350
3351         * stabsread.c (scan_file_globals): Update comment.
3352         * stabsread.h (scan_file_globals): Move from buildsym.h.
3353         * buildsym.h (scan_file_globals): Move to stabsread.h.
3354
3355 2018-07-16  Tom Tromey  <tom@tromey.com>
3356
3357         * xcoffread.c (xcoff_new_init): Update.
3358         * mipsread.c (mipscoff_new_init): Update.
3359         * mdebugread.c (mdebug_build_psymtabs): Update.
3360         * elfread.c (elf_new_init): Update.
3361         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3362         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3363         * buildsym.h (buildsym_new_init): Don't declare.
3364         * buildsym.c (buildsym_new_init): Remove.
3365
3366 2018-07-16  Tom Tromey  <tom@tromey.com>
3367
3368         * stabsread.h (within_function): Move from buildsym.h.
3369         * stabsread.c (start_stabs): Clear within_function.
3370         * coffread.c (coff_start_symtab): Clear within_function.
3371         * buildsym.h (within_function): Move to stabsread.h.
3372         * buildsym.c (prepare_for_building): Update.
3373
3374 2018-07-16  Tom Tromey  <tom@tromey.com>
3375
3376         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3377         * dwarf2read.c (dwarf2_start_symtab): Don't set
3378         processing_gcc_compilation.
3379         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3380
3381 2018-07-16  Tom Tromey  <tom@tromey.com>
3382
3383         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3384         (next_symbol_text_func): Move from buildsym.h.
3385         * stabsread.c (hashname): Move from buildsym.c.
3386         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3387         (next_symbol_text_func, hashname): Move to stabsread.h.
3388         * buildsym.c: Don't include bcache.h
3389         (hashname): Move to stasbread.c.
3390
3391 2018-07-16  Tom Tromey  <tom@tromey.com>
3392
3393         * buildsym.h (context_stack_size): Don't declare.
3394         * buildsym.c (context_stack_size): New global.
3395
3396 2018-07-16  Tom Tromey  <tom@tromey.com>
3397
3398         * dbxread.c (processing_acc_compilation): New global.
3399         * buildsym.h (processing_acc_compilation): Don't declare.
3400
3401 2018-07-16  Tom Tromey  <tom@tromey.com>
3402
3403         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3404         * dbxread.c (read_ofile_symtab): Update.
3405         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3406         * buildsym.h (last_source_start_addr): Remove.
3407         (set_last_source_start_addr, get_last_source_start_addr):
3408         Declare.
3409         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3410         parameter.
3411         (struct buildsym_compunit) <m_last_source_start_addr>: New
3412         member.
3413         (prepare_for_building): Remove start_addr parameter.
3414         (start_symtab, restart_symtab, end_symtab_get_static_block)
3415         (end_symtab_with_blockvector): Update.
3416         (set_last_source_start_addr, get_last_source_start_addr): New
3417         functions.
3418
3419 2018-07-16  Tom Tromey  <tom@tromey.com>
3420
3421         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3422         member.
3423         (have_line_numbers): Remove.
3424         (record_line, prepare_for_building, end_symtab_get_static_block)
3425         (augment_type_symtab): Update.
3426
3427 2018-07-16  Tom Tromey  <tom@tromey.com>
3428
3429         * buildsym.c (~buildsym_compunit): Free the macro table.
3430         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3431         methods.
3432         <m_pending_macros>: New member.
3433         (pending_macros): Remove.
3434         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3435         (reset_symtab_globals, end_symtab_get_static_block)
3436         (end_symtab_with_blockvector, augment_type_symtab)
3437         (buildsym_init): Update.
3438
3439 2018-07-16  Tom Tromey  <tom@tromey.com>
3440
3441         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3442         parameter.
3443         (buildsym_compunit::set_last_source_file): New method.
3444         <m_last_source_file>: New member.
3445         (prepare_for_building): Remove "name" parameter.
3446         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3447         (last_source_file): Remove.
3448         (set_last_source_file, get_last_source_file): Update.
3449
3450 2018-07-16  Tom Tromey  <tom@tromey.com>
3451
3452         * buildsym.c (prepare_for_building): Add assert.
3453
3454 2018-07-16  Tom Tromey  <tom@tromey.com>
3455
3456         * buildsym.c (~buildsym_compunit): Update.
3457         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3458         (start_subfile, patch_subfile_names)
3459         (end_symtab_with_blockvector): Update.
3460
3461 2018-07-16  Tom Tromey  <tom@tromey.com>
3462
3463         * buildsym.c (struct buildsym_compunit): Add constructor,
3464         destructor, initializers.
3465         (start_buildsym_compunit): Remove.
3466         (free_buildsym_compunit): Use "delete".
3467         (start_symtab, restart_symtab): Use "new".
3468
3469 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3470
3471         * symfile.c (set_objfile_default_section_offset): Remove struct
3472         keyword.
3473
3474 2018-07-14  Stafford Horne  <shorne@gmail.com>
3475
3476         * (Responsible Maintainers): Add myself as or1k maintainer.
3477
3478 2018-07-13  Tom Tromey  <tom@tromey.com>
3479
3480         * symfile.c (set_objfile_default_section_offset): Use extra braces
3481         around initializer.
3482
3483 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3484
3485         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3486         non-branching basr.
3487
3488 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3489
3490         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3491         unittests/cli-utils-selftests.c
3492         * unittests/cli-utils-selftests.c: New file.
3493
3494 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3495
3496         * NEWS: Mention new commands. Mention change to 'thread apply'.
3497
3498 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3499
3500         * thread.c (thr_try_catch_cmd): New function.
3501         (thread_apply_all_command): Handle qcs flags.
3502         (thread_apply_command): Handle qcs flags.
3503         (taas_command): New function.
3504         (tfaas_command): New function.
3505         (_initialize_thread): Update to setup the new commands 'taas
3506         and 'tfaas'. Change doc string for 'thread apply'.
3507
3508 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3509
3510         * stack.c: (trailing_outermost_frame): New function, mostly
3511         extracted from backtrace_command_1.
3512         (leading_innermost_frame): New function.
3513         (backtrace_command_1): Update to call trailing_outermost_frame.
3514         (frame_apply_command_count): New function.
3515         (frame_apply_level_command): New function.
3516         (frame_apply_all_command): New function.
3517         (frame_apply_command): New function.
3518         (faas_command): New function.
3519         (frame_cmd_list): New variable.
3520         (_initialize_stack): Update to setup the new commands 'frame apply'
3521         and 'faas'.
3522
3523 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3524
3525         * cli-utils.c (number_or_range_parser::get_number): Only handle
3526         numbers or convenience var as numbers.
3527         (parse_flags): New function.
3528         (parse_flags_qcs): New function.
3529         (number_or_range_parser::finished): Ensure parsing end is detected
3530         before end of string.
3531         * cli-utils.h (parse_flags): New function.
3532         (parse_flags_qcs): New function.
3533         (number_or_range_parser): Remove m_finished bool.
3534         (number_or_range_parser::skip_range): Set m_in_range to false.
3535
3536 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3537
3538         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3539         on Windows.
3540
3541 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3542             Jan Kratochvil  <jan.kratochvil@redhat.com>
3543             Paul Fertser  <fercerpav@gmail.com>
3544             Tsutomu Seki  <sekiriki@gmail.com>
3545             Pedro Alves  <palves@redhat.com>
3546
3547         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3548         'unittests/parse-connection-spec-selftests.c'.
3549         (COMMON_SFILES): Add 'common/netstuff.c'.
3550         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3551         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3552         * common/netstuff.c: New file.
3553         * common/netstuff.h: New file.
3554         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3555         (wait_for_connect): Update comment.  New parameter
3556         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3557         Use 'sock' directly instead of 'scb->fd'.
3558         (try_connect): New function, with code from 'net_open'.
3559         (net_open): Rewrite main loop to deal with multiple
3560         sockets/addresses.  Handle IPv6-style hostnames; implement
3561         support for IPv6 connections.
3562         * unittests/parse-connection-spec-selftests.c: New file.
3563
3564 2018-07-11  Pedro Alves  <palves@redhat.com>
3565
3566         PR gdb/23377
3567         * remote.c (remote_target::remote_detach_pid): Call
3568         set_current_process.
3569
3570 2018-07-11  Pedro Alves  <palves@redhat.com>
3571
3572         * h8300-tdep.c (h8300_gdbarch_init): Remove
3573         set_gdbarch_ecoff_reg_to_regnum calls.
3574
3575 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3576
3577         PR c++/23373
3578         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3579         offsets/sizes for static members of a class/struct.
3580
3581 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3582
3583         * target-descriptions.c (tdesc_register_bitsize): Rename.
3584         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3585         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3586         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3587
3588 2018-07-10  Tom Tromey  <tom@tromey.com>
3589
3590         * breakpoint.c (moribund_locations): Now static and a
3591         std::vector.
3592         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3593         (build_bpstat_chain, update_global_location_list)
3594         (breakpoint_retire_moribund): Update.
3595         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3596         VEC.
3597
3598 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3599
3600         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3601         (riscv_register_reggroup_p): Use new function, remove unneeded
3602         parenthesis.
3603         (riscv_push_dummy_call): Extend assert to compare against xlen or
3604         flen based on register type.
3605
3606 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3607
3608         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3609
3610 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3611
3612         * remote.c (show_hardware_watchpoint_limit): New function.
3613         (show_hardware_watchpoint_length_limit): New function.
3614         (show_hardware_breakpoint_limit): New function.
3615         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3616         where appropriate, update help text.
3617
3618 2018-07-09  Tom Tromey  <tom@tromey.com>
3619
3620         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3621         (CLIBS): Don't mention NAT_CLIBS.
3622
3623 2018-07-09  Tom Tromey  <tom@tromey.com>
3624
3625         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3626         (LIBGDB_OBS, clean mostlyclean): Update.
3627         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3628
3629 2018-07-09  Tom Tromey  <tom@tromey.com>
3630
3631         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3632         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3633         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3634
3635 2018-07-09  Tom Tromey  <tom@tromey.com>
3636
3637         * Makefile.in (ALLDEPFILES): Remove exec.c.
3638         (COMMON_OBS): Remove exec.o.
3639         (COMMON_SFILES): Add exec.c.
3640
3641 2018-07-09  Tom Tromey  <tom@tromey.com>
3642
3643         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3644
3645 2018-07-09  Tom Tromey  <tom@tromey.com>
3646
3647         * Makefile.in (clean mostlyclean): Remove stamp-version.
3648         (version.c): Depend on stamp-version.
3649         (stamp-version): New rule, from version.c rule.
3650
3651 2018-07-09  Tom Tromey  <tom@tromey.com>
3652
3653         * Makefile.in (init.c): Depend on stamp-init.
3654         (stamp-init): New rule, from init.c rule.
3655         (clean mostlyclean): Remove stamp-init.
3656
3657 2018-07-09  Tom Tromey  <tom@tromey.com>
3658
3659         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3660         SUBDIR_GCC_COMPILE_SRCS.
3661
3662 2018-07-09  Tom Tromey  <tom@tromey.com>
3663
3664         * Makefile.in (init.c): Remove some unused sed rules.
3665
3666 2018-07-09  Tom Tromey  <tom@tromey.com>
3667
3668         * Makefile.in (TSOBS): Remove.
3669         (INIT_FILES): Update.
3670         (LIBGDB_OBS): Update.
3671         (COMMON_SFILES): Add inflow.c.
3672         (SFILES): Remove inflow.c.
3673
3674 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3675
3676         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3677
3678 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3679
3680         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3681         get_saveloc_name, is_signal_frame_name, step_name,
3682         init_remote_name, create_addr_space_name,
3683         destroy_addr_space_name, search_unwind_table_name,
3684         find_dyn_list_name): Constify.
3685
3686 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3687
3688         * darwin-nat.c (darwin_pthread_kill): New function.
3689         (darwin_resume_thread): Use darwin_pthread_kill.
3690
3691 2018-07-05  Tom de Vries  <tdevries@suse.de>
3692
3693         * macroexp.c (macro_buffer) <operator=>: New member function.
3694
3695 2018-07-04  Tom Tromey  <tom@tromey.com>
3696
3697         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3698
3699 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3700
3701         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3702         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3703         * maint.c: Likewise.
3704         * top.c: Likewise.
3705
3706 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3707
3708         * NEWS: Create a new section for the next release branch.
3709         Rename the section of the current branch, now that it has
3710         been cut.
3711
3712 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3713
3714         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3715         * version.in: Bump version to 8.2.50.DATE-git.
3716
3717 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3718             Pedro Alves  <palves@redhat.com>
3719
3720         * linux-nat.c (linux_init_ptrace): Rename to ...
3721         (linux_init_ptrace_procfs): ... this.  Call
3722         linux_proc_init_warnings.
3723         (linux_nat_target::post_attach)
3724         (linux_nat_target::post_startup_inferior): Adjust.
3725         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3726         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3727
3728 2018-07-04  Tom de Vries  <tdevries@suse.de>
3729
3730         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3731         check ...
3732         (read_comp_unit_head): ... here.
3733
3734 2018-07-03  Tom Tromey  <tom@tromey.com>
3735
3736         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3737         (stop_tracing, tstatus_command)
3738         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3739         (print_one_static_tracepoint_marker): Update.
3740         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3741         std::vector.
3742         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3743         VEC.
3744         (all_tracepoints, static_tracepoints_here): Return std::vector.
3745
3746 2018-07-03  Tom Tromey  <tom@tromey.com>
3747
3748         * common/ptid.c (ptid_equal): Remove.
3749         * common/ptid.h (ptid_equal): Don't declare.
3750         * ada-tasks.c: Update.
3751         * breakpoint.c: Update.
3752         * common/agent.c: Update.
3753         * corelow.c: Update.
3754         * darwin-nat-info.c: Update.
3755         * darwin-nat.c: Update.
3756         * dcache.c: Update.
3757         * dtrace-probe.c: Update.
3758         * dummy-frame.c: Update.
3759         * fbsd-nat.c: Update.
3760         * frame.c: Update.
3761         * gdbthread.h: Update.
3762         * gnu-nat.c: Update.
3763         * go32-nat.c: Update.
3764         * inf-loop.c: Update.
3765         * inf-ptrace.c: Update.
3766         * infcall.c: Update.
3767         * infcmd.c: Update.
3768         * inflow.c: Update.
3769         * infrun.c: Update.
3770         * linux-fork.c: Update.
3771         * linux-nat.c: Update.
3772         * linux-thread-db.c: Update.
3773         * mi/mi-cmd-var.c: Update.
3774         * mi/mi-interp.c: Update.
3775         * mi/mi-main.c: Update.
3776         * nto-procfs.c: Update.
3777         * ppc-linux-tdep.c: Update.
3778         * procfs.c: Update.
3779         * python/py-inferior.c: Update.
3780         * python/py-record-btrace.c: Update.
3781         * python/py-record.c: Update.
3782         * ravenscar-thread.c: Update.
3783         * regcache.c: Update.
3784         * remote-sim.c: Update.
3785         * remote.c: Update.
3786         * sol-thread.c: Update.
3787         * solib.c: Update.
3788         * target.c: Update.
3789         * tui/tui-stack.c: Update.
3790         * varobj.c: Update.
3791         * windows-nat.c: Update.
3792         * windows-tdep.c: Update.
3793
3794 2018-07-03  Tom Tromey  <tom@tromey.com>
3795
3796         * common/ptid.c (ptid_match): Remove.
3797         * common/ptid.h (ptid_match): Don't declare.
3798         * fbsd-nat.c: Update.
3799         * infcmd.c: Update.
3800         * infrun.c: Update.
3801         * linux-nat.c: Update.
3802         * record-btrace.c: Update.
3803         * regcache.c: Update.
3804         * remote.c: Update.
3805
3806 2018-07-03  Tom Tromey  <tom@tromey.com>
3807
3808         * common/ptid.c (ptid_tid_p): Remove.
3809         * common/ptid.h (ptid_tid_p): Don't declare.
3810         * sol-thread.c: Update.
3811
3812 2018-07-03  Tom Tromey  <tom@tromey.com>
3813
3814         * common/ptid.c (ptid_lwp_p): Remove.
3815         * common/ptid.h (ptid_lwp_p): Don't declare.
3816         * fbsd-nat.c: Update.
3817         * linux-nat.c: Update.
3818         * nat/linux-procfs.c: Update.
3819         * nat/x86-linux-dregs.c: Update.
3820         * sol-thread.c: Update.
3821
3822 2018-07-03  Tom Tromey  <tom@tromey.com>
3823
3824         * common/ptid.c (ptid_is_pid): Remove.
3825         * common/ptid.h (ptid_is_pid): Don't declare.
3826         * infrun.c: Update.
3827         * linux-nat.c: Update.
3828         * mi/mi-interp.c: Update.
3829         * remote.c: Update.
3830         * thread.c: Update.
3831
3832 2018-07-03  Tom Tromey  <tom@tromey.com>
3833
3834         * common/ptid.c (ptid_get_tid): Remove.
3835         * common/ptid.h (ptid_get_tid): Don't declare.
3836         * ada-tasks.c: Update.
3837         * aix-thread.c: Update.
3838         * bsd-uthread.c: Update.
3839         * darwin-nat.c: Update.
3840         * fbsd-nat.c: Update.
3841         * i386-darwin-nat.c: Update.
3842         * infrun.c: Update.
3843         * linux-tdep.c: Update.
3844         * nto-procfs.c: Update.
3845         * ppc-ravenscar-thread.c: Update.
3846         * python/py-infthread.c: Update.
3847         * ravenscar-thread.c: Update.
3848         * sol-thread.c: Update.
3849         * sparc-ravenscar-thread.c: Update.
3850         * windows-nat.c: Update.
3851
3852 2018-07-03  Tom Tromey  <tom@tromey.com>
3853
3854         * common/ptid.c (ptid_get_lwp): Remove.
3855         * common/ptid.h (ptid_get_lwp): Don't declare.
3856         * aarch64-linux-nat.c: Update.
3857         * ada-tasks.c: Update.
3858         * aix-thread.c: Update.
3859         * amd64-linux-nat.c: Update.
3860         * arm-linux-nat.c: Update.
3861         * corelow.c: Update.
3862         * fbsd-nat.c: Update.
3863         * fbsd-tdep.c: Update.
3864         * gnu-nat.c: Update.
3865         * i386-cygwin-tdep.c: Update.
3866         * i386-gnu-nat.c: Update.
3867         * i386-linux-nat.c: Update.
3868         * ia64-linux-nat.c: Update.
3869         * inf-ptrace.c: Update.
3870         * infrun.c: Update.
3871         * linux-fork.c: Update.
3872         * linux-nat.c: Update.
3873         * linux-tdep.c: Update.
3874         * linux-thread-db.c: Update.
3875         * mips-linux-nat.c: Update.
3876         * nat/aarch64-linux-hw-point.c: Update.
3877         * nat/aarch64-linux.c: Update.
3878         * nat/linux-btrace.c: Update.
3879         * nat/linux-osdata.c: Update.
3880         * nat/linux-procfs.c: Update.
3881         * nat/x86-linux-dregs.c: Update.
3882         * obsd-nat.c: Update.
3883         * ppc-fbsd-nat.c: Update.
3884         * ppc-linux-nat.c: Update.
3885         * procfs.c: Update.
3886         * python/py-infthread.c: Update.
3887         * ravenscar-thread.c: Update.
3888         * remote.c: Update.
3889         * s390-linux-nat.c: Update.
3890         * sol-thread.c: Update.
3891         * sol2-tdep.c: Update.
3892         * spu-linux-nat.c: Update.
3893         * x86-linux-nat.c: Update.
3894         * xtensa-linux-nat.c: Update.
3895
3896 2018-07-03  Tom Tromey  <tom@tromey.com>
3897
3898         * common/ptid.c (ptid_get_pid): Remove.
3899         * common/ptid.h (ptid_get_pid): Don't declare.
3900         * aarch64-linux-nat.c: Update.
3901         * ada-lang.c: Update.
3902         * aix-thread.c: Update.
3903         * alpha-bsd-nat.c: Update.
3904         * amd64-fbsd-nat.c: Update.
3905         * amd64-linux-nat.c: Update.
3906         * arm-linux-nat.c: Update.
3907         * arm-nbsd-nat.c: Update.
3908         * auxv.c: Update.
3909         * break-catch-syscall.c: Update.
3910         * breakpoint.c: Update.
3911         * bsd-uthread.c: Update.
3912         * corelow.c: Update.
3913         * ctf.c: Update.
3914         * darwin-nat.c: Update.
3915         * fbsd-nat.c: Update.
3916         * fbsd-tdep.c: Update.
3917         * gcore.c: Update.
3918         * gnu-nat.c: Update.
3919         * hppa-nbsd-nat.c: Update.
3920         * hppa-obsd-nat.c: Update.
3921         * i386-fbsd-nat.c: Update.
3922         * ia64-linux-nat.c: Update.
3923         * inf-ptrace.c: Update.
3924         * infcmd.c: Update.
3925         * inferior.c: Update.
3926         * inferior.h: Update.
3927         * inflow.c: Update.
3928         * infrun.c: Update.
3929         * linux-fork.c: Update.
3930         * linux-nat.c: Update.
3931         * linux-tdep.c: Update.
3932         * linux-thread-db.c: Update.
3933         * m68k-bsd-nat.c: Update.
3934         * mi/mi-interp.c: Update.
3935         * mi/mi-main.c: Update.
3936         * mips-linux-nat.c: Update.
3937         * mips-nbsd-nat.c: Update.
3938         * mips64-obsd-nat.c: Update.
3939         * nat/aarch64-linux-hw-point.c: Update.
3940         * nat/aarch64-linux.c: Update.
3941         * nat/linux-btrace.c: Update.
3942         * nat/linux-osdata.c: Update.
3943         * nat/linux-procfs.c: Update.
3944         * nat/x86-linux-dregs.c: Update.
3945         * nto-procfs.c: Update.
3946         * obsd-nat.c: Update.
3947         * ppc-linux-nat.c: Update.
3948         * ppc-nbsd-nat.c: Update.
3949         * ppc-obsd-nat.c: Update.
3950         * proc-service.c: Update.
3951         * procfs.c: Update.
3952         * python/py-inferior.c: Update.
3953         * python/py-infthread.c: Update.
3954         * ravenscar-thread.c: Update.
3955         * record.c: Update.
3956         * remote-sim.c: Update.
3957         * remote.c: Update.
3958         * rs6000-nat.c: Update.
3959         * s390-linux-nat.c: Update.
3960         * sh-nbsd-nat.c: Update.
3961         * sol-thread.c: Update.
3962         * sparc-nat.c: Update.
3963         * sparc64-tdep.c: Update.
3964         * spu-linux-nat.c: Update.
3965         * spu-tdep.c: Update.
3966         * target-debug.h: Update.
3967         * target.c: Update.
3968         * thread.c: Update.
3969         * tid-parse.c: Update.
3970         * tracefile-tfile.c: Update.
3971         * vax-bsd-nat.c: Update.
3972         * windows-nat.c: Update.
3973         * x86-linux-nat.c: Update.
3974         * x86-nat.c: Update.
3975
3976 2018-07-03  Tom Tromey  <tom@tromey.com>
3977
3978         * common/ptid.c (pid_to_ptid): Remove.
3979         * common/ptid.h (pid_to_ptid): Don't declare.
3980         * aix-thread.c: Update.
3981         * arm-linux-nat.c: Update.
3982         * common/ptid.c: Update.
3983         * common/ptid.h: Update.
3984         * corelow.c: Update.
3985         * ctf.c: Update.
3986         * darwin-nat.c: Update.
3987         * fbsd-nat.c: Update.
3988         * fork-child.c: Update.
3989         * gnu-nat.c: Update.
3990         * go32-nat.c: Update.
3991         * inf-ptrace.c: Update.
3992         * infcmd.c: Update.
3993         * inferior.c: Update.
3994         * infrun.c: Update.
3995         * linux-fork.c: Update.
3996         * linux-nat.c: Update.
3997         * nat/aarch64-linux-hw-point.c: Update.
3998         * nat/fork-inferior.c: Update.
3999         * nat/x86-linux-dregs.c: Update.
4000         * nto-procfs.c: Update.
4001         * obsd-nat.c: Update.
4002         * procfs.c: Update.
4003         * progspace.c: Update.
4004         * remote.c: Update.
4005         * rs6000-nat.c: Update.
4006         * s390-linux-nat.c: Update.
4007         * sol-thread.c: Update.
4008         * spu-linux-nat.c: Update.
4009         * target.c: Update.
4010         * top.c: Update.
4011         * tracefile-tfile.c: Update.
4012         * windows-nat.c: Update.
4013
4014 2018-07-03  Tom Tromey  <tom@tromey.com>
4015
4016         * common/ptid.h (ptid_build): Don't declare.
4017         * common/ptid.c (ptid_build): Remove.
4018         * aix-thread.c: Update.
4019         * bsd-kvm.c: Update.
4020         * bsd-uthread.c: Update.
4021         * common/agent.c: Update.
4022         * common/ptid.c: Update.
4023         * common/ptid.h: Update.
4024         * corelow.c: Update.
4025         * darwin-nat.c: Update.
4026         * fbsd-nat.c: Update.
4027         * gnu-nat.c: Update.
4028         * linux-fork.c: Update.
4029         * linux-nat.c: Update.
4030         * linux-thread-db.c: Update.
4031         * nat/linux-osdata.c: Update.
4032         * nat/linux-procfs.c: Update.
4033         * nto-procfs.c: Update.
4034         * obsd-nat.c: Update.
4035         * proc-service.c: Update.
4036         * procfs.c: Update.
4037         * ravenscar-thread.c: Update.
4038         * remote-sim.c: Update.
4039         * remote.c: Update.
4040         * sol-thread.c: Update.
4041         * target.c: Update.
4042         * windows-nat.c: Update.
4043
4044 2018-07-03  Tom Tromey  <tom@tromey.com>
4045
4046         * infrun.c (follow_exec): Use exit_inferior_silent.
4047         * inferior.c (exit_inferior_num_silent): Remove.
4048         * inferior.h (exit_inferior_num_silent): Don't declare.
4049
4050 2018-07-03  Tom Tromey  <tom@tromey.com>
4051
4052         PR cli/23340:
4053         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4054         inferior_ptid on error.
4055
4056 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4057             Simon Marchi  <simon.marchi@polymtl.ca>
4058
4059         PR tdep/8282
4060         * disasm.h (gdb_disassembler): Add
4061         `m_disassembler_options_holder'. member
4062         * disasm.c (get_all_disassembler_options): New function.
4063         (gdb_disassembler::gdb_disassembler): Use it.
4064         (gdb_buffered_insn_length_init_dis): Likewise.
4065         (gdb_buffered_insn_length): Adjust accordingly.
4066         (set_disassembler_options): Handle options with arguments.
4067         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4068         line if showing options with descriptions.
4069         (disassembler_options_completer): Adapt to using the
4070         `disasm_options_and_args_t' structure.
4071         * mips-tdep.c (mips_disassembler_options): New variable.
4072         (mips_disassembler_options_o32): Likewise.
4073         (mips_disassembler_options_n32): Likewise.
4074         (mips_disassembler_options_n64): Likewise.
4075         (gdb_print_insn_mips): Don't set `disassembler_options'.
4076         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4077         functions.
4078         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4079         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4080         `gdbarch_disassembler_options_implicit' and
4081         `gdbarch_valid_disassembler_options'.
4082         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4083         `disasm_options_and_args_t' structure.
4084         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4085         method.
4086         (valid_disassembler_options): Switch from `disasm_options_t' to
4087         the `disasm_options_and_args_t' structure.
4088         * NEWS: Document `set disassembler-options' support for the MIPS
4089         target.
4090         * gdbarch.h: Regenerate.
4091         * gdbarch.c: Regenerate.
4092
4093 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4094
4095         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4096
4097 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4098
4099         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4100         parameter in call to amd64_target_description.
4101         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4102         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4103         (amd64fbsd_init_abi): Likewise.
4104         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4105         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4106         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4107         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4108
4109 2018-06-29  Pedro Alves  <palves@redhat.com>
4110
4111         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4112         "segments" parameter.
4113         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4114         (_initialize_amd64_tdep): Update call to
4115         amd64_create_target_description.
4116         (amd64_target_description): Add "segments" parameter.  Adjust
4117         the implementation to use it.
4118         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4119         call to amd64_create_target_description.
4120         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4121         * gdb/arch/amd64.h (amd64_create_target_description): Add
4122         "segments" register.
4123         * gdb/arch/amd64.c (amd64_create_target_description): Add
4124         "segments" parameter.  Call create_feature_i386_64bit_segments
4125         only if SEGMENTS is true.
4126         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4127         call to amd64_create_target_description.
4128
4129 2018-06-29  Pedro Alves  <palves@redhat.com>
4130
4131         * thread.c (thread_target_id_str): New, factored out from ...
4132         (print_thread_info_1): ... here.  Use it to compute the max
4133         "Target Id" column width.
4134
4135 2018-06-29  Pedro Alves  <palves@redhat.com>
4136
4137         * remote.c (remote_target::extra_thread_info): Delete
4138         'display_buf' and 'n' locals.  from the cache, regardless of
4139         packet mechanims is in use.  Use cache for qThreadExtra and qP
4140         methods too.
4141
4142 2018-06-29  Pedro Alves  <palves@redhat.com>
4143
4144         * blockframe.c (find_pc_sect_containing_function): New function.
4145         * breakpoint.c (print_breakpoint_location): Don't call
4146         find_pc_sect_function.
4147         * linespec.c (create_sals_line_offset): Record the location's
4148         symbol in the sal.
4149         * linespec.c (convert_address_location_to_sals): Fill in sal's
4150         symbol with find_pc_sect_containing_function.
4151         * symtab.c (find_function_start_sal): Rename to ...
4152         (find_function_start_sal_1): ... this.
4153         (find_function_start_sal): Reimplement as wrapper around
4154         find_function_start_sal_1, and use
4155         find_pc_sect_containing_function to fill in the sal's symbol.
4156         (find_function_start_sal(symbol*, bool)): Adjust.
4157         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4158         comments.
4159         (find_pc_sect_containing_function): Declare.
4160
4161 2018-06-29  Pedro Alves  <palves@redhat.com>
4162
4163         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4164         true if the the location has no symbol.
4165
4166 2018-06-28  Tom Tromey  <tom@tromey.com>
4167
4168         * NEWS: Mention --enable-codesign.
4169         * silent-rules.mk (ECHO_SIGN): New variable.
4170         * configure.ac: Add --enable-codesign.
4171         * configure: Rebuild.
4172         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4173         (gdb$(EXEEXT)): Optionally invoke codesign.
4174
4175 2018-06-28  Pedro Alves  <palves@redhat.com>
4176
4177         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4178         comments.
4179         (switch_to_thread_no_regs): Adjust comment.
4180         * infcmd.c (stop_pc): Delete.
4181         (post_create_inferior, info_program_command): Replace references
4182         to stop_pc with references to thread_info->suspend.stop_pc.
4183         * inferior.h (stop_pc): Delete declaration.
4184         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4185         (handle_inferior_event_1, handle_signal_stop)
4186         (process_event_stop_test, keep_going_stepped_thread)
4187         (handle_step_into_function, handle_step_into_function_backward)
4188         (print_stop_location): Replace references to stop_pc with
4189         references to thread_info->suspend.stop_pc.
4190         (struct infcall_suspend_state) <stop_pc>: Delete field.
4191         (save_infcall_suspend_state, restore_infcall_suspend_state):
4192         Remove references to inf_stat->stop_pc.
4193         * linux-fork.c (fork_load_infrun_state): Likewise.
4194         * record-btrace.c (record_btrace_set_replay): Likewise.
4195         * record-full.c (record_full_goto_entry): Likewise.
4196         * remote.c (print_one_stopped_thread): Likewise.
4197         * target.c (target_resume): Extend comment.
4198         * thread.c (set_executing_thread): New.
4199         (set_executing): Use it.
4200         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4201         Remove references to stop_pc.
4202
4203 2018-06-28  Pedro Alves  <palves@redhat.com>
4204
4205         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4206         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4207
4208 2018-06-28  Tom Tromey  <tom@tromey.com>
4209
4210         * coffread.c (coff_symfile_finish): Update.
4211         * xcoffread.c (xcoff_symfile_finish): Update.
4212         * elfread.c (elf_symfile_finish): Update.
4213         * symfile.h (dwarf2_free_objfile): Don't declare.
4214         * dwarf2read.c (_initialize_dwarf2_read): Use
4215         register_objfile_data_with_cleanup.
4216         (dwarf2_free_objfile): Now static.  Change signature.
4217
4218 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4219
4220         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4221         option "-o" to add-symbol-file-load to add an offset to each
4222         section's load address.
4223         * symfile.c (set_objfile_default_section_offset): New function.
4224
4225 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4226
4227         * symfile.c (add_symbol_file_command): Make sure that sections
4228         with the same name are sorted in the same order.
4229
4230 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4231
4232         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4233         require the second argument.  If omitted, load sections at the
4234         addresses specified in the file.
4235
4236 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4237
4238         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4239         (_initialize_symfile): Add option "-o" to symbol-file to add an
4240         offset to each section of the symbol file.
4241
4242 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4243
4244         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4245
4246 2018-06-27  Tom Tromey  <tom@tromey.com>
4247
4248         * stack.c (_initialize_stack): Update "func" help text.
4249
4250 2018-06-27  Tom Tromey  <tom@tromey.com>
4251
4252         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4253         std::vector.
4254         (unwind_infopy_str, pyuw_create_unwind_info)
4255         (unwind_infopy_add_saved_register, pyuw_sniffer)
4256         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4257         Update.
4258         (struct saved_reg): Add constructor.
4259         <value>: Now a gdbpy_ref<>.
4260
4261 2018-06-27  Tom Tromey  <tom@tromey.com>
4262
4263         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4264
4265 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4266
4267         * gdb-gdb.py.in: Format using autopep8.
4268
4269 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4270
4271         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4272         (type_lookup_function): Recognize CORE_ADDR values.
4273
4274 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4275
4276         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4277         print tag_name.
4278
4279 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4280
4281         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4282         <__lt__>: Add.
4283
4284 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4285
4286         * gdb-gdb.py: Move to...
4287         * gdb-gdb.py.in: ... here.
4288         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4289         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4290         dependencies.
4291         (distclean): Remove gdb-gdb.py when cleaning.
4292         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4293         * configure: Re-generate.
4294
4295 2018-06-27  Pedro Alves  <palves@redhat.com>
4296
4297         * proc-service.c (get_ps_regcache): New.
4298         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4299         (ps_lsetfpregs): Use it.
4300
4301 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4302
4303         PR gdb/21695
4304         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4305         (dwarf_decode_lines_1): Adjust.
4306
4307 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4308
4309         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4310         override.
4311         <info_proc>: Likewise.
4312
4313 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4314
4315         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4316         to windows_fetch_one_register, and only handle the case of
4317         fetching one register.  Move the code that reloads the context
4318         and iterates over all registers if R is negative to...
4319         (windows_nat_target::fetch_registers): ... here.
4320         (do_windows_store_inferior_registers): Rename to
4321         windows_store_one_register, and only handle the case of storing
4322         one register.  Move the code that handles the case where r is
4323         negative to...
4324         (windows_nat_target::store_registers) ... here.
4325
4326 2018-06-26  Tom Tromey  <tom@tromey.com>
4327
4328         PR rust/22574:
4329         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4330         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4331         Update.
4332         (rust_internal_print_type): Add podata parameter.
4333         (rust_print_type): Update.
4334
4335 2018-06-26  Tom Tromey  <tom@tromey.com>
4336
4337         * typeprint.h (struct print_offset_data) <update, finish,
4338         maybe_print_hole>: New methods.
4339         <indentation>: New constant.
4340         * typeprint.c (print_offset_data::indentation): Define.
4341         (print_offset_data::maybe_print_hole, print_offset_data::update)
4342         (print_offset_data::finish): Move from c-typeprint.c and rename.
4343         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4344         (print_spaces_filtered_with_print_options): Update.
4345         (c_print_type_union_field_offset, maybe_print_hole)
4346         (c_print_type_struct_field_offset): Move to typeprint.c and
4347         rename.
4348         (c_type_print_base_struct_union): Update.
4349
4350 2018-06-25  Pedro Alves  <palves@redhat.com>
4351
4352         * gdbthread.h (thread_info_ref, delete_thread)
4353         (delete_thread_silent, first_thread_of_inferior)
4354         (any_thread_of_inferior, switch_to_thread)
4355         (enable_thread_stack_temporaries)
4356         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4357         (get_last_thread_stack_temporary)
4358         (value_in_thread_stack_temporaries, can_access_registers_thread):
4359         Spell out "struct thread_info" instead of just "thread_info".
4360         * inferior.h (notice_new_inferior): Likewise.
4361
4362 2018-06-25  Pedro Alves  <palves@redhat.com>
4363
4364         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4365         pass thread_info pointer to delete_thread.
4366         (windows_nat_target::detach): Pass inferior pointer to
4367         detach_inferior.
4368         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4369         delete_thread.
4370         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4371         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4372         and pass a thread_info pointer to delete_thread.
4373         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4374         pass thread_info pointer to delete_thread.
4375         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4376         delete_thread_silent call.
4377         * procfs.c (procfs_target::detach): Pass inferior pointer to
4378         detach_inferior.
4379         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4380         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4381         delete_thread_silent call.
4382         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4383         pass thread_info pointer to delete_thread.
4384         (windows_nat_target::detach): Pass inferior pointer to
4385         delete_inferior.
4386
4387 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4388
4389         * regcache.c (readable_regcache::read_part): Fix asserts.
4390         (reg_buffer::raw_collect_part): New function.
4391         (regcache::write_part): Fix asserts.
4392         (reg_buffer::raw_supply_part): New function.
4393         (regcache::transfer_regset_register): New helper function.
4394         (regcache::transfer_regset): Call new functions.
4395         (regcache_supply_regset): Use gdb_byte*.
4396         (regcache::supply_regset): Likewise.
4397         (regcache_collect_regset): Likewise.
4398         (regcache::collect_regset): Likewise.
4399         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4400         (reg_buffer::raw_supply_part): Likewise.
4401         (regcache::transfer_regset_register): Likewise.
4402         (regcache::transfer_regset): Use gdb_byte*.
4403
4404 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4405
4406         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4407
4408 2018-06-21  Pedro Alves  <palves@redhat.com>
4409
4410         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4411         instead of a ptid_t.  All callers adjusted.
4412         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4413         adjusted.
4414         (print_ada_task_info, display_current_task_id, task_command_1):
4415         Adjust.
4416         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4417         inferior_thread.
4418         (breakpoint_kind): Adjust.
4419         (remove_breakpoints_pid): Rename to ...
4420         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4421         pointer.  All callers adjusted.
4422         (bpstat_clear_actions): Use inferior_thread.
4423         (get_bpstat_thread): New.
4424         (bpstat_do_actions): Use it.
4425         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4426         to take a thread_info pointer.  All callers adjusted.
4427         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4428         (breakpoint_re_set_thread): Use inferior_thread.
4429         * breakpoint.h (struct inferior): Forward declare.
4430         (bpstat_stop_status): Update.
4431         (remove_breakpoints_pid): Delete.
4432         (remove_breakpoints_inf): New.
4433         * bsd-uthread.c (bsd_uthread_target::wait)
4434         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4435         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4436         (maint_btrace_packet_history_cmd)
4437         (maint_btrace_clear_packet_history_cmd): Adjust.
4438         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4439         inferior_thread.
4440         * cli/cli-interp.c: Include "inferior.h".
4441         * common/refcounted-object.h (struct
4442         refcounted_object_ref_policy): New.
4443         * compile/compile-object-load.c: Include gdbthread.h.
4444         (store_regs): Use inferior_thread.
4445         * corelow.c (core_target::close): Use current_inferior.
4446         (core_target_open): Adjust to use first_thread_of_inferior and use
4447         the current inferior.
4448         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4449         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4450         <thread>: ... this new field.  All references adjusted.
4451         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4452         Take a thread_info pointer instead of a ptid_t.
4453         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4454         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4455         thread_info pointer instead of a ptid_t.
4456         * elfread.c: Include "inferior.h".
4457         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4458         Use inferior_thread.
4459         * eval.c (evaluate_subexp): Likewise.
4460         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4461         inferior_thread.
4462         * gdb_proc_service.h (struct thread_info): Forward declare.
4463         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4464         <thread>: ... this new field.  All references adjusted.
4465         * gdbarch.h, gdbarch.c: Regenerate.
4466         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4467         'thread' parameter.  All implementations and callers adjusted.
4468         * gdbthread.h (thread_info) <set_running>: New method.
4469         (delete_thread, delete_thread_silent): Take a thread_info pointer
4470         instead of a ptid.
4471         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4472         (first_thread_of_process): Delete, replaced by ...
4473         (first_thread_of_inferior): ... this new function.  All callers
4474         adjusted.
4475         (any_live_thread_of_process): Delete, replaced by ...
4476         (any_live_thread_of_inferior): ... this new function.  All callers
4477         adjusted.
4478         (switch_to_thread, switch_to_no_thread): Declare.
4479         (is_executing): Delete.
4480         (enable_thread_stack_temporaries): Update comment.
4481         <enable_thread_stack_temporaries>: Take a thread_info pointer
4482         instead of a ptid_t.  Incref the thread.
4483         <~enable_thread_stack_temporaries>: Decref the thread.
4484         <m_ptid>: Delete
4485         <m_thr>: New.
4486         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4487         (get_last_thread_stack_temporary)
4488         (value_in_thread_stack_temporaries, can_access_registers_thread):
4489         Take a thread_info pointer instead of a ptid_t.  All callers
4490         adjusted.
4491         * infcall.c (get_call_return_value): Use inferior_thread.
4492         (run_inferior_call): Work with thread pointers instead of ptid_t.
4493         (call_function_by_hand_dummy): Work with thread pointers instead
4494         of ptid_t.  Use thread_info_ref.
4495         * infcmd.c (proceed_thread_callback): Access thread's state
4496         directly.
4497         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4498         access thread's state directly.
4499         (continue_command): Use inferior_thread.
4500         (info_program_command): Use find_thread_ptid and access thread
4501         state directly.
4502         (proceed_after_attach_callback): Use thread state directly.
4503         (notice_new_inferior): Take a thread_info pointer instead of a
4504         ptid_t.  All callers adjusted.
4505         (exit_inferior): Take an inferior pointer instead of a pid.  All
4506         callers adjusted.
4507         (exit_inferior_silent): New.
4508         (detach_inferior): Delete.
4509         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4510         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4511         (detach_inferior_command, kill_inferior_command): Use
4512         find_inferior_id instead of valid_gdb_inferior_id and
4513         gdb_inferior_id_to_pid.
4514         (inferior_command): Use inferior and thread pointers.
4515         * inferior.h (struct thread_info): Forward declare.
4516         (notice_new_inferior): Take a thread_info pointer instead of a
4517         ptid_t.  All callers adjusted.
4518         (detach_inferior): Delete declaration.
4519         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4520         instead of a pid.  All callers adjusted.
4521         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4522         (valid_gdb_inferior_id): Delete.
4523         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4524         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4525         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4526         ...
4527         <inf>: ... this new field.
4528         <step_ptid>: Delete, replaced by ...
4529         <step_thread>: ... this new field.
4530         (get_displaced_stepping_state): Take an inferior pointer instead
4531         of a pid.  All callers adjusted.
4532         (displaced_step_in_progress_any_inferior): Adjust.
4533         (displaced_step_in_progress_thread): Take a thread pointer instead
4534         of a ptid_t.  All callers adjusted.
4535         (displaced_step_in_progress, add_displaced_stepping_state): Take
4536         an inferior pointer instead of a pid.  All callers adjusted.
4537         (get_displaced_step_closure_by_addr): Adjust.
4538         (remove_displaced_stepping_state): Take an inferior pointer
4539         instead of a pid.  All callers adjusted.
4540         (displaced_step_prepare_throw, displaced_step_prepare)
4541         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4542         All callers adjusted.
4543         (start_step_over): Adjust.
4544         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4545         displaced step queue.
4546         (do_target_resume): Adjust.
4547         (fetch_inferior_event): Use inferior_thread.
4548         (context_switch, get_inferior_stop_soon): Take an
4549         execution_control_state pointer instead of a ptid_t.  All callers
4550         adjusted.
4551         (switch_to_thread_cleanup): Delete.
4552         (stop_all_threads): Use scoped_restore_current_thread.
4553         * inline-frame.c: Include "gdbthread.h".
4554         (inline_state) <inline_state>: Take a thread pointer instead of a
4555         ptid_t.  All callers adjusted.
4556         <ptid>: Delete, replaced by ...
4557         <thread>: ... this new field.
4558         (find_inline_frame_state): Take a thread pointer instead of a
4559         ptid_t.  All callers adjusted.
4560         (skip_inline_frames, step_into_inline_frame)
4561         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4562         pointer instead of a ptid_t.  All callers adjusted.
4563         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4564         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4565         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4566         pointers directly.
4567         * linux-nat.c (get_detach_signal): Likewise.
4568         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4569         (thread_db_notice_clone): Adjust.
4570         (thread_db_find_new_threads_silently)
4571         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4572         a thread pointer instead of a ptid_t.  All callers adjusted.
4573         * mi/mi-cmd-var.c: Include "inferior.h".
4574         (mi_cmd_var_update_iter): Update to use thread pointers.
4575         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4576         inferior directly.
4577         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4578         out to ...
4579         (mi_output_running): ... this new function.
4580         (mi_on_resume_1): Adjust to use it.
4581         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4582         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4583         directly.
4584         (interrupt_thread_callback): : Adjust to use thread and inferior
4585         pointers.
4586         * proc-service.c: Include "gdbthread.h".
4587         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4588         * progspace-and-thread.c: Include "inferior.h".
4589         * progspace.c: Include "inferior.h".
4590         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4591         hold a reference to an inferior_object.
4592         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4593         inferior_thread.
4594         * python/py-inferior.c (struct inferior_object): Give the type a
4595         tag name instead of a typedef.
4596         (python_on_normal_stop): No need to check if the current thread is
4597         listed.
4598         (inferior_to_inferior_object): Change return type to
4599         inferior_object.  All callers adjusted.
4600         (find_thread_object): Delete, bits factored out to ...
4601         (thread_to_thread_object): ... this new function.
4602         * python/py-infthread.c (create_thread_object): Use
4603         inferior_to_inferior_object.
4604         (thpy_is_stopped): Use thread pointer directly.
4605         (gdbpy_selected_thread): Use inferior_thread.
4606         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4607         field, replaced with ...
4608         <thread>: ... this new field.  All users adjusted.
4609         (btpy_insn_or_gap_new): Drop const.
4610         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4611         callers adjusted.
4612         * python/py-record.c: Include "gdbthread.h".
4613         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4614         a ptid_t.  All callers adjusted.
4615         (gdbpy_current_recording): Use inferior_thread.
4616         * python/py-record.h (recpy_record_object) <ptid>: Delete
4617         field, replaced with ...
4618         <thread>: ... this new field.  All users adjusted.
4619         (recpy_element_object) <ptid>: Delete
4620         field, replaced with ...
4621         <thread>: ... this new field.  All users adjusted.
4622         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4623         a ptid_t.  All callers adjusted.
4624         * python/py-threadevent.c: Include "gdbthread.h".
4625         (get_event_thread): Use thread_to_thread_object.
4626         * python/python-internal.h (struct inferior_object): Forward
4627         declare.
4628         (find_thread_object, find_inferior_object): Delete declarations.
4629         (thread_to_thread_object, inferior_to_inferior_object): New
4630         declarations.
4631         * record-btrace.c: Include "inferior.h".
4632         (require_btrace_thread): Use inferior_thread.
4633         (record_btrace_frame_sniffer)
4634         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4635         (get_thread_current_frame): Use scoped_restore_current_thread and
4636         switch_to_thread.
4637         (get_thread_current_frame): Use thread pointer directly.
4638         (record_btrace_replay_at_breakpoint): Use thread's inferior
4639         pointer directly.
4640         * record-full.c: Include "inferior.h".
4641         * regcache.c: Include "gdbthread.h".
4642         (get_thread_arch_regcache): Use the inferior's address space
4643         directly.
4644         (get_thread_regcache, registers_changed_thread): New.
4645         * regcache.h (get_thread_regcache(thread_info *thread)): New
4646         overload.
4647         (registers_changed_thread): New.
4648         (remote_target) <remote_detach_1>: Swap order of parameters.
4649         (remote_add_thread): <remote_add_thread>: Return the new thread.
4650         (get_remote_thread_info(ptid_t)): New overload.
4651         (remote_target::remote_notice_new_inferior): Use thread pointers
4652         directly.
4653         (remote_target::process_initial_stop_replies): Use
4654         thread_info::set_running.
4655         (remote_target::remote_detach_1, remote_target::detach)
4656         (extended_remote_target::detach): Adjust.
4657         * stack.c (frame_show_address): Use inferior_thread.
4658         * target-debug.h (target_debug_print_thread_info_pp): New.
4659         * target-delegates.c: Regenerate.
4660         * target.c (default_thread_address_space): Delete.
4661         (memory_xfer_partial_1): Use current_inferior.
4662         (target_detach): Use current_inferior.
4663         (target_thread_address_space): Delete.
4664         (generic_mourn_inferior): Use current_inferior.
4665         * target.h (struct target_ops) <thread_address_space>: Delete.
4666         (target_thread_address_space): Delete.
4667         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4668         pointers directly.
4669         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4670         thread pointer instead of a ptid_t.  Adjust all callers.
4671         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4672         (first_thread_of_process): Delete, replaced by ...
4673         (first_thread_of_inferior): ... this new function.  All callers
4674         adjusted.
4675         (any_thread_of_process): Rename to ...
4676         (any_thread_of_inferior): ... this, and take an inferior pointer.
4677         (any_live_thread_of_process): Rename to ...
4678         (any_live_thread_of_inferior): ... this, and take an inferior
4679         pointer.
4680         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4681         (value_in_thread_stack_temporaries)
4682         (get_last_thread_stack_temporary): Take a thread pointer instead
4683         of a ptid_t.  Adjust all callers.
4684         (thread_info::set_running): New.
4685         (validate_registers_access): Use inferior_thread.
4686         (can_access_registers_ptid): Rename to ...
4687         (can_access_registers_thread): ... this, and take a thread
4688         pointer.
4689         (print_thread_info_1): Adjust to compare thread pointers instead
4690         of ptids.
4691         (switch_to_no_thread, switch_to_thread): Make extern.
4692         (scoped_restore_current_thread::~scoped_restore_current_thread):
4693         Use m_thread pointer directly.
4694         (scoped_restore_current_thread::scoped_restore_current_thread):
4695         Use inferior_thread.
4696         (thread_command): Use thread pointer directly.
4697         (thread_num_make_value_helper): Use inferior_thread.
4698         * top.c (execute_command): Use inferior_thread.
4699         * tui/tui-interp.c: Include "inferior.h".
4700         * varobj.c (varobj_create): Use inferior_thread.
4701         (value_of_root_1): Use find_thread_global_id instead of
4702         global_thread_id_to_ptid.
4703
4704 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4705
4706         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4707         possible.
4708         (regcache::write_part): Likewise.
4709         (readable_regcache::cooked_read_part): Update comment.
4710         (readable_regcache::cooked_write_part): Likewise.
4711         * regcache.h: (readable_regcache::read_part): Likewise.
4712         (regcache::write_part): Likewise.
4713
4714 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4715             Dirk Schubert  <dirk.schubert@arm.com>
4716
4717         * aarch64-linux-nat.c (post_attach): New.
4718         (aarch64_linux_nat_target::post_attach): Override post_attach to
4719         record the number of hardware debug registers.
4720
4721 2018-06-20  Tom Tromey  <tom@tromey.com>
4722
4723         * python/py-param.c (add_setshow_generic): Make parameters const.
4724         (parmpy_init): Update.
4725
4726 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4727
4728         * regcache.h (regcache_cooked_read_ftype): Rename to...
4729         (register_read_ftype): ...this, change type to function_view.
4730         (class reg_buffer) <save>: Remove src parameter.
4731         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4732         parameter non-const in first overload.  Remove src parameter in
4733         second overload.
4734         * regcache.c (do_cooked_read): Remove.
4735         (readonly_detached_regcache::readonly_detached_regcache): Make
4736         parameter non-const, adjust call to other constructor.
4737         (reg_buffer::save): Remove src parameter.
4738         * frame.c (do_frame_register_read): Remove.
4739         (frame_save_as_regcache): Use lambda function.
4740         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4741         parameter to ppu2spu_data *.
4742         (ppu2spu_sniffer): Use lambda function.
4743
4744 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4745
4746         * record-full.c (record_full_target::insert_breakpoint): Remove
4747         "struct" keyword, add const.
4748
4749 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4750
4751         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4752         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4753         * configure.ac: Remove AC_PREREQ, add missing quoting.
4754         * gnulib/configure.ac: Modernize usage of
4755         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4756         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4757         (AUTOMAKE_VERSION): Bump to 1.15.1.
4758         * configure: Re-generate.
4759         * config.in: Re-generate.
4760         * aclocal.m4: Re-generate.
4761         * gnulib/aclocal.m4: Re-generate.
4762         * gnulib/config.in: Re-generate.
4763         * gnulib/configure: Re-generate.
4764         * gnulib/import/Makefile.in: Re-generate.
4765
4766 2018-06-19  Pedro Alves  <palves@redhat.com>
4767
4768         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4769         (lookup_minimal_symbol_by_pc_section): ... here with
4770         gdb_assert_not_reached added.
4771
4772 2018-06-19  Pedro Alves  <palves@redhat.com>
4773
4774         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4775         parameter with a block parameter.  Compare location's block symbol
4776         with the frame's block instead of addresses.
4777         (skip_inline_frames): Pass the current block instead of the
4778         frame's address.  Break out as soon as we determine the frame
4779         should not be skipped.
4780
4781 2018-06-18  Tom Tromey  <tom@tromey.com>
4782
4783         * solib-aix.c (solib_aix_get_section_offsets): Return
4784         unique_xmalloc_ptr.
4785         (solib_aix_solib_create_inferior_hook): Update.
4786
4787 2018-06-18  Tom Tromey  <tom@tromey.com>
4788
4789         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4790
4791 2018-06-18  Tom Tromey  <tom@tromey.com>
4792
4793         * solib-frv.c (frv_relocate_main_executable): Use
4794         unique_xmalloc_ptr.
4795         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4796         unique_xmalloc_ptr.
4797
4798 2018-06-18  Tom Tromey  <tom@tromey.com>
4799
4800         * objfiles.h (inhibit_section_map_updates): Update.
4801         (resume_section_map_updates, resume_section_map_updates_cleanup):
4802         Remove.
4803         * solib-svr4.c (svr4_handle_solib_event): Update.
4804         * objfiles.c (inhibit_section_map_updates): Return
4805         scoped_restore_tmpl<int>.
4806         (resume_section_map_updates, resume_section_map_updates_cleanup):
4807         Remove.
4808
4809 2018-06-18  Tom Tromey  <tom@tromey.com>
4810
4811         * valprint.h (read_string): Update.
4812         * valprint.c (read_string): Change type of "buffer".
4813         (val_print_string): Update.
4814         * python/py-value.c (valpy_string): Update.
4815         * language.h (struct language_defn) <la_get_string>: Change
4816         type of "buffer".
4817         (default_get_string, c_get_string): Update.
4818         * language.c (default_get_string): Change type of "buffer".
4819         * guile/scm-value.c (gdbscm_value_to_string): Update.
4820         * c-lang.c (c_get_string): Change type of "buffer".
4821
4822 2018-06-18  Tom Tromey  <tom@tromey.com>
4823
4824         * ser-mingw.c (struct pipe_state_destroyer): New.
4825         (pipe_state_up): New typedef.
4826         (cleanup_pipe_state): Remove.
4827         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4828
4829 2018-06-18  Tom Tromey  <tom@tromey.com>
4830
4831         * rust-lang.h (rust_yyerror): Don't declare.
4832         * rust-lang.c (rust_language_defn): Update.
4833         * rust-exp.y (yyerror): Now static.
4834         * parse.c (parse_exp_in_context_1): Update.
4835         * p-lang.h (p_yyerror): Don't declare.
4836         * p-lang.c (p_language_defn): Update.
4837         * p-exp.y (yyerror): Now static.
4838         * opencl-lang.c (opencl_language_defn): Update.
4839         * objc-lang.c (objc_language_defn): Update.
4840         * m2-lang.h (m2_yyerror): Don't declare.
4841         * m2-lang.c (m2_language_defn): Update.
4842         * m2-exp.y (yyerror): Now static.
4843         * language.h (struct language_defn) <la_error>: Remove.
4844         * language.c (unk_lang_error): Remove.
4845         (unknown_language_defn, auto_language_defn): Remove.
4846         * go-lang.h (go_yyerror): Don't declare.
4847         * go-lang.c (go_language_defn): Update.
4848         * go-exp.y (yyerror): Now static.
4849         * f-lang.h (f_yyerror): Don't declare.
4850         * f-lang.c (f_language_defn): Update.
4851         * f-exp.y (yyerror): Now static.
4852         * d-lang.h (d_yyerror): Don't declare.
4853         * d-lang.c (d_language_defn): Update.
4854         * d-exp.y (yyerror): Now static.
4855         * c-lang.h (c_yyerror): Don't declare.
4856         * c-lang.c (c_language_defn, cplus_language_defn)
4857         (asm_language_defn, minimal_language_defn): Update.
4858         * c-exp.y (yyerror): Now static.
4859         * ada-lang.h (ada_yyerror): Don't declare.
4860         * ada-lang.c (ada_language_defn): Update.
4861         * ada-exp.y (yyerror): Now static.
4862
4863 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4864
4865         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4866         (store_sveregs_to_thread): Likewise.
4867         (aarch64_linux_fetch_inferior_registers): Check for SVE.
4868         (aarch64_linux_store_inferior_registers): Likewise.
4869         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4870         function.
4871         (aarch64_sve_regs_copy_to_regcache): Likewise.
4872         (aarch64_sve_regs_copy_from_regcache): Likewise.
4873         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4874         declaration.
4875         (aarch64_sve_regs_copy_to_regcache): Likewise.
4876         (aarch64_sve_regs_copy_from_regcache): Likewise.
4877         (sve_context): Structure from Linux headers.
4878         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4879         (SVE_SIG_ZREG_SIZE): Likewise.
4880         (SVE_SIG_PREG_SIZE): Likewise.
4881         (SVE_SIG_FFR_SIZE): Likewise.
4882         (SVE_SIG_REGS_OFFSET): Likewise.
4883         (SVE_SIG_ZREGS_OFFSET): Likewise.
4884         (SVE_SIG_ZREG_OFFSET): Likewise.
4885         (SVE_SIG_ZREGS_SIZE): Likewise.
4886         (SVE_SIG_PREGS_OFFSET): Likewise.
4887         (SVE_SIG_PREG_OFFSET): Likewise.
4888         (SVE_SIG_PREGS_SIZE): Likewise.
4889         (SVE_SIG_FFR_OFFSET): Likewise.
4890         (SVE_SIG_REGS_SIZE): Likewise.
4891         (SVE_SIG_CONTEXT_SIZE): Likewise.
4892         (SVE_PT_REGS_MASK): Likewise.
4893         (SVE_PT_REGS_FPSIMD): Likewise.
4894         (SVE_PT_REGS_SVE): Likewise.
4895         (SVE_PT_VL_INHERIT): Likewise.
4896         (SVE_PT_VL_ONEXEC): Likewise.
4897         (SVE_PT_REGS_OFFSET): Likewise.
4898         (SVE_PT_FPSIMD_OFFSET): Likewise.
4899         (SVE_PT_FPSIMD_SIZE): Likewise.
4900         (SVE_PT_SVE_ZREG_SIZE): Likewise.
4901         (SVE_PT_SVE_PREG_SIZE): Likewise.
4902         (SVE_PT_SVE_FFR_SIZE): Likewise.
4903         (SVE_PT_SVE_FPSR_SIZE): Likewise.
4904         (SVE_PT_SVE_FPCR_SIZE): Likewise.
4905         (__SVE_SIG_TO_PT): Likewise.
4906         (SVE_PT_SVE_OFFSET): Likewise.
4907         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4908         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4909         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4910         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4911         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4912         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4913         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4914         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4915         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4916         (SVE_PT_SVE_SIZE): Likewise.
4917         (SVE_PT_SIZE): Likewise.
4918         (HAS_SVE_STATE): New define.
4919
4920 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4921
4922         * nat/aarch64-sve-linux-sigcontext.h: New file.
4923         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4924         new files.
4925         (SVE_VQ_MIN): Likewise.
4926         (SVE_VQ_MAX): Likewise.
4927         (SVE_VL_MIN): Likewise.
4928         (SVE_VL_MAX): Likewise.
4929         (SVE_NUM_ZREGS): Likewise.
4930         (SVE_NUM_PREGS): Likewise.
4931         (sve_vl_valid): Likewise.
4932         (struct user_sve_header): Likewise.
4933
4934 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4935             Richard Bunt <Richard.Bunt@arm.com>
4936
4937         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4938         was requested by GDB.
4939
4940 2018-06-15  Tom de Vries  <tdevries@suse.de>
4941
4942         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4943
4944 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4945
4946         * gnulib/update-gnulib.sh: Print expected versions of
4947         autoconf/aclocal.
4948
4949 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4950
4951         * arch-utils.c (default_type_align): Use type_length_units.
4952         * gdbtypes.c (type_align): Use type_length_units.
4953
4954 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4955
4956         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4957         of 'define' command.
4958
4959 2018-06-14  Tom de Vries  <tdevries@suse.de>
4960
4961         PR cli/22573
4962         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4963         get_no_prettyformat_print_options.
4964
4965 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4966
4967         * sparc-nat.h: Include target.h.
4968         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4969         <fetch_registers>: Remove this argument in function call.
4970         <store_registers>: Remove this argument in function call, remove
4971         extra semicolon.
4972         <low_forget_process>: Call sparc64_forget_process instead of
4973         sparc_forget_process.
4974
4975 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4976
4977         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4978         (procfs_target::make_corefile_notes): Adjust to new
4979         target_read_alloc return type.
4980
4981 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4982             Stephen Roberts  <stephen.roberts@arm.com>
4983
4984         PR gdb/22882
4985         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4986         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4987         Move should_notify_stop local into more inner scope.
4988
4989 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4990             Stephen Roberts  <stephen.roberts@arm.com>
4991
4992         PR gdb/22882
4993         * infrun.c (resume_1): Add call to mark_async_event_handler.
4994
4995 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4996
4997         * infrun.c (do_target_wait): Change old version of $pc printed.
4998
4999 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5000
5001         * dwarf2read.c (read_index_from_section): Rename to...
5002         (read_gdb_index_from_section): ... this, update all callers.
5003         (dwarf2_read_index): Rename to...
5004         (dwarf2_read_gdb_index): ... this, update all callers.
5005
5006 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5007
5008         * gdb/hppa-linux-nat.c
5009         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5010         hppa_linux_nat_target::fetch_registers.
5011
5012 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5013
5014         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5015         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5016         (AARCH64_DWARF_SVE_FFR): Likewise.
5017         (AARCH64_DWARF_SVE_P0): Likewise.
5018         (AARCH64_DWARF_SVE_Z0): Likewise.
5019
5020 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5021
5022         * common/common-regcache.h (raw_compare): New function.
5023         * regcache.c (regcache::raw_compare): Likewise.
5024         * regcache.h (regcache::raw_compare): New declaration.
5025
5026 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5027
5028         * common/common-regcache.h (reg_buffer_common): New structure.
5029         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5030         (reg_buffer::raw_supply): Likewise.
5031         (reg_buffer::raw_supply_integer): Likewise.
5032         (reg_buffer::raw_supply_zeroed): Likewise.
5033         (reg_buffer::raw_collect): Likewise.
5034         (reg_buffer::raw_collect_integer): Likewise.
5035         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5036         (reg_buffer::raw_supply): Likewise.
5037         (reg_buffer::raw_supply_integer): Likewise.
5038         (reg_buffer::raw_supply_zeroed): Likewise.
5039         (reg_buffer::raw_collect): Likewise.
5040         (reg_buffer::raw_collect_integer): Likewise.
5041
5042 2018-06-10  Tom Tromey  <tom@tromey.com>
5043
5044         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5045         (class remote_state) <stop_reply_queue>: Now std::vector.
5046         (remote_state::~remote_state)
5047         (remote_target::stop_reply_queue_length): Update.
5048         (struct queue_iter_param, remove_child_of_pending_fork)
5049         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5050         (check_pending_event_prevents_wildcard_vcont_callback)
5051         (remove_stop_reply_for_inferior)
5052         (remove_stop_reply_of_remote_state)
5053         (remote_notif_remove_once_on_match)
5054         (stop_reply_match_ptid_and_ws)
5055         (remote_kill_child_of_pending_fork): Remove.
5056         (remote_target::remove_new_fork_children)
5057         (remote_target::check_pending_events_prevent_wildcard_vcont)
5058         (remote_target::discard_pending_stop_replies)
5059         (remote_target::discard_pending_stop_replies_in_queue)
5060         (remote_target::remote_notif_remove_queued_reply)
5061         (remote_target::queued_stop_reply)
5062         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5063         (remote_target::wait, remote_target::kill_new_fork_children)
5064         (remote_target::async): Update.
5065
5066 2018-06-10  Tom Tromey  <tom@tromey.com>
5067
5068         * record-full.c (record_full_arch_list_cleanups): Remove.
5069         (record_full_message): Use try/catch.
5070         (record_full_wait_cleanups): Remove.
5071         (record_full_wait_1): Use try/catch.
5072         (record_full_restore): Likewise.
5073
5074 2018-06-10  Tom Tromey  <tom@tromey.com>
5075
5076         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5077         declare VEC.  Add constructor.
5078         <in_target_beneath>: Now bool.
5079         (record_full_breakpoints): Now a std::vector, static.
5080         (record_full_sync_record_breakpoints)
5081         (record_full_init_record_breakpoints)
5082         (record_full_target::insert_breakpoint)
5083         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5084
5085 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5086
5087         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5088         * serial.c (serial_interface_lookup): Remove struct keyword.
5089
5090 2018-06-10  Tom Tromey  <tom@tromey.com>
5091
5092         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5093         method.
5094         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5095         a method.
5096         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5097         method.
5098         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5099         "beneath" as a method.
5100         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5101         Use "beneath" as a method.
5102
5103 2018-06-10  Tom Tromey  <tom@tromey.com>
5104
5105         * tracefile.c (struct trace_file_writer_deleter): New.
5106         <operator()>: Rename from trace_file_writer_xfree.
5107         (trace_file_writer_up): New typedef.
5108         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5109
5110 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5111
5112         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5113         <m_registers, m_register_status>: Change type to
5114         std::unique_ptr.
5115         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5116         XCNEWVEC.
5117
5118 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5119
5120         * common/common-regcache.h (enum register_status): Add
5121         underlying type "signed char".
5122         * regcache.h (reg_buffer) <m_register_status>: Change type to
5123         register_status *.
5124         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5125         register_status instead of signed char.
5126         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5127         (reg_buffer::get_register_status): Remove cast.
5128         (readable_regcache::raw_read): Remove cast.
5129         (readable_regcache::cooked_read): Remove cast.
5130
5131 2018-06-09  Tom Tromey  <tom@tromey.com>
5132
5133         * source.c (reverse_search_command, forward_search_command): Use
5134         scoped_fd.
5135
5136 2018-06-09  Tom Tromey  <tom@tromey.com>
5137
5138         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5139         (serial_ops_list): Now static, std::vector.
5140         (serial_interface_lookup, serial_add_interface): Update.
5141
5142 2018-06-09  Tom Tromey  <tom@tromey.com>
5143
5144         * dwarf2read.c (process_cu_includes): Update.
5145         (process_full_comp_unit): Update.
5146         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5147         std::vector.
5148
5149 2018-06-08  Paul Koning  <paul_koning@dell.com>
5150
5151         PR gdb/23252
5152
5153         * python/python.c (do_start_initialization):
5154         Avoid call to internal Python API.
5155         (init__gdb_module): New function.
5156
5157 2018-06-08  Gary Benson <gbenson@redhat.com>
5158
5159         * linux-thread-db.c (valprint.h): New include.
5160         (struct check_thread_db_info): New structure.
5161         (check_thread_db_on_load, tdb_testinfo): New static globals.
5162         (check_thread_db, check_thread_db_callback): New functions.
5163         (try_thread_db_load_1): Run integrity checks if requested.
5164         (maintenance_check_libthread_db): New function.
5165         (_initialize_thread_db): Register "maint check libthread-db"
5166         and "maint set/show check-libthread-db".
5167         * NEWS: Mention the above new commands.
5168
5169 2018-06-08  Tom Tromey  <tom@tromey.com>
5170
5171         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5172         now a method.
5173
5174 2018-06-08  Tom Tromey  <tom@tromey.com>
5175
5176         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5177
5178 2018-06-08  Tom Tromey  <tom@tromey.com>
5179
5180         * common/btrace-common.h (struct btrace_data): Add constructor,
5181         destructor, move assignment operator.
5182         <empty, clear, fini>: New methods.
5183         <format>: Initialize.
5184         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5185         (btrace_data_empty): Don't declare.
5186         * common/btrace-common.c (btrace_data_init): Remove.
5187         (btrace_data::fini): Rename from btrace_data_fini.
5188         (btrace_data::empty): Rename from btrace_data_empty.
5189         (btrace_data::clear): Rename from btrace_data_clear.  Return
5190         bool.
5191         * btrace.h (make_cleanup_btrace_data): Don't declare.
5192         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5193         (parse_xml_btrace): Update.
5194         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5195         (maint_btrace_clear_packet_history_cmd): Update.
5196
5197 2018-06-07  Pedro Alves  <palves@redhat.com>
5198
5199         * target.h (target_ops) <beneath>: Now a method.  All references
5200         updated.
5201         (class target_stack): New.
5202         * target.c (g_target_stack): New.
5203         (g_current_top_target): Delete.
5204         (current_top_target): Get the top target out of g_target_stack.
5205         (target_stack::push, target_stack::unpush): New.
5206         (push_target, unpush_target): Reimplement.
5207         (target_is_pushed): Reimplement in terms of g_target_stack.
5208         (target_ops::beneath, target_stack::find_beneath): New.
5209
5210 2018-06-07  Pedro Alves  <palves@redhat.com>
5211
5212         * target.h (find_target_beneath): Delete declaration.
5213         * target.c (find_target_beneath): Delete definition.
5214         * aix-thread.c: All callers of find_target_beneath adjusted to
5215         call target_ops::beneath instead.
5216         * bsd-uthread.c: Likewise.
5217         * linux-thread-db.c: Likewise.
5218         * ravenscar-thread.c: Likewise.
5219         * sol-thread.c: Likewise.
5220         * spu-multiarch.c: Likewise.
5221
5222 2018-06-07  Pedro Alves  <palves@redhat.com>
5223
5224         * target.h (target_ops) <beneath>: Now a method.  All references
5225         updated.
5226         (target_ops) <m_beneath>: New.
5227         * target.c (target_ops::beneath): New.
5228         * corelow.c: Adjust all references to target_ops::beneath.
5229         * linux-thread-db.c: Likewise.
5230         * make-target-delegates: Likewise.
5231         * record-btrace.c: Likewise.
5232         * record-full.c: Likewise.
5233         * remote.c: Likewise.
5234         * target.c: Likewise.
5235         * target-delegates.c: Regenerate.
5236
5237 2018-06-07  Pedro Alves  <palves@redhat.com>
5238
5239         * target.h (target_stack): Delete.
5240         (current_top_target): Declare function.
5241         * target.c (target_stack): Delete.
5242         (g_current_top_target): New.
5243         (current_top_target): New function.
5244         * auxv.c: Use current_top_target instead of target_stack
5245         throughout.
5246         * avr-tdep.c: Likewise.
5247         * breakpoint.c: Likewise.
5248         * corefile.c: Likewise.
5249         * elfread.c: Likewise.
5250         * eval.c: Likewise.
5251         * exceptions.c: Likewise.
5252         * frame.c: Likewise.
5253         * gdbarch-selftests.c: Likewise.
5254         * gnu-v3-abi.c: Likewise.
5255         * ia64-tdep.c: Likewise.
5256         * ia64-vms-tdep.c: Likewise.
5257         * infcall.c: Likewise.
5258         * infcmd.c: Likewise.
5259         * infrun.c: Likewise.
5260         * linespec.c: Likewise.
5261         * linux-tdep.c: Likewise.
5262         * minsyms.c: Likewise.
5263         * ppc-linux-nat.c: Likewise.
5264         * ppc-linux-tdep.c: Likewise.
5265         * procfs.c: Likewise.
5266         * regcache.c: Likewise.
5267         * remote.c: Likewise.
5268         * rs6000-tdep.c: Likewise.
5269         * s390-linux-nat.c: Likewise.
5270         * s390-tdep.c: Likewise.
5271         * solib-aix.c: Likewise.
5272         * solib-darwin.c: Likewise.
5273         * solib-dsbt.c: Likewise.
5274         * solib-spu.c: Likewise.
5275         * solib-svr4.c: Likewise.
5276         * solib-target.c: Likewise.
5277         * sparc-tdep.c: Likewise.
5278         * sparc64-tdep.c: Likewise.
5279         * spu-tdep.c: Likewise.
5280         * symfile.c: Likewise.
5281         * symtab.c: Likewise.
5282         * target-descriptions.c: Likewise.
5283         * target-memory.c: Likewise.
5284         * target.c: Likewise.
5285         * target.h: Likewise.
5286         * tracefile-tfile.c: Likewise.
5287         * tracepoint.c: Likewise.
5288         * valops.c: Likewise.
5289         * valprint.c: Likewise.
5290         * value.c: Likewise.
5291         * windows-tdep.c: Likewise.
5292         * mi/mi-main.c: Likewise.
5293
5294 2018-06-07  Tom Tromey  <tom@tromey.com>
5295
5296         * valprint.h (build_address_symbolic): Declare.
5297         * printcmd.c (print_address_symbolic): Update.
5298         (build_address_symbolic): Change "name" and "filename" to
5299         std::string.
5300         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5301         Update.
5302         * defs.h (build_address_symbolic): Remove declaration.
5303
5304 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5305
5306         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5307         (aarch64_vnv_type): Add function.
5308         (aarch64_pseudo_register_name): Add V regs for SVE.
5309         (aarch64_pseudo_register_type): Likewise.
5310         (aarch64_pseudo_register_reggroup_p): Likewise.
5311         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5312         (aarch64_pseudo_read_value): Add V regs for SVE.
5313         (aarch64_pseudo_write_2): Use V0 offset for SVE
5314         (aarch64_pseudo_write): Add V regs for SVE.
5315         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5316
5317 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5318
5319         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5320         (sve_vl_from_vq): Likewise.
5321
5322 2018-06-05  Tom Tromey  <tom@tromey.com>
5323
5324         * cli/cli-cmds.c (show_version): Update.
5325         * top.c (print_gdb_version): Add "interactive" parameter.
5326         Update.
5327         * main.c (captured_main_1): Update.
5328         * top.h (print_gdb_version): Add "interactive" parameter and a
5329         comment.
5330
5331 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5332
5333         * common/enum-flags.h: Add trailing semicolon to example in
5334         comment.
5335
5336 2018-06-05  Tom Tromey  <tom@tromey.com>
5337
5338         PR cli/12326:
5339         * NEWS: Add entry about pager.
5340         * utils.c (pagination_disabled_for_command): New global.
5341         (prompt_for_continue): Allow "c" response to prompt.
5342         (reinitialize_more_filter): Clear
5343         pagination_disabled_for_command.
5344         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5345
5346 2018-06-04  Tom Tromey  <tom@tromey.com>
5347
5348         * ada-lang.h (ada_lookup_symbol_list): Update.
5349         * ada-lang.c (resolve_subexp): Update.
5350         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5351         parameter.
5352         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5353         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5354         results parameter to std::vector.
5355         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5356         Update.
5357         * ada-exp.y (block_lookup): Update.
5358         (select_possible_type_sym): Change type of syms.  Remove nsyms
5359         parameter.
5360         (write_var_or_type, write_name_assoc): Update.
5361
5362 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5363
5364         * windows-nat.c (windows_nat_target::xfer_partial): Return
5365         TARGET_XFER_E_IO if we need to delegate to the target beneath
5366         but BENEATH is NULL.
5367
5368 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5369
5370         * Makefile.in (config.status): Add configure.nat as a
5371         dependency.
5372
5373 2018-06-04  Tom Tromey  <tom@tromey.com>
5374
5375         * cp-name-parser.y (cpname_state): Add method declarations.
5376         (HANDLE_QUAL): Update.
5377         (cpname_state::d_grab, cpname_state::fill_comp)
5378         (cpname_state::make_operator, cpname_state::make_dtor)
5379         (cpname_state::make_builtin_type, cpname_state::make_name)
5380         (cpname_state::d_qualify, cpname_state::d_int_type)
5381         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5382         (%union): Move earlier.
5383
5384 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5385
5386         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5387
5388 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5389
5390         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5391         (aarch64_pseudo_write_1): Likewise.
5392         (aarch64_pseudo_read_value): Use helper.
5393         (aarch64_pseudo_write): Likewise.
5394
5395 2018-06-04  Pedro Alves  <palves@redhat.com>
5396
5397         * darwin-nat.c (darwin_ops): Delete.
5398         (darwin_attach_pid): Use get_native_target.
5399
5400 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5401
5402         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5403         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5404
5405 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5406
5407         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5408         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5409         (aarch64_gdbarch_init): Check for SVE.
5410         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5411
5412 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5413
5414         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5415         * aarch64-tdep.h (aarch64_read_description): Likewise.
5416         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5417         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5418         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5419         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5420         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5421
5422 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5423
5424         * value.c (value_fetch_lazy_bitfield): New.
5425         (value_fetch_lazy_memory): New.
5426         (value_fetch_lazy_register): New.
5427         (value_fetch_lazy): Factor out to smaller functions.
5428
5429 2018-06-01  Tom Tromey  <tom@tromey.com>
5430
5431         * cp-name-parser.y (backslashable, represented): Now const.
5432
5433 2018-06-01  Tom Tromey  <tom@tromey.com>
5434
5435         * cp-name-parser.y: Include parser-defs.h.
5436         (parser_fprintf): Remove declaration.
5437
5438 2018-06-01  Tom Tromey  <tom@tromey.com>
5439
5440         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5441         %parse-param.
5442         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5443         (global_result): Remove globals.
5444         (struct cpname_state): New.
5445         (yyparse): Don't declare.
5446         (yylex, yyerror): Move declarations after %union.
5447         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5448         (make_name): Add state parameter.
5449         Update all callers.
5450         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5451         parameter.
5452         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5453         Update.
5454         (yylex): Add lvalp, state parameters.
5455         (yyerror): Add state parameter.
5456         (cp_demangled_name_to_comp): Update.
5457
5458 2018-06-01  Tom Tromey  <tom@tromey.com>
5459
5460         * cp-name-parser.y (parser_fprintf): Declare.
5461         (GDB_YY_REMAP_PREFIX): Define.
5462         Include yy-remap.h.  Don't redefine yy* identifiers.
5463
5464 2018-06-01  Tom Tromey  <tom@tromey.com>
5465
5466         * python/py-type.c (typy_legacy_template_argument): Update.
5467         * cp-support.h (cp_demangled_name_to_comp): Update.
5468         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5469         parameter to be a "std::string *".
5470         (main): Update.
5471
5472 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5473
5474         * ada-lex.l: Include "diagnostics.h" instead of
5475         "common/diagnostics.h".
5476         * unittests/environ-selftests.c: Likewise.
5477         * common/diagnostics.h: Moved to ../include.
5478
5479 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5480
5481         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5482         to language_mode_manual while calling breakpoint_re_set_one.
5483
5484 2018-06-01  Tom Tromey  <tom@tromey.com>
5485
5486         * valops.c (value_cast_structs, destructor_name_p): Update.
5487         * symtab.c (gdb_mangle_name): Update.
5488         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5489         Update.
5490         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5491         (pascal_object_print_value_fields, pascal_object_print_value):
5492         Update.
5493         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5494         * linespec.c (find_methods): Update.
5495         * gdbtypes.h (type_name_no_tag): Remove.
5496         (type_name_or_error): Rename from type_name_no_tag_or_error.
5497         * gdbtypes.c (type_name_no_tag): Remove.
5498         (type_name_or_error): Rename from type_name_no_tag_or_error.
5499         (lookup_struct_elt_type, check_typedef): Update.
5500         * expprint.c (print_subexp_standard): Update.
5501         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5502         * d-namespace.c (d_lookup_nested_symbol): Update.
5503         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5504         (cp_print_class_member): Update.
5505         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5506         * completer.c (add_struct_fields): Update.
5507         * c-typeprint.c (cp_type_print_derivation_info)
5508         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5509         Update.
5510         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5511         (ada_prefer_type, ada_is_exception_sym): Update.
5512
5513 2018-06-01  Tom Tromey  <tom@tromey.com>
5514
5515         * valops.c (enum_constant_from_type, value_namespace_elt)
5516         (value_maybe_namespace_elt): Update.
5517         * valarith.c (find_size_for_pointer_math): Update.
5518         * target-descriptions.c (make_gdb_type): Update.
5519         * symmisc.c (print_symbol): Update.
5520         * stabsread.c (define_symbol, read_type)
5521         (complain_about_struct_wipeout, add_undefined_type)
5522         (cleanup_undefined_types_1): Update.
5523         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5524         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5525         (rust_internal_print_type, rust_composite_type)
5526         (rust_evaluate_funcall, rust_evaluate_subexp)
5527         (rust_inclusive_range_type_p): Update.
5528         * python/py-type.c (typy_get_tag): Update.
5529         * p-typeprint.c (pascal_type_print_base): Update.
5530         * mdebugread.c (parse_symbol, parse_type): Update.
5531         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5532         Update.
5533         * guile/scm-type.c (gdbscm_type_tag): Update.
5534         * go-lang.c (sixg_string_p): Update.
5535         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5536         Update.
5537         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5538         (TYPE_TAG_NAME): Remove.
5539         * gdbtypes.c (type_name_no_tag): Simplify.
5540         (check_typedef, check_types_equal, recursive_dump_type)
5541         (copy_type_recursive, arch_composite_type): Update.
5542         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5543         in summary mode when needed.
5544         * eval.c (evaluate_funcall): Update.
5545         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5546         (process_structure_scope, read_enumeration_type)
5547         (read_namespace_type, read_module_type, determine_prefix): Update.
5548         * cp-support.c (inspect_type): Update.
5549         * coffread.c (process_coff_symbol, decode_base_type): Update.
5550         * c-varobj.c (c_is_path_expr_parent): Update.
5551         * c-typeprint.c (c_type_print_base_struct_union): Update.
5552         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5553         summary when using C language.
5554         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5555         (gen_maybe_namespace_elt): Update.
5556         * ada-lang.c (ada_type_name): Simplify.
5557         (empty_record, ada_template_to_fixed_record_type_1)
5558         (template_to_static_fixed_type)
5559         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5560
5561 2018-06-01  Tom Tromey  <tom@tromey.com>
5562
5563         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5564         c_print_type.
5565         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5566         (c_print_type): Update.
5567         (c_print_type): New overload.
5568         (c_type_print_varspec_prefix, c_type_print_args)
5569         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5570         (c_type_print_base_struct_union, c_type_print_base_1)
5571         (cp_type_print_method_args): Add "language" parameter.
5572         (c_type_print_base): Update.
5573         * c-lang.h (c_print_type): Add new overload.
5574
5575 2018-06-01  Tom Tromey  <tom@tromey.com>
5576
5577         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5578         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5579
5580 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5581
5582         * aarch64-tdep.c (aarch64_sve_register_names): New const
5583         var.
5584         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5585         (AARCH64_SVE_Z_REGS_NUM): New define.
5586         (AARCH64_SVE_P_REGS_NUM): Likewise.
5587         (AARCH64_SVE_NUM_REGS): Likewise.
5588
5589 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5590
5591         * nat/linux-ptrace.h [__alpha__]
5592         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5593         definitions.
5594
5595 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5596
5597         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5598         the endianness selected.
5599         * NEWS: Document `set endian auto' mode operation update.
5600
5601 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5602
5603         * Makefile.in: Add new header.
5604         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5605         (sve_vl_from_vg): Likewise.
5606         (sve_vq_from_vl): Likewise.
5607         (sve_vl_from_vq): Likewise.
5608         (sve_vq_from_vg): Likewise.
5609         (sve_vg_from_vq): Likewise.
5610         * configure.nat: Add new c file.
5611         * nat/aarch64-sve-linux-ptrace.c: New file.
5612         * nat/aarch64-sve-linux-ptrace.h: New file.
5613
5614 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5615
5616         * aarch64-linux-nat.c (aarch64_linux_read_description):
5617         Add parmeter zero.
5618         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5619         Likewise.
5620         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5621         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5622         (aarch64_gdbarch_init): Add parmeter zero.
5623         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5624         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5625         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5626         parmeter.
5627         * doc/gdb.texinfo: Describe SVE feature
5628         * features/aarch64-sve.c: New file.
5629
5630 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5631
5632         PR gdb/23210
5633         * gdbarch.sh (significant_addr_bit): Default to zero when
5634         not set by target architecture.
5635         * gdbarch.c: Re-generated.
5636         * utils.c (address_significant): Update.
5637
5638 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5639
5640         * stack.c (func_command): Remove trailing newline in call to error.
5641
5642 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5643
5644         * regcache.h (regcache_raw_collect): Remove, update callers to
5645         use regcache::raw_collect.
5646         * regcache.c (regcache_raw_collect): Remove.
5647
5648 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5649
5650         * regcache.h (regcache_raw_supply): Remove, update callers to
5651         use detached_regcache::raw_supply.
5652         * regcache.c (regcache_raw_supply): Remove.
5653
5654 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5655
5656         * regcache.h (regcache_cooked_write_part): Remove, update
5657         callers to use regcache::cooked_write_part.
5658         * regcache.c (regcache_cooked_write_part): Remove.
5659
5660 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5661
5662         * regcache.h (regcache_cooked_read_part): Remove, update callers
5663         to use readable_regcache::cooked_read_part.
5664         * regcache.c (regcache_cooked_read_part): Remove.
5665
5666 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5667
5668         * regcache.h (regcache_cooked_read_value): Remove, update
5669         callers to use readable_regcache::cooked_read_value.
5670         * regcache.c (regcache_cooked_read_value): Remove.
5671
5672 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5673
5674         * regcache.h (regcache_cooked_write): Remove, update callers to
5675         use regcache::cooked_write.
5676         * regcache.c (regcache_cooked_write): Remove.
5677
5678 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5679
5680         * regcache.h (regcache_invalidate): Remove, update callers to
5681         use detached_regcache::invalidate instead.
5682         * regcache.c (regcache_invalidate): Remove.
5683
5684 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5685
5686         * regcache.h (regcache_raw_write_part): Remove, update callers
5687         to use regcache::raw_write_part instead.
5688         * regcache.c (regcache_raw_write_part): Remove.
5689
5690 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5691
5692         * regcache.h (regcache_raw_read_part): Remove, update callers to
5693         use readable_regcache::raw_read_part instead.
5694         * regcache.c (regcache_raw_read_part): Remove.
5695
5696 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5697
5698         * regcache.h (regcache_cooked_read): Remove, update callers to
5699         use readable_regcache::cooked_read instead.
5700         * regcache.c (regcache_cooked_read): Remove.
5701
5702 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5703
5704         * regcache.h (regcache_raw_write): Remove, update callers to use
5705         regcache::raw_write instead.
5706         * regcache.c (regcache_raw_write): Remove.
5707
5708 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5709
5710         * regcache.h (regcache_raw_read): Remove, update callers to use
5711         readable_regcache::raw_read instead.
5712         * regcache.c (regcache_raw_read): Remove.
5713
5714 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5715
5716         * regcache.h (regcache_raw_update): Remove, update callers to
5717         use readable_regcache::raw_update instead.
5718         * regcache.c (regcache_raw_update): Remove.
5719
5720 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5721
5722         * regcache.h (regcache_register_status): Remove, update callers
5723         to use reg_buffer::get_register_status directly instead.
5724         * regcache.c (regcache_register_status): Remove.
5725
5726 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5727
5728         * regcache.h (regcache_get_ptid): Remove, update all callers to
5729         call regcache::ptid instead.
5730         * regcache.c (regcache_get_ptid): Remove.
5731
5732 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5733
5734         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5735
5736 2018-05-30  Pedro Alves  <palves@redhat.com>
5737
5738         * common/common-exceptions.h (exception_rethrow): Use
5739         ATTRIBUTE_NORETURN.
5740
5741 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5742
5743         * breakpoint.c (print_solib_event, check_status_catch_solib):
5744         Remove struct keyword in range-based for loops.
5745         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5746         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5747         Likewise.
5748         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5749         Likewise.
5750         * symfile.c (addr_info_make_relative): Likewise.
5751         * thread.c (value_in_thread_stack_temporaries): Likewise.
5752
5753 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5754
5755         PR gdb/16841
5756         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5757         aggregate type to get its real type before accessing it.
5758
5759 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5760
5761         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5762         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5763         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5764         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5765         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5766         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5767         * printcmd.c (info_address_command): Likewise.
5768
5769 2018-05-29  Tom Tromey  <tom@tromey.com>
5770
5771         * windows-nat.c (handle_exception): Update fall-through comment.
5772
5773 2018-05-29  Tom Tromey  <tom@tromey.com>
5774
5775         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5776         (struct program_space) <added_solibs>: Now a std::vector.
5777         * breakpoint.c (print_solib_event): Update.
5778         (check_status_catch_solib): Update.
5779         * progspace.c (clear_program_space_solib_cache): Update.
5780         * solib.c (update_solib_list): Update.
5781
5782 2018-05-29  Tom Tromey  <tom@tromey.com>
5783
5784         * python/py-type.c (typy_richcompare): Update.
5785         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5786         * gdbtypes.h (types_deeply_equal): Return bool.
5787         (types_equal): Likewise.
5788         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5789         declare VEC.
5790         (check_types_equal): Change worklist to std::vector.  Return
5791         bool.
5792         (struct type_equality_entry): Add constructor.
5793         (compare_maybe_null_strings): Return bool.
5794         (check_types_worklist): Return bool.  Change worklist to
5795         std::vector.
5796         (types_deeply_equal): Use std::vector.
5797         (types_equal): Return bool.
5798         (compare_maybe_null_strings): Simplify.
5799
5800 2018-05-29  Tom Tromey  <tom@tromey.com>
5801
5802         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5803
5804 2018-05-29  Tom Tromey  <tom@tromey.com>
5805
5806         * objc-lang.h: Don't include cp-support.h.
5807         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5808         declare VEC.
5809
5810 2018-05-27  Tom Tromey  <tom@tromey.com>
5811
5812         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5813
5814 2018-05-25  Tom Tromey  <tom@tromey.com>
5815
5816         * value.c (value::location): Initialize.
5817
5818 2018-05-25  Tom Tromey  <tom@tromey.com>
5819
5820         * dbxread.c (init_bincl_list): Remove.
5821         (bincl_list): Now a std::vector.
5822         (bincls_allocated, next_bincl): Remove.
5823         (free_bincl_list, do_free_bincl_list_cleanup)
5824         (make_cleanup_free_bincl_list): Remove.
5825         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5826         unique_xmalloc_ptr.
5827         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5828         (struct header_file_location): Add constructor.
5829         (add_bincl_to_list): Remove.
5830
5831 2018-05-25  Tom Tromey  <tom@tromey.com>
5832
5833         * tui/tui.c (tui_enable): Update.
5834         * mi/mi-interp.c (mi_interp::init): Update.
5835         * interps.h (class interp) <name>: New method.
5836         <m_name>: Rename from name.
5837         (~scoped_restore_interp): Update.
5838         * interps.c (interp::interp): Update.
5839         (interp_add, interp_set, interp_lookup_existing)
5840         (current_interp_named_p): Update.
5841
5842 2018-05-25  Tom Tromey  <tom@tromey.com>
5843
5844         * interps.c (interp_name): Remove.
5845         * mi/mi-interp.c (mi_interp::init): Update.
5846         * interps.h (interp_name): Remove.
5847         (~scoped_restore_interp): Update.
5848         * tui/tui.c (tui_enable): Update.
5849
5850 2018-05-25  Tom Tromey  <tom@tromey.com>
5851
5852         * utils.c (fputs_maybe_filtered): Update.
5853         * linespec.c (decode_line_full): Update.
5854         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5855         (mi_print_breakpoint_for_event, mi_solib_loaded)
5856         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5857         (mi_user_selected_context_changed): Update.
5858         * mi/mi-main.c (mi_execute_command): Update.
5859         * cli/cli-script.c (execute_control_command): Update.
5860         * python/python.c (execute_gdb_command): Update.
5861         * solib.c (info_sharedlibrary_command): Update.
5862         * interps.c (interp_ui_out): Remove.
5863         * interps.h (interp_ui_out): Remove.
5864
5865 2018-05-25  Tom Tromey  <tom@tromey.com>
5866
5867         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5868         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5869         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5870
5871 2018-05-25  Tom Tromey  <tom@tromey.com>
5872
5873         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5874         * interps.c (interp_exec): Use scoped_restore.
5875
5876 2018-05-25  Tom Tromey  <tom@tromey.com>
5877
5878         * remote.c (remote_target::remote_file_get): Use
5879         gdb::byte_vector.
5880         (remote_target::remote_file_put): Likewise.
5881
5882 2018-05-25  Tom Tromey  <tom@tromey.com>
5883
5884         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5885         a std::string.
5886         (get_pe_section_index, add_pe_exported_sym): Update.
5887         (read_pe_exported_syms): Use gdb::def_vector.
5888
5889 2018-05-25  Tom Tromey  <tom@tromey.com>
5890
5891         * frame.c (remove_prev_frame): Remove.
5892         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5893
5894 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
5895
5896         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5897         Remove prototypes.
5898         * mips-linux-nat.c (supply_fpregset): Always call
5899         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5900         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5901         `mips_fill_fpregset'.
5902         * mips-linux-tdep.c (mips_supply_fpregset)
5903         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5904         (mips_fill_fpregset_wrapper): Remove functions.
5905         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5906         (mips_linux_fpregset): Remove variable.
5907         (mips_linux_iterate_over_regset_sections): Use
5908         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5909         (mips_linux_o32_sigframe_init): Remove comment.
5910
5911 2018-05-25  Pedro Alves  <palves@redhat.com>
5912
5913         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5914         (struct readahead_cache, struct packet_reg, struct
5915         remote_arch_state, class remote_state): Move higher up in the
5916         file.
5917         (remote_target::m_remote_state): Now an object instead of a pointer.
5918         (remote_target::get_remote_state): Adjust.
5919
5920 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5921
5922         * stack.c (select_and_print_frame): Delete.
5923         (struct function_bounds): Move struct within function.
5924         (func_command): Most content moved into new function
5925         find_frame_for_function, use new function, print result, add
5926         function comment.
5927         (find_frame_for_function): New function, now returns a result.
5928
5929 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5930
5931         * stack.c (iterate_over_block_arg_vars): Fix comment.
5932         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5933
5934 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5935
5936         PR gdb/23203
5937         * frame.c
5938         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5939         Define.
5940         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5941         Define.
5942         * frame.h (class scoped_restore_selected_frame): New class.
5943         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5944         of any exception, use scoped_restore_selected_frame to restore the
5945         frame instead.
5946
5947 2018-05-24  Pedro Alves  <palves@redhat.com>
5948
5949         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5950         override.
5951
5952 2018-05-23  Tom Tromey  <tom@tromey.com>
5953
5954         * complaints.c (struct complaints): Remove.
5955         (symfile_complaint_book): Remove.
5956         (series): New global.
5957         (complaint_internal): Update.
5958         (clear_complaints): Update.
5959
5960 2018-05-23  Tom Tromey  <tom@tromey.com>
5961
5962         * complaints.c (counters): New global.
5963         (struct complain): Remove.
5964         (struct complaints) <root>: Remove.
5965         (complaint_sentinel): Remove.
5966         (symfile_complaint_book): Update.
5967         (find_complaint) Remove.
5968         (complaint_internal, clear_complaints): Update.
5969
5970 2018-05-23  Tom Tromey  <tom@tromey.com>
5971
5972         * complaints.c (struct complain) <file, line>: Remove.
5973         (find_complaint): Remove file, line parameters.
5974         (complaint_internal): Update.
5975
5976 2018-05-23  Tom Tromey  <tom@tromey.com>
5977
5978         * complaints.c (vcomplaint): Remove.
5979         (complaint_internal) Merge in contents of vcomplaint.
5980
5981 2018-05-23  Tom Tromey  <tom@tromey.com>
5982
5983         * complaints.c (struct complaints) <explanation>: Remove.
5984         (symfile_explanations): Remove.
5985         (symfile_complaint_book): Update.
5986         (vcomplaint): Update.
5987         (struct explanation): Remove.
5988
5989 2018-05-23  Tom Tromey  <tom@tromey.com>
5990
5991         * complaints.c (symfile_complaints): Remove.
5992         (complaint_internal): Remove "complaints" parameter.
5993         (clear_complaints, vcomplaint): Remove "c" parameter.
5994         (get_complaints): Remove.
5995         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5996         (dwarf2_debug_line_missing_file_complaint)
5997         (dwarf2_debug_line_missing_end_sequence_complaint)
5998         (dwarf2_complex_location_expr_complaint)
5999         (dwarf2_const_value_length_mismatch_complaint)
6000         (dwarf2_section_buffer_overflow_complaint)
6001         (dwarf2_macro_malformed_definition_complaint)
6002         (dwarf2_invalid_attrib_class_complaint)
6003         (create_addrmap_from_index, dw2_symtab_iter_next)
6004         (dw2_expand_marked_cus)
6005         (dw2_debug_names_iterator::find_vec_in_debug_names)
6006         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6007         (create_debug_type_hash_table, init_cutu_and_read_dies)
6008         (partial_die_parent_scope, add_partial_enumeration)
6009         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6010         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6011         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6012         (create_cus_hash_table, create_dwp_hash_table)
6013         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6014         (dwarf2_rnglists_process, dwarf2_ranges_process)
6015         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6016         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6017         (handle_struct_member_die, process_structure_scope)
6018         (read_array_type, read_common_block, read_module_type)
6019         (read_tag_pointer_type, read_typedef, read_base_type)
6020         (read_subrange_type, load_partial_dies, partial_die_info::read)
6021         (partial_die_info::read, partial_die_info::read)
6022         (partial_die_info::read, read_checked_initial_length_and_offset)
6023         (dwarf2_string_attr, read_formatted_entries)
6024         (dwarf_decode_line_header)
6025         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6026         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6027         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6028         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6029         (get_signatured_type, get_DW_AT_signature_type)
6030         (decode_locdesc, file_file_name, consume_improper_spaces)
6031         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6032         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6033         (dwarf2_symbol_mark_computed, set_die_type)
6034         (read_attribute_value): Update.
6035         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6036         Update.
6037         * dbxread.c (unknown_symtype_complaint)
6038         (lbrac_mismatch_complaint, repeated_header_complaint)
6039         (set_namestring, function_outside_compilation_unit_complaint)
6040         (read_dbx_symtab, process_one_symbol): Update.
6041         * gdbtypes.c (stub_noname_complaint): Update.
6042         * windows-nat.c (handle_unload_dll): Update.
6043         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6044         (decode_base_type): Update.
6045         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6046         (eb_complaint, record_include_begin, record_include_end)
6047         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6048         (process_xcoff_symbol, read_symbol)
6049         (function_outside_compilation_unit_complaint)
6050         (scan_xcoff_symtab): Update.
6051         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6052         * buildsym.c (finish_block_internal, make_blockvector)
6053         (end_symtab_get_static_block, augment_type_symtab): Update.
6054         * dtrace-probe.c (dtrace_process_dof)
6055         (dtrace_static_probe_ops::get_probes): Update.
6056         * complaints.h (struct complaint): Don't declare.
6057         (symfile_complaints): Remove.
6058         (complaint_internal): Remove "complaints" parameter.
6059         (complaint): Likewise.
6060         (clear_complaints): Likewise.
6061         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6062         (reread_symbols): Update.
6063         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6064         (dwarf2_frame_cache, decode_frame_entry): Update.
6065         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6066         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6067         (info_selectors_command): Update.
6068         * macrotab.c (macro_include, check_for_redefinition)
6069         (macro_undef): Update.
6070         * objfiles.c (filter_overlapping_sections): Update.
6071         * stabsread.c (invalid_cpp_abbrev_complaint)
6072         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6073         (define_symbol, error_type, read_type, rs6000_builtin_type)
6074         (stabs_method_name_from_physname, read_member_functions)
6075         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6076         (attach_fields_to_type, complain_about_struct_wipeout)
6077         (read_range_type, read_args, common_block_start)
6078         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6079         Update.
6080         * mdebugread.c (index_complaint, unknown_ext_complaint)
6081         (basic_type_complaint, bad_tag_guess_complaint)
6082         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6083         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6084         (parse_procedure, parse_lines)
6085         (function_outside_compilation_unit_complaint)
6086         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6087         (bad_tag_guess_complaint, reg_value_complaint): Update.
6088         * cp-support.c (demangled_name_complaint): Update.
6089         * macroscope.c (sal_macro_scope): Update.
6090         * dwarf-index-write.c (class debug_names): Update.
6091
6092 2018-05-23  Tom Tromey  <tom@tromey.com>
6093
6094         * complaints.c (clear_complaints): Remove "noisy" parameter.
6095         * complaints.h (clear_complaints): Update.
6096         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6097         (reread_symbols): Update.
6098
6099 2018-05-23  Tom Tromey  <tom@tromey.com>
6100
6101         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6102         SUBSEQUENT_MESSAGE.
6103         (vcomplaint, clear_complaints): Update.
6104         (symfile_explanations): Remove some messages.
6105
6106 2018-05-23  Tom Tromey  <tom@tromey.com>
6107
6108         * complaints.c (internal_complaint): Remove.
6109         * complaints.h (internal_complaint): Remove.
6110
6111 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6112
6113         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6114
6115 2018-05-22  Pedro Alves  <palves@redhat.com>
6116
6117         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6118         (remote_fileio_badfd, remote_fileio_return_errno)
6119         (remote_fileio_return_success, remote_fileio_func_open)
6120         (remote_fileio_func_open, remote_fileio_func_close)
6121         (remote_fileio_func_read, remote_fileio_func_write)
6122         (remote_fileio_func_lseek, remote_fileio_func_rename)
6123         (remote_fileio_func_unlink, remote_fileio_func_stat)
6124         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6125         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6126         remote_target parameter.
6127         (remote_fio_func_map) <func>: Add remote_target parameter.
6128         (do_remote_fileio_request, remote_fileio_request):
6129         * remote-fileio.h (remote_fileio_request):
6130         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6131         remote_target parameter.
6132         (remote_notif_process, handle_notification): Adjust to pass down
6133         the remote.
6134         (remote_notif_state_allocate): Add remote_target parameter.  Save
6135         it.
6136         * remote-notif.h (struct remote_target): Forward declare.
6137         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6138         remote_target parameter.
6139         (struct remote_notif_state) <remote>: New field.
6140         (remote_notif_ack, remote_notif_parse): Add remote_target
6141         parameter.
6142         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6143         remote_target parameter.
6144         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6145         (threads_listing_context, rmt_thread_action, protocol_feature)
6146         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6147         (packet_result, struct threads_listing_context, remote_state):
6148         Move definitions and declarations higher up.
6149         (remote_target) <~remote_target>: Declare.
6150         (remote_download_command_source, remote_file_put, remote_file_get)
6151         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6152         (remote_hostio_pread_vFile, remote_hostio_send_command)
6153         (remote_hostio_set_filesystem, remote_hostio_open)
6154         (remote_hostio_close, remote_hostio_unlink, remote_state)
6155         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6156         (get_memory_write_packet_size, get_memory_read_packet_size)
6157         (append_pending_thread_resumptions, remote_detach_1)
6158         (append_resumption, remote_resume_with_vcont)
6159         (add_current_inferior_and_thread, wait_ns, wait_as)
6160         (process_stop_reply, remote_notice_new_inferior)
6161         (process_initial_stop_replies, remote_add_thread)
6162         (btrace_sync_conf, remote_btrace_maybe_reopen)
6163         (remove_new_fork_children, kill_new_fork_children)
6164         (discard_pending_stop_replies, stop_reply_queue_length)
6165         (check_pending_events_prevent_wildcard_vcont)
6166         (discard_pending_stop_replies_in_queue, stop_reply)
6167         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6168         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6169         (remote_interrupt_as, remote_interrupt_ns)
6170         (remote_get_noisy_reply, remote_query_attached)
6171         (remote_add_inferior, remote_current_thread, get_current_thread)
6172         (set_thread, set_general_thread, set_continue_thread)
6173         (set_general_process, write_ptid)
6174         (remote_unpack_thread_info_response, remote_get_threadinfo)
6175         (parse_threadlist_response, remote_get_threadlist)
6176         (remote_threadlist_iterator, remote_get_threads_with_ql)
6177         (remote_get_threads_with_qxfer)
6178         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6179         (get_offsets, remote_check_symbols, remote_supported_packet)
6180         (remote_query_supported, remote_packet_size)
6181         (remote_serial_quit_handler, remote_detach_pid)
6182         (remote_vcont_probe, remote_resume_with_hc)
6183         (send_interrupt_sequence, interrupt_query)
6184         (remote_notif_get_pending_events, fetch_register_using_p)
6185         (send_g_packet, process_g_packet, fetch_registers_using_g)
6186         (store_register_using_P, store_registers_using_G)
6187         (set_remote_traceframe, check_binary_download)
6188         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6189         (remote_xfer_live_readonly_partial, remote_read_bytes)
6190         (remote_send_printf, remote_flash_write, readchar)
6191         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6192         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6193         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6194         (extended_remote_disable_randomization, extended_remote_run)
6195         (send_environment_packet, extended_remote_environment_support)
6196         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6197         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6198         (packet_command): Now methods of ...
6199         (remote_target): ... this class.
6200         (m_remote_state) <remote_target>: New field.
6201         (struct remote_state) <stop_reply_queue,
6202         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6203         fields.
6204         (remote_state::remote_state): Allocate stop_reply_queue.
6205         (remote_state): Delete global.
6206         (get_remote_state_raw): Delete.
6207         (remote_target::get_remote_state): Allocate m_remote_state on
6208         demand.
6209         (get_current_remote_target): New.
6210         (remote_ops, extended_remote_ops): Delete.
6211         (wait_forever_enabled_p, remote_async_inferior_event_token):
6212         Delete, moved to struct remote_state.
6213         (remote_target::close): Delete self.  Destruction bits split to
6214         ...
6215         (remote_target::~remote_target): ... this.
6216         (show_memory_packet_size): Adjust to use
6217         get_current_remote_target.
6218         (struct protocol_feature) <func>: Add remote_target parameter.
6219         All callers adjusted.
6220         (curr_quit_handler_target): New.
6221         (remote_serial_quit_handler): Reimplement.
6222         (remote_target::open_1): Adjust to use get_current_remote_target.
6223         Heap-allocate remote_target/extended_remote_target instances.
6224         (vcont_builder::vcont_builder): Add remote_target parameter, and
6225         save it in m_remote.  All callers adjusted.
6226         (vcont_builder::m_remote): New field.
6227         (vcont_builder::restart, vcont_builder::flush)
6228         (vcont_builder::push_action): Use it.
6229         (remote_target::commit_resume): Use it.
6230         (struct queue_iter_param) <remote>: New field.
6231         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6232         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6233         (check_pending_event_prevents_wildcard_vcont_callback)
6234         (remote_target::check_pending_events_prevent_wildcard_vcont)
6235         (remote_target::discard_pending_stop_replies)
6236         (remote_target::discard_pending_stop_replies_in_queue)
6237         (remote_target::remote_notif_remove_queued_reply): Fill in
6238         'remote' field.
6239         (remote_notif_get_pending_events): New.
6240         (remote_target::readchar, remote_target::remote_serial_write):
6241         Save/restore curr_quit_handler_target.
6242         (putpkt): New.
6243         (kill_new_fork_children): Fill in 'remote' field.
6244         (packet_command): Use get_current_remote_target, defer to
6245         remote_target method of same name.
6246         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6247         parameter, and save it in m_remote.  All callers adjusted.
6248         (scoped_remote_fd::release): Use m_remote.
6249         (scoped_remote_fd::m_remote): New field.
6250         (remote_file_put, remote_file_get, remote_file_delete): Use
6251         get_current_remote_target, defer to remote_target method of same
6252         name.
6253         (remote_btrace_reset): Add remote_state paremeter.  Update all
6254         callers.
6255         (remote_async_inferior_event_handler). Pass down 'data'.
6256         (remote_new_objfile): Use get_current_remote_target.
6257         (remote_target::vcont_r_supported): New.
6258         (set_range_stepping): Use get_current_remote_target and
6259         remote_target::vcont_r_supported.
6260         (_initialize_remote): Don't allocate 'remote_state' and
6261         'stop_reply_queue' globals.
6262         * remote.h (struct remote_target): Forward declare.
6263         (getpkt, putpkt, remote_notif_get_pending_events): Add
6264         'remote_target' parameter.
6265
6266 2018-05-22  Pedro Alves  <palves@redhat.com>
6267
6268         * remote.c (vcont_builder): Now a class.  Make all data members
6269         private.
6270         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6271         Declare methods.
6272         (vcont_builder_restart): Rename to ...
6273         (vcont_builder::restart): ... this.
6274         (vcont_builder_flush): Rename to ...
6275         (vcont_builder::flush): ... this.
6276         (vcont_builder_push_action): Rename to ...
6277         (vcont_builder::push_action): ... this.
6278         (remote_target::commit_resume): Adjust.
6279
6280 2018-05-22  Pedro Alves  <palves@redhat.com>
6281
6282         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6283         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6284         (get_fixed_memory_packet_size): New.
6285         (get_memory_packet_size): Use it.
6286         (set_memory_packet_size): Don't override the config size with
6287         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6288         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6289         Don't refer to get_memory_packet_size if not connected to a remote
6290         target.  Show "(default)" if configured size is 0.
6291
6292 2018-05-22  Pedro Alves  <palves@redhat.com>
6293
6294         * remote.c (remote_target::mourn_inferior): Move
6295         discard_pending_stop_replies call here from ...
6296         (_initialize_remote): ... here.
6297
6298 2018-05-22  Pedro Alves  <palves@redhat.com>
6299
6300         * remote.c (compare_section_command): Remove set_general_process
6301         call.
6302
6303 2018-05-22  Pedro Alves  <palves@redhat.com>
6304
6305         * remote.c (struct packet_reg, struct remote_arch_state):
6306         Move higher up in the file.
6307         (remote_state) <m_arch_states>: Store remote_arch_state values
6308         instead of remote_arch_state pointers.
6309         (remote_state::get_remote_arch_state): Adjust.
6310
6311 2018-05-22  Pedro Alves  <palves@redhat.com>
6312
6313         * remote.c: Include <unordered_map>.
6314         (remote_state): Now a class.
6315         (remote_state) <get_remote_arch_state>: Declare method.
6316         <get_remote_arch_state>: New field.
6317         (remote_arch_state) <remote_arch_state>: Declare ctor.
6318         <regs>: Now a unique_ptr.
6319         (remote_gdbarch_data_handle): Delete.
6320         (get_remote_arch_state): Delete.
6321         (remote_state::get_remote_arch_state): New.
6322         (get_remote_state): Adjust to call remote_state's
6323         get_remote_arch_state method.
6324         (init_remote_state): Delete, bits factored out to ...
6325         (remote_arch_state::remote_arch_state): ... this new method.
6326         (get_remote_packet_size, get_memory_packet_size)
6327         (process_g_packet, remote_target::fetch_registers)
6328         (remote_target::prepare_to_store, store_registers_using_G)
6329         (remote_target::store_registers, remote_target::get_trace_status):
6330         Adjust to call remote_state's method.
6331         (_initialize_remote): Remove reference to
6332         remote_gdbarch_data_handle.
6333
6334 2018-05-22  Pedro Alves  <palves@redhat.com>
6335
6336         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6337         pread>: New method declarations.
6338         (remote_target::open_1): Adjust.
6339         (readahead_cache_invalidate): Rename to ...
6340         (readahead_cache::invalidate): ... this, and adjust to be a class
6341         method.
6342         (readahead_cache_invalidate_fd): Rename to ...
6343         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6344         class method.
6345         (remote_hostio_pwrite): Adjust.
6346         (remote_hostio_pread_from_cache): Rename to ...
6347         (readahead_cache::pread): ... this, and adjust to be a class
6348         method.
6349         (remote_hostio_close): Adjust.
6350
6351 2018-05-22  Pedro Alves  <palves@redhat.com>
6352
6353         * remote.c (remote_hostio_close_cleanup): Delete.
6354         (class scoped_remote_fd): New.
6355         (remote_file_put, remote_file_get): Use it.
6356
6357 2018-05-22  Pedro Alves  <palves@redhat.com>
6358
6359         (struct vCont_action_support): Use bool and initialize all fields.
6360         (struct readahead_cache): Initialize all fields.
6361         (remote_state): Use bool and initialize all fields.
6362         (remote_state::remote_state, remote_state::~remote_state): New.
6363         (new_remote_state): Delete.
6364         (_initialize_remote): Use new to allocate remote_state.
6365
6366 2018-05-22  Pedro Alves  <palves@redhat.com>
6367             張俊芝  <zjz@zjz.name>
6368
6369         PR gdb/22973
6370         * c-exp.y: Include "c-support.h".
6371         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6372         of tolower.  Use c_ident_is_alpha to scan names.
6373         * c-lang.c: Include "c-support.h".
6374         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6375         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6376         * c-support.h: New file, with bits factored out from ...
6377         * cp-name-parser.y: ... this file.
6378         Include "c-support.h".
6379         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6380         c-support.h and renamed.
6381         (symbol_end, yylex): Adjust.
6382
6383 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6384
6385         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6386         parameter type to CORE_ADDR.
6387         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6388         parameter type in declaration to CORE_ADDR.
6389         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6390         target_auxv_search to get AT_HWCAP and use the result to get the
6391         target description.
6392         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6393         to CORE_ADDR. Remove the cast of the return value to unsigned
6394         long. Fix error predicate of target_auxv_search.
6395         (ppc_linux_nat_target::read_description): Change the type of the
6396         hwcap variable to CORE_ADDR.
6397
6398 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6399
6400         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6401         if the size of fpscr is larger than 32 bits.
6402
6403 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6404
6405         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6406         (ppc32_linux_vsxregmap): New global.
6407         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6408         regcache_supply_regset, and regcache_collect_regset.
6409         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6410         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6411         (fetch_vsx_register, store_vsx_register): Remove.
6412         (fetch_vsx_registers): Add regno parameter. Get regset using
6413         ppc_linux_vsxregset. Use regset to supply registers.
6414         (store_vsx_registers): Add regno parameter. Get regset using
6415         ppc_linux_vsxregset. Use regset to collect registers.
6416         (fetch_register): Call fetch_vsx_registers instead of
6417         fetch_vsx_register.
6418         (store_register): Call store_vsx_registers instead of
6419         store_vsx_register.
6420         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6421         new regno parameter.
6422         (store_ppc_registers): Call store_vsx_registers with -1 for the
6423         new regno parameter.
6424         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6425         (ppc_collect_vsxregset): Remove.
6426
6427 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6428
6429         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6430         offset fields.
6431         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6432         for vector register offset fields.
6433         (ppc64_fbsd_reg_offsets): Likewise.
6434         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6435         to vector register offset fields.
6436         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6437         to vector register offset fields.
6438         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6439         vector register offset fields.
6440         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6441         initializers for vector register offset fields.
6442         (rs6000_aix64_reg_offsets): Likewise.
6443         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6444         (ppc_supply_vrregset): Remove.
6445         (ppc_collect_vrregset): Remove.
6446         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6447         (ppc_linux_vrregset) : New function.
6448         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6449         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6450         (ppc32_linux_vrregset): Remove.
6451         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6452         and use result instead of ppc32_linux_vrregset.
6453         (ppc32_linux_reg_offsets): Remove initializers for vector register
6454         offset fields.
6455         (ppc64_linux_reg_offsets): Likewise.
6456         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6457         * ppc-linux-nat.c: Include regset.h.
6458         (gdb_vrregset_t): Adjust comment to account for little-endian
6459         mode.
6460         (supply_vrregset, fill_vrregset): Remove.
6461         (fetch_altivec_register, store_altivec_register): Remove.
6462         (fetch_altivec_registers): Add regno parameter. Get regset using
6463         ppc_linux_vrregset. Use regset to supply registers.
6464         (store_altivec_registers): Add regno parameter. Get regset using
6465         ppc_linux_vrregset. Use regset to collect registers.
6466         (fetch_register): Call fetch_altivec_registers instead of
6467         fetch_altivec_register.
6468         (store_register): Call store_altivec_registers instead of
6469         store_altivec_register.
6470         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6471         the new regno parameter.
6472         (store_ppc_registers): Call store_altivec_registers with -1 for
6473         the new regno parameter.
6474
6475 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6476
6477         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6478         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6479         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6480         (gdb_vrregset_t): Change array type size to
6481         PPC_LINUX_SIZEOF_VRREGSET.
6482         (gdb_vsxregset_t): Change array type size to
6483         PPC_LINUX_SIZEOF_VSXREGSET.
6484         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6485         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6486         PPC_LINUX_SIZEOF_VSXREGSET.
6487
6488 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6489
6490         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6491         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6492         nat/ppc-linux.c.
6493         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6494         ppc_linux_target_wordsize with tid.
6495         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6496         wordsize with tid.
6497         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6498         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6499         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6500         tid parameter. Remove static specifier.
6501         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6502         (ppc_linux_target_wordsize): New declaration.
6503
6504 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6505
6506         * arch/ppc-linux-common.c: New file.
6507         * arch/ppc-linux-common.h: New file.
6508         * arch/ppc-linux-tdesc.h: New file.
6509         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6510         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6511         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6512         arch/ppc-linux-tdesc.h.
6513         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6514         arch/ppc-linux-tdesc.h.
6515         (ppc_linux_nat_target::read_description): Remove target
6516         description matching code. Fill a ppc_linux_features struct and
6517         call ppc_linux_match_description with it. Move comment about ISA
6518         2.05 to ppc-linux-common.c.
6519         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6520         arch/ppc-linux-tdesc.h.
6521         (ppc_linux_core_read_description): Remove target description
6522         matching code. Fill a ppc_linux_features struct and call
6523         ppc_linux_match_description with it.
6524         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6525         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6526         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6527         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6528         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6529         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6530         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6531         (tdesc_powerpc_e500l): Remove.
6532
6533 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6534
6535         * ada-lang.c (catch_assert_command): Pass empty string instead
6536         of NULL for excep_string argument.
6537
6538 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6539
6540         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6541         the width of the requested register exceeds the width of the
6542         `ptrace' data type.
6543
6544 2018-05-21  Tom Tromey  <tom@tromey.com>
6545
6546         * printcmd.c (output_command): Remove.
6547         (output_command_const): Rename to output_command.
6548         * valprint.h (output_command): Rename from output_command_const.
6549         * tracepoint.c (trace_dump_actions): Call output_command.
6550
6551 2018-05-21  Tom Tromey  <tom@tromey.com>
6552
6553         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6554         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6555         * ada-lang.h (create_ada_exception_catchpoint): Update.
6556         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6557         std::string.
6558         (create_excep_cond_exprs, ~ada_catchpoint)
6559         (should_stop_exception, print_one_exception)
6560         (print_mention_exception, print_recreate_exception): Update.
6561         (ada_get_next_arg): Remove.
6562         (catch_ada_exception_command_split): Use std::string.  Change type
6563         of "excep_string", "cond_string".
6564         (catch_ada_exception_command): Update.
6565         (create_ada_exception_catchpoint): Change type of excep_string.
6566         (ada_exception_sal): Remove excep_string parameter.
6567         (~ada_catchpoint): Remove.
6568
6569 2018-05-21  Tom Tromey  <tom@tromey.com>
6570
6571         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6572         cleanup.
6573
6574 2018-05-21  Tom Tromey  <tom@tromey.com>
6575
6576         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6577         Return unique_xmalloc_ptr.
6578         (print_it_exception): Update.
6579
6580 2018-05-21  Tom Tromey  <tom@tromey.com>
6581
6582         * tracepoint.c (trace_dump_actions): Use std::string.
6583
6584 2018-05-21  Tom Tromey  <tom@tromey.com>
6585
6586         * symfile.c (reread_symbols): Use std::string for original_name.
6587
6588 2018-05-21  Tom Tromey  <tom@tromey.com>
6589
6590         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6591         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6592         constructor.
6593
6594 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6595
6596         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6597         instance to...
6598         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6599         * objfiles.c (get_objfile_bfd_data): Allocate
6600         objfile_per_bfd_storage with obstack_new when allocating on
6601         obstack.
6602
6603 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6604
6605         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6606         OBSTACK_ZALLOC.
6607         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6608         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6609         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6610         (add_pending): Likewise.
6611         (parse_symbol): Likewise.
6612         (parse_partial_symbols): Likewise.
6613         (psymtab_to_symtab_1): Likewise.
6614         (new_psymtab): Likewise.
6615         (elfmdebug_build_psymtabs): Likewise.
6616         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6617         * objfiles.c (get_objfile_bfd_data): Likewise.
6618         (objfile_register_static_link): Likewise.
6619         * psymtab.c (allocate_psymtab): Likewise.
6620         * stabsread.c (read_member_functions): Likewise.
6621         * xcoffread.c (xcoff_end_psymtab): Likewise.
6622
6623 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6624
6625         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6626         compiler supports std::is_trivially_constructible.
6627         * common/poison.h: Include obstack.h.
6628         (IsMallocable): Define to is_trivially_constructible if the
6629         compiler supports it, define to true_type otherwise.
6630         (xobnew): New.
6631         (XOBNEW): Redefine.
6632         (xobnewvec): New.
6633         (XOBNEWVEC): Redefine.
6634         * gdb_obstack.h (obstack_zalloc): New.
6635         (OBSTACK_ZALLOC): Redefine.
6636         (obstack_calloc): New.
6637         (OBSTACK_CALLOC): Redefine.
6638         (obstack_new): New.
6639         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6640         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6641         gdbarch.c.
6642         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6643         obstack_calloc/obstack_zalloc.
6644         (gdbarch_obstack_zalloc): Remove.
6645         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6646
6647 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6648
6649         * stack.c (backtrace_command_1): Remove useless variable int i.
6650
6651 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6652
6653         * stack.c (print_frame_info): Fix comment.
6654
6655 2018-05-18  Tom Tromey  <tom@tromey.com>
6656
6657         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6658         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6659         (~dwarf2_per_objfile): Update
6660         (dwarf2_get_dwz_file): Use new.
6661         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6662         unique_ptr.
6663
6664 2018-05-18  Tom Tromey  <tom@tromey.com>
6665
6666         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6667         unique_ptr.
6668         * dwarf2read.c (struct dwp_file): Add constructor and
6669         initializers.
6670         (open_and_init_dwp_file): Return a unique_ptr.
6671         (dwarf2_per_objfile, create_dwp_hash_table)
6672         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6673         (lookup_dwo_unit_in_dwp): Update.
6674         (open_and_init_dwp_file, get_dwp_file): Update.
6675
6676 2018-05-18  Tom Tromey  <tom@tromey.com>
6677
6678         * dwarf2read.c (dwarf2_per_objfile): Update.
6679         (struct mapped_index): Add initializers.
6680         (dwarf2_read_index): Use new.
6681         (dw2_symtab_iter_init): Update.
6682         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6683         unique_ptr.
6684
6685 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6686
6687         * dwarf2read.c (mapped_index) <total_size>: Remove.
6688
6689 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6690
6691         * unittests/format_pieces-selftests.c (test_format_specifier):
6692         Add ARI comments.
6693
6694 2018-05-18  Tom Tromey  <tom@tromey.com>
6695
6696         * c-typeprint.c (maybe_print_hole): New function.
6697         (c_print_type_struct_field_offset): Update.
6698         (c_type_print_base_struct_union): Call maybe_print_hole.
6699
6700 2018-05-17  Keith Seitz  <keiths@redhat.com>
6701
6702         * breakpoint.c (build_bpstat_chain): New function, moved from
6703         bpstat_stop_status.
6704         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6705         If no stop chain is passed, call build_bpstat_chain to build it.
6706         * breakpoint.h (build_bpstat_chain): Declare.
6707         (bpstat_stop_status): Move documentation here from breakpoint.c.
6708         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6709         build the stop chain and pass it to skip_inline_frames.
6710         Pass this stop chain to bpstat_stop_status.
6711         * inline-frame.c: Include breakpoint.h.
6712         (stopped_by_user_bp_inline_frame): New function.
6713         (skip_inline_frames): Add parameter `stop_chain'.
6714         Move documention to inline-frame.h.
6715         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6716         whether the frame should be elided.
6717         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6718         Add moved documentation and update for new parameter.
6719
6720 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6721
6722         PR cli/14975
6723         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6724         unittests/format_pieces-selftests.c.
6725         * common/format.h (format_piece) <operator==>: New.
6726         (format_pieces) <operator[]>: Remove.
6727         * common/format.c (format_pieces::format_pieces): Handle \e.
6728         * unittests/format_pieces-selftests.c: New.
6729
6730 2018-05-17  Tom Tromey  <tom@tromey.com>
6731
6732         PR symtab/23010:
6733         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6734         (dw2_instantiate_symtab): Add skip_partial parameter.
6735         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6736         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6737         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6738         (dw2_expand_symtabs_matching_one)
6739         (dw2_find_pc_sect_compunit_symtab)
6740         (dw2_debug_names_lookup_symbol)
6741         (dw2_debug_names_expand_symtabs_for_function): Update.
6742         (init_cutu_and_read_dies): Add skip_partial parameter.
6743         (process_psymtab_comp_unit, build_type_psymtabs_1)
6744         (process_skeletonless_type_unit, load_partial_comp_unit)
6745         (psymtab_to_symtab_1): Update.
6746         (load_full_comp_unit): Add skip_partial parameter.
6747         (process_imported_unit_die, dwarf2_read_addr_index)
6748         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6749         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6750         (read_signatured_type): Update.
6751
6752 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6753
6754         * value.c (release_value): Remove unused variable.
6755         (record_latest_value): Likewise.
6756         (access_value_history): Likewise.
6757         (preserve_values): Likewise.
6758
6759 2018-05-17  Tom Tromey  <tom@tromey.com>
6760
6761         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6762         Initialize.
6763
6764 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6765
6766         PR gdb/22286
6767         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6768         Also handle registers whose width is not a multiple of
6769         PTRACE_TYPE_RET.
6770         (linux_nat_trad_target::store_register): Likewise.
6771
6772 2018-05-16  Tom Tromey  <tom@tromey.com>
6773
6774         * gdbcore.h (core_bfd): Redefine.
6775         * corelow.c (core_target::close): Update.
6776         (core_target_open): Update.
6777         * progspace.h (struct program_space) <cbfd>: Now a
6778         gdb_bfd_ref_ptr.
6779
6780 2018-05-16  Tom Tromey  <tom@tromey.com>
6781
6782         PR cli/19551:
6783         * symfile-add-flags.h (enum symfile_add_flags)
6784         <SYMFILE_NOT_FILENAME>: New constant.
6785         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6786         objfile name from BFD.
6787         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6788         * minidebug.c (find_separate_debug_file_in_section): Put
6789         ".gnu_debugdata" into BFD's file name.
6790
6791 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6792
6793         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6794         Remove.
6795
6796 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6797
6798         PR binutils/21446
6799         * aarch64-tdep.c (aarch64_analyze_prologue,
6800         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6801         Indicate not interested in errors.
6802
6803 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6804
6805         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6806         Supply the MIPS_ZERO_REGNUM register.
6807
6808 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6809
6810         * mips-tdep.c (mask_address_var): Make variable static.
6811
6812 2018-05-14  Tom Tromey  <tom@tromey.com>
6813
6814         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6815
6816 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6817
6818         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6819         FXSAVE_ADDR for the mxcsr register.
6820
6821 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6822
6823         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6824
6825 2018-05-11  Pedro Alves  <palves@redhat.com>
6826
6827         * corelow.c (core_target) <core_target>: No longer inline.
6828         Initialize m_core_gdbarch, m_core_vec and build the section table
6829         here.
6830         <~core_target>: New.
6831         <core_gdbarch, get_core_register_section>: New methods.
6832         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6833         factored out from ...
6834         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6835         (core_ops): Delete.
6836         (sniff_core_bfd): Add gdbarch parameter.
6837         (core_close): Delete, merged into ...
6838         (core_target::close): ... here.  Delete self.
6839         (core_close_cleanup): Delete.
6840         (core_target_open): Allocate a core_target on the heap.  Use a
6841         unique_ptr instead of a cleanup.  Bits moved into the core_target
6842         ctor.  Adjust to use core_target methods instead of globals.
6843         (get_core_register_section): Rename to ...
6844         (core_target::get_core_register_section): ... this and adjust.
6845         (struct get_core_registers_cb_data): New.
6846         (get_core_registers_cb): Use it.  Use bool.
6847         (core_target::fetch_registers, core_target::files_info)
6848         (core_target::xfer_partial, core_target::read_description)
6849         (core_target::pid_to, core_target::thread_name): Adjust to
6850         reference class fields instead of globals.
6851         * target.h (struct target_ops_deleter, target_ops_up): New.
6852
6853 2018-05-11  Pedro Alves  <palves@redhat.com>
6854
6855         * corefile.c (core_file_command): Move to corelow.c.
6856         * corelow.c (the_core_target): Delete.
6857         (core_file_command): Moved from corefile.c.  Check exec_bfd
6858         instead of the_core_target.  Use target_detach instead of calling
6859         into the_core_target directly.
6860         (maybe_say_no_core_file_now): New.
6861         (core_target::detach): Use it.
6862         (_initialize_corelow): Remove references to the_core_target.
6863         * gdbcore.h (the_core_target): Delete.
6864
6865 2018-05-11  Tom Tromey  <tromey@redhat.com>
6866             Pedro Alves  <palves@redhat.com>
6867
6868         * corefile.c (core_bfd): Remove.
6869         * gdbcore.h (core_bfd): Now a macro.
6870         * progspace.h (struct program_space) <cbfd>: New field.
6871
6872 2018-05-11  Tom Tromey  <tom@tromey.com>
6873
6874         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6875         gdb::def_vector.
6876
6877 2018-05-10  Tom Tromey  <tom@tromey.com>
6878
6879         * configure: Rebuild.
6880         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6881
6882 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
6883
6884         PR server/23158:
6885         * regformats/regdat.sh: Adjust script, following the addition
6886         of the new expedite_regs parameter to init_target_desc.
6887
6888 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
6889     
6890         PR gdb/23127
6891         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6892         set_gdbarch_significant_addr_bit.
6893         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6894         set_gdbarch_significant_addr_bit.
6895         * utils.c (address_significant): Update to sign extend addr.
6896
6897 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
6898
6899         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6900         (xtensa_linux_init_abi): Limit tdep->num_regs by
6901         tdep->num_nopriv_regs.
6902         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6903         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6904         not initialized.
6905
6906 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
6907
6908         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6909
6910 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6911
6912         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6913         (I387_MXCSR_INIT_VAL): New constant.
6914         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6915         buffer if it was supplied by the inferior.
6916         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6917         (i387_xsave_get_clear_bv): New function.
6918         (i387_supply_xsave): Only read x87 control registers from the
6919         xsave buffer if the feature is enabled, and the state will have
6920         been written, otherwise, provide a suitable default.
6921         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6922         including x87 control registers.  Update control registers if they
6923         have changed from the default value, and mark features as enabled
6924         as required.
6925         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6926
6927 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6928
6929         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6930
6931 2018-05-07  Tom Tromey  <tom@tromey.com>
6932
6933         * configure: Rebuild.
6934         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6935
6936 2018-05-07  Tom Tromey  <tom@tromey.com>
6937
6938         PR tdep/20362:
6939         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6940         bit.  Use correct value for VDIV.
6941
6942 2018-05-04  Tom Tromey  <tom@tromey.com>
6943
6944         * configure: Rebuild.
6945         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6946
6947 2018-05-04  Tom Tromey  <tom@tromey.com>
6948
6949         * linux-record.c (record_linux_system_call) <case
6950         RECORD_SYS_RECVFROM>: Add "break".
6951
6952 2018-05-04  Tom Tromey  <tom@tromey.com>
6953
6954         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6955         Add missing "break".
6956         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6957         Add missing "break".
6958
6959 2018-05-04  Tom Tromey  <tom@tromey.com>
6960
6961         * rs6000-tdep.c (ppc_process_record_op4)
6962         (ppc_process_record_op63): Add fall-through comment.
6963
6964 2018-05-04  Tom Tromey  <tom@tromey.com>
6965
6966         * i386-tdep.c (i386_process_record): Add fall-through comment.
6967
6968 2018-05-04  Tom Tromey  <tom@tromey.com>
6969
6970         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6971         comment.
6972
6973 2018-05-04  Tom Tromey  <tom@tromey.com>
6974
6975         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6976         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6977         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6978         comment.
6979         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6980         comment.
6981         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6982         comment.
6983
6984 2018-05-04  Tom Tromey  <tom@tromey.com>
6985
6986         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6987
6988 2018-05-04  Tom Tromey  <tom@tromey.com>
6989
6990         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6991         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6992         * symfile.c (section_is_mapped): Fix fall-through comment.
6993         * stabsread.c (define_symbol, read_member_functions): Fix
6994         fall-through comment.
6995         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6996         comment.
6997         * remote.c (remote_wait_as): Fix fall-through comment.
6998         * p-exp.y (yylex): Fix fall-through comment.
6999         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7000         comment.
7001         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7002         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7003         * jv-exp.y (yylex): Fix fall-through comment.
7004         * go-exp.y (lex_one_token): Fix fall-through comment.
7005         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7006         fall-through comment.
7007         * f-exp.y (yylex): Fix fall-through comment.
7008         * dwarf2read.c (process_die): Fix fall-through comments.
7009         * dbxread.c (process_one_symbol): Fix fall-through comment.
7010         * d-exp.y (lex_one_token): Fix fall-through comment.
7011         * cp-name-parser.y (yylex): Fix fall-through comment.
7012         * coffread.c (coff_symtab_read): Fix fall-through comment.
7013         * c-exp.y (lex_one_token): Fix fall-through comment.
7014         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7015         comment.
7016         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7017         comment.
7018
7019 2018-05-04  Tom Tromey  <tom@tromey.com>
7020
7021         PR python/22730:
7022         * NEWS: Mention gdb.execute change.
7023         * gdbcmd.h (execute_control_command): Don't declare.
7024         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7025         execute_control_commands, execute_control_commands_to_string.
7026         * cli/cli-script.h (execute_control_commands)
7027         (execute_control_commands_to_string): Declare.
7028         (execute_control_command): Add from_tty parameter.
7029         * cli/cli-script.c (execute_control_commands)
7030         (execute_control_commands_to_string): New functions.
7031         (execute_user_command): Use execute_control_commands.
7032         (execute_control_command_1): Add "from_tty" parameter.  Update.
7033         (execute_control_command): Likewise.
7034
7035 2018-05-04  Tom Tromey  <tom@tromey.com>
7036
7037         PR python/22731:
7038         * NEWS: Mention that breakpoint commands are writable.
7039         * python/py-breakpoint.c (bppy_set_commands): New function.
7040         (breakpoint_object_getset) <"commands">: Use it.
7041
7042 2018-05-04  Tom Tromey  <tom@tromey.com>
7043
7044         * tracepoint.c (actions_command): Update.
7045         * mi/mi-cmd-break.c (mi_command_line_array)
7046         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7047         (mi_read_next_line): Remove.
7048         (mi_cmd_break_commands): Update.
7049         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7050         function_view.
7051         * cli/cli-script.c (get_command_line): Update.
7052         (process_next_line): Use function_view.  Constify.
7053         (recurse_read_control_structure, read_command_lines)
7054         (read_command_lines_1): Change argument types to function_view.
7055         (do_define_command, document_command): Update.
7056         * breakpoint.h (check_tracepoint_command): Don't declare.
7057         * breakpoint.c (check_tracepoint_command): Remove.
7058         (commands_command_1, create_tracepoint_from_upload): Update.
7059
7060 2018-05-04  Tom Tromey  <tom@tromey.com>
7061
7062         PR gdb/11750:
7063         * cli/cli-script.h (enum command_control_type) <define_control>:
7064         New constant.
7065         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7066         (build_command_line, execute_control_command_1)
7067         (process_next_line): Likewise.
7068         (do_define_command): New function, extracted from define_command.
7069         (define_command): Use it.
7070
7071 2018-05-04  Tom Tromey  <tom@tromey.com>
7072
7073         * tracepoint.c (actions_command): Update.
7074         * cli/cli-script.h (read_command_lines): Update.
7075         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7076         (MAX_TMPBUF): Remove define.
7077         (define_command): Use string_printf.
7078         (document_command): Likewise.
7079         * breakpoint.c (commands_command_1): Update.
7080
7081 2018-05-04  Tom Tromey  <tom@tromey.com>
7082
7083         * top.c (execute_command): Update.
7084         * cli/cli-script.h (print_command_lines): Now varargs.
7085         * cli/cli-script.c (print_command_lines): Now varargs.
7086         (execute_control_command_1) <case while_control, case if_control>:
7087         Update.
7088
7089 2018-05-04  Tom Tromey  <tom@tromey.com>
7090
7091         * tracepoint.c (all_tracepoint_actions): Rename from
7092         all_tracepoint_actions_and_cleanup.  Change return type.
7093         (actions_command, encode_actions_1, encode_actions)
7094         (trace_dump_actions, tdump_command): Update.
7095         * remote.c (remote_download_command_source): Update.
7096         * python/python.c (gdbpy_eval_from_control_command)
7097         (python_command, python_interactive_command): Update.
7098         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7099         * guile/guile.c (guile_command)
7100         (gdbscm_eval_from_control_command, guile_command): Update.
7101         * compile/compile.c (compile_code_command)
7102         (compile_print_command, compile_to_object): Update.
7103         * cli/cli-script.h (struct command_lines_deleter): New.
7104         (counted_command_line): New typedef.
7105         (struct command_line): Add constructor, destructor.
7106         <body_list>: Remove.
7107         <body_list_0, body_list_1>: New members.
7108         (command_line_up): Remove typedef.
7109         (read_command_lines, read_command_lines_1, get_command_line):
7110         Update.
7111         (copy_command_lines): Don't declare.
7112         * cli/cli-script.c (build_command_line): Use "new".
7113         (get_command_line): Return counted_command_line.
7114         (print_command_lines, execute_user_command)
7115         (execute_control_command_1, while_command, if_command): Update.
7116         (realloc_body_list): Remove.
7117         (process_next_line, recurse_read_control_structure): Update.
7118         (read_command_lines, read_command_lines_1): Return counted_command_line.
7119         (free_command_lines): Use "delete".
7120         (copy_command_lines): Remove.
7121         (define_command, document_command, show_user_1): Update.
7122         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7123         a counted_command_line.
7124         * breakpoint.h (counted_command_line): Remove typedef.
7125         (breakpoint_set_commands): Update.
7126         * breakpoint.c (check_no_tracepoint_commands)
7127         (validate_commands_for_breakpoint): Update.
7128         (breakpoint_set_commands): Change commands to be a
7129         counted_command_line.
7130         (commands_command_1, update_dprintf_command_list)
7131         (create_tracepoint_from_upload): Update.
7132
7133 2018-05-04  Tom Tromey  <tom@tromey.com>
7134
7135         * cli/cli-decode.h (cmd_list_element): New constructor.
7136         (~cmd_list_element): New destructor.
7137         (struct cmd_list_element): Add initializers.
7138         * cli/cli-decode.c (do_add_cmd): Use "new".
7139         (delete_cmd): Use "delete".
7140
7141 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7142             Pedro Alves <palves@redhat.com>
7143
7144         PR breakpoints/19806 and support for PR external/20207.
7145         * NEWS: Mention Aarch64 watchpoint improvements.
7146         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7147         watchpoints and PR external/20207 watchpoints.
7148         * nat/aarch64-linux-hw-point.c
7149         (kernel_supports_any_contiguous_range): New.
7150         (aarch64_watchpoint_offset): New.
7151         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7152         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7153         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7154         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7155         next_addr_orig_p.  Support PR external/20207 watchpoints.
7156         (aarch64_downgrade_regs): New.
7157         (aarch64_dr_state_insert_one_point): New parameters offset and
7158         addr_orig.
7159         (aarch64_dr_state_remove_one_point): Likewise.
7160         (aarch64_handle_breakpoint): Update caller.
7161         (aarch64_handle_aligned_watchpoint): Likewise.
7162         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7163         aligned_offset.
7164         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7165         aarch64_downgrade_regs.
7166         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7167         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7168         (DR_CONTROL_MASK): ... this.
7169         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7170         (unsigned int aarch64_watchpoint_offset): New prototype.
7171         (aarch64_linux_set_debug_regs): Remove const from state.
7172         * utils.c (align_up, align_down): Move to ...
7173         * common/common-utils.c (align_up, align_down): ... here.
7174         * utils.h (align_up, align_down): Move to ...
7175         * common/common-utils.h (align_up, align_down): ... here.
7176
7177 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7178
7179         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7180         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7181         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7182         Re-implement to match the ABI as summarized in GCC's
7183         gcc/config/sparc/sparc.c.  All callers updated.
7184         (sparc32_store_arguments): Remove assertion.
7185
7186 2018-05-04  Tom Tromey  <tom@tromey.com>
7187
7188         * printcmd.c: Don't include tui.h.
7189         (decode_format): Use skip_spaces.
7190
7191 2018-05-04  Tom Tromey  <tom@tromey.com>
7192
7193         PR gdb/22619:
7194         * printcmd.c (last_count): New global.
7195         (x_command): Use saved count when repeating.
7196
7197 2018-05-04  Tom Tromey  <tom@tromey.com>
7198
7199         * nto-procfs.c (do_closedir_cleanup): Remove.
7200         (procfs_pidlist): Use gdb_dir_up.
7201         * procfs.c (do_closedir_cleanup): Remove.
7202         (proc_update_threads): Use gdb_dir_up.
7203         * common/filestuff.h (struct gdb_dir_deleter): New.
7204         (gdb_dir_up): New typedef.
7205
7206 2018-05-04  Tom Tromey  <tom@tromey.com>
7207
7208         * ada-lang.c (print_mention_exception): Use std::string.
7209
7210 2018-05-04  Tom Tromey  <tom@tromey.com>
7211
7212         * ada-lang.c (create_excep_cond_exprs): Update.
7213         (ada_exception_catchpoint_cond_string): Use std::string.
7214
7215 2018-05-04  Tom Tromey  <tom@tromey.com>
7216
7217         * ada-lang.c (xget_renaming_scope): Return std::string.
7218         (old_renaming_is_invisible): Update.
7219
7220 2018-05-04  Tom Tromey  <tom@tromey.com>
7221
7222         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7223         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7224
7225 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7226
7227         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7228
7229 2018-05-04  Tom Tromey  <tom@tromey.com>
7230
7231         * remote.c (remote_query_supported_append): Change type.
7232         (remote_check_symbols): Update.
7233
7234 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7235
7236         PR gdb/11420
7237         * configure.ac: Prepend libpython.
7238         * python/python-config.py: Likewise.
7239         * configure: Regenerate.
7240
7241 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7242
7243         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7244
7245 2018-05-03  Pedro Alves  <palves@redhat.com>
7246
7247         * s390-linux-nat.c
7248         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7249         override.  Write 'true' instead of '1'.
7250         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7251         declaration.
7252
7253 2018-05-02  Pedro Alves  <palves@redhat.com>
7254
7255         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7256         add_inf_child_target.
7257         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7258         add_inf_child_target.
7259         * aix-thread.c (aix_thread_target_info): New.
7260         (aix_thread_target) <shortname, longname, doc>: Delete.
7261         <info>: New.
7262         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7263         add_inf_child_target.
7264         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7265         add_inf_child_target.
7266         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7267         add_inf_child_target.
7268         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7269         add_inf_child_target.
7270         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7271         add_inf_child_target.
7272         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7273         add_inf_child_target.
7274         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7275         add_inf_child_target.
7276         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7277         add_inf_child_target.
7278         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7279         add_inf_child_target.
7280         * bfd-target.c (target_bfd_target_info): New.
7281         (target_bfd) <shortname, longname, doc>: Delete.
7282         <info>: New.
7283         * bsd-kvm.c (bsd_kvm_target_info): New.
7284         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7285         <info>: New.
7286         (bsd_kvm_target::open): Rename to ...
7287         (bsd_kvm_target_open): ... this.  Adjust.
7288         * bsd-uthread.c (bsd_uthread_target_info): New.
7289         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7290         <info>: New.
7291         * corefile.c (core_file_command): Adjust.
7292         * corelow.c (core_target_info): New.
7293         (core_target) <shortname, longname, doc>: Delete.
7294         <info>: New.
7295         (core_target::open): Rename to ...
7296         (core_target_open): ... this.  Adjust.
7297         * ctf.c (ctf_target_info): New.
7298         (ctf_target) <shortname, longname, doc>: Delete.
7299         <info>: New.
7300         (ctf_target::open): Rename to ...
7301         (ctf_target_open): ... this.
7302         (_initialize_ctf): Adjust.
7303         * exec.c (exec_target_info): New.
7304         (exec_target) <shortname, longname, doc>: Delete.
7305         <info>: New.
7306         (exec_target::open): Rename to ...
7307         (exec_target_open): ... this.
7308         * gdbcore.h (core_target_open): Declare.
7309         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7310         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7311         add_inf_child_target.
7312         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7313         add_inf_child_target.
7314         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7315         add_inf_child_target.
7316         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7317         add_inf_child_target.
7318         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7319         add_inf_child_target.
7320         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7321         add_inf_child_target.
7322         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7323         add_inf_child_target.
7324         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7325         add_inf_child_target.
7326         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7327         add_inf_child_target.
7328         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7329         add_inf_child_target.
7330         * inf-child.c (inf_child_target_info): New.
7331         (inf_child_target::info): New.
7332         (inf_child_open_target): Remove 'target' parameter.  Use
7333         get_native_target instead.
7334         (inf_child_target::open): Delete.
7335         (add_inf_child_target): New.
7336         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7337         Delete.
7338         <info>: New.
7339         (add_inf_child_target): Declare.
7340         (inf_child_open_target): Declare.
7341         * linux-thread-db.c (thread_db_target_info): New.
7342         (thread_db_target) <shortname, longname, doc>: Delete.
7343         <info>: New.
7344         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7345         add_inf_child_target.
7346         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7347         add_inf_child_target.
7348         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7349         add_inf_child_target.
7350         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7351         add_inf_child_target.
7352         * make-target-delegates (print_class): Adjust.
7353         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7354         add_inf_child_target.
7355         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7356         add_inf_child_target.
7357         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7358         add_inf_child_target.
7359         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7360         add_inf_child_target.
7361         * nto-procfs.c (nto_native_target_info): New.
7362         (nto_procfs_target_native) <shortname, longname, doc>:
7363         Delete.
7364         <info>: New.
7365         (nto_procfs_target_info): New.
7366         (nto_procfs_target_procfs) <shortname, longname, doc>:
7367         Delete.
7368         <info>: New.
7369         (init_procfs_targets): Adjust.
7370         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7371         add_inf_child_target.
7372         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7373         add_inf_child_target.
7374         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7375         add_inf_child_target.
7376         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7377         add_inf_child_target.
7378         * ravenscar-thread.c (ravenscar_target_info): New.
7379         (ravenscar_thread_target) <shortname, longname, doc>:
7380         Delete.
7381         <info>: New.
7382         * record-btrace.c (record_btrace_target_info):
7383         (record_btrace_target) <shortname, longname, doc>: Delete.
7384         <info>: New.
7385         (record_btrace_target::open): Rename to ...
7386         (record_btrace_target_open): ... this.  Adjust.
7387         * record-full.c (record_longname, record_doc): New.
7388         (record_full_base_target) <shortname, longname, doc>: Delete.
7389         <info>: New.
7390         (record_full_target_info): New.
7391         (record_full_target): <shortname>: Delete.
7392         <info>: New.
7393         (record_full_core_open_1, record_full_open_1): Update comments.
7394         (record_full_base_target::open): Rename to ...
7395         (record_full_open): ... this.
7396         (cmd_record_full_restore): Update.
7397         (_initialize_record_full): Update.
7398         * remote-sim.c (remote_sim_target_info): New.
7399         (gdbsim_target) <shortname, longname, doc>: Delete.
7400         <info>: New.
7401         (gdbsim_target::open): Rename to ...
7402         (gdbsim_target_open): ... this.
7403         (_initialize_remote_sim): Adjust.
7404         * remote.c (remote_doc): New.
7405         (remote_target_info): New.
7406         (remote_target) <shortname, longname, doc>: Delete.
7407         <info>: New.
7408         (extended_remote_target_info): New.
7409         (extended_remote_target) <shortname, longname, doc>: Delete.
7410         <info>: New.
7411         (remote_target::open_1): Make static.  Adjust.
7412         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7413         * s390-linux-nat.c (_initialize_s390_nat): Use
7414         add_inf_child_target.
7415         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7416         add_inf_child_target.
7417         * sol-thread.c (thread_db_target_info): New.
7418         (sol_thread_target) <shortname, longname, doc>: Delete.
7419         <info>: New.
7420         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7421         add_inf_child_target.
7422         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7423         add_inf_child_target.
7424         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7425         add_inf_child_target.
7426         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7427         add_inf_child_target.
7428         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7429         add_inf_child_target.
7430         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7431         add_inf_child_target.
7432         * spu-linux-nat.c (_initialize_spu_nat): Use
7433         add_inf_child_target.
7434         * spu-multiarch.c (spu_multiarch_target_info): New.
7435         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7436         <info>: New.
7437         * target-delegates.c: Regenerate.
7438         * target.c: Include <unordered_map>.
7439         (target_ops_p): Delete.
7440         (DEF_VEC_P(target_ops_p)): Delete.
7441         (target_factories): New.
7442         (test_target_info): New.
7443         (test_target_ops::info): New.
7444         (open_target): Adjust to use target_factories.
7445         (add_target_with_completer): Rename to ...
7446         (add_target): ... this.  Change prototype.  Register target_info
7447         and open callback in target_factories.  Register target_info in
7448         command context instead of target_ops.
7449         (add_target): Delete old implementation.
7450         (add_deprecated_target_alias): Change prototype.  Adjust.
7451         (the_native_target): New.
7452         (set_native_target, get_native_target): New.
7453         (find_default_run_target): Use the_native_target.
7454         (find_attach_target, find_run_target): Simplify.
7455         (target_ops::open): Delete.
7456         (dummy_target_info): New.
7457         (dummy_target::shortname, dummy_target::longname)
7458         (dummy_target::doc): Delete.
7459         (dummy_target::info): New.
7460         (debug_target::shortname, debug_target::longname)
7461         (debug_target::doc): Delete.
7462         (debug_target::info): New.
7463         * target.h (struct target_info): New.
7464         (target_ops::~target_ops): Add comment.
7465         (target_ops::info): New.
7466         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7467         longer virtual.  Implement in terms of target_info.
7468         (set_native_target, get_native_target): Declare.
7469         (target_open_ftype): New.
7470         (add_target, add_target_with_completer)
7471         (add_deprecated_target_alias): Change prototype.
7472         (test_target) <shortname, longname, doc>: Delete.
7473         <info>: New.
7474         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7475         add_inf_child_target.
7476         * tracefile-tfile.c (tfile_target_info): New.
7477         (tfile_target) <shortname, longname, doc>: Delete.
7478         <info>: New.
7479         (tfile_target::open): Rename to ...
7480         (tfile_target_open): ... this.
7481         (_initialize_tracefile_tfile): Adjust.
7482         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7483         add_inf_child_target.
7484         * windows-nat.c (_initialize_windows_nat): Use
7485         add_inf_child_target.
7486         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7487         add_inf_child_target.
7488
7489 2018-05-02  Pedro Alves  <palves@redhat.com>
7490
7491         * linux-nat.h (linux_nat_target) <low_new_thread,
7492         low_delete_thread, low_new_fork, low_forget_process,
7493         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7494         New virtual methods.
7495         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7496         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7497         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7498         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7499         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7500         Delete.
7501         * linux-fork.c (delete_fork): Adjust to call low method.
7502         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7503         (linux_nat_new_fork, linux_nat_forget_process_hook)
7504         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7505         (linux_nat_status_is_event):
7506         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7507         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7508         to call low method.
7509         (sigtrap_is_event): Rename to ...
7510         (linux_nat_target::low_status_is_event): ... this.
7511         (linux_nat_set_status_is_event): Delete.
7512         (save_stop_reason, linux_nat_wait_1)
7513         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7514         low methods.
7515         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7516         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7517         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7518         (linux_nat_set_prepare_to_resume): Delete.
7519         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7520         low virtual methods.
7521         * amd64-linux-nat.c: Likewise.
7522         * arm-linux-nat.c: Likewise.
7523         * i386-linux-nat.c: Likewise.
7524         * ia64-linux-nat.c: Likewise.
7525         * mips-linux-nat.c: Likewise.
7526         * ppc-linux-nat.c: Likewise.
7527         * s390-linux-nat.c: Likewise.
7528         * sparc64-linux-nat.c: Likewise.
7529         * x86-linux-nat.c: Likewise.
7530         * x86-linux-nat.h: Include "nat/x86-linux.h".
7531         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7532         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7533         Override methods.
7534
7535 2018-05-02  Pedro Alves  <palves@redhat.com>
7536
7537         * target.h (target_ops)
7538         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7539         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7540         stopped_by_watchpoint, have_continuable_watchpoint,
7541         stopped_data_address, watchpoint_addr_within_range,
7542         can_accel_watchpoint_condition, can_run, thread_alive,
7543         has_all_memory, has_memory, has_stack, has_registers,
7544         has_execution, can_async_p, is_async_p, supports_non_stop,
7545         always_non_stop_p, can_execute_reverse, supports_multi_process,
7546         supports_enable_disable_tracepoint,
7547         supports_disable_randomization, supports_string_tracing,
7548         supports_evaluation_of_breakpoint_conditions,
7549         can_run_breakpoint_commands, filesystem_is_local,
7550         can_download_tracepoint, get_trace_state_variable_value,
7551         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7552         record_is_replaying, record_will_replay,
7553         augmented_libraries_svr4_read>: Adjust to return bool.
7554         * aarch64-linux-nat.c: All implementations adjusted.
7555         * aix-thread.c: All implementations adjusted.
7556         * arm-linux-nat.c: All implementations adjusted.
7557         * breakpoint.c: All implementations adjusted.
7558         * bsd-kvm.c: All implementations adjusted.
7559         * bsd-uthread.c: All implementations adjusted.
7560         * corelow.c: All implementations adjusted.
7561         * ctf.c: All implementations adjusted.
7562         * darwin-nat.c: All implementations adjusted.
7563         * darwin-nat.h: All implementations adjusted.
7564         * exec.c: All implementations adjusted.
7565         * fbsd-nat.c: All implementations adjusted.
7566         * fbsd-nat.h: All implementations adjusted.
7567         * gnu-nat.c: All implementations adjusted.
7568         * gnu-nat.h: All implementations adjusted.
7569         * go32-nat.c: All implementations adjusted.
7570         * ia64-linux-nat.c: All implementations adjusted.
7571         * inf-child.c: All implementations adjusted.
7572         * inf-child.h: All implementations adjusted.
7573         * inf-ptrace.c: All implementations adjusted.
7574         * inf-ptrace.h: All implementations adjusted.
7575         * linux-nat.c: All implementations adjusted.
7576         * linux-nat.h: All implementations adjusted.
7577         * mips-linux-nat.c: All implementations adjusted.
7578         * nto-procfs.c: All implementations adjusted.
7579         * ppc-linux-nat.c: All implementations adjusted.
7580         * procfs.c: All implementations adjusted.
7581         * ravenscar-thread.c: All implementations adjusted.
7582         * record-btrace.c: All implementations adjusted.
7583         * record-full.c: All implementations adjusted.
7584         * remote-sim.c: All implementations adjusted.
7585         * remote.c: All implementations adjusted.
7586         * s390-linux-nat.c: All implementations adjusted.
7587         * sol-thread.c: All implementations adjusted.
7588         * spu-multiarch.c: All implementations adjusted.
7589         * target-delegates.c: All implementations adjusted.
7590         * target.c: All implementations adjusted.
7591         * target.h: All implementations adjusted.
7592         * tracefile-tfile.c: All implementations adjusted.
7593         * tracefile.c: All implementations adjusted.
7594         * tracefile.h: All implementations adjusted.
7595         * windows-nat.c: All implementations adjusted.
7596         * x86-linux-nat.h: All implementations adjusted.
7597         * x86-nat.h: All implementations adjusted.
7598
7599 2018-05-02  Pedro Alves  <palves@redhat.com>
7600
7601         * make-target-delegates (scan_target_h): Don't trim lines here.
7602         Replace sequences of tabs and/or whitespace with a single
7603         whitespace.
7604         (top level, parsing methods): Trim each line before processing it
7605         here.
7606
7607 2018-05-02  Pedro Alves  <palves@redhat.com>
7608             John Baldwin  <jhb@freebsd.org>
7609
7610         * target.h (enum strata) <debug_stratum>: New.
7611         (struct target_ops) <all delegation methods>: Replace by C++
7612         virtual methods, and drop "to_" prefix.  All references updated
7613         throughout.
7614         <to_shortname, to_longname, to_doc, to_data,
7615         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7616         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7617         virtual methods.  All references updated throughout.
7618         <can_attach, supports_terminal_ours, can_create_inferior,
7619         get_thread_control_capabilities, attach_no_wait>: New
7620         virtual methods.
7621         <insert_breakpoint, remove_breakpoint>: Now
7622         TARGET_DEFAULT_NORETURN methods.
7623         <info_proc>: Now returns bool.
7624         <to_magic>: Delete.
7625         (OPS_MAGIC): Delete.
7626         (current_target): Delete.  All references replaced by references
7627         to ...
7628         (target_stack): ... this.  New.
7629         (target_shortname, target_longname): Adjust.
7630         (target_can_run): Now a function declaration.
7631         (default_child_has_all_memory, default_child_has_memory)
7632         (default_child_has_stack, default_child_has_registers)
7633         (default_child_has_execution): Remove target_ops parameter.
7634         (complete_target_initialization): Delete.
7635         (memory_breakpoint_target): New template class.
7636         (test_target_ops): Refactor as a C++ class with virtual methods.
7637         * make-target-delegates (NAME_PART): Tighten.
7638         (POINTER_PART, CP_SYMBOL): New.
7639         (SIMPLE_RETURN_PART): Reimplement.
7640         (VEC_RETURN_PART): Expect less.
7641         (RETURN_PART, VIRTUAL_PART): New.
7642         (METHOD): Adjust to C++ virtual methods.
7643         (scan_target_h): Remove reference to C99.
7644         (dname): Output "target_ops::" prefix.
7645         (write_function_header): Adjust to output a C++ class method.
7646         (write_declaration): New.
7647         (write_delegator): Adjust to output a C++ class method.
7648         (tdname): Output "dummy_target::" prefix.
7649         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7650         method.
7651         (tdefault_names, debug_names): Delete.
7652         (return_types, tdefaults, styles, argtypes_array): New.
7653         (top level): All methods are delegators.
7654         (print_class): New.
7655         (top level): Print dummy_target and debug_target classes.
7656         * target-delegates.c: Regenerate.
7657         * target-debug.h (target_debug_print_enum_info_proc_what)
7658         (target_debug_print_thread_control_capabilities)
7659         (target_debug_print_thread_info_p): New.
7660         * target.c (dummy_target): Delete.
7661         (the_dummy_target, the_debug_target): New.
7662         (target_stack): Now extern.
7663         (set_targetdebug): Push/unpush debug target.
7664         (default_child_has_all_memory, default_child_has_memory)
7665         (default_child_has_stack, default_child_has_registers)
7666         (default_child_has_execution): Remove target_ops parameter.
7667         (complete_target_initialization): Delete.
7668         (add_target_with_completer): No longer call
7669         complete_target_initialization.
7670         (target_supports_terminal_ours): Use regular delegation.
7671         (update_current_target): Delete.
7672         (push_target): No longer check magic number.  Don't call
7673         update_current_target.
7674         (unpush_target): Don't call update_current_target.
7675         (target_is_pushed): No longer check magic number.
7676         (target_require_runnable): Skip for all stratums over
7677         process_stratum.
7678         (target_ops::info_proc): New.
7679         (target_info_proc): Use find_target_at and
7680         find_default_run_target.
7681         (target_supports_disable_randomization): Use regular delegation.
7682         (target_get_osdata): Use find_target_at.
7683         (target_ops::open, target_ops::close, target_ops::can_attach)
7684         (target_ops::attach, target_ops::can_create_inferior)
7685         (target_ops::create_inferior, target_ops::can_run)
7686         (target_can_run): New.
7687         (default_fileio_target): Use regular delegation.
7688         (target_ops::fileio_open, target_ops::fileio_pwrite)
7689         (target_ops::fileio_pread, target_ops::fileio_fstat)
7690         (target_ops::fileio_close, target_ops::fileio_unlink)
7691         (target_ops::fileio_readlink): New.
7692         (target_fileio_open_1, target_fileio_unlink)
7693         (target_fileio_readlink): Always call the target method.  Handle
7694         FILEIO_ENOSYS.
7695         (return_zero, return_zero_has_execution): Delete.
7696         (init_dummy_target): Delete.
7697         (dummy_target::dummy_target, dummy_target::shortname)
7698         (dummy_target::longname, dummy_target::doc)
7699         (debug_target::debug_target, debug_target::shortname)
7700         (debug_target::longname, debug_target::doc): New.
7701         (target_supports_delete_record): Use regular delegation.
7702         (setup_target_debug): Delete.
7703         (maintenance_print_target_stack): Skip debug_stratum.
7704         (initialize_targets): Instantiate the_dummy_target and
7705         the_debug_target.
7706         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7707         use target_stack.
7708         (target_auxv_search, fprint_target_auxv): Adjust.
7709         (info_auxv_command): Adjust to use target_stack.
7710         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7711         * exceptions.c (print_flush): Handle a NULL target_stack.
7712         * regcache.c (target_ops_no_register): Refactor as class with
7713         virtual methods.
7714
7715         * exec.c (exec_target): New class.
7716         (exec_ops): Now an exec_target.
7717         (exec_open, exec_close_1, exec_get_section_table)
7718         (exec_xfer_partial, exec_files_info, exec_has_memory)
7719         (exec_make_note_section): Refactor as exec_target methods.
7720         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7721         Delete.
7722         (exec_target::find_memory_regions): New.
7723         (_initialize_exec): Don't call init_exec_ops.
7724         * gdbcore.h (exec_file_clear): Delete.
7725
7726         * corefile.c (core_target): Delete.
7727         (core_file_command): Adjust.
7728         * corelow.c (core_target): New class.
7729         (the_core_target): New.
7730         (core_close): Remove target_ops parameter.
7731         (core_close_cleanup): Adjust.
7732         (core_target::close): New.
7733         (core_open, core_detach, get_core_registers, core_files_info)
7734         (core_xfer_partial, core_thread_alive, core_read_description)
7735         (core_pid_to_str, core_thread_name, core_has_memory)
7736         (core_has_stack, core_has_registers, core_info_proc): Rework as
7737         core_target methods.
7738         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7739         (_initialize_corelow): Initialize the_core_target.
7740         * gdbcore.h (core_target): Delete.
7741         (the_core_target): New.
7742
7743         * ctf.c: (ctf_target): New class.
7744         (ctf_ops): Now a ctf_target.
7745         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7746         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7747         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7748         methods.
7749         (init_ctf_ops): Delete.
7750         (_initialize_ctf): Don't call it.
7751         * tracefile-tfile.c (tfile_target): New class.
7752         (tfile_ops): Now a tfile_target.
7753         (tfile_open, tfile_close, tfile_files_info)
7754         (tfile_get_tracepoint_status, tfile_trace_find)
7755         (tfile_fetch_registers, tfile_xfer_partial)
7756         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7757         Refactor as tfile_target methods.
7758         (tfile_xfer_partial_features): Remove target_ops parameter.
7759         (init_tfile_ops): Delete.
7760         (_initialize_tracefile_tfile): Don't call it.
7761         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7762         (tracefile_has_stack, tracefile_has_registers)
7763         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7764         tracefile_target methods.
7765         (init_tracefile_ops): Delete.
7766         (tracefile_target::tracefile_target): New.
7767         * tracefile.h: Include "target.h".
7768         (tracefile_target): New class.
7769         (init_tracefile_ops): Delete.
7770
7771         * spu-multiarch.c (spu_multiarch_target): New class.
7772         (spu_ops): Now a spu_multiarch_target.
7773         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7774         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7775         (spu_search_memory, spu_mourn_inferior): Refactor as
7776         spu_multiarch_target methods.
7777         (init_spu_ops): Delete.
7778         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7779         complete_target_initialization.
7780
7781         * ravenscar-thread.c (ravenscar_thread_target): New class.
7782         (ravenscar_ops): Now a ravenscar_thread_target.
7783         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7784         (ravenscar_thread_alive, ravenscar_pid_to_str)
7785         (ravenscar_fetch_registers, ravenscar_store_registers)
7786         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7787         (ravenscar_stopped_by_hw_breakpoint)
7788         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7789         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7790         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7791         methods.
7792         (init_ravenscar_thread_ops): Delete.
7793         (_initialize_ravenscar): Remove references to
7794         init_ravenscar_thread_ops and complete_target_initialization.
7795
7796         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7797         (bsd_uthread_target): New class.
7798         (bsd_uthread_ops): Now a bsd_uthread_target.
7799         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7800         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7801         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7802         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7803         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7804         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7805         (bsd_uthread_target): Delete function.
7806         (_initialize_bsd_uthread): Remove reference to
7807         complete_target_initialization.
7808
7809         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7810         (target_bfd): ... this new class.
7811         (target_bfd_xfer_partial, target_bfd_get_section_table)
7812         (target_bfd_close): Refactor as target_bfd methods.
7813         (target_bfd::~target_bfd): New.
7814         (target_bfd_reopen): Adjust.
7815         (target_bfd::close): New.
7816
7817         * record-btrace.c (record_btrace_target): New class.
7818         (record_btrace_ops): Now a record_btrace_target.
7819         (record_btrace_open, record_btrace_stop_recording)
7820         (record_btrace_disconnect, record_btrace_close)
7821         (record_btrace_async, record_btrace_info)
7822         (record_btrace_insn_history, record_btrace_insn_history_range)
7823         (record_btrace_insn_history_from, record_btrace_call_history)
7824         (record_btrace_call_history_range)
7825         (record_btrace_call_history_from, record_btrace_record_method)
7826         (record_btrace_is_replaying, record_btrace_will_replay)
7827         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7828         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7829         (record_btrace_store_registers, record_btrace_prepare_to_store)
7830         (record_btrace_to_get_unwinder)
7831         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7832         (record_btrace_commit_resume, record_btrace_wait)
7833         (record_btrace_stop, record_btrace_can_execute_reverse)
7834         (record_btrace_stopped_by_sw_breakpoint)
7835         (record_btrace_supports_stopped_by_sw_breakpoint)
7836         (record_btrace_stopped_by_hw_breakpoint)
7837         (record_btrace_supports_stopped_by_hw_breakpoint)
7838         (record_btrace_update_thread_list, record_btrace_thread_alive)
7839         (record_btrace_goto_begin, record_btrace_goto_end)
7840         (record_btrace_goto, record_btrace_stop_replaying_all)
7841         (record_btrace_execution_direction)
7842         (record_btrace_prepare_to_generate_core)
7843         (record_btrace_done_generating_core): Refactor as
7844         record_btrace_target methods.
7845         (init_record_btrace_ops): Delete.
7846         (_initialize_record_btrace): Remove reference to
7847         init_record_btrace_ops.
7848         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7849         the execution_direction global.
7850         (record_full_base_target, record_full_target)
7851         (record_full_core_target): New classes.
7852         (record_full_ops): Now a record_full_target.
7853         (record_full_core_ops): Now a record_full_core_target.
7854         (record_full_target::detach, record_full_target::disconnect)
7855         (record_full_core_target::disconnect)
7856         (record_full_target::mourn_inferior, record_full_target::kill):
7857         New.
7858         (record_full_open, record_full_close, record_full_async): Refactor
7859         as methods of the record_full_base_target class.
7860         (record_full_resume, record_full_commit_resume): Refactor
7861         as methods of the record_full_target class.
7862         (record_full_wait, record_full_stopped_by_watchpoint)
7863         (record_full_stopped_data_address)
7864         (record_full_stopped_by_sw_breakpoint)
7865         (record_full_supports_stopped_by_sw_breakpoint)
7866         (record_full_stopped_by_hw_breakpoint)
7867         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7868         methods of the record_full_base_target class.
7869         (record_full_store_registers, record_full_xfer_partial)
7870         (record_full_insert_breakpoint, record_full_remove_breakpoint):
7871         Refactor as methods of the record_full_target class.
7872         (record_full_can_execute_reverse, record_full_get_bookmark)
7873         (record_full_goto_bookmark, record_full_execution_direction)
7874         (record_full_record_method, record_full_info, record_full_delete)
7875         (record_full_is_replaying, record_full_will_replay)
7876         (record_full_goto_begin, record_full_goto_end, record_full_goto)
7877         (record_full_stop_replaying): Refactor as methods of the
7878         record_full_base_target class.
7879         (record_full_core_resume, record_full_core_kill)
7880         (record_full_core_fetch_registers)
7881         (record_full_core_prepare_to_store)
7882         (record_full_core_store_registers, record_full_core_xfer_partial)
7883         (record_full_core_insert_breakpoint)
7884         (record_full_core_remove_breakpoint)
7885         (record_full_core_has_execution): Refactor
7886         as methods of the record_full_core_target class.
7887         (record_full_base_target::supports_delete_record): New.
7888         (init_record_full_ops): Delete.
7889         (init_record_full_core_ops): Delete.
7890         (record_full_save): Refactor as method of the
7891         record_full_base_target class.
7892         (_initialize_record_full): Remove references to
7893         init_record_full_ops and init_record_full_core_ops.
7894
7895         * remote.c (remote_target, extended_remote_target): New classes.
7896         (remote_ops): Now a remote_target.
7897         (extended_remote_ops): Now an extended_remote_target.
7898         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7899         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7900         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7901         (remote_pass_signals, remote_set_syscall_catchpoint)
7902         (remote_program_signals, )
7903         (remote_thread_always_alive): Remove target_ops parameter.
7904         (remote_thread_alive, remote_thread_name)
7905         (remote_update_thread_list, remote_threads_extra_info)
7906         (remote_static_tracepoint_marker_at)
7907         (remote_static_tracepoint_markers_by_strid)
7908         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7909         (remote_open): Refactor as methods of remote_target.
7910         (extended_remote_open, extended_remote_detach)
7911         (extended_remote_attach, extended_remote_post_attach):
7912         (extended_remote_supports_disable_randomization)
7913         (extended_remote_create_inferior): : Refactor as method of
7914         extended_remote_target.
7915         (remote_set_permissions, remote_open_1, remote_detach)
7916         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7917         (remote_resume, remote_commit_resume, remote_stop)
7918         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7919         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7920         (remote_prepare_to_store, remote_store_registers)
7921         (remote_flash_erase, remote_flash_done, remote_files_info)
7922         (remote_kill, remote_mourn, remote_insert_breakpoint)
7923         (remote_remove_breakpoint, remote_insert_watchpoint)
7924         (remote_watchpoint_addr_within_range)
7925         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7926         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7927         (remote_supports_stopped_by_sw_breakpoint)
7928         (remote_stopped_by_hw_breakpoint)
7929         (remote_supports_stopped_by_hw_breakpoint)
7930         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7931         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7932         (remote_verify_memory): Refactor as methods of remote_target.
7933         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7934         parameter.
7935         (remote_xfer_partial, remote_get_memory_xfer_limit)
7936         (remote_search_memory, remote_rcmd, remote_memory_map)
7937         (remote_pid_to_str, remote_get_thread_local_address)
7938         (remote_get_tib_address, remote_read_description): Refactor as
7939         methods of remote_target.
7940         (remote_target::fileio_open, remote_target::fileio_pwrite)
7941         (remote_target::fileio_pread, remote_target::fileio_close): New.
7942         (remote_hostio_readlink, remote_hostio_fstat)
7943         (remote_filesystem_is_local, remote_can_execute_reverse)
7944         (remote_supports_non_stop, remote_supports_disable_randomization)
7945         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7946         (remote_supports_enable_disable_tracepoint)
7947         (remote_supports_string_tracing)
7948         (remote_can_run_breakpoint_commands, remote_trace_init)
7949         (remote_download_tracepoint, remote_can_download_tracepoint)
7950         (remote_download_trace_state_variable, remote_enable_tracepoint)
7951         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7952         (remote_trace_start, remote_get_trace_status)
7953         (remote_get_tracepoint_status, remote_trace_stop)
7954         (remote_trace_find, remote_get_trace_state_variable_value)
7955         (remote_save_trace_data, remote_get_raw_trace_data)
7956         (remote_set_disconnected_tracing, remote_core_of_thread)
7957         (remote_set_circular_trace_buffer, remote_traceframe_info)
7958         (remote_get_min_fast_tracepoint_insn_len)
7959         (remote_set_trace_buffer_size, remote_set_trace_notes)
7960         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7961         (remote_disable_btrace, remote_teardown_btrace)
7962         (remote_read_btrace, remote_btrace_conf)
7963         (remote_augmented_libraries_svr4_read, remote_load)
7964         (remote_pid_to_exec_file, remote_can_do_single_step)
7965         (remote_execution_direction, remote_thread_handle_to_thread_info):
7966         Refactor as methods of remote_target.
7967         (init_remote_ops, init_extended_remote_ops): Delete.
7968         (remote_can_async_p, remote_is_async_p, remote_async)
7969         (remote_thread_events, remote_upload_tracepoints)
7970         (remote_upload_trace_state_variables): Refactor as methods of
7971         remote_target.
7972         (_initialize_remote): Remove references to init_remote_ops and
7973         init_extended_remote_ops.
7974
7975         * remote-sim.c (gdbsim_target): New class.
7976         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7977         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7978         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7979         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7980         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7981         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7982         Refactor as methods of gdbsim_target.
7983         (gdbsim_ops): Now a gdbsim_target.
7984         (init_gdbsim_ops): Delete.
7985         (gdbsim_cntrl_c): Adjust.
7986         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7987
7988         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7989         (the_amd64_linux_nat_target): New.
7990         (amd64_linux_fetch_inferior_registers)
7991         (amd64_linux_store_inferior_registers): Refactor as methods of
7992         amd64_linux_nat_target.
7993         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7994         * i386-linux-nat.c: Don't include "linux-nat.h".
7995         (i386_linux_nat_target): New class.
7996         (the_i386_linux_nat_target): New.
7997         (i386_linux_fetch_inferior_registers)
7998         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7999         as methods of i386_linux_nat_target.
8000         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8001         * inf-child.c (inf_child_ops): Delete.
8002         (inf_child_fetch_inferior_registers)
8003         (inf_child_store_inferior_registers): Delete.
8004         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8005         methods of inf_child_target.
8006         (inf_child_target::supports_terminal_ours)
8007         (inf_child_target::terminal_init)
8008         (inf_child_target::terminal_inferior)
8009         (inf_child_target::terminal_ours_for_output)
8010         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8011         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8012         New.
8013         (inf_child_open, inf_child_disconnect, inf_child_close)
8014         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8015         (inf_child_post_startup_inferior, inf_child_can_run)
8016         (inf_child_pid_to_exec_file): Refactor as methods of
8017         inf_child_target.
8018         (inf_child_follow_fork): Delete.
8019         (inf_child_target::can_create_inferior)
8020         (inf_child_target::can_attach): New.
8021         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8022         (inf_child_target::has_stack, inf_child_target::has_registers)
8023         (inf_child_target::has_execution): New.
8024         (inf_child_fileio_open, inf_child_fileio_pwrite)
8025         (inf_child_fileio_pread, inf_child_fileio_fstat)
8026         (inf_child_fileio_close, inf_child_fileio_unlink)
8027         (inf_child_fileio_readlink, inf_child_use_agent)
8028         (inf_child_can_use_agent): Refactor as methods of
8029         inf_child_target.
8030         (return_zero, inf_child_target): Delete.
8031         (inf_child_target::inf_child_target): New.
8032         * inf-child.h: Include "target.h".
8033         (inf_child_target): Delete function prototype.
8034         (inf_child_target): New class.
8035         (inf_child_open_target, inf_child_mourn_inferior)
8036         (inf_child_maybe_unpush_target): Delete.
8037         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8038         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8039         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8040         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8041         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8042         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8043         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8044         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8045         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8046         methods of inf_ptrace_target.
8047         (inf_ptrace_target): Delete function.
8048         * inf-ptrace.h: Include "inf-child.h".
8049         (inf_ptrace_target): Delete function declaration.
8050         (inf_ptrace_target): New class.
8051         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8052         * linux-nat.c (linux_target): New.
8053         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8054         (linux_nat_target::~linux_nat_target): New.
8055         (linux_child_post_attach, linux_child_post_startup_inferior)
8056         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8057         (linux_child_remove_fork_catchpoint)
8058         (linux_child_insert_vfork_catchpoint)
8059         (linux_child_remove_vfork_catchpoint)
8060         (linux_child_insert_exec_catchpoint)
8061         (linux_child_remove_exec_catchpoint)
8062         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8063         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8064         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8065         (linux_nat_stopped_data_address)
8066         (linux_nat_stopped_by_sw_breakpoint)
8067         (linux_nat_supports_stopped_by_sw_breakpoint)
8068         (linux_nat_stopped_by_hw_breakpoint)
8069         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8070         (linux_nat_kill, linux_nat_mourn_inferior)
8071         (linux_nat_xfer_partial, linux_nat_thread_alive)
8072         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8073         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8074         (linux_child_static_tracepoint_markers_by_strid)
8075         (linux_nat_is_async_p, linux_nat_can_async_p)
8076         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8077         (linux_nat_supports_multi_process)
8078         (linux_nat_supports_disable_randomization, linux_nat_async)
8079         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8080         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8081         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8082         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8083         methods of linux_nat_target.
8084         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8085         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8086         parameter.
8087         (check_stopped_by_watchpoint): Adjust.
8088         (linux_xfer_partial): Delete.
8089         (linux_target_install_ops, linux_target, linux_nat_add_target):
8090         Delete.
8091         (linux_nat_target::linux_nat_target): New.
8092         * linux-nat.h: Include "inf-ptrace.h".
8093         (linux_nat_target): New.
8094         (linux_target, linux_target_install_ops, linux_nat_add_target):
8095         Delete function declarations.
8096         (linux_target): Declare global.
8097         * linux-thread-db.c (thread_db_target): New.
8098         (thread_db_target::thread_db_target): New.
8099         (thread_db_ops): Delete.
8100         (the_thread_db_target): New.
8101         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8102         (thread_db_update_thread_list, thread_db_pid_to_str)
8103         (thread_db_extra_thread_info)
8104         (thread_db_thread_handle_to_thread_info)
8105         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8106         (thread_db_resume): Refactor as methods of thread_db_target.
8107         (init_thread_db_ops): Delete.
8108         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8109         * x86-linux-nat.c: Don't include "linux-nat.h".
8110         (super_post_startup_inferior): Delete.
8111         (x86_linux_nat_target::~x86_linux_nat_target): New.
8112         (x86_linux_child_post_startup_inferior)
8113         (x86_linux_read_description, x86_linux_enable_btrace)
8114         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8115         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8116         methods of x86_linux_nat_target.
8117         (x86_linux_create_target): Delete.  Bits folded ...
8118         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8119         pointer.
8120         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8121         (x86_linux_nat_target): New class.
8122         (x86_linux_create_target): Delete.
8123         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8124         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8125         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8126         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8127         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8128         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8129         make extern.
8130         (x86_use_watchpoints): Delete.
8131         * x86-nat.h: Include "breakpoint.h" and "target.h".
8132         (x86_use_watchpoints): Delete.
8133         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8134         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8135         (x86_insert_watchpoint, x86_remove_watchpoint)
8136         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8137         (x86_stopped_by_hw_breakpoint): New declarations.
8138         (x86_nat_target): New template class.
8139
8140         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8141         (the_ppc_linux_nat_target): New.
8142         (ppc_linux_fetch_inferior_registers)
8143         (ppc_linux_can_use_hw_breakpoint)
8144         (ppc_linux_region_ok_for_hw_watchpoint)
8145         (ppc_linux_ranged_break_num_registers)
8146         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8147         (ppc_linux_insert_mask_watchpoint)
8148         (ppc_linux_remove_mask_watchpoint)
8149         (ppc_linux_can_accel_watchpoint_condition)
8150         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8151         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8152         (ppc_linux_watchpoint_addr_within_range)
8153         (ppc_linux_masked_watch_num_registers)
8154         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8155         (ppc_linux_read_description): Refactor as methods of
8156         ppc_linux_nat_target.
8157         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8158
8159         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8160         (procfs_target): New class.
8161         (the_procfs_target): New.
8162         (procfs_target): Delete function.
8163         (procfs_auxv_parse, procfs_attach, procfs_detach)
8164         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8165         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8166         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8167         (procfs_create_inferior, procfs_update_thread_list)
8168         (procfs_thread_alive, procfs_pid_to_str)
8169         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8170         (procfs_stopped_data_address, procfs_insert_watchpoint)
8171         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8172         (proc_find_memory_regions, procfs_info_proc)
8173         (procfs_make_note_section): Refactor as methods of procfs_target.
8174         (_initialize_procfs): Adjust.
8175         * sol-thread.c (sol_thread_target): New class.
8176         (sol_thread_ops): Now a sol_thread_target.
8177         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8178         (sol_thread_fetch_registers, sol_thread_store_registers)
8179         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8180         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8181         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8182         (init_sol_thread_ops): Delete.
8183         (_initialize_sol_thread): Adjust.  Remove references to
8184         init_sol_thread_ops and complete_target_initialization.
8185
8186         * windows-nat.c (windows_nat_target): New class.
8187         (windows_fetch_inferior_registers)
8188         (windows_store_inferior_registers, windows_resume, windows_wait)
8189         (windows_attach, windows_detach, windows_pid_to_exec_file)
8190         (windows_files_info, windows_create_inferior)
8191         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8192         (windows_close, windows_pid_to_str, windows_xfer_partial)
8193         (windows_get_tib_address, windows_get_ada_task_ptid)
8194         (windows_thread_name, windows_thread_alive): Refactor as
8195         windows_nat_target methods.
8196         (do_initial_windows_stuff): Adjust.
8197         (windows_target): Delete function.
8198         (_initialize_windows_nat): Adjust.
8199
8200         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8201         (darwin_mourn_inferior, darwin_kill_inferior)
8202         (darwin_create_inferior, darwin_attach, darwin_detach)
8203         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8204         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8205         (darwin_supports_multi_process): Refactor as darwin_nat_target
8206         methods.
8207         (darwin_resume_to, darwin_files_info): Delete.
8208         (_initialize_darwin_inferior): Rename to ...
8209         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8210         * darwin-nat.h: Include "inf-child.h".
8211         (darwin_nat_target): New class.
8212         (darwin_complete_target): Delete.
8213         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8214         (darwin_target): New.
8215         (i386_darwin_fetch_inferior_registers)
8216         (i386_darwin_store_inferior_registers): Refactor as methods of
8217         darwin_nat_target.
8218         (darwin_complete_target): Delete, with ...
8219         (_initialize_i386_darwin_nat): ... bits factored out here.
8220
8221         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8222         (the_alpha_linux_nat_target): New.
8223         (alpha_linux_register_u_offset): Refactor as
8224         alpha_linux_nat_target method.
8225         (_initialize_alpha_linux_nat): Adjust.
8226         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8227         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8228         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8229         methods of linux_nat_trad_target.
8230         (linux_trad_target): Delete.
8231         * linux-nat-trad.h (linux_trad_target): Delete function.
8232         (linux_nat_trad_target): New class.
8233         * mips-linux-nat.c (mips_linux_nat_target): New class.
8234         (super_fetch_registers, super_store_registers, super_close):
8235         Delete.
8236         (the_mips_linux_nat_target): New.
8237         (mips64_linux_regsets_fetch_registers)
8238         (mips64_linux_regsets_store_registers)
8239         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8240         (mips_linux_register_u_offset, mips_linux_read_description)
8241         (mips_linux_can_use_hw_breakpoint)
8242         (mips_linux_stopped_by_watchpoint)
8243         (mips_linux_stopped_data_address)
8244         (mips_linux_region_ok_for_hw_watchpoint)
8245         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8246         (mips_linux_close): Refactor as methods of mips_linux_nat.
8247         (_initialize_mips_linux_nat): Adjust to C++ification.
8248
8249         * aix-thread.c (aix_thread_target): New class.
8250         (aix_thread_ops): Now an aix_thread_target.
8251         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8252         (aix_thread_fetch_registers, aix_thread_store_registers)
8253         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8254         (aix_thread_thread_alive, aix_thread_pid_to_str)
8255         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8256         Refactor as methods of aix_thread_target.
8257         (init_aix_thread_ops): Delete.
8258         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8259         and complete_target_initialization.
8260         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8261         (rs6000_nat_target): New class.
8262         (the_rs6000_nat_target): New.
8263         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8264         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8265         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8266         (super_create_inferior): Delete.
8267         (_initialize_rs6000_nat): Adjust to C++ification.
8268
8269         * arm-linux-nat.c (arm_linux_nat_target): New class.
8270         (the_arm_linux_nat_target): New.
8271         (arm_linux_fetch_inferior_registers)
8272         (arm_linux_store_inferior_registers, arm_linux_read_description)
8273         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8274         (arm_linux_remove_hw_breakpoint)
8275         (arm_linux_region_ok_for_hw_watchpoint)
8276         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8277         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8278         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8279         arm_linux_nat_target.
8280         (_initialize_arm_linux_nat): Adjust to C++ification.
8281
8282         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8283         (the_aarch64_linux_nat_target): New.
8284         (aarch64_linux_fetch_inferior_registers)
8285         (aarch64_linux_store_inferior_registers)
8286         (aarch64_linux_child_post_startup_inferior)
8287         (aarch64_linux_read_description)
8288         (aarch64_linux_can_use_hw_breakpoint)
8289         (aarch64_linux_insert_hw_breakpoint)
8290         (aarch64_linux_remove_hw_breakpoint)
8291         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8292         (aarch64_linux_region_ok_for_hw_watchpoint)
8293         (aarch64_linux_stopped_data_address)
8294         (aarch64_linux_stopped_by_watchpoint)
8295         (aarch64_linux_watchpoint_addr_within_range)
8296         (aarch64_linux_can_do_single_step): Refactor as methods of
8297         aarch64_linux_nat_target.
8298         (super_post_startup_inferior): Delete.
8299         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8300
8301         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8302         (the_hppa_linux_nat_target): New.
8303         (hppa_linux_fetch_inferior_registers)
8304         (hppa_linux_store_inferior_registers): Refactor as methods of
8305         hppa_linux_nat_target.
8306         (_initialize_hppa_linux_nat): Adjust to C++ification.
8307
8308         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8309         (the_ia64_linux_nat_target): New.
8310         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8311         (ia64_linux_stopped_data_address)
8312         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8313         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8314         ia64_linux_nat_target methods.
8315         (super_xfer_partial): Delete.
8316         (_initialize_ia64_linux_nat): Adjust to C++ification.
8317
8318         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8319         (the_m32r_linux_nat_target): New.
8320         (m32r_linux_fetch_inferior_registers)
8321         (m32r_linux_store_inferior_registers): Refactor as
8322         m32r_linux_nat_target methods.
8323         (_initialize_m32r_linux_nat): Adjust to C++ification.
8324
8325         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8326         (the_m68k_linux_nat_target): New.
8327         (m68k_linux_fetch_inferior_registers)
8328         (m68k_linux_store_inferior_registers): Refactor as
8329         m68k_linux_nat_target methods.
8330         (_initialize_m68k_linux_nat): Adjust to C++ification.
8331
8332         * s390-linux-nat.c (s390_linux_nat_target): New class.
8333         (the_s390_linux_nat_target): New.
8334         (s390_linux_fetch_inferior_registers)
8335         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8336         (s390_insert_watchpoint, s390_remove_watchpoint)
8337         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8338         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8339         (s390_auxv_parse, s390_read_description): Refactor as methods of
8340         s390_linux_nat_target.
8341         (_initialize_s390_nat): Adjust to C++ification.
8342
8343         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8344         (the_sparc_linux_nat_target): New.
8345         (_initialize_sparc_linux_nat): Adjust to C++ification.
8346         * sparc-nat.c (sparc_fetch_inferior_registers)
8347         (sparc_store_inferior_registers): Remove target_ops parameter.
8348         * sparc-nat.h (sparc_fetch_inferior_registers)
8349         (sparc_store_inferior_registers): Remove target_ops parameter.
8350         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8351         (the_sparc64_linux_nat_target): New.
8352         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8353
8354         * spu-linux-nat.c (spu_linux_nat_target): New class.
8355         (the_spu_linux_nat_target): New.
8356         (spu_child_post_startup_inferior, spu_child_post_attach)
8357         (spu_child_wait, spu_fetch_inferior_registers)
8358         (spu_store_inferior_registers, spu_xfer_partial)
8359         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8360         methods.
8361         (_initialize_spu_nat): Adjust to C++ification.
8362
8363         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8364         (the_tilegx_linux_nat_target): New.
8365         (fetch_inferior_registers, store_inferior_registers):
8366         Refactor as methods.
8367         (_initialize_tile_linux_nat): Adjust to C++ification.
8368
8369         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8370         (the_xtensa_linux_nat_target): New.
8371         (xtensa_linux_fetch_inferior_registers)
8372         (xtensa_linux_store_inferior_registers): Refactor as
8373         xtensa_linux_nat_target methods.
8374         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8375
8376         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8377         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8378         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8379         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8380         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8381         (fbsd_stopped_by_sw_breakpoint)
8382         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8383         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8384         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8385         (fbsd_post_startup_inferior, fbsd_post_attach)
8386         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8387         (fbsd_set_syscall_catchpoint)
8388         (super_xfer_partial, super_resume, super_wait)
8389         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8390         (fbsd_handle_debug_trap): Remove target_ops parameter.
8391         (fbsd_nat_add_target): Delete.
8392         * fbsd-nat.h: Include "inf-ptrace.h".
8393         (fbsd_nat_add_target): Delete.
8394         (USE_SIGTRAP_SIGINFO): Define.
8395         (fbsd_nat_target): New class.
8396
8397         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8398         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8399         (amd64bsd_target): Delete.
8400         * amd64-bsd-nat.h: New file.
8401         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8402         "x86-bsd-nat.h".
8403         (amd64_fbsd_nat_target): New class.
8404         (the_amd64_fbsd_nat_target): New.
8405         (amd64fbsd_read_description): Refactor as method of
8406         amd64_fbsd_nat_target.
8407         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8408         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8409         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8410         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8411         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8412         (i386bsd_target): Delete.
8413         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8414         (i386bsd_fetch_inferior_registers)
8415         (i386bsd_store_inferior_registers): Declare.
8416         (i386_bsd_nat_target): New class.
8417         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8418         (the_i386_fbsd_nat_target): New.
8419         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8420         i386_fbsd_nat_target methods.
8421         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8422         (_initialize_i386fbsd_nat): Adjust to C++ification.
8423         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8424         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8425         (_initialize_x86_bsd_nat): Adjust to C++ification.
8426         * x86-bsd-nat.h: Include "x86-nat.h".
8427         (x86bsd_target): Delete declaration.
8428         (x86bsd_nat_target): New class.
8429
8430         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8431         (the_aarch64_fbsd_nat_target): New.
8432         (aarch64_fbsd_fetch_inferior_registers)
8433         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8434         aarch64_fbsd_nat_target.
8435         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8436         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8437         (the_alpha_bsd_nat_target): New.
8438         (alphabsd_fetch_inferior_registers)
8439         (alphabsd_store_inferior_registers): Refactor as
8440         alpha_bsd_nat_target methods.
8441         (_initialize_alphabsd_nat): Refactor as methods of
8442         alpha_bsd_nat_target.
8443         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8444         (the_amd64_nbsd_nat_target): New.
8445         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8446         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8447         (the_amd64_obsd_nat_target): New.
8448         (_initialize_amd64obsd_nat): Adjust to C++ification.
8449         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8450         (the_arm_fbsd_nat_target): New.
8451         (arm_fbsd_fetch_inferior_registers)
8452         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8453         (_initialize_arm_fbsd_nat): Refactor as methods of
8454         arm_fbsd_nat_target.
8455         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8456         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8457         (the_arm_netbsd_nat_target): New.
8458         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8459         arm_netbsd_nat_target.
8460         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8461         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8462         (the_hppa_nbsd_nat_target): New.
8463         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8464         hppa_nbsd_nat_target methods.
8465         (_initialize_hppanbsd_nat): Adjust to C++ification.
8466         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8467         (the_hppa_obsd_nat_target): New.
8468         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8469         methods of hppa_obsd_nat_target.
8470         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8471         add_target.
8472         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8473         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8474         add_target.
8475         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8476         (_initialize_i386obsd_nat): Use add_target.
8477         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8478         (the_m68k_bsd_nat_target): New.
8479         (m68kbsd_fetch_inferior_registers)
8480         (m68kbsd_store_inferior_registers): Refactor as methods of
8481         m68k_bsd_nat_target.
8482         (_initialize_m68kbsd_nat): Adjust to C++ification.
8483         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8484         (the_mips_fbsd_nat_target): New.
8485         (mips_fbsd_fetch_inferior_registers)
8486         (mips_fbsd_store_inferior_registers): Refactor as methods of
8487         mips_fbsd_nat_target.
8488         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8489         add_target.
8490         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8491         (the_mips_nbsd_nat_target): New.
8492         (mipsnbsd_fetch_inferior_registers)
8493         (mipsnbsd_store_inferior_registers): Refactor as methods of
8494         mips_nbsd_nat_target.
8495         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8496         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8497         (the_mips64_obsd_nat_target): New.
8498         (mips64obsd_fetch_inferior_registers)
8499         (mips64obsd_store_inferior_registers): Refactor as methods of
8500         mips64_obsd_nat_target.
8501         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8502         add_target.
8503         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8504         nbsd_nat_target.
8505         * nbsd-nat.h: Include "inf-ptrace.h".
8506         (nbsd_nat_target): New class.
8507         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8508         (obsd_wait): Refactor as methods of obsd_nat_target.
8509         (obsd_add_target): Delete.
8510         * obsd-nat.h: Include "inf-ptrace.h".
8511         (obsd_nat_target): New class.
8512         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8513         (the_ppc_fbsd_nat_target): New.
8514         (ppcfbsd_fetch_inferior_registers)
8515         (ppcfbsd_store_inferior_registers): Refactor as methods of
8516         ppc_fbsd_nat_target.
8517         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8518         add_target.
8519         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8520         (the_ppc_nbsd_nat_target): New.
8521         (ppcnbsd_fetch_inferior_registers)
8522         (ppcnbsd_store_inferior_registers): Refactor as methods of
8523         ppc_nbsd_nat_target.
8524         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8525         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8526         (the_ppc_obsd_nat_target): New.
8527         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8528         methods of ppc_obsd_nat_target.
8529         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8530         add_target.
8531         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8532         (the_sh_nbsd_nat_target): New.
8533         (shnbsd_fetch_inferior_registers)
8534         (shnbsd_store_inferior_registers): Refactor as methods of
8535         sh_nbsd_nat_target.
8536         (_initialize_shnbsd_nat): Adjust to C++ification.
8537         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8538         (inf_ptrace_xfer_partial): Delete.
8539         (sparc_xfer_partial, sparc_target): Delete.
8540         * sparc-nat.h (sparc_fetch_inferior_registers)
8541         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8542         (sparc_target): Delete function declaration.
8543         (sparc_target): New template class.
8544         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8545         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8546         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8547         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8548         add_target.
8549         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8550         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8551         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8552         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8553         add_target.
8554         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8555         (the_vax_bsd_nat_target): New.
8556         (vaxbsd_fetch_inferior_registers)
8557         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8558         methods.
8559         (_initialize_vaxbsd_nat): Adjust to C++ification.
8560
8561         * bsd-kvm.c (bsd_kvm_target): New class.
8562         (bsd_kvm_ops): Now a bsd_kvm_target.
8563         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8564         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8565         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8566         bsd_kvm_target.
8567         (bsd_kvm_return_one): Delete.
8568         (bsd_kvm_add_target): Adjust to C++ification.
8569
8570         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8571         (nto_procfs_target_procfs): New classes.
8572         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8573         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8574         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8575         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8576         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8577         (procfs_remove_hw_breakpoint, procfs_resume)
8578         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8579         (procfs_kill_inferior, procfs_store_registers)
8580         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8581         as methods of nto_procfs_target.
8582         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8583         (nto_native_ops): Delete.
8584         (procfs_open, procfs_native_open): Delete.
8585         (nto_native_ops): Now an nto_procfs_target_native.
8586         (init_procfs_targets): Adjust to C++ification.
8587         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8588         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8589         Refactor as methods of nto_procfs_target.
8590
8591         * go32-nat.c (go32_nat_target): New class.
8592         (the_go32_nat_target): New.
8593         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8594         (go32_store_registers, go32_xfer_partial, go32_files_info)
8595         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8596         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8597         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8598         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8599         (go32_target): Delete.
8600         (_initialize_go32_nat): Adjust to C++ification.
8601
8602         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8603         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8604         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8605         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8606         gnu_nat_target.
8607         (gnu_target): Delete.
8608         * gnu-nat.h (gnu_target): Delete.
8609         (gnu_nat_target): New class.
8610         * i386-gnu-nat.c (gnu_base_target): New.
8611         (i386_gnu_nat_target): New class.
8612         (the_i386_gnu_nat_target): New.
8613         (_initialize_i386gnu_nat): Adjust to C++ification.
8614
8615 2018-05-02  Pedro Alves  <palves@redhat.com>
8616
8617         * bfd-target.c (target_bfd_xclose): Rename to ...
8618         (target_bfd_close): ... this.
8619         (target_bfd_reopen): Adjust.
8620         * target.c (target_close): Remove references to to_xclose.
8621         * target.h (target_ops::to_xclose): Delete.
8622         (target_ops::to_close): Update comments.
8623
8624 2018-05-02  Pedro Alves  <palves@redhat.com>
8625
8626         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8627         "linux-nat.h".
8628         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8629         * inf-ptrace.c (inf_ptrace_register_u_offset)
8630         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8631         (inf_ptrace_store_register, inf_ptrace_store_registers)
8632         (inf_ptrace_trad_target): Move to ...
8633         * linux-nat-trad.c: ... this new file.
8634         * linux-nat-trad.h: New file.
8635         * linux-nat.c (linux_target_install_ops): Make extern.
8636         (linux_trad_target): Delete.
8637         * linux-nat.h (linux_trad_target): Delete declaration.
8638         (linux_target_install_ops): Declare.
8639         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8640         "linux-nat.h".
8641
8642 2018-05-02  Pedro Alves  <palves@redhat.com>
8643
8644         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8645         procfs_target/add_target here.
8646         * procfs.c (procfs_target): Make static.
8647         (_initialize_procfs): Call add_target here.
8648         * procfs.h (struct target_ops): Remove forward declaration.
8649         (procfs_target): Remove declaration.
8650         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8651
8652 2018-05-02  Pedro Alves  <palves@redhat.com>
8653
8654         * procfs.c (procfs_stopped_by_watchpoint)
8655         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8656         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8657         Forward declare.
8658         (procfs_use_watchpoints): Delete, move contents...
8659         (procfs_target): ... here.
8660         * procfs.h (procfs_use_watchpoints): Delete declaration.
8661         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8662         procfs_use_watchpoints.
8663         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8664         procfs_use_watchpoints.
8665
8666 2018-05-02  Tom Tromey  <tom@tromey.com>
8667
8668         PR python/20084:
8669         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8670         and var_zuinteger_unlimited.
8671         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8672         and PARAM_ZUINTEGER_UNLIMITED.
8673         (set_parameter_value): Handle var_zuinteger and
8674         var_zuinteger_unlimited.
8675         (add_setshow_generic): Likewise.
8676         (parmpy_init): Likewise.
8677
8678 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8679
8680         PR rust/23124
8681         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8682         pointer is not null before dereferencing it.
8683
8684 2018-04-30  Tom Tromey  <tom@tromey.com>
8685
8686         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8687         is_mi_like_p.
8688
8689 2018-04-30  Tom Tromey  <tom@tromey.com>
8690
8691         * breakpoint.c (mention): Remove use of is_mi_like_p.
8692         (print_mention_ranged_breakpoint): Likewise.
8693         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8694         of is_mi_like_p.
8695
8696 2018-04-30  Tom Tromey  <tom@tromey.com>
8697
8698         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8699
8700 2018-04-30  Tom Tromey  <tom@tromey.com>
8701
8702         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8703         (info_spu_event_command): Remove some uses of is_mi_like_p.
8704
8705 2018-04-30  Tom Tromey  <tom@tromey.com>
8706
8707         * python/py-framefilter.c (py_print_single_arg)
8708         (enumerate_locals, py_print_args, py_print_frame): Remove some
8709         uses of is_mi_like_p.
8710
8711 2018-04-30  Tom Tromey  <tom@tromey.com>
8712
8713         * ui-out.c: Update.
8714         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8715         * ui-out.h (ui_out::is_mi_like_p): Now const.
8716         (ui_out::do_is_mi_like_p): Now const.
8717         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8718
8719 2018-04-30  Tom Tromey  <tom@tromey.com>
8720
8721         * varobj.c (varobj_set_visualizer): Use new_reference.
8722         * python/python.c (gdbpy_decode_line): Use new_reference.
8723         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8724         new_reference.
8725
8726 2018-04-30  Tom Tromey  <tom@tromey.com>
8727
8728         * varobj.c (install_new_value): Use new_reference.
8729         * value.h (value_incref): Return void.  Swap intro comment with
8730         value_decref.
8731         * value.c (set_value_parent): Use new_reference.
8732         (value_incref): Return void.  Update intro comment.
8733         (release_value): Use new_reference.
8734         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8735
8736 2018-04-30  Tom Tromey  <tom@tromey.com>
8737
8738         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8739         * gdb_bfd.h (new_bfd_ref): Remove.
8740         (gdb_bfd_open): Update comment.
8741         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8742         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8743         (gdb_bfd_fdopenr): Use new_reference.
8744         * exec.c (exec_file_attach): Use new_reference.
8745
8746 2018-04-30  Tom Tromey  <tom@tromey.com>
8747
8748         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8749         method.
8750
8751 2018-04-30  Tom Tromey  <tom@tromey.com>
8752
8753         * jit.c (jit_read_code_entry): Use type_align.
8754         * i386-tdep.c (i386_gdbarch_init): Don't call
8755         set_gdbarch_long_long_align_bit.
8756         * gdbarch.sh: Remove long_long_align_bit.
8757         * gdbarch.c, gdbarch.h: Rebuild.
8758         * arc-tdep.c (arc_type_align): New function.
8759         (arc_gdbarch_init): Use arc_type_align.  Don't call
8760         set_gdbarch_long_long_align_bit.
8761
8762 2018-04-30  Tom Tromey  <tom@tromey.com>
8763
8764         * rust-lang.c (rust_type_alignment): Remove.
8765         (rust_composite_type): Use type_align.
8766
8767 2018-04-30  Tom Tromey  <tom@tromey.com>
8768
8769         * NEWS: Mention Type.align.
8770         * python/py-type.c (typy_get_alignof): New function.
8771         (type_object_getset): Add "alignof".
8772
8773 2018-04-30  Tom Tromey  <tom@tromey.com>
8774
8775         PR exp/17095:
8776         * NEWS: Update.
8777         * std-operator.def (UNOP_ALIGNOF): New operator.
8778         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8779         New.
8780         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8781         * c-lang.c (c_op_print_tab): Add alignof.
8782         * c-exp.y (ALIGNOF): New token.
8783         (exp): Add "ALIGNOF" production.
8784         (ident_tokens): Add _Alignof and alignof.
8785
8786 2018-04-30  Tom Tromey  <tom@tromey.com>
8787
8788         * i386-tdep.c (i386_type_align): New function.
8789         (i386_gdbarch_init): Update.
8790         * gdbarch.sh (type_align): New method.
8791         * gdbarch.c, gdbarch.h: Rebuild.
8792         * arch-utils.h (default_type_align): Declare.
8793         * arch-utils.c (default_type_align): New function.
8794         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8795         (struct type) <align_log2>: New field.
8796         <instance_flags>: Now a bitfield.
8797         (TYPE_RAW_ALIGN): New macro.
8798         (type_align, type_raw_align, set_type_align): Declare.
8799         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8800         functions.
8801         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8802         (get_alignment, maybe_set_alignment): New functions.
8803         (read_structure_type, read_enumeration_type, read_array_type)
8804         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8805         (read_subrange_type, read_base_type): Set type alignment.
8806
8807 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8808
8809         * dwarf2read.c (read_index_from_section): Use bool.
8810
8811 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8812
8813         PR gdb/22950
8814         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8815         with #ifdef.
8816
8817 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8818
8819         PR build/22873
8820         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8821         last step, and do it atomically.
8822
8823 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8824
8825         * compile/compile-c-types.c (convert_int, convert_float):
8826         Update for C FE v1.
8827
8828 2018-04-27  Tom Tromey  <tom@tromey.com>
8829
8830         PR rust/22545:
8831         * rust-lang.c (rust_inclusive_range_type_p): New function.
8832         (rust_range): Handle inclusive ranges.
8833         (rust_compute_range): Likewise.
8834         * rust-exp.y (struct rust_op) <inclusive>: New field.
8835         (DOTDOTEQ): New constant.
8836         (range_expr): Add "..=" productions.
8837         (operator_tokens): Add "..=" token.
8838         (ast_range): Add "inclusive" parameter.
8839         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8840         ranges.
8841         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8842         bounds values.
8843         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8844         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8845         Update comments.
8846         * expprint.c (print_subexp_standard): Handle new bounds values.
8847         (dump_subexp_body_standard): Likewise.
8848
8849 2018-04-27  Tom Tromey  <tom@tromey.com>
8850
8851         * configure: Rebuild.
8852         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8853         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8854         "OVERRIDE".
8855         (class symbol_needs_eval_context): Likewise.
8856         * dwarf2read.c (mock_mapped_index::symbol_name_count)
8857         (mock_mapped_index::symbol_name_at): Use "override".  Remove
8858         "virtual".
8859         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8860         "override".
8861         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8862         * aarch64-tdep.c (instruction_reader::read): Use "override".
8863         (instruction_reader_test::read): Likewise.
8864         * arm-tdep.c (instruction_reader::read): Use "override".
8865         (instruction_reader_thumb::read): Likewise.
8866
8867 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
8868
8869         PR remote/9665
8870         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8871         instead of remote_send.
8872         (remote_send): Remove.
8873
8874 2018-04-26  Pedro Alves  <palves@redhat.com>
8875
8876         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8877         find_function_start_sal instead of find_pc_line.
8878
8879 2018-04-26  Pedro Alves  <palves@redhat.com>
8880
8881         * breakpoint.c (set_breakpoint_location_function): Handle
8882         mst_data_gnu_ifunc.
8883         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8884         * elfread.c (elf_symtab_read): Give data symbols with
8885         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8886         (elf_rel_plt_read): Update comment.
8887         * linespec.c (convert_linespec_to_sals): Handle
8888         mst_data_gnu_ifunc.
8889         (minsym_found): Handle mst_data_gnu_ifunc.
8890         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8891         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8892         * parse.c (find_minsym_type_and_address): Handle
8893         mst_data_gnu_ifunc.
8894         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8895         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8896         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8897         comment.
8898         <mst_data_gnu_ifunc>: New enumerator.
8899
8900 2018-04-26  Pedro Alves  <palves@redhat.com>
8901
8902         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8903         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
8904         'want_trampoline' parameter by a lookup_msym_prefer parameter.
8905         Handle it.
8906         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8907         (lookup_minimal_symbol_by_pc): Adjust.
8908         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8909         (lookup_solib_trampoline_symbol_by_pc): Adjust.
8910         * minsyms.h (lookup_msym_prefer): New enum.
8911         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8912         parameter by a lookup_msym_prefer parameter.
8913
8914 2018-04-26  Pedro Alves  <palves@redhat.com>
8915
8916         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8917         ends in "@plt" instead of looking at the symbol's section.
8918
8919 2018-04-26  Pedro Alves  <palves@redhat.com>
8920
8921         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8922         all references.
8923         (find_pc_partial_function_gnu_ifunc): Rename to ...
8924         (find_pc_partial_function): ... this, and remove references to
8925         'is_gnu_ifunc_p'.
8926         (find_pc_partial_function): Delete old implementation.
8927         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8928
8929 2018-04-26  Pedro Alves  <palves@redhat.com>
8930
8931         * linespec.c (struct bound_minimal_symbol_search_key): New.
8932         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8933         skip first line if we found a GNU ifunc minimal symbol by name.
8934         (compare_msymbols): Change parameters to work with a destructured
8935         lhs minsym.
8936         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8937         functions.
8938
8939 2018-04-26  Pedro Alves  <palves@redhat.com>
8940
8941         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8942         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8943         address/name.
8944         (add_location_to_breakpoint): Store the minsym and the objfile in
8945         the breakpoint location.
8946         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8947         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8948         Record the minsym in the sal.
8949         * symtab.h (symtab_and_line) <msymbol>: New field.
8950
8951 2018-04-26  Pedro Alves  <palves@redhat.com>
8952
8953         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8954         unless we actually resolved the ifunc.
8955
8956 2018-04-26  Pedro Alves  <palves@redhat.com>
8957
8958         * c-exp.y (variable production): Prefer ifunc minsyms over
8959         regular function symbols.
8960         * symtab.c (find_gnu_ifunc): New function.
8961         * minsyms.h (lookup_msym_prefer): New enum.
8962         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8963         parameter by a lookup_msym_prefer parameter.
8964         * symtab.h (find_gnu_ifunc): New declaration.
8965
8966 2018-04-26  Pedro Alves  <palves@redhat.com>
8967
8968         * blockframe.c (find_gnu_ifunc_target_type): New function.
8969         (find_function_type): New.
8970         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8971         return a value with a memory address.
8972         (eval_call): For calls to GNU ifunc functions, try to find the
8973         type of the target function from the type that the resolver
8974         returns.
8975         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8976         symbols.
8977         * infcall.c (find_function_return_type): Delete.
8978         (find_function_addr): Add 'function_type' parameter.  For calls to
8979         GNU ifunc functions, try to find the type of the target function
8980         from the type that the resolver returns, and return it via
8981         FUNCTION_TYPE.
8982         (call_function_by_hand_dummy): Adjust to use the function type
8983         returned by find_function_addr.
8984         (find_function_addr): Add 'function_type' parameter and move
8985         description here.
8986         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8987         declarations.
8988
8989 2018-04-26  Pedro Alves  <palves@redhat.com>
8990
8991         * c-exp.y (variable production): Skip finding an alias for ifunc
8992         symbols.
8993
8994 2018-04-26  Pedro Alves  <palves@redhat.com>
8995
8996         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8997
8998 2018-04-25  Pedro Alves  <palves@redhat.com>
8999
9000         * infcmd.c (kill_command): Print the pid as string, not the whole
9001         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9002         message.
9003         * remote.c (remote_detach_1): Print the pid as string, not the
9004         whole thread's ptid.
9005
9006 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9007             Sergio Durigan Junior  <sergiodj@redhat.com>
9008             Pedro Alves  <palves@redhat.com>
9009
9010         * infcmd.c (kill_command): Print message when inferior has
9011         been killed.
9012         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9013         '1'.
9014         (add_inferior): Improve message printed when
9015         'print_inferior_events' is on.
9016         (exit_inferior): Remove message printed when
9017         'print_inferior_events' is on.
9018         (detach_inferior): Improve message printed when
9019         'print_inferior_events' is on.
9020         (initialize_inferiors): Use 'add_inferior_silent' to set
9021         'current_inferior_'.
9022         * inferior.h (print_inferior_events): Declare here as
9023         'extern'.
9024         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9025         '[Detaching...]' messages when 'print_inferior_events' is on.
9026         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9027         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9028         'Detaching after fork from child...', replace it by '... from
9029         parent...'.
9030         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9031         prefix/suffix when printing 'Detaching...' messages.  Print
9032         them when 'print_inferior_events' is on.
9033         * remote.c (remote_detach_1): Print message when detaching
9034         from inferior and '!is_fork_parent'.
9035
9036 2018-04-24  Tom Tromey  <tom@tromey.com>
9037
9038         * cli-out.h: Reindent.
9039
9040 2018-04-24  Tom Tromey  <tom@tromey.com>
9041
9042         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9043         (cli_ui_out::do_field_string): Use fputs_filtered.
9044         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9045
9046 2018-04-23  Tom Tromey  <tom@tromey.com>
9047
9048         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9049         gdb::unique_xmalloc_ptr.
9050
9051 2018-04-23  Tom Tromey  <tom@tromey.com>
9052
9053         * configure: Rebuild.
9054
9055 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9056
9057         PR gdb/23095
9058         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9059         prepare_for_testing.  Set normal_bp to r_debug_state if target
9060         is bsd.
9061
9062 2018-04-21  Pedro Alves  <palves@redhat.com>
9063             Rajendra SY  <rajendra.sy@gmail.com>
9064
9065         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9066         * remote.c (extended_remote_attach): In all-stop mode, mark the
9067         thread as executing.
9068
9069 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9070
9071         * thread.c (thread_apply_all_command): Fix comment.
9072         (thread_command): Fix comment.
9073
9074 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9075
9076         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9077         parameter.
9078         * features/aarch64-core.c (create_feature_aarch64_core):
9079         Regenerate.
9080         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9081         Likewise.
9082         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9083         Likewise.
9084         * features/i386/32bit-avx512.c
9085         (create_feature_i386_32bit_avx512): Likewise.
9086         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9087         Likewise.
9088         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9089         Likewise.
9090         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9091         Likewise.
9092         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9093         Likewise.
9094         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9095         Likewise.
9096         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9097         Likewise.
9098         * features/i386/64bit-avx512.c
9099         (create_feature_i386_64bit_avx512): Likewise.
9100         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9101         Likewise.
9102         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9103         Likewise.
9104         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9105         Likewise.
9106         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9107         Likewise.
9108         * features/i386/64bit-segments.c
9109         (create_feature_i386_64bit_segments): Likewise.
9110         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9111         Likewise.
9112         * features/i386/x32-core.c
9113         (create_feature_i386_x32_core): Likewise.
9114         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9115         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9116         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9117         * target-descriptions.c: In generated code, don't pass xml
9118         filename.
9119
9120 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9121
9122         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9123         (print_xml_feature::visit_post): Likewise.
9124         (print_xml_feature::visit): Likewise.
9125         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9126         (print_xml_feature): Add new class.
9127         * regformats/regdat.sh: Null xmltarget on feature targets.
9128         * target-descriptions.c (struct target_desc): Add xmltarget.
9129         (maintenance_check_tdesc_xml_convert): Add unittest function.
9130         (tdesc_get_features_xml): Add function to get xml.
9131         (maintenance_check_xml_descriptions): Test xml generation.
9132         * xml-tdesc.c (string_read_description_xml): Add function.
9133         * xml-tdesc.h (string_read_description_xml): Add declaration.
9134
9135 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9136
9137         * features/Makefile: Add feature marker to targets with new style
9138         target descriptions.
9139         * regformats/aarch64.dat: Regenerate.
9140         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9141         * regformats/i386/amd64-avx-linux.dat: Likewise.
9142         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9143         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9144         * regformats/i386/amd64-linux.dat: Likewise.
9145         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9146         * regformats/i386/amd64.dat: Likewise.
9147         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9148         * regformats/i386/i386-avx-linux.dat: Likewise.
9149         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9150         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9151         * regformats/i386/i386-linux.dat: Likewise.
9152         * regformats/i386/i386-mmx-linux.dat: Likewise.
9153         * regformats/i386/i386-mpx-linux.dat: Likewise.
9154         * regformats/i386/i386.dat: Likewise.
9155         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9156         * regformats/i386/x32-avx-linux.dat: Likewise.
9157         * regformats/i386/x32-linux.dat: Likewise.
9158         * regformats/tic6x-c62x-linux.dat: Likewise.
9159         * regformats/tic6x-c64x-linux.dat: Likewise.
9160         * regformats/tic6x-c64xp-linux.dat: Likewise.
9161         * regformats/regdat.sh: Parse feature marker.
9162
9163 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9164
9165         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9166         (tdesc_osabi_name): Likewise.
9167         * target-descriptions.c (tdesc_architecture_name): Add new
9168         function.
9169         (tdesc_osabi_name): Likewise.
9170
9171 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9172
9173         * common/tdesc.c (tdesc_predefined_type): Move to here.
9174         (tdesc_named_type): Likewise.
9175         (tdesc_create_vector): Likewise.
9176         (tdesc_create_struct): Likewise.
9177         (tdesc_set_struct_size): Likewise.
9178         (tdesc_create_union): Likewise.
9179         (tdesc_create_flags): Likewise.
9180         (tdesc_create_enum): Likewise.
9181         (tdesc_add_field): Likewise.
9182         (tdesc_add_typed_bitfield): Likewise.
9183         (tdesc_add_bitfield): Likewise.
9184         (tdesc_add_flag): Likewise.
9185         (tdesc_add_enum_value): Likewise.
9186         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9187         (struct tdesc_type_vector): Likewise.
9188         (struct tdesc_type_field): Likewise.
9189         (struct tdesc_type_with_fields): Likewise.
9190         (tdesc_create_enum): Add declaration.
9191         (tdesc_add_typed_bitfield): Likewise.
9192         (tdesc_add_enum_value): Likewise.
9193         * target-descriptions.c (tdesc_type_field): Move from here.
9194         (tdesc_type_builtin): Likewise.
9195         (tdesc_type_vector): Likewise.
9196         (tdesc_type_with_fields): Likewise.
9197         (tdesc_predefined_types): Likewise.
9198         (tdesc_named_type): Likewise.
9199         (tdesc_create_vector): Likewise.
9200         (tdesc_create_struct): Likewise.
9201         (tdesc_set_struct_size): Likewise.
9202         (tdesc_create_union): Likewise.
9203         (tdesc_create_flags): Likewise.
9204         (tdesc_create_enum): Likewise.
9205         (tdesc_add_field): Likewise.
9206         (tdesc_add_typed_bitfield): Likewise.
9207         (tdesc_add_bitfield): Likewise.
9208         (tdesc_add_flag): Likewise.
9209         (tdesc_add_enum_value): Likewise.
9210         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9211         (tdesc_add_typed_bitfield): Likewise.
9212         (tdesc_add_enum_value): Likewise.
9213
9214 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9215
9216         * common/tdesc.c (tdesc_feature::accept): Move to here.
9217         (tdesc_feature::operator==): Likewise.
9218         (tdesc_create_reg): Likewise.
9219         * common/tdesc.h (tdesc_type_kind): Likewise.
9220         (struct tdesc_type): Likewise.
9221         (struct tdesc_feature): Likewise.
9222         * regformats/regdat.sh: Create a feature.
9223         * target-descriptions.c (tdesc_type_kind): Move from here.
9224         (tdesc_type): Likewise.
9225         (tdesc_type_up): Likewise.
9226         (tdesc_feature): Likewise.
9227         (tdesc_create_reg): Likewise.
9228
9229 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9230
9231         * Makefile.in: Add arch/tdesc.c
9232         * common/tdesc.c: New file.
9233         * common/tdesc.h (tdesc_element_visitor): Move to here.
9234         (tdesc_element): Likewise.
9235         (tdesc_reg): Likewise.
9236         (tdesc_reg_up): Likewise.
9237         * regformats/regdef.h (reg): Add offset to constructors.
9238         * target-descriptions.c (tdesc_element_visitor): Move from here.
9239         (tdesc_element): Likewise.
9240         (tdesc_reg): Likewise.
9241         (tdesc_reg_up): Likewise.
9242
9243 2018-04-17  Tom Tromey  <tom@tromey.com>
9244
9245         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9246         discriminant field.
9247
9248 2018-04-17  Tom Tromey  <tom@tromey.com>
9249
9250         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9251
9252 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9253
9254         * symtab.c (print_symbol_info): Skip printing filename and line
9255         number when `last' is NULL.
9256         (symtab_symbol_info): Use empty string instead of NULL for first
9257         invocation of print_symbol_info.
9258         (rbreak_command): Pass NULL to `last' parameter of
9259         print_symbol_info.
9260
9261 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9262
9263         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9264         instead of nullptr.
9265
9266 2018-04-16  Pedro Alves  <palves@redhat.com>
9267
9268         * MAINTAINERS (sh): Remove.
9269         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9270         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9271         (ALLDEPFILES): Remove sh64-tdep.c.
9272         * NEWS: Mentions that support for SH-5/SH64 is removed.
9273         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9274         (sh*-*-openbsd*): Ditto.
9275         (sh64-*-elf*): Remove.
9276         (sh*): Remove.
9277         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9278         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9279         * sh-tdep.c: No longer include "sh64-tdep.h".
9280         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9281         * sh64-tdep.c, sh64-tdep.h: Remove files.
9282
9283 2018-04-16  Pedro Alves  <palves@redhat.com>
9284
9285         * MAINTAINERS: Remove m88k.
9286         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9287         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9288         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9289         * NEWS: Mention that support for m88k was removed.
9290         * configure.host (m88*-*-*): Remove support.
9291         * configure.nat (m88k-*-*): Remove support.
9292         * configure.tgt (m88*-*-openbsd*): Remove.
9293         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9294
9295 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9296
9297         * configure.tgt (x86_tobjs): New variable.
9298         (amd64_tobjs, i386_tobjs): Use it.
9299
9300 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9301
9302         * symtab.c (print_symbol_info): Precede the symbol definition by
9303         the line number when available.
9304         * NEWS: Advertise this enhancement.
9305
9306 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9307
9308         * NEWS (New options): announce set/show record btrace cpu.
9309         * btrace.c: Include record-btrace.h.
9310         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9311         the vendor is unknown.
9312         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9313         Maybe overwrite the btrace configuration's cpu.
9314         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9315         (btrace_fetch): Add cpu parameter.  Update callers.
9316         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9317         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9318         errata workarounds if the vendor is unknown.
9319         * python/py-record-btrace.c: Include record-btrace.h.
9320         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9321         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9322         * record-btrace.c (record_btrace_cpu_state_kind): New.
9323         (record_btrace_cpu): New.
9324         (set_record_btrace_cpu_cmdlist): New.
9325         (record_btrace_get_cpu): New.
9326         (require_btrace_thread, record_btrace_info)
9327         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9328         (cmd_set_record_btrace_cpu_none): New.
9329         (cmd_set_record_btrace_cpu_auto): New.
9330         (cmd_set_record_btrace_cpu): New.
9331         (cmd_show_record_btrace_cpu): New.
9332         (_initialize_record_btrace): Initialize set/show record btrace cpu
9333         commands.
9334         * record-btrace.h (record_btrace_get_cpu): New.
9335
9336 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9337
9338         * record.c (set_record_command): Fix typo in message.
9339
9340 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9341
9342         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9343
9344 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9345
9346         * infrun.c (process_event_stop_test): Call
9347         gdbarch_in_indirect_branch_thunk.
9348         * gdbarch.sh (in_indirect_branch_thunk): New.
9349         * gdbarch.c: Regenerated.
9350         * gdbarch.h: Regenerated.
9351         * x86-tdep.h: New.
9352         * x86-tdep.c: New.
9353         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9354         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9355         (ALLDEPFILES): Add x86-tdep.c.
9356         * arch-utils.h (default_in_indirect_branch_thunk): New.
9357         * arch-utils.c (default_in_indirect_branch_thunk): New.
9358         * i386-tdep: Include x86-tdep.h.
9359         (i386_in_indirect_branch_thunk): New.
9360         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9361         function.
9362         * amd64-tdep: Include x86-tdep.h.
9363         (amd64_in_indirect_branch_thunk): New.
9364         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9365
9366 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9367
9368         PR gdb/23053
9369         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9370         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9371         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9372         regression.
9373
9374 2018-04-12  Tom Tromey  <tom@tromey.com>
9375
9376         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9377         (rust_evaluate_subexp): Likewise.
9378
9379 2018-04-12  Pedro Alves  <palves@redhat.com>
9380
9381         * procfs.c (procfs_detach): Make forward declaration's prototype
9382         match definition's protototype.
9383         (proc_get_LDT_entry): Remove stale do_cleanups call.
9384
9385 2018-04-12  Pedro Alves  <palves@redhat.com>
9386
9387         * target.h (target_ops::to_has_exited): Delete.
9388         (target_has_exited): Delete.
9389         * target-delegates.c: Regenerate.
9390
9391 2018-04-11  Pedro Alves  <palves@redhat.com>
9392
9393         * target.c (fileio_fh_t::t): Add comment.
9394         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9395         (target_fileio_close): Handle a NULL target.
9396         (invalidate_fileio_fh): New.
9397         (target_close): Call it.
9398         * remote.c (remote_hostio_send_command): No longer check whether
9399         remote_desc is open.
9400
9401 2018-04-11  Pedro Alves  <palves@redhat.com>
9402
9403         * target.c (fileio_fh_t): Make it a named struct instead of a
9404         typedef.
9405         (fileio_fh_t::is_closed): New method.
9406         (DEF_VEC_O (fileio_fh_t)): Remove.
9407         (fileio_fhandles): Now a std::vector.
9408         (is_closed_fileio_fh): Delete.
9409         (acquire_fileio_fd): Adjust.  Rename parameters.
9410         (release_fileio_fd): Adjust.
9411         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9412         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9413         (target_fileio_close): Adjust.
9414
9415 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9416
9417         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9418         index.
9419
9420 2018-04-10  Pedro Alves  <palves@redhat.com>
9421
9422         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9423         (scoped_finish_thread_state): New class.
9424         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9425         cleanup.
9426         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9427         (fetch_inferior_event, normal_stop): Likewise.
9428         * thread.c (finish_thread_state_cleanup): Delete.
9429
9430 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9431             Pedro Alves  <palves@redhat.com>
9432
9433         * value.c: Include "selftest.h" and "common/array-view.h".
9434         (struct range) <operator ==>: New.
9435         (test_ranges_contain): New.
9436         (check_ranges_vector): New.
9437         (test_insert_into_bit_range_vector): New.
9438         (_initialize_values): Register selftests.
9439         * common/array-view.h (operator==, operator!=): New.
9440
9441 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9442
9443         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9444         an iterator.
9445         * inline-frame.c: Include <algorithm>.
9446         (struct inline_state): Add constructor.
9447         (inline_state_s): Remove.
9448         (DEF_VEC_O(inline_state_s)): Remove.
9449         (inline_states): Change type to std::vector.
9450         (find_inline_frame_state): Adjust to std::vector.
9451         (allocate_inline_frame_state): Remove.
9452         (clear_inline_frame_state): Adjust to std::vector.
9453         (skip_inline_frames): Adjust to std::vector.
9454
9455 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9456
9457         * tracepoint.h (struct trace_state_variable): Add constructor.
9458         <name>: Change type to std::string.
9459         * tracepoint.c (tsv_s): Remove.
9460         (DEF_VEC_O(tsv_s)): Remove.
9461         (tvariables): Change to std::vector.
9462         (create_trace_state_variable): Adjust to std::vector.
9463         (find_trace_state_variable): Likewise.
9464         (find_trace_state_variable_by_number): Likewise.
9465         (delete_trace_state_variable): Likewise.
9466         (trace_variable_command): Adjust to std::string.
9467         (delete_trace_variable_command): Likewise.
9468         (tvariables_info_1): Adjust to std::vector.
9469         (save_trace_state_variables): Likewise.
9470         (start_tracing): Likewise.
9471         (merge_uploaded_trace_state_variables): Adjust to std::vector
9472         and std::string.
9473         * target.h (struct target_ops)
9474         <to_download_trace_state_variable>: Pass reference to
9475         trace_state_variable.
9476         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9477         * target-delegates.c: Re-generate.
9478         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9479         (mi_tsv_deleted): Likewise.
9480         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9481         * remote.c (remote_download_trace_state_variable): Change
9482         pointer to reference and adjust.
9483         * make-target-delegates (parse_argtypes): Handle references.
9484         (write_function_header): Likewise.
9485         (munge_type): Likewise.
9486
9487 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9488
9489         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9490         string_view-selftests.c.
9491         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9492         testsuite.
9493         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9494         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9495         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9496         * unittests/basic_string_view/element_access/char/1.cc:
9497         Likewise.
9498         * unittests/basic_string_view/element_access/char/empty.cc:
9499         Likewise.
9500         * unittests/basic_string_view/element_access/char/front_back.cc:
9501         Likewise.
9502         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9503         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9504         Likewise.
9505         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9506         Likewise.
9507         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9508         Likewise.
9509         * unittests/basic_string_view/operations/compare/char/1.cc:
9510         Likewise.
9511         * unittests/basic_string_view/operations/compare/char/13650.cc:
9512         Likewise.
9513         * unittests/basic_string_view/operations/copy/char/1.cc:
9514         Likewise.
9515         * unittests/basic_string_view/operations/data/char/1.cc:
9516         Likewise.
9517         * unittests/basic_string_view/operations/find/char/1.cc:
9518         Likewise.
9519         * unittests/basic_string_view/operations/find/char/2.cc:
9520         Likewise.
9521         * unittests/basic_string_view/operations/find/char/3.cc:
9522         Likewise.
9523         * unittests/basic_string_view/operations/find/char/4.cc:
9524         Likewise.
9525         * unittests/basic_string_view/operations/rfind/char/1.cc:
9526         Likewise.
9527         * unittests/basic_string_view/operations/rfind/char/2.cc:
9528         Likewise.
9529         * unittests/basic_string_view/operations/rfind/char/3.cc:
9530         Likewise.
9531         * unittests/basic_string_view/operations/substr/char/1.cc:
9532         Likewise.
9533         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9534         * unittests/string_view-selftests.c: New file.
9535
9536 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9537
9538         * unittests/basic_string_view/capacity/1.cc: New file.
9539         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9540         * unittests/basic_string_view/cons/char/1.cc: New file.
9541         * unittests/basic_string_view/cons/char/2.cc: New file.
9542         * unittests/basic_string_view/cons/char/3.cc: New file.
9543         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9544         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9545         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9546         * unittests/basic_string_view/element_access/char/1.cc: New file.
9547         * unittests/basic_string_view/element_access/char/2.cc: New file.
9548         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9549         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9550         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9551         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9552         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9553         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9554         * unittests/basic_string_view/include.cc: New file.
9555         * unittests/basic_string_view/inserters/char/1.cc: New file.
9556         * unittests/basic_string_view/inserters/char/2.cc: New file.
9557         * unittests/basic_string_view/inserters/char/3.cc: New file.
9558         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9559         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9560         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9561         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9562         * unittests/basic_string_view/literals/types.cc: New file.
9563         * unittests/basic_string_view/literals/values.cc: New file.
9564         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9565         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9566         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9567         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9568         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9569         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9570         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9571         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9572         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9573         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9574         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9575         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9576         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9577         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9578         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9579         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9580         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9581         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9582         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9583         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9584         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9585         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9586         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9587         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9588         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9589         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9590         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9591         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9592         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9593         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9594         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9595         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9596         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9597         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9598         * unittests/basic_string_view/operators/char/2.cc: New file.
9599         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9600         * unittests/basic_string_view/range_access/char/1.cc: New file.
9601         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9602         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9603         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9604         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9605         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9606         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9607         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9608         * unittests/basic_string_view/typedefs.cc: New file.
9609         * unittests/basic_string_view/types/1.cc: New file.
9610
9611 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9612
9613         * common/gdb_string_view.h: Remove libstdc++ implementation
9614         details, adjust to gdb reality.
9615         * common/gdb_string_view.tcc: Likewise.
9616         * cli/cli-script.c (struct string_view): Remove.
9617         (user_args) <m_args>: Change element type to gdb::string_view.
9618         (user_args::insert_args): Adjust.
9619
9620 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9621
9622         * common/gdb_string_view.h: New file.
9623         * common/gdb_string_view.tcc: New file.
9624
9625 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9626
9627         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9628         * configure: Re-generate.
9629
9630 2018-04-09  Pedro Alves  <palves@redhat.com>
9631
9632         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9633         (set_target_gdbarch): Call
9634         gdb::observers::architecture_changed.notify instead of
9635         observer_notify_architecture_changed.
9636
9637 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9638
9639         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9640         (do_restore_current_traceframe_cleanup): Remove.
9641         (restore_current_traceframe_cleanup_dtor): Remove.
9642         (make_cleanup_restore_current_traceframe): Remove.
9643         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9644         New.
9645         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9646         * infrun.c (fetch_inferior_event): Use
9647         scoped_restore_current_traceframe.
9648
9649 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9650
9651         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9652         Remove.
9653         <n_allocated_type_units>: Remove.
9654         <all_type_units>: Change to std::vector.
9655         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9656         to std::vector change.
9657         (dwarf2_per_objfile::get_cutu): Likewise.
9658         (dwarf2_per_objfile::get_tu): Likewise.
9659         (create_signatured_type_table_from_index): Likewise.
9660         (create_signatured_type_table_from_debug_names): Likewise.
9661         (dw2_symtab_iter_next): Likewise.
9662         (dw2_print_stats): Likewise.
9663         (dw2_expand_all_symtabs): Likewise.
9664         (dw2_expand_marked_cus): Likewise.
9665         (dw2_debug_names_iterator::next): Likewise.
9666         (dwarf2_initialize_objfile): Likewise.
9667         (add_signatured_type_cu_to_table): Likewise.
9668         (create_all_type_units): Likewise.
9669         (add_type_unit): Likewise.
9670         (struct tu_abbrev_offset): Add constructor.
9671         (build_type_psymtabs_1): Adjust to std::vector change.
9672         (print_tu_stats): Likewise.
9673         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9674         (write_debug_names): Likewise.
9675
9676 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9677
9678         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9679         Make an std::vector.
9680         <n_comp_units>: Remove.
9681         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9682         to std::vector change.
9683         (dwarf2_per_objfile::get_cutu): Likewise.
9684         (dwarf2_per_objfile::get_cu): Likewise.
9685         (create_cus_from_index): Likewise.
9686         (create_addrmap_from_index): Likewise.
9687         (create_addrmap_from_aranges): Likewise.
9688         (dwarf2_read_index): Likewise.
9689         (dw2_find_last_source_symtab): Likewise.
9690         (dw2_map_symtabs_matching_filename): Likewise.
9691         (dw2_symtab_iter_next): Likewise.
9692         (dw2_print_stats): Likewise.
9693         (dw2_expand_all_symtabs): Likewise.
9694         (dw2_expand_symtabs_with_fullname): Likewise.
9695         (dw2_expand_marked_cus): Likewise.
9696         (dw2_map_symbol_filenames): Likewise.
9697         (create_cus_from_debug_names): Likewise.
9698         (dwarf2_read_debug_names): Likewise.
9699         (dw2_debug_names_iterator::next): Likewise.
9700         (dwarf2_initialize_objfile): Likewise.
9701         (set_partial_user): Likewise.
9702         (dwarf2_build_psymtabs_hard): Likewise.
9703         (read_comp_units_from_section): Remove arguments, adjust to
9704         std::vector change.
9705         (create_all_comp_units): Adjust to std::vector and
9706         read_comp_units_from_section changes.
9707         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9708         change.
9709         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9710         (psyms_seen_size): Likewise.
9711         (write_gdbindex): Likewise.
9712         (write_debug_names): Likewise.
9713
9714 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9715
9716         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9717         with dwarf2_per_objfile.
9718         (create_cus_from_index): Likewise.
9719         (create_signatured_type_table_from_index): Likewise.
9720         (dwarf2_read_index): Likewise.
9721         (dwarf2_initialize_objfile): Likewise.
9722         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9723         per_cu rather than get_dwarf2_per_objfile.
9724
9725 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9726
9727         * dwarf2read.h (struct signatured_type): Forward declare.
9728         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9729         New methods.
9730         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9731         (dw2_get_cutu): ...this.
9732         (dwarf2_per_objfile::get_cu): Rename from...
9733         (dw2_get_cu): ...this.
9734         (dwarf2_per_objfile::get_tu): New.
9735         (create_addrmap_from_index): Adjust.
9736         (create_addrmap_from_aranges): Adjust.
9737         (dw2_find_last_source_symtab): Adjust.
9738         (dw2_map_symtabs_matching_filename): Adjust.
9739         (dw2_symtab_iter_next): Adjust.
9740         (dw2_print_stats): Adjust.
9741         (dw2_expand_all_symtabs): Adjust.
9742         (dw2_expand_symtabs_with_fullname): Adjust.
9743         (dw2_expand_marked_cus): Adjust.
9744         (dw_expand_symtabs_matching_file_matcher): Adjust.
9745         (dw2_map_symbol_filenames): Adjust.
9746         (dw2_debug_names_iterator::next): Adjust.
9747         (dwarf2_initialize_objfile): Adjust.
9748         (set_partial_user): Adjust.
9749         (dwarf2_build_psymtabs_hard): Adjust.
9750
9751 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9752
9753         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9754         Remove unused variables.
9755         (dw2_map_symtabs_matching_filename): Likewise.
9756         (dwarf2_record_block_ranges): Likewise.
9757         (dwarf2_read_addr_index): Likewise.
9758         (follow_die_offset): Likewise.
9759
9760 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9761
9762         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9763         to symbol_file_add_main.
9764
9765 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9766
9767         PR mi/22299
9768         * mi/mi-console.c (do_fputc_async_safe): New.
9769         (mi_console_file::write_async_safe): New.
9770         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9771         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9772         New.
9773         * ui-file.c (ui_file::putstrn): Adjust call to
9774         fputstrn_unfiltered.
9775         * utils.c (printchar): Replace do_fputs and do_fprintf
9776         parameters by do_fputc.
9777         (fputstr_filtered): Adjust call to printchar.
9778         (fputstr_unfiltered): Likewise.
9779         (fputstrn_filtered): Likewise.
9780         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9781         printchar.
9782         * utils.h (do_fputc_ftype): New typedef.
9783         (fputstrn_unfiltered): Add do_fputc parameter.
9784
9785 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9786
9787         * regformats/i386/i386-avx.dat: Remove.
9788
9789 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9790
9791         PR gdb/22979
9792         * amd64-tdep.c (amd64_none_init_abi): New function.
9793         (amd64_x32_none_init_abi): New function.
9794         (_initialize_amd64_tdep): Register handlers for x86-64 and
9795         x64_32 with GDB_OSABI_NONE.
9796         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9797         GDB_OSABI_NONE osabi.
9798
9799 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9800
9801         PR gdb/22980
9802         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9803         GDB_OSABI_NONE.
9804         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9805         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9806
9807 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9808
9809         * common/byte-vector.h (char_vector): New type.
9810         * target.h (target_read_alloc): Return
9811         gdb::optional<byte_vector>.
9812         (target_read_stralloc): Return gdb::optional<char_vector>.
9813         (target_get_osdata): Return gdb::optional<char_vector>.
9814         * target.c (target_read_alloc_1): Templatize.  Replacement
9815         manual memory management with vector.
9816         (target_read_alloc): Change return type, adjust.
9817         (target_read_stralloc): Change return type, adjust.
9818         (target_get_osdata): Change return type, adjust.
9819         * auxv.c (struct auxv_info) <length>: Remove.
9820         <data>: Change type to gdb::optional<byte_vector>.
9821         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9822         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9823         (target_auxv_search): Adjust.
9824         (fprint_target_auxv): Adjust.
9825         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9826         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9827         (linux_make_corefile_notes): Adjust.
9828         * osdata.c (get_osdata): Adjust.
9829         * remote.c (remote_get_threads_with_qxfer): Adjust.
9830         (remote_memory_map): Adjust.
9831         (remote_traceframe_info): Adjust.
9832         (btrace_read_config): Adjust.
9833         (remote_read_btrace): Adjust.
9834         (remote_pid_to_exec_file): Adjust.
9835         * solib-aix.c (solib_aix_get_library_list): Adjust.
9836         * solib-dsbt.c (decode_loadmap): Don't free buf.
9837         (dsbt_get_initial_loadmaps): Adjust.
9838         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9839         * solib-target.c (solib_target_current_sos): Adjust.
9840         * tracepoint.c (sdata_make_value): Adjust.
9841         * xml-support.c (xinclude_start_include): Adjust.
9842         (xml_fetch_content_from_file): Adjust.
9843         * xml-support.h (xml_fetch_another): Change return type.
9844         (xml_fetch_content_from_file): Change return type.
9845         * xml-syscall.c (xml_init_syscalls_info): Adjust.
9846         * xml-tdesc.c (file_read_description_xml): Adjust.
9847         (fetch_available_features_from_target): Change return type.
9848         (target_fetch_description_xml): Adjust.
9849         (target_read_description_xml): Adjust.
9850
9851 2018-04-06  Tom Tromey  <tom@tromey.com>
9852
9853         * value.c (~value): Update.
9854         (struct value) <contents>: Now unique_xmalloc_ptr.
9855         (value_contents_bits_eq, allocate_value_contents)
9856         (value_contents_raw, value_contents_all_raw)
9857         (value_contents_for_printing, value_contents_for_printing_const)
9858         (set_value_enclosing_type): Update.
9859
9860 2018-04-06  Tom Tromey  <tom@tromey.com>
9861
9862         * value.c (range_s): Remove typedef, VEC.
9863         (struct range): Add operator<.
9864         (range_lessthan): Remove.
9865         (ranges_contain): Change type.
9866         (~value): Update.
9867         (struct value) <unavailable, optimized_out>: Now std::vector.
9868         (value_entirely_available)
9869         (value_entirely_covered_by_range_vector)
9870         (value_entirely_unavailable, value_entirely_optimized_out):
9871         Update.
9872         (insert_into_bit_range_vector): Change argument type.
9873         (find_first_range_overlap): Likewise.
9874         (struct ranges_and_idx, value_contents_bits_eq)
9875         (require_not_optimized_out, require_available): Update.
9876         (ranges_copy_adjusted): Change argument types.
9877         (value_optimized_out, value_copy, value_fetch_lazy): Update.
9878
9879 2018-04-06  Tom Tromey  <tom@tromey.com>
9880
9881         * value.c (~value): Update.
9882         (struct value) <parent>: Now a value_ref_ptr.
9883         (value_parent, set_value_parent, value_address, value_copy):
9884         Update.
9885
9886 2018-04-06  Tom Tromey  <tom@tromey.com>
9887
9888         * value.c (struct value): Add constructor, destructor, and member
9889         initializers.
9890         (allocate_value_lazy, value_decref): Update.
9891
9892 2018-04-06  Tom Tromey  <tom@tromey.com>
9893
9894         * value.c (struct value) <released, next>: Remove.
9895         (all_values): Now a std::vector.
9896         (allocate_value_lazy): Update.
9897         (value_next): Remove.
9898         (value_mark, value_free_to_mark, release_value)
9899         (value_release_to_mark): Update.
9900
9901 2018-04-06  Tom Tromey  <tom@tromey.com>
9902
9903         * value.h (fetch_subexp_value, value_release_to_mark): Update.
9904         (free_value_chain): Remove.
9905         * value.c (free_value_chain): Remove.
9906         (value_release_to_mark): Return a std::vector.
9907         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9908         std::vector.
9909         (check_condition): Update.
9910         * eval.c (fetch_subexp_value): Change "val_chain" to a
9911         std::vector.
9912         * breakpoint.c (update_watchpoint): Update.
9913         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9914
9915 2018-04-06  Tom Tromey  <tom@tromey.com>
9916
9917         * value.h (free_all_values): Remove.
9918         * value.c (free_all_values): Remove.
9919
9920 2018-04-06  Tom Tromey  <tom@tromey.com>
9921
9922         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9923         (value_history_chain, value_history_count): Remove.
9924         (value_history): New global.
9925         (record_latest_value, access_value_history, show_values)
9926         (preserve_values): Update.
9927
9928 2018-04-06  Tom Tromey  <tom@tromey.com>
9929
9930         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9931         * varobj.c (varobj_set_display_format, varobj_set_value)
9932         (install_default_visualizer, construct_visualizer)
9933         (install_new_value, ~varobj, varobj_get_value_type)
9934         (my_value_of_variable, varobj_editable_p): Update.
9935         * c-varobj.c (c_describe_child, c_value_of_variable)
9936         (cplus_number_of_children, cplus_describe_child): Update.
9937         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9938         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9939         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9940
9941 2018-04-06  Tom Tromey  <tom@tromey.com>
9942
9943         * printcmd.c (last_examine_address): Change type to
9944         value_ref_ptr.
9945         (do_examine, x_command): Update.
9946
9947 2018-04-06  Tom Tromey  <tom@tromey.com>
9948
9949         * value.c (release_value): Update.
9950         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9951         (struct bpstats) <val>: Now a value_ref_ptr.
9952         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9953         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9954         (~watchpoint, print_it_watchpoint, watch_command_1)
9955         (invalidate_bp_value_on_memory_change): Update.
9956
9957 2018-04-06  Tom Tromey  <tom@tromey.com>
9958
9959         * varobj.c (varobj_clear_saved_item)
9960         (update_dynamic_varobj_children, install_new_value, ~varobj):
9961         Update.
9962         * value.h (value_incref): Move declaration earlier.
9963         (value_decref): Rename from value_free.
9964         (struct value_ref_policy): New.
9965         (value_ref_ptr): New typedef.
9966         (struct value_deleter): Remove.
9967         (gdb_value_up): Remove typedef.
9968         (release_value): Change return type.
9969         (release_value_or_incref): Remove.
9970         * value.c (set_value_parent): Update.
9971         (value_incref): Change return type.
9972         (value_decref): Rename from value_free.
9973         (value_free_to_mark, free_all_values, free_value_chain): Update.
9974         (release_value): Return value_ref_ptr.
9975         (release_value_or_incref): Remove.
9976         (record_latest_value, set_internalvar, clear_internalvar):
9977         Update.
9978         * stack.c (info_frame_command): Don't call value_free.
9979         * python/py-value.c (valpy_dealloc, valpy_new)
9980         (value_to_value_object): Update.
9981         * printcmd.c (do_examine): Update.
9982         * opencl-lang.c (lval_func_free_closure): Update.
9983         * mi/mi-main.c (register_changed_p): Don't call value_free.
9984         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9985         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9986         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9987         value_free.
9988         * guile/scm-value.c (vlscm_free_value_smob)
9989         (vlscm_scm_from_value): Update.
9990         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9991         (frame_unwind_register_unsigned, get_frame_register_bytes)
9992         (put_frame_register_bytes): Don't call value_free.
9993         * findvar.c (address_from_register): Don't call value_free.
9994         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9995         * dwarf2loc.c (entry_data_value_free_closure)
9996         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9997         (dwarf2_evaluate_loc_desc_full): Update.
9998         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9999         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10000         (~watchpoint, watch_command_1)
10001         (invalidate_bp_value_on_memory_change): Update.
10002         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10003
10004 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10005
10006         PR gdb/23022
10007         * warning.m4: Add -Wno-error=deprecated-register.
10008         * configure: Re-generate.
10009
10010 2018-04-05  Tom Tromey  <tom@tromey.com>
10011
10012         * linespec.h: Remove include of "vec.h".
10013
10014 2018-04-05  Tom Tromey  <tom@tromey.com>
10015
10016         * linespec.c (typep): Remove typedef.
10017         (find_methods, find_superclass_methods): Take a std::vector.
10018         (find_method): Use std::vector.
10019
10020 2018-04-05  Tom Tromey  <tom@tromey.com>
10021
10022         * utils.c (compare_strings): Remove.
10023         * utils.h (compare_strings): Remove.
10024         * objc-lang.h (find_imps): Update.
10025         * objc-lang.c (find_methods): Take a std::vector.
10026         (uniquify_strings, find_imps): Likewise.
10027         * linespec.c (find_methods): Take a std::vector.
10028         (decode_objc): Use std::vector.
10029         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10030         a std::vector.
10031         (find_method, find_function_symbols): Use std::vector.
10032
10033 2018-04-05  Tom Tromey  <tom@tromey.com>
10034
10035         * completer.c (completion_tracker::completion_tracker): Remove
10036         cast.
10037         (completion_tracker::discard_completions): Likewise.
10038         * breakpoint.c (ambiguous_names_p): Remove cast.
10039         * ada-lang.c (_initialize_ada_language): Remove cast.
10040         * utils.h (streq): Update.
10041         (streq_hash): Add new declaration.
10042         * utils.c (streq): Return bool.
10043         (streq_hash): New function.
10044
10045 2018-04-05  Tom Tromey  <tom@tromey.com>
10046
10047         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10048         Remove a string copy.
10049
10050 2018-04-05  Tom Tromey  <tom@tromey.com>
10051
10052         * linespec.c (filter_results): Use std::vector.
10053         (decode_line_2, decode_line_full): Update.
10054
10055 2018-04-05  Tom Tromey  <tom@tromey.com>
10056
10057         * linespec.c (canonical_to_fullform): Return std::string.
10058         (filter_results): Update.
10059         (struct decode_line_2_item): Add constructor.
10060         <fullform, displayform>: Now std::string.
10061         (decode_line_2_compare_items): Now a std::sort comparator.
10062         (decode_line_2): Update.
10063
10064 2018-04-05  Tom Tromey  <tom@tromey.com>
10065
10066         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10067         (unexpected_linespec_error): Update.
10068         (linespec_parse_basic, parse_linespec): Update.
10069
10070 2018-04-05  Tom Tromey  <tom@tromey.com>
10071
10072         * linespec.c (linespec_parse_basic): Reindent.
10073
10074 2018-04-05  Tom Tromey  <tom@tromey.com>
10075
10076         * minsyms.h (iterate_over_minimal_symbols): Update.
10077         * minsyms.c (iterate_over_minimal_symbols): Take a
10078         gdb::function_view.
10079         * linespec.c (struct collect_minsyms): Remove.
10080         (compare_msyms): Now a std::sort comparator.
10081         (add_minsym): Add parameters.
10082         (search_minsyms_for_name): Update.  Use std::vector.
10083
10084 2018-04-03  Tom Tromey  <tom@tromey.com>
10085
10086         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10087         gdb::byte_vector.
10088
10089 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10090
10091         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10092
10093 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10094
10095         PR gdb/16959
10096         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10097         printing static type.
10098
10099 2018-04-01  Tom Tromey  <tom@tromey.com>
10100
10101         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10102         (rs6000_xfer_shared_libraries): Update.
10103
10104 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10105
10106         * common/gdb_vecs.h (char_ptr): Remove.
10107         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10108
10109 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10110
10111         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10112         with std::vector.
10113         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10114
10115 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10116
10117         * tracepoint.h (struct uploaded_tp): Initialize fields.
10118         <actions, step_actions, cmd_strings>: Change type to
10119         std::vector<char *>.
10120         * tracepoint.c (get_uploaded_tp): Allocate with new.
10121         (free_uploaded_tps): Free with delete.
10122         (parse_tracepoint_definition): Adjust to std::vector change.
10123         * breakpoint.c (read_uploaded_action): Likewise.
10124         (create_tracepoint_from_upload): Likewise.
10125         * ctf.c (ctf_write_uploaded_tp): Likewise.
10126         (SET_ARRAY_FIELD): Likewise.
10127         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10128
10129 2018-03-30  Tom Tromey  <tom@tromey.com>
10130
10131         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10132         std::unique_ptr.
10133         (svr4_keep_data_in_core): Update.
10134         (svr4_read_so_list): Update.
10135
10136 2018-03-30  Tom Tromey  <tom@tromey.com>
10137
10138         * windows-nat.c (handle_output_debug_string, handle_exception):
10139         Update.
10140         * target.h (target_read_string): Update.
10141         * target.c (target_read_string): Change "string" to
10142         unique_xmalloc_ptr.
10143         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10144         Update.
10145         * solib-frv.c (frv_current_sos): Update.
10146         * solib-dsbt.c (dsbt_current_sos): Update.
10147         * solib-darwin.c (darwin_current_sos): Update.
10148         * linux-thread-db.c (inferior_has_bug): Update.
10149         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10150         Update.  Remove alloca.
10151         * ada-lang.c (ada_main_name): Update.
10152
10153 2018-03-30  Tom Tromey  <tom@tromey.com>
10154
10155         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10156         (struct dwo_file_deleter): New.
10157         (dwo_file_up): New typedef.
10158         (open_and_init_dwo_file): Use dwo_file_up.
10159         (free_dwo_file_cleanup): Remove.
10160
10161 2018-03-30  Tom Tromey  <tom@tromey.com>
10162
10163         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10164         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10165
10166 2018-03-30  Tom Tromey  <tom@tromey.com>
10167
10168         * dwarf2read.c (class free_cached_comp_units): New class.
10169         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10170         (free_cached_comp_units): Remove function.
10171
10172 2018-03-30  Tom Tromey  <tom@tromey.com>
10173
10174         * utils.h (make_cleanup_unpush_target): Remove.
10175         * inf-ptrace.c (struct target_unpusher): New.
10176         (target_unpush_up) New typedef.
10177         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10178         target_unpush_up.
10179         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10180
10181 2018-03-27  Tom Tromey  <tom@tromey.com>
10182
10183         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10184
10185 2018-03-27  Pedro Alves  <palves@redhat.com>
10186             Tom Tromey  <tom@tromey.com>
10187
10188         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10189         destructor.  Now a class.
10190         (gdb_readline_wrapper_cleanup): Remove function.
10191         (gdb_readline_wrapper): Remove cleanups.
10192
10193 2018-03-27  Tom Tromey  <tom@tromey.com>
10194
10195         * typeprint.h (struct type_print_options) <local_typedefs,
10196         global_typedefs>: Remove "struct" keyword.
10197         (class typedef_hash_table): New class.
10198         (recursively_update_typedef_hash, add_template_parameters)
10199         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10200         (find_typedef_in_hash): Don't declare.
10201         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10202         (typedef_hash_table::recursively_update): Rename from
10203         recursively_update_typedef_hash.  Now a member.
10204         (typedef_hash_table::add_template_parameters): Rename from
10205         add_template_parameters.  Now a member.
10206         (typedef_hash_table::typedef_hash_table): Now a constructor;
10207         rename from create_typedef_hash.
10208         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10209         rename from free_typedef_hash.
10210         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10211         (do_free_global_table): Remove.
10212         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10213         from copy_type_recursive.
10214         (create_global_typedef_table): Remove.
10215         (typedef_hash_table::find_global_typedef): Now a member of
10216         typedef_hash_table.
10217         (typedef_hash_table::find_typedef): Rename from
10218         find_typedef_in_hash; now a member.
10219         (whatis_exp): Update.
10220         * extension.h (struct ext_lang_type_printers): Add constructor and
10221         destructor.
10222         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10223         declare.
10224         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10225         Now a constructor; rename from start_ext_lang_type_printers.
10226         (ext_lang_type_printers): Now a destructor; rename from
10227         free_ext_lang_type_printers.
10228         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10229         Update.
10230         (c_type_print_base_struct_union): Update.  Remove cleanups.
10231
10232 2018-03-27  Tom Tromey  <tom@tromey.com>
10233
10234         * dwarf-index-write.c: Include <cmath>.
10235
10236 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10237
10238         * NEWS: Add entry describing new "set|show varsize-limit" command.
10239         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10240         command.
10241         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10242         "set variable".
10243
10244 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10245
10246         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10247         dwarf-index-write.c
10248         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10249         * dwarf-index-common.c: New file.
10250         * dwarf-index-common.h: New file.
10251         * dwarf-index-write.c: New file.
10252         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10253         (struct dwarf2_section_info): Move from here.
10254         (dwarf2_section_info_def): Likewise.
10255         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10256         (offset_type): Likewise.
10257         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10258         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10259         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10260         (byte_swap): Likewise.
10261         (MAYBE_SWAP): Likewise.
10262         (dwarf2_per_cu_ptr): Likewise.
10263         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10264         (struct tu_stats): Likewise.
10265         (struct dwarf2_per_objfile): Likewise.
10266         (struct dwarf2_per_cu_data): Likewise.
10267         (struct signatured_type): Likewise.
10268         (sig_type_ptr): Likewise.
10269         (DEF_VEC_P (sig_type_ptr)): Likewise.
10270         (INDEX4_SUFFIX): Likewise.
10271         (INDEX5_SUFFIX): Likewise.
10272         (DEBUG_STR_SUFFIX): Likewise.
10273         (dwarf2_read_section): Make non-static.
10274         (mapped_index_string_hash): Move from here.
10275         (dwarf5_djb_hash): Likewise.
10276         (file_write): Likewise.
10277         (class data_buf): Likewise.
10278         (struct symtab_index_entry): Likewise.
10279         (struct mapped_symtab): Likewise.
10280         (find_slot): Likewise.
10281         (hash_expand): Likewise.
10282         (add_index_entry): Likewise.
10283         (uniquify_cu_indices): Likewise.
10284         (class c_str_view): Likewise.
10285         (class c_str_view_hasher): Likewise.
10286         (class vector_hasher): Likewise.
10287         (write_hash_table): Likewise.
10288         (psym_index_map): Likewise.
10289         (struct addrmap_index_data): Likewise.
10290         (add_address_entry): Likewise.
10291         (add_address_entry_worker): Likewise.
10292         (write_address_map): Likewise.
10293         (symbol_kind): Likewise.
10294         (write_psymbols): Likewise.
10295         (struct signatured_type_index_data): Likewise.
10296         (write_one_signatured_type): Likewise.
10297         (recursively_count_psymbols): Likewise.
10298         (recursively_write_psymbols): Likewise.
10299         (class debug_names): Likewise.
10300         (check_dwarf64_offsets): Likewise.
10301         (psyms_seen_size): Likewise.
10302         (write_gdbindex): Likewise.
10303         (write_debug_names): Likewise.
10304         (assert_file_size): Likewise.
10305         (write_psymtabs_to_index): Likewise.
10306         (save_gdb_index_command): Likewise.
10307         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10308         command.
10309         * dwarf2read.h: New file.
10310
10311 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10312
10313         PR gdb/22670
10314         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10315         symbol name if the CU's language stores symbol names in linkage
10316         format.
10317         * language.h (struct language_defn)
10318         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10319         all instances of this struct.
10320
10321 2018-03-26  Tom Tromey  <tom@tromey.com>
10322
10323         * stack.c (backtrace_command_1): Remove verbose code.
10324
10325 2018-03-26  Tom Tromey  <tom@tromey.com>
10326
10327         * python/py-framefilter.c (py_print_type): Don't catch
10328         exceptions.  Return void.
10329         (py_print_value): Likewise.
10330         (py_print_single_arg): Likewise.
10331         (enumerate_args): Don't catch exceptions.
10332         (py_print_args): Likewise.
10333         (py_print_frame): Likewise.
10334         (gdbpy_apply_frame_filter): Catch exceptions here.
10335
10336 2018-03-26  Tom Tromey  <tom@tromey.com>
10337
10338         * stack.c (_initialize_stack): Remove trailing newlines from help
10339         text.  Add "Usage" line to "backtrace" help.
10340
10341 2018-03-26  Tom Tromey  <tom@tromey.com>
10342
10343         PR python/16486:
10344         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10345
10346 2018-03-26  Tom Tromey  <tom@tromey.com>
10347
10348         * python/py-framefilter.c (py_print_single_arg): Return
10349         EXT_LANG_BT_ERROR from catch.
10350
10351 2018-03-26  Tom Tromey  <tom@tromey.com>
10352
10353         PR backtrace/15584:
10354         * stack.c (backtrace_command_1): Move some code into no-filters
10355         "if".
10356
10357 2018-03-26  Tom Tromey  <tom@tromey.com>
10358
10359         * python/py-framefilter.c (throw_quit_or_print_exception): New
10360         function.
10361         (gdbpy_apply_frame_filter): Use it.
10362
10363 2018-03-26  Tom Tromey  <tom@tromey.com>
10364
10365         PR cli/17716:
10366         * python/py-framefilter.c (py_print_type, py_print_value)
10367         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10368         RETURN_MASK_ERROR.
10369
10370 2018-03-26  Tom Tromey  <tom@tromey.com>
10371
10372         * python/py-framefilter.c (enumerate_args): Use
10373         gdb::unique_xmalloc_ptr.
10374
10375 2018-03-26  Tom Tromey  <tom@tromey.com>
10376
10377         * python/py-framefilter.c (py_print_frame): Return
10378         EXT_LANG_BT_OK.
10379         (gdbpy_apply_frame_filter): Update comment.
10380         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10381         Remove.
10382         <EXT_LANG_BT_NO_FILTERS>: Change value.
10383
10384 2018-03-26  Tom Tromey  <tom@tromey.com>
10385
10386         PR backtrace/15582:
10387         * stack.c (backtrace_command): Parse "hide" argument.
10388         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10389         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10390         constant.
10391
10392 2018-03-26  Tom Tromey  <tom@tromey.com>
10393
10394         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10395         add "flags".
10396         (backtrace_command): Remove "fulltrace", add "flags".
10397
10398 2018-03-26  Tom Tromey  <tom@tromey.com>
10399
10400         * stack.c (backtrace_command): Rewrite command line parsing.
10401
10402 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10403
10404         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10405
10406 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10407
10408         * filename-seen-cache.h: Add include guard.
10409
10410 2018-03-26  Keith Seitz  <keiths@redhat.com>
10411
10412         * symfile.c (place_section): Remove "struct" from section_addr_info
10413         in comment.
10414         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10415         "struct" keyword from section_addr_info.
10416
10417 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10418
10419         * regformats/regdef.h (reg): Add constructors.
10420
10421 2018-03-25  Pedro Alves  <palves@redhat.com>
10422
10423         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10424         if then/else bodies in var_func_name extraction.
10425
10426 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10427
10428         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10429         lookup_minimal_symbol() to find symbol entry.
10430         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10431
10432 2018-03-23  Keith Seitz  <keiths@redhat.com>
10433
10434         PR c++/22968
10435         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10436         nested type definitions for C++, too.
10437
10438 2018-03-23  Tom Tromey  <tom@tromey.com>
10439
10440         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10441         a typedef.
10442         (macho_register_oso): Remove.
10443         (macho_symtab_read): Take a std::vector.
10444         (oso_el_compare_name): Now a std::sort comparator.
10445         (macho_symfile_read_all_oso): Take a std::vector.
10446         (macho_symfile_read): Use std::vector.  Remove cleanups.
10447
10448 2018-03-22  Tom Tromey  <tom@tromey.com>
10449
10450         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10451         (record_full_goto_bookmark): Use std::string.
10452
10453 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10454
10455         PR tdep/18295
10456         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10457         a single mask.
10458
10459 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10460
10461         * rs6000-tdep.c (store_insn_p): New function.
10462         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10463         and cr_reg to their unshifted values. Use store_insn_p to
10464         match LR saves using either R1 or fdata->alloca_reg. Use
10465         store_insn_p to match CR saves. Set alloca_reg_offset
10466         when alloca_reg and framep are set. Remove lr_reg shift
10467         when assigning to fdata->lr_register.
10468
10469 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10470
10471         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10472         command line args instead of emitting a warning.
10473
10474 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10475
10476         * tracepoint.h (struct static_tracepoint_marker): Initialize
10477         fields, define default constructor, move constructor and move
10478         assignment, disable the rest.
10479         <str_id, extra>: Make std::string.
10480         (release_static_tracepoint_marker): Remove.
10481         (free_current_marker): Remove.
10482         * tracepoint.c (free_current_marker): Remove.
10483         (parse_static_tracepoint_marker_definition): Adjust to
10484         std::string, use new hex2str overload.
10485         (release_static_tracepoint_marker): Remove.
10486         (print_one_static_tracepoint_marker): Get marker by reference
10487         and adjust to std::string.
10488         (info_static_tracepoint_markers_command): Adjust to std::vector
10489         changes
10490         * target.h (static_tracepoint_marker_p): Remove typedef.
10491         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10492         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10493         bool.
10494         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10495         * target-debug.h
10496         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10497         (target_debug_print_std_vector_static_tracepoint_marker): New.
10498         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10499         to...
10500         (target_debug_print_static_tracepoint_marker_p): ... this.
10501         * target-delegates.c: Re-generate.
10502         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10503         Make std::string.
10504         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10505         (decode_static_tracepoint_spec): Adjust to std::vector.
10506         (tracepoint_print_one_detail): Adjust to std::string.
10507         (strace_marker_decode_location): Adjust to std::string.
10508         (update_static_tracepoint): Adjust to std::string, remove call
10509         to release_static_tracepoint_marker.
10510         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10511         Adjust to std::vector.
10512         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10513         (remote_static_tracepoint_markers_by_strid): Adjust to
10514         std::vector.
10515         * common/rsp-low.h (hex2str): New overload with explicit count
10516         of bytes.
10517         * common/rsp-low.c (hex2str): New overload with explicit count
10518         of bytes.
10519         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10520         (_initialize_rsp_low_selftests): Add test_hex2str test.
10521         * unittests/tracepoint-selftests.c
10522         (test_parse_static_tracepoint_marker_definition): Adjust to
10523         std::string.
10524
10525 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10526
10527         * tracepoint.c (parse_static_tracepoint_marker_definition):
10528         Consider case where the definition is followed by more
10529         definitions.
10530         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10531         tracepoint-selftests.c.
10532         * unittests/tracepoint-selftests.c: New.
10533
10534 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10535
10536         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10537         Carvalho.
10538
10539 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10540
10541         * symtab.c (find_pc_sect_line): fixed indentation.
10542
10543 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10544
10545         * symtab.c (find_pc_sect_line): now uses binary search.
10546
10547 2018-03-19  Tom Tromey  <tom@tromey.com>
10548
10549         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10550         "IDENT" production.
10551
10552 2018-03-19  Pedro Alves  <palves@redhat.com>
10553             Tom Tromey  <tom@tromey.com>
10554
10555         * unittests/observable-selftests.c: New file.
10556         * common/observable.h: New file.
10557         * observable.h: New file.
10558         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10559         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10560         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10561         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10562         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10563         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10564         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10565         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10566         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10567         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10568         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10569         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10570         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10571         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10572         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10573         tui/tui-interp.c, valops.c: Update all users.
10574         * tui/tui-hooks.c (tui_bp_created_observer)
10575         (tui_bp_deleted_observer, tui_bp_modified_observer)
10576         (tui_inferior_exit_observer, tui_before_prompt_observer)
10577         (tui_normal_stop_observer, tui_register_changed_observer):
10578         Remove.
10579         (tui_observers_token): New global.
10580         (attach_or_detach, tui_attach_detach_observers): New functions.
10581         (tui_install_hooks, tui_remove_hooks): Use
10582         tui_attach_detach_observers.
10583         * record-btrace.c (record_btrace_thread_observer): Remove.
10584         (record_btrace_thread_observer_token): New global.
10585         * observer.sh: Remove.
10586         * observer.c: Rename to observable.c.
10587         * observable.c (namespace gdb_observers): Define new objects.
10588         (observer_debug): Move into gdb_observers namespace.
10589         (struct observer, struct observer_list, xalloc_observer_list_node)
10590         (xfree_observer_list_node, generic_observer_attach)
10591         (generic_observer_detach, generic_observer_notify): Remove.
10592         (_initialize_observer): Update.
10593         Don't include observer.inc.
10594         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10595         (clean mostlyclean): Likewise.
10596         (observer.h, observer.inc): Remove targets.
10597         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10598         (COMMON_SFILES): Use observable.c, not observer.c.
10599         * .gitignore: Remove observer.h.
10600
10601 2018-03-18  Tom Tromey  <tom@tromey.com>
10602
10603         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10604         gdb::def_vector.
10605         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10606
10607 2018-03-17  Tom Tromey  <tom@tromey.com>
10608
10609         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10610
10611 2018-03-17  Tom Tromey  <tom@tromey.com>
10612
10613         * target.c (class scoped_target_fd): New.
10614         (target_fileio_close_cleanup): Remove.
10615         (target_fileio_read_alloc_1): Use scoped_target_fd.
10616
10617 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10618
10619         * silent-rules.mk: New.
10620         * Makefile.in: Include silent-rules.mk
10621         (srcdir, VPATH, top_srcdir): Move up.
10622         (COMPILE): Add ECHO_CXX.
10623         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10624         (init.c): Add ECHO_INIT_C.
10625         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10626         (version.c): Add ECHO_GEN.
10627         (printcmd.o): Add ECHO_CXX.
10628         (target-float.o): Add ECHO_CXX.
10629         (ada-exp.o): Add ECHO_CXX.
10630         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10631         (insight$(EXEEXT)): Add ECHO_CXXLD.
10632         * gnulib/configure.ac: Add AM_SILENT_RULES.
10633         * gnulib/aclocal.m4: Re-generate.
10634         * gnulib/configure: Re-generate.
10635         * gnulib/import/Makefile.in: Re-generate.
10636
10637 2018-03-16  Tom Tromey  <tom@tromey.com>
10638
10639         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10640         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10641         * utils.c (do_free_section_addr_info)
10642         (make_cleanup_free_section_addr_info): Remove.
10643         * symfile.h (struct other_sections): Add constructor.
10644         (struct section_addr_info): Remove.
10645         (section_addr_info): New typedef.
10646         (struct sym_fns) <sym_offsets>: Change type of parameter.
10647         (build_section_addr_info_from_objfile)
10648         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10649         (default_symfile_offsets, symbol_file_add)
10650         (symbol_file_add_from_bfd)
10651         (build_section_addr_info_from_section_table): Update.
10652         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10653         * symfile.c (alloc_section_addr_info): Remove.
10654         (build_section_addr_info_from_section_table): Change return type.
10655         Update.
10656         (build_section_addr_info_from_bfd)
10657         (build_section_addr_info_from_objfile): Likewise.
10658         (free_section_addr_info): Remove.
10659         (relative_addr_info_to_section_offsets): Change type of "addrs".
10660         (addrs_section_compar): Now a std::sort comparator.
10661         (addrs_section_sort): Change return type.
10662         (addr_info_make_relative): Change type of "addrs".  Update.
10663         (default_symfile_offsets, syms_from_objfile_1)
10664         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10665         (symbol_file_add_separate): Update.
10666         (symbol_file_add): Change type of "addrs".  Update.
10667         (add_symbol_file_command): Update.  Remove cleanups.
10668         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10669         cleanups.
10670         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10671         * solib.c (solib_read_symbols): Update.
10672         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10673         * machoread.c (macho_symfile_offsets): Update.
10674         * jit.c (jit_bfd_try_read_symtab): Update.
10675
10676 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10677
10678         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10679         unittests/utils-selftests.c.
10680         * unittests/utils-selftests.c: New file.
10681
10682 2018-03-14  Tom Tromey  <tom@tromey.com>
10683
10684         PR cli/14977:
10685         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10686         for NULL.
10687
10688 2018-03-14  Tom Tromey  <tom@tromey.com>
10689
10690         PR cli/19918:
10691         * printcmd.c (printf_pointer): Allow "-" in format.
10692
10693 2018-03-14  Tom Tromey  <tom@tromey.com>
10694
10695         * printcmd.c (_initialize_printcmd): Add usage to printf.
10696
10697 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10698
10699         * MAINTAINERS: Update my email address.
10700
10701 2018-03-13  Tom Tromey  <tom@tromey.com>
10702
10703         * machoread.c (macho_check_dsym): Change filenamep to a
10704         std::string*.
10705         (macho_symfile_read): Update.
10706         * symfile.c (load_command): Use std::string.
10707
10708 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10709
10710         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10711         to error message string.
10712         (riscv_register_name): Use xsnprintf instead of sprintf.
10713         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10714         internal_error.
10715         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10716         error.
10717         (riscv_push_dummy_call): Likewise.
10718
10719 2018-03-12  Tom Tromey  <tom@tromey.com>
10720
10721         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10722         Use gdb::byte_vector.
10723         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10724
10725 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10726
10727         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10728         parameter type to readable_regcache.
10729         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10730         the declaration.
10731
10732 2018-03-11  Tom Tromey  <tom@tromey.com>
10733
10734         * dwarf2read.c (struct nextfield): Add initializers.
10735         (struct nextfnfield): Remove.
10736         (struct fnfieldlist): Add initializers.  Remove "length" and
10737         "head", use std::vector.
10738         (struct decl_field_list): Remove.
10739         (struct field_info): Add initializers.
10740         <fields, baseclasses>: Now std::vector.
10741         <nbaseclasses, nfnfields, typedef_field_list_count,
10742         nested_types_list_count>: Remove.
10743         (dwarf2_add_field, dwarf2_add_type_defn)
10744         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10745         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10746         (process_structure_scope): Update.
10747
10748 2018-03-11  Tom Tromey  <tom@tromey.com>
10749
10750         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10751         for use by std::sort.
10752         (build_type_psymtabs_1): Use std::vector.
10753
10754 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10755
10756         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10757         and LIBMPFR in the printed configuration.
10758
10759 2018-03-08  Tom Tromey  <tom@tromey.com>
10760
10761         * source.c (get_filename_and_charpos): Use scoped_fd.
10762         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10763         (procfs_pidlist): Likewise.
10764         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10765         (iterate_over_mappings): Likewise.
10766
10767 2018-03-08  Tom Tromey  <tom@tromey.com>
10768
10769         * infcall.c (struct call_return_meta_info)
10770         <stack_temporaries_enabled>: Remove.
10771         (get_call_return_value, call_function_by_hand_dummy): Update.
10772         * thread.c (disable_thread_stack_temporaries): Remove.
10773         (enable_thread_stack_temporaries): Remove.
10774         (thread_stack_temporaries_enabled_p): Return bool.
10775         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10776         (get_last_thread_stack_temporary): Update.
10777         * eval.c (evaluate_subexp): Update.
10778         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10779         class, not a function.
10780         (value_ptr, value_vec): Remove typedefs.
10781         (class thread_info) <stack_temporaries_enabled>: Now bool.
10782         <stack_temporaries>: Now a std::vector.
10783         (thread_stack_temporaries_enabled_p)
10784         (value_in_thread_stack_temporaries): Return bool.
10785
10786 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10787
10788         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10789         (getpkt_or_notif_sane_1): Likewise.
10790
10791 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10792
10793         * build-id.c (build_id_to_debug_bfd): Use std::string.
10794
10795 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10796
10797         * build-id.c (find_separate_debug_file_by_buildid): Return
10798         std::string.
10799         * build-id.h (find_separate_debug_file_by_buildid): Return
10800         std::string.
10801         * coffread.c (coff_symfile_read): Adjust to std::string.
10802         * elfread.c (elf_symfile_read): Adjust to std::string.
10803         * symfile.c (separate_debug_file_exists): Change parameter to
10804         std::string.
10805         (find_separate_debug_file): Return std::string.
10806         (find_separate_debug_file_by_debuglink): Return std::string.
10807         * symfile.h (find_separate_debug_file_by_debuglink): Return
10808         std::string.
10809
10810 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10811
10812         * common/xml-utils.c (xml_escape_text): Move code to...
10813         (xml_escape_text_append): ... this new function.
10814         * common/xml-utils.h (xml_escape_text_append): New declaration.
10815         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10816         New function.
10817         (_initialize_xml_utils): register test_xml_escape_text_append as
10818         a selftest.
10819
10820 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10821
10822         * defs.h: Remove MAX_REGISTER_SIZE.
10823         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10824         asserts.
10825         * python/py-unwind.c (pyuw_sniffer): Likewise.
10826
10827 2018-03-07  Tom Tromey  <tom@tromey.com>
10828
10829         * linux-tdep.c (linux_info_proc): Update.
10830         * target.h (struct target_ops) <to_fileio_readlink>: Return
10831         optional<string>.
10832         (target_fileio_readlink): Return optional<string>.
10833         * remote.c (remote_hostio_readlink): Return optional<string>.
10834         * inf-child.c (inf_child_fileio_readlink): Return
10835         optional<string>.
10836         * target.c (target_fileio_readlink): Return optional<string>.
10837
10838 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
10839
10840         * regcache.c (cooked_read_test): Add riscv to the list of
10841         architectures that have a save_reggroup.
10842
10843 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10844
10845         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10846         value is not a dynamic class object.
10847
10848 2018-03-06  Tom Tromey  <tom@tromey.com>
10849
10850         * rust-exp.y: Formatting fixes.
10851
10852 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10853
10854         * riscv-tdep.c (riscv_register_name): Remove target description
10855         support.
10856         (riscv_gdbarch_init): Remove target description check.
10857
10858 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10859
10860         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10861         comment.
10862         * riscv-tdep.h: Likewise.
10863
10864 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10865
10866         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10867         (riscv_pseudo_register_write): Delete.
10868         (riscv_gdbarch_init): Remove all use of pseudo registers.
10869
10870 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10871
10872         * record-btrace.c (btrace_print_lines): Replace cleanup
10873         parameter with RAII equivalents.
10874         (btrace_insn_history): Replace cleanup with RAII equivalents.
10875         * ui-out.h (make_cleanup_ui_out_list_begin_end,
10876         make_cleanup_ui_out_tuple_begin_end): Remove.
10877         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10878         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10879         make_cleanup_ui_out_list_begin_end): Remove.
10880
10881 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10882
10883         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10884         parameter types to std::vector.  Use bool.
10885         (record_btrace_wait): Replace VEC(tp_t) with
10886         std::vector<thread_info *>.
10887         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10888
10889 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
10890
10891         * record-btrace.c (record_btrace_disable_callback): Remove.
10892         (struct scoped_btrace_disable): New.
10893         (record_btrace_open): Use scoped_btrace_disable.
10894
10895 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10896
10897         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10898         reading values from registers.
10899
10900 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10901
10902         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10903         where appropriate.
10904
10905 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10906
10907         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10908         change parameter type.  Use GDB's print functions, and use
10909         core_addr_to_string where appropriate.
10910         (riscv_push_dummy_call): Use core_addr_to_string where
10911         appropriate, update call to riscv_print_arg_location, and reindent
10912         a few lines.
10913         (riscv_return_value): Update call to riscv_print_arg_location.
10914
10915 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10916             Tim Newsome <tim@sifive.com>
10917             Albert Ou <a0u@eecs.berkeley.edu>
10918             Darius Rad <darius@bluespec.com>
10919
10920         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10921         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10922         (ALLDEPFILES): Add riscv-tdep.c
10923         * configure.tgt: Add riscv support.
10924         * riscv-tdep.c: New file.
10925         * riscv-tdep.h: New file.
10926         * NEWS: Mention new target.
10927         * MAINTAINERS: Add entry for riscv.
10928
10929 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10930
10931         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10932         fields within aggregates.
10933
10934 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10935
10936         * record-btrace.c (btrace_print_lines): Change type of flags to
10937         gdb_disassembly_flags.
10938
10939 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10940
10941         * fbsd-nat.c: Include "inf-ptrace.h".
10942         (USE_SIGTRAP_SIGINFO): Conditionally define.
10943         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10944         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10945         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10946         function.
10947         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10948         Likewise.
10949         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10950         Likewise.
10951         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10952         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10953         "supports_stopped_by_hw_breakpoint" target methods.
10954
10955 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10956
10957         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10958         * fbsd-nat.c (debug_fbsd_nat): New variable.
10959         (show_fbsd_nat_debug): New function.
10960         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10961         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10962
10963 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10964
10965         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10966         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10967         prototype.
10968         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10969         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10970         method.
10971
10972 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10973
10974         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10975         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10976
10977 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10978
10979         * charset.c (struct charset_vector): New.
10980         (charsets): Change type to charset_vector.
10981         (find_charset_names): Adjust.
10982         (add_one): Adjust.
10983         (_initialize_charset): Adjust.
10984
10985 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10986
10987         * progspace.h (struct program_space) <deleted_solibs>: Change
10988         type to std::vector<std::string>.
10989         * progspace.c (clear_program_space_solib_cache): Adjust.
10990         * breakpoint.c (print_solib_event): Adjust.
10991         (check_status_catch_solib): Adjust.
10992         * solib.c (update_solib_list): Adjust.
10993         * ui-out.h (class ui_out) <field_string>: New overload.
10994         * ui-out.c (ui_out::field_string): New overload.
10995
10996 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10997
10998         * progspace.h (struct program_space): Add constructor and
10999         destructor, initialize fields.
11000         (add_program_space): Remove.
11001         * progspace.c (add_program_space): Rename to...
11002         (program_space::program_space): ... this.
11003         (release_program_space): Rename to...
11004         (program_space::~program_space): ... this.
11005         (delete_program_space): Use delete to delete program_space.
11006         (initialize_progspace): Use new to allocate program_space.
11007         * inferior.c (add_inferior_with_spaces): Likewise.
11008         (clone_inferior_command): Likewise.
11009         * infrun.c (follow_fork_inferior): Likewise.
11010         (handle_vfork_child_exec_or_exit): Likewise.
11011
11012 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11013
11014         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11015         (delim_string_to_char_ptr_vec): Return std::vector of
11016         gdb::unique_xmalloc_ptr.
11017         (dirnames_to_char_ptr_vec_append): Take std::vector of
11018         gdb::unique_xmalloc_ptr.
11019         (dirnames_to_char_ptr_vec): Return std::vector of
11020         gdb::unique_xmalloc_ptr.
11021         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11022         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11023         (delim_string_to_char_ptr_vec): Return an std::vector of
11024         gdb::unique_xmalloc_ptr, adjust the code.
11025         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11026         gdb::unique_xmalloc_ptr, adjust the code.
11027         (dirnames_to_char_ptr_vec): Return an std::vector of
11028         gdb::unique_xmalloc_ptr, adjust the code.
11029         * auto-load.c (auto_load_safe_path_vec): Change type to
11030         std::vector of gdb::unique_xmalloc_ptr.
11031         (auto_load_expand_dir_vars): Return an std::vector of
11032         gdb::unique_xmalloc_ptr, adjust the code.
11033         (auto_load_safe_path_vec_update): Adjust.
11034         (filename_is_in_auto_load_safe_path_vec): Adjust.
11035         (auto_load_objfile_script_1): Adjust.
11036         * build-id.c (build_id_to_debug_bfd): Adjust.
11037         * linux-thread-db.c (thread_db_load_search): Adjust.
11038         * source.c (add_path): Adjust.
11039         (openp): Adjust.
11040         * symfile.c (find_separate_debug_file): Adjust.
11041         * utils.c (do_free_char_ptr_vec): Remove.
11042         (make_cleanup_free_char_ptr_vec): Remove.
11043
11044 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11045
11046         PR gdb/22907
11047         * common/pathstuff.c: Conditionally include "<windows.h>".
11048
11049 2018-03-01  Georg Sauthoff  <mail@georg.so>
11050
11051         PR gdb/22888
11052         * gcore.in: Quote variables and switch interpreter to bash.
11053
11054 2018-03-01  Tom Tromey  <tom@tromey.com>
11055
11056         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11057         assertion.  Add assertion for discriminant_index.
11058         (quirk_rust_enum): Use correct base type name in univariant case.
11059
11060 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11061
11062         * record.c (get_call_history_modifiers): Return a
11063         record_print_flags.
11064         (cmd_record_call_history): Adjust.
11065         * record-btrace.c (record_btrace_call_history): Adjust.
11066         (record_btrace_call_history_range): Adjust.
11067         (record_btrace_call_history_from): Adjust.
11068         * target-debug.h (target_debug_print_record_print_flags): New.
11069         * target-delegates.c: Re-generate.
11070         * target.c (target_call_history): Change flags type.
11071         (target_call_history_from): Likewise.
11072         (target_call_history_range): Likewise.
11073         * target.h (struct target_ops) <target_call_history>: Likewise.
11074         (target_call_history_from): Likewise.
11075         (target_call_history_range): Likewise.
11076
11077 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11078             Simon Marchi  <simon.marchi@polymtl.ca>
11079
11080         * common/common-utils.c: Include "sys/stat.h".
11081         (is_regular_file): Move here from "source.c"; change return
11082         type to "bool".
11083         * common/common-utils.h (is_regular_file): New prototype.
11084         * common/pathstuff.c (contains_dir_separator): New function.
11085         * common/pathstuff.h (contains_dir_separator): New prototype.
11086         * source.c: Don't include "sys/stat.h".
11087         (is_regular_file): Move to "common/common-utils.c".
11088
11089 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11090
11091         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11092         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11093         * auto-load.c: Include "common/pathstuff.h".
11094         * common/common-def.h (current_directory): Move here.
11095         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11096         function.
11097         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11098         prototype.
11099         * common/pathstuff.c: New file.
11100         * common/pathstuff.h: New file.
11101         * compile/compile.c: Include "common/pathstuff.h".
11102         * defs.h (current_directory): Move to "common/common-defs.h".
11103         * dwarf2read.c: Include "common/pathstuff.h".
11104         * exec.c: Likewise.
11105         * guile/scm-safe-call.c: Likewise.
11106         * linux-thread-db.c: Likewise.
11107         * main.c: Likewise.
11108         * nto-tdep.c: Likewise.
11109         * objfiles.c: Likewise.
11110         * source.c: Likewise.
11111         * symtab.c: Likewise.
11112         * utils.c: Include "common/pathstuff.h".
11113         (gdb_realpath): Move to "common/pathstuff.c".
11114         (gdb_realpath_keepfile): Likewise.
11115         (gdb_abspath): Likewise.
11116         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11117         (gdb_realpath_keepfile): Likewise.
11118         (gdb_abspath): Likewise.
11119
11120 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11121
11122         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11123         wildcard process pid for super_resume for kernels with a
11124         specific bug.
11125
11126 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11127
11128         * compile/compile.c (get_args): Add additional comments
11129         explaining function.
11130
11131 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11132             Tom Tromey  <tom@tromey.com>
11133
11134         * target.h (memory_write_request_s): Remove typedef.  Don't define
11135         VEC.
11136         (target_write_memory_blocks): Change argument to std::vector.
11137         (struct memory_write_request): Add constructor.
11138         * target-memory.c (compare_block_starting_address): Return bool.
11139         Change argument types.
11140         (claim_memory): Change arguments to use std::vector.
11141         (split_regular_and_flash_blocks, blocks_to_erase)
11142         (compute_garbled_blocks): Likewise.
11143         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11144         (target_write_memory_blocks): Change argument to std::vector.
11145         * symfile.c (struct load_section_data): Add constructor and
11146         destructor.  Use std::vector for "requests".
11147         (struct load_progress_data): Add initializers.
11148         (load_section_callback): Update.  Use "new".
11149         (clear_memory_write_data): Remove.
11150         (generic_load): Update.
11151
11152 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11153
11154         * arch/aarch64.h: Use common/tdesc.h.
11155
11156 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11157
11158         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11159         architecture with a 64-bit ABI.
11160
11161 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11162
11163         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11164         ahead of target description loading.
11165
11166 2018-02-26  Tom Tromey  <tom@tromey.com>
11167
11168         * stack.c (backtrace_command_1): Update.
11169         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11170         of "flags".
11171         * python/py-framefilter.c (py_print_frame)
11172         (gdbpy_apply_frame_filter): Change type of "flags".
11173         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11174         of "flags".
11175         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11176         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11177         * extension.h (enum frame_filter_flag): Rename from
11178         frame_filter_flags.
11179         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11180         (apply_ext_lang_frame_filter): Change type of "flags".
11181         * extension.c (apply_ext_lang_frame_filter): Change type of
11182         "flags".
11183         * extension-priv.h (struct extension_language_ops)
11184         <apply_frame_filter>: Change type of "flags".
11185
11186 2018-02-26  Tom Tromey  <tom@tromey.com>
11187
11188         PR python/16497:
11189         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11190         off-by-one in py_end computation.
11191         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11192         PRINT_MORE_FRAMES.
11193         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11194         constant.
11195
11196 2018-02-26  Tom Tromey  <tom@tromey.com>
11197
11198         * dwarf2read.c (struct variant_field): New.
11199         (struct nextfield) <variant>: New field.
11200         (dwarf2_add_field): Handle DW_TAG_variant_part.
11201         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11202         discriminated union.
11203         (read_structure_type): Handle DW_TAG_variant_part.
11204         (handle_struct_member_die): New function, extracted from
11205         process_structure_scope.  Handle DW_TAG_variant.
11206         (process_structure_scope): Handle discriminated unions.  Call
11207         handle_struct_member_die.
11208
11209 2018-02-26  Tom Tromey  <tom@tromey.com>
11210
11211         * rust-lang.h (rust_last_path_segment): Declare.
11212         * rust-lang.c (rust_last_path_segment): Now public.  Change
11213         contract.
11214         (struct disr_info): Remove.
11215         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11216         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11217         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11218         (rust_enum_p, rust_enum_variant): New function.
11219         (rust_underscore_fields): Remove "offset" parameter.
11220         (rust_print_enum): New function.
11221         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11222         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11223         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11224         enums.
11225         (rust_internal_print_type): New function, from rust_print_type.
11226         Remove enum code.
11227         (rust_print_type): Call rust_internal_print_type.
11228         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11229         Update enum handling.
11230         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11231         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11232         (rust_union_quirks): New functions.
11233         (process_full_comp_unit, process_full_type_unit): Call
11234         rust_union_quirks.
11235         (process_structure_scope): Update rust_unions if necessary.
11236
11237 2018-02-26  Tom Tromey  <tom@tromey.com>
11238
11239         * value.h (value_union_variant): Declare.
11240         * valops.c (value_union_variant): New function.
11241         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11242         (struct discriminant_info): New.
11243         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11244         enumerator.
11245         (struct main_type) <flag_discriminated_union>: New field.
11246
11247 2018-02-26  Tom Tromey  <tom@tromey.com>
11248
11249         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11250         unittests/unpack-selftests.c.
11251         * unittests/unpack-selftests.c: New file.
11252         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11253
11254 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11255
11256         * dwarf2read.c (struct partial_die_info) <read>: New method.
11257         (read_partial_die): Remove the declaration.
11258         (load_partial_dies): Update.
11259         (partial_die_info::partial_die_info):
11260         (read_partial_die): Change it to partial_die_info::read.
11261
11262 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11263
11264         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11265         (fixup_partial_die): Remove declaration.
11266         (scan_partial_symbols): Update.
11267         (partial_die_parent_scope): Likewise.
11268         (partial_die_full_name): Likewise.
11269         (fixup_partial_die): Change it to partial_die_info::fixup.
11270
11271 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11272
11273         * dwarf2read.c (read_partial_die): Update the declaration.
11274         (load_partial_dies): Caller update.
11275         (read_partial_die): Remove one argument abbrev_len.
11276
11277 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11278
11279         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11280         assignment operator.
11281         (load_partial_dies): Use ctor and copy ctor.
11282         (read_partial_die): Update.
11283         (dwarf2_cu::find_partial_die): Use ctor.
11284
11285 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11286
11287         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11288         (find_partial_die_in_comp_unit): Change it to
11289         dwarf2_cu::find_partial_die.
11290         (find_partial_die): Update.
11291
11292 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11293
11294         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11295         is NULL.
11296
11297 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11298
11299         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11300
11301 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11302
11303         * arch/amd64.h: Use common/tdesc.h.
11304         * arch/i386.c: Likewise.
11305         * arch/i386.h: Likewise.
11306         * arch/tic6x.c: Likewise.
11307         * arch/tdesc.h: Move file from here...
11308         * common/tdesc.h: ...to here.
11309         * features/aarch64-core.c: Regenerate.
11310         * features/aarch64-fpu.c: Regenerate.
11311         * features/i386/32bit-avx.c: Regenerate.
11312         * features/i386/32bit-avx512.c: Regenerate.
11313         * features/i386/32bit-core.c: Regenerate.
11314         * features/i386/32bit-linux.c: Regenerate.
11315         * features/i386/32bit-mpx.c: Regenerate.
11316         * features/i386/32bit-pkeys.c: Regenerate.
11317         * features/i386/32bit-sse.c: Regenerate.
11318         * features/i386/64bit-avx.c: Regenerate.
11319         * features/i386/64bit-avx512.c: Regenerate.
11320         * features/i386/64bit-core.c: Regenerate.
11321         * features/i386/64bit-linux.c: Regenerate.
11322         * features/i386/64bit-mpx.c: Regenerate.
11323         * features/i386/64bit-pkeys.c: Regenerate.
11324         * features/i386/64bit-segments.c: Regenerate.
11325         * features/i386/64bit-sse.c: Regenerate.
11326         * features/i386/x32-core.c: Regenerate.
11327         * features/tic6x-c6xp.c: Regenerate.
11328         * features/tic6x-core.c: Regenerate.
11329         * features/tic6x-gp.c: Regenerate.
11330         * target-descriptions.c: Use common/tdesc.h.
11331         * target-descriptions.h: Likewise.
11332
11333 2018-02-24  Tom Tromey  <tom@tromey.com>
11334
11335         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11336         (try_thread_db_load_from_dir, thread_db_load_search): Use
11337         std::string.
11338         (info_auto_load_libthread_db_compare): Return bool.  Change
11339         argument types.
11340         (info_auto_load_libthread_db): Use std::vector, std::string.
11341         Remove cleanups.
11342
11343 2018-02-24  Tom Tromey  <tom@tromey.com>
11344
11345         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11346         std::string.
11347         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11348         std::string*.
11349         * gdbarch.c: Rebuild.
11350         * gdbarch.h: Rebuild.
11351         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11352         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11353         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11354         std::string*.
11355
11356 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11357
11358         * gdbtypes.h (sect_offset): Change type to uint64_t.
11359         (sect_offset_str): New function.
11360         * dwarf2read.c (create_addrmap_from_aranges): Use
11361         sect_offset_str.
11362         (error_check_comp_unit_head): Likewise.
11363         (create_debug_type_hash_table): Likewise.
11364         (read_cutu_die_from_dwo): Likewise.
11365         (init_cutu_and_read_dies): Likewise.
11366         (init_cutu_and_read_dies_no_follow): Likewise.
11367         (process_psymtab_comp_unit_reader): Likewise.
11368         (partial_die_parent_scope): Likewise.
11369         (peek_die_abbrev): Likewise.
11370         (process_queue): Likewise.
11371         (dwarf2_physname): Likewise.
11372         (read_namespace_alias): Likewise.
11373         (read_import_statement): Likewise.
11374         (create_dwo_cu_reader): Likewise.
11375         (create_cus_hash_table): Likewise.
11376         (lookup_dwo_cutu): Likewise.
11377         (inherit_abstract_dies): Likewise.
11378         (read_func_scope): Likewise.
11379         (read_call_site_scope): Likewise.
11380         (dwarf2_add_member_fn): Likewise.
11381         (read_common_block): Likewise.
11382         (read_module_type): Likewise.
11383         (read_typedef): Likewise.
11384         (read_subrange_type): Likewise.
11385         (load_partial_dies): Likewise.
11386         (read_partial_die): Likewise.
11387         (find_partial_die): Likewise.
11388         (read_str_index): Likewise.
11389         (dwarf2_string_attr): Likewise.
11390         (build_error_marker_type): Likewise.
11391         (lookup_die_type): Likewise.
11392         (dump_die_shallow): Likewise.
11393         (follow_die_ref): Likewise.
11394         (dwarf2_fetch_die_loc_sect_off): Likewise.
11395         (dwarf2_fetch_constant_bytes): Likewise.
11396         (follow_die_sig): Likewise.
11397         (get_signatured_type): Likewise.
11398         (get_DW_AT_signature_type): Likewise.
11399         (dwarf2_find_containing_comp_unit): Likewise.
11400         (set_die_type): Likewise.
11401
11402 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11403
11404         * arch/aarch64.c: Include "common-defs.h".
11405         * arch/amd64.c: Likewise.
11406         * arch/i386.c: Likewise.
11407
11408 2018-02-21  Tom Tromey  <tom@tromey.com>
11409
11410         * value.h: (extract_field_op): Update.
11411         * eval.c (extract_field_op): Return a const char *.
11412         * expression.h (parse_expression_for_completion): Update.
11413         * completer.c (complete_expression): Update.
11414         (add_struct_fields): Make fieldname const.
11415         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11416         (mark_completion_tag, parse_exp_in_context_1): Update.
11417         (parse_expression_for_completion): Change "name" to
11418         unique_xmalloc_ptr*.
11419
11420 2018-02-21  Tom Tromey  <tom@tromey.com>
11421
11422         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11423
11424 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11425
11426         * avr-tdep.c (avr_read_pc): Change parameter type to
11427         readable_regcache.
11428         * gdbarch.sh (read_pc): Likewise.
11429         * gdbarch.c: Re-generated.
11430         * gdbarch.h: Re-generated.
11431         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11432         readable_regcache.
11433         * ia64-tdep.c (ia64_read_pc): Likewise.
11434         * mips-tdep.c (mips_read_pc): Likewise.
11435         * spu-tdep.c (spu_read_pc): Likewise.
11436
11437 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11438
11439         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11440         * regcache-dump.c: New file.
11441         * regcache.c: Move register_dump to regcache-dump.c.
11442         (maintenance_print_registers): Likewise.
11443         (maintenance_print_raw_registers): Likewise.
11444         (maintenance_print_cooked_registers): Likewise.
11445         (maintenance_print_register_groups): Likewise.
11446         (maintenance_print_remote_registers): Likewise.
11447         (_initialize_regcache): Likewise.
11448         * regcache.h (register_dump): Moved from regcache.c.
11449
11450 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11451
11452         * regcache.c (regcache::regcache): Update.
11453         (regcache::invalidate): Move it to detached_regcache::invalidate.
11454         (get_thread_arch_aspace_regcache): Update.
11455         (regcache::raw_update): Update.
11456         (regcache::cooked_read): Remove some code.
11457         (regcache::cooked_read_value): Likewise.
11458         (regcache::raw_write): Remove assert on m_readonly_p.
11459         (regcache::raw_supply_integer): Move it to
11460         detached_regcache::raw_supply_integer.
11461         (regcache::raw_supply_zeroed): Likewise.
11462         * regcache.h (detached_regcache) <raw_supply_integer>: New
11463         declaration.
11464         <raw_supply_zeroed, invalidate>: Likewise.
11465         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11466         <invalidate>: Likewise.
11467         <m_readonly_p>: Removed.
11468
11469 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11470
11471         * infcmd.c (get_return_value): Let stop_regs point to
11472         get_current_regcache.
11473         * regcache.c (regcache::regcache): Remove.
11474         (register_dump_reg_buffer): New class.
11475         (regcache_print): Adjust.
11476         * regcache.h (regcache): Remove constructors.
11477
11478 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11479
11480         * regcache.c (class register_dump): New class.
11481         (register_dump_regcache, register_dump_none): New class.
11482         (register_dump_remote, register_dump_groups): New class.
11483         (regcache_print): Update.
11484         * regcache.h (regcache_dump_what): Move it to regcache.c.
11485         (regcache) <dump>: Remove.
11486
11487 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11488
11489         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11490          reg_buffer_rw *.
11491         (jit_unwind_reg_set_impl): Call raw_supply.
11492         (jit_frame_sniffer): Use reg_buffer_rw.
11493         * record-full.c (record_full_core_regbuf): Change its type.
11494         (record_full_core_open_1): Use reg_buffer_rw.
11495         (record_full_close): Likewise.
11496         (record_full_core_fetch_registers): Use regcache->raw_supply.
11497         (record_full_core_store_registers): Likewise.
11498         * regcache.c (regcache::get_register_status): Move it to
11499         reg_buffer.
11500         (regcache_raw_set_cached_value): Remove.
11501         (regcache::raw_set_cached_value): Remove.
11502         (regcache::raw_write): Call raw_supply.
11503         (regcache::raw_supply): Move it to reg_buffer_rw.
11504         * regcache.h (regcache_raw_set_cached_value): Remove.
11505         (reg_buffer_rw): New class.
11506
11507 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11508
11509         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11510         readonly_detached_regcache.
11511         (dummy_frame_prev_register): Use regcache->cooked_read.
11512         * frame.c (frame_save_as_regcache): Change return type.
11513         (frame_pop): Update.
11514         * frame.h (frame_save_as_regcache): Update declaration.
11515         * inferior.h (get_infcall_suspend_state_regcache): Update
11516         declaration.
11517         * infrun.c (infcall_suspend_state) <registers>: use
11518         readonly_detached_regcache.
11519         (save_infcall_suspend_state): Don't use regcache_dup.
11520         (get_infcall_suspend_state_regcache): Change return type.
11521         * linux-fork.c (struct fork_info) <savedregs>: Change to
11522         readonly_detached_regcache.
11523         <pc>: New field.
11524         (fork_save_infrun_state): Don't use regcache_dup.
11525         (info_checkpoints_command): Adjust.
11526         * mi/mi-main.c (register_changed_p): Update declaration.
11527         (mi_cmd_data_list_changed_registers): Use
11528         readonly_detached_regcache.
11529         (register_changed_p): Change parameter type to
11530         readonly_detached_regcache.
11531         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11532         readonly_detached_regcache.
11533         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11534         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11535         New.
11536         (regcache::save): Move it to reg_buffer.
11537         (regcache::restore): Change parameter type.
11538         (regcache_dup): Remove.
11539         * regcache.h (reg_buffer) <save>: New method.
11540         (readonly_detached_regcache): New class.
11541         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11542         readonly_detached_regcache.
11543         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11544
11545 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11546
11547         * frame.c (frame_save_as_regcache): Use regcache method save.
11548         (frame_pop): Use regcache method restore.
11549         * infrun.c (restore_infcall_suspend_state): Likewise.
11550         * linux-fork.c (fork_load_infrun_state): Likewise.
11551         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11552         save.
11553         * regcache.c (regcache_save): Remove.
11554         (regcache::restore): More asserts.
11555         (regcache_cpy): Remove.
11556         * regcache.h (regcache_save): Remove the declaration.
11557         (regcache::restore): Move from private to public.
11558         Remove the friend declaration of regcache_cpy.
11559         (regcache_cpy): Remove declaration.
11560
11561 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11562
11563         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11564         parameter type to 'readable_regcache *'.
11565         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11566         * arm-tdep.c (arm_neon_quad_read): Likewise.
11567         (arm_pseudo_read): Likewise.
11568         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11569         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11570         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11571         * gdbarch.c: Re-generated.
11572         * gdbarch.h: Re-generated.
11573         * gdbarch.sh (pseudo_register_read): Change parameter type to
11574         'readable_regcache *'.
11575         (pseudo_register_read_value): Likewise.
11576         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11577         (h8300_pseudo_register_read): Likewise.
11578         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11579         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11580         (i386_pseudo_register_read_into_value): Likewise.
11581         (i386_pseudo_register_read_value): Likewise.
11582         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11583         declaration.
11584         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11585         * m32c-tdep.c (m32c_raw_read): Likewise.
11586         (m32c_read_flg): Likewise.
11587         (m32c_banked_register): Likewise.
11588         (m32c_banked_read): Likewise.
11589         (m32c_sb_read): Likewise.
11590         (m32c_part_read): Likewise.
11591         (m32c_cat_read): Likewise.
11592         (m32c_r3r2r1r0_read): Likewise.
11593         (m32c_pseudo_register_read): Likewise.
11594         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11595         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11596         (mep_pseudo_cr64_read): Likewise.
11597         (mep_pseudo_register_read): Likewise.
11598         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11599         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11600         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11601         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11602         (regcache::cooked_read): Likewise.
11603         (regcache::cooked_read_value): Likewise.
11604         (regcache_cooked_read_signed):
11605         (regcache::cooked_read): Likewise.
11606         * regcache.h (readable_regcache): New class.
11607         (regcache): Inherit readable_regcache.  Move some methods to
11608         readable_regcache.
11609         * rl78-tdep.c (rl78_pseudo_register_read): Change
11610         parameter type to 'readable_regcache *'.
11611         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11612         (e500_pseudo_register_read): Change parameter type to
11613         'readable_regcache *'.
11614         (dfp_pseudo_register_read): Likewise.
11615         (vsx_pseudo_register_read): Likewise.
11616         (efpr_pseudo_register_read): Likewise.
11617         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11618         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11619         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11620         (sh64_pseudo_register_read): Likewise.
11621         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11622         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11623         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11624         (spu_pseudo_register_read): Likewise.
11625         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11626         (xtensa_pseudo_register_read): Likewise.
11627
11628 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11629
11630         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11631         (regcache::arch): Move it to reg_buffer::arch.
11632         (regcache::register_buffer): Likewise.
11633         (regcache::assert_regnum): Likewise.
11634         (regcache::num_raw_registers): Likewise.
11635         * regcache.h (reg_buffer): New class.
11636         (regcache): Inherit reg_buffer.
11637
11638 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11639
11640         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11641         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11642
11643 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11644
11645         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11646
11647 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11648
11649         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11650         (SFILES): Remove common/*.c files.
11651         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11652         * common/common.host: Add common reference.
11653         * configure.ac: Likewise.
11654         * configure: Regenerate.
11655
11656 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11657
11658         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11659         (block_initialize_namespace): Use new.
11660         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11661         (dwarf2_free_objfile): Use delete.
11662         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11663         (copy_type_recursive): Use new.
11664         * gdb_obstack.h (allocate_on_obstack): New.
11665
11666 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11667
11668         PR gdb/22849
11669         * inferior.c (exit_inferior_1): Reset inf->control.
11670
11671 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11672
11673         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11674         declaration.
11675
11676 2018-02-14  Pedro Alves  <palves@redhat.com>
11677
11678         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11679         frame_cleanup_after_sniffer on exception.
11680
11681 2018-02-14  Tom Tromey  <tom@tromey.com>
11682
11683         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11684         const.
11685         (solib_bfd_open): Make pathname const.
11686         * solib.c (solib_bfd_open): Make pathname const.
11687         * solib-spu.c (spu_bfd_fopen): Make name const.
11688         (spu_bfd_open): Make pathname const.
11689         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11690         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11691
11692 2018-02-14  Tom Tromey  <tom@tromey.com>
11693
11694         * symfile.c (symfile_bfd_open): Update.
11695         * source.h (openp, source_full_path_of, find_and_open_source):
11696         Change argument type to unique_xmalloc_ptr.
11697         * source.c (openp): Take a unique_xmalloc_ptr.
11698         (source_full_path_of, find_and_open_source): Likewise.
11699         (open_source_file, symtab_to_fullname): Update.
11700         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11701         unique_xmalloc_ptr.
11702         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11703         (exec_file_find): Update.
11704         * psymtab.c (psymtab_to_fullname): Update.
11705         * nto-tdep.h (nto_find_and_open_solib): Update.
11706         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11707         unique_xmalloc_ptr.
11708         * exec.c (exec_file_attach): Update.
11709         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11710         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11711
11712 2018-02-14  Tom Tromey  <tom@tromey.com>
11713
11714         * solib.c: Include source.h.
11715         * nto-tdep.c: Include source.h.
11716         * mi/mi-cmd-env.c: Include source.h.
11717         * infcmd.c: Include source.h.
11718         * exec.c: Include source.h.
11719         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11720         (add_path, directory_switch, source_path, init_source_path): Move
11721         declarations...
11722         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11723         (add_path, directory_switch, source_path, init_source_path):
11724         ...here.
11725
11726 2018-02-14  Tom Tromey  <tom@tromey.com>
11727
11728         * solist.h (exec_file_find, solib_find): Return
11729         unique_xmalloc_ptr.
11730         (solib_bfd_fopen): Take a const char *.
11731         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11732         (exec_file_find, solib_find): Likewise.
11733         (solib_bfd_fopen): Do not take ownership of "pathname".
11734         (solib_bfd_open): Use unique_xmalloc_ptr.
11735         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11736         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11737         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11738         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11739
11740 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11741
11742         * ada-lang.c (name_match_type_from_name): Remove reference to
11743         ada_name_for_lookup in function's documentation.
11744         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11745
11746 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11747
11748         * defs.h (enum openp_flags): New enum.
11749         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11750         Move to enum openp_flags.
11751         (openp_flags): New enum flags.
11752         (openp): Change parameter type to openp_flags.
11753         * source.c (openp): Change parameter type to openp_flags.
11754         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11755         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11756
11757 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11758
11759         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11760         per-command.
11761
11762 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11763
11764         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11765         into...
11766         (class dwarf2_queue_guard): ...the destructor of this new class.
11767         (dw2_do_instantiate_symtab): Create instance of the new class
11768         dwarf2_queue_guard, remove cleanup.
11769
11770 2018-02-09  Tom Tromey  <tom@tromey.com>
11771
11772         * source.c (find_source_lines): Don't reference past the end of
11773         the vector.
11774
11775 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11776
11777         * remote.c (remote_btrace_maybe_reopen): Change error message.
11778         * btrace.c (btrace_enable): Likewise.
11779         (parse_xml_btrace): Likewise.
11780         (parse_xml_btrace_conf): Likewise.
11781
11782 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11783
11784         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11785         (linux_enable_pt, linux_enable_bts): Call
11786         diagnose_perf_event_open_fail.
11787
11788 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11789
11790         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11791         Remove parameter and change return type.  Update callers.  Move it.
11792         (linux_enable_bts, linux_enable_pt): Improve error message.
11793         (linux_enable_pt): Remove zero buffer size check.
11794         (linux_enable_btrace): Improve error messages.  Remove NULL return
11795         check.
11796
11797 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11798
11799         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11800         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11801         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11802         (linux_supports_pt, linux_supports_btrace): Remove.
11803         (linux_enable_bts): Call cpu_supports_bts.
11804         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11805         * remote.c (remote_supports_btrace): Remove.
11806         (init_remote_ops): Remove remote_supports_btrace.
11807         * target-delegates.c: Regenerated.
11808         * target.c (target_supports_btrace): Remove.
11809         * target.h (target_ops) <to_supports_btrace>: Remove
11810         (target_supports_btrace): Remove.
11811         * x86-linux-nat.c (x86_linux_create_target): Remove
11812         linux_supports_btrace.
11813
11814 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11815
11816         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11817         btrace failed.
11818         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11819         exception and use message in own exception.
11820
11821 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11822
11823         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11824         (perf_event_pt_event_type): Use gdb_file_up.
11825         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11826         scoped_fd, and scoped_mmap.
11827
11828 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11829
11830         * common/scoped_mmap.h: New.
11831         * unittests/scoped_mmap-selftest.c: New.
11832         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11833         unittests/scoped_mmap-selftest.c.
11834
11835 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11836
11837         * common/scoped_fd.h: New.
11838         * unittests/scoped_fd-selftest.c: New.
11839         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11840         unittests/scoped_fd-selftest.c.
11841
11842 2018-02-09  Tom Tromey  <tom@tromey.com>
11843
11844         * auto-load.c (auto_load_section_scripts): Use
11845         gdb::unique_xmalloc_ptr.
11846
11847 2018-02-09  Tom Tromey  <tom@tromey.com>
11848
11849         * auto-load.c (execute_script_contents): Use std::string.
11850
11851 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
11852
11853         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11854         Python function, rather than a new command.
11855
11856 2018-02-08  Tom Tromey  <tom@tromey.com>
11857
11858         * solib.c (solib_find_1): Use std::string.
11859         (solib_bfd_fopen): Use unique_xmalloc_ptr.
11860
11861 2018-02-08  Tom Tromey  <tom@tromey.com>
11862
11863         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11864
11865 2018-02-08  Tom Tromey  <tom@tromey.com>
11866
11867         * source.c (find_source_lines): Use gdb::def_vector.
11868
11869 2018-02-08  Tom Tromey  <tom@tromey.com>
11870
11871         * macrocmd.c (struct temporary_macro_definition): New.
11872         (macro_define_command): Use temporary_macro_definition.  Remove
11873         cleanups.
11874         (free_macro_definition_ptr): Remove.
11875
11876 2018-02-08  Tom Tromey  <tom@tromey.com>
11877
11878         * macroexp.c (maybe_expand): Use std::string.
11879
11880 2018-02-08  Tom Tromey  <tom@tromey.com>
11881
11882         * macroexp.c (struct macro_buffer): Add initializers for some
11883         members.
11884         (init_buffer, init_shared_buffer, free_buffer)
11885         (free_buffer_return_text): Remove.
11886         (macro_buffer): New constructors.
11887         (~macro_buffer): New destructor.
11888         (macro_buffer::set_shared): New method.
11889         (macro_buffer::resize_buffer, macro_buffer::appendc)
11890         (macro_buffer::appendmem): Now methods, not free functions.
11891         (set_token, append_tokens_without_splicing, stringify)
11892         (macro_stringify): Update.
11893         (gather_arguments): Change return type.  Remove argc_p argument,
11894         add args_ptr argument.  Use std::vector.
11895         (substitute_args): Remove argc argument.  Accept std::vector.
11896         (expand): Update.  Use std::vector.
11897         (scan, macro_expand, macro_expand_next): Update.
11898
11899 2018-02-08  Tom Tromey  <tom@tromey.com>
11900
11901         * symtab.c (default_collect_symbol_completion_matches_break_on):
11902         Use unique_xmalloc_ptr.
11903         * macroscope.h: (sal_macro_scope, user_macro_scope)
11904         (default_macro_scope): Return unique_xmalloc_ptr.
11905         * macroscope.c (sal_macro_scope, user_macro_scope)
11906         (default_macro_scope): Return unique_xmalloc_ptr.
11907         * macroexp.h (macro_expand, macro_expand_once): Return
11908         unique_xmalloc_ptr.
11909         * macroexp.c (macro_expand, macro_expand_once): Return
11910         unique_xmalloc_ptr.
11911         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11912         (info_macro_command, info_macros_command): Use
11913         unique_xmalloc_ptr.
11914         * compile/compile-c-support.c (write_macro_definitions): Use
11915         unique_xmalloc_ptr.
11916         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11917
11918 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11919
11920         * value.c (value_static_field): Assign field type instead of
11921         containing type when returning an optimized out value.
11922
11923 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11924
11925         * ft32-tdep.c (ft32_read_pc): Remove.
11926         (ft32_write_pc): Remove.
11927         (ft32_gdbarch_init): Update.
11928         * m32r-tdep.c (m32r_read_pc): Remove.
11929         (m32r_gdbarch_init): Update.
11930         * mep-tdep.c (mep_read_pc): Remove.
11931         (mep_gdbarch_init): Update.
11932         * microblaze-tdep.c (microblaze_write_pc): Remove.
11933         (microblaze_gdbarch_init): Update.
11934         * mn10300-tdep.c (mn10300_read_pc): Remove.
11935         (mn10300_write_pc): Remove.
11936         (mn10300_gdbarch_init): Update.
11937         * moxie-tdep.c (moxie_read_pc): Remove.
11938         (moxie_write_pc): Remove.
11939         (moxie_gdbarch_init): Update.
11940
11941 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11942
11943         * expprint.c (print_subexp_standard): Handle
11944         OP_F77_UNDETERMINED_ARGLIST.
11945         (dump_subexp_body_standard): Likewise.
11946
11947 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11948
11949         * target-descriptions.c (tdesc_element_visitor) Add empty
11950         implementations.
11951         (tdesc_type): Move make_gdb_type from here.
11952         (tdesc_type_builtin): Likewise.
11953         (tdesc_type_vector): Likewise.
11954         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11955         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11956         (make_gdb_type_union): Likewise.
11957         (make_gdb_type_flags): Likewise.
11958         (make_gdb_type_enum): Likewise.
11959         (make_gdb_type): New function.
11960         (tdesc_register_type): Use static make_gdb_type.
11961
11962 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11963
11964         * infcmd.c (default_print_one_register_info): Align natural-format
11965         column values consistently one under another.
11966         (pad_to_column): New function.
11967
11968 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11969
11970         * dwarf2read.c (dwarf2_physname): Move commment.
11971
11972 2018-02-01  Leszek Swirski  <leszeks@google.com>
11973
11974         * varobj.c (varobj_formatted_print_options): Allow recursive
11975         pretty printing if pretty printing is enabled.
11976
11977 2018-02-01  Leszek Swirski  <leszeks@google.com>
11978
11979         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11980         names after a structop as a filename.
11981
11982 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11983
11984         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11985         (arm_record_coproc_data_proc): Likewise.
11986
11987 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11988
11989         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11990
11991 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11992
11993         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11994         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11995
11996 2018-01-31  Pedro Alves  <palves@redhat.com>
11997
11998         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11999         * inflow.c (child_terminal_save_inferior): Wrap reference to
12000         tcgetpgrp in HAVE_TERMIOS_H.
12001         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12002         _WIN32.
12003         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12004         always iterate over all inferiors.
12005         (gdbsim_cntrl_c): Adjust.
12006         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12007
12008 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12009
12010         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12011         index type is objfile-owned if the element type is as well.
12012
12013 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12014
12015         GDB 8.1 released.
12016
12017 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12018
12019         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12020         "features/s390x-linux64.c".
12021         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12022         s390_linux32 and s390x_linux64.
12023         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12024         default tdesc.
12025         * s390-tdep.c: Include "features/s390-linux32.c" and
12026         "features/s390x-linux64.c".
12027         (s390_tdesc_valid): Add check for tdesc_has_registers.
12028         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12029         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12030         tdesc_s390x_linux64.
12031         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12032         tdesc_s390x_linux64 to...
12033         * s390-tdep.h: ...here.
12034
12035 2018-01-30  Pedro Alves  <palves@redhat.com>
12036
12037         PR gdb/13211
12038         * config.in, configure: Regenerate.
12039         * configure.ac: Check for getpgid.
12040         * go32-nat.c (go32_pass_ctrlc): New.
12041         (go32_target): Install it.
12042         * inf-child.c (inf_child_target): Install
12043         child_terminal_save_inferior, child_pass_ctrlc and
12044         child_interrupt.
12045         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12046         (inf_ptrace_target): No longer install it.
12047         * infcmd.c (interrupt_target_1): Adjust.
12048         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12049         (child_interrupt): Declare.
12050         (inferior::terminal_state): New.
12051         * inflow.c (struct terminal_info): Update comments.
12052         (inferior_process_group): Delete.
12053         (terminal_is_ours): Delete.
12054         (gdb_tty_state): New.
12055         (child_terminal_init): Adjust.
12056         (is_gdb_terminal, sharing_input_terminal_1)
12057         (sharing_input_terminal): New functions.
12058         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12059         Set the process's actual process group in the foreground if
12060         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12061         mark terminal as the inferior's if not sharing GDB's terminal.
12062         Don't check attach_flag.
12063         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12064         pass down a target_terminal_state.
12065         (child_terminal_save_inferior): New, factored out from ...
12066         (child_terminal_ours_1): ... this.  Handle
12067         target_terminal_state::is_ours_for_output.
12068         (child_interrupt, child_pass_ctrlc): New.
12069         (inflow_inferior_exit): Clear the inferior's terminal_state.
12070         (copy_terminal_info): Copy the inferior's terminal state.
12071         (_initialize_inflow): Remove reference to terminal_is_ours.
12072         * inflow.h (inferior_process_group): Delete.
12073         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12074         * procfs.c (procfs_target): Don't install procfs_interrupt.
12075         (procfs_interrupt): Delete.
12076         * remote.c (remote_serial_quit_handler): Adjust.
12077         (remote_interrupt): Remove ptid parameter.  Adjust.
12078         * target-delegates.c: Regenerate.
12079         * target.c: Include "terminal.h".
12080         (target_terminal::terminal_state): Rename to ...
12081         (target_terminal::m_terminal_state): ... this.
12082         (target_terminal::init): Adjust.
12083         (target_terminal::inferior): Adjust to per-inferior
12084         terminal_state.
12085         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12086         (target_terminal::ours, target_terminal::ours_for_output): Use
12087         target_terminal_is_ours_kind.
12088         (target_interrupt): Remove ptid parameter.  Adjust.
12089         (default_target_pass_ctrlc): Adjust.
12090         * target.h (target_ops::to_terminal_save_inferior): New field.
12091         (target_ops::to_interrupt): Remove ptid_t parameter.
12092         (target_interrupt): Remove ptid_t parameter.  Update comment.
12093         (target_pass_ctrlc): Update comment.
12094         * target/target.h (target_terminal_state): New scoped enum,
12095         factored out of ...
12096         (target_terminal::terminal_state): ... here.
12097         (target_terminal::inferior): Update comments.
12098         (target_terminal::restore_inferior): New.
12099         (target_terminal::is_inferior, target_terminal::is_ours)
12100         (target_terminal::is_ours_for_output): Adjust.
12101         (target_terminal::scoped_restore_terminal_state): Adjust to
12102         rename, and call restore_inferior() instead of inferior().
12103         (target_terminal::scoped_restore_terminal_state::m_state): Change
12104         type.
12105         (target_terminal::terminal_state): Rename to ...
12106         (target_terminal::m_terminal_state): ... this and change type.
12107
12108 2018-01-30  Pedro Alves  <palves@redhat.com>
12109
12110         * linux-nat.c (wait_for_signal): New function.
12111         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12112         directly.
12113         (async_terminal_is_ours)
12114         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12115         (linux_nat_add_target): Don't override
12116         to_terminal_inferior/to_terminal_ours.
12117
12118 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12119
12120         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12121
12122 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12123
12124         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12125         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12126         dwarf2_per_objfile_free here.
12127         (dwarf2_per_objfile_free): Remove.
12128         (_initialize_dwarf2_read): Don't register
12129         dwarf2_per_objfile_free as a registry cleanup.
12130
12131 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12132
12133         Avoid compilation errors in MinGW native builds
12134
12135         The error is triggered by including python-internal.h, and the
12136         error message is:
12137
12138              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12139                       from build-gnulib/import/math.h:27,
12140                       from d:/usr/Python26/include/pyport.h:235,
12141                       from d:/usr/Python26/include/Python.h:58,
12142                       from python/python-internal.h:94,
12143                       from python/py-arch.c:24:
12144              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12145         using ::hypot;
12146                 ^~~~~
12147
12148         This happens because Python headers define 'hypot' to expand t
12149         '_hypot' in the Windows builds.
12150         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12151         'hypoth'.  This avoids a compilation error.
12152
12153 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12154
12155         * MAINTAINERS (Write After Approval): Fix ordering.
12156
12157 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12158
12159         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12160
12161 2018-01-26  Alan Modra  <amodra@gmail.com>
12162
12163         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12164         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12165         Remove nop.  Make const.  Comment.
12166         (powerpc32_plt_stub_so_2): New.
12167         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12168         Correct count.  Update uses.
12169         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12170         Move common code reading PLT entry word.  Correct
12171         powerpc32_plt_stub PLT address calculation.
12172         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12173         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12174         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12175         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12176         (ppc64_standard_linkage8): Likewise.
12177         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12178         Correct insns description.
12179         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12180
12181 2018-01-24  Pedro Alves  <palves@redhat.com>
12182
12183         GCC PR libstdc++/83906
12184         * gdbtypes.c (operator==(const dynamic_prop &,
12185         const dynamic_prop &)): New.
12186         (operator==(const range_bounds &, const range_bounds &)): New.
12187         (check_types_equal): Use them instead of memcmp.
12188         * gdbtypes.h (operator==(const dynamic_prop &,
12189         const dynamic_prop &)): Declare.
12190         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12191         (operator==(const range_bounds &, const range_bounds &)): Declare.
12192         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12193
12194 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12195
12196         * s390-linux-tdep.c (s390_record_address_mask)
12197         (s390_record_calc_disp_common, s390_record_calc_disp)
12198         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12199         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12200         (s390_process_record): Move to s390-tdep.c.
12201         (s390_linux_init_abi_any): Adjust.
12202         * s390-tdep.c (s390_record_address_mask)
12203         (s390_record_calc_disp_common, s390_record_calc_disp)
12204         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12205         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12206         (s390_process_record): Moved from s390-linux-tdep.c
12207         (s390_gdbarch_init): Adjust.
12208
12209 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12210
12211         * s390-linux-nat.c (s390-tdep.h): New include.
12212         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12213         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12214         (ALLDEPFILES): Add s390-tdep.c.
12215         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12216         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12217         * s390-tdep.h: ...this.  New file.
12218         * s390-linux-tdep.c (s390-tdep.h): New include.
12219         (_initialize_s390_tdep): Rename to...
12220         (_initialize_s390_linux_tdep): ...this and adjust.
12221         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12222         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12223         s390-tdep.h.
12224         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12225         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12226         (s390_is_partial_instruction, s390_software_single_step)
12227         (is_non_branch_ril, s390_displaced_step_copy_insn)
12228         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12229         (s390_prologue_data, s390_addr, s390_store, s390_load)
12230         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12231         (s390_register_call_saved, s390_guess_tracepoint_registers)
12232         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12233         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12234         (s390_pseudo_register_name, s390_pseudo_register_type)
12235         (s390_pseudo_register_read, s390_pseudo_register_write)
12236         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12237         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12238         (s390_addr_bits_remove, s390_address_class_type_flags)
12239         (s390_address_class_type_flags_to_name)
12240         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12241         (s390_function_arg_float, s390_function_arg_vector)
12242         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12243         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12244         (s390_frame_align, s390_register_return_value, s390_return_value)
12245         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12246         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12247         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12248         (s390_trad_frame_prev_register, s390_unwind_cache)
12249         (s390_prologue_frame_unwind_cache)
12250         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12251         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12252         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12253         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12254         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12255         (s390_frame_base_address, s390_local_base_address)
12256         (s390_frame_base, s390_gcc_target_options)
12257         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12258         (s390_validate_reg_range, s390_tdesc_valid)
12259         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12260         * s390-tdep.c: ...this.  New file.
12261
12262 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12263
12264         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12265         (s390_process_record, s390_gdbarch_tdep_alloc)
12266         (s390_linux_init_abi_any): Use/set new hook.
12267
12268 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12269
12270         * s390-linux-tdep.c (osabi.h): New include.
12271         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12272         (s390_linux_init_abi_any): New functions.
12273         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12274
12275 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12276
12277         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12278         tdesc_has_registers check
12279
12280 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12281
12282         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12283         (s390_validate_reg_range): New macro.
12284         (s390_gdbarch_init): Adjust.
12285
12286 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12287
12288         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12289         (s390_gdbarch_tdep_alloc): Adjust.
12290         (s390_gdbarch_init): Adjust.
12291
12292 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12293
12294         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12295         <have_tdb>: Change type to bool.
12296         (s390_gdbarch_tdep_alloc): Adjust.
12297         (s390_gdbarch_init): Adjust.
12298
12299 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12300
12301         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12302         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12303         (s390_gdbarch_tdep_alloc): New function.
12304         (s390_gdbarch_init): Allocate tdep at start and use its fields
12305         instead of separate variables.
12306
12307 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12308
12309         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12310         when looking for cached gdbarch and add comment for remaining.
12311
12312 2018-01-22  Pedro Alves  <palves@redhat.com>
12313             Sergio Durigan Junior  <sergiodj@redhat.com>
12314
12315         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12316         case.
12317
12318 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12319
12320         * MAINTAINERS: Update my company e-mail address.
12321
12322 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12323
12324         * regcache.c (cooked_write_test): New function.
12325         (_initialize_regcache): Register the test.
12326
12327 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12328
12329         * ia64-tdep.c (ia64_pseudo_register_read): Call
12330         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12331         * m32c-tdep.c (m32c_cat_read): Likewise.
12332         (m32c_r3r2r1r0_read): Likewise.
12333         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12334         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12335
12336 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12337
12338         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12339         method raw_read instead of regcache_raw_read.
12340         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12341         * arm-tdep.c (arm_neon_quad_read): Likewise.
12342         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12343         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12344         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12345         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12346         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12347         (i386_pseudo_register_read_into_value): Likewise.
12348         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12349         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12350         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12351         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12352         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12353         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12354         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12355         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12356         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12357
12358 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12359
12360         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12361         * configure.tgt: Remove target mt.
12362         * mt-tdep.c: Remove.
12363         * regcache.c (cooked_read_test): Remove the check for mt.
12364
12365 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12366
12367         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12368         instead of gdbarch_pseudo_register_read_value.
12369
12370 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12371
12372         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12373         language is Ada.
12374
12375 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12376
12377         * linespec.c (create_sals_line_offset): Remove code that preserved
12378         the symtab_and_line's line number.
12379
12380 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12381
12382         * varobj.c (varobj_create): Don't set valid_block when creating a
12383         floating varobj.
12384
12385 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12386
12387         * varobj.c (varobj_create): Remove out of date comment.
12388
12389 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12390
12391         PR mi/20395
12392         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12393         updating innermost block.
12394         * parse.c (innermost_block_tracker::update): Take extra type
12395         parameter, and check types match before updating innermost block.
12396         (write_dollar_variable): Update innermost block for registers.
12397         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12398         (innermost_block_tracker::innermost_block_tracker): Initialise
12399         m_types member.
12400         (innermost_block_tracker::reset): Take type parameter.
12401         (innermost_block_tracker::update): Take type parameter, and pass
12402         type through as needed.
12403         (innermost_block_tracker::m_types): New member.
12404         * varobj.c (varobj_create): Pass type when reseting innermost
12405         block.
12406
12407 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12408
12409         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12410         * ada-lang.c (resolve_subexp): Likewise.
12411         * breakpoint.c (set_breakpoint_condition) Likewise.
12412         (watch_command_1) Likewise.
12413         * c-exp.y (variable): Likewise.
12414         * d-exp.y (PrimaryExpression): Likewise.
12415         * f-exp.y (variable): Likewise.
12416         * go-exp.y (variable): Likewise.
12417         * m2-exp.y (variable): Likewise.
12418         * objfiles.c (objfile::~objfile): Likewise.
12419         * p-exp.y (variable): Likewise.
12420         * parse.c (innermost_block): Change type.
12421         * parser-defs.h (class innermost_block_tracker): New.
12422         (innermost_block): Change to innermost_block_tracker.
12423         * printcmd.c (display_command): Switch to innermost_block API.
12424         (do_one_display): Likewise.
12425         * rust-exp.y (do_one_display): Likewise.
12426         * symfile.c (clear_symtab_users): Likewise.
12427         * varobj.c (varobj_create): Switch to innermost_block API, replace
12428         use of innermost_block with block stored on varobj object.
12429
12430 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12431
12432         * expression.h (innermost_block): Remove declaration.
12433         * varobj.c: Add 'parser-defs.h' include.
12434
12435 2018-01-19  Tom Tromey  <tom@tromey.com>
12436
12437         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12438         symbols in the static and global blocks.
12439
12440 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12441
12442         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12443         gdb_ptrace.h, and move including gdb_wait.h ...
12444         * nat/linux-ptrace.h: ... to here.
12445
12446 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12447
12448         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12449         inf_ptrace_detach_success.
12450         (inf_ptrace_detach_success): Add inferior parameter, use it
12451         instead of inferior_ptid, pass it to detach_inferior.
12452         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12453         parameter.
12454         * inferior.c (detach_inferior): Add overload that takes an
12455         inferior object.
12456         * inferior.h (detach_inferior): Likewise.
12457         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12458         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12459         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12460
12461 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12462
12463         * target.h (struct target_ops) <to_detach>: Add inferior
12464         parameter.
12465         (target_detach): Likewise.
12466         * target.c (dispose_inferior): Pass inferior down.
12467         (target_detach): Pass inferior down.  Assert that it is equal to
12468         the current inferior.
12469         * aix-thread.c (aix_thread_detach): Pass inferior down.
12470         * corefile.c (core_file_command): Pass current_inferior() down.
12471         * corelow.c (core_detach): Add inferior parameter.
12472         * darwin-nat.c (darwin_detach): Likewise.
12473         * gnu-nat.c (gnu_detach): Likewise.
12474         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12475         * infcmd.c (detach_command): Pass current_inferior() down to
12476         target_detach.
12477         * infrun.c (follow_fork_inferior): Pass parent_inf to
12478         target_detach.
12479         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12480         target_detach.
12481         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12482         * linux-thread-db.c (thread_db_detach): Likewise.
12483         * nto-procfs.c (procfs_detach): Likewise.
12484         * procfs.c (procfs_detach): Likewise.
12485         * record.c (record_detach): Likewise.
12486         * record.h (struct inferior): Forward-declare.
12487         (record_detach): Add inferior parameter.
12488         * remote-sim.c (gdbsim_detach): Likewise.
12489         * remote.c (remote_detach_1): Likewise.
12490         (remote_detach): Likewise.
12491         (extended_remote_detach): Likewise.
12492         * sol-thread.c (sol_thread_detach): Likewise.
12493         * target-debug.h (target_debug_print_inferior_p): New macro.
12494         * target-delegates.c: Re-generate.
12495         * top.c (kill_or_detach): Pass inferior down to target_detach.
12496         * windows-nat.c (windows_detach): Add inferior parameter.
12497
12498 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12499
12500         * target.h (struct target_ops) <to_detach>: Remove args
12501         parameter.
12502         (target_detach): Likewise.
12503         * target.c (dispose_inferior): Adjust.
12504         (target_detach): Remove args parameter, adjust.
12505         * aix-thread.c (aix_thread_detach): Adjust.
12506         * corefile.c (core_file_command): Adjust.
12507         * corelow.c (core_detach): Adjust.
12508         * darwin-nat.c (darwin_detach): Adjust.
12509         * gnu-nat.c (gnu_detach): Adjust.
12510         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12511         * infcmd.c (detach_command): Adjust
12512         * infrun.c (follow_fork_inferior): Adjust.
12513         (handle_vfork_child_exec_or_exit): Adjust.
12514         * linux-fork.c (linux_fork_detach): Remove args parameter.
12515         * linux-fork.h (linux_fork_detach): Likewise.
12516         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12517         * linux-thread-db.c (thread_db_detach): Likewise.
12518         * nto-procfs.c (procfs_detach): Likewise.
12519         * procfs.c (procfs_detach): Likewise.
12520         (do_detach): Remove signo parameter.
12521         * record.c (record_detach): Remove args parameter.
12522         * record.h (record_detach): Likewise.
12523         * remote-sim.c (gdbsim_detach): Likewise.
12524         * remote.c (remote_detach_1): Likewise.
12525         (remote_detach): Likewise.
12526         (extended_remote_detach): Likewise.
12527         * sol-thread.c (sol_thread_detach): Likewise.
12528         * target-delegates.c: Re-generate.
12529         * top.c (struct qt_args) <args>: Remove field.
12530         (kill_or_detach): Don't pass args.
12531         (quit_force): Don't set args.
12532         * windows-nat.c (windows_detach): Remove args parameter.
12533
12534 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12535
12536         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12537         (arm_linux_init_abi): Install it.
12538
12539 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12540
12541         * osabi.c (gdb_osabi_names): Extend the regexp for
12542         arm-linux-gnueabihf.
12543
12544 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12545
12546         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12547         m_abbrevs.
12548         (abbrev_table::add_abbrev): Update.
12549         (abbrev_table::lookup_abbrev): Update.
12550
12551 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12552
12553         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12554
12555 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12556
12557         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12558         to "std::string".
12559
12560 2018-01-17  Tom Tromey  <tom@tromey.com>
12561
12562         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12563
12564 2018-01-17  Tom Tromey  <tom@tromey.com>
12565
12566         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12567         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12568         (create_array_type_with_stride): Update.
12569         * dwarf2read.c (set_die_type): Update.
12570
12571 2018-01-17  Tom Tromey  <tom@tromey.com>
12572
12573         * dwarf2read.c (delayed_method_info): Remove typedef.
12574         (dwarf2_cu::method_info): Now a std::vector.
12575         (add_to_method_list): Update.
12576         (free_delayed_list): Remove.
12577         (compute_delayed_physnames): Update.
12578         (process_full_comp_unit, process_full_type_unit): Clear the method
12579         list.  Remove cleanups.
12580         (psymtab_include_file_name): Add name_holder parameter.  Use
12581         unique_xmalloc_ptr.
12582         (dwarf_decode_lines): Update.
12583
12584 2018-01-17  Tom Tromey  <tom@tromey.com>
12585             Simon Marchi  <simon.marchi@ericsson.com>
12586
12587         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12588         (dwarf2_per_objfile::free_cached_comp_units)
12589         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12590         (init_cutu_and_read_dies_no_follow): Update.
12591         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12592         (dwarf2_cu::~dwarf2_cu): New.
12593         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12594         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12595
12596 2018-01-17  Tom Tromey  <tom@tromey.com>
12597             Simon Marchi  <simon.marchi@ericsson.com>
12598
12599         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12600         (struct die_reader_specs) <abbrev_table>: New member.
12601         (struct abbrev_table): Add constructor.
12602         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12603         <abbrev_obstack>: Now an auto_obstack.
12604         (abbrev_table_up): New typedef.
12605         (init_cu_die_reader): Add abbrev_table parameter.
12606         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12607         Add result_dwo_abbrev_table.
12608         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12609         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12610         Update.
12611         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12612         parameter.
12613         (skip_children): Update.
12614         (abbrev_table::alloc_abbrev): Rename from
12615         abbrev_table_alloc_abbrev.
12616         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12617         (abbrev_table::lookup_abbrev): Rename from
12618         abbrev_table_lookup_abbrev.
12619         (abbrev_table_read_table): Return abbrev_table_up.
12620         (abbrev_table_free, abbrev_table_free_cleanup)
12621         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12622         (load_partial_dies): Update.
12623
12624 2018-01-17  Tom Tromey  <tom@tromey.com>
12625
12626         * dwarf2read.c (dwarf2_compute_name): Update comment.
12627         (read_func_scope, read_variable): Update.
12628         (new_symbol): Remove.
12629         (new_symbol_full): Rename to new_symbol.
12630
12631 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12632
12633         PR gdb/16577
12634         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12635         a warning instead of throwing an error, set section size to 0 and return
12636         NULL.
12637         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12638
12639 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12640
12641         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12642         std::string.
12643         (linux_ptrace_attach_fail_reason_string): Likewise.
12644         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12645         Likewise.
12646         (linux_ptrace_attach_fail_reason_string): Likewise.
12647         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12648
12649 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12650
12651         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12652
12653 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12654
12655         PR gdb/21559
12656         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12657         checking for fs_base/gs_base fields in struct user_regs_struct.
12658         * configure: Regenerate.
12659
12660 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12661
12662         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12663         function.
12664         (aarch64_linux_init_abi): Install it to gdbarch hook
12665         gcc_target_options.
12666
12667 2018-01-15  Pedro Alves  <palves@redhat.com>
12668
12669         * common/signals-state-save-restore.c
12670         (save_original_signals_state): Fix typos.
12671
12672 2017-01-12  Tom Tromey  <tom@tromey.com>
12673             Sergio Durigan Junior  <sergiodj@redhat.com>
12674
12675         * Makefile.in (install-only): Install gdb-add-index.
12676
12677 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12678
12679         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12680
12681 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12682
12683         * infrun.c (keep_going_pass_signal): Clear step-over info when
12684         insert_breakpoints fails.
12685
12686 2018-01-11  Pedro Alves  <palves@redhat.com>
12687
12688         PR gdb/22583
12689         * infrun.c (resume): Rename to ...
12690         (resume_1): ... this.
12691         (resume): Reimplement as wrapper around resume_1.
12692
12693 2018-01-11  Pedro Alves  <palves@redhat.com>
12694
12695         PR remote/22597
12696         * remote.c (remote_parse_stop_reply): Default to the last-set
12697         general thread instead of to 'magic_null_ptid'.
12698
12699 2018-01-10  Pedro Alves  <palves@redhat.com>
12700
12701         * language.h (language_get_symbol_name_matcher): Rename ...
12702         (get_symbol_name_matcher): ... this.
12703         * language.c (language_get_symbol_name_matcher): Ditto.
12704         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12705         callers adjusted.
12706
12707 2018-01-10  Pedro Alves  <palves@redhat.com>
12708
12709         PR gdb/22670
12710         * dwarf2read.c
12711         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12712         Adjust to use language_get_symbol_name_matcher instead of
12713         language_defn::la_get_symbol_name_matcher.
12714         * language.c (language_get_symbol_name_matcher): If in Ada mode
12715         and the lookup name is a verbatim match, return Ada's matcher.
12716         * language.h (language_get_symbol_name_matcher): Adjust comment.
12717         (ada_lookup_name_info::verbatim_p):: New method.
12718
12719 2018-01-10  Pedro Alves  <palves@redhat.com>
12720
12721         PR gdb/22670
12722         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12723         minsym's language is language_auto or language_cplus, pass down
12724         language_ada instead.
12725         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12726
12727 2018-01-10  Pedro Alves  <palves@redhat.com>
12728
12729         PR gdb/22670
12730         * minsyms.c (linkage_name_str): New function.
12731         (iterate_over_minimal_symbols): Use it.
12732
12733 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12734
12735         * NEWS: Document that 'info proc' now works on FreeBSD.
12736
12737 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12738
12739         * configure.ac: Check for kinfo_getfile in libutil.
12740         * configure: Regenerate.
12741         * config.in: Regenerate.
12742         * fbsd-nat.c: Include "fbsd-tdep.h".
12743         (fbsd_fetch_cmdline): New.
12744         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12745         rather than calling error.
12746         (fbsd_info_proc): New.
12747         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12748         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12749         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12750
12751 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12752
12753         * fbsd-nat.c (struct free_deleter): Remove.
12754         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12755
12756 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12757
12758         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12759         NULL for an empty pathname.
12760
12761 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12762
12763         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12764         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12765         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12766         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12767         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12768         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12769         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12770         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12771         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12772         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12773         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12774         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12775         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12776         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12777         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12778
12779 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12780
12781         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12782         (gnu_xfer_auxv): New function.
12783         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12784         TARGET_OBJECT_AUXV.
12785
12786 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12787             Simon Marchi  <simon.marchi@ericsson.com>
12788
12789         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12790         common/selftest.c.
12791         (COMMON_OBS): Remove selftest.o.
12792         * configure.ac: Append selftest-arch.c and common/selftest.c to
12793         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12794         * configure: Re-generated.
12795         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12796         GDB_SELF_TEST.
12797         (maintenance_info_selftests): Likewise.
12798
12799 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12800
12801         * ada-valprint.c (val_print_packed_array_elements): Use
12802         proper number of elements when printing an array indexed
12803         by an enumeration type.
12804
12805 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12806
12807         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12808         (dw2_get_file_names_reader): Adjust.
12809         (lookup_dwo_signatured_type): Adjust.
12810         (lookup_dwp_signatured_type): Adjust.
12811         (lookup_signatured_type): Adjust.
12812         (create_type_unit_group): Adjust.
12813         (get_type_unit_group): Adjust.
12814         (process_psymtab_comp_unit_reader): Adjust.
12815         (build_type_psymtabs_reader): Adjust.
12816         (scan_partial_symbols): Adjust.
12817         (add_partial_symbol): Adjust.
12818         (add_partial_subprogram): Adjust.
12819         (peek_die_abbrev): Adjust.
12820         (fixup_go_packaging): Adjust.
12821         (process_imported_unit_die): Adjust.
12822         (dwarf2_compute_name): Adjust.
12823         (dwarf2_physname): Adjust.
12824         (read_import_statement): Adjust.
12825         (handle_DW_AT_stmt_list): Adjust.
12826         (read_file_scope): Adjust.
12827         (read_func_scope): Adjust.
12828         (read_lexical_block_scope): Adjust.
12829         (read_call_site_scope): Adjust.
12830         (read_variable): Adjust.
12831         (dwarf2_rnglists_process): Adjust.
12832         (dwarf2_ranges_process): Adjust.
12833         (dwarf2_ranges_read): Adjust.
12834         (dwarf2_get_pc_bounds): Adjust.
12835         (dwarf2_record_block_ranges): Adjust.
12836         (dwarf2_add_field): Adjust.
12837         (dwarf2_add_member_fn): Adjust.
12838         (read_structure_type): Adjust.
12839         (process_structure_scope): Adjust.
12840         (read_enumeration_type): Adjust.
12841         (read_array_type): Adjust.
12842         (mark_common_block_symbol_computed): Adjust.
12843         (read_common_block): Adjust.
12844         (read_namespace_type): Adjust.
12845         (read_namespace): Adjust.
12846         (read_module_type): Adjust.
12847         (read_tag_pointer_type): Adjust.
12848         (read_tag_ptr_to_member_type): Adjust.
12849         (read_tag_string_type): Adjust.
12850         (read_subroutine_type): Adjust.
12851         (read_typedef): Adjust.
12852         (read_base_type): Adjust.
12853         (attr_to_dynamic_prop): Adjust.
12854         (read_subrange_type): Adjust.
12855         (read_unspecified_type): Adjust.
12856         (dwarf2_read_abbrevs): Adjust.
12857         (load_partial_dies): Adjust.
12858         (read_partial_die): Adjust.
12859         (find_partial_die): Adjust.
12860         (guess_partial_die_structure_name): Adjust.
12861         (fixup_partial_die): Adjust.
12862         (read_attribute_value): Adjust.
12863         (read_addr_index): Adjust.
12864         (read_addr_index_from_leb128): Adjust.
12865         (read_str_index): Adjust.
12866         (dwarf2_string_attr): Adjust.
12867         (get_debug_line_section): Adjust.
12868         (dwarf_decode_line_header): Adjust.
12869         (lnp_state_machine::check_line_address): Adjust.
12870         (dwarf_decode_lines_1): Adjust.
12871         (dwarf_decode_lines): Adjust.
12872         (dwarf2_start_symtab): Adjust.
12873         (var_decode_location): Adjust.
12874         (new_symbol_full): Adjust.
12875         (dwarf2_const_value_data): Adjust.
12876         (dwarf2_const_value_attr): Adjust.
12877         (dwarf2_const_value): Adjust.
12878         (die_type): Adjust.
12879         (die_containing_type): Adjust.
12880         (build_error_marker_type): Adjust.
12881         (lookup_die_type): Adjust.
12882         (guess_full_die_structure_name): Adjust.
12883         (anonymous_struct_prefix): Adjust.
12884         (determine_prefix): Adjust.
12885         (dwarf2_name): Adjust.
12886         (follow_die_ref_or_sig): Adjust.
12887         (follow_die_offset): Adjust.
12888         (follow_die_ref): Adjust.
12889         (follow_die_sig_1): Adjust.
12890         (follow_die_sig): Adjust.
12891         (get_signatured_type): Adjust.
12892         (get_DW_AT_signature_type): Adjust.
12893         (decode_locdesc): Adjust.
12894         (dwarf_decode_macros): Adjust.
12895         (cu_debug_loc_section): Adjust.
12896         (fill_in_loclist_baton): Adjust.
12897         (dwarf2_symbol_mark_computed): Adjust.
12898         (init_one_comp_unit): Don't assign
12899         dwarf2_cu::dwarf2_per_objfile.
12900         (set_die_type): Adjust.
12901
12902 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12903
12904         * dwarf2read.c (struct mapped_debug_names): Add constructor.
12905         <dwarf2_per_objfile>: New field.
12906         (dwarf2_per_objfile): Remove global.
12907         (get_dwarf2_per_objfile): New function.
12908         (set_dwarf2_per_objfile): New function.
12909         (dwarf2_build_psymtabs_hard): Change objfile parameter to
12910         dwarf2_per_objfile.
12911         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12912         (read_abbrev_offset): Likewise.
12913         (read_indirect_string): Likewise.
12914         (read_indirect_line_string): Likewise.
12915         (read_indirect_string_at_offset): Likewise.
12916         (read_indirect_string_from_dwz): Likewise.
12917         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12918         dwarf2_per_objfile.
12919         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12920         (create_all_comp_units): Change objfile parameter to
12921         dwarf2_per_objfile.
12922         (create_all_type_units): Likewise.
12923         (process_queue): Add dwarf2_per_objfile parameter.
12924         (read_and_check_comp_unit_head): Likewise.
12925         (lookup_dwo_unit_in_dwp): Likewise.
12926         (get_dwp_file): Likewise.
12927         (process_cu_includes): Likewise.
12928         (struct free_dwo_file_cleanup_data): New struct.
12929         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12930         set_dwarf2_per_objfile.
12931         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12932         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12933         context, adjust calls.
12934         (dw2_instantiate_symtab): Likewise.
12935         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12936         (dw2_get_cu): Likewise.
12937         (create_cu_from_index_list): Change objfile parameter to
12938         dwarf2_per_objfile.
12939         (create_cus_from_index_list): Get dwarf2_per_objfile from
12940         context, adjust calls.
12941         (create_cus_from_index): Likewise.
12942         (create_signatured_type_table_from_index): Change objfile
12943         parameter to dwarf2_per_objfile.
12944         (create_signatured_type_table_from_debug_names): Change objfile
12945         parameter to dwarf2_per_objfile.
12946         (create_addrmap_from_index): Likewise.
12947         (create_addrmap_from_aranges): Likewise.
12948         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12949         (dw2_setup): Remove.
12950         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12951         context.
12952         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12953         get_dwarf2_per_objfile.
12954         (dw2_forget_cached_source_info): Likewise.
12955         (dw2_map_symtabs_matching_filename): Likewise.
12956         (struct dw2_symtab_iterator) <index>: Remove.
12957         <dwarf2_per_objfile>: New field.
12958         (dw2_symtab_iter_init): Replace index parameter with
12959         dwarf2_per_objfile.
12960         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12961         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12962         (dw2_print_stats): Likewise.
12963         (dw2_dump): Likewise.
12964         (dw2_expand_symtabs_for_function): Likewise.
12965         (dw2_expand_all_symtabs): Likewise.
12966         (dw2_expand_symtabs_with_fullname): Likewise.
12967         (dw2_expand_marked_cus): Replace index and objfile parameters
12968         with dwarf2_per_objfile.
12969         (dw_expand_symtabs_matching_file_matcher): Add
12970         dwarf2_per_objfile parameter and adjust calls.
12971         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12972         adjust calls.
12973         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12974         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12975         adjust calls.
12976         (create_cus_from_debug_names_list): Replace objfile parameter
12977         with dwarf2_per_objfile and adjust calls.
12978         (create_cus_from_debug_names): Likewise.
12979         (dwarf2_read_debug_names): Likewise.
12980         (mapped_debug_names::namei_to_name): Adjust call.
12981         (dw2_debug_names_iterator::next): Likewise.
12982         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12983         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12984         (dw2_debug_names_dump): Likewise.
12985         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12986         (dw2_debug_names_expand_symtabs_matching): Likewise.
12987         (dwarf2_initialize_objfile): Likewise.
12988         (dwarf2_build_psymtabs): Likewise.
12989         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12990         this_cu.
12991         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12992         (read_and_check_comp_unit_head): Likewise.
12993         (read_abbrev_offset): Likewise.
12994         (create_debug_type_hash_table): Likewise.
12995         (create_debug_types_hash_table): Likewise.
12996         (create_all_type_units): Replace objfile parameter with
12997         dwarf2_per_objfile.
12998         (add_type_unit): Add dwarf2_per_objfile parameter.
12999         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13000         with dwarf2_per_objfile.
13001         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13002         (lookup_dwp_signatured_type): Likewise.
13003         (lookup_signatured_type): Likewise.
13004         (read_cutu_die_from_dwo): Likewise.
13005         (init_tu_and_read_dwo_dies): Likewise.
13006         (init_cutu_and_read_dies): Likewise.
13007         (init_cutu_and_read_dies_no_follow): Likewise.
13008         (allocate_type_unit_groups_table): Add objfile parameter.
13009         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13010         (get_type_unit_group): Likewise.
13011         (process_psymtab_comp_unit): Update call.
13012         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13013         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13014         (print_tu_stats): Likewise.
13015         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13016         in void* parameter.
13017         (build_type_psymtabs): Change objfile parameter to
13018         dwarf2_per_objfile.
13019         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13020         passed in void* parameter.
13021         (process_skeletonless_type_units): Change objfile parameter to
13022         dwarf2_per_objfile.
13023         (set_partial_user): Likewise.
13024         (dwarf2_build_psymtabs_hard): Likewise.
13025         (read_comp_units_from_section): Likewise.
13026         (create_all_comp_units): Likewise.
13027         (scan_partial_symbols): Update calls.
13028         (add_partial_symbol): Likewise.
13029         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13030         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13031         (process_queue): Add dwarf2_per_objfile parameter.
13032         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13033         (compute_compunit_symtab_includes): Likewise.
13034         (process_cu_includes): Add dwarf2_per_objfile parameter.
13035         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13036         (process_full_type_unit): Likewise.
13037         (process_imported_unit_die): Update call.
13038         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13039         (read_file_scope): Likewise.
13040         (allocate_dwo_file_hash_table): Add objfile parameter.
13041         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13042         (create_cus_hash_table): Likewise.
13043         (create_dwp_hash_table): Likewise.
13044         (create_dwo_unit_in_dwp_v1): Likewise.
13045         (create_dwp_v2_section): Likewise.
13046         (create_dwo_unit_in_dwp_v2): Likewise.
13047         (lookup_dwo_unit_in_dwp): Likewise.
13048         (try_open_dwop_file): Likewise.
13049         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13050         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13051         cleanup to include a reference to dwarf2_per_objfile.
13052         (open_dwp_file): Add dwarf2_per_objfile parameter.
13053         (open_and_init_dwp_file): Likewise.
13054         (get_dwp_file): Likewise.
13055         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13056         (queue_and_load_all_dwo_tus): Update call.
13057         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13058         data.
13059         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13060         (dwarf2_ranges_process): Likewise.
13061         (dwarf2_get_pc_bounds): Likewise.
13062         (mark_common_block_symbol_computed): Likewise.
13063         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13064         (dwarf2_read_abbrevs): Update call.
13065         (read_partial_die): Use dwarf2_per_objfile from cu.
13066         (find_partial_die): Likewise.
13067         (fixup_partial_die): Likewise.
13068         (read_attribute_value): Likewise.
13069         (read_indirect_string_at_offset_from): Add objfile parameter.
13070         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13071         parameter.
13072         (read_indirect_string_from_dwz): Add objfile parameter.
13073         (read_indirect_string): Add objfile parameter.
13074         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13075         (read_addr_index): Use dwarf2_per_objfile from cu.
13076         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13077         call dw2_setup.
13078         (read_str_index): Use dwarf2_per_objfile from cu.
13079         (get_debug_line_section): Likewise.
13080         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13081         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13082         (new_symbol_full): Use dwarf2_per_objfile from cu.
13083         (build_error_marker_type): Likewise.
13084         (lookup_die_type): Likewise.
13085         (determine_prefix): Likewise.
13086         (follow_die_offset): Likewise.
13087         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13088         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13089         (dwarf2_fetch_die_type_sect_off): Likewise.
13090         (dwarf2_get_die_type): Likewise.
13091         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13092         (get_signatured_type): Likewise.
13093         (get_DW_AT_signature_type): Likewise.
13094         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13095         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13096         (cu_debug_loc_section): Likewise.
13097         (fill_in_loclist_baton): Likewise.
13098         (dwarf2_symbol_mark_computed): Likewise.
13099         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13100         dwarf2_per_objfile.
13101         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13102         parameter.
13103         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13104         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13105         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13106         (set_die_type): Use dwarf2_free_objfile from cu.
13107         (get_die_type_at_offset): Likewise.
13108         (dwarf2_per_objfile_free): Don't assign global variable.
13109         (debug_names) <constructor>: Add dwarf2_per_objfile
13110         parameter, update m_debugstrlookup construction.
13111         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13112         parameter.
13113         <m_dwarf2_per_objfile>: New field.
13114         <lookup>: Use m_dwarf2_per_objfile.
13115         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13116         (psyms_seen_size): Likewise.
13117         (write_gdbindex): Replace objfile parameter with
13118         dwarf2_per_objfile.
13119         (write_debug_names): Likewise.
13120         (write_psymtabs_to_index): Likewise.
13121         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13122         calls.
13123
13124 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13125
13126         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13127         <dwarf2_per_objfile>: New field.
13128         (struct dwarf2_per_cu_data) <objfile>: Remove.
13129         <dwarf2_per_objfile>: New field.
13130         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13131         of objfile.
13132         (create_signatured_type_table_from_index): Likewise.
13133         (create_debug_type_hash_table): Likewise.
13134         (fill_in_sig_entry_from_dwo_entry): Likewise.
13135         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13136         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13137         objfile.
13138         (create_partial_symtab): Access objfile through
13139         dwarf2_per_objfile.
13140         (process_psymtab_comp_unit_reader): Likewise.
13141         (read_comp_units_from_section): Likewise.
13142         (scan_partial_symbols): Likewise.
13143         (add_partial_symbol): Likewise.
13144         (add_partial_subprogram): Likewise.
13145         (peek_die_abbrev): Likewise.
13146         (fixup_go_packaging): Likewise.
13147         (process_full_comp_unit): Likewise.
13148         (process_full_type_unit): Likewise.
13149         (process_imported_unit_die): Likewise.
13150         (dwarf2_compute_name): Likewise.
13151         (dwarf2_physname): Likewise.
13152         (read_import_statement): Likewise.
13153         (create_cus_hash_table): Assign dwarf2_physname instead of
13154         objfile.
13155         (read_func_scope): Access objfile through dwarf2_per_objfile.
13156         (read_lexical_block_scope): Likewise.
13157         (read_call_site_scope): Likewise.
13158         (read_variable): Likewise.
13159         (dwarf2_rnglists_process): Likewise.
13160         (dwarf2_ranges_process): Likewise.
13161         (dwarf2_ranges_read): Likewise.
13162         (dwarf2_record_block_ranges): Likewise.
13163         (dwarf2_add_field): Likewise.
13164         (dwarf2_add_member_fn): Likewise.
13165         (read_structure_type): Likewise.
13166         (process_structure_scope): Likewise.
13167         (read_enumeration_type): Likewise.
13168         (read_array_type): Likewise.
13169         (read_common_block): Likewise.
13170         (read_namespace_type): Likewise.
13171         (read_namespace): Likewise.
13172         (read_module_type): Likewise.
13173         (read_tag_pointer_type): Likewise.
13174         (read_tag_ptr_to_member_type): Likewise.
13175         (read_tag_string_type): Likewise.
13176         (read_subroutine_type): Likewise.
13177         (read_typedef): Likewise.
13178         (read_base_type): Likewise.
13179         (attr_to_dynamic_prop): Likewise.
13180         (read_subrange_type): Likewise.
13181         (read_unspecified_type): Likewise.
13182         (load_partial_dies): Likewise.
13183         (read_partial_die): Likewise.
13184         (find_partial_die): Likewise.
13185         (guess_partial_die_structure_name): Likewise.
13186         (fixup_partial_die): Likewise.
13187         (read_attribute_value): Likewise.
13188         (read_addr_index_from_leb128): Likewise.
13189         (dwarf2_read_addr_index): Likewise.
13190         (dwarf2_string_attr): Likewise.
13191         (lnp_state_machine::check_line_address): Likewise.
13192         (dwarf_decode_lines_1): Likewise.
13193         (dwarf_decode_lines): Likewise.
13194         (dwarf2_start_symtab): Likewise.
13195         (var_decode_location): Likewise.
13196         (new_symbol_full): Likewise.
13197         (dwarf2_const_value_data): Likewise.
13198         (dwarf2_const_value_attr): Likewise.
13199         (dwarf2_const_value): Likewise.
13200         (die_type): Likewise.
13201         (die_containing_type): Likewise.
13202         (lookup_die_type): Likewise.
13203         (guess_full_die_structure_name): Likewise.
13204         (anonymous_struct_prefix): Likewise.
13205         (dwarf2_name): Likewise.
13206         (follow_die_ref_or_sig): Likewise.
13207         (follow_die_offset): Likewise.
13208         (follow_die_ref): Likewise.
13209         (dwarf2_fetch_die_loc_sect_off): Likewise.
13210         (dwarf2_fetch_constant_bytes): Likewise.
13211         (dwarf2_fetch_die_type_sect_off): Likewise.
13212         (dwarf2_get_die_type): Likewise.
13213         (follow_die_sig): Likewise.
13214         (decode_locdesc): Likewise.
13215         (dwarf2_per_cu_objfile): Likewise.
13216         (dwarf2_per_cu_text_offset): Likewise.
13217         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13218         objfile.
13219         (set_die_type): Access objfile through
13220         dwarf2_per_objfile.
13221
13222 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13223
13224         * valprint.c (converted_character_d): Remove typedef.
13225         (DEF_VEC_O (converted_character_d)): Remove.
13226         (count_next_character): Use std::vector.
13227         (print_converted_chars_to_obstack): Likewise.
13228         (generic_printstr): Likewise.
13229
13230 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13231
13232         * xml-support.h (struct gdb_xml_value): Add constructor.
13233         <value>: Change type to unique_xmalloc_ptr.
13234         (gdb_xml_value_s): Remove typedef.
13235         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13236         (gdb_xml_element_start_handler): Change parameter type to
13237         std::vector.
13238         (xml_find_attribute): Likewise.
13239         * xml-support.c (xml_find_attribute): Change parameter type to
13240         std::vector and adjust.
13241         (gdb_xml_values_cleanup): Remove.
13242         (gdb_xml_parser::start_element): Adjust to std::vector.
13243         (xinclude_start_include): Change paraeter type to std::vector
13244         and adjust.
13245         * btrace.c (check_xml_btrace_version): Likewise.
13246         (parse_xml_btrace_block): Likewise.
13247         (parse_xml_btrace_pt_config_cpu): Likewise.
13248         (parse_xml_btrace_pt): Likewise.
13249         (parse_xml_btrace_conf_bts): Likewise.
13250         (parse_xml_btrace_conf_pt): Likewise.
13251         * memory-map.c (memory_map_start_memory): Likewise.
13252         (memory_map_start_property): Likewise.
13253         * osdata.c (osdata_start_osdata): Likewise.
13254         (osdata_start_item): Likewise.
13255         (osdata_start_column): Likewise.
13256         * remote.c (start_thread): Likewise.
13257         * solib-aix.c (library_list_start_library): Likewise.
13258         (library_list_start_list): Likewise.
13259         * solib-svr4.c (library_list_start_library): Likewise.
13260         (svr4_library_list_start_list): Likewise.
13261         * solib-target.c (library_list_start_segment): Likewise.
13262         (library_list_start_section): Likewise.
13263         (library_list_start_library): Likewise.
13264         (library_list_start_list): Likewise.
13265         * tracepoint.c (traceframe_info_start_memory): Likewise.
13266         (traceframe_info_start_tvar): Likewise.
13267         * xml-syscall.c (syscall_start_syscall): Likewise.
13268         * xml-tdesc.c (tdesc_start_target): Likewise.
13269         (tdesc_start_feature): Likewise.
13270         (tdesc_start_reg): Likewise.
13271         (tdesc_start_union): Likewise.
13272         (tdesc_start_struct): Likewise.
13273         (tdesc_start_flags): Likewise.
13274         (tdesc_start_enum): Likewise.
13275         (tdesc_start_field): Likewise.
13276         (tdesc_start_enum_value): Likewise.
13277         (tdesc_start_vector): Likewise.
13278
13279 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13280
13281         * extension.h (struct xmethod_worker) <clone>: Remove.
13282         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13283         Remove.
13284         (python_xmethod_worker::clone): Remove.
13285         * valops.c (find_overload_match): Use std::move instead of
13286         clone.
13287
13288 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13289
13290         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13291         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13292         <free_xmethod_worker_data>: Remove.
13293         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13294         <get_xmethod_arg_types>: Remove.
13295         <get_xmethod_result_type>: Remove.
13296         <invoke_xmethod>: Remove.
13297         * extension.c (new_xmethod_worker): Remove.
13298         (clone_xmethod_worker): Remove.
13299         (get_matching_xmethod_workers): Return void, pass std::vector by
13300         pointer.
13301         (get_xmethod_arg_types): Rename to...
13302         (xmethod_worker::get_arg_types): ... this, and adjust.
13303         (get_xmethod_result_type): Rename to...
13304         (xmethod_worker::get_result_type): ... this, and adjust.
13305         (invoke_xmethod): Remove.
13306         (free_xmethod_worker): Remove.
13307         (free_xmethod_worker_vec): Remove.
13308         * extension.h (enum ext_lang_rc): Move here from
13309         extension-priv.h.
13310         (struct xmethod_worker): Add constructor and destructor.
13311         <data>: Remove.
13312         <value>: Remove.
13313         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13314         virtual pure methods.
13315         <get_arg_types, get_result_type>: New methods.
13316         (xmethod_worker_ptr): Remove typedef.
13317         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13318         (xmethod_worker_vec): Remove typedef.
13319         (xmethod_worker_up): New typedef.
13320         (invoke_xmethod): Remove.
13321         (clone_xmethod_worker): Remove.
13322         (free_xmethod_worker): Remove.
13323         (free_xmethod_worker_vec): Remove.
13324         (get_xmethod_arg_types): Remove.
13325         (get_xmethod_result_type): Remove.
13326         * valops.c (find_method_list): Use std::vector, don't use
13327         intermediate vector.
13328         (value_find_oload_method_list): Use std::vector.
13329         (find_overload_match): Use std::vector.
13330         (find_oload_champ): Use std::vector.
13331         * value.c (value_free): Use operator delete.
13332         (value_of_xmethod): Rename to...
13333         (value_from_xmethod): ... this.  Don't assign
13334         xmethod_worker::value, take rvalue-reference.
13335         (result_type_of_xmethod): Adjust.
13336         (call_xmethod): Adjust.
13337         * value.h: Include extension.h.
13338         (struct xmethod_worker): Don't forward-declare.
13339         (value_of_xmethod): Rename to...
13340         (value_from_xmethod): ... this, take rvalue-reference.
13341         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13342         (struct python_xmethod_worker): ... this, add constructor and
13343         destructor.
13344         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13345         (gdbpy_free_xmethod_worker_data): Rename to...
13346         (python_xmethod_worker::~python_xmethod_worker): ... this and
13347         adjust.
13348         (gdbpy_clone_xmethod_worker_data): Rename to...
13349         (python_xmethod_worker::clone): ... this and adjust.
13350         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13351         temporary vector.
13352         (gdbpy_get_xmethod_arg_types): Rename to...
13353         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13354         (gdbpy_get_xmethod_result_type): Rename to...
13355         (python_xmethod_worker::do_get_result_type): ... this and
13356         adjust.
13357         (gdbpy_invoke_xmethod): Rename to...
13358         (python_xmethod_worker::invoke): ... this and adjust.
13359         (new_python_xmethod_worker): Rename to...
13360         (python_xmethod_worker::python_xmethod_worker): ... this and
13361         adjust.
13362         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13363         Remove.
13364         (gdbpy_free_xmethod_worker_data): Remove.
13365         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13366         (gdbpy_get_xmethod_arg_types): Remove.
13367         (gdbpy_get_xmethod_result_type): Remove.
13368         (gdbpy_invoke_xmethod): Remove.
13369         * python/python.c (python_extension_ops): Remove obsolete
13370         callbacks.
13371
13372 2018-01-05  Pedro Alves  <palves@redhat.com>
13373
13374         PR gdb/18653
13375         * common/signals-state-save-restore.c
13376         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13377         find a custom handler preinstalled, instead of internal erroring.
13378         But only warn if !quiet.
13379         * common/signals-state-save-restore.h
13380         (save_original_signals_state): New parameter 'quiet'.
13381         * main.c (captured_main_1): Move save_original_signals_state call
13382         after option handling, and pass QUIET.
13383
13384 2018-01-05  Pedro Alves  <palves@redhat.com>
13385
13386         * spu-tdep.c (spu_catch_start): Pass
13387         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13388
13389 2018-01-05  Pedro Alves  <palves@redhat.com>
13390
13391         PR gdb/22670
13392         * ada-lang.c (literal_symbol_name_matcher): New function.
13393         (ada_get_symbol_name_matcher): Use it for
13394         symbol_name_match_type::SEARCH_NAME.
13395         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13396         it down instead of assuming symbol_name_match_type::FULL.
13397         * block.h (block_lookup_symbol): New parameter 'match_type'.
13398         * c-valprint.c (print_unpacked_pointer): Use
13399         lookup_symbol_search_name instead of lookup_symbol.
13400         * compile/compile-object-load.c (get_out_value_type): Pass down
13401         symbol_name_match_type::SEARCH_NAME.
13402         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13403         symbol_name_match_type::FULL.
13404         * cp-support.c (cp_get_symbol_name_matcher): Handle
13405         symbol_name_match_type::SEARCH_NAME.
13406         * infrun.c (insert_exception_resume_breakpoint): Use
13407         lookup_symbol_search_name.
13408         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13409         * psymtab.c (maintenance_check_psymtabs): Use
13410         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13411         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13412         SYMBOL_SEARCH_NAME.
13413         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13414         if symbol_name_match_type::SEARCH_NAME.
13415         (lookup_symbol_in_language): Pass down
13416         symbol_name_match_type::FULL.
13417         (lookup_symbol_search_name): New.
13418         (lookup_language_this): Pass down
13419         symbol_name_match_type::SEARCH_NAME.
13420         (lookup_symbol_aux, lookup_local_symbol): New parameter
13421         'match_type'.  Pass it down.
13422         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13423         (lookup_symbol_search_name): New declaration.
13424         (lookup_symbol_in_block): New 'match_type' parameter.
13425
13426 2018-01-05  Pedro Alves  <palves@redhat.com>
13427
13428         PR gdb/22670
13429         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13430         ada_lookup_symbol.
13431         (ada_lookup_symbol): Reimplement in terms of
13432         ada_lookup_symbol_list, bits factored out from
13433         ada_lookup_encoded_symbol.
13434
13435 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13436
13437         * ada-exp.y (write_object_renaming): When subscripting an array
13438         using a symbol as the index, pass the block in call to
13439         ada_lookup_encoded_symbol when looking that symbol up.
13440
13441 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13442
13443         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13444         TYPE_INDEX_TYPE.
13445
13446 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13447
13448         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13449         the case where VALUE_LVAL (val0) is not lval_memory.
13450
13451 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13452
13453         * ada-valprint.c (print_optional_low_bound): Handle
13454         character-indexed array printing like boolean-indexed array
13455         printing.
13456
13457 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13458
13459         * NEWS: Create a new section for the next release branch.
13460         Rename the section of the current branch, now that it has
13461         been cut.
13462
13463 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13464
13465         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13466         * version.in: Bump version to 8.1.50.DATE-git.
13467
13468 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13469
13470         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13471         Add field.
13472         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13473         Add field.
13474         (default_exception_support_info) <catch_handlers_sym>: Add field.
13475         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13476         (ada_exception_name_addr_1): Add "catch handlers" handling.
13477         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13478         Update all callers.
13479         (create_excep_cond_exprs) <ex>: Add parameter.
13480         (re_set_exception): Update create_excep_cond_exprs call.
13481         (print_it_exception, print_one_exception, print_mention_exception)
13482         (print_recreate_exception): Add "catch handler" handling.
13483         (allocate_location_catch_handlers, re_set_catch_handlers)
13484         (check_status_catch_handlers, print_it_catch_handlers)
13485         (print_one_catch_handlers, print_mention_catch_handlers)
13486         (print_recreate_catch_handlers): New function.
13487         (catch_handlers_breakpoint_ops): New variable.
13488         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13489         Add parameter.  Add "catch handler" handling.
13490         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13491         Add "catch handler" handling.
13492         (ada_exception_catchpoint_cond_string): Add "catch handler"
13493         handling.
13494         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13495         call.
13496         (catch_ada_handlers_command): New function.
13497         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13498         operations structure.
13499         (_initialize_ada_language): Add "catch handlers" command entry.
13500         * NEWS: Document "catch handlers" feature.
13501
13502 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13503
13504         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13505         account when creating the array type of the slice.
13506         (ada_value_slice): Likewise.
13507
13508 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13509
13510         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13511         New enum value.
13512         (create_array_type_with_stride): Add byte_stride_prop parameter.
13513         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13514         New parameter.  Update all callers in this file.
13515         (array_type_has_dynamic_stride): New function.
13516         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13517         of arrays with dynamic byte strides.
13518         * dwarf2read.c (read_array_type): Add support for dynamic
13519         DW_AT_byte_stride attributes.
13520
13521 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13522
13523         * dwarf2read.c (read_unspecified_type): Treat
13524         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13525
13526 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13527
13528         Update copyright year range in all GDB files.
13529
13530 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13531
13532         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13533         and gdb/testsuite/gdb.base/step-line.c.
13534
13535 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13536
13537         * copyright.py (main): Dump the contents of
13538         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13539         even if BY_HAND is empty.
13540
13541 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13542
13543         * top.c (print_gdb_version): Update Copyright year in version
13544         message.
13545
13546 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13547
13548         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13549
13550 For older changes see ChangeLog-2017.
13551 \f
13552 Local Variables:
13553 mode: change-log
13554 left-margin: 8
13555 fill-column: 74
13556 version-control: never
13557 coding: utf-8
13558 End: