gdb/riscv: remove extra caching of misa register
[external/binutils.git] / gdb / ChangeLog
1 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2
3         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4         (riscv_read_misa_reg): Don't cache value read into inferior data.
5         (riscv_new_inferior_data): Delete.
6         (riscv_inferior_data_cleanup): Delete.
7         (riscv_inferior_data): Delete.
8         (riscv_invalidate_inferior_data): Delete.
9         (_initialize_riscv_tdep): Remove initialisation of inferior data.
10
11 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
12
13         * compile/compile-cplus-types.c
14         (compile_cplus_instance::leave_scope): Take the address of scope
15         object.
16         (compile_cplus_instance::convert_qualified_base): Compare quals
17         to 0.
18
19 2018-08-30  Keith Seitz  <keiths@redhat.com>
20
21         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
22         Use "%s" and host_address_to_string instead of "%p" in printf.
23
24 2018-08-29  Keith Seitz  <keiths@redhat.com>
25
26         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
27         and compile-cplus-types.c.
28         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
29         * c-lang.c (cplus_language_defn): Set C++ compile functions.
30         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
31         Declare.
32         * compile/compile-c-support.c: Include compile-cplus.h.
33         (load_libcompile): Templatize.
34         (get_compile_context): "New" function.
35         (c_get_compile_context): Use get_compile_context.
36         (cplus_get_compile_context): New function.
37         (cplus_push_user_expression, cplus_pop_user_expression)
38         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
39         (cplus_compute_program): Define new structs/functions.
40         * compile/compile-cplus-symmbols.c: New file.
41         * compile/compile-cplus-types.c: New file.
42         * compile/compile-cplus.h: New file.
43         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
44         Declare.
45         * compile/compile-object-load.c (get_out_value_type): Use
46         strncmp_iw when comparing symbol names.
47         (compile_object_load): Add mst_bss and mst_data.
48         * compile/compile.c (_initialize_compile): Remove
49         -Wno-implicit-function-declaration from `compile_args'.
50         * compile/gcc-cp-plugin.h: New file.
51         * NEWS: Mention C++ compile support and new debug options.
52
53 2018-08-29  Keith Seitz  <keiths@redhat.com>
54
55         * linespec.c (collect_info::add_symbol): Make virtual.
56         (struct symbol_searcher_collect_info): New struct.
57         (symbol_searcher::find_all_symbols): New method.
58         * symtab.h (class symbol_searcher): New class.
59
60 2018-08-29  Keith Seitz  <keiths@redhat.com>
61
62         * linespec.c (struct linespec) <function_symbols, label_symbols>:
63         Change to vector of block_symbol.  Update all users.
64         (struct collect_info) <symbols>: Likewise.
65         (collect_info::add_symbol): Take block_symbol as argument.
66         Update all callers.
67         (decode_compound_collector) <m_symbols>: Change type to vector
68         of block_symbol.  Update all users.
69         (decode_compound_collector::operator ()): Change parameter type
70         to block_symbol.
71         (find_method, find_function_symbols, find_linespec_symbols)
72         (find_label_symbols_in_block, find_label_symbols): Change symbol
73         vectors to block_symbol vectors.
74         * symtab.h (symbol_found_callback_ftype): Change parameter type to
75         block_symbol.
76
77 2018-08-29  Keith Seitz  <keiths@redhat.com>
78
79         * linespec.c (symbolp): Remove typedef and VEC definitions.
80         (bound_minimal_symbol_d): Likewise.
81
82 2018-08-29  Keith Seitz  <keiths@redhat.com>
83
84         * linespec.c (decode_compound_collector::decode_compound_collector):
85         Remove initialization for `m_symtabs'.
86         (decode_compound_collector::release_symbols): Change return type
87         to std::vector.  Update all callers.
88         (class decode_compound_collector) <m_symbols>: Change type to
89         std::vector.
90         (lookup_prefix_sym): Change return type to std::vector.  Update all
91         callers.
92         (compare_symbols): Remove.
93         (std_compare_symbols): Rename to `compare_symbols'.
94         (find_method): Change `sym_classes' parameter to std::vector.
95         Update all callers.  Use std::sort to sort sym_classes.
96         (find_linespec_symbols): Remove cleanup.
97
98 2018-08-29  Keith Seitz  <keiths@redhat.com>
99
100         * linespec.c (struct linespec) <minimal_symbols>: Change type to
101         std::vector.  Update all users.
102         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
103         (struct collect_info) <minimal_symbols>: Likewise.
104         (compare_msymbols): Return bool.  Change parameters to const
105         bound_minimal_symbol references.
106         (find_method, find_function_symbols, find_linespec_symbols): Change
107         `minsyms' parameter to std::vector.  Update all callers.
108
109 2018-08-29  Keith Seitz  <keiths@redhat.com>
110
111         * linespec.c (struct linespec) <label_symbols>: Change type to
112         std::vector.  Update all users.
113         (find_label_symbols_in_block): Change `result' parameter to
114         std::vector.  Update all callers.
115         (find_label_symbols): Return std::vector.  Update all callers.
116
117 2018-08-29  Keith Seitz  <keiths@redhat.com>
118
119         * linespec.c (struct linespec) <function_symbols>: Change type to
120         std::vector.  Update all users.
121         (struct collect_info) <function_symbols>: Likewise.
122         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
123         (std_compare_symbols): New function.
124         (find_method, find_function_symbols, find_linespec_symbols)
125         (find_label_symbols_in_block): Change `symbols' parameter to
126         std::vector.  Update all callers.
127         (find_label_symbols): Likewise for `function_symbols' and
128         `label_funcs_ret'.
129
130 2018-08-29  Keith Seitz  <keiths@redhat.com>
131
132         * linespec.c (symtab_vector_up): Define.
133         (struct linespec) <file_symtabs>: Change type to std::vector *.
134         Update all uses.
135         (struct collect_info) <file_symtabs>: Likewise.
136         (collect_symtabs_from_filename): Return symtab_vector_up.
137         Update all callers.
138         (decode_objc): Remove cleanup.
139         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
140         (symtab_collector::release_symtabs): Return symtab_vector_up.
141         Update all callers.
142         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
143         Update all users.
144         (collect_symtabs_from_filename, symtabs_from_filename): Return
145         symtab_vector_up.  Update all callers.
146
147 2018-08-29  Tom Tromey  <tom@tromey.com>
148
149         * csky-tdep.c (csky_analyze_prologue): Use
150         core_addr_to_string_nz.
151
152 2018-08-29  Tom Tromey  <tom@tromey.com>
153
154         * windows-nat.c (struct xlate_exception) <them>: Change type to
155         DWORD.
156         (xlate): Fix formatting.  Remove last entry.
157         (struct xlate_exception, xlate): Comment out.
158         (windows_nat_target::resume): Use ranged for.
159
160 2018-08-29  Jim Wilson  <jimw@sifive.com>
161
162         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
163         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
164         of NT_PRFPREG.
165         (riscv_linux_nat_target::store_registers): Likewise.
166
167 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
168
169         PR gdb/23555
170         PR gdb/23558
171         * gnulib/aclocal.m4: Regenerate.
172         * gnulib/config.in: Regenerate.
173         * gnulib/configure: Regenerate.
174         * gnulib/import/Makefile.am: Update.
175         * gnulib/import/Makefile.in: Update.
176         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
177         * gnulib/import/_Noreturn.h: ... this.
178         * gnulib/import/alloca.in.h: Update.
179         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
180         * gnulib/import/arg-nonnull.h: ... this.
181         * gnulib/import/assure.h: Update.
182         * gnulib/import/at-func.c: Update.
183         * gnulib/import/basename-lgpl.c: Update.
184         * gnulib/import/extra/snippet/c++defs.h: Rename to...
185         * gnulib/import/c++defs.h: ... this.
186         * gnulib/import/canonicalize-lgpl.c: Update.
187         * gnulib/import/cdefs.h: Update.
188         * gnulib/import/chdir-long.c: Update.
189         * gnulib/import/chdir-long.h: Update.
190         * gnulib/import/cloexec.c: Update.
191         * gnulib/import/cloexec.h: Update.
192         * gnulib/import/close.c: Update.
193         * gnulib/import/closedir.c: Update.
194         * gnulib/import/config.charset: Update.
195         * gnulib/import/dirent-private.h: Update.
196         * gnulib/import/dirent.in.h: Update.
197         * gnulib/import/dirfd.c: Update.
198         * gnulib/import/dirname-lgpl.c: Update.
199         * gnulib/import/dirname.h: Update.
200         * gnulib/import/dosname.h: Update.
201         * gnulib/import/dup-safer-flag.c: Update.
202         * gnulib/import/dup-safer.c: Update.
203         * gnulib/import/dup.c: Update.
204         * gnulib/import/dup2.c: Update.
205         * gnulib/import/errno.in.h: Update.
206         * gnulib/import/error.c: Update.
207         * gnulib/import/error.h: Update.
208         * gnulib/import/exitfail.c: Update.
209         * gnulib/import/exitfail.h: Update.
210         * gnulib/import/extra/update-copyright: Update.
211         * gnulib/import/fchdir.c: Update.
212         * gnulib/import/fcntl.c: Update.
213         * gnulib/import/fcntl.in.h: Update.
214         * gnulib/import/fd-hook.c: Update.
215         * gnulib/import/fd-hook.h: Update.
216         * gnulib/import/fd-safer-flag.c: Update.
217         * gnulib/import/fd-safer.c: Update.
218         * gnulib/import/fdopendir.c: Update.
219         * gnulib/import/filename.h: Update.
220         * gnulib/import/filenamecat-lgpl.c: Update.
221         * gnulib/import/filenamecat.h: Update.
222         * gnulib/import/flexmember.h: Update.
223         * gnulib/import/float+.h: Update.
224         * gnulib/import/float.c: Update.
225         * gnulib/import/float.in.h: Update.
226         * gnulib/import/fnmatch.c: Update.
227         * gnulib/import/fnmatch.in.h: Update.
228         * gnulib/import/fnmatch_loop.c: Update.
229         * gnulib/import/fpucw.h: Update.
230         * gnulib/import/frexp.c: Update.
231         * gnulib/import/frexpl.c: Update.
232         * gnulib/import/fstat.c: Update.
233         * gnulib/import/fstatat.c: Update.
234         * gnulib/import/getcwd-lgpl.c: Update.
235         * gnulib/import/getcwd.c: Update.
236         * gnulib/import/getdtablesize.c: Update.
237         * gnulib/import/getlogin_r.c: Update.
238         * gnulib/import/getprogname.c: Update.
239         * gnulib/import/getprogname.h: Update.
240         * gnulib/import/gettext.h: Update.
241         * gnulib/import/gettimeofday.c: Update.
242         * gnulib/import/glob-libc.h: Update.
243         * gnulib/import/glob.c: Update.
244         * gnulib/import/glob.in.h: Update.
245         * gnulib/import/glob_internal.h: Update.
246         * gnulib/import/glob_pattern_p.c: Update.
247         * gnulib/import/globfree.c: Update.
248         * gnulib/import/hard-locale.c: Update.
249         * gnulib/import/hard-locale.h: Update.
250         * gnulib/import/intprops.h: Update.
251         * gnulib/import/inttypes.in.h: Update.
252         * gnulib/import/isnan.c: Update.
253         * gnulib/import/isnand-nolibm.h: Update.
254         * gnulib/import/isnand.c: Update.
255         * gnulib/import/isnanl-nolibm.h: Update.
256         * gnulib/import/isnanl.c: Update.
257         * gnulib/import/itold.c: Update.
258         * gnulib/import/libc-config.h: Update.
259         * gnulib/import/limits.in.h: Update.
260         * gnulib/import/localcharset.c: Update.
261         * gnulib/import/localcharset.h: Update.
262         * gnulib/import/localtime-buffer.c: Update.
263         * gnulib/import/localtime-buffer.h: Update.
264         * gnulib/import/lstat.c: Update.
265         * gnulib/import/m4/00gnulib.m4: Update.
266         * gnulib/import/m4/__inline.m4: Update.
267         * gnulib/import/m4/absolute-header.m4: Update.
268         * gnulib/import/m4/alloca.m4: Update.
269         * gnulib/import/m4/builtin-expect.m4: Update.
270         * gnulib/import/m4/canonicalize.m4: Update.
271         * gnulib/import/m4/chdir-long.m4: Update.
272         * gnulib/import/m4/close.m4: Update.
273         * gnulib/import/m4/closedir.m4: Update.
274         * gnulib/import/m4/configmake.m4: Update.
275         * gnulib/import/m4/d-ino.m4: Update.
276         * gnulib/import/m4/d-type.m4: Update.
277         * gnulib/import/m4/dirent_h.m4: Update.
278         * gnulib/import/m4/dirfd.m4: Update.
279         * gnulib/import/m4/dirname.m4: Update.
280         * gnulib/import/m4/double-slash-root.m4: Update.
281         * gnulib/import/m4/dup.m4: Update.
282         * gnulib/import/m4/dup2.m4: Update.
283         * gnulib/import/m4/eealloc.m4: Update.
284         * gnulib/import/m4/environ.m4: Update.
285         * gnulib/import/m4/errno_h.m4: Update.
286         * gnulib/import/m4/error.m4: Update.
287         * gnulib/import/m4/exponentd.m4: Update.
288         * gnulib/import/m4/exponentl.m4: Update.
289         * gnulib/import/m4/extensions.m4: Update.
290         * gnulib/import/m4/extern-inline.m4: Update.
291         * gnulib/import/m4/fchdir.m4: Update.
292         * gnulib/import/m4/fcntl-o.m4: Update.
293         * gnulib/import/m4/fcntl.m4: Update.
294         * gnulib/import/m4/fcntl_h.m4: Update.
295         * gnulib/import/m4/fdopendir.m4: Update.
296         * gnulib/import/m4/filenamecat.m4: Update.
297         * gnulib/import/m4/flexmember.m4: Update.
298         * gnulib/import/m4/float_h.m4: Update.
299         * gnulib/import/m4/fnmatch.m4: Update.
300         * gnulib/import/m4/fnmatch_h.m4: Update.
301         * gnulib/import/m4/fpieee.m4: Update.
302         * gnulib/import/m4/frexp.m4: Update.
303         * gnulib/import/m4/frexpl.m4: Update.
304         * gnulib/import/m4/fstat.m4: Update.
305         * gnulib/import/m4/fstatat.m4: Update.
306         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
307         * gnulib/import/m4/getcwd-path-max.m4: Update.
308         * gnulib/import/m4/getcwd.m4: Update.
309         * gnulib/import/m4/getdtablesize.m4: Update.
310         * gnulib/import/m4/getlogin.m4: Update.
311         * gnulib/import/m4/getlogin_r.m4: Update.
312         * gnulib/import/m4/getpagesize.m4: Update.
313         * gnulib/import/m4/getprogname.m4: Update.
314         * gnulib/import/m4/gettimeofday.m4: Update.
315         * gnulib/import/m4/glibc21.m4: Update.
316         * gnulib/import/m4/glob.m4: Update.
317         * gnulib/import/m4/glob_h.m4: Update.
318         * gnulib/import/m4/gnulib-cache.m4: Update.
319         * gnulib/import/m4/gnulib-common.m4: Update.
320         * gnulib/import/m4/gnulib-comp.m4: Update.
321         * gnulib/import/m4/gnulib-tool.m4: Update.
322         * gnulib/import/m4/hard-locale.m4: Update.
323         * gnulib/import/m4/include_next.m4: Update.
324         * gnulib/import/m4/inttypes-pri.m4: Update.
325         * gnulib/import/m4/inttypes.m4: Update.
326         * gnulib/import/m4/isnand.m4: Update.
327         * gnulib/import/m4/isnanl.m4: Update.
328         * gnulib/import/m4/largefile.m4: Update.
329         * gnulib/import/m4/limits-h.m4: Update.
330         * gnulib/import/m4/localcharset.m4: Update.
331         * gnulib/import/m4/locale-fr.m4: Update.
332         * gnulib/import/m4/locale-ja.m4: Update.
333         * gnulib/import/m4/locale-zh.m4: Update.
334         * gnulib/import/m4/localtime-buffer.m4: Update.
335         * gnulib/import/m4/longlong.m4: Update.
336         * gnulib/import/m4/lstat.m4: Update.
337         * gnulib/import/m4/malloc.m4: Update.
338         * gnulib/import/m4/malloca.m4: Update.
339         * gnulib/import/m4/math_h.m4: Update.
340         * gnulib/import/m4/mbrtowc.m4: Update.
341         * gnulib/import/m4/mbsinit.m4: Update.
342         * gnulib/import/m4/mbsrtowcs.m4: Update.
343         * gnulib/import/m4/mbstate_t.m4: Update.
344         * gnulib/import/m4/memchr.m4: Update.
345         * gnulib/import/m4/memmem.m4: Update.
346         * gnulib/import/m4/mempcpy.m4: Update.
347         * gnulib/import/m4/memrchr.m4: Update.
348         * gnulib/import/m4/mkdir.m4: Update.
349         * gnulib/import/m4/mkstemp.m4: Update.
350         * gnulib/import/m4/mmap-anon.m4: Update.
351         * gnulib/import/m4/mode_t.m4: Update.
352         * gnulib/import/m4/msvc-inval.m4: Update.
353         * gnulib/import/m4/msvc-nothrow.m4: Update.
354         * gnulib/import/m4/multiarch.m4: Update.
355         * gnulib/import/m4/nocrash.m4: Update.
356         * gnulib/import/m4/off_t.m4: Update.
357         * gnulib/import/m4/onceonly.m4: Update.
358         * gnulib/import/m4/open-cloexec.m4: Update.
359         * gnulib/import/m4/open.m4: Update.
360         * gnulib/import/m4/openat.m4: Update.
361         * gnulib/import/m4/opendir.m4: Update.
362         * gnulib/import/m4/pathmax.m4: Update.
363         * gnulib/import/m4/rawmemchr.m4: Update.
364         * gnulib/import/m4/readdir.m4: Update.
365         * gnulib/import/m4/readlink.m4: Update.
366         * gnulib/import/m4/realloc.m4: Update.
367         * gnulib/import/m4/rename.m4: Update.
368         * gnulib/import/m4/rewinddir.m4: Update.
369         * gnulib/import/m4/rmdir.m4: Update.
370         * gnulib/import/m4/save-cwd.m4: Update.
371         * gnulib/import/m4/secure_getenv.m4: Update.
372         * gnulib/import/m4/setenv.m4: Update.
373         * gnulib/import/m4/signal_h.m4: Update.
374         * gnulib/import/m4/ssize_t.m4: Update.
375         * gnulib/import/m4/stat-time.m4: Update.
376         * gnulib/import/m4/stat.m4: Update.
377         * gnulib/import/m4/std-gnu11.m4: Update.
378         * gnulib/import/m4/stdbool.m4: Update.
379         * gnulib/import/m4/stddef_h.m4: Update.
380         * gnulib/import/m4/stdint.m4: Update.
381         * gnulib/import/m4/stdio_h.m4: Update.
382         * gnulib/import/m4/stdlib_h.m4: Update.
383         * gnulib/import/m4/strchrnul.m4: Update.
384         * gnulib/import/m4/strdup.m4: Update.
385         * gnulib/import/m4/strerror.m4: Update.
386         * gnulib/import/m4/string_h.m4: Update.
387         * gnulib/import/m4/strstr.m4: Update.
388         * gnulib/import/m4/strtok_r.m4: Update.
389         * gnulib/import/m4/sys_socket_h.m4: Update.
390         * gnulib/import/m4/sys_stat_h.m4: Update.
391         * gnulib/import/m4/sys_time_h.m4: Update.
392         * gnulib/import/m4/sys_types_h.m4: Update.
393         * gnulib/import/m4/tempname.m4: Update.
394         * gnulib/import/m4/time_h.m4: Update.
395         * gnulib/import/m4/unistd-safer.m4: Update.
396         * gnulib/import/m4/unistd_h.m4: Update.
397         * gnulib/import/m4/warn-on-use.m4: Update.
398         * gnulib/import/m4/wchar_h.m4: Update.
399         * gnulib/import/m4/wchar_t.m4: Update.
400         * gnulib/import/m4/wctype_h.m4: Update.
401         * gnulib/import/m4/wint_t.m4: Update.
402         * gnulib/import/malloc.c: Update.
403         * gnulib/import/malloc/scratch_buffer.h: Update.
404         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
405         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
406         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
407         * gnulib/import/malloca.c: Update.
408         * gnulib/import/malloca.h: Update.
409         * gnulib/import/malloca.valgrind: Update.
410         * gnulib/import/math.in.h: Update.
411         * gnulib/import/mbrtowc.c: Update.
412         * gnulib/import/mbsinit.c: Update.
413         * gnulib/import/mbsrtowcs-impl.h: Update.
414         * gnulib/import/mbsrtowcs-state.c: Update.
415         * gnulib/import/mbsrtowcs.c: Update.
416         * gnulib/import/memchr.c: Update.
417         * gnulib/import/memmem.c: Update.
418         * gnulib/import/mempcpy.c: Update.
419         * gnulib/import/memrchr.c: Update.
420         * gnulib/import/mkdir.c: Update.
421         * gnulib/import/mkstemp.c: Update.
422         * gnulib/import/msvc-inval.c: Update.
423         * gnulib/import/msvc-inval.h: Update.
424         * gnulib/import/msvc-nothrow.c: Update.
425         * gnulib/import/msvc-nothrow.h: Update.
426         * gnulib/import/open.c: Update.
427         * gnulib/import/openat-die.c: Update.
428         * gnulib/import/openat-priv.h: Update.
429         * gnulib/import/openat-proc.c: Update.
430         * gnulib/import/openat.c: Update.
431         * gnulib/import/openat.h: Update.
432         * gnulib/import/opendir.c: Update.
433         * gnulib/import/pathmax.h: Update.
434         * gnulib/import/pipe-safer.c: Update.
435         * gnulib/import/rawmemchr.c: Update.
436         * gnulib/import/readdir.c: Update.
437         * gnulib/import/readlink.c: Update.
438         * gnulib/import/realloc.c: Update.
439         * gnulib/import/ref-add.sin: Update.
440         * gnulib/import/ref-del.sin: Update.
441         * gnulib/import/rename.c: Update.
442         * gnulib/import/rewinddir.c: Update.
443         * gnulib/import/rmdir.c: Update.
444         * gnulib/import/same-inode.h: Update.
445         * gnulib/import/save-cwd.c: Update.
446         * gnulib/import/save-cwd.h: Update.
447         * gnulib/import/scratch_buffer.h: Update.
448         * gnulib/import/secure_getenv.c: Update.
449         * gnulib/import/setenv.c: Update.
450         * gnulib/import/signal.in.h: Update.
451         * gnulib/import/stat-time.c: Update.
452         * gnulib/import/stat-time.h: Update.
453         * gnulib/import/stat-w32.c: Update.
454         * gnulib/import/stat-w32.h: Update.
455         * gnulib/import/stat.c: Update.
456         * gnulib/import/stdbool.in.h: Update.
457         * gnulib/import/stddef.in.h: Update.
458         * gnulib/import/stdint.in.h: Update.
459         * gnulib/import/stdio.in.h: Update.
460         * gnulib/import/stdlib.in.h: Update.
461         * gnulib/import/str-two-way.h: Update.
462         * gnulib/import/strchrnul.c: Update.
463         * gnulib/import/strdup.c: Update.
464         * gnulib/import/streq.h: Update.
465         * gnulib/import/strerror-override.c: Update.
466         * gnulib/import/strerror-override.h: Update.
467         * gnulib/import/strerror.c: Update.
468         * gnulib/import/string.in.h: Update.
469         * gnulib/import/stripslash.c: Update.
470         * gnulib/import/strnlen1.c: Update.
471         * gnulib/import/strnlen1.h: Update.
472         * gnulib/import/strstr.c: Update.
473         * gnulib/import/strtok_r.c: Update.
474         * gnulib/import/sys_stat.in.h: Update.
475         * gnulib/import/sys_time.in.h: Update.
476         * gnulib/import/sys_types.in.h: Update.
477         * gnulib/import/tempname.c: Update.
478         * gnulib/import/tempname.h: Update.
479         * gnulib/import/time.in.h: Update.
480         * gnulib/import/unistd--.h: Update.
481         * gnulib/import/unistd-safer.h: Update.
482         * gnulib/import/unistd.in.h: Update.
483         * gnulib/import/unsetenv.c: Update.
484         * gnulib/import/verify.h: Update.
485         * gnulib/import/extra/snippet/warn-on-use.h: Update.
486         * gnulib/import/wchar.in.h: Update.
487         * gnulib/import/wctype.in.h: Update.
488         * gnulib/import/xalloc-oversized.h: Update.
489         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
490         "53e2c179f26a890fa6685af4b6c1397ee370433b".
491
492 2018-08-16  Gary Benson <gbenson@redhat.com>
493
494         PR gdb/13000:
495         * gdb/main.c (captured_main_1): Exit with nonzero status
496         in batch mode if the last command to be executed failed.
497         * NEWS: Mention the above.
498
499 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
500
501         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
502         end of warning message.
503
504 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
505
506         PR gdb/22943:
507         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
508         (aarch64_extract_return_value): Use
509         aapcs_is_vfp_call_or_return_candidate.
510         (aarch64_return_in_memory): Likewise.
511         (aarch64_store_return_value): Likewise.
512
513 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
514
515         * aarch64-tdep.c
516         (aapcs_is_vfp_call_or_return_candidate): Make static
517         (pass_in_v_or_stack): Remove function.
518         (pass_in_v_vfp_candidate): New function.
519         (aarch64_push_dummy_call): Check for float register candidates.
520
521 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
522
523         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
524         (aapcs_is_vfp_call_or_return_candidate_1): New function.
525         (aapcs_is_vfp_call_or_return_candidate): Likewise.
526
527 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
528
529         PR build/23399
530         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
531         (struct ipa_sym_addresses): Rename to...
532         (struct ipa_sym_addresses_common): ... this.
533         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
534
535 2018-08-28  Tom Tromey  <tom@tromey.com>
536
537         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
538         (token_fifo): Now a std::vector.
539         (yylex, c_parse): Update.
540         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
541         (token_fifo): Now a std::vector.
542         (yylex, d_parse): Update.
543         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
544         (token_fifo): Now a std::vector.
545         (yylex, go_parse): Update.
546
547 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
548
549         * parser-defs.h (struct type_stack) <elements>: Change type to
550         std::vector<union type_stack_elt>.
551         <depth, size>: Remove.
552         * parse.c (parse_exp_in_context_1): Adjust.
553         (type_stack_reserve): Remove.
554         (check_type_stack_depth): Remove.
555         (insert_into_type_stack): Adjust to std::vector.
556         (insert_type): Likewise.
557         (push_type): Likewise.
558         (push_type_int): Likewise.
559         (insert_type_address_space): Likewise.
560         (pop_type): Likewise.
561         (pop_type_int): Likewise.
562         (pop_typelist): Likewise.
563         (pop_type_stack): Likewise.
564         (append_type_stack): Likewise.
565         (push_type_stack): Likewise.
566         (get_type_stack): Likewise.
567         (type_stack_cleanup): Likewise.
568         (push_typelist): Likewise.
569         (follow_types): Likewise.
570         (_initialize_parse): Likewise.
571
572 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
573
574         * NEWS: Mention csky target.
575
576 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
577             Hafiz Abid Qadeer  <abidh@codesourcery.com>
578             Don Breazeal  <donb@codesourcery.com>
579
580         * csky-linux-tdep.c: New file.
581         * csky-tdep.c: Likewise.
582         * csky-tdep.h: Likewise.
583         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
584         csky-tdep.o.
585         (HFILES_NO_SRCDIR): Add csky-tdep.h.
586         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
587         * configure.tgt: Add csky support.
588
589 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
590
591         * python/py-framefilter.c (py_print_frame): Print frame architecture
592         when printing on an MI output.
593
594 2018-08-27  Tom Tromey  <tom@tromey.com>
595
596         PR build/23087:
597         * configure: Rebuild.
598         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
599
600 2018-08-27  Tom Tromey  <tom@tromey.com>
601
602         * aarch64-linux-tdep.c
603         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
604         casts to int.
605
606 2018-08-27  Tom Tromey  <tom@tromey.com>
607
608         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
609         unsigned.
610         (ppc64_standard_linkage1, ppc64_standard_linkage2)
611         (ppc64_standard_linkage3, ppc64_standard_linkage4)
612         (ppc64_standard_linkage5, ppc64_standard_linkage6)
613         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
614         unsigned.
615
616 2018-08-27  Tom Tromey  <tom@tromey.com>
617
618         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
619         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
620
621 2018-08-27  Tom Tromey  <tom@tromey.com>
622
623         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
624         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
625         ULONGEST_MAX.
626         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
627         ULONGEST_MAX.
628         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
629         ULONGEST_MAX.
630         * sparc-linux-tdep.c (sparc32_linux_sigframe)
631         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
632         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
633         ULONGEST_MAX.
634         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
635         (ppc64_linux_sigaction_tramp_frame)
636         (ppc32_linux_sighandler_tramp_frame)
637         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
638         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
639         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
640         * mn10300-linux-tdep.c (am33_linux_sigframe)
641         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
642         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
643         * mips-linux-tdep.c (mips_linux_o32_sigframe)
644         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
645         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
646         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
647         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
648         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
649         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
650         * microblaze-linux-tdep.c
651         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
652         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
653         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
654         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
655         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
656         * common/common-types.h (ULONGEST_MAX): New define.
657         (CORE_ADDR_MAX): Fix formatting.
658         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
659         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
660         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
661         (arm_linux_rt_sigreturn_tramp_frame)
662         (arm_eabi_linux_sigreturn_tramp_frame)
663         (arm_eabi_linux_rt_sigreturn_tramp_frame)
664         (thumb2_eabi_linux_sigreturn_tramp_frame)
665         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
666         (arm_linux_restart_syscall_tramp_frame)
667         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
668         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
669         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
670         ULONGEST_MAX.
671         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
672
673 2018-08-27  Tom Tromey  <tom@tromey.com>
674
675         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
676         CORE_ADDR_MAX.
677         * mips-tdep.c (mips_deal_with_atomic_sequence)
678         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
679         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
680         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
681         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
682         CORE_ADDR_MAX.
683         * aarch64-tdep.c (aarch64_software_single_step): Use
684         CORE_ADDR_MAX.
685
686 2018-08-27  Tom Tromey  <tom@tromey.com>
687
688         * linespec.c (complete_linespec_component): Add cast to "char".
689         * completer.c (completion_tracker::build_completion_result): Add
690         cast to "char".
691
692 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
693
694         * solist.h (struct solist, struct target_so_ops): Fix
695         indentation.
696
697 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
698
699         * ada-tasks.c (ada_task_info_s): Remove typedef.
700         (DEF_VEC_O(ada_task_info_s)): Remove.
701         (struct ada_tasks_inferior_data): Initialize fields.
702         <task_list>: Make an std::vector.
703         (get_ada_tasks_inferior_data): Allocate with new.
704         (ada_get_task_number): Adjust.
705         (get_task_number_from_id): Likewise.
706         (valid_task_id): Likewise.
707         (ada_get_task_info_from_ptid): Likewise.
708         (iterate_over_live_ada_tasks): Likewise.
709         (add_ada_task): Likewise.
710         (read_known_tasks): Likewise.
711         (ada_build_task_list): Likewise.
712         (print_ada_task_info): Likewise.
713         (info_task): Likewise.
714         (task_command_1): Likewise.
715
716 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
717
718         * ada-lang.c (add_angle_brackets): Return std::string.
719
720 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
721
722         * python/py-threadevent.c (py_get_event_thread): Initialize
723         pythread.
724
725 2018-08-24  Pedro Alves  <palves@redhat.com>
726
727         * python/py-bpevent.c (create_breakpoint_event_object): Use
728         copy-initialization.
729         * python/py-continueevent.c (emit_continue_event): Use
730         copy-initialization.
731         * python/py-exitedevent.c (create_exited_event_object): Return a
732         gdbpy_ref<>.
733         (emit_exited_event): Use copy-initialization.
734         * python/py-inferior.c (python_new_inferior)
735         (python_inferior_deleted, add_thread_object): Use
736         copy-initialization.
737         * python/py-infevents.c (create_inferior_call_event_object)
738         (create_register_changed_event_object)
739         (create_memory_changed_event_object): Return a gdbpy_ref<>.
740         (emit_inferior_call_event, emit_memory_changed_event)
741         (emit_register_changed_event): Use copy-initialization.
742         * python/py-newobjfileevent.c (create_new_objfile_event_object):
743         Return a gdbpy_ref<>.
744         (emit_new_objfile_event): Use copy-initialization.
745         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
746         (emit_clear_objfiles_event): Use copy-initialization.
747         * python/py-signalevent.c (create_signal_event_object): Use
748         copy-initialization.
749         * python/py-threadevent.c (create_thread_event_object): Use
750         copy-initialization.
751
752 2018-08-24  Pedro Alves  <palves@redhat.com>
753             Simon Marchi  <simon.marchi@ericsson.com>
754
755         PR gdb/23379
756         * python/py-continueevent.c: Include "gdbthread.h".
757         (create_continue_event_object): Add intro comment.  Add 'ptid'
758         parameter.  Use it to find thread to pass to
759         create_thread_event_object.
760         (emit_continue_event): Pass PTID down to
761         create_continue_event_object.
762         * python/py-event.h (py_get_event_thread): Declare.
763         (create_thread_event_object): Remove default from 'thread'
764         parameter.
765         * python/py-stopevent.c (create_stop_event_object): Use
766         py_get_event_thread.
767         * python/py-threadevent.c (get_event_thread): Rename to ...
768         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
769         and use it to find the thread.
770         (create_thread_event_object): Assert that THREAD isn't null.
771         Don't find the event thread here.
772
773 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
774
775         * block.h (blockrange, blockranges): New struct declarations.
776         (struct block): Add new field named `ranges'.
777         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
778         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
779         macros for accessing ranges in struct block.
780         (make_blockranges): New declaration.
781         block.c (make_blockranges): New function.
782         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
783         for block.
784         * symtab.h (find_pc_partial_function): Add new parameter `block'.
785         * blockframe.c (cache_pc_function_block): New static global.
786         (clear_pc_function_cache): Clear cache_pc_function_block.
787         (find_pc_partial_function): Move comment to symtab.h.  Add
788         support for non-contiguous blocks.
789         * cli/cli-cmds.c (block.h): Include.
790         (print_disassembly): Handle printing of non-contiguous blocks.
791         (disassemble_current_function): Likewise.
792         (disassemble_command): Likewise.
793
794         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
795         BLOCK_START.
796         * blockframe.c (get_pc_function_start): Likewise.
797         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
798         (gcc_symbol_address): Likewise.
799         * compile/compile-object-run.c (compile_object_run): Likewise.
800         * compile/compile.c (get_expr_block_and_pc): Likewise.
801         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
802         (func_addr_to_tail_call_list): Likewise.
803         * findvar.c (default_read_var_value): Likewise.
804         * inline-frame.c (inline_frame_this_id): Likewise.
805         (skip-inline_frames): Likewise.
806         * infcmd.c (until_next_command): Likewise.
807         * linespec.c (convert_linespec_to_sals): Likewise.
808         * parse.c (parse_exp_in_context_1): Likewise.
809         * printcmd.c (build_address_symbolic): likewise.
810         (info_address_command): Likewise.
811         symtab.c (find_function_start_sal): Likewise.
812         (skip_prologue_sal): Likewise.
813         (find_function_alias_target): Likewise.
814         (find_gnu_ifunc): Likewise.
815         * stack.c (find_frame_funname): Likewise.
816         * symtab.c (fixup_symbol_section): Likewise.
817         (find_function_start_sal): Likewise.
818         (skip_prologue_sal): Likewsie.
819         (find_function_alias_target): Likewise.
820         (find_gnu_ifunc): Likewise.
821         * tracepoint.c (info_scope_command): Likewise.
822         * value.c (value_fn_field): Likewise.
823
824         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
825         in place of find_pc_partial_function.
826         * blockframe.c (find_function_entry_range_from_pc): New function.
827         * symtab.h (find_function_entry_range_from_pc): Declare and document.
828         * objfiles.c (objfile_relocate1): Relocate start and end addresses
829         for each range in a block.
830
831
832 2018-08-23  Xavier Roirand  <roirand@adacore.com>
833
834         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
835         incrementation.
836
837 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
838
839         * solib-svr4.c (read_program_headers_from_bfd): Return
840         gdb::optional<gdb::byte_vector>.
841         (svr4_exec_displacement): Adjust.
842
843 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
844
845         * solib-svr4.c (read_program_header): Return
846         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
847         (find_program_interpreter): Return
848         gdb::optional<gdb::byte_vector>.
849         (scan_dyntag_auxv): Adjust.
850         (enable_break): Adjust.
851         (svr4_exec_displacement): Adjust.
852
853 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
854
855         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
856         * inf-child.c (inf_child_target::terminal_save_inferior): New.
857
858 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
859
860         * guile/scm-string.c (gdbscm_scm_from_printf): Use
861         string_vprintf.
862         * guile/scm-utils.c (gdbscm_printf): Likewise.
863         * serial.c (serial_printf): Likewise.
864         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
865
866 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
867
868         * stack.c (print_frame): Print frame architecture when printing on
869         an MI output.
870         * NEWS: Mention new "arch" attribute in frame output.
871
872 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
873
874         * arch/aarch64.h (aarch64_regnum): Update comment.
875
876 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
877
878         * NEWS: Add SVE to 8.2 section.
879
880 2018-08-21  Pedro Alves  <palves@redhat.com>
881
882         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
883         out from gdbscm_parse_function_args.
884         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
885         gdbscm_parse_function_args_1.
886
887 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
888
889         PR gdb/17816
890         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
891         operator.
892
893 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
894
895         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
896
897 2018-08-19  Michael Spang  <spang@google.com>
898
899         PR gdb/11786
900         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
901         for PT_TLS segments.
902
903 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
904
905         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
906         dwarf_variable_value.
907         * dwarf2-frame.c (class dwarf_expr_executor):
908         Add override for dwarf_variable_value.
909         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
910         (class symbol_needs_eval_context): Likewise.
911         (indirect_synthetic_pointer): Add forward declaration.
912         (sect_variable_value): New function.
913         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
914         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
915         for DW_OP_GNU_variable_value.
916
917 2018-08-16  Tom Tromey  <tom@tromey.com>
918
919         * top.c (read_command_file): Update.
920         (command_line_input): Remove "repeat" argument.
921         * ada-lang.c (get_selections): Update.
922         * linespec.c (decode_line_2): Update.
923         * defs.h (command_line_input): Remove argument.
924         * cli/cli-script.c (read_next_line): Update.
925         * python/py-gdb-readline.c: Update.
926
927 2018-08-17  Tom Tromey  <tom@tromey.com>
928
929         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
930         command_line_input.
931
932 2018-08-15  Tom Tromey  <tom@tromey.com>
933
934         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
935
936 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
937
938         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
939         If used, use find_pc_partial_function to find address range
940         to disassemble.
941         * mi/mi-main.c (mi_cmd_list_features): Report
942         "data-disassemble-a-option" feature.
943         * NEWS: Mention new -data-disassemble option -a.
944
945 2018-08-13  Tom Tromey  <tom@tromey.com>
946
947         * common/common-defs.h (_FORTIFY_SOURCE): Define.
948
949 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
950
951         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
952         (aarch64_linux_collect_sve_regset): Likewise.
953         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
954         * regcache.h (regcache_map_entry_size): New function.
955
956 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
957
958         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
959         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
960         (SVE_HEADER_VL_LENGTH): Likewise.
961         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
962         (SVE_HEADER_FLAGS_LENGTH): Likewise.
963         (SVE_HEADER_RESERVED_LENGTH): Likewise.
964         (SVE_HEADER_SIZE_OFFSET): Likewise.
965         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
966         (SVE_HEADER_VL_OFFSET): Likewise.
967         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
968         (SVE_HEADER_FLAGS_OFFSET): Likewise.
969         (SVE_HEADER_RESERVED_OFFSET): Likewise.
970         (SVE_HEADER_SIZE): Likewise.
971         (aarch64_linux_core_read_vq): Add function.
972         (aarch64_linux_core_read_description): Check for SVE section.
973
974 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
975
976         * aarch64-fbsd-tdep.c
977         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
978         collect_size.
979         * aarch64-linux-tdep.c
980         (aarch64_linux_iterate_over_regset_sections): Likewise.
981         * alpha-linux-tdep.c
982         (alpha_linux_iterate_over_regset_sections):
983         * alpha-nbsd-tdep.c
984         (alphanbsd_iterate_over_regset_sections): Likewise.
985         * amd64-fbsd-tdep.c
986         (amd64fbsd_iterate_over_regset_sections): Likewise.
987         * amd64-linux-tdep.c
988         (amd64_linux_iterate_over_regset_sections): Likewise.
989         * arm-bsd-tdep.c
990         (armbsd_iterate_over_regset_sections): Likewise.
991         * arm-fbsd-tdep.c
992         (arm_fbsd_iterate_over_regset_sections): Likewise.
993         * arm-linux-tdep.c
994         (arm_linux_iterate_over_regset_sections): Likewise.
995         * corelow.c (get_core_registers_cb): Likewise.
996         (core_target::fetch_registers): Likewise.
997         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
998         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
999         * gdbarch.h (void): Regenerate.
1000         * gdbarch.sh: Add supply_size and collect_size.
1001         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1002         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1003         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1004         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1005         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1006         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1007         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1008         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1009         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1010         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1011         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1012         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1013         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1014         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1015         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1016         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1017         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1018         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1019         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1020         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1021         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1022         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1023         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1024         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1025         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1026         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1027         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1028         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1029         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1030         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1031
1032 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
1033
1034         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1035         with string_printf.
1036
1037 2018-08-10  Keith Seitz  <keiths@redhat.com>
1038
1039         * compile/compile-c-support.c (add_code_header, add_code_footer):
1040         Move into policy class.
1041         (c_push_user_expression, pop_user_expression_nop)
1042         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1043         (compile_program): New host class.
1044         (c_compile_program): New typedef.
1045         (c_compute_porgram): Use c_compile_program.
1046
1047 2018-08-10  Keith Seitz  <keiths@redhat.com>
1048
1049         * compile/compile-internal.h (compile_instance::~compile_instance):
1050         Remove calls to htab_delete.
1051         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1052         * compile.c (compile_instance::compile_instance): Initialize
1053         htab unique pointers.
1054         (compile_instance::get_cached_type, compile_instance::insert_type)
1055         (compile_instance::error_symbol_once): Update for unique_ptr.
1056
1057 2018-08-10  Keith Seitz  <keiths@redhat.com>
1058
1059         * compile/compile-c-symbols.c (struct symbol_error)
1060         (hash_symbol_error, eq_symbol_error, del_symbol_error)
1061         (compile_instance::insert_symbol_error)
1062         (compile_instance::error_symbol_once): Move to ...
1063         * compile/compile.c: ... here.
1064
1065 2018-08-10  Keith Seitz  <keiths@redhat.com>
1066
1067         * compile/compile-c-support.c (c_get_compile_context): Use `new'
1068         instead of `new_compile_instance'.
1069         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1070         Update description.
1071         If the symbol error map is not initialized, create it.
1072         (generate_c_for_for_one_symbol): Do not check/initialize
1073         the symbol error map.
1074         * compile/compile-c-types.c (compile_c_instance): Make a class.
1075         Update all callers.
1076         (compile_instance::compile_instance): Initialize the type cache.
1077         (get_cached_type): New function.
1078         (insert_type): Update description.
1079         (compile_c_instance::m_default_cflags): Define.
1080         (convert_type): Update description.  Use get_cached_type.
1081         (delete_instance): Moved to destructor.
1082         (new_compile_instance): Moved to constructor.
1083         * compile/compile-c.h (compile_c_instance): Make class inheriting
1084         from compile_instance.
1085         <base>: Remove field.
1086         <type_map, symbol_err_map>: Move to base class.
1087         <c_plugin>: Rename to `m_plugin' and remove pointer type.
1088         * compile/compile-internal.h (compile_instance): Make class.
1089         <type_map_t, symbol_err_map_t>: Define.
1090         <fe>: Rename to `m_gcc_fe'.
1091         <scope, block, gcc_target_options>: Add `m_' prefix.
1092         <m_type_map, m_symbol_err_map>: New fields, moved from
1093         compile_c_instance.
1094         <destroy>: Remove.
1095         (convert_type, new_compile_instance): Remove.
1096         * compile/compile.c (cleanup_compile_instance): Remove.
1097         (compile_to_object): Use unique_ptr to eliminate cleanups.
1098         (compile_instance::set_print_callback, compile_instance::version)
1099         (compile_instance::set_verbose)
1100         (compile_instance::set_driver_filename)
1101         (compile_instance::set_triplet_regexp)
1102         (compile_instance::set_arguments)
1103         (compile_instance::set_source_file)
1104         (compile_instance::compile): Define.
1105
1106 2018-08-10  Keith Seitz  <keiths@redhat.com>
1107
1108         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1109         * compile/compile-c-types.c: Define GCC_METHODN macros and include
1110         gcc-c-fe.def to define C plugin.
1111         (delete_instance): Delete `c_plugin'.
1112         (new_compile_instance): Initialize `c_plugin'.
1113         * compile/compile-c.h: Include gcc_c_plugin.h.
1114         (struct compile_c_instance) <c_plugin>: New member.
1115         * gcc-c-plugin.h: New file.
1116         Update all callers with API change.
1117
1118 2018-08-10  Keith Seitz  <keiths@redhat.com>
1119
1120         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1121         (HFILES_NO_SRCDIR): ... to here.
1122         Add compile-internal.h and compile-c.h.
1123         * compile/compile-c-support.c: Include compile-c.h.
1124         * compile/compile-c-symbols.c: Include compile-c.h.
1125         (generate_c_for_variable_locations): Update comment.
1126         * compile/compile-c-types.c: Include compile-c.h.
1127         * compile/compile-c.h: New file -- moved C language declarations
1128         from other files here.
1129         * compile/compile-internal.h: Do not include hashtab.h or
1130         common/enum-flags.h.
1131         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1132         (gcc_convert_symbol, gcc_symbol_address)
1133         (generate_c_for_variable_locations, c_get_mode_for_size)
1134         (c_get_range_decl_name): Definitions moved to compile-c.h.
1135         * compile/compile-loc2c.c: Include compile-c.h.
1136
1137 2018-08-10  Keith Seitz  <keiths@redhat.com>
1138
1139         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1140         (c_symbol_substitution_name): ... this.
1141         Update all callers.
1142
1143 2018-08-10  Keith Seitz  <keiths@redhat.com>
1144
1145         * compile/compile-c-support.c (c_compute_program): Use
1146         unique_xmalloc_ptr to eliminate cleanup.
1147         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1148         Return a unique_xmalloc_ptr and eliminate cleanup.
1149         * compile/compile-internal.h (generate_c_for_variable_locations):
1150         Return unique_xmalloc_ptr and update description.
1151
1152 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
1153
1154         * corelow.c (core_target::get_core_register_section): Rename
1155         min_size to section_min_size.
1156
1157 2018-08-09  Jim Wilson  <jimw@sifive.com>
1158
1159         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1160         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1161         * NEWS: Mention new GNU/Linux RISC-V target.
1162         * configure.host: Add riscv*-*-linux*.
1163         * configure.nat: Add riscv*.
1164         * configure.tgt: Add riscv*-*-linux*.
1165         * riscv-linux-nat.c: New file.
1166         * riscv-linux-tdep.c: New file.
1167
1168 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1169
1170         * infrun.c (resume): Make static, add forward declaration.
1171         (proceed): Update header comment.
1172         * infrun.h (resume): Delete declaration.
1173
1174 2018-08-09  Tom Tromey  <tom@tromey.com>
1175
1176         * riscv-tdep.h: Minor formatting fixes.
1177
1178 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
1179
1180         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1181         * dwarf-index-cache.c (create_dir_and_check): Likewise.
1182         (test_mkdir_recursive): Likewise.
1183         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1184
1185 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
1186
1187         * valarith.c (value_subscripted_rvalue): If an array is not in
1188         memory, and we don't know the upper bound, then we can't know that
1189         the requested element exists or not.
1190
1191 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
1192
1193         * target.c (str_comma_list_concat_elem): Fix typo in comment.
1194         (target_options_to_string): Add comment.
1195
1196 2018-08-08  Tom Tromey  <tom@tromey.com>
1197
1198         * unittests/scoped_mmap-selftests.c: Check result of "write".
1199
1200 2018-08-08  Jim Wilson  <jimw@sifive.com>
1201
1202         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1203         (decode_register_index_short): New.
1204         (decode_j_type_insn, decode_cj_type_insn): New.
1205         (decode_b_type_insn, decode_cb_type_insn): New.
1206         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
1207         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
1208         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1209         is_c_sw_insn instead of is_sw_insn.
1210         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1211         (riscv_software_single_step): New.
1212         * riscv-tdep.h (riscv_software_single_step): Declare.
1213
1214         * riscv-tdep.c (riscv_isa_xlen): Drop static.
1215         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1216
1217 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1218
1219         PR gdb/18050:
1220         * target.c (dispose_inferior): Don't dispose of inferiors that are
1221         already killed.
1222
1223 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1224
1225         * remote.c (remote_target::download_tracepoint): Change char* to
1226         const char*.
1227
1228 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
1229
1230         * target.h (target_options_to_string): Return an std::string.
1231         * target.c (str_comma_list_concat_elem): Return void, use
1232         std::string.
1233         (do_option): Likewise.
1234         (target_options_to_string): Return an std::string.
1235         * linux-nat.c (linux_nat_target::wait): Adjust.
1236         * target-debug.h (target_debug_print_options): Adjust.
1237
1238 2018-08-07  Tom Tromey  <tom@tromey.com>
1239
1240         * Makefile.in (CPPFLAGS): New variable.
1241         (INTERNAL_CPPFLAGS): Use it.
1242
1243 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1244
1245         * NEWS: Mention the index cache.
1246
1247 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1248
1249         * common/pathstuff.h (get_standard_cache_dir): New.
1250         * common/pathstuff.c (get_standard_cache_dir): New.
1251         * build-id.h (build_id_to_string): New.
1252         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1253         DEBUG_STR_SUFFIX): Move to here.
1254         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1255         DEBUG_STR_SUFFIX): Move from there.
1256         (write_psymtabs_to_index): Make non-static, add basename
1257         parameter.  Write to temporary files, rename when done.
1258         (save_gdb_index_command): Adjust call to
1259         write_psymtabs_to_index.
1260         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1261         field.
1262         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1263         (get_gdb_index_contents_from_cache): New.
1264         (get_gdb_index_contents_from_cache_dwz): New.
1265         (dwarf2_initialize_objfile): Read index from cache.
1266         (dwarf2_build_psymtabs): Save to index.
1267         * dwarf-index-cache.h: New file.
1268         * dwarf-index-cache.c: New file.
1269         * dwarf-index-write.h: New file.
1270
1271 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1272
1273         * gnulib/aclocal.m4: Re-generate.
1274         * gnulib/config.in: Re-generate.
1275         * gnulib/configure: Re-generate.
1276         * gnulib/import/Makefile.am: Re-generate.
1277         * gnulib/import/Makefile.in: Re-generate.
1278         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1279         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1280         * gnulib/import/m4/mkdir.m4: New file.
1281         * gnulib/import/mkdir.c: New file.
1282         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1283         module.
1284
1285 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1286
1287         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1288         * common/scoped_mmap.c: New file.
1289         * common/scoped_mmap.h (destroy): New method.
1290         (~scoped_mmap, reset): Use destroy.
1291         (scoped_mmap): New move constructor.
1292         (mmap_file): New declaration.
1293         * unittests/scoped_mmap-selftests.c (test_normal,
1294         test_invalid_filename, run_tests): New functions.
1295         (_initialize_scoped_mmap_selftests): Register selftest.
1296
1297 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1298
1299         * dwarf2read.c (read_gdb_index_from_section): Rename to...
1300         (read_gdb_index_from_buffer): ... this.  Remove section
1301         parameter, add buffer parameter.
1302         (get_gdb_index_contents_ftype,
1303         get_gdb_index_contents_dwz_ftype): New typedefs.
1304         (dwarf2_read_gdb_index): Add callback parameters to get the
1305         index contents.
1306         (get_gdb_index_contents_from_section): New.
1307         (dwarf2_initialize_objfile): Update call to
1308         dwarf2_read_gdb_index.
1309
1310 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1311
1312         * common/filestuff.h (gdb_fopen_cloexec): New overload.
1313         (gdb_open_cloexec): Likewise.
1314         * nat/linux-osdata.c (command_from_pid): Use string_printf.
1315         (commandline_from_pid): Likewise.
1316         (linux_xfer_osdata_threads): Likewise.
1317         (linux_xfer_osdata_fds): Likewise.
1318         * ada-lang.c (is_package_name): Likewise.
1319         * auxv.c (procfs_xfer_auxv): Likewise.
1320         * breakpoint.c (print_one_breakpoint_location): Use
1321         uiout::field_fmt.
1322         (print_one_catch_solib): Use string_printf.
1323         * coff-pe-read.c (add_pe_exported_sym): Likewise.
1324         (add_pe_forwarded_sym): Likewise.
1325         * dwarf2read.c (create_type_unit_group): Likewise.
1326         (build_error_marker_type): Likewise.
1327         * infcall.c (get_function_name): Likewise.
1328         * valprint.c (print_converted_chars_to_obstack): Likewise.
1329         * xtensa-tdep.c (xtensa_register_type): Likewise.
1330
1331 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
1332
1333         * remote.c (remote_target::download_tracepoint): Fix format
1334         string errors.
1335
1336 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1337
1338         * tracefile.c: Include common/byte-vector.h.
1339         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
1340         with trace_regblock_size if needed.  Update uses of buf.
1341
1342 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1343
1344         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1345         std::vector<unsigned char>.
1346         * tracepoint.c (collection_list::collection_list): Remove
1347         m_regs_mask initializer from initializer list.  Resize
1348         m_regs_mask using the largest remote register number.
1349         (collection_list::add_remote_register): Remove size check on
1350         m_regs_mask.  Use at to access element.
1351         (collection_list::stringify): Change type of temp_buf to
1352         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
1353         stringify the register mask.  Use pack_hex_byte for the register
1354         mask.
1355
1356 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1357
1358         * tracepoint.h (class collection_list) <add_register>: Remove.
1359         <add_remote_register, add_ax_registers, add_local_register>:
1360         Declare.
1361         <add_memrange>: Add scope parameter.
1362         * tracepoint.c (encode_actions_1): Likewise.
1363         (collection_list::add_register): Rename to ...
1364         (collection_list::add_remote_register): ... this.  Update
1365         comment.
1366         (collection_list::add_ax_registers, add_local_register): New
1367         methods.
1368         (collection_list::add_memrange): Add scope parameter.  Call
1369         add_local_register instead of add_register.
1370         (finalize_tracepoint_aexpr): New function.
1371         (collection_list::collect_symbol): Update calls to add_memrange.
1372         Call add_local_register instead of add_register.  Call
1373         add_ax_registers.  Call finalize_tracepoint_aexpr.
1374         (encode_actions_1): Get remote regnos for $reg action.  Call
1375         add_remote_register, add_ax_registers, and add_local_register.
1376         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
1377         (validate_actionline): Call finalize_tracepoint_aexpr.
1378
1379 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1380
1381         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1382         Replace array buf with gdb::char_vector buf, of size
1383         get_remote_packet_size ().  Replace references to buf and
1384         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
1385         and xsnprintf with snprintf.  Raise errors if the buffer is too
1386         small.
1387
1388 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1389
1390         * remote.c (remote_target::download_tracepoint): Fix the has_more
1391         predicate in the QTDP action list iteration.
1392
1393 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1394
1395         * remote.c (remote_target::download_tracepoint): Fix indentation
1396         in for block.
1397
1398 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1399
1400         * proc-api.c (_initialize_proc_api): Remove c, unused.
1401         * procfs.c (procfs_init_inferior): Remove signals, unused.
1402         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1403         unused.
1404
1405 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
1406             Andrew Burgess  <andrew.burgess@embecosm.com>
1407
1408         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1409         'W_STOPCODE (0)' as this could be ambiguous.
1410
1411 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1412
1413         * ser-tcp.c (net_open): Fix thinko when deciding whether to
1414         disable TCP's Nagle algorithm (use "ai_protocol" instead of
1415         "ai_socktype").
1416
1417 2018-08-02  Tom Tromey  <tom@tromey.com>
1418
1419         PR symtab/16842.
1420         * dwarf2read.c (read_func_scope): Set symtab on template parameter
1421         symbols.
1422         (process_structure_scope): Likewise.
1423
1424 2018-08-02  Xavier Roirand  <roirand@adacore.com>
1425
1426         PR gdb/22629:
1427         * darwin-nat.c (darwin_kill_inferior): Fix handling of
1428         kill inferior.
1429
1430 2018-08-02  Tom Tromey  <tom@tromey.com>
1431
1432         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1433         (darwin_suspend_inferior, darwin_resume_inferior)
1434         (darwin_decode_notify_message, darwin_resume_inferior_threads)
1435         (darwin_check_new_threads): Check result of get_darwin_inferior.
1436
1437 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
1438
1439         GDB 8.1.1 released.
1440
1441 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
1442
1443         * varobj.c (varobj_get_path_expr_parent): Report an error if
1444         parent is a dynamic varobj.
1445
1446 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1447
1448         * gnulib/aclocal.m4: Re-generate.
1449         * gnulib/config.in: Re-generate.
1450         * gnulib/configure: Re-generate.
1451         * gnulib/import/Makefile.in: Re-generate.
1452         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1453         * gnulib/import/m4/onceonly.m4: Re-generate.
1454
1455 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
1456
1457         * target-descriptions.c (struct xml_test_tdesc): New.
1458         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1459         (record_xml_tdesc): Update.
1460         (maintenance_check_xml_descriptions): Update.
1461         * target-descriptions.h (record_xml_tdesc): Update comment.
1462
1463 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1464
1465         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1466         checking array bounds are defined.
1467
1468 2018-07-30  Tom Tromey  <tom@tromey.com>
1469
1470         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1471         irreflexivity violation.
1472
1473 2018-07-30  Tom Tromey  <tom@tromey.com>
1474
1475         * cli/cli-decode.c (lookup_cmd): Remove lint code.
1476         * value.c (unpack_long): Remove lint code.
1477         * valops.c (value_ind): Remove lint code.
1478         * valarith.c (value_x_binop, value_x_unop, value_equal)
1479         (value_pos): Remove lint code.
1480
1481 2018-07-28  Tom de Vries  <tdevries@suse.de>
1482
1483         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1484         with undefined upper bound as <optimized out>.
1485
1486 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
1487
1488         * gcore.in: Rename variable "name" to "prefix".  Expand
1489         "usage" text.
1490
1491 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
1492
1493         * windows-nat.c (windows_nat_target::create_inferior): Update to
1494         call close() in global namespace.
1495
1496 2018-07-26  Tom Tromey  <tom@tromey.com>
1497
1498         * dwarf-index-write.c (add_address_entry): Don't add objfile
1499         offsets.
1500         * dbxread.c (find_stab_function): Rename from
1501         find_stab_function_addr.  Return a bound_minimal_symbol.
1502         (read_dbx_symtab): Use raw_text_low, raw_text_high.
1503         Don't add objfile offsets.
1504         (end_psymtab): Use raw_text_low, raw_text_high,
1505         MSYMBOL_VALUE_RAW_ADDRESS.
1506         (read_ofile_symtab): Update.
1507         (process_one_symbol): Update.
1508         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1509         offsets.
1510         (dw2_relocate): Remove.
1511         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1512         searching addrmap.
1513         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1514         Update.
1515         (process_psymtab_comp_unit_reader, add_partial_symbol)
1516         (add_partial_subprogram, dwarf2_ranges_read): Update.
1517         (load_partial_dies): Update.
1518         (add_address_entry): Don't add objfile offsets.
1519         (dwarf2_build_include_psymtabs): Update.
1520         (create_addrmap_from_aranges): Don't add objfile offsets.
1521         (dw2_find_pc_sect_compunit_symtab): Update.
1522         * mdebugread.c (parse_symbol): Don't add objfile offsets.
1523         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1524         Update.
1525         (parse_partial_symbols): Don't add objfile offsets.  Use
1526         raw_text_low, raw_text_high.  Update.
1527         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1528         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1529         or call 'relocate' quick function.  Clear psymbol_map.
1530         * psympriv.h (struct partial_symbol) <address>: Add section
1531         offset.
1532         <set_unrelocated_address>: Rename from set_address.
1533         <raw_text_low, raw_text_high>: New methods.
1534         <text_low, text_high>: Add objfile parameter.
1535         (add_psymbol_to_bcache): Add 'section' parameter.  Call
1536         set_unrelocated_address.
1537         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1538         (find_pc_psymbol): Update.
1539         (fixup_psymbol_section, relocate_psymtabs): Remove.
1540         (dump_psymtab, psym_functions): Update.
1541         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1542         parameter.
1543         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1544         (start_psymtab_common): Update.
1545         * symfile-debug.c (debug_qf_relocate): Remove.
1546         (debug_sym_quick_functions): Update.
1547         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1548         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1549         Update.
1550
1551 2018-07-26  Tom Tromey  <tromey@redhat.com>
1552
1553         * dbxread.c (end_psymtab): Use text_high_valid and
1554         text_low_valid.
1555         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1556         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1557         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1558         Update comment.
1559         <text_low_valid, text_high_valid>: New fields.
1560         <set_text_low, set_text_high>: Update.
1561         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1562
1563 2018-07-26  Tom Tromey  <tom@tromey.com>
1564
1565         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1566         Update.
1567         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1568         textlow and texthigh fields.
1569         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1570         Update.
1571         * mdebugread.c (parse_lines, parse_partial_symbols)
1572         (psymtab_to_symtab_1): Update.
1573         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1574         Rename fields.  Update comment.  Now private.
1575         <text_low, text_high, set_text_low, set_text_high>: New methods.
1576         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1577         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1578         (start_psymtab_common, maintenance_info_psymtabs)
1579         (maintenance_check_psymtabs): Update.
1580         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1581         texthigh fields.
1582         (scan_xcoff_symtab): Update.
1583
1584 2018-07-26  Tom Tromey  <tromey@redhat.com>
1585
1586         * psympriv.h (struct partial_symbol) <unrelocated_address,
1587         address, set_address>: New methods.
1588         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1589         (fixup_psymbol_section, relocate_psymtabs): Update.
1590         (print_partial_symbols): Add 'objfile' parameter.  Update.
1591         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1592         Update.
1593
1594 2018-07-26  Tom Tromey  <tom@tromey.com>
1595
1596         * dwarf-index-write.c (write_psymbols, debug_names::insert)
1597         (debug_names::write_psymbols): Update.
1598         * psympriv.h (struct partial_symbol): Derive from
1599         general_symbol_info.
1600         <obj_section>: New method.
1601         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1602         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1603         (find_pc_sect_psymbol, fixup_psymbol_section)
1604         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1605         (print_partial_symbols, recursively_search_psymtabs)
1606         (compare_psymbols, psymbol_hash, psymbol_compare)
1607         (add_psymbol_to_bcache, maintenance_check_psymtabs)
1608         (psymbol_name_matches, psym_fill_psymbol_map): Update.
1609
1610 2018-07-26  Tom Tromey  <tromey@redhat.com>
1611
1612         * dbxread.c (end_psymtab): Remove dead code.
1613
1614 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1615
1616         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1617         DWARF unwinders are disabled.
1618         * dwarf2-frame.c: Add dwarf2read.h include.
1619         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1620         disabled.
1621         (dwarf2_frame_unwinders_enabled_p): Define.
1622         (show_dwarf_unwinders_enabled_p): New function.
1623         (_initialize_dwarf2_frame): Register switch to control DWARF
1624         unwinder use.
1625         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1626         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1627         (show_dwarf_cmdlist): Remove static keyword.
1628         * dwarf2read.h (set_dwarf_cmdlist): Declare.
1629         (show_dwarf_cmdlist): Declare.
1630         * NEWS: Document new feature.
1631
1632 2018-07-26  Tom de Vries  <tdevries@suse.de>
1633
1634         PR breakpoints/23366
1635         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1636
1637 2018-07-26  Tom de Vries  <tdevries@suse.de>
1638
1639         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1640         DW_AT_count can't be translated to a dynamic prop.
1641
1642 2018-07-25  Tom de Vries  <tdevries@suse.de>
1643
1644         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1645         try/catch.
1646
1647 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
1648
1649         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1650
1651 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
1652
1653         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1654
1655 2018-07-24  Keith Seitz  <keiths@redhat.comt
1656
1657         PR symtab/23010
1658         * dwarf2read.c (dw2_add_symbol_to_list): New function.
1659         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1660         instead of add_symbol_to_list.
1661         (read_file_scope): Call prepare_one_comp_unit before reading
1662         any other DIEs.
1663
1664 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
1665
1666         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1667
1668 2018-07-24  Tom Tromey  <tom@tromey.com>
1669
1670         * utils.c (malloc, realloc, free): Don't declare.
1671         * configure, config.in: Rebuild.
1672         * configure.ac: Don't check for declarations of free, malloc, or
1673         realloc.
1674
1675 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1676
1677         * aarch64-linux-nat.c
1678         (aarch64_linux_nat_target::stopped_data_address): Remove unused
1679         variable.
1680         * arm-linux-nat.c (fetch_regs): Likewise.
1681         (store_regs): Likewise.
1682         (fetch_vfp_regs): Likewise.
1683         (store_vfp_regs): Likewise.
1684         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1685         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1686         (arm_linux_nat_target::insert_watchpoint): Likewise.
1687         (arm_linux_nat_target::remove_watchpoint): Likewise.
1688         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1689         Likewise.
1690         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1691         Likewise.
1692         * ppc-linux-nat.c (fetch_register): Likewise.
1693         (fetch_all_gp_regs): Likewise.
1694         (fetch_ppc_registers): Likewise.
1695         (store_all_gp_regs): Likewise.
1696         (store_ppc_registers): Likewise.
1697         (hwdebug_insert_point): Likewise.
1698         (can_use_watchpoint_cond_accel): Likewise.
1699         * remote-sim.c (gdb_os_write_stdout): Likewise.
1700
1701 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
1702             Tom Tromey  <tom@tromey.com>
1703
1704         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1705         test for it.
1706         * configure: Rebuild.
1707
1708 2018-07-22  Tom Tromey  <tom@tromey.com>
1709
1710         * regformats/regdat.sh: Define xmltarget_${name} inside
1711         #ifndef IN_PROCESS_AGENT.
1712
1713 2018-07-22  Tom Tromey  <tom@tromey.com>
1714
1715         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1716
1717 2018-07-22  Tom Tromey  <tom@tromey.com>
1718
1719         * symfile.c (reread_symbols): Notify iter, not objfile.
1720
1721 2018-07-22  Tom Tromey  <tom@tromey.com>
1722
1723         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1724         Use arch_ops.
1725         (ravenscar_thread_target::prepare_to_store): Likewise.
1726
1727 2018-07-22  Tom Tromey  <tom@tromey.com>
1728
1729         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1730         unused variable.  Call value_fetch_lazy when needed.
1731         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1732         Remove unused variable.  Call value_fetch_lazy when needed.
1733
1734 2018-07-22  Tom Tromey  <tom@tromey.com>
1735
1736         * m32c-tdep.c (mark_dma): Return void.
1737         (make_regs): Remove unused declarations.
1738
1739 2018-07-22  Tom Tromey  <tom@tromey.com>
1740
1741         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1742         cmdscm_get_valid_command_smob_arg_unsafe for effect.
1743         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1744         bkscm_get_valid_block_smob_arg_unsafe for effect.
1745
1746 2018-07-22  Tom Tromey  <tom@tromey.com>
1747
1748         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1749         value_type.
1750
1751 2018-07-22  Tom Tromey  <tom@tromey.com>
1752
1753         * windows-nat.c (saved_context): Conditionally define.
1754         * remote.c (remote_target::remote_btrace_maybe_reopen):
1755         Conditionally declare "warned".
1756         * inflow.c (sigquit_ours): Conditionally define.
1757         (new_tty): Move "tty" declaration inside #if.
1758         * guile/guile.c (guile_datadir): Conditionally define.
1759         * charset.c (set_be_le_names): Move some declarations inside #if.
1760         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1761         #if.
1762         (parse_xml_btrace_conf): Likewise.
1763
1764 2018-07-22  Tom Tromey  <tom@tromey.com>
1765
1766         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1767
1768 2018-07-22  Tom Tromey  <tom@tromey.com>
1769
1770         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
1771         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
1772         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
1773         * buildsym-legacy.c (get_macro_table): Remove unused variable.
1774         * stack.c (frame_apply_level_command): Remove unused variable.
1775         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
1776         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
1777         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
1778         unused variable.
1779         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
1780         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
1781         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
1782         variable.
1783         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
1784         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
1785         variable.
1786         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
1787         Remove unused variable.
1788         * cli/cli-script.c (recurse_read_control_structure): Remove unused
1789         variable.
1790         * common/tdesc.c (print_xml_feature::visit): Remove unused
1791         variable.
1792         * compile/compile-object-load.c (store_regs): Remove unused
1793         variables.
1794         * complaints.c (clear_complaints): Remove unused variable.
1795         * corelow.c (core_target_open): Remove unused variable.
1796         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
1797         variable.
1798         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
1799         variable.
1800         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
1801         variable.
1802         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
1803         variable.
1804         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
1805         variable.
1806         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
1807         variable.
1808         * ia64-tdep.c (examine_prologue): Remove unused variable.
1809         * infcall.c (run_inferior_call): Remove unused variable.
1810         * inferior.c (exit_inferior): Remove unused variable.
1811         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
1812         * linespec.c (decode_line_2): Remove unused variable.
1813         * linux-nat.c (super_close): Remove.
1814         * linux-tdep.c (linux_info_proc): Remove unused variable.
1815         * mi/mi-main.c (mi_execute_command): Remove unused variable.
1816         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
1817         Remove unused variable.
1818         * parse.c (find_minsym_type_and_address): Remove unused variable.
1819         * printcmd.c (info_symbol_command, printf_floating): Remove unused
1820         variable.
1821         * python/py-breakpoint.c (bppy_set_commands): Remove unused
1822         variable.
1823         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
1824         variables.
1825         * record-btrace.c (record_btrace_target::store_registers): Remove
1826         unused variable.
1827         (cmd_show_record_btrace_cpu): Remove unused variable.
1828         * riscv-tdep.c (riscv_register_reggroup_p)
1829         (riscv_push_dummy_call, riscv_return_value): Remove unused
1830         variable.
1831         * rust-exp.y (literal): Remove unused variable.
1832         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
1833         unused variable.
1834         <STRUCTOP_ANONYMOUS>: Likewise.
1835         * s390-linux-tdep.c (s390_linux_init_abi_31)
1836         (s390_linux_init_abi_64): Remove unused variable.
1837         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1838         (file_select_thread, net_windows_open, _initialize_ser_windows):
1839         Remove unused variables.
1840         * symtab.c (find_pc_sect_line): Remove unused variable.
1841         * target-memory.c (compute_garbled_blocks): Remove unused
1842         variable.
1843         (target_write_memory_blocks): Remove unused variable.
1844         * target.c (target_stack::unpush): Remove unused variables.
1845         * tracepoint.c (start_tracing, all_tracepoint_actions)
1846         (merge_uploaded_trace_state_variables)
1847         (print_one_static_tracepoint_marker): Remove unused variable.
1848         * unittests/basic_string_view/element_access/char/1.cc (test01):
1849         Remove unused variable.
1850         * windows-nat.c (windows_continue, windows_add_all_dlls)
1851         (do_initial_windows_stuff, windows_nat_target::create_inferior):
1852         Remove unused variables.
1853
1854 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
1855
1856         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1857         attr_profile in HAVE_ELF.
1858         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1859         HAVE_ELF.
1860
1861 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
1862
1863         * frame.c (frame_register_unwind): Change parameter name.
1864         (frame_unwind_register): Likewise.
1865         (frame_unwind_register_value): Likewise.
1866         (frame_unwind_register_signed): Likewise.
1867         (frame_unwind_register_unsigned): Likewise.
1868         * frame.h (frame_register_unwind): Likewise.
1869         (frame_unwind_register): Likewise.
1870         (frame_unwind_register_value): Likewise.
1871         (frame_unwind_register_signed): Likewise.
1872         (frame_unwind_register_unsigned): Likewise.
1873         (frame_unwind_arch): Likewise.
1874
1875 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1876
1877         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1878         ISA maintenance.
1879
1880 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
1881
1882         * mips-linux-nat.c (mips_linux_nat_target::read_description):
1883         Call `get_ptrace_pid' rather than extracting the ptrace PID by
1884         hand.
1885
1886 2018-07-20  Keith Seitz  <keiths@redhat.com>
1887
1888         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1889         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1890         m_compunit_symtab, m_language>: Add "m_" prefix.
1891         Update all uses.
1892         * buildsym.c: Update all uses.
1893
1894 2018-07-20  Tom Tromey  <tom@tromey.com>
1895
1896         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1897         * buildsym.h (record_line_ftype): Remove typedef.
1898
1899 2018-07-20  Tom Tromey  <tom@tromey.com>
1900
1901         * buildsym-legacy.h (augment_type_symtab): Don't declare.
1902         (end_expandable_symtab): Likewise.
1903         (end_symtab_get_static_block): Likewise.
1904         (end_symtab_from_static_block): Likewise.
1905         * buildsym-legacy.c (augment_type_symtab): Remove.
1906         (end_expandable_symtab): Remove.
1907         (end_symtab_get_static_block): Remove.
1908         (end_symtab_from_static_block): Remove.
1909
1910 2018-07-20  Tom Tromey  <tom@tromey.com>
1911
1912         * dwarf2read.c: Include buildsym.h.
1913         (struct dwarf2_cu) <builder>: New method.
1914         (fixup_go_packaging): Update.
1915         (process_full_comp_unit, process_full_type_unit): Update.  Don't
1916         use scoped_free_pendings.
1917         (using_directives): Add "cu" parameter, remove "language".
1918         (read_import_statement, setup_type_unit_groups, )
1919         (read_func_scope, read_lexical_block_scope)
1920         (dwarf2_record_block_ranges, read_namespace): Update.
1921         (lnp_state_machine::lnp_state_machine): Add cu parameter.
1922         (lnp_state_machine::handle_end_sequence): Update.
1923         (class lnp_state_machine) <m_cu>: New member.
1924         <m_record_line_callback>: Remove.
1925         <m_currently_recording_lines>: New member.
1926         (lnp_state_machine::handle_set_file): Update.
1927         (noop_record_line): Remove.
1928         (dwarf_record_line_p): Add cu parameter.
1929         (dwarf_record_line_1, dwarf_finish_line): Likewise.
1930         (lnp_state_machine::record_line)
1931         (lnp_state_machine::lnp_state_machine)
1932         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1933         (dwarf_decode_lines): Update.
1934         (dwarf2_start_subfile): Add cu parameter.
1935         (dwarf2_start_symtab, new_symbol): Update.
1936         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1937         Remove dwarf2_per_objfile parameter.
1938         (dwarf_decode_macros): Update.
1939
1940 2018-07-20  Tom Tromey  <tom@tromey.com>
1941
1942         * stabsread.c (define_symbol): Update.
1943         * buildsym-legacy.h (get_buildsym_compunit): Declare.
1944         * dwarf2read.c (new_symbol): Update.
1945         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1946         * cp-namespace.c: Include buildsym.h.
1947         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1948         * buildsym-legacy.c (get_buildsym_compunit): New function.
1949
1950 2018-07-20  Tom Tromey  <tom@tromey.com>
1951
1952         * xcoffread.c: Include buildsym-legacy.h.
1953         * windows-nat.c: Include buildsym-legacy.h.
1954         * stabsread.c: Include buildsym-legacy.h.
1955         * mdebugread.c: Include buildsym-legacy.h.
1956         * buildsym-legacy.h: New file.
1957         * buildsym-legacy.c: New file, from buildsym.c.
1958         * go32-nat.c: Include buildsym-legacy.h.
1959         * dwarf2read.c: Include buildsym-legacy.h.
1960         * dbxread.c: Include buildsym-legacy.h.
1961         * cp-namespace.c: Include buildsym-legacy.h.
1962         * coffread.c: Include buildsym-legacy.h.
1963         * buildsym.h: Move some contents to buildsym-legacy.h.
1964         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
1965         buildsym-legacy.c.
1966         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1967
1968 2018-07-20  Tom Tromey  <tom@tromey.com>
1969
1970         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1971         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1972         (buildsym_compunit::buildsym_compunit)
1973         (buildsym_compunit::~buildsym_compunit)
1974         (buildsym_compunit::get_macro_table): Define.
1975
1976 2018-07-20  Tom Tromey  <tom@tromey.com>
1977
1978         * buildsym.c (reset_symtab_globals): Remove.
1979         (buildsym_compunit::end_symtab_from_static_block): Update.
1980         (buildsym_compunit::augment_type_symtab): Update.
1981         (end_symtab_from_static_block): Call free_buildsym_compunit.
1982         (augment_type_symtab, end_symtab, end_expandable_symtab):
1983         Likewise.
1984
1985 2018-07-20  Tom Tromey  <tom@tromey.com>
1986
1987         * arch-utils.c: Do not include buildsym.h.
1988         * mipsread.c: Do not include buildsym.h.
1989         * machoread.c: Do not include buildsym.h.
1990         * elfread.c: Do not include buildsym.h.
1991
1992 2018-07-20  Tom Tromey  <tom@tromey.com>
1993
1994         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1995         initialization.
1996         (buildsym_compunit): Add new constructor.
1997         (struct buildsym_compunit) <get_last_source_file, finish_block,
1998         record_block_range, start_subfile, patch_subfile_names,
1999         push_subfile, pop_subfile, record_line, get_compunit_symtab,
2000         set_last_source_start_addr, get_last_source_start_addr,
2001         get_local_using_directives, set_local_using_directives,
2002         get_global_using_directives, outermost_context_p,
2003         get_current_context_stack, get_context_stack_depth,
2004         get_current_subfile, get_local_symbols, get_file_symbols,
2005         get_global_symbols, record_debugformat, record_producer,
2006         push_context, pop_context, end_symtab_get_static_block,
2007         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2008         New public methods.
2009         <record_pending_block, finish_block_internal, make_blockvector,
2010         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2011         private methods.
2012         Update all users.
2013
2014 2018-05-22  Tom Tromey  <tom@tromey.com>
2015
2016         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2017         parameter.
2018         (finish_block_internal): Update.
2019
2020 2018-07-20  Tom Tromey  <tom@tromey.com>
2021
2022         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
2023         parameter.
2024         (finish_block_internal): Update.
2025
2026 2018-07-20  Tom Tromey  <tom@tromey.com>
2027
2028         * buildsym.h (EXTERN): Don't define or undef.
2029         * buildsym.c (EXTERN): Don't define.
2030
2031 2018-07-20  Tom Tromey  <tom@tromey.com>
2032
2033         * buildsym.c: Remove TODO comment.
2034
2035 2018-07-20  Tom Tromey  <tom@tromey.com>
2036
2037         * coffread.c (coff_symtab_read): Update.
2038         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2039         (xcoff_new_init): Update.
2040         * mipsread.c (mipscoff_new_init): Update.
2041         * mdebugread.c (mdebug_build_psymtabs): Update.
2042         * elfread.c (elf_new_init): Update.
2043         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2044         Update.
2045         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2046         (coffstab_build_psymtabs, elfstab_build_psymtabs)
2047         (stabsect_build_psymtabs): Update.
2048         * buildsym.h (buildsym_init): Don't declare.
2049         * buildsym.c: Update comment.
2050         (prepare_for_building): Remove.
2051         (start_symtab, restart_symtab): Update.
2052         (reset_symtab_globals): Update comment.
2053         (buildsym_init): Remove.
2054
2055 2018-07-20  Tom Tromey  <tom@tromey.com>
2056
2057         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2058         * stabsread.c (patch_block_stabs, define_symbol, read_type)
2059         (read_enum_type, common_block_start, common_block_end)
2060         (cleanup_undefined_types_1, finish_global_stabs): Update.
2061         * mdebugread.c (psymtab_to_symtab_1): Update.
2062         * dwarf2read.c (fixup_go_packaging, read_func_scope)
2063         (read_lexical_block_scope, new_symbol): Update.
2064         * dbxread.c (process_one_symbol): Update.
2065         * coffread.c (coff_symtab_read, process_coff_symbol)
2066         (coff_read_enum_type): Update.
2067         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2068         declare.
2069         (get_local_symbols, get_file_symbols, get_global_symbols): New
2070         functions.
2071         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2072         m_global_symbols.
2073         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2074         (~scoped_free_pendings): Update.
2075         (finish_block, prepare_for_building, reset_symtab_globals)
2076         (end_symtab_get_static_block, end_symtab_with_blockvector)
2077         (augment_type_symtab, push_context): Update.
2078         (get_local_symbols, get_file_symbols, get_global_symbols): New
2079         functions.
2080         (buildsym_init): Update.
2081
2082 2018-07-20  Tom Tromey  <tom@tromey.com>
2083
2084         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2085         (process_full_type_unit): Likewise.
2086         (dwarf2_start_symtab): Set list_in_scope.
2087
2088 2018-07-20  Tom Tromey  <tom@tromey.com>
2089
2090         * dwarf2read.c (process_psymtab_comp_unit_reader)
2091         (build_type_psymtabs_reader): Do not set list_in_scope.
2092
2093 2018-07-20  Tom Tromey  <tom@tromey.com>
2094
2095         * buildsym.c (free_pendings): Remove.
2096         (add_symbol_to_list, scoped_free_pendings)
2097         (finish_block_internal, buildsym_init): Update.
2098
2099 2018-07-20  Tom Tromey  <tom@tromey.com>
2100
2101         * xcoffread.c (read_xcoff_symtab): Update.
2102         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2103         Update.
2104         * dbxread.c (process_one_symbol): Update.
2105         * coffread.c (coff_symtab_read): Update.
2106         * buildsym.h (finish_block): Update.
2107         * buildsym.c (finish_block): Remove "listhead" argument.
2108         (end_symtab_get_static_block): Update.
2109
2110 2018-07-20  Tom Tromey  <tom@tromey.com>
2111
2112         * buildsym.h (class scoped_free_pendings): Remove constructor.
2113         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2114         method.
2115         <m_pending_block_obstack, m_pending_blocks>: New members.
2116         (pending_block_obstack, pending_blocks): Remove.
2117         (scoped_free_pendings::scoped_free_pendings): Default.
2118         (~scoped_free_pendings): Update.
2119         (free_pending_blocks): Remove.
2120         (finish_block_internal, record_pending_block, make_blockvector)
2121         (end_symtab_get_static_block, augment_type_symtab, push_context)
2122         (buildsym_init): Update.
2123
2124 2018-07-20  Tom Tromey  <tom@tromey.com>
2125
2126         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2127         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2128         members.
2129         (pending_addrmap, pending_addrmap_obstack)
2130         (pending_addrmap_interesting): Remove.
2131         (scoped_free_pendings, record_block_range, make_blockvector)
2132         (prepare_for_building, reset_symtab_globals, buildsym_init):
2133         Update.
2134
2135 2018-07-20  Tom Tromey  <tom@tromey.com>
2136
2137         * xcoffread.c (process_linenos): Update.
2138         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2139         * mdebugread.c (psymtab_to_symtab_1): Update.
2140         * dwarf2read.c (setup_type_unit_groups)
2141         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2142         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2143         * dbxread.c (process_one_symbol): Update.
2144         * coffread.c (coff_symtab_read, enter_linenos)
2145         (process_coff_symbol): Update.
2146         * buildsym.h (current_subfile): Don't declare.
2147         (get_current_subfile): Declare.
2148         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2149         member.
2150         (start_subfile, free_buildsym_compunit, push_subfile)
2151         (prepare_for_building, start_symtab): Update.
2152         (get_current_subfile): New function.
2153
2154 2018-07-20  Tom Tromey  <tom@tromey.com>
2155
2156         * coffread.c (coff_symtab_read): Update.
2157         * xcoffread.c (read_xcoff_symtab): Update.
2158         * dwarf2read.c (new_symbol): Update.
2159         (read_func_scope, read_lexical_block_scope): Update.
2160         * dbxread.c (process_one_symbol): Update.
2161         * buildsym.h (context_stack, context_stack_depth): Don't declare.
2162         (outermost_context_p): Remove macro.
2163         (outermost_context_p, get_current_context_stack)
2164         (get_context_stack_depth): Declare.
2165         (pop_context): Return struct context_stack.
2166         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2167         member.
2168         (context_stack_size): Remove.
2169         (INITIAL_CONTEXT_STACK_SIZE): Remove.
2170         (prepare_for_building, end_symtab_get_static_block)
2171         (augment_type_symtab, push_context): Update.
2172         (pop_context): Return struct context_stack.
2173         (outermost_context_p, get_current_context_stack)
2174         (get_context_stack_depth): New functions.
2175         (buildsym_init): Update.
2176
2177 2018-07-20  Tom Tromey  <tom@tromey.com>
2178
2179         * rust-exp.y: Now a pure parser.  Update all rules.
2180         (%union): Move earlier.
2181         (current_parser, work_obstack): Remove globals.
2182         (rust_parser, ~rust_parser): Update.
2183         (class rust_parser) <copy_name, concat3, crate_name, super_name,
2184         lex_character, lex_number, lex_string, lex_identifier,
2185         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2186         convert_name, convert_params_to_expression,
2187         convert_ast_to_expression, ast_basic_type, ast_operation,
2188         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2189         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2190         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2191         ast_array_type, ast_slice_type, ast_reference_type,
2192         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2193         (rust_parse): Update.
2194         (rustyyerror, rustyylex): Add parser parameter.
2195         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2196         (rust_lex_stringish_test, rust_lex_test_sequence)
2197         (rust_lex_test_trailing_dot, rust_lex_test_completion)
2198         (rust_lex_test_push_back, rust_lex_tests): Update.
2199
2200 2018-07-19  Pedro Alves  <palves@redhat.com>
2201
2202         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2203         gdb::unique_xmalloc_ptr.
2204         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2205         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2206         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2207         copy-initialization.
2208         * guile/scm-pretty-print.c (ppscm_print_children): Use
2209         gdb::unique_xmalloc_ptr instead of cleanups.
2210         (gdbscm_apply_val_pretty_printer): Remove cleanups.
2211         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2212         gdb::unique_xmalloc_ptr.
2213         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2214         Adjust to use gdb::unique_xmalloc_ptr.
2215         * guile/scm-utils.c (extract_arg): Adjust.
2216         * guile/scm-value.c (gdbscm_value_field): Adjust to use
2217         gdb::unique_xmalloc_ptr instead of a cleanup.
2218
2219 2018-07-19  Tom Tromey  <tom@tromey.com>
2220
2221         * utils.c (do_value_free_to_mark)
2222         (make_cleanup_value_free_to_mark): Remove.
2223         * utils.h (make_cleanup_value_free_to_mark): Remove.
2224
2225 2018-07-19  Pedro Alves  <palves@redhat.com>
2226
2227         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2228         forwarding reference.
2229
2230 2018-07-18  Pedro Alves  <palves@redhat.com>
2231
2232         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2233         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
2234         cleanup.
2235
2236 2018-07-18  Pedro Alves  <palves@redhat.com>
2237
2238         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2239         exceptions.
2240         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2241         (gdbscm_wrap): New.
2242         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2243         directly instead of a cleanup.
2244         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2245         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
2246         (vlscm_binop_gdbthrow): New, factored out from ...
2247         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
2248         (vlscm_rich_compare): Use gdbscm_wrap.
2249         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2250         instead of a cleanup.
2251         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2252         cleanup.
2253         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2254         Use xfree directly instead of a cleanup.
2255         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2256         Adjust to use gdbscm_wrap and scoped_value_mark.
2257         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2258         (gdbscm_value_address, gdbscm_value_dereference)
2259         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2260         scoped_value_mark.
2261         (gdbscm_value_dynamic_type): Use scoped_value_mark.
2262         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2263         scoped_value_mark.
2264         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2265         gdbscm_wrap and scoped_value_mark.
2266         (gdbscm_value_to_string): Use xfree directly instead of a
2267         cleanup.  Move 'buffer' unique_ptr to TRY scope.
2268         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2269         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
2270         scoped_value_mark.
2271         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2272         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2273         scoped_value_mark.
2274         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2275         gdbscm_wrap.
2276
2277 2018-07-18  Tom de Vries  <tdevries@suse.de>
2278
2279         * findvar.c (default_read_var_value): Also resolve dynamic type for
2280         LOC_OPTIMIZED_OUT vars.
2281
2282 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
2283
2284         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2285         decoding.
2286
2287 2018-07-17  Tom Tromey  <tom@tromey.com>
2288
2289         * guile/scm-param.c (pascm_set_func, pascm_show_func)
2290         (compute_enum_list, pascm_set_param_value_x)
2291         (gdbscm_parameter_value): Update.
2292         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2293         (gdbscm_scm_to_host_string): Update.
2294         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2295         Update.
2296         * guile/scm-cmd.c (cmdscm_add_completion): Update.
2297         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2298         * guile/scm-string.c (gdbscm_scm_to_string): Return
2299         unique_xmalloc_ptr.
2300         (gdbscm_scm_to_host_string): Likewise.
2301
2302 2018-07-17  Tom Tromey  <tom@tromey.com>
2303
2304         * guile/guile.c (gdbscm_eval_from_control_command): Update.
2305         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2306         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2307         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2308         unique_xmalloc_ptr.
2309
2310 2018-07-17  Tom Tromey  <tom@tromey.com>
2311
2312         * guile/scm-param.c (pascm_signal_setshow_error): Update.
2313         * guile/guile-internal.h (gdbscm_exception_message_to_string):
2314         Update.
2315         * guile/scm-cmd.c (cmdscm_function): Update.
2316         * guile/scm-pretty-print.c
2317         (ppscm_print_exception_unless_memory_error): Update.
2318         * guile/scm-exception.c (gdbscm_exception_message_to_string):
2319         Return unique_xmalloc_ptr.
2320
2321 2018-07-17  Tom Tromey  <tom@tromey.com>
2322
2323         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2324         Use string_printf.
2325
2326 2018-07-17  Jim Wilson  <jimw@sifive.com>
2327
2328         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2329         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
2330         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
2331         unecessary braces after EF_RISCV_RVC test.  Delete call to
2332         set_gdbarch_decr_pc_after_break.
2333
2334         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2335         RISCV_LAST_FP_REGNUM + 1.
2336         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2337
2338 2018-07-17  Tom Tromey  <tom@tromey.com>
2339
2340         * configure.ac: Remove --disable-gdbcli.
2341         * configure: Rebuild.
2342         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2343         (SUBDIR_CLI_CFLAGS): Remove.
2344         (SFILES): Use SUBDIR_CLI_SRCS.
2345         (COMMON_OBS): Use SUBDIR_CLI_OBS.
2346
2347 2018-07-17  Tom Tromey  <tom@tromey.com>
2348
2349         PR gdb/18624:
2350         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2351
2352 2018-07-16  Jim Wilson  <jimw@sifive.com>
2353
2354         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2355
2356 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2357
2358         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2359         variable.
2360         (libunwind_frame_sniffer): Likewise.
2361         (libunwind_frame_prev_register): Likewise.
2362         (libunwind_sigtramp_frame_sniffer): Likewise.
2363         * ia64-tdep.c (ia64_access_reg): Likewise.
2364         (ia64_access_rse_reg): Likewise.
2365         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2366         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2367
2368 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2369
2370         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2371
2372 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
2373
2374         * remote-sim.c (gdbsim_target::close,
2375         gdbsim_target::mourn_inferior): Remove unused variables.
2376
2377 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
2378
2379         * ia64-tdep.c (ktab_buf): New global.
2380         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2381         (get_kernel_table): Adjust.
2382
2383 2018-07-16  Tom Tromey  <tom@tromey.com>
2384
2385         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2386         * dwarf2read.c (using_directives, new_symbol): Use
2387         outermost_context_p.
2388         * dbxread.c (process_one_symbol): Use outermost_context_p.
2389         * coffread.c (coff_symtab_read): Use outermost_context_p.
2390
2391 2018-07-16  Tom Tromey  <tom@tromey.com>
2392
2393         * dwarf2read.c (using_directives, read_func_scope)
2394         (read_lexical_block_scope): Update.
2395         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2396         * buildsym.h (local_using_directives, global_using_directives):
2397         Don't declare.
2398         (get_local_using_directives, set_local_using_directives)
2399         (get_global_using_directives): Declare.
2400         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2401         m_global_using_directives>: New members.
2402         (finish_block_internal, prepare_for_building)
2403         (reset_symtab_globals, end_symtab_get_static_block)
2404         (push_context): Update.
2405         (get_local_using_directives, set_local_using_directives)
2406         (get_global_using_directives): New functions.
2407         (buildsym_init): Update.
2408
2409 2018-07-16  Tom Tromey  <tom@tromey.com>
2410
2411         * xcoffread.c (xcoff_initial_scan): Don't call
2412         free_pending_blocks.
2413         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2414         * buildsym.h (class scoped_free_pendings): Add constructor.
2415         (free_pending_blocks): Don't declare.
2416         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2417         (free_pending_blocks): Now static.
2418
2419 2018-07-16  Tom Tromey  <tom@tromey.com>
2420
2421         * buildsym.h (push_subfile, pop_subfile): Update declarations.
2422         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2423         member.
2424         (struct subfile_stack): Remove.
2425         (subfile_stack): Remove.
2426         (push_subfile, pop_subfile, buildsym_init): Update.
2427
2428 2018-07-16  Tom Tromey  <tom@tromey.com>
2429
2430         * buildsym.c (push_subfile): Use gdb_assert.
2431         (pop_subfile): Use gdb_assert.
2432
2433 2018-07-16  Tom Tromey  <tom@tromey.com>
2434
2435         * buildsym.h (merge_symbol_lists): Remove.
2436         * buildsym.c (merge_symbol_lists): Remove.
2437
2438 2018-07-16  Tom Tromey  <tom@tromey.com>
2439
2440         * stabsread.c (scan_file_globals): Update comment.
2441         * stabsread.h (scan_file_globals): Move from buildsym.h.
2442         * buildsym.h (scan_file_globals): Move to stabsread.h.
2443
2444 2018-07-16  Tom Tromey  <tom@tromey.com>
2445
2446         * xcoffread.c (xcoff_new_init): Update.
2447         * mipsread.c (mipscoff_new_init): Update.
2448         * mdebugread.c (mdebug_build_psymtabs): Update.
2449         * elfread.c (elf_new_init): Update.
2450         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2451         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2452         * buildsym.h (buildsym_new_init): Don't declare.
2453         * buildsym.c (buildsym_new_init): Remove.
2454
2455 2018-07-16  Tom Tromey  <tom@tromey.com>
2456
2457         * stabsread.h (within_function): Move from buildsym.h.
2458         * stabsread.c (start_stabs): Clear within_function.
2459         * coffread.c (coff_start_symtab): Clear within_function.
2460         * buildsym.h (within_function): Move to stabsread.h.
2461         * buildsym.c (prepare_for_building): Update.
2462
2463 2018-07-16  Tom Tromey  <tom@tromey.com>
2464
2465         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2466         * dwarf2read.c (dwarf2_start_symtab): Don't set
2467         processing_gcc_compilation.
2468         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2469
2470 2018-07-16  Tom Tromey  <tom@tromey.com>
2471
2472         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2473         (next_symbol_text_func): Move from buildsym.h.
2474         * stabsread.c (hashname): Move from buildsym.c.
2475         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2476         (next_symbol_text_func, hashname): Move to stabsread.h.
2477         * buildsym.c: Don't include bcache.h
2478         (hashname): Move to stasbread.c.
2479
2480 2018-07-16  Tom Tromey  <tom@tromey.com>
2481
2482         * buildsym.h (context_stack_size): Don't declare.
2483         * buildsym.c (context_stack_size): New global.
2484
2485 2018-07-16  Tom Tromey  <tom@tromey.com>
2486
2487         * dbxread.c (processing_acc_compilation): New global.
2488         * buildsym.h (processing_acc_compilation): Don't declare.
2489
2490 2018-07-16  Tom Tromey  <tom@tromey.com>
2491
2492         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2493         * dbxread.c (read_ofile_symtab): Update.
2494         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2495         * buildsym.h (last_source_start_addr): Remove.
2496         (set_last_source_start_addr, get_last_source_start_addr):
2497         Declare.
2498         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2499         parameter.
2500         (struct buildsym_compunit) <m_last_source_start_addr>: New
2501         member.
2502         (prepare_for_building): Remove start_addr parameter.
2503         (start_symtab, restart_symtab, end_symtab_get_static_block)
2504         (end_symtab_with_blockvector): Update.
2505         (set_last_source_start_addr, get_last_source_start_addr): New
2506         functions.
2507
2508 2018-07-16  Tom Tromey  <tom@tromey.com>
2509
2510         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2511         member.
2512         (have_line_numbers): Remove.
2513         (record_line, prepare_for_building, end_symtab_get_static_block)
2514         (augment_type_symtab): Update.
2515
2516 2018-07-16  Tom Tromey  <tom@tromey.com>
2517
2518         * buildsym.c (~buildsym_compunit): Free the macro table.
2519         (struct buildsym_compunit) <get_macro_table, release_macros>: New
2520         methods.
2521         <m_pending_macros>: New member.
2522         (pending_macros): Remove.
2523         (~scoped_free_pendings, get_macro_table, prepare_for_building)
2524         (reset_symtab_globals, end_symtab_get_static_block)
2525         (end_symtab_with_blockvector, augment_type_symtab)
2526         (buildsym_init): Update.
2527
2528 2018-07-16  Tom Tromey  <tom@tromey.com>
2529
2530         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2531         parameter.
2532         (buildsym_compunit::set_last_source_file): New method.
2533         <m_last_source_file>: New member.
2534         (prepare_for_building): Remove "name" parameter.
2535         (start_symtab, restart_symtab, reset_symtab_globals): Update.
2536         (last_source_file): Remove.
2537         (set_last_source_file, get_last_source_file): Update.
2538
2539 2018-07-16  Tom Tromey  <tom@tromey.com>
2540
2541         * buildsym.c (prepare_for_building): Add assert.
2542
2543 2018-07-16  Tom Tromey  <tom@tromey.com>
2544
2545         * buildsym.c (~buildsym_compunit): Update.
2546         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2547         (start_subfile, patch_subfile_names)
2548         (end_symtab_with_blockvector): Update.
2549
2550 2018-07-16  Tom Tromey  <tom@tromey.com>
2551
2552         * buildsym.c (struct buildsym_compunit): Add constructor,
2553         destructor, initializers.
2554         (start_buildsym_compunit): Remove.
2555         (free_buildsym_compunit): Use "delete".
2556         (start_symtab, restart_symtab): Use "new".
2557
2558 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
2559
2560         * symfile.c (set_objfile_default_section_offset): Remove struct
2561         keyword.
2562
2563 2018-07-14  Stafford Horne  <shorne@gmail.com>
2564
2565         * (Responsible Maintainers): Add myself as or1k maintainer.
2566
2567 2018-07-13  Tom Tromey  <tom@tromey.com>
2568
2569         * symfile.c (set_objfile_default_section_offset): Use extra braces
2570         around initializer.
2571
2572 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2573
2574         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2575         non-branching basr.
2576
2577 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2578
2579         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2580         unittests/cli-utils-selftests.c
2581         * unittests/cli-utils-selftests.c: New file.
2582
2583 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2584
2585         * NEWS: Mention new commands. Mention change to 'thread apply'.
2586
2587 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2588
2589         * thread.c (thr_try_catch_cmd): New function.
2590         (thread_apply_all_command): Handle qcs flags.
2591         (thread_apply_command): Handle qcs flags.
2592         (taas_command): New function.
2593         (tfaas_command): New function.
2594         (_initialize_thread): Update to setup the new commands 'taas
2595         and 'tfaas'. Change doc string for 'thread apply'.
2596
2597 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2598
2599         * stack.c: (trailing_outermost_frame): New function, mostly
2600         extracted from backtrace_command_1.
2601         (leading_innermost_frame): New function.
2602         (backtrace_command_1): Update to call trailing_outermost_frame.
2603         (frame_apply_command_count): New function.
2604         (frame_apply_level_command): New function.
2605         (frame_apply_all_command): New function.
2606         (frame_apply_command): New function.
2607         (faas_command): New function.
2608         (frame_cmd_list): New variable.
2609         (_initialize_stack): Update to setup the new commands 'frame apply'
2610         and 'faas'.
2611
2612 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2613
2614         * cli-utils.c (number_or_range_parser::get_number): Only handle
2615         numbers or convenience var as numbers.
2616         (parse_flags): New function.
2617         (parse_flags_qcs): New function.
2618         (number_or_range_parser::finished): Ensure parsing end is detected
2619         before end of string.
2620         * cli-utils.h (parse_flags): New function.
2621         (parse_flags_qcs): New function.
2622         (number_or_range_parser): Remove m_finished bool.
2623         (number_or_range_parser::skip_range): Set m_in_range to false.
2624
2625 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2626
2627         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2628         on Windows.
2629
2630 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2631             Jan Kratochvil  <jan.kratochvil@redhat.com>
2632             Paul Fertser  <fercerpav@gmail.com>
2633             Tsutomu Seki  <sekiriki@gmail.com>
2634             Pedro Alves  <palves@redhat.com>
2635
2636         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2637         'unittests/parse-connection-spec-selftests.c'.
2638         (COMMON_SFILES): Add 'common/netstuff.c'.
2639         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2640         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2641         * common/netstuff.c: New file.
2642         * common/netstuff.h: New file.
2643         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2644         (wait_for_connect): Update comment.  New parameter
2645         'gdb::optional<int> sock' instead of 'struct serial *scb'.
2646         Use 'sock' directly instead of 'scb->fd'.
2647         (try_connect): New function, with code from 'net_open'.
2648         (net_open): Rewrite main loop to deal with multiple
2649         sockets/addresses.  Handle IPv6-style hostnames; implement
2650         support for IPv6 connections.
2651         * unittests/parse-connection-spec-selftests.c: New file.
2652
2653 2018-07-11  Pedro Alves  <palves@redhat.com>
2654
2655         PR gdb/23377
2656         * remote.c (remote_target::remote_detach_pid): Call
2657         set_current_process.
2658
2659 2018-07-11  Pedro Alves  <palves@redhat.com>
2660
2661         * h8300-tdep.c (h8300_gdbarch_init): Remove
2662         set_gdbarch_ecoff_reg_to_regnum calls.
2663
2664 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
2665
2666         PR c++/23373
2667         * c-typeprint.c (c_type_print_base_struct_union): Don't print
2668         offsets/sizes for static members of a class/struct.
2669
2670 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
2671
2672         * target-descriptions.c (tdesc_register_bitsize): Rename.
2673         * target-descriptions.h (tdesc_register_bitsize): Likewise.
2674         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2675         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2676
2677 2018-07-10  Tom Tromey  <tom@tromey.com>
2678
2679         * breakpoint.c (moribund_locations): Now static and a
2680         std::vector.
2681         (breakpoint_init_inferior, moribund_breakpoint_here_p)
2682         (build_bpstat_chain, update_global_location_list)
2683         (breakpoint_retire_moribund): Update.
2684         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
2685         VEC.
2686
2687 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2688
2689         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2690         (riscv_register_reggroup_p): Use new function, remove unneeded
2691         parenthesis.
2692         (riscv_push_dummy_call): Extend assert to compare against xlen or
2693         flen based on register type.
2694
2695 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2696
2697         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2698
2699 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2700
2701         * remote.c (show_hardware_watchpoint_limit): New function.
2702         (show_hardware_watchpoint_length_limit): New function.
2703         (show_hardware_breakpoint_limit): New function.
2704         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2705         where appropriate, update help text.
2706
2707 2018-07-09  Tom Tromey  <tom@tromey.com>
2708
2709         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2710         (CLIBS): Don't mention NAT_CLIBS.
2711
2712 2018-07-09  Tom Tromey  <tom@tromey.com>
2713
2714         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2715         (LIBGDB_OBS, clean mostlyclean): Update.
2716         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2717
2718 2018-07-09  Tom Tromey  <tom@tromey.com>
2719
2720         * Makefile.in (%.c: %.y): Use ECHO_YACC.
2721         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
2722         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2723
2724 2018-07-09  Tom Tromey  <tom@tromey.com>
2725
2726         * Makefile.in (ALLDEPFILES): Remove exec.c.
2727         (COMMON_OBS): Remove exec.o.
2728         (COMMON_SFILES): Add exec.c.
2729
2730 2018-07-09  Tom Tromey  <tom@tromey.com>
2731
2732         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2733
2734 2018-07-09  Tom Tromey  <tom@tromey.com>
2735
2736         * Makefile.in (clean mostlyclean): Remove stamp-version.
2737         (version.c): Depend on stamp-version.
2738         (stamp-version): New rule, from version.c rule.
2739
2740 2018-07-09  Tom Tromey  <tom@tromey.com>
2741
2742         * Makefile.in (init.c): Depend on stamp-init.
2743         (stamp-init): New rule, from init.c rule.
2744         (clean mostlyclean): Remove stamp-init.
2745
2746 2018-07-09  Tom Tromey  <tom@tromey.com>
2747
2748         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2749         SUBDIR_GCC_COMPILE_SRCS.
2750
2751 2018-07-09  Tom Tromey  <tom@tromey.com>
2752
2753         * Makefile.in (init.c): Remove some unused sed rules.
2754
2755 2018-07-09  Tom Tromey  <tom@tromey.com>
2756
2757         * Makefile.in (TSOBS): Remove.
2758         (INIT_FILES): Update.
2759         (LIBGDB_OBS): Update.
2760         (COMMON_SFILES): Add inflow.c.
2761         (SFILES): Remove inflow.c.
2762
2763 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2764
2765         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2766
2767 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
2768
2769         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
2770         get_saveloc_name, is_signal_frame_name, step_name,
2771         init_remote_name, create_addr_space_name,
2772         destroy_addr_space_name, search_unwind_table_name,
2773         find_dyn_list_name): Constify.
2774
2775 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
2776
2777         * darwin-nat.c (darwin_pthread_kill): New function.
2778         (darwin_resume_thread): Use darwin_pthread_kill.
2779
2780 2018-07-05  Tom de Vries  <tdevries@suse.de>
2781
2782         * macroexp.c (macro_buffer) <operator=>: New member function.
2783
2784 2018-07-04  Tom Tromey  <tom@tromey.com>
2785
2786         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2787
2788 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
2789
2790         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
2791         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
2792         * maint.c: Likewise.
2793         * top.c: Likewise.
2794
2795 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2796
2797         * NEWS: Create a new section for the next release branch.
2798         Rename the section of the current branch, now that it has
2799         been cut.
2800
2801 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
2802
2803         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
2804         * version.in: Bump version to 8.2.50.DATE-git.
2805
2806 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
2807             Pedro Alves  <palves@redhat.com>
2808
2809         * linux-nat.c (linux_init_ptrace): Rename to ...
2810         (linux_init_ptrace_procfs): ... this.  Call
2811         linux_proc_init_warnings.
2812         (linux_nat_target::post_attach)
2813         (linux_nat_target::post_startup_inferior): Adjust.
2814         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
2815         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
2816
2817 2018-07-04  Tom de Vries  <tdevries@suse.de>
2818
2819         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
2820         check ...
2821         (read_comp_unit_head): ... here.
2822
2823 2018-07-03  Tom Tromey  <tom@tromey.com>
2824
2825         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
2826         (stop_tracing, tstatus_command)
2827         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
2828         (print_one_static_tracepoint_marker): Update.
2829         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
2830         std::vector.
2831         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
2832         VEC.
2833         (all_tracepoints, static_tracepoints_here): Return std::vector.
2834
2835 2018-07-03  Tom Tromey  <tom@tromey.com>
2836
2837         * common/ptid.c (ptid_equal): Remove.
2838         * common/ptid.h (ptid_equal): Don't declare.
2839         * ada-tasks.c: Update.
2840         * breakpoint.c: Update.
2841         * common/agent.c: Update.
2842         * corelow.c: Update.
2843         * darwin-nat-info.c: Update.
2844         * darwin-nat.c: Update.
2845         * dcache.c: Update.
2846         * dtrace-probe.c: Update.
2847         * dummy-frame.c: Update.
2848         * fbsd-nat.c: Update.
2849         * frame.c: Update.
2850         * gdbthread.h: Update.
2851         * gnu-nat.c: Update.
2852         * go32-nat.c: Update.
2853         * inf-loop.c: Update.
2854         * inf-ptrace.c: Update.
2855         * infcall.c: Update.
2856         * infcmd.c: Update.
2857         * inflow.c: Update.
2858         * infrun.c: Update.
2859         * linux-fork.c: Update.
2860         * linux-nat.c: Update.
2861         * linux-thread-db.c: Update.
2862         * mi/mi-cmd-var.c: Update.
2863         * mi/mi-interp.c: Update.
2864         * mi/mi-main.c: Update.
2865         * nto-procfs.c: Update.
2866         * ppc-linux-tdep.c: Update.
2867         * procfs.c: Update.
2868         * python/py-inferior.c: Update.
2869         * python/py-record-btrace.c: Update.
2870         * python/py-record.c: Update.
2871         * ravenscar-thread.c: Update.
2872         * regcache.c: Update.
2873         * remote-sim.c: Update.
2874         * remote.c: Update.
2875         * sol-thread.c: Update.
2876         * solib.c: Update.
2877         * target.c: Update.
2878         * tui/tui-stack.c: Update.
2879         * varobj.c: Update.
2880         * windows-nat.c: Update.
2881         * windows-tdep.c: Update.
2882
2883 2018-07-03  Tom Tromey  <tom@tromey.com>
2884
2885         * common/ptid.c (ptid_match): Remove.
2886         * common/ptid.h (ptid_match): Don't declare.
2887         * fbsd-nat.c: Update.
2888         * infcmd.c: Update.
2889         * infrun.c: Update.
2890         * linux-nat.c: Update.
2891         * record-btrace.c: Update.
2892         * regcache.c: Update.
2893         * remote.c: Update.
2894
2895 2018-07-03  Tom Tromey  <tom@tromey.com>
2896
2897         * common/ptid.c (ptid_tid_p): Remove.
2898         * common/ptid.h (ptid_tid_p): Don't declare.
2899         * sol-thread.c: Update.
2900
2901 2018-07-03  Tom Tromey  <tom@tromey.com>
2902
2903         * common/ptid.c (ptid_lwp_p): Remove.
2904         * common/ptid.h (ptid_lwp_p): Don't declare.
2905         * fbsd-nat.c: Update.
2906         * linux-nat.c: Update.
2907         * nat/linux-procfs.c: Update.
2908         * nat/x86-linux-dregs.c: Update.
2909         * sol-thread.c: Update.
2910
2911 2018-07-03  Tom Tromey  <tom@tromey.com>
2912
2913         * common/ptid.c (ptid_is_pid): Remove.
2914         * common/ptid.h (ptid_is_pid): Don't declare.
2915         * infrun.c: Update.
2916         * linux-nat.c: Update.
2917         * mi/mi-interp.c: Update.
2918         * remote.c: Update.
2919         * thread.c: Update.
2920
2921 2018-07-03  Tom Tromey  <tom@tromey.com>
2922
2923         * common/ptid.c (ptid_get_tid): Remove.
2924         * common/ptid.h (ptid_get_tid): Don't declare.
2925         * ada-tasks.c: Update.
2926         * aix-thread.c: Update.
2927         * bsd-uthread.c: Update.
2928         * darwin-nat.c: Update.
2929         * fbsd-nat.c: Update.
2930         * i386-darwin-nat.c: Update.
2931         * infrun.c: Update.
2932         * linux-tdep.c: Update.
2933         * nto-procfs.c: Update.
2934         * ppc-ravenscar-thread.c: Update.
2935         * python/py-infthread.c: Update.
2936         * ravenscar-thread.c: Update.
2937         * sol-thread.c: Update.
2938         * sparc-ravenscar-thread.c: Update.
2939         * windows-nat.c: Update.
2940
2941 2018-07-03  Tom Tromey  <tom@tromey.com>
2942
2943         * common/ptid.c (ptid_get_lwp): Remove.
2944         * common/ptid.h (ptid_get_lwp): Don't declare.
2945         * aarch64-linux-nat.c: Update.
2946         * ada-tasks.c: Update.
2947         * aix-thread.c: Update.
2948         * amd64-linux-nat.c: Update.
2949         * arm-linux-nat.c: Update.
2950         * corelow.c: Update.
2951         * fbsd-nat.c: Update.
2952         * fbsd-tdep.c: Update.
2953         * gnu-nat.c: Update.
2954         * i386-cygwin-tdep.c: Update.
2955         * i386-gnu-nat.c: Update.
2956         * i386-linux-nat.c: Update.
2957         * ia64-linux-nat.c: Update.
2958         * inf-ptrace.c: Update.
2959         * infrun.c: Update.
2960         * linux-fork.c: Update.
2961         * linux-nat.c: Update.
2962         * linux-tdep.c: Update.
2963         * linux-thread-db.c: Update.
2964         * mips-linux-nat.c: Update.
2965         * nat/aarch64-linux-hw-point.c: Update.
2966         * nat/aarch64-linux.c: Update.
2967         * nat/linux-btrace.c: Update.
2968         * nat/linux-osdata.c: Update.
2969         * nat/linux-procfs.c: Update.
2970         * nat/x86-linux-dregs.c: Update.
2971         * obsd-nat.c: Update.
2972         * ppc-fbsd-nat.c: Update.
2973         * ppc-linux-nat.c: Update.
2974         * procfs.c: Update.
2975         * python/py-infthread.c: Update.
2976         * ravenscar-thread.c: Update.
2977         * remote.c: Update.
2978         * s390-linux-nat.c: Update.
2979         * sol-thread.c: Update.
2980         * sol2-tdep.c: Update.
2981         * spu-linux-nat.c: Update.
2982         * x86-linux-nat.c: Update.
2983         * xtensa-linux-nat.c: Update.
2984
2985 2018-07-03  Tom Tromey  <tom@tromey.com>
2986
2987         * common/ptid.c (ptid_get_pid): Remove.
2988         * common/ptid.h (ptid_get_pid): Don't declare.
2989         * aarch64-linux-nat.c: Update.
2990         * ada-lang.c: Update.
2991         * aix-thread.c: Update.
2992         * alpha-bsd-nat.c: Update.
2993         * amd64-fbsd-nat.c: Update.
2994         * amd64-linux-nat.c: Update.
2995         * arm-linux-nat.c: Update.
2996         * arm-nbsd-nat.c: Update.
2997         * auxv.c: Update.
2998         * break-catch-syscall.c: Update.
2999         * breakpoint.c: Update.
3000         * bsd-uthread.c: Update.
3001         * corelow.c: Update.
3002         * ctf.c: Update.
3003         * darwin-nat.c: Update.
3004         * fbsd-nat.c: Update.
3005         * fbsd-tdep.c: Update.
3006         * gcore.c: Update.
3007         * gnu-nat.c: Update.
3008         * hppa-nbsd-nat.c: Update.
3009         * hppa-obsd-nat.c: Update.
3010         * i386-fbsd-nat.c: Update.
3011         * ia64-linux-nat.c: Update.
3012         * inf-ptrace.c: Update.
3013         * infcmd.c: Update.
3014         * inferior.c: Update.
3015         * inferior.h: Update.
3016         * inflow.c: Update.
3017         * infrun.c: Update.
3018         * linux-fork.c: Update.
3019         * linux-nat.c: Update.
3020         * linux-tdep.c: Update.
3021         * linux-thread-db.c: Update.
3022         * m68k-bsd-nat.c: Update.
3023         * mi/mi-interp.c: Update.
3024         * mi/mi-main.c: Update.
3025         * mips-linux-nat.c: Update.
3026         * mips-nbsd-nat.c: Update.
3027         * mips64-obsd-nat.c: Update.
3028         * nat/aarch64-linux-hw-point.c: Update.
3029         * nat/aarch64-linux.c: Update.
3030         * nat/linux-btrace.c: Update.
3031         * nat/linux-osdata.c: Update.
3032         * nat/linux-procfs.c: Update.
3033         * nat/x86-linux-dregs.c: Update.
3034         * nto-procfs.c: Update.
3035         * obsd-nat.c: Update.
3036         * ppc-linux-nat.c: Update.
3037         * ppc-nbsd-nat.c: Update.
3038         * ppc-obsd-nat.c: Update.
3039         * proc-service.c: Update.
3040         * procfs.c: Update.
3041         * python/py-inferior.c: Update.
3042         * python/py-infthread.c: Update.
3043         * ravenscar-thread.c: Update.
3044         * record.c: Update.
3045         * remote-sim.c: Update.
3046         * remote.c: Update.
3047         * rs6000-nat.c: Update.
3048         * s390-linux-nat.c: Update.
3049         * sh-nbsd-nat.c: Update.
3050         * sol-thread.c: Update.
3051         * sparc-nat.c: Update.
3052         * sparc64-tdep.c: Update.
3053         * spu-linux-nat.c: Update.
3054         * spu-tdep.c: Update.
3055         * target-debug.h: Update.
3056         * target.c: Update.
3057         * thread.c: Update.
3058         * tid-parse.c: Update.
3059         * tracefile-tfile.c: Update.
3060         * vax-bsd-nat.c: Update.
3061         * windows-nat.c: Update.
3062         * x86-linux-nat.c: Update.
3063         * x86-nat.c: Update.
3064
3065 2018-07-03  Tom Tromey  <tom@tromey.com>
3066
3067         * common/ptid.c (pid_to_ptid): Remove.
3068         * common/ptid.h (pid_to_ptid): Don't declare.
3069         * aix-thread.c: Update.
3070         * arm-linux-nat.c: Update.
3071         * common/ptid.c: Update.
3072         * common/ptid.h: Update.
3073         * corelow.c: Update.
3074         * ctf.c: Update.
3075         * darwin-nat.c: Update.
3076         * fbsd-nat.c: Update.
3077         * fork-child.c: Update.
3078         * gnu-nat.c: Update.
3079         * go32-nat.c: Update.
3080         * inf-ptrace.c: Update.
3081         * infcmd.c: Update.
3082         * inferior.c: Update.
3083         * infrun.c: Update.
3084         * linux-fork.c: Update.
3085         * linux-nat.c: Update.
3086         * nat/aarch64-linux-hw-point.c: Update.
3087         * nat/fork-inferior.c: Update.
3088         * nat/x86-linux-dregs.c: Update.
3089         * nto-procfs.c: Update.
3090         * obsd-nat.c: Update.
3091         * procfs.c: Update.
3092         * progspace.c: Update.
3093         * remote.c: Update.
3094         * rs6000-nat.c: Update.
3095         * s390-linux-nat.c: Update.
3096         * sol-thread.c: Update.
3097         * spu-linux-nat.c: Update.
3098         * target.c: Update.
3099         * top.c: Update.
3100         * tracefile-tfile.c: Update.
3101         * windows-nat.c: Update.
3102
3103 2018-07-03  Tom Tromey  <tom@tromey.com>
3104
3105         * common/ptid.h (ptid_build): Don't declare.
3106         * common/ptid.c (ptid_build): Remove.
3107         * aix-thread.c: Update.
3108         * bsd-kvm.c: Update.
3109         * bsd-uthread.c: Update.
3110         * common/agent.c: Update.
3111         * common/ptid.c: Update.
3112         * common/ptid.h: Update.
3113         * corelow.c: Update.
3114         * darwin-nat.c: Update.
3115         * fbsd-nat.c: Update.
3116         * gnu-nat.c: Update.
3117         * linux-fork.c: Update.
3118         * linux-nat.c: Update.
3119         * linux-thread-db.c: Update.
3120         * nat/linux-osdata.c: Update.
3121         * nat/linux-procfs.c: Update.
3122         * nto-procfs.c: Update.
3123         * obsd-nat.c: Update.
3124         * proc-service.c: Update.
3125         * procfs.c: Update.
3126         * ravenscar-thread.c: Update.
3127         * remote-sim.c: Update.
3128         * remote.c: Update.
3129         * sol-thread.c: Update.
3130         * target.c: Update.
3131         * windows-nat.c: Update.
3132
3133 2018-07-03  Tom Tromey  <tom@tromey.com>
3134
3135         * infrun.c (follow_exec): Use exit_inferior_silent.
3136         * inferior.c (exit_inferior_num_silent): Remove.
3137         * inferior.h (exit_inferior_num_silent): Don't declare.
3138
3139 2018-07-03  Tom Tromey  <tom@tromey.com>
3140
3141         PR cli/23340:
3142         * darwin-nat.c (darwin_attach_pid): Reset inferior and
3143         inferior_ptid on error.
3144
3145 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
3146             Simon Marchi  <simon.marchi@polymtl.ca>
3147
3148         PR tdep/8282
3149         * disasm.h (gdb_disassembler): Add
3150         `m_disassembler_options_holder'. member
3151         * disasm.c (get_all_disassembler_options): New function.
3152         (gdb_disassembler::gdb_disassembler): Use it.
3153         (gdb_buffered_insn_length_init_dis): Likewise.
3154         (gdb_buffered_insn_length): Adjust accordingly.
3155         (set_disassembler_options): Handle options with arguments.
3156         (show_disassembler_options_sfunc): Likewise.  Add a leading new
3157         line if showing options with descriptions.
3158         (disassembler_options_completer): Adapt to using the
3159         `disasm_options_and_args_t' structure.
3160         * mips-tdep.c (mips_disassembler_options): New variable.
3161         (mips_disassembler_options_o32): Likewise.
3162         (mips_disassembler_options_n32): Likewise.
3163         (mips_disassembler_options_n64): Likewise.
3164         (gdb_print_insn_mips): Don't set `disassembler_options'.
3165         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3166         functions.
3167         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3168         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
3169         `gdbarch_disassembler_options_implicit' and
3170         `gdbarch_valid_disassembler_options'.
3171         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3172         `disasm_options_and_args_t' structure.
3173         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3174         method.
3175         (valid_disassembler_options): Switch from `disasm_options_t' to
3176         the `disasm_options_and_args_t' structure.
3177         * NEWS: Document `set disassembler-options' support for the MIPS
3178         target.
3179         * gdbarch.h: Regenerate.
3180         * gdbarch.c: Regenerate.
3181
3182 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3183
3184         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3185
3186 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
3187
3188         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3189         parameter in call to amd64_target_description.
3190         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3191         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3192         (amd64fbsd_init_abi): Likewise.
3193         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3194         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3195         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3196         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3197
3198 2018-06-29  Pedro Alves  <palves@redhat.com>
3199
3200         * gdb/amd64-tdep.h (amd64_create_target_description): Add
3201         "segments" parameter.
3202         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3203         (_initialize_amd64_tdep): Update call to
3204         amd64_create_target_description.
3205         (amd64_target_description): Add "segments" parameter.  Adjust
3206         the implementation to use it.
3207         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3208         call to amd64_create_target_description.
3209         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3210         * gdb/arch/amd64.h (amd64_create_target_description): Add
3211         "segments" register.
3212         * gdb/arch/amd64.c (amd64_create_target_description): Add
3213         "segments" parameter.  Call create_feature_i386_64bit_segments
3214         only if SEGMENTS is true.
3215         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3216         call to amd64_create_target_description.
3217
3218 2018-06-29  Pedro Alves  <palves@redhat.com>
3219
3220         * thread.c (thread_target_id_str): New, factored out from ...
3221         (print_thread_info_1): ... here.  Use it to compute the max
3222         "Target Id" column width.
3223
3224 2018-06-29  Pedro Alves  <palves@redhat.com>
3225
3226         * remote.c (remote_target::extra_thread_info): Delete
3227         'display_buf' and 'n' locals.  from the cache, regardless of
3228         packet mechanims is in use.  Use cache for qThreadExtra and qP
3229         methods too.
3230
3231 2018-06-29  Pedro Alves  <palves@redhat.com>
3232
3233         * blockframe.c (find_pc_sect_containing_function): New function.
3234         * breakpoint.c (print_breakpoint_location): Don't call
3235         find_pc_sect_function.
3236         * linespec.c (create_sals_line_offset): Record the location's
3237         symbol in the sal.
3238         * linespec.c (convert_address_location_to_sals): Fill in sal's
3239         symbol with find_pc_sect_containing_function.
3240         * symtab.c (find_function_start_sal): Rename to ...
3241         (find_function_start_sal_1): ... this.
3242         (find_function_start_sal): Reimplement as wrapper around
3243         find_function_start_sal_1, and use
3244         find_pc_sect_containing_function to fill in the sal's symbol.
3245         (find_function_start_sal(symbol*, bool)): Adjust.
3246         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3247         comments.
3248         (find_pc_sect_containing_function): Declare.
3249
3250 2018-06-29  Pedro Alves  <palves@redhat.com>
3251
3252         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3253         true if the the location has no symbol.
3254
3255 2018-06-28  Tom Tromey  <tom@tromey.com>
3256
3257         * NEWS: Mention --enable-codesign.
3258         * silent-rules.mk (ECHO_SIGN): New variable.
3259         * configure.ac: Add --enable-codesign.
3260         * configure: Rebuild.
3261         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3262         (gdb$(EXEEXT)): Optionally invoke codesign.
3263
3264 2018-06-28  Pedro Alves  <palves@redhat.com>
3265
3266         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3267         comments.
3268         (switch_to_thread_no_regs): Adjust comment.
3269         * infcmd.c (stop_pc): Delete.
3270         (post_create_inferior, info_program_command): Replace references
3271         to stop_pc with references to thread_info->suspend.stop_pc.
3272         * inferior.h (stop_pc): Delete declaration.
3273         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3274         (handle_inferior_event_1, handle_signal_stop)
3275         (process_event_stop_test, keep_going_stepped_thread)
3276         (handle_step_into_function, handle_step_into_function_backward)
3277         (print_stop_location): Replace references to stop_pc with
3278         references to thread_info->suspend.stop_pc.
3279         (struct infcall_suspend_state) <stop_pc>: Delete field.
3280         (save_infcall_suspend_state, restore_infcall_suspend_state):
3281         Remove references to inf_stat->stop_pc.
3282         * linux-fork.c (fork_load_infrun_state): Likewise.
3283         * record-btrace.c (record_btrace_set_replay): Likewise.
3284         * record-full.c (record_full_goto_entry): Likewise.
3285         * remote.c (print_one_stopped_thread): Likewise.
3286         * target.c (target_resume): Extend comment.
3287         * thread.c (set_executing_thread): New.
3288         (set_executing): Use it.
3289         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3290         Remove references to stop_pc.
3291
3292 2018-06-28  Pedro Alves  <palves@redhat.com>
3293
3294         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3295         Moving fetching stop_pc until after ecs->event_thread is refreshed.
3296
3297 2018-06-28  Tom Tromey  <tom@tromey.com>
3298
3299         * coffread.c (coff_symfile_finish): Update.
3300         * xcoffread.c (xcoff_symfile_finish): Update.
3301         * elfread.c (elf_symfile_finish): Update.
3302         * symfile.h (dwarf2_free_objfile): Don't declare.
3303         * dwarf2read.c (_initialize_dwarf2_read): Use
3304         register_objfile_data_with_cleanup.
3305         (dwarf2_free_objfile): Now static.  Change signature.
3306
3307 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3308
3309         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3310         option "-o" to add-symbol-file-load to add an offset to each
3311         section's load address.
3312         * symfile.c (set_objfile_default_section_offset): New function.
3313
3314 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3315
3316         * symfile.c (add_symbol_file_command): Make sure that sections
3317         with the same name are sorted in the same order.
3318
3319 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3320
3321         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3322         require the second argument.  If omitted, load sections at the
3323         addresses specified in the file.
3324
3325 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3326
3327         * symfile.c (symbol_file_command, symbol_file_add_main_1)
3328         (_initialize_symfile): Add option "-o" to symbol-file to add an
3329         offset to each section of the symbol file.
3330
3331 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
3332
3333         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3334
3335 2018-06-27  Tom Tromey  <tom@tromey.com>
3336
3337         * stack.c (_initialize_stack): Update "func" help text.
3338
3339 2018-06-27  Tom Tromey  <tom@tromey.com>
3340
3341         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3342         std::vector.
3343         (unwind_infopy_str, pyuw_create_unwind_info)
3344         (unwind_infopy_add_saved_register, pyuw_sniffer)
3345         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3346         Update.
3347         (struct saved_reg): Add constructor.
3348         <value>: Now a gdbpy_ref<>.
3349
3350 2018-06-27  Tom Tromey  <tom@tromey.com>
3351
3352         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3353
3354 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3355
3356         * gdb-gdb.py.in: Format using autopep8.
3357
3358 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3359
3360         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3361         (type_lookup_function): Recognize CORE_ADDR values.
3362
3363 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3364
3365         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3366         print tag_name.
3367
3368 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3369
3370         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3371         <__lt__>: Add.
3372
3373 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3374
3375         * gdb-gdb.py: Move to...
3376         * gdb-gdb.py.in: ... here.
3377         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3378         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3379         dependencies.
3380         (distclean): Remove gdb-gdb.py when cleaning.
3381         (gdb-gdb.py, gdb-gdb.gdb): New rules.
3382         * configure: Re-generate.
3383
3384 2018-06-27  Pedro Alves  <palves@redhat.com>
3385
3386         * proc-service.c (get_ps_regcache): New.
3387         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3388         (ps_lsetfpregs): Use it.
3389
3390 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
3391
3392         PR gdb/21695
3393         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3394         (dwarf_decode_lines_1): Adjust.
3395
3396 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3397
3398         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3399         override.
3400         <info_proc>: Likewise.
3401
3402 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
3403
3404         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3405         to windows_fetch_one_register, and only handle the case of
3406         fetching one register.  Move the code that reloads the context
3407         and iterates over all registers if R is negative to...
3408         (windows_nat_target::fetch_registers): ... here.
3409         (do_windows_store_inferior_registers): Rename to
3410         windows_store_one_register, and only handle the case of storing
3411         one register.  Move the code that handles the case where r is
3412         negative to...
3413         (windows_nat_target::store_registers) ... here.
3414
3415 2018-06-26  Tom Tromey  <tom@tromey.com>
3416
3417         PR rust/22574:
3418         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3419         * rust-lang.c (rust_print_struct_def): Add podata parameter.
3420         Update.
3421         (rust_internal_print_type): Add podata parameter.
3422         (rust_print_type): Update.
3423
3424 2018-06-26  Tom Tromey  <tom@tromey.com>
3425
3426         * typeprint.h (struct print_offset_data) <update, finish,
3427         maybe_print_hole>: New methods.
3428         <indentation>: New constant.
3429         * typeprint.c (print_offset_data::indentation): Define.
3430         (print_offset_data::maybe_print_hole, print_offset_data::update)
3431         (print_offset_data::finish): Move from c-typeprint.c and rename.
3432         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3433         (print_spaces_filtered_with_print_options): Update.
3434         (c_print_type_union_field_offset, maybe_print_hole)
3435         (c_print_type_struct_field_offset): Move to typeprint.c and
3436         rename.
3437         (c_type_print_base_struct_union): Update.
3438
3439 2018-06-25  Pedro Alves  <palves@redhat.com>
3440
3441         * gdbthread.h (thread_info_ref, delete_thread)
3442         (delete_thread_silent, first_thread_of_inferior)
3443         (any_thread_of_inferior, switch_to_thread)
3444         (enable_thread_stack_temporaries)
3445         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3446         (get_last_thread_stack_temporary)
3447         (value_in_thread_stack_temporaries, can_access_registers_thread):
3448         Spell out "struct thread_info" instead of just "thread_info".
3449         * inferior.h (notice_new_inferior): Likewise.
3450
3451 2018-06-25  Pedro Alves  <palves@redhat.com>
3452
3453         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3454         pass thread_info pointer to delete_thread.
3455         (windows_nat_target::detach): Pass inferior pointer to
3456         detach_inferior.
3457         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3458         delete_thread.
3459         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3460         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3461         and pass a thread_info pointer to delete_thread.
3462         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3463         pass thread_info pointer to delete_thread.
3464         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3465         delete_thread_silent call.
3466         * procfs.c (procfs_target::detach): Pass inferior pointer to
3467         detach_inferior.
3468         (procfs_target::wait): Pass thread_info pointer to delete_thread.
3469         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3470         delete_thread_silent call.
3471         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3472         pass thread_info pointer to delete_thread.
3473         (windows_nat_target::detach): Pass inferior pointer to
3474         delete_inferior.
3475
3476 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3477
3478         * regcache.c (readable_regcache::read_part): Fix asserts.
3479         (reg_buffer::raw_collect_part): New function.
3480         (regcache::write_part): Fix asserts.
3481         (reg_buffer::raw_supply_part): New function.
3482         (regcache::transfer_regset_register): New helper function.
3483         (regcache::transfer_regset): Call new functions.
3484         (regcache_supply_regset): Use gdb_byte*.
3485         (regcache::supply_regset): Likewise.
3486         (regcache_collect_regset): Likewise.
3487         (regcache::collect_regset): Likewise.
3488         * regcache.h (reg_buffer::raw_collect_part): New declaration.
3489         (reg_buffer::raw_supply_part): Likewise.
3490         (regcache::transfer_regset_register): Likewise.
3491         (regcache::transfer_regset): Use gdb_byte*.
3492
3493 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
3494
3495         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3496
3497 2018-06-21  Pedro Alves  <palves@redhat.com>
3498
3499         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3500         instead of a ptid_t.  All callers adjusted.
3501         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
3502         adjusted.
3503         (print_ada_task_info, display_current_task_id, task_command_1):
3504         Adjust.
3505         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3506         inferior_thread.
3507         (breakpoint_kind): Adjust.
3508         (remove_breakpoints_pid): Rename to ...
3509         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
3510         pointer.  All callers adjusted.
3511         (bpstat_clear_actions): Use inferior_thread.
3512         (get_bpstat_thread): New.
3513         (bpstat_do_actions): Use it.
3514         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3515         to take a thread_info pointer.  All callers adjusted.
3516         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3517         (breakpoint_re_set_thread): Use inferior_thread.
3518         * breakpoint.h (struct inferior): Forward declare.
3519         (bpstat_stop_status): Update.
3520         (remove_breakpoints_pid): Delete.
3521         (remove_breakpoints_inf): New.
3522         * bsd-uthread.c (bsd_uthread_target::wait)
3523         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3524         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3525         (maint_btrace_packet_history_cmd)
3526         (maint_btrace_clear_packet_history_cmd): Adjust.
3527         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3528         inferior_thread.
3529         * cli/cli-interp.c: Include "inferior.h".
3530         * common/refcounted-object.h (struct
3531         refcounted_object_ref_policy): New.
3532         * compile/compile-object-load.c: Include gdbthread.h.
3533         (store_regs): Use inferior_thread.
3534         * corelow.c (core_target::close): Use current_inferior.
3535         (core_target_open): Adjust to use first_thread_of_inferior and use
3536         the current inferior.
3537         * ctf.c (ctf_target::close): Adjust to use current_inferior.
3538         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3539         <thread>: ... this new field.  All references adjusted.
3540         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3541         Take a thread_info pointer instead of a ptid_t.
3542         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3543         (dummy_frame_discard, register_dummy_frame_dtor): Take a
3544         thread_info pointer instead of a ptid_t.
3545         * elfread.c: Include "inferior.h".
3546         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3547         Use inferior_thread.
3548         * eval.c (evaluate_subexp): Likewise.
3549         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3550         inferior_thread.
3551         * gdb_proc_service.h (struct thread_info): Forward declare.
3552         (struct ps_prochandle) <ptid>: Delete, replaced by ...
3553         <thread>: ... this new field.  All references adjusted.
3554         * gdbarch.h, gdbarch.c: Regenerate.
3555         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3556         'thread' parameter.  All implementations and callers adjusted.
3557         * gdbthread.h (thread_info) <set_running>: New method.
3558         (delete_thread, delete_thread_silent): Take a thread_info pointer
3559         instead of a ptid.
3560         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3561         (first_thread_of_process): Delete, replaced by ...
3562         (first_thread_of_inferior): ... this new function.  All callers
3563         adjusted.
3564         (any_live_thread_of_process): Delete, replaced by ...
3565         (any_live_thread_of_inferior): ... this new function.  All callers
3566         adjusted.
3567         (switch_to_thread, switch_to_no_thread): Declare.
3568         (is_executing): Delete.
3569         (enable_thread_stack_temporaries): Update comment.
3570         <enable_thread_stack_temporaries>: Take a thread_info pointer
3571         instead of a ptid_t.  Incref the thread.
3572         <~enable_thread_stack_temporaries>: Decref the thread.
3573         <m_ptid>: Delete
3574         <m_thr>: New.
3575         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3576         (get_last_thread_stack_temporary)
3577         (value_in_thread_stack_temporaries, can_access_registers_thread):
3578         Take a thread_info pointer instead of a ptid_t.  All callers
3579         adjusted.
3580         * infcall.c (get_call_return_value): Use inferior_thread.
3581         (run_inferior_call): Work with thread pointers instead of ptid_t.
3582         (call_function_by_hand_dummy): Work with thread pointers instead
3583         of ptid_t.  Use thread_info_ref.
3584         * infcmd.c (proceed_thread_callback): Access thread's state
3585         directly.
3586         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3587         access thread's state directly.
3588         (continue_command): Use inferior_thread.
3589         (info_program_command): Use find_thread_ptid and access thread
3590         state directly.
3591         (proceed_after_attach_callback): Use thread state directly.
3592         (notice_new_inferior): Take a thread_info pointer instead of a
3593         ptid_t.  All callers adjusted.
3594         (exit_inferior): Take an inferior pointer instead of a pid.  All
3595         callers adjusted.
3596         (exit_inferior_silent): New.
3597         (detach_inferior): Delete.
3598         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3599         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3600         (detach_inferior_command, kill_inferior_command): Use
3601         find_inferior_id instead of valid_gdb_inferior_id and
3602         gdb_inferior_id_to_pid.
3603         (inferior_command): Use inferior and thread pointers.
3604         * inferior.h (struct thread_info): Forward declare.
3605         (notice_new_inferior): Take a thread_info pointer instead of a
3606         ptid_t.  All callers adjusted.
3607         (detach_inferior): Delete declaration.
3608         (exit_inferior, exit_inferior_silent): Take an inferior pointer
3609         instead of a pid.  All callers adjusted.
3610         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3611         (valid_gdb_inferior_id): Delete.
3612         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3613         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3614         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3615         ...
3616         <inf>: ... this new field.
3617         <step_ptid>: Delete, replaced by ...
3618         <step_thread>: ... this new field.
3619         (get_displaced_stepping_state): Take an inferior pointer instead
3620         of a pid.  All callers adjusted.
3621         (displaced_step_in_progress_any_inferior): Adjust.
3622         (displaced_step_in_progress_thread): Take a thread pointer instead
3623         of a ptid_t.  All callers adjusted.
3624         (displaced_step_in_progress, add_displaced_stepping_state): Take
3625         an inferior pointer instead of a pid.  All callers adjusted.
3626         (get_displaced_step_closure_by_addr): Adjust.
3627         (remove_displaced_stepping_state): Take an inferior pointer
3628         instead of a pid.  All callers adjusted.
3629         (displaced_step_prepare_throw, displaced_step_prepare)
3630         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3631         All callers adjusted.
3632         (start_step_over): Adjust.
3633         (infrun_thread_ptid_changed): Remove bit updating ptids in the
3634         displaced step queue.
3635         (do_target_resume): Adjust.
3636         (fetch_inferior_event): Use inferior_thread.
3637         (context_switch, get_inferior_stop_soon): Take an
3638         execution_control_state pointer instead of a ptid_t.  All callers
3639         adjusted.
3640         (switch_to_thread_cleanup): Delete.
3641         (stop_all_threads): Use scoped_restore_current_thread.
3642         * inline-frame.c: Include "gdbthread.h".
3643         (inline_state) <inline_state>: Take a thread pointer instead of a
3644         ptid_t.  All callers adjusted.
3645         <ptid>: Delete, replaced by ...
3646         <thread>: ... this new field.
3647         (find_inline_frame_state): Take a thread pointer instead of a
3648         ptid_t.  All callers adjusted.
3649         (skip_inline_frames, step_into_inline_frame)
3650         (inline_skipped_frames, inline_skipped_symbol): Take a thread
3651         pointer instead of a ptid_t.  All callers adjusted.
3652         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3653         (inline_skipped_frames, inline_skipped_symbol): Likewise.
3654         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3655         pointers directly.
3656         * linux-nat.c (get_detach_signal): Likewise.
3657         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3658         (thread_db_notice_clone): Adjust.
3659         (thread_db_find_new_threads_silently)
3660         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3661         a thread pointer instead of a ptid_t.  All callers adjusted.
3662         * mi/mi-cmd-var.c: Include "inferior.h".
3663         (mi_cmd_var_update_iter): Update to use thread pointers.
3664         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3665         inferior directly.
3666         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3667         out to ...
3668         (mi_output_running): ... this new function.
3669         (mi_on_resume_1): Adjust to use it.
3670         (mi_user_selected_context_changed): Adjust to use inferior_thread.
3671         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3672         directly.
3673         (interrupt_thread_callback): : Adjust to use thread and inferior
3674         pointers.
3675         * proc-service.c: Include "gdbthread.h".
3676         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3677         * progspace-and-thread.c: Include "inferior.h".
3678         * progspace.c: Include "inferior.h".
3679         * python/py-exitedevent.c (create_exited_event_object): Adjust to
3680         hold a reference to an inferior_object.
3681         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3682         inferior_thread.
3683         * python/py-inferior.c (struct inferior_object): Give the type a
3684         tag name instead of a typedef.
3685         (python_on_normal_stop): No need to check if the current thread is
3686         listed.
3687         (inferior_to_inferior_object): Change return type to
3688         inferior_object.  All callers adjusted.
3689         (find_thread_object): Delete, bits factored out to ...
3690         (thread_to_thread_object): ... this new function.
3691         * python/py-infthread.c (create_thread_object): Use
3692         inferior_to_inferior_object.
3693         (thpy_is_stopped): Use thread pointer directly.
3694         (gdbpy_selected_thread): Use inferior_thread.
3695         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3696         field, replaced with ...
3697         <thread>: ... this new field.  All users adjusted.
3698         (btpy_insn_or_gap_new): Drop const.
3699         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
3700         callers adjusted.
3701         * python/py-record.c: Include "gdbthread.h".
3702         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3703         a ptid_t.  All callers adjusted.
3704         (gdbpy_current_recording): Use inferior_thread.
3705         * python/py-record.h (recpy_record_object) <ptid>: Delete
3706         field, replaced with ...
3707         <thread>: ... this new field.  All users adjusted.
3708         (recpy_element_object) <ptid>: Delete
3709         field, replaced with ...
3710         <thread>: ... this new field.  All users adjusted.
3711         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3712         a ptid_t.  All callers adjusted.
3713         * python/py-threadevent.c: Include "gdbthread.h".
3714         (get_event_thread): Use thread_to_thread_object.
3715         * python/python-internal.h (struct inferior_object): Forward
3716         declare.
3717         (find_thread_object, find_inferior_object): Delete declarations.
3718         (thread_to_thread_object, inferior_to_inferior_object): New
3719         declarations.
3720         * record-btrace.c: Include "inferior.h".
3721         (require_btrace_thread): Use inferior_thread.
3722         (record_btrace_frame_sniffer)
3723         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3724         (get_thread_current_frame): Use scoped_restore_current_thread and
3725         switch_to_thread.
3726         (get_thread_current_frame): Use thread pointer directly.
3727         (record_btrace_replay_at_breakpoint): Use thread's inferior
3728         pointer directly.
3729         * record-full.c: Include "inferior.h".
3730         * regcache.c: Include "gdbthread.h".
3731         (get_thread_arch_regcache): Use the inferior's address space
3732         directly.
3733         (get_thread_regcache, registers_changed_thread): New.
3734         * regcache.h (get_thread_regcache(thread_info *thread)): New
3735         overload.
3736         (registers_changed_thread): New.
3737         (remote_target) <remote_detach_1>: Swap order of parameters.
3738         (remote_add_thread): <remote_add_thread>: Return the new thread.
3739         (get_remote_thread_info(ptid_t)): New overload.
3740         (remote_target::remote_notice_new_inferior): Use thread pointers
3741         directly.
3742         (remote_target::process_initial_stop_replies): Use
3743         thread_info::set_running.
3744         (remote_target::remote_detach_1, remote_target::detach)
3745         (extended_remote_target::detach): Adjust.
3746         * stack.c (frame_show_address): Use inferior_thread.
3747         * target-debug.h (target_debug_print_thread_info_pp): New.
3748         * target-delegates.c: Regenerate.
3749         * target.c (default_thread_address_space): Delete.
3750         (memory_xfer_partial_1): Use current_inferior.
3751         (target_detach): Use current_inferior.
3752         (target_thread_address_space): Delete.
3753         (generic_mourn_inferior): Use current_inferior.
3754         * target.h (struct target_ops) <thread_address_space>: Delete.
3755         (target_thread_address_space): Delete.
3756         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
3757         pointers directly.
3758         (delete_thread_1, delete_thread, delete_thread_silent): Take a
3759         thread pointer instead of a ptid_t.  Adjust all callers.
3760         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3761         (first_thread_of_process): Delete, replaced by ...
3762         (first_thread_of_inferior): ... this new function.  All callers
3763         adjusted.
3764         (any_thread_of_process): Rename to ...
3765         (any_thread_of_inferior): ... this, and take an inferior pointer.
3766         (any_live_thread_of_process): Rename to ...
3767         (any_live_thread_of_inferior): ... this, and take an inferior
3768         pointer.
3769         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3770         (value_in_thread_stack_temporaries)
3771         (get_last_thread_stack_temporary): Take a thread pointer instead
3772         of a ptid_t.  Adjust all callers.
3773         (thread_info::set_running): New.
3774         (validate_registers_access): Use inferior_thread.
3775         (can_access_registers_ptid): Rename to ...
3776         (can_access_registers_thread): ... this, and take a thread
3777         pointer.
3778         (print_thread_info_1): Adjust to compare thread pointers instead
3779         of ptids.
3780         (switch_to_no_thread, switch_to_thread): Make extern.
3781         (scoped_restore_current_thread::~scoped_restore_current_thread):
3782         Use m_thread pointer directly.
3783         (scoped_restore_current_thread::scoped_restore_current_thread):
3784         Use inferior_thread.
3785         (thread_command): Use thread pointer directly.
3786         (thread_num_make_value_helper): Use inferior_thread.
3787         * top.c (execute_command): Use inferior_thread.
3788         * tui/tui-interp.c: Include "inferior.h".
3789         * varobj.c (varobj_create): Use inferior_thread.
3790         (value_of_root_1): Use find_thread_global_id instead of
3791         global_thread_id_to_ptid.
3792
3793 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
3794
3795         * regcache.c (readable_regcache::read_part): Avoid memcpy when
3796         possible.
3797         (regcache::write_part): Likewise.
3798         (readable_regcache::cooked_read_part): Update comment.
3799         (readable_regcache::cooked_write_part): Likewise.
3800         * regcache.h: (readable_regcache::read_part): Likewise.
3801         (regcache::write_part): Likewise.
3802
3803 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
3804             Dirk Schubert  <dirk.schubert@arm.com>
3805
3806         * aarch64-linux-nat.c (post_attach): New.
3807         (aarch64_linux_nat_target::post_attach): Override post_attach to
3808         record the number of hardware debug registers.
3809
3810 2018-06-20  Tom Tromey  <tom@tromey.com>
3811
3812         * python/py-param.c (add_setshow_generic): Make parameters const.
3813         (parmpy_init): Update.
3814
3815 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3816
3817         * regcache.h (regcache_cooked_read_ftype): Rename to...
3818         (register_read_ftype): ...this, change type to function_view.
3819         (class reg_buffer) <save>: Remove src parameter.
3820         (readonly_detached_regcache) <readonly_detached_regcache>: Make
3821         parameter non-const in first overload.  Remove src parameter in
3822         second overload.
3823         * regcache.c (do_cooked_read): Remove.
3824         (readonly_detached_regcache::readonly_detached_regcache): Make
3825         parameter non-const, adjust call to other constructor.
3826         (reg_buffer::save): Remove src parameter.
3827         * frame.c (do_frame_register_read): Remove.
3828         (frame_save_as_regcache): Use lambda function.
3829         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
3830         parameter to ppu2spu_data *.
3831         (ppu2spu_sniffer): Use lambda function.
3832
3833 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
3834
3835         * record-full.c (record_full_target::insert_breakpoint): Remove
3836         "struct" keyword, add const.
3837
3838 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
3839
3840         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3841         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3842         * configure.ac: Remove AC_PREREQ, add missing quoting.
3843         * gnulib/configure.ac: Modernize usage of
3844         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
3845         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3846         (AUTOMAKE_VERSION): Bump to 1.15.1.
3847         * configure: Re-generate.
3848         * config.in: Re-generate.
3849         * aclocal.m4: Re-generate.
3850         * gnulib/aclocal.m4: Re-generate.
3851         * gnulib/config.in: Re-generate.
3852         * gnulib/configure: Re-generate.
3853         * gnulib/import/Makefile.in: Re-generate.
3854
3855 2018-06-19  Pedro Alves  <palves@redhat.com>
3856
3857         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3858         (lookup_minimal_symbol_by_pc_section): ... here with
3859         gdb_assert_not_reached added.
3860
3861 2018-06-19  Pedro Alves  <palves@redhat.com>
3862
3863         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3864         parameter with a block parameter.  Compare location's block symbol
3865         with the frame's block instead of addresses.
3866         (skip_inline_frames): Pass the current block instead of the
3867         frame's address.  Break out as soon as we determine the frame
3868         should not be skipped.
3869
3870 2018-06-18  Tom Tromey  <tom@tromey.com>
3871
3872         * solib-aix.c (solib_aix_get_section_offsets): Return
3873         unique_xmalloc_ptr.
3874         (solib_aix_solib_create_inferior_hook): Update.
3875
3876 2018-06-18  Tom Tromey  <tom@tromey.com>
3877
3878         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3879
3880 2018-06-18  Tom Tromey  <tom@tromey.com>
3881
3882         * solib-frv.c (frv_relocate_main_executable): Use
3883         unique_xmalloc_ptr.
3884         * solib-dsbt.c (dsbt_relocate_main_executable): Use
3885         unique_xmalloc_ptr.
3886
3887 2018-06-18  Tom Tromey  <tom@tromey.com>
3888
3889         * objfiles.h (inhibit_section_map_updates): Update.
3890         (resume_section_map_updates, resume_section_map_updates_cleanup):
3891         Remove.
3892         * solib-svr4.c (svr4_handle_solib_event): Update.
3893         * objfiles.c (inhibit_section_map_updates): Return
3894         scoped_restore_tmpl<int>.
3895         (resume_section_map_updates, resume_section_map_updates_cleanup):
3896         Remove.
3897
3898 2018-06-18  Tom Tromey  <tom@tromey.com>
3899
3900         * valprint.h (read_string): Update.
3901         * valprint.c (read_string): Change type of "buffer".
3902         (val_print_string): Update.
3903         * python/py-value.c (valpy_string): Update.
3904         * language.h (struct language_defn) <la_get_string>: Change
3905         type of "buffer".
3906         (default_get_string, c_get_string): Update.
3907         * language.c (default_get_string): Change type of "buffer".
3908         * guile/scm-value.c (gdbscm_value_to_string): Update.
3909         * c-lang.c (c_get_string): Change type of "buffer".
3910
3911 2018-06-18  Tom Tromey  <tom@tromey.com>
3912
3913         * ser-mingw.c (struct pipe_state_destroyer): New.
3914         (pipe_state_up): New typedef.
3915         (cleanup_pipe_state): Remove.
3916         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
3917
3918 2018-06-18  Tom Tromey  <tom@tromey.com>
3919
3920         * rust-lang.h (rust_yyerror): Don't declare.
3921         * rust-lang.c (rust_language_defn): Update.
3922         * rust-exp.y (yyerror): Now static.
3923         * parse.c (parse_exp_in_context_1): Update.
3924         * p-lang.h (p_yyerror): Don't declare.
3925         * p-lang.c (p_language_defn): Update.
3926         * p-exp.y (yyerror): Now static.
3927         * opencl-lang.c (opencl_language_defn): Update.
3928         * objc-lang.c (objc_language_defn): Update.
3929         * m2-lang.h (m2_yyerror): Don't declare.
3930         * m2-lang.c (m2_language_defn): Update.
3931         * m2-exp.y (yyerror): Now static.
3932         * language.h (struct language_defn) <la_error>: Remove.
3933         * language.c (unk_lang_error): Remove.
3934         (unknown_language_defn, auto_language_defn): Remove.
3935         * go-lang.h (go_yyerror): Don't declare.
3936         * go-lang.c (go_language_defn): Update.
3937         * go-exp.y (yyerror): Now static.
3938         * f-lang.h (f_yyerror): Don't declare.
3939         * f-lang.c (f_language_defn): Update.
3940         * f-exp.y (yyerror): Now static.
3941         * d-lang.h (d_yyerror): Don't declare.
3942         * d-lang.c (d_language_defn): Update.
3943         * d-exp.y (yyerror): Now static.
3944         * c-lang.h (c_yyerror): Don't declare.
3945         * c-lang.c (c_language_defn, cplus_language_defn)
3946         (asm_language_defn, minimal_language_defn): Update.
3947         * c-exp.y (yyerror): Now static.
3948         * ada-lang.h (ada_yyerror): Don't declare.
3949         * ada-lang.c (ada_language_defn): Update.
3950         * ada-exp.y (yyerror): Now static.
3951
3952 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
3953
3954         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3955         (store_sveregs_to_thread): Likewise.
3956         (aarch64_linux_fetch_inferior_registers): Check for SVE.
3957         (aarch64_linux_store_inferior_registers): Likewise.
3958         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3959         function.
3960         (aarch64_sve_regs_copy_to_regcache): Likewise.
3961         (aarch64_sve_regs_copy_from_regcache): Likewise.
3962         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3963         declaration.
3964         (aarch64_sve_regs_copy_to_regcache): Likewise.
3965         (aarch64_sve_regs_copy_from_regcache): Likewise.
3966         (sve_context): Structure from Linux headers.
3967         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3968         (SVE_SIG_ZREG_SIZE): Likewise.
3969         (SVE_SIG_PREG_SIZE): Likewise.
3970         (SVE_SIG_FFR_SIZE): Likewise.
3971         (SVE_SIG_REGS_OFFSET): Likewise.
3972         (SVE_SIG_ZREGS_OFFSET): Likewise.
3973         (SVE_SIG_ZREG_OFFSET): Likewise.
3974         (SVE_SIG_ZREGS_SIZE): Likewise.
3975         (SVE_SIG_PREGS_OFFSET): Likewise.
3976         (SVE_SIG_PREG_OFFSET): Likewise.
3977         (SVE_SIG_PREGS_SIZE): Likewise.
3978         (SVE_SIG_FFR_OFFSET): Likewise.
3979         (SVE_SIG_REGS_SIZE): Likewise.
3980         (SVE_SIG_CONTEXT_SIZE): Likewise.
3981         (SVE_PT_REGS_MASK): Likewise.
3982         (SVE_PT_REGS_FPSIMD): Likewise.
3983         (SVE_PT_REGS_SVE): Likewise.
3984         (SVE_PT_VL_INHERIT): Likewise.
3985         (SVE_PT_VL_ONEXEC): Likewise.
3986         (SVE_PT_REGS_OFFSET): Likewise.
3987         (SVE_PT_FPSIMD_OFFSET): Likewise.
3988         (SVE_PT_FPSIMD_SIZE): Likewise.
3989         (SVE_PT_SVE_ZREG_SIZE): Likewise.
3990         (SVE_PT_SVE_PREG_SIZE): Likewise.
3991         (SVE_PT_SVE_FFR_SIZE): Likewise.
3992         (SVE_PT_SVE_FPSR_SIZE): Likewise.
3993         (SVE_PT_SVE_FPCR_SIZE): Likewise.
3994         (__SVE_SIG_TO_PT): Likewise.
3995         (SVE_PT_SVE_OFFSET): Likewise.
3996         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3997         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3998         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3999         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4000         (SVE_PT_SVE_PREG_OFFSET): Likewise.
4001         (SVE_PT_SVE_PREGS_SIZE): Likewise.
4002         (SVE_PT_SVE_FFR_OFFSET): Likewise.
4003         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4004         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4005         (SVE_PT_SVE_SIZE): Likewise.
4006         (SVE_PT_SIZE): Likewise.
4007         (HAS_SVE_STATE): New define.
4008
4009 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
4010
4011         * nat/aarch64-sve-linux-sigcontext.h: New file.
4012         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4013         new files.
4014         (SVE_VQ_MIN): Likewise.
4015         (SVE_VQ_MAX): Likewise.
4016         (SVE_VL_MIN): Likewise.
4017         (SVE_VL_MAX): Likewise.
4018         (SVE_NUM_ZREGS): Likewise.
4019         (SVE_NUM_PREGS): Likewise.
4020         (sve_vl_valid): Likewise.
4021         (struct user_sve_header): Likewise.
4022
4023 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
4024             Richard Bunt <Richard.Bunt@arm.com>
4025
4026         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4027         was requested by GDB.
4028
4029 2018-06-15  Tom de Vries  <tdevries@suse.de>
4030
4031         * MAINTAINERS (Write After Approval): Add Tom de Vries.
4032
4033 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
4034
4035         * gnulib/update-gnulib.sh: Print expected versions of
4036         autoconf/aclocal.
4037
4038 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
4039
4040         * arch-utils.c (default_type_align): Use type_length_units.
4041         * gdbtypes.c (type_align): Use type_length_units.
4042
4043 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4044
4045         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4046         of 'define' command.
4047
4048 2018-06-14  Tom de Vries  <tdevries@suse.de>
4049
4050         PR cli/22573
4051         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4052         get_no_prettyformat_print_options.
4053
4054 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4055
4056         * sparc-nat.h: Include target.h.
4057         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4058         <fetch_registers>: Remove this argument in function call.
4059         <store_registers>: Remove this argument in function call, remove
4060         extra semicolon.
4061         <low_forget_process>: Call sparc64_forget_process instead of
4062         sparc_forget_process.
4063
4064 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4065
4066         * procfs.c (_initialize_procfs): Use add_inf_child_target.
4067         (procfs_target::make_corefile_notes): Adjust to new
4068         target_read_alloc return type.
4069
4070 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4071             Stephen Roberts  <stephen.roberts@arm.com>
4072
4073         PR gdb/22882
4074         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4075         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4076         Move should_notify_stop local into more inner scope.
4077
4078 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4079             Stephen Roberts  <stephen.roberts@arm.com>
4080
4081         PR gdb/22882
4082         * infrun.c (resume_1): Add call to mark_async_event_handler.
4083
4084 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
4085
4086         * infrun.c (do_target_wait): Change old version of $pc printed.
4087
4088 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4089
4090         * dwarf2read.c (read_index_from_section): Rename to...
4091         (read_gdb_index_from_section): ... this, update all callers.
4092         (dwarf2_read_index): Rename to...
4093         (dwarf2_read_gdb_index): ... this, update all callers.
4094
4095 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
4096
4097         * gdb/hppa-linux-nat.c
4098         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4099         hppa_linux_nat_target::fetch_registers.
4100
4101 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4102
4103         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4104         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4105         (AARCH64_DWARF_SVE_FFR): Likewise.
4106         (AARCH64_DWARF_SVE_P0): Likewise.
4107         (AARCH64_DWARF_SVE_Z0): Likewise.
4108
4109 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4110
4111         * common/common-regcache.h (raw_compare): New function.
4112         * regcache.c (regcache::raw_compare): Likewise.
4113         * regcache.h (regcache::raw_compare): New declaration.
4114
4115 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
4116
4117         * common/common-regcache.h (reg_buffer_common): New structure.
4118         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4119         (reg_buffer::raw_supply): Likewise.
4120         (reg_buffer::raw_supply_integer): Likewise.
4121         (reg_buffer::raw_supply_zeroed): Likewise.
4122         (reg_buffer::raw_collect): Likewise.
4123         (reg_buffer::raw_collect_integer): Likewise.
4124         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4125         (reg_buffer::raw_supply): Likewise.
4126         (reg_buffer::raw_supply_integer): Likewise.
4127         (reg_buffer::raw_supply_zeroed): Likewise.
4128         (reg_buffer::raw_collect): Likewise.
4129         (reg_buffer::raw_collect_integer): Likewise.
4130
4131 2018-06-10  Tom Tromey  <tom@tromey.com>
4132
4133         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
4134         (class remote_state) <stop_reply_queue>: Now std::vector.
4135         (remote_state::~remote_state)
4136         (remote_target::stop_reply_queue_length): Update.
4137         (struct queue_iter_param, remove_child_of_pending_fork)
4138         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4139         (check_pending_event_prevents_wildcard_vcont_callback)
4140         (remove_stop_reply_for_inferior)
4141         (remove_stop_reply_of_remote_state)
4142         (remote_notif_remove_once_on_match)
4143         (stop_reply_match_ptid_and_ws)
4144         (remote_kill_child_of_pending_fork): Remove.
4145         (remote_target::remove_new_fork_children)
4146         (remote_target::check_pending_events_prevent_wildcard_vcont)
4147         (remote_target::discard_pending_stop_replies)
4148         (remote_target::discard_pending_stop_replies_in_queue)
4149         (remote_target::remote_notif_remove_queued_reply)
4150         (remote_target::queued_stop_reply)
4151         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4152         (remote_target::wait, remote_target::kill_new_fork_children)
4153         (remote_target::async): Update.
4154
4155 2018-06-10  Tom Tromey  <tom@tromey.com>
4156
4157         * record-full.c (record_full_arch_list_cleanups): Remove.
4158         (record_full_message): Use try/catch.
4159         (record_full_wait_cleanups): Remove.
4160         (record_full_wait_1): Use try/catch.
4161         (record_full_restore): Likewise.
4162
4163 2018-06-10  Tom Tromey  <tom@tromey.com>
4164
4165         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
4166         declare VEC.  Add constructor.
4167         <in_target_beneath>: Now bool.
4168         (record_full_breakpoints): Now a std::vector, static.
4169         (record_full_sync_record_breakpoints)
4170         (record_full_init_record_breakpoints)
4171         (record_full_target::insert_breakpoint)
4172         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
4173
4174 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4175
4176         * dwarf2read.c (process_cu_includes): Remove struct keyword.
4177         * serial.c (serial_interface_lookup): Remove struct keyword.
4178
4179 2018-06-10  Tom Tromey  <tom@tromey.com>
4180
4181         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4182         method.
4183         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4184         a method.
4185         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4186         method.
4187         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4188         "beneath" as a method.
4189         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4190         Use "beneath" as a method.
4191
4192 2018-06-10  Tom Tromey  <tom@tromey.com>
4193
4194         * tracefile.c (struct trace_file_writer_deleter): New.
4195         <operator()>: Rename from trace_file_writer_xfree.
4196         (trace_file_writer_up): New typedef.
4197         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4198
4199 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4200
4201         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4202         <m_registers, m_register_status>: Change type to
4203         std::unique_ptr.
4204         * regcache.c (reg_buffer::reg_buffer): Use new instead of
4205         XCNEWVEC.
4206
4207 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
4208
4209         * common/common-regcache.h (enum register_status): Add
4210         underlying type "signed char".
4211         * regcache.h (reg_buffer) <m_register_status>: Change type to
4212         register_status *.
4213         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4214         register_status instead of signed char.
4215         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4216         (reg_buffer::get_register_status): Remove cast.
4217         (readable_regcache::raw_read): Remove cast.
4218         (readable_regcache::cooked_read): Remove cast.
4219
4220 2018-06-09  Tom Tromey  <tom@tromey.com>
4221
4222         * source.c (reverse_search_command, forward_search_command): Use
4223         scoped_fd.
4224
4225 2018-06-09  Tom Tromey  <tom@tromey.com>
4226
4227         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
4228         (serial_ops_list): Now static, std::vector.
4229         (serial_interface_lookup, serial_add_interface): Update.
4230
4231 2018-06-09  Tom Tromey  <tom@tromey.com>
4232
4233         * dwarf2read.c (process_cu_includes): Update.
4234         (process_full_comp_unit): Update.
4235         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4236         std::vector.
4237
4238 2018-06-08  Paul Koning  <paul_koning@dell.com>
4239
4240         PR gdb/23252
4241
4242         * python/python.c (do_start_initialization):
4243         Avoid call to internal Python API.
4244         (init__gdb_module): New function.
4245
4246 2018-06-08  Gary Benson <gbenson@redhat.com>
4247
4248         * linux-thread-db.c (valprint.h): New include.
4249         (struct check_thread_db_info): New structure.
4250         (check_thread_db_on_load, tdb_testinfo): New static globals.
4251         (check_thread_db, check_thread_db_callback): New functions.
4252         (try_thread_db_load_1): Run integrity checks if requested.
4253         (maintenance_check_libthread_db): New function.
4254         (_initialize_thread_db): Register "maint check libthread-db"
4255         and "maint set/show check-libthread-db".
4256         * NEWS: Mention the above new commands.
4257
4258 2018-06-08  Tom Tromey  <tom@tromey.com>
4259
4260         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4261         now a method.
4262
4263 2018-06-08  Tom Tromey  <tom@tromey.com>
4264
4265         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4266
4267 2018-06-08  Tom Tromey  <tom@tromey.com>
4268
4269         * common/btrace-common.h (struct btrace_data): Add constructor,
4270         destructor, move assignment operator.
4271         <empty, clear, fini>: New methods.
4272         <format>: Initialize.
4273         (btrace_data_init, btrace_data_fini, btrace_data_clear)
4274         (btrace_data_empty): Don't declare.
4275         * common/btrace-common.c (btrace_data_init): Remove.
4276         (btrace_data::fini): Rename from btrace_data_fini.
4277         (btrace_data::empty): Rename from btrace_data_empty.
4278         (btrace_data::clear): Rename from btrace_data_clear.  Return
4279         bool.
4280         * btrace.h (make_cleanup_btrace_data): Don't declare.
4281         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4282         (parse_xml_btrace): Update.
4283         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4284         (maint_btrace_clear_packet_history_cmd): Update.
4285
4286 2018-06-07  Pedro Alves  <palves@redhat.com>
4287
4288         * target.h (target_ops) <beneath>: Now a method.  All references
4289         updated.
4290         (class target_stack): New.
4291         * target.c (g_target_stack): New.
4292         (g_current_top_target): Delete.
4293         (current_top_target): Get the top target out of g_target_stack.
4294         (target_stack::push, target_stack::unpush): New.
4295         (push_target, unpush_target): Reimplement.
4296         (target_is_pushed): Reimplement in terms of g_target_stack.
4297         (target_ops::beneath, target_stack::find_beneath): New.
4298
4299 2018-06-07  Pedro Alves  <palves@redhat.com>
4300
4301         * target.h (find_target_beneath): Delete declaration.
4302         * target.c (find_target_beneath): Delete definition.
4303         * aix-thread.c: All callers of find_target_beneath adjusted to
4304         call target_ops::beneath instead.
4305         * bsd-uthread.c: Likewise.
4306         * linux-thread-db.c: Likewise.
4307         * ravenscar-thread.c: Likewise.
4308         * sol-thread.c: Likewise.
4309         * spu-multiarch.c: Likewise.
4310
4311 2018-06-07  Pedro Alves  <palves@redhat.com>
4312
4313         * target.h (target_ops) <beneath>: Now a method.  All references
4314         updated.
4315         (target_ops) <m_beneath>: New.
4316         * target.c (target_ops::beneath): New.
4317         * corelow.c: Adjust all references to target_ops::beneath.
4318         * linux-thread-db.c: Likewise.
4319         * make-target-delegates: Likewise.
4320         * record-btrace.c: Likewise.
4321         * record-full.c: Likewise.
4322         * remote.c: Likewise.
4323         * target.c: Likewise.
4324         * target-delegates.c: Regenerate.
4325
4326 2018-06-07  Pedro Alves  <palves@redhat.com>
4327
4328         * target.h (target_stack): Delete.
4329         (current_top_target): Declare function.
4330         * target.c (target_stack): Delete.
4331         (g_current_top_target): New.
4332         (current_top_target): New function.
4333         * auxv.c: Use current_top_target instead of target_stack
4334         throughout.
4335         * avr-tdep.c: Likewise.
4336         * breakpoint.c: Likewise.
4337         * corefile.c: Likewise.
4338         * elfread.c: Likewise.
4339         * eval.c: Likewise.
4340         * exceptions.c: Likewise.
4341         * frame.c: Likewise.
4342         * gdbarch-selftests.c: Likewise.
4343         * gnu-v3-abi.c: Likewise.
4344         * ia64-tdep.c: Likewise.
4345         * ia64-vms-tdep.c: Likewise.
4346         * infcall.c: Likewise.
4347         * infcmd.c: Likewise.
4348         * infrun.c: Likewise.
4349         * linespec.c: Likewise.
4350         * linux-tdep.c: Likewise.
4351         * minsyms.c: Likewise.
4352         * ppc-linux-nat.c: Likewise.
4353         * ppc-linux-tdep.c: Likewise.
4354         * procfs.c: Likewise.
4355         * regcache.c: Likewise.
4356         * remote.c: Likewise.
4357         * rs6000-tdep.c: Likewise.
4358         * s390-linux-nat.c: Likewise.
4359         * s390-tdep.c: Likewise.
4360         * solib-aix.c: Likewise.
4361         * solib-darwin.c: Likewise.
4362         * solib-dsbt.c: Likewise.
4363         * solib-spu.c: Likewise.
4364         * solib-svr4.c: Likewise.
4365         * solib-target.c: Likewise.
4366         * sparc-tdep.c: Likewise.
4367         * sparc64-tdep.c: Likewise.
4368         * spu-tdep.c: Likewise.
4369         * symfile.c: Likewise.
4370         * symtab.c: Likewise.
4371         * target-descriptions.c: Likewise.
4372         * target-memory.c: Likewise.
4373         * target.c: Likewise.
4374         * target.h: Likewise.
4375         * tracefile-tfile.c: Likewise.
4376         * tracepoint.c: Likewise.
4377         * valops.c: Likewise.
4378         * valprint.c: Likewise.
4379         * value.c: Likewise.
4380         * windows-tdep.c: Likewise.
4381         * mi/mi-main.c: Likewise.
4382
4383 2018-06-07  Tom Tromey  <tom@tromey.com>
4384
4385         * valprint.h (build_address_symbolic): Declare.
4386         * printcmd.c (print_address_symbolic): Update.
4387         (build_address_symbolic): Change "name" and "filename" to
4388         std::string.
4389         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4390         Update.
4391         * defs.h (build_address_symbolic): Remove declaration.
4392
4393 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
4394
4395         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4396         (aarch64_vnv_type): Add function.
4397         (aarch64_pseudo_register_name): Add V regs for SVE.
4398         (aarch64_pseudo_register_type): Likewise.
4399         (aarch64_pseudo_register_reggroup_p): Likewise.
4400         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4401         (aarch64_pseudo_read_value): Add V regs for SVE.
4402         (aarch64_pseudo_write_2): Use V0 offset for SVE
4403         (aarch64_pseudo_write): Add V regs for SVE.
4404         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4405
4406 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4407
4408         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4409         (sve_vl_from_vq): Likewise.
4410
4411 2018-06-05  Tom Tromey  <tom@tromey.com>
4412
4413         * cli/cli-cmds.c (show_version): Update.
4414         * top.c (print_gdb_version): Add "interactive" parameter.
4415         Update.
4416         * main.c (captured_main_1): Update.
4417         * top.h (print_gdb_version): Add "interactive" parameter and a
4418         comment.
4419
4420 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
4421
4422         * common/enum-flags.h: Add trailing semicolon to example in
4423         comment.
4424
4425 2018-06-05  Tom Tromey  <tom@tromey.com>
4426
4427         PR cli/12326:
4428         * NEWS: Add entry about pager.
4429         * utils.c (pagination_disabled_for_command): New global.
4430         (prompt_for_continue): Allow "c" response to prompt.
4431         (reinitialize_more_filter): Clear
4432         pagination_disabled_for_command.
4433         (fputs_maybe_filtered): Check pagination_disabled_for_command.
4434
4435 2018-06-04  Tom Tromey  <tom@tromey.com>
4436
4437         * ada-lang.h (ada_lookup_symbol_list): Update.
4438         * ada-lang.c (resolve_subexp): Update.
4439         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
4440         parameter.
4441         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4442         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4443         results parameter to std::vector.
4444         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4445         Update.
4446         * ada-exp.y (block_lookup): Update.
4447         (select_possible_type_sym): Change type of syms.  Remove nsyms
4448         parameter.
4449         (write_var_or_type, write_name_assoc): Update.
4450
4451 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
4452
4453         * windows-nat.c (windows_nat_target::xfer_partial): Return
4454         TARGET_XFER_E_IO if we need to delegate to the target beneath
4455         but BENEATH is NULL.
4456
4457 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
4458
4459         * Makefile.in (config.status): Add configure.nat as a
4460         dependency.
4461
4462 2018-06-04  Tom Tromey  <tom@tromey.com>
4463
4464         * cp-name-parser.y (cpname_state): Add method declarations.
4465         (HANDLE_QUAL): Update.
4466         (cpname_state::d_grab, cpname_state::fill_comp)
4467         (cpname_state::make_operator, cpname_state::make_dtor)
4468         (cpname_state::make_builtin_type, cpname_state::make_name)
4469         (cpname_state::d_qualify, cpname_state::d_int_type)
4470         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4471         (%union): Move earlier.
4472
4473 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4474
4475         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4476
4477 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4478
4479         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4480         (aarch64_pseudo_write_1): Likewise.
4481         (aarch64_pseudo_read_value): Use helper.
4482         (aarch64_pseudo_write): Likewise.
4483
4484 2018-06-04  Pedro Alves  <palves@redhat.com>
4485
4486         * darwin-nat.c (darwin_ops): Delete.
4487         (darwin_attach_pid): Use get_native_target.
4488
4489 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4490
4491         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4492         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4493
4494 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4495
4496         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4497         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4498         (aarch64_gdbarch_init): Check for SVE.
4499         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4500
4501 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
4502
4503         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4504         * aarch64-tdep.h (aarch64_read_description): Likewise.
4505         * arch/aarch64.c (aarch64_create_target_description): Likewise.
4506         * arch/aarch64.h (aarch64_create_target_description): Likewise.
4507         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4508         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4509         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4510
4511 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4512
4513         * value.c (value_fetch_lazy_bitfield): New.
4514         (value_fetch_lazy_memory): New.
4515         (value_fetch_lazy_register): New.
4516         (value_fetch_lazy): Factor out to smaller functions.
4517
4518 2018-06-01  Tom Tromey  <tom@tromey.com>
4519
4520         * cp-name-parser.y (backslashable, represented): Now const.
4521
4522 2018-06-01  Tom Tromey  <tom@tromey.com>
4523
4524         * cp-name-parser.y: Include parser-defs.h.
4525         (parser_fprintf): Remove declaration.
4526
4527 2018-06-01  Tom Tromey  <tom@tromey.com>
4528
4529         * cp-name-parser.y: Use %pure-parser, %lex-param, and
4530         %parse-param.
4531         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4532         (global_result): Remove globals.
4533         (struct cpname_state): New.
4534         (yyparse): Don't declare.
4535         (yylex, yyerror): Move declarations after %union.
4536         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4537         (make_name): Add state parameter.
4538         Update all callers.
4539         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4540         parameter.
4541         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4542         Update.
4543         (yylex): Add lvalp, state parameters.
4544         (yyerror): Add state parameter.
4545         (cp_demangled_name_to_comp): Update.
4546
4547 2018-06-01  Tom Tromey  <tom@tromey.com>
4548
4549         * cp-name-parser.y (parser_fprintf): Declare.
4550         (GDB_YY_REMAP_PREFIX): Define.
4551         Include yy-remap.h.  Don't redefine yy* identifiers.
4552
4553 2018-06-01  Tom Tromey  <tom@tromey.com>
4554
4555         * python/py-type.c (typy_legacy_template_argument): Update.
4556         * cp-support.h (cp_demangled_name_to_comp): Update.
4557         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4558         parameter to be a "std::string *".
4559         (main): Update.
4560
4561 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
4562
4563         * ada-lex.l: Include "diagnostics.h" instead of
4564         "common/diagnostics.h".
4565         * unittests/environ-selftests.c: Likewise.
4566         * common/diagnostics.h: Moved to ../include.
4567
4568 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
4569
4570         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4571         to language_mode_manual while calling breakpoint_re_set_one.
4572
4573 2018-06-01  Tom Tromey  <tom@tromey.com>
4574
4575         * valops.c (value_cast_structs, destructor_name_p): Update.
4576         * symtab.c (gdb_mangle_name): Update.
4577         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4578         Update.
4579         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4580         (pascal_object_print_value_fields, pascal_object_print_value):
4581         Update.
4582         * p-typeprint.c (pascal_type_print_derivation_info): Update.
4583         * linespec.c (find_methods): Update.
4584         * gdbtypes.h (type_name_no_tag): Remove.
4585         (type_name_or_error): Rename from type_name_no_tag_or_error.
4586         * gdbtypes.c (type_name_no_tag): Remove.
4587         (type_name_or_error): Rename from type_name_no_tag_or_error.
4588         (lookup_struct_elt_type, check_typedef): Update.
4589         * expprint.c (print_subexp_standard): Update.
4590         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4591         * d-namespace.c (d_lookup_nested_symbol): Update.
4592         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4593         (cp_print_class_member): Update.
4594         * cp-namespace.c (cp_lookup_nested_symbol): Update.
4595         * completer.c (add_struct_fields): Update.
4596         * c-typeprint.c (cp_type_print_derivation_info)
4597         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4598         Update.
4599         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4600         (ada_prefer_type, ada_is_exception_sym): Update.
4601
4602 2018-06-01  Tom Tromey  <tom@tromey.com>
4603
4604         * valops.c (enum_constant_from_type, value_namespace_elt)
4605         (value_maybe_namespace_elt): Update.
4606         * valarith.c (find_size_for_pointer_math): Update.
4607         * target-descriptions.c (make_gdb_type): Update.
4608         * symmisc.c (print_symbol): Update.
4609         * stabsread.c (define_symbol, read_type)
4610         (complain_about_struct_wipeout, add_undefined_type)
4611         (cleanup_undefined_types_1): Update.
4612         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4613         (rust_range_type_p, val_print_struct, rust_print_struct_def)
4614         (rust_internal_print_type, rust_composite_type)
4615         (rust_evaluate_funcall, rust_evaluate_subexp)
4616         (rust_inclusive_range_type_p): Update.
4617         * python/py-type.c (typy_get_tag): Update.
4618         * p-typeprint.c (pascal_type_print_base): Update.
4619         * mdebugread.c (parse_symbol, parse_type): Update.
4620         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4621         Update.
4622         * guile/scm-type.c (gdbscm_type_tag): Update.
4623         * go-lang.c (sixg_string_p): Update.
4624         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4625         Update.
4626         * gdbtypes.h (struct main_type) <tag_name>: Remove.
4627         (TYPE_TAG_NAME): Remove.
4628         * gdbtypes.c (type_name_no_tag): Simplify.
4629         (check_typedef, check_types_equal, recursive_dump_type)
4630         (copy_type_recursive, arch_composite_type): Update.
4631         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
4632         in summary mode when needed.
4633         * eval.c (evaluate_funcall): Update.
4634         * dwarf2read.c (fixup_go_packaging, read_structure_type)
4635         (process_structure_scope, read_enumeration_type)
4636         (read_namespace_type, read_module_type, determine_prefix): Update.
4637         * cp-support.c (inspect_type): Update.
4638         * coffread.c (process_coff_symbol, decode_base_type): Update.
4639         * c-varobj.c (c_is_path_expr_parent): Update.
4640         * c-typeprint.c (c_type_print_base_struct_union): Update.
4641         (c_type_print_base_1): Update.  Print struct/class/union/enum in
4642         summary when using C language.
4643         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4644         (gen_maybe_namespace_elt): Update.
4645         * ada-lang.c (ada_type_name): Simplify.
4646         (empty_record, ada_template_to_fixed_record_type_1)
4647         (template_to_static_fixed_type)
4648         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4649
4650 2018-06-01  Tom Tromey  <tom@tromey.com>
4651
4652         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4653         c_print_type.
4654         * c-typeprint.c (c_print_type_1): Add "language" parameter.
4655         (c_print_type): Update.
4656         (c_print_type): New overload.
4657         (c_type_print_varspec_prefix, c_type_print_args)
4658         (c_type_print_varspec_suffix, c_print_type_no_offsets)
4659         (c_type_print_base_struct_union, c_type_print_base_1)
4660         (cp_type_print_method_args): Add "language" parameter.
4661         (c_type_print_base): Update.
4662         * c-lang.h (c_print_type): Add new overload.
4663
4664 2018-06-01  Tom Tromey  <tom@tromey.com>
4665
4666         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4667         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4668
4669 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
4670
4671         * aarch64-tdep.c (aarch64_sve_register_names): New const
4672         var.
4673         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4674         (AARCH64_SVE_Z_REGS_NUM): New define.
4675         (AARCH64_SVE_P_REGS_NUM): Likewise.
4676         (AARCH64_SVE_NUM_REGS): Likewise.
4677
4678 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4679
4680         * nat/linux-ptrace.h [__alpha__]
4681         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4682         definitions.
4683
4684 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
4685
4686         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4687         the endianness selected.
4688         * NEWS: Document `set endian auto' mode operation update.
4689
4690 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4691
4692         * Makefile.in: Add new header.
4693         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4694         (sve_vl_from_vg): Likewise.
4695         (sve_vq_from_vl): Likewise.
4696         (sve_vl_from_vq): Likewise.
4697         (sve_vq_from_vg): Likewise.
4698         (sve_vg_from_vq): Likewise.
4699         * configure.nat: Add new c file.
4700         * nat/aarch64-sve-linux-ptrace.c: New file.
4701         * nat/aarch64-sve-linux-ptrace.h: New file.
4702
4703 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
4704
4705         * aarch64-linux-nat.c (aarch64_linux_read_description):
4706         Add parmeter zero.
4707         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4708         Likewise.
4709         * aarch64-tdep.c (tdesc_aarch64_list): Add.
4710         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4711         (aarch64_gdbarch_init): Add parmeter zero.
4712         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4713         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4714         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4715         parmeter.
4716         * doc/gdb.texinfo: Describe SVE feature
4717         * features/aarch64-sve.c: New file.
4718
4719 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
4720
4721         PR gdb/23210
4722         * gdbarch.sh (significant_addr_bit): Default to zero when
4723         not set by target architecture.
4724         * gdbarch.c: Re-generated.
4725         * utils.c (address_significant): Update.
4726
4727 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
4728
4729         * stack.c (func_command): Remove trailing newline in call to error.
4730
4731 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4732
4733         * regcache.h (regcache_raw_collect): Remove, update callers to
4734         use regcache::raw_collect.
4735         * regcache.c (regcache_raw_collect): Remove.
4736
4737 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4738
4739         * regcache.h (regcache_raw_supply): Remove, update callers to
4740         use detached_regcache::raw_supply.
4741         * regcache.c (regcache_raw_supply): Remove.
4742
4743 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4744
4745         * regcache.h (regcache_cooked_write_part): Remove, update
4746         callers to use regcache::cooked_write_part.
4747         * regcache.c (regcache_cooked_write_part): Remove.
4748
4749 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4750
4751         * regcache.h (regcache_cooked_read_part): Remove, update callers
4752         to use readable_regcache::cooked_read_part.
4753         * regcache.c (regcache_cooked_read_part): Remove.
4754
4755 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4756
4757         * regcache.h (regcache_cooked_read_value): Remove, update
4758         callers to use readable_regcache::cooked_read_value.
4759         * regcache.c (regcache_cooked_read_value): Remove.
4760
4761 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4762
4763         * regcache.h (regcache_cooked_write): Remove, update callers to
4764         use regcache::cooked_write.
4765         * regcache.c (regcache_cooked_write): Remove.
4766
4767 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4768
4769         * regcache.h (regcache_invalidate): Remove, update callers to
4770         use detached_regcache::invalidate instead.
4771         * regcache.c (regcache_invalidate): Remove.
4772
4773 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4774
4775         * regcache.h (regcache_raw_write_part): Remove, update callers
4776         to use regcache::raw_write_part instead.
4777         * regcache.c (regcache_raw_write_part): Remove.
4778
4779 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4780
4781         * regcache.h (regcache_raw_read_part): Remove, update callers to
4782         use readable_regcache::raw_read_part instead.
4783         * regcache.c (regcache_raw_read_part): Remove.
4784
4785 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4786
4787         * regcache.h (regcache_cooked_read): Remove, update callers to
4788         use readable_regcache::cooked_read instead.
4789         * regcache.c (regcache_cooked_read): Remove.
4790
4791 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4792
4793         * regcache.h (regcache_raw_write): Remove, update callers to use
4794         regcache::raw_write instead.
4795         * regcache.c (regcache_raw_write): Remove.
4796
4797 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4798
4799         * regcache.h (regcache_raw_read): Remove, update callers to use
4800         readable_regcache::raw_read instead.
4801         * regcache.c (regcache_raw_read): Remove.
4802
4803 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4804
4805         * regcache.h (regcache_raw_update): Remove, update callers to
4806         use readable_regcache::raw_update instead.
4807         * regcache.c (regcache_raw_update): Remove.
4808
4809 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4810
4811         * regcache.h (regcache_register_status): Remove, update callers
4812         to use reg_buffer::get_register_status directly instead.
4813         * regcache.c (regcache_register_status): Remove.
4814
4815 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4816
4817         * regcache.h (regcache_get_ptid): Remove, update all callers to
4818         call regcache::ptid instead.
4819         * regcache.c (regcache_get_ptid): Remove.
4820
4821 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4822
4823         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
4824
4825 2018-05-30  Pedro Alves  <palves@redhat.com>
4826
4827         * common/common-exceptions.h (exception_rethrow): Use
4828         ATTRIBUTE_NORETURN.
4829
4830 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
4831
4832         * breakpoint.c (print_solib_event, check_status_catch_solib):
4833         Remove struct keyword in range-based for loops.
4834         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
4835         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4836         Likewise.
4837         * linespec.c (find_superclass_methods, search_minsyms_for_name):
4838         Likewise.
4839         * symfile.c (addr_info_make_relative): Likewise.
4840         * thread.c (value_in_thread_stack_temporaries): Likewise.
4841
4842 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
4843
4844         PR gdb/16841
4845         * valops.c (value_struct_elt_for_reference): Call check_typedef on
4846         aggregate type to get its real type before accessing it.
4847
4848 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
4849
4850         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4851         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4852         * coff-pe-read.c (add_pe_forwarded_sym): Replace
4853         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4854         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4855         * jit.c (jit_breakpoint_re_set_internal): Likewise.
4856         * printcmd.c (info_address_command): Likewise.
4857
4858 2018-05-29  Tom Tromey  <tom@tromey.com>
4859
4860         * windows-nat.c (handle_exception): Update fall-through comment.
4861
4862 2018-05-29  Tom Tromey  <tom@tromey.com>
4863
4864         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
4865         (struct program_space) <added_solibs>: Now a std::vector.
4866         * breakpoint.c (print_solib_event): Update.
4867         (check_status_catch_solib): Update.
4868         * progspace.c (clear_program_space_solib_cache): Update.
4869         * solib.c (update_solib_list): Update.
4870
4871 2018-05-29  Tom Tromey  <tom@tromey.com>
4872
4873         * python/py-type.c (typy_richcompare): Update.
4874         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4875         * gdbtypes.h (types_deeply_equal): Return bool.
4876         (types_equal): Likewise.
4877         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
4878         declare VEC.
4879         (check_types_equal): Change worklist to std::vector.  Return
4880         bool.
4881         (struct type_equality_entry): Add constructor.
4882         (compare_maybe_null_strings): Return bool.
4883         (check_types_worklist): Return bool.  Change worklist to
4884         std::vector.
4885         (types_deeply_equal): Use std::vector.
4886         (types_equal): Return bool.
4887         (compare_maybe_null_strings): Simplify.
4888
4889 2018-05-29  Tom Tromey  <tom@tromey.com>
4890
4891         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
4892
4893 2018-05-29  Tom Tromey  <tom@tromey.com>
4894
4895         * objc-lang.h: Don't include cp-support.h.
4896         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
4897         declare VEC.
4898
4899 2018-05-27  Tom Tromey  <tom@tromey.com>
4900
4901         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4902
4903 2018-05-25  Tom Tromey  <tom@tromey.com>
4904
4905         * value.c (value::location): Initialize.
4906
4907 2018-05-25  Tom Tromey  <tom@tromey.com>
4908
4909         * dbxread.c (init_bincl_list): Remove.
4910         (bincl_list): Now a std::vector.
4911         (bincls_allocated, next_bincl): Remove.
4912         (free_bincl_list, do_free_bincl_list_cleanup)
4913         (make_cleanup_free_bincl_list): Remove.
4914         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4915         unique_xmalloc_ptr.
4916         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4917         (struct header_file_location): Add constructor.
4918         (add_bincl_to_list): Remove.
4919
4920 2018-05-25  Tom Tromey  <tom@tromey.com>
4921
4922         * tui/tui.c (tui_enable): Update.
4923         * mi/mi-interp.c (mi_interp::init): Update.
4924         * interps.h (class interp) <name>: New method.
4925         <m_name>: Rename from name.
4926         (~scoped_restore_interp): Update.
4927         * interps.c (interp::interp): Update.
4928         (interp_add, interp_set, interp_lookup_existing)
4929         (current_interp_named_p): Update.
4930
4931 2018-05-25  Tom Tromey  <tom@tromey.com>
4932
4933         * interps.c (interp_name): Remove.
4934         * mi/mi-interp.c (mi_interp::init): Update.
4935         * interps.h (interp_name): Remove.
4936         (~scoped_restore_interp): Update.
4937         * tui/tui.c (tui_enable): Update.
4938
4939 2018-05-25  Tom Tromey  <tom@tromey.com>
4940
4941         * utils.c (fputs_maybe_filtered): Update.
4942         * linespec.c (decode_line_full): Update.
4943         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4944         (mi_print_breakpoint_for_event, mi_solib_loaded)
4945         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4946         (mi_user_selected_context_changed): Update.
4947         * mi/mi-main.c (mi_execute_command): Update.
4948         * cli/cli-script.c (execute_control_command): Update.
4949         * python/python.c (execute_gdb_command): Update.
4950         * solib.c (info_sharedlibrary_command): Update.
4951         * interps.c (interp_ui_out): Remove.
4952         * interps.h (interp_ui_out): Remove.
4953
4954 2018-05-25  Tom Tromey  <tom@tromey.com>
4955
4956         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4957         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4958         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4959
4960 2018-05-25  Tom Tromey  <tom@tromey.com>
4961
4962         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4963         * interps.c (interp_exec): Use scoped_restore.
4964
4965 2018-05-25  Tom Tromey  <tom@tromey.com>
4966
4967         * remote.c (remote_target::remote_file_get): Use
4968         gdb::byte_vector.
4969         (remote_target::remote_file_put): Likewise.
4970
4971 2018-05-25  Tom Tromey  <tom@tromey.com>
4972
4973         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4974         a std::string.
4975         (get_pe_section_index, add_pe_exported_sym): Update.
4976         (read_pe_exported_syms): Use gdb::def_vector.
4977
4978 2018-05-25  Tom Tromey  <tom@tromey.com>
4979
4980         * frame.c (remove_prev_frame): Remove.
4981         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4982
4983 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
4984
4985         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4986         Remove prototypes.
4987         * mips-linux-nat.c (supply_fpregset): Always call
4988         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4989         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4990         `mips_fill_fpregset'.
4991         * mips-linux-tdep.c (mips_supply_fpregset)
4992         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4993         (mips_fill_fpregset_wrapper): Remove functions.
4994         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4995         (mips_linux_fpregset): Remove variable.
4996         (mips_linux_iterate_over_regset_sections): Use
4997         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4998         (mips_linux_o32_sigframe_init): Remove comment.
4999
5000 2018-05-25  Pedro Alves  <palves@redhat.com>
5001
5002         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5003         (struct readahead_cache, struct packet_reg, struct
5004         remote_arch_state, class remote_state): Move higher up in the
5005         file.
5006         (remote_target::m_remote_state): Now an object instead of a pointer.
5007         (remote_target::get_remote_state): Adjust.
5008
5009 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5010
5011         * stack.c (select_and_print_frame): Delete.
5012         (struct function_bounds): Move struct within function.
5013         (func_command): Most content moved into new function
5014         find_frame_for_function, use new function, print result, add
5015         function comment.
5016         (find_frame_for_function): New function, now returns a result.
5017
5018 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5019
5020         * stack.c (iterate_over_block_arg_vars): Fix comment.
5021         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5022
5023 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
5024
5025         PR gdb/23203
5026         * frame.c
5027         (scoped_restore_selected_frame::scoped_restore_selected_frame):
5028         Define.
5029         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5030         Define.
5031         * frame.h (class scoped_restore_selected_frame): New class.
5032         * stack.c (print_frame_local_vars): Remove catching and rethrowing
5033         of any exception, use scoped_restore_selected_frame to restore the
5034         frame instead.
5035
5036 2018-05-24  Pedro Alves  <palves@redhat.com>
5037
5038         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5039         override.
5040
5041 2018-05-23  Tom Tromey  <tom@tromey.com>
5042
5043         * complaints.c (struct complaints): Remove.
5044         (symfile_complaint_book): Remove.
5045         (series): New global.
5046         (complaint_internal): Update.
5047         (clear_complaints): Update.
5048
5049 2018-05-23  Tom Tromey  <tom@tromey.com>
5050
5051         * complaints.c (counters): New global.
5052         (struct complain): Remove.
5053         (struct complaints) <root>: Remove.
5054         (complaint_sentinel): Remove.
5055         (symfile_complaint_book): Update.
5056         (find_complaint) Remove.
5057         (complaint_internal, clear_complaints): Update.
5058
5059 2018-05-23  Tom Tromey  <tom@tromey.com>
5060
5061         * complaints.c (struct complain) <file, line>: Remove.
5062         (find_complaint): Remove file, line parameters.
5063         (complaint_internal): Update.
5064
5065 2018-05-23  Tom Tromey  <tom@tromey.com>
5066
5067         * complaints.c (vcomplaint): Remove.
5068         (complaint_internal) Merge in contents of vcomplaint.
5069
5070 2018-05-23  Tom Tromey  <tom@tromey.com>
5071
5072         * complaints.c (struct complaints) <explanation>: Remove.
5073         (symfile_explanations): Remove.
5074         (symfile_complaint_book): Update.
5075         (vcomplaint): Update.
5076         (struct explanation): Remove.
5077
5078 2018-05-23  Tom Tromey  <tom@tromey.com>
5079
5080         * complaints.c (symfile_complaints): Remove.
5081         (complaint_internal): Remove "complaints" parameter.
5082         (clear_complaints, vcomplaint): Remove "c" parameter.
5083         (get_complaints): Remove.
5084         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5085         (dwarf2_debug_line_missing_file_complaint)
5086         (dwarf2_debug_line_missing_end_sequence_complaint)
5087         (dwarf2_complex_location_expr_complaint)
5088         (dwarf2_const_value_length_mismatch_complaint)
5089         (dwarf2_section_buffer_overflow_complaint)
5090         (dwarf2_macro_malformed_definition_complaint)
5091         (dwarf2_invalid_attrib_class_complaint)
5092         (create_addrmap_from_index, dw2_symtab_iter_next)
5093         (dw2_expand_marked_cus)
5094         (dw2_debug_names_iterator::find_vec_in_debug_names)
5095         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5096         (create_debug_type_hash_table, init_cutu_and_read_dies)
5097         (partial_die_parent_scope, add_partial_enumeration)
5098         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5099         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5100         (read_import_statement, read_file_scope, create_dwo_cu_reader)
5101         (create_cus_hash_table, create_dwp_hash_table)
5102         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5103         (dwarf2_rnglists_process, dwarf2_ranges_process)
5104         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5105         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5106         (handle_struct_member_die, process_structure_scope)
5107         (read_array_type, read_common_block, read_module_type)
5108         (read_tag_pointer_type, read_typedef, read_base_type)
5109         (read_subrange_type, load_partial_dies, partial_die_info::read)
5110         (partial_die_info::read, partial_die_info::read)
5111         (partial_die_info::read, read_checked_initial_length_and_offset)
5112         (dwarf2_string_attr, read_formatted_entries)
5113         (dwarf_decode_line_header)
5114         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5115         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5116         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5117         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5118         (get_signatured_type, get_DW_AT_signature_type)
5119         (decode_locdesc, file_file_name, consume_improper_spaces)
5120         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5121         (dwarf_decode_macro_bytes, dwarf_decode_macros)
5122         (dwarf2_symbol_mark_computed, set_die_type)
5123         (read_attribute_value): Update.
5124         * stap-probe.c (handle_stap_probe, get_stap_base_address):
5125         Update.
5126         * dbxread.c (unknown_symtype_complaint)
5127         (lbrac_mismatch_complaint, repeated_header_complaint)
5128         (set_namestring, function_outside_compilation_unit_complaint)
5129         (read_dbx_symtab, process_one_symbol): Update.
5130         * gdbtypes.c (stub_noname_complaint): Update.
5131         * windows-nat.c (handle_unload_dll): Update.
5132         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5133         (decode_base_type): Update.
5134         * xcoffread.c (bf_notfound_complaint, ef_complaint)
5135         (eb_complaint, record_include_begin, record_include_end)
5136         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5137         (process_xcoff_symbol, read_symbol)
5138         (function_outside_compilation_unit_complaint)
5139         (scan_xcoff_symtab): Update.
5140         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5141         * buildsym.c (finish_block_internal, make_blockvector)
5142         (end_symtab_get_static_block, augment_type_symtab): Update.
5143         * dtrace-probe.c (dtrace_process_dof)
5144         (dtrace_static_probe_ops::get_probes): Update.
5145         * complaints.h (struct complaint): Don't declare.
5146         (symfile_complaints): Remove.
5147         (complaint_internal): Remove "complaints" parameter.
5148         (complaint): Likewise.
5149         (clear_complaints): Likewise.
5150         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5151         (reread_symbols): Update.
5152         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5153         (dwarf2_frame_cache, decode_frame_entry): Update.
5154         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5155         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5156         (info_selectors_command): Update.
5157         * macrotab.c (macro_include, check_for_redefinition)
5158         (macro_undef): Update.
5159         * objfiles.c (filter_overlapping_sections): Update.
5160         * stabsread.c (invalid_cpp_abbrev_complaint)
5161         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5162         (define_symbol, error_type, read_type, rs6000_builtin_type)
5163         (stabs_method_name_from_physname, read_member_functions)
5164         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5165         (attach_fields_to_type, complain_about_struct_wipeout)
5166         (read_range_type, read_args, common_block_start)
5167         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5168         Update.
5169         * mdebugread.c (index_complaint, unknown_ext_complaint)
5170         (basic_type_complaint, bad_tag_guess_complaint)
5171         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5172         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5173         (parse_procedure, parse_lines)
5174         (function_outside_compilation_unit_complaint)
5175         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5176         (bad_tag_guess_complaint, reg_value_complaint): Update.
5177         * cp-support.c (demangled_name_complaint): Update.
5178         * macroscope.c (sal_macro_scope): Update.
5179         * dwarf-index-write.c (class debug_names): Update.
5180
5181 2018-05-23  Tom Tromey  <tom@tromey.com>
5182
5183         * complaints.c (clear_complaints): Remove "noisy" parameter.
5184         * complaints.h (clear_complaints): Update.
5185         * symfile.c (syms_from_objfile_1, finish_new_objfile)
5186         (reread_symbols): Update.
5187
5188 2018-05-23  Tom Tromey  <tom@tromey.com>
5189
5190         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5191         SUBSEQUENT_MESSAGE.
5192         (vcomplaint, clear_complaints): Update.
5193         (symfile_explanations): Remove some messages.
5194
5195 2018-05-23  Tom Tromey  <tom@tromey.com>
5196
5197         * complaints.c (internal_complaint): Remove.
5198         * complaints.h (internal_complaint): Remove.
5199
5200 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5201
5202         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5203
5204 2018-05-22  Pedro Alves  <palves@redhat.com>
5205
5206         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5207         (remote_fileio_badfd, remote_fileio_return_errno)
5208         (remote_fileio_return_success, remote_fileio_func_open)
5209         (remote_fileio_func_open, remote_fileio_func_close)
5210         (remote_fileio_func_read, remote_fileio_func_write)
5211         (remote_fileio_func_lseek, remote_fileio_func_rename)
5212         (remote_fileio_func_unlink, remote_fileio_func_stat)
5213         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5214         (remote_fileio_func_isatty, remote_fileio_func_system): Add
5215         remote_target parameter.
5216         (remote_fio_func_map) <func>: Add remote_target parameter.
5217         (do_remote_fileio_request, remote_fileio_request):
5218         * remote-fileio.h (remote_fileio_request):
5219         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5220         remote_target parameter.
5221         (remote_notif_process, handle_notification): Adjust to pass down
5222         the remote.
5223         (remote_notif_state_allocate): Add remote_target parameter.  Save
5224         it.
5225         * remote-notif.h (struct remote_target): Forward declare.
5226         (struct notif_client) <parse, ack, can_get_pending_events>: Add
5227         remote_target parameter.
5228         (struct remote_notif_state) <remote>: New field.
5229         (remote_notif_ack, remote_notif_parse): Add remote_target
5230         parameter.
5231         (remote_notif_state_allocate, remote_notif_state_allocate): Add
5232         remote_target parameter.
5233         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5234         (threads_listing_context, rmt_thread_action, protocol_feature)
5235         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5236         (packet_result, struct threads_listing_context, remote_state):
5237         Move definitions and declarations higher up.
5238         (remote_target) <~remote_target>: Declare.
5239         (remote_download_command_source, remote_file_put, remote_file_get)
5240         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5241         (remote_hostio_pread_vFile, remote_hostio_send_command)
5242         (remote_hostio_set_filesystem, remote_hostio_open)
5243         (remote_hostio_close, remote_hostio_unlink, remote_state)
5244         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5245         (get_memory_write_packet_size, get_memory_read_packet_size)
5246         (append_pending_thread_resumptions, remote_detach_1)
5247         (append_resumption, remote_resume_with_vcont)
5248         (add_current_inferior_and_thread, wait_ns, wait_as)
5249         (process_stop_reply, remote_notice_new_inferior)
5250         (process_initial_stop_replies, remote_add_thread)
5251         (btrace_sync_conf, remote_btrace_maybe_reopen)
5252         (remove_new_fork_children, kill_new_fork_children)
5253         (discard_pending_stop_replies, stop_reply_queue_length)
5254         (check_pending_events_prevent_wildcard_vcont)
5255         (discard_pending_stop_replies_in_queue, stop_reply)
5256         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5257         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5258         (remote_interrupt_as, remote_interrupt_ns)
5259         (remote_get_noisy_reply, remote_query_attached)
5260         (remote_add_inferior, remote_current_thread, get_current_thread)
5261         (set_thread, set_general_thread, set_continue_thread)
5262         (set_general_process, write_ptid)
5263         (remote_unpack_thread_info_response, remote_get_threadinfo)
5264         (parse_threadlist_response, remote_get_threadlist)
5265         (remote_threadlist_iterator, remote_get_threads_with_ql)
5266         (remote_get_threads_with_qxfer)
5267         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5268         (get_offsets, remote_check_symbols, remote_supported_packet)
5269         (remote_query_supported, remote_packet_size)
5270         (remote_serial_quit_handler, remote_detach_pid)
5271         (remote_vcont_probe, remote_resume_with_hc)
5272         (send_interrupt_sequence, interrupt_query)
5273         (remote_notif_get_pending_events, fetch_register_using_p)
5274         (send_g_packet, process_g_packet, fetch_registers_using_g)
5275         (store_register_using_P, store_registers_using_G)
5276         (set_remote_traceframe, check_binary_download)
5277         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5278         (remote_xfer_live_readonly_partial, remote_read_bytes)
5279         (remote_send_printf, remote_flash_write, readchar)
5280         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5281         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5282         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5283         (extended_remote_disable_randomization, extended_remote_run)
5284         (send_environment_packet, extended_remote_environment_support)
5285         (extended_remote_set_inferior_cwd, remote_write_qxfer)
5286         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5287         (packet_command): Now methods of ...
5288         (remote_target): ... this class.
5289         (m_remote_state) <remote_target>: New field.
5290         (struct remote_state) <stop_reply_queue,
5291         remote_async_inferior_event_token, wait_forever_enabled_p>: New
5292         fields.
5293         (remote_state::remote_state): Allocate stop_reply_queue.
5294         (remote_state): Delete global.
5295         (get_remote_state_raw): Delete.
5296         (remote_target::get_remote_state): Allocate m_remote_state on
5297         demand.
5298         (get_current_remote_target): New.
5299         (remote_ops, extended_remote_ops): Delete.
5300         (wait_forever_enabled_p, remote_async_inferior_event_token):
5301         Delete, moved to struct remote_state.
5302         (remote_target::close): Delete self.  Destruction bits split to
5303         ...
5304         (remote_target::~remote_target): ... this.
5305         (show_memory_packet_size): Adjust to use
5306         get_current_remote_target.
5307         (struct protocol_feature) <func>: Add remote_target parameter.
5308         All callers adjusted.
5309         (curr_quit_handler_target): New.
5310         (remote_serial_quit_handler): Reimplement.
5311         (remote_target::open_1): Adjust to use get_current_remote_target.
5312         Heap-allocate remote_target/extended_remote_target instances.
5313         (vcont_builder::vcont_builder): Add remote_target parameter, and
5314         save it in m_remote.  All callers adjusted.
5315         (vcont_builder::m_remote): New field.
5316         (vcont_builder::restart, vcont_builder::flush)
5317         (vcont_builder::push_action): Use it.
5318         (remote_target::commit_resume): Use it.
5319         (struct queue_iter_param) <remote>: New field.
5320         (remote_target::remove_new_fork_children): Fill in 'remote' field.
5321         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5322         (check_pending_event_prevents_wildcard_vcont_callback)
5323         (remote_target::check_pending_events_prevent_wildcard_vcont)
5324         (remote_target::discard_pending_stop_replies)
5325         (remote_target::discard_pending_stop_replies_in_queue)
5326         (remote_target::remote_notif_remove_queued_reply): Fill in
5327         'remote' field.
5328         (remote_notif_get_pending_events): New.
5329         (remote_target::readchar, remote_target::remote_serial_write):
5330         Save/restore curr_quit_handler_target.
5331         (putpkt): New.
5332         (kill_new_fork_children): Fill in 'remote' field.
5333         (packet_command): Use get_current_remote_target, defer to
5334         remote_target method of same name.
5335         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5336         parameter, and save it in m_remote.  All callers adjusted.
5337         (scoped_remote_fd::release): Use m_remote.
5338         (scoped_remote_fd::m_remote): New field.
5339         (remote_file_put, remote_file_get, remote_file_delete): Use
5340         get_current_remote_target, defer to remote_target method of same
5341         name.
5342         (remote_btrace_reset): Add remote_state paremeter.  Update all
5343         callers.
5344         (remote_async_inferior_event_handler). Pass down 'data'.
5345         (remote_new_objfile): Use get_current_remote_target.
5346         (remote_target::vcont_r_supported): New.
5347         (set_range_stepping): Use get_current_remote_target and
5348         remote_target::vcont_r_supported.
5349         (_initialize_remote): Don't allocate 'remote_state' and
5350         'stop_reply_queue' globals.
5351         * remote.h (struct remote_target): Forward declare.
5352         (getpkt, putpkt, remote_notif_get_pending_events): Add
5353         'remote_target' parameter.
5354
5355 2018-05-22  Pedro Alves  <palves@redhat.com>
5356
5357         * remote.c (vcont_builder): Now a class.  Make all data members
5358         private.
5359         (vcont_builder) <vcont_builder, restart, flush, push_action>:
5360         Declare methods.
5361         (vcont_builder_restart): Rename to ...
5362         (vcont_builder::restart): ... this.
5363         (vcont_builder_flush): Rename to ...
5364         (vcont_builder::flush): ... this.
5365         (vcont_builder_push_action): Rename to ...
5366         (vcont_builder::push_action): ... this.
5367         (remote_target::commit_resume): Adjust.
5368
5369 2018-05-22  Pedro Alves  <palves@redhat.com>
5370
5371         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5372         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5373         (get_fixed_memory_packet_size): New.
5374         (get_memory_packet_size): Use it.
5375         (set_memory_packet_size): Don't override the config size with
5376         DEFAULT_MAX_MEMORY_PACKET_SIZE.
5377         (show_memory_packet_size): Use get_fixed_memory_packet_size.
5378         Don't refer to get_memory_packet_size if not connected to a remote
5379         target.  Show "(default)" if configured size is 0.
5380
5381 2018-05-22  Pedro Alves  <palves@redhat.com>
5382
5383         * remote.c (remote_target::mourn_inferior): Move
5384         discard_pending_stop_replies call here from ...
5385         (_initialize_remote): ... here.
5386
5387 2018-05-22  Pedro Alves  <palves@redhat.com>
5388
5389         * remote.c (compare_section_command): Remove set_general_process
5390         call.
5391
5392 2018-05-22  Pedro Alves  <palves@redhat.com>
5393
5394         * remote.c (struct packet_reg, struct remote_arch_state):
5395         Move higher up in the file.
5396         (remote_state) <m_arch_states>: Store remote_arch_state values
5397         instead of remote_arch_state pointers.
5398         (remote_state::get_remote_arch_state): Adjust.
5399
5400 2018-05-22  Pedro Alves  <palves@redhat.com>
5401
5402         * remote.c: Include <unordered_map>.
5403         (remote_state): Now a class.
5404         (remote_state) <get_remote_arch_state>: Declare method.
5405         <get_remote_arch_state>: New field.
5406         (remote_arch_state) <remote_arch_state>: Declare ctor.
5407         <regs>: Now a unique_ptr.
5408         (remote_gdbarch_data_handle): Delete.
5409         (get_remote_arch_state): Delete.
5410         (remote_state::get_remote_arch_state): New.
5411         (get_remote_state): Adjust to call remote_state's
5412         get_remote_arch_state method.
5413         (init_remote_state): Delete, bits factored out to ...
5414         (remote_arch_state::remote_arch_state): ... this new method.
5415         (get_remote_packet_size, get_memory_packet_size)
5416         (process_g_packet, remote_target::fetch_registers)
5417         (remote_target::prepare_to_store, store_registers_using_G)
5418         (remote_target::store_registers, remote_target::get_trace_status):
5419         Adjust to call remote_state's method.
5420         (_initialize_remote): Remove reference to
5421         remote_gdbarch_data_handle.
5422
5423 2018-05-22  Pedro Alves  <palves@redhat.com>
5424
5425         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5426         pread>: New method declarations.
5427         (remote_target::open_1): Adjust.
5428         (readahead_cache_invalidate): Rename to ...
5429         (readahead_cache::invalidate): ... this, and adjust to be a class
5430         method.
5431         (readahead_cache_invalidate_fd): Rename to ...
5432         (readahead_cache::invalidate_fd): ... this, and adjust to be a
5433         class method.
5434         (remote_hostio_pwrite): Adjust.
5435         (remote_hostio_pread_from_cache): Rename to ...
5436         (readahead_cache::pread): ... this, and adjust to be a class
5437         method.
5438         (remote_hostio_close): Adjust.
5439
5440 2018-05-22  Pedro Alves  <palves@redhat.com>
5441
5442         * remote.c (remote_hostio_close_cleanup): Delete.
5443         (class scoped_remote_fd): New.
5444         (remote_file_put, remote_file_get): Use it.
5445
5446 2018-05-22  Pedro Alves  <palves@redhat.com>
5447
5448         (struct vCont_action_support): Use bool and initialize all fields.
5449         (struct readahead_cache): Initialize all fields.
5450         (remote_state): Use bool and initialize all fields.
5451         (remote_state::remote_state, remote_state::~remote_state): New.
5452         (new_remote_state): Delete.
5453         (_initialize_remote): Use new to allocate remote_state.
5454
5455 2018-05-22  Pedro Alves  <palves@redhat.com>
5456             張俊芝  <zjz@zjz.name>
5457
5458         PR gdb/22973
5459         * c-exp.y: Include "c-support.h".
5460         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5461         of tolower.  Use c_ident_is_alpha to scan names.
5462         * c-lang.c: Include "c-support.h".
5463         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5464         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5465         * c-support.h: New file, with bits factored out from ...
5466         * cp-name-parser.y: ... this file.
5467         Include "c-support.h".
5468         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5469         c-support.h and renamed.
5470         (symbol_end, yylex): Adjust.
5471
5472 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5473
5474         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5475         parameter type to CORE_ADDR.
5476         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5477         parameter type in declaration to CORE_ADDR.
5478         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5479         target_auxv_search to get AT_HWCAP and use the result to get the
5480         target description.
5481         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5482         to CORE_ADDR. Remove the cast of the return value to unsigned
5483         long. Fix error predicate of target_auxv_search.
5484         (ppc_linux_nat_target::read_description): Change the type of the
5485         hwcap variable to CORE_ADDR.
5486
5487 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5488
5489         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5490         if the size of fpscr is larger than 32 bits.
5491
5492 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5493
5494         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5495         (ppc32_linux_vsxregmap): New global.
5496         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5497         regcache_supply_regset, and regcache_collect_regset.
5498         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5499         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5500         (fetch_vsx_register, store_vsx_register): Remove.
5501         (fetch_vsx_registers): Add regno parameter. Get regset using
5502         ppc_linux_vsxregset. Use regset to supply registers.
5503         (store_vsx_registers): Add regno parameter. Get regset using
5504         ppc_linux_vsxregset. Use regset to collect registers.
5505         (fetch_register): Call fetch_vsx_registers instead of
5506         fetch_vsx_register.
5507         (store_register): Call store_vsx_registers instead of
5508         store_vsx_register.
5509         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5510         new regno parameter.
5511         (store_ppc_registers): Call store_vsx_registers with -1 for the
5512         new regno parameter.
5513         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5514         (ppc_collect_vsxregset): Remove.
5515
5516 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5517
5518         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5519         offset fields.
5520         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5521         for vector register offset fields.
5522         (ppc64_fbsd_reg_offsets): Likewise.
5523         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5524         to vector register offset fields.
5525         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5526         to vector register offset fields.
5527         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5528         vector register offset fields.
5529         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5530         initializers for vector register offset fields.
5531         (rs6000_aix64_reg_offsets): Likewise.
5532         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5533         (ppc_supply_vrregset): Remove.
5534         (ppc_collect_vrregset): Remove.
5535         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5536         (ppc_linux_vrregset) : New function.
5537         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5538         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5539         (ppc32_linux_vrregset): Remove.
5540         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5541         and use result instead of ppc32_linux_vrregset.
5542         (ppc32_linux_reg_offsets): Remove initializers for vector register
5543         offset fields.
5544         (ppc64_linux_reg_offsets): Likewise.
5545         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5546         * ppc-linux-nat.c: Include regset.h.
5547         (gdb_vrregset_t): Adjust comment to account for little-endian
5548         mode.
5549         (supply_vrregset, fill_vrregset): Remove.
5550         (fetch_altivec_register, store_altivec_register): Remove.
5551         (fetch_altivec_registers): Add regno parameter. Get regset using
5552         ppc_linux_vrregset. Use regset to supply registers.
5553         (store_altivec_registers): Add regno parameter. Get regset using
5554         ppc_linux_vrregset. Use regset to collect registers.
5555         (fetch_register): Call fetch_altivec_registers instead of
5556         fetch_altivec_register.
5557         (store_register): Call store_altivec_registers instead of
5558         store_altivec_register.
5559         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5560         the new regno parameter.
5561         (store_ppc_registers): Call store_altivec_registers with -1 for
5562         the new regno parameter.
5563
5564 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5565
5566         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5567         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5568         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5569         (gdb_vrregset_t): Change array type size to
5570         PPC_LINUX_SIZEOF_VRREGSET.
5571         (gdb_vsxregset_t): Change array type size to
5572         PPC_LINUX_SIZEOF_VSXREGSET.
5573         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5574         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5575         PPC_LINUX_SIZEOF_VSXREGSET.
5576
5577 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5578
5579         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5580         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5581         nat/ppc-linux.c.
5582         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5583         ppc_linux_target_wordsize with tid.
5584         (ppc_linux_nat_target::read_description): Call ppc_linux_target
5585         wordsize with tid.
5586         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5587         (ppc64_64bit_inferior_p): Add static and inline specifiers.
5588         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5589         tid parameter. Remove static specifier.
5590         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5591         (ppc_linux_target_wordsize): New declaration.
5592
5593 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
5594
5595         * arch/ppc-linux-common.c: New file.
5596         * arch/ppc-linux-common.h: New file.
5597         * arch/ppc-linux-tdesc.h: New file.
5598         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5599         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5600         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5601         arch/ppc-linux-tdesc.h.
5602         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5603         arch/ppc-linux-tdesc.h.
5604         (ppc_linux_nat_target::read_description): Remove target
5605         description matching code. Fill a ppc_linux_features struct and
5606         call ppc_linux_match_description with it. Move comment about ISA
5607         2.05 to ppc-linux-common.c.
5608         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5609         arch/ppc-linux-tdesc.h.
5610         (ppc_linux_core_read_description): Remove target description
5611         matching code. Fill a ppc_linux_features struct and call
5612         ppc_linux_match_description with it.
5613         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5614         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5615         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5616         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5617         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5618         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5619         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5620         (tdesc_powerpc_e500l): Remove.
5621
5622 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
5623
5624         * ada-lang.c (catch_assert_command): Pass empty string instead
5625         of NULL for excep_string argument.
5626
5627 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
5628
5629         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5630         the width of the requested register exceeds the width of the
5631         `ptrace' data type.
5632
5633 2018-05-21  Tom Tromey  <tom@tromey.com>
5634
5635         * printcmd.c (output_command): Remove.
5636         (output_command_const): Rename to output_command.
5637         * valprint.h (output_command): Rename from output_command_const.
5638         * tracepoint.c (trace_dump_actions): Call output_command.
5639
5640 2018-05-21  Tom Tromey  <tom@tromey.com>
5641
5642         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5643         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5644         * ada-lang.h (create_ada_exception_catchpoint): Update.
5645         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5646         std::string.
5647         (create_excep_cond_exprs, ~ada_catchpoint)
5648         (should_stop_exception, print_one_exception)
5649         (print_mention_exception, print_recreate_exception): Update.
5650         (ada_get_next_arg): Remove.
5651         (catch_ada_exception_command_split): Use std::string.  Change type
5652         of "excep_string", "cond_string".
5653         (catch_ada_exception_command): Update.
5654         (create_ada_exception_catchpoint): Change type of excep_string.
5655         (ada_exception_sal): Remove excep_string parameter.
5656         (~ada_catchpoint): Remove.
5657
5658 2018-05-21  Tom Tromey  <tom@tromey.com>
5659
5660         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5661         cleanup.
5662
5663 2018-05-21  Tom Tromey  <tom@tromey.com>
5664
5665         * ada-lang.c (ada_exception_message_1, ada_exception_message):
5666         Return unique_xmalloc_ptr.
5667         (print_it_exception): Update.
5668
5669 2018-05-21  Tom Tromey  <tom@tromey.com>
5670
5671         * tracepoint.c (trace_dump_actions): Use std::string.
5672
5673 2018-05-21  Tom Tromey  <tom@tromey.com>
5674
5675         * symfile.c (reread_symbols): Use std::string for original_name.
5676
5677 2018-05-21  Tom Tromey  <tom@tromey.com>
5678
5679         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5680         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
5681         constructor.
5682
5683 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
5684
5685         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5686         instance to...
5687         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5688         * objfiles.c (get_objfile_bfd_data): Allocate
5689         objfile_per_bfd_storage with obstack_new when allocating on
5690         obstack.
5691
5692 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5693
5694         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5695         OBSTACK_ZALLOC.
5696         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5697         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5698         * mdebugread.c (mdebug_build_psymtabs): Likewise.
5699         (add_pending): Likewise.
5700         (parse_symbol): Likewise.
5701         (parse_partial_symbols): Likewise.
5702         (psymtab_to_symtab_1): Likewise.
5703         (new_psymtab): Likewise.
5704         (elfmdebug_build_psymtabs): Likewise.
5705         * minsyms.c (terminate_minimal_symbol_table): Likewise.
5706         * objfiles.c (get_objfile_bfd_data): Likewise.
5707         (objfile_register_static_link): Likewise.
5708         * psymtab.c (allocate_psymtab): Likewise.
5709         * stabsread.c (read_member_functions): Likewise.
5710         * xcoffread.c (xcoff_end_psymtab): Likewise.
5711
5712 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
5713
5714         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5715         compiler supports std::is_trivially_constructible.
5716         * common/poison.h: Include obstack.h.
5717         (IsMallocable): Define to is_trivially_constructible if the
5718         compiler supports it, define to true_type otherwise.
5719         (xobnew): New.
5720         (XOBNEW): Redefine.
5721         (xobnewvec): New.
5722         (XOBNEWVEC): Redefine.
5723         * gdb_obstack.h (obstack_zalloc): New.
5724         (OBSTACK_ZALLOC): Redefine.
5725         (obstack_calloc): New.
5726         (OBSTACK_CALLOC): Redefine.
5727         (obstack_new): New.
5728         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5729         (gdbarch_obstack): New declaration in gdbarch.h, definition in
5730         gdbarch.c.
5731         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5732         obstack_calloc/obstack_zalloc.
5733         (gdbarch_obstack_zalloc): Remove.
5734         * target-descriptions.c (tdesc_data_init): Use obstack_new.
5735
5736 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5737
5738         * stack.c (backtrace_command_1): Remove useless variable int i.
5739
5740 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5741
5742         * stack.c (print_frame_info): Fix comment.
5743
5744 2018-05-18  Tom Tromey  <tom@tromey.com>
5745
5746         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5747         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5748         (~dwarf2_per_objfile): Update
5749         (dwarf2_get_dwz_file): Use new.
5750         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5751         unique_ptr.
5752
5753 2018-05-18  Tom Tromey  <tom@tromey.com>
5754
5755         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5756         unique_ptr.
5757         * dwarf2read.c (struct dwp_file): Add constructor and
5758         initializers.
5759         (open_and_init_dwp_file): Return a unique_ptr.
5760         (dwarf2_per_objfile, create_dwp_hash_table)
5761         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5762         (lookup_dwo_unit_in_dwp): Update.
5763         (open_and_init_dwp_file, get_dwp_file): Update.
5764
5765 2018-05-18  Tom Tromey  <tom@tromey.com>
5766
5767         * dwarf2read.c (dwarf2_per_objfile): Update.
5768         (struct mapped_index): Add initializers.
5769         (dwarf2_read_index): Use new.
5770         (dw2_symtab_iter_init): Update.
5771         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
5772         unique_ptr.
5773
5774 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5775
5776         * dwarf2read.c (mapped_index) <total_size>: Remove.
5777
5778 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
5779
5780         * unittests/format_pieces-selftests.c (test_format_specifier):
5781         Add ARI comments.
5782
5783 2018-05-18  Tom Tromey  <tom@tromey.com>
5784
5785         * c-typeprint.c (maybe_print_hole): New function.
5786         (c_print_type_struct_field_offset): Update.
5787         (c_type_print_base_struct_union): Call maybe_print_hole.
5788
5789 2018-05-17  Keith Seitz  <keiths@redhat.com>
5790
5791         * breakpoint.c (build_bpstat_chain): New function, moved from
5792         bpstat_stop_status.
5793         (bpstat_stop_status): Add optional parameter, `stop_chain'.
5794         If no stop chain is passed, call build_bpstat_chain to build it.
5795         * breakpoint.h (build_bpstat_chain): Declare.
5796         (bpstat_stop_status): Move documentation here from breakpoint.c.
5797         * infrun.c (handle_signal_stop): Before eliding inlined frames,
5798         build the stop chain and pass it to skip_inline_frames.
5799         Pass this stop chain to bpstat_stop_status.
5800         * inline-frame.c: Include breakpoint.h.
5801         (stopped_by_user_bp_inline_frame): New function.
5802         (skip_inline_frames): Add parameter `stop_chain'.
5803         Move documention to inline-frame.h.
5804         If non-NULL, use stopped_by_user_bp_inline_frame to determine
5805         whether the frame should be elided.
5806         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
5807         Add moved documentation and update for new parameter.
5808
5809 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5810
5811         PR cli/14975
5812         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5813         unittests/format_pieces-selftests.c.
5814         * common/format.h (format_piece) <operator==>: New.
5815         (format_pieces) <operator[]>: Remove.
5816         * common/format.c (format_pieces::format_pieces): Handle \e.
5817         * unittests/format_pieces-selftests.c: New.
5818
5819 2018-05-17  Tom Tromey  <tom@tromey.com>
5820
5821         PR symtab/23010:
5822         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
5823         (dw2_instantiate_symtab): Add skip_partial parameter.
5824         (dw2_find_last_source_symtab, dw2_map_expand_apply)
5825         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
5826         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
5827         (dw2_expand_symtabs_matching_one)
5828         (dw2_find_pc_sect_compunit_symtab)
5829         (dw2_debug_names_lookup_symbol)
5830         (dw2_debug_names_expand_symtabs_for_function): Update.
5831         (init_cutu_and_read_dies): Add skip_partial parameter.
5832         (process_psymtab_comp_unit, build_type_psymtabs_1)
5833         (process_skeletonless_type_unit, load_partial_comp_unit)
5834         (psymtab_to_symtab_1): Update.
5835         (load_full_comp_unit): Add skip_partial parameter.
5836         (process_imported_unit_die, dwarf2_read_addr_index)
5837         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5838         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5839         (read_signatured_type): Update.
5840
5841 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
5842
5843         * value.c (release_value): Remove unused variable.
5844         (record_latest_value): Likewise.
5845         (access_value_history): Likewise.
5846         (preserve_values): Likewise.
5847
5848 2018-05-17  Tom Tromey  <tom@tromey.com>
5849
5850         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5851         Initialize.
5852
5853 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
5854
5855         PR gdb/22286
5856         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5857         Also handle registers whose width is not a multiple of
5858         PTRACE_TYPE_RET.
5859         (linux_nat_trad_target::store_register): Likewise.
5860
5861 2018-05-16  Tom Tromey  <tom@tromey.com>
5862
5863         * gdbcore.h (core_bfd): Redefine.
5864         * corelow.c (core_target::close): Update.
5865         (core_target_open): Update.
5866         * progspace.h (struct program_space) <cbfd>: Now a
5867         gdb_bfd_ref_ptr.
5868
5869 2018-05-16  Tom Tromey  <tom@tromey.com>
5870
5871         PR cli/19551:
5872         * symfile-add-flags.h (enum symfile_add_flags)
5873         <SYMFILE_NOT_FILENAME>: New constant.
5874         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
5875         objfile name from BFD.
5876         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5877         * minidebug.c (find_separate_debug_file_in_section): Put
5878         ".gnu_debugdata" into BFD's file name.
5879
5880 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
5881
5882         * regcache.c (regcache_read_ftype, regcache_write_ftype):
5883         Remove.
5884
5885 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
5886
5887         PR binutils/21446
5888         * aarch64-tdep.c (aarch64_analyze_prologue,
5889         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5890         Indicate not interested in errors.
5891
5892 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5893
5894         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5895         Supply the MIPS_ZERO_REGNUM register.
5896
5897 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
5898
5899         * mips-tdep.c (mask_address_var): Make variable static.
5900
5901 2018-05-14  Tom Tromey  <tom@tromey.com>
5902
5903         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5904
5905 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
5906
5907         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5908         FXSAVE_ADDR for the mxcsr register.
5909
5910 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
5911
5912         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5913
5914 2018-05-11  Pedro Alves  <palves@redhat.com>
5915
5916         * corelow.c (core_target) <core_target>: No longer inline.
5917         Initialize m_core_gdbarch, m_core_vec and build the section table
5918         here.
5919         <~core_target>: New.
5920         <core_gdbarch, get_core_register_section>: New methods.
5921         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5922         factored out from ...
5923         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5924         (core_ops): Delete.
5925         (sniff_core_bfd): Add gdbarch parameter.
5926         (core_close): Delete, merged into ...
5927         (core_target::close): ... here.  Delete self.
5928         (core_close_cleanup): Delete.
5929         (core_target_open): Allocate a core_target on the heap.  Use a
5930         unique_ptr instead of a cleanup.  Bits moved into the core_target
5931         ctor.  Adjust to use core_target methods instead of globals.
5932         (get_core_register_section): Rename to ...
5933         (core_target::get_core_register_section): ... this and adjust.
5934         (struct get_core_registers_cb_data): New.
5935         (get_core_registers_cb): Use it.  Use bool.
5936         (core_target::fetch_registers, core_target::files_info)
5937         (core_target::xfer_partial, core_target::read_description)
5938         (core_target::pid_to, core_target::thread_name): Adjust to
5939         reference class fields instead of globals.
5940         * target.h (struct target_ops_deleter, target_ops_up): New.
5941
5942 2018-05-11  Pedro Alves  <palves@redhat.com>
5943
5944         * corefile.c (core_file_command): Move to corelow.c.
5945         * corelow.c (the_core_target): Delete.
5946         (core_file_command): Moved from corefile.c.  Check exec_bfd
5947         instead of the_core_target.  Use target_detach instead of calling
5948         into the_core_target directly.
5949         (maybe_say_no_core_file_now): New.
5950         (core_target::detach): Use it.
5951         (_initialize_corelow): Remove references to the_core_target.
5952         * gdbcore.h (the_core_target): Delete.
5953
5954 2018-05-11  Tom Tromey  <tromey@redhat.com>
5955             Pedro Alves  <palves@redhat.com>
5956
5957         * corefile.c (core_bfd): Remove.
5958         * gdbcore.h (core_bfd): Now a macro.
5959         * progspace.h (struct program_space) <cbfd>: New field.
5960
5961 2018-05-11  Tom Tromey  <tom@tromey.com>
5962
5963         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5964         gdb::def_vector.
5965
5966 2018-05-10  Tom Tromey  <tom@tromey.com>
5967
5968         * configure: Rebuild.
5969         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5970
5971 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
5972
5973         PR server/23158:
5974         * regformats/regdat.sh: Adjust script, following the addition
5975         of the new expedite_regs parameter to init_target_desc.
5976
5977 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
5978     
5979         PR gdb/23127
5980         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5981         set_gdbarch_significant_addr_bit.
5982         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5983         set_gdbarch_significant_addr_bit.
5984         * utils.c (address_significant): Update to sign extend addr.
5985
5986 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
5987
5988         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5989         (xtensa_linux_init_abi): Limit tdep->num_regs by
5990         tdep->num_nopriv_regs.
5991         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5992         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5993         not initialized.
5994
5995 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
5996
5997         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5998
5999 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
6000
6001         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6002         (I387_MXCSR_INIT_VAL): New constant.
6003         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6004         buffer if it was supplied by the inferior.
6005         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6006         (i387_xsave_get_clear_bv): New function.
6007         (i387_supply_xsave): Only read x87 control registers from the
6008         xsave buffer if the feature is enabled, and the state will have
6009         been written, otherwise, provide a suitable default.
6010         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6011         including x87 control registers.  Update control registers if they
6012         have changed from the default value, and mark features as enabled
6013         as required.
6014         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6015
6016 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
6017
6018         * spu-tdep.c (info_spu_event_command): Fix output formatting.
6019
6020 2018-05-07  Tom Tromey  <tom@tromey.com>
6021
6022         * configure: Rebuild.
6023         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6024
6025 2018-05-07  Tom Tromey  <tom@tromey.com>
6026
6027         PR tdep/20362:
6028         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6029         bit.  Use correct value for VDIV.
6030
6031 2018-05-04  Tom Tromey  <tom@tromey.com>
6032
6033         * configure: Rebuild.
6034         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6035
6036 2018-05-04  Tom Tromey  <tom@tromey.com>
6037
6038         * linux-record.c (record_linux_system_call) <case
6039         RECORD_SYS_RECVFROM>: Add "break".
6040
6041 2018-05-04  Tom Tromey  <tom@tromey.com>
6042
6043         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6044         Add missing "break".
6045         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6046         Add missing "break".
6047
6048 2018-05-04  Tom Tromey  <tom@tromey.com>
6049
6050         * rs6000-tdep.c (ppc_process_record_op4)
6051         (ppc_process_record_op63): Add fall-through comment.
6052
6053 2018-05-04  Tom Tromey  <tom@tromey.com>
6054
6055         * i386-tdep.c (i386_process_record): Add fall-through comment.
6056
6057 2018-05-04  Tom Tromey  <tom@tromey.com>
6058
6059         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6060         comment.
6061
6062 2018-05-04  Tom Tromey  <tom@tromey.com>
6063
6064         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6065         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6066         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6067         comment.
6068         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6069         comment.
6070         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6071         comment.
6072
6073 2018-05-04  Tom Tromey  <tom@tromey.com>
6074
6075         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6076
6077 2018-05-04  Tom Tromey  <tom@tromey.com>
6078
6079         * s390-tdep.c (s390_process_record): Fix fall-through comments.
6080         * xcoffread.c (scan_xcoff_symtab): Move comment later.
6081         * symfile.c (section_is_mapped): Fix fall-through comment.
6082         * stabsread.c (define_symbol, read_member_functions): Fix
6083         fall-through comment.
6084         * s390-linux-tdep.c (s390_process_record): Fix fall-through
6085         comment.
6086         * remote.c (remote_wait_as): Fix fall-through comment.
6087         * p-exp.y (yylex): Fix fall-through comment.
6088         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6089         comment.
6090         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6091         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6092         * jv-exp.y (yylex): Fix fall-through comment.
6093         * go-exp.y (lex_one_token): Fix fall-through comment.
6094         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6095         fall-through comment.
6096         * f-exp.y (yylex): Fix fall-through comment.
6097         * dwarf2read.c (process_die): Fix fall-through comments.
6098         * dbxread.c (process_one_symbol): Fix fall-through comment.
6099         * d-exp.y (lex_one_token): Fix fall-through comment.
6100         * cp-name-parser.y (yylex): Fix fall-through comment.
6101         * coffread.c (coff_symtab_read): Fix fall-through comment.
6102         * c-exp.y (lex_one_token): Fix fall-through comment.
6103         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6104         comment.
6105         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6106         comment.
6107
6108 2018-05-04  Tom Tromey  <tom@tromey.com>
6109
6110         PR python/22730:
6111         * NEWS: Mention gdb.execute change.
6112         * gdbcmd.h (execute_control_command): Don't declare.
6113         * python/python.c (execute_gdb_command): Use read_command_lines_1,
6114         execute_control_commands, execute_control_commands_to_string.
6115         * cli/cli-script.h (execute_control_commands)
6116         (execute_control_commands_to_string): Declare.
6117         (execute_control_command): Add from_tty parameter.
6118         * cli/cli-script.c (execute_control_commands)
6119         (execute_control_commands_to_string): New functions.
6120         (execute_user_command): Use execute_control_commands.
6121         (execute_control_command_1): Add "from_tty" parameter.  Update.
6122         (execute_control_command): Likewise.
6123
6124 2018-05-04  Tom Tromey  <tom@tromey.com>
6125
6126         PR python/22731:
6127         * NEWS: Mention that breakpoint commands are writable.
6128         * python/py-breakpoint.c (bppy_set_commands): New function.
6129         (breakpoint_object_getset) <"commands">: Use it.
6130
6131 2018-05-04  Tom Tromey  <tom@tromey.com>
6132
6133         * tracepoint.c (actions_command): Update.
6134         * mi/mi-cmd-break.c (mi_command_line_array)
6135         (mi_command_line_array_cnt, mi_command_line_array_ptr)
6136         (mi_read_next_line): Remove.
6137         (mi_cmd_break_commands): Update.
6138         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6139         function_view.
6140         * cli/cli-script.c (get_command_line): Update.
6141         (process_next_line): Use function_view.  Constify.
6142         (recurse_read_control_structure, read_command_lines)
6143         (read_command_lines_1): Change argument types to function_view.
6144         (do_define_command, document_command): Update.
6145         * breakpoint.h (check_tracepoint_command): Don't declare.
6146         * breakpoint.c (check_tracepoint_command): Remove.
6147         (commands_command_1, create_tracepoint_from_upload): Update.
6148
6149 2018-05-04  Tom Tromey  <tom@tromey.com>
6150
6151         PR gdb/11750:
6152         * cli/cli-script.h (enum command_control_type) <define_control>:
6153         New constant.
6154         * cli/cli-script.c (multi_line_command_p): Handle define_control.
6155         (build_command_line, execute_control_command_1)
6156         (process_next_line): Likewise.
6157         (do_define_command): New function, extracted from define_command.
6158         (define_command): Use it.
6159
6160 2018-05-04  Tom Tromey  <tom@tromey.com>
6161
6162         * tracepoint.c (actions_command): Update.
6163         * cli/cli-script.h (read_command_lines): Update.
6164         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6165         (MAX_TMPBUF): Remove define.
6166         (define_command): Use string_printf.
6167         (document_command): Likewise.
6168         * breakpoint.c (commands_command_1): Update.
6169
6170 2018-05-04  Tom Tromey  <tom@tromey.com>
6171
6172         * top.c (execute_command): Update.
6173         * cli/cli-script.h (print_command_lines): Now varargs.
6174         * cli/cli-script.c (print_command_lines): Now varargs.
6175         (execute_control_command_1) <case while_control, case if_control>:
6176         Update.
6177
6178 2018-05-04  Tom Tromey  <tom@tromey.com>
6179
6180         * tracepoint.c (all_tracepoint_actions): Rename from
6181         all_tracepoint_actions_and_cleanup.  Change return type.
6182         (actions_command, encode_actions_1, encode_actions)
6183         (trace_dump_actions, tdump_command): Update.
6184         * remote.c (remote_download_command_source): Update.
6185         * python/python.c (gdbpy_eval_from_control_command)
6186         (python_command, python_interactive_command): Update.
6187         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6188         * guile/guile.c (guile_command)
6189         (gdbscm_eval_from_control_command, guile_command): Update.
6190         * compile/compile.c (compile_code_command)
6191         (compile_print_command, compile_to_object): Update.
6192         * cli/cli-script.h (struct command_lines_deleter): New.
6193         (counted_command_line): New typedef.
6194         (struct command_line): Add constructor, destructor.
6195         <body_list>: Remove.
6196         <body_list_0, body_list_1>: New members.
6197         (command_line_up): Remove typedef.
6198         (read_command_lines, read_command_lines_1, get_command_line):
6199         Update.
6200         (copy_command_lines): Don't declare.
6201         * cli/cli-script.c (build_command_line): Use "new".
6202         (get_command_line): Return counted_command_line.
6203         (print_command_lines, execute_user_command)
6204         (execute_control_command_1, while_command, if_command): Update.
6205         (realloc_body_list): Remove.
6206         (process_next_line, recurse_read_control_structure): Update.
6207         (read_command_lines, read_command_lines_1): Return counted_command_line.
6208         (free_command_lines): Use "delete".
6209         (copy_command_lines): Remove.
6210         (define_command, document_command, show_user_1): Update.
6211         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6212         a counted_command_line.
6213         * breakpoint.h (counted_command_line): Remove typedef.
6214         (breakpoint_set_commands): Update.
6215         * breakpoint.c (check_no_tracepoint_commands)
6216         (validate_commands_for_breakpoint): Update.
6217         (breakpoint_set_commands): Change commands to be a
6218         counted_command_line.
6219         (commands_command_1, update_dprintf_command_list)
6220         (create_tracepoint_from_upload): Update.
6221
6222 2018-05-04  Tom Tromey  <tom@tromey.com>
6223
6224         * cli/cli-decode.h (cmd_list_element): New constructor.
6225         (~cmd_list_element): New destructor.
6226         (struct cmd_list_element): Add initializers.
6227         * cli/cli-decode.c (do_add_cmd): Use "new".
6228         (delete_cmd): Use "delete".
6229
6230 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
6231             Pedro Alves <palves@redhat.com>
6232
6233         PR breakpoints/19806 and support for PR external/20207.
6234         * NEWS: Mention Aarch64 watchpoint improvements.
6235         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6236         watchpoints and PR external/20207 watchpoints.
6237         * nat/aarch64-linux-hw-point.c
6238         (kernel_supports_any_contiguous_range): New.
6239         (aarch64_watchpoint_offset): New.
6240         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6241         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6242         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6243         (aarch64_align_watchpoint): New parameters aligned_offset_p and
6244         next_addr_orig_p.  Support PR external/20207 watchpoints.
6245         (aarch64_downgrade_regs): New.
6246         (aarch64_dr_state_insert_one_point): New parameters offset and
6247         addr_orig.
6248         (aarch64_dr_state_remove_one_point): Likewise.
6249         (aarch64_handle_breakpoint): Update caller.
6250         (aarch64_handle_aligned_watchpoint): Likewise.
6251         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6252         aligned_offset.
6253         (aarch64_linux_set_debug_regs): Remove const from state.  Call
6254         aarch64_downgrade_regs.
6255         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6256         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6257         (DR_CONTROL_MASK): ... this.
6258         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6259         (unsigned int aarch64_watchpoint_offset): New prototype.
6260         (aarch64_linux_set_debug_regs): Remove const from state.
6261         * utils.c (align_up, align_down): Move to ...
6262         * common/common-utils.c (align_up, align_down): ... here.
6263         * utils.h (align_up, align_down): Move to ...
6264         * common/common-utils.h (align_up, align_down): ... here.
6265
6266 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
6267
6268         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6269         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6270         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6271         Re-implement to match the ABI as summarized in GCC's
6272         gcc/config/sparc/sparc.c.  All callers updated.
6273         (sparc32_store_arguments): Remove assertion.
6274
6275 2018-05-04  Tom Tromey  <tom@tromey.com>
6276
6277         * printcmd.c: Don't include tui.h.
6278         (decode_format): Use skip_spaces.
6279
6280 2018-05-04  Tom Tromey  <tom@tromey.com>
6281
6282         PR gdb/22619:
6283         * printcmd.c (last_count): New global.
6284         (x_command): Use saved count when repeating.
6285
6286 2018-05-04  Tom Tromey  <tom@tromey.com>
6287
6288         * nto-procfs.c (do_closedir_cleanup): Remove.
6289         (procfs_pidlist): Use gdb_dir_up.
6290         * procfs.c (do_closedir_cleanup): Remove.
6291         (proc_update_threads): Use gdb_dir_up.
6292         * common/filestuff.h (struct gdb_dir_deleter): New.
6293         (gdb_dir_up): New typedef.
6294
6295 2018-05-04  Tom Tromey  <tom@tromey.com>
6296
6297         * ada-lang.c (print_mention_exception): Use std::string.
6298
6299 2018-05-04  Tom Tromey  <tom@tromey.com>
6300
6301         * ada-lang.c (create_excep_cond_exprs): Update.
6302         (ada_exception_catchpoint_cond_string): Use std::string.
6303
6304 2018-05-04  Tom Tromey  <tom@tromey.com>
6305
6306         * ada-lang.c (xget_renaming_scope): Return std::string.
6307         (old_renaming_is_invisible): Update.
6308
6309 2018-05-04  Tom Tromey  <tom@tromey.com>
6310
6311         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6312         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6313
6314 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
6315
6316         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6317
6318 2018-05-04  Tom Tromey  <tom@tromey.com>
6319
6320         * remote.c (remote_query_supported_append): Change type.
6321         (remote_check_symbols): Update.
6322
6323 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
6324
6325         PR gdb/11420
6326         * configure.ac: Prepend libpython.
6327         * python/python-config.py: Likewise.
6328         * configure: Regenerate.
6329
6330 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6331
6332         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6333
6334 2018-05-03  Pedro Alves  <palves@redhat.com>
6335
6336         * s390-linux-nat.c
6337         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6338         override.  Write 'true' instead of '1'.
6339         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6340         declaration.
6341
6342 2018-05-02  Pedro Alves  <palves@redhat.com>
6343
6344         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6345         add_inf_child_target.
6346         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6347         add_inf_child_target.
6348         * aix-thread.c (aix_thread_target_info): New.
6349         (aix_thread_target) <shortname, longname, doc>: Delete.
6350         <info>: New.
6351         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6352         add_inf_child_target.
6353         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6354         add_inf_child_target.
6355         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6356         add_inf_child_target.
6357         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6358         add_inf_child_target.
6359         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6360         add_inf_child_target.
6361         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6362         add_inf_child_target.
6363         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6364         add_inf_child_target.
6365         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6366         add_inf_child_target.
6367         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6368         add_inf_child_target.
6369         * bfd-target.c (target_bfd_target_info): New.
6370         (target_bfd) <shortname, longname, doc>: Delete.
6371         <info>: New.
6372         * bsd-kvm.c (bsd_kvm_target_info): New.
6373         (bsd_kvm_target) <shortname, longname, doc>: Delete.
6374         <info>: New.
6375         (bsd_kvm_target::open): Rename to ...
6376         (bsd_kvm_target_open): ... this.  Adjust.
6377         * bsd-uthread.c (bsd_uthread_target_info): New.
6378         (bsd_uthread_target) <shortname, longname, doc>: Delete.
6379         <info>: New.
6380         * corefile.c (core_file_command): Adjust.
6381         * corelow.c (core_target_info): New.
6382         (core_target) <shortname, longname, doc>: Delete.
6383         <info>: New.
6384         (core_target::open): Rename to ...
6385         (core_target_open): ... this.  Adjust.
6386         * ctf.c (ctf_target_info): New.
6387         (ctf_target) <shortname, longname, doc>: Delete.
6388         <info>: New.
6389         (ctf_target::open): Rename to ...
6390         (ctf_target_open): ... this.
6391         (_initialize_ctf): Adjust.
6392         * exec.c (exec_target_info): New.
6393         (exec_target) <shortname, longname, doc>: Delete.
6394         <info>: New.
6395         (exec_target::open): Rename to ...
6396         (exec_target_open): ... this.
6397         * gdbcore.h (core_target_open): Declare.
6398         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6399         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6400         add_inf_child_target.
6401         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6402         add_inf_child_target.
6403         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6404         add_inf_child_target.
6405         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6406         add_inf_child_target.
6407         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6408         add_inf_child_target.
6409         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6410         add_inf_child_target.
6411         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6412         add_inf_child_target.
6413         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6414         add_inf_child_target.
6415         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6416         add_inf_child_target.
6417         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6418         add_inf_child_target.
6419         * inf-child.c (inf_child_target_info): New.
6420         (inf_child_target::info): New.
6421         (inf_child_open_target): Remove 'target' parameter.  Use
6422         get_native_target instead.
6423         (inf_child_target::open): Delete.
6424         (add_inf_child_target): New.
6425         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6426         Delete.
6427         <info>: New.
6428         (add_inf_child_target): Declare.
6429         (inf_child_open_target): Declare.
6430         * linux-thread-db.c (thread_db_target_info): New.
6431         (thread_db_target) <shortname, longname, doc>: Delete.
6432         <info>: New.
6433         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6434         add_inf_child_target.
6435         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6436         add_inf_child_target.
6437         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6438         add_inf_child_target.
6439         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6440         add_inf_child_target.
6441         * make-target-delegates (print_class): Adjust.
6442         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6443         add_inf_child_target.
6444         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6445         add_inf_child_target.
6446         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6447         add_inf_child_target.
6448         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6449         add_inf_child_target.
6450         * nto-procfs.c (nto_native_target_info): New.
6451         (nto_procfs_target_native) <shortname, longname, doc>:
6452         Delete.
6453         <info>: New.
6454         (nto_procfs_target_info): New.
6455         (nto_procfs_target_procfs) <shortname, longname, doc>:
6456         Delete.
6457         <info>: New.
6458         (init_procfs_targets): Adjust.
6459         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6460         add_inf_child_target.
6461         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6462         add_inf_child_target.
6463         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6464         add_inf_child_target.
6465         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6466         add_inf_child_target.
6467         * ravenscar-thread.c (ravenscar_target_info): New.
6468         (ravenscar_thread_target) <shortname, longname, doc>:
6469         Delete.
6470         <info>: New.
6471         * record-btrace.c (record_btrace_target_info):
6472         (record_btrace_target) <shortname, longname, doc>: Delete.
6473         <info>: New.
6474         (record_btrace_target::open): Rename to ...
6475         (record_btrace_target_open): ... this.  Adjust.
6476         * record-full.c (record_longname, record_doc): New.
6477         (record_full_base_target) <shortname, longname, doc>: Delete.
6478         <info>: New.
6479         (record_full_target_info): New.
6480         (record_full_target): <shortname>: Delete.
6481         <info>: New.
6482         (record_full_core_open_1, record_full_open_1): Update comments.
6483         (record_full_base_target::open): Rename to ...
6484         (record_full_open): ... this.
6485         (cmd_record_full_restore): Update.
6486         (_initialize_record_full): Update.
6487         * remote-sim.c (remote_sim_target_info): New.
6488         (gdbsim_target) <shortname, longname, doc>: Delete.
6489         <info>: New.
6490         (gdbsim_target::open): Rename to ...
6491         (gdbsim_target_open): ... this.
6492         (_initialize_remote_sim): Adjust.
6493         * remote.c (remote_doc): New.
6494         (remote_target_info): New.
6495         (remote_target) <shortname, longname, doc>: Delete.
6496         <info>: New.
6497         (extended_remote_target_info): New.
6498         (extended_remote_target) <shortname, longname, doc>: Delete.
6499         <info>: New.
6500         (remote_target::open_1): Make static.  Adjust.
6501         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6502         * s390-linux-nat.c (_initialize_s390_nat): Use
6503         add_inf_child_target.
6504         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6505         add_inf_child_target.
6506         * sol-thread.c (thread_db_target_info): New.
6507         (sol_thread_target) <shortname, longname, doc>: Delete.
6508         <info>: New.
6509         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6510         add_inf_child_target.
6511         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6512         add_inf_child_target.
6513         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6514         add_inf_child_target.
6515         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6516         add_inf_child_target.
6517         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6518         add_inf_child_target.
6519         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6520         add_inf_child_target.
6521         * spu-linux-nat.c (_initialize_spu_nat): Use
6522         add_inf_child_target.
6523         * spu-multiarch.c (spu_multiarch_target_info): New.
6524         (spu_multiarch_target) <shortname, longname, doc>: Delete.
6525         <info>: New.
6526         * target-delegates.c: Regenerate.
6527         * target.c: Include <unordered_map>.
6528         (target_ops_p): Delete.
6529         (DEF_VEC_P(target_ops_p)): Delete.
6530         (target_factories): New.
6531         (test_target_info): New.
6532         (test_target_ops::info): New.
6533         (open_target): Adjust to use target_factories.
6534         (add_target_with_completer): Rename to ...
6535         (add_target): ... this.  Change prototype.  Register target_info
6536         and open callback in target_factories.  Register target_info in
6537         command context instead of target_ops.
6538         (add_target): Delete old implementation.
6539         (add_deprecated_target_alias): Change prototype.  Adjust.
6540         (the_native_target): New.
6541         (set_native_target, get_native_target): New.
6542         (find_default_run_target): Use the_native_target.
6543         (find_attach_target, find_run_target): Simplify.
6544         (target_ops::open): Delete.
6545         (dummy_target_info): New.
6546         (dummy_target::shortname, dummy_target::longname)
6547         (dummy_target::doc): Delete.
6548         (dummy_target::info): New.
6549         (debug_target::shortname, debug_target::longname)
6550         (debug_target::doc): Delete.
6551         (debug_target::info): New.
6552         * target.h (struct target_info): New.
6553         (target_ops::~target_ops): Add comment.
6554         (target_ops::info): New.
6555         (target_ops::shortname, target_ops::longname, target_ops::doc): No
6556         longer virtual.  Implement in terms of target_info.
6557         (set_native_target, get_native_target): Declare.
6558         (target_open_ftype): New.
6559         (add_target, add_target_with_completer)
6560         (add_deprecated_target_alias): Change prototype.
6561         (test_target) <shortname, longname, doc>: Delete.
6562         <info>: New.
6563         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6564         add_inf_child_target.
6565         * tracefile-tfile.c (tfile_target_info): New.
6566         (tfile_target) <shortname, longname, doc>: Delete.
6567         <info>: New.
6568         (tfile_target::open): Rename to ...
6569         (tfile_target_open): ... this.
6570         (_initialize_tracefile_tfile): Adjust.
6571         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6572         add_inf_child_target.
6573         * windows-nat.c (_initialize_windows_nat): Use
6574         add_inf_child_target.
6575         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6576         add_inf_child_target.
6577
6578 2018-05-02  Pedro Alves  <palves@redhat.com>
6579
6580         * linux-nat.h (linux_nat_target) <low_new_thread,
6581         low_delete_thread, low_new_fork, low_forget_process,
6582         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6583         New virtual methods.
6584         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6585         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6586         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6587         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6588         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6589         Delete.
6590         * linux-fork.c (delete_fork): Adjust to call low method.
6591         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6592         (linux_nat_new_fork, linux_nat_forget_process_hook)
6593         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6594         (linux_nat_status_is_event):
6595         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6596         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6597         to call low method.
6598         (sigtrap_is_event): Rename to ...
6599         (linux_nat_target::low_status_is_event): ... this.
6600         (linux_nat_set_status_is_event): Delete.
6601         (save_stop_reason, linux_nat_wait_1)
6602         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6603         low methods.
6604         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6605         (linux_nat_set_new_fork, linux_nat_set_forget_process)
6606         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6607         (linux_nat_set_prepare_to_resume): Delete.
6608         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6609         low virtual methods.
6610         * amd64-linux-nat.c: Likewise.
6611         * arm-linux-nat.c: Likewise.
6612         * i386-linux-nat.c: Likewise.
6613         * ia64-linux-nat.c: Likewise.
6614         * mips-linux-nat.c: Likewise.
6615         * ppc-linux-nat.c: Likewise.
6616         * s390-linux-nat.c: Likewise.
6617         * sparc64-linux-nat.c: Likewise.
6618         * x86-linux-nat.c: Likewise.
6619         * x86-linux-nat.h: Include "nat/x86-linux.h".
6620         (x86_linux_nat_target) <low_new_fork, low_forget_process,
6621         low_prepare_to_resume, low_new_thread, low_delete_thread>:
6622         Override methods.
6623
6624 2018-05-02  Pedro Alves  <palves@redhat.com>
6625
6626         * target.h (target_ops)
6627         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6628         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6629         stopped_by_watchpoint, have_continuable_watchpoint,
6630         stopped_data_address, watchpoint_addr_within_range,
6631         can_accel_watchpoint_condition, can_run, thread_alive,
6632         has_all_memory, has_memory, has_stack, has_registers,
6633         has_execution, can_async_p, is_async_p, supports_non_stop,
6634         always_non_stop_p, can_execute_reverse, supports_multi_process,
6635         supports_enable_disable_tracepoint,
6636         supports_disable_randomization, supports_string_tracing,
6637         supports_evaluation_of_breakpoint_conditions,
6638         can_run_breakpoint_commands, filesystem_is_local,
6639         can_download_tracepoint, get_trace_state_variable_value,
6640         set_trace_notes, get_tib_address, use_agent, can_use_agent,
6641         record_is_replaying, record_will_replay,
6642         augmented_libraries_svr4_read>: Adjust to return bool.
6643         * aarch64-linux-nat.c: All implementations adjusted.
6644         * aix-thread.c: All implementations adjusted.
6645         * arm-linux-nat.c: All implementations adjusted.
6646         * breakpoint.c: All implementations adjusted.
6647         * bsd-kvm.c: All implementations adjusted.
6648         * bsd-uthread.c: All implementations adjusted.
6649         * corelow.c: All implementations adjusted.
6650         * ctf.c: All implementations adjusted.
6651         * darwin-nat.c: All implementations adjusted.
6652         * darwin-nat.h: All implementations adjusted.
6653         * exec.c: All implementations adjusted.
6654         * fbsd-nat.c: All implementations adjusted.
6655         * fbsd-nat.h: All implementations adjusted.
6656         * gnu-nat.c: All implementations adjusted.
6657         * gnu-nat.h: All implementations adjusted.
6658         * go32-nat.c: All implementations adjusted.
6659         * ia64-linux-nat.c: All implementations adjusted.
6660         * inf-child.c: All implementations adjusted.
6661         * inf-child.h: All implementations adjusted.
6662         * inf-ptrace.c: All implementations adjusted.
6663         * inf-ptrace.h: All implementations adjusted.
6664         * linux-nat.c: All implementations adjusted.
6665         * linux-nat.h: All implementations adjusted.
6666         * mips-linux-nat.c: All implementations adjusted.
6667         * nto-procfs.c: All implementations adjusted.
6668         * ppc-linux-nat.c: All implementations adjusted.
6669         * procfs.c: All implementations adjusted.
6670         * ravenscar-thread.c: All implementations adjusted.
6671         * record-btrace.c: All implementations adjusted.
6672         * record-full.c: All implementations adjusted.
6673         * remote-sim.c: All implementations adjusted.
6674         * remote.c: All implementations adjusted.
6675         * s390-linux-nat.c: All implementations adjusted.
6676         * sol-thread.c: All implementations adjusted.
6677         * spu-multiarch.c: All implementations adjusted.
6678         * target-delegates.c: All implementations adjusted.
6679         * target.c: All implementations adjusted.
6680         * target.h: All implementations adjusted.
6681         * tracefile-tfile.c: All implementations adjusted.
6682         * tracefile.c: All implementations adjusted.
6683         * tracefile.h: All implementations adjusted.
6684         * windows-nat.c: All implementations adjusted.
6685         * x86-linux-nat.h: All implementations adjusted.
6686         * x86-nat.h: All implementations adjusted.
6687
6688 2018-05-02  Pedro Alves  <palves@redhat.com>
6689
6690         * make-target-delegates (scan_target_h): Don't trim lines here.
6691         Replace sequences of tabs and/or whitespace with a single
6692         whitespace.
6693         (top level, parsing methods): Trim each line before processing it
6694         here.
6695
6696 2018-05-02  Pedro Alves  <palves@redhat.com>
6697             John Baldwin  <jhb@freebsd.org>
6698
6699         * target.h (enum strata) <debug_stratum>: New.
6700         (struct target_ops) <all delegation methods>: Replace by C++
6701         virtual methods, and drop "to_" prefix.  All references updated
6702         throughout.
6703         <to_shortname, to_longname, to_doc, to_data,
6704         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6705         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6706         virtual methods.  All references updated throughout.
6707         <can_attach, supports_terminal_ours, can_create_inferior,
6708         get_thread_control_capabilities, attach_no_wait>: New
6709         virtual methods.
6710         <insert_breakpoint, remove_breakpoint>: Now
6711         TARGET_DEFAULT_NORETURN methods.
6712         <info_proc>: Now returns bool.
6713         <to_magic>: Delete.
6714         (OPS_MAGIC): Delete.
6715         (current_target): Delete.  All references replaced by references
6716         to ...
6717         (target_stack): ... this.  New.
6718         (target_shortname, target_longname): Adjust.
6719         (target_can_run): Now a function declaration.
6720         (default_child_has_all_memory, default_child_has_memory)
6721         (default_child_has_stack, default_child_has_registers)
6722         (default_child_has_execution): Remove target_ops parameter.
6723         (complete_target_initialization): Delete.
6724         (memory_breakpoint_target): New template class.
6725         (test_target_ops): Refactor as a C++ class with virtual methods.
6726         * make-target-delegates (NAME_PART): Tighten.
6727         (POINTER_PART, CP_SYMBOL): New.
6728         (SIMPLE_RETURN_PART): Reimplement.
6729         (VEC_RETURN_PART): Expect less.
6730         (RETURN_PART, VIRTUAL_PART): New.
6731         (METHOD): Adjust to C++ virtual methods.
6732         (scan_target_h): Remove reference to C99.
6733         (dname): Output "target_ops::" prefix.
6734         (write_function_header): Adjust to output a C++ class method.
6735         (write_declaration): New.
6736         (write_delegator): Adjust to output a C++ class method.
6737         (tdname): Output "dummy_target::" prefix.
6738         (write_tdefault, write_debugmethod): Adjust to output a C++ class
6739         method.
6740         (tdefault_names, debug_names): Delete.
6741         (return_types, tdefaults, styles, argtypes_array): New.
6742         (top level): All methods are delegators.
6743         (print_class): New.
6744         (top level): Print dummy_target and debug_target classes.
6745         * target-delegates.c: Regenerate.
6746         * target-debug.h (target_debug_print_enum_info_proc_what)
6747         (target_debug_print_thread_control_capabilities)
6748         (target_debug_print_thread_info_p): New.
6749         * target.c (dummy_target): Delete.
6750         (the_dummy_target, the_debug_target): New.
6751         (target_stack): Now extern.
6752         (set_targetdebug): Push/unpush debug target.
6753         (default_child_has_all_memory, default_child_has_memory)
6754         (default_child_has_stack, default_child_has_registers)
6755         (default_child_has_execution): Remove target_ops parameter.
6756         (complete_target_initialization): Delete.
6757         (add_target_with_completer): No longer call
6758         complete_target_initialization.
6759         (target_supports_terminal_ours): Use regular delegation.
6760         (update_current_target): Delete.
6761         (push_target): No longer check magic number.  Don't call
6762         update_current_target.
6763         (unpush_target): Don't call update_current_target.
6764         (target_is_pushed): No longer check magic number.
6765         (target_require_runnable): Skip for all stratums over
6766         process_stratum.
6767         (target_ops::info_proc): New.
6768         (target_info_proc): Use find_target_at and
6769         find_default_run_target.
6770         (target_supports_disable_randomization): Use regular delegation.
6771         (target_get_osdata): Use find_target_at.
6772         (target_ops::open, target_ops::close, target_ops::can_attach)
6773         (target_ops::attach, target_ops::can_create_inferior)
6774         (target_ops::create_inferior, target_ops::can_run)
6775         (target_can_run): New.
6776         (default_fileio_target): Use regular delegation.
6777         (target_ops::fileio_open, target_ops::fileio_pwrite)
6778         (target_ops::fileio_pread, target_ops::fileio_fstat)
6779         (target_ops::fileio_close, target_ops::fileio_unlink)
6780         (target_ops::fileio_readlink): New.
6781         (target_fileio_open_1, target_fileio_unlink)
6782         (target_fileio_readlink): Always call the target method.  Handle
6783         FILEIO_ENOSYS.
6784         (return_zero, return_zero_has_execution): Delete.
6785         (init_dummy_target): Delete.
6786         (dummy_target::dummy_target, dummy_target::shortname)
6787         (dummy_target::longname, dummy_target::doc)
6788         (debug_target::debug_target, debug_target::shortname)
6789         (debug_target::longname, debug_target::doc): New.
6790         (target_supports_delete_record): Use regular delegation.
6791         (setup_target_debug): Delete.
6792         (maintenance_print_target_stack): Skip debug_stratum.
6793         (initialize_targets): Instantiate the_dummy_target and
6794         the_debug_target.
6795         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
6796         use target_stack.
6797         (target_auxv_search, fprint_target_auxv): Adjust.
6798         (info_auxv_command): Adjust to use target_stack.
6799         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
6800         * exceptions.c (print_flush): Handle a NULL target_stack.
6801         * regcache.c (target_ops_no_register): Refactor as class with
6802         virtual methods.
6803
6804         * exec.c (exec_target): New class.
6805         (exec_ops): Now an exec_target.
6806         (exec_open, exec_close_1, exec_get_section_table)
6807         (exec_xfer_partial, exec_files_info, exec_has_memory)
6808         (exec_make_note_section): Refactor as exec_target methods.
6809         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
6810         Delete.
6811         (exec_target::find_memory_regions): New.
6812         (_initialize_exec): Don't call init_exec_ops.
6813         * gdbcore.h (exec_file_clear): Delete.
6814
6815         * corefile.c (core_target): Delete.
6816         (core_file_command): Adjust.
6817         * corelow.c (core_target): New class.
6818         (the_core_target): New.
6819         (core_close): Remove target_ops parameter.
6820         (core_close_cleanup): Adjust.
6821         (core_target::close): New.
6822         (core_open, core_detach, get_core_registers, core_files_info)
6823         (core_xfer_partial, core_thread_alive, core_read_description)
6824         (core_pid_to_str, core_thread_name, core_has_memory)
6825         (core_has_stack, core_has_registers, core_info_proc): Rework as
6826         core_target methods.
6827         (ignore, core_remove_breakpoint, init_core_ops): Delete.
6828         (_initialize_corelow): Initialize the_core_target.
6829         * gdbcore.h (core_target): Delete.
6830         (the_core_target): New.
6831
6832         * ctf.c: (ctf_target): New class.
6833         (ctf_ops): Now a ctf_target.
6834         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
6835         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6836         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6837         methods.
6838         (init_ctf_ops): Delete.
6839         (_initialize_ctf): Don't call it.
6840         * tracefile-tfile.c (tfile_target): New class.
6841         (tfile_ops): Now a tfile_target.
6842         (tfile_open, tfile_close, tfile_files_info)
6843         (tfile_get_tracepoint_status, tfile_trace_find)
6844         (tfile_fetch_registers, tfile_xfer_partial)
6845         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6846         Refactor as tfile_target methods.
6847         (tfile_xfer_partial_features): Remove target_ops parameter.
6848         (init_tfile_ops): Delete.
6849         (_initialize_tracefile_tfile): Don't call it.
6850         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6851         (tracefile_has_stack, tracefile_has_registers)
6852         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6853         tracefile_target methods.
6854         (init_tracefile_ops): Delete.
6855         (tracefile_target::tracefile_target): New.
6856         * tracefile.h: Include "target.h".
6857         (tracefile_target): New class.
6858         (init_tracefile_ops): Delete.
6859
6860         * spu-multiarch.c (spu_multiarch_target): New class.
6861         (spu_ops): Now a spu_multiarch_target.
6862         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6863         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6864         (spu_search_memory, spu_mourn_inferior): Refactor as
6865         spu_multiarch_target methods.
6866         (init_spu_ops): Delete.
6867         (_initialize_spu_multiarch): Remove references to init_spu_ops,
6868         complete_target_initialization.
6869
6870         * ravenscar-thread.c (ravenscar_thread_target): New class.
6871         (ravenscar_ops): Now a ravenscar_thread_target.
6872         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6873         (ravenscar_thread_alive, ravenscar_pid_to_str)
6874         (ravenscar_fetch_registers, ravenscar_store_registers)
6875         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6876         (ravenscar_stopped_by_hw_breakpoint)
6877         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6878         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6879         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6880         methods.
6881         (init_ravenscar_thread_ops): Delete.
6882         (_initialize_ravenscar): Remove references to
6883         init_ravenscar_thread_ops and complete_target_initialization.
6884
6885         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6886         (bsd_uthread_target): New class.
6887         (bsd_uthread_ops): Now a bsd_uthread_target.
6888         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6889         (bsd_uthread_close, bsd_uthread_mourn_inferior)
6890         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6891         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6892         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6893         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6894         (bsd_uthread_target): Delete function.
6895         (_initialize_bsd_uthread): Remove reference to
6896         complete_target_initialization.
6897
6898         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
6899         (target_bfd): ... this new class.
6900         (target_bfd_xfer_partial, target_bfd_get_section_table)
6901         (target_bfd_close): Refactor as target_bfd methods.
6902         (target_bfd::~target_bfd): New.
6903         (target_bfd_reopen): Adjust.
6904         (target_bfd::close): New.
6905
6906         * record-btrace.c (record_btrace_target): New class.
6907         (record_btrace_ops): Now a record_btrace_target.
6908         (record_btrace_open, record_btrace_stop_recording)
6909         (record_btrace_disconnect, record_btrace_close)
6910         (record_btrace_async, record_btrace_info)
6911         (record_btrace_insn_history, record_btrace_insn_history_range)
6912         (record_btrace_insn_history_from, record_btrace_call_history)
6913         (record_btrace_call_history_range)
6914         (record_btrace_call_history_from, record_btrace_record_method)
6915         (record_btrace_is_replaying, record_btrace_will_replay)
6916         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6917         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6918         (record_btrace_store_registers, record_btrace_prepare_to_store)
6919         (record_btrace_to_get_unwinder)
6920         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6921         (record_btrace_commit_resume, record_btrace_wait)
6922         (record_btrace_stop, record_btrace_can_execute_reverse)
6923         (record_btrace_stopped_by_sw_breakpoint)
6924         (record_btrace_supports_stopped_by_sw_breakpoint)
6925         (record_btrace_stopped_by_hw_breakpoint)
6926         (record_btrace_supports_stopped_by_hw_breakpoint)
6927         (record_btrace_update_thread_list, record_btrace_thread_alive)
6928         (record_btrace_goto_begin, record_btrace_goto_end)
6929         (record_btrace_goto, record_btrace_stop_replaying_all)
6930         (record_btrace_execution_direction)
6931         (record_btrace_prepare_to_generate_core)
6932         (record_btrace_done_generating_core): Refactor as
6933         record_btrace_target methods.
6934         (init_record_btrace_ops): Delete.
6935         (_initialize_record_btrace): Remove reference to
6936         init_record_btrace_ops.
6937         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6938         the execution_direction global.
6939         (record_full_base_target, record_full_target)
6940         (record_full_core_target): New classes.
6941         (record_full_ops): Now a record_full_target.
6942         (record_full_core_ops): Now a record_full_core_target.
6943         (record_full_target::detach, record_full_target::disconnect)
6944         (record_full_core_target::disconnect)
6945         (record_full_target::mourn_inferior, record_full_target::kill):
6946         New.
6947         (record_full_open, record_full_close, record_full_async): Refactor
6948         as methods of the record_full_base_target class.
6949         (record_full_resume, record_full_commit_resume): Refactor
6950         as methods of the record_full_target class.
6951         (record_full_wait, record_full_stopped_by_watchpoint)
6952         (record_full_stopped_data_address)
6953         (record_full_stopped_by_sw_breakpoint)
6954         (record_full_supports_stopped_by_sw_breakpoint)
6955         (record_full_stopped_by_hw_breakpoint)
6956         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6957         methods of the record_full_base_target class.
6958         (record_full_store_registers, record_full_xfer_partial)
6959         (record_full_insert_breakpoint, record_full_remove_breakpoint):
6960         Refactor as methods of the record_full_target class.
6961         (record_full_can_execute_reverse, record_full_get_bookmark)
6962         (record_full_goto_bookmark, record_full_execution_direction)
6963         (record_full_record_method, record_full_info, record_full_delete)
6964         (record_full_is_replaying, record_full_will_replay)
6965         (record_full_goto_begin, record_full_goto_end, record_full_goto)
6966         (record_full_stop_replaying): Refactor as methods of the
6967         record_full_base_target class.
6968         (record_full_core_resume, record_full_core_kill)
6969         (record_full_core_fetch_registers)
6970         (record_full_core_prepare_to_store)
6971         (record_full_core_store_registers, record_full_core_xfer_partial)
6972         (record_full_core_insert_breakpoint)
6973         (record_full_core_remove_breakpoint)
6974         (record_full_core_has_execution): Refactor
6975         as methods of the record_full_core_target class.
6976         (record_full_base_target::supports_delete_record): New.
6977         (init_record_full_ops): Delete.
6978         (init_record_full_core_ops): Delete.
6979         (record_full_save): Refactor as method of the
6980         record_full_base_target class.
6981         (_initialize_record_full): Remove references to
6982         init_record_full_ops and init_record_full_core_ops.
6983
6984         * remote.c (remote_target, extended_remote_target): New classes.
6985         (remote_ops): Now a remote_target.
6986         (extended_remote_ops): Now an extended_remote_target.
6987         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6988         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6989         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6990         (remote_pass_signals, remote_set_syscall_catchpoint)
6991         (remote_program_signals, )
6992         (remote_thread_always_alive): Remove target_ops parameter.
6993         (remote_thread_alive, remote_thread_name)
6994         (remote_update_thread_list, remote_threads_extra_info)
6995         (remote_static_tracepoint_marker_at)
6996         (remote_static_tracepoint_markers_by_strid)
6997         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6998         (remote_open): Refactor as methods of remote_target.
6999         (extended_remote_open, extended_remote_detach)
7000         (extended_remote_attach, extended_remote_post_attach):
7001         (extended_remote_supports_disable_randomization)
7002         (extended_remote_create_inferior): : Refactor as method of
7003         extended_remote_target.
7004         (remote_set_permissions, remote_open_1, remote_detach)
7005         (remote_follow_fork, remote_follow_exec, remote_disconnect)
7006         (remote_resume, remote_commit_resume, remote_stop)
7007         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7008         (remote_terminal_ours, remote_wait, remote_fetch_registers)
7009         (remote_prepare_to_store, remote_store_registers)
7010         (remote_flash_erase, remote_flash_done, remote_files_info)
7011         (remote_kill, remote_mourn, remote_insert_breakpoint)
7012         (remote_remove_breakpoint, remote_insert_watchpoint)
7013         (remote_watchpoint_addr_within_range)
7014         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7015         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7016         (remote_supports_stopped_by_sw_breakpoint)
7017         (remote_stopped_by_hw_breakpoint)
7018         (remote_supports_stopped_by_hw_breakpoint)
7019         (remote_stopped_by_watchpoint, remote_stopped_data_address)
7020         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7021         (remote_verify_memory): Refactor as methods of remote_target.
7022         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7023         parameter.
7024         (remote_xfer_partial, remote_get_memory_xfer_limit)
7025         (remote_search_memory, remote_rcmd, remote_memory_map)
7026         (remote_pid_to_str, remote_get_thread_local_address)
7027         (remote_get_tib_address, remote_read_description): Refactor as
7028         methods of remote_target.
7029         (remote_target::fileio_open, remote_target::fileio_pwrite)
7030         (remote_target::fileio_pread, remote_target::fileio_close): New.
7031         (remote_hostio_readlink, remote_hostio_fstat)
7032         (remote_filesystem_is_local, remote_can_execute_reverse)
7033         (remote_supports_non_stop, remote_supports_disable_randomization)
7034         (remote_supports_multi_process, remote_supports_cond_breakpoints)
7035         (remote_supports_enable_disable_tracepoint)
7036         (remote_supports_string_tracing)
7037         (remote_can_run_breakpoint_commands, remote_trace_init)
7038         (remote_download_tracepoint, remote_can_download_tracepoint)
7039         (remote_download_trace_state_variable, remote_enable_tracepoint)
7040         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7041         (remote_trace_start, remote_get_trace_status)
7042         (remote_get_tracepoint_status, remote_trace_stop)
7043         (remote_trace_find, remote_get_trace_state_variable_value)
7044         (remote_save_trace_data, remote_get_raw_trace_data)
7045         (remote_set_disconnected_tracing, remote_core_of_thread)
7046         (remote_set_circular_trace_buffer, remote_traceframe_info)
7047         (remote_get_min_fast_tracepoint_insn_len)
7048         (remote_set_trace_buffer_size, remote_set_trace_notes)
7049         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7050         (remote_disable_btrace, remote_teardown_btrace)
7051         (remote_read_btrace, remote_btrace_conf)
7052         (remote_augmented_libraries_svr4_read, remote_load)
7053         (remote_pid_to_exec_file, remote_can_do_single_step)
7054         (remote_execution_direction, remote_thread_handle_to_thread_info):
7055         Refactor as methods of remote_target.
7056         (init_remote_ops, init_extended_remote_ops): Delete.
7057         (remote_can_async_p, remote_is_async_p, remote_async)
7058         (remote_thread_events, remote_upload_tracepoints)
7059         (remote_upload_trace_state_variables): Refactor as methods of
7060         remote_target.
7061         (_initialize_remote): Remove references to init_remote_ops and
7062         init_extended_remote_ops.
7063
7064         * remote-sim.c (gdbsim_target): New class.
7065         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7066         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7067         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7068         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7069         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7070         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7071         Refactor as methods of gdbsim_target.
7072         (gdbsim_ops): Now a gdbsim_target.
7073         (init_gdbsim_ops): Delete.
7074         (gdbsim_cntrl_c): Adjust.
7075         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7076
7077         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7078         (the_amd64_linux_nat_target): New.
7079         (amd64_linux_fetch_inferior_registers)
7080         (amd64_linux_store_inferior_registers): Refactor as methods of
7081         amd64_linux_nat_target.
7082         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
7083         * i386-linux-nat.c: Don't include "linux-nat.h".
7084         (i386_linux_nat_target): New class.
7085         (the_i386_linux_nat_target): New.
7086         (i386_linux_fetch_inferior_registers)
7087         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7088         as methods of i386_linux_nat_target.
7089         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
7090         * inf-child.c (inf_child_ops): Delete.
7091         (inf_child_fetch_inferior_registers)
7092         (inf_child_store_inferior_registers): Delete.
7093         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7094         methods of inf_child_target.
7095         (inf_child_target::supports_terminal_ours)
7096         (inf_child_target::terminal_init)
7097         (inf_child_target::terminal_inferior)
7098         (inf_child_target::terminal_ours_for_output)
7099         (inf_child_target::terminal_ours, inf_child_target::interrupt)
7100         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7101         New.
7102         (inf_child_open, inf_child_disconnect, inf_child_close)
7103         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7104         (inf_child_post_startup_inferior, inf_child_can_run)
7105         (inf_child_pid_to_exec_file): Refactor as methods of
7106         inf_child_target.
7107         (inf_child_follow_fork): Delete.
7108         (inf_child_target::can_create_inferior)
7109         (inf_child_target::can_attach): New.
7110         (inf_child_target::has_all_memory, inf_child_target::has_memory)
7111         (inf_child_target::has_stack, inf_child_target::has_registers)
7112         (inf_child_target::has_execution): New.
7113         (inf_child_fileio_open, inf_child_fileio_pwrite)
7114         (inf_child_fileio_pread, inf_child_fileio_fstat)
7115         (inf_child_fileio_close, inf_child_fileio_unlink)
7116         (inf_child_fileio_readlink, inf_child_use_agent)
7117         (inf_child_can_use_agent): Refactor as methods of
7118         inf_child_target.
7119         (return_zero, inf_child_target): Delete.
7120         (inf_child_target::inf_child_target): New.
7121         * inf-child.h: Include "target.h".
7122         (inf_child_target): Delete function prototype.
7123         (inf_child_target): New class.
7124         (inf_child_open_target, inf_child_mourn_inferior)
7125         (inf_child_maybe_unpush_target): Delete.
7126         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7127         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7128         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7129         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7130         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7131         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7132         (inf_ptrace_wait, inf_ptrace_xfer_partial)
7133         (inf_ptrace_thread_alive, inf_ptrace_files_info)
7134         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7135         methods of inf_ptrace_target.
7136         (inf_ptrace_target): Delete function.
7137         * inf-ptrace.h: Include "inf-child.h".
7138         (inf_ptrace_target): Delete function declaration.
7139         (inf_ptrace_target): New class.
7140         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7141         * linux-nat.c (linux_target): New.
7142         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7143         (linux_nat_target::~linux_nat_target): New.
7144         (linux_child_post_attach, linux_child_post_startup_inferior)
7145         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7146         (linux_child_remove_fork_catchpoint)
7147         (linux_child_insert_vfork_catchpoint)
7148         (linux_child_remove_vfork_catchpoint)
7149         (linux_child_insert_exec_catchpoint)
7150         (linux_child_remove_exec_catchpoint)
7151         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7152         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7153         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7154         (linux_nat_stopped_data_address)
7155         (linux_nat_stopped_by_sw_breakpoint)
7156         (linux_nat_supports_stopped_by_sw_breakpoint)
7157         (linux_nat_stopped_by_hw_breakpoint)
7158         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7159         (linux_nat_kill, linux_nat_mourn_inferior)
7160         (linux_nat_xfer_partial, linux_nat_thread_alive)
7161         (linux_nat_update_thread_list, linux_nat_pid_to_str)
7162         (linux_nat_thread_name, linux_child_pid_to_exec_file)
7163         (linux_child_static_tracepoint_markers_by_strid)
7164         (linux_nat_is_async_p, linux_nat_can_async_p)
7165         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7166         (linux_nat_supports_multi_process)
7167         (linux_nat_supports_disable_randomization, linux_nat_async)
7168         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7169         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7170         (linux_nat_fileio_open, linux_nat_fileio_readlink)
7171         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7172         methods of linux_nat_target.
7173         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7174         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7175         parameter.
7176         (check_stopped_by_watchpoint): Adjust.
7177         (linux_xfer_partial): Delete.
7178         (linux_target_install_ops, linux_target, linux_nat_add_target):
7179         Delete.
7180         (linux_nat_target::linux_nat_target): New.
7181         * linux-nat.h: Include "inf-ptrace.h".
7182         (linux_nat_target): New.
7183         (linux_target, linux_target_install_ops, linux_nat_add_target):
7184         Delete function declarations.
7185         (linux_target): Declare global.
7186         * linux-thread-db.c (thread_db_target): New.
7187         (thread_db_target::thread_db_target): New.
7188         (thread_db_ops): Delete.
7189         (the_thread_db_target): New.
7190         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7191         (thread_db_update_thread_list, thread_db_pid_to_str)
7192         (thread_db_extra_thread_info)
7193         (thread_db_thread_handle_to_thread_info)
7194         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7195         (thread_db_resume): Refactor as methods of thread_db_target.
7196         (init_thread_db_ops): Delete.
7197         (_initialize_thread_db): Remove reference to init_thread_db_ops.
7198         * x86-linux-nat.c: Don't include "linux-nat.h".
7199         (super_post_startup_inferior): Delete.
7200         (x86_linux_nat_target::~x86_linux_nat_target): New.
7201         (x86_linux_child_post_startup_inferior)
7202         (x86_linux_read_description, x86_linux_enable_btrace)
7203         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7204         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7205         methods of x86_linux_nat_target.
7206         (x86_linux_create_target): Delete.  Bits folded ...
7207         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
7208         pointer.
7209         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7210         (x86_linux_nat_target): New class.
7211         (x86_linux_create_target): Delete.
7212         (x86_linux_add_target): Now takes a linux_nat_target pointer.
7213         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7214         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7215         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7216         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7217         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7218         make extern.
7219         (x86_use_watchpoints): Delete.
7220         * x86-nat.h: Include "breakpoint.h" and "target.h".
7221         (x86_use_watchpoints): Delete.
7222         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7223         (x86_stopped_by_watchpoint, x86_stopped_data_address)
7224         (x86_insert_watchpoint, x86_remove_watchpoint)
7225         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7226         (x86_stopped_by_hw_breakpoint): New declarations.
7227         (x86_nat_target): New template class.
7228
7229         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7230         (the_ppc_linux_nat_target): New.
7231         (ppc_linux_fetch_inferior_registers)
7232         (ppc_linux_can_use_hw_breakpoint)
7233         (ppc_linux_region_ok_for_hw_watchpoint)
7234         (ppc_linux_ranged_break_num_registers)
7235         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7236         (ppc_linux_insert_mask_watchpoint)
7237         (ppc_linux_remove_mask_watchpoint)
7238         (ppc_linux_can_accel_watchpoint_condition)
7239         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7240         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7241         (ppc_linux_watchpoint_addr_within_range)
7242         (ppc_linux_masked_watch_num_registers)
7243         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7244         (ppc_linux_read_description): Refactor as methods of
7245         ppc_linux_nat_target.
7246         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
7247
7248         * procfs.c (procfs_xfer_partial): Delete forward declaration.
7249         (procfs_target): New class.
7250         (the_procfs_target): New.
7251         (procfs_target): Delete function.
7252         (procfs_auxv_parse, procfs_attach, procfs_detach)
7253         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7254         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7255         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7256         (procfs_create_inferior, procfs_update_thread_list)
7257         (procfs_thread_alive, procfs_pid_to_str)
7258         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7259         (procfs_stopped_data_address, procfs_insert_watchpoint)
7260         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7261         (proc_find_memory_regions, procfs_info_proc)
7262         (procfs_make_note_section): Refactor as methods of procfs_target.
7263         (_initialize_procfs): Adjust.
7264         * sol-thread.c (sol_thread_target): New class.
7265         (sol_thread_ops): Now a sol_thread_target.
7266         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7267         (sol_thread_fetch_registers, sol_thread_store_registers)
7268         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7269         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7270         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7271         (init_sol_thread_ops): Delete.
7272         (_initialize_sol_thread): Adjust.  Remove references to
7273         init_sol_thread_ops and complete_target_initialization.
7274
7275         * windows-nat.c (windows_nat_target): New class.
7276         (windows_fetch_inferior_registers)
7277         (windows_store_inferior_registers, windows_resume, windows_wait)
7278         (windows_attach, windows_detach, windows_pid_to_exec_file)
7279         (windows_files_info, windows_create_inferior)
7280         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7281         (windows_close, windows_pid_to_str, windows_xfer_partial)
7282         (windows_get_tib_address, windows_get_ada_task_ptid)
7283         (windows_thread_name, windows_thread_alive): Refactor as
7284         windows_nat_target methods.
7285         (do_initial_windows_stuff): Adjust.
7286         (windows_target): Delete function.
7287         (_initialize_windows_nat): Adjust.
7288
7289         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7290         (darwin_mourn_inferior, darwin_kill_inferior)
7291         (darwin_create_inferior, darwin_attach, darwin_detach)
7292         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7293         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7294         (darwin_supports_multi_process): Refactor as darwin_nat_target
7295         methods.
7296         (darwin_resume_to, darwin_files_info): Delete.
7297         (_initialize_darwin_inferior): Rename to ...
7298         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
7299         * darwin-nat.h: Include "inf-child.h".
7300         (darwin_nat_target): New class.
7301         (darwin_complete_target): Delete.
7302         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7303         (darwin_target): New.
7304         (i386_darwin_fetch_inferior_registers)
7305         (i386_darwin_store_inferior_registers): Refactor as methods of
7306         darwin_nat_target.
7307         (darwin_complete_target): Delete, with ...
7308         (_initialize_i386_darwin_nat): ... bits factored out here.
7309
7310         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7311         (the_alpha_linux_nat_target): New.
7312         (alpha_linux_register_u_offset): Refactor as
7313         alpha_linux_nat_target method.
7314         (_initialize_alpha_linux_nat): Adjust.
7315         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7316         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7317         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7318         methods of linux_nat_trad_target.
7319         (linux_trad_target): Delete.
7320         * linux-nat-trad.h (linux_trad_target): Delete function.
7321         (linux_nat_trad_target): New class.
7322         * mips-linux-nat.c (mips_linux_nat_target): New class.
7323         (super_fetch_registers, super_store_registers, super_close):
7324         Delete.
7325         (the_mips_linux_nat_target): New.
7326         (mips64_linux_regsets_fetch_registers)
7327         (mips64_linux_regsets_store_registers)
7328         (mips64_linux_fetch_registers, mips64_linux_store_registers)
7329         (mips_linux_register_u_offset, mips_linux_read_description)
7330         (mips_linux_can_use_hw_breakpoint)
7331         (mips_linux_stopped_by_watchpoint)
7332         (mips_linux_stopped_data_address)
7333         (mips_linux_region_ok_for_hw_watchpoint)
7334         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7335         (mips_linux_close): Refactor as methods of mips_linux_nat.
7336         (_initialize_mips_linux_nat): Adjust to C++ification.
7337
7338         * aix-thread.c (aix_thread_target): New class.
7339         (aix_thread_ops): Now an aix_thread_target.
7340         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7341         (aix_thread_fetch_registers, aix_thread_store_registers)
7342         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7343         (aix_thread_thread_alive, aix_thread_pid_to_str)
7344         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7345         Refactor as methods of aix_thread_target.
7346         (init_aix_thread_ops): Delete.
7347         (_initialize_aix_thread): Remove references to init_aix_thread_ops
7348         and complete_target_initialization.
7349         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7350         (rs6000_nat_target): New class.
7351         (the_rs6000_nat_target): New.
7352         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7353         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7354         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7355         (super_create_inferior): Delete.
7356         (_initialize_rs6000_nat): Adjust to C++ification.
7357
7358         * arm-linux-nat.c (arm_linux_nat_target): New class.
7359         (the_arm_linux_nat_target): New.
7360         (arm_linux_fetch_inferior_registers)
7361         (arm_linux_store_inferior_registers, arm_linux_read_description)
7362         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7363         (arm_linux_remove_hw_breakpoint)
7364         (arm_linux_region_ok_for_hw_watchpoint)
7365         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7366         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7367         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7368         arm_linux_nat_target.
7369         (_initialize_arm_linux_nat): Adjust to C++ification.
7370
7371         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7372         (the_aarch64_linux_nat_target): New.
7373         (aarch64_linux_fetch_inferior_registers)
7374         (aarch64_linux_store_inferior_registers)
7375         (aarch64_linux_child_post_startup_inferior)
7376         (aarch64_linux_read_description)
7377         (aarch64_linux_can_use_hw_breakpoint)
7378         (aarch64_linux_insert_hw_breakpoint)
7379         (aarch64_linux_remove_hw_breakpoint)
7380         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7381         (aarch64_linux_region_ok_for_hw_watchpoint)
7382         (aarch64_linux_stopped_data_address)
7383         (aarch64_linux_stopped_by_watchpoint)
7384         (aarch64_linux_watchpoint_addr_within_range)
7385         (aarch64_linux_can_do_single_step): Refactor as methods of
7386         aarch64_linux_nat_target.
7387         (super_post_startup_inferior): Delete.
7388         (_initialize_aarch64_linux_nat): Adjust to C++ification.
7389
7390         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7391         (the_hppa_linux_nat_target): New.
7392         (hppa_linux_fetch_inferior_registers)
7393         (hppa_linux_store_inferior_registers): Refactor as methods of
7394         hppa_linux_nat_target.
7395         (_initialize_hppa_linux_nat): Adjust to C++ification.
7396
7397         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7398         (the_ia64_linux_nat_target): New.
7399         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7400         (ia64_linux_stopped_data_address)
7401         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7402         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7403         ia64_linux_nat_target methods.
7404         (super_xfer_partial): Delete.
7405         (_initialize_ia64_linux_nat): Adjust to C++ification.
7406
7407         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7408         (the_m32r_linux_nat_target): New.
7409         (m32r_linux_fetch_inferior_registers)
7410         (m32r_linux_store_inferior_registers): Refactor as
7411         m32r_linux_nat_target methods.
7412         (_initialize_m32r_linux_nat): Adjust to C++ification.
7413
7414         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7415         (the_m68k_linux_nat_target): New.
7416         (m68k_linux_fetch_inferior_registers)
7417         (m68k_linux_store_inferior_registers): Refactor as
7418         m68k_linux_nat_target methods.
7419         (_initialize_m68k_linux_nat): Adjust to C++ification.
7420
7421         * s390-linux-nat.c (s390_linux_nat_target): New class.
7422         (the_s390_linux_nat_target): New.
7423         (s390_linux_fetch_inferior_registers)
7424         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7425         (s390_insert_watchpoint, s390_remove_watchpoint)
7426         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7427         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7428         (s390_auxv_parse, s390_read_description): Refactor as methods of
7429         s390_linux_nat_target.
7430         (_initialize_s390_nat): Adjust to C++ification.
7431
7432         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7433         (the_sparc_linux_nat_target): New.
7434         (_initialize_sparc_linux_nat): Adjust to C++ification.
7435         * sparc-nat.c (sparc_fetch_inferior_registers)
7436         (sparc_store_inferior_registers): Remove target_ops parameter.
7437         * sparc-nat.h (sparc_fetch_inferior_registers)
7438         (sparc_store_inferior_registers): Remove target_ops parameter.
7439         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7440         (the_sparc64_linux_nat_target): New.
7441         (_initialize_sparc64_linux_nat): Adjust to C++ification.
7442
7443         * spu-linux-nat.c (spu_linux_nat_target): New class.
7444         (the_spu_linux_nat_target): New.
7445         (spu_child_post_startup_inferior, spu_child_post_attach)
7446         (spu_child_wait, spu_fetch_inferior_registers)
7447         (spu_store_inferior_registers, spu_xfer_partial)
7448         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7449         methods.
7450         (_initialize_spu_nat): Adjust to C++ification.
7451
7452         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7453         (the_tilegx_linux_nat_target): New.
7454         (fetch_inferior_registers, store_inferior_registers):
7455         Refactor as methods.
7456         (_initialize_tile_linux_nat): Adjust to C++ification.
7457
7458         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7459         (the_xtensa_linux_nat_target): New.
7460         (xtensa_linux_fetch_inferior_registers)
7461         (xtensa_linux_store_inferior_registers): Refactor as
7462         xtensa_linux_nat_target methods.
7463         (_initialize_xtensa_linux_nat): Adjust to C++ification.
7464
7465         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7466         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7467         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7468         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7469         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7470         (fbsd_stopped_by_sw_breakpoint)
7471         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7472         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7473         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7474         (fbsd_post_startup_inferior, fbsd_post_attach)
7475         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7476         (fbsd_set_syscall_catchpoint)
7477         (super_xfer_partial, super_resume, super_wait)
7478         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7479         (fbsd_handle_debug_trap): Remove target_ops parameter.
7480         (fbsd_nat_add_target): Delete.
7481         * fbsd-nat.h: Include "inf-ptrace.h".
7482         (fbsd_nat_add_target): Delete.
7483         (USE_SIGTRAP_SIGINFO): Define.
7484         (fbsd_nat_target): New class.
7485
7486         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7487         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7488         (amd64bsd_target): Delete.
7489         * amd64-bsd-nat.h: New file.
7490         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7491         "x86-bsd-nat.h".
7492         (amd64_fbsd_nat_target): New class.
7493         (the_amd64_fbsd_nat_target): New.
7494         (amd64fbsd_read_description): Refactor as method of
7495         amd64_fbsd_nat_target.
7496         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7497         (_initialize_amd64fbsd_nat): Adjust to C++ification.
7498         * amd64-nat.h (amd64bsd_target): Delete function declaration.
7499         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7500         (i386bsd_store_inferior_registers): Remove target_ops parameter.
7501         (i386bsd_target): Delete.
7502         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7503         (i386bsd_fetch_inferior_registers)
7504         (i386bsd_store_inferior_registers): Declare.
7505         (i386_bsd_nat_target): New class.
7506         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7507         (the_i386_fbsd_nat_target): New.
7508         (i386fbsd_resume, i386fbsd_read_description): Refactor as
7509         i386_fbsd_nat_target methods.
7510         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7511         (_initialize_i386fbsd_nat): Adjust to C++ification.
7512         * x86-bsd-nat.c (super_mourn_inferior): Delete.
7513         (x86bsd_mourn_inferior, x86bsd_target): Delete.
7514         (_initialize_x86_bsd_nat): Adjust to C++ification.
7515         * x86-bsd-nat.h: Include "x86-nat.h".
7516         (x86bsd_target): Delete declaration.
7517         (x86bsd_nat_target): New class.
7518
7519         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7520         (the_aarch64_fbsd_nat_target): New.
7521         (aarch64_fbsd_fetch_inferior_registers)
7522         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7523         aarch64_fbsd_nat_target.
7524         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7525         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7526         (the_alpha_bsd_nat_target): New.
7527         (alphabsd_fetch_inferior_registers)
7528         (alphabsd_store_inferior_registers): Refactor as
7529         alpha_bsd_nat_target methods.
7530         (_initialize_alphabsd_nat): Refactor as methods of
7531         alpha_bsd_nat_target.
7532         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7533         (the_amd64_nbsd_nat_target): New.
7534         (_initialize_amd64nbsd_nat): Adjust to C++ification.
7535         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7536         (the_amd64_obsd_nat_target): New.
7537         (_initialize_amd64obsd_nat): Adjust to C++ification.
7538         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7539         (the_arm_fbsd_nat_target): New.
7540         (arm_fbsd_fetch_inferior_registers)
7541         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7542         (_initialize_arm_fbsd_nat): Refactor as methods of
7543         arm_fbsd_nat_target.
7544         (_initialize_arm_fbsd_nat): Adjust to C++ification.
7545         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7546         (the_arm_netbsd_nat_target): New.
7547         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7548         arm_netbsd_nat_target.
7549         (_initialize_arm_netbsd_nat): Adjust to C++ification.
7550         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7551         (the_hppa_nbsd_nat_target): New.
7552         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7553         hppa_nbsd_nat_target methods.
7554         (_initialize_hppanbsd_nat): Adjust to C++ification.
7555         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7556         (the_hppa_obsd_nat_target): New.
7557         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7558         methods of hppa_obsd_nat_target.
7559         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
7560         add_target.
7561         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7562         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
7563         add_target.
7564         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7565         (_initialize_i386obsd_nat): Use add_target.
7566         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7567         (the_m68k_bsd_nat_target): New.
7568         (m68kbsd_fetch_inferior_registers)
7569         (m68kbsd_store_inferior_registers): Refactor as methods of
7570         m68k_bsd_nat_target.
7571         (_initialize_m68kbsd_nat): Adjust to C++ification.
7572         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7573         (the_mips_fbsd_nat_target): New.
7574         (mips_fbsd_fetch_inferior_registers)
7575         (mips_fbsd_store_inferior_registers): Refactor as methods of
7576         mips_fbsd_nat_target.
7577         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
7578         add_target.
7579         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7580         (the_mips_nbsd_nat_target): New.
7581         (mipsnbsd_fetch_inferior_registers)
7582         (mipsnbsd_store_inferior_registers): Refactor as methods of
7583         mips_nbsd_nat_target.
7584         (_initialize_mipsnbsd_nat): Adjust to C++ification.
7585         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7586         (the_mips64_obsd_nat_target): New.
7587         (mips64obsd_fetch_inferior_registers)
7588         (mips64obsd_store_inferior_registers): Refactor as methods of
7589         mips64_obsd_nat_target.
7590         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
7591         add_target.
7592         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7593         nbsd_nat_target.
7594         * nbsd-nat.h: Include "inf-ptrace.h".
7595         (nbsd_nat_target): New class.
7596         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7597         (obsd_wait): Refactor as methods of obsd_nat_target.
7598         (obsd_add_target): Delete.
7599         * obsd-nat.h: Include "inf-ptrace.h".
7600         (obsd_nat_target): New class.
7601         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7602         (the_ppc_fbsd_nat_target): New.
7603         (ppcfbsd_fetch_inferior_registers)
7604         (ppcfbsd_store_inferior_registers): Refactor as methods of
7605         ppc_fbsd_nat_target.
7606         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
7607         add_target.
7608         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7609         (the_ppc_nbsd_nat_target): New.
7610         (ppcnbsd_fetch_inferior_registers)
7611         (ppcnbsd_store_inferior_registers): Refactor as methods of
7612         ppc_nbsd_nat_target.
7613         (_initialize_ppcnbsd_nat): Adjust to C++ification.
7614         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7615         (the_ppc_obsd_nat_target): New.
7616         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7617         methods of ppc_obsd_nat_target.
7618         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
7619         add_target.
7620         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7621         (the_sh_nbsd_nat_target): New.
7622         (shnbsd_fetch_inferior_registers)
7623         (shnbsd_store_inferior_registers): Refactor as methods of
7624         sh_nbsd_nat_target.
7625         (_initialize_shnbsd_nat): Adjust to C++ification.
7626         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7627         (inf_ptrace_xfer_partial): Delete.
7628         (sparc_xfer_partial, sparc_target): Delete.
7629         * sparc-nat.h (sparc_fetch_inferior_registers)
7630         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7631         (sparc_target): Delete function declaration.
7632         (sparc_target): New template class.
7633         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7634         (_initialize_sparcnbsd_nat): Adjust to C++ification.
7635         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7636         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
7637         add_target.
7638         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7639         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7640         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7641         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
7642         add_target.
7643         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7644         (the_vax_bsd_nat_target): New.
7645         (vaxbsd_fetch_inferior_registers)
7646         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7647         methods.
7648         (_initialize_vaxbsd_nat): Adjust to C++ification.
7649
7650         * bsd-kvm.c (bsd_kvm_target): New class.
7651         (bsd_kvm_ops): Now a bsd_kvm_target.
7652         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7653         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7654         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7655         bsd_kvm_target.
7656         (bsd_kvm_return_one): Delete.
7657         (bsd_kvm_add_target): Adjust to C++ification.
7658
7659         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7660         (nto_procfs_target_procfs): New classes.
7661         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7662         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7663         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7664         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7665         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7666         (procfs_remove_hw_breakpoint, procfs_resume)
7667         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7668         (procfs_kill_inferior, procfs_store_registers)
7669         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7670         as methods of nto_procfs_target.
7671         (nto_procfs_ops): Now an nto_procfs_target_procfs.
7672         (nto_native_ops): Delete.
7673         (procfs_open, procfs_native_open): Delete.
7674         (nto_native_ops): Now an nto_procfs_target_native.
7675         (init_procfs_targets): Adjust to C++ification.
7676         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7677         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7678         Refactor as methods of nto_procfs_target.
7679
7680         * go32-nat.c (go32_nat_target): New class.
7681         (the_go32_nat_target): New.
7682         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7683         (go32_store_registers, go32_xfer_partial, go32_files_info)
7684         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7685         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7686         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7687         (go32_pid_to_str): Refactor as methods of go32_nat_target.
7688         (go32_target): Delete.
7689         (_initialize_go32_nat): Adjust to C++ification.
7690
7691         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7692         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7693         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7694         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7695         gnu_nat_target.
7696         (gnu_target): Delete.
7697         * gnu-nat.h (gnu_target): Delete.
7698         (gnu_nat_target): New class.
7699         * i386-gnu-nat.c (gnu_base_target): New.
7700         (i386_gnu_nat_target): New class.
7701         (the_i386_gnu_nat_target): New.
7702         (_initialize_i386gnu_nat): Adjust to C++ification.
7703
7704 2018-05-02  Pedro Alves  <palves@redhat.com>
7705
7706         * bfd-target.c (target_bfd_xclose): Rename to ...
7707         (target_bfd_close): ... this.
7708         (target_bfd_reopen): Adjust.
7709         * target.c (target_close): Remove references to to_xclose.
7710         * target.h (target_ops::to_xclose): Delete.
7711         (target_ops::to_close): Update comments.
7712
7713 2018-05-02  Pedro Alves  <palves@redhat.com>
7714
7715         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7716         "linux-nat.h".
7717         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7718         * inf-ptrace.c (inf_ptrace_register_u_offset)
7719         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7720         (inf_ptrace_store_register, inf_ptrace_store_registers)
7721         (inf_ptrace_trad_target): Move to ...
7722         * linux-nat-trad.c: ... this new file.
7723         * linux-nat-trad.h: New file.
7724         * linux-nat.c (linux_target_install_ops): Make extern.
7725         (linux_trad_target): Delete.
7726         * linux-nat.h (linux_trad_target): Delete declaration.
7727         (linux_target_install_ops): Declare.
7728         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7729         "linux-nat.h".
7730
7731 2018-05-02  Pedro Alves  <palves@redhat.com>
7732
7733         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7734         procfs_target/add_target here.
7735         * procfs.c (procfs_target): Make static.
7736         (_initialize_procfs): Call add_target here.
7737         * procfs.h (struct target_ops): Remove forward declaration.
7738         (procfs_target): Remove declaration.
7739         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7740
7741 2018-05-02  Pedro Alves  <palves@redhat.com>
7742
7743         * procfs.c (procfs_stopped_by_watchpoint)
7744         (procfs_insert_watchpoint, procfs_remove_watchpoint)
7745         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7746         Forward declare.
7747         (procfs_use_watchpoints): Delete, move contents...
7748         (procfs_target): ... here.
7749         * procfs.h (procfs_use_watchpoints): Delete declaration.
7750         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7751         procfs_use_watchpoints.
7752         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7753         procfs_use_watchpoints.
7754
7755 2018-05-02  Tom Tromey  <tom@tromey.com>
7756
7757         PR python/20084:
7758         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7759         and var_zuinteger_unlimited.
7760         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7761         and PARAM_ZUINTEGER_UNLIMITED.
7762         (set_parameter_value): Handle var_zuinteger and
7763         var_zuinteger_unlimited.
7764         (add_setshow_generic): Likewise.
7765         (parmpy_init): Likewise.
7766
7767 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
7768
7769         PR rust/23124
7770         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
7771         pointer is not null before dereferencing it.
7772
7773 2018-04-30  Tom Tromey  <tom@tromey.com>
7774
7775         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
7776         is_mi_like_p.
7777
7778 2018-04-30  Tom Tromey  <tom@tromey.com>
7779
7780         * breakpoint.c (mention): Remove use of is_mi_like_p.
7781         (print_mention_ranged_breakpoint): Likewise.
7782         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
7783         of is_mi_like_p.
7784
7785 2018-04-30  Tom Tromey  <tom@tromey.com>
7786
7787         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
7788
7789 2018-04-30  Tom Tromey  <tom@tromey.com>
7790
7791         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
7792         (info_spu_event_command): Remove some uses of is_mi_like_p.
7793
7794 2018-04-30  Tom Tromey  <tom@tromey.com>
7795
7796         * python/py-framefilter.c (py_print_single_arg)
7797         (enumerate_locals, py_print_args, py_print_frame): Remove some
7798         uses of is_mi_like_p.
7799
7800 2018-04-30  Tom Tromey  <tom@tromey.com>
7801
7802         * ui-out.c: Update.
7803         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
7804         * ui-out.h (ui_out::is_mi_like_p): Now const.
7805         (ui_out::do_is_mi_like_p): Now const.
7806         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
7807
7808 2018-04-30  Tom Tromey  <tom@tromey.com>
7809
7810         * varobj.c (varobj_set_visualizer): Use new_reference.
7811         * python/python.c (gdbpy_decode_line): Use new_reference.
7812         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
7813         new_reference.
7814
7815 2018-04-30  Tom Tromey  <tom@tromey.com>
7816
7817         * varobj.c (install_new_value): Use new_reference.
7818         * value.h (value_incref): Return void.  Swap intro comment with
7819         value_decref.
7820         * value.c (set_value_parent): Use new_reference.
7821         (value_incref): Return void.  Update intro comment.
7822         (release_value): Use new_reference.
7823         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
7824
7825 2018-04-30  Tom Tromey  <tom@tromey.com>
7826
7827         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
7828         * gdb_bfd.h (new_bfd_ref): Remove.
7829         (gdb_bfd_open): Update comment.
7830         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7831         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
7832         (gdb_bfd_fdopenr): Use new_reference.
7833         * exec.c (exec_file_attach): Use new_reference.
7834
7835 2018-04-30  Tom Tromey  <tom@tromey.com>
7836
7837         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7838         method.
7839
7840 2018-04-30  Tom Tromey  <tom@tromey.com>
7841
7842         * jit.c (jit_read_code_entry): Use type_align.
7843         * i386-tdep.c (i386_gdbarch_init): Don't call
7844         set_gdbarch_long_long_align_bit.
7845         * gdbarch.sh: Remove long_long_align_bit.
7846         * gdbarch.c, gdbarch.h: Rebuild.
7847         * arc-tdep.c (arc_type_align): New function.
7848         (arc_gdbarch_init): Use arc_type_align.  Don't call
7849         set_gdbarch_long_long_align_bit.
7850
7851 2018-04-30  Tom Tromey  <tom@tromey.com>
7852
7853         * rust-lang.c (rust_type_alignment): Remove.
7854         (rust_composite_type): Use type_align.
7855
7856 2018-04-30  Tom Tromey  <tom@tromey.com>
7857
7858         * NEWS: Mention Type.align.
7859         * python/py-type.c (typy_get_alignof): New function.
7860         (type_object_getset): Add "alignof".
7861
7862 2018-04-30  Tom Tromey  <tom@tromey.com>
7863
7864         PR exp/17095:
7865         * NEWS: Update.
7866         * std-operator.def (UNOP_ALIGNOF): New operator.
7867         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7868         New.
7869         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7870         * c-lang.c (c_op_print_tab): Add alignof.
7871         * c-exp.y (ALIGNOF): New token.
7872         (exp): Add "ALIGNOF" production.
7873         (ident_tokens): Add _Alignof and alignof.
7874
7875 2018-04-30  Tom Tromey  <tom@tromey.com>
7876
7877         * i386-tdep.c (i386_type_align): New function.
7878         (i386_gdbarch_init): Update.
7879         * gdbarch.sh (type_align): New method.
7880         * gdbarch.c, gdbarch.h: Rebuild.
7881         * arch-utils.h (default_type_align): Declare.
7882         * arch-utils.c (default_type_align): New function.
7883         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7884         (struct type) <align_log2>: New field.
7885         <instance_flags>: Now a bitfield.
7886         (TYPE_RAW_ALIGN): New macro.
7887         (type_align, type_raw_align, set_type_align): Declare.
7888         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7889         functions.
7890         * dwarf2read.c (quirk_rust_enum): Set type alignment.
7891         (get_alignment, maybe_set_alignment): New functions.
7892         (read_structure_type, read_enumeration_type, read_array_type)
7893         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7894         (read_subrange_type, read_base_type): Set type alignment.
7895
7896 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
7897
7898         * dwarf2read.c (read_index_from_section): Use bool.
7899
7900 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
7901
7902         PR gdb/22950
7903         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7904         with #ifdef.
7905
7906 2018-04-29  John Reiser  <jreiser@BitWagon.com>
7907
7908         PR build/22873
7909         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7910         last step, and do it atomically.
7911
7912 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
7913
7914         * compile/compile-c-types.c (convert_int, convert_float):
7915         Update for C FE v1.
7916
7917 2018-04-27  Tom Tromey  <tom@tromey.com>
7918
7919         PR rust/22545:
7920         * rust-lang.c (rust_inclusive_range_type_p): New function.
7921         (rust_range): Handle inclusive ranges.
7922         (rust_compute_range): Likewise.
7923         * rust-exp.y (struct rust_op) <inclusive>: New field.
7924         (DOTDOTEQ): New constant.
7925         (range_expr): Add "..=" productions.
7926         (operator_tokens): Add "..=" token.
7927         (ast_range): Add "inclusive" parameter.
7928         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7929         ranges.
7930         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7931         bounds values.
7932         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7933         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7934         Update comments.
7935         * expprint.c (print_subexp_standard): Handle new bounds values.
7936         (dump_subexp_body_standard): Likewise.
7937
7938 2018-04-27  Tom Tromey  <tom@tromey.com>
7939
7940         * configure: Rebuild.
7941         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7942         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7943         "OVERRIDE".
7944         (class symbol_needs_eval_context): Likewise.
7945         * dwarf2read.c (mock_mapped_index::symbol_name_count)
7946         (mock_mapped_index::symbol_name_at): Use "override".  Remove
7947         "virtual".
7948         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7949         "override".
7950         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7951         * aarch64-tdep.c (instruction_reader::read): Use "override".
7952         (instruction_reader_test::read): Likewise.
7953         * arm-tdep.c (instruction_reader::read): Use "override".
7954         (instruction_reader_thumb::read): Likewise.
7955
7956 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
7957
7958         PR remote/9665
7959         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7960         instead of remote_send.
7961         (remote_send): Remove.
7962
7963 2018-04-26  Pedro Alves  <palves@redhat.com>
7964
7965         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7966         find_function_start_sal instead of find_pc_line.
7967
7968 2018-04-26  Pedro Alves  <palves@redhat.com>
7969
7970         * breakpoint.c (set_breakpoint_location_function): Handle
7971         mst_data_gnu_ifunc.
7972         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7973         * elfread.c (elf_symtab_read): Give data symbols with
7974         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7975         (elf_rel_plt_read): Update comment.
7976         * linespec.c (convert_linespec_to_sals): Handle
7977         mst_data_gnu_ifunc.
7978         (minsym_found): Handle mst_data_gnu_ifunc.
7979         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7980         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7981         * parse.c (find_minsym_type_and_address): Handle
7982         mst_data_gnu_ifunc.
7983         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7984         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7985         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7986         comment.
7987         <mst_data_gnu_ifunc>: New enumerator.
7988
7989 2018-04-26  Pedro Alves  <palves@redhat.com>
7990
7991         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7992         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
7993         'want_trampoline' parameter by a lookup_msym_prefer parameter.
7994         Handle it.
7995         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7996         (lookup_minimal_symbol_by_pc): Adjust.
7997         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7998         (lookup_solib_trampoline_symbol_by_pc): Adjust.
7999         * minsyms.h (lookup_msym_prefer): New enum.
8000         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8001         parameter by a lookup_msym_prefer parameter.
8002
8003 2018-04-26  Pedro Alves  <palves@redhat.com>
8004
8005         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8006         ends in "@plt" instead of looking at the symbol's section.
8007
8008 2018-04-26  Pedro Alves  <palves@redhat.com>
8009
8010         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
8011         all references.
8012         (find_pc_partial_function_gnu_ifunc): Rename to ...
8013         (find_pc_partial_function): ... this, and remove references to
8014         'is_gnu_ifunc_p'.
8015         (find_pc_partial_function): Delete old implementation.
8016         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8017
8018 2018-04-26  Pedro Alves  <palves@redhat.com>
8019
8020         * linespec.c (struct bound_minimal_symbol_search_key): New.
8021         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
8022         skip first line if we found a GNU ifunc minimal symbol by name.
8023         (compare_msymbols): Change parameters to work with a destructured
8024         lhs minsym.
8025         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8026         functions.
8027
8028 2018-04-26  Pedro Alves  <palves@redhat.com>
8029
8030         * breakpoint.c (set_breakpoint_location_function): Don't resolve
8031         ifunc targets here.  Instead, if we have an ifunc minsym, use its
8032         address/name.
8033         (add_location_to_breakpoint): Store the minsym and the objfile in
8034         the breakpoint location.
8035         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8036         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8037         Record the minsym in the sal.
8038         * symtab.h (symtab_and_line) <msymbol>: New field.
8039
8040 2018-04-26  Pedro Alves  <palves@redhat.com>
8041
8042         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8043         unless we actually resolved the ifunc.
8044
8045 2018-04-26  Pedro Alves  <palves@redhat.com>
8046
8047         * c-exp.y (variable production): Prefer ifunc minsyms over
8048         regular function symbols.
8049         * symtab.c (find_gnu_ifunc): New function.
8050         * minsyms.h (lookup_msym_prefer): New enum.
8051         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8052         parameter by a lookup_msym_prefer parameter.
8053         * symtab.h (find_gnu_ifunc): New declaration.
8054
8055 2018-04-26  Pedro Alves  <palves@redhat.com>
8056
8057         * blockframe.c (find_gnu_ifunc_target_type): New function.
8058         (find_function_type): New.
8059         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8060         return a value with a memory address.
8061         (eval_call): For calls to GNU ifunc functions, try to find the
8062         type of the target function from the type that the resolver
8063         returns.
8064         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8065         symbols.
8066         * infcall.c (find_function_return_type): Delete.
8067         (find_function_addr): Add 'function_type' parameter.  For calls to
8068         GNU ifunc functions, try to find the type of the target function
8069         from the type that the resolver returns, and return it via
8070         FUNCTION_TYPE.
8071         (call_function_by_hand_dummy): Adjust to use the function type
8072         returned by find_function_addr.
8073         (find_function_addr): Add 'function_type' parameter and move
8074         description here.
8075         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8076         declarations.
8077
8078 2018-04-26  Pedro Alves  <palves@redhat.com>
8079
8080         * c-exp.y (variable production): Skip finding an alias for ifunc
8081         symbols.
8082
8083 2018-04-26  Pedro Alves  <palves@redhat.com>
8084
8085         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8086
8087 2018-04-25  Pedro Alves  <palves@redhat.com>
8088
8089         * infcmd.c (kill_command): Print the pid as string, not the whole
8090         thread's ptid.  Add comment.  s/has been killed/killed/ in output
8091         message.
8092         * remote.c (remote_detach_1): Print the pid as string, not the
8093         whole thread's ptid.
8094
8095 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8096             Sergio Durigan Junior  <sergiodj@redhat.com>
8097             Pedro Alves  <palves@redhat.com>
8098
8099         * infcmd.c (kill_command): Print message when inferior has
8100         been killed.
8101         * inferior.c (print_inferior_events): Remove 'static'.  Set as
8102         '1'.
8103         (add_inferior): Improve message printed when
8104         'print_inferior_events' is on.
8105         (exit_inferior): Remove message printed when
8106         'print_inferior_events' is on.
8107         (detach_inferior): Improve message printed when
8108         'print_inferior_events' is on.
8109         (initialize_inferiors): Use 'add_inferior_silent' to set
8110         'current_inferior_'.
8111         * inferior.h (print_inferior_events): Declare here as
8112         'extern'.
8113         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8114         '[Detaching...]' messages when 'print_inferior_events' is on.
8115         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
8116         as prefix/suffix for messages.  Remove periods.  Fix erroneous
8117         'Detaching after fork from child...', replace it by '... from
8118         parent...'.
8119         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8120         prefix/suffix when printing 'Detaching...' messages.  Print
8121         them when 'print_inferior_events' is on.
8122         * remote.c (remote_detach_1): Print message when detaching
8123         from inferior and '!is_fork_parent'.
8124
8125 2018-04-24  Tom Tromey  <tom@tromey.com>
8126
8127         * cli-out.h: Reindent.
8128
8129 2018-04-24  Tom Tromey  <tom@tromey.com>
8130
8131         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8132         (cli_ui_out::do_field_string): Use fputs_filtered.
8133         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8134
8135 2018-04-23  Tom Tromey  <tom@tromey.com>
8136
8137         * guile/scm-frame.c (gdbscm_frame_read_var): Use
8138         gdb::unique_xmalloc_ptr.
8139
8140 2018-04-23  Tom Tromey  <tom@tromey.com>
8141
8142         * configure: Rebuild.
8143
8144 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
8145
8146         PR gdb/23095
8147         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8148         prepare_for_testing.  Set normal_bp to r_debug_state if target
8149         is bsd.
8150
8151 2018-04-21  Pedro Alves  <palves@redhat.com>
8152             Rajendra SY  <rajendra.sy@gmail.com>
8153
8154         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8155         * remote.c (extended_remote_attach): In all-stop mode, mark the
8156         thread as executing.
8157
8158 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8159
8160         * thread.c (thread_apply_all_command): Fix comment.
8161         (thread_command): Fix comment.
8162
8163 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
8164
8165         * common/tdesc.h (tdesc_create_feature): Remove xml filename
8166         parameter.
8167         * features/aarch64-core.c (create_feature_aarch64_core):
8168         Regenerate.
8169         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8170         Likewise.
8171         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8172         Likewise.
8173         * features/i386/32bit-avx512.c
8174         (create_feature_i386_32bit_avx512): Likewise.
8175         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8176         Likewise.
8177         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8178         Likewise.
8179         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8180         Likewise.
8181         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8182         Likewise.
8183         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8184         Likewise.
8185         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8186         Likewise.
8187         * features/i386/64bit-avx512.c
8188         (create_feature_i386_64bit_avx512): Likewise.
8189         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8190         Likewise.
8191         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8192         Likewise.
8193         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8194         Likewise.
8195         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8196         Likewise.
8197         * features/i386/64bit-segments.c
8198         (create_feature_i386_64bit_segments): Likewise.
8199         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8200         Likewise.
8201         * features/i386/x32-core.c
8202         (create_feature_i386_x32_core): Likewise.
8203         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8204         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8205         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8206         * target-descriptions.c: In generated code, don't pass xml
8207         filename.
8208
8209 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8210
8211         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8212         (print_xml_feature::visit_post): Likewise.
8213         (print_xml_feature::visit): Likewise.
8214         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8215         (print_xml_feature): Add new class.
8216         * regformats/regdat.sh: Null xmltarget on feature targets.
8217         * target-descriptions.c (struct target_desc): Add xmltarget.
8218         (maintenance_check_tdesc_xml_convert): Add unittest function.
8219         (tdesc_get_features_xml): Add function to get xml.
8220         (maintenance_check_xml_descriptions): Test xml generation.
8221         * xml-tdesc.c (string_read_description_xml): Add function.
8222         * xml-tdesc.h (string_read_description_xml): Add declaration.
8223
8224 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8225
8226         * features/Makefile: Add feature marker to targets with new style
8227         target descriptions.
8228         * regformats/aarch64.dat: Regenerate.
8229         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8230         * regformats/i386/amd64-avx-linux.dat: Likewise.
8231         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8232         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8233         * regformats/i386/amd64-linux.dat: Likewise.
8234         * regformats/i386/amd64-mpx-linux.dat: Likewise.
8235         * regformats/i386/amd64.dat: Likewise.
8236         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8237         * regformats/i386/i386-avx-linux.dat: Likewise.
8238         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8239         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8240         * regformats/i386/i386-linux.dat: Likewise.
8241         * regformats/i386/i386-mmx-linux.dat: Likewise.
8242         * regformats/i386/i386-mpx-linux.dat: Likewise.
8243         * regformats/i386/i386.dat: Likewise.
8244         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8245         * regformats/i386/x32-avx-linux.dat: Likewise.
8246         * regformats/i386/x32-linux.dat: Likewise.
8247         * regformats/tic6x-c62x-linux.dat: Likewise.
8248         * regformats/tic6x-c64x-linux.dat: Likewise.
8249         * regformats/tic6x-c64xp-linux.dat: Likewise.
8250         * regformats/regdat.sh: Parse feature marker.
8251
8252 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8253
8254         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8255         (tdesc_osabi_name): Likewise.
8256         * target-descriptions.c (tdesc_architecture_name): Add new
8257         function.
8258         (tdesc_osabi_name): Likewise.
8259
8260 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8261
8262         * common/tdesc.c (tdesc_predefined_type): Move to here.
8263         (tdesc_named_type): Likewise.
8264         (tdesc_create_vector): Likewise.
8265         (tdesc_create_struct): Likewise.
8266         (tdesc_set_struct_size): Likewise.
8267         (tdesc_create_union): Likewise.
8268         (tdesc_create_flags): Likewise.
8269         (tdesc_create_enum): Likewise.
8270         (tdesc_add_field): Likewise.
8271         (tdesc_add_typed_bitfield): Likewise.
8272         (tdesc_add_bitfield): Likewise.
8273         (tdesc_add_flag): Likewise.
8274         (tdesc_add_enum_value): Likewise.
8275         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8276         (struct tdesc_type_vector): Likewise.
8277         (struct tdesc_type_field): Likewise.
8278         (struct tdesc_type_with_fields): Likewise.
8279         (tdesc_create_enum): Add declaration.
8280         (tdesc_add_typed_bitfield): Likewise.
8281         (tdesc_add_enum_value): Likewise.
8282         * target-descriptions.c (tdesc_type_field): Move from here.
8283         (tdesc_type_builtin): Likewise.
8284         (tdesc_type_vector): Likewise.
8285         (tdesc_type_with_fields): Likewise.
8286         (tdesc_predefined_types): Likewise.
8287         (tdesc_named_type): Likewise.
8288         (tdesc_create_vector): Likewise.
8289         (tdesc_create_struct): Likewise.
8290         (tdesc_set_struct_size): Likewise.
8291         (tdesc_create_union): Likewise.
8292         (tdesc_create_flags): Likewise.
8293         (tdesc_create_enum): Likewise.
8294         (tdesc_add_field): Likewise.
8295         (tdesc_add_typed_bitfield): Likewise.
8296         (tdesc_add_bitfield): Likewise.
8297         (tdesc_add_flag): Likewise.
8298         (tdesc_add_enum_value): Likewise.
8299         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8300         (tdesc_add_typed_bitfield): Likewise.
8301         (tdesc_add_enum_value): Likewise.
8302
8303 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8304
8305         * common/tdesc.c (tdesc_feature::accept): Move to here.
8306         (tdesc_feature::operator==): Likewise.
8307         (tdesc_create_reg): Likewise.
8308         * common/tdesc.h (tdesc_type_kind): Likewise.
8309         (struct tdesc_type): Likewise.
8310         (struct tdesc_feature): Likewise.
8311         * regformats/regdat.sh: Create a feature.
8312         * target-descriptions.c (tdesc_type_kind): Move from here.
8313         (tdesc_type): Likewise.
8314         (tdesc_type_up): Likewise.
8315         (tdesc_feature): Likewise.
8316         (tdesc_create_reg): Likewise.
8317
8318 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
8319
8320         * Makefile.in: Add arch/tdesc.c
8321         * common/tdesc.c: New file.
8322         * common/tdesc.h (tdesc_element_visitor): Move to here.
8323         (tdesc_element): Likewise.
8324         (tdesc_reg): Likewise.
8325         (tdesc_reg_up): Likewise.
8326         * regformats/regdef.h (reg): Add offset to constructors.
8327         * target-descriptions.c (tdesc_element_visitor): Move from here.
8328         (tdesc_element): Likewise.
8329         (tdesc_reg): Likewise.
8330         (tdesc_reg_up): Likewise.
8331
8332 2018-04-17  Tom Tromey  <tom@tromey.com>
8333
8334         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8335         discriminant field.
8336
8337 2018-04-17  Tom Tromey  <tom@tromey.com>
8338
8339         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8340
8341 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8342
8343         * symtab.c (print_symbol_info): Skip printing filename and line
8344         number when `last' is NULL.
8345         (symtab_symbol_info): Use empty string instead of NULL for first
8346         invocation of print_symbol_info.
8347         (rbreak_command): Pass NULL to `last' parameter of
8348         print_symbol_info.
8349
8350 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
8351
8352         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8353         instead of nullptr.
8354
8355 2018-04-16  Pedro Alves  <palves@redhat.com>
8356
8357         * MAINTAINERS (sh): Remove.
8358         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8359         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8360         (ALLDEPFILES): Remove sh64-tdep.c.
8361         * NEWS: Mentions that support for SH-5/SH64 is removed.
8362         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8363         (sh*-*-openbsd*): Ditto.
8364         (sh64-*-elf*): Remove.
8365         (sh*): Remove.
8366         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8367         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8368         * sh-tdep.c: No longer include "sh64-tdep.h".
8369         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8370         * sh64-tdep.c, sh64-tdep.h: Remove files.
8371
8372 2018-04-16  Pedro Alves  <palves@redhat.com>
8373
8374         * MAINTAINERS: Remove m88k.
8375         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8376         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8377         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8378         * NEWS: Mention that support for m88k was removed.
8379         * configure.host (m88*-*-*): Remove support.
8380         * configure.nat (m88k-*-*): Remove support.
8381         * configure.tgt (m88*-*-openbsd*): Remove.
8382         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8383
8384 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
8385
8386         * configure.tgt (x86_tobjs): New variable.
8387         (amd64_tobjs, i386_tobjs): Use it.
8388
8389 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8390
8391         * symtab.c (print_symbol_info): Precede the symbol definition by
8392         the line number when available.
8393         * NEWS: Advertise this enhancement.
8394
8395 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8396
8397         * NEWS (New options): announce set/show record btrace cpu.
8398         * btrace.c: Include record-btrace.h.
8399         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8400         the vendor is unknown.
8401         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
8402         Maybe overwrite the btrace configuration's cpu.
8403         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
8404         (btrace_fetch): Add cpu parameter.  Update callers.
8405         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8406         Maybe overwrite the btrace configuration's cpu.  Skip enabling
8407         errata workarounds if the vendor is unknown.
8408         * python/py-record-btrace.c: Include record-btrace.h.
8409         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8410         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8411         * record-btrace.c (record_btrace_cpu_state_kind): New.
8412         (record_btrace_cpu): New.
8413         (set_record_btrace_cpu_cmdlist): New.
8414         (record_btrace_get_cpu): New.
8415         (require_btrace_thread, record_btrace_info)
8416         (record_btrace_resume_thread): Call record_btrace_get_cpu.
8417         (cmd_set_record_btrace_cpu_none): New.
8418         (cmd_set_record_btrace_cpu_auto): New.
8419         (cmd_set_record_btrace_cpu): New.
8420         (cmd_show_record_btrace_cpu): New.
8421         (_initialize_record_btrace): Initialize set/show record btrace cpu
8422         commands.
8423         * record-btrace.h (record_btrace_get_cpu): New.
8424
8425 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8426
8427         * record.c (set_record_command): Fix typo in message.
8428
8429 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8430
8431         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8432
8433 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
8434
8435         * infrun.c (process_event_stop_test): Call
8436         gdbarch_in_indirect_branch_thunk.
8437         * gdbarch.sh (in_indirect_branch_thunk): New.
8438         * gdbarch.c: Regenerated.
8439         * gdbarch.h: Regenerated.
8440         * x86-tdep.h: New.
8441         * x86-tdep.c: New.
8442         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8443         (HFILES_NO_SRCDIR): Add x86-tdep.h.
8444         (ALLDEPFILES): Add x86-tdep.c.
8445         * arch-utils.h (default_in_indirect_branch_thunk): New.
8446         * arch-utils.c (default_in_indirect_branch_thunk): New.
8447         * i386-tdep: Include x86-tdep.h.
8448         (i386_in_indirect_branch_thunk): New.
8449         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8450         function.
8451         * amd64-tdep: Include x86-tdep.h.
8452         (amd64_in_indirect_branch_thunk): New.
8453         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8454
8455 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8456
8457         PR gdb/23053
8458         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8459         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8460         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8461         regression.
8462
8463 2018-04-12  Tom Tromey  <tom@tromey.com>
8464
8465         * rust-lang.c (rust_print_struct_def): Remove univariant code.
8466         (rust_evaluate_subexp): Likewise.
8467
8468 2018-04-12  Pedro Alves  <palves@redhat.com>
8469
8470         * procfs.c (procfs_detach): Make forward declaration's prototype
8471         match definition's protototype.
8472         (proc_get_LDT_entry): Remove stale do_cleanups call.
8473
8474 2018-04-12  Pedro Alves  <palves@redhat.com>
8475
8476         * target.h (target_ops::to_has_exited): Delete.
8477         (target_has_exited): Delete.
8478         * target-delegates.c: Regenerate.
8479
8480 2018-04-11  Pedro Alves  <palves@redhat.com>
8481
8482         * target.c (fileio_fh_t::t): Add comment.
8483         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8484         (target_fileio_close): Handle a NULL target.
8485         (invalidate_fileio_fh): New.
8486         (target_close): Call it.
8487         * remote.c (remote_hostio_send_command): No longer check whether
8488         remote_desc is open.
8489
8490 2018-04-11  Pedro Alves  <palves@redhat.com>
8491
8492         * target.c (fileio_fh_t): Make it a named struct instead of a
8493         typedef.
8494         (fileio_fh_t::is_closed): New method.
8495         (DEF_VEC_O (fileio_fh_t)): Remove.
8496         (fileio_fhandles): Now a std::vector.
8497         (is_closed_fileio_fh): Delete.
8498         (acquire_fileio_fd): Adjust.  Rename parameters.
8499         (release_fileio_fd): Adjust.
8500         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8501         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8502         (target_fileio_close): Adjust.
8503
8504 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
8505
8506         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8507         index.
8508
8509 2018-04-10  Pedro Alves  <palves@redhat.com>
8510
8511         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8512         (scoped_finish_thread_state): New class.
8513         * infcmd.c (run_command_1): Use it instead of finish_thread_state
8514         cleanup.
8515         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8516         (fetch_inferior_event, normal_stop): Likewise.
8517         * thread.c (finish_thread_state_cleanup): Delete.
8518
8519 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8520             Pedro Alves  <palves@redhat.com>
8521
8522         * value.c: Include "selftest.h" and "common/array-view.h".
8523         (struct range) <operator ==>: New.
8524         (test_ranges_contain): New.
8525         (check_ranges_vector): New.
8526         (test_insert_into_bit_range_vector): New.
8527         (_initialize_values): Register selftests.
8528         * common/array-view.h (operator==, operator!=): New.
8529
8530 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8531
8532         * common/gdb_vecs.h (unordered_remove): Add overload that takes
8533         an iterator.
8534         * inline-frame.c: Include <algorithm>.
8535         (struct inline_state): Add constructor.
8536         (inline_state_s): Remove.
8537         (DEF_VEC_O(inline_state_s)): Remove.
8538         (inline_states): Change type to std::vector.
8539         (find_inline_frame_state): Adjust to std::vector.
8540         (allocate_inline_frame_state): Remove.
8541         (clear_inline_frame_state): Adjust to std::vector.
8542         (skip_inline_frames): Adjust to std::vector.
8543
8544 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8545
8546         * tracepoint.h (struct trace_state_variable): Add constructor.
8547         <name>: Change type to std::string.
8548         * tracepoint.c (tsv_s): Remove.
8549         (DEF_VEC_O(tsv_s)): Remove.
8550         (tvariables): Change to std::vector.
8551         (create_trace_state_variable): Adjust to std::vector.
8552         (find_trace_state_variable): Likewise.
8553         (find_trace_state_variable_by_number): Likewise.
8554         (delete_trace_state_variable): Likewise.
8555         (trace_variable_command): Adjust to std::string.
8556         (delete_trace_variable_command): Likewise.
8557         (tvariables_info_1): Adjust to std::vector.
8558         (save_trace_state_variables): Likewise.
8559         (start_tracing): Likewise.
8560         (merge_uploaded_trace_state_variables): Adjust to std::vector
8561         and std::string.
8562         * target.h (struct target_ops)
8563         <to_download_trace_state_variable>: Pass reference to
8564         trace_state_variable.
8565         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8566         * target-delegates.c: Re-generate.
8567         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8568         (mi_tsv_deleted): Likewise.
8569         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8570         * remote.c (remote_download_trace_state_variable): Change
8571         pointer to reference and adjust.
8572         * make-target-delegates (parse_argtypes): Handle references.
8573         (write_function_header): Likewise.
8574         (munge_type): Likewise.
8575
8576 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8577
8578         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8579         string_view-selftests.c.
8580         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8581         testsuite.
8582         * unittests/basic_string_view/cons/char/1.cc: Likewise.
8583         * unittests/basic_string_view/cons/char/2.cc: Likewise.
8584         * unittests/basic_string_view/cons/char/3.cc: Likewise.
8585         * unittests/basic_string_view/element_access/char/1.cc:
8586         Likewise.
8587         * unittests/basic_string_view/element_access/char/empty.cc:
8588         Likewise.
8589         * unittests/basic_string_view/element_access/char/front_back.cc:
8590         Likewise.
8591         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8592         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8593         Likewise.
8594         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8595         Likewise.
8596         * unittests/basic_string_view/modifiers/swap/char/1.cc:
8597         Likewise.
8598         * unittests/basic_string_view/operations/compare/char/1.cc:
8599         Likewise.
8600         * unittests/basic_string_view/operations/compare/char/13650.cc:
8601         Likewise.
8602         * unittests/basic_string_view/operations/copy/char/1.cc:
8603         Likewise.
8604         * unittests/basic_string_view/operations/data/char/1.cc:
8605         Likewise.
8606         * unittests/basic_string_view/operations/find/char/1.cc:
8607         Likewise.
8608         * unittests/basic_string_view/operations/find/char/2.cc:
8609         Likewise.
8610         * unittests/basic_string_view/operations/find/char/3.cc:
8611         Likewise.
8612         * unittests/basic_string_view/operations/find/char/4.cc:
8613         Likewise.
8614         * unittests/basic_string_view/operations/rfind/char/1.cc:
8615         Likewise.
8616         * unittests/basic_string_view/operations/rfind/char/2.cc:
8617         Likewise.
8618         * unittests/basic_string_view/operations/rfind/char/3.cc:
8619         Likewise.
8620         * unittests/basic_string_view/operations/substr/char/1.cc:
8621         Likewise.
8622         * unittests/basic_string_view/operators/char/2.cc: Likewise.
8623         * unittests/string_view-selftests.c: New file.
8624
8625 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8626
8627         * unittests/basic_string_view/capacity/1.cc: New file.
8628         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8629         * unittests/basic_string_view/cons/char/1.cc: New file.
8630         * unittests/basic_string_view/cons/char/2.cc: New file.
8631         * unittests/basic_string_view/cons/char/3.cc: New file.
8632         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8633         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8634         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8635         * unittests/basic_string_view/element_access/char/1.cc: New file.
8636         * unittests/basic_string_view/element_access/char/2.cc: New file.
8637         * unittests/basic_string_view/element_access/char/empty.cc: New file.
8638         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8639         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8640         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8641         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8642         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8643         * unittests/basic_string_view/include.cc: New file.
8644         * unittests/basic_string_view/inserters/char/1.cc: New file.
8645         * unittests/basic_string_view/inserters/char/2.cc: New file.
8646         * unittests/basic_string_view/inserters/char/3.cc: New file.
8647         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8648         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8649         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8650         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8651         * unittests/basic_string_view/literals/types.cc: New file.
8652         * unittests/basic_string_view/literals/values.cc: New file.
8653         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8654         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8655         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8656         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8657         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8658         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8659         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8660         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8661         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8662         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8663         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8664         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8665         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8666         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8667         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8668         * unittests/basic_string_view/operations/data/char/1.cc: New file.
8669         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8670         * unittests/basic_string_view/operations/find/char/1.cc: New file.
8671         * unittests/basic_string_view/operations/find/char/2.cc: New file.
8672         * unittests/basic_string_view/operations/find/char/3.cc: New file.
8673         * unittests/basic_string_view/operations/find/char/4.cc: New file.
8674         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8675         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8676         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8677         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8678         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8679         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8680         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8681         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8682         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8683         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8684         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8685         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8686         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8687         * unittests/basic_string_view/operators/char/2.cc: New file.
8688         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8689         * unittests/basic_string_view/range_access/char/1.cc: New file.
8690         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8691         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8692         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8693         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8694         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8695         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8696         * unittests/basic_string_view/requirements/typedefs.cc: New file.
8697         * unittests/basic_string_view/typedefs.cc: New file.
8698         * unittests/basic_string_view/types/1.cc: New file.
8699
8700 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8701
8702         * common/gdb_string_view.h: Remove libstdc++ implementation
8703         details, adjust to gdb reality.
8704         * common/gdb_string_view.tcc: Likewise.
8705         * cli/cli-script.c (struct string_view): Remove.
8706         (user_args) <m_args>: Change element type to gdb::string_view.
8707         (user_args::insert_args): Adjust.
8708
8709 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8710
8711         * common/gdb_string_view.h: New file.
8712         * common/gdb_string_view.tcc: New file.
8713
8714 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
8715
8716         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8717         * configure: Re-generate.
8718
8719 2018-04-09  Pedro Alves  <palves@redhat.com>
8720
8721         * gdbarch.sh: Include "observable.h" instead of "observer.h".
8722         (set_target_gdbarch): Call
8723         gdb::observers::architecture_changed.notify instead of
8724         observer_notify_architecture_changed.
8725
8726 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8727
8728         * tracepoint.c (struct current_traceframe_cleanup): Remove.
8729         (do_restore_current_traceframe_cleanup): Remove.
8730         (restore_current_traceframe_cleanup_dtor): Remove.
8731         (make_cleanup_restore_current_traceframe): Remove.
8732         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8733         New.
8734         * tracepoint.h (struct scoped_restore_current_traceframe): New.
8735         * infrun.c (fetch_inferior_event): Use
8736         scoped_restore_current_traceframe.
8737
8738 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8739
8740         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8741         Remove.
8742         <n_allocated_type_units>: Remove.
8743         <all_type_units>: Change to std::vector.
8744         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8745         to std::vector change.
8746         (dwarf2_per_objfile::get_cutu): Likewise.
8747         (dwarf2_per_objfile::get_tu): Likewise.
8748         (create_signatured_type_table_from_index): Likewise.
8749         (create_signatured_type_table_from_debug_names): Likewise.
8750         (dw2_symtab_iter_next): Likewise.
8751         (dw2_print_stats): Likewise.
8752         (dw2_expand_all_symtabs): Likewise.
8753         (dw2_expand_marked_cus): Likewise.
8754         (dw2_debug_names_iterator::next): Likewise.
8755         (dwarf2_initialize_objfile): Likewise.
8756         (add_signatured_type_cu_to_table): Likewise.
8757         (create_all_type_units): Likewise.
8758         (add_type_unit): Likewise.
8759         (struct tu_abbrev_offset): Add constructor.
8760         (build_type_psymtabs_1): Adjust to std::vector change.
8761         (print_tu_stats): Likewise.
8762         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8763         (write_debug_names): Likewise.
8764
8765 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8766
8767         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8768         Make an std::vector.
8769         <n_comp_units>: Remove.
8770         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8771         to std::vector change.
8772         (dwarf2_per_objfile::get_cutu): Likewise.
8773         (dwarf2_per_objfile::get_cu): Likewise.
8774         (create_cus_from_index): Likewise.
8775         (create_addrmap_from_index): Likewise.
8776         (create_addrmap_from_aranges): Likewise.
8777         (dwarf2_read_index): Likewise.
8778         (dw2_find_last_source_symtab): Likewise.
8779         (dw2_map_symtabs_matching_filename): Likewise.
8780         (dw2_symtab_iter_next): Likewise.
8781         (dw2_print_stats): Likewise.
8782         (dw2_expand_all_symtabs): Likewise.
8783         (dw2_expand_symtabs_with_fullname): Likewise.
8784         (dw2_expand_marked_cus): Likewise.
8785         (dw2_map_symbol_filenames): Likewise.
8786         (create_cus_from_debug_names): Likewise.
8787         (dwarf2_read_debug_names): Likewise.
8788         (dw2_debug_names_iterator::next): Likewise.
8789         (dwarf2_initialize_objfile): Likewise.
8790         (set_partial_user): Likewise.
8791         (dwarf2_build_psymtabs_hard): Likewise.
8792         (read_comp_units_from_section): Remove arguments, adjust to
8793         std::vector change.
8794         (create_all_comp_units): Adjust to std::vector and
8795         read_comp_units_from_section changes.
8796         (dwarf2_find_containing_comp_unit): Adjust to std::vector
8797         change.
8798         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8799         (psyms_seen_size): Likewise.
8800         (write_gdbindex): Likewise.
8801         (write_debug_names): Likewise.
8802
8803 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8804
8805         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
8806         with dwarf2_per_objfile.
8807         (create_cus_from_index): Likewise.
8808         (create_signatured_type_table_from_index): Likewise.
8809         (dwarf2_read_index): Likewise.
8810         (dwarf2_initialize_objfile): Likewise.
8811         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
8812         per_cu rather than get_dwarf2_per_objfile.
8813
8814 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8815
8816         * dwarf2read.h (struct signatured_type): Forward declare.
8817         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
8818         New methods.
8819         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
8820         (dw2_get_cutu): ...this.
8821         (dwarf2_per_objfile::get_cu): Rename from...
8822         (dw2_get_cu): ...this.
8823         (dwarf2_per_objfile::get_tu): New.
8824         (create_addrmap_from_index): Adjust.
8825         (create_addrmap_from_aranges): Adjust.
8826         (dw2_find_last_source_symtab): Adjust.
8827         (dw2_map_symtabs_matching_filename): Adjust.
8828         (dw2_symtab_iter_next): Adjust.
8829         (dw2_print_stats): Adjust.
8830         (dw2_expand_all_symtabs): Adjust.
8831         (dw2_expand_symtabs_with_fullname): Adjust.
8832         (dw2_expand_marked_cus): Adjust.
8833         (dw_expand_symtabs_matching_file_matcher): Adjust.
8834         (dw2_map_symbol_filenames): Adjust.
8835         (dw2_debug_names_iterator::next): Adjust.
8836         (dwarf2_initialize_objfile): Adjust.
8837         (set_partial_user): Adjust.
8838         (dwarf2_build_psymtabs_hard): Adjust.
8839
8840 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8841
8842         * dwarf2read.c (create_signatured_type_table_from_debug_names):
8843         Remove unused variables.
8844         (dw2_map_symtabs_matching_filename): Likewise.
8845         (dwarf2_record_block_ranges): Likewise.
8846         (dwarf2_read_addr_index): Likewise.
8847         (follow_die_offset): Likewise.
8848
8849 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8850
8851         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8852         to symbol_file_add_main.
8853
8854 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8855
8856         PR mi/22299
8857         * mi/mi-console.c (do_fputc_async_safe): New.
8858         (mi_console_file::write_async_safe): New.
8859         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8860         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8861         New.
8862         * ui-file.c (ui_file::putstrn): Adjust call to
8863         fputstrn_unfiltered.
8864         * utils.c (printchar): Replace do_fputs and do_fprintf
8865         parameters by do_fputc.
8866         (fputstr_filtered): Adjust call to printchar.
8867         (fputstr_unfiltered): Likewise.
8868         (fputstrn_filtered): Likewise.
8869         (fputstrn_unfiltered): Add do_fputc parameter, pass to
8870         printchar.
8871         * utils.h (do_fputc_ftype): New typedef.
8872         (fputstrn_unfiltered): Add do_fputc parameter.
8873
8874 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
8875
8876         * regformats/i386/i386-avx.dat: Remove.
8877
8878 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8879
8880         PR gdb/22979
8881         * amd64-tdep.c (amd64_none_init_abi): New function.
8882         (amd64_x32_none_init_abi): New function.
8883         (_initialize_amd64_tdep): Register handlers for x86-64 and
8884         x64_32 with GDB_OSABI_NONE.
8885         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8886         GDB_OSABI_NONE osabi.
8887
8888 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8889
8890         PR gdb/22980
8891         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8892         GDB_OSABI_NONE.
8893         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8894         * osabi.c (gdb_osabi_names): Add "unknown" entry.
8895
8896 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
8897
8898         * common/byte-vector.h (char_vector): New type.
8899         * target.h (target_read_alloc): Return
8900         gdb::optional<byte_vector>.
8901         (target_read_stralloc): Return gdb::optional<char_vector>.
8902         (target_get_osdata): Return gdb::optional<char_vector>.
8903         * target.c (target_read_alloc_1): Templatize.  Replacement
8904         manual memory management with vector.
8905         (target_read_alloc): Change return type, adjust.
8906         (target_read_stralloc): Change return type, adjust.
8907         (target_get_osdata): Change return type, adjust.
8908         * auxv.c (struct auxv_info) <length>: Remove.
8909         <data>: Change type to gdb::optional<byte_vector>.
8910         (auxv_inferior_data_cleanup): Free auxv_info with delete.
8911         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8912         (target_auxv_search): Adjust.
8913         (fprint_target_auxv): Adjust.
8914         * avr-tdep.c (avr_io_reg_read_command): Adjust.
8915         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8916         (linux_make_corefile_notes): Adjust.
8917         * osdata.c (get_osdata): Adjust.
8918         * remote.c (remote_get_threads_with_qxfer): Adjust.
8919         (remote_memory_map): Adjust.
8920         (remote_traceframe_info): Adjust.
8921         (btrace_read_config): Adjust.
8922         (remote_read_btrace): Adjust.
8923         (remote_pid_to_exec_file): Adjust.
8924         * solib-aix.c (solib_aix_get_library_list): Adjust.
8925         * solib-dsbt.c (decode_loadmap): Don't free buf.
8926         (dsbt_get_initial_loadmaps): Adjust.
8927         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8928         * solib-target.c (solib_target_current_sos): Adjust.
8929         * tracepoint.c (sdata_make_value): Adjust.
8930         * xml-support.c (xinclude_start_include): Adjust.
8931         (xml_fetch_content_from_file): Adjust.
8932         * xml-support.h (xml_fetch_another): Change return type.
8933         (xml_fetch_content_from_file): Change return type.
8934         * xml-syscall.c (xml_init_syscalls_info): Adjust.
8935         * xml-tdesc.c (file_read_description_xml): Adjust.
8936         (fetch_available_features_from_target): Change return type.
8937         (target_fetch_description_xml): Adjust.
8938         (target_read_description_xml): Adjust.
8939
8940 2018-04-06  Tom Tromey  <tom@tromey.com>
8941
8942         * value.c (~value): Update.
8943         (struct value) <contents>: Now unique_xmalloc_ptr.
8944         (value_contents_bits_eq, allocate_value_contents)
8945         (value_contents_raw, value_contents_all_raw)
8946         (value_contents_for_printing, value_contents_for_printing_const)
8947         (set_value_enclosing_type): Update.
8948
8949 2018-04-06  Tom Tromey  <tom@tromey.com>
8950
8951         * value.c (range_s): Remove typedef, VEC.
8952         (struct range): Add operator<.
8953         (range_lessthan): Remove.
8954         (ranges_contain): Change type.
8955         (~value): Update.
8956         (struct value) <unavailable, optimized_out>: Now std::vector.
8957         (value_entirely_available)
8958         (value_entirely_covered_by_range_vector)
8959         (value_entirely_unavailable, value_entirely_optimized_out):
8960         Update.
8961         (insert_into_bit_range_vector): Change argument type.
8962         (find_first_range_overlap): Likewise.
8963         (struct ranges_and_idx, value_contents_bits_eq)
8964         (require_not_optimized_out, require_available): Update.
8965         (ranges_copy_adjusted): Change argument types.
8966         (value_optimized_out, value_copy, value_fetch_lazy): Update.
8967
8968 2018-04-06  Tom Tromey  <tom@tromey.com>
8969
8970         * value.c (~value): Update.
8971         (struct value) <parent>: Now a value_ref_ptr.
8972         (value_parent, set_value_parent, value_address, value_copy):
8973         Update.
8974
8975 2018-04-06  Tom Tromey  <tom@tromey.com>
8976
8977         * value.c (struct value): Add constructor, destructor, and member
8978         initializers.
8979         (allocate_value_lazy, value_decref): Update.
8980
8981 2018-04-06  Tom Tromey  <tom@tromey.com>
8982
8983         * value.c (struct value) <released, next>: Remove.
8984         (all_values): Now a std::vector.
8985         (allocate_value_lazy): Update.
8986         (value_next): Remove.
8987         (value_mark, value_free_to_mark, release_value)
8988         (value_release_to_mark): Update.
8989
8990 2018-04-06  Tom Tromey  <tom@tromey.com>
8991
8992         * value.h (fetch_subexp_value, value_release_to_mark): Update.
8993         (free_value_chain): Remove.
8994         * value.c (free_value_chain): Remove.
8995         (value_release_to_mark): Return a std::vector.
8996         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8997         std::vector.
8998         (check_condition): Update.
8999         * eval.c (fetch_subexp_value): Change "val_chain" to a
9000         std::vector.
9001         * breakpoint.c (update_watchpoint): Update.
9002         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9003
9004 2018-04-06  Tom Tromey  <tom@tromey.com>
9005
9006         * value.h (free_all_values): Remove.
9007         * value.c (free_all_values): Remove.
9008
9009 2018-04-06  Tom Tromey  <tom@tromey.com>
9010
9011         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9012         (value_history_chain, value_history_count): Remove.
9013         (value_history): New global.
9014         (record_latest_value, access_value_history, show_values)
9015         (preserve_values): Update.
9016
9017 2018-04-06  Tom Tromey  <tom@tromey.com>
9018
9019         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9020         * varobj.c (varobj_set_display_format, varobj_set_value)
9021         (install_default_visualizer, construct_visualizer)
9022         (install_new_value, ~varobj, varobj_get_value_type)
9023         (my_value_of_variable, varobj_editable_p): Update.
9024         * c-varobj.c (c_describe_child, c_value_of_variable)
9025         (cplus_number_of_children, cplus_describe_child): Update.
9026         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9027         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9028         (ada_value_of_variable, ada_value_is_changeable_p): Update.
9029
9030 2018-04-06  Tom Tromey  <tom@tromey.com>
9031
9032         * printcmd.c (last_examine_address): Change type to
9033         value_ref_ptr.
9034         (do_examine, x_command): Update.
9035
9036 2018-04-06  Tom Tromey  <tom@tromey.com>
9037
9038         * value.c (release_value): Update.
9039         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9040         (struct bpstats) <val>: Now a value_ref_ptr.
9041         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9042         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9043         (~watchpoint, print_it_watchpoint, watch_command_1)
9044         (invalidate_bp_value_on_memory_change): Update.
9045
9046 2018-04-06  Tom Tromey  <tom@tromey.com>
9047
9048         * varobj.c (varobj_clear_saved_item)
9049         (update_dynamic_varobj_children, install_new_value, ~varobj):
9050         Update.
9051         * value.h (value_incref): Move declaration earlier.
9052         (value_decref): Rename from value_free.
9053         (struct value_ref_policy): New.
9054         (value_ref_ptr): New typedef.
9055         (struct value_deleter): Remove.
9056         (gdb_value_up): Remove typedef.
9057         (release_value): Change return type.
9058         (release_value_or_incref): Remove.
9059         * value.c (set_value_parent): Update.
9060         (value_incref): Change return type.
9061         (value_decref): Rename from value_free.
9062         (value_free_to_mark, free_all_values, free_value_chain): Update.
9063         (release_value): Return value_ref_ptr.
9064         (release_value_or_incref): Remove.
9065         (record_latest_value, set_internalvar, clear_internalvar):
9066         Update.
9067         * stack.c (info_frame_command): Don't call value_free.
9068         * python/py-value.c (valpy_dealloc, valpy_new)
9069         (value_to_value_object): Update.
9070         * printcmd.c (do_examine): Update.
9071         * opencl-lang.c (lval_func_free_closure): Update.
9072         * mi/mi-main.c (register_changed_p): Don't call value_free.
9073         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9074         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9075         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9076         value_free.
9077         * guile/scm-value.c (vlscm_free_value_smob)
9078         (vlscm_scm_from_value): Update.
9079         * frame.c (frame_register_unwind, frame_unwind_register_signed)
9080         (frame_unwind_register_unsigned, get_frame_register_bytes)
9081         (put_frame_register_bytes): Don't call value_free.
9082         * findvar.c (address_from_register): Don't call value_free.
9083         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9084         * dwarf2loc.c (entry_data_value_free_closure)
9085         (value_of_dwarf_reg_entry, free_pieced_value_closure)
9086         (dwarf2_evaluate_loc_desc_full): Update.
9087         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9088         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9089         (~watchpoint, watch_command_1)
9090         (invalidate_bp_value_on_memory_change): Update.
9091         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9092
9093 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
9094
9095         PR gdb/23022
9096         * warning.m4: Add -Wno-error=deprecated-register.
9097         * configure: Re-generate.
9098
9099 2018-04-05  Tom Tromey  <tom@tromey.com>
9100
9101         * linespec.h: Remove include of "vec.h".
9102
9103 2018-04-05  Tom Tromey  <tom@tromey.com>
9104
9105         * linespec.c (typep): Remove typedef.
9106         (find_methods, find_superclass_methods): Take a std::vector.
9107         (find_method): Use std::vector.
9108
9109 2018-04-05  Tom Tromey  <tom@tromey.com>
9110
9111         * utils.c (compare_strings): Remove.
9112         * utils.h (compare_strings): Remove.
9113         * objc-lang.h (find_imps): Update.
9114         * objc-lang.c (find_methods): Take a std::vector.
9115         (uniquify_strings, find_imps): Likewise.
9116         * linespec.c (find_methods): Take a std::vector.
9117         (decode_objc): Use std::vector.
9118         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9119         a std::vector.
9120         (find_method, find_function_symbols): Use std::vector.
9121
9122 2018-04-05  Tom Tromey  <tom@tromey.com>
9123
9124         * completer.c (completion_tracker::completion_tracker): Remove
9125         cast.
9126         (completion_tracker::discard_completions): Likewise.
9127         * breakpoint.c (ambiguous_names_p): Remove cast.
9128         * ada-lang.c (_initialize_ada_language): Remove cast.
9129         * utils.h (streq): Update.
9130         (streq_hash): Add new declaration.
9131         * utils.c (streq): Return bool.
9132         (streq_hash): New function.
9133
9134 2018-04-05  Tom Tromey  <tom@tromey.com>
9135
9136         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9137         Remove a string copy.
9138
9139 2018-04-05  Tom Tromey  <tom@tromey.com>
9140
9141         * linespec.c (filter_results): Use std::vector.
9142         (decode_line_2, decode_line_full): Update.
9143
9144 2018-04-05  Tom Tromey  <tom@tromey.com>
9145
9146         * linespec.c (canonical_to_fullform): Return std::string.
9147         (filter_results): Update.
9148         (struct decode_line_2_item): Add constructor.
9149         <fullform, displayform>: Now std::string.
9150         (decode_line_2_compare_items): Now a std::sort comparator.
9151         (decode_line_2): Update.
9152
9153 2018-04-05  Tom Tromey  <tom@tromey.com>
9154
9155         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9156         (unexpected_linespec_error): Update.
9157         (linespec_parse_basic, parse_linespec): Update.
9158
9159 2018-04-05  Tom Tromey  <tom@tromey.com>
9160
9161         * linespec.c (linespec_parse_basic): Reindent.
9162
9163 2018-04-05  Tom Tromey  <tom@tromey.com>
9164
9165         * minsyms.h (iterate_over_minimal_symbols): Update.
9166         * minsyms.c (iterate_over_minimal_symbols): Take a
9167         gdb::function_view.
9168         * linespec.c (struct collect_minsyms): Remove.
9169         (compare_msyms): Now a std::sort comparator.
9170         (add_minsym): Add parameters.
9171         (search_minsyms_for_name): Update.  Use std::vector.
9172
9173 2018-04-03  Tom Tromey  <tom@tromey.com>
9174
9175         * mipsread.c (read_alphacoff_dynamic_symtab): Use
9176         gdb::byte_vector.
9177
9178 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9179
9180         * MAINTAINERS (Write After Approval): Add Weimin Pan.
9181
9182 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
9183
9184         PR gdb/16959
9185         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
9186         printing static type.
9187
9188 2018-04-01  Tom Tromey  <tom@tromey.com>
9189
9190         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9191         (rs6000_xfer_shared_libraries): Update.
9192
9193 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
9194
9195         * common/gdb_vecs.h (char_ptr): Remove.
9196         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9197
9198 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9199
9200         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9201         with std::vector.
9202         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9203
9204 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
9205
9206         * tracepoint.h (struct uploaded_tp): Initialize fields.
9207         <actions, step_actions, cmd_strings>: Change type to
9208         std::vector<char *>.
9209         * tracepoint.c (get_uploaded_tp): Allocate with new.
9210         (free_uploaded_tps): Free with delete.
9211         (parse_tracepoint_definition): Adjust to std::vector change.
9212         * breakpoint.c (read_uploaded_action): Likewise.
9213         (create_tracepoint_from_upload): Likewise.
9214         * ctf.c (ctf_write_uploaded_tp): Likewise.
9215         (SET_ARRAY_FIELD): Likewise.
9216         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9217
9218 2018-03-30  Tom Tromey  <tom@tromey.com>
9219
9220         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
9221         std::unique_ptr.
9222         (svr4_keep_data_in_core): Update.
9223         (svr4_read_so_list): Update.
9224
9225 2018-03-30  Tom Tromey  <tom@tromey.com>
9226
9227         * windows-nat.c (handle_output_debug_string, handle_exception):
9228         Update.
9229         * target.h (target_read_string): Update.
9230         * target.c (target_read_string): Change "string" to
9231         unique_xmalloc_ptr.
9232         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9233         Update.
9234         * solib-frv.c (frv_current_sos): Update.
9235         * solib-dsbt.c (dsbt_current_sos): Update.
9236         * solib-darwin.c (darwin_current_sos): Update.
9237         * linux-thread-db.c (inferior_has_bug): Update.
9238         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9239         Update.  Remove alloca.
9240         * ada-lang.c (ada_main_name): Update.
9241
9242 2018-03-30  Tom Tromey  <tom@tromey.com>
9243
9244         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9245         (struct dwo_file_deleter): New.
9246         (dwo_file_up): New typedef.
9247         (open_and_init_dwo_file): Use dwo_file_up.
9248         (free_dwo_file_cleanup): Remove.
9249
9250 2018-03-30  Tom Tromey  <tom@tromey.com>
9251
9252         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9253         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9254
9255 2018-03-30  Tom Tromey  <tom@tromey.com>
9256
9257         * dwarf2read.c (class free_cached_comp_units): New class.
9258         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9259         (free_cached_comp_units): Remove function.
9260
9261 2018-03-30  Tom Tromey  <tom@tromey.com>
9262
9263         * utils.h (make_cleanup_unpush_target): Remove.
9264         * inf-ptrace.c (struct target_unpusher): New.
9265         (target_unpush_up) New typedef.
9266         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9267         target_unpush_up.
9268         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9269
9270 2018-03-27  Tom Tromey  <tom@tromey.com>
9271
9272         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9273
9274 2018-03-27  Pedro Alves  <palves@redhat.com>
9275             Tom Tromey  <tom@tromey.com>
9276
9277         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9278         destructor.  Now a class.
9279         (gdb_readline_wrapper_cleanup): Remove function.
9280         (gdb_readline_wrapper): Remove cleanups.
9281
9282 2018-03-27  Tom Tromey  <tom@tromey.com>
9283
9284         * typeprint.h (struct type_print_options) <local_typedefs,
9285         global_typedefs>: Remove "struct" keyword.
9286         (class typedef_hash_table): New class.
9287         (recursively_update_typedef_hash, add_template_parameters)
9288         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9289         (find_typedef_in_hash): Don't declare.
9290         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9291         (typedef_hash_table::recursively_update): Rename from
9292         recursively_update_typedef_hash.  Now a member.
9293         (typedef_hash_table::add_template_parameters): Rename from
9294         add_template_parameters.  Now a member.
9295         (typedef_hash_table::typedef_hash_table): Now a constructor;
9296         rename from create_typedef_hash.
9297         (typedef_hash_table::~typedef_hash_table): Now a destructor;
9298         rename from free_typedef_hash.
9299         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9300         (do_free_global_table): Remove.
9301         (typedef_hash_table::typedef_hash_table): New constructor; renamed
9302         from copy_type_recursive.
9303         (create_global_typedef_table): Remove.
9304         (typedef_hash_table::find_global_typedef): Now a member of
9305         typedef_hash_table.
9306         (typedef_hash_table::find_typedef): Rename from
9307         find_typedef_in_hash; now a member.
9308         (whatis_exp): Update.
9309         * extension.h (struct ext_lang_type_printers): Add constructor and
9310         destructor.
9311         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9312         declare.
9313         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9314         Now a constructor; rename from start_ext_lang_type_printers.
9315         (ext_lang_type_printers): Now a destructor; rename from
9316         free_ext_lang_type_printers.
9317         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9318         Update.
9319         (c_type_print_base_struct_union): Update.  Remove cleanups.
9320
9321 2018-03-27  Tom Tromey  <tom@tromey.com>
9322
9323         * dwarf-index-write.c: Include <cmath>.
9324
9325 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9326
9327         * NEWS: Add entry describing new "set|show varsize-limit" command.
9328         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9329         command.
9330         * printcmd.c (_initialize_printcmd): Add "set var" alias of
9331         "set variable".
9332
9333 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
9334
9335         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9336         dwarf-index-write.c
9337         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9338         * dwarf-index-common.c: New file.
9339         * dwarf-index-common.h: New file.
9340         * dwarf-index-write.c: New file.
9341         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9342         (struct dwarf2_section_info): Move from here.
9343         (dwarf2_section_info_def): Likewise.
9344         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9345         (offset_type): Likewise.
9346         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9347         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9348         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9349         (byte_swap): Likewise.
9350         (MAYBE_SWAP): Likewise.
9351         (dwarf2_per_cu_ptr): Likewise.
9352         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9353         (struct tu_stats): Likewise.
9354         (struct dwarf2_per_objfile): Likewise.
9355         (struct dwarf2_per_cu_data): Likewise.
9356         (struct signatured_type): Likewise.
9357         (sig_type_ptr): Likewise.
9358         (DEF_VEC_P (sig_type_ptr)): Likewise.
9359         (INDEX4_SUFFIX): Likewise.
9360         (INDEX5_SUFFIX): Likewise.
9361         (DEBUG_STR_SUFFIX): Likewise.
9362         (dwarf2_read_section): Make non-static.
9363         (mapped_index_string_hash): Move from here.
9364         (dwarf5_djb_hash): Likewise.
9365         (file_write): Likewise.
9366         (class data_buf): Likewise.
9367         (struct symtab_index_entry): Likewise.
9368         (struct mapped_symtab): Likewise.
9369         (find_slot): Likewise.
9370         (hash_expand): Likewise.
9371         (add_index_entry): Likewise.
9372         (uniquify_cu_indices): Likewise.
9373         (class c_str_view): Likewise.
9374         (class c_str_view_hasher): Likewise.
9375         (class vector_hasher): Likewise.
9376         (write_hash_table): Likewise.
9377         (psym_index_map): Likewise.
9378         (struct addrmap_index_data): Likewise.
9379         (add_address_entry): Likewise.
9380         (add_address_entry_worker): Likewise.
9381         (write_address_map): Likewise.
9382         (symbol_kind): Likewise.
9383         (write_psymbols): Likewise.
9384         (struct signatured_type_index_data): Likewise.
9385         (write_one_signatured_type): Likewise.
9386         (recursively_count_psymbols): Likewise.
9387         (recursively_write_psymbols): Likewise.
9388         (class debug_names): Likewise.
9389         (check_dwarf64_offsets): Likewise.
9390         (psyms_seen_size): Likewise.
9391         (write_gdbindex): Likewise.
9392         (write_debug_names): Likewise.
9393         (assert_file_size): Likewise.
9394         (write_psymtabs_to_index): Likewise.
9395         (save_gdb_index_command): Likewise.
9396         (_initialize_dwarf2_read): Don't register the "save gdb-index"
9397         command.
9398         * dwarf2read.h: New file.
9399
9400 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
9401
9402         PR gdb/22670
9403         * dwarf2read.c (dwarf2_physname): Do not return the demangled
9404         symbol name if the CU's language stores symbol names in linkage
9405         format.
9406         * language.h (struct language_defn)
9407         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
9408         all instances of this struct.
9409
9410 2018-03-26  Tom Tromey  <tom@tromey.com>
9411
9412         * stack.c (backtrace_command_1): Remove verbose code.
9413
9414 2018-03-26  Tom Tromey  <tom@tromey.com>
9415
9416         * python/py-framefilter.c (py_print_type): Don't catch
9417         exceptions.  Return void.
9418         (py_print_value): Likewise.
9419         (py_print_single_arg): Likewise.
9420         (enumerate_args): Don't catch exceptions.
9421         (py_print_args): Likewise.
9422         (py_print_frame): Likewise.
9423         (gdbpy_apply_frame_filter): Catch exceptions here.
9424
9425 2018-03-26  Tom Tromey  <tom@tromey.com>
9426
9427         * stack.c (_initialize_stack): Remove trailing newlines from help
9428         text.  Add "Usage" line to "backtrace" help.
9429
9430 2018-03-26  Tom Tromey  <tom@tromey.com>
9431
9432         PR python/16486:
9433         * python/py-framefilter.c (py_print_args): Call wrap_hint.
9434
9435 2018-03-26  Tom Tromey  <tom@tromey.com>
9436
9437         * python/py-framefilter.c (py_print_single_arg): Return
9438         EXT_LANG_BT_ERROR from catch.
9439
9440 2018-03-26  Tom Tromey  <tom@tromey.com>
9441
9442         PR backtrace/15584:
9443         * stack.c (backtrace_command_1): Move some code into no-filters
9444         "if".
9445
9446 2018-03-26  Tom Tromey  <tom@tromey.com>
9447
9448         * python/py-framefilter.c (throw_quit_or_print_exception): New
9449         function.
9450         (gdbpy_apply_frame_filter): Use it.
9451
9452 2018-03-26  Tom Tromey  <tom@tromey.com>
9453
9454         PR cli/17716:
9455         * python/py-framefilter.c (py_print_type, py_print_value)
9456         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9457         RETURN_MASK_ERROR.
9458
9459 2018-03-26  Tom Tromey  <tom@tromey.com>
9460
9461         * python/py-framefilter.c (enumerate_args): Use
9462         gdb::unique_xmalloc_ptr.
9463
9464 2018-03-26  Tom Tromey  <tom@tromey.com>
9465
9466         * python/py-framefilter.c (py_print_frame): Return
9467         EXT_LANG_BT_OK.
9468         (gdbpy_apply_frame_filter): Update comment.
9469         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9470         Remove.
9471         <EXT_LANG_BT_NO_FILTERS>: Change value.
9472
9473 2018-03-26  Tom Tromey  <tom@tromey.com>
9474
9475         PR backtrace/15582:
9476         * stack.c (backtrace_command): Parse "hide" argument.
9477         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9478         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9479         constant.
9480
9481 2018-03-26  Tom Tromey  <tom@tromey.com>
9482
9483         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9484         add "flags".
9485         (backtrace_command): Remove "fulltrace", add "flags".
9486
9487 2018-03-26  Tom Tromey  <tom@tromey.com>
9488
9489         * stack.c (backtrace_command): Rewrite command line parsing.
9490
9491 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9492
9493         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9494
9495 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
9496
9497         * filename-seen-cache.h: Add include guard.
9498
9499 2018-03-26  Keith Seitz  <keiths@redhat.com>
9500
9501         * symfile.c (place_section): Remove "struct" from section_addr_info
9502         in comment.
9503         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9504         "struct" keyword from section_addr_info.
9505
9506 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
9507
9508         * regformats/regdef.h (reg): Add constructors.
9509
9510 2018-03-25  Pedro Alves  <palves@redhat.com>
9511
9512         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9513         if then/else bodies in var_func_name extraction.
9514
9515 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
9516
9517         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9518         lookup_minimal_symbol() to find symbol entry.
9519         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9520
9521 2018-03-23  Keith Seitz  <keiths@redhat.com>
9522
9523         PR c++/22968
9524         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9525         nested type definitions for C++, too.
9526
9527 2018-03-23  Tom Tromey  <tom@tromey.com>
9528
9529         * machoread.c (struct oso_el): Add a constructor.  Don't define as
9530         a typedef.
9531         (macho_register_oso): Remove.
9532         (macho_symtab_read): Take a std::vector.
9533         (oso_el_compare_name): Now a std::sort comparator.
9534         (macho_symfile_read_all_oso): Take a std::vector.
9535         (macho_symfile_read): Use std::vector.  Remove cleanups.
9536
9537 2018-03-22  Tom Tromey  <tom@tromey.com>
9538
9539         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9540         (record_full_goto_bookmark): Use std::string.
9541
9542 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9543
9544         PR tdep/18295
9545         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9546         a single mask.
9547
9548 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9549
9550         * rs6000-tdep.c (store_insn_p): New function.
9551         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9552         and cr_reg to their unshifted values. Use store_insn_p to
9553         match LR saves using either R1 or fdata->alloca_reg. Use
9554         store_insn_p to match CR saves. Set alloca_reg_offset
9555         when alloca_reg and framep are set. Remove lr_reg shift
9556         when assigning to fdata->lr_register.
9557
9558 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9559
9560         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9561         command line args instead of emitting a warning.
9562
9563 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9564
9565         * tracepoint.h (struct static_tracepoint_marker): Initialize
9566         fields, define default constructor, move constructor and move
9567         assignment, disable the rest.
9568         <str_id, extra>: Make std::string.
9569         (release_static_tracepoint_marker): Remove.
9570         (free_current_marker): Remove.
9571         * tracepoint.c (free_current_marker): Remove.
9572         (parse_static_tracepoint_marker_definition): Adjust to
9573         std::string, use new hex2str overload.
9574         (release_static_tracepoint_marker): Remove.
9575         (print_one_static_tracepoint_marker): Get marker by reference
9576         and adjust to std::string.
9577         (info_static_tracepoint_markers_command): Adjust to std::vector
9578         changes
9579         * target.h (static_tracepoint_marker_p): Remove typedef.
9580         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9581         (struct target_ops) <to_static_tracepoint_marker_at>: Return
9582         bool.
9583         <to_static_tracepoint_markers_by_strid>: Return std::vector.
9584         * target-debug.h
9585         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9586         (target_debug_print_std_vector_static_tracepoint_marker): New.
9587         (target_debug_print_struct_static_tracepoint_marker_p): Rename
9588         to...
9589         (target_debug_print_static_tracepoint_marker_p): ... this.
9590         * target-delegates.c: Re-generate.
9591         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9592         Make std::string.
9593         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9594         (decode_static_tracepoint_spec): Adjust to std::vector.
9595         (tracepoint_print_one_detail): Adjust to std::string.
9596         (strace_marker_decode_location): Adjust to std::string.
9597         (update_static_tracepoint): Adjust to std::string, remove call
9598         to release_static_tracepoint_marker.
9599         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9600         Adjust to std::vector.
9601         * remote.c (remote_static_tracepoint_marker_at): Return bool.
9602         (remote_static_tracepoint_markers_by_strid): Adjust to
9603         std::vector.
9604         * common/rsp-low.h (hex2str): New overload with explicit count
9605         of bytes.
9606         * common/rsp-low.c (hex2str): New overload with explicit count
9607         of bytes.
9608         * unittests/rsp-low-selftests.c (test_hex2str): New function.
9609         (_initialize_rsp_low_selftests): Add test_hex2str test.
9610         * unittests/tracepoint-selftests.c
9611         (test_parse_static_tracepoint_marker_definition): Adjust to
9612         std::string.
9613
9614 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
9615
9616         * tracepoint.c (parse_static_tracepoint_marker_definition):
9617         Consider case where the definition is followed by more
9618         definitions.
9619         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9620         tracepoint-selftests.c.
9621         * unittests/tracepoint-selftests.c: New.
9622
9623 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
9624
9625         * MAINTAINERS (Write After Approval): Add Pedro Franco de
9626         Carvalho.
9627
9628 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9629
9630         * symtab.c (find_pc_sect_line): fixed indentation.
9631
9632 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
9633
9634         * symtab.c (find_pc_sect_line): now uses binary search.
9635
9636 2018-03-19  Tom Tromey  <tom@tromey.com>
9637
9638         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9639         "IDENT" production.
9640
9641 2018-03-19  Pedro Alves  <palves@redhat.com>
9642             Tom Tromey  <tom@tromey.com>
9643
9644         * unittests/observable-selftests.c: New file.
9645         * common/observable.h: New file.
9646         * observable.h: New file.
9647         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9648         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9649         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9650         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9651         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9652         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9653         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9654         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9655         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9656         python/py-breakpoint.c, python/py-finishbreakpoint.c,
9657         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9658         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9659         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9660         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9661         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9662         tui/tui-interp.c, valops.c: Update all users.
9663         * tui/tui-hooks.c (tui_bp_created_observer)
9664         (tui_bp_deleted_observer, tui_bp_modified_observer)
9665         (tui_inferior_exit_observer, tui_before_prompt_observer)
9666         (tui_normal_stop_observer, tui_register_changed_observer):
9667         Remove.
9668         (tui_observers_token): New global.
9669         (attach_or_detach, tui_attach_detach_observers): New functions.
9670         (tui_install_hooks, tui_remove_hooks): Use
9671         tui_attach_detach_observers.
9672         * record-btrace.c (record_btrace_thread_observer): Remove.
9673         (record_btrace_thread_observer_token): New global.
9674         * observer.sh: Remove.
9675         * observer.c: Rename to observable.c.
9676         * observable.c (namespace gdb_observers): Define new objects.
9677         (observer_debug): Move into gdb_observers namespace.
9678         (struct observer, struct observer_list, xalloc_observer_list_node)
9679         (xfree_observer_list_node, generic_observer_attach)
9680         (generic_observer_detach, generic_observer_notify): Remove.
9681         (_initialize_observer): Update.
9682         Don't include observer.inc.
9683         * Makefile.in (generated_files): Remove observer.h, observer.inc.
9684         (clean mostlyclean): Likewise.
9685         (observer.h, observer.inc): Remove targets.
9686         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9687         (COMMON_SFILES): Use observable.c, not observer.c.
9688         * .gitignore: Remove observer.h.
9689
9690 2018-03-18  Tom Tromey  <tom@tromey.com>
9691
9692         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9693         gdb::def_vector.
9694         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9695
9696 2018-03-17  Tom Tromey  <tom@tromey.com>
9697
9698         * auto-load.c (auto_load_objfile_script_1): Use std::string.
9699
9700 2018-03-17  Tom Tromey  <tom@tromey.com>
9701
9702         * target.c (class scoped_target_fd): New.
9703         (target_fileio_close_cleanup): Remove.
9704         (target_fileio_read_alloc_1): Use scoped_target_fd.
9705
9706 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
9707
9708         * silent-rules.mk: New.
9709         * Makefile.in: Include silent-rules.mk
9710         (srcdir, VPATH, top_srcdir): Move up.
9711         (COMPILE): Add ECHO_CXX.
9712         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9713         (init.c): Add ECHO_INIT_C.
9714         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9715         (version.c): Add ECHO_GEN.
9716         (printcmd.o): Add ECHO_CXX.
9717         (target-float.o): Add ECHO_CXX.
9718         (ada-exp.o): Add ECHO_CXX.
9719         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9720         (insight$(EXEEXT)): Add ECHO_CXXLD.
9721         * gnulib/configure.ac: Add AM_SILENT_RULES.
9722         * gnulib/aclocal.m4: Re-generate.
9723         * gnulib/configure: Re-generate.
9724         * gnulib/import/Makefile.in: Re-generate.
9725
9726 2018-03-16  Tom Tromey  <tom@tromey.com>
9727
9728         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9729         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9730         * utils.c (do_free_section_addr_info)
9731         (make_cleanup_free_section_addr_info): Remove.
9732         * symfile.h (struct other_sections): Add constructor.
9733         (struct section_addr_info): Remove.
9734         (section_addr_info): New typedef.
9735         (struct sym_fns) <sym_offsets>: Change type of parameter.
9736         (build_section_addr_info_from_objfile)
9737         (relative_addr_info_to_section_offsets, addr_info_make_relative)
9738         (default_symfile_offsets, symbol_file_add)
9739         (symbol_file_add_from_bfd)
9740         (build_section_addr_info_from_section_table): Update.
9741         (alloc_section_addr_info, free_section_addr_info): Don't declare.
9742         * symfile.c (alloc_section_addr_info): Remove.
9743         (build_section_addr_info_from_section_table): Change return type.
9744         Update.
9745         (build_section_addr_info_from_bfd)
9746         (build_section_addr_info_from_objfile): Likewise.
9747         (free_section_addr_info): Remove.
9748         (relative_addr_info_to_section_offsets): Change type of "addrs".
9749         (addrs_section_compar): Now a std::sort comparator.
9750         (addrs_section_sort): Change return type.
9751         (addr_info_make_relative): Change type of "addrs".  Update.
9752         (default_symfile_offsets, syms_from_objfile_1)
9753         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9754         (symbol_file_add_separate): Update.
9755         (symbol_file_add): Change type of "addrs".  Update.
9756         (add_symbol_file_command): Update.  Remove cleanups.
9757         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
9758         cleanups.
9759         * symfile-debug.c (debug_sym_offsets): Change type of "info".
9760         * solib.c (solib_read_symbols): Update.
9761         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
9762         * machoread.c (macho_symfile_offsets): Update.
9763         * jit.c (jit_bfd_try_read_symtab): Update.
9764
9765 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
9766
9767         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9768         unittests/utils-selftests.c.
9769         * unittests/utils-selftests.c: New file.
9770
9771 2018-03-14  Tom Tromey  <tom@tromey.com>
9772
9773         PR cli/14977:
9774         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
9775         for NULL.
9776
9777 2018-03-14  Tom Tromey  <tom@tromey.com>
9778
9779         PR cli/19918:
9780         * printcmd.c (printf_pointer): Allow "-" in format.
9781
9782 2018-03-14  Tom Tromey  <tom@tromey.com>
9783
9784         * printcmd.c (_initialize_printcmd): Add usage to printf.
9785
9786 2018-03-14  Yao Qi  <qiyao@sourceware.org>
9787
9788         * MAINTAINERS: Update my email address.
9789
9790 2018-03-13  Tom Tromey  <tom@tromey.com>
9791
9792         * machoread.c (macho_check_dsym): Change filenamep to a
9793         std::string*.
9794         (macho_symfile_read): Update.
9795         * symfile.c (load_command): Use std::string.
9796
9797 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
9798
9799         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
9800         to error message string.
9801         (riscv_register_name): Use xsnprintf instead of sprintf.
9802         (riscv_insn::fetch_instruction): Use gdb_assert instead of
9803         internal_error.
9804         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
9805         error.
9806         (riscv_push_dummy_call): Likewise.
9807
9808 2018-03-12  Tom Tromey  <tom@tromey.com>
9809
9810         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
9811         Use gdb::byte_vector.
9812         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
9813
9814 2018-03-12  Yao Qi  <yao.qi@linaro.org>
9815
9816         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
9817         parameter type to readable_regcache.
9818         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
9819         the declaration.
9820
9821 2018-03-11  Tom Tromey  <tom@tromey.com>
9822
9823         * dwarf2read.c (struct nextfield): Add initializers.
9824         (struct nextfnfield): Remove.
9825         (struct fnfieldlist): Add initializers.  Remove "length" and
9826         "head", use std::vector.
9827         (struct decl_field_list): Remove.
9828         (struct field_info): Add initializers.
9829         <fields, baseclasses>: Now std::vector.
9830         <nbaseclasses, nfnfields, typedef_field_list_count,
9831         nested_types_list_count>: Remove.
9832         (dwarf2_add_field, dwarf2_add_type_defn)
9833         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
9834         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
9835         (process_structure_scope): Update.
9836
9837 2018-03-11  Tom Tromey  <tom@tromey.com>
9838
9839         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9840         for use by std::sort.
9841         (build_type_psymtabs_1): Use std::vector.
9842
9843 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
9844
9845         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9846         and LIBMPFR in the printed configuration.
9847
9848 2018-03-08  Tom Tromey  <tom@tromey.com>
9849
9850         * source.c (get_filename_and_charpos): Use scoped_fd.
9851         * nto-procfs.c (procfs_open_1): Use scoped_fd.
9852         (procfs_pidlist): Likewise.
9853         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9854         (iterate_over_mappings): Likewise.
9855
9856 2018-03-08  Tom Tromey  <tom@tromey.com>
9857
9858         * infcall.c (struct call_return_meta_info)
9859         <stack_temporaries_enabled>: Remove.
9860         (get_call_return_value, call_function_by_hand_dummy): Update.
9861         * thread.c (disable_thread_stack_temporaries): Remove.
9862         (enable_thread_stack_temporaries): Remove.
9863         (thread_stack_temporaries_enabled_p): Return bool.
9864         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9865         (get_last_thread_stack_temporary): Update.
9866         * eval.c (evaluate_subexp): Update.
9867         * gdbthread.h (class enable_thread_stack_temporaries): Now a
9868         class, not a function.
9869         (value_ptr, value_vec): Remove typedefs.
9870         (class thread_info) <stack_temporaries_enabled>: Now bool.
9871         <stack_temporaries>: Now a std::vector.
9872         (thread_stack_temporaries_enabled_p)
9873         (value_in_thread_stack_temporaries): Return bool.
9874
9875 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
9876
9877         * remote.c (putpkt_binary): Fix omitted bytes reporting.
9878         (getpkt_or_notif_sane_1): Likewise.
9879
9880 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9881
9882         * build-id.c (build_id_to_debug_bfd): Use std::string.
9883
9884 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9885
9886         * build-id.c (find_separate_debug_file_by_buildid): Return
9887         std::string.
9888         * build-id.h (find_separate_debug_file_by_buildid): Return
9889         std::string.
9890         * coffread.c (coff_symfile_read): Adjust to std::string.
9891         * elfread.c (elf_symfile_read): Adjust to std::string.
9892         * symfile.c (separate_debug_file_exists): Change parameter to
9893         std::string.
9894         (find_separate_debug_file): Return std::string.
9895         (find_separate_debug_file_by_debuglink): Return std::string.
9896         * symfile.h (find_separate_debug_file_by_debuglink): Return
9897         std::string.
9898
9899 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
9900
9901         * common/xml-utils.c (xml_escape_text): Move code to...
9902         (xml_escape_text_append): ... this new function.
9903         * common/xml-utils.h (xml_escape_text_append): New declaration.
9904         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9905         New function.
9906         (_initialize_xml_utils): register test_xml_escape_text_append as
9907         a selftest.
9908
9909 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
9910
9911         * defs.h: Remove MAX_REGISTER_SIZE.
9912         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9913         asserts.
9914         * python/py-unwind.c (pyuw_sniffer): Likewise.
9915
9916 2018-03-07  Tom Tromey  <tom@tromey.com>
9917
9918         * linux-tdep.c (linux_info_proc): Update.
9919         * target.h (struct target_ops) <to_fileio_readlink>: Return
9920         optional<string>.
9921         (target_fileio_readlink): Return optional<string>.
9922         * remote.c (remote_hostio_readlink): Return optional<string>.
9923         * inf-child.c (inf_child_fileio_readlink): Return
9924         optional<string>.
9925         * target.c (target_fileio_readlink): Return optional<string>.
9926
9927 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
9928
9929         * regcache.c (cooked_read_test): Add riscv to the list of
9930         architectures that have a save_reggroup.
9931
9932 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9933
9934         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9935         value is not a dynamic class object.
9936
9937 2018-03-06  Tom Tromey  <tom@tromey.com>
9938
9939         * rust-exp.y: Formatting fixes.
9940
9941 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9942
9943         * riscv-tdep.c (riscv_register_name): Remove target description
9944         support.
9945         (riscv_gdbarch_init): Remove target description check.
9946
9947 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9948
9949         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9950         comment.
9951         * riscv-tdep.h: Likewise.
9952
9953 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9954
9955         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9956         (riscv_pseudo_register_write): Delete.
9957         (riscv_gdbarch_init): Remove all use of pseudo registers.
9958
9959 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9960
9961         * record-btrace.c (btrace_print_lines): Replace cleanup
9962         parameter with RAII equivalents.
9963         (btrace_insn_history): Replace cleanup with RAII equivalents.
9964         * ui-out.h (make_cleanup_ui_out_list_begin_end,
9965         make_cleanup_ui_out_tuple_begin_end): Remove.
9966         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9967         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9968         make_cleanup_ui_out_list_begin_end): Remove.
9969
9970 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9971
9972         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9973         parameter types to std::vector.  Use bool.
9974         (record_btrace_wait): Replace VEC(tp_t) with
9975         std::vector<thread_info *>.
9976         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9977
9978 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
9979
9980         * record-btrace.c (record_btrace_disable_callback): Remove.
9981         (struct scoped_btrace_disable): New.
9982         (record_btrace_open): Use scoped_btrace_disable.
9983
9984 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9985
9986         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9987         reading values from registers.
9988
9989 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9990
9991         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9992         where appropriate.
9993
9994 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
9995
9996         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9997         change parameter type.  Use GDB's print functions, and use
9998         core_addr_to_string where appropriate.
9999         (riscv_push_dummy_call): Use core_addr_to_string where
10000         appropriate, update call to riscv_print_arg_location, and reindent
10001         a few lines.
10002         (riscv_return_value): Update call to riscv_print_arg_location.
10003
10004 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10005             Tim Newsome <tim@sifive.com>
10006             Albert Ou <a0u@eecs.berkeley.edu>
10007             Darius Rad <darius@bluespec.com>
10008
10009         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10010         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10011         (ALLDEPFILES): Add riscv-tdep.c
10012         * configure.tgt: Add riscv support.
10013         * riscv-tdep.c: New file.
10014         * riscv-tdep.h: New file.
10015         * NEWS: Mention new target.
10016         * MAINTAINERS: Add entry for riscv.
10017
10018 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
10019
10020         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10021         fields within aggregates.
10022
10023 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
10024
10025         * record-btrace.c (btrace_print_lines): Change type of flags to
10026         gdb_disassembly_flags.
10027
10028 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10029
10030         * fbsd-nat.c: Include "inf-ptrace.h".
10031         (USE_SIGTRAP_SIGINFO): Conditionally define.
10032         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10033         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10034         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10035         function.
10036         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10037         Likewise.
10038         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10039         Likewise.
10040         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10041         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10042         "supports_stopped_by_hw_breakpoint" target methods.
10043
10044 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10045
10046         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10047         * fbsd-nat.c (debug_fbsd_nat): New variable.
10048         (show_fbsd_nat_debug): New function.
10049         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10050         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10051
10052 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
10053
10054         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10055         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10056         prototype.
10057         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10058         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10059         method.
10060
10061 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10062
10063         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10064         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10065
10066 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10067
10068         * charset.c (struct charset_vector): New.
10069         (charsets): Change type to charset_vector.
10070         (find_charset_names): Adjust.
10071         (add_one): Adjust.
10072         (_initialize_charset): Adjust.
10073
10074 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10075
10076         * progspace.h (struct program_space) <deleted_solibs>: Change
10077         type to std::vector<std::string>.
10078         * progspace.c (clear_program_space_solib_cache): Adjust.
10079         * breakpoint.c (print_solib_event): Adjust.
10080         (check_status_catch_solib): Adjust.
10081         * solib.c (update_solib_list): Adjust.
10082         * ui-out.h (class ui_out) <field_string>: New overload.
10083         * ui-out.c (ui_out::field_string): New overload.
10084
10085 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10086
10087         * progspace.h (struct program_space): Add constructor and
10088         destructor, initialize fields.
10089         (add_program_space): Remove.
10090         * progspace.c (add_program_space): Rename to...
10091         (program_space::program_space): ... this.
10092         (release_program_space): Rename to...
10093         (program_space::~program_space): ... this.
10094         (delete_program_space): Use delete to delete program_space.
10095         (initialize_progspace): Use new to allocate program_space.
10096         * inferior.c (add_inferior_with_spaces): Likewise.
10097         (clone_inferior_command): Likewise.
10098         * infrun.c (follow_fork_inferior): Likewise.
10099         (handle_vfork_child_exec_or_exit): Likewise.
10100
10101 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
10102
10103         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10104         (delim_string_to_char_ptr_vec): Return std::vector of
10105         gdb::unique_xmalloc_ptr.
10106         (dirnames_to_char_ptr_vec_append): Take std::vector of
10107         gdb::unique_xmalloc_ptr.
10108         (dirnames_to_char_ptr_vec): Return std::vector of
10109         gdb::unique_xmalloc_ptr.
10110         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10111         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10112         (delim_string_to_char_ptr_vec): Return an std::vector of
10113         gdb::unique_xmalloc_ptr, adjust the code.
10114         (dirnames_to_char_ptr_vec_append): Take an std::vector of
10115         gdb::unique_xmalloc_ptr, adjust the code.
10116         (dirnames_to_char_ptr_vec): Return an std::vector of
10117         gdb::unique_xmalloc_ptr, adjust the code.
10118         * auto-load.c (auto_load_safe_path_vec): Change type to
10119         std::vector of gdb::unique_xmalloc_ptr.
10120         (auto_load_expand_dir_vars): Return an std::vector of
10121         gdb::unique_xmalloc_ptr, adjust the code.
10122         (auto_load_safe_path_vec_update): Adjust.
10123         (filename_is_in_auto_load_safe_path_vec): Adjust.
10124         (auto_load_objfile_script_1): Adjust.
10125         * build-id.c (build_id_to_debug_bfd): Adjust.
10126         * linux-thread-db.c (thread_db_load_search): Adjust.
10127         * source.c (add_path): Adjust.
10128         (openp): Adjust.
10129         * symfile.c (find_separate_debug_file): Adjust.
10130         * utils.c (do_free_char_ptr_vec): Remove.
10131         (make_cleanup_free_char_ptr_vec): Remove.
10132
10133 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
10134
10135         PR gdb/22907
10136         * common/pathstuff.c: Conditionally include "<windows.h>".
10137
10138 2018-03-01  Georg Sauthoff  <mail@georg.so>
10139
10140         PR gdb/22888
10141         * gcore.in: Quote variables and switch interpreter to bash.
10142
10143 2018-03-01  Tom Tromey  <tom@tromey.com>
10144
10145         * dwarf2read.c (alloc_discriminant_info): Fix default_index
10146         assertion.  Add assertion for discriminant_index.
10147         (quirk_rust_enum): Use correct base type name in univariant case.
10148
10149 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
10150
10151         * record.c (get_call_history_modifiers): Return a
10152         record_print_flags.
10153         (cmd_record_call_history): Adjust.
10154         * record-btrace.c (record_btrace_call_history): Adjust.
10155         (record_btrace_call_history_range): Adjust.
10156         (record_btrace_call_history_from): Adjust.
10157         * target-debug.h (target_debug_print_record_print_flags): New.
10158         * target-delegates.c: Re-generate.
10159         * target.c (target_call_history): Change flags type.
10160         (target_call_history_from): Likewise.
10161         (target_call_history_range): Likewise.
10162         * target.h (struct target_ops) <target_call_history>: Likewise.
10163         (target_call_history_from): Likewise.
10164         (target_call_history_range): Likewise.
10165
10166 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10167             Simon Marchi  <simon.marchi@polymtl.ca>
10168
10169         * common/common-utils.c: Include "sys/stat.h".
10170         (is_regular_file): Move here from "source.c"; change return
10171         type to "bool".
10172         * common/common-utils.h (is_regular_file): New prototype.
10173         * common/pathstuff.c (contains_dir_separator): New function.
10174         * common/pathstuff.h (contains_dir_separator): New prototype.
10175         * source.c: Don't include "sys/stat.h".
10176         (is_regular_file): Move to "common/common-utils.c".
10177
10178 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
10179
10180         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10181         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10182         * auto-load.c: Include "common/pathstuff.h".
10183         * common/common-def.h (current_directory): Move here.
10184         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10185         function.
10186         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10187         prototype.
10188         * common/pathstuff.c: New file.
10189         * common/pathstuff.h: New file.
10190         * compile/compile.c: Include "common/pathstuff.h".
10191         * defs.h (current_directory): Move to "common/common-defs.h".
10192         * dwarf2read.c: Include "common/pathstuff.h".
10193         * exec.c: Likewise.
10194         * guile/scm-safe-call.c: Likewise.
10195         * linux-thread-db.c: Likewise.
10196         * main.c: Likewise.
10197         * nto-tdep.c: Likewise.
10198         * objfiles.c: Likewise.
10199         * source.c: Likewise.
10200         * symtab.c: Likewise.
10201         * utils.c: Include "common/pathstuff.h".
10202         (gdb_realpath): Move to "common/pathstuff.c".
10203         (gdb_realpath_keepfile): Likewise.
10204         (gdb_abspath): Likewise.
10205         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10206         (gdb_realpath_keepfile): Likewise.
10207         (gdb_abspath): Likewise.
10208
10209 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
10210
10211         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10212         wildcard process pid for super_resume for kernels with a
10213         specific bug.
10214
10215 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
10216
10217         * compile/compile.c (get_args): Add additional comments
10218         explaining function.
10219
10220 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
10221             Tom Tromey  <tom@tromey.com>
10222
10223         * target.h (memory_write_request_s): Remove typedef.  Don't define
10224         VEC.
10225         (target_write_memory_blocks): Change argument to std::vector.
10226         (struct memory_write_request): Add constructor.
10227         * target-memory.c (compare_block_starting_address): Return bool.
10228         Change argument types.
10229         (claim_memory): Change arguments to use std::vector.
10230         (split_regular_and_flash_blocks, blocks_to_erase)
10231         (compute_garbled_blocks): Likewise.
10232         (cleanup_request_data, cleanup_write_requests_vector): Remove.
10233         (target_write_memory_blocks): Change argument to std::vector.
10234         * symfile.c (struct load_section_data): Add constructor and
10235         destructor.  Use std::vector for "requests".
10236         (struct load_progress_data): Add initializers.
10237         (load_section_callback): Update.  Use "new".
10238         (clear_memory_write_data): Remove.
10239         (generic_load): Update.
10240
10241 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
10242
10243         * arch/aarch64.h: Use common/tdesc.h.
10244
10245 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10246
10247         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10248         architecture with a 64-bit ABI.
10249
10250 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
10251
10252         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10253         ahead of target description loading.
10254
10255 2018-02-26  Tom Tromey  <tom@tromey.com>
10256
10257         * stack.c (backtrace_command_1): Update.
10258         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10259         of "flags".
10260         * python/py-framefilter.c (py_print_frame)
10261         (gdbpy_apply_frame_filter): Change type of "flags".
10262         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10263         of "flags".
10264         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10265         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10266         * extension.h (enum frame_filter_flag): Rename from
10267         frame_filter_flags.
10268         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10269         (apply_ext_lang_frame_filter): Change type of "flags".
10270         * extension.c (apply_ext_lang_frame_filter): Change type of
10271         "flags".
10272         * extension-priv.h (struct extension_language_ops)
10273         <apply_frame_filter>: Change type of "flags".
10274
10275 2018-02-26  Tom Tromey  <tom@tromey.com>
10276
10277         PR python/16497:
10278         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
10279         off-by-one in py_end computation.
10280         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10281         PRINT_MORE_FRAMES.
10282         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10283         constant.
10284
10285 2018-02-26  Tom Tromey  <tom@tromey.com>
10286
10287         * dwarf2read.c (struct variant_field): New.
10288         (struct nextfield) <variant>: New field.
10289         (dwarf2_add_field): Handle DW_TAG_variant_part.
10290         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10291         discriminated union.
10292         (read_structure_type): Handle DW_TAG_variant_part.
10293         (handle_struct_member_die): New function, extracted from
10294         process_structure_scope.  Handle DW_TAG_variant.
10295         (process_structure_scope): Handle discriminated unions.  Call
10296         handle_struct_member_die.
10297
10298 2018-02-26  Tom Tromey  <tom@tromey.com>
10299
10300         * rust-lang.h (rust_last_path_segment): Declare.
10301         * rust-lang.c (rust_last_path_segment): Now public.  Change
10302         contract.
10303         (struct disr_info): Remove.
10304         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10305         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10306         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10307         (rust_enum_p, rust_enum_variant): New function.
10308         (rust_underscore_fields): Remove "offset" parameter.
10309         (rust_print_enum): New function.
10310         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10311         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10312         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
10313         enums.
10314         (rust_internal_print_type): New function, from rust_print_type.
10315         Remove enum code.
10316         (rust_print_type): Call rust_internal_print_type.
10317         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10318         Update enum handling.
10319         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10320         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10321         (rust_union_quirks): New functions.
10322         (process_full_comp_unit, process_full_type_unit): Call
10323         rust_union_quirks.
10324         (process_structure_scope): Update rust_unions if necessary.
10325
10326 2018-02-26  Tom Tromey  <tom@tromey.com>
10327
10328         * value.h (value_union_variant): Declare.
10329         * valops.c (value_union_variant): New function.
10330         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10331         (struct discriminant_info): New.
10332         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10333         enumerator.
10334         (struct main_type) <flag_discriminated_union>: New field.
10335
10336 2018-02-26  Tom Tromey  <tom@tromey.com>
10337
10338         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10339         unittests/unpack-selftests.c.
10340         * unittests/unpack-selftests.c: New file.
10341         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10342
10343 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10344
10345         * dwarf2read.c (struct partial_die_info) <read>: New method.
10346         (read_partial_die): Remove the declaration.
10347         (load_partial_dies): Update.
10348         (partial_die_info::partial_die_info):
10349         (read_partial_die): Change it to partial_die_info::read.
10350
10351 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10352
10353         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10354         (fixup_partial_die): Remove declaration.
10355         (scan_partial_symbols): Update.
10356         (partial_die_parent_scope): Likewise.
10357         (partial_die_full_name): Likewise.
10358         (fixup_partial_die): Change it to partial_die_info::fixup.
10359
10360 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10361
10362         * dwarf2read.c (read_partial_die): Update the declaration.
10363         (load_partial_dies): Caller update.
10364         (read_partial_die): Remove one argument abbrev_len.
10365
10366 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10367
10368         * dwarf2read.c (struct partial_die_info): Add ctor, delete
10369         assignment operator.
10370         (load_partial_dies): Use ctor and copy ctor.
10371         (read_partial_die): Update.
10372         (dwarf2_cu::find_partial_die): Use ctor.
10373
10374 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10375
10376         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10377         (find_partial_die_in_comp_unit): Change it to
10378         dwarf2_cu::find_partial_die.
10379         (find_partial_die): Update.
10380
10381 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10382
10383         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10384         is NULL.
10385
10386 2018-02-26  Yao Qi  <yao.qi@linaro.org>
10387
10388         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10389
10390 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
10391
10392         * arch/amd64.h: Use common/tdesc.h.
10393         * arch/i386.c: Likewise.
10394         * arch/i386.h: Likewise.
10395         * arch/tic6x.c: Likewise.
10396         * arch/tdesc.h: Move file from here...
10397         * common/tdesc.h: ...to here.
10398         * features/aarch64-core.c: Regenerate.
10399         * features/aarch64-fpu.c: Regenerate.
10400         * features/i386/32bit-avx.c: Regenerate.
10401         * features/i386/32bit-avx512.c: Regenerate.
10402         * features/i386/32bit-core.c: Regenerate.
10403         * features/i386/32bit-linux.c: Regenerate.
10404         * features/i386/32bit-mpx.c: Regenerate.
10405         * features/i386/32bit-pkeys.c: Regenerate.
10406         * features/i386/32bit-sse.c: Regenerate.
10407         * features/i386/64bit-avx.c: Regenerate.
10408         * features/i386/64bit-avx512.c: Regenerate.
10409         * features/i386/64bit-core.c: Regenerate.
10410         * features/i386/64bit-linux.c: Regenerate.
10411         * features/i386/64bit-mpx.c: Regenerate.
10412         * features/i386/64bit-pkeys.c: Regenerate.
10413         * features/i386/64bit-segments.c: Regenerate.
10414         * features/i386/64bit-sse.c: Regenerate.
10415         * features/i386/x32-core.c: Regenerate.
10416         * features/tic6x-c6xp.c: Regenerate.
10417         * features/tic6x-core.c: Regenerate.
10418         * features/tic6x-gp.c: Regenerate.
10419         * target-descriptions.c: Use common/tdesc.h.
10420         * target-descriptions.h: Likewise.
10421
10422 2018-02-24  Tom Tromey  <tom@tromey.com>
10423
10424         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10425         (try_thread_db_load_from_dir, thread_db_load_search): Use
10426         std::string.
10427         (info_auto_load_libthread_db_compare): Return bool.  Change
10428         argument types.
10429         (info_auto_load_libthread_db): Use std::vector, std::string.
10430         Remove cleanups.
10431
10432 2018-02-24  Tom Tromey  <tom@tromey.com>
10433
10434         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10435         std::string.
10436         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10437         std::string*.
10438         * gdbarch.c: Rebuild.
10439         * gdbarch.h: Rebuild.
10440         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10441         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10442         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10443         std::string*.
10444
10445 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
10446
10447         * gdbtypes.h (sect_offset): Change type to uint64_t.
10448         (sect_offset_str): New function.
10449         * dwarf2read.c (create_addrmap_from_aranges): Use
10450         sect_offset_str.
10451         (error_check_comp_unit_head): Likewise.
10452         (create_debug_type_hash_table): Likewise.
10453         (read_cutu_die_from_dwo): Likewise.
10454         (init_cutu_and_read_dies): Likewise.
10455         (init_cutu_and_read_dies_no_follow): Likewise.
10456         (process_psymtab_comp_unit_reader): Likewise.
10457         (partial_die_parent_scope): Likewise.
10458         (peek_die_abbrev): Likewise.
10459         (process_queue): Likewise.
10460         (dwarf2_physname): Likewise.
10461         (read_namespace_alias): Likewise.
10462         (read_import_statement): Likewise.
10463         (create_dwo_cu_reader): Likewise.
10464         (create_cus_hash_table): Likewise.
10465         (lookup_dwo_cutu): Likewise.
10466         (inherit_abstract_dies): Likewise.
10467         (read_func_scope): Likewise.
10468         (read_call_site_scope): Likewise.
10469         (dwarf2_add_member_fn): Likewise.
10470         (read_common_block): Likewise.
10471         (read_module_type): Likewise.
10472         (read_typedef): Likewise.
10473         (read_subrange_type): Likewise.
10474         (load_partial_dies): Likewise.
10475         (read_partial_die): Likewise.
10476         (find_partial_die): Likewise.
10477         (read_str_index): Likewise.
10478         (dwarf2_string_attr): Likewise.
10479         (build_error_marker_type): Likewise.
10480         (lookup_die_type): Likewise.
10481         (dump_die_shallow): Likewise.
10482         (follow_die_ref): Likewise.
10483         (dwarf2_fetch_die_loc_sect_off): Likewise.
10484         (dwarf2_fetch_constant_bytes): Likewise.
10485         (follow_die_sig): Likewise.
10486         (get_signatured_type): Likewise.
10487         (get_DW_AT_signature_type): Likewise.
10488         (dwarf2_find_containing_comp_unit): Likewise.
10489         (set_die_type): Likewise.
10490
10491 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
10492
10493         * arch/aarch64.c: Include "common-defs.h".
10494         * arch/amd64.c: Likewise.
10495         * arch/i386.c: Likewise.
10496
10497 2018-02-21  Tom Tromey  <tom@tromey.com>
10498
10499         * value.h: (extract_field_op): Update.
10500         * eval.c (extract_field_op): Return a const char *.
10501         * expression.h (parse_expression_for_completion): Update.
10502         * completer.c (complete_expression): Update.
10503         (add_struct_fields): Make fieldname const.
10504         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10505         (mark_completion_tag, parse_exp_in_context_1): Update.
10506         (parse_expression_for_completion): Change "name" to
10507         unique_xmalloc_ptr*.
10508
10509 2018-02-21  Tom Tromey  <tom@tromey.com>
10510
10511         * infcall.c (call_function_by_hand_dummy): Use std::vector.
10512
10513 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10514
10515         * avr-tdep.c (avr_read_pc): Change parameter type to
10516         readable_regcache.
10517         * gdbarch.sh (read_pc): Likewise.
10518         * gdbarch.c: Re-generated.
10519         * gdbarch.h: Re-generated.
10520         * hppa-tdep.c (hppa_read_pc): Change parameter type to
10521         readable_regcache.
10522         * ia64-tdep.c (ia64_read_pc): Likewise.
10523         * mips-tdep.c (mips_read_pc): Likewise.
10524         * spu-tdep.c (spu_read_pc): Likewise.
10525
10526 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10527
10528         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10529         * regcache-dump.c: New file.
10530         * regcache.c: Move register_dump to regcache-dump.c.
10531         (maintenance_print_registers): Likewise.
10532         (maintenance_print_raw_registers): Likewise.
10533         (maintenance_print_cooked_registers): Likewise.
10534         (maintenance_print_register_groups): Likewise.
10535         (maintenance_print_remote_registers): Likewise.
10536         (_initialize_regcache): Likewise.
10537         * regcache.h (register_dump): Moved from regcache.c.
10538
10539 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10540
10541         * regcache.c (regcache::regcache): Update.
10542         (regcache::invalidate): Move it to detached_regcache::invalidate.
10543         (get_thread_arch_aspace_regcache): Update.
10544         (regcache::raw_update): Update.
10545         (regcache::cooked_read): Remove some code.
10546         (regcache::cooked_read_value): Likewise.
10547         (regcache::raw_write): Remove assert on m_readonly_p.
10548         (regcache::raw_supply_integer): Move it to
10549         detached_regcache::raw_supply_integer.
10550         (regcache::raw_supply_zeroed): Likewise.
10551         * regcache.h (detached_regcache) <raw_supply_integer>: New
10552         declaration.
10553         <raw_supply_zeroed, invalidate>: Likewise.
10554         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10555         <invalidate>: Likewise.
10556         <m_readonly_p>: Removed.
10557
10558 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10559
10560         * infcmd.c (get_return_value): Let stop_regs point to
10561         get_current_regcache.
10562         * regcache.c (regcache::regcache): Remove.
10563         (register_dump_reg_buffer): New class.
10564         (regcache_print): Adjust.
10565         * regcache.h (regcache): Remove constructors.
10566
10567 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10568
10569         * regcache.c (class register_dump): New class.
10570         (register_dump_regcache, register_dump_none): New class.
10571         (register_dump_remote, register_dump_groups): New class.
10572         (regcache_print): Update.
10573         * regcache.h (regcache_dump_what): Move it to regcache.c.
10574         (regcache) <dump>: Remove.
10575
10576 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10577
10578         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10579          reg_buffer_rw *.
10580         (jit_unwind_reg_set_impl): Call raw_supply.
10581         (jit_frame_sniffer): Use reg_buffer_rw.
10582         * record-full.c (record_full_core_regbuf): Change its type.
10583         (record_full_core_open_1): Use reg_buffer_rw.
10584         (record_full_close): Likewise.
10585         (record_full_core_fetch_registers): Use regcache->raw_supply.
10586         (record_full_core_store_registers): Likewise.
10587         * regcache.c (regcache::get_register_status): Move it to
10588         reg_buffer.
10589         (regcache_raw_set_cached_value): Remove.
10590         (regcache::raw_set_cached_value): Remove.
10591         (regcache::raw_write): Call raw_supply.
10592         (regcache::raw_supply): Move it to reg_buffer_rw.
10593         * regcache.h (regcache_raw_set_cached_value): Remove.
10594         (reg_buffer_rw): New class.
10595
10596 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10597
10598         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10599         readonly_detached_regcache.
10600         (dummy_frame_prev_register): Use regcache->cooked_read.
10601         * frame.c (frame_save_as_regcache): Change return type.
10602         (frame_pop): Update.
10603         * frame.h (frame_save_as_regcache): Update declaration.
10604         * inferior.h (get_infcall_suspend_state_regcache): Update
10605         declaration.
10606         * infrun.c (infcall_suspend_state) <registers>: use
10607         readonly_detached_regcache.
10608         (save_infcall_suspend_state): Don't use regcache_dup.
10609         (get_infcall_suspend_state_regcache): Change return type.
10610         * linux-fork.c (struct fork_info) <savedregs>: Change to
10611         readonly_detached_regcache.
10612         <pc>: New field.
10613         (fork_save_infrun_state): Don't use regcache_dup.
10614         (info_checkpoints_command): Adjust.
10615         * mi/mi-main.c (register_changed_p): Update declaration.
10616         (mi_cmd_data_list_changed_registers): Use
10617         readonly_detached_regcache.
10618         (register_changed_p): Change parameter type to
10619         readonly_detached_regcache.
10620         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10621         readonly_detached_regcache.
10622         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10623         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10624         New.
10625         (regcache::save): Move it to reg_buffer.
10626         (regcache::restore): Change parameter type.
10627         (regcache_dup): Remove.
10628         * regcache.h (reg_buffer) <save>: New method.
10629         (readonly_detached_regcache): New class.
10630         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10631         readonly_detached_regcache.
10632         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10633
10634 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10635
10636         * frame.c (frame_save_as_regcache): Use regcache method save.
10637         (frame_pop): Use regcache method restore.
10638         * infrun.c (restore_infcall_suspend_state): Likewise.
10639         * linux-fork.c (fork_load_infrun_state): Likewise.
10640         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10641         save.
10642         * regcache.c (regcache_save): Remove.
10643         (regcache::restore): More asserts.
10644         (regcache_cpy): Remove.
10645         * regcache.h (regcache_save): Remove the declaration.
10646         (regcache::restore): Move from private to public.
10647         Remove the friend declaration of regcache_cpy.
10648         (regcache_cpy): Remove declaration.
10649
10650 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10651
10652         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10653         parameter type to 'readable_regcache *'.
10654         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10655         * arm-tdep.c (arm_neon_quad_read): Likewise.
10656         (arm_pseudo_read): Likewise.
10657         * avr-tdep.c (avr_pseudo_register_read): Likewise.
10658         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10659         * frv-tdep.c (frv_pseudo_register_read): Likewise.
10660         * gdbarch.c: Re-generated.
10661         * gdbarch.h: Re-generated.
10662         * gdbarch.sh (pseudo_register_read): Change parameter type to
10663         'readable_regcache *'.
10664         (pseudo_register_read_value): Likewise.
10665         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10666         (h8300_pseudo_register_read): Likewise.
10667         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10668         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10669         (i386_pseudo_register_read_into_value): Likewise.
10670         (i386_pseudo_register_read_value): Likewise.
10671         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10672         declaration.
10673         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10674         * m32c-tdep.c (m32c_raw_read): Likewise.
10675         (m32c_read_flg): Likewise.
10676         (m32c_banked_register): Likewise.
10677         (m32c_banked_read): Likewise.
10678         (m32c_sb_read): Likewise.
10679         (m32c_part_read): Likewise.
10680         (m32c_cat_read): Likewise.
10681         (m32c_r3r2r1r0_read): Likewise.
10682         (m32c_pseudo_register_read): Likewise.
10683         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10684         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10685         (mep_pseudo_cr64_read): Likewise.
10686         (mep_pseudo_register_read): Likewise.
10687         * mips-tdep.c (mips_pseudo_register_read): Likewise.
10688         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10689         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10690         * regcache.c (regcache::raw_read): Move it to readable_regcache.
10691         (regcache::cooked_read): Likewise.
10692         (regcache::cooked_read_value): Likewise.
10693         (regcache_cooked_read_signed):
10694         (regcache::cooked_read): Likewise.
10695         * regcache.h (readable_regcache): New class.
10696         (regcache): Inherit readable_regcache.  Move some methods to
10697         readable_regcache.
10698         * rl78-tdep.c (rl78_pseudo_register_read): Change
10699         parameter type to 'readable_regcache *'.
10700         * rs6000-tdep.c (do_regcache_raw_read): Remove.
10701         (e500_pseudo_register_read): Change parameter type to
10702         'readable_regcache *'.
10703         (dfp_pseudo_register_read): Likewise.
10704         (vsx_pseudo_register_read): Likewise.
10705         (efpr_pseudo_register_read): Likewise.
10706         * s390-tdep.c (s390_pseudo_register_read): Likewise.
10707         * sh-tdep.c (sh_pseudo_register_read): Likewise.
10708         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10709         (sh64_pseudo_register_read): Likewise.
10710         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10711         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10712         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10713         (spu_pseudo_register_read): Likewise.
10714         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10715         (xtensa_pseudo_register_read): Likewise.
10716
10717 2018-02-21  Yao Qi  <yao.qi@linaro.org>
10718
10719         * regcache.c (regcache::regcache): Call reg_buffer ctor.
10720         (regcache::arch): Move it to reg_buffer::arch.
10721         (regcache::register_buffer): Likewise.
10722         (regcache::assert_regnum): Likewise.
10723         (regcache::num_raw_registers): Likewise.
10724         * regcache.h (reg_buffer): New class.
10725         (regcache): Inherit reg_buffer.
10726
10727 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
10728
10729         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10730         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10731
10732 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
10733
10734         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10735
10736 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
10737
10738         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10739         (SFILES): Remove common/*.c files.
10740         (COMMON_OBS): Remove some *.o files built from common/*.c files.
10741         * common/common.host: Add common reference.
10742         * configure.ac: Likewise.
10743         * configure: Regenerate.
10744
10745 2018-02-16  Yao Qi  <yao.qi@linaro.org>
10746
10747         * block.c (block_namespace_info): Inherit allocate_on_obstack.
10748         (block_initialize_namespace): Use new.
10749         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10750         (dwarf2_free_objfile): Use delete.
10751         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10752         (copy_type_recursive): Use new.
10753         * gdb_obstack.h (allocate_on_obstack): New.
10754
10755 2018-02-15  Yao Qi  <yao.qi@linaro.org>
10756
10757         PR gdb/22849
10758         * inferior.c (exit_inferior_1): Reset inf->control.
10759
10760 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
10761
10762         * ada-lang.c (ada_to_fixed_value_create): Delete advance
10763         declaration.
10764
10765 2018-02-14  Pedro Alves  <palves@redhat.com>
10766
10767         * frame-unwind.c (frame_unwind_try_unwinder): Always call
10768         frame_cleanup_after_sniffer on exception.
10769
10770 2018-02-14  Tom Tromey  <tom@tromey.com>
10771
10772         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
10773         const.
10774         (solib_bfd_open): Make pathname const.
10775         * solib.c (solib_bfd_open): Make pathname const.
10776         * solib-spu.c (spu_bfd_fopen): Make name const.
10777         (spu_bfd_open): Make pathname const.
10778         * solib-darwin.c (darwin_bfd_open): Make pathname const.
10779         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
10780
10781 2018-02-14  Tom Tromey  <tom@tromey.com>
10782
10783         * symfile.c (symfile_bfd_open): Update.
10784         * source.h (openp, source_full_path_of, find_and_open_source):
10785         Change argument type to unique_xmalloc_ptr.
10786         * source.c (openp): Take a unique_xmalloc_ptr.
10787         (source_full_path_of, find_and_open_source): Likewise.
10788         (open_source_file, symtab_to_fullname): Update.
10789         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
10790         unique_xmalloc_ptr.
10791         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
10792         (exec_file_find): Update.
10793         * psymtab.c (psymtab_to_fullname): Update.
10794         * nto-tdep.h (nto_find_and_open_solib): Update.
10795         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
10796         unique_xmalloc_ptr.
10797         * exec.c (exec_file_attach): Update.
10798         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
10799         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
10800
10801 2018-02-14  Tom Tromey  <tom@tromey.com>
10802
10803         * solib.c: Include source.h.
10804         * nto-tdep.c: Include source.h.
10805         * mi/mi-cmd-env.c: Include source.h.
10806         * infcmd.c: Include source.h.
10807         * exec.c: Include source.h.
10808         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
10809         (add_path, directory_switch, source_path, init_source_path): Move
10810         declarations...
10811         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
10812         (add_path, directory_switch, source_path, init_source_path):
10813         ...here.
10814
10815 2018-02-14  Tom Tromey  <tom@tromey.com>
10816
10817         * solist.h (exec_file_find, solib_find): Return
10818         unique_xmalloc_ptr.
10819         (solib_bfd_fopen): Take a const char *.
10820         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
10821         (exec_file_find, solib_find): Likewise.
10822         (solib_bfd_fopen): Do not take ownership of "pathname".
10823         (solib_bfd_open): Use unique_xmalloc_ptr.
10824         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
10825         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
10826         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
10827         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
10828
10829 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
10830
10831         * ada-lang.c (name_match_type_from_name): Remove reference to
10832         ada_name_for_lookup in function's documentation.
10833         * ada-lang.h (ada_name_for_lookup): Delete declaration.
10834
10835 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10836
10837         * defs.h (enum openp_flags): New enum.
10838         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10839         Move to enum openp_flags.
10840         (openp_flags): New enum flags.
10841         (openp): Change parameter type to openp_flags.
10842         * source.c (openp): Change parameter type to openp_flags.
10843         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10844         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10845
10846 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
10847
10848         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10849         per-command.
10850
10851 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10852
10853         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10854         into...
10855         (class dwarf2_queue_guard): ...the destructor of this new class.
10856         (dw2_do_instantiate_symtab): Create instance of the new class
10857         dwarf2_queue_guard, remove cleanup.
10858
10859 2018-02-09  Tom Tromey  <tom@tromey.com>
10860
10861         * source.c (find_source_lines): Don't reference past the end of
10862         the vector.
10863
10864 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10865
10866         * remote.c (remote_btrace_maybe_reopen): Change error message.
10867         * btrace.c (btrace_enable): Likewise.
10868         (parse_xml_btrace): Likewise.
10869         (parse_xml_btrace_conf): Likewise.
10870
10871 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10872
10873         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10874         (linux_enable_pt, linux_enable_bts): Call
10875         diagnose_perf_event_open_fail.
10876
10877 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10878
10879         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10880         Remove parameter and change return type.  Update callers.  Move it.
10881         (linux_enable_bts, linux_enable_pt): Improve error message.
10882         (linux_enable_pt): Remove zero buffer size check.
10883         (linux_enable_btrace): Improve error messages.  Remove NULL return
10884         check.
10885
10886 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10887
10888         * btrace.c (btrace_enable): Remove target_supports_btrace call.
10889         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10890         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10891         (linux_supports_pt, linux_supports_btrace): Remove.
10892         (linux_enable_bts): Call cpu_supports_bts.
10893         * nat/linux-btrace.h (linux_supports_btrace): Remove.
10894         * remote.c (remote_supports_btrace): Remove.
10895         (init_remote_ops): Remove remote_supports_btrace.
10896         * target-delegates.c: Regenerated.
10897         * target.c (target_supports_btrace): Remove.
10898         * target.h (target_ops) <to_supports_btrace>: Remove
10899         (target_supports_btrace): Remove.
10900         * x86-linux-nat.c (x86_linux_create_target): Remove
10901         linux_supports_btrace.
10902
10903 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10904
10905         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10906         btrace failed.
10907         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10908         exception and use message in own exception.
10909
10910 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10911
10912         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10913         (perf_event_pt_event_type): Use gdb_file_up.
10914         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10915         scoped_fd, and scoped_mmap.
10916
10917 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10918
10919         * common/scoped_mmap.h: New.
10920         * unittests/scoped_mmap-selftest.c: New.
10921         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10922         unittests/scoped_mmap-selftest.c.
10923
10924 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
10925
10926         * common/scoped_fd.h: New.
10927         * unittests/scoped_fd-selftest.c: New.
10928         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10929         unittests/scoped_fd-selftest.c.
10930
10931 2018-02-09  Tom Tromey  <tom@tromey.com>
10932
10933         * auto-load.c (auto_load_section_scripts): Use
10934         gdb::unique_xmalloc_ptr.
10935
10936 2018-02-09  Tom Tromey  <tom@tromey.com>
10937
10938         * auto-load.c (execute_script_contents): Use std::string.
10939
10940 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
10941
10942         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10943         Python function, rather than a new command.
10944
10945 2018-02-08  Tom Tromey  <tom@tromey.com>
10946
10947         * solib.c (solib_find_1): Use std::string.
10948         (solib_bfd_fopen): Use unique_xmalloc_ptr.
10949
10950 2018-02-08  Tom Tromey  <tom@tromey.com>
10951
10952         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10953
10954 2018-02-08  Tom Tromey  <tom@tromey.com>
10955
10956         * source.c (find_source_lines): Use gdb::def_vector.
10957
10958 2018-02-08  Tom Tromey  <tom@tromey.com>
10959
10960         * macrocmd.c (struct temporary_macro_definition): New.
10961         (macro_define_command): Use temporary_macro_definition.  Remove
10962         cleanups.
10963         (free_macro_definition_ptr): Remove.
10964
10965 2018-02-08  Tom Tromey  <tom@tromey.com>
10966
10967         * macroexp.c (maybe_expand): Use std::string.
10968
10969 2018-02-08  Tom Tromey  <tom@tromey.com>
10970
10971         * macroexp.c (struct macro_buffer): Add initializers for some
10972         members.
10973         (init_buffer, init_shared_buffer, free_buffer)
10974         (free_buffer_return_text): Remove.
10975         (macro_buffer): New constructors.
10976         (~macro_buffer): New destructor.
10977         (macro_buffer::set_shared): New method.
10978         (macro_buffer::resize_buffer, macro_buffer::appendc)
10979         (macro_buffer::appendmem): Now methods, not free functions.
10980         (set_token, append_tokens_without_splicing, stringify)
10981         (macro_stringify): Update.
10982         (gather_arguments): Change return type.  Remove argc_p argument,
10983         add args_ptr argument.  Use std::vector.
10984         (substitute_args): Remove argc argument.  Accept std::vector.
10985         (expand): Update.  Use std::vector.
10986         (scan, macro_expand, macro_expand_next): Update.
10987
10988 2018-02-08  Tom Tromey  <tom@tromey.com>
10989
10990         * symtab.c (default_collect_symbol_completion_matches_break_on):
10991         Use unique_xmalloc_ptr.
10992         * macroscope.h: (sal_macro_scope, user_macro_scope)
10993         (default_macro_scope): Return unique_xmalloc_ptr.
10994         * macroscope.c (sal_macro_scope, user_macro_scope)
10995         (default_macro_scope): Return unique_xmalloc_ptr.
10996         * macroexp.h (macro_expand, macro_expand_once): Return
10997         unique_xmalloc_ptr.
10998         * macroexp.c (macro_expand, macro_expand_once): Return
10999         unique_xmalloc_ptr.
11000         * macrocmd.c (macro_expand_command, macro_expand_once_command)
11001         (info_macro_command, info_macros_command): Use
11002         unique_xmalloc_ptr.
11003         * compile/compile-c-support.c (write_macro_definitions): Use
11004         unique_xmalloc_ptr.
11005         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11006
11007 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
11008
11009         * value.c (value_static_field): Assign field type instead of
11010         containing type when returning an optimized out value.
11011
11012 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11013
11014         * ft32-tdep.c (ft32_read_pc): Remove.
11015         (ft32_write_pc): Remove.
11016         (ft32_gdbarch_init): Update.
11017         * m32r-tdep.c (m32r_read_pc): Remove.
11018         (m32r_gdbarch_init): Update.
11019         * mep-tdep.c (mep_read_pc): Remove.
11020         (mep_gdbarch_init): Update.
11021         * microblaze-tdep.c (microblaze_write_pc): Remove.
11022         (microblaze_gdbarch_init): Update.
11023         * mn10300-tdep.c (mn10300_read_pc): Remove.
11024         (mn10300_write_pc): Remove.
11025         (mn10300_gdbarch_init): Update.
11026         * moxie-tdep.c (moxie_read_pc): Remove.
11027         (moxie_write_pc): Remove.
11028         (moxie_gdbarch_init): Update.
11029
11030 2018-02-06  Yao Qi  <yao.qi@linaro.org>
11031
11032         * expprint.c (print_subexp_standard): Handle
11033         OP_F77_UNDETERMINED_ARGLIST.
11034         (dump_subexp_body_standard): Likewise.
11035
11036 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
11037
11038         * target-descriptions.c (tdesc_element_visitor) Add empty
11039         implementations.
11040         (tdesc_type): Move make_gdb_type from here.
11041         (tdesc_type_builtin): Likewise.
11042         (tdesc_type_vector): Likewise.
11043         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11044         (make_gdb_type_struct): Move from tdesc_type_with_fields.
11045         (make_gdb_type_union): Likewise.
11046         (make_gdb_type_flags): Likewise.
11047         (make_gdb_type_enum): Likewise.
11048         (make_gdb_type): New function.
11049         (tdesc_register_type): Use static make_gdb_type.
11050
11051 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
11052
11053         * infcmd.c (default_print_one_register_info): Align natural-format
11054         column values consistently one under another.
11055         (pad_to_column): New function.
11056
11057 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
11058
11059         * dwarf2read.c (dwarf2_physname): Move commment.
11060
11061 2018-02-01  Leszek Swirski  <leszeks@google.com>
11062
11063         * varobj.c (varobj_formatted_print_options): Allow recursive
11064         pretty printing if pretty printing is enabled.
11065
11066 2018-02-01  Leszek Swirski  <leszeks@google.com>
11067
11068         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11069         names after a structop as a filename.
11070
11071 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11072
11073         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11074         (arm_record_coproc_data_proc): Likewise.
11075
11076 2018-02-01  Yao Qi  <yao.qi@linaro.org>
11077
11078         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11079
11080 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
11081
11082         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11083         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11084
11085 2018-01-31  Pedro Alves  <palves@redhat.com>
11086
11087         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11088         * inflow.c (child_terminal_save_inferior): Wrap reference to
11089         tcgetpgrp in HAVE_TERMIOS_H.
11090         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11091         _WIN32.
11092         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11093         always iterate over all inferiors.
11094         (gdbsim_cntrl_c): Adjust.
11095         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11096
11097 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11098
11099         * gdbtypes.c (lookup_array_range_type): Make sure the array's
11100         index type is objfile-owned if the element type is as well.
11101
11102 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
11103
11104         GDB 8.1 released.
11105
11106 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11107
11108         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11109         "features/s390x-linux64.c".
11110         (_initialize_s390_linux_tdep): Remove initialization of tdescs
11111         s390_linux32 and s390x_linux64.
11112         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11113         default tdesc.
11114         * s390-tdep.c: Include "features/s390-linux32.c" and
11115         "features/s390x-linux64.c".
11116         (s390_tdesc_valid): Add check for tdesc_has_registers.
11117         (s390_gdbarch_init): Make sure there is always a valid tdesc.
11118         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11119         tdesc_s390x_linux64.
11120         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11121         tdesc_s390x_linux64 to...
11122         * s390-tdep.h: ...here.
11123
11124 2018-01-30  Pedro Alves  <palves@redhat.com>
11125
11126         PR gdb/13211
11127         * config.in, configure: Regenerate.
11128         * configure.ac: Check for getpgid.
11129         * go32-nat.c (go32_pass_ctrlc): New.
11130         (go32_target): Install it.
11131         * inf-child.c (inf_child_target): Install
11132         child_terminal_save_inferior, child_pass_ctrlc and
11133         child_interrupt.
11134         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11135         (inf_ptrace_target): No longer install it.
11136         * infcmd.c (interrupt_target_1): Adjust.
11137         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11138         (child_interrupt): Declare.
11139         (inferior::terminal_state): New.
11140         * inflow.c (struct terminal_info): Update comments.
11141         (inferior_process_group): Delete.
11142         (terminal_is_ours): Delete.
11143         (gdb_tty_state): New.
11144         (child_terminal_init): Adjust.
11145         (is_gdb_terminal, sharing_input_terminal_1)
11146         (sharing_input_terminal): New functions.
11147         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
11148         Set the process's actual process group in the foreground if
11149         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
11150         mark terminal as the inferior's if not sharing GDB's terminal.
11151         Don't check attach_flag.
11152         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11153         pass down a target_terminal_state.
11154         (child_terminal_save_inferior): New, factored out from ...
11155         (child_terminal_ours_1): ... this.  Handle
11156         target_terminal_state::is_ours_for_output.
11157         (child_interrupt, child_pass_ctrlc): New.
11158         (inflow_inferior_exit): Clear the inferior's terminal_state.
11159         (copy_terminal_info): Copy the inferior's terminal state.
11160         (_initialize_inflow): Remove reference to terminal_is_ours.
11161         * inflow.h (inferior_process_group): Delete.
11162         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11163         * procfs.c (procfs_target): Don't install procfs_interrupt.
11164         (procfs_interrupt): Delete.
11165         * remote.c (remote_serial_quit_handler): Adjust.
11166         (remote_interrupt): Remove ptid parameter.  Adjust.
11167         * target-delegates.c: Regenerate.
11168         * target.c: Include "terminal.h".
11169         (target_terminal::terminal_state): Rename to ...
11170         (target_terminal::m_terminal_state): ... this.
11171         (target_terminal::init): Adjust.
11172         (target_terminal::inferior): Adjust to per-inferior
11173         terminal_state.
11174         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11175         (target_terminal::ours, target_terminal::ours_for_output): Use
11176         target_terminal_is_ours_kind.
11177         (target_interrupt): Remove ptid parameter.  Adjust.
11178         (default_target_pass_ctrlc): Adjust.
11179         * target.h (target_ops::to_terminal_save_inferior): New field.
11180         (target_ops::to_interrupt): Remove ptid_t parameter.
11181         (target_interrupt): Remove ptid_t parameter.  Update comment.
11182         (target_pass_ctrlc): Update comment.
11183         * target/target.h (target_terminal_state): New scoped enum,
11184         factored out of ...
11185         (target_terminal::terminal_state): ... here.
11186         (target_terminal::inferior): Update comments.
11187         (target_terminal::restore_inferior): New.
11188         (target_terminal::is_inferior, target_terminal::is_ours)
11189         (target_terminal::is_ours_for_output): Adjust.
11190         (target_terminal::scoped_restore_terminal_state): Adjust to
11191         rename, and call restore_inferior() instead of inferior().
11192         (target_terminal::scoped_restore_terminal_state::m_state): Change
11193         type.
11194         (target_terminal::terminal_state): Rename to ...
11195         (target_terminal::m_terminal_state): ... this and change type.
11196
11197 2018-01-30  Pedro Alves  <palves@redhat.com>
11198
11199         * linux-nat.c (wait_for_signal): New function.
11200         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11201         directly.
11202         (async_terminal_is_ours)
11203         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11204         (linux_nat_add_target): Don't override
11205         to_terminal_inferior/to_terminal_ours.
11206
11207 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
11208
11209         * remote.c (remote_follow_fork): Don't call "detach_inferior".
11210
11211 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
11212
11213         * dwarf2read.c (free_dwo_files): Add forward-declaration.
11214         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11215         dwarf2_per_objfile_free here.
11216         (dwarf2_per_objfile_free): Remove.
11217         (_initialize_dwarf2_read): Don't register
11218         dwarf2_per_objfile_free as a registry cleanup.
11219
11220 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
11221
11222         Avoid compilation errors in MinGW native builds
11223
11224         The error is triggered by including python-internal.h, and the
11225         error message is:
11226
11227              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11228                       from build-gnulib/import/math.h:27,
11229                       from d:/usr/Python26/include/pyport.h:235,
11230                       from d:/usr/Python26/include/Python.h:58,
11231                       from python/python-internal.h:94,
11232                       from python/py-arch.c:24:
11233              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11234         using ::hypot;
11235                 ^~~~~
11236
11237         This happens because Python headers define 'hypot' to expand t
11238         '_hypot' in the Windows builds.
11239         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11240         'hypoth'.  This avoids a compilation error.
11241
11242 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11243
11244         * MAINTAINERS (Write After Approval): Fix ordering.
11245
11246 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
11247
11248         * MAINTAINERS (Write After Approval): Add Alan Hayward.
11249
11250 2018-01-26  Alan Modra  <amodra@gmail.com>
11251
11252         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11253         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11254         Remove nop.  Make const.  Comment.
11255         (powerpc32_plt_stub_so_2): New.
11256         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11257         Correct count.  Update uses.
11258         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11259         Move common code reading PLT entry word.  Correct
11260         powerpc32_plt_stub PLT address calculation.
11261         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11262         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11263         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11264         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11265         (ppc64_standard_linkage8): Likewise.
11266         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11267         Correct insns description.
11268         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11269
11270 2018-01-24  Pedro Alves  <palves@redhat.com>
11271
11272         GCC PR libstdc++/83906
11273         * gdbtypes.c (operator==(const dynamic_prop &,
11274         const dynamic_prop &)): New.
11275         (operator==(const range_bounds &, const range_bounds &)): New.
11276         (check_types_equal): Use them instead of memcmp.
11277         * gdbtypes.h (operator==(const dynamic_prop &,
11278         const dynamic_prop &)): Declare.
11279         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11280         (operator==(const range_bounds &, const range_bounds &)): Declare.
11281         (operator!=(const range_bounds &, const range_bounds &)): Declare.
11282
11283 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11284
11285         * s390-linux-tdep.c (s390_record_address_mask)
11286         (s390_record_calc_disp_common, s390_record_calc_disp)
11287         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11288         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11289         (s390_process_record): Move to s390-tdep.c.
11290         (s390_linux_init_abi_any): Adjust.
11291         * s390-tdep.c (s390_record_address_mask)
11292         (s390_record_calc_disp_common, s390_record_calc_disp)
11293         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11294         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11295         (s390_process_record): Moved from s390-linux-tdep.c
11296         (s390_gdbarch_init): Adjust.
11297
11298 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11299
11300         * s390-linux-nat.c (s390-tdep.h): New include.
11301         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11302         (HFILES_NO_SRCDIR): Add s390-tdep.h.
11303         (ALLDEPFILES): Add s390-tdep.c.
11304         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11305         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11306         * s390-tdep.h: ...this.  New file.
11307         * s390-linux-tdep.c (s390-tdep.h): New include.
11308         (_initialize_s390_tdep): Rename to...
11309         (_initialize_s390_linux_tdep): ...this and adjust.
11310         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11311         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11312         s390-tdep.h.
11313         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11314         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11315         (s390_is_partial_instruction, s390_software_single_step)
11316         (is_non_branch_ril, s390_displaced_step_copy_insn)
11317         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11318         (s390_prologue_data, s390_addr, s390_store, s390_load)
11319         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11320         (s390_register_call_saved, s390_guess_tracepoint_registers)
11321         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11322         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11323         (s390_pseudo_register_name, s390_pseudo_register_type)
11324         (s390_pseudo_register_read, s390_pseudo_register_write)
11325         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11326         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11327         (s390_addr_bits_remove, s390_address_class_type_flags)
11328         (s390_address_class_type_flags_to_name)
11329         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11330         (s390_function_arg_float, s390_function_arg_vector)
11331         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11332         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11333         (s390_frame_align, s390_register_return_value, s390_return_value)
11334         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11335         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11336         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11337         (s390_trad_frame_prev_register, s390_unwind_cache)
11338         (s390_prologue_frame_unwind_cache)
11339         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11340         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11341         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11342         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11343         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11344         (s390_frame_base_address, s390_local_base_address)
11345         (s390_frame_base, s390_gcc_target_options)
11346         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11347         (s390_validate_reg_range, s390_tdesc_valid)
11348         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11349         * s390-tdep.c: ...this.  New file.
11350
11351 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11352
11353         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11354         (s390_process_record, s390_gdbarch_tdep_alloc)
11355         (s390_linux_init_abi_any): Use/set new hook.
11356
11357 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11358
11359         * s390-linux-tdep.c (osabi.h): New include.
11360         (s390_linux_init_abi_31, s390_linux_init_abi_64)
11361         (s390_linux_init_abi_any): New functions.
11362         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11363
11364 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11365
11366         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11367         tdesc_has_registers check
11368
11369 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11370
11371         * s390-linux-tdep.c (s390_tdesc_valid): New function.
11372         (s390_validate_reg_range): New macro.
11373         (s390_gdbarch_init): Adjust.
11374
11375 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11376
11377         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11378         (s390_gdbarch_tdep_alloc): Adjust.
11379         (s390_gdbarch_init): Adjust.
11380
11381 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11382
11383         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11384         <have_tdb>: Change type to bool.
11385         (s390_gdbarch_tdep_alloc): Adjust.
11386         (s390_gdbarch_init): Adjust.
11387
11388 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11389
11390         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11391         (gdbarch_tdep) <have_upper, have_vx>: New fields.
11392         (s390_gdbarch_tdep_alloc): New function.
11393         (s390_gdbarch_init): Allocate tdep at start and use its fields
11394         instead of separate variables.
11395
11396 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11397
11398         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11399         when looking for cached gdbarch and add comment for remaining.
11400
11401 2018-01-22  Pedro Alves  <palves@redhat.com>
11402             Sergio Durigan Junior  <sergiodj@redhat.com>
11403
11404         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11405         case.
11406
11407 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
11408
11409         * MAINTAINERS: Update my company e-mail address.
11410
11411 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11412
11413         * regcache.c (cooked_write_test): New function.
11414         (_initialize_regcache): Register the test.
11415
11416 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11417
11418         * ia64-tdep.c (ia64_pseudo_register_read): Call
11419         regcache->cooked_read instead of regcache_cooked_read_unsigned.
11420         * m32c-tdep.c (m32c_cat_read): Likewise.
11421         (m32c_r3r2r1r0_read): Likewise.
11422         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11423         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11424
11425 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11426
11427         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11428         method raw_read instead of regcache_raw_read.
11429         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11430         * arm-tdep.c (arm_neon_quad_read): Likewise.
11431         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11432         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11433         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11434         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11435         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11436         (i386_pseudo_register_read_into_value): Likewise.
11437         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11438         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11439         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11440         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11441         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11442         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
11443         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11444         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
11445         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11446
11447 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11448
11449         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11450         * configure.tgt: Remove target mt.
11451         * mt-tdep.c: Remove.
11452         * regcache.c (cooked_read_test): Remove the check for mt.
11453
11454 2018-01-22  Yao Qi  <yao.qi@linaro.org>
11455
11456         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11457         instead of gdbarch_pseudo_register_read_value.
11458
11459 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11460
11461         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11462         language is Ada.
11463
11464 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
11465
11466         * linespec.c (create_sals_line_offset): Remove code that preserved
11467         the symtab_and_line's line number.
11468
11469 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11470
11471         * varobj.c (varobj_create): Don't set valid_block when creating a
11472         floating varobj.
11473
11474 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11475
11476         * varobj.c (varobj_create): Remove out of date comment.
11477
11478 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11479
11480         PR mi/20395
11481         * ada-exp.y (write_var_from_sym): Pass extra parameter when
11482         updating innermost block.
11483         * parse.c (innermost_block_tracker::update): Take extra type
11484         parameter, and check types match before updating innermost block.
11485         (write_dollar_variable): Update innermost block for registers.
11486         * parser-defs.h (enum innermost_block_tracker_type): New enum.
11487         (innermost_block_tracker::innermost_block_tracker): Initialise
11488         m_types member.
11489         (innermost_block_tracker::reset): Take type parameter.
11490         (innermost_block_tracker::update): Take type parameter, and pass
11491         type through as needed.
11492         (innermost_block_tracker::m_types): New member.
11493         * varobj.c (varobj_create): Pass type when reseting innermost
11494         block.
11495
11496 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11497
11498         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11499         * ada-lang.c (resolve_subexp): Likewise.
11500         * breakpoint.c (set_breakpoint_condition) Likewise.
11501         (watch_command_1) Likewise.
11502         * c-exp.y (variable): Likewise.
11503         * d-exp.y (PrimaryExpression): Likewise.
11504         * f-exp.y (variable): Likewise.
11505         * go-exp.y (variable): Likewise.
11506         * m2-exp.y (variable): Likewise.
11507         * objfiles.c (objfile::~objfile): Likewise.
11508         * p-exp.y (variable): Likewise.
11509         * parse.c (innermost_block): Change type.
11510         * parser-defs.h (class innermost_block_tracker): New.
11511         (innermost_block): Change to innermost_block_tracker.
11512         * printcmd.c (display_command): Switch to innermost_block API.
11513         (do_one_display): Likewise.
11514         * rust-exp.y (do_one_display): Likewise.
11515         * symfile.c (clear_symtab_users): Likewise.
11516         * varobj.c (varobj_create): Switch to innermost_block API, replace
11517         use of innermost_block with block stored on varobj object.
11518
11519 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
11520
11521         * expression.h (innermost_block): Remove declaration.
11522         * varobj.c: Add 'parser-defs.h' include.
11523
11524 2018-01-19  Tom Tromey  <tom@tromey.com>
11525
11526         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11527         symbols in the static and global blocks.
11528
11529 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
11530
11531         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11532         gdb_ptrace.h, and move including gdb_wait.h ...
11533         * nat/linux-ptrace.h: ... to here.
11534
11535 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11536
11537         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11538         inf_ptrace_detach_success.
11539         (inf_ptrace_detach_success): Add inferior parameter, use it
11540         instead of inferior_ptid, pass it to detach_inferior.
11541         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11542         parameter.
11543         * inferior.c (detach_inferior): Add overload that takes an
11544         inferior object.
11545         * inferior.h (detach_inferior): Likewise.
11546         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11547         use inferior_ptid, adjust call to inf_ptrace_detach_success.
11548         * linux-thread-db.c (thread_db_detach): Use inf parameter.
11549
11550 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11551
11552         * target.h (struct target_ops) <to_detach>: Add inferior
11553         parameter.
11554         (target_detach): Likewise.
11555         * target.c (dispose_inferior): Pass inferior down.
11556         (target_detach): Pass inferior down.  Assert that it is equal to
11557         the current inferior.
11558         * aix-thread.c (aix_thread_detach): Pass inferior down.
11559         * corefile.c (core_file_command): Pass current_inferior() down.
11560         * corelow.c (core_detach): Add inferior parameter.
11561         * darwin-nat.c (darwin_detach): Likewise.
11562         * gnu-nat.c (gnu_detach): Likewise.
11563         * inf-ptrace.c (inf_ptrace_detach): Likewise.
11564         * infcmd.c (detach_command): Pass current_inferior() down to
11565         target_detach.
11566         * infrun.c (follow_fork_inferior): Pass parent_inf to
11567         target_detach.
11568         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11569         target_detach.
11570         * linux-nat.c (linux_nat_detach): Add inferior parameter.
11571         * linux-thread-db.c (thread_db_detach): Likewise.
11572         * nto-procfs.c (procfs_detach): Likewise.
11573         * procfs.c (procfs_detach): Likewise.
11574         * record.c (record_detach): Likewise.
11575         * record.h (struct inferior): Forward-declare.
11576         (record_detach): Add inferior parameter.
11577         * remote-sim.c (gdbsim_detach): Likewise.
11578         * remote.c (remote_detach_1): Likewise.
11579         (remote_detach): Likewise.
11580         (extended_remote_detach): Likewise.
11581         * sol-thread.c (sol_thread_detach): Likewise.
11582         * target-debug.h (target_debug_print_inferior_p): New macro.
11583         * target-delegates.c: Re-generate.
11584         * top.c (kill_or_detach): Pass inferior down to target_detach.
11585         * windows-nat.c (windows_detach): Add inferior parameter.
11586
11587 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
11588
11589         * target.h (struct target_ops) <to_detach>: Remove args
11590         parameter.
11591         (target_detach): Likewise.
11592         * target.c (dispose_inferior): Adjust.
11593         (target_detach): Remove args parameter, adjust.
11594         * aix-thread.c (aix_thread_detach): Adjust.
11595         * corefile.c (core_file_command): Adjust.
11596         * corelow.c (core_detach): Adjust.
11597         * darwin-nat.c (darwin_detach): Adjust.
11598         * gnu-nat.c (gnu_detach): Adjust.
11599         * inf-ptrace.c (inf_ptrace_detach): Adjust.
11600         * infcmd.c (detach_command): Adjust
11601         * infrun.c (follow_fork_inferior): Adjust.
11602         (handle_vfork_child_exec_or_exit): Adjust.
11603         * linux-fork.c (linux_fork_detach): Remove args parameter.
11604         * linux-fork.h (linux_fork_detach): Likewise.
11605         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11606         * linux-thread-db.c (thread_db_detach): Likewise.
11607         * nto-procfs.c (procfs_detach): Likewise.
11608         * procfs.c (procfs_detach): Likewise.
11609         (do_detach): Remove signo parameter.
11610         * record.c (record_detach): Remove args parameter.
11611         * record.h (record_detach): Likewise.
11612         * remote-sim.c (gdbsim_detach): Likewise.
11613         * remote.c (remote_detach_1): Likewise.
11614         (remote_detach): Likewise.
11615         (extended_remote_detach): Likewise.
11616         * sol-thread.c (sol_thread_detach): Likewise.
11617         * target-delegates.c: Re-generate.
11618         * top.c (struct qt_args) <args>: Remove field.
11619         (kill_or_detach): Don't pass args.
11620         (quit_force): Don't set args.
11621         * windows-nat.c (windows_detach): Remove args parameter.
11622
11623 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11624
11625         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11626         (arm_linux_init_abi): Install it.
11627
11628 2018-01-19  Yao Qi  <yao.qi@linaro.org>
11629
11630         * osabi.c (gdb_osabi_names): Extend the regexp for
11631         arm-linux-gnueabihf.
11632
11633 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11634
11635         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11636         m_abbrevs.
11637         (abbrev_table::add_abbrev): Update.
11638         (abbrev_table::lookup_abbrev): Update.
11639
11640 2018-01-18  Yao Qi  <yao.qi@linaro.org>
11641
11642         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11643
11644 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
11645
11646         * compile/compile.c (compile_to_object): Convert "triplet_rx"
11647         to "std::string".
11648
11649 2018-01-17  Tom Tromey  <tom@tromey.com>
11650
11651         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
11652
11653 2018-01-17  Tom Tromey  <tom@tromey.com>
11654
11655         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11656         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11657         (create_array_type_with_stride): Update.
11658         * dwarf2read.c (set_die_type): Update.
11659
11660 2018-01-17  Tom Tromey  <tom@tromey.com>
11661
11662         * dwarf2read.c (delayed_method_info): Remove typedef.
11663         (dwarf2_cu::method_info): Now a std::vector.
11664         (add_to_method_list): Update.
11665         (free_delayed_list): Remove.
11666         (compute_delayed_physnames): Update.
11667         (process_full_comp_unit, process_full_type_unit): Clear the method
11668         list.  Remove cleanups.
11669         (psymtab_include_file_name): Add name_holder parameter.  Use
11670         unique_xmalloc_ptr.
11671         (dwarf_decode_lines): Update.
11672
11673 2018-01-17  Tom Tromey  <tom@tromey.com>
11674             Simon Marchi  <simon.marchi@ericsson.com>
11675
11676         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11677         (dwarf2_per_objfile::free_cached_comp_units)
11678         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11679         (init_cutu_and_read_dies_no_follow): Update.
11680         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11681         (dwarf2_cu::~dwarf2_cu): New.
11682         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11683         (age_cached_comp_units, free_one_cached_comp_unit): Update.
11684
11685 2018-01-17  Tom Tromey  <tom@tromey.com>
11686             Simon Marchi  <simon.marchi@ericsson.com>
11687
11688         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11689         (struct die_reader_specs) <abbrev_table>: New member.
11690         (struct abbrev_table): Add constructor.
11691         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11692         <abbrev_obstack>: Now an auto_obstack.
11693         (abbrev_table_up): New typedef.
11694         (init_cu_die_reader): Add abbrev_table parameter.
11695         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11696         Add result_dwo_abbrev_table.
11697         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11698         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11699         Update.
11700         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11701         parameter.
11702         (skip_children): Update.
11703         (abbrev_table::alloc_abbrev): Rename from
11704         abbrev_table_alloc_abbrev.
11705         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11706         (abbrev_table::lookup_abbrev): Rename from
11707         abbrev_table_lookup_abbrev.
11708         (abbrev_table_read_table): Return abbrev_table_up.
11709         (abbrev_table_free, abbrev_table_free_cleanup)
11710         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11711         (load_partial_dies): Update.
11712
11713 2018-01-17  Tom Tromey  <tom@tromey.com>
11714
11715         * dwarf2read.c (dwarf2_compute_name): Update comment.
11716         (read_func_scope, read_variable): Update.
11717         (new_symbol): Remove.
11718         (new_symbol_full): Rename to new_symbol.
11719
11720 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
11721
11722         PR gdb/16577
11723         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11724         a warning instead of throwing an error, set section size to 0 and return
11725         NULL.
11726         * gdb_bfd.h (gdb_bfd_map_section): Update description.
11727
11728 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11729
11730         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11731         std::string.
11732         (linux_ptrace_attach_fail_reason_string): Likewise.
11733         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11734         Likewise.
11735         (linux_ptrace_attach_fail_reason_string): Likewise.
11736         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11737
11738 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
11739
11740         * linux-nat.c (linux_nat_attach): Remove xstrdup.
11741
11742 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
11743
11744         PR gdb/21559
11745         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11746         checking for fs_base/gs_base fields in struct user_regs_struct.
11747         * configure: Regenerate.
11748
11749 2018-01-17  Yao Qi  <yao.qi@linaro.org>
11750
11751         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11752         function.
11753         (aarch64_linux_init_abi): Install it to gdbarch hook
11754         gcc_target_options.
11755
11756 2018-01-15  Pedro Alves  <palves@redhat.com>
11757
11758         * common/signals-state-save-restore.c
11759         (save_original_signals_state): Fix typos.
11760
11761 2017-01-12  Tom Tromey  <tom@tromey.com>
11762             Sergio Durigan Junior  <sergiodj@redhat.com>
11763
11764         * Makefile.in (install-only): Install gdb-add-index.
11765
11766 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
11767
11768         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
11769
11770 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11771
11772         * infrun.c (keep_going_pass_signal): Clear step-over info when
11773         insert_breakpoints fails.
11774
11775 2018-01-11  Pedro Alves  <palves@redhat.com>
11776
11777         PR gdb/22583
11778         * infrun.c (resume): Rename to ...
11779         (resume_1): ... this.
11780         (resume): Reimplement as wrapper around resume_1.
11781
11782 2018-01-11  Pedro Alves  <palves@redhat.com>
11783
11784         PR remote/22597
11785         * remote.c (remote_parse_stop_reply): Default to the last-set
11786         general thread instead of to 'magic_null_ptid'.
11787
11788 2018-01-10  Pedro Alves  <palves@redhat.com>
11789
11790         * language.h (language_get_symbol_name_matcher): Rename ...
11791         (get_symbol_name_matcher): ... this.
11792         * language.c (language_get_symbol_name_matcher): Ditto.
11793         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
11794         callers adjusted.
11795
11796 2018-01-10  Pedro Alves  <palves@redhat.com>
11797
11798         PR gdb/22670
11799         * dwarf2read.c
11800         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
11801         Adjust to use language_get_symbol_name_matcher instead of
11802         language_defn::la_get_symbol_name_matcher.
11803         * language.c (language_get_symbol_name_matcher): If in Ada mode
11804         and the lookup name is a verbatim match, return Ada's matcher.
11805         * language.h (language_get_symbol_name_matcher): Adjust comment.
11806         (ada_lookup_name_info::verbatim_p):: New method.
11807
11808 2018-01-10  Pedro Alves  <palves@redhat.com>
11809
11810         PR gdb/22670
11811         * ada-lang.c (ada_collect_symbol_completion_matches): If the
11812         minsym's language is language_auto or language_cplus, pass down
11813         language_ada instead.
11814         * symtab.c (compare_symbol_name): Don't frob symbol language here.
11815
11816 2018-01-10  Pedro Alves  <palves@redhat.com>
11817
11818         PR gdb/22670
11819         * minsyms.c (linkage_name_str): New function.
11820         (iterate_over_minimal_symbols): Use it.
11821
11822 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11823
11824         * NEWS: Document that 'info proc' now works on FreeBSD.
11825
11826 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11827
11828         * configure.ac: Check for kinfo_getfile in libutil.
11829         * configure: Regenerate.
11830         * config.in: Regenerate.
11831         * fbsd-nat.c: Include "fbsd-tdep.h".
11832         (fbsd_fetch_cmdline): New.
11833         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
11834         rather than calling error.
11835         (fbsd_info_proc): New.
11836         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11837         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11838         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11839
11840 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11841
11842         * fbsd-nat.c (struct free_deleter): Remove.
11843         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11844
11845 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11846
11847         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11848         NULL for an empty pathname.
11849
11850 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
11851
11852         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11853         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11854         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11855         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11856         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11857         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11858         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11859         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11860         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11861         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11862         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11863         (fbsd_core_fetch_timeval, fbsd_print_sigset)
11864         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11865         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
11866         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11867
11868 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
11869
11870         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11871         (gnu_xfer_auxv): New function.
11872         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11873         TARGET_OBJECT_AUXV.
11874
11875 2018-01-08  Yao Qi  <yao.qi@linaro.org>
11876             Simon Marchi  <simon.marchi@ericsson.com>
11877
11878         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11879         common/selftest.c.
11880         (COMMON_OBS): Remove selftest.o.
11881         * configure.ac: Append selftest-arch.c and common/selftest.c to
11882         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
11883         * configure: Re-generated.
11884         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11885         GDB_SELF_TEST.
11886         (maintenance_info_selftests): Likewise.
11887
11888 2018-01-08  Xavier Roirand  <roirand@adacore.com>
11889
11890         * ada-valprint.c (val_print_packed_array_elements): Use
11891         proper number of elements when printing an array indexed
11892         by an enumeration type.
11893
11894 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
11895
11896         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11897         (dw2_get_file_names_reader): Adjust.
11898         (lookup_dwo_signatured_type): Adjust.
11899         (lookup_dwp_signatured_type): Adjust.
11900         (lookup_signatured_type): Adjust.
11901         (create_type_unit_group): Adjust.
11902         (get_type_unit_group): Adjust.
11903         (process_psymtab_comp_unit_reader): Adjust.
11904         (build_type_psymtabs_reader): Adjust.
11905         (scan_partial_symbols): Adjust.
11906         (add_partial_symbol): Adjust.
11907         (add_partial_subprogram): Adjust.
11908         (peek_die_abbrev): Adjust.
11909         (fixup_go_packaging): Adjust.
11910         (process_imported_unit_die): Adjust.
11911         (dwarf2_compute_name): Adjust.
11912         (dwarf2_physname): Adjust.
11913         (read_import_statement): Adjust.
11914         (handle_DW_AT_stmt_list): Adjust.
11915         (read_file_scope): Adjust.
11916         (read_func_scope): Adjust.
11917         (read_lexical_block_scope): Adjust.
11918         (read_call_site_scope): Adjust.
11919         (read_variable): Adjust.
11920         (dwarf2_rnglists_process): Adjust.
11921         (dwarf2_ranges_process): Adjust.
11922         (dwarf2_ranges_read): Adjust.
11923         (dwarf2_get_pc_bounds): Adjust.
11924         (dwarf2_record_block_ranges): Adjust.
11925         (dwarf2_add_field): Adjust.
11926         (dwarf2_add_member_fn): Adjust.
11927         (read_structure_type): Adjust.
11928         (process_structure_scope): Adjust.
11929         (read_enumeration_type): Adjust.
11930         (read_array_type): Adjust.
11931         (mark_common_block_symbol_computed): Adjust.
11932         (read_common_block): Adjust.
11933         (read_namespace_type): Adjust.
11934         (read_namespace): Adjust.
11935         (read_module_type): Adjust.
11936         (read_tag_pointer_type): Adjust.
11937         (read_tag_ptr_to_member_type): Adjust.
11938         (read_tag_string_type): Adjust.
11939         (read_subroutine_type): Adjust.
11940         (read_typedef): Adjust.
11941         (read_base_type): Adjust.
11942         (attr_to_dynamic_prop): Adjust.
11943         (read_subrange_type): Adjust.
11944         (read_unspecified_type): Adjust.
11945         (dwarf2_read_abbrevs): Adjust.
11946         (load_partial_dies): Adjust.
11947         (read_partial_die): Adjust.
11948         (find_partial_die): Adjust.
11949         (guess_partial_die_structure_name): Adjust.
11950         (fixup_partial_die): Adjust.
11951         (read_attribute_value): Adjust.
11952         (read_addr_index): Adjust.
11953         (read_addr_index_from_leb128): Adjust.
11954         (read_str_index): Adjust.
11955         (dwarf2_string_attr): Adjust.
11956         (get_debug_line_section): Adjust.
11957         (dwarf_decode_line_header): Adjust.
11958         (lnp_state_machine::check_line_address): Adjust.
11959         (dwarf_decode_lines_1): Adjust.
11960         (dwarf_decode_lines): Adjust.
11961         (dwarf2_start_symtab): Adjust.
11962         (var_decode_location): Adjust.
11963         (new_symbol_full): Adjust.
11964         (dwarf2_const_value_data): Adjust.
11965         (dwarf2_const_value_attr): Adjust.
11966         (dwarf2_const_value): Adjust.
11967         (die_type): Adjust.
11968         (die_containing_type): Adjust.
11969         (build_error_marker_type): Adjust.
11970         (lookup_die_type): Adjust.
11971         (guess_full_die_structure_name): Adjust.
11972         (anonymous_struct_prefix): Adjust.
11973         (determine_prefix): Adjust.
11974         (dwarf2_name): Adjust.
11975         (follow_die_ref_or_sig): Adjust.
11976         (follow_die_offset): Adjust.
11977         (follow_die_ref): Adjust.
11978         (follow_die_sig_1): Adjust.
11979         (follow_die_sig): Adjust.
11980         (get_signatured_type): Adjust.
11981         (get_DW_AT_signature_type): Adjust.
11982         (decode_locdesc): Adjust.
11983         (dwarf_decode_macros): Adjust.
11984         (cu_debug_loc_section): Adjust.
11985         (fill_in_loclist_baton): Adjust.
11986         (dwarf2_symbol_mark_computed): Adjust.
11987         (init_one_comp_unit): Don't assign
11988         dwarf2_cu::dwarf2_per_objfile.
11989         (set_die_type): Adjust.
11990
11991 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
11992
11993         * dwarf2read.c (struct mapped_debug_names): Add constructor.
11994         <dwarf2_per_objfile>: New field.
11995         (dwarf2_per_objfile): Remove global.
11996         (get_dwarf2_per_objfile): New function.
11997         (set_dwarf2_per_objfile): New function.
11998         (dwarf2_build_psymtabs_hard): Change objfile parameter to
11999         dwarf2_per_objfile.
12000         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12001         (read_abbrev_offset): Likewise.
12002         (read_indirect_string): Likewise.
12003         (read_indirect_line_string): Likewise.
12004         (read_indirect_string_at_offset): Likewise.
12005         (read_indirect_string_from_dwz): Likewise.
12006         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12007         dwarf2_per_objfile.
12008         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12009         (create_all_comp_units): Change objfile parameter to
12010         dwarf2_per_objfile.
12011         (create_all_type_units): Likewise.
12012         (process_queue): Add dwarf2_per_objfile parameter.
12013         (read_and_check_comp_unit_head): Likewise.
12014         (lookup_dwo_unit_in_dwp): Likewise.
12015         (get_dwp_file): Likewise.
12016         (process_cu_includes): Likewise.
12017         (struct free_dwo_file_cleanup_data): New struct.
12018         (dwarf2_has_info): Use get_dwarf2_per_objfile and
12019         set_dwarf2_per_objfile.
12020         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12021         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12022         context, adjust calls.
12023         (dw2_instantiate_symtab): Likewise.
12024         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12025         (dw2_get_cu): Likewise.
12026         (create_cu_from_index_list): Change objfile parameter to
12027         dwarf2_per_objfile.
12028         (create_cus_from_index_list): Get dwarf2_per_objfile from
12029         context, adjust calls.
12030         (create_cus_from_index): Likewise.
12031         (create_signatured_type_table_from_index): Change objfile
12032         parameter to dwarf2_per_objfile.
12033         (create_signatured_type_table_from_debug_names): Change objfile
12034         parameter to dwarf2_per_objfile.
12035         (create_addrmap_from_index): Likewise.
12036         (create_addrmap_from_aranges): Likewise.
12037         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12038         (dw2_setup): Remove.
12039         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12040         context.
12041         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12042         get_dwarf2_per_objfile.
12043         (dw2_forget_cached_source_info): Likewise.
12044         (dw2_map_symtabs_matching_filename): Likewise.
12045         (struct dw2_symtab_iterator) <index>: Remove.
12046         <dwarf2_per_objfile>: New field.
12047         (dw2_symtab_iter_init): Replace index parameter with
12048         dwarf2_per_objfile.
12049         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12050         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12051         (dw2_print_stats): Likewise.
12052         (dw2_dump): Likewise.
12053         (dw2_expand_symtabs_for_function): Likewise.
12054         (dw2_expand_all_symtabs): Likewise.
12055         (dw2_expand_symtabs_with_fullname): Likewise.
12056         (dw2_expand_marked_cus): Replace index and objfile parameters
12057         with dwarf2_per_objfile.
12058         (dw_expand_symtabs_matching_file_matcher): Add
12059         dwarf2_per_objfile parameter and adjust calls.
12060         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12061         adjust calls.
12062         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12063         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12064         adjust calls.
12065         (create_cus_from_debug_names_list): Replace objfile parameter
12066         with dwarf2_per_objfile and adjust calls.
12067         (create_cus_from_debug_names): Likewise.
12068         (dwarf2_read_debug_names): Likewise.
12069         (mapped_debug_names::namei_to_name): Adjust call.
12070         (dw2_debug_names_iterator::next): Likewise.
12071         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12072         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12073         (dw2_debug_names_dump): Likewise.
12074         (dw2_debug_names_expand_symtabs_for_function): Likewise.
12075         (dw2_debug_names_expand_symtabs_matching): Likewise.
12076         (dwarf2_initialize_objfile): Likewise.
12077         (dwarf2_build_psymtabs): Likewise.
12078         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12079         this_cu.
12080         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12081         (read_and_check_comp_unit_head): Likewise.
12082         (read_abbrev_offset): Likewise.
12083         (create_debug_type_hash_table): Likewise.
12084         (create_debug_types_hash_table): Likewise.
12085         (create_all_type_units): Replace objfile parameter with
12086         dwarf2_per_objfile.
12087         (add_type_unit): Add dwarf2_per_objfile parameter.
12088         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12089         with dwarf2_per_objfile.
12090         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12091         (lookup_dwp_signatured_type): Likewise.
12092         (lookup_signatured_type): Likewise.
12093         (read_cutu_die_from_dwo): Likewise.
12094         (init_tu_and_read_dwo_dies): Likewise.
12095         (init_cutu_and_read_dies): Likewise.
12096         (init_cutu_and_read_dies_no_follow): Likewise.
12097         (allocate_type_unit_groups_table): Add objfile parameter.
12098         (create_type_unit_group): Use dwarf2_per_objfile from cu.
12099         (get_type_unit_group): Likewise.
12100         (process_psymtab_comp_unit): Update call.
12101         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12102         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12103         (print_tu_stats): Likewise.
12104         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12105         in void* parameter.
12106         (build_type_psymtabs): Change objfile parameter to
12107         dwarf2_per_objfile.
12108         (process_skeletonless_type_unit): Use dwarf2_per_objfile
12109         passed in void* parameter.
12110         (process_skeletonless_type_units): Change objfile parameter to
12111         dwarf2_per_objfile.
12112         (set_partial_user): Likewise.
12113         (dwarf2_build_psymtabs_hard): Likewise.
12114         (read_comp_units_from_section): Likewise.
12115         (create_all_comp_units): Likewise.
12116         (scan_partial_symbols): Update calls.
12117         (add_partial_symbol): Likewise.
12118         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12119         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12120         (process_queue): Add dwarf2_per_objfile parameter.
12121         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12122         (compute_compunit_symtab_includes): Likewise.
12123         (process_cu_includes): Add dwarf2_per_objfile parameter.
12124         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12125         (process_full_type_unit): Likewise.
12126         (process_imported_unit_die): Update call.
12127         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12128         (read_file_scope): Likewise.
12129         (allocate_dwo_file_hash_table): Add objfile parameter.
12130         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12131         (create_cus_hash_table): Likewise.
12132         (create_dwp_hash_table): Likewise.
12133         (create_dwo_unit_in_dwp_v1): Likewise.
12134         (create_dwp_v2_section): Likewise.
12135         (create_dwo_unit_in_dwp_v2): Likewise.
12136         (lookup_dwo_unit_in_dwp): Likewise.
12137         (try_open_dwop_file): Likewise.
12138         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12139         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12140         cleanup to include a reference to dwarf2_per_objfile.
12141         (open_dwp_file): Add dwarf2_per_objfile parameter.
12142         (open_and_init_dwp_file): Likewise.
12143         (get_dwp_file): Likewise.
12144         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12145         (queue_and_load_all_dwo_tus): Update call.
12146         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12147         data.
12148         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12149         (dwarf2_ranges_process): Likewise.
12150         (dwarf2_get_pc_bounds): Likewise.
12151         (mark_common_block_symbol_computed): Likewise.
12152         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12153         (dwarf2_read_abbrevs): Update call.
12154         (read_partial_die): Use dwarf2_per_objfile from cu.
12155         (find_partial_die): Likewise.
12156         (fixup_partial_die): Likewise.
12157         (read_attribute_value): Likewise.
12158         (read_indirect_string_at_offset_from): Add objfile parameter.
12159         (read_indirect_string_at_offset): Add dwarf2_per_objfile
12160         parameter.
12161         (read_indirect_string_from_dwz): Add objfile parameter.
12162         (read_indirect_string): Add objfile parameter.
12163         (read_addr_index_1): Add dwarf2_per_objfile parameter.
12164         (read_addr_index): Use dwarf2_per_objfile from cu.
12165         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12166         call dw2_setup.
12167         (read_str_index): Use dwarf2_per_objfile from cu.
12168         (get_debug_line_section): Likewise.
12169         (read_formatted_entries): Add dwarf2_per_objfile parameter.
12170         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12171         (new_symbol_full): Use dwarf2_per_objfile from cu.
12172         (build_error_marker_type): Likewise.
12173         (lookup_die_type): Likewise.
12174         (determine_prefix): Likewise.
12175         (follow_die_offset): Likewise.
12176         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12177         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12178         (dwarf2_fetch_die_type_sect_off): Likewise.
12179         (dwarf2_get_die_type): Likewise.
12180         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12181         (get_signatured_type): Likewise.
12182         (get_DW_AT_signature_type): Likewise.
12183         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12184         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12185         (cu_debug_loc_section): Likewise.
12186         (fill_in_loclist_baton): Likewise.
12187         (dwarf2_symbol_mark_computed): Likewise.
12188         (dwarf2_find_containing_comp_unit): Change objfile parameter to
12189         dwarf2_per_objfile.
12190         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12191         parameter.
12192         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12193         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12194         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12195         (set_die_type): Use dwarf2_free_objfile from cu.
12196         (get_die_type_at_offset): Likewise.
12197         (dwarf2_per_objfile_free): Don't assign global variable.
12198         (debug_names) <constructor>: Add dwarf2_per_objfile
12199         parameter, update m_debugstrlookup construction.
12200         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12201         parameter.
12202         <m_dwarf2_per_objfile>: New field.
12203         <lookup>: Use m_dwarf2_per_objfile.
12204         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12205         (psyms_seen_size): Likewise.
12206         (write_gdbindex): Replace objfile parameter with
12207         dwarf2_per_objfile.
12208         (write_debug_names): Likewise.
12209         (write_psymtabs_to_index): Likewise.
12210         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12211         calls.
12212
12213 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12214
12215         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12216         <dwarf2_per_objfile>: New field.
12217         (struct dwarf2_per_cu_data) <objfile>: Remove.
12218         <dwarf2_per_objfile>: New field.
12219         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12220         of objfile.
12221         (create_signatured_type_table_from_index): Likewise.
12222         (create_debug_type_hash_table): Likewise.
12223         (fill_in_sig_entry_from_dwo_entry): Likewise.
12224         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12225         (create_type_unit_group): Assign dwarf2_per_objfile instead of
12226         objfile.
12227         (create_partial_symtab): Access objfile through
12228         dwarf2_per_objfile.
12229         (process_psymtab_comp_unit_reader): Likewise.
12230         (read_comp_units_from_section): Likewise.
12231         (scan_partial_symbols): Likewise.
12232         (add_partial_symbol): Likewise.
12233         (add_partial_subprogram): Likewise.
12234         (peek_die_abbrev): Likewise.
12235         (fixup_go_packaging): Likewise.
12236         (process_full_comp_unit): Likewise.
12237         (process_full_type_unit): Likewise.
12238         (process_imported_unit_die): Likewise.
12239         (dwarf2_compute_name): Likewise.
12240         (dwarf2_physname): Likewise.
12241         (read_import_statement): Likewise.
12242         (create_cus_hash_table): Assign dwarf2_physname instead of
12243         objfile.
12244         (read_func_scope): Access objfile through dwarf2_per_objfile.
12245         (read_lexical_block_scope): Likewise.
12246         (read_call_site_scope): Likewise.
12247         (read_variable): Likewise.
12248         (dwarf2_rnglists_process): Likewise.
12249         (dwarf2_ranges_process): Likewise.
12250         (dwarf2_ranges_read): Likewise.
12251         (dwarf2_record_block_ranges): Likewise.
12252         (dwarf2_add_field): Likewise.
12253         (dwarf2_add_member_fn): Likewise.
12254         (read_structure_type): Likewise.
12255         (process_structure_scope): Likewise.
12256         (read_enumeration_type): Likewise.
12257         (read_array_type): Likewise.
12258         (read_common_block): Likewise.
12259         (read_namespace_type): Likewise.
12260         (read_namespace): Likewise.
12261         (read_module_type): Likewise.
12262         (read_tag_pointer_type): Likewise.
12263         (read_tag_ptr_to_member_type): Likewise.
12264         (read_tag_string_type): Likewise.
12265         (read_subroutine_type): Likewise.
12266         (read_typedef): Likewise.
12267         (read_base_type): Likewise.
12268         (attr_to_dynamic_prop): Likewise.
12269         (read_subrange_type): Likewise.
12270         (read_unspecified_type): Likewise.
12271         (load_partial_dies): Likewise.
12272         (read_partial_die): Likewise.
12273         (find_partial_die): Likewise.
12274         (guess_partial_die_structure_name): Likewise.
12275         (fixup_partial_die): Likewise.
12276         (read_attribute_value): Likewise.
12277         (read_addr_index_from_leb128): Likewise.
12278         (dwarf2_read_addr_index): Likewise.
12279         (dwarf2_string_attr): Likewise.
12280         (lnp_state_machine::check_line_address): Likewise.
12281         (dwarf_decode_lines_1): Likewise.
12282         (dwarf_decode_lines): Likewise.
12283         (dwarf2_start_symtab): Likewise.
12284         (var_decode_location): Likewise.
12285         (new_symbol_full): Likewise.
12286         (dwarf2_const_value_data): Likewise.
12287         (dwarf2_const_value_attr): Likewise.
12288         (dwarf2_const_value): Likewise.
12289         (die_type): Likewise.
12290         (die_containing_type): Likewise.
12291         (lookup_die_type): Likewise.
12292         (guess_full_die_structure_name): Likewise.
12293         (anonymous_struct_prefix): Likewise.
12294         (dwarf2_name): Likewise.
12295         (follow_die_ref_or_sig): Likewise.
12296         (follow_die_offset): Likewise.
12297         (follow_die_ref): Likewise.
12298         (dwarf2_fetch_die_loc_sect_off): Likewise.
12299         (dwarf2_fetch_constant_bytes): Likewise.
12300         (dwarf2_fetch_die_type_sect_off): Likewise.
12301         (dwarf2_get_die_type): Likewise.
12302         (follow_die_sig): Likewise.
12303         (decode_locdesc): Likewise.
12304         (dwarf2_per_cu_objfile): Likewise.
12305         (dwarf2_per_cu_text_offset): Likewise.
12306         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12307         objfile.
12308         (set_die_type): Access objfile through
12309         dwarf2_per_objfile.
12310
12311 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
12312
12313         * valprint.c (converted_character_d): Remove typedef.
12314         (DEF_VEC_O (converted_character_d)): Remove.
12315         (count_next_character): Use std::vector.
12316         (print_converted_chars_to_obstack): Likewise.
12317         (generic_printstr): Likewise.
12318
12319 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12320
12321         * xml-support.h (struct gdb_xml_value): Add constructor.
12322         <value>: Change type to unique_xmalloc_ptr.
12323         (gdb_xml_value_s): Remove typedef.
12324         (DEF_VEC_O (gdb_xml_value_s)): Remove.
12325         (gdb_xml_element_start_handler): Change parameter type to
12326         std::vector.
12327         (xml_find_attribute): Likewise.
12328         * xml-support.c (xml_find_attribute): Change parameter type to
12329         std::vector and adjust.
12330         (gdb_xml_values_cleanup): Remove.
12331         (gdb_xml_parser::start_element): Adjust to std::vector.
12332         (xinclude_start_include): Change paraeter type to std::vector
12333         and adjust.
12334         * btrace.c (check_xml_btrace_version): Likewise.
12335         (parse_xml_btrace_block): Likewise.
12336         (parse_xml_btrace_pt_config_cpu): Likewise.
12337         (parse_xml_btrace_pt): Likewise.
12338         (parse_xml_btrace_conf_bts): Likewise.
12339         (parse_xml_btrace_conf_pt): Likewise.
12340         * memory-map.c (memory_map_start_memory): Likewise.
12341         (memory_map_start_property): Likewise.
12342         * osdata.c (osdata_start_osdata): Likewise.
12343         (osdata_start_item): Likewise.
12344         (osdata_start_column): Likewise.
12345         * remote.c (start_thread): Likewise.
12346         * solib-aix.c (library_list_start_library): Likewise.
12347         (library_list_start_list): Likewise.
12348         * solib-svr4.c (library_list_start_library): Likewise.
12349         (svr4_library_list_start_list): Likewise.
12350         * solib-target.c (library_list_start_segment): Likewise.
12351         (library_list_start_section): Likewise.
12352         (library_list_start_library): Likewise.
12353         (library_list_start_list): Likewise.
12354         * tracepoint.c (traceframe_info_start_memory): Likewise.
12355         (traceframe_info_start_tvar): Likewise.
12356         * xml-syscall.c (syscall_start_syscall): Likewise.
12357         * xml-tdesc.c (tdesc_start_target): Likewise.
12358         (tdesc_start_feature): Likewise.
12359         (tdesc_start_reg): Likewise.
12360         (tdesc_start_union): Likewise.
12361         (tdesc_start_struct): Likewise.
12362         (tdesc_start_flags): Likewise.
12363         (tdesc_start_enum): Likewise.
12364         (tdesc_start_field): Likewise.
12365         (tdesc_start_enum_value): Likewise.
12366         (tdesc_start_vector): Likewise.
12367
12368 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12369
12370         * extension.h (struct xmethod_worker) <clone>: Remove.
12371         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12372         Remove.
12373         (python_xmethod_worker::clone): Remove.
12374         * valops.c (find_overload_match): Use std::move instead of
12375         clone.
12376
12377 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12378
12379         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12380         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12381         <free_xmethod_worker_data>: Remove.
12382         <get_matching_xmethod_workers>: Chance VEC to std::vector.
12383         <get_xmethod_arg_types>: Remove.
12384         <get_xmethod_result_type>: Remove.
12385         <invoke_xmethod>: Remove.
12386         * extension.c (new_xmethod_worker): Remove.
12387         (clone_xmethod_worker): Remove.
12388         (get_matching_xmethod_workers): Return void, pass std::vector by
12389         pointer.
12390         (get_xmethod_arg_types): Rename to...
12391         (xmethod_worker::get_arg_types): ... this, and adjust.
12392         (get_xmethod_result_type): Rename to...
12393         (xmethod_worker::get_result_type): ... this, and adjust.
12394         (invoke_xmethod): Remove.
12395         (free_xmethod_worker): Remove.
12396         (free_xmethod_worker_vec): Remove.
12397         * extension.h (enum ext_lang_rc): Move here from
12398         extension-priv.h.
12399         (struct xmethod_worker): Add constructor and destructor.
12400         <data>: Remove.
12401         <value>: Remove.
12402         <invoke, clone, do_get_result_type, do_get_arg_types>: New
12403         virtual pure methods.
12404         <get_arg_types, get_result_type>: New methods.
12405         (xmethod_worker_ptr): Remove typedef.
12406         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12407         (xmethod_worker_vec): Remove typedef.
12408         (xmethod_worker_up): New typedef.
12409         (invoke_xmethod): Remove.
12410         (clone_xmethod_worker): Remove.
12411         (free_xmethod_worker): Remove.
12412         (free_xmethod_worker_vec): Remove.
12413         (get_xmethod_arg_types): Remove.
12414         (get_xmethod_result_type): Remove.
12415         * valops.c (find_method_list): Use std::vector, don't use
12416         intermediate vector.
12417         (value_find_oload_method_list): Use std::vector.
12418         (find_overload_match): Use std::vector.
12419         (find_oload_champ): Use std::vector.
12420         * value.c (value_free): Use operator delete.
12421         (value_of_xmethod): Rename to...
12422         (value_from_xmethod): ... this.  Don't assign
12423         xmethod_worker::value, take rvalue-reference.
12424         (result_type_of_xmethod): Adjust.
12425         (call_xmethod): Adjust.
12426         * value.h: Include extension.h.
12427         (struct xmethod_worker): Don't forward-declare.
12428         (value_of_xmethod): Rename to...
12429         (value_from_xmethod): ... this, take rvalue-reference.
12430         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12431         (struct python_xmethod_worker): ... this, add constructor and
12432         destructor.
12433         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12434         (gdbpy_free_xmethod_worker_data): Rename to...
12435         (python_xmethod_worker::~python_xmethod_worker): ... this and
12436         adjust.
12437         (gdbpy_clone_xmethod_worker_data): Rename to...
12438         (python_xmethod_worker::clone): ... this and adjust.
12439         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12440         temporary vector.
12441         (gdbpy_get_xmethod_arg_types): Rename to...
12442         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12443         (gdbpy_get_xmethod_result_type): Rename to...
12444         (python_xmethod_worker::do_get_result_type): ... this and
12445         adjust.
12446         (gdbpy_invoke_xmethod): Rename to...
12447         (python_xmethod_worker::invoke): ... this and adjust.
12448         (new_python_xmethod_worker): Rename to...
12449         (python_xmethod_worker::python_xmethod_worker): ... this and
12450         adjust.
12451         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12452         Remove.
12453         (gdbpy_free_xmethod_worker_data): Remove.
12454         (gdbpy_get_matching_xmethod_workers): Use std::vector.
12455         (gdbpy_get_xmethod_arg_types): Remove.
12456         (gdbpy_get_xmethod_result_type): Remove.
12457         (gdbpy_invoke_xmethod): Remove.
12458         * python/python.c (python_extension_ops): Remove obsolete
12459         callbacks.
12460
12461 2018-01-05  Pedro Alves  <palves@redhat.com>
12462
12463         PR gdb/18653
12464         * common/signals-state-save-restore.c
12465         (save_original_signals_state): New parameter 'quiet'.  Warn if we
12466         find a custom handler preinstalled, instead of internal erroring.
12467         But only warn if !quiet.
12468         * common/signals-state-save-restore.h
12469         (save_original_signals_state): New parameter 'quiet'.
12470         * main.c (captured_main_1): Move save_original_signals_state call
12471         after option handling, and pass QUIET.
12472
12473 2018-01-05  Pedro Alves  <palves@redhat.com>
12474
12475         * spu-tdep.c (spu_catch_start): Pass
12476         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12477
12478 2018-01-05  Pedro Alves  <palves@redhat.com>
12479
12480         PR gdb/22670
12481         * ada-lang.c (literal_symbol_name_matcher): New function.
12482         (ada_get_symbol_name_matcher): Use it for
12483         symbol_name_match_type::SEARCH_NAME.
12484         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
12485         it down instead of assuming symbol_name_match_type::FULL.
12486         * block.h (block_lookup_symbol): New parameter 'match_type'.
12487         * c-valprint.c (print_unpacked_pointer): Use
12488         lookup_symbol_search_name instead of lookup_symbol.
12489         * compile/compile-object-load.c (get_out_value_type): Pass down
12490         symbol_name_match_type::SEARCH_NAME.
12491         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12492         symbol_name_match_type::FULL.
12493         * cp-support.c (cp_get_symbol_name_matcher): Handle
12494         symbol_name_match_type::SEARCH_NAME.
12495         * infrun.c (insert_exception_resume_breakpoint): Use
12496         lookup_symbol_search_name.
12497         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12498         * psymtab.c (maintenance_check_psymtabs): Use
12499         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12500         * stack.c (print_frame_args): Use lookup_symbol_search_name and
12501         SYMBOL_SEARCH_NAME.
12502         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12503         if symbol_name_match_type::SEARCH_NAME.
12504         (lookup_symbol_in_language): Pass down
12505         symbol_name_match_type::FULL.
12506         (lookup_symbol_search_name): New.
12507         (lookup_language_this): Pass down
12508         symbol_name_match_type::SEARCH_NAME.
12509         (lookup_symbol_aux, lookup_local_symbol): New parameter
12510         'match_type'.  Pass it down.
12511         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12512         (lookup_symbol_search_name): New declaration.
12513         (lookup_symbol_in_block): New 'match_type' parameter.
12514
12515 2018-01-05  Pedro Alves  <palves@redhat.com>
12516
12517         PR gdb/22670
12518         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12519         ada_lookup_symbol.
12520         (ada_lookup_symbol): Reimplement in terms of
12521         ada_lookup_symbol_list, bits factored out from
12522         ada_lookup_encoded_symbol.
12523
12524 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12525
12526         * ada-exp.y (write_object_renaming): When subscripting an array
12527         using a symbol as the index, pass the block in call to
12528         ada_lookup_encoded_symbol when looking that symbol up.
12529
12530 2018-01-05  Jerome Guitton  <guitton@adacore.com>
12531
12532         * ada-lang.c (ada_array_length): Use ada_index_type instead of
12533         TYPE_INDEX_TYPE.
12534
12535 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12536
12537         * ada-lang.c (ada_to_fixed_value_create): Add handling of
12538         the case where VALUE_LVAL (val0) is not lval_memory.
12539
12540 2018-01-05  Xavier Roirand  <roirand@adacore.com>
12541
12542         * ada-valprint.c (print_optional_low_bound): Handle
12543         character-indexed array printing like boolean-indexed array
12544         printing.
12545
12546 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12547
12548         * NEWS: Create a new section for the next release branch.
12549         Rename the section of the current branch, now that it has
12550         been cut.
12551
12552 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
12553
12554         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12555         * version.in: Bump version to 8.1.50.DATE-git.
12556
12557 2018-01-03  Xavier Roirand  <roirand@adacore.com>
12558
12559         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12560         Add field.
12561         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12562         Add field.
12563         (default_exception_support_info) <catch_handlers_sym>: Add field.
12564         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12565         (ada_exception_name_addr_1): Add "catch handlers" handling.
12566         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12567         Update all callers.
12568         (create_excep_cond_exprs) <ex>: Add parameter.
12569         (re_set_exception): Update create_excep_cond_exprs call.
12570         (print_it_exception, print_one_exception, print_mention_exception)
12571         (print_recreate_exception): Add "catch handler" handling.
12572         (allocate_location_catch_handlers, re_set_catch_handlers)
12573         (check_status_catch_handlers, print_it_catch_handlers)
12574         (print_one_catch_handlers, print_mention_catch_handlers)
12575         (print_recreate_catch_handlers): New function.
12576         (catch_handlers_breakpoint_ops): New variable.
12577         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12578         Add parameter.  Add "catch handler" handling.
12579         (ada_exception_sym_name, ada_exception_breakpoint_ops):
12580         Add "catch handler" handling.
12581         (ada_exception_catchpoint_cond_string): Add "catch handler"
12582         handling.
12583         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12584         call.
12585         (catch_ada_handlers_command): New function.
12586         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12587         operations structure.
12588         (_initialize_ada_language): Add "catch handlers" command entry.
12589         * NEWS: Document "catch handlers" feature.
12590
12591 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12592
12593         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12594         account when creating the array type of the slice.
12595         (ada_value_slice): Likewise.
12596
12597 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12598
12599         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12600         New enum value.
12601         (create_array_type_with_stride): Add byte_stride_prop parameter.
12602         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12603         New parameter.  Update all callers in this file.
12604         (array_type_has_dynamic_stride): New function.
12605         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12606         of arrays with dynamic byte strides.
12607         * dwarf2read.c (read_array_type): Add support for dynamic
12608         DW_AT_byte_stride attributes.
12609
12610 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
12611
12612         * dwarf2read.c (read_unspecified_type): Treat
12613         DW_TAG_enumeration_type DIEs from Ada units as stubs.
12614
12615 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12616
12617         Update copyright year range in all GDB files.
12618
12619 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12620
12621         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12622         and gdb/testsuite/gdb.base/step-line.c.
12623
12624 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12625
12626         * copyright.py (main): Dump the contents of
12627         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12628         even if BY_HAND is empty.
12629
12630 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12631
12632         * top.c (print_gdb_version): Update Copyright year in version
12633         message.
12634
12635 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
12636
12637         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12638
12639 For older changes see ChangeLog-2017.
12640 \f
12641 Local Variables:
12642 mode: change-log
12643 left-margin: 8
12644 fill-column: 74
12645 version-control: never
12646 coding: utf-8
12647 End: